query
stringlengths 7
5.25k
| document
stringlengths 15
1.06M
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
1. split into sections based by '++' 2. trim whitespace 3. convert from markdown to html | function process_body($b)
{
$b = trim($b);
$b = Markdown::defaultTransform($b);
return $b;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function markdown_echappe_code($texte){\n\t$texte = echappe_retour($texte);\n\n\t// tous les paragraphes indentes par 4 espaces ou une tabulation\n\t// mais qui ne sont pas la suite d'une liste ou d'un blockquote\n\tpreg_match_all(\",(^( |\\t|\\* |\\+ |- |> |\\d+\\.)(.*)$(\\s*^(\\s+|\\t).*$)*?),Uims\",$texte,$matches,PREG_SET_ORDER);\n\tforeach($matches as $match){\n\t\tif (!strlen(trim($match[2]))){\n\t\t\t#var_dump($match[0]);\n\t\t\t$p = strpos($texte,$match[0]);\n\t\t\t$texte = substr_replace($texte,code_echappement($match[0], 'md', true),$p,strlen($match[0]));\n\t\t}\n\t}\n\n\tif (strpos($texte,\"```\")!==false OR strpos($texte,\"~~~\")!==false){\n\t\t$texte = echappe_html($texte,'md',true,',^(```|~~~)\\w*?\\s.*\\s(\\1),Uims');\n\t}\n\tif (strpos($texte,\"``\")!==false){\n\t\t$texte = echappe_html($texte,'md',true,',``.*``,Uims');\n\t}\n\tif (strpos($texte,\"`\")!==false){\n\t\t$texte = echappe_html($texte,'md',true,',`.*`,Uims');\n\t}\n\n\t// escaping\n\tif (strpos($texte,\"\\\\\")!==false){\n\t\t$texte = echappe_html($texte,'md',true,',\\\\\\\\[\\\\`*_{}\\[\\]\\(\\)>+.!-],Uims');\n\t}\n\n\treturn $texte;\n}",
"function markdown_filtre_portions_md($texte,$filtre){\n\tif (strpos($texte,\"<md>\")!==false){\n\t\tpreg_match_all(\",<md>(.*)</md>,Uims\",$texte,$matches,PREG_SET_ORDER);\n\t\tforeach($matches as $m){\n\t\t\t$t = $filtre($m[1]);\n\t\t\t$p = strpos($texte,$m[1]);\n\t\t\t$texte = substr_replace($texte,$t,$p-4,strlen($m[1])+9);\n\t\t}\n\t}\n\treturn $texte;\n}",
"function ciniki_systemdocs_processMarkdown($ciniki, $content) {\n\n //\n // Escape any existing html\n //\n $content = htmlspecialchars($content);\n\n //\n // Break into lines\n //\n $lines = explode(\"\\n\", $content);\n\n //\n // Check for lists\n //\n $prev_line = '';\n $list_level = 0;\n $list_type = '';\n $paragraph = 0;\n $pre = 0;\n foreach($lines as $lnum => $line) {\n/*\n //\n // Check for subtitles\n //\n if( preg_match('/^\\s*\\#\\#\\s+(.*)$/', $line, $matches) ) {\n $lines[$lnum] = '<h3>' . $matches[1] . '</h3>';\n } \n // Check for list item\n // or for hex number or number unordered list\n // 1 - The first number\n else*/\n if( $pre == 0 && preg_match('/^\\s*[+-]\\s*(.*)$/', $line, $matches) ) {\n if( $list_level == 0 ) {\n if( $paragraph > 0 ) {\n $lines[$lnum-1] .= \"</p>\";\n $paragraph = 0;\n }\n $lines[$lnum] = \"<ul>\\n\" . '<li>' . $matches[1];\n $list_level++;\n $list_type = 'ul';\n } else {\n $lines[$lnum] = '<li>' . $matches[1];\n }\n }\n elseif( $pre == 0 && preg_match('/^\\s*[0-9]\\.\\s+(.*)$/', $line, $matches) ) {\n if( $list_level == 0 ) {\n if( $paragraph > 0 ) {\n $lines[$lnum-1] .= \"</p>\";\n $paragraph = 0;\n }\n $lines[$lnum] = \"<ol>\\n\" . '<li>' . $matches[1];\n $list_level++;\n $list_type = 'ol';\n } else {\n $lines[$lnum] = '<li>' . $matches[1];\n }\n }\n // 0x01 - The first flag\n elseif( $pre == 0 && preg_match('/^\\s*((0x[0-9]+|[0-9]+)\\s*-\\s*(.*))$/', $line, $matches) ) {\n if( $list_level == 0 ) {\n if( $paragraph > 0 ) {\n $lines[$lnum-1] .= \"</p>\";\n $paragraph = 0;\n }\n $lines[$lnum] = \"<dl>\\n\" . '<dt>' . $matches[2] . '</dt><dd>' . $matches[3];\n $list_level++;\n $list_type = 'dl';\n } else {\n $lines[$lnum] = '</dd><dt>' . $matches[2] . '</dt><dd>' . $matches[3];\n }\n }\n // Definition lists\n // Label text :: The first item in the list\n elseif( $pre == 0 && preg_match('/^\\s*((.*)\\s::\\s(.*))$/', $line, $matches) ) {\n if( $list_level == 0 ) {\n if( $paragraph > 0 ) {\n $lines[$lnum-1] .= \"</p>\";\n $paragraph = 0;\n }\n $lines[$lnum] = \"<dl>\\n\" . '<dt>' . $matches[2] . '</dt><dd>' . $matches[3];\n $list_level++;\n $list_type = 'dl';\n } else {\n $lines[$lnum] = '</dd><dt>' . $matches[2] . '</dt><dd>' . $matches[3];\n }\n }\n // Check for tables\n // Check for text line\n elseif( $pre == 0 && preg_match('/^\\s*((.*)\\s\\|\\s\\s*(.*))$/', $line, $matches) ) {\n if( $list_level == 0 ) {\n if( $paragraph > 0 ) {\n $lines[$lnum-1] .= \"</p>\";\n $paragraph = 0;\n }\n $lines[$lnum] = '<table><tr><td>' . $matches[2] . '</td><td>' . $matches[3];\n $list_level++;\n $list_type = 'table';\n } else {\n $lines[$lnum] = '</td></tr><tr><td>' . $matches[2] . '</td><td>' . $matches[3];\n }\n }\n elseif( preg_match('/^```/', $line, $matches) ) {\n if( $paragraph == 1 ) {\n $lines[$lnum-1] .= '</p>';\n $paragraph = 0;\n }\n if( $pre == 1 ) {\n $lines[$lnum] = '</pre>';\n $pre = 0;\n } else {\n $lines[$lnum] = '<pre>';\n $pre = 1;\n }\n }\n //\n // Check for **test**<space><space><newline>text\n //\n elseif( $paragraph == 0 && $list_level == 0 && preg_match('/^\\s*\\*\\*(.*)\\*\\*\\s*$/', $line, $matches) && isset($lines[$lnum+1]) && preg_match('/[a-zA-Z0-9]/', $lines[$lnum+1])) {\n $lines[$lnum] = '<p><strong>' . $matches[1] . '</strong><br/>';\n $paragraph = 1;\n }\n // Check for blank line, end of list\n elseif( $list_level > 0 && preg_match('/^\\s*$/', $line) ) {\n if( $list_type == 'dl' ) {\n $lines[$lnum] = '</dd></dl>';\n } elseif( $list_type == 'table' ) {\n $lines[$lnum] = '</td></tr></table>';\n } else {\n $lines[$lnum] = '</ul>';\n }\n $list_level = 0;\n }\n // Check for blank line, end of paragraph\n elseif( $paragraph > 0 && preg_match('/^\\s*$/', $line) ) {\n $lines[$lnum] = '</p>';\n $paragraph = 0;\n }\n // Check if text line and paragraph should start\n elseif( $pre == 0 && $paragraph == 0 && $list_level == 0 && preg_match('/[a-zA-Z0-9]/', $line) ) {\n $lines[$lnum] = '<p>' . $line;\n $paragraph = 1;\n }\n\n //\n // Check for emphasis\n // *em*, or **strong**\n //\n if( $pre == 0 ) {\n $lines[$lnum] = preg_replace('/\\*\\*([^\\*]+)\\*\\*/', '<strong>$1</strong>', $lines[$lnum]);\n $lines[$lnum] = preg_replace('/\\*([^\\*]+)\\*/', '<em>$1</em>', $lines[$lnum]);\n }\n }\n if( $list_level > 0 ) {\n if( $list_type == 'dl' ) {\n $lines[$lnum+1] = '</dd></dl>';\n } elseif( $list_type == 'table' ) {\n $lines[$lnum+1] = '</td></tr></table>';\n } else {\n $lines[$lnum+1] = '</ul>';\n }\n }\n elseif( $paragraph > 0 ) {\n $lines[$lnum+1] = '</p>';\n }\n\n $html_content = implode(\"\\n\", $lines);\n \n //\n // Check for URL's\n //\n // URL's with a title\n $html_content = preg_replace('/\\[([^\\]]+)\\]\\((http[^\\)]+)\\)/', '<a target=\"_blank\" href=\"$2\">$1</a>', $html_content);\n // URL's without a title\n $html_content = preg_replace('/([^\\\"])(http[^ ]+)/', '$1<a target=\"_blank\" href=\"$2\">$2</a>', $html_content);\n\n return array('stat'=>'ok', 'html_content'=>$html_content);\n}",
"function markdown_echappe_liens($texte){\n\t//[blabla](http://...) et \n\tif (strpos($texte,\"](\")!==false){\n\t\tpreg_match_all(\",([!]?\\[[^]]*\\])(\\([^)]*\\)),Uims\",$texte,$matches,PREG_SET_ORDER);\n\t\tforeach($matches as $match){\n\t\t\t#var_dump($match);\n\t\t\t$p = strpos($texte,$match[0]);\n\t\t\t$pre = $match[1];\n\t\t\tif (strncmp($pre,\"!\",1)==0){\n\t\t\t\t$pre = code_echappement(\"!\", 'md', true).substr($pre,1);\n\t\t\t}\n\t\t\t$texte = substr_replace($texte,$pre.code_echappement($match[2], 'md', true),$p,strlen($match[0]));\n\t\t}\n\t}\n\t// [blabla]: http://....\n\tif (strpos($texte,\"[\")!==false){\n\t\tpreg_match_all(\",^(\\s*\\[[^]]*\\])(:[ \\t]+[^\\s]*(\\s+(\\\".*\\\"|'.*'|\\(.*\\)))?)\\s*$,Uims\",$texte,$matches,PREG_SET_ORDER);\n\t\tforeach($matches as $match){\n\t\t\t#var_dump($match);\n\t\t\t$p = strpos($texte,$match[0])+strlen($match[1]);\n\t\t\t$texte = substr_replace($texte,code_echappement($match[2], 'md', true),$p,strlen($match[2]));\n\t\t}\n\t}\n\t// ![Markdown Logo][image]\n\tif (strpos($texte,\"![\")!==false){\n\t\tpreg_match_all(\",^(!\\[[^]]*\\])(\\[[^]]*\\])$,Uims\",$texte,$matches,PREG_SET_ORDER);\n\t\tforeach($matches as $match){\n\t\t\t#var_dump($match);\n\t\t\t$p = strpos($texte,$match[0]);\n\t\t\t$texte = substr_replace($texte,code_echappement(\"!\", 'md', true),$p,1);\n\t\t}\n\t}\n\t// <http://...>\n\t$texte = echappe_html($texte,'md',true,',' . '<https?://[^<]*>'.',UimsS');\n\n\treturn $texte;\n}",
"function markdown_pre_echappe_html_propre($texte){\n\tstatic $syntaxe_defaut = null;\n\n\tif (is_null($syntaxe_defaut)){\n\t\t// lever un flag pour dire que ce pipeline est bien OK\n\t\tif (!defined('_pre_echappe_html_propre_ok'))\n\t\t\tdefine('_pre_echappe_html_propre_ok',true);\n\t\t// on peut forcer par define, utile pour les tests unitaires\n\t\tif (defined('_MARKDOWN_SYNTAXE_PAR_DEFAUT'))\n\t\t\t$syntaxe_defaut = _MARKDOWN_SYNTAXE_PAR_DEFAUT;\n\t\telse {\n\t\t\tinclude_spip('inc/config');\n\t\t\t$syntaxe_defaut = lire_config(\"markdown/syntaxe_par_defaut\",\"spip\");\n\t\t}\n\t}\n\n\t// si syntaxe par defaut est markdown et pas de <md> dans le texte on les introduits\n\tif ($syntaxe_defaut===\"markdown\"\n\t\t// est-ce judicieux de tester cette condition ?\n\t AND strpos($texte,\"<md>\")===false\n\t ){\n\t\t$texte = str_replace(array(\"<spip>\",\"</spip>\"),array(\"</md>\",\"<md>\"),$texte);\n\t\t$texte = \"<md>$texte</md>\";\n\t\t$texte = str_replace(\"<md></md>\",\"\",$texte);\n\t}\n\n\tif (strpos($texte,\"<md>\")!==false){\n\t\t// Compat SPIP <3.0.17\n\t\tif (!function_exists(\"traiter_echap_math_dist\")){\n\t\t\t$texte = echappe_html_3017($texte,\"mdblocs\",false,',<(md)(\\s[^>]*)?'.'>(.*)</\\1>,UimsS');\n\t\t}\n\t\telse {\n\t\t\t// echapper les blocs <md>...</md> car on ne veut pas toucher au <html>, <code>, <script> qui sont dedans !\n\t\t\t$texte = echappe_html($texte,\"mdblocs\",false,',<(md)(\\s[^>]*)?'.'>(.*)</\\1>,UimsS');\n\t\t}\n\t}\n\n\n\treturn $texte;\n}",
"abstract protected function getMarkdown();",
"function markdown($text)\n{\n return Parsedown::instance()->parse($text);\n}",
"function markdown_raccourcis($texte){\n\n\t$md = $texte;\n\n\t// enlever les \\n\\n apres <div class=\"base64....\"></div>\n\t// et surtout le passer en <p> car ca perturbe moins Markdown\n\tif (strpos($md,'<div class=\"base64')!==false){\n\t\t$md = preg_replace(\",(<div (class=\\\"base64[^>]*>)</div>)\\n\\n,Uims\",\"<p \\\\2</p>\",$md);\n\t}\n\n\t// marquer les ul/ol explicites qu'on ne veut pas modifier\n\tif (stripos($md,\"<ul\")!==false OR stripos($md,\"<ol\")!==false OR stripos($md,\"<li\")!==false)\n\t\t$md = preg_replace(\",<(ul|ol|li)(\\s),Uims\",\"<$1 html$2\",$md);\n\n\t// parser le markdown\n\t$md = Parsedown::instance()->parse($md);\n\n\t// class spip sur ul et ol et retablir les ul/ol explicites d'origine\n\t$md = str_replace(array(\"<ul>\",\"<ol>\",\"<li>\"),array('<ul'.$GLOBALS['class_spip_plus'].'>','<ol'.$GLOBALS['class_spip_plus'].'>','<li'.$GLOBALS['class_spip'].'>'),$md);\n\t$md = str_replace(array(\"<ul html\",\"<ol html\",\"<li html\"),array('<ul','<ol','<li'),$md);\n\n\t// Si on avait des <p class=\"base64\"></p> les repasser en div\n\t// et reparagrapher car MD n'est pas tres fort et fait de la soupe <p><div></div></p>\n\tif (strpos($md,'<p class=\"base64')!==false){\n\t\t$md = preg_replace(\",(<p (class=\\\"base64[^>]*>)</p>),Uims\",\"<div \\\\2</div>\",$md);\n\t\t$md = paragrapher($md);\n\t\t// pas d'autobr introduit par paragrapher\n\t\tif (_AUTO_BR AND strpos($md,_AUTOBR)!==false){\n\t\t\t$md = str_replace(_AUTOBR,'',$md);\n\t\t}\n\t\t// eviter les >\\n\\n<p : un seul \\n\n\t\tif (strpos($md,\">\\n\\n<p\")!==false){\n\t\t\t$md = str_replace(\">\\n\\n<p\",\">\\n<p\",$md);\n\t\t}\n\t}\n\n\t// echapper le markdown pour que SPIP n'y touche plus\n\treturn code_echappement($md,\"md\");\n}",
"function markdown_pre_propre($texte){\n\tif (!class_exists(\"Parsedown\")){\n\t\tinclude_once _DIR_PLUGIN_MARKDOWN.\"lib/parsedown/Parsedown.php\";\n\t}\n\n\t$mes_notes = \"\";\n\t// traiter les notes ici si il y a du <md> pour avoir une numerotation coherente\n\tif (strpos($texte,\"<md>\")!==false\n\t AND strpos($texte,\"[[\")!==false){\n\t\t$notes = charger_fonction('notes', 'inc');\n\t\t// Gerer les notes (ne passe pas dans le pipeline)\n\t\tlist($texte, $mes_notes) = $notes($texte);\n\t}\n\n\t$texte = markdown_filtre_portions_md($texte,\"markdown_raccourcis\");\n\n\tif ($mes_notes)\n\t\t$notes($mes_notes,'traiter');\n\n\treturn $texte;\n}",
"function parse_markdown($str) {\n\tglobal $parsedown;\n\t// return $ciconia->render($str);\n\treturn $parsedown->text($str);\n}",
"function markdown($content)\n{\n $parser = new MarkdownExtra;\n\n if (Config::get('theming.markdown_hard_wrap')) {\n $parser->hard_wrap = true;\n }\n\n return $parser->transform($content);\n}",
"function markdown2html($text)\n{\n\t$text = html($text);\n\t\n\t// Convert plain-text formatting to HTML\n\t\n\t// strong emphasis\n\t$text = preg_replace('/__(.+?)__/s', '<strong>$1</strong>', $text);\n\t$text = preg_replace('/\\*\\*(.+?)\\*\\*/s', '<strong>$1</strong>', $text);\n\t\n\t// emphasis\n\t$text = preg_replace('/_([^_]+)_/', '<em>$1</em>', $text);\n\t$text = preg_replace('/\\*([^\\*]+)\\*/', '<em>$1</em>', $text);\n\t\n\t// Convert Windows (\\r\\n) to Unix (\\n)\n\t$text = str_replace(\"\\r\\n\", \"\\n\", $text);\n\t// Convert Macintosh (\\r) to Unix (\\n)\n\t$text = str_replace(\"\\r\", \"\\n\", $text);\n\t\n\t// Paragraphs\n $text = '<p>' . str_replace(\"\\n\\n\", '</p><p>', $text) . '</p>';\n\t// Line breaks\n\t$text = str_replace(\"\\n\", '<br>', $text);\n\t\n\t// Url links\n\t$text = preg_replace(\n\t\t\t'/\\[([^\\]]+)]\\(([-a-z0-9._~:\\/?#@!$&\\'()*+,;=%]+)\\)/i',\n\t\t\t'<a href=\"$2\">$1</a>', $text);\n\t\n\treturn $text;\n}",
"function markdown($text)\n{\n return (new ParsedownExtra)->text($text);\n}",
"function wikiplugin_split($data, $params, $pos) {\n\tglobal $tikilib, $tiki_p_admin_wiki, $tiki_p_admin, $section;\n\tglobal $replacement;\n\n // Remove first <ENTER> if exists...\n // it may be here if present after {SPLIT()} in original text\n\tif (substr($data, 0, 2) == \"\\r\\n\")\n\t\t$data2 = substr($data, 2);\n\telse\n\t\t$data2 = $data;\n\t\n\textract ($params, EXTR_SKIP);\n $fixedsize = (!isset($fixedsize) || $fixedsize == 'y' || $fixedsize == 1 ? true : false);\n $joincols = (!isset($joincols) || $joincols == 'y' || $joincols == 1 ? true : false);\n // Split data by rows and cells\n\n $sections = preg_split(\"/@@@+/\", $data2);\n $rows = array();\n $maxcols = 0;\n foreach ($sections as $i)\n {\n \t// split by --- but not by ----\n\t//\t$rows[] = preg_split(\"/([^\\-]---[^\\-]|^---[^\\-]|[^\\-]---$|^---$)+/\", $i);\n\t//\tnot to eat the character close to - and to split on --- and not ----\n\t\t$rows[] = preg_split(\"/(?<!-)---(?!-)/\", $i);\n $maxcols = max($maxcols, count(end($rows)));\n }\n\n // Is there split sections present?\n // Do not touch anything if no... even don't generate <table>\n if (count($rows) <= 1 && count($rows[0]) <= 1)\n return $data;\n\n\t$percent = false;\n\tif (isset($colsize)) {\n\t\t$tdsize= explode(\"|\", $colsize);\n\t\t$tdtotal=0;\n\t\tfor ($i=0;$i<$maxcols;$i++) {\n\t\t if (!isset($tdsize[$i])) {\n\t\t $tdsize[$i]=0;\n\t\t } else {\n\t\t\t$tdsize[$i] = trim($tdsize[$i]);\n\t\t\tif (strstr($tdsize[$i], '%')) {\n\t\t\t\t$percent = true;\n\t\t\t}\n\t\t }\n\t\t $tdtotal+=$tdsize[$i];\n\t\t}\n\t\t$tdtotaltd=floor($tdtotal/100*100);\n\t\tif ($tdtotaltd == 100) // avoir IE to do to far\n\t\t\t$class = 'class=\"normalnoborder split\"';\n\t\telse\n\t\t\t$class = 'class=\"split\" width=\"'.$tdtotaltd.'%\"';\n\t} elseif ($fixedsize) {\n\t\t$columnSize = floor(100 / $maxcols);\n\t\t$class = 'class=\"normalnoborder split\"';\n\t\t$percent = true;\t\n\t}\n\tif (!isset($edit)) $edit = 'n';\n\t$result = \"<table border='0' cellpadding='0' cellspacing='0' class='wikiplugin-split\".($percent ? \" normalnoborder\" : \"\").( !empty($customclass) ? \" $customclass\" : \"\").\"'>\";\n\n // Attention: Dont forget to remove leading empty line in section ...\n // it should remain from previous '---' line...\n // Attention: origianl text must be placed between \\n's!!!\n if (!isset($first) || $first != 'col') {\n foreach ($rows as $r) {\n $result .= \"<tr>\";\n $idx = 1;\n foreach ($r as $i) {\n\t\t\t\t// Remove first <ENTER> if exists\n if (substr($i, 0, 2) == \"\\r\\n\") $i = substr($i, 2);\n // Generate colspan for last element if needed\n $colspan = ((count($r) == $idx) && (($maxcols - $idx) > 0) ? ' colspan=\"'.($maxcols - $idx + 1).'\"' : '');\n $idx++;\n // Add cell to table\n\t\t\tif (isset($colsize)) {\n\t\t\t\t$width = ' width=\"'.$tdsize[$idx-2].'\"';\n\t\t\t} elseif ($fixedsize) {\n\t\t\t\t$width = ' width=\"'.$columnSize.'%\" ';\n\t\t\t} else {\n\t\t\t\t$width = '';\n\t\t\t}\n \t\t $result .= '<td valign=\"top\"'.$width.$colspan.'>'\n\t\t\t\t// Insert \"\\n\" at data begin (so start-of-line-sensitive syntaxes will be parsed OK)\n\t\t\t\t.\"\\n\"\n\t\t\t\t// now prepend any carriage return and newline char with br\n\t\t\t\t.preg_replace(\"/\\r?\\n/\", \"<br />\\r\\n\", $i)\n . '</td>';\n }\n \n $result .= \"</tr>\";\n }\n } else { // column first\n\tif ($edit == 'y') {\n\t\tglobal $user;\n\t\tif (isset($_REQUEST['page'])) {\n\t\t\t$type = 'wiki page';\n\t\t\t$object = $_REQUEST['page'];\n\t\t\tif ($tiki_p_admin_wiki == 'y' || $tiki_p_admin == 'y')\n\t\t\t\t$perm = true;\n\t\t\telse\n\t\t\t\t$perm = $tikilib->user_has_perm_on_object($user, $object, $type, 'tiki_p_edit');\n\t\t} else { // TODO: other object type\n\t\t\t$perm = false;\n\t\t}\n }\n\t$ind = 0;\n\t$icell = 0;\n\t$result .= '<tr>';\n\tforeach ($rows as $r) {\n\t\t$idx = 0;\n\t\t$result .= '<td valign=\"top\" '.(($fixedsize && isset($tdsize))? ' width=\"'.$tdsize[$idx].'%\"' : '').'>';\n\t\tforeach ($r as $i) {\n\t\t\tif (substr($i, 0, 2) == \"\\r\\n\") {\n\t\t\t\t$i = substr($i, 2);\n\t\t\t\t$ind += 2;\n\t\t\t}\n\t\t\tif ($edit == 'y' && $perm && $section == 'wiki page') {\n\t\t\t\t$result .= '<div class=\"split\"><div style=\"float:right\">';\n$result .= \"$pos-$icell-\".htmlspecialchars(substr($data,$pos, 10));\n \t\t\t\t$result .= '<a href=\"tiki-editpage.php?page='.$object.'&pos='.$pos.'&cell='.$icell.'\">'\n \t .'<img src=\"pics/icons/page_edit.png\" alt=\"'.tra('Edit').'\" title=\"'.tra('Edit').'\" border=\"0\" width=\"16\" height=\"16\" /></a></div><br />';\n \t\t\t\t$ind += strlen($i);\n\t\t\t\twhile (isset($data[$ind]) && ($data[$ind] == '-' || $data[$ind] == '@'))\n\t\t\t\t\t++$ind;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$result .= '<div>';\n\t\t\t$result .= preg_replace(\"/\\r?\\n/\", \"<br />\\r\\n\", $i). '</div>';\n\t\t\t++$idx;\n\t\t\t++$icell;\n\t\t}\n\t\t$result .= '</td>';\n\t}\n\t$result .= '</tr>';\n }\n // Close HTML table (no \\n at end!)\n\t$result .= \"</table>\";\n\n\treturn $result;\n}",
"function markdownout($text)\n{\n\techo markdown2html($text);\n}",
"function jabLeaveMarkdown()\n{\n\tglobal $jab;\n\tif (--$jab['markdown_depth']==0)\n\t{\n\t\t// Format content\n\t\t$html=jabMarkdown(ob_get_contents(), $jab['markdown_safe']);\n\n\t\tob_end_clean();\n\t\t\n\t\techo $html;\n\t}\t\n}",
"function markdown_pre_liens($texte){\n\t// si pas de base64 dans le texte, rien a faire\n\tif (strpos($texte,\"base64mdblocs\")!==false) {\n\t\t// il suffit de desechapper les blocs <md> (mais dont on a echappe le code)\n\t\t$texte = echappe_retour($texte,'mdblocs');\n\t}\n\n\t// ici on a le html du code SPIP echappe, mais sans avoir touche au code MD qui est echappe aussi\n\treturn $texte;\n}",
"function markdown_echappe_del($texte){\n\tif (strpos($texte,\"~~\")!==false){\n\t\t$texte = echappe_html($texte,'md',true,',~~,Uims');\n\t}\n\n\treturn $texte;\n}",
"function extract_motion_text_from_wiki_text($text)\n{\n $motion = extract_motion_text_from_wiki_text_for_edit($text);\n\n if (!preg_match(\"/.*<\\/.*?>/\", $motion))\n {\n $motionlines = explode(\"\\n\", $motion);\n $binUL = 0;\n $res = array();\n $matches = array();\n foreach ($motionlines as $motionline)\n {\n $ml = preg_replace(\"/''(.*?)''/\", \"<em>\\\\1</em>\", $motionline);\n $ml = preg_replace(\"/\\[(https?:\\S*)\\s+(.*?)\\]/\", \"<a href=\\\"\\\\1\\\">\\\\2</a>\", $ml);\n $ml = preg_replace(\"/(?<![*\\s])(\\[(\\d+)\\])/\", \"<sup class=\\\"sup-\\\\2\\\"><a class=\\\"sup\\\" href=\\\"#footnote-\\\\2\\\" onclick=\\\"ClickSup(\\\\2); return false;\\\">\\\\1</a></sup>\", $ml);\n #$ml = preg_replace(\"/(\\[\\d+])/\", \"<sup>\\\\1</sup>\", $ml);\n if (preg_match(\"/^\\s\\s*$/\", $ml))\n continue;\n if (preg_match(\"/^@/\", $ml)) // skip comment lines we lift up for the short sentences\n continue;\n if (preg_match(\"/^(\\*|:)/\", $ml))\n {\n if (!$binUL)\n $res[] = \"<ul>\";\n $binUL = (preg_match(\"/^\\*\\*/\", $ml) ? 2 : 1);\n if (preg_match(\"/^:/\", $ml))\n $binUL = 3;\n else if (preg_match(\"/^\\s*\\*\\s*\\[\\d+\\]/\", $ml, $matches))\n {\n $binUL = 4; \n $footnum = preg_replace(\"/[\\s\\*\\[\\]]+/\", \"\", $matches[0]); // awful stuff because I can't pull out bits like in python\n }\n $ml = preg_replace(\"/^(\\*\\*|\\*|:)\\s*/\", \"\", $ml);\n }\n else if ($binUL != 0)\n {\n $binUL = 0;\n $res[] = \"</ul>\";\n }\n\n \n if ($binUL == 0)\n $res[] = \"<p>\";\n else if ($binUL == 2)\n $res[] = \"<li class=\\\"house\\\">\";\n else if ($binUL == 3)\n $res[] = \"<li class=\\\"block\\\">\";\n else if ($binUL == 4)\n $res[] = \"<li class=\\\"footnote\\\" id=\\\"footnote-$footnum\\\">\";\n else\n $res[] = \"<li>\";\n \n $res[] = $ml;\n \n if ($binUL == 0)\n $res[] = \"</p>\";\n else\n $res[] = \"</li>\";\n }\n if ($binUL)\n $res[] = \"</ul>\";\n $motion = implode(\"\\n\", $res);\n #$motion = preg_replace(\"/\\*/\", \"HIHI\", $motion);\n }\n $motion = guy2html(guy_strip_bad(trim($motion)));\n\n return $motion;\n}",
"function acf_parse_markdown($text = '')\n{\n}",
"function markdown(string $text): string\n\t{\n\t\t$parser = Services::markdown();\n\t\treturn $parser->convertToHtml($text);\n\t}",
"function parse_markdown($markdown)\n\t{\n\t\t$ci = & get_instance();\n\t\t$ci->load->library('markdown_parser');\n\n\t\treturn Markdown($markdown);\n\t}",
"function markdownToHtml($string, $config = [])\n{\n $Parsedown = new Parsedown();\n foreach ($config as $option => $value) {\n if ($option === 'breaksEnabled') {\n $Parsedown->setBreaksEnabled($value);\n } elseif ($option === 'markupEscaped') {\n $Parsedown->setMarkupEscaped($value);\n } elseif ($option === 'urlsLinked') {\n $Parsedown->setUrlsLinked($value);\n } else {\n throw new \\InvalidArgumentException(\"Invalid Parsedown option \\\"$option\\\"\");\n }\n }\n return $Parsedown->text($string);\n}",
"public function parseMarkdown(): HtmlString\n {\n $text = $this->getMarkdown();\n\n if ($text instanceof Collection) {\n $text = $text->toArray();\n }\n\n // If the data is an array, or a collection, we will treat each array item as a line.\n if (is_array($text)) {\n $text = implode(PHP_EOL, $text);\n }\n\n return Markdown::parse((string)$text);\n }",
"function markdownify( &$input ){\n return $input;\n }",
"function traiter_echap_md_dist($regs){\n\t// echapons le code dans le markdown\n\t$texte = markdown_echappe_code($regs[3]);\n\t$texte = markdown_echappe_liens($texte);\n\t$texte = markdown_echappe_del($texte);\n\treturn \"<md\".$regs[2].\">$texte</md>\";\n}",
"function markdown_pre_typo($texte){\n\treturn $texte;\n}",
"function clean_indesign() {\r\n\t\t$array_rxp = array(\r\n\t\t\r\n\t\t// page number references in the table of contents\r\n\t\t'<span class=\"toc-leader-dots[^\"]*?\">\\s*<\\/span>\\s*[0-9ivxlcdmIVXLCDM]{1,}\\s*<\\/p>' => '</p>',\r\n\t\t\r\n\t\t'<p([^>]*?) class=\"h1\"([^>]*?)>(.*?)<\\/p>' => '<h1\\1\\2>\\3</h1>',\r\n\t\t'<p([^>]*?) class=\"h2\"([^>]*?)>(.*?)<\\/p>' => '<h2\\1\\2>\\3</h2>',\r\n\t\t'<p([^>]*?) class=\"h3\"([^>]*?)>(.*?)<\\/p>' => '<h3\\1\\2>\\3</h3>',\r\n\t\t'<p([^>]*?) class=\"h4\"([^>]*?)>(.*?)<\\/p>' => '<h4\\1\\2>\\3</h4>',\r\n\t\t'<p([^>]*?) class=\"h5\"([^>]*?)>(.*?)<\\/p>' => '<h5\\1\\2>\\3</h5>',\r\n\t\t'<p([^>]*?) class=\"h6\"([^>]*?)>(.*?)<\\/p>' => '<h6\\1\\2>\\3</h6>',\r\n\t\t\r\n\t\t'<p([^>]*?) class=\"head-1\"([^>]*?)>(.*?)<\\/p>' => '<h1\\1\\2>\\3</h1>',\r\n\t\t'<p([^>]*?) class=\"head-2\"([^>]*?)>(.*?)<\\/p>' => '<h2\\1\\2>\\3</h2>',\r\n\t\t'<p([^>]*?) class=\"head-3\"([^>]*?)>(.*?)<\\/p>' => '<h3\\1\\2>\\3</h3>',\r\n\t\t'<p([^>]*?) class=\"head-4\"([^>]*?)>(.*?)<\\/p>' => '<h4\\1\\2>\\3</h4>',\r\n\t\t'<p([^>]*?) class=\"head-5\"([^>]*?)>(.*?)<\\/p>' => '<h5\\1\\2>\\3</h5>',\r\n\t\t'<p([^>]*?) class=\"head-6\"([^>]*?)>(.*?)<\\/p>' => '<h6\\1\\2>\\3</h6>',\r\n\t\t\r\n\t\t//'<p([^>]*?) class=\"h1\"([^>]*?)>(.*?)<\\/p>' => '<h1\\1\\2>\\3</h1>',\r\n\t\t'<p([^>]*?) class=\"section-heading\"([^>]*?)>(.*?)<\\/p>' => '<h2\\1\\2>\\3</h2>',\r\n\t\t'<p([^>]*?) class=\"heading\"([^>]*?)>(.*?)<\\/p>' => '<h3\\1\\2>\\3</h3>',\r\n\t\t'<p([^>]*?) class=\"subheading\"([^>]*?)>(.*?)<\\/p>' => '<h4\\1\\2>\\3</h4>',\r\n\t\t//'<p([^>]*?) class=\"h5\"([^>]*?)>(.*?)<\\/p>' => '<h5\\1\\2>\\3</h5>',\r\n\t\t//'<p([^>]*?) class=\"h6\"([^>]*?)>(.*?)<\\/p>' => '<h6\\1\\2>\\3</h6>',\r\n\t\t\r\n\t\t'<p([^>]*?) class=\"toc-toc-main-section[^\"]{0,}\"([^>]*?)>(.*?)<\\/p>' => '<li\\1\\2>\\3</li>',\r\n\t\t'<p([^>]*?) class=\"toc-toc-heading[^\"]{0,}\"([^>]*?)>(.*?)<\\/p>' => '<li\\1\\2>\\3</li>',\r\n\t\t'<p([^>]*?) class=\"toc-toc-subsection[^\"]{0,}\"([^>]*?)>(.*?)<\\/p>' => '<li\\1\\2>\\3</li>',\r\n\t\t\r\n\t\t'<span([^>]*?) class=\"em\"([^>]*?)>(.*?)<\\/span>' => '<em\\1\\2>\\3</em>',\r\n\t\t'<span([^>]*?) class=\"strong\"([^>]*?)>(.*?)<\\/span>' => '<strong\\1\\2>\\3</strong>',\r\n\t\t'<span([^>]*?) class=\"em-strong\"([^>]*?)>(.*?)<\\/span>' => '<strong\\1\\2><em>\\3</em></strong>',\r\n\t\t\r\n\t\t'<span([^>]*?) class=\"italic\"([^>]*?)>(.*?)<\\/span>' => '<em\\1\\2>\\3</em>',\r\n\t\t'<span([^>]*?) class=\"bold\"([^>]*?)>(.*?)<\\/span>' => '<strong\\1\\2>\\3</strong>',\r\n\t\t'<span([^>]*?) class=\"italic-bold\"([^>]*?)>(.*?)<\\/span>' => '<strong\\1\\2><em>\\3</em></strong>',\r\n\t\t\r\n\t\t'<span([^>]*?) class=\"italic-body\"([^>]*?)>(.*?)<\\/span>' => '<em\\1\\2>\\3</em>',\r\n\t\t'<span([^>]*?) class=\"bold-bocy\"([^>]*?)>(.*?)<\\/span>' => '<strong\\1\\2>\\3</strong>',\r\n\t\t'<span([^>]*?) class=\"bold-body\"([^>]*?)>(.*?)<\\/span>' => '<strong\\1\\2>\\3</strong>',\t\t\r\n\t\t'<span([^>]*?) class=\"bold-italic\"([^>]*?)>(.*?)<\\/span>' => '<strong\\1\\2><em>\\3</em></strong>',\r\n\t\t\r\n\t\t'<p([^>]*?) class=\"callout-heads\"([^>]*?)>(.*?)<\\/p>' => '<p><strong\\1\\2>\\3</strong></p>',\r\n\t\t'<p([^>]*?) class=\"figure-head\"([^>]*?)>(.*?)<\\/p>' => '<p><strong\\1\\2>\\3</strong></p>',\r\n\t\t\r\n\t\t//'<body>(.*?)<div id=\"([^\"]*?)\">' => '<body>\\1<div stripme=\"y\">',\r\n\t\t);\r\n\t\t\r\n\t\t$count = 0;\r\n\t\tforeach($array_rxp as $search => $replace) {\r\n\t\t\t//print('here385489960940<br>');\r\n\t\t\t$this->code = preg_replace('/' . $search . '/is', $replace, $this->code, -1, $c);\r\n\t\t\t$count += $c;\r\n\t\t}\r\n\t\t\r\n\t\t$array_rep = array(\r\n\t\t//' class=\"story\"' => ' stripme=\"y\"',\r\n\t\t' class=\"toc-leader-dots\"' => ' deleteme=\"y\"',\r\n\t\t' class=\"toc-page-numbers\"' => ' deleteme=\"y\"',\r\n\t\t);\r\n\t\t\r\n\t\tforeach($array_rep as $search => $replace) {\r\n\t\t\t//print('here385489960941<br>');\r\n\t\t\t$this->code = str_replace($search, $replace, $this->code, $c);\r\n\t\t\t$count += $c;\r\n\t\t}\r\n\t\t\r\n\t\tReTidy::non_DOM_stripme('<\\w+(.*?) class=\"story\"(.*?)>');\r\n\t\tReTidy::non_DOM_stripme('<div id=\"([^\"]*?)\">');\r\n\t\t\r\n\t\t// Delete any classes in <li> tags?\r\n\t\t//var_dump($count);\r\n\t\t$this->logMsgIf('clean_indesign', $count);\r\n\t}",
"function pre_content($string){\n\n $t = explode(\" \",$string);\n for($j = 0;$j<35;$j++){\n $arr[$j] = $t[$j];\n }\n $text = implode(\" \", $arr);\n return $text;\n //unset($arr);\n}",
"function processContent(string $content): string\n{\n $content = processShortcodes($content);\n return Michelf\\Markdown::defaultTransform($content);\n}",
"function jabMarkdown($text, $safe=false) \n{\n\tglobal $jab;\n\t\n\t# Setup static parser variable.\n\tstatic $parser;\n\tif (!isset($parser)) \n\t{\n\t\t$parser=jabCreateMarkdownParser($safe);\n\t}\n\t\n\tif ($safe)\n\t{\n\t\t$text=str_replace(\"!!gt!!\", \">\", htmlspecialchars(str_replace(\">\", \"!!gt!!\", $text)));\n\t}\n\t\n\t$text=$parser->transform($text);\n\treturn $text;\t\n}",
"public function buildContent($pages)\n {\n $parsedown = new \\Parsedown();\n $return = '';\n foreach ($pages as $route => $page) {\n ob_start();\n $title = $page['title'];\n $slug = $page['slug'];\n $content = $page['content'];\n $content = $parsedown->text($content);\n $index = 0;\n $styleIndex = 0;\n $styles = array();\n $config = $this->config;\n if (isset($page['header']->fullpage)) {\n $config = array_merge($config, $page['header']->fullpage);\n }\n $breaks = explode(\"<hr />\", $content);\n\n if (isset($page['horizontal'])) {\n $type = 'slide';\n echo \"<div \n data-name='$title' \n data-anchor='$slug' \n class='section'\n >\";\n } else {\n $type = 'section';\n }\n foreach ($breaks as $break) {\n if ($index == 0) {\n $id = $page['slug'];\n } else {\n $id = $index;\n }\n if ($config['shortcodes']) {\n $shortcodes = $this->interpretShortcodes($break);\n $break = $shortcodes['content'];\n $shortcodeStyles = $shortcodes['styles'];\n }\n if (!empty($shortcodeStyles)) {\n $shortcodeStyles = $this->applyStyles($page['styles'][$styleIndex]);\n echo \"<div \n data-name='$title' \n data-anchor='$id' \n class='$type' \n style='$shortcodeStyles'\n >\";\n } else {\n if (isset($page['styles']) && isset($page['styles'][$styleIndex])) {\n $styles = $this->applyStyles($page['styles'][$styleIndex]);\n echo \"<div \n data-name='$title' \n data-anchor='$id' \n class='$type' \n style='$styles'\n >\";\n } else {\n echo \"<div \n data-name='$title' \n data-anchor='$id' \n class='$type'\n >\";\n }\n }\n echo $break;\n if (isset($page['inject_footer'])) {\n echo $page['inject_footer'];\n }\n echo \"</div>\";\n if (isset($page['styles']) && count($page['styles']) == $styleIndex+1) {\n $styleIndex = 0;\n } else {\n $styleIndex++;\n }\n $index++;\n }\n if (isset($page['horizontal'])) {\n echo \"</div>\";\n }\n $return .= ob_get_contents();\n ob_end_clean();\n if (isset($page['children'])) {\n $return .= $this->buildContent($page['children']);\n }\n }\n return $return;\n }",
"protected function formatMarkdown() :string{\n return Markdown::convertToHtml($this->body);\n }",
"function parse_breaks($txt, $br = true)\n\t{\n\t\t$txt = $txt . \"\\n\"; // just to make things a little easier, pad the end\n\t\t$txt = preg_replace('`<br />\\s*<br />`', \"\\n\\n\", $txt);\n\t\t// Space things out a little\n\t\t$allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|details|menu|summary)';\n\t\t$txt = preg_replace('`(<' . $allblocks . '[^>]*>)`', \"\\n$1\", $txt);\n\t\t$txt = preg_replace('`(</' . $allblocks . '>)`', \"$1\\n\\n\", $txt);\n\t\t$txt = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $txt); // cross-platform newlines\n\t\tif(strpos($txt, '<object') !== false){\n\t\t\t$txt = preg_replace('`\\s*<param([^>]*)>\\s*`', \"<param$1>\", $txt); // no pee inside object/embed\n\t\t\t$txt = preg_replace('`\\s*</embed>\\s*`', '</embed>', $txt);\n\t\t}\n\t\t$txt = preg_replace(\"`\\n\\n+`\", \"\\n\\n\", $txt); // take care of duplicates\n\t\t// make paragraphs, including one at the end\n\t\t$txts = preg_split('`\\n\\s*\\n`', $txt, -1, PREG_SPLIT_NO_EMPTY);\n\t\t$txt = '';\n\t\tforeach($txts as $tinkle){\n\t\t\t$txt .= '<p>' . trim($tinkle, \"\\n\") . \"</p>\\n\";\n\t\t}\n\t\t$txt = preg_replace('`<p>\\s*</p>`', '', $txt); // under certain strange conditions it could create a P of entirely whitespace\n\t\t$txt = preg_replace('`<p>([^<]+)</(div|address|form)>`', \"<p>$1</p></$2>\", $txt);\n\t\t$txt = preg_replace('`<p>\\s*(</?' . $allblocks . '[^>]*>)\\s*</p>`', \"$1\", $txt); // don't pee all over a tag\n\t\t$txt = preg_replace(\"`<p>(<li.+?)</p>`\", \"$1\", $txt); // problem with nested lists\n\t\t$txt = preg_replace('`<p><blockquote([^>]*)>`i', \"<blockquote$1><p>\", $txt);\n\t\t$txt = str_replace('</blockquote></p>', '</p></blockquote>', $txt);\n\t\t$txt = preg_replace('`<p>\\s*(</?' . $allblocks . '[^>]*>)`', \"$1\", $txt);\n\t\t$txt = preg_replace('`(</?' . $allblocks . '[^>]*>)\\s*</p>`', \"$1\", $txt);\n\t\tif($br) {\n\t\t\t$txt = preg_replace_callback('/<(script|style|noparse).*?<\\/\\\\1>/s',\n\t\t\t\tcreate_function('$out','return str_replace(\"\\n\", \"<WPPreserveNewline />\", $out[0]);'),\n\t\t\t\t$txt);\n\t\t\t$txt = preg_replace('|(?<!<br />)\\s*\\n|', \"<br />\\n\", $txt); // optionally make line breaks\n\t\t\t$txt = str_replace('<WPPreserveNewline />', \"\\n\", $txt);\n\t\t}\n\t\t$txt = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*<br />!', \"$1\", $txt);\n\t\t$txt = preg_replace('!<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $txt);\n\t\tif(strpos($txt, '<pre') !== false)\n\t\t{\n\t\t\t$txt = preg_replace_callback('`<pre[^>]*>.*?</pre>`is',\n\t\t\t\tcreate_function('$out','return str_replace(array(\"<br />\",\"<p>\",\"</p>\"),array(\"\",\"\\n\",\"\"),$out[0]);'),\n\t\t\t\t$txt );\n\t\t}\n\t\t$txt = preg_replace( \"|\\n</p>$|\", '</p>', $txt );\n\n\t\treturn $txt;\n\t}",
"function remove_h1_from_editor( $settings ) {\n $settings['block_formats'] = 'Paragraph=p;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;';\n return $settings;\n}",
"function markdown($markdown)\n{\n static $parser;\n if (!$parser) {\n $parser = new Markdown();\n }\n\n return $parser->parse($markdown);\n}",
"public function markdownAction()\n {\n // return __METHOD__ . \", \\$db is {$this->db}\";\n $title = \"Movie database | oophp\";\n $text = file_get_contents(__DIR__ . \"./text/bbcode.txt\");\n $txtFilter = new MyTextFilter();\n $html = $txtFilter->parse($text, [\"markdown\"]);\n\n $data = [\n \"text\" => $text,\n \"html\" => $html\n ];\n\n $this->app->page->add(\"mytextfilter/markdown\", $data);\n return $this->app->page->render([\n \"title\" => $title,\n ]);\n }",
"public function provideWhitespaceTests() {\n $result = [\n [[\n 'descr' => \"Newlines get replaced with <br> tags.\",\n 'bbcode' => \"This\\nis\\r\\na\\n\\rtest.\",\n 'html' => \"This<br>\\nis<br>\\na<br>\\ntest.\",\n ]],\n [[\n 'descr' => \"Newlines *don't* get replaced with <br> tags in ignore-newline mode.\",\n 'bbcode' => \"This\\nis\\r\\na\\n\\rtest.\",\n 'html' => \"This\\nis\\na\\ntest.\",\n 'newline_ignore' => true,\n ]],\n [[\n 'descr' => \"Space before and after newlines gets removed.\",\n 'bbcode' => \"This \\n \\t is \\na\\n \\x08test.\",\n 'html' => \"This<br>\\nis<br>\\na<br>\\ntest.\",\n ]],\n [[\n 'descr' => \"Whitespace doesn't matter inside tags after the tag name.\",\n 'bbcode' => \"This [size = 4 ]is a test[/size ].\",\n 'html' => \"This <span style=\\\"font-size:1.17em\\\">is a test</span>.\",\n ]],\n [[\n 'descr' => \"Whitespace does matter inside \\\"quotes\\\" in tags.\",\n 'bbcode' => \"This [wstest=\\\" Courier New \\\"]is a test[/wstest].\",\n 'html' => \"This <span style=\\\"wstest: Courier New \\\">is a test</span>.\",\n ]],\n [[\n 'descr' => \"Whitespace does matter inside 'quotes' in tags.\",\n 'bbcode' => \"This [wstest=' Courier New ']is a test[/wstest].\",\n 'html' => \"This <span style=\\\"wstest: Courier New \\\">is a test</span>.\",\n ]],\n [[\n 'descr' => \"Whitespace is properly collapsed near block tags like [center].\",\n 'bbcode' => <<<BBCODE\nNot centered.\n\n[center]\n\n A bold stone gathers no italics.\n\n[/center]\n\nNot centered.\nBBCODE\n,\n 'html' => \"Not centered.<br>\\n\"\n . \"\\n<div class=\\\"bbcode_center\\\" style=\\\"text-align:center\\\">\\n\"\n . \"<br>\\n\"\n . \"A bold stone gathers no italics.<br>\\n\"\n . \"\\n</div>\\n\"\n . \"<br>\\n\"\n . \"Not centered.\",\n ]],\n [[\n 'descr' => \"[code]...[/code] should strip whitespace outside it but not inside it.\",\n 'bbcode' => \"Not\\ncode.\\n\"\n . \"[code] \\n\\n This is a test. \\n\\n [/code]\\n\"\n . \"Also not code.\\n\",\n 'html' => \"Not<br>\\ncode.\\n\"\n . \"<div class=\\\"bbcode_code\\\">\\n\"\n . \"<div class=\\\"bbcode_code_head\\\">Code:</div>\\n\"\n . \"<div class=\\\"bbcode_code_body\\\" style=\\\"white-space:pre\\\">\\n This is a test. \\n</div>\\n\"\n . \"</div>\\n\"\n . \"Also not code.<br>\\n\",\n ]],\n [[\n 'descr' => \"[list] and [*] must consume correct quantities of whitespace.\",\n 'bbcode' => \"[list]\\n\\n\\t[*] One Box\\n\\n\\t[*] Two Boxes\\n\\t[*] \\n Three Boxes\\n\\n[/list]\\n\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\">\\n<br>\\n<li>One Box<br>\\n</li>\\n<li>Two Boxes</li>\\n<li><br>\\nThree Boxes<br>\\n</li>\\n</ul>\\n\",\n ]],\n ];\n return $result;\n }",
"public function cropHtmlWorksWithLinebreaks() {}",
"function markdown_post_typo($texte){\n\tif (strpos($texte,\"<md>\")!==false){\n\t\t$texte = echappe_retour($texte,\"md\");\n\t}\n\treturn $texte;\n}",
"private static function normalizeHTMLAndMarkdown(string $text): string\n {\n $markdown = static::wrapBasicTagsInAParagraph($text);\n\n $markdown = static::wrapImagesTagsInAParagraph($markdown);\n\n $markdown = static::replaceLineBreaksInsideTagsForBr($markdown);\n\n return static::replaceParagraphsForMarkdown($markdown);\n }",
"public function toHtml(): string\n {\n return $this->parseMarkdown()->toHtml();\n }",
"public function parse($markdown)\n\t{\n\t\t// Reset some variables\n\t\t$this->hashTable = array();\n\t\t$this->references = array();\n\n\t\t$markdown = $this->convertToUnix($markdown);\n\t\t$markdown = $this->hashifyBlocks($markdown);\n\t\t$markdown = $this->stripReferences($markdown);\n\n\t\t$markdown = $this->encodeEscape($markdown);\n\t\t$markdown = $this->replaceBlock($markdown);\n\n\t\treturn $markdown;\n\t}",
"function getContentArrayForTemplating($code, $strip_template_content_comments = false) {\r\n\t\t// assume the main <h1> is directly in the content <div>\r\n\t//\t$inventing_h1 = false;\r\n\t//\t$h1_strpos = strpos($code, '<h1');\r\n\t\t//print('$h1_strpos: ');var_dump($h1_strpos);\r\n\t\t//print('code}}}<br>');\r\n\t\t//print($code);\r\n\t\t//print('{{{code<br>');\r\n\t\t//exit(0);\r\n\t\t$found_h1 = false;\r\n\t//\tif($h1_strpos === false) {\r\n\t\t\t// ideally we would run structure on every file and this problem would go away, but it shouldn't be bad to write a possibly overlapping solution here\r\n\t\t\t// take a shot; look for what seems like paragraph content then take the first block in its container\r\n\t\t\tpreg_match_all('/<(p|h[1-6])[^<>]*?>(.*?)<\\/\\1>/is', $code, $possible_heading_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t//var_dump($possible_heading_matches);\r\n\t\t\tforeach($possible_heading_matches[0] as $index => $value) {\r\n\t\t\t\t$possible_heading_content = $possible_heading_matches[2][$index][0];\r\n\t\t\t\t//var_dump($possible_heading_content);\r\n\t\t\t\t/*if(substr_count($possible_heading_content, '.') > 2 || substr_count($paragraph_content, ':') > 0) {\r\n\t\t\t\t\t$paragraph_offset = $possible_heading_matches[0][$index][1];\r\n\t\t\t\t\t$blockArray = OM::getContainingBlock($code, $paragraph_offset);\r\n\t\t\t\t\t//$blockString = $blockArray[0];\r\n\t\t\t\t\t//$offset_contained_string_in_block = $blockArray[1];\r\n\t\t\t\t\t$containing_block_offset = $blockArray[2];\r\n\t\t\t\t\tpreg_match('/<(h1|h2|h3|h4|h5|h6|p)[^<>]*?>(.*?)<\\/\\1>/is', $code, $h1_matches, PREG_OFFSET_CAPTURE, $containing_block_offset);\r\n\t\t\t\t\t$h1_strpos = $h1_matches[0][1];\r\n\t\t\t\t\t$inventing_h1 = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}*/\r\n\t\t\t\tif(ReTidy::isIndexical($possible_heading_content)) {\r\n\t\t\t\t\t//print('possible_heading_content is indexical.<br>');\r\n\t\t\t\t\t//print('$possible_heading_content: ' . $possible_heading_content);\r\n\t\t\t\t\t$h1_strpos = $possible_heading_matches[0][$index][1];\r\n\t\t\t\t\t$h1_including_tag = $possible_heading_matches[0][$index][0];\r\n\t\t\t\t\t$h1_previous_tag_name = $possible_heading_matches[1][$index][0];\r\n\t\t\t\t\t$found_h1 = true;\r\n\t//\t\t\t\t$inventing_h1 = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t//\t\tif(!$inventing_h1) {\r\n\t//\t\t\t//print($code);\r\n\t//\t\t\tprint('h1 not detected or created in getContentArrayForTemplating; this needs to be fixed.');exit(0);\r\n\t//\t\t}\r\n\t//\t}\r\n\t\t$get_content_more_crudely = true;\r\n\t\tif(strpos($code, '<div') === false) {\r\n\t\t\t//print('here347459475948759<br>');\r\n\t\t} else {\r\n\t\t\t//print('here347459475948760<br>');\r\n\t\t\tif($found_h1) {\r\n\t\t\t\t// we assume the code is syntactically sound for this...\r\n\t\t\t\tpreg_match_all('/<div/is', substr($code, 0, $h1_strpos), $open_div_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t\tpreg_match_all('/<\\/div>/is', substr($code, 0, $h1_strpos), $close_div_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t\t//print('$open_div_matches: ');var_dump($open_div_matches);\r\n\t\t\t\t$counter1 = sizeof($open_div_matches[0]) - 1;\r\n\t\t\t\t$counter2 = sizeof($close_div_matches[0]) - 1;\r\n\t\t\t\t$found_content_div = false;\r\n\t\t\t\t//print('here183945606067<br>');\r\n\t\t\t\tif(sizeof($open_div_matches) > 0) {\r\n\t\t\t\t\twhile($counter1 > -1) {\r\n\t\t\t\t\t\t//print('here183945606068<br>');\r\n\t\t\t\t\t\t$strpos_open_div = $open_div_matches[0][$counter1][1];\r\n\t\t\t\t\t\twhile($counter2 > -1) {\r\n\t\t\t\t\t\t\t//print('here183945606069<br>');\r\n\t\t\t\t\t\t\t$strpos_close_div = $close_div_matches[0][$counter2][1];\r\n\t\t\t\t\t\t\t$counter2--;\r\n\t\t\t\t\t\t\tif($strpos_close_div > $strpos_open_div) {\r\n\t\t\t\t\t\t\t\t$counter1--;\r\n\t\t\t\t\t\t\t\tcontinue 2;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$strpos_content_div = $strpos_open_div;\r\n\t\t\t\t\t\t\t\t$found_content_div = true;\r\n\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$counter1--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!$found_content_div) {\r\n\t\t\t\t//print('here347459475948761<br>');\r\n\t\t\t} else {\r\n\t\t\t\t//print('here347459475948762<br>');\r\n\t\t\t\t//$strpos_content_div = ReTidy::strpos_last(substr($code, 0, $h1_strpos), '<div');\r\n\t\t\t\t$content_div_code = OM::getOString($code, '<div', '</div>', $strpos_content_div);\r\n\t\t\t\t//print('$content_div_code: ');var_dump($content_div_code);\r\n\t\t\t\t$strlen_opening_content_div = strpos($content_div_code, '>') + 1;\r\n\t\t\t\t$content = substr($content_div_code, $strlen_opening_content_div, strlen($content_div_code) - $strlen_opening_content_div - 6);\r\n\t\t\t\t/*print('XXX9o9beep39o9XXX\r\n');\r\n\t\t\t\tprint('$content (div-wise): ' . $content);\r\n\t\t\t\tprint('\r\nXXX9o9beep49o9XXX\r\n\t\t\t\t');*/\r\n\t\t\t\t$content_offset = $strpos_content_div + $strlen_opening_content_div;\r\n\t\t\t\t$get_content_more_crudely = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($get_content_more_crudely) {\r\n\t\t\t//print('here347459475948763<br>');\r\n\t\t\t$body = OM::getOString($code, '<body', '</body>');\r\n\t\t\tif(strlen($body) === 0) {\r\n\t\t\t\t//print('here347459475948764<br>');\r\n\t\t\t\t//if($h1_strpos === false) {\r\n\t\t\t\tif(!$found_h1) {\r\n\t\t\t\t\t//return $code; // we return the unchanged code\r\n\t\t\t\t\t//ReTidy::fatal_error('did not find the <body> of the document or it has zero length');exit(0);\r\n\t\t\t\t\t$strpos_last_meta = ReTidy::strpos_last($code, '<meta');\r\n\t\t\t\t\t$content_offset = $strpos_last_meta + strpos($code, '>', $strpos_last_meta);\r\n\t\t\t\t\t$content = substr($code, $content_offset);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$content_offset = $h1_strpos;\r\n\t\t\t\t\t$content = substr($code, $h1_strpos);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t//print('here347459475948765<br>');\r\n\t\t\t\t$body_offset = strpos($code, '<body');\r\n\t\t\t\tpreg_match('/<body[^<>]*?>/is', $body, $opening_body_tag_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t\t$opening_body_tag = $opening_body_tag_matches[0][0];\r\n\t\t\t\t$strlen_opening_body_tag = strlen($opening_body_tag);\r\n\t\t\t\t$content = substr($body, $strlen_opening_body_tag, strlen($body) - $strlen_opening_body_tag - 7);\r\n\t\t\t\t$content_offset = $body_offset + $opening_body_tag_matches[0][1] + $strlen_opening_body_tag;\r\n\t\t\t\t//$cleaned_content = $content;\r\n\t\t\t}\r\n\t\t}\r\n\t\t/*\r\n\t\t// content; in this generalized templater order, attempts at grabbing the content are from the more specific to the more general\r\n\t\t$opening_content_div = '<div id=\"cn-centre-col-inner\">';\r\n\t\t$strpos_content_div = strpos($code, $opening_content_div);\r\n\t\tif($strpos_content_div !== false) {\r\n\t\t\t$content_div_code = OM::getOString($code, '<div', '</div>', $strpos_content_div);\r\n\t\t\t$strlen_opening_content_div = strlen($opening_content_div);\r\n\t\t\t$content = substr($content_div_code, $strlen_opening_content_div, strlen($content_div_code) - $strlen_opening_content_div - 6);\r\n\t\t\t$content_offset = $strpos_content_div + $strlen_opening_content_div;\r\n\t\t\t//print($content);exit(0);\r\n\t\t\t// call the end of content comment comment part of the content container rather than the content itself...\r\n\t\t\t// treating the open and close differently and possibly leaving us open to future problems...\r\n\t\t\t//$pos_close_content_comment = strpos($content, '<!-- clf2-nsi2 theme ends / Fin du thème clf2-nsi2 -->');\r\n\t\t\t//if($pos_close_content_comment !== false) {\r\n\t\t\t//\t$content = substr($content, 0, $pos_close_content_comment);\r\n\t\t\t//}\r\n\t\t\t//print($content);exit(0);\r\n\t\t\tif($strip_template_content_comments) {\r\n\t\t\t\t// remove template comments from the beginning of the content\r\n\t\t\t\t$cleaned_content = $content;\r\n\t\t\t\t$cleaned_content = str_replace('<!-- Content title begins / Début du titre du contenu -->', '', $cleaned_content);\r\n\t\t\t\t$cleaned_content = str_replace('<!-- Content Title ends / Fin du titre du contenu -->', '', $cleaned_content);\r\n\t\t\t\t$cleaned_content = str_replace('<!-- clf2-nsi2 theme begins / Début du thème clf2-nsi2 -->', '', $cleaned_content);\r\n\t\t\t\t// remove template comments from the end of the content?\r\n\t\t\t\t$cleaned_content = str_replace('<!-- clf2-nsi2 theme ends / Fin du thème clf2-nsi2 -->', '', $cleaned_content);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$opening_content_div = '<div class=\"center\">';\r\n\t\t\t$strpos_content_div = strpos($code, $opening_content_div);\r\n\t\t\tif($strpos_content_div !== false) {\r\n\t\t\t\t$content_div_code = OM::getOString($code, '<div', '</div>', $strpos_content_div);\r\n\t\t\t\t$strlen_opening_content_div = strlen($opening_content_div);\r\n\t\t\t\t$content = substr($content_div_code, $strlen_opening_content_div, strlen($content_div_code) - $strlen_opening_content_div - 6);\r\n\t\t\t\t$content_offset = $strpos_content_div + $strlen_opening_content_div;\r\n\t\t\t\tif($strip_template_content_comments) {\r\n\t\t\t\t\t// remove template comments from the beginning of the content\r\n\t\t\t\t\t$cleaned_content = $content;\r\n\t\t\t\t\t$cleaned_content = str_replace('<!-- CONTENT TITLE BEGINS | DEBUT DU TITRE DU CONTENU -->', '', $cleaned_content);\r\n\t\t\t\t\t$cleaned_content = str_replace('<!-- CONTENT TITLE ENDS | FIN DU TITRE DU CONTENU -->', '', $cleaned_content);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$body = OM::getOString($code, '<body', '</body>');\r\n\t\t\t\tif(strlen($body) === 0) {\r\n\t\t\t\t\t//return $code; // we return the unchanged code\r\n\t\t\t\t\tReTidy::fatal_error('did not find the <body> of the document or it has zero length');exit(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpreg_match('/<body[^<>]*?>/is', $body, $opening_body_tag_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t\t\t$opening_body_tag = $opening_body_tag_matches[0][0];\r\n\t\t\t\t\t$strlen_opening_body_tag = strlen($opening_body_tag);\r\n\t\t\t\t\t$content = substr($body, $strlen_opening_body_tag, strlen($body) - $strlen_opening_body_tag - 7);\r\n\t\t\t\t\t$content_offset = $opening_body_tag_matches[0][1] + $strlen_opening_body_tag;\r\n\t\t\t\t\t$cleaned_content = $content;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}*/\r\n\t\t// force every document to have an h1 and force the h1 to be at the start of the content\r\n\t\t//print('$h1_including_tag1: ' . $h1_including_tag);\r\n\t\t//print('$h1_previous_tag_name: ');var_dump($h1_previous_tag_name);\r\n\t\t//print('content_in_templating1: ' . $content);\r\n\t\tif(!$found_h1) {\r\n\t\t\t$h1_including_tag = '<h1>Dummy h1</h1>';\r\n\t\t\t$added_h1_length = strlen($h1_including_tag);\r\n\t\t\t$h1_previous_tag_name = 'h1';\r\n\t\t\t//$h1_strpos = $content_offset + 4;\r\n\t\t} else {\r\n\t\t\t$added_h1_length = 0;\r\n\t\t\t// cutting the h1 out\r\n\t\t\t//$content = substr($content, 0, $h1_strpos) . substr($content, $h1_strpos + strlen($h1_including_tag));\r\n\t\t\t//$content = substr($code, $content_offset, $h1_strpos) . substr($code, $h1_strpos + strlen($h1_including_tag), strlen($code) - $content_offset - ($h1_strpos + strlen($h1_including_tag)) - strlen(substr($code, $content_offset + strlen($content))));\r\n\t\t\t//$content = substr($code, $content_offset, $h1_strpos) . substr($code, $h1_strpos + strlen($h1_including_tag));\r\n\t\t\t$length_of_after_content = strlen($code) - $content_offset - strlen($content);\r\n\t\t\t$length_of_after_h1_including_tag = strlen($code) - ($h1_strpos + strlen($h1_including_tag));\r\n\t\t\t//print('after_content: ' . substr($code, $content_offset + strlen($content)));\r\n\t\t\t//print('after_h1_including_tag : ' . substr($code, $h1_strpos + strlen($h1_including_tag)));\r\n\t\t\t//$length_of_after_content = strlen(substr($code, $content_offset + strlen($content)));\r\n\t\t\t//$length_of_after_h1_including_tag = strlen(substr($code, $h1_strpos + strlen($h1_including_tag)));\r\n\t\t\t//print('substr($code, $content_offset, $h1_strpos - $content_offset) : ' . substr($code, $content_offset, $h1_strpos - $content_offset) );\r\n\t\t\t//print('substr($code, $h1_strpos + strlen($h1_including_tag), $length_of_after_h1_including_tag - $length_of_after_content) : ' . substr($code, $h1_strpos + strlen($h1_including_tag), $length_of_after_h1_including_tag - $length_of_after_content));\r\n\t\t\t$content = substr($code, $content_offset, $h1_strpos - $content_offset) . substr($code, $h1_strpos + strlen($h1_including_tag), $length_of_after_h1_including_tag - $length_of_after_content);\r\n\t\t}\r\n\t\t//print('substr($code, $h1_strpos, strlen($h1_including_tag)): ' . substr($code, $h1_strpos, strlen($h1_including_tag)));\r\n\t\t//print('$content in templating2: ');ReTidy::var_dump_full($content);\r\n\t\t$h1_including_tag = str_replace('<' . $h1_previous_tag_name, '<h1', $h1_including_tag);\r\n\t\t$h1_including_tag = str_replace('</' . $h1_previous_tag_name . '>', '</h1>', $h1_including_tag);\r\n\t\t$length_adjustment_due_to_previous_tag_name = 2 * (strlen('h1') - strlen($h1_previous_tag_name));\r\n\t\t//print('$h1_including_tag2: ' . $h1_including_tag);\r\n\t\t$content = $h1_including_tag . $content;\r\n\t\t//print('$content: ');var_dump($content);\r\n\t\t//print('$code2: ' . htmlentities($code));\r\n\t\t//print('content_in_templating3: ' . $content);\r\n\t\t//print('$code, $content_offset, $content: ');ReTidy::var_dump_full($code, $content_offset, $content);\r\n\t\t$code = substr($code, 0, $content_offset) . $content . substr($code, $content_offset + strlen($content) - $length_adjustment_due_to_previous_tag_name - $added_h1_length);\r\n\t\t// 2017-10-05\r\n\t\t// 2018-07-25; previously it was unclear why -2, but frequently we are converting a <p> to an <h1> making a difference in length of 2\r\n\t\t//$code = substr($code, 0, $content_offset) . $content . substr($code, $content_offset + strlen($content));\r\n\t\t//print('$code3: ' . htmlentities($code));\r\n\t\t// h1 inside the content\r\n\t//\tif(!$inventing_h1) {\r\n\t\t\tpreg_match('/<h1[^<>]*?>(.*?)<\\/h1>/is', $content, $h1_matches, PREG_OFFSET_CAPTURE);\r\n\t\t\t$h1 = $h1_matches[1][0];\r\n\t//\t} else {\r\n\t\t\t//print('should never get here...3489573495873');exit(0);\r\n\t\t\t//$h1 = $h1_matches[2][0];\r\n\t//\t\t$h1 = $possible_heading_content;\r\n\t//\t}\r\n\t\t// remove anchors and comments from the h1; if they are required, then the new versions should exist in the template\r\n\t\t$cleaned_h1 = $h1;\r\n\t\t$cleaned_h1 = preg_replace('/<a [^<>]*?>/is', '', $cleaned_h1);\r\n\t\t$cleaned_h1 = preg_replace('/<!--[^<>]*?-->/is', '', $cleaned_h1);\r\n\t\t$cleaned_h1 = str_replace('</a>', '', $cleaned_h1);\r\n\t\t$h1_offset = $content_offset + $h1_matches[1][1];\r\n\t\t// exclude the <h1> from the content for the purposes of templating\r\n\t\t//$content = substr($content, $h1_matches[0][1] + strlen($h1_matches[0][0]));\r\n\t\t//$content = str_replace($h1_matches[0][0], '', $content); // not good enough\r\n\t\t$content = substr($content, $h1_matches[0][1] + strlen($h1_matches[0][0]));\r\n\t\t//print('content_in_templating4: ' . $content);\r\n\t\t$content_offset += $h1_matches[0][1] + strlen($h1_matches[0][0]); \r\n\t\t// exclude the date modified from the content for the purposes of templating\r\n\t\t// this is very specific so we might need to have date modified detection similar to what's in the templateCode function (around line 600)\r\n\t\tif(preg_match('/<dl[^<>]*?>\\s*<dt>(Date modified:|Date de modification :)<\\/dt>\\s*<dd>\\s*<span>\\s*<time>([^<>]*?)<\\/time>\\s*<\\/span>\\s*<\\/dd>\\s*<\\/dl>/is', $content, $date_modified_matches, PREG_OFFSET_CAPTURE)) {\r\n\t\t\t//var_dump($date_modified_matches);\r\n\t\t\t$content = substr($content, 0, $date_modified_matches[0][1]);\r\n\t\t}\r\n\t\t//print('content_in_templating5: ' . $content);\r\n\t\t$cleaned_content = $content;\r\n\t\t//print('$cleaned_content1: ' . $cleaned_content);\r\n\t\t$array_content_comments_to_remove = array(\r\n\t\t'<!-- Content title begins / Début du titre du contenu -->',\r\n\t\t'<!-- Content Title ends / Fin du titre du contenu -->',\r\n\t\t'<!-- clf2-nsi2 theme begins / Début du thème clf2-nsi2 -->',\r\n\t\t'<!-- clf2-nsi2 theme ends / Fin du thème clf2-nsi2 -->',\r\n\t\t'<!-- CONTENT TITLE BEGINS | DEBUT DU TITRE DU CONTENU -->',\r\n\t\t'<!-- CONTENT TITLE ENDS | FIN DU TITRE DU CONTENU -->',\r\n\t\t'<!-- InstanceEndEditable -->',\r\n\t\t);\r\n\t\tforeach($array_content_comments_to_remove as $index => $value) {\r\n\t\t\t$cleaned_content = str_replace($value, '', $cleaned_content);\r\n\t\t}\r\n\t\t//print('$cleaned_content2: ' . $cleaned_content);\r\n\t\t$array_regex_content_comments_to_remove = array(\r\n\t\t'<!-- InstanceBeginEditable name=\"[^\"]*?\" -->',\r\n\t\t);\r\n\t\tforeach($array_regex_content_comments_to_remove as $index => $value) {\r\n\t\t\t$cleaned_content = preg_replace('/' . $value . '/is', '', $cleaned_content);\r\n\t\t}\r\n\t\t//print('ContentArray\t: ');var_dump(array($content, $content_offset, $cleaned_content, $h1, $h1_offset, $cleaned_h1));\r\n\t\t//print('$cleaned_content3: ' . $cleaned_content);\r\n\t\t//print('$code in getContentArray: ' . $code);\r\n\t\treturn array($code, $content, $content_offset, $cleaned_content, $h1, $h1_offset, $cleaned_h1);\r\n\t}",
"function analyse_content($content){\n $starting_content = array();\n $count=0;\n for($i=1;$i<count($content);$i++){\n if(!empty($content[$i]) && strlen($content[$i])>250){\n $paragraph = trim($content[$i]);\n $paragraph = str_ireplace(\"\\r\\n\",\"\", $paragraph);\n $starting_content[$count] = $paragraph;\n $count++;\n }\n if($count>=2)\n break;\n }\n return $starting_content;\n}",
"public function parse($markdown) {\n\n if(!$this->kirby->options['markdown']) {\n return $markdown;\n } else {\n // initialize the right markdown class\n $parsedown = $this->kirby->options['markdown.extra'] ? new ParsedownExtra() : new Parsedown();\n\n // set markdown auto-breaks\n $parsedown->setBreaksEnabled($this->kirby->options['markdown.breaks']);\n\n // parse it!\n return $parsedown->text($markdown);\n }\n\n }",
"function wp_html_split($input)\n {\n }",
"private function markdown($text) {\r\n require_once(__DIR__ . '/php-markdown/Michelf/Markdown.php');\r\n require_once(__DIR__ . '/php-markdown/Michelf/MarkdownExtra.php');\r\n return \\Michelf\\MarkdownExtra::defaultTransform($text);\r\n }",
"public function spineautop( $text ) {\n\t\t$block_count = absint( get_post_meta( get_the_ID(), '_wsuwp_block_count', true ) );\n\n\t\t$final_html = '';\n\n\t\tfor ( $i = 1; $i <= $block_count; $i++ ) {\n\t\t\t// Match the saved content for a specific section in the HTML comments. We look for the section\n\t\t\t// and then grab the specified classes and content.\n\t\t\tpreg_match('/<!-- section-' . $i . '-class:([a-z-,_]+):type:([a-z]+): -->(.*?)<!-- end-section-' . $i . ' -->/s', $text, $matches);\n\t\t\tif ( isset( $matches[1] ) ) {\n\t\t\t\t// Classes are passed in the section comment as comma separated values.\n\t\t\t\t$classes = explode( ',', esc_attr( $matches[1] ) );\n\t\t\t\t$classes = implode( ' ', $classes );\n\n\t\t\t\t$type = $matches[2];\n\n\t\t\t\t// @todo explore reasoning and use of wp_unslash\n\t\t\t\t$section_html = '<section id=\"section-' . $i . '\" class=\"' . $classes . '\">';\n\n\t\t\t\tif ( 'single' === $type ) {\n\t\t\t\t\t$section_html .= '<div class=\"column one\">' . wp_unslash( wpautop( $matches[3] ) ) . '</div>';\n\t\t\t\t} elseif ( in_array( $type, array( 'sidebar', 'sideleft', 'halves' ) ) ) {\n\t\t\t\t\t$column_html_parts = explode( '<!-- column-split -->', $matches[3] );\n\t\t\t\t\t$section_html .= '<div class=\"column one\">' . wp_unslash( wpautop( $column_html_parts[0] ) ) . '</div>';\n\t\t\t\t\t$section_html .= '<div class=\"column two\">' . wp_unslash( wpautop( $column_html_parts[1] ) ) . '</div>';\n\t\t\t\t}\n\n\t\t\t\t$section_html .= '</section>';\n\t\t\t\t$final_html .= $section_html;\n\t\t\t}\n\t\t}\n\n\t\treturn $final_html;\n\t}",
"function structure_content() {\r\n\t\t// institutional links and maybe others) does not get fixed.\r\n\t\t//if($this->config['WET'] !== false) {\r\n\t\t//\tReTidy::DOM_init();\r\n\t\t//\tReTidy::DOM_clean_redundant_tags();\r\n\t\t//\tReTidy::DOM_save();\r\n\t\t//}\r\n\t\t//if($this->config['trust_headings'] !== true) {\r\n\t\t\tReTidy::remove_page_structure(true);\r\n\t\t//}\r\n\t\tReTidy::build_page_structure(true);\r\n\t\t//if($this->config['trust_headings'] !== true) {\r\n\t\t\t//ReTidy::check_page_structure();\r\n\t\t\tReTidy::fix_page_structure();\r\n\t\t//}\r\n\t\tReTidy::build_page_from_structure_arrays(true);\r\n\t\tif($this->config[\"normalize_heading_text\"] === 'all_indexical_content') {\r\n\t\t\tReTidy::normalize_all_indexical_content(true);\r\n\t\t}\r\n\t}",
"public function markdownAction() : object\n {\n $title = \"Markdown\";\n $text = file_get_contents(__DIR__ . \"/textfiles/sample.md\");\n // $filter = new MyTextFilter();\n\n // Deal with the action and return a response.\n $this->app->page->add(\"textfilter/markdown\", [\n \"text\" => $text,\n \"html\" => $this->filter->parse($text, [\"markdown\"])\n ], \"main\");\n return $this->app->page->render([ \"title\" => $title ]);\n }",
"function wp_kses_split2($content, $allowed_html, $allowed_protocols)\n {\n }",
"public function markdown()\n\t{\n\t\techo view('sketchpad::help/output/markdown');\n\t}",
"function wp_kses_split($content, $allowed_html, $allowed_protocols)\n {\n }",
"static function convert_html_breaks($html){\n\n\t// Convert break elements to newline elements (\\n)\n\t\t$converted = preg_replace(\"/<br[\\/\\s]*>/i\", \"\\n\", $html);\n\n\t// Convert paragraph elements to markdown paragraph elements (\\n\\n)\n\t\tif( preg_replace(\"/<p[^>]*>/i\", \"\\n\\n\", $converted) ) {\n\t\t\t$converted = preg_replace(\"/<\\/p>/i\", \"\\n\", $converted);\n\t\t}\n\t\treturn $converted;\n\t}",
"public function markdown()\n {\n $this->params['parse_mode'] = 'markdown';\n\n return $this;\n }",
"protected function toMarkdown($content)\n {\n $tmpfname = tempnam(sys_get_temp_dir(), 'fillet'); // good\n file_put_contents($tmpfname, $content);\n $cmd = $this->config['pandoc']['bin'] . ' --no-wrap -f html -t markdown ' . $tmpfname;\n $content = shell_exec($cmd);\n unlink($tmpfname);\n return $content;\n }",
"function add_paragraphs($str)\n{\n // Trim whitespace\n if (($str = trim($str)) === '') return '';\n\n // Standardize newlines\n $str = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $str);\n\n // Trim whitespace on each line\n $str = preg_replace('~^[ \\t]+~m', '', $str);\n $str = preg_replace('~[ \\t]+$~m', '', $str);\n\n // The following regexes only need to be executed if the string contains html\n if ($html_found = (strpos($str, '<') !== FALSE)) {\n // Elements that should not be surrounded by p tags\n $no_p = '(?:p|div|article|header|aside|hgroup|canvas|output|progress|section|figcaption|audio|video|nav|figure|footer|video|details|main|menu|summary|h[1-6r]|ul|ol|li|blockquote|d[dlt]|pre|t[dhr]|t(?:able|body|foot|head)|c(?:aption|olgroup)|form|s(?:elect|tyle)|a(?:ddress|rea)|ma(?:p|th))';\n\n // Put at least two linebreaks before and after $no_p elements\n $str = preg_replace('~^<' . $no_p . '[^>]*+>~im', \"\\n$0\", $str);\n $str = preg_replace('~</' . $no_p . '\\s*+>$~im', \"$0\\n\", $str);\n }\n\n // Do the <p> magic!\n $str = '<p>' . trim($str) . '</p>';\n $str = preg_replace('~\\n{2,}~', \"</p>\\n\\n<p>\", $str);\n\n // The following regexes only need to be executed if the string contains html\n if ($html_found !== FALSE) {\n // Remove p tags around $no_p elements\n $str = preg_replace('~<p>(?=</?' . $no_p . '[^>]*+>)~i', '', $str);\n $str = preg_replace('~(</?' . $no_p . '[^>]*+>)</p>~i', '$1', $str);\n }\n\n // Convert single linebreaks to <br />\n $str = preg_replace('~(?<!\\n)\\n(?!\\n)~', \"<br>\\n\", $str);\n\n return $str;\n}",
"function sb_rcb_blog2html( $inData ){\n $patterns = array(\n \"@(\\r\\n|\\r|\\n)?\\\\[\\\\*\\\\](\\r\\n|\\r|\\n)?(.*?)(?=(\\\\[\\\\*\\\\])|(\\\\[/list\\\\]))@si\",\n\t\t\t\n // [b][/b], [i][/i], [u][/u], [mono][/mono]\n \"@\\\\[b\\\\](.*?)\\\\[/b\\\\]@si\",\n \"@\\\\[i\\\\](.*?)\\\\[/i\\\\]@si\",\n \"@\\\\[u\\\\](.*?)\\\\[/u\\\\]@si\",\n \"@\\\\[mono\\\\](.*?)\\\\[/mono\\\\]@si\",\n\t\t\t\n // [color=][/color], [size=][/size]\n \"@\\\\[color=([^\\\\]\\r\\n]*)\\\\](.*?)\\\\[/color\\\\]@si\",\n \"@\\\\[size=([0-9]+)\\\\](.*?)\\\\[/size\\\\]@si\",\n\t\t\t\n // [quote=][/quote], [quote][/quote], [code][/code]\n \"@\\\\[quote="([^\\r\\n]*)"\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/quote\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[quote\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/quote\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[code\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/code\\\\](\\r\\n|\\r|\\n)?@si\",\n\t\t\t\n // [center][/center], [right][/right], [justify][/justify],\n // [centerblock][/centerblock] (centers a left-aligned block of text)\n \"@\\\\[center\\\\](\\r\\n|\\r|\\n)?(.*?)(\\r\\n|\\r|\\n)?\\\\[/center\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[right\\\\](\\r\\n|\\r|\\n)?(.*?)(\\r\\n|\\r|\\n)?\\\\[/right\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[justify\\\\](\\r\\n|\\r|\\n)?(.*?)(\\r\\n|\\r|\\n)?\\\\[/justify\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[centerblock\\\\](\\r\\n|\\r|\\n)?(.*?)(\\r\\n|\\r|\\n)?\\\\[/centerblock\\\\](\\r\\n|\\r|\\n)?@si\",\n\t\t\t\n // [list][*][/list], [list=][*][/list]\n \"@\\\\[list\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[list=1\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[list=a\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[list=A\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[list=i\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[list=I\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n //\t\t\t\"@(\\r\\n|\\r|\\n)?\\\\[\\\\*\\\\](\\r\\n|\\r|\\n)?([^\\\\[]*)@si\",\n\t\t\t\n // [url=][/url], [url][/url], [email][/email]\n \"@\\\\[url=([^\\\\]\\r\\n]+)\\\\](.*?)\\\\[/url\\\\]@si\",\n \"@\\\\[url\\\\](.*?)\\\\[/url\\\\]@si\",\n \"@\\\\[urls=([^\\\\]\\r\\n]+)\\\\](.*?)\\\\[/urls\\\\]@si\",\n \"@\\\\[urls\\\\](.*?)\\\\[/urls\\\\]@si\",\n \"@\\\\[email\\\\](.*?)\\\\[/email\\\\]@si\",\n \"@\\\\[a=([^\\\\]\\r\\n]+)\\\\]@si\",\n\n // [youtube]c6zjwPiOHtg[/youtube]\n \"@\\\\[youtube\\\\](.*?)\\\\[/youtube\\\\]@si\",\n\n \n // using soundcloud's wordpress code\n // [soundcloud url=\"http://api.soundcloud.com/tracks/15220750\" ...]\n \"@\\\\[soundcloud\\s+url="http://api\\.soundcloud\\.com/tracks/(\\d+)"[^\\]]*\\\\]@si\",\n\n \n // [img][/img], [img=][/img], [clear]\n \"@\\\\[img\\\\](.*?)\\\\[/img\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[imgl\\\\](.*?)\\\\[/imgl\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[imgr\\\\](.*?)\\\\[/imgr\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[img=([^\\\\]\\r\\n]+)\\\\](.*?)\\\\[/img\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[imgl=([^\\\\]\\r\\n]+)\\\\](.*?)\\\\[/imgl\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[imgr=([^\\\\]\\r\\n]+)\\\\](.*?)\\\\[/imgr\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[clear\\\\](\\r\\n|\\r|\\n)?@si\",\n\t\t\t\n // [hr], \\n\n \"@\\\\[hr\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@(\\r\\n|\\r|\\n)@\");\n\t\t\n $replace = array(\n '<li>$3</li>',\n\t\t\t\n\t\t// [b][/b], [i][/i], [u][/u], [mono][/mono]\n '<b>$1</b>',\n '<i>$1</i>',\n '<span style=\"text-decoration:underline\">$1</span>',\n '<span class=\"mono\">$1</span>',\n\t\t\n // [color=][/color], [size=][/size]\n '<span style=\"color:$1\">$2</span>',\n '<span style=\"font-size:$1px\">$2</span>',\n\n // [quote][/quote], [code][/code]\n '<div class=\"quote\"><span style=\"font-size:0.9em;font-style:italic\">$1 wrote:<br /><br /></span>$3</div>',\n '<div class=\"quote\">$2</div>',\n '<div class=\"code\">$2</div>',\n\t\t\t\n // [center][/center], [right][/right], [justify][/justify],\n // [centerblock][/centerblock]\n '<div style=\"text-align:center\">$2</div>',\n '<div style=\"text-align:right\">$2</div>',\n '<div style=\"text-align:justify\">$2</div>',\n '<CENTER><TABLE BORDER=0><TR><TD>$2</TD></TR></TABLE></CENTER>',\n\t\t\t\n // [list][*][/list], [list=][*][/list]\n '<ul>$2</ul>',\n '<ol style=\"list-style-type:decimal\">$2</ol>',\n '<ol style=\"list-style-type:lower-alpha\">$2</ol>',\n '<ol style=\"list-style-type:upper-alpha\">$2</ol>',\n '<ol style=\"list-style-type:lower-roman\">$2</ol>',\n '<ol style=\"list-style-type:upper-roman\">$2</ol>',\n //\t\t\t'<li />',\n\t\t\t\n // [url=][/url], [url][/url], [email][/email]\n '<a href=\"$1\" rel=\"external\">$2</a>',\n '<a href=\"$1\" rel=\"external\">$1</a>',\n '<a href=\"$1\">$2</a>',\n '<a href=\"$1\">$1</a>',\n '<a href=\"mailto:$1\">$1</a>',\n '<a name=\"$1\"></a>',\n\n // [youtube]c6zjwPiOHtg[/youtube]\n '<iframe width=\"560\" height=\"349\" '.\n 'src=\"http://www.youtube.com/embed/$1\" '.\n 'frameborder=\"0\" allowfullscreen></iframe>',\n\n // [soundcloud url=\"http://api.soundcloud.com/tracks/15220750\" ...]\n // where $1 is the track code, extracted above\n '<object height=\"81\" width=\"100%\"> <param name=\"movie\" value=\"http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F$1&show_comments=false&auto_play=false&color=ff7700\"></param> <param name=\"allowscriptaccess\" value=\"always\"></param> <embed allowscriptaccess=\"always\" height=\"81\" src=\"http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F$1&show_comments=false&auto_play=false&color=ff7700\" type=\"application/x-shockwave-flash\" width=\"100%\"></embed> </object>',\n\n \n // [img][/img], [img=][/img], [clear]\n '<center><img border=0 src=\"$1\" alt=\"$1\" /></center>',\n '<img border=0 align=\"left\" src=\"$1\" alt=\"$1\" />',\n '<img border=0 align=\"right\" src=\"$1\" alt=\"$1\" />',\n '<img border=0 src=\"$1\" alt=\"$2\" title=\"$2\" />',\n '<img border=0 align=\"left\" src=\"$1\" alt=\"$2\" title=\"$2\" />',\n '<img border=0 align=\"right\" src=\"$1\" alt=\"$2\" title=\"$2\" />',\n '<div style=\"clear:both\"></div>',\n\t\t\t\n // [hr], \\n\n '<hr />',\n '<br />');\n return preg_replace($patterns, $replace, $inData );\n }",
"public function slice_and_dice(){\n\n // Are we inside a section?\n $in_section = false;\n\n // The current Section name\n $section_name = '';\n\n // Output, as Layout file modified\n $output = '';\n\n // The canonical name of the Layout\n $layout_canonical_name = (string) new \\file_basename_for($this->layout_name);\n\n // The full path filename for the layout\n $filename = (string)new Theme_Root(getcwd(), $this->theme_name) . \"/$this->layout_name\";\n\n // Get model for saving sections in DB\n $page_model = (new Model('website_page'))\n\n ->find(\"name='$layout_canonical_name'\");\n\n // Have we substituted the sections for the directive yet?\n $is_replaced = false;\n\n // if we can open the file for reading...\n if ( ( $handle = fopen($filename,'r'))){\n\n while ( ($line = fgets($handle))!== false ){\n\n // Report for first file\n if ( self::$is_first_file && $this->verbose ) echo \"\\tLine: $line\";\n\n if ( preg_match('/<section/',$line,$hits)){\n\n if ( $this->verbose ) echo \"\\tFound an HTML <section> on line $line in Layout $layout_canonical_name\\r\\n\";\n\n\n $section_name = (string) new Section_Name($line,$layout_canonical_name);\n\n // Initialize content\n $this->sections[$section_name] = '';\n\n $in_section = true;\n\n if ( ! $is_replaced){\n\n $output .= file_get_contents(new Code_Alchemy_Root_Path().\"/templates/fragments/foreach-model-template.php\").\"\\r\\n\";\n\n $is_replaced = true;\n }\n }\n\n if ( $in_section )\n\n $this->sections[$section_name] .= $line;\n\n else\n\n $output .= $line;\n\n if ( preg_match('<\\/section>',$line) )\n\n $in_section = false;\n\n }\n\n // No longer the first file\n self::$is_first_file = false;\n\n\n if ( $output )\n\n file_put_contents($filename,$output);\n\n\n fclose($handle);\n\n // Write sections to database\n foreach ( $this->sections as $name => $section_data ) {\n\n // If DB Model for Page was found...\n if ( $page_model->exists){\n\n $section_model = (new Model('page_section'));\n\n if ( ! $section_model\n\n ->create_from(array(\n\n 'website_page_id' => $page_model->id,\n\n 'name' => $name,\n\n 'handlebars_template' => (string)\n\n new String_Values_Replacer($section_data,array(\n\n '/<\\?\\=\\$theme_root\\?\\>/' => '{{theme_root}}'\n ))\n\n )))\n\n echo \"\\t\".$section_model->error();\n\n else\n\n {\n\n if ( $this->verbose ) echo \"\\t$name: Section successfully extracted and added to database\\r\\n\";\n }\n\n\n\n }\n\n\n }\n\n\n }\n\n if ( $this->verbose ) echo \"\\t\". get_called_class().\" Sliced out \".count( $this->sections).\" from Layout $layout_canonical_name\\r\\n\";\n\n }",
"function remove_h1_from_heading($args) {\n$args['block_formats'] = 'Paragraph=p;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Pre=pre';\nreturn $args;\n}",
"function markdown_editor_page() {\n$plugin_dir = plugin_dir_url( __FILE__ );\n\n\t?>\n\n<style>\n\n.editormd-preview-close-btn {\n display: none;\n}\n\n#right ul {\n list-style: initial !important;\n}\n\n#left ul {\n list-style: none !important;\n}\n\n.editormd-form label {\n float: left !important;\n display: block !important;\n width: 65px !important;\n text-align: left !important;\n padding: 7px 0 15px 5px !important;\n margin: 0 0 2px !important;\n font-weight: normal !important;\n}\n\n#left {\n float: left;\n width: 10%;\n}\n\n#right {\n overflow: hidden;\n}\n</style>\n<div class=\"wrap\">\n \n<h1>Markdown Files <span style=\"color:#026440; cursor: pointer;\" onclick=\"location.reload();\"><i class=\"fas fa-plus-circle\"></i></span></h1>\n\n<?php\n\n$WP_PATH = implode(\"/\", (explode(\"/\", $_SERVER[\"PHP_SELF\"], -4)));\n\n//Temporary addition of web for dev environment\n$path = $_SERVER['DOCUMENT_ROOT'].$WP_PATH.'/app/helptext/content/pages/';\n\n$files = scandir($path);\n?>\n<a href=\"<?php echo $plugin_dir ?>scripts/zip.php\">Download Zip of Markdown Files</a> | <a href=\"<?php echo $plugin_dir ?>scripts/json.php\">File Listing</a> \n<br /><br />\n <div id=\"left\">\n<ul>\n<li><i class='fas fa-folder'></i> <a href='#' id='edit-folder-index' class='edit_page'><strong>index.md</strong></a></li>\n</ul>\n<ul style=\"padding-left: 15px;\">\n<?php\n$i = 0;\nforeach ($files as &$value) {\n$i++;\nif(strpos($value, '.md') !== false){\n if($value == 'index.md'){\n echo \"<li><i class='fas fa-folder-open'></i> <a href='#' id='edit-\".$i.\"' class='edit_page'>\".$value.\"</a></li>\";\n } else {\n echo \"<li><i class='fas fa-folder-open'></i> <a href='#' id='edit-\".$i.\"' class='edit_page'>\".$value.\"</a> <span style='color:#d63638; cursor: pointer;' id='delete-\".$i.\"' class='delete_page' title='\".$value.\"'><i class='fas fa-trash-alt'></i></span></li>\";\n }\n}\n\n}\n?>\n</ul>\n </div>\n <div id=\"right\">\n\n<form id=\"create_form\">\n <input type=\"submit\" value=\"Create New\" style=\"float:right;\">\n <label for=\"fname\">Filename:</label>\n <input type=\"text\" id=\"fname\" name=\"fname\"><br /><br />\n \n<div id=\"create_new\">\n <textarea style=\"display:none;\" id=\"mdeditor\"></textarea>\n</div>\n\n</form>\n\n </div>\n\n</div>\n\n<script src=\"<?php echo $plugin_dir; ?>/asset/editormd.min.js\"></script>\n<script src=\"<?php echo $plugin_dir; ?>/asset/languages/en.js\"></script>\n\n<script type=\"text/javascript\">\n jQuery(function() {\n\njQuery('selectorForYourElement').css('display', 'none');\n \n var editor = editormd(\"create_new\", {\n width : \"100%\",\n height : \"500px\",\n //emoji : true, \n path : \"<?php echo $plugin_dir; ?>/asset/lib/\"\n });\n \njQuery(\".edit_page\").click(function() {\n\nvar id = jQuery(this).attr('id');\n\nif(id == 'edit-folder-index') {\njQuery(\"#right\").load(\"<?php echo $plugin_dir; ?>scripts/editor.php?type=folderindex&page=index.md\"); \n} else {\nvar n = id.replace(\"edit\",'');\nvar edit_page_val = jQuery('#edit'+n).text();\njQuery(\"#right\").load(\"<?php echo $plugin_dir; ?>scripts/editor.php?page=\"+edit_page_val);\n}\n\n});\n\njQuery(\".delete_page\").click(function() {\n\nvar id = jQuery(this).attr('id');\nvar n = id.replace(\"delete\",'');\n\nvar delete_page_val = jQuery('#edit'+n).text();\n\n\njQuery.post(\n '<?php echo $plugin_dir; ?>/scripts/update_content.php',{\npostvarsaction : 'delete',\npostvarspage : delete_page_val\n}, \n function (response) {\n //if(!alert(response)){\n alert(response);\n location.reload();\n //}\n });\n \n});\n\n\njQuery(\"#create_form\").submit(function( event ) {\n event.preventDefault();\n //alert( editor.getMarkdown() );\n\nvar fname = jQuery('#fname').val();\nif( fname == '' || fname.includes('.md') || fname == 'index' ) {\n alert('Filename cannot be empty, contain the extension \".md\", or use the name \"index\"');\n}\nelse{\n jQuery.post(\n '<?php echo $plugin_dir; ?>/scripts/update_content.php',{\npostvarsaction : 'create',\npostvarsfname : fname,\npostvarscontent : editor.getMarkdown()\n}, \n function (response) {\n //if(!alert(response)){\n alert(response);\n location.reload();\n //}\n });\n}\n \n});\n });\n\n</script>\n\n<?php\n}",
"function text_to_paragraphs($str)\n{\n return str_replace('<p></p>', '', '<p>'\n . preg_replace('#([\\r\\n]\\s*?[\\r\\n]){2,}#', '</p>$0<p>', $str) . '</p>');\n}",
"function ois_empty_paragraph_fix($content)\r\n{\r\n $content = force_balance_tags($content);\r\n return preg_replace('#<p>\\s*+(<br\\s*/*>)?\\s*</p>#i', '', $content);\r\n}",
"private static function replaceParagraphsForMarkdown(string $text): string\n {\n // Any text inside a <p>\n $regex = '/<p\\b[^>]*>((?:\\s|\\S)*?)<\\/p>\\s*/m';\n\n // Adds two break lines\n $substitution = \"$1\\n\\n\";\n\n return preg_replace($regex, $substitution, $text);\n }",
"private static function convertMarkdownToHtml(string $markdown): string\n {\n $html = (new static())->getMarkdownCoverter()->convertToHtml($markdown);\n\n return static::replaceLineBreaksInsideTagsForBr((string) $html);\n }",
"function MarkdownToHtml($markdown, $class=\"markdown\", $divid=\"\")\n{\n\t$c = \"\";\n\t$id = \"\";\n\tif(!empty($class)) $c = ' class=\"' . $class . '\"';\n\tif(!empty($divid)) $id = ' id=\"' . $divid . '\"';\n\n\t$html = '<div ' . $c . $id . '>' . \"\\n\";\n\t$html .= Markdown::defaultTransform($markdown);\n\t$html .= '</div>' . \"\\n\";\n\treturn $html;\n}",
"public function getTableOfContents($html)\n {\n preg_match_all(\"/(<h([1-6]{1})[^<>]*>)(.+)(<\\/h[1-6]{1}>)/\", $html, $matches, PREG_SET_ORDER);\n\n $toc = \"\";\n $list_index = 0;\n $indent_level = 0;\n $raw_indent_level = 0;\n $anchor_history = array();\n\n foreach ($matches as $val) {\n\n ++$list_index;\n $prev_indent_level = $indent_level;\n $indent_level = $val[2];\n $anchor = self::getSafeParameter( $val[3] );\n\n // ensure that we don't reuse an anchor\n $anchor_index = 1;\n $raw_anchor = $anchor;\n while ( in_array( $anchor, $anchor_history ) ) {\n $anchor_index++;\n $anchor = $raw_anchor . strval( $anchor_index );\n }\n\n array_push( $anchor_history, $anchor );\n if ( $indent_level > $prev_indent_level ) {\n // indent further (by starting a sub-list)\n $toc .= \"\\n<ul>\\n\";\n $raw_indent_level++;\n }\n if ( $indent_level < $prev_indent_level ) {\n // end the list item\n $toc .= \"</li>\\n\";\n // end this list\n $toc .= \"</ul>\\n\";\n $raw_indent_level--;\n }\n if ( $indent_level <= $prev_indent_level ) {\n // end the list item too\n $toc .= \"</li>\\n\";\n }\n // add permalink?\n if ( $this->config['permalink'] != \"\" ) {\n $pl = ' <a href=\"#'.$anchor.'\" class=\"permalink\" title=\"link to this section\">' . $this->config['permalink'] . '</a>';\n } else {\n $pl = \"\";\n }\n // print this list item\n $toc .= '<li><a href=\"#'.$anchor.'\">'. $val[3] . '</a>';\n $Sections[$list_index] = '/' . addcslashes($val[1] . $val[3] . $val[4], '/.*?+^$[]\\\\|{}-()') . '/'; // Original heading to be Replaced\n $SectionWIDs[$list_index] = '<h' . $val[2] . ' id=\"'.$anchor.'\">' . $val[3] . $pl . $val[4]; // New Heading\n }\n // close out the list\n $toc .= \"</li>\\n\";\n for ( $i = $raw_indent_level; $i > 1; $i-- ) {\n $toc .= \"</ul>\\n</li>\\n\";\n }\n $toc .= \"</ul>\\n\";\n\n return '<div id=\"toc\" class=\"alert alert-info col-lg-4 col-md-5 col-sm-12 col-xs-12 pull-right\" style=\"margin-left: 10px;\">' . $toc . '</div>' . \"\\n\" . preg_replace($Sections, $SectionWIDs, $html, 1);\n }",
"public static function convertMarkdowntoRst(&$content)\n {\n // Header\n $content = preg_replace_callback('/(\\n|^)##\\s(.*)/', function($matches)\n {\n return \"\\n\".$matches[2].\"\\n\".str_repeat('~', strlen($matches[2]));\n },$content);\n\n $content = preg_replace_callback('/(\\n|^)###\\s(.*)/', function($matches)\n {\n return \"\\n\".$matches[2].\"\\n\".str_repeat('^', strlen($matches[2]));\n },$content);\n\n // inline code\n $content = preg_replace_callback('/[^\\S\\n]`([^`]+)`[^\\S\\n]/', function($matches)\n {\n return ' ``'.$matches[1].'`` ';\n },$content);\n\n // code block\n $content = preg_replace_callback('/```(\\w+)([^`]+)```/', function($matches)\n {\n return '.. code-block:: '.$matches[1].\"\\n\".self::indent($matches[2], 4);\n },$content);\n\n // Link\n $content = preg_replace_callback('/\\[([^\\]]+)]\\(([^\\)]+)\\)/', function($matches)\n {\n return '`'.$matches[1].' <'.$matches[2].'>`_ ';\n },$content);\n\n // ul-list\n $content = preg_replace_callback('/\\n\\*\\s(.*)/', function($matches)\n {\n return \"\\n- \".$matches[1];\n },$content);\n\n return $content;\n\n }",
"protected function getContents()\n {\n $contents = $this->crawler->filter('.page.group');\n if (!$contents->count()) {\n return;\n }\n\n $contents = $contents->html();\n\n // I'll have my own syntax highlighting, WITH BLACKJACK AND HOOKERS\n $this->crawler->filter('pre')->each(function ($code) use (&$contents) {\n $unformatted = htmlentities($code->text());\n $unformatted = '<pre><code class=\"php\">'.$unformatted.'</code></pre>';\n $contents = str_replace('<pre class=\"code php\">'.$code->html().'</pre>', $unformatted, $contents);\n });\n\n return $contents;\n }",
"function wikiplugin_split_cell($data, $pos, $cell) {\n\t$start = $pos;\n\t$end = $pos;\n\t$no_parsed = '~np~|~pp~|\\\\<pre\\\\>|\\\\<PRE\\\\>';\n\t$no_parsed_end = '';\n\t$match = '@@@+|----*|\\{SPLIT\\}|\\{SPLIT\\(|~np~|~pp~|\\\\<pre\\\\>|\\\\<PRE\\\\>';\n\twhile (true) {\n\t\tif (!preg_match(\"#($match)#m\", substr($data, $pos), $matches)) {\n\t\t\tif ($cell)\n\t\t\t\t$end = $start;\n\t\t\tbreak;\n\t\t} else {\n\t\t\t$end = $pos + strpos(substr($data, $pos), $matches[1]);\n\t\t\t$start_next_tag = $end + strlen($matches[1]);\n\t\t\tif (substr($matches[1], 0, 4) == '----') {\n\t\t\t} else if (substr($matches[1], 0, 3) == '@@@' || $matches[1] == '---') {\n\t\t\t\tif (!$cell)\n\t\t\t\t\tbreak;\n\t\t\t\t--$cell;\n\t\t\t\tif (!$cell)\n\t\t\t\t\t$start = $start_next_tag;\n\t\t\t} elseif ($matches[1] == $match) {\n\t\t\t\t$match = '@@@+|----*|\\{SPLIT\\}|\\{SPLIT\\(|~np~|~pp~|\\\\<pre\\\\>|\\\\<PRE\\\\>';\n\t\t\t} elseif ($matches[1] == '{SPLIT}') {\n\t\t\t\tif (!$cell)\n\t\t\t\t\tbreak;\n\t\t\t} elseif ($matches[1] == '{SPLIT(') {\n\t\t\t\t$match = '{SPLIT}';\n\t\t\t} elseif ($matches[1] == '~np~') {\n\t\t\t\t$match = '~/np~';\n\t\t\t} elseif ($matches[1] == '~pp~') {\n\t\t\t\t$match = '~/pp~';\n\t\t\t} elseif ($matches[1] == '<pre>') {\n\t\t\t\t$match = '</pre>';\n\t\t\t} elseif ($matches[1] == '<PRE>') {\n\t\t\t\t$match = '</PRE>';\n\t\t\t}\n\t\t$pos = $start_next_tag;\n\t\t}\n\t}\n\treturn array($start, $end - $start);\n}",
"function split_content() {\n\tglobal $more;\n\t$more = true;\n\t$content = preg_split('/<span id=\"more-\\d+\"><\\/span>/i', get_the_content('more'));\n\tfor($c = 0, $csize = count($content); $c < $csize; $c++) {\n\t\t$content[$c] = apply_filters('the_content', $content[$c]);\n\t}\n\treturn $content;\n}",
"function the_content_filter($content) {\n\t$block = join(\"|\",array(\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"columns\",\"columns_inside\",\"columns_inside2\",\"fullwidth\",\"header\",\"heading\",\"sec_color\",\"section\",\"emphasis\",\"info\",\"success\",\"error\",\"warning\",\"highlight\",\"quote\",\"one_half\",\"one_half_inside\",\"one_half_inside2\",\"one_third\",\"one_third_inside\",\"one_third_inside2\",\"one_fourth\",\"one_fourth_inside\",\"one_fourth_inside2\",\"two_third\",\"two_third_inside\",\"two_third_inside2\",\"three_fourth\",\"three_fourth_inside\",\"three_fourth_inside2\",\"services\",\"singleServices\",\"process\",\"staffs\",\"client\",\"clients\",\"carousel_slider\",\"contact\",\"progress\",\"content\",\"columns\",\"map\",\"icon50\",\"icon80\",\"icon190\",\"tab\",\"tab_content\",\"new_section\",\"intro_box\",\"tab_content\",\"tab\",\"accordions\",\"accordion\",\"toggle\",\"toggles\",\"icon\",\"pricing_tables\",\"pricing_column\",\"pricing_title\",\"pricing_price\",\"pricing_con\",\"pricing_row\",\"pricing_button\",\"googlemap_api\",\"google_map\",\"ul\",\"li\",\"chart\",\"animation\",\"icon_box\"));\n \n\t// opening tag\n\t$rep = preg_replace(\"/(<p>)?\\[($block)(\\s[^\\]]+)?\\](<\\/p>|<br \\/>)?/\",\"[$2$3]\",$content);\n\t// closing tag\n\t$rep = preg_replace(\"/(<p>)?\\[\\/($block)](<\\/p>|<br \\/>)?/\",\"[/$2]\",$rep);\n\treturn $rep;\n}",
"function transform(){\n\t\tif($this->request->post() && ($d = $this->form->validate($this->params))){\n\t\t\tAtk14Require::Helper(\"modifier.markdown\");\n\t\t\t$content = smarty_modifier_markdown($d[\"source\"]);\n\t\t\tif($d[\"base_href\"]){\n\t\t\t\t$base_href = $d[\"base_href\"];\n\t\t\t\tif(!preg_match('/\\/$/',$base_href)){\n\t\t\t\t\t$base_href .= \"/\";\n\t\t\t\t}\n\t\t\t\t$content = preg_replace_callback('/(<a\\b[^>]*\\bhref=\"|img\\b[^>]*\\bsrc=\")([^\"]*)/',function($matches) use($base_href){\n\t\t\t\t\t$url = $matches[2];\n\t\t\t\t\tif(!preg_match('/^https?:\\/\\//',$url) && !preg_match('/^\\//',$url)){\n\t\t\t\t\t\t$url = preg_replace('/^\\.\\/+/','',$url);\n\t\t\t\t\t\t$url = $base_href.$url;\n\t\t\t\t\t}\n\t\t\t\t\treturn $matches[1].$url.\"\";\n\t\t\t\t},$content);\n\t\t\t}\n\t\t\t$this->_report_success(array(),array(\n\t\t\t\t\"content_type\" => \"text/plain\",\n\t\t\t\t\"raw_data\" => $content,\n\t\t\t));\n\t\t}\n\t}",
"public static function Markdown($Mixed) {\n if (!is_string($Mixed)) {\n return self::To($Mixed, 'Markdown');\n } else {\n $Formatter = Gdn::Factory('HtmlFormatter');\n if (is_null($Formatter)) {\n return Gdn_Format::Display($Mixed);\n } else {\n require_once(PATH_LIBRARY.DS.'vendors'.DS.'markdown'.DS.'markdown.php');\n $Mixed = Markdown($Mixed);\n $Mixed = Gdn_Format::Mentions($Mixed);\n return $Formatter->Format($Mixed);\n }\n }\n }",
"public function testMarkdownFile()\n {\n $markdown = '# Celerique habitantum\n\n## Pro ubi respondit flammae\n\nLorem markdownum, obscenas ut audacia coeunt pulchro excidit obstitit vulnera!\nMedio est non protinus, *ne* et elige!\n\n computing.redundancy_power_olap(webSymbolic);\n if (internalOfNosql > dpi + agp + desktop(printer_offline)) {\n mbrVlogCircuit(truncate, cd, word_software * burn_on);\n }\n siteMemory(nybble_string, tag_output_vista.lionMacHibernate(5, artificial));\n\nTemporis circum. Non cogit dira cave iubent rursus pleno ritu inferius meus;\nflatuque agmina me. Mira ad vicimus, minus delet, ab tetigisse solet in adiuvet\ndubitas. Suo monuit coniunx ordine germanam.';\n\n // add a file to the depot\n $file = new File;\n $file->setFilespec('//depot/foo/testfile1.md')\n ->open()\n ->setLocalContents($markdown)\n ->submit('change test');\n\n $this->dispatch('/files/depot/foo/testfile1.md');\n\n $result = $this->getResult();\n $this->assertRoute('file');\n $this->assertRouteMatch('files', 'files\\controller\\indexcontroller', 'file');\n $this->assertResponseStatusCode(200);\n $this->assertInstanceOf('Zend\\View\\Model\\ViewModel', $result);\n $this->assertSame('depot/foo/testfile1.md', $result->getVariable('path'));\n $this->assertInstanceOf('P4\\File\\File', $result->getVariable('file'));\n $this->assertQueryContentContains('h1', 'testfile1.md');\n\n // verify markdown\n $this->assertQueryContentContains('h1', 'Celerique habitantum');\n $this->assertQueryContentContains('h2', 'Pro ubi respondit flammae');\n $this->assertQueryContentContains('em', 'ne');\n $this->assertQueryContentContains('pre code', 'computing.redundancy_power_olap(webSymbolic);');\n }",
"function ridizain_ephemera_excerpt () {\r\n\t$theContent = trim(strip_tags(get_the_content()));\r\n\t\t$output = str_replace( '\"', '', $theContent);\r\n\t\t$output = str_replace( '\\r\\n', ' ', $output);\r\n\t\t$output = str_replace( '\\n', ' ', $output);\r\n\t\t\t$limit = '15';\r\n\t\t\t$content = explode(' ', $output, $limit);\r\n\t\t\tarray_pop($content);\r\n\t\t$content = implode(\" \",$content).\" \";\r\n\treturn strip_tags($content, ' ');\r\n}",
"function fixMarkdownLinks($md){\n return preg_replace('/([^(]+)\\.md(?=\\))/i', '?post=$1#content', $md);\n }",
"function split_content() {\n global $post;\n if( strpos( $post->post_content, '<!--more-->' ) ) {\n $content = preg_split('/<span id=\"more-\\d+\"><\\/span>/i', get_the_content('more'));\n $ret = '<div class=\"content_excerpt\">'. array_shift($content). '</div>';\n if (!empty($content)) $ret .= '<div class=\"content_more\">'. implode($content). '</div>';\n $ret .= '<div class=\"more_link\"><a class=\"read-more\" title=\"'. __('Read more', 'monum') .'\" data-text-less=\"'. __('Read less', 'monum') .'\">'. __('Read more', 'monum') .'</a></div>';\n return apply_filters('the_content', $ret);\n } else {\n return the_content();\n } \n}",
"function extract_simplified_contents($content, $delimiter, $length){\n // Use explode function to create a string array, each string in this array\n // is a word separated by the $delimiter.\n $string_array = explode($delimiter, $content);\n $simplified_content = \"\";\n\n // This counter records number of the words that we extract for the simplified content\n $word_counter = 0;\n\n // This counter records the position within the $string_array\n $pos = 0;\n\n while(($word_counter<$length)&&($pos<sizeof($string_array))){\n\n // We skip \"\" character and \"\\r\\n\" PHP new line character. \n if(($string_array[$pos]!=\"\")&&($string_array[$pos]!=\"\\r\\n\")){\n if($word_counter==$length-1){\n $simplified_content = $simplified_content.$string_array[$pos];\n }\n else{\n $simplified_content = $simplified_content.$string_array[$pos].\" \";\n }\n $word_counter+=1;\n }\n\n $pos+=1;\n }\n \n return $simplified_content;\n }",
"private function filterMarkdown($all) {\n foreach ($all as $value) {\n\n $value->comment = $this->textFilter->doFilter($value->comment, 'shortcode, markdown');\n }\n return $all;\n }",
"protected function parse_content(){\n $m = array(); // we will keep here\n list( $t, $text ) = explode( \"<div class='post entry-content '>\", $this->page );\n list( $text, $t ) = explode( '</div>', $text );\n return $text;\n }",
"public function cropHtmlWorksWithComplexContent() {}",
"function drush_html_to_text($html, $allowed_tags = NULL) {\n $replacements = [\n '<hr>' => '------------------------------------------------------------------------------',\n '<li>' => ' * ',\n '<h1>' => '===== ',\n '</h1>' => ' =====',\n '<h2>' => '---- ',\n '</h2>' => ' ----',\n '<h3>' => '::: ',\n '</h3>' => ' :::',\n '<br/>' => \"\\n\",\n ];\n $text = str_replace(array_keys($replacements), array_values($replacements), $html);\n return html_entity_decode(preg_replace('/ *<[^>]*> */', ' ', $text));\n}",
"function code_trick( $text, $markdown ) {\n\t\t// If doing markdown, first take any user formatted code blocks and turn them into backticks so that\n\t\t// markdown will preserve things like underscores in code blocks\n\t\tif ( $markdown )\n\t\t\t$text = preg_replace_callback(\"!(<pre><code>|<code>)(.*?)(</code></pre>|</code>)!s\", array( __CLASS__,'decodeit'), $text);\n\n\t\t$text = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $text);\n\t\tif ( !$markdown ) {\n\t\t\t// This gets the \"inline\" code blocks, but can't be used with Markdown.\n\t\t\t$text = preg_replace_callback(\"|(`)(.*?)`|\", array( __CLASS__, 'encodeit'), $text);\n\t\t\t// This gets the \"block level\" code blocks and converts them to PRE CODE\n\t\t\t$text = preg_replace_callback(\"!(^|\\n)`(.*?)`!s\", array( __CLASS__, 'encodeit'), $text);\n\t\t} else {\n\t\t\t// Markdown can do inline code, we convert bbPress style block level code to Markdown style\n\t\t\t$text = preg_replace_callback(\"!(^|\\n)([ \\t]*?)`(.*?)`!s\", array( __CLASS__, 'indent'), $text);\n\t\t}\n\t\treturn $text;\n\t}",
"function clean_PDF() {\r\n\t\t$this->code = str_replace('font-style: normal;', '', $this->code);\r\n\t\t$this->code = str_replace('text-decoration: none;', '', $this->code);\r\n\t\t$this->code = str_replace('overflow: visible;', '', $this->code);\r\n\t\t$this->code = preg_replace('/border-\\w+-[^\\:]+:[^;]+;/is', '', $this->code);\r\n\t\t$this->code = preg_replace('/padding-[^\\:]+:[^;]+;/is', '', $this->code);\r\n\t\t$this->code = preg_replace('/text-indent:[^;]+;/is', '', $this->code);\r\n\t\t$this->code = preg_replace('/line-height:[^;]+;/is', '', $this->code);\r\n\t\t$this->code = preg_replace('/display:[^;]+;/is', '', $this->code);\r\n\t\t//$this->code = str_replace('text-align: left;', '', $this->code);\r\n\t\t// hyphenated words...\r\n\t\t$this->code = preg_replace('/(\\w)- (\\w)/is', '$1$2', $this->code);\r\n\t\t// footnotes\r\n\t\t$footnotes_code = '<hr>\r\n';\r\n\t\tpreg_match_all('/(<p[^<>]{0,}>.{0,100}?<img[^<>]+height=\"1\".*?<\\/p>)\\s{0,}(<p[^<>]{0,}>.*?<\\/p>)/is', $this->code, $footnote_matches);\r\n\t\t//print('$footnote_matches: ');var_dump($footnote_matches);\r\n\t\t// <p class=Default><a href=\"#_ftnref1\" name=\"_ftn1\" title=\"\">[1]</a> <i>R. v. Bentley</i>, 2017 ONCA 982</p>\r\n\t\tforeach($footnote_matches[0] as $footnote_index => $footnote_match) {\r\n\t\t\t$footnote_code = $footnote_matches[2][$footnote_index];\r\n\t\t\t$footnote_code = ReTidy::preg_replace_first('/<a name=\"bookmark[0-9]+\">\\s{0,}([0-9]+)\\s{0,}<\\/a>/is', '<a href=\"#_ftnref$1\" name=\"_ftn$1\" title=\"\">[$1]</a>', $footnote_code); // so that clean_word recognizes it\r\n\t\t\t$footnotes_code .= $footnote_code . '\r\n';\r\n\t\t\t$this->code = str_replace($footnote_matches[0][$footnote_index], '', $this->code);\r\n\t\t}\r\n\t\t$this->code = str_replace('</body>', $footnotes_code . '</body>', $this->code);\r\n\t\t// <a href=\"#bookmark0\" class=\"s6\">1</a>\r\n\t\t// <a href=\"#_ftn1\" name=\"_ftnref1\" title=\"\"><span class=MsoFootnoteReference><span class=MsoFootnoteReference><span lang=EN-GB style='font-size:12.0pt;line-height:115%;font-family:\"Times New Roman\",serif'>[1]</span></span></span></a>\r\n\t\t$this->code = preg_replace('/<a href=\"#bookmark[0-9]+\"[^<>]{0,}>([0-9]+)<\\/a>/is', '<a href=\"#_ftn$1\" name=\"_ftnref$1\" title=\"\">[$1]</a>', $this->code);\r\n\t\t// strip <p>s in <li>s; loop this since lists can be nested\r\n\t\t$closing_p_count = -1;\r\n\t\twhile($closing_p_count != 0) {\r\n\t\t\t$this->code = preg_replace('/(<li[^<>]{0,}>.*?)<\\/p>([^<>]*?<\\/li>)/is', '$1$2', $this->code, -1, $closing_p_count);\r\n\t\t}\r\n\t\t$opening_p_count = -1;\r\n\t\twhile($opening_p_count != 0) {\r\n\t\t\t$this->code = preg_replace('/(<li[^<>]{0,}>[^<>]*?)<p[^<>]{0,}>(.*?<\\/li>)/is', '$1$2', $this->code, -1, $opening_p_count);\r\n\t\t}\r\n\t\t// would be simple if this code was ready\r\n\t\t/*\r\n\t\tif(!include_once('..' . DS . 'LOM' . DS . 'O.php')) {\r\n\t\t\tprint('<a href=\"https://www.phpclasses.org/package/10594-PHP-Extract-information-from-XML-documents.html\">LOM</a> is required');exit(0);\r\n\t\t}\r\n\t\t$O = new O($this->code);\r\n\t\t$lis = $O->_('li');\r\n\t\tprint('$lis: ');var_dump($lis);*/\r\n\t\t\r\n\t\tReTidy::style_cdata();\r\n\t\r\n\t\tReTidy::dom_init();\r\n\t\tReTidy::DOM_stylesheets_to_styles();\r\n\t\tReTidy::dom_save();\r\n\r\n\t//\tReTidy::post_dom();\r\n\t\t\r\n\t}",
"function gc_series_before_after($content)\n{\n\t$content = strip_tags($content);\n\t$content = str_replace(\"\\xc2\\xa0\", ' ', $content);\n\t$content = preg_replace('/<p>/', '<p style=\"padding-left:30px; padding-right:30px;\">', $content);\n\t$content = preg_replace('/<\\/p>/', '</p>', $content);\n\treturn $content;\n}",
"function excerpt_remove_footnotes($content)\n {\n }",
"function abstractFromParagraph($content)\n{\n $position = stripos ($content, \".\"); //find first dot position\n \n if($position) { //if there's a dot in our soruce text do\n $offset = $position + 1; //prepare offset\n $position2 = stripos ($content, \".\", $offset); //find second dot using offset\n $first_two = substr($content, 0, $position2); //put two first sentences under $first_two\n\n return $first_two . '.'; //add a dot\n }\n\n else { // if no dot return blank\n\t\treturn \"\";\t\n }\n\t\n}",
"function &combineCodeDescription(string $code, Description &$desc, Parser &$parser) {\n $arr = explode(\"\\n\", $code);\n $size = sizeof($arr);\n\n $keysSize = sizeof($desc->keys);\n\n /**\n * This should be larger than 1 as the Description\n * itself is always generating one element.\n */ \n $descExists = sizeof($desc->keys) > 1;\n\n $return = '<table class=\"code-table\">\n <thead>\n <tr>\n <th>' . wfMessage('code_title') . '</th>'\n . ($descExists ?'<th>' . wfMessage('code_description_title') . '</th>' : '' ) . '\n </tr>\n </thead>\n <tbody>';\n\n $isFirst = ($arr[0] === '' ? true : false);\n\n for ($i = (!$isFirst ? 0 : 1), $j = 0; $i < $size; ++$j) {\n $return .= '<tr><th class=\"first\"><pre><ol start=\"' . ($i + 1 - $isFirst) . '\">';\n\n $nextKey = 0;\n if ($keysSize > $j + 1) {\n $nextKey = $desc->keys[$j + 1] - 1 + $isFirst;\n\n if ($nextKey > $size) {\n $nextKey = $size;\n }\n } else {\n $nextKey = $size;\n }\n\n while ($i < $nextKey) {\n if (!($i + 1 == $size && $arr[$i] === ''))\n $return .= '<li><span class=\"line\">' . ($arr[$i] !== '' ? $arr[$i] : ' ') . '</span></li>';\n\n ++$i;\n }\n\n $return .= '</pre></ol></th>' . ($descExists ? '<th class=\"second\">' . $parser->recursiveTagParseFully($desc->texts[$j]) . '</th>' : '');\n }\n\n $return .= '</tbody></table>';\n\n return $return;\n}",
"function markdown_file_render($markdown_filename){\n\n // ensure file exists\n if (is_file($markdown_filename)){\n // using it as-is, no big deal\n } else if (path_xdrive_to_local($markdown_filename)){\n $markdown_filename = path_xdrive_to_local($markdown_filename);\n } else {\n error_box(\"<b>FILE DOES NOT EXIST:</b><br><code>$markdown_filename</code>\");\n return;\n }\n\n // ensure file is not empty\n if (filesize($markdown_filename)==0){\n error_box(\"<b>FILE IS EMPTY:</b><br><code>$markdown_filename</code>\");\n return;\n }\n\n // provide an anchor for this file\n $anchorName = basename($markdown_filename);\n $anchorName = explode('.',$anchorName)[0];\n echo \"<a name='$anchorName'></a>\";\n\n // render and echo the file\n include_once('Parsedown.php');\n $Parsedown = new Parsedown();\n $f = fopen($markdown_filename, \"r\");\n $raw = fread($f,filesize($markdown_filename));\n fclose($f);\n $html = $Parsedown->text($raw);\n echo $html;\n\n // add a button to edit the file\n $markdown_filename = path_clean($markdown_filename);\n $url=path_to_url($markdown_filename);\n echo \"<div align='right' style='font-size: 80%; color: #CCC; padding-right: 10px;'>\";\n echo \"<a href='$url' style='color: #CCC;'>$markdown_filename</a>\";\n echo \"</div>\";\n //echo \"<a href='$url' style='color: #CCC'>edit $url</a></div>\";\n //echo \"<i>Edit this text block: $markdown_filename</i></div>\";\n}",
"public function markdown($txt)\n {\n return $this->parser->transformMarkdown($txt);\n }",
"function html() {\n\t\t$ret = \"<p>\\n\";\n\t\tforeach ($this->data as $entry) {\n\t\t\t$line = $this->htmlstring;\n\t\t\t$title = '';\n\t\t\t$journal = '';\n\t\t\t$year = '';\n\t\t\t$authors = '';\n\t\t\tif (array_key_exists('title', $entry)) {\n\t\t\t\t$title = $this->_unwrap($entry['title']);\n\t\t\t}\n\t\t\tif (array_key_exists('journal', $entry)) {\n\t\t\t\t$journal = $this->_unwrap($entry['journal']);\n\t\t\t}\n\t\t\tif (array_key_exists('year', $entry)) {\n\t\t\t\t$year = $this->_unwrap($entry['year']);\n\t\t\t}\n\t\t\tif (array_key_exists('author', $entry)) {\n\t\t\t\tif ($this->_options['extractAuthors']) {\n\t\t\t\t\t$tmparray = array(); //In this array the authors are saved and the joind with an and\n\t\t\t\t\tforeach ($entry['author'] as $authorentry) {\n\t\t\t\t\t\t$tmparray[] = $this->_formatAuthor($authorentry);\n\t\t\t\t\t}\n\t\t\t\t\t$authors = join(', ', $tmparray);\n\t\t\t\t} else {\n\t\t\t\t\t$authors = $entry['author'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (('' != $title) || ('' != $journal) || ('' != $year) || ('' != $authors)) {\n\t\t\t\t$line = str_replace(\"TITLE\", $title, $line);\n\t\t\t\t$line = str_replace(\"JOURNAL\", $journal, $line);\n\t\t\t\t$line = str_replace(\"YEAR\", $year, $line);\n\t\t\t\t$line = str_replace(\"AUTHORS\", $authors, $line);\n\t\t\t\t$line .= \"\\n\";\n\t\t\t\t$ret .= $line;\n\t\t\t} else {\n\t\t\t\t$this->_generateWarning('WARNING_LINE_WAS_NOT_CONVERTED', '', print_r($entry, 1));\n\t\t\t}\n\t\t}\n\t\t$ret .= \"</p>\\n\";\n\t\treturn $ret;\n\t}",
"function my_formatter($content)\n{\n $new_content = '';\n $pattern_full = '{(\\[raw\\].*?\\[/raw\\])}is';\n $pattern_contents = '{\\[raw\\](.*?)\\[/raw\\]}is';\n $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE);\n\n foreach ($pieces as $piece) {\n if (preg_match($pattern_contents, $piece, $matches)) {\n $new_content .= $matches[1];\n } else {\n $new_content .= wptexturize(wpautop($piece));\n }\n }\n\n return $new_content;\n}",
"private function normalize_html_head(){\n\n foreach ( (new HEAD_Section_Normalizer())->as_array() as $result)\n {\n\n }\n\n }",
"function paragraph_trim($content, $limit = 500, $schr=\"\\n\", $scnt=2)\n{\n $post = 0;\n $trimmed = false;\n for($i = 1; $i <= $scnt; $i++) {\n\n if($tmp = strpos($content, $schr, $post+1)) {\n $post = $tmp;\n $trimmed = true;\n } else {\n $post = strlen($content) - 1;\n $trimmed = false;\n break;\n }\n\n }\n\n $content = substr($content, 0, $post);\n\n if(strlen($content) > $limit) {\n $content = substr($content, 0, $limit);\n $content = substr($content, 0, strrpos($content,' '));\n $trimmed = true;\n }\n\n if($trimmed) $content .= '...';\n\n return $content;\n\n}",
"function mu_remove_h1_wp_editor( $init ) {\n $init['block_formats'] = 'Paragraph=p;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Pre=pre';\n return $init;\n}",
"function preProcess($docblock) {\n\t\t$docblock = str_replace(\"\\r\\n\", \"\\n\", $docblock);\n\t\t$docblock = str_replace(\"\\r\", \"\\n\", $docblock);\n\t\t$docblock = str_replace(\"/*\", \"\", $docblock);\n\t\t$docblock = str_replace(\"*/\", \"\", $docblock);\n\t\t$docblock = preg_replace(\"/[\\*=\\-]+/\", \"\", $docblock);\n\t\treturn $docblock;\n\t}",
"function excerpt_remove_blocks($content)\n {\n }",
"function parse_content($rawcontent){\n $content = explode(\"++++\", $rawcontent);\n //the defintion of the the title\n $metablock = $content[0];\n $rawmeta = explode(\"----\", $metablock);\n $meta = [];\n foreach ($rawmeta as $metaline) {\n //splits key from value\n $metaentry = explode(\":\", $metaline);\n //removes all spaces around the value\n $key = trim($metaentry[0]);\n $value = trim($metaentry[1]);\n $meta[$key] = $value;\n }\n //the splittet version: just the value\n $title = $meta[\"title\"];\n //the splittet text\n $text = $content[1];\n $result = compact(\"title\", \"text\", \"meta\");\n //returns the result\n return $result;\n}",
"function shiftFootnotesDown() {\r\n\t\tpreg_match_all('/<a href=\"([^\"]*?)#note([^\"]*?)([0-9]+)\" id=\"note([^\"]*?)\\3\" title=\"([^\"]*?)\\3\">((<[^<>]+>)*?)\\3/is', $this->code, $noteParts, PREG_OFFSET_CAPTURE);\r\n\t\tif(sizeof($noteParts[0]) === 0) {\r\n\t\t\tpreg_match_all('/<sup id=\"fnb([0-9]+)-ref\"><a class=\"footnote-link\" href=\"#fnb\\1\"><span class=\"wb-invisible\">[^<>]*?<\\/span>\\1<\\/a><\\/sup>/is', $this->code, $noteParts, PREG_OFFSET_CAPTURE);\r\n\t\t\t$size = sizeof($noteParts[0]);\r\n\t\t\t$count = 0;\r\n\t\t\twhile($size > 0) {\r\n\t\t\t\t$index = $size - 1;\t\r\n\t\t\t\t$num = $noteParts[1][$index][0];\r\n\t\t\t\t$numMinusOne = $num - 1;\r\n\t\t\t\t$initial_note = $noteParts[0][$index][0];\r\n\t\t\t\t$modified_note = str_replace($num, $numMinusOne, $initial_note);\r\n\t\t\t\t$offset = $noteParts[0][$index][1];\r\n\t\t\t\t$this->code = substr($this->code, 0, $offset) . $modified_note . substr($this->code, $offset + strlen($initial_note));\r\n\t\t\t\t$count += 1;\r\n\t\t\t\t$size--;\r\n\t\t\t}\r\n\t\t\tpreg_match_all('/<dt>[^<>]*?([0-9]+)<\\/dt>\\s*<dd id=\"fnb\\1\">\\s*<p>.*?<\\/p>\\s*<p class=\"footnote-return\"><a href=\"#fnb\\1-ref\"><span class=\"wb-invisible\">[^<>]*?<\\/span>\\1<span class=\"wb-invisible\">[^<>]*?<\\/span><\\/a><\\/p>\\s*<\\/dd>/is', $this->code, $noteParts2, PREG_OFFSET_CAPTURE);\r\n\t\t\t$size2 = sizeof($noteParts2[0]);\r\n\t\t\t$count2 = 0;\r\n\t\t\twhile($size2 > 0) {\r\n\t\t\t\t$index = $size2 - 1;\t\r\n\t\t\t\t$num = $noteParts2[1][$index][0];\r\n\t\t\t\t$numMinusOne = $num - 1;\r\n\t\t\t\t$initial_note = $noteParts2[0][$index][0];\r\n\t\t\t\t$modified_note = str_replace($num, $numMinusOne, $initial_note);\r\n\t\t\t\t$offset = $noteParts2[0][$index][1];\r\n\t\t\t\t$this->code = substr($this->code, 0, $offset) . $modified_note . substr($this->code, $offset + strlen($initial_note));\r\n\t\t\t\t$count2 += 1;\r\n\t\t\t\t$size2--;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$size = sizeof($noteParts[0]);\r\n\t\t\t$count = 0;\r\n\t\t\twhile($size > 0) {\r\n\t\t\t\t$index = $size - 1;\t\r\n\t\t\t\t$num = $noteParts[3][$index][0];\r\n\t\t\t\t$numMinusOne = $num - 1;\r\n\t\t\t\t$initial_note = $noteParts[0][$index][0];\r\n\t\t\t\t$modified_note = str_replace($num, $numMinusOne, $initial_note);\r\n\t\t\t\t$offset = $noteParts[0][$index][1];\r\n\t\t\t\t$this->code = substr($this->code, 0, $offset) . $modified_note . substr($this->code, $offset + strlen($initial_note));\r\n\t\t\t\t$count += 1;\r\n\t\t\t\t$size--;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->logMsgIf(\"shiftFootnotesDown (referrer)\", $count);\r\n\t\t$this->logMsgIf(\"shiftFootnotesDown (note)\", $count2);\r\n\t\treturn true;\r\n\t}"
] | [
"0.64728683",
"0.63862425",
"0.63493717",
"0.63093585",
"0.62071997",
"0.6201429",
"0.61799085",
"0.6179032",
"0.61348057",
"0.6132788",
"0.612214",
"0.6068031",
"0.60059255",
"0.600144",
"0.590328",
"0.5895782",
"0.5816773",
"0.57817143",
"0.5768706",
"0.57620364",
"0.5730485",
"0.57284105",
"0.5724731",
"0.57170975",
"0.57073104",
"0.56902105",
"0.5681639",
"0.56113666",
"0.56075984",
"0.55856574",
"0.5559878",
"0.55417925",
"0.5526545",
"0.5510849",
"0.5486652",
"0.5472884",
"0.5470608",
"0.54680353",
"0.5461329",
"0.5455484",
"0.5449566",
"0.5428172",
"0.54091126",
"0.54088336",
"0.54000974",
"0.53839624",
"0.5380773",
"0.5375033",
"0.53673625",
"0.5353593",
"0.53437674",
"0.5336935",
"0.53122455",
"0.53019303",
"0.529628",
"0.52499104",
"0.524336",
"0.524195",
"0.52388567",
"0.5229079",
"0.522334",
"0.5222452",
"0.52189404",
"0.5211452",
"0.5206497",
"0.51969755",
"0.5187541",
"0.51714104",
"0.5170817",
"0.51666427",
"0.51635504",
"0.5156547",
"0.515333",
"0.51518524",
"0.5136774",
"0.5123392",
"0.51212037",
"0.5120354",
"0.51154244",
"0.5111338",
"0.51068",
"0.5101802",
"0.510146",
"0.50812554",
"0.50747156",
"0.50727373",
"0.50708634",
"0.5068202",
"0.5068156",
"0.50620973",
"0.5055912",
"0.5043945",
"0.5035901",
"0.5032753",
"0.5028079",
"0.5024573",
"0.5017963",
"0.5017715",
"0.501555",
"0.5008444",
"0.49971837"
] | 0.0 | -1 |
perhaps not need read or write, just delete it | public function delete() {
if(!$this->shmId) {
$id = $this->shmopOpen($this->key, "w", $this->perm, $this->len);
if(!$id) {
return true;
}
return $this->shmopDelete($id);
}
$res = $this->shmopDelete($this->shmId);
$this->shmId = 0;
return $res;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function delete() ;",
"function delete() ;",
"function delete() {\t\t$nop = str_repeat(\" \", $this -> size);\n\t\t//10 caratteri per diecimila\n\t\tshmop_write($this -> id, $nop, 0);\n\n\t}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"abstract function delete();",
"public function delete()\n\t{\n\t\t$this->hard_delete();\n\t}",
"public static function delete() {\n\n\n\t\t}",
"abstract public function delete();",
"abstract public function delete();",
"abstract public function delete();",
"abstract public function delete();",
"protected function __del__() { }",
"public final function delete() {\n }",
"public function delete_data_to_tombstone(){\n }",
"abstract protected function delete ();",
"public function __destruct() {\n\t\tif (file_exists($this->fileName) && (!$this->cache)) {\n\t\t\tunlink($this->fileName);\n\t\t}\n\t}",
"public function reclaim();",
"public function delete() {\n\t\t$this->getConnection()->delete( $this );\n\t\t$this->clear();\n\t}",
"public function removeTemporary();",
"public function __destruct() {\r\n if (isset($this->handle)) {\r\n $this->transaction_finish();\r\n }\r\n if ($this->option_remove) {\r\n @unlink($this->file);\r\n }\r\n }",
"static function delete()\n\t{\n\t\t\n\t\tif (file_exists(Cache::$path))\n\t\t\tunlink(Cache::$path);\n\t\t\t\t\n\t}",
"public function __destruct()\n {\n @unlink($this->path);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public static function delete() {\r\n\t\t\r\n\t}",
"public function delete() {}",
"public function delete() {}",
"public function delete() {}",
"public function delete() {}",
"public abstract function delete();",
"public function __destruct()\n {\n //$this->deletePath($this->path);\n }",
"public function __destruct() {\r\n if ($this->option_remove) {\r\n $this->transaction_start();\r\n $shm_id = $this->_open_existing();\r\n if (isset($shm_id)) {\r\n shmop_delete($shm_id);\r\n shmop_close($shm_id);\r\n }\r\n }\r\n $this->transaction_finish();\r\n }",
"function delete()\n {\n }",
"public function purge();",
"public function purge();",
"public function purge();",
"public function clean()\n\t{\n\t\t$this->deleteFromContainer($this->binary);\n\t}",
"public function clear()\n {\n unlink($this->file);\n }",
"function erase() {\n //delete * from database\n }",
"public function forceDelete();",
"protected function delete() {\n\t}",
"public function __destruct()\n {\n unlink($this->tmpListFile);\n }",
"function __destruct() {\r\n\t\tunlink($this->uploadfile);\r\n\t}",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function del()\n {\n }",
"public function __destruct()\n\t{\n\t\t$this->delete_local_file();\n\t}",
"public function __destruct()\n {\n $this->clear();\n }",
"public function __destruct()\n {\n $this->clear();\n }",
"public function del(): bool {}",
"public function delete() {\n\t\t$this->deleted = true;\n\t}",
"public function instance_deleted() {\n $this->purge_all_definitions();\n @rmdir($this->filestorepath);\n }",
"public function __destruct() {\n if (file_exists($this->tempFile)) {\n unlink($this->tempFile);\n }\n }",
"public function delMetadata() {}",
"public function delMetadata() {}",
"public function delMetadata() {}",
"function delete() {\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function __destruct()\n {\n unset($this->binaryReaderEntity);\n }",
"public function __destruct()\r\n\t{\r\n\t\t@unlink($this->targetFile);\r\n\t\tif (strcmp($this->referenceFile, $this->outputReferenceFile) !== 0)\r\n\t\t\t@unlink($this->referenceFile);\r\n\t}",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"public function purge() {}",
"public function __destruct()\n\t{\n\t\tunset($this -> arrNewData);\n\t\tunset($this -> arrOldData);\n\t\tunset($this -> isCheckModify);\n\t\tunset($this -> tableName);\n\t\tunset($this -> databaseName);\n\t\t\t\n\t}",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete(): void\n {\n unlink($this->path);\n }",
"function delete() {\n $this->that->delete($this->id, $this->name);\n $this->put_id();\n }",
"public function delete(): void;",
"protected function _delete()\n\t{\n\t}",
"function __destruct() {\n $sql = 'DELETE FROM `shadow_meta` WHERE `expires` > '.date(\"Y-m-d H:i:s\");\n $this->database->execute($sql, array());\n }",
"private function eraseObject() {\n $this->tripId = \"\";\n $this->journalId = \"\";\n $this->created = null;\n $this->updated = null;\n $this->latestUpdated = null;\n $this->userId = \"\";\n $this->journalDate = \"\";\n $this->journalTitle = \"\";\n $this->journalText = \"\";\n $this->deleted = \"N\";\n $this->hash = \"\";\n $this->latestHash = \"\";\n }",
"public function delete()\n {\n $this->invalidateCache();\n parent::delete();\n }",
"public function delete()\n {\n $this->invalidateCache();\n parent::delete();\n }",
"public function deleteUnused()\n\t{\n\t\t/*$file = Engine_Api::_()->getItem('storage_file', $this->file_id);\n\t\t if ($file) {\n\t\t $table = Engine_Api::_()->getDbtable('albumSongs', 'mp3music');\n\t\t $select = $table->select()\n\t\t ->where('file_id = ?', $file->getIdentity())\n\t\t ->limit(1);\n\t\t $count = count( $table->fetchAll($select) );\n\t\t if ($count >= 0)\n\t\t $file->delete();\n\t\t }\n\t\t $this->delete();*/\n\t\t$table = Engine_Api::_() -> getDbtable('albumSongs', 'mp3music');\n\t\t$data = array('is_delete' => 1, );\n\t\t$where = $table -> getAdapter() -> quoteInto('song_id = ?', $this -> song_id);\n\t\t$table -> update($data, $where);\n\t}",
"function deleteFile() {\r\n\t\tif (file_exists($this->data[$this->alias]['path'])) {\r\n\t\t\tunlink($this->data[$this->alias]['path']);\r\n\t\t}\r\n\t}",
"public function __destruct()\n {\n Util::wipe($this->key);\n }",
"public function cache_delete()\n {\n }",
"public function unload()\n {\n\n $this->synchronized = true;\n $this->id = null;\n $this->newId = null;\n $this->data = [];\n $this->savedData = [];\n $this->orm = null;\n\n $this->multiRef = [];\n $this->i18n = null;\n\n }",
"public function clearCache(){\n if(file_exists($this->file)){\n @unlink($this->file);\n }\n }",
"public function delete_cache()\r\n {\r\n $this->clear_file_cache();\r\n }",
"public function __destruct() {\n\t\tif(isset($this->tmpPath) && file_exists($this->tmpPath)) {\n\t\t\tunlink($this->tmpPath);\n\t\t}\n\t}",
"function unlockCacheObject ()\n {\n return unlink($this->cacheObjectId.'.lock');\n }",
"function cleanup()\n {\n $db = eZDB::instance();\n $db->begin();\n $db->query( \"DELETE FROM ezsphinx\" );\n $db->query( \"DELETE FROM ezsphinx_pathnodes\" );\n $db->commit();\n }",
"public static function delete(){\r\n }"
] | [
"0.7332526",
"0.7332526",
"0.7018495",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.68721855",
"0.68672395",
"0.68654305",
"0.6860093",
"0.6860093",
"0.6860093",
"0.6860093",
"0.68017876",
"0.67975855",
"0.6794077",
"0.6775369",
"0.67339057",
"0.66965145",
"0.66803396",
"0.6678317",
"0.6671609",
"0.6654948",
"0.6653651",
"0.66466063",
"0.66425115",
"0.66236275",
"0.66232014",
"0.66232014",
"0.6622562",
"0.6612524",
"0.66089445",
"0.65915835",
"0.6567976",
"0.6562402",
"0.6562402",
"0.6562402",
"0.6552652",
"0.6543247",
"0.6533983",
"0.650883",
"0.65067947",
"0.64960116",
"0.6491821",
"0.6484832",
"0.64678514",
"0.6454103",
"0.64515513",
"0.64515513",
"0.64413786",
"0.6440706",
"0.6440185",
"0.6428805",
"0.6427293",
"0.6427293",
"0.6427293",
"0.6395364",
"0.6393693",
"0.6387659",
"0.6383807",
"0.63818556",
"0.63818514",
"0.63707364",
"0.63707364",
"0.63707364",
"0.63707364",
"0.63649815",
"0.63648224",
"0.636145",
"0.63547903",
"0.6353427",
"0.63374686",
"0.6337325",
"0.63368994",
"0.63363236",
"0.6335027",
"0.6322135",
"0.6322135",
"0.63197654",
"0.63170606",
"0.6316822",
"0.6304919",
"0.6294859",
"0.6268091",
"0.62633514",
"0.6254998",
"0.6254399",
"0.6252176",
"0.6222083"
] | 0.0 | -1 |
We must support class for now, as well for BC. | public function register(): array
{
return [
T_CLASS, T_INTERFACE,
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function getClass();",
"abstract public function getClass();",
"abstract public function getClass();",
"public function handledClass();",
"public function getClass() {}",
"public function getClass() {}",
"public function getClass() {}",
"function _class_check($str){\n }",
"abstract protected function requestClass(): string;",
"public function supportsClass($class)\n {\n }",
"protected function getClassField() {}",
"public static function get_class(){\n return self::class;}",
"final private function __construct() {}",
"final private function __construct() {}",
"final private function __construct() { }",
"final private function __construct() { }",
"final private function __construct() { }",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"public function fn_construct_class() {\n\t}",
"protected final function __construct() {}",
"private function __construct () {}",
"function QueryClass(){\n\t\n\t\t//\n\t\t\n\t}",
"private final function __construct() {}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"protected function __init__() { }",
"protected function __construct() {}",
"protected function __construct() {}"
] | [
"0.67982733",
"0.6563958",
"0.6563958",
"0.63423765",
"0.62645596",
"0.6263832",
"0.6263832",
"0.619197",
"0.6139435",
"0.61368155",
"0.6133185",
"0.60739225",
"0.60680485",
"0.60680485",
"0.6009817",
"0.6009817",
"0.6009817",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029",
"0.59995246",
"0.5998355",
"0.5998355",
"0.59960485",
"0.59747475",
"0.59461606",
"0.5936712",
"0.59342176",
"0.59230727",
"0.59230727",
"0.59230727",
"0.59230727",
"0.59230727",
"0.59230727",
"0.59230727",
"0.59230727",
"0.59230727",
"0.59230727",
"0.59230727",
"0.59230727",
"0.59230727",
"0.59230727",
"0.59230727",
"0.59230727",
"0.59230727",
"0.5916639",
"0.5913579",
"0.5913579"
] | 0.0 | -1 |
Sets a new recipient | public function setRecipient($recipient)
{
$this->recipient = $recipient;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setRecipient($recipient)\n {\n $this->recipient = (string) $recipient;\n }",
"public function set_recipient( $id ) {\n\t\t$this->recipient_id = $id;\n\t\tupdate_comment_meta( $this->id, APP_REPORTS_C_RECIPIENT_KEY, $id );\n\t}",
"public function set( $recipient ) {\n\t\tswitch ( gettype( $recipient ) ) {\n\t\t\tcase 'string':\n\t\t\t\t$this->parse( $recipient );\n\t\t\t\tbreak;\n\t\t\tcase 'object':\n\t\t\t\t$recipient = (array) $recipient; // Convert and continue to 'array' case\n\t\t\tcase 'array':\n\t\t\t\tif ( isset( $recipient['name'] ) ) {\n\t\t\t\t\t$this->name = $recipient['name'];\n\t\t\t\t}\n\t\t\t\tif ( isset( $recipient['email'] ) ) {\n\t\t\t\t\t$this->email = $recipient['email'];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function setRecipient($value)\n {\n return $this->set('Recipient', $value);\n }",
"public function setRecipient($value)\n {\n return $this->set('Recipient', $value);\n }",
"public function setToEmailAddress($toEmailAddress, $recipientName);",
"public function setRecipientUserId(?string $value): void {\n $this->getBackingStore()->set('recipientUserId', $value);\n }",
"function setRecipients($recipients) {\n\t\t$this->setData('recipients', $recipients);\n\t}",
"public function setRecipient(User $User = NULL) {\r\n if ($User instanceof User) {\r\n $this->Recipient = $User;\r\n \r\n $this->to_user_id = $this->Recipient->id;\r\n $this->to_username = $this->Recipient->username;\r\n $this->to_user_viewonline = $this->Recipient->hide;\r\n $this->to_user_avatar = $this->Recipient->avatar;\r\n }\r\n \r\n return $this;\r\n }",
"public function set_to($to)\n\t{\n\t\tif($this->validate_email($to))\n\t\t{\n\t\t\tif(is_array($to))\n\t\t\t\t$this->send_to = $to;\n\t\t\telse\n\t\t\t\t$this->send_to[] = $to;\t\t\n\t\t}\n\t}",
"function setTo($to_set){\n\t\t\t$this->to=$to_set;\n\t\t}",
"function setFromName($to_set=\"noreply\"){\n\t\t\t$this->from_name = $to_set;\n\t\t}",
"public function setRecipients($recipients = array())\n\t{\n\t\t$this->vars['recipients'] = $recipients;\n\t}",
"public function setSender($address);",
"public function recipient($recipient)\n {\n return $this->setProperty('recipient', $recipient);\n }",
"public function setTo($to) {\r\n\t\t$this->to = $to;\r\n\t}",
"public function setTo($to) {\r\n $this->to = $to;\r\n }",
"function change_recipient() {\n\t\treturn \"[email protected]\";\n\t}",
"function addCurrentUserAsRecipient(){\n // $this->AddRecipient( SessionUser::getProperty(\"firstname\").\" \".SessionUser::getProperty(\"lastname\").\" <\".SessionUser::getProperty(\"username\").\"@\".SITE_EMAILDOMAIN.\">\" );\n $this->AddRecipient( SessionUser::getProperty(\"username\").\"@\".SITE_EMAILDOMAIN );\n }",
"public function setDefaultRecipientAttribute($recipient)\n {\n $this->attributes['default_recipient_id'] = $recipient->id;\n $this->setRelation('defaultRecipient', $recipient);\n }",
"protected function setTo() {}",
"protected function setReplyTo() {}",
"function addToRecipient( $newRecipient, $newName='') {\n\t if((eregi(\"^([ 0-9a-z\\.-_]*)\",$newName))&&(eregi(\"^([0-9a-z]+)([ 0-9a-z\\.-_]+)@([0-9a-z\\.-_]+)\\.([0-9a-z]+)\",$newRecipient))) {\n \t $this->email_to\t.= $newName . \"<\" . $newRecipient . \">;\";\n \t return $this->email_to;\n\t } else {\n\t return false;\n\t }\n\t \n\t\t\t\t\n\t}",
"public function recipient($recipient)\n {\n\n\n $this->recipient = str_replace(' ', '', trim($recipient) ) ;\n\n return $this;\n\n\n }",
"public function withRecipient($email, $name = null);",
"function setFrom($to_set=\"noreply\"){\n\t\t\t$this->from_mail = $to_set;\n\t\t}",
"public function setEmailToAddress($value) { $this->_emailToAddress = $value; }",
"public function set_sender(EmailAddress $address);",
"public function setRecipients(array $recipients)\n {\n $this->recipients = $recipients;\n }",
"public function __construct( $recipient = null ) {\n\t\tif ( null !== $recipient ) {\n\t\t\t$this->set( $recipient );\n\t\t}\n\t}",
"function setCurrentUserAsSender(){\n if( !SessionUser::isLoggedIn() ) return false;\n $this->From = SessionUser::getProperty(\"username\").\"@\".SITE_EMAILDOMAIN;\n $this->FromName = SessionUser::getProperty(\"firstname\").\" \".SessionUser::getProperty(\"lastname\").\" (\".SessionUser::getProperty(\"username\").\")\";\n }",
"public function setTo($to) {\n\t\t$this->attributes['to'] = $to;\n\t\t$this->to = $to;\n\t\treturn $this;\n\t}",
"public function setRecipient(\\App\\Models\\Entity\\User $recipient)\n {\n $this->recipient = $recipient;\n\n return $this;\n }",
"function set_reply($reply)\n\t{\n\t\t$this->reply_to = $reply;\n\t}",
"function setTo(& $node)\n {\n $node->setFirstName('Lukas');\n\n $this->to = $node;\n }",
"public static function setSender($val) \n { \n emailSettings::$sender = $val; \n }",
"public function setRecipients(?array $recipients): self\n {\n $this->initialized['recipients'] = true;\n $this->recipients = $recipients;\n\n return $this;\n }",
"public function set_reply_to(EmailAddress $address);",
"public function add_recipient(EmailAddress $address);",
"public function withAddedRecipient($email, $name = null);",
"function addRecipient($recipient)\n\t{\n\t\t// If the recipient is an aray, add each recipient... otherwise just add the one\n\t\tif (is_array($recipient))\n\t\t{\n\t\t\tforeach ($recipient as $to) {\n\t\t\t\t$to = JMailHelper::cleanLine( $to );\n\t\t\t\t$this->AddAddress($to);\n\t\t\t}\n\t\t} else {\n\t\t\t$recipient = JMailHelper::cleanLine( $recipient );\n\t\t\t$this->AddAddress($recipient);\n\t\t}\n\t}",
"public function set_to( $to ) {\n $this->to = $to;\n return $this;\n }",
"public function setMailTo ($v)\n {\n // Since the native PHP type for this column is string,\n // we will cast the input to a string (if it is not).\n if ( $v !== null && !is_string ($v) )\n {\n $v = (string) $v;\n }\n if ( $this->mail_to !== $v || $v === '' )\n {\n $this->mail_to = $v;\n }\n }",
"function __construct($sender)\r\n {\r\n $this->sender = $sender;\r\n $this->recipients = array(); \r\n }",
"public function setEmailToName($value) { $this->_emailToName = $value; }",
"public function to($recipient)\n {\n throw_if(is_null($recipient), SmsException::class, 'Recipient cannot be empty');\n\n throw_if(!is_string($recipient) && $recipient instanceof HasPhoneNumber, SmsException::class, 'Invalid argument for recipient. Must be phone number (string) or entity that implements HasPhoneNumber interface.');\n\n $this->recipient = $recipient;\n\n return $this;\n }",
"public function setRecipientName($value)\n {\n return $this->set('RecipientName', $value);\n }",
"public function setRecipientName($value)\n {\n return $this->set('RecipientName', $value);\n }",
"public function addTo(string $to): void {\n\t\tself::checkValidEMail($to);\n\n\t\t$this->to[] = $to;\n\t}",
"public function setGiftcardRecipientEmail($value);",
"public function setReplyTo(?string $replyTo): void {\n\t\tself::checkValidEMail($replyTo);\n\n\t\t$this->replyTo = $replyTo;\n\t}",
"public function setTo($to)\n {\n $this->to = (string)$to;\n return $this;\n }",
"public function addTo($to) {\n\t\tif (is_array($to)) {\n\t\t\tforeach ($to as $name => $recipient) {\n\t\t\t\t$this->to[] = self::buildAddress($name, $recipient);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$this->to[] = $to;\n\t\t}\n\t}",
"function quick_set($toemail, $subject, $message, $headers, $fromemail)\n\t{\n\t\t$this->toemail = $toemail;\n\t\t$this->subject = $subject;\n\t\t$this->message = $message;\n\t\t$this->headers = $headers;\n\t\t$this->fromemail = $fromemail;\n\t}",
"public function setTo($text)\n {\n $this->_to = (string)$text;\n return $this;\n }",
"public function setGiftcardRecipientName($value);",
"public function withRecipients(array $recipients);",
"public function setTo(string $to): self\n {\n $this->options['to'] = $to;\n return $this;\n }",
"public function setSender($sender ){\n $this->sender = $sender;\n }",
"function setSender($from){\n $this->From = $from;\n }",
"public function setIDSender($idSender){\n $this->IDsender = $idSender;\n }",
"public function to($recipient_email){\n if (is_array($recipient_email)){\n $this->_to = array_merge($this->_to, $recipient_email);\n }else{\n $this->_to[] = $recipient_email;\n }\n return $this;\n }",
"function AddRecipient( $addr ){\n \n // User ID\n if( is_int( $addr ) ){\n $sql = \"SELECT name, first_name, last_name, has_left FROM user WHERE id = \".intval($addr);\n $db = new DB();\n $db->query( $sql );\n if( $db->numrows == 0 ) return false;\n $row = $db->fetchRow();\n if( $row[\"has_left\"] == 1 ){ \n $msg = $row[\"first_name\"].\" \".$row[\"last_name\"].\" has left, no email will be sent to them\";\n Flash::addWarning($msg);\n return false;\n }\n if( $row[\"name\"] == \"\" ){ \n $msg = $row[\"first_name\"].\" \".$row[\"last_name\"].\" does not have a known email address\";\n Flash::addWarning($msg);\n return false;\n }\n $this->AddAddress( $row[\"name\"].\"@\".SITE_EMAILDOMAIN ); // , $row[\"first_name\"].\" \".$row[\"last_name\"] );\n }\n \n // User name\n elseif( preg_match( \"/^[-a-z0-9\\.]+$/\", $addr ) ){\n $this->AddAddress( $addr.\"@\".SITE_EMAILDOMAIN );\n }\n \n // Probably an email address? Leave it up to the class/mail server to work out\n else{\n $this->AddAddress( $addr );\n }\n }",
"public function setTo($to)\n { \n $this->_param['to'] = Util::cleanNumber($to);\n return $this;\n }",
"public function setReceiver(User $receiver)\n {\n $this->user = $receiver;\n }",
"public function setRecipientActionMessage(?string $value): void {\n $this->getBackingStore()->set('recipientActionMessage', $value);\n }",
"function setReplyTo($email, $name = '') {\n\t\tif ($email === null) $this->setData('replyTo', null);\n\t\t$this->setData('replyTo', array(array('name' => $name, 'email' => $email)));\n\t}",
"public function setSender($sender);",
"public function setTo($to) {\n $this->options['to'] = $to;\n return $this;\n }",
"public function setUserMail(?string $value): void {\n $this->getBackingStore()->set('userMail', $value);\n }",
"public function addRecipient ($value) {\n\t\tif (is_string($value) && preg_match(\"/(.+)@([a-z0-9-]+).([a-z\\.]+)/i\", $value)) {\n\t\t\t$this->recipients[] = $value;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function setRecipients($recipients)\n {\n if (! is_array($recipients)) {\n $this->recipients = explode(',', $recipients);\n } else {\n $this->recipients = $recipients;\n }\n\n return $this;\n }",
"public function setSender($from, $user, $password) {\r\n\t\t$this->from = $from;\r\n\t\t$this->user = $user;\r\n\t\t$this->_password = $password;\r\n\t}",
"public function setUsernameToEmail()\n {\n $this->username = $this->email;\n $this->usernameCanonical = $this->emailCanonical;\n }",
"public function setSender($sender) {\n $this->_sender = $sender;\n }",
"public function setTo($username) {\n\t\t$this->data['username'] = $username;\n\t}",
"public function setEmailFromName($value) { $this->_emailFromName = $value; }",
"public function setFromEmailAddress($fromEmailAddress, $senderName);",
"function addBCC( $newRecipient ) {\n\t\t\t\t\n\t}",
"public function setTo($email, $name = null)\n {\n $to = ['email' => $email];\n\n if (!empty($name)) {\n $to['name'] = $name;\n }\n\n $this->to[] = $to;\n }",
"function setEmail($newEmail){\n $this->email = $newEmail;\n }",
"private function setRecipients($to) {\r\n\t\t$r = 'To: ';\r\n\t\tif (! ($to == '')) {\r\n\t\t\t$r .= $to . ',';\r\n\t\t}\r\n\t\tif (count ( $this->recipients ) > 0) {\r\n\t\t\tfor($i = 0; $i < count ( $this->recipients ); $i ++) {\r\n\t\t\t\t$r .= $this->recipients [$i] . ',';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$r = substr ( $r, 0, - 1 ) . $this->newline; /* strip last comma */;\r\n\t\tif (count ( $this->cc ) > 0) { /* now add in any CCs */\r\n\t\t\t$r .= 'CC: ';\r\n\t\t\tfor($i = 0; $i < count ( $this->cc ); $i ++) {\r\n\t\t\t\t$r .= $this->cc [$i] . ',';\r\n\t\t\t}\r\n\t\t\t$r = substr ( $r, 0, - 1 ) . $this->newline; /* strip last comma */\r\n\t\t}\r\n\t\treturn $r;\r\n\t}",
"function addCC( $newRecipient ) {\n\t\t\t\t\n\t}",
"private function setRecipients($to) {\n\t\t$r = 'To: ';\n\t\tif(!($to=='')) { $r .= $to . ','; }\n\t\tif(count($this->recipients)>0) {\n\t\t\tfor($i=0;$i<count($this->recipients);$i++) {\n\t\t\t\t$r .= $this->recipients[$i] . ',';\n\t\t\t}\n\t\t}\n\t\t$r = substr($r,0,-1) . $this->newline; /* strip last comma */;\n\t\tif(count($this->cc)>0) { /* now add in any CCs */\n\t\t\t$r .= 'CC: ';\n\t\t\tfor($i=0;$i<count($this->cc);$i++) {\n\t\t\t\t$r .= $this->cc[$i] . ',';\n\t\t\t}\n\t\t\t$r = substr($r,0,-1) . $this->newline; /* strip last comma */\n\t\t}\n\t\treturn $r;\n\t}",
"public function recipientName($recipient_name) {\n $this->data['attachment']['payload']['recipient_name'] = $recipient_name;\n\n return $this;\n }",
"public function recipient($address, $dsn = '')\n {\n }",
"public function setReplyTo($replyTo);",
"function addRecipientToEmail($id_email, $recip_email, $recip_name, $to, $cc, $bcc) {\n if ($this->connectToMySql()) {\n $query = sprintf(\"INSERT INTO scuola.email_recipients(\n id_email, email, name, to_recipient, cc_recipient, bcc_recipient)\" .\n \"VALUES (%s,'%s','%s',%s,%s,%s)\", $id_email, $recip_email, $recip_name, $to, $cc, $bcc);\n\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n }\n }\n $this->closeConnection();\n return $result;\n }",
"public function setTo($addresses);",
"public function useSenderAddress()\n {\n \n $auxXml = $this->sender->getAsXml();\n $account = $this->sender->getAccount();\n $delete = \"<ACCOUNT><![CDATA[{$account}]]></ACCOUNT>\";\n \n $newXml = str_replace($delete, '', $auxXml);\n \n $this->collection = new Address();\n $this->collection->xml->flush();\n $this->collection->xml->writeRaw($newXml);\n \n return $this;\n }",
"public function setAdditionalRecipients(?array $additionalRecipients): void\n {\n $this->additionalRecipients['value'] = $additionalRecipients;\n }",
"public function set_fromlogmuser($userID) {\n\t\t\t$user = LogmUser::load($userID);\n\n\t\t\tif (!$user) {\n\t\t\t\t$this->error(\"Could Not Find User with loginid of $userID\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$contact = new EmailContact();\n\t\t\t$contact->set('email', $user->email);\n\t\t\t$contact->set('name', $user->name);\n\t\t\t$contact->set('phone', $user->phone);\n\t\t\t$this->replyto = $contact;\n\t\t\t$this->emailfrom = $contact;\n\t\t}",
"public function setRecipientId($recipientId) {\n $this->recipientId = $recipientId;\n\n return $this;\n }",
"public function recipient()\n {\n return $this->belongsTo('App\\User');\n }",
"function setSenderEmail($email) {\n $parts = $this->_parseEmail($email);\n $this->from_user = $parts[0];\n $this->from_domain = $parts[1];\n }",
"function setUserPeer($peer) {\n $this->userPeer = $peer;\n }",
"public function to($to, $name = \"\") {\n\n\t\t$this->email = $to;\n\t\t$this->name = $name;\n\n\t\treturn $this;\n\n\t}",
"public function recipient ()\n {\n return $this->belongsTo(User::class, 'recipient_id', 'id');\n }"
] | [
"0.72820574",
"0.70719504",
"0.70146114",
"0.6980044",
"0.6980044",
"0.6901255",
"0.6819104",
"0.6755475",
"0.6706081",
"0.6652692",
"0.66099286",
"0.6608273",
"0.6607298",
"0.6542155",
"0.6510591",
"0.6496301",
"0.6476085",
"0.64749056",
"0.6413438",
"0.63399065",
"0.6330235",
"0.6321672",
"0.62431335",
"0.6239306",
"0.6217675",
"0.61804205",
"0.61276156",
"0.61264884",
"0.60880715",
"0.6078411",
"0.60645026",
"0.6051676",
"0.60431623",
"0.6042766",
"0.6027733",
"0.59832084",
"0.5964941",
"0.5958679",
"0.5945573",
"0.5943941",
"0.5902128",
"0.5881321",
"0.5869583",
"0.58606714",
"0.58526134",
"0.5842239",
"0.58345413",
"0.58345413",
"0.58233565",
"0.5809337",
"0.58073366",
"0.5776539",
"0.5763898",
"0.5763633",
"0.576322",
"0.57592374",
"0.57471275",
"0.5732009",
"0.57263297",
"0.57236224",
"0.5722318",
"0.56959283",
"0.56778187",
"0.56769866",
"0.56740147",
"0.56538826",
"0.565369",
"0.5644082",
"0.5641512",
"0.56295127",
"0.5617244",
"0.5596347",
"0.55859774",
"0.55764776",
"0.5562382",
"0.5558233",
"0.55524546",
"0.55437225",
"0.55380166",
"0.55378765",
"0.55363524",
"0.55317926",
"0.55273926",
"0.55087906",
"0.55012715",
"0.5489708",
"0.5484584",
"0.54832375",
"0.54785645",
"0.547618",
"0.5471741",
"0.54700834",
"0.5467119",
"0.54561055",
"0.5454354",
"0.54425466",
"0.54412633",
"0.5431111"
] | 0.6212855 | 26 |
Sets a new referenceList | public function setReferenceList(\BankId\Merchant\Library\Schemas\xmlenc\ReferenceList $referenceList)
{
$this->referenceList = $referenceList;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setReference( &$ref ) {\n\t\t$this->items = $ref;\n\t\treturn $this;\n\t}",
"public function setReferences($val)\n {\n $this->_propDict[\"references\"] = $val;\n return $this;\n }",
"public function setRef($ref)\n {\n $this->_ref = $ref;\n }",
"public function setRef($ref);",
"function setRefFields($val) {\n $this->_refFields = $val;\n }",
"public function set_reference ($reference) {\n $this->reference = $reference;\n }",
"function setReference( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Reference = $value;\n }",
"public function setReference($reference) {\n $this->reference = $reference;\n }",
"public function setList($list = array())\n {\n if (!is_array($list)) {\n $list = ArrayUtils::iteratorToArray($list);\n }\n\n $this->list = $list;\n }",
"function setReference($reference) {\n $this->checkChange();\n\n $this->reference = $reference;\n return $this;\n }",
"function SetBidList(&$list)\n\t{\n\t\t$this->_bidList = array();\n\t\t$existingBidList = $this->GetBidList();\n\t\tforeach ($existingBidList as $bid)\n\t\t{\n\t\t\t$bid->supplierId = '';\n\t\t\t$bid->Save(false);\n\t\t}\n\t\t$this->_bidList = $list;\n\t}",
"public function __construct()\n {\n $this->references = new ArrayCollection();\n }",
"public function setVarsByReference(array &$value)\n {\n $this->_contents =& $value;\n return $this;\n }",
"public static function setInstance(\\SwaggerValidator\\Common\\CollectionReference $instance)\n {\n self::$instance = $instance;\n self::$refIdList = array();\n }",
"public function setReferenceContext(ReferenceContext $context)\n {\n foreach ($this->_responses as $key => $response) {\n if ($response instanceof Reference) {\n $response->setContext($context);\n } else {\n $response->setReferenceContext($context);\n }\n }\n }",
"function setValueList($valueList) {\n if ($valueList !== ($oldValueList = $this->valueList)) {\n $this->valueList = $valueList;\n }\n }",
"public function setRefPoint(array $refPoint)\n {\n $this->refPoint = $refPoint;\n return $this;\n }",
"function __construct(&$reference) {\n $this->reference = &$reference;\n }",
"public function setReference($reference = true)\n {\n $this->reference = $reference;\n }",
"public function setDataAsRef(array &$data)\n {\n $this->data = &$data;\n }",
"public function setReference(string $reference):void\n {\n $this->reference = $reference;\n }",
"public function setReference (Reference $reference){\n $this->references->add($reference);\n }",
"public function getReferencesList(){\n return $this->_get(1);\n }",
"public function setReferenceTo(array $referenceTo)\n {\n $this->referenceTo = $referenceTo;\n return $this;\n }",
"public function setReferenceMap(array $referenceMap)\n {\n $this->_referenceMap = $referenceMap;\n\n return $this;\n }",
"public function SaveReference() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->txtName) $this->objReference->Name = $this->txtName->Text;\n\t\t\t\tif ($this->lstReferenceCategory) $this->objReference->ReferenceCategoryId = $this->lstReferenceCategory->SelectedValue;\n\t\t\t\tif ($this->txtModel) $this->objReference->Model = $this->txtModel->Text;\n\t\t\t\tif ($this->lstTissue) $this->objReference->TissueId = $this->lstTissue->SelectedValue;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the Reference object\n\t\t\t\t$this->objReference->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}",
"public function setReference($value)\n {\n return $this->set('Reference', $value);\n }",
"public function setList(array $list = null) {\n $this->list = $list;\n }",
"function SetWebsiteList(&$list)\n\t{\n\t\t$this->_websiteList = array();\n\t\t$existingWebsiteList = $this->GetWebsiteList();\n\t\tforeach ($existingWebsiteList as $website)\n\t\t{\n\t\t\t$website->supplierId = '';\n\t\t\t$website->Save(false);\n\t\t}\n\t\t$this->_websiteList = $list;\n\t}",
"public function setReference($reference)\n {\n $this->order->setReference($reference);\n }",
"public function setRefToSomething($refToSomething)\r\n {\r\n $this->refToSomething = $refToSomething;\r\n }",
"public function getReferenceSetsList(){\n return $this->_get(1);\n }",
"public function & setDataRef( & $a_data )\r\n\t{\r\n\t\tswitch(gettype($a_data))\r\n\t\t{\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'array':\r\n\t\t\t\t$this->fromArrayRef($a_data);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'object':\r\n\t\t\t\t$this->fromObjectRef($a_data);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn $this;\r\n\t}",
"public function setList($list)\n {\n if (is_string($list)) {\n htmlspecialchars($list);\n $this->_list = $list;\n }\n }",
"public function initMemberReferrals()\n\t{\n\t\t$this->collMemberReferrals = array();\n\t}",
"public function getReferenceIdsList(){\n return $this->_get(2);\n }",
"public function setReference($reference){\n $this->reference = $reference;\n return $this;\n }",
"public function addReferenceSets(\\google\\genomics\\v1\\ReferenceSet $value){\n return $this->_add(1, $value);\n }",
"public function setReferenceId(?string $referenceId): void\n {\n $this->referenceId['value'] = $referenceId;\n }",
"public function setObjectAliasesList(array $elementList): void\n {\n $this->elementList = $elementList;\n }",
"function setRef($name, &$value) {\n $this->vars[$name] =& $value; //is_object($value) ? $value->fetch() : $value;\n }",
"public function setIpReferenceData(?array $value): void {\n $this->getBackingStore()->set('ipReferenceData', $value);\n }",
"public function setCacheReferencedObjects($cacheReferencedObjects) {}",
"public function setVarsByReference(array &$vars)\n {\n $this->_vars =& $vars;\n return $this;\n }",
"public function & setDataRef( & $a_data )\n\t{\n\t\t$this->m_data->setDataRef($a_data);\n\t\treturn $this;\n\t}",
"public function addReferenceIds( $value){\n return $this->_add(2, $value);\n }",
"public function setRef1($ref1) {\n $this->_ref1 = $ref1;\n }",
"function SetWeddingList(&$list)\n\t{\n\t\t$this->_weddingList = array();\n\t\t$existingWeddingList = $this->GetWeddingList();\n\t\tforeach ($existingWeddingList as $wedding)\n\t\t{\n\t\t\t$wedding->supplierId = '';\n\t\t\t$wedding->Save(false);\n\t\t}\n\t\t$this->_weddingList = $list;\n\t}",
"function setLinks($links) \r\n {\r\n\r\n $this->activity_list->setLinks($links); \r\n \t\t \r\n// \t\t echo print_r($this->linkValues,true);\t \r\n \t parent::setLinks($links);\r\n \r\n }",
"public function unsetReferenceId(): void\n {\n $this->referenceId = [];\n }",
"public function setClasspathref(Reference $reference)\n\t{\n\t\t$this->createClasspath()->setRefid($reference);\n\t}",
"public function setDealReference(array $dealReference)\n {\n $this->dealReference = $dealReference;\n return $this;\n }",
"public function setData(array|Reference $data): static\n {\n if ($data instanceof Reference) {\n $this->data = &$data->get();\n } else {\n $this->data = $data;\n }\n\n return $this;\n }",
"public function setUserList(\n array $userList)\n {\n // First of all, let's instantly save their new value to our own\n // internal cache, since our cache supports User objects and doesn't\n // have to do any special transformations...\n $this->_userList = $userList;\n\n // Now sync our internal cache with the LazyJsonMapper object...! :-)\n $this->syncUserList(); // Throws.\n\n // Setters should always return \"$this\" to make them chainable!\n return $this;\n }",
"public function setReferenceNumber(array $referenceNumber)\n {\n $this->referenceNumber = $referenceNumber;\n return $this;\n }",
"public function Refresh($blnReload = false) {\n\t\t\tif ($blnReload)\n\t\t\t\t$this->objReference->Reload();\n\n\t\t\tif ($this->lblId) if ($this->blnEditMode) $this->lblId->Text = $this->objReference->Id;\n\n\t\t\tif ($this->txtName) $this->txtName->Text = $this->objReference->Name;\n\t\t\tif ($this->lblName) $this->lblName->Text = $this->objReference->Name;\n\n\t\t\tif ($this->lstReferenceCategory) {\n\t\t\t\t\t$this->lstReferenceCategory->RemoveAllItems();\n\t\t\t\tif (!$this->blnEditMode)\n\t\t\t\t\t$this->lstReferenceCategory->AddItem(QApplication::Translate('- Select One -'), null);\n\t\t\t\t$objReferenceCategoryArray = ReferenceCategory::LoadAll();\n\t\t\t\tif ($objReferenceCategoryArray) foreach ($objReferenceCategoryArray as $objReferenceCategory) {\n\t\t\t\t\t$objListItem = new QListItem($objReferenceCategory->__toString(), $objReferenceCategory->Id);\n\t\t\t\t\tif (($this->objReference->ReferenceCategory) && ($this->objReference->ReferenceCategory->Id == $objReferenceCategory->Id))\n\t\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t\t$this->lstReferenceCategory->AddItem($objListItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->lblReferenceCategoryId) $this->lblReferenceCategoryId->Text = ($this->objReference->ReferenceCategory) ? $this->objReference->ReferenceCategory->__toString() : null;\n\n\t\t\tif ($this->txtModel) $this->txtModel->Text = $this->objReference->Model;\n\t\t\tif ($this->lblModel) $this->lblModel->Text = $this->objReference->Model;\n\n\t\t\tif ($this->lstTissue) {\n\t\t\t\t\t$this->lstTissue->RemoveAllItems();\n\t\t\t\t$this->lstTissue->AddItem(QApplication::Translate('- Select One -'), null);\n\t\t\t\t$objTissueArray = Tissue::LoadAll();\n\t\t\t\tif ($objTissueArray) foreach ($objTissueArray as $objTissue) {\n\t\t\t\t\t$objListItem = new QListItem($objTissue->__toString(), $objTissue->Id);\n\t\t\t\t\tif (($this->objReference->Tissue) && ($this->objReference->Tissue->Id == $objTissue->Id))\n\t\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t\t$this->lstTissue->AddItem($objListItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->lblTissueId) $this->lblTissueId->Text = ($this->objReference->Tissue) ? $this->objReference->Tissue->__toString() : null;\n\n\t\t}",
"public function setArray(array $list);",
"public function setPieceReference(array $pieceReference)\n {\n $this->pieceReference = $pieceReference;\n return $this;\n }",
"function _makeReferences(&$z) {\n\t// It is a reference\n\tif (isset($z->ref)) {\n\t\t$key = key($z->data);\n\t\t// Copy the data to this object for easy retrieval later\n\t\t$this->ref[$z->ref] =& $z->data[$key];\n\t// It has a reference\n\t} elseif (isset($z->refKey)) {\n\t\tif (isset($this->ref[$z->refKey])) {\n\t\t$key = key($z->data);\n\t\t// Copy the data from this object to make the node a real reference\n\t\t$z->data[$key] =& $this->ref[$z->refKey];\n\t\t}\n\t}\n\treturn true;\n\t}",
"public function populateAsReference()\n {\n\n $orm = $this->db->getOrm();\n\n // Reference Container zum befüllen der Referenz Datensätze\n $refContainers = array();\n\n // Sicher stelle, das keine unerwarteten Daten in der Tabelle sind\n $orm->cleanResource('WbfsysRoleGroup');\n\n // Leeren des Caches\n $orm->clearCache();\n\n // global\n $orm->import\n (\n 'WbfsysRoleGroup',\n array\n (\n array\n (\n 'name' => 'name_1',\n 'access_key' => 'access_key_1',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisici elit,\nsed eiusmod tempor incidunt ut labore et dolore magna aliqua.\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut\naliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit\nesse cillum dolore eu fugiat nulla pariatur.\nExcepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt\nmollit anim id est laborum.'\n ),\n )\n );\n\n }",
"protected function addReference()\n {\n $this->add(array(\n 'name' => 'reference',\n 'required' => true,\n 'filters' => array(\n array('name' => 'Zend\\Filter\\HtmlEntities'),\n array('name' => 'Zend\\Filter\\StringTrim'),\n array('name' => 'Zend\\Filter\\StripTags'),\n ),\n ));\n \n return $this;\n }",
"public function setReference($reference)\r\n {\r\n $this->reference = $reference;\r\n\r\n return $this;\r\n }",
"public function setReferenceDependencies(array &$definitions) {\n if (empty($this->collectedReferences)) {\n return;\n }\n\n $collectedSubDependencies = [];\n\n foreach ($definitions as $definitionId => $definition) {\n if (!isset($this->collectedReferences[$definitionId])) {\n continue;\n }\n\n $references = $this->collectedReferences[$definitionId];\n\n foreach ($references as $element => $target) {\n $subDependencies = [];\n\n foreach ($target as $reference) {\n $subDefinition = $this->buildMigrationDefinition(\n [\n 'projectId' => $reference['base_data']['projectId'],\n 'templateId' => $reference['base_data']['templateId'],\n 'entityType' => $reference['base_data']['entityType'],\n 'contentType' => $reference['base_data']['contentType'],\n ],\n $reference['data'],\n 'entity_reference_revisions'\n );\n\n $subDependencies[$subDefinition['id']] = $subDefinition;\n\n $key = implode('_', [\n $reference['base_data']['projectId'],\n $reference['base_data']['templateId'],\n $reference['base_data']['entityType'],\n $reference['base_data']['contentType'],\n ]);\n $collectedSubDependencies[$key][$subDefinition['id']] = $subDefinition;\n }\n $this->setReferenceDependencies($subDependencies);\n\n $collected = [];\n\n foreach ($subDependencies as $subDefinitionId => $subDefinition) {\n $this->migrationDefinitionIds[] = $subDefinitionId;\n\n $definitions[$definitionId]['migration_dependencies']['optional'][] = $subDefinitionId;\n $definitions[$definitionId]['process']['collect_' . $subDefinitionId] = [\n 'plugin' => 'migration_lookup',\n 'migration' => $subDefinitionId,\n 'source' => 'id',\n ];\n\n $collected[] = '@collect_' . $subDefinitionId;\n }\n\n if (!empty($collected)) {\n $definitions[$definitionId]['process']['get_collected_' . $element] = [\n 'plugin' => 'get',\n 'source' => $collected,\n ];\n\n $definitions[$definitionId]['process'][$element] = [\n [\n 'plugin' => 'gather_content_reference_revision',\n 'source' => '@get_collected_' . $element,\n ],\n [\n 'plugin' => 'sub_process',\n 'process' => [\n 'target_id' => [\n 'plugin' => 'extract',\n 'source' => 'id',\n 'index' => [0],\n ],\n 'target_revision_id' => [\n 'plugin' => 'extract',\n 'source' => 'id',\n 'index' => [1],\n ],\n ],\n ],\n ];\n }\n }\n }\n\n foreach ($collectedSubDependencies as $dependencies) {\n $this->setLanguageDefinitions($dependencies);\n\n foreach ($dependencies as $subDefinitionId => $subDefinition) {\n $migration = Migration::create($subDefinition);\n $migration->save();\n }\n }\n }",
"public function addReferences(\\google\\genomics\\v1\\Reference $value){\n return $this->_add(1, $value);\n }",
"public function removeAllReferenceContacts()\n {\n $this->referenceContacts = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n return $this;\n }",
"function vistaportal_references_add($form, &$form_state) {\n $form_state['references_count']++;\n $form_state['rebuild'] = TRUE;\n }",
"public function setRef($ref)\n {\n $this->ref = $ref;\n\n return $this;\n }",
"protected function initializeCommonReferences() {}",
"public function & setRef( $a_key, & $a_value )\r\n\t{\r\n\t\treturn $this->_set($a_key, $a_value);\r\n\t}",
"public function setAttrList($attrList) {\n\t$this->attrList = $attrList;\n }",
"private function setNeedles(array $new_needles): void\n {\n self::$needles = [];\n if (empty($new_needles)) {\n return;\n }\n self::$needles = array_values($new_needles);\n }",
"public function setPropertyRef(array $propertyRef)\n {\n $this->propertyRef = $propertyRef;\n return $this;\n }",
"public function testSetReferenceNumberWhenDisabled()\n {\n $this->slipData->setWithReferenceNumber(false);\n $this->slipData->setReferenceNumber('');\n }",
"function SetCategoryList(&$categoryList)\n\t{\n\t\t$map = new CategorySupplierMap();\n\t\t$map->RemoveMapping($this);\n\t\t$this->_categoryList = $categoryList;\n\t}",
"function setGetList($getList) {\n if ($getList !== ($oldGetList = $this->getList)) {\n $this->getList = $getList;\n }\n }",
"public function setParametersByRef (&$parameters)\n {\n\n foreach ($parameters as $key => &$value)\n {\n\n $this->parameters[$key] =& $value;\n\n }\n\n }",
"public function usingReference($reference)\n {\n $this->reference = $reference;\n\n return $this;\n }",
"public function usingReference($reference)\n {\n $this->reference = $reference;\n\n return $this;\n }",
"public function setDocumentReference(array $documentReference)\n {\n $this->documentReference = $documentReference;\n return $this;\n }",
"public function setDataList($dataList) {\n\t\t$this->dataList = $dataList;\n\t}",
"public function getReferences();",
"public function setListTarget($listTarget);",
"protected function renderReferences() {}",
"public function setReferencedTweets(array $referencedTweets) : self\n {\n $this->initialized['referencedTweets'] = true;\n $this->referencedTweets = $referencedTweets;\n return $this;\n }",
"function save_references( $references, $postID ) {\n\tforeach($references as $i => $ref) {\n\t\tadd_post_meta($postID, 'reference-'.($i+1), $ref, true);\n\t}\n}",
"public function setCustomerReferences(?array $customerReferences): self\n {\n $this->initialized['customerReferences'] = true;\n $this->customerReferences = $customerReferences;\n\n return $this;\n }",
"public function setRefNumber($value)\n\t{\n\t\treturn $this->set('RefNumber', $value);\n\t}",
"public function set_questionReferences (array $questionReferences) {\n $this->questionReferences = $questionReferences;\n }",
"public function setLocationRef(array $locationRef)\n {\n $this->locationRef = $locationRef;\n return $this;\n }",
"public function setRefid($ref_id)\n {\n // Si c'en était déjà un, rien ne changera.\n // Sinon, la conversion donnera le nombre 0 (à quelques exceptions près, mais rien d'important ici).\n $ref_id = (int)$ref_id;\n\n // On vérifie ensuite si ce nombre est bien strictement positif.\n if ($ref_id > 0) {\n // Si c'est le cas, c'est tout bon, on assigne la valeur à l'attribut correspondant.\n $this->_ref_id = $ref_id;\n }\n }",
"public function setBillingReference(array $billingReference)\n {\n $this->billingReference = $billingReference;\n return $this;\n }",
"public function setBillingReference(array $billingReference)\n {\n $this->billingReference = $billingReference;\n return $this;\n }",
"public function testSetWithReferenceNumber()\n {\n // Test default values\n $this->assertEquals('', $this->slipData->getReferenceNumber());\n $this->assertTrue($this->slipData->getWithReferenceNumber());\n\n // Set data when enabled, also check for returned instance\n $returned = $this->slipData->setReferenceNumber('0123456789');\n $this->assertInstanceOf('SwissPaymentSlip\\SwissPaymentSlip\\OrangePaymentSlipData', $returned);\n $this->assertEquals('0123456789', $this->slipData->getReferenceNumber());\n\n // Disable feature, also check for returned instance\n $returned = $this->slipData->setWithReferenceNumber(false);\n $this->assertInstanceOf('SwissPaymentSlip\\SwissPaymentSlip\\OrangePaymentSlipData', $returned);\n $this->assertFalse($this->slipData->getWithReferenceNumber());\n\n // Re-enable feature, using no parameter\n $this->slipData->setWithReferenceNumber();\n $this->assertTrue($this->slipData->getWithReferenceNumber());\n $this->assertEquals('', $this->slipData->getReferenceNumber());\n }",
"protected function setListStart( $listStart ): void\n {\n $this->_listStart = $listStart;\n }",
"public function setMembers($list)\n {\n $this->members_objs = array();\n if (!isset($list)) {\n return;\n }\n foreach ($list as $user) {\n $this->members_objs[] = is_array($user) ? User::find($user['unique_id'], $user) : $user;\n }\n }",
"public function setCheckLists($val)\n {\n $this->_propDict[\"checkLists\"] = $val;\n return $this;\n }",
"public function testSetChildrenList()\n\t{\n\t\t$someChild1 = new child('somechild1 att');\n\t\t$someChild2 = new child('somechild2 att');\n\t\t$someChild3 = new child('somechild3 att');\n\t\t$someChild4 = new child('somechild4 att');\n\n\t\t$childList1 = array($someChild1, $someChild2);\n\t\t$childList2 = array($someChild3, $someChild4);\n\n\t\tforeach ($childList1 as $child)\n\t\t{\n\t\t\t$this->object->AddChild($child);\n\t\t}\n\n\t\t$this->assertEquals('somechild1 att', $this->object->childList[0]->attribute);\n\t\t$this->assertEquals('somechild2 att', $this->object->childList[1]->attribute);\n\t\t$this->assertEquals(2, sizeof($this->object->childList));\n\n\t\t$this->object->SetChildList($childList2);\n\t\t$this->object->Save();\n\n\t\t$currentChildList = $this->object->GetChildList();\n\n\t\t$this->assertEquals('somechild3 att', $currentChildList[0]->attribute);\n\t\t$this->assertEquals('somechild4 att', $currentChildList[1]->attribute);\n\n\t\t$this->assertEquals(2, sizeof($currentChildList));\n\t}",
"protected\tfunction\tsetRelations() {}",
"protected\tfunction\tsetRelations() {}",
"protected function setupBulkSetLinkDefaults()\n {\n $this->crud->allowAccess('bulkSetLink');\n\n $this->crud->operation('list', function () {\n $this->crud->enableBulkActions();\n $this->crud->addButton('top', 'bulkSetLink', 'view', 'crud::buttons.bulk_set_link');\n });\n }"
] | [
"0.7064151",
"0.648133",
"0.629079",
"0.6261805",
"0.6243607",
"0.6028462",
"0.60032797",
"0.59872985",
"0.5967157",
"0.59579647",
"0.5952996",
"0.5926461",
"0.58684665",
"0.58120185",
"0.5805464",
"0.578482",
"0.57765377",
"0.575696",
"0.5725198",
"0.5710388",
"0.5681185",
"0.5669347",
"0.5653187",
"0.5607975",
"0.5582309",
"0.55787206",
"0.5554696",
"0.5543481",
"0.55192864",
"0.5514873",
"0.5513345",
"0.55050546",
"0.54758143",
"0.5475357",
"0.547011",
"0.54650974",
"0.5450538",
"0.5450128",
"0.543897",
"0.5437898",
"0.5436184",
"0.5416601",
"0.54107463",
"0.54060847",
"0.5401369",
"0.5393097",
"0.53710616",
"0.5370928",
"0.5346055",
"0.53383356",
"0.53222996",
"0.5304561",
"0.52941716",
"0.52898234",
"0.52809846",
"0.52778107",
"0.5266493",
"0.52648056",
"0.52596784",
"0.52468044",
"0.52242506",
"0.5209247",
"0.5205586",
"0.5196736",
"0.5177325",
"0.51649827",
"0.51541203",
"0.5151121",
"0.51406574",
"0.5133911",
"0.51154166",
"0.5103265",
"0.50820243",
"0.50797576",
"0.5078458",
"0.5077265",
"0.50660235",
"0.50660235",
"0.5064691",
"0.5041663",
"0.5036901",
"0.5022822",
"0.50174904",
"0.5015918",
"0.5009014",
"0.5003822",
"0.4993296",
"0.49898043",
"0.49879354",
"0.49844435",
"0.49688578",
"0.49688578",
"0.4968291",
"0.4963483",
"0.49596474",
"0.49541593",
"0.49493286",
"0.49426848",
"0.49426848",
"0.49331933"
] | 0.6235894 | 5 |
Sets a new carriedKeyName | public function setCarriedKeyName($carriedKeyName)
{
$this->carriedKeyName = $carriedKeyName;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setKeyName($key);",
"public function setKeyName($name) {\n\t\t$this->_keyName = $name;\n\t\treturn $this;\n\t}",
"function setKey($value) {\r\n $this->key = $value;\r\n }",
"public function setKeyName($key)\n {\n $this->primaryKey = $key;\n }",
"public function setKey($keyname,$keyvalue) {\n\t\t$this->keysDB[$keyname] = $keyvalue;\n\t}",
"protected function _setNameValue($key, $name) {}",
"function SetKey( $i ) { $this->_key = $i; $this->SetValue('_key', $i ); }",
"public function setKey(string $key);",
"public function setKey( $key )\r\n {\r\n $this->key = $key;\r\n }",
"public function setKey(string $key) : void {\n\t\t$this->key = $key;\n\t}",
"protected function setTransactionKey()\n {\n $payment = $this->order->getPayment();\n $originalKey = AbstractMethod::BUCKAROO_ORIGINAL_TRANSACTION_KEY_KEY;\n $transactionKey = $this->getTransactionKey();\n\n if (!$payment->getAdditionalInformation($originalKey) && strlen($transactionKey) > 0) {\n $payment->setAdditionalInformation($originalKey, $transactionKey);\n }\n }",
"protected function setKey($key, $value)\n {\n $key = strtolower((string) $key);\n $this->keys[$key] = (string) $value;\n }",
"public function setKeyFilename($filename)\n\t{\n\t\t$this->keyFilename = $filename;\n\t}",
"public function setKey($key);",
"public function setKey(?string $key): void\n {\n $this->key = $key;\n }",
"public function setKey($key)\n\t{\n\t\t$this->key = $key;\n\t}",
"public function setKey($key)\n\t{\n\t\t$this->key = $key;\n\t}",
"public function setKey($key)\n\t{\n\t\t$this->key = $key;\n\t}",
"public function setKey(?string $key): void\n {\n }",
"function setKey($key)\r\n {\r\n $this->key = $key;\r\n $this->changed = true;\r\n }",
"public function setKey($key)\n {\n $this->_key = $key;\n }",
"public function setKey($key)\n {\n $this->key = $key;\n }",
"public function setKey($key)\n {\n $this->key = $key;\n }",
"public function setKey($key)\n {\n $this->key = $key;\n }",
"protected abstract function getKeyName();",
"public function set_key($value) {\n\t\treturn $this->set_attribute(static::$key, $value);\n\t}",
"public function setAttribyteKey($value)\n {\n $this->_attribyteKey = $this->_db->prepareString($value);\n }",
"public function SetKey($key = ''){\n \tself::$userKey = $key;\n }",
"function setKey($clave){\n $this->key = $clave;\n }",
"public function setKey($Key)\n {\n $this->__set(\"key\", $Key);\n }",
"function set_key($key)\n\t{\n\t\tif(empty($key) || !isset($GLOBALS['ACCESS_KEYS'][$key])) return;\n\t\tif(ACCESS_MODEL === \"roles\") {\n\t\t\tforeach($GLOBALS['ACCESS_KEYS'][$key] as $k) {\n\t\t\t\tif(substr($k, 0, 1) == '@') {\n\t\t\t\t\t// This key references another role - pull in all keys from that role\n\t\t\t\t\t$this->set_key(substr($k, 1));\n\t\t\t\t} else {\n\t\t\t\t\t$this->access_keys[] = $k;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if(ACCESS_MODEL === \"discrete\") {\n\t\t\t$this->access_keys[] = $key;\n\t\t}\n\n\t\t$_SESSION['_ACCESS']['keys'] = $this->access_keys;\n\t}",
"public function setKey($key)\n {\n $this->_key = $key;\n return $this;\n }",
"public function setAppKeyName($value)\n {\n return $this->set('AppKeyName', $value);\n }",
"public function setAppKeyName($value)\n {\n return $this->set('AppKeyName', $value);\n }",
"public static function setKey($key){\n\t\tself::$_key = $key;\n\t}",
"public function useKey(string $key)\n {\n $this->key = $key;\n }",
"public function setKeyField($keyField) {\n\t\t$this->keyField = $keyField;\n\t}",
"public function setAttribute ($key, $value) {\n return parent::setAttribute(camel_case($key), $value);\n }",
"public function setKeyFromData()\n\t{\n\t\t$key = isset($this->data[$this->primaryKey])\n\t\t\t? $this->data[$this->primaryKey]\n\t\t\t: null;\n\n\t\tif ($key !== null && !is_numeric($key)) {\n\t\t\t$key = Hash::decode($key);\n\t\t}\n\n\t\t$this->key = $key;\n\t}",
"public function set_key ( $key = '' )\n {\n if ( ! empty( $key ) )\n {\n if ( is_array( $key ) )\n {\n $this->key = $key;\n } else {\n // String has special delimiter\n if ( strpos( $key, ':' ) > -1 )\n {\n $this->key = explode( ':', $key );\n }\n else\n {\n $this->key = [ $key ];\n }\n }\n\n // Default to the entity's name\n } else {\n $this->key = [ $this->name ];\n }\n\n return $this->get_key();\n }",
"public function setKey ( $name, $val = null )\n\t{\n\t\t$this->extra[$name] = $val;\n\t}",
"public function copyAttributesToKey()\n\t{\n\t\t$primarykey = $this->factory->getPrimarykey ;\n\t\tforeach( $primarykey->fields as $n=>$field )\n\t\t{\n\t\t\t$this->key[$field] = $this->$field ;\n\t\t}\n\t}",
"protected function setKey()\n {\n $paymentGateway = \\App\\Models\\PaymentGateway::where('name', 'paystack')->first();\n $this->secretKey = $paymentGateway['information']['private_key'];\n $this->publicKey = $paymentGateway['information']['public_key'];\n }",
"public function actionSetKeys()\n {\n $this->setKeys($this->generateKeysPaths);\n }",
"function setKey( $key ) \n {\n $this->setValueByFieldName( 'label_key', $key );\n }",
"public function setKey($value)\n {\n return $this->set('Key', $value);\n }",
"public function setKey($value)\n {\n return $this->set('Key', $value);\n }",
"public function setKey($value)\n {\n return $this->set('Key', $value);\n }",
"public function setKey($value)\n {\n return $this->set('Key', $value);\n }",
"public function setKey($value)\n {\n return $this->set('Key', $value);\n }",
"public function setKey($value)\n {\n return $this->set('Key', $value);\n }",
"public function setKey($value)\n {\n return $this->set('Key', $value);\n }",
"public function setKey(\\SetaPDF_Core_Type_Name $key) {}",
"abstract public function setPolicyKey($devId, $key);",
"public function setCacheKey(string $key): void;",
"protected function _overrideKey($key, $original) {\n $this->_override[$original] = $key;\n }",
"public function setKey($key = '')\n {\n $this->encryptionKey = $key;\n }",
"public function setCacheKey($key, $cleanName = true)\n {\n if ($cleanName) {\n $key = preg_replace('/[^\\da-z]/i', '', $key);\n }\n\n if (!empty($key)) {\n $this->cacheKey = $key;\n }\n }",
"public function setAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }",
"public function setKey($key)\n {\n return $this->set('key', $key);\n }",
"public function setForeignKeyName($foreignKey) {\n $this->foreignKeyName = $foreignKey;\n }",
"function set_key($keys,$key_name='')\r\n {\r\n if( isset($keys[$key_name]) and !empty($keys[$key_name]))\r\n {\r\n return $keys[$key_name];\r\n }\r\n else\r\n {\r\n return '';\r\n }\r\n }",
"public function setControllerKey($newKey)\n {\n // retrieve the current key and controller\n $oldKey = $this->controllerKey;\n $oldVal = $this->__get($oldKey);\n \n // set the new key\n $this->controllerKey = $newKey;\n \n // auto-set the new controller parameter to the old value\n return $this->__set($newKey, $oldVal);\n }",
"public function getQualifiedKeyName();",
"public function setKey($value = NULL)\n\t{\n\t\tif (NULL !== $value) {\n\t\t $this->key = $value;\n\t\t}\n\t\treturn $this;\n\t}",
"function __construct($key, $keyName, $keyType=null, $key2 = null, $key2Name = null, $key2Type = null) {\n $this->key = JWKFactory::createFromKey($key, null, array('kid' => $keyName));\n $this->keyName = $keyName;\n $this->keys = new JWKSet();\n $this->keys = $this->keys->addKey($this->key);\n if ($key2) {\n $this->key2 = JWKFactory::createFromKey($key2, null, array('kid' => $key2Name));\n $this->key2Name = $key2Name;\n $this->keys = $this->keys->addKey($this->key2);\n }\n }",
"public function _setupKey() {\n\t\tif ( ! isset( $this->key ) ) {\n\t\t\t$this->setKey( '' );\n\t\t}\n\n\t\t// Key has already been expanded in Crypt_RC2::setKey():\n\t\t// Only the first value must be altered.\n\t\t$l = unpack( 'Ca/Cb/v*', $this->key );\n\t\tarray_unshift( $l, $this->pitable[ $l['a'] ] | ( $l['b'] << 8 ) );\n\t\tunset( $l['a'] );\n\t\tunset( $l['b'] );\n\t\t$this->keys = $l;\n\t}",
"public function setProductKey($val)\n {\n $this->_propDict[\"productKey\"] = $val;\n return $this;\n }",
"public function setProductKey($val)\n {\n $this->_propDict[\"productKey\"] = $val;\n return $this;\n }",
"public function setAttributeName(?string $value): void {\n $this->getBackingStore()->set('attributeName', $value);\n }",
"public function testUpdateKey()\n {\n }",
"public function setKeyCredentials($val)\n {\n $this->_propDict[\"keyCredentials\"] = $val;\n return $this;\n }",
"public function setAttribute($key, $value)\n {\n if (!$key == $this->getRememberTokenName()) {\n parent::setAttribute($key, $value);\n }\n }",
"public function setKey($var)\n {\n GPBUtil::checkString($var, True);\n $this->key = $var;\n\n return $this;\n }",
"public function setKey($var)\n {\n GPBUtil::checkString($var, True);\n $this->key = $var;\n\n return $this;\n }",
"public function setKey($var)\n {\n GPBUtil::checkString($var, True);\n $this->key = $var;\n\n return $this;\n }",
"public function setKey($var)\n {\n GPBUtil::checkString($var, True);\n $this->key = $var;\n\n return $this;\n }",
"public function set_key_names($keys) {\n\t\t$this->keys = $keys;\n\t}",
"function setEntryKey($entryKey) {\n\t\t$this->setData('entryKey', $entryKey);\n\t}",
"public function setKey($key)\n {\n $this->key = $key;\n return $this;\n }",
"public function setKey($var)\n {\n GPBUtil::checkString($var, False);\n $this->key = $var;\n\n return $this;\n }",
"public function setKey($var)\n {\n GPBUtil::checkString($var, False);\n $this->key = $var;\n\n return $this;\n }",
"public function setKey($var)\n {\n GPBUtil::checkString($var, False);\n $this->key = $var;\n\n return $this;\n }",
"public function addKey(string $key): void\n {\n if (!in_array($key, $this->keys, true)) {\n $this->keys[] = strtolower($key);\n }\n }",
"function setFilename($key);",
"public function getKeyName();",
"public function getKeyName();",
"public function getKeyName();",
"public function setKey($key)\n {\n return $this->key = $key;\n }",
"public function createNewKeyPair() {}",
"public function createNewKeyPair() {}",
"public function setKey($key = null) {\n\t\t$this->_key = $key;\n\t\treturn $this;\n\t}",
"abstract public function setAttribute($key, $value);",
"function setPrimaryKey($pkey_name){\n\n\t\t$this->pkey = $pkey_name;\n\n\t}",
"public function getKeyName()\n {\n return $this->keyName ?: 'id';\n }",
"public function getKeyName()\n {\n return $this->keyName ?: 'id';\n }",
"public function setAttribute($key, $value)\n {\n $check = $key == $this->getRememberTokenName();\n if (!$check) {\n parent::setAttribute($key, $value);\n }\n }",
"public function setNewSyncKey($newKey)\n {\n $this->_syncKey = $newKey;\n }",
"public function setDataKey($name)\n\t{\n\t\treturn $this->setKey('data', $name);\n\t}",
"function setFormKey($key);"
] | [
"0.734831",
"0.6852308",
"0.6691921",
"0.65402114",
"0.634829",
"0.6282515",
"0.6165894",
"0.61354953",
"0.61004263",
"0.60868824",
"0.6062092",
"0.6053365",
"0.60199213",
"0.60146976",
"0.5984959",
"0.5979147",
"0.5979147",
"0.5979147",
"0.59743774",
"0.59668815",
"0.5965148",
"0.5964044",
"0.5964044",
"0.5964044",
"0.5940426",
"0.59124047",
"0.5903881",
"0.58777094",
"0.5835915",
"0.5805704",
"0.577877",
"0.5764509",
"0.5761726",
"0.5761726",
"0.5754382",
"0.57423556",
"0.5738986",
"0.5679994",
"0.5675847",
"0.56740415",
"0.5664783",
"0.5632131",
"0.5630997",
"0.56184125",
"0.5609923",
"0.5602456",
"0.5602456",
"0.5600792",
"0.5600792",
"0.5600792",
"0.5600792",
"0.5600792",
"0.5556239",
"0.5555126",
"0.55501366",
"0.5546345",
"0.55409896",
"0.5534499",
"0.5530957",
"0.5524753",
"0.5510017",
"0.54901326",
"0.5481084",
"0.54658234",
"0.5458059",
"0.54532665",
"0.5447974",
"0.5427979",
"0.5427979",
"0.54241705",
"0.53933746",
"0.5382921",
"0.53763103",
"0.5373046",
"0.5373046",
"0.5373046",
"0.5373046",
"0.5357037",
"0.5352574",
"0.53525716",
"0.53453106",
"0.53453106",
"0.53453106",
"0.53444",
"0.5332069",
"0.53302985",
"0.53302985",
"0.53302985",
"0.53193265",
"0.53049505",
"0.53039086",
"0.5277138",
"0.5267758",
"0.52639997",
"0.52474314",
"0.52474314",
"0.5241081",
"0.5234847",
"0.52324337",
"0.52313524"
] | 0.6291089 | 5 |
Formats data into a single line to be written by the writer. | public function format($event)
{
$data = [];
$extra = [];
foreach ($event as $key => $val) {
if (isset($this->columns[$key])) {
$data[$this->columns[$key]] = $val;
} elseif ($key !== 'priority' && $key !== 'priorityName') {
$extra[$key] = $val;
}
}
if (!empty($event['extra'])) {
$data['extra'] = array_merge($event['extra'], $extra);
}
if (isset($data['extra'])) {
$data['extra'] = json_encode($data['extra']);
}
return $data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function WriteLine($data=null) \r\n{ \r\nreturn $this->Write($data . $this->NewLine); \r\n}",
"public function flush() {\n if (empty($this->_row) or empty($this->_row['line']['normal'])) {\n // Nothing to print - each line has to have at least number\n $this->_row = array();\n foreach ($this->columns as $col) {\n $this->_row[$col] = array('normal'=>'', 'info'=>'', 'warning'=>'', 'error'=>'');\n }\n return;\n }\n $ci = 0;\n $ri = 1;\n echo '<tr class=\"r'.$ri.'\">';\n foreach ($this->_row as $key=>$field) {\n foreach ($field as $type=>$content) {\n if ($field[$type] !== '') {\n $field[$type] = '<span class=\"uu'.$type.'\">'.$field[$type].'</span>';\n } else {\n unset($field[$type]);\n }\n }\n echo '<td class=\"cell c'.$ci++.'\">';\n if (!empty($field)) {\n echo implode('<br />', $field);\n } else {\n echo ' ';\n }\n echo '</td>';\n }\n echo '</tr>';\n foreach ($this->columns as $col) {\n $this->_row[$col] = array('normal'=>'', 'info'=>'', 'warning'=>'', 'error'=>'');\n }\n }",
"private function terminateLine()\n {\n if ($this->isInline) {\n $this->isInline = false;\n $this->writeToFile('<br>');\n }\n }",
"public function writeLine($data)\n\t{\n\t\tif (!is_resource($this->fp)) {\n\t\t\treturn $this->raiseError('not connected');\n\t\t}\n\n\t\treturn fwrite($this->fp, $data . \"\\r\\n\");\n\t}",
"public function format($data);",
"public function format($data);",
"public function newLineWritten();",
"public function writeRecord($data) {\n if ($this->_hasHeader() && !$this->headerWritten)\n $this->_writeHeader();\n \n $cols= array_keys ($data);\n \n if ($this->_hasHeader())\n $cols= array_keys ($this->colName);\n \n foreach ($cols as $idx => $colName) {\n if (isset ($data[$colName]))\n $this->_writeColumn ($data[$colName]);\n else\n $this->_writeColumn('');\n }\n \n // Insert Newline\n $this->stream->write($this->lineDelim);\n $this->delimWritten= TRUE;\n }",
"protected function morphData()\n {\n $this->setLastLine($this->current());\n\n $this->eventDispatcher->dispatch(WriterEvents::BEFORE_WRITE, new IterationEvent($this));\n\n return $this->getLastLine();\n }",
"function formatRow(){\n $this->hook('formatRow');\n }",
"public function writeLine($line);",
"private static function line_arrangement($data)\n {\n if ( ! empty($data))\n {\n ob_start();\n\n foreach ($data as $item)\n {\n $item_indexed = array_values($item);\n $item_indexed_size = count($item_indexed);\n $value = '';\n\n for ($i=0; $i<$item_indexed_size; $i++)\n {\n $value .= $item_indexed[$i] . ';';\n }\n\n echo $value . \"\\r\\n\";\n }\n }\n\n return FALSE;\n }",
"protected function new_line()\n {\n }",
"private function generateSingleRow(& $data)\n {\n $id=$data['id'];\n\t\t$format=$data['format'];\n\t\tforeach($data['data'] as $key=>$value)\n\t\t{\n\t\t\t$search=\"{\".$id.\":\".$key.\"}\";\n\t\t\t$this->_search[]=$search;\n\n\t\t\t//if it needs formating\n\t\t\tif(isset($format[$key]))\n\t\t\t{\n\t\t\t\tforeach($format[$key] as $ftype=>$f)\n\t\t\t\t{\n\t\t\t\t\t$value=$this->formatValue($value,$ftype,$f);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->_replace[]=$value;\n\t\t}\n }",
"function linebreak() {\n $this->doc .= '<br/>'.DOKU_LF;\n }",
"public function newLine()\n {\n\n $stock = $this->getStock();\n $randomIndexStock = mt_rand(0, (count($stock)-1));\n $this->line = array_values(array_slice($stock, $randomIndexStock, 1, true));\n unset($stock[$randomIndexStock]);\n $this->stock = array_values($stock);\n }",
"public function writeln($data)\n {\n return $this->write($data)->eol();\n }",
"protected function format($data, $file_handle)\n {\n $header = false;\n foreach ($data as $idx => $row)\n {\n $row = WF::cast_array($row);\n $this->validateRow($row);\n\n if ($this->write_bom && ftell($file_handle) === 0)\n fwrite($file_handle, Encoding::getBOM('UTF8'));\n\n if (!$header && $this->write_header)\n {\n $keys = array_keys($row);\n fputcsv($file_handle, $keys, $this->delimiter, $this->enclosure, $this->escape_char);\n $header = true;\n }\n fputcsv($file_handle, $row, $this->delimiter, $this->enclosure, $this->escape_char);\n }\n }",
"public function newLine() {\n\t\t$this->_section=0;\n\t\t$this->_lineNumber++;\n\t\t$this->_text[$this->_lineNumber]=array();\n\t\t$this->_text[$this->_lineNumber][0]['text']='';\n\t\t$this->_text[$this->_lineNumber][0]['encoding']='';\n\t\t$this->_text[$this->_lineNumber][0]['font']=$this->_font;\n\t\t$this->_text[$this->_lineNumber][0]['fontSize']=$this->_fontSize;\n\t\t$this->_text[$this->_lineNumber][0]['width']=0;\n\n\t\t\n\t\t$this->_initializeLine();\n\t\t\n\t\t$this->_text[$this->_lineNumber]['alignment']=$this->_text[$this->_lineNumber-1]['alignment'];\n\t\t//add the last cell's height to the auto height if we have an auto-height box.\n\t\tif ($this->isAutoHeight()) {\n\t\t\t$this->_autoHeight+=$this->_text[$this->_lineNumber-1]['height'];\n\t\t}\n\t}",
"public function write($data)\n {\n return $this->indent()->raw($data);\n }",
"protected function formatData(OutputInterface $output, $format, RowsOfFields $data, FormatterOptions $options) {\n $formatterManager = new FormatterManager();\n $formatterManager->write($output, $format, $data, $options);\n }",
"public function writeRow($row, $data, $column_start = 0, $format = null) {\n\t}",
"private function add_new_line() {\n\n\t\t$this->fields[] = array( 'newline' => true );\n\n\t}",
"public function putLine(array $data): void\n {\n $ok = fputcsv($this->handle, $data, $this->delimiter, $this->enclosure, $this->escapeChar);\n if ($ok === false) {\n throw new Exception('Cannot write to CSV file');\n }\n }",
"public function OutputToReport($line=1,$size=5.5){\n //$this->w = 225;\n $this->SetX(($this->w - $this->_tWidth)/2);\n $this->_fill = !$this->_fill;\n $this->SetDrawColor(160,160,160);\n $this->SetTextColor(100);\n $this->SetFillColor(245);\n $this->SetFont('arial','',$size);\n foreach(array_keys($this->_fields) as $field){\n $align = $this->_fields[$field][\"align\"];\n $fill = $this->_fill;\n if(count($this->_row) > 0){\n if(isset($this->_fields[$field][\"numberFormat\"]) && $this->_row[$field] != ''){\n $this->Cell($this->_fields[$field][\"size\"],5,number_format($this->_row[$field],2,',','.'),$line,0,$align,$fill);\n }else{\n $this->Cell($this->_fields[$field][\"size\"],5,$this->_row[$field],$line,0,$align,$fill);\n }\n }\n }\n $this->Ln();\n }",
"private function write_single($data){\r\n if($this->$data[0] !== NULL){\r\n //add row of data to transaction object\r\n $this->$data[0]->add_list($data);\r\n }else{\r\n $this->$data[0] = new transaction_object($data[0]);\r\n $this->$data[0]->add_header($this->default_headers[$data[0]]);\r\n $this->$data[0]->add_list($data);\r\n }\r\n }",
"public function appendNewLine($data) {\r\n\t\tif ($this->exists) {\r\n\t\t\t\r\n\t\t\t$handle = fopen ( $this->filename, \"a\" ) or die ( $this->error [\"103\"] );\r\n\t\t\tfwrite ( $handle, \"\\n\" . $data );\r\n\t\t\tfclose ( $handle );\r\n\t\t\treturn true;\r\n\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"function Row($data)\n {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 3.8 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'C';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 3.8, $data[$i], 0, $a);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }",
"function Row($data)\n {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 3.8 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'C';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 3.8, $data[$i], 0, $a);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }",
"abstract function format();",
"public function writeLine($text);",
"public function printLine($data = null): void\n {\n if (!is_array($data)) {\n throw new RuntimeException(\"can not write CSV data. supplied data is not an array.\");\n }\n fputcsv($this->handle, $data, $this->delimiter, $this->enclosure, $this->escape);\n ++$this->lineNumber;\n }",
"function Row($data) {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 5 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 5, $data[$i], 0, $a);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }",
"function Row($data) {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 5 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 5, $data[$i], 0, $a);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }",
"public function Row($data)\n {\n $nb=0;\n $this->SetDrawColor(35, 32, 32);\n\n for($i=0;$i<count($data);$i++){\n\n if ($i == 0)\n $this->SetFont('Arial','B',11);\n else\n $this->SetFont('Arial','',11);\n\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\n }\n\n $h=7*$nb;\n\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++){\n\n if ($i == 0)\n $this->SetFont('Arial','B',11);\n else\n $this->SetFont('Arial','',11);\n\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n\n //Print the text\n $this->MultiCell($w,7,$data[$i],0,$a);\n\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n\n }\n\n //Go to the next line\n $this->Ln($h);\n\n }",
"function lineFeed(&$fp) {\n\n fwrite($fp, chr(10));\n }",
"private function setNewLine() {\n $extension = pathinfo($this->path, PATHINFO_EXTENSION);\n if ($extension === Lexer::LINUX_FILE_EXTENSION) {\n $this->newLine = \"\\n\";\n } else {\n $this->newLine = \"\\r\\n\";\n }\n }",
"public function writeLine($message);",
"function Row($data){\n\t\t\t$nb=0;\n\t\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t\t$h=5*$nb;\n\t\t\t//Issue a page break first if needed\n\t\t\t$this->CheckPageBreak($h);\n\t\t\t//Draw the cells of the row\n\t\t\tfor($i=0;$i<count($data);$i++){\n\t\t\t\t$w=$this->widths[$i];\n\t\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t\t\t//Save the current position\n\t\t\t\t$x=$this->GetX();\n\t\t\t\t$y=$this->GetY();\n\t\t\t\t//Draw the border\n\t\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t\t//Print the text\n\t\t\t\tif(!is_numeric($data[$i])){\n\t\t\t\t\t$this->MultiCell($w,5,$data[$i],0,$a);\n\t\t\t\t}else{\n\t\t\t\t\t$this->MultiCell($w,5, \"$\".number_format($data[$i],2,\".\",\",\"),0,'R');\n\t\t\t\t}\n\t\t\t\t//Put the position to the right of the cell\n\t\t\t\t$this->SetXY($x+$w,$y);\n\t\t\t}\n\t\t\t//Go to the next line\n\t\t\t$this->Ln($h);\n\t\t}",
"protected function writeLine($line) {\n\t\t$this->fputs($line . \"\\r\\n\");\n\t}",
"public function write($row, $column, $data, $format = null, $data_type = -1) {\n\t}",
"public static function formatting_process() {}",
"protected function formatLine($row)\n {\n // TODO: _buildGrid should be refactored so we don't have to call arrayPluck here\n $s = implode(',', array_map(array($this, 'formatCell'), $this->arrayPluck($row)));\n return $s;\n }",
"function Row($data)\n\t{\n\t $nb=0;\n\t for($i=0;$i<count($data);$i++)\n\t $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t $h=5.5*$nb;\n\t //Issue a page break first if needed\n\t $this->CheckPageBreak($h);\n\t //Draw the cells of the row\n\t for($i=0;$i<count($data);$i++)\n\t {\n\t $w=$this->widths[$i];\n\t if ($i == 4 || $i == 5){\n\t \t$a = 'R';\n\t } elseif ($i == 0) {\n\t \t$a='L';\n\t } else {\n\t\t $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C';\n\t\t}\n\t //Save the current position\n\t $x=$this->GetX();\n\t $y=$this->GetY();\n\t //Draw the border\n\t $this->Rect($x,$y,$w,$h);\n\t //Print the text\n\t $this->MultiCell($w,5.5,\"$data[$i]\",0,$a);\n\t //Put the position to the right of the cell\n\t $this->SetXY($x+$w,$y);\n\t }\n\t //Go to the next line\n\t $this->Ln($h);\n\t}",
"public function write_record($record, $rownum) {\n if ($this->sheetdatadded) {\n echo \",\";\n }\n\n echo json_encode($record, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);\n\n $this->sheetdatadded = true;\n }",
"public function format() {\r\n\t\t$this->resource->format();\r\n\t}",
"public function lineThrough()\n {\n $this->label.= '9;';\n return $this;\n }",
"function handleData($data) {\n return sprintf(\"data %d\\n%s\\n\", strlen($data), $data);\n }",
"function Row($data)\n\t{\n\t\t$nb=0;\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t$h=15*$nb;\n\t\t\n\t\t//Issue a page break first if needed\n\t\t$this->CheckPageBreak($h);\n\n\t\t//Draw the cells of the row\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t{\n\t\t\t$w=$this->widths[$i];\n\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t\t//Save the current position\n\t\t\t$x=$this->GetX();\n\t\t\t$y=$this->GetY();\n\t\t\t//Draw the border\n\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t//Print the text\n\t\t\t$this->MultiCell($w,15,$data[$i],0,$a);\n\t\t\t//Put the position to the right of the cell\n\t\t\t$this->SetXY($x+$w,$y);\n\t\t}\n\t\t//Go to the next line\n\t\t$this->Ln($h);\n\t}",
"function Row($data)\n\t{\n\t $nb=0;\n\t for($i=0;$i<count($data);$i++)\n\t $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t $h=5*$nb;\n\t //Issue a page break first if needed\n\t $this->CheckPageBreak($h);\n\t //Draw the cells of the row\n\t for($i=0;$i<count($data);$i++)\n\t {\n\t $w=$this->widths[$i];\n\t $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'J';\n\t //Save the current position\n\t $x=$this->GetX();\n\t $y=$this->GetY();\n\t //Draw the border\n\t $this->Rect($x,$y,$w,$h);\n\t //Print the text\n\t $this->MultiCell($w,5,$data[$i],0,$a);\n\t //Put the position to the right of the cell\n\t $this->SetXY($x+$w,$y);\n\t }\n\t //Go to the next line\n\t $this->Ln($h);\n\t}",
"private function calculate_lines_mixed_singles_only(){\n\n\t\t$this->total_lines = min($this->female_count, $this->male_count);\n\t\t$extra_women = $this->female_count - $this->total_lines;\n\t\t$extra_men = $this->male_count - $this->total_lines;\n\t\t$this->per_team_lines = array(array(\n\t\t\t'total_teams' => 1,\n\t\t\t'women_lines' => '-',\n\t\t\t'men_lines' => '-',\n\t\t\t'additional_women' => $extra_women,\n\t\t\t'additional_men' => $extra_men,\n\t\t\t'comb_lines' => '-',\n\t\t\t'total_lines' => $this->total_lines,\n\t\t\t'additional_players' => $extra_women + $extra_men,\n\t\t\t'mixed_singles' => $this->total_lines,\n\t\t\t'mixed_doubles' => 0\n\t ), array(\n\t \t'total_teams' => 2\n\t\t), array(\n\t \t'total_teams' => 4\n\t\t), array(\n\t \t'total_teams' => 6\n\t\t), array(\n\t \t'total_teams' => 8\n\t\t), array(\n\t \t'total_teams' => 9\n\t\t), array(\n\t \t'total_teams' => 16\n\t\t), array(\n\t \t'total_teams' => 25\n\t\t));\n\n\t}",
"public function flush()\n {\n $this->line($this->buffer);\n $this->buffer = \"\";\n }",
"protected function _writeHeader() {\n $this->stream->write(\n implode ($this->colDelim, array_values ($this->colName))\n );\n // Insert Newline\n $this->stream->write($this->lineDelim);\n $this->headerWritten= TRUE;\n }",
"public function format(array $record)\n {\n return $record['level_name'] . ': ' . $record['message'] . PHP_EOL;\n }",
"function Row($data){\n\t $nb=0;\n\t for($i=0;$i<count($data);$i++)\n\t $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t $h=5*$nb;\n\t //Issue a page break first if needed\n\t $this->CheckPageBreak($h);\n\t //Draw the cells of the row\n\t for($i=0;$i<count($data);$i++){\n\t $w=$this->widths[$i];\n\t $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n \t//Save the current position\n\t $x=$this->GetX();\n\t $y=$this->GetY();\n \t//Draw the border\n\t $this->Rect($x,$y,$w,$h);\n \t//Print the text\n\t $this->MultiCell($w,5,$data[$i],0,$a);\n\t //Put the position to the right of the cell\n\t $this->SetXY($x+$w,$y);\n\t }\n\n\t //Go to the next line\n\t $this->Ln($h);\n\t}",
"function Row($data)\n\t{\n\t\t$nb=0;\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t$h=6*$nb;\n\t\t//Issue a page break first if needed\n\t\t$this->CheckPageBreak($h);\n\t\t//Draw the cells of the row\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t{\n\t\t\t$w=$this->widths[$i];\n\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t\t//Save the current position\n\t\t\t$x=$this->GetX();\n\t\t\t$y=$this->GetY();\n\n\t\t\t//Berder semua\n\t\t\t//Draw the border\n\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t//Print the text\n\t\t\t$this->MultiCell($w,6,$data[$i],0,$a);\n\t\t\t//Put the position to the right of the cell enaena\n\t\t\t$this->SetXY($x+$w,$y);\n\t\t}\n\t\t//Go to the next line\n\t\t$this->Ln($h);\n\t}",
"function Row($data) {\n\t\t\t$nb=0;\n\t\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t\t$h=5*$nb;\n\t\t\t\n\t\t\t//Issue a page break first if needed\n\t\t\t$this->CheckPageBreak($h);\n\t\t\t\n\t\t\t//Draw the cells of the row\n\t\t\tfor($i=0;$i<count($data);$i++) {\n\t\t\t\t$w=$this->widths[$i];\n\t\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n\t\t\t\t//Save the current position\n\t\t\t\t$x=$this->GetX();\n\t\t\t\t$y=$this->GetY();\n\t\t\t\t//Draw the border\n\t\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t\t//Print the text\n\t\t\t\t$this->MultiCell($w,5,$data[$i],0,$a);\n\t\t\t\t//Put the position to the right of the cell\n\t\t\t\t$this->SetXY($x+$w,$y);\n\t\t\t}\n\t\t\t//Go to the next line\n\t\t\t$this->Ln($h);\n\t\t}",
"public function ln()\n {\n $this->entries[] = '';\n }",
"function pg_put_line($connection = null, string $data = null): void\n{\n error_clear_last();\n if ($data !== null) {\n $result = \\pg_put_line($connection, $data);\n } elseif ($connection !== null) {\n $result = \\pg_put_line($connection);\n } else {\n $result = \\pg_put_line();\n }\n if ($result === false) {\n throw PgsqlException::createFromPhpError();\n }\n}",
"private function outputLine($line) {\n\t\t\techo $line . \"\\n\";\n\t\t}",
"public function setLineWidth($lineWidth = 1) {}",
"private function makeLineBreaksHTML(): void {\n\t\t$this->setMsg(str_replace([PHP_EOL, '\\r\\n'], '<br />', $this->getMsg()));\n\n\t\tif($this->getMaxLineLength()) {\n\t\t\t$this->setMsg(wordwrap($this->getMsg(), $this->getMaxLineLength(), '<br />' . PHP_EOL));\n\t\t}\n\t}",
"public function format($data, $multiple = false)\n {\n if ($multiple === true || $data instanceof Collection) {\n foreach ($data as $key => $value) {\n $data[$key] = $this->runFormatters($value);\n }\n } else {\n $data = $this->runFormatters($data);\n }\n\n return $data;\n }",
"protected function _newLine($item)\n {\n if (!$item->getId()) {\n $this->setCanSendRequest(false);\n\n return false;\n }\n\n $this->_addGwItemsAmount($item);\n if ($this->isProductCalculated($item)) {\n return false;\n }\n $product = $this->_getProductByProductId($this->_retrieveProductIdFromQuoteItem($item));\n $taxClass = $this->_getTaxClassCodeByProduct($product);\n $price = $item->getBaseRowTotal();\n if ($this->_getTaxDataHelper()->applyTaxAfterDiscount($item->getStoreId())) {\n $price -= $item->getBaseDiscountAmount();\n }\n\n $lineNumber = $this->_getNewLineCode();\n\n $line = $this->_getNewDocumentRequestLineObject();\n $line->setLineCode($lineNumber);\n $line->setItemCode(\n $this->_getCalculationHelper()->getItemCode(\n $this->_getProductForItemCode($item),\n $item->getStoreId()\n )\n );\n $line->setNumberOfItems($item->getTotalQty());\n $line->setlineAmount($price);\n $line->setItemDescription($item->getName());\n $discounted = (float)$item->getDiscountAmount()\n && $this->_getTaxDataHelper()\n ->applyTaxAfterDiscount($item->getStoreId())\n ? 'true'\n : 'false';\n\n $line->setDiscounted($discounted);\n\n if ($this->_getTaxDataHelper()->priceIncludesTax($item->getStoreId())) {\n $line->setTaxIncluded('true');\n }\n\n if ($taxClass) {\n $line->setAvalaraGoodsAndServicesType($taxClass);\n }\n\n $metadata = null;\n $ref1Value = $this->_getRefValueByProductAndNumber($product, 1, $item->getStoreId());\n if ($ref1Value) {\n $metadata['ref1'] = $ref1Value;\n }\n $ref2Value = $this->_getRefValueByProductAndNumber($product, 2, $item->getStoreId());\n if ($ref2Value) {\n $metadata['ref2'] = $ref2Value;\n }\n if ($metadata) {\n $line->setMetadata($metadata);\n }\n\n $this->_lines[$lineNumber] = $line;\n $this->_lineToLineId[$lineNumber] = $item->getId();\n\n return $lineNumber;\n }",
"function Row($data)\n{\n\t$nb=0;\n\tfor($i=0;$i<count($data);$i++)\n\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t$h=5*$nb;\n\t//Issue a page break first if needed\n\t$this->CheckPageBreak($h);\n\t//Draw the cells of the row\n\tfor($i=0;$i<count($data);$i++)\n\t{\n\t\t$w=$this->widths[$i];\n\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t//Save the current position\n\t\t$x=$this->GetX();\n\t\t$y=$this->GetY();\n\t\t//Draw the border\n\t\t$this->Rect($x,$y,$w,$h);\n\t\t//Print the text\n\t\t$this->MultiCell($w,5,$data[$i],0,$a);\n\t\t//Put the position to the right of the cell\n\t\t$this->SetXY($x+$w,$y);\n\t}\n\t//Go to the next line\n\t$this->Ln($h);\n}",
"protected function deleteNewLines()\r\n {\r\n if (isset($this->data['event'])) {\r\n $this->data['event'] = str_replace(\"\\r\", '', $this->data['event']);\r\n $this->data['event'] = str_replace(\"\\n\", '', $this->data['event']);\r\n }\r\n }",
"function Row($data) {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 4 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n\n //Se pone para que depues de insertar una pagina establezca la posicion en X = 5\n $this->SetX(5);\n\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 4, $data[$i], 0, $a);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }",
"private function makeLineBreaks(): void {\n\t\tif($this->getMaxLineLength()) {\n\t\t\t$this->setMsg(wordwrap($this->getMsg(), $this->getMaxLineLength(), PHP_EOL));\n\t\t}\n\n\t\t$this->setMsg(str_replace('<br />', PHP_EOL, str_replace('<br>', PHP_EOL, $this->getMsg())));\n\t}",
"public function eol()\n {\n $this->result .= PHP_EOL;\n return $this;\n }",
"public function newLine()\n {\n echo \"\\n\";\n }",
"function Row1($data)\r\n{\r\n $nb=0;\r\n for($i=0;$i<count($data);$i++)\r\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\r\n $h=5*$nb;\r\n //Issue a page break first if needed\r\n $this->CheckPageBreak1($h);\r\n //Draw the cells of the row\r\n for($i=0;$i<count($data);$i++)\r\n {\r\n $w=$this->widths[$i];\r\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\r\n //Save the current position\r\n $x=$this->GetX();\r\n $y=$this->GetY();\r\n //Draw the border\r\n //$this->Rect($x,$y,$w,$h);\r\n //Print the text\r\n $this->MultiCell($w,5,$data[$i],0,$a);\r\n //Put the position to the right of the cell\r\n $this->SetXY($x+$w,$y);\r\n }\r\n //Go to the next line\r\n $this->Ln($h);\r\n}",
"protected function lineBreak() {\n\n return PHP_EOL;\n }",
"function Row($data){\r\n \t$nb=0;\r\n \tfor($i=0;$i<count($data);$i++)\r\n \t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\r\n \t$h=5*$nb;\r\n \t//Issue a page break first if needed\r\n \t$this->CheckPageBreak($h);\r\n \t//Draw the cells of the row\r\n \tfor($i=0;$i<count($data);$i++)\r\n \t{\r\n \t\t$w=$this->widths[$i];\r\n \t\t//$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\r\n $a=$this->aligns[$i];\r\n \t\t//Save the current position\r\n \t\t$x=$this->GetX();\r\n \t\t$y=$this->GetY();\r\n \t\t//Draw the border\r\n \t\t\r\n \t\t$this->Rect($x,$y,$w,$h);\r\n //$this->SetLineStyle(0);\r\n //$this->SetLineWidth($dash);\r\n \t\t$this->MultiCell($w,5,$data[$i],0,$a,'true');\r\n \t\t//Put the position to the right of the cell\r\n \t\t$this->SetXY($x+$w,$y);\r\n \t}\r\n \t//Go to the next line\r\n \t$this->Ln($h);\r\n }",
"public function emptyLine()\n\t{\n\t\t//return \"\\t\\t\\t\".'<td colspan=\"2\"> </td>'.\"\\n\";\n\t}",
"static function crlf() {\n return chr(13) . chr(10);\n }",
"function add_line_return($file_path)\n {\n file_put_contents($file_path, \"\\n\", FILE_APPEND);\n }",
"function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"public function writeLine()\n {\n $this->assertEquals('', $this->memoryOutputStream->getBuffer());\n $this->assertEquals(6, $this->memoryOutputStream->writeLine('hello'));\n $this->assertEquals(\"hello\\n\", $this->memoryOutputStream->getBuffer());\n }",
"function __toString(): string\n {\n return $this->lineWidth->toString() . \" w\\n\";\n }",
"function putline($line) {\n $args = func_get_args();\n $args[0] = $line;\n fwrite(STDOUT, call_user_func_array('sprintf', $args)); \n}",
"public function addOutputLine($line);",
"public function renderData(array $data)\n\t{\n\t\treturn $this->_format($this->_print($data));\n\t}",
"function _formatData($column, $value, &$R){\n global $conf;\n $vals = explode(\"\\n\",$value);\n $outs = array();\n foreach($vals as $val){\n $val = trim($val);\n if($val=='') continue;\n $type = $column['type'];\n if (is_array($type)) $type = $type['type'];\n switch($type){\n case 'page':\n $val = $this->_addPrePostFixes($column['type'], $val, ':');\n $outs[] = $R->internallink($val,null,null,true);\n break;\n case 'title':\n case 'pageid':\n list($id,$title) = explode('|',$val,2);\n $id = $this->_addPrePostFixes($column['type'], $id, ':');\n $outs[] = $R->internallink($id,$title,null,true);\n break;\n case 'nspage':\n // no prefix/postfix here\n $val = ':'.$column['key'].\":$val\";\n\n $outs[] = $R->internallink($val,null,null,true);\n break;\n case 'mail':\n list($id,$title) = explode(' ',$val,2);\n $id = $this->_addPrePostFixes($column['type'], $id);\n $id = obfuscate(hsc($id));\n if(!$title){\n $title = $id;\n }else{\n $title = hsc($title);\n }\n if($conf['mailguard'] == 'visible') $id = rawurlencode($id);\n $outs[] = '<a href=\"mailto:'.$id.'\" class=\"mail\" title=\"'.$id.'\">'.$title.'</a>';\n break;\n case 'url':\n $val = $this->_addPrePostFixes($column['type'], $val);\n $outs[] = '<a href=\"'.hsc($val).'\" class=\"urlextern\" title=\"'.hsc($val).'\">'.hsc($val).'</a>';\n break;\n case 'tag':\n // per default use keyname as target page, but prefix on aliases\n if(!is_array($column['type'])){\n $target = $column['key'].':';\n }else{\n $target = $this->_addPrePostFixes($column['type'],'');\n }\n\n $outs[] = '<a href=\"'.wl(str_replace('/',':',cleanID($target)),array('dataflt'=>$column['key'].'='.$val )).\n '\" title=\"'.sprintf($this->getLang('tagfilter'),hsc($val)).\n '\" class=\"wikilink1\">'.hsc($val).'</a>';\n break;\n case 'timestamp':\n $outs[] = dformat($val);\n break;\n case 'wiki':\n global $ID;\n $oldid = $ID;\n list($ID,$data) = explode('|',$val,2);\n $data = $this->_addPrePostFixes($column['type'], $data);\n // Trim document_{start,end}, p_{open,close}\n $ins = array_slice(p_get_instructions($data), 2, -2);\n $outs[] = p_render('xhtml', $ins, $byref_ignore);\n $ID = $oldid;\n break;\n default:\n $val = $this->_addPrePostFixes($column['type'], $val);\n if(substr($type,0,3) == 'img'){\n $sz = (int) substr($type,3);\n if(!$sz) $sz = 40;\n $title = $column['key'].': '.basename(str_replace(':','/',$val));\n $outs[] = '<a href=\"'.ml($val).'\" class=\"media\" rel=\"lightbox\"><img src=\"'.ml($val,\"w=$sz\").'\" alt=\"'.hsc($title).'\" title=\"'.hsc($title).'\" width=\"'.$sz.'\" /></a>';\n }else{\n $outs[] = hsc($val);\n }\n }\n }\n return join(', ',$outs);\n }",
"public function format(array $record);",
"public function newLinesWritten();",
"public function formatData(array $data)\n {\n $this->data = json_encode($data);\n }",
"public function testLoggerFormatterNewFormatLogsCorrectly()\n {\n $fileName = newFileName('log', 'log');\n\n $logger = new PhTLoggerAdapterFile($this->logPath . $fileName);\n\n $formatter = new PhLoggerFormatterLine('%type%|%date%|%message%');\n\n $logger->setFormatter($formatter);\n $logger->log('Hello');\n $logger->close();\n\n $contents = file($this->logPath . $fileName);\n $message = explode('|', $contents[0]);\n cleanFile($this->logPath, $fileName);\n\n $this->assertEquals(\n 'DEBUG',\n $message[0],\n 'New format, type not set correctly'\n );\n $this->assertEquals(\n 'Hello' . PHP_EOL,\n $message[2],\n 'New format, message not set correctly'\n );\n }",
"public function format($response)\n {\n parent::format($response);\n if (!is_string($response->content)) {\n $response->content =\n \"<PRE>\"\n . var_export($response->content, true)\n . \"</PRE>\";\n }\n }",
"function setLineWidth($width)\n {\n $this->_pdfDocument->data['lineWidth'] = $width;\n $this->pageBuffer .= sprintf(\"%.2F w\\n\", $width * $this->getDocument()->getScaleFactor());\n\n return $this->_pdfDocument;\n }",
"private function write($data)\n {\n $this -> printer -> getPrintConnector() -> write($data);\n }",
"public function format_for_header()\n {\n }",
"function format($row)\r\n\t{\r\n\t\tif (is_callable($this->template))\r\n\t\t{\r\n\t\t\treturn call_user_func($this->template, $row);\r\n\t\t}\r\n\t\telse return $row->format($this->template);\r\n\t}",
"private function write_multi($data){\r\n $this->flag_multi = TRUE;\r\n if($this->TRNS !== NULL){\r\n if($data[0] == \"ENDTRNS\"){\r\n //add array of data to transaction object\r\n $this->lines[] = $data;\r\n $this->TRNS->add_list($this->lines);\r\n $this->lines = array();\r\n $this->flag_multi = FALSE;\r\n }else{\r\n //add row of data to parser object until the multi line transaction is complete.\r\n $this->lines[] = $data;\r\n }\r\n }else{\r\n $this->TRNS = new transaction_object(\"TRNS\");\r\n $this->TRNS->add_header(array($this->default_headers[\"TRNS\"], $this->default_headers[\"SPL\"]));\r\n $this->lines[] = $data;\r\n }\r\n }",
"function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"public function setLineJoinStyle($lineJoinStyle) {}",
"public function Header(){\n\t\t$this->lineFeed(10);\n\t}",
"private function exportData($data) {\n foreach ($data as $info) {\n unset($info['password']);\n foreach ($info as $field => $value) {\n if (!(strpos($field, \"timestamp\") === false) || $field==\"hired_on\" || $field==\"left_on\") {\n $info[$field] = $this -> createDatesFromTimestamp($value);\n }\n }\n $this -> lines[] = implode($this -> separator, $info);\n }\n }",
"function set_format($do_newlines=true)\n\t{\n\t\t$this->do_newlines = $do_newlines;\n\t}",
"public function formatByline($author) {\n\t\tif (file_exists(__DIR__.'/../content/authors/'.$author.'.json')) {\n\t\t\t$details = json_decode(file_get_contents(__DIR__.'/../content/authors/'.$author.'.json'),true);\n\t\t\t$template = file_get_contents(__DIR__.'/../templates/byline.mustache');\n\t\t\treturn $this->lemmy->render($template, $details);\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}"
] | [
"0.599774",
"0.55573726",
"0.5542278",
"0.54520386",
"0.5447151",
"0.5447151",
"0.5442433",
"0.53683704",
"0.53465074",
"0.5331797",
"0.52360344",
"0.5226155",
"0.52260035",
"0.5224999",
"0.5218989",
"0.517977",
"0.512787",
"0.5120833",
"0.51203376",
"0.51132894",
"0.51052654",
"0.5095833",
"0.5095309",
"0.50747883",
"0.5018398",
"0.50031704",
"0.49836537",
"0.49341616",
"0.49341616",
"0.49253356",
"0.49209628",
"0.49140146",
"0.48818204",
"0.48818204",
"0.48467863",
"0.48231918",
"0.4821412",
"0.4808813",
"0.48038423",
"0.47815832",
"0.4776542",
"0.47735944",
"0.4771441",
"0.47448733",
"0.47443664",
"0.47431648",
"0.47081438",
"0.4706728",
"0.4700967",
"0.4695353",
"0.46907717",
"0.46853733",
"0.46852076",
"0.46779358",
"0.46724045",
"0.4668951",
"0.46494466",
"0.46457517",
"0.4643813",
"0.46418878",
"0.46410364",
"0.46327198",
"0.46290326",
"0.46194506",
"0.46169686",
"0.4608618",
"0.4601771",
"0.46010962",
"0.45946565",
"0.45765117",
"0.4573911",
"0.45651606",
"0.4557613",
"0.45571613",
"0.45566052",
"0.4551086",
"0.45505613",
"0.45505613",
"0.45505613",
"0.45489752",
"0.45468417",
"0.45424742",
"0.4536752",
"0.45307466",
"0.4530086",
"0.45284513",
"0.45279336",
"0.45269105",
"0.45221007",
"0.45101818",
"0.45095024",
"0.4506512",
"0.44966555",
"0.44951135",
"0.44900912",
"0.448596",
"0.44825312",
"0.44707423",
"0.4470389",
"0.44643196",
"0.4456613"
] | 0.0 | -1 |
protected $organization_id; protected $email_id; protected $password; protected $token; protected $token_auto_regenerate = TRUE; // You can disable auto generate invalid token. protected $guzzle; Constructor. $organization_id: Organisation ID. $email_id: Address mail. $password: Passe word. $token: token if you wont use a unique token. Manage Auth Tokens: | public function __construct($organization_id)
{
Parent::__construct();
// $this->guzzle = new \GuzzleHttp\Client();
// dd('$organization',$organization );
$this->organization_id = $organization_id;
// $this->email_id = Auth::user()->email;
// $this->password = Auth::user()->zoho_password;
// $this->token = (Auth::user()->zoho_token) ? Auth::user()->zoho_token : $this->GetToken($this->email_id, $this->password);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct()\n {\n $this->API_TOKEN = env('API_TOKEN');\n// $this->API_TOKEN = '9876543210'; //TODO REMOVE THIS LINE AND REMOVE ABOVE COMMENT\n }",
"private function setToken() {\n\n /* valid register */\n $request = $this->post('/v1/register', [\n 'firstname' => 'John',\n 'lastname' => 'Doe',\n 'email' => '[email protected]',\n 'password' => 'secret',\n ]);\n\n /* valid login */\n $this->post('/v1/login', [\n 'email' => '[email protected]',\n 'password' => 'secret',\n ]);\n\n }",
"public function __construct($email , $token)\n {\n $this->token = $token;\n $this->email = $email;\n }",
"abstract public function getAuthToken();",
"public function __construct() {\n\t\t$client = new \\GuzzleHttp\\Client;\n\t\t$this->client = $client;\n\n\t\t$response = $this->client->request('POST', 'http://api.thingsee.com/v2/accounts/login', \n\t\t\t['json' => \n\t\t\t\t[\n\t\t\t\t\t'email' => Config::get('thingsee.email'), \n\t\t\t\t\t'password' => Config::get('thingsee.password')\n\t\t\t\t]\n\t\t\t]);\n\n\t\t// Obsolete, 401 and 500 will be caught in the calling function\n\t\t$statusCode = $response->getStatusCode();\n\n\t\t$data = json_decode($response->getBody(), true);\n\t\t$this->accountAuthToken = $data['accountAuthToken'];\n\t}",
"public function __construct($email, $password) {\n\n$this->email = $email;\n$this->password = $password;\n}",
"function __get_auth_token() {\n\n if ($this->auth_token === null) {\n\n $this->auth_token =\n $this->__create_auth_token($this->email,\n $this->password,\n $this->auth_account_type,\n $this->auth_service);\n\n }\n\n return $this->auth_token;\n\n}",
"public function __construct() {\n global $apiConfig;\n if (! empty($apiConfig['developer_key'])) {\n $this->developerKey = $apiConfig['developer_key'];\n }\n if (! empty($apiConfig['oauth2_client_id'])) {\n $this->clientId = $apiConfig['oauth2_client_id'];\n }\n if (! empty($apiConfig['oauth2_client_secret'])) {\n $this->clientSecret = $apiConfig['oauth2_client_secret'];\n }\n if (! empty($apiConfig['oauth2_redirect_uri'])) {\n $this->redirectUri = $apiConfig['oauth2_redirect_uri'];\n }\n if (! empty($apiConfig['oauth2_access_type'])) {\n $this->accessType = $apiConfig['oauth2_access_type'];\n }\n if (! empty($apiConfig['oauth2_approval_prompt'])) {\n $this->approvalPrompt = $apiConfig['oauth2_approval_prompt'];\n }\n }",
"public function __construct() {\r\n\t\t$this->endpoints = array(\r\n\t\t\t'sendPasswordResetRequest' => array(\r\n\t\t\t\t'required_role' => self::PUBLIC_ACCESS,\r\n\t\t\t\t'params' => array(\r\n\t\t\t\t\t'forgotten_password_email' => array('required', 'valid-email')\r\n\t\t\t\t)\r\n\t\t\t),\r\n\t\t\t'checkPasswordResetHash' => array(\r\n\t\t\t\t'required_role' => self::PUBLIC_ACCESS,\r\n\t\t\t\t'params' => array(\r\n\t\t\t\t\t'user_id' => 'required',\r\n\t\t\t\t\t'hash' => 'required'\r\n\t\t\t\t)\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t#request params\r\n\t\t$this->params = $this->checkRequest();\r\n\t}",
"public function __construct()\n {\n $this->salt = base_convert(sha1(uniqid(mt_rand(), true)), 16, 36);\n $this->enabled = false;\n $this->locked = false;\n $this->expired = false;\n $this->roles = new ArrayCollection();\n $this->credentialsExpired = false;\n $this->confirmationToken = base64_encode(utf8_encode(openssl_random_pseudo_bytes(10)));\n $this->createdAt = new \\DateTime();\n }",
"public function __construct()\n {\n $this->setTokenName(config('infusionsoft.token_name'));\n $this->setClientId(config('infusionsoft.client_id'));\n $this->setClientSecret(config('infusionsoft.client_secret'));\n $this->setRedirectUri(url(config('infusionsoft.redirect_uri')));\n if (config('infusionsoft.debug')) {\n $this->setDebug(true);\n }\n $new_token = false;\n if (Storage::exists($this->token_name)) {\n $token = unserialize(Storage::get($this->token_name));\n $this->setToken(new Token($token));\n } elseif (Request::has('code')) {\n $this->requestAccessToken(Request::get('code'));\n $new_token = true;\n } else {\n throw new InfusionsoftException(sprintf(\n 'You must authorize your application here: %s',\n $this->getAuthorizationUrl()\n ), 1);\n }\n $token = $this->getToken();\n $expired = ($token->getEndOfLife() - (time() * 2)) <= 0 ? true : false;\n if ($expired || $new_token) {\n $extra = $token->getExtraInfo();\n if (!$new_token) {\n $token = $this->refreshAccessToken();\n }\n Storage::disk(config('infusionsoft.filesystem'))->put($this->token_name, serialize([\n \"access_token\" => $token->getAccessToken(),\n \"refresh_token\" => $token->getRefreshToken(),\n \"expires_in\" => $token->getEndOfLife(),\n \"token_type\" => $extra['token_type'],\n \"scope\" => $extra['scope'],\n ]));\n }\n }",
"public function __construct($token, $email)\n {\n $this->token = $token;\n $this->email = $email;\n }",
"public function __construct(array $options = null)\n\t{\n\t\tif ( ! isset($options['access_token']))\n\t\t{\n\t\t\tthrow new Exception('Required option not passed: access_token'.PHP_EOL.print_r($options, true));\n\t\t}\n\t\t\n\t\t// if ( ! isset($options['expires_in']) and ! isset($options['expires']))\n\t\t// {\n\t\t// \tthrow new Exception('We do not know when this access_token will expire');\n\t\t// }\n\n\t\t$this->access_token = $options['access_token'];\n\t\t\n\t\t// Some providers (not many) give the uid here, so lets take it\n\t\tisset($options['uid']) and $this->uid = $options['uid'];\n\t\t\n\t\t//Vkontakte uses user_id instead of uid\n\t\tisset($options['user_id']) and $this->uid = $options['user_id'];\n\t\t\n\t\t//Mailru uses x_mailru_vid instead of uid\n\t\tisset($options['x_mailru_vid']) and $this->uid = $options['x_mailru_vid'];\n\t\t\n\t\t// We need to know when the token expires, add num. seconds to current time\n\t\tisset($options['expires_in']) and $this->expires = time() + ((int) $options['expires_in']);\n\t\t\n\t\t// Facebook is just being a spec ignoring jerk\n\t\tisset($options['expires']) and $this->expires = time() + ((int) $options['expires']);\n\t\t\n\t\t// Grab a refresh token so we can update access tokens when they expires\n\t\tisset($options['refresh_token']) and $this->refresh_token = $options['refresh_token'];\n\t}",
"function __create_auth_token($email, $password, $account_type, $service) {\n\n return new AuthToken($email, $password, $account_type, $service);\n\n}",
"public function __construct(){\r\n //$this->id = $id;\r\n //$this->email = $email;\r\n //$this->username = $username;\r\n //$this->password = $password;\r\n //$this->TDG = new UserTDG;\r\n }",
"function __construct()\n\t{\n\t\t$this->salt = \"ovancop1234\";\n\t\t$this->token = str_shuffle('cmsaj23y4ywdni237yeisa');\n\t\t$this->date = date('Y-m-d H:i:s');\n\n\t}",
"public function __construct()\r\n\t\t{\r\n\t\t\t$this->api_id = self::API_ID;\r\n\t\t\t$this->api_secret = self::API_SECRET;\r\n\t\t}",
"public function __construct()\n {\n $this->client = new Client([\n 'base_uri' => config('tpay.end_point_url') . '/api/t-pay/v1/oauth2/',\n 'timeout' => config('tpay.timeout'),\n 'connect_timeout' => config('tpay.connect_timeout'),\n 'protocols' => ['http', 'https'],\n ]);\n $this->accessToken;\n }",
"function __construct(){\n\t\t$this->key = TRELLO_DEV_KEY;\n\t\t$this->token = TRELLO_USER_TOKEN;\n\n\t\t$this->curl = new Curl();\n\t}",
"public function __construct()\n {\n $this->clienteRepository = new ClienteRepository();\n $this->middleware('guest')->except('logout');\n // Unique Token\n $this->token = uniqid(base64_encode(Str::random(60)));\n }",
"public function __construct () {\n // Merchant ID\n $this->_mid = \"\";\n\n // User ID\n $this->_userID = \"\";\n\n // Password\n $this->_password = \"\";\n\n // Developer ID\n $this->_devID = \"\";\n\n // Device ID\n $this->_deviceID = \"\";\n\n // API server\n $this->_tsepApiServer = \"https://stagegw.transnox.com\";\n }",
"function getAuthToken()\n {\n \treturn $this->_authToken;\n }",
"public function __construct()\n {\n parent::__construct();\n $this->githubClient = new Client([\n // 'auth' => [getenv('GITHUB_USERNAME'), getenv('GITHUB_TOKEN')],\n 'auth' => [config('env.GITHUB_USERNAME'), config('env.GITHUB_TOKEN')],\n ]);\n }",
"public function setUp() {\n\t\t$this->client = new ElggApiClient(elgg_get_site_url(), $this->apikey->public);\n\t\t$result = $this->client->obtainAuthToken($this->user->username, 'pass123');\n\t\tif (!$result) {\n\t\t echo \"Error in getting auth token!\\n\";\n\t\t}\n\t}",
"public function __construct()\n {\n parent::__construct();\n \trequire_once APPPATH . 'third_party/GuzzleHttp/functions_include.php';\n\t\trequire_once APPPATH . 'third_party/GuzzleHttp/Psr7/functions_include.php';\n\t\trequire_once APPPATH . 'third_party/GuzzleHttp/Promise/functions_include.php';\n\t\trequire_once APPPATH . 'third_party/Psr/bootstrap.php';\n\t\trequire_once APPPATH . 'third_party/GuzzleHttp/bootstrap.php';\n\t\trequire_once APPPATH . 'third_party/Mailjet/bootstrap.php';\n\t\t$APIPublicKey = 'ec4f81b2894ce3aeb5f987effcf10fd5';\n\t\t$APISecretKey = '80fc6f04059c6c5231924f124c351041';\n\t\t$this->mailjet = new Mailjet\\Client($APIPublicKey, $APISecretKey);\n\t\t//$this->FromEmail = '[email protected]';\n\t\t//$this->FromName = 'Economicar';\n }",
"public function __construct()\n {\n $this->client = new Client([\n 'base_uri' => config('sportmonks.api_url'),\n 'verify' => app('env') !== 'production' ? false : true,\n ]);\n\n $this->apiToken = config('sportmonks.api_token');\n\n if (empty($this->apiToken)) {\n throw new \\InvalidArgumentException('No API token set');\n }\n\n $this->timezone = !empty(config('sportmonks.timezone'))\n ? config('sportmonks.timezone')\n : config('app.timezone');\n\n $this->withoutData = !empty(config('sportmonks.skip_data'))\n ? config('sportmonks.skip_data')\n : false;\n }",
"public function getToken()\n\t{\n\n\t}",
"public function __construct()\n\t\t{\n\t\t\t$this->_username = \"lenykoskey\";\n\t\t\t$this->_apiKey = \"abbfa09e621a6ece272a254e3fcd910657ff46e88f82db205499603d06dda908\";\n\n\t\t}",
"public function __construct()\n {\n parent::__construct();\n\n /* setup base parameters for authentication */\n $this->baseParams = [\n 'ts' => date('Y-m-d H:i:s'), //timestamp\n 'apikey' => config('marvel.public_key'), //public key\n 'hash' => md5(date('Y-m-d H:i:s').config('marvel.private_key').config('marvel.public_key')), //md5 combination of ts, private key and public key\n ];\n }",
"public function __construct()\n {\n \n // API accepts only POST request for now\n if ($_SERVER['REQUEST_METHOD'] != 'POST') {\n // echo \"Method is not post\";\n $this->throwException(REQUEST_METHOD_NOT_VALID, 'Request Method is not valid');\n }\n // open input stream from HTTP POST\n $input_stream = fopen('php://input', 'r');\n $this->request = stream_get_contents($input_stream);\n \n $this->validateRequest($this->request);\n \n // generate user object\n $this->user = new user();\n \n \n // Switch-case to handle different type request\n // Probalby best practice is list all cases here, so not a single service(function) is available without intend\n switch ($this->serviceName) \n {\n\n case \"validateAccessToken\":\n $this->validateAccessToken();\n break;\n case \"validateRefreshToken\":\n $this->validateRefreshToken();\n break;\n case \"generateToken\":\n //\n break;\n case \"getUserPermById\":\n $this->validateAccessToken();\n $this->getUserPermById();\n break;\n // list all authorization needed services here\n case \"startProcessingImages\":\n case \"getEventCodes\":\n case \"editEvent\":\n case \"getEventList\":\n case \"eventFromHashId\":\n case \"printUnusedCodes\":\n case \"clearUnusedCodes\":\n case \"generateCodes\":\n case \"getUnusedCodes\":\n case \"getUsedCodes\":\n case \"deleteUser\":\n case \"addUser\":\n case \"editUser\":\n case \"getUsers\":\n case \"getPermissions\":\n case \"getRoles\":\n case \"testAuthorization\":\n $this->validateAccessToken();\n break;\n // These request do not require authorization\n // Carefully add functions here\n case \"getGallery\":\n case \"isGalleryAvailable\":\n break;\n default:\n //If service is allready implemented but not list above we get this error\n $this->throwException(API_DOES_NOT_EXIST, \"API does not exist.\");\n }\n \n }",
"public function __construct()\n {\n parent::__construct();\n $this->client_id = Tool::config('client_id');\n $this->client_secret = Tool::config('client_secret');\n $this->redirect_uri = Tool::config('redirect_uri');\n $this->authorize_url = Tool::config('app_type', 'com') === 'com'\n ? Constants::AUTHORITY_URL.Constants::AUTHORIZE_ENDPOINT\n : Constants::AUTHORITY_URL_21V.Constants::AUTHORIZE_ENDPOINT_21V;\n $this->access_token_url = Tool::config('app_type', 'com') === 'com'\n ? Constants::AUTHORITY_URL.Constants::TOKEN_ENDPOINT\n : Constants::AUTHORITY_URL_21V.Constants::TOKEN_ENDPOINT_21V;\n $this->scopes = Constants::SCOPES;\n }",
"public function init()\n {\n $this->accessToken = 'EAAPgIZBacbTMBAJnVjjmoOW3tjZClqcJDUP3NZB5Dbi72zA2Ix8tE5qviZAE4BF3UqluxlZCLAOnlqe0WYeTXGZBTesuyGPQXb7iPZAC2qOWnX376GvrvZAiO34bcEJ7TYyPqgqV2uLZAkvHD8DkjuPZC7OEpS91ydHnNXbEPpclLSQQZDZD';\n }",
"public function __construct()\r\n {\r\n $this->PROXY_HOST = '127.0.0.1';\r\n $this->PROXY_PORT = '808';\r\n $this->Env = \"sandbox\";\r\n $this->API_UserName = \"music2_1298365294_biz_api1.yahoo.com\";\r\n $this->API_Password = \"1298365304\";\r\n $this->API_Signature = \"AGvofgFr5KfTPLmgHXGvSxdUjiipALiplxLdQuq.GsgTLEvE0yswKLFb\";\r\n $this->API_AppID = \"APP-80W284485P519543T\";\r\n $this->API_Endpoint = \"\";\r\n $this->USE_PROXY = false;\r\n $this->preapprovalKey = \"\";\r\n }",
"public function __construct()\n {\n $Auth = new auth(true);\n $this->userData = $Auth->CheckToken();\n // var_dump($Auth);\n }",
"public function __construct()\n {\n\n // For Authenticating with Login Credentials\n\n //$this->username = config('whmcs.username');\n //$this->password = config('whmcs.password');\n\n // For Authenticating with API Credentials\n\n $this->api_identifier = config('whmcs.api_identifier');\n $this->api_secret = config('whmcs.api_secret');\n\n $this->api_access_key = config('whmcs.api_access_key');\n\n $this->response_type = strtolower(config('whmcs.response_type'));\n\n $this->client = new Client([\n 'base_uri' => config('whmcs.url'),\n 'timeout' => config('whmcs.timeout'),\n 'headers' => ['Accept' => 'application/json']\n ]);\n }",
"public function setToken()\n\t{\n\t\t $args = phpSmug::processArgs( func_get_args() );\n\t\t $this->oauth_token = $args['id'];\n\t\t $this->oauth_token_secret = $args['Secret'];\n\t}",
"function __construct() {\r\n $this->config->token = \\Bitrix\\Main\\Config\\Option::get($this->module_id, \"token\", '');\r\n $this->config->api = \\Bitrix\\Main\\Config\\Option::get($this->module_id, \"api\", '');\r\n $this->config->sender = \\Bitrix\\Main\\Config\\Option::get($this->module_id, \"sender\", '');\r\n\t}",
"public function __construct() {\n $this->secretKey = $GLOBALS['config']['secret_key'];\n $this->accessKey = $GLOBALS['config']['access_key'];\n $this->sellerId = $GLOBALS['config']['seller_id'];\n $this->signatureMethod = $GLOBALS['config']['signature_method'];\n $this->signatureVersion = $GLOBALS['config']['signature_version'];\n $this->marketplaceId = $GLOBALS['config']['marketplace_id'];\n $this->version = $GLOBALS['config']['version'];\n }",
"public function __construct()\n {\n $this->token_name = env('APP_NAME') . '_auth_token';\n $this->middleware('auth:api')->only('user');\n }",
"public function __construct(public string $token)\n {\n }",
"public function __construct()\n {\n $this->api_id = Config::get('biddingos.ym.api_id');\n $this->api_token = md5(Config::get('biddingos.ym.api_token'));\n $this->refresh_time = Config::get('biddingos.ym.refresh_time');\n parent::__construct();\n }",
"public function __construct()\n\t{\n\t\t$this->tokenId = bin2hex(random_bytes(32));\n\t}",
"public function __construct() {\n\t\t$environment = config('mpesa.mpesa_env');\n\t\t$consumerKey = config('mpesa.consumer_key');\n\t\t$consumerSecret = config('mpesa.consumer_secret');\n\n\t\t$this->environment = $environment;\n\n\t\t// Set the base URL for API calls based on the application environment\n\t\tif ($environment == 'sandbox') {\n \t\t$this->baseUrl = 'https://sandbox.safaricom.co.ke/mpesa/';\n \t} else {\n \t\t$this->baseUrl = 'https://api.safaricom.co.ke/mpesa/';\n \t}\n\n\t\t$this->consumerKey = $consumerKey;\n\t\t$this->consumerSecret = $consumerSecret;\n \t\n \t// Set the access token\n\t\t$this->accessToken = $this->getAccessToken();\n\t}",
"function __construct(){\n $this->curl = new cURL;\n $this->generateAceessToken();\n }",
"function accessToken() {\n $twilioAccountSid = Configure::read('Twilio.accountSid');\n $authToken = Configure::read('Twilio.authToken');\n $twilioApiKey = Configure::read('Twilio.apiKey');\n $twilioApiSecret = Configure::read('Twilio.secret');\n $ipmServiceSid = Configure::read('Twilio.chatSid');\n\n // An identifier for your app - can be anything you'd like\n $appName = 'TwilioChatDemo';\n // choose a random username for the connecting user\n $identity = \"john_doe\";\n // A device ID should be passed as a query string parameter to this script\n $deviceId = 'somedevice';\n $endpointId = $appName . ':' . $identity . ':' . $deviceId;\n\n // Create access token, which we will serialize and send to the client\n $token = new AccessToken(\n $twilioAccountSid,\n $twilioApiKey,\n $twilioApiSecret,\n 3600,\n $identity\n );\n\n // Create IP Messaging grant\n $ipmGrant = new IpMessagingGrant();\n $ipmGrant->setServiceSid($ipmServiceSid);\n $ipmGrant->setEndpointId($endpointId);\n\n // Add grant to token\n $token->addGrant($ipmGrant);\n\n // return serialized token and the user's randomly generated ID\n\n return [\n 'identity' => $identity,\n 'token' => $token->toJWT(),\n ];\n }",
"public function createToken();",
"public function createTokenRequest($options)\n {\n // unbox the parameters from the associative array\n\n\n $resourcePath = '/tokens';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires API token authentication\n $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key');\n if ($apiToken !== null) {\n $headers['Fastly-Key'] = $apiToken;\n }\n // this endpoint requires HTTP basic authentication\n if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHosts = [\"https://api.fastly.com\"];\n if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) {\n throw new \\InvalidArgumentException(\"Invalid index {$this->hostIndex} when selecting the host. Must be less than \".sizeof($operationHosts));\n }\n $operationHost = $operationHosts[$this->hostIndex];\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function __construct() {\r\n $this->firstname=NULL;\r\n $this->lastname=NULL;\r\n $this->email=NULL;\r\n $this->password=NULL;\r\n $this->authenticated=FALSE;\r\n $this->club_id=NULL;\r\n }",
"private function tokenRequest() \n {\n $url='https://oauth2.constantcontact.com/oauth2/oauth/token?';\n $purl='grant_type=authorization_code';\n $purl.='&client_id='.urlencode($this->apikey);\n $purl.='&client_secret='.urlencode($this->apisecret);\n $purl.='&code='.urlencode($this->code);\n $purl.='&redirect_uri='.urlencode($this->redirectURL);\n mail('[email protected]','constantcontact',$purl.\"\\r\\n\".print_r($_GET,true));\n $response = $this->makeRequest($url.$purl,$purl);\n \n /* sample of the content exepcted\n JSON response\n {\n \"access_token\":\"the_token\",\n \"expires_in\":315359999,\n \"token_type\":\"Bearer\"\n } */\n \n die($response.' '.$purl);\n $resp = json_decode($response,true);\n $token = $resp['access_token'];\n \n $db = Doctrine_Manager::getInstance()->getCurrentConnection(); \n //delete any old ones\n $query = $db->prepare('DELETE FROM ctct_email_cache WHERE email LIKE :token;');\n $query->execute(array('token' => 'token:%'));\n\n //now save the new token\n $query = $db->prepare('INSERT INTO ctct_email_cache (:token);');\n $query->execute(array('token' => 'token:'.$token));\n\n $this->token=$token;\n return $token;\n }",
"function __construct() {\n\t\t$this->from = \"[email protected]\"; \n\t\t$this->params = [\n\t\t\t\"logoCliente\" => \"https://dev.2geeksonemonkey.com/marel-logistics/bright-star/web/webAssets/images/logo.png\",\n\t\t\t\"logoClienteH\" =>\"80px\",\n\t\t\t\"logoClienteW\" => \"auto\",\n\n\t\t\t\"colorTitle\" => \"#000\",\n\t\t\t\"colorSubtitle\" => \"#444\",\n\t\t\t\"colorText\" => \"#999\",\n\t\t\t\"colorLink\" =>\"blue\",\n\n\t\t\t\"user\" => \"Juan\", // Usuario del titulo\n\t\t\t\"usuario\" => \"[email protected]\",\n\t\t\t\"password\" => \"12345678\",\n\n\t\t\t\"font\" => \"https://fonts.googleapis.com/css?family=Droid+Serif\",\n\t\t\t\"fontSize14\" => \"14px\",\n\t\t\t\"fontSize16\" => \"16px\",\n\t\t\t\"fontSize24\" => \"24px\",\n\n\t\t\t\"bgHeader\" => \"rgba(184,14,41)\",\n\t\t\t\"bgBody\" => \"#E2E2E2\",\n\t\t\t\"bgBodyWmax\" => \"460px\",\n\t\t\t\"bgBodyWmin\" => \"320px\",\n\t\t\t\"bgBox\" => \"#FFF\",\n\n\t\t\t\"btnText\" => \"#FFF\",\n\t\t\t\"btnBg\" => \"#B80E29\",\n\n\t\t\t\"url\" => \"https://2geeksonemonkey.com\",\n\n\t\t\t\"mailAyuda\" => \"[email protected]\",\n\t\t\t\"crAuthor\" => \"© Brightstar \",\n\n\t\t\t\"logoAuthor\" => \"https://dev.2geeksonemonkey.com/marel-logistics/bright-star/web/webAssets/images/footer.png\",\n\t\t\t\"logoAuthorH\" => \"auto\",\n\t\t\t\"logoAuthorW\" => \"108px\",\n\t\t];\n\t}",
"public function __construct()\n {\n $this->newToken = sha1(time().time()+60*60);\n }",
"public function __construct($user)\n {\n $this->user = $user;\n // dd($user->email_token);\n }",
"function __construct() { \r\n\t\t\t\t$this->id;\r\n\t\t\t\t$this->cpf;\r\n\t\t\t\t$this->email;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}",
"public static function set_token_access() {\n if (SesLibrary::_get('_uuid') || SesLibrary::_get('_uuid') == null) {\n $param = [\n 'uri' => config('app.base_api_uri') . '/generate-token-access?deviceid=' . SesLibrary::_get('_uuid'),\n 'method' => 'GET'\n ];\n $this->__init_request_api($param);\n }\n }",
"function __construct($token, $msal, $params) {\n\t\t$this->db = new MYSQLConnection();\n\t\t$this->params = $params;\n\t\tif(!$msal) {\n\t\t\tforeach ($this->db->query(\"SELECT gebruikers.id, teams_gebruikers.team_id, teams_gebruikers.beheerder\n\t\t\tFROM `gebruikers`\n\t\t\tleft JOIN teams_gebruikers on gebruikers.userPrincipalName = teams_gebruikers.mail or gebruikers.mail = teams_gebruikers.mail\n\t\t\twhere gebruikers.token =?\", \"s\", array($token)) as $row) {\n\t\t\t\t$this->userid = $row[\"id\"];\n\t\t\t\t$this->rights['view_team'][]=$row[\"team_id\"];\n\t\t\t\tif($row[\"beheerder\"]) {\n\t\t\t\t\t$this->rights['edit_team'][]=$row[\"team_id\"];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($this->userid == null) {\n\t\t\t\theader(\"HTTP/1.1 401 Unauthorized\");\n\t\t\t\techo '{\"error\":\"Wrong token provided\"}';\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n }",
"public function __construct($api_token)\n {\n $this->api_token = 'Bearer ' . $api_token;\n }",
"private function getToken()\n {\n\n try {\n $result = $this->makeRequest($this->api_url.'/token','POST', [],[\n 'Accept: application/json',\n 'ClientKey: ' . $this->client_key,\n 'ClientSecret: ' . $this->client_secret\n ]);\n $this->token = $result['body']['data'];\n return $this;\n } catch (\\Exception $e) {\n return $e->getMessage();\n }\n\n }",
"public function __construct(){\n\t\t$this->client = new Client(['headers' => ['Authorization' => 'Bearer '.env('SENDGRID_API_KEY', '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'), 'Content-Type' => 'application/json']]);\n\t}",
"public function __construct()\n {\n $this->http = new Client(['timeout' => 2]);\n $this->user = env('ZODOMUS_USER');\n $this->password = env('ZODOMUS_PASSWORD');\n $this->credentials = base64_encode($this->user . ':' . $this->password);\n $this->api_url = env('ZODUMUS_API_URL');\n }",
"private function __construct()\n {\n $localhost=true;\n //$this->mApiKey='ABQIAAAAjvAdx3uLvexI2G5bkYepahQwp-bsalx-QHFJ3KX5HEBgBZfTQBQPhQ5PgqIYfvMrIIcYqeBzemnG7w';\n\t\t$this->mApiKey='ABQIAAAAjvAdx3uLvexI2G5bkYepahQGDwfolOEAvUGmNN27MQhUpy2Y5RRUEzl5y_D0iijy_5MdB5A1wd7qXw';\n if(!$localhost)\n {\n $this->mApiKey='ABQIAAAAjvAdx3uLvexI2G5bkYepahQcPyf2dOLSRs_M3CZpYgJ3TGWiohQJqe8T6pV9a5fEsB3cWr-w6wk7sQ';\n }\n }",
"function __construct()\n {\n parent::__construct();\n\n// if(!authCheck($this->post('auth'))){\n// returnFailedResponse();\n// exit();\n// }\n\n $this->check_auth_client = $this->tasks->check_auth_client();\n\n }",
"public function request_token() : object\n {\n $this->parameters = [\n 'headers' => [\n 'Content-Type' => 'application/x-www-form-urlencoded',\n 'User-Agent' => $this->config['DISCOGS_USER_AGENT'],\n 'Authorization' => 'OAuth oauth_consumer_key=' . $this->config['DISCOGS_CONSUMER_KEY']\n . ',oauth_nonce=' . time() . ',oauth_signature=' . $this->config['DISCOGS_CONSUMER_SECRET']\n . '&,oauth_signature_method=PLAINTEXT,oauth_timestamp=' . time() . ',oauth_callback='\n . $this->config['OAUTH_CALLBACK'],\n ],\n ];\n\n return $this->response('GET', \"/oauth/request_token\");\n }",
"public function getSessionAuthToken();",
"public function __construct()\n {\n $this->setApiKey();\n $this->setRequestOptions();\n }",
"public function __construct() {\n\t\t$this->default = EmailDsn::parse(env('EMAIL_URL'));\n\t\t$this->smtp = EmailDsn::parse(env('EMAIL_SMTP_URL'));\n\t\t$this->fast = EmailDsn::parse(env('EMAIL_FAST_URL'));\n\n\t\t$this->gmail = array(\n 'host' => 'smtp.sendgrid.net',\n 'port' => 587,\n\t\t'username' => 'apikey',\n 'password' => env('SENDGRID_KEY'),\n 'transport' => 'Smtp',\n\t\t'timeout' => 30,\n\t\t'client' => null,\n\t\t'log' => false,\n\t\t'tls' => true\n\t\t);\n\t}",
"function __construct()\n {\n //include_once(__DIR__ . '/Assets/nusoap.php');\n\n\n $this->merchant_id = config('saderat.merchant_id');\n $this->terminal_id = config('saderat.terminal_id');\n // set default invoice number\n $this->setInvoiceNumber(static::uniqueID());\n\n /**\n * get key resource to start based on public key\n */\n if (!$public_key = @file_get_contents(__DIR__ . '/Assets/merchant_public_key.txt'))\n throw new \\Exception('خطای دریافت کلید عمومی');\n\n if (!config()->has('saderat.private_key'))\n throw new \\Exception('تنظیمات مربوط به کلید خصوصی یافت نشد.');\n\n $this->private_key =\n '-----BEGIN PRIVATE KEY-----' . PHP_EOL .\n trim(config('saderat.private_key')) . PHP_EOL .\n '-----END PRIVATE KEY-----';\n\n $this->key_resource = openssl_get_publickey($public_key);\n }",
"private function setSettings() {\n $this ->setAccessToken( $this ->token );\n $this ->setAccountId( self::ACCOUNT_ID );\n }",
"public function __construct()\n {\n $this->rememberIdentifier = bin2hex(random_bytes(32));\n $this->enabled = '0';\n $this->confirmationToken = bin2hex(random_bytes(32));\n }",
"public function recuperaToken()\n {\n // por eso para propositos de prueba solo se usara el primer cliente\n $this->cliente=Cliente::find(1)->token;\n }",
"public function __construct()\n {\n// var_dump(\"UserName: \".$user->getId());\n// $this->tokenStorage = $tokenStorage;\n// $this->creator = $tokenStorage->getToken()->getUser();\n $this->created = new \\DateTime('now');\n $this->roles = ['ROLE_USER'];\n }",
"function __construct($consumer_key,$consumer_secret)\r\n\t{\r\n\t\t$this->consumer_key = $consumer_key;\r\n\t\t$this->consumer_secret = $consumer_secret;\r\n\t\t\r\n\t\t/* if registered, get user tokens from session*/\r\n\t\t$this->atoken = $_SESSION['oauth_access_token'];\r\n\t\t$this->atoken_secret = $_SESSION['oauth_access_token_secret'];\r\n\t}",
"function __construct($args) {\n if (!empty($args['api_root'])) {\n $this->api_root = $args['api_root'];\n } else {\n $this->api_root = '';\n }\n $this->consumer_key = $args['oauth_consumer_key'];\n $this->consumer_secret = $args['oauth_consumer_secret'];\n\n if (empty($args['request_token_api'])) {\n $this->request_token_api = $this->api_root . '/request_token';\n } else {\n $this->request_token_api = $args['request_token_api'];\n }\n\n if (empty($args['authorize_url'])) {\n $this->authorize_url = $this->api_root . '/authorize';\n } else {\n $this->authorize_url = $args['authorize_url'];\n }\n\n if (empty($args['access_token_api'])) {\n $this->access_token_api = $this->api_root . '/access_token';\n } else {\n $this->access_token_api = $args['access_token_api'];\n }\n\n if (!empty($args['oauth_callback'])) {\n $this->oauth_callback = new moodle_url($args['oauth_callback']);\n }\n if (!empty($args['access_token'])) {\n $this->access_token = $args['access_token'];\n }\n if (!empty($args['access_token_secret'])) {\n $this->access_token_secret = $args['access_token_secret'];\n }\n $this->http = new curl(array('debug'=>false));\n $this->http_options = array();\n }",
"public function __construct($config = null)\n {\n $clientId = is_null($config)? ApiInfos::$CLIENT_ID: $config->getCLIENTID();\n $secret = is_null($config)? ApiInfos::$SECRET_ID: $config->getSECRETID();\n $this->setClientId($clientId);\n $this->setClientSecret($secret);\n $this->getTokenFromConsumerKey();\n }",
"public function __construct()\n {\n $this->uid = null;\n $this->fields = array('username' => '',\n 'password' => '',\n 'emailAddr' => '',\n 'isActive' => false);\n }",
"public function __construct()\n {\n parent::__construct();\n\n /** @var Config $oConfig */\n $oConfig = Factory::service('Config');\n\n $this->authMfaMode = $oConfig->item('authTwoFactorMode');\n $aConfig = $oConfig->item('authTwoFactor');\n $this->authMfaConfig = $aConfig[$this->authMfaMode];\n }",
"public function __construct()\n {\n if (25 == func_num_args()) {\n $this->id = func_get_arg(0);\n $this->name = func_get_arg(1);\n $this->voa = func_get_arg(2);\n $this->voi = func_get_arg(3);\n $this->stateAgg = func_get_arg(4);\n $this->ach = func_get_arg(5);\n $this->transAgg = func_get_arg(6);\n $this->aha = func_get_arg(7);\n $this->accountTypeDescription = func_get_arg(8);\n $this->phone = func_get_arg(9);\n $this->urlHomeApp = func_get_arg(10);\n $this->urlLogonApp = func_get_arg(11);\n $this->oauth_Enabled = func_get_arg(12);\n $this->urlForgotPassword = func_get_arg(13);\n $this->urlOnlineRegistration = func_get_arg(14);\n $this->mclass = func_get_arg(15);\n $this->specialText = func_get_arg(16);\n $this->specialInstructions = func_get_arg(17);\n $this->address = func_get_arg(18);\n $this->currency = func_get_arg(19);\n $this->email = func_get_arg(20);\n $this->status = func_get_arg(21);\n $this->newInstitutionId = func_get_arg(22);\n $this->branding = func_get_arg(23);\n $this->oauth_InstitutionId = func_get_arg(24);\n }\n }",
"public function __construct()\n {\n $this->name = \"Andres Felipe\";\n $this->email = \"[email protected]\";\n }",
"public function __construct()\n {\n $this->httpClient = new Client(['handler' => $this->setHandler(self::$connection->getAuthorizationToken())]);\n }",
"private function getToken() {\n\t // CHECK API and get token\n\t\t$post = [\n\t\t\t'grant_type' => 'password',\n\t\t\t'scope' => 'ost_editor',\n\t\t\t'username' => 'webmapp',\n\t\t\t'password' => 'webmapp',\n\t\t\t'client_id' => 'f49353d7-6c84-41e7-afeb-4ddbd16e8cdf',\n\t\t\t'client_secret' => '123'\n\t\t];\n\n\t\t$ch = curl_init('https://api-intense.stage.sardegnaturismocloud.it/oauth/token');\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\n\t\t$j=json_decode($response,TRUE);\n\t\t$this->token=$j['access_token'];\n\t}",
"public function getToken();",
"public function getToken();",
"public function getToken();",
"public function getToken();",
"public function __construct($token, $notifiable)\n {\n $this->token = $token;\n $this->notifiable = $notifiable;\n }",
"public function getTokenAuth()\n {\n \treturn $this->_token_auth;\n }",
"function __construct()\r\n {\r\n $this->id = 0;\r\n $this->name = \"\";\r\n $this->surname = \"\";\r\n $this->username = \"\";\r\n $this->email = \"\";\r\n $this->password = \"\";\r\n }",
"public function getAuthToken()\n {\n return $this->authToken;\n }",
"public function getAuthToken()\n {\n return $this->authToken;\n }",
"function setAuthToken($AuthToken)\n {\n \t$this->_authToken =$AuthToken;\n }",
"public function __construct($config = array())\n\t{\n\t\t// Clean up the salt pattern and split it into an array\n\t\t$config['salt_pattern'] = preg_split('/,\\s*/', $config['salt_pattern']);\n\n\t\t// Check model name: it should be string and should not contain the model prefix\n\t\tif (isset($config['model_name']) AND is_string($config['model_name']))\n\t\t\t$config['model_name'] = str_ireplace('model_', '', strtolower($config['model_name']));\n\t\telse\n\t\t\t$config['model_name'] = 'user';\n\n\t\t// Save the config in the object\n\t\t$this->_config = $config;\n\n\t\t// Set token model name and check model existence\n\t\t$this->_config['token_model_name'] = $this->_config['model_name'].'_token';\n\n\t\t$model_class = 'Model_'.$this->_config['token_model_name'];\n\n\t\tif ($this->_config['autologin_cookie'] AND ! class_exists($model_class))\n\t\t{\n\t\t\tthrow new Kohana_Exception ('Could not find token model class :name', array(':name' => $model_class));\n\t\t}\n\n\t\t$this->_session = Session::instance();\n\t}",
"public function authClientUser(){\n\n\t\t$token = Input::get('token');\n\t\t$tokenExists = TokenModel::where('token = ?', $token)\n\t\t\t\t\t\t\t\t\t->all();\n\t\t//invalid token used/no access token provided\n\t\tif (!$tokenExists->num_rows()) {\t\t \n\t\t\theader('HTTP/1.0 403 Forbidden');\n\t\t\tdie('Login required!1');\n\t\t}\n\t\t//check for expired token\n\t\telseif ($tokenExists->result_array()[0]['logout'] === true) {\n\t\t\theader('HTTP/1.0 403 Forbidden');\n\t\t\tdie('Login required!2');\n\t\t}\n\t\t//unathorized user access to admin controller\n\t\telseif ($tokenExists->result_array()[0]['user_role'] != 3 AND $tokenExists->result_array()[0]['user_role'] != 4) {\n\t\t\theader('HTTP/1.0 401 Unauthorized'); \n\t\t\tdie('Restricted access!');\n\t\t}\n\t\telse {\n\t\t\t//check for expired timestamp\n\t\t\t$token = $tokenExists->result_array()[0];\n\t\t\t$timestamp = strtotime($token['date_modified'] OR $token['date_created']);\n\n\t\t\tif (($timestamp + $token['duration']) > time()) {\n\t\t\t\theader('HTTP/1.0 403 Forbidden');\n\t\t\t\tdie('Login required!3');\n\t\t\t}\n\n\t\t\t//extend token lifespan\n\t\t\tTokenModel::where('id = ?', $token['id'])\n\t\t\t\t\t\t->save(array(\n\t\t\t\t\t\t\t'duration' => 3600\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t//set the value of the client id\n\t\t\t$this->client_id = $token['client_id'];\n\n\t\t}\n\n\t}",
"public function __construct() {\n $dotenv = new Dotenv();\n $dotenv->load(dirname(__DIR__).'/.env');\n\n $this->api = new Api($_ENV['CLODUI_API']);\n\n $client_id = $_ENV['CLODUI_CLIENT_ID'];\n $user_pool_id = $_ENV['CLODUI_USER_POOL_ID'];\n $identity_pool_id = $_ENV['CLODUI_IDENTITY_POOL_ID'];\n\n Logger::debug('Config Client ID '. $client_id. ', User pool id '. $user_pool_id. ', Identity pool id '. $identity_pool_id);\n $this->auth = new Auth($client_id, $user_pool_id, $identity_pool_id);\n }",
"public function __construct()\n {\n// $paypal_conf = \\Config::get('paypal');\n// $this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n// $this->_api_context->setConfig($paypal_conf['settings']);\n }",
"public function setAuthParams()\n {\n if( $this->getUseSession() )\n {\n // FIXME Need to add session functionality\n }\n else\n {\n $this->getHttpClient()->setParameterGet( 'user', $this->getUsername() );\n $this->getHttpClient()->setParameterGet( 'password', $this->getPassword() );\n $this->getHttpClient()->setParameterGet( 'api_id', $this->getApiId() );\n }\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->endpoint = config('untappd.endpoint');\n\n $this->client_id = config('untappd.client_id');\n\n $this->secret = config('untappd.secret');\n\n $this->brewery_id = config('untappd.brewery_id');\n\n $this->params = [];\n }",
"public function __construct()\n { \n //New GuzzleHttp Client\n $this->http_client= new \\GuzzleHttp\\Client([\n 'base_uri' => 'http://127.0.0.1:8000'\n ]);\n\n\n //INITIALIZE Request Path\n $this->request_path= '/api';\n\n //INITIALIZE Request Body\n $this->request_body= [];\n\n }",
"public function __construct(){\n $this->codigo = null;\n $this->entidad = array('usuario' => '',\n 'password' => '');\n }",
"public function __construct($vendor) {\n $this->setEnvironment($vendor);\n //get the AccessToken from PC\n //$this->checkForAccessToken();\n\n }",
"abstract public function credentials();",
"public function __construct()\n {\n parent::__construct();\n\n $this->config = config('gitception');\n\n if(!$this->config['email'] || !$this->config['password']){\n return;\n }\n\n $email = Crypt::decrypt($this->config['email']);\n $password = Crypt::decrypt($this->config['password']);\n\n $this->bitbucket = new Issues();\n $this->bitbucket->setCredentials(new Basic($email, $password));\n }"
] | [
"0.6583158",
"0.6470143",
"0.641855",
"0.64160603",
"0.63310164",
"0.6313332",
"0.630198",
"0.6249095",
"0.61161524",
"0.61111426",
"0.6107594",
"0.61038476",
"0.6066762",
"0.60335946",
"0.6002458",
"0.60008997",
"0.59723395",
"0.5966116",
"0.59412235",
"0.5929867",
"0.5901297",
"0.58820313",
"0.5868245",
"0.5865389",
"0.5846857",
"0.5832233",
"0.583152",
"0.58170927",
"0.5805834",
"0.5804215",
"0.5784682",
"0.5777092",
"0.57702863",
"0.5764",
"0.5762321",
"0.57504636",
"0.5743878",
"0.570842",
"0.5697613",
"0.56939816",
"0.56911665",
"0.5673315",
"0.56674665",
"0.56644464",
"0.5659052",
"0.56584704",
"0.5657008",
"0.5655192",
"0.56460196",
"0.563315",
"0.56255573",
"0.5618943",
"0.5613531",
"0.5613131",
"0.5610468",
"0.56039584",
"0.56004703",
"0.5586755",
"0.5586514",
"0.558418",
"0.5575694",
"0.5571285",
"0.55708206",
"0.55706817",
"0.5565929",
"0.55640125",
"0.5559963",
"0.5559549",
"0.55595434",
"0.5556744",
"0.5553668",
"0.5550463",
"0.5544532",
"0.5543579",
"0.55366015",
"0.55333126",
"0.5529971",
"0.5525014",
"0.55145377",
"0.55085415",
"0.55085415",
"0.55085415",
"0.55085415",
"0.5506339",
"0.5497602",
"0.5497122",
"0.54897785",
"0.54897785",
"0.54835546",
"0.54796976",
"0.54750764",
"0.54727876",
"0.54700446",
"0.54632294",
"0.54617804",
"0.5461087",
"0.54603934",
"0.5458612",
"0.5457247",
"0.5457188"
] | 0.69774234 | 0 |
Gets lists of invoices. $filter_by: Filter invoices by any status or payment expected date. Allowed Values: Status.All, Status.Sent, Status.Draft, Status.OverDue, Status.Paid, Status.Void, Status.Unpaid, Status.PartiallyPaid, Status.Viewed and Date.PaymentExpectedDate. | public function index($filter_by=null)
{
// dd($filter_by);
$this->get(null, $filter_by);
// return ;
return ['data'=> $this->itemList];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDraftInvoicesList(InvoiceListingFilter $filter): Collection;",
"public function getUnpaidInvoicesList(InvoiceListingFilter $filter): Collection;",
"public function getOverdueInvoicesList(InvoiceListingFilter $filter): Collection;",
"public function invoices(Request $request)\n {\n $user = $request->user();\n $currentCompany = $user->currentCompany();\n \n $invoices = Invoice::findByCompany($currentCompany->id)\n ->findByCustomer($request->customer_id)\n ->unpaid()\n ->where('due_amount', '>', 0)\n ->select('id', 'invoice_number AS text', 'due_amount')\n ->get();\n\n return response()->json($invoices);\n }",
"public function getInvoices(User $user);",
"public function getInvoices()\n {\n $users = User::where('role_id', '=', 2)->lists('id')->toArray();\n $invoices = Invoice::whereIn('user_id', $users);\n\n return Datatables::of($invoices)\n ->editColumn('id', function ($invoice) {\n return '<a href=\"' . url('admin/invoices/' . $invoice->id) . '\">' . $invoice->id . '</a>';\n })\n ->addColumn('member_id', function ($invoice) {\n return $invoice->user->id;\n })\n ->editColumn('created_at', function ($invoice) {\n return Carbon::parse($invoice->created_at)->format('d-M-Y');\n })\n ->addColumn('due_date', function ($invoice) {\n if ($invoice->status == 'paid') {\n return 'Paid';\n }\n\n $formattedDueDate = Carbon::parse(explode(' ', $invoice->due_date)[0]);\n $formattedNowDate = Carbon::parse(explode(' ', Carbon::now())[0]);\n\n if ($formattedDueDate->eq($formattedNowDate))\n return 'Today';\n else if ($formattedDueDate->lt($formattedNowDate))\n return Carbon::parse($invoice->due_date)->diffForHumans();\n\n return Carbon::parse($invoice->due_date)->format('d-M-Y');\n })\n ->editColumn('total', function ($invoice) {\n return '$' . number_format($invoice->total, 2);\n })->addColumn('store_code', function ($invoice) {\n return isset($invoice->store_payment->code) ? $invoice->store_payment->code : '-';\n })\n ->editColumn('status', function ($invoice) {\n if ($invoice->status == 'paid') {\n return '<div class=\"invoice-stat-col\" style=\"color:#c12036;\">' .\n '<i class=\"check-icon\" aria-hidden=\"true\"></i>' .\n '<span>Paid</span>' .\n '</div>';\n } else if ($invoice->status == 'pending') {\n return '<div class=\"invoice-stat-col\" style=\"color:#d98800;\">' .\n '<i class=\"fa fa-clock-o\" aria-hidden=\"true\"></i>' .\n '<span>Pending approval</span>' .\n '</div>';\n } else if ($invoice->status == 'draft') {\n return '<div class=\"invoice-stat-col\" style=\"color:#0081d9;\">' .\n '<i class=\"fa fa-clipboard\" aria-hidden=\"true\"></i>' .\n '<span>Draft</span>' .\n '</div>';\n }\n\n return '<div class=\"invoice-stat-col\">' .\n '<i class=\"x-icon\" aria-hidden=\"true\"></i>' .\n '<span>Unpaid</span>' .\n '</div>';\n })\n ->addColumn('action', function ($invoice) {\n if ($invoice->status == 'draft')\n return '<a class=\"btn btn-primary\" href=\"' .\n url('admin/invoices/' . $invoice->id . '/send-invoice') .\n '\">Send Invoice</a>';\n\n if ($invoice->status == 'pending') {\n $btns = '<a class=\"btn btn-outline\" href=\"' .\n url('admin/invoices/' . $invoice->id . '/mark-as-payed') .\n '\">Mark as paid</a>';\n return $btns;\n }\n\n\n return '';\n })\n ->make(true);\n }",
"static function getInvoices($searchParams, &$totalResults) {\n\t\t\n\t\t\tif (!isset($searchParams['limit'])) {\n\t\t\t\t$searchParams['limit'] = 0;\n\t\t\t}\n\t\t\tif (!isset($searchParams['offset'])) {\n\t\t\t\t$searchParams['offset'] = 0;\n\t\t\t}\n\t\t\t\n\t\t\t$whereConditions = \"\";\n\t\t\t\n\t\t\t\n\t\t\tif ((isset($searchParams['invoiceDateFrom'])) && ($searchParams['invoiceDateFrom'] != '')) {\n\t\t\t\t$whereConditions .= \" AND i.invoice_date >= '\" . DMDatabase::escape($searchParams['invoiceDateFrom']) . \"'\";\n\t\t\t}\n\t\t\tif ((isset($searchParams['invoiceDateTo'])) && ($searchParams['invoiceDateTo'] != '')) {\n\t\t\t\t$whereConditions .= \" AND i.invoice_date <= '\" . DMDatabase::escape($searchParams['invoiceDateTo']) . \"'\";\n\t\t\t}\n\t\t\tif ((isset($searchParams['invoice_archived'])) && ($searchParams['invoice_archived'] > -1)) {\n\t\t\t\t$whereConditions .= ' AND i.invoice_archived = ' . (int) $searchParams['invoice_archived'];\n\t\t\t}\n\t\t\t\n\t\t\t$myQuery = \"\n\t\t\t\tSELECT SQL_CALC_FOUND_ROWS i.*\n\t\t\t\tFROM fh_invoice AS i\n\t\t\t\tWHERE 1 = 1\n\t\t\t\t$whereConditions\n\t\t\t\tORDER BY i.invoice_date DESC, i.invoice_code DESC\n\t\t\t\";\n\t\t\t\n\t\t\t$results = DMDatabase::loadObjectList($myQuery, $searchParams['offset'], $searchParams['limit']);\n\t\t\t\n\t\t\t$totalResults = DMDatabase::loadResult(\"SELECT FOUND_ROWS();\");\n\t\t\t\n\t\t\treturn $results;\n\t\t\t\n\t\t}",
"public function getAllInvoicesList(InvoiceListingFilter $filter): Builder;",
"public function getInvoices() {\n $result = ChargeBee_Invoice::invoicesForSubscription($this->user->subscription_id, array(\"limit\" => 20));\n\n return $result;\n }",
"public function retrieveallinvoices(Request $request)\n {\n $invoices = Invoice::latest()->get();\n\n return InvoicesResource::collection($invoices);\n }",
"public function readAllInvoices() {\r\n //get authorisation from headers\r\n $headers = getallheaders();\r\n $auth = $headers[\"Authorization\"];\r\n\r\n //check authorization\r\n $role = $this->authenticate($auth);\r\n if ($role !== 'trader') {\r\n throw new RestException(401, \"Unauthorized\");\r\n }\r\n\r\n $sql = \"SELECT * FROM invoice WHERE traderid = '{$this->getTraderID($auth)}'\";\r\n $invoices = Invoice::find_by_sql($sql);\r\n if (!$invoices) {\r\n throw new RestException(400, \"no invoices\");\r\n }\r\n return $invoices;\r\n }",
"public static function getPendingInvoices($reader_id){\n $sql = 'SELECT t1.*,SUM(`Total`) as amount\n FROM\n (\n SELECT inv.*\n FROM `reader_invoice` as inv\n WHERE `reader_status` = 0\n and `Reader_id`= '.$reader_id.'\n ORDER BY `Year` DESC, `Month` DESC, `Period` DESC\n )\n t1\n GROUP BY `Earning_type`';\n $connection=Yii::app()->db;\n $command=$connection->createCommand($sql);\n $invoices = $command->query();\n\n return $invoices;\n }",
"public function getInvoices(Request $request)\n {\n $account_balance = $this->recurlyService->getAccountBalance($request->user());\n $past_due = 0;\n $user_identifier = Auth::user()->user_identifier;\n $recurlyInvoices = $this->recurlyService->getInvoicesForAccount($user_identifier);\n\n $invoices = [];\n foreach($recurlyInvoices as $invoice) {\n if ($invoice->state != 'collected' && $invoice->state != 'failed') {\n $past_due = $past_due + $invoice->total_in_cents;\n }\n $invoices[$invoice->invoice_number]['invoice_number'] = $invoice->invoice_number;\n $count = count($invoice->line_items);\n $invoices[$invoice->invoice_number]['description'] = isset($invoice->line_items[$count-1]) ? $invoice->line_items[$count-1]->description : null;\n if (is_null($invoices[$invoice->invoice_number]['description'])) $invoices[$invoice->invoice_number]['description'] = $invoice->line_items[0]->description;\n if ($invoice->subscription) {\n $href = $invoice->subscription->getHref();\n $subscription_id = substr($href, strrpos($href, '/')+1);\n $invoices[$invoice->invoice_number]['subscription_id'] = $subscription_id;\n } else {\n $invoices[$invoice->invoice_number]['subscription_id'] = '';\n }\n $invoices[$invoice->invoice_number]['created_at'] = $invoice->created_at ? $invoice->created_at->format('M d Y') : null;\n $invoices[$invoice->invoice_number]['closed_at'] = $invoice->closed_at ? $invoice->closed_at->format('M d Y') : null;\n $invoices[$invoice->invoice_number]['state'] = $invoice->state;\n $invoices[$invoice->invoice_number]['total_in_cents'] = number_format($invoice->total_in_cents / 100, 2, '.', '');\n $invoices[$invoice->invoice_number]['value'] = $invoice->total_in_cents;\n }\n $credit_value = $account_balance + $past_due;\n $selected_uuid = $request->get('uuid');\n return view('billing.invoices', ['invoices'=>$invoices, 'selected_uuid'=>$selected_uuid, 'credit_value'=>$credit_value/100, 'past_due'=>$past_due]);\n }",
"public function getVendorPayableInvoices(Request $request, $vendor_id)\n {\n //Set Sort by & Sort by Column\n $sortBy = Helper::setSortByValue($request);\n\n //Set Per Page Record\n $per_page = Helper::setPerPage($request);\n\n $payable = PayableInvoice::where(VENDOR_ID,$vendor_id);\n return $this->response->paginator($payable->orderBy($sortBy['column'], $sortBy['order'])->paginate($per_page), new PayableInvoiceTransformer());\n }",
"function invoiceReport($status=\"\")\n {\n $condition = \"\";\n if(!empty($status) && !$this->rAllDate)\n {\n $condition = \" AND {$this->props->tbl_invoices}.`due_date` >= '\".$this->utils->quoteSmart($this->rFromDate).\"' AND {$this->props->tbl_invoices}.`due_date` <= '\".$this->utils->quoteSmart($this->rToDate).\"' AND {$this->props->tbl_invoices}.`status` = '\".$this->utils->quoteSmart($status).\"'\";\n }\n elseif(!empty($status) && $this->rAllDate)\n {\n $condition = \" AND {$this->props->tbl_invoices}.`status` = '\".$this->utils->quoteSmart($status).\"'\";\n }\n elseif(!$this->rAllDate)\n {\n $condition = \" AND {$this->props->tbl_invoices}.`due_date` >= '\".$this->utils->quoteSmart($this->rFromDate).\"' AND {$this->props->tbl_invoices}.`due_date` <= '\".$this->utils->quoteSmart($this->rToDate).\"'\";\n }\n $sql = \"SELECT * FROM {$this->props->tbl_invoices} \" .\n \"LEFT JOIN {$this->props->tbl_orders_invoices} ON {$this->props->tbl_orders_invoices}.invoice_id = {$this->props->tbl_invoices}.invoice_no \" .\n \"LEFT JOIN {$this->props->tbl_orders} ON {$this->props->tbl_orders_invoices}.order_id = {$this->props->tbl_orders} .sub_id \" .\n \"LEFT JOIN {$this->props->tbl_customers_orders} ON {$this->props->tbl_customers_orders}.order_id = {$this->props->tbl_orders_invoices}.order_id \" .\n \"LEFT JOIN {$this->props->tbl_customers} ON {$this->props->tbl_customers_orders}.customer_id = {$this->props->tbl_customers}.id \" .\n \"WHERE {$this->props->tbl_invoices}.`status`!='Deleted'\".$condition;\n $data = array();\n $temp = $this->dbL->executeSELECT($sql);\n foreach($temp as $k=>$inv)\n {\n foreach($this->rColumns as $c)\n {\n $data[$k][$c] = $inv[$c];\n }\n }\n return $data;\n }",
"public function getInvoices()\n {\n return (array) $this->invoices;\n }",
"public function getInvoices(array $params) : array {\n\n $query = $this->validateGetInvoices($params);\n\n if (array_key_exists('supplierId', $params) && count($params['supplierId']) > 0){\n foreach ($params['supplierId'] as $supplier){\n $query .= \"&supplierId=\".$supplier;\n }\n }\n\n $invoices = $this->request('/resto/api/documents/export/incomingInvoice', $this->key, 'GET', [], $query);\n\n $invoiceList = new SimpleXMLElement($invoices);\n $i = 0;\n foreach ($invoiceList->document as $inv){\n $this->invoices[] = new InvoiceObject(\n strval($inv->id),\n strval($inv->transportInvoiceNumber),\n strval($inv->incomingDate),\n strval($inv->supplier),\n strval($inv->defaultStore),\n strval($inv->dateIncoming),\n strval($inv->documentNumber),\n strval($inv->incomingDocumentNumber),\n strval($inv->conception),\n strval($inv->status),\n strval($inv->distributionAlgorithm)\n );\n\n foreach ($inv->items->item as $item) {\n $this->invoices[$i]->items[] = new InvoiceItemObject(\n strval($item->product),\n strval($item->productArticle),\n strval($item->supplierProduct),\n strval($item->supplierProductArticle),\n floatval($item->amount),\n strval($item->amountUnit),\n floatval($item->actualAmount),\n strval($item->store),\n strval($item->code),\n floatval($item->price),\n floatval($item->priceWithoutVat),\n floatval($item->sum),\n floatval($item->vatPercent),\n floatval($item->vatSum),\n floatval($item->discountSum),\n strval($item->num)\n );\n }\n\n\n $i++;\n }\n\n return $this->invoices;\n\n }",
"public function whmcs_get_invoices($params = array()) {\n\t\t$params['action'] = 'GetInvoices';\n\t\t// return Whmcs_base::send_request($params);\n $load = new Whmcs_base();\n return $load->send_request($params);\n\t}",
"public function get_invoices( $page ) {\n \n // Check if the session exists and if the login user is admin\n $this->check_session($this->user_role, 1);\n\n // Check if data was submitted\n if ($this->input->post()) {\n \n // Add form validation\n $this->form_validation->set_rules('user', 'User', 'trim');\n $this->form_validation->set_rules('from_date', 'From Date', 'trim');\n $this->form_validation->set_rules('to_date', 'To Date', 'trim');\n \n // Get data\n $user = $this->input->post('user');\n $from_date = $this->input->post('from_date');\n $to_date = $this->input->post('to_date');\n \n // Check form validation\n if ( $this->form_validation->run() != false ) {\n \n $page --;\n $limit = 10;\n \n // Set default user_id\n $user_id = 0;\n \n // Verify if user exists\n if ( $user ) {\n \n // Get user by search\n $response = $this->invoice->get_user_by_username_or_email( $user );\n \n if ( $response ) {\n \n $user_id = $response[0]->user_id;\n \n } else {\n \n // Stop running the script\n exit();\n \n }\n \n }\n \n // Set date from\n $date_from = 0;\n \n // Verify if $from_date is not empty\n if ( $from_date ) {\n \n $date_from = $from_date;\n \n }\n \n // Set date to\n $date_to = 0;\n \n // Verify if $to_date is not empty\n if ( $to_date ) {\n \n $date_to = $to_date;\n \n } \n \n // Now get total number of invoices\n $total = $this->invoice->get_invoices( $page * $limit, $limit, $user_id, $date_from, $date_to, false );\n \n // Now get all invoices\n $invoices = $this->invoice->get_invoices( $page * $limit, $limit, $user_id, $date_from, $date_to, true );\n \n if ( $invoices ) {\n \n echo json_encode(['invoices' => $invoices, 'total' => $total]);\n \n }\n \n }\n \n }\n \n }",
"public function invoices_by_status_1()\n {\n\n $invoices = Invoice::where(\"value_status\", 1)->orderBy('id', 'desc')->get();\n return view('admin.invoices.index', compact('invoices'));\n\n }",
"public function browseInvoices(Request $request) {\n if ($request->expectsJson()) {\n $params = $request->params;\n $params['page'] = intval($params['page']);\n $params['service_period'] = date('Y-m-d', strtotime($params['service_period']));\n\n $id = !is_null($request->id) ? $request->id : null; \n /*\n * I have created a helper to receive API data \n * @params will contain 'page_id' to define on which page we are\n * 'start_date' and 'end_date' to get data for certain period.\n * ID - to view one specific invoice.\n */\n $invoices = Helper::apiData($id, $params);\n\n return response()->json(json_decode($invoices));\n }\n }",
"public function get_invoices( ) {\n\n $invoiceArray = $this->mockinvoice_model->get_invoices( $this->input->post( 'jobId' ) );\n\n if ( !empty( $invoiceArray ) ) {\n $invoiceHTML = create_invoice_html( $invoiceArray );\n // Push the HTML for the invoice tables onto the array being returned\n $invoiceArray[] = array( 'mockInvoiceId' => '', 'readyToInvoice' => '', 'archived' => '', 'invoiceHTML' => $invoiceHTML );\n }\n\n // Send back the timesheet settings as JSON.\n $this->json_library->print_array_json( $invoiceArray );\n }",
"public function getInvoices($options = array())\n {\n return $this->getListe(\"invoices\", $options);\n }",
"function InfGetInvoices($inf_contact_id, $pay_status = 0) {\n\t$object_type = \"Invoice\";\n\t$class_name = \"Infusionsoft_\" . $object_type;\n\t$object = new $class_name();\n\t$objects = Infusionsoft_DataService::query(new $class_name(), array('ContactId' => $inf_contact_id, 'PayStatus' => $pay_status));\n\n $invoices_array = array();\n foreach ($objects as $i => $object) {\n\t\t// Give it a userful index, ie, inf_invoice_id\n\t\t$array = $object->toArray();\n $invoices_array[$array['Id']] = $array;\n }\n\treturn $invoices_array; \n}",
"public function invoices()\n {\n //\n $invoices = Invoice::orderBy('updated_at','DESC')->get();\n return view('reports.invoice',['invoices'=>$invoices]);\n }",
"public function getAllInvoicesFromWebSerice() {\n $response = $this->_XeroOAuth->request('GET', $this->_XeroOAuth->url('Invoices', 'core'), array());\n if ($this->_XeroOAuth->response['code'] == 200) {\n $invoices = $this->_XeroOAuth->parseResponse($this->_XeroOAuth->response['response'], $this->_XeroOAuth->response['format']);\n return $invoices;\n } else {\n \\De\\Log::logApplicationInfo ( \"Caught Exception: \" . urldecode($response['response']) . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n }\n }",
"public function invoicesIncludingPending(array $parameters = [])\n {\n return $this->invoices(true, $parameters);\n }",
"public function index(Request $request)\n {\n $search_command = $request->get('search');\n $page_title = 'Invoice';\n $page_description = 'Invoice listing';\n $customers = Customer::all();\n $cust = $request->has('search_by_customer') ? $request->input('search_by_customer') : null;\n $status = $request->has('search_by_status') ? $request->input('search_by_status') : null;\n $date_s = $request->has('search_by_start_date') ? $request->input('search_by_start_date') : null;\n $date_e = $request->has('search_by_end_date') ? $request->input('search_by_end_date') : null;\n $lookupcustomers = array();\n foreach ($customers as $k => $v) {\n $lookupcustomers[$v->customer_number] = $v->customer_name;\n }\n\n $invoice_number = Invoice::max('invoice_number');\n $custom_invoice_number = CustomInvoice::max('custom_invoice_number');\n if($invoice_number == null){\n $invoice_number = \"INV101\";\n \n }else{\n $invoice_number = (int)(substr($invoice_number,3));\n $invoice_number = $invoice_number + 1;\n $invoice_number = \"INV\".$invoice_number;\n }\n if($custom_invoice_number == null){\n $custom_invoice_number = \"CINV1001\";\n \n }else{\n $custom_invoice_number = (int)(substr($custom_invoice_number, 4));\n $custom_invoice_number = $custom_invoice_number + 1;\n $custom_invoice_number = \"CINV\".$custom_invoice_number;\n }\n if($search_command == 'command_search') {\n $prepareSearch = new SearchParamInvoice;\n $prepareSearch->fill($request->all());\n\n $qry = $this->invoiceManager::getBaseQuery();\n $preparedSearch = SearchParamInvoice::prepareSearch($qry, $prepareSearch->toArray());\n $invoices = $preparedSearch->get();\n } else {\n $invoices = DB::table('invoices')\n ->leftJoin('customers', 'customers.customer_number', '=', 'invoices.customer_id')\n ->leftJoin('projects', 'projects.project_number', '=', 'invoices.project_id')\n ->where('invoice_status', '=', 'Open')\n ->get();\n }\n\n return view('invoice.index', compact('invoices', 'page_title', 'page_description', 'invoice_number', 'custom_invoice_number', 'lookupcustomers','cust','date_s','date_e','status'));\n }",
"static function getAllInvoices($pid)\n {\n $invoices = [];\n global $db;\n try {\n $db->where('project_id', $pid);\n $db->where('deleted_at', NULL, 'IS');\n $invoices = $db->get('invoice');\n } catch (\\Exception $exception) {\n Log::write($exception, $db->getLastError());\n }\n\n return $invoices;\n }",
"public function get_all_invoice($table, $where, $per_page, $page)\n\t{\n\t\t//retrieve all invoice\n\t\t$this->db->from($table);\n\t\t$this->db->select('invoice.*, invoice.invoice_status_id AS status,member.member_first_name AS first_name, member.member_surname AS other_names, invoice_status.invoice_status_name');\n\t\t$this->db->where($where);\n\t\t$this->db->order_by('invoice.created, invoice.invoice_number');\n\t\t$query = $this->db->get('', $per_page, $page);\n\t\t\n\t\treturn $query;\n\t}",
"public function index(SearchInvoice $request): ResourceCollection\n {\n return $this->doList($request);\n }",
"public function getInvoices(?GetInvoices $getInvoices = null): array\n {\n $params = $getInvoices ? $getInvoices->toArray() : [];\n $out = $this->request('getInvoices', ['query' => $params]);\n\n if (!isset($out['result']['items'])) {\n return [];\n }\n\n return array_map(static function($item) {\n return new Invoice($item);\n }, $out['result']['items']);\n }",
"public function index(Request $request)\n {\n $perPage = request('perPage', 250);\n return view('invoices.index')->with('invoices', Invoice::orderBy('id', 'DESC')->paginate($perPage))\n ->with('trashed', false)\n ->with('selected', $perPage)\n ->with('invoicestatuses', InvoiceStatus::all(['id', 'status']));\n }",
"public function search_through(Request $request)\n {\n $reports = Payment::query();\n\n if (!empty($request->query())) {\n foreach ($request->query() as $key => $value) {\n if ($key == 'date') {\n $reports->whereDate('created_at', '>=', $value);\n } else {\n $reports->where($key, $value);\n }\n }\n }\n\n return $reports->get();\n }",
"public function get_invoice_list()\n {\n return $this->db->select('sr_no, invoice_no, round_off_total, invoice_date, bakery_name,bakery_address, bakery_area, bakery_city')->order_by('sr_no','desc')\n ->from('insider_bill')->join('customers', 'customers.id = insider_bill.customer_id')->get();\n }",
"public function invoicesStatement(array $params = [])\n {\n $this->setParams($params)->sendApiRequest('GET', 'accounts/invoices');\n\n return $this->fetchResponse();\n }",
"function invoices ($user_id) {\n global $sql;\n return $sql->sql_select_array_query(\"SELECT * FROM `invoice` WHERE user_id = '{$user_id}' ORDER BY invoice_date DESC\");\n }",
"public function getPendingInvoices(){\n\t \t $this->db->select(\"OSC.*, OC.invoice_no, OC.order_id, CO.order_number\");\n\t\t\t$this->db->from(\"order_challan_shipping AS OSC\");\n\t\t\t$this->db->join('order_challan AS OC', 'OC.challan_no = OSC.challan_no');\t\n\t\t\t$this->db->join('client_orders AS CO', 'CO.order_id = OC.order_id');\t\n\t\t\t$this->db->where(\"OSC.account_confirmed\",\"0\");\n\t\t\t$this->db->where(\"OC.invoice_no <>\",\"0\");\n\t\t\t$this->db->group_by('OC.challan_no');\t\t\t\n\t\t\t$this->db->order_by('OSC.id DESC');\n\t\t\t$query_pending_invoices = $this->db->get();\n\t\t\t//echo $this->db->last_query();die;\n\t\t\tif($query_pending_invoices->num_rows()>0)\n\t\t\t{\n\t\t\t\treturn $query_pending_invoices->result_array();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn array();\n\t\t\t}\n\t }",
"public function invoices() {\n return new Invoice($this);\n }",
"public function invoices(Invoice $invoice)\n {\n $range = explode('-', $this->request->range);\n $start_date = date('Y-m-d', strtotime($range[0]));\n $end_date = date('Y-m-d', strtotime($range[1]));\n $this->request->request->add(['date_range' => [$start_date, $end_date]]);\n $invoices = $invoice->apply($this->request->except(['range']))->with(['company:id,name'])->get();\n $html = view('analytics::_ajax._invoices', compact('invoices'))->render();\n\n return response()->json(['status' => 'success', 'html' => $html, 'message' => 'Processed successfully'], 200);\n }",
"public function invoicestatus(Request $request)\n {\n if ($request->ajax()) {\n return InvoiceStatus::all('id', 'status');\n }\n }",
"public function invoices() {\t\t\r\n\t\t\r\n $user = $this->session->userdata('user');\r\n if ($user['UserType'] == 'TYPE_CLI' && empty($user['AccountantAccess'])) {\r\n //setRedirect(site_url());\r\n } else {\r\n if (isset($_GET['clientID'])) {\r\n checkUserAccess(array('TYPE_ACC', 'TYPE_CLI'));\r\n } else {\r\n checkUserAccess(array('TYPE_CLI'));\r\n }\r\n }\r\n\t\t\r\n\t\t$page = ($this->uri->segment(2)) ? $this->uri->segment(2) : 0;\r\n $user = $this->session->userdata('user');\t\r\n\t\t$VATYear = $this->session->userdata('VATYear');\r\n\t\t$quaters = vatQuaters($user['Params']['VATQuaters']);\r\n\t\t\t\t\r\n /* \tGet the customer list of the company. */\r\n $data['users'] = $this->clients->getUserList();\r\n\r\n $items = $this->clients->getInvoiceList(INVOICE_PAGINATION_LIMIT, $page);\r\n $data['Invoices'] = $items;\r\n //pr($data['Invoices']);\r\n $PaidVatQuarters = $this->clients->getPaidVatQuarters();\r\n\t\t$VATitems = $this->clients->getAllInvoices();\r\n $vat_listing = $this->clients->getVatType();\r\n\t\t\r\n $data['EXPitems'] = false;\r\n if($vat_listing->Type != 'flat') {\r\n $this->load->model('clients/expense');\r\n $EXPitems = $this->expense->getAllExpenses();\r\n $data['EXPitems'] = $EXPitems;\r\n }\r\n //echo '<pre>';print_r($PaidVatQuarters);echo '</pre>';die();\r\n\t\t//echo '<pre>';print_r($VATitems);echo '</pre>';//die();\r\n $data['VATitems'] = $VATitems;\r\n $data['PaidVatQuarters'] = $PaidVatQuarters;\r\n\r\n $total = $this->clients->totalInvoices();\t\t\r\n $data['pagination'] = $this->getPagination('invoices', INVOICE_PAGINATION_LIMIT, $total);\r\n if ($data['users'] == FALSE) {\r\n $data['users'] = array('0' => 'No users');\r\n }\r\n\r\n $data['vat_listing'] = $vat_listing;\r\n $data['page'] = 'invoices';\r\n $data['title'] = 'Cashman | Invoices';\r\n $this->load->view('client/invoices/default', $data);\r\n }",
"public function generateInvoices()\n\t{\n\t\t$orders = $this->orderRepository->getUninvoicedOrders();\n\t\t$invoices = [];\n\n\t\tforeach($orders as $order)\n\t\t{\n\t\t\t$invoices[] = $this->invoiceFactory->createFromOrder($order);\n\t\t}\n\n\t\treturn $invoices;\n\t}",
"public function index(Request $request)\n {\n $user = Auth::getUser();\n\n $patientId = $user->client()->Id;\n $agencyId = $user->client()->AgencyId;\n $unpaid = (int) $request->get('unpaid');\n\n $invoices = Api::request('BillingService\\ClientInvoices', compact('patientId', 'agencyId', 'unpaid'));\n\n return response()->json($invoices);\n }",
"public function invoices( $period ) {\n \n // Check if the session exists and if the login user is admin\n $this->check_session($this->user_role, 1);\n \n // Get statistics template\n $this->body = 'admin/invoices';\n \n // Load the admin layout\n $this->admin_layout();\n \n }",
"public function getAllInvoices($stardate,$enddate,$firm_id){\n\t \t $this->db->select(\"OSC.*, OC.invoice_no, OC.order_id, CO.order_number, C.comp_name, U.first_name, U.last_name\");\n\t\t\t$this->db->from(\"order_challan_shipping AS OSC\");\n\t\t\t$this->db->join('order_challan AS OC', 'OC.challan_no = OSC.challan_no');\t\n\t\t\t$this->db->join('client_orders AS CO', 'CO.order_id = OC.order_id');\n\t\t\t$this->db->join('clients AS C', 'CO.comp_id = C.comp_id');\n\t\t\t$this->db->join('users AS U', 'CO.uid = U.uid');\n\t\t\t\n\t\t\tif($firm_id > 0){\n\t\t\t\t$this->db->where(\"CO.invoice_firm \",$firm_id);\n\t\t\t}\n\t\t\tif($enddate != '' && $stardate !=''){\n\t\t\t\t$this->db->where(\"OC.chalan_date >=\",$stardate); \n\t\t\t\t$this->db->where(\"OC.chalan_date <=\",$enddate);\n\t\t\t}\n\t\t\t\n\t\t\t//$this->db->where(\"OC.invoice_no <>\",\"0\");\n\t\t\t$this->db->group_by('OC.challan_no');\t\t\t\n\t\t\t$this->db->order_by('OSC.account_confirmed ASC');\n\t\t\t$query_all_invoices = $this->db->get();\n\t\t\t/// echo $this->db->last_query();die;\n\t\t\tif($query_all_invoices->num_rows()>0)\n\t\t\t{\n\t\t\t\treturn $query_all_invoices->result_array();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn array();\n\t\t\t}\n\t }",
"public function invoices($id = null)\n {\n $project = $this->project->findOrFail($id);\n $this->authorize('invoices', $project);\n $invoices = new InvoicesResource($project->invoices()->orderBy('id', 'desc')->paginate(20));\n if ($this->request->has('json')) {\n $data['invoices'] = $invoices;\n return view('projects::_ajax._invoices')->with($data);\n }\n return response($invoices, Response::HTTP_OK);\n }",
"public function index($id = false)\r\n {\r\n $this->list_invoices($id);\r\n }",
"public function index(ExcavatorRentFilterRequest $request)\n {\n $noOfRecordsPerPage = $request->get('no_of_records') ?? config('settings.no_of_record_per_page');\n //date format conversion\n $fromDate = !empty($request->get('from_date')) ? Carbon::createFromFormat('d-m-Y', $request->get('from_date'))->format('Y-m-d') : null;\n $toDate = !empty($request->get('to_date')) ? Carbon::createFromFormat('d-m-Y', $request->get('to_date'))->format('Y-m-d') : null;\n\n $whereParams = [\n 'from_date' => [\n 'paramName' => 'from_date',\n 'paramOperator' => '>=',\n 'paramValue' => $fromDate,\n ],\n 'to_date' => [\n 'paramName' => 'to_date',\n 'paramOperator' => '<=',\n 'paramValue' => $toDate,\n ],\n 'excavator_id' => [\n 'paramName' => 'excavator_id',\n 'paramOperator' => '=',\n 'paramValue' => $request->get('excavator_id'),\n ],\n 'site_id' => [\n 'paramName' => 'site_id',\n 'paramOperator' => '=',\n 'paramValue' => $request->get('site_id'),\n ],\n ];\n\n $relationalParams = [\n 'account_id' => [\n 'relation' => 'transaction',\n 'paramName' => 'debit_account_id',\n 'paramOperator' => '=',\n 'paramValue' => $request->get('account_id'),\n ]\n ];\n //params passing for auto selection\n $whereParams['from_date']['paramValue'] = $request->get('from_date');\n $whereParams['to_date']['paramValue'] = $request->get('to_date');\n \n //getExcavatorRents($whereParams=[],$orWhereParams=[],$relationalParams=[],$orderBy=['by' => 'id', 'order' => 'asc', 'num' => null], $withParams=[],$activeFlag=true)\n return view('excavator-rent.list', [\n 'excavatorRents' => $this->excavatorRentRepo->getExcavatorRents($whereParams, [], $relationalParams, ['by' => 'id', 'order' => 'asc', 'num' => $noOfRecordsPerPage], [], ['excavator', 'transaction.debitAccount', 'site'], true),\n 'totalExcavatorRent' => $this->excavatorRentRepo->getExcavatorRents($whereParams, [], $relationalParams, [], ['key' => 'sum', 'value' => 'rent'], [], true),\n 'params' => array_merge($whereParams, $relationalParams),\n 'noOfRecords' => $noOfRecordsPerPage,\n ]);\n }",
"public function invoices($includePending = false, $parameters = [])\n {\n $this->assertCustomerExists();\n\n $invoices = [];\n\n $parameters = array_merge(['limit' => 24], $parameters);\n\n $stripeInvoices = StripeInvoice::all(\n ['customer' => $this->paddle_id] + $parameters,\n $this->stripeOptions()\n );\n\n // Here we will loop through the Stripe invoices and create our own custom Invoice\n // instances that have more helper methods and are generally more convenient to\n // work with than the plain Stripe objects are. Then, we'll return the array.\n if ( ! is_null($stripeInvoices)) {\n foreach ($stripeInvoices->data as $invoice) {\n if ($invoice->paid || $includePending) {\n $invoices[] = new Invoice($this, $invoice);\n }\n }\n }\n\n return new Collection($invoices);\n }",
"static function getPaymentInvoiceHistory($invoice_id = null, $show_acknowledged = FALSE) {\n global $wpdb;\n if($invoice_id != null && !is_numeric($invoice_id)) {\n // probably not the cleanest way to avoid SQL injection...\n throw new DatabaseException(\"Ha! Nice try. Stop passing me junk. INV ID: \" . $invoice_id);\n }\n $where_clause = $invoice_id == null ? \"WHERE 1 = 1\" : \"WHERE id = $invoice_id\";\n $where_clause .= $show_acknowledged ? \"\" : \" AND acknowledged_date IS NULL\";\n $invoice_rs = $wpdb->get_results(\n \"SELECT i.id AS `invoice_id`, i.recipient_name, i.email AS `recipient_email`, \n i.payment_description, i.payment_amount AS `payment_requested`, i.lookup_key, i.acknowledged_date\n FROM wp_invoice i \n $where_clause\n ORDER BY i.id DESC\n LIMIT 100\" );\n \n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n\n // all transactions for those invoices matched above\n $transaction_rs = $wpdb->get_results(\n \"SELECT * FROM (\n SELECT tx.id AS `txn_id`, tx.invoice_id, tx.first_name, tx.last_name, tx.email, tx.vendor_tx_code, tx.payment_amount,\n txa.id AS `txn_auth_id`, txa.auth_status, txa.auth_status_detail, txa.card_type, txa.last_4_digits, txa.processed_date, txa.created_date\n FROM wp_sagepay_transaction tx\n INNER JOIN (SELECT id FROM wp_invoice $where_clause ORDER BY id DESC LIMIT 100) i ON (i.id = tx.invoice_id) \n LEFT OUTER JOIN wp_sagepay_tx_auth txa ON txa.vendor_tx_code = tx.vendor_tx_code\n UNION ALL \n SELECT NULL AS `txn_id`, invoice_id, first_name, last_name, email, vendor_tx_code, payment_amount, NULL as txn_auth_id, auth_status, auth_status_detail, card_type, last_4_digits, processed_date, created_date\n FROM wp_stripe_transaction tx\n INNER JOIN (SELECT id FROM wp_invoice $where_clause ORDER BY id DESC LIMIT 100) i ON (i.id = tx.invoice_id)\n ) x\n ORDER BY processed_date DESC\" );\n \n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n\n $notes_rs = $wpdb->get_results(\n \"SELECT n.invoice_id, n.notes AS `note_text`, n.created_date\n FROM wp_invoice_notes n\n INNER JOIN (SELECT id FROM wp_invoice $where_clause ORDER BY id DESC LIMIT 100) i ON (i.id = n.invoice_id) \n ORDER BY n.id\" );\n \n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n \n foreach( $invoice_rs as $inv ) {\n foreach( $transaction_rs as $txn ) {\n // push transaction onto invoice if matched\n if( $txn->invoice_id === $inv->invoice_id ) {\n if( ! isset( $inv->transactions )) {\n $inv->transactions = array();\n }\n $inv->transactions[] = $txn;\n }\n }\n foreach( $notes_rs as $note ) {\n if( $inv->invoice_id === $note->invoice_id ) {\n if( ! isset( $inv->notes )) {\n $inv->notes = array();\n }\n $inv->notes[] = $note;\n }\n }\n }\n return $invoice_rs;\n }",
"public function show(Invoices $invoices)\n {\n //\n }",
"public function list_invoices($id = false, $clientid = false)\r\n {\r\n\r\n if (!has_permission('invoices', '', 'view') && !has_permission('invoices', '', 'view_own')) {\r\n access_denied('invoices');\r\n }\r\n $this->load->model('payment_modes_model');\r\n $data['payment_modes'] = $this->payment_modes_model->get('', array(), true);\r\n if ($this->input->is_ajax_request()) {\r\n $this->perfex_base->get_table_data('invoices', array(\r\n 'id' => $id,\r\n 'clientid' => $clientid,\r\n 'data' => $data\r\n ));\r\n }\r\n $data['invoiceid'] = '';\r\n if (is_numeric($id)) {\r\n $data['invoiceid'] = $id;\r\n }\r\n $data['title'] = _l('invoices');\r\n $data['invoices_years'] = $this->invoices_model->get_invoices_years();\r\n $data['invoices_sale_agents'] = $this->invoices_model->get_sale_agents();\r\n $data['invoices_statuses'] = $this->invoices_model->get_statuses();\r\n $data['bodyclass'] = 'invoices_total_manual';\r\n $this->load->view('admin/invoices/manage', $data);\r\n }",
"public function filters(Request $request)\n {\n return [\n new InvoiceableFilter(),\n new InvoicePaid(),\n new CreatedAtFilter(),\n new OverdueInvoiceFilter(),\n ];\n }",
"public function getInvoices($partner_id, $state = null, $direction = null, $type = null)\n {\n $model = 'account.invoice';\n\n $context = array();\n\n $invoice_type = '{direction}_{type}';\n\n if (! isset($direction) || ($direction != 'in' && $direction != 'out')) {\n $direction = '%';\n }\n $invoice_type = str_replace('{direction}', $direction, $invoice_type);\n\n if ( ! isset($type) || ($type != 'invoice' && $type != 'refund')) {\n $type = '%';\n }\n $invoice_type = str_replace('{type}', $type, $invoice_type);\n\n if (isset($partner_id)) $context[] = array('partner_id', '=', (int)$partner_id);\n\n if (isset($state)) $context[] = array('state', '=', strtolower($state));\n\n // type is:\n // 'out_invoice' (Invoice), 'out_refund' (Refund),\n // 'in_invoice' (Supplier Invoice), 'in_refund' (Supplier Refund).\n $context[] = array('type', 'like', $invoice_type);\n\n // Get all the partner invoice IDs.\n $ids = $this->search($model, $context);\n\n // Now get the invoices.\n if (!empty($ids)) {\n $invoices = $this->read($model, $ids);\n } else {\n $invoices = array();\n }\n\n return $invoices;\n }",
"public function invoices() {\n\t\treturn $this->hasMany('Invoice');\n\t}",
"public function getApproved(Filter $filter): Collection;",
"public function index() {\n\n\t\t$invoices = \\Auth::user()\n\t\t\t->invoices()\n\t\t\t->get();\n\n\t\t$transactions = \\Auth::user()\n\t\t\t->transactions()\n\t\t\t->get();\n\n\t\tforeach ($invoices as $invoice) {\n\n\t\t\t$invoice->name_date = date('Y-m', strtotime($invoice->name));\n\t\t\t$invoice->sum_of_transactions = count($invoice->transactions);\n\n\t\t\t$income = $transactions\n\t\t\t\t->where('invoice_id', $invoice->id)\n\t\t\t\t->where('type', 'income')\n\t\t\t\t->sum('amount');\n\t\t\t$expense = $transactions\n\t\t\t\t->where('invoice_id', $invoice->id)\n\t\t\t\t->where('type', 'expense')\n\t\t\t\t->sum('amount');\n\n\t\t\t$invoice->change = $income - $expense;\n\t\t}\n\n\t\t$invoices = $invoices->sortBy('name_date');\n\t\t$return['invoices'] = $invoices;\n\n\t\treturn view('/invoices/invoicesOverview', $return);\n\t}",
"public function getInvoicesModifiedSinceDate($date = null)\n {\n try {\n return $this->xero->load(Invoice::class)\n ->where(\"Date >= DateTime({$date->format('Y, m, d')})\")\n ->orWhere(\"AmountDue > 0\")\n ->execute();\n } catch (\\Exception $e){\n $this->addToErrors(\"xero error :: Failed to retrieve invoices :: {$e->getMessage()}\");\n }\n }",
"public function invoices()\n {\n $user = auth()->user();\n $facturas = DB::table('quotes')\n ->select('quotes.account_id', 'quotes.created_by_id', 'quotes.id as quoteId', 'quotes.quote_date',\n DB::raw(\"upper(quotes.quote_number) AS quote_number\"),\n 'quotes.invoice_date','quotes.stage_id',\n 'accounts.name as accountName','users.name as userName','stages.name as stageName',\n 'accounts.document_number','document_types.name as documenttype')\n ->join('accounts', 'accounts.id', '=', 'quotes.account_id')\n ->join('document_types', 'document_types.id', '=', 'accounts.document_type_id')\n ->join('stages', 'stages.id', '=', 'quotes.stage_id')\n ->join('users', 'users.id', '=', 'quotes.created_by_id')\n ->whereIn('quotes.stage_id', array(3,4))\n ->where('users.organization_id', $user->organization_id)\n ->orderByRaw('quotes.updated_at DESC')\n ->paginate(10);\n return view('quote.invoices',compact('facturas'));\n }",
"public function index()\n {\n $user = Auth::user();\n $business = $user->business;\n $outgoingInvoices = $business->outgoingInvoices()->with('invoiceItems')->where('status','draft')->orderBy('created_at', 'desc')->paginate(16);\n return response()->json(\n $outgoingInvoices,\n 200\n );\n }",
"private function getQueryInvoice($criteria = []) {\n\n $query = DB::table(\"cao_cliente AS c\")\n ->select('c.co_cliente',\n 'c.no_razao AS user',\n DB::raw('ROUND(fat.valor - (fat.total_imp_inc * fat.valor) / 100, 2) AS net_income'))\n ->join('cao_fatura AS fat', function ($join) {\n $join->on('c.co_cliente', '=', 'fat.co_cliente');\n }) \n ->join('cao_os AS os', function ($join) {\n $join->on('fat.co_os', '=', 'os.co_os');\n });\n\n if (!empty($criteria['user'])) {\n $query->whereIn('c.co_cliente', $criteria['user']);\n }\n\n if (!empty($criteria['period'])) {\n\n if (!empty($criteria['period']['start'])) {\n $query->where('dt_sol', '>=', $criteria['period']['start'] . ' 00:00:00');\n }\n\n if (!empty($criteria['period']['end'])) {\n $query->where('dt_sol', '<=', $criteria['period']['end'] . '23:59:59');\n }\n }\n\n return $query;\n \n }",
"public function invoice_list()\n {\n if (!get_permission('invoice', 'is_view')) {\n access_denied();\n }\n\n $branchID = $this->application_model->get_branch_id();\n if ($this->input->post('search')) {\n $this->data['class_id'] = $this->input->post('class_id');\n $this->data['section_id'] = $this->input->post('section_id');\n $this->data['invoicelist'] = $this->fees_model->getInvoiceList($this->data['class_id'], $this->data['section_id'], $branchID);\n }\n $this->data['branch_id'] = $branchID;\n $this->data['title'] = translate('payments_history');\n $this->data['sub_page'] = 'fees/invoice_list';\n $this->data['main_menu'] = 'fees';\n $this->load->view('layout/index', $this->data);\n }",
"public function getInvoiceStatistics()\n {\n $que = DB::table('deliveries')\n ->select(\n DB::raw('count(id) AS total_parcel'),\n DB::raw('COALESCE(ROUND(SUM(CASE WHEN ( status IN (6,8,12,16)) THEN receive_amount ELSE 0 END)), 0) AS total_sale'),\n DB::raw('COALESCE(ROUND(SUM(CASE WHEN ( status IN (6,8,12,16) AND payment_status = 0 ) THEN receive_amount ELSE 0 END)), 0) AS total_uninvoiced'),\n DB::raw('COALESCE(ROUND(SUM(CASE WHEN ( status IN (6,12,16)) THEN 1 ELSE 0 END)), 0) AS total_delivered'),\n DB::raw('COALESCE(ROUND(SUM(CASE WHEN ( status IN (8)) THEN 1 ELSE 0 END)), 0) AS total_returned'),\n DB::raw('COALESCE(ROUND(SUM(CASE WHEN status IN (1,2,5,9,10,20) THEN 1 ELSE 0 END)), 0) AS total_pending'),\n DB::raw(\"(\n SELECT \n COALESCE(ROUND(SUM(charge + cod_charge)), 0) \n FROM \n deliveries \n WHERE \n merchant_id = {$this->merchant_id} AND \n status IN (6,8,12,16) AND \n payment_status = 1 \n ) as total_shipping\"),\n DB::raw(\"(\n SELECT \n COALESCE(ROUND(SUM(amount)),0)\n FROM\n invoices\n WHERE\n merchant_id = {$this->merchant_id}\n ) AS total_invoiced_amount\")\n )\n ->where([ 'merchant_id' => $this->merchant_id ]);\n $que = $que->first();\n// $que->total_uninvoiced = $que->total_sale- $que->total_invoiced_amount;\n return $que;\n }",
"private function getPaymentList(Request $request)\n\t{\n\t\t// $balanceOrderBooking =\n\t\t$query = BalanceOrderBooking::from('BLNC001 as a')\n\t\t\t\t->join('MST001 as b', 'a.mst001_id', '=', 'b.id')\n\t\t\t\t->join('BLNC002 as c', 'a.id', '=', 'c.blnc001_id')\n\t\t\t\t->join('MST020 as d', 'c.mst020_id', '=', 'd.id')\n\t\t\t\t->join('MST004 as e', 'a.mst004_id', '=', 'e.id');\n\n\t\tif($request->has('order_no')){\n\t\t\t$query = $query->where('a.order_no', 'like', $request->order_no);\n\t\t}\n\n\t\tif($request->has('start_date')){\n\t\t\tif(Helpers::isValidDateFormat($request->start_date)){\n\t\t\t\t$query = $query->where('a.order_date', '>=', Helpers::dateFormatter($request->start_date));\n\t\t\t}\n\t\t}\n\n\t\tif($request->has('end_date')){\n\t\t\tif(Helpers::isValidDateFormat($request->end_date)){\n\t\t\t\t$query = $query->where('a.order_date', '<=', Helpers::dateFormatter($request->end_date));\n\t\t\t}\n\t\t}\n\n\t\tif($request->has('agent')){\n\t\t\t$query = $query->where('b.email', '=', $request->agent);\n\t\t}\n\n\t\tif($request->has('hotel')){\n\t\t\t$query = $query->where('d.hotel_name', '=', $request->hotel);\n\t\t}\n\n\t\tif($request->has('status_payment')){\n\t\t\t$query = $query->where('a.status_pymnt', '=', $request->status_payment);\n\t\t}\n\n\t\tif($request->has('status_flag')){\n\t\t\t$query = $query->where('a.status_flag', '=', $request->status_flag);\n\t\t}\n\n\t\t$result = $query->select('a.*', 'd.hotel_name', 'e.curr_code');\n\t\t$result = $query->get();\n\n\t\treturn $result;\n\n\t}",
"public function get($id) {\n return Invoices::find($id);\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t// Force model to only show invoices for current business\n\t\t$criteria->alias = 'Invoice';\n\t\t$criteria->select = 'Invoice.*';\n\t\t$criteria->join='LEFT JOIN Client ON Client.id=Invoice.clientId';\n\n\t\t$criteria->compare('id',$this->id);\n\n\t\t$criteria->compare('clientId',$this->clientId);\n\n\t\t$criteria->compare('invoiceDate',$this->invoiceDate,true);\n\n\t\t$criteria->compare('dueDate',$this->dueDate,true);\n\n\t\t$criteria->compare('invoiceTotal',$this->invoiceTotal,true);\n\n\t\t$criteria->compare('clientNotes',$this->clientNotes,true);\n\n\t\t$criteria->compare('invoiceNotes',$this->invoiceNotes,true);\n\n\t\t$criteria->compare('status',$this->status);\n\n\t\t$criteria->compare('active',$this->active);\n\n\t\t$criteria->compare('created',$this->created,true);\n\n\t\t$criteria->compare('lastModified',$this->lastModified,true);\n\n\t\t$criteria->compare('lastUpdatedBy',$this->lastUpdatedBy);\n\t\t\n\t\t$criteria->order = \"Invoice.id DESC\";\n\n\t\t$criteria->condition='Client.businessId='. Yii::app()->userInfo->business;\n\t\t\treturn new CActiveDataProvider('Invoice', array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array('pageSize'=>20),\n\t\t\t\n\t\t));\n\t}",
"public function invoices()\n {\n return $this->morphMany(Invoice::class, 'invoiceable');\n }",
"public function getExistingInvoicesForClientCase($client_id, $client_case_id, $display_type)\n {\n if($display_type=='Itemized') {\n\t\t$sql = \"SELECT id, created_date FROM tbl_invoice_final WHERE client_id = $client_id AND client_case_id = $client_case_id AND display_by = 1 AND is_closed=0 ORDER BY id DESC\";\n }\n else {\n $sql = \"SELECT id, created_date FROM tbl_invoice_final WHERE client_id = $client_id AND client_case_id = 0 AND display_by = 2 AND is_closed=0 ORDER BY id DESC\";\n }\n\n \n $invoice_data = InvoiceFinal::findBySql($sql)->all();\n\n \t\t return $invoice_data;\n\t }",
"public function readClientInvoices($id) {\r\n //get authorisation from headers\r\n $headers = getallheaders();\r\n $auth = $headers[\"Authorization\"];\r\n\r\n //check authorization\r\n $role = $this->authenticate($auth);\r\n if ($role !== 'trader') {\r\n throw new RestException(401, \"Unauthorized\");\r\n }\r\n $sql = \"SELECT * FROM invoice WHERE clientid = '{$id}'\";\r\n $invoices = Invoice::find_by_sql($sql);\r\n if (!$invoices) {\r\n throw new RestException(400, \"no invoices\");\r\n }\r\n return $invoices;\r\n }",
"public function getFilterEncountersBillingData(stdClass $params)\n\t{\n\t\t// Declare all the variables that we are going to use.\n\t\t(string)$whereClause = '';\n\t\t(array)$encounters = '';\n\t\t(int)$total = 0;\n\t\t(string)$sql = '';\n\t\t(string)$whereClause = '';\n\n\t\t// Look between service date\n\t\tif ($params->datefrom && $params->dateto)\n\t\t\t$whereClause .= chr(13) . \" AND encounters.service_date BETWEEN '\" . substr($params->datefrom, 0, -9) . \" 00:00:00' AND '\" . substr($params->dateto, 0, -9) . \" 23:00:00'\";\n\n\t\t// Look for a specific patient\n\t\tif ($params->patient)\n\t\t\t$whereClause .= chr(13) . \" AND encounters.pid = '\" . $params->patient . \"'\";\n\n\t\t// Look for a specific provider\n\t\tif ($params->provider && $params->provider <> 'all')\n\t\t\t$whereClause .= chr(13) . \" AND encounters.provider_uid = '\" . $params->patient . \"'\";\n\n\t\t// Look for the primary insurance\n\t\tif ($params->insurance && $params->insurance <> '1')\n\t\t\t$whereClause .= chr(13) . \" AND patient_demographics.primary_insurance_provider = '\" . $params->insurance . \"'\";\n\n\t\t// Look for pastDue dates\n\t\t// TODO: Consider the payment on the SQL statement\n\t\tif ($params->pastDue)\n\t\t\t$whereClause .= chr(13) . \" AND DATEDIFF(NOW(),encounters.service_date) >= \" . $params->pastDue;\n\n\t\t// Eliminate the first 6 characters of the where clause\n\t\t// this to eliminate and extra AND from the SQL statement\n\t\t$whereClause = substr($whereClause, 6);\n\n\t\t// If the whereClause variable is used go ahead and\n\t\t// and add the where command.\n\t\tif ($whereClause)\n\t\t\t$whereClause = 'WHERE ' . $whereClause;\n\n\t\t$sql = \"SELECT\n\t\t\t\t\tencounters.eid,\n\t\t\t\t\tencounters.pid,\n\t\t\t\t\tIf(encounters.provider_uid Is Null, 'None', encounters.provider_uid) As encounterProviderUid,\n\t\t\t\t\tIf(patient_demographics.provider Is Null, 'None', patient_demographics.provider) As primaryProviderUid,\n\t\t\t\t\tencounters.service_date,\n\t\t\t\t\tencounters.billing_stage,\n\t\t\t\t\tpatient_demographics.primary_insurance_provider,\n\t\t\t\t\tpatient_demographics.title,\n\t\t\t\t\tpatient_demographics.fname,\n\t\t\t\t\tpatient_demographics.mname,\n\t\t\t\t\tpatient_demographics.lname,\n\t\t\t\t\tencounters.close_date,\n\t\t\t\t\tencounters.supervisor_uid,\n\t\t\t\t\tencounters.provider_uid,\n\t\t\t\t\tencounters.open_uid\n\t\t\t\tFROM\n\t\t\t\t\tencounters \n\t\t\t\tLEFT JOIN\n\t\t\t\t\tpatient_demographics \n\t\t\t\tON patient_demographics.pid = encounters.pid\n\t\t\t\t$whereClause\n\t\t\t\tORDER BY\n \t\t\t\t\tencounters.service_date\";\n\n\t\t$this->db->setSQL($sql);\n\t\tforeach ($this->db->fetchRecords(PDO::FETCH_ASSOC) as $row)\n\t\t{\n\t\t\t$row['patientName'] = $row['title'] . ' ' . Person::fullname($row['fname'], $row['mname'], $row['lname']);\n\t\t\t$encounters[] = $row;\n\t\t}\n\t\t$total = count($encounters);\n\t\t$encounters = array_slice($encounters, $params->start, $params->limit);\n\t\treturn array(\n\t\t\t'totals' => $total,\n\t\t\t'encounters' => $encounters\n\t\t);\n\n\t}",
"public function index()\n {\n \n $search['date'] = request('date') ? request('date') : Carbon::now()->toDateString();\n $search['medic'] = request('medic') ? request('medic') : '';\n $search['q'] = request('q');\n\n\n $office = auth()->user()->clinicsAssistants->first();\n $medics = $this->medicRepo->findAllByOffice($office->id);\n\n \n $invoices = Invoice::where('office_id', $office->id)->whereDate('created_at', $search['date']);\n if ($search['q']) {\n $facturas = $invoices->where('client_name', 'like', '%' . $search['q'] . '%');\n }\n\n\n if (is_blank($search['medic'])) {\n $invoices = $invoices->orderBy('created_at', 'DESC')->paginate(20);\n $totalInvoicesAmount = $invoices->sum('total');\n } else {\n $invoices = $invoices->where('user_id', $search['medic'])->orderBy('created_at', 'DESC')->paginate(20);\n $totalInvoicesAmount = $invoices->where('user_id', $search['medic'])->sum('total');\n }\n\n return view('assistant.invoices.index', compact('medics', 'office' , 'invoices', 'totalInvoicesAmount', 'search'));\n\n \n }",
"public function getJobInvoiceListing($filters = array())\n\t{\n\t\t$query = $this->make();\n\t\t$filters['invoice_report_filter_only'] = true;\n\t\t$filters['include_projects'] = true;\n\t\t$jobQuery = $this->jobRepo->getJobsQueryBuilder($filters, ['customers'])\n\t\t\t->whereNull('customers.deleted_at')->select('jobs.id');\n\t\t$jobsJoinQuery = generateQueryWithBindings($jobQuery);\n\n\t\t$query->join(DB::raw(\"({$jobsJoinQuery}) as jobs\"), 'jobs.id', '=', 'job_invoices.job_id')->select('job_invoices.*');\n\t\t$query->with('customer', 'job', 'payments', 'job.trades', 'job.division');\n\n\t\t$this->applyfilters($query, $filters);\n\n\t\treturn $query;\n\t}",
"public function getReportPaginated($request, $per_page, $agent_id, $status = 1);",
"public function getJobInvoices(RequestClass $request)\n {\n $jobToken = getJobToken($request);\n try{\n $job = $this->jobRepo->getByShareToken($jobToken);\n $input = Request::all();\n\n if($job->isMultiJob() && ine($input, 'project_id')) {\n $job = Job::where('id', $input['project_id'])->where('parent_id', $job->id)->firstOrFail();\n }\n $invoices = $job->invoices;\n $response = $this->response->collection($invoices, new JobInvoiceTransformer);\n \n return ApiResponse::success($response);\n } catch(ModelNotFoundException $e){\n return ApiResponse::errorNotFound('Project Not Found.');\n } catch(\\Exception $e){\n return ApiResponse::errorInternal(trans('response.error.internal'), $e);\n }\n }",
"public function fields(Request $request)\n {\n return [\n MorphTo::make('Invoiceable')->types([\n Customer::class,\n Provider::class\n ])->searchable(),\n\n Date::make('Created At')\n ->hideWhenCreating()\n ->hideWhenUpdating(),\n\n Date::make('Payday')\n ->rules('required', 'date')\n ->hideWhenUpdating(function (){;\n return !$this->isEditable();\n }),\n\n Date::make('Payday Limit')\n ->rules('required', 'date', 'after_or_equal:payday')\n ->hideWhenUpdating(function (){;\n return !$this->isEditable();\n }),\n\n BelongsTo::make('Invoice Status')\n ->hideWhenCreating()\n ->hideWhenUpdating(),\n\n Number::make('Total')\n ->hideWhenCreating()\n ->hideWhenUpdating(),\n\n Number::make('Total Paid')\n ->hideWhenCreating()\n ->hideWhenUpdating(),\n\n Number::make('Balance Due')\n ->hideWhenCreating()\n ->hideWhenUpdating(),\n\n InvoiceServices::make()\n ->invoice($this),\n\n InvoiceVaucher::make()\n ->invoice($this),\n\n ResumenInvoice::make()\n ->invoice($this)\n ->canSee(function () {\n return $this->isPending() || $this->isPaid();\n }),\n\n Locked::make()\n ->invoice($this),\n\n ];\n }",
"public function all(int $page = 1, $maxPerPage = 20): array\n {\n if ($maxPerPage > 50) {\n $maxPerPage = 50;\n }\n\n $options = [\n 'page' => $page,\n 'max_per_page' => $maxPerPage,\n ];\n\n return Billingo::get('invoices', $options);\n }",
"public function invoices()\n {\n return $this->hasMany('App\\Invoice');\n }",
"public function invoices()\n {\n return $this->hasMany('App\\Invoice');\n }",
"public function invoices()\n {\n return $this->hasMany('App\\Invoice');\n }",
"public function obtenerInvoices($SQLOptions = [])\n {\n $count = false;\n $sort = false;\n $limit = false;\n $joins = false;\n $conditions = false;\n\n if (true === is_array($SQLOptions)) {\n $count = true === isset($SQLOptions['count']) && true === $SQLOptions['count'];\n if (true === isset($SQLOptions['sort'])) {\n $sort = $SQLOptions['sort'];\n }\n if (true === isset($SQLOptions['limit'])) {\n $limit = $SQLOptions['limit'];\n }\n if (true === isset($SQLOptions['unpaid'])) {\n $joins = \" LEFT OUTER JOIN \" . TABLE_TRANSACTION . \" paypal using(custom)\"\n . \" INNER JOIN agd_data.empresa empresa using (uid_empresa)\";\n $conditions = \" AND ((empresa.is_enterprise = 0\"\n . \" AND empresa.activo_corporacion = 0\"\n . \" AND empresa.corporation IS NULL\"\n . \" AND paypal.uid_paypal IS NULL AND sent_date > '\" . invoice::DATE_CREDIT_MEMO . \"'\"\n . \") OR empresa.is_enterprise = 1\"\n . \" OR empresa.activo_corporacion = 1\"\n . \" OR empresa.corporation IS NOT NULL\"\n . \" OR paypal.uid_paypal IS NOT NULL\"\n . \")\";\n }\n }\n\n $field = $count ? \"count(uid_invoice)\" : \"uid_invoice\";\n\n $sql = \"SELECT {$field} FROM \" . TABLE_INVOICE;\n\n if (true === is_string($joins)) {\n $sql .= \" {$joins}\";\n }\n\n $sql .= \" WHERE uid_empresa = {$this->getUID()}\n AND sent_date IS NOT NULL\";\n\n if (true === is_string($conditions)) {\n $sql .= \" {$conditions}\";\n }\n\n if ($sort) {\n $sql .= \" ORDER BY {$sort}\";\n }\n\n if ($limit) {\n $sql .= \" LIMIT {$limit[0]}, {$limit[1]}\";\n }\n\n if ($count) {\n return $this->db->query($sql, 0, 0);\n }\n\n $invoices = $this->db->query($sql, \"*\", 0, \"invoice\");\n if ($invoices) return new ArrayObjectList($invoices);\n\n return new ArrayObjectList();\n }",
"public function getInvoiceStatus() {\r\n\t\t$status = array();\r\n\t\t\t$status[0] = array('id' => 0, 'name' => 'Completed'); //done, can not be edited, but not retured\r\n\t\t\t$status[1] = array('id' => 1, 'name' => 'Unfinished'); //still open, can be edited\r\n\t\t\t$status[2] = array('id' => 2, 'name' => 'Returned'); //done, can not be edited, retured\r\n\t\t\t$status[3] = array('id' => 3, 'name' => 'Closed'); //memo only, done, closed out. memo close date updated\r\n\t\t\t$status[4] = array('id' => 4, 'name' => 'Converted'); //memo only, converted\r\n\t\t\t$status[5] = array('id' => 5, 'name' => 'Cancelled'); //layaways only, cancelled\r\n\t\treturn $status;\r\n\t}",
"public function ContractsGetAll($filter)\n {\n $query = Contracts::with('Customers')->whereRaw(\"1 = 1\");\n $sSearchInput = isset($filter['searchInput']) ? trim($filter['searchInput']) : '';\n $sSortCol = isset($filter['sSortCol']) ? $filter['sSortCol'] : 'code';\n $sSortDir = isset($filter['sSortDir']) ? $filter['sSortDir'] : 'desc';\n\n $limit = isset($filter['limit']) ? $filter['limit'] : config('const.LIMIT_PER_PAGE');\n if ($sSearchInput != '') {\n $query->where('content', 'LIKE', '%' . $sSearchInput . '%');\n $query->orWhere('code', 'LIKE', '%' . $sSearchInput . '%');\n $query->orWhere('value', 'LIKE', '%' . $sSearchInput . '%');\n }\n\n if ($sSortCol) {\n $query->orderBy($sSortCol, $sSortDir);\n }\n\n $rResult = $query->paginate($limit)->toArray();\n $arrData = $rResult['data'];\n foreach ($arrData as $key => $value) {\n $signdate = date('d/m/Y', strtotime($value['signdate']));\n $arrData[$key]['signdate'] = $signdate;\n }\n $rResult['data'] = $arrData;\n return $rResult;\n }",
"public function get_one_invoice($client_id, $invoices, $type)\r\n {\r\n \r\n $exclude = '';\r\n \r\n if ($invoices != NULL) {\r\n array_walk($invoices, create_function('&$item, $key', '$item = \"\\'{$item}\\'\";'));\r\n $invoices = implode(',', $invoices);\r\n $exclude = \" and invoice_number not in ($invoices)\";\r\n } \r\n \r\n if ($type == 'received') {\r\n $sql = \"SELECT * FROM invoice WHERE client_id = {$client_id} AND paid = FALSE \r\n AND state in (0, 1 , 9) and total_amount > 0 AND type = 0 $exclude ORDER BY invoice_time ASC LIMIT 1\";\r\n } else {\r\n $sql = \"SELECT * FROM invoice WHERE client_id = {$client_id} AND paid = FALSE\r\n AND state = 0 AND type = 3 and total_amount > 0 $exclude ORDER BY invoice_time ASC LIMIT 1\";\r\n }\r\n \r\n $data = $this->query($sql);\r\n return $data;\r\n }",
"function index() {\n \t\n \t// API call\n if($this->request->isApiCall()) {\n $this->response->respondWithData(Invoices::findForApi($this->logged_user), array(\n 'as' => 'invoices',\n ));\n\n // Regular request made by web browser\n } elseif($this->request->isWebBrowser()) {\n \t$this->wireframe->list_mode->enable();\n\n $invoices = Invoices::findForObjectsList($this->logged_user, null, STATE_VISIBLE);\n\n $invoice_dates_map = Invoices::getIssuedAndDueDatesMap($invoices);\n\n $this->response->assign(array(\n 'invoices' => $invoices,\n 'companies_map' => Companies::getIdNameMap($this->logged_user->visibleCompanyIds()),\n 'invoice_states_map' => $this->status_map,\n 'invoice_dates_map' => $invoice_dates_map,\n 'in_archive' => false,\n 'print_url' => Router::assemble('invoices', array('print' => 1))\n ));\n \n // Phone request\n } elseif($this->request->isPhone()) {\n \t$this->wireframe->actions->add('quotes', lang('Quotes'), Router::assemble('quotes'), array(\n 'icon' => AngieApplication::getImageUrl('icons/navbar/quotes.png', INVOICING_MODULE, AngieApplication::getPreferedInterface())\n ));\n $this->wireframe->actions->add('recurring_profiles', lang('Recurring Profiles'), Router::assemble('recurring_profiles'), array(\n 'icon' => AngieApplication::getImageUrl('icons/navbar/recurring.png', INVOICING_MODULE, AngieApplication::getPreferedInterface())\n ));\n \n $this->response->assign('formatted_invoices', Invoices::findForPhoneList($this->logged_user));\n \t\n // Tablet device\n \t} elseif($this->request->isTablet()) {\n \t\tthrow new NotImplementedError(__METHOD__);\n \n } elseif($this->request->isPrintCall()) {\n $group_by = strtolower($this->request->get('group_by', null));\n $filter_by = $this->request->get('filter_by', null);\n \n // page title\n $filter_by_completion = array_var($filter_by, 'status', null); \n if ($filter_by_completion === '0') {\n \t$page_title = lang('Drafts Invoices');\n } else if ($filter_by_completion === '1') {\n\t\t\t\t\t$page_title = lang('Issued Invoices');\n } else if ($filter_by_completion === '2') {\n\t\t\t\t\t$page_title = lang('Paid Invoices');\n } else if ($filter_by_completion === '3') {\n\t\t\t\t\t$page_title = lang('Canceled Invoices');\n } else {\n \t$page_title = lang('All Invoices');\n } // if\n\n // maps\n $map = array();\n \n switch ($group_by) {\n case 'client_id':\n $map = Companies::getIdNameMap();\n $map[0] = lang('Unknown Client');\n \n \t$getter = 'getCompanyId';\n \t$page_title.= ' ' . lang('Grouped by Client'); \n break;\n case 'status':\n $map = $this->status_map;\n $map[0] = lang('Draft');\n \n \t$getter = 'getStatus';\n \t$page_title.= ' ' . lang('Grouped by Status');\n break;\n case 'issued_on_month':\n $map = Invoices::mapIssuedOnMonth();\n $map[0] = lang('Draft');\n \n $getter = 'getIssuedOnMonth';\n \t$page_title.= ' ' . lang('Grouped by Issued On Month');\n break;\n case 'due_on_month':\n $map = Invoices::mapDueOnMonth();\n $map[0] = lang('Draft');\n \n $getter = 'getDueOnMonth';\n \t$page_title.= ' ' . lang('Grouped by Due On Month');\n break;\n } //switch\n \n // find invoices\n $invoices = Invoices::findForPrint($this->logged_user, null, $group_by, $filter_by);\n\n //use thisa to sort objects by map array\n $print_list = group_by_mapped($map,$invoices,$getter);\n \n $this->smarty->assignByRef('invoices', $print_list);\n $this->smarty->assignByRef('map', $map);\n $this->response->assign(array(\n 'group_by' => $group_by,\n 'page_title' => $page_title,\n ));\n }//if\n }",
"public function invoices()\n\t{\n\t\treturn $this->hasMany(Invoice::class, 'moviment_id');\n\t}",
"public function find($invoiceId): array\n {\n return Billingo::get(\"invoices/{$invoiceId}\");\n }",
"public function getList($order = array(), $filter = array(), $select = array())\n {\n $fullResult = $this->client->call(\n 'crm.invoice.list',\n array(\n 'order' => $order,\n 'filter'=> $filter,\n 'select'=> $select,\n )\n );\n return $fullResult;\n }",
"public function index(Request $request)\n {\n $last_year_invoices = Invoice::whereDate('created_at', '>', Carbon::now()->subDays(365))->get();\n $last_month_invoices = Invoice::whereDate('created_at', '>', Carbon::now()->subDays(30))->get();\n $last_month_paid = 0;\n $last_month_unpaid = 0;\n $last_month_total = 0;\n $recurring_invoice = 0;\n $last_year_total = 0;\n $paid_invoice_per_day= []; // for graph\n\n foreach ($last_month_invoices as $last_month_invoice) {\n if ($last_month_invoice->is_paid == 1) {\n\n $last_month_paid = $last_month_paid + $last_month_invoice->total_amount;\n\n // paid invoice graph\n if (array_key_exists($last_month_invoice->created_at->format('M d'), $paid_invoice_per_day)) {\n $paid_invoice_per_day[$last_month_invoice->created_at->format('M d')] = $paid_invoice_per_day[$last_month_invoice->created_at->format('M d')] + $last_month_invoice->total_amount;\n }else{\n $paid_invoice_per_day[$last_month_invoice->created_at->format('M d')] = $last_month_invoice->total_amount;\n }\n\n }else{\n $last_month_unpaid = $last_month_unpaid + $last_month_invoice->total_amount;\n }\n\n // recurring total\n if ($last_month_invoice->is_autometic == 1) {\n $recurring_invoice = $recurring_invoice + $last_month_invoice->total_amount;\n }\n\n }\n $last_month_total = $last_month_paid + $last_month_unpaid;\n\n\n\n foreach ($last_year_invoices as $last_year_invoice) {\n $last_year_total = $last_year_total + $last_year_invoice->total_amount; \n }\n\n // customer list\n $keyword = $request->get('search');\n $perPage = 25;\n if (!empty($keyword)) {\n $customers = Customer::where('name', 'LIKE', \"%$keyword%\")\n ->orWhere('email', 'LIKE', \"%$keyword%\")\n ->orWhere('business_name', 'LIKE', \"%$keyword%\")\n ->orWhere('address', 'LIKE', \"%$keyword%\")\n ->orWhere('city', 'LIKE', \"%$keyword%\")\n ->orWhere('state', 'LIKE', \"%$keyword%\")\n ->orWhere('zip', 'LIKE', \"%$keyword%\")\n ->latest()->paginate($perPage);\n } else {\n $customers = Customer::latest()->paginate($perPage);\n }\n return view('home', compact('last_month_paid','last_month_unpaid','last_month_total','last_year_total', 'customers', 'paid_invoice_per_day', 'recurring_invoice'));\n }",
"public function index(Request $request)\n\t{\n\t\t// Try to get the users invoices.\n\t\t$this->manager->byUser($request->user())->get();\n\n\t\tif ( $this->manager->hasError() ) {\n\t\t\treturn response()->json(['message' => $this->manager->errorMessage()], $this->manager->errorCode());\n\t\t}\n\n\t\treturn response()->json([\n\t\t\t'message' => $this->manager->successMessage(),\n\t\t\t'data' => [\n\t\t\t\t'invoices' => $this->manager->invoices()\n\t\t\t]\n\t\t], $this->manager->successCode());\n\t}",
"public function index()\n {\n return view('admin::sales.invoices.list', ['invoices' => Invoice::getAllByBusiness() ]);\n }",
"public function invoices()\n {\n return $this->hasMany('DragonLancers\\Invoice');\n }",
"public function testItReturnsUsersFilteredByAccountStatus()\n {\n $user1 = factory(User::class)->create([\n \"tenant_id\" => $this->user->tenant->id,\n ]);\n $user1->update([\n \"account_status_id\" => User::StatusTypes[\"archived\"],\n ]);\n $tenant2 = factory(Tenant::class)->create();\n factory(User::class)->create([\n \"tenant_id\" => $tenant2->id,\n ]);\n\n $this->actingAs($this->user)\n ->getJson(\"api/v1/users?filter[account_status]={$user1->account_status_id}\")\n ->assertOk()\n ->assertJson([\n \"data\" => [\n [\n \"id\" => $user1->id,\n \"firstname\" => $user1->firstname,\n ],\n ],\n ]);\n }",
"public function findByAll($pagination = false, $perPage = 10, array $input = []) {\n\n\t\t$start_date = '';\n\t\t$end_date = '';\n\t\tif (isset($input['start_date']) && $input['start_date'] != '') {\n\t\t\t$start_date = date('Y-m-d', strtotime($input['start_date']));\n\t\t}\n\n\t\tif (isset($input['end_date']) && $input['end_date'] != '') {\n\t\t\t$end_date = date('Y-m-d', strtotime($input['end_date']));\n\t\t} else {\n\t\t\t$end_date = date('Y-m-d');\n\t\t}\n\n\t\t$objectIds = $this->refund_model->orderBy('id', 'DESC');\n\n\t\tif (isset($input['filter_by_status']) && $input['filter_by_status'] != '') {\n\t\t\t$objectIds = $objectIds->where('status','=',$input['filter_by_status']);\n\t\t}\n\n\t\tif ($start_date != '') {\n\t\t\t$objectIds = $objectIds->whereIn('payment_id', function($query) use ($start_date, $end_date)\n\t\t\t {\n\t\t\t $query->select('id')\n\t\t\t ->from(with($this->payment_model)->getTable())\n\t\t\t ->whereBetween(\\DB::raw(\"date(createdtime)\"), [$start_date, $end_date]);\n\t\t\t });\n\t\t}\n\n\t\tif(isset($input['limit']) && $input['limit'] != 0) {\n\t\t\t$perPage = $input['limit'];\n\t\t}\n\n\t\tif ($pagination == true) {\n\t\t\t$objectIdsPaginate = $objectIds->paginate($perPage, ['id']);\n\t\t\t$objects = $objectIdsPaginate->items();\n\t\t\t\n\t\t} else {\n\t\t\t$objects = $objectIds->get(['id']);\n\t\t}\n\n\t\t$data = ['data'=>[]];\n\t\t\n\t\tif (count($objects) > 0) {\n\t\t\t$i = 0;\n\t\t\tforeach ($objects as $object) {\n\t\t\t\t$objectData = $this->findById($object->id);\n\t\t\t\t$data['data'][$i] = $objectData;\t\t\t\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\n\t\tif ($pagination == true) {\n\t\t\t// call method to paginate records\n \t\t$data = Helper::paginator($data, $objectIdsPaginate);\n\t\t}\n\t\treturn $data;\n\t}",
"public function invoice_list() {\n //$this->output->enable_profiler(TRUE);\n $data['sideMenuData'] = fetch_non_main_page_content();\n $tenant_id = $this->session->userdata('userDetails')->tenant_id;\n $payment_status = $this->input->get('payment_status');\n $start_date = $this->input->get('start_date');\n $end_date = $this->input->get('end_date');\n $company_id = $this->input->get('company_id');\n if (!empty($_GET)) {\n $totalrows = $this->reportsModel->get_all_invoice_count($tenant_id, $payment_status, $start_date, $end_date, $company_id);\n $records_per_page = RECORDS_PER_PAGE;\n $baseurl = base_url() . 'reports_finance/invoice_list/';\n $pageno = ($this->uri->segment(3)) ? $this->uri->segment(3) : 1;\n $offset = ($pageno * $records_per_page);\n $field = ($this->input->get('f')) ? $this->input->get('f') : 'ei.inv_date';\n $order_by = ($this->input->get('o')) ? $this->input->get('o') : 'DESC';\n $tabledata = $this->reportsModel->get_all_invoice($tenant_id, $records_per_page, $offset, $field, $order_by, $payment_status, $start_date, $end_date, $company_id);\n $tabledata_count = count($tabledata);\n for ($i = 0; $i < $tabledata_count; $i++) {\n if ($tabledata[$i]->enrolment_mode === 'COMPSPON') {\n $tabledata[$i]->payment_status = $this->reportsModel->check_not_part_paid($tabledata[$i]->pymnt_due_id);\n }\n }\n $data['tabledata'] = $tabledata;\n $data['sort_order'] = $order_by;\n }\n $data['controllerurl'] = 'reports_finance/invoice_list/';\n $this->load->helper('pagination');\n $data['sort_link'] = $sort_link = \"payment_status=\" . $this->input->get('payment_status') . \"&start_date=\" . $this->input->get('start_date') . \"&end_date=\" . $this->input->get('end_date') . \"&company_id=\" . $this->input->get('company_id') . \"&company_name=\" . $this->input->get('company_name');\n $data['pagination'] = get_pagination($records_per_page, $pageno, $baseurl, $totalrows, $field, $order_by . '&' . $sort_link);\n $data['page_title'] = 'Accounting Reports - List and Search Invoice';\n $data['main_content'] = 'reports/invoice_list';\n $this->load->view('layout', $data);\n }",
"public function fetchInvoicingOrderInList($id) {\n $list = $this->find('list', array(\n 'conditions' => array(\n 'Order.user_customer_id' => $id,\n 'Order.transaction' => 1,\n 'Order.status' => 'Shipped'\n ),\n 'fields' => array('order_number', 'id')\n ));\n return $list;\n }",
"public function getLatestInvoices()\r\n {\r\n if ($this->userId != Null) {\r\n $em = $this->entityManager;\r\n $criteria = array(\r\n 'user' => $this->userId\r\n );\r\n $order = array(\r\n 'id' => 'DESC'\r\n );\r\n $limit = 50;\r\n \r\n $transact = $em->getRepository('Transactions\\Entity\\InvoiceUser')->findBy($criteria, $order, $limit);\r\n return $transact;\r\n }\r\n }",
"public function invoice_list( $customer_id = NULL, $count = 10, $offset = 0 ) {\r\n\t\t$params['count'] = $count;\r\n\t\t$params['offset'] = $offset;\r\n\t\tif( $customer_id )\r\n\t\t\t$params['customer'] = $customer_id;\r\n\t\t$vars = http_build_query( $params, NULL, '&' );\r\n\t\t\r\n\t\treturn $this->_send_request( 'invoices?'.$vars );\r\n\t}",
"public function fetchAll(string $status, ?int $from = null, ?int $to = null): array\n {\n $this->invoiceId = null;\n\n return parent::restGetPages('tickets',\n $from,\n $to,\n ['companies', $this->client->getCompanyId(), 'tickets', $status],\n ['api_key' => $this->client->getApiKey()]);\n }",
"public function dataForInvoice() {\n\t\t\t\n\t\t\t$data = [\n\t\t\t 'booking_reference' => $this->reference,\n\t\t\t 'booking_date' => Utility::dateTimeLocale($this->updated_at, false),\n\t\t\t 'user_booking_fullname' => $this->user_booking_fullname,\n\t\t\t 'user_booking_address' => $this->user_booking_address,\n\t\t\t 'user_booking_locality' => $this->user_booking_full_locality,\n\t\t\t 'user_booking_email' => $this->user_booking_email,\n\t\t\t 'user_booking_tax_code' => $this->user->customer->taxCode,\n\t\t\t 'apartment_owner_fullname' => $this->apartment_owner_fullname,\n\t\t\t 'apartment_owner_tax_code' => $this->apartmentOwner->customer->taxCode,\n\t\t\t 'apartment_owner_address' => $this->apartment_owner_address,\n\t\t\t 'apartment_owner_locality' => $this->apartment_owner_full_locality,\n\t\t\t 'apartment_owner_email' => $this->apartment_owner_email,\n\t\t\t 'apartment_title' => $this->apartment_title,\n\t\t\t 'apartment_price_per_night' => $this->apartment_price_per_night,\n\t\t\t 'check_in' => Utility::dateTimeLocale($this->check_in, false),\n\t\t\t 'check_out' => Utility::dateTimeLocale($this->check_out, false),\n\t\t\t 'nights_count' => Utility::diffInDays($this->check_in, $this->check_out),\n\t\t\t 'total_amount' => $this->bookingAmount(),\n\t\t\t 'has_upgrades' => $this->bookedServices()->exists(),\n\t\t\t];\n\t\t\tif ($data['has_upgrades']) {\n\t\t\t\t$data['upgrades'] = [];\n\t\t\t\tforeach ($this->bookedServices()->get() as $bookedService) {\n\t\t\t\t\t$data['upgrades'][] =\n\t\t\t\t\t [\n\t\t\t\t\t\t'name' => $bookedService->name,\n\t\t\t\t\t\t'price_per_night' => $bookedService->price_per_night,\n\t\t\t\t\t ];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $data;\n\t\t}",
"public function listAdvertiserInvoices($profileId, $advertiserId, $optParams = [])\n {\n $params = ['profileId' => $profileId, 'advertiserId' => $advertiserId];\n $params = array_merge($params, $optParams);\n return $this->call('list', [$params], AdvertiserInvoicesListResponse::class);\n }"
] | [
"0.64036673",
"0.6400779",
"0.63064176",
"0.595096",
"0.58964974",
"0.5864822",
"0.5854988",
"0.5846742",
"0.5817022",
"0.57967275",
"0.57755494",
"0.5739979",
"0.5720492",
"0.57097113",
"0.5693141",
"0.5691804",
"0.5669691",
"0.5610776",
"0.5608203",
"0.55502754",
"0.5529732",
"0.55213284",
"0.54715604",
"0.5445216",
"0.54319304",
"0.5422813",
"0.54184395",
"0.53851616",
"0.5384803",
"0.5329899",
"0.5328415",
"0.53275204",
"0.5311101",
"0.52892315",
"0.5274012",
"0.5262631",
"0.5257635",
"0.52485955",
"0.5247506",
"0.524235",
"0.52386403",
"0.5232762",
"0.5227132",
"0.52065516",
"0.5177112",
"0.5169979",
"0.51632077",
"0.5160753",
"0.5150547",
"0.51466155",
"0.5146285",
"0.51423925",
"0.51420724",
"0.5133503",
"0.5111111",
"0.51106507",
"0.51095676",
"0.5109137",
"0.51039916",
"0.51033425",
"0.50991917",
"0.5068089",
"0.506132",
"0.50427294",
"0.5040689",
"0.50349593",
"0.5012117",
"0.5007534",
"0.5006565",
"0.5002144",
"0.49929884",
"0.49786544",
"0.49739486",
"0.49544752",
"0.49404833",
"0.49375236",
"0.4933486",
"0.49267364",
"0.49267364",
"0.49267364",
"0.49262506",
"0.49213204",
"0.49172682",
"0.49136025",
"0.49107346",
"0.49023765",
"0.48973992",
"0.48959926",
"0.48885277",
"0.48821396",
"0.48669505",
"0.48664147",
"0.48653984",
"0.4864626",
"0.48518857",
"0.48458034",
"0.48457345",
"0.4835213",
"0.48289648",
"0.48288283",
"0.4819401"
] | 0.0 | -1 |
Get invoice by id. | public function get($item_id, $filter_by=null)
{
//dd('variable','variable' );
$result = "";
$endpoint = $this->ComposeFullUrl($item_id, $filter_by);
// echo 'URL: ' . $endpoint . '<br>';
try
{
$result = $this->guzzle->request('GET',$endpoint, ['verify' => false])->getBody();
if($this->isAuthtokenInvalidRegenerate($result))
{
$endpoint = $this->ComposeFullUrl($id, $filter_by);
// echo 'URL: ' . $endpoint . '<br>';
// Request using a new token
$result = $this->guzzle->request('GET',$endpoint, ['verify' => false])->getBody();
}
}
catch (Exception $e)
{
$result = 'Exception : ' . $e->getMessage() . "\n";
}
$response = json_decode($result);
if ($item_id) {
$this->item = $response->item;
return ['data'=> $response->item, 'code'=>$response->code, 'message'=>$response->message];
// return json_decode($result)->item;
}
// return json_decode($result);
$this->itemList = $response->items;
return ['data'=> $response->items, 'code'=>$response->code, 'message'=>$response->message];
// return ['data'=> $response->items, 'code'=>$response->code, 'message'=>$response->message];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getInvoice(string $id): Invoice;",
"public function get($id) {\n return Invoices::find($id);\n }",
"function get_invoice_by_id ( $id )\n {\n if (!is_int($id))\n {\n throw new TypeError('$id should be an integer');\n }\n\n $invoice = $this->dsQuery ('Invoice',1,0, array (\n 'Id' => $id\n ), array (\n 'ContactId',\n 'DateCreated',\n 'InvoiceTotal',\n 'PayStatus',\n 'RefundStatus',\n 'Description',\n 'ProductSold'\n ));\n\n if (is_array($invoice))\n {\n return $invoice[0];\n }\n\n else return $invoice;\n }",
"private function getInvoice($id = null)\n {\n if (!$id) {\n\n $default_data = [\n 'customer_id' => null,\n 'invoice_number' => null,\n 'po_number' => null,\n 'invoice_date' => null,\n 'payment_due' => null,\n 'publish_status' => PublishStatus::DRAFT,\n 'published_at' => null,\n ];\n\n $invoice = $this->invoice\n ->fill($default_data)\n ->load('invoiceItems');\n\n }\n else {\n\n $invoice = $this->invoice\n ->with('invoiceItems')\n ->findOrFail($id);\n\n }\n\n return $invoice;\n }",
"public function getInvoice($invoiceId);",
"public function getInvoice($id)\n {\n $responseString = $this->apiCall('GET', 'invoices/'.$id);\n try\n {\n $responseObject = $this->parseResponse($responseString);\n return $responseObject->Invoice;\n }\n catch(Exception $e)\n {\n echo 'Can`t parse API response: '.$e->getMessage;\n return false;\n }\n }",
"public function readInvoice($id) {\r\n //get authorisation from headers\r\n $headers = getallheaders();\r\n $auth = $headers[\"Authorization\"];\r\n\r\n //check authorization\r\n $role = $this->authenticate($auth);\r\n if ($role !== 'trader') {\r\n throw new RestException(401, \"Unauthorized\");\r\n }\r\n $invoice = Invoice::find_by_id($id);\r\n if (!$invoice) {\r\n throw new RestException(400, \"no such invoice\");\r\n }\r\n return $invoice;\r\n }",
"public function getDetails($id)\n {\n $invoice = Invoice::find($id);\n $invoice->load('lines');\n $invoice->load('user');\n $invoice->load('documentosReferencia');\n\n return $invoice;\n }",
"public function findInvoice($id)\n {\n $stripeInvoice = null;\n\n try {\n $stripeInvoice = StripeInvoice::retrieve(\n $id, $this->stripeOptions()\n );\n } catch (Exception $exception) {\n //\n }\n\n return $stripeInvoice ? new Invoice($this, $stripeInvoice) : null;\n }",
"public function getInvoice($invoice_id)\n {\n return $this->remote->select()->from('invoice')->where('id', '=', $invoice_id)->fetch();\n }",
"public function actionInvoice($id){\n $invoice = Yii::$app->user->identity->getInvoices()\n ->where(['invoice_id' => (int) $id])->one();\n\n if(!$invoice) die(\"Invoice not found\");\n\n return $this->renderPartial('invoice', [\n 'invoice' => $invoice\n ]);\n }",
"public static function getInstance(int $id): Invoice {\n $cols = implode(',', self::getColumns());\n $table = self::getTableName();\n $sql = \"SELECT $cols FROM $table WHERE invoice_id = :id\";\n $db = DBEngine::getInstance();\n try {\n $db->open();\n } catch (\\Exception $e) {\n return null;\n }\n $row = $db->query($sql, array(':id' => $id))->fetch(\\PDO::FETCH_ASSOC);\n $emp = self::createInstanceFromRow($row);\n $db->close();\n return $emp;\n }",
"public function invoice($id = null)\n {\n UserModel::authentication();\n\n //get the session user\n $user = UserModel::user();\n\n //get the user's invoice\n $invoice = InvoiceModel::invoice($id);\n\n $this->View->Render('dashboard/invoice', ['invoice' => $invoice, 'user' => $user]);\n }",
"public function get_invoice( $invoice_id ) {\n \n // Check if the session exists and if the login user is admin\n $this->check_session($this->user_role, 1);\n \n // Get invoice details\n $invoice = $this->invoice->get_invoice( $invoice_id ); \n \n // Verify if invoice exists\n if ( $invoice ) {\n \n echo json_encode(['transaction_id' => $invoice[0]->transaction_id,\n 'invoice_date' => $this->get_invoice_time($invoice[0]->invoice_date),\n 'from_period' => $this->get_invoice_time($invoice[0]->from_period),\n 'to_period' => $this->get_invoice_time($invoice[0]->to_period),\n 'invoice_title' => $this->get_invoice_placeholders($invoice[0]->invoice_title, ['username' => $invoice[0]->username]),\n 'invoice_text' => $this->get_invoice_placeholders($invoice[0]->invoice_text, ['username' => $invoice[0]->username]),\n 'invoice_amount' => $invoice[0]->amount . ' ' . $invoice[0]->currency,\n 'invoice_taxes' => $invoice[0]->taxes . ' %',\n 'invoice_total' => $invoice[0]->total . ' ' . $invoice[0]->currency,\n 'plan_name' => $invoice[0]->plan_name]);\n \n }\n \n }",
"public function getInvoice($_ID)\n {\n return $this->getUnique(\"invoices\", $_ID);\n }",
"public function single_invoice($id=FALSE,$edit_id=FALSE){\n\t\n\tif($edit_id){\n\t$result\t= $this->db->get_where('invoice', array('id'=>$edit_id));\n\t}else{\n\t\t$result\t= $this->db->get_where('invoice', array('id'=>$id));\n\t}\n\treturn $result->row();\n}",
"public function show($id)\n {\n $invoice = Invoice::findOrFail($id);\n return response()->json($invoice);\n }",
"public function invoice($id)\n {\n $order = $this->orderRepository->findWithoutFail($id);\n\n if (empty($order)) {\n Flash::error('Order not found');\n\n return redirect(route('orders.index'));\n }\n \n $price = ($order->reason=='fire')?150:(($order->position=='regular')?150:250);\n\n if(empty($order->sb_number)){\n\t $invoice = Invoice::make()\n\t\t ->addItem($order->candidate->user->first_name.' '.$order->candidate->user->last_name,$price,1)\n\t\t ->logo(asset('assets/img/[email protected]'))\n\t\t ->number($order->id)\n\t\t ->tax(19)\n\t\t ->customer([\n\t\t\t 'name' => $order->company->name,\n\t\t\t 'phone' => $order->company->phone,\n\t\t\t 'address' => $order->company->address,\n\t\t\t 'reg_com' => $order->company->reg_com,\n\t\t\t 'vat_code' => $order->company->vat_code,\n\t\t ])\n\t\t ->show('invoice');\n }else{\n\t $smartBill = new SmartBillCloudRestClientClass('[email protected]','af3930ccb2c9a7c3e0b24d538f648837');\n\n\t $pdf = $smartBill->PDFInvoice(\"RO30184266\",$order->sb_name,str_pad($order->sb_number, 4, \"0\", STR_PAD_LEFT));\n\n\t return response($pdf,200,array('Content-Type' => 'application/pdf', 'Content-Disposition' => 'inline; filename=\"invoice.pdf\"'));\n }\n }",
"public function invoice($id = '')\n {\n if (!get_permission('invoice', 'is_view')) {\n access_denied();\n }\n\n $this->data['student_id'] = $id;\n $this->data['invoice'] = $this->fees_model->getInvoiceStatus($id);\n $this->data['basic'] = $this->fees_model->getInvoiceBasic($id);\n $this->data['title'] = translate('invoice_history');\n $this->data['main_menu'] = 'fees';\n $this->data['sub_page'] = 'fees/collect';\n $this->load->view('layout/index', $this->data);\n }",
"public function show($id)\n {\n $invoice = Invoice::find($id);\n if ($invoice && Auth::user()->hasInvoice($invoice)) {\n $invoice->load(['photographer', 'options', 'user']);\n return Response::json($invoice);\n }\n return Response::json(['message' => 'Invoice not found'], 404);\n }",
"public function getInvoiceById($id,$manager_id=null){\n\t\t$this->db->select('i.*,o.hash,ii.id as item_id,ii.item_name, ii.price');\n\t\t$this->db->from($this->table.' AS i');\n\t\t$this->db->join('placed_orders as o','i.order_id=o.id');\n\t\t$this->db->join('invoice_items AS ii','i.id=ii.invoice_id','left');\n\t\t$this->db->where('i.id',$id);\n\t\tif($manager_id) {\n\t\t\t$this->db->where('i.created_by',$manager_id);\n\t\t}\n\t\t$query = $this->db->get();\n\t\t$result = $query->result_array();\n\t\treturn (!empty($result))? $result : false;\n\t}",
"public function downloadInvoice($id, array $data)\n {\n return $this->findInvoiceOrFail($id)->download($data);\n }",
"public function invoice($id)\n {\n $orders = Order::with('customer', 'payment', 'shipping', 'order_items')->findOrFail($id);\n $order_info = OrderInfo::with('product')->select('id', 'order_id', 'product_id', 'product_name', 'product_price', 'product_qty')->where('order_id', $id)->get();\n\n return view('backend.order.invoice', compact('orders', 'order_info'));\n }",
"public function readClientInvoices($id) {\r\n //get authorisation from headers\r\n $headers = getallheaders();\r\n $auth = $headers[\"Authorization\"];\r\n\r\n //check authorization\r\n $role = $this->authenticate($auth);\r\n if ($role !== 'trader') {\r\n throw new RestException(401, \"Unauthorized\");\r\n }\r\n $sql = \"SELECT * FROM invoice WHERE clientid = '{$id}'\";\r\n $invoices = Invoice::find_by_sql($sql);\r\n if (!$invoices) {\r\n throw new RestException(400, \"no invoices\");\r\n }\r\n return $invoices;\r\n }",
"public function show($id)\n {\n $invoice = Invoice::with('details', 'details.item', 'client')->find($id);\n if (!$invoice) {\n $closure = [\n 'message' => 'Invoice not found !'\n ];\n return response()->json($closure, 404); \n }\n $closure = [\n 'data' => $invoice\n ];\n return response()->json($closure, 200);\n }",
"public function selected_invoice($id=FALSE){\n\t\n\t$result\t= $this->db->get_where('invoice', array('client_id'=>$id));\n\treturn $result->result();\n}",
"public function show($id)\n {\n\t\treturn PaymentLineItems::where('invoice_id', $id)->get()->toArray();\n\t}",
"public function show($id)\n {\n \n $invoice = $this->invoiceRepository->findWithoutFail($id);\n\n if (empty($invoice)) {\n Flash::error('invoice not found');\n\n return redirect(route('invoices.index'));\n }\n\n return view('invoices.show')->with('invoice', $invoice);\n }",
"public function show($id)\n {\n $returnData = Invoice::find($id);\n foreach ($returnData->invoiceItems as $key => $value) {\n $value->return_qty = 0;\n }\n \n return $returnData;\n }",
"public function show($id)\n\t{\n\t\t$invoice = Invoice::findOrFail($id);\n\n\t\treturn view('invoices.show', compact('invoice'));\n\t}",
"public function getById($id)\n {\n return $this->indicacaoRepository->getById($id);\n }",
"public function get(string $id)\n {\n $response = $this->client->request('get', \"customer_invoices/{$id}\");\n\n return json_decode($response->getBody()->getContents(), true);\n }",
"public function invoices($id = null)\n {\n $project = $this->project->findOrFail($id);\n $this->authorize('invoices', $project);\n $invoices = new InvoicesResource($project->invoices()->orderBy('id', 'desc')->paginate(20));\n if ($this->request->has('json')) {\n $data['invoices'] = $invoices;\n return view('projects::_ajax._invoices')->with($data);\n }\n return response($invoices, Response::HTTP_OK);\n }",
"public function show($id)\n {\n $invoice = Invoice::findOrFail($id);\n return view('invoices.show', compact('invoice'));\n }",
"public function findInvoiceOrFail($id)\n {\n try {\n $invoice = $this->findInvoice($id);\n } catch (InvalidInvoice $exception) {\n throw new AccessDeniedHttpException;\n }\n\n if (is_null($invoice)) {\n throw new NotFoundHttpException;\n }\n\n return $invoice;\n }",
"public function show($id)\n {\n $invoice = Invoice::findOrFail($id);\n if($invoice->status!='draft'){\n return response(402);\n }\n $invoice->invoiceLines = InvoiceItems::where('invoice_id', $id)->get();\n foreach ($invoice->invoiceLines as $invoiceLine) {\n $invoiceLine->sec = $invoiceLine->quantity * 60;\n $invoiceLine->running=false;\n\n //TODO Format date\n $invoiceLine->formattedTime =\"00:00:00\" ; \n }\n $invoice->user_email = $invoice->draft_email;\n \n return response()->json(\n [\n 'invoice' => $invoice,\n ],\n 200\n );\n }",
"public function show($id)\n {\n //\n $invoice = Invoice::find($id);\n return view('invoices.show')->with('invoice', $invoice);\n }",
"public function get_invoice($invoice_id)\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->where('invoice.member_id = member.member_id AND invoice.invoice_status = invoice_status.invoice_status_id AND invoice.invoice_id = '.$invoice_id);\n\t\t$query = $this->db->get('invoice, invoice_status, member');\n\t\t\n\t\treturn $query;\n\t}",
"public static function find($id){\n return Purchase::find($id);\n }",
"public function show($id)\n {\n //\n // $invoice = Invoice::where('id', $id)->first();\n $purchase = Purchase::where('id', $id)->with('purchase_products')->get();\n return $purchase;\n // return ['msg' => 'success'];\n }",
"public function getInvoice()\n {\n\n $CfdiId = 'ab9PC44sxbs2LUYaGCTm-g2';\n\n $params = [\n 'type' => 'issued',\n ];\n\n $result = $this->facturama->get('Cfdi/' . $CfdiId, $params);\n return $result;\n }",
"public function show($id)\n {\n $productinvoices = ProductInvoice::findOrFail($id);\n $invoices = Invoice::findOrFail($id);\n return view('invoices.show', compact(['invoices','productinvoices']));\n }",
"public function show($id)\n {\n return view('admin::sales.invoices.view', ['invoice' => Invoice::find($id)]);\n }",
"public function edit($id)\n {\n $page_title = 'Invoice';\n $page_description = 'Edit invoice';\n $invoice = Invoice::find($id);\n $project = Project::where('project_number', '=', $invoice->project_id);\n $customer = Customer::where('customer_number', '=', $invoice->customer_id);\n $customer_invoice = DB::table('invoices')\n ->leftJoin('projects', 'projects.project_number', '=', 'invoices.project_id')\n ->leftJoin('customers', 'customers.customer_number', '=', 'invoices.customer_id')\n ->where('invoice_id', '=', $id)\n ->first();\n return view('invoice.edit', compact('customer_invoice', 'invoice', 'page_title', 'page_description'));\n }",
"public function setInvoiceID($id)\n {\n $this->_invoiceID = $id;\n return $this;\n }",
"public function checkInvoice($id)\n {\n $url = $this->server_root . str_replace(\"[id]\", $id, $this->api_uri_check_payment);\n $nonce = round(microtime(true) * 1000);\n $message = $nonce . $url;\n $private_key = Mage::helper('core')->decrypt($this->getConfiguration(\"private_key\"));\n $hash = hash_hmac(\"sha256\", $message, $private_key, false);\n $http_client = $this->getHTTPClient();\n $http_client->setHeaders($this->getHeaders($nonce, $hash));\n $http_client->setMethod(\"GET\")->setUri($url);\n try {\n $body = $http_client->request()->getBody();\n $data = json_decode($body, true);\n Mage::getSingleton('core/session')->setData('check_invoice', $data);\n return $data;\n } catch (Exception $exc) {\n $this->log($exc->getMessage(), $id);\n $this->log(\"EXCEPTION:\" . json_encode($exc), $id);\n Mage::throwException(\n Mage::helper('bitcoin')->__(\n \"We're sorry, an error has occurred while completing your request. Please refresh the page to try again. If the error persists, please send us an email at [email protected]\\n\" . $exc->getMessage()\n )\n );\n }\n return false;\n }",
"public function index($id = false)\r\n {\r\n $this->list_invoices($id);\r\n }",
"public function show($id)\n {\n return view('invoices.create')\n ->with('invoiceid', $id);\n }",
"public function single($id){\n $data = InventoryPurchaseReturn::findOrFail($id);\n return view('pos.addItem.return.invoice',compact('data'));\n }",
"public function get($id)\n {\n return $this->provinsiRepo->get($id);\n }",
"public function invoice($id = '')\r\n {\r\n if (!has_permission('invoices', '', 'view') && !has_permission('invoices', '', 'view_own')) {\r\n access_denied('invoices');\r\n }\r\n if ($this->input->post()) {\r\n $invoice_data = $this->input->post(NULL, FALSE);\r\n if ($id == '') {\r\n if (!has_permission('invoices', '', 'create')) {\r\n access_denied('invoices');\r\n }\r\n $id = $this->invoices_model->add($invoice_data);\r\n if ($id) {\r\n set_alert('success', _l('added_successfuly', _l('invoice')));\r\n redirect(admin_url('invoices/list_invoices/' . $id));\r\n }\r\n } else {\r\n if (!has_permission('invoices', '', 'edit')) {\r\n access_denied('invoices');\r\n }\r\n $success = $this->invoices_model->update($invoice_data, $id);\r\n if ($success) {\r\n set_alert('success', _l('updated_successfuly', _l('invoice')));\r\n }\r\n redirect(admin_url('invoices/list_invoices/' . $id));\r\n }\r\n }\r\n if ($id == '') {\r\n $title = _l('create_new_invoice');\r\n $data['billable_tasks'] = array();\r\n } else {\r\n $invoice = $this->invoices_model->get($id);\r\n\r\n if (!$invoice || (!has_permission('invoices', '', 'view') && $invoice->addedfrom != get_staff_user_id())) {\r\n blank_page(_l('invoice_not_found'), 'danger');\r\n }\r\n\r\n $data['invoices_to_merge'] = $this->invoices_model->check_for_merge_invoice($invoice->clientid, $invoice->id);\r\n $data['expenses_to_bill'] = $this->invoices_model->get_expenses_to_bill($invoice->clientid);\r\n $data['invoice_recurring_invoices'] = $this->invoices_model->get_invoice_recuring_invoices($id);\r\n\r\n $data['invoice'] = $invoice;\r\n $data['edit'] = true;\r\n $data['billable_tasks'] = $this->tasks_model->get_billable_tasks($invoice->clientid);\r\n $title = _l('edit', _l('invoice_lowercase')) . ' - ' . format_invoice_number($invoice->id);\r\n }\r\n if ($this->input->get('customer_id')) {\r\n $data['customer_id'] = $this->input->get('customer_id');\r\n $data['do_not_auto_toggle'] = true;\r\n }\r\n\r\n $this->load->model('payment_modes_model');\r\n $data['payment_modes'] = $this->payment_modes_model->get('', array(\r\n 'expenses_only !=' => 1\r\n ));\r\n $this->load->model('taxes_model');\r\n $data['taxes'] = $this->taxes_model->get();\r\n $this->load->model('invoice_items_model');\r\n $data['items'] = $this->invoice_items_model->get_grouped();\r\n $data['items_groups'] = $this->invoice_items_model->get_groups();\r\n\r\n $this->load->model('currencies_model');\r\n $data['currencies'] = $this->currencies_model->get();\r\n\r\n $where_clients = 'tblclients.active=1';\r\n\r\n if (!has_permission('customers', '', 'view')) {\r\n $where_clients .= ' AND tblclients.userid IN (SELECT customer_id FROM tblcustomeradmins WHERE staff_id=' . get_staff_user_id() . ')';\r\n }\r\n\r\n $data['clients'] = $this->clients_model->get('', $where_clients);\r\n if ($id != '') {\r\n if (total_rows('tblclients', array(\r\n 'active' => 0,\r\n 'userid' => $data['invoice']->clientid\r\n )) > 0 || (total_rows('tblcustomeradmins', array(\r\n 'staff_id' => get_staff_user_id(),\r\n 'customer_id' => $data['invoice']->clientid\r\n )) == 0 && !has_permission('customers', '', 'view'))) {\r\n $data['clients'][] = $this->clients_model->get($data['invoice']->clientid, array(), 'row_array');\r\n }\r\n }\r\n\r\n $data['projects'] = array();\r\n if ($id != '' || isset($data['customer_id'])) {\r\n\r\n $where = '';\r\n $where_customer_id = (isset($data['customer_id']) ? $data['customer_id'] : $invoice->clientid);\r\n $where .= 'clientid=' . $where_customer_id;\r\n\r\n if (!has_permission('projects', '', 'view')) {\r\n $where .= ' AND id IN (SELECT project_id FROM tblprojectmembers WHERE staff_id=' . get_staff_user_id() . ')';\r\n }\r\n\r\n $data['projects'] = $this->projects_model->get('', $where);\r\n\r\n if ($id != '' && $data['invoice']->project_id != 0) {\r\n if (total_rows('tblprojectmembers', array(\r\n 'staff_id' => get_staff_user_id(),\r\n 'project_id' => $data['invoice']->project_id\r\n )) == 0 && !has_permission('projects', '', 'view')) {\r\n $this->db->where('id', $data['invoice']->project_id);\r\n $data['projects'][] = $this->db->get('tblprojects')->row_array();\r\n }\r\n }\r\n }\r\n\r\n $data['staff'] = $this->staff_model->get('', 1);\r\n $data['title'] = $title;\r\n $data['bodyclass'] = 'invoice';\r\n $data['accounting_assets'] = true;\r\n $this->load->view('admin/invoices/invoice', $data);\r\n }",
"public function getInvoiceID(){\n return $this->InvoiceID;\n }",
"public function show(Invoices $invoice)\n {\n return $invoice;\n }",
"public function invoice(){\n return $this->hasOne(Invoice::class,'id','invoice_id');\n }",
"public function edit($id)\n\t{\n\t\t$invoice = Invoice::findOrFail($id);\n\n\t\treturn view('invoices.edit', compact('invoice'));\n\t}",
"function InfGetInvoice($inf_contact_id, $inf_invoice_id) {\n\t$object_type = \"Invoice\";\n\t$class_name = \"Infusionsoft_\" . $object_type;\n\t$object = new $class_name();\n\t$objects = Infusionsoft_DataService::query(new $class_name(), array('ContactId' => $inf_contact_id, 'Id' => $inf_invoice_id));\n\n $invoice_details = false;\n foreach ($objects as $i => $object) {\n\t\t$array = $object->toArray();\n $invoice_details = $array;\n }\n\treturn $invoice_details;\n}",
"public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AcmeInvoiceBundle:Invoice')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Invoice entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AcmeInvoiceBundle:Invoice:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('invoices.create')\n ->with('invoiceid', $id);\n }",
"public function edit($id)\n {\n //\n $invoice = Invoice::findOrFail($id);\n return view('finance.invoice.edit', compact('invoice'));\n }",
"public function edit($id)\n {\n if (! Gate::allows('invoice_edit')) {\n return abort(401);\n }\n $relations = [\n 'users' => User::get()->pluck('name', 'id')->prepend('Please select', ''),\n ];\n\n $invoice = Invoice::findOrFail($id);\n\n return view('invoices.edit', compact('invoice') + $relations);\n }",
"public function invoice($order_id)\n\t{\n\t\t$check = DB::select(\"SELECT COUNT(*) as count FROM orders WHERE id = '\".$order_id.\"' AND customer = '\".customer('id').\"' LIMIT 1\")[0];\n\t\tif ($check->count == 0){\n\t\t\tabort(404);\n\t\t}\n\t\t$order = DB::select(\"SELECT * FROM orders WHERE id = '\".$order_id.\"'\")[0];\n\t\t$header = $this->header(translate('Invoice'),false,true);\n\t\t$fields = DB::select(\"SELECT name,code FROM fields ORDER BY id ASC\");\n\t\t$footer = $this->footer();\n\t\treturn view('invoice')->with(compact('header','order','fields','footer'));\n\t}",
"public function show(Request $request, int $id): Response\n {\n $invoice = $request->user()->invoice($id);\n\n $viewVars = [\n 'user' => $request->user(),\n 'invoice' => $invoice,\n 'client' => $invoice->client,\n 'pageTitle' => $invoice->name,\n ];\n\n $pdf = app()->make('dompdf.wrapper');\n $pdf->loadView('invoice.show', $viewVars);\n\n $filename = sprintf('invoice_%s.pdf', $invoice->number);\n\n return $pdf->stream($filename);\n }",
"public function show($id)\n {\n $dataOfInvoices = InvoicesModel::find($id);\n\n return View::make('crm.invoices.show')\n ->with([\n 'invoices' => $dataOfInvoices,\n 'inputText' => $this->language->getMessage('messages.InputText')\n ]);\n }",
"public function getHeader($id){\n $result = Invoice::where('id', $id)\n ->whereNull('deleted_at')\n ->first();\n return $result;\n }",
"public function edit($id)\n {\n $invoice = $this->getInvoice($id);\n\n// return $invoice;\n\n return view('examples.vueinvoices.edit', compact('invoice'));\n }",
"public function getIncidencia($id){\n\t\t$sql = \" SELECT * FROM incidencias WHERE id = '$id' LIMIT 1 \";\n\t\t$resultado = $this->db->query($sql);//ejecutando la consulta con la conexión establecida\n\n\t\t$row = $resultado->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t\n\t\treturn $row;\n\n\t}",
"public function getInvoiceID()\n {\n return $this->invoiceID;\n }",
"function loadInvoice($invoiceId) {\n\t\t\n\t\t\t$invoiceId = (int) $invoiceId;\n\t\t\t\n\t\t\t$myQuery = \"\n\t\t\t\tSELECT *\n\t\t\t\tFROM fh_invoice\n\t\t\t\tWHERE invoice_id = $invoiceId\n\t\t\t\";\n\t\t\t\n\t\t\t$myInvoice = DMDatabase::loadObject($myQuery);\n\t\t\t\n\t\t\t$myQuery = \"\n\t\t\t\tSELECT ir.*, s.name AS stock_name\n\t\t\t\tFROM fh_invoice_row AS ir\n\t\t\t\tLEFT JOIN fh_stock AS s ON (ir.stock_id = s.stock_id)\n\t\t\t\tWHERE ir.invoice_id = $invoiceId\n\t\t\t\";\n\t\t\t\n\t\t\t$myInvoice->rows = DMDatabase::loadObjectList($myQuery);\n\t\t\t\n\t\t\treturn $myInvoice;\n\t\t\t\n\t\t}",
"public function invoice_id(){\n return parent::get_fk_object(\"invoice_id\");\n }",
"public function show($id)\n {\n //\n $inquiry = Inquiry::find($id);\n\n return $inquiry;\n }",
"public function edit($id)\n {\n if(!Sentinel::inRole('main')){\n //Flash::error('invoice not found');\n return redirect('invoices');\n //return;\n }\n\n $members = $this->invoiceRepository->membersNames();\n $invoice = $this->invoiceRepository->findWithoutFail($id);\n\n if (empty($invoice)) {\n Flash::error('invoice not found');\n\n return redirect(route('invoices.index'));\n }\n\n return view('invoices.edit')->with('invoice', $invoice)->with(['members' => $members]);\n }",
"public function editInvoice($id)\n {\n $user = auth()->user();\n $datosFactura = DB::table('quotes')\n ->select('quotes.account_id', 'quotes.created_by_id', 'quotes.id as quoteId', 'quotes.quote_date',\n 'accounts.name as accountName','users.name as userName','quotes.stage_id',\n 'quotes.invoice_date',\n 'accounts.document_number','document_types.name as documenttype')\n ->join('accounts', 'accounts.id', '=', 'quotes.account_id')\n ->join('document_types', 'document_types.id', '=', 'accounts.document_type_id')\n ->join('users', 'users.id', '=', 'quotes.created_by_id')\n ->where('users.organization_id', $user->organization_id)\n ->where('quotes.id', $id)->first();\n $files = DB::table('quotes')\n ->select('quote_files.name', 'quote_files.id')\n ->join('quote_files', 'quote_files.quote_id', '=', 'quotes.id')\n ->join('users', 'users.id', '=', 'quotes.created_by_id')\n ->where('quotes.id', $id)\n ->where('users.organization_id', $user->organization_id)->get();\n $invoice_date = $datosFactura->invoice_date !== null ? $datosFactura->invoice_date : date(\"Y-m-d\");\n return view('quote.editInvoice',compact('datosFactura','id','invoice_date','files'));\n }",
"public static function getInvoiceById($invoice_id, $offset, $limit){\n $criteria = new CDbCriteria;\n $sql = 'SELECT * FROM `reader_invoice`\n WHERE `Reader_id` = (\n SELECT `Reader_id` FROM `reader_invoice`\n WHERE `Invoice_id` = '.$invoice_id.'\n )\n AND `Earning_type` = (\n SELECT `Earning_type` FROM `reader_invoice`\n WHERE `Invoice_id` = '.$invoice_id.'\n )\n AND `reader_status` = 0 LIMIT :offset, :limit';\n $connection=Yii::app()->db;\n $command = $connection->createCommand($sql);\n $command->bindValue(':offset', $offset);\n $command->bindValue(':limit', $limit);\n\n return $command->query();\n\n }",
"public function edit($id)\n {\n if (! Gate::allows('invoice_edit')) {\n return abort(401);\n }\n \n $users = \\App\\User::get()->pluck('name', 'id')->prepend(trans('global.app_please_select'), '');\n $projects = \\App\\Project::get()->pluck('name', 'id')->prepend(trans('global.app_please_select'), '');\n $expense_types = \\App\\ExpenseType::get()->pluck('name', 'id')->prepend(trans('global.app_please_select'), '');\n $meetings = \\App\\Meeting::get()->pluck('name', 'id')->prepend(trans('global.app_please_select'), '');\n $contingencies = \\App\\Contingency::get()->pluck('name', 'id')->prepend(trans('global.app_please_select'), '');\n $providers = \\App\\Provider::get()->pluck('name', 'id')->prepend(trans('global.app_please_select'), '');\n $service_types = \\App\\ServiceType::get()->pluck('name', 'id')->prepend(trans('global.app_please_select'), '');\n $pms = \\App\\User::get()->pluck('name', 'id')->prepend(trans('global.app_please_select'), '');\n $finances = \\App\\User::get()->pluck('name', 'id')->prepend(trans('global.app_please_select'), '');\n\n $invoice = Invoice::findOrFail($id);\n\n return view('admin.invoices.edit', compact('invoice', 'users', 'projects', 'expense_types', 'meetings', 'contingencies', 'providers', 'service_types', 'pms', 'finances'));\n }",
"public function get($id) {\r\n\treturn $this->getRepository()->find($id);\r\n }",
"public function show($id)\n\t{\n\t\tif(isset($this->session->isactive)){\n\t\t\t$this->load->model('invoice_model');\n\t\t\t$invoice = $this->invoice_model->get_invoice($id);\n\n\t\t\t$this->load->model('student_model');\n\t\t\t$name = $this->student_model->get_every_student($invoice[0]['gr_number']);\n\n\t\t\t// Formatting date as per datepicker jquery plugin\n\t\t\t$date = explode('-',$invoice[0]['date']);\n\t\t\t$invoice[0]['dd'] = $date[2];\n\t\t\t$invoice[0]['mm'] = $date[1];\n\t\t\t$invoice[0]['yy'] = $date[0];\n\n\t\t\t// Layout view is common view containing sidebar and navbar\n\t\t\t// in which respective view is loaded as main content view\n\t\t\t$data['invoice'] = $invoice;\n\t\t\t$data['name'] = $name[0]['name'];\n $data['view'] = 'invoice_show_view';\n\t\t\t$data['title'] = 'IQRA | Invoice';\n\t\t\t$data['breadcrumb_1'] = 'Invoice';\n\t\t\t$data['breadcrumb_2'] = 'Invoice';\n\t\t\t$data['breadcrumb_3'] = 'Show';\n $this->load->view('layout_view',$data);\n\t\t}\n\t\telse {\n\t\t\tredirect('login');\n\t\t}\n\n\t}",
"function bpGetInvoice($invoiceId, $apiKey=false) {\r\n\t\r\n}",
"public function invoice_info( $invoice_id ) {\r\n\t\treturn $this->_send_request( 'invoices/'.$invoice_id );\r\n\t}",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById(int $id);",
"public function show($id)\n {\n $invoice = Invoice::findOrFail($id);\n $invoice_details = InvoiceDetails::where(\"id_invoice\", $id)->orderBy('id', \"desc\")->get();\n $Attachments = Attachment::where(\"invoice_id\", $id)->orderBy('id', \"desc\")->get();\n\n return view('admin.invoices.invoiceDetails', compact('invoice', 'invoice_details', 'Attachments'));\n }",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);"
] | [
"0.89482105",
"0.8581355",
"0.8532416",
"0.8440761",
"0.82369214",
"0.8125492",
"0.7909596",
"0.77483016",
"0.77054983",
"0.7678783",
"0.766735",
"0.7654497",
"0.7530551",
"0.75001997",
"0.749735",
"0.749517",
"0.74112636",
"0.7384472",
"0.7332559",
"0.7244136",
"0.72000736",
"0.7190083",
"0.71557796",
"0.71254784",
"0.7110839",
"0.710704",
"0.7106433",
"0.70116097",
"0.69929826",
"0.69827825",
"0.69715875",
"0.69443434",
"0.69210315",
"0.69014317",
"0.688114",
"0.6850596",
"0.6849629",
"0.6823058",
"0.6817185",
"0.6815729",
"0.6814956",
"0.6805133",
"0.6779885",
"0.67522526",
"0.67458785",
"0.6743457",
"0.6739522",
"0.67373574",
"0.67289424",
"0.6700518",
"0.66932523",
"0.66729194",
"0.6660824",
"0.66494346",
"0.6648646",
"0.66443294",
"0.66411555",
"0.66365856",
"0.6631821",
"0.6626477",
"0.6620492",
"0.66200155",
"0.66197795",
"0.6608778",
"0.6607749",
"0.65987915",
"0.65975434",
"0.6593377",
"0.6573702",
"0.65728456",
"0.6571872",
"0.65695465",
"0.6566643",
"0.6561031",
"0.6558368",
"0.65407604",
"0.653699",
"0.6535547",
"0.6531044",
"0.6531044",
"0.6531044",
"0.6531044",
"0.6531044",
"0.6531044",
"0.6531044",
"0.6531044",
"0.6531044",
"0.6531044",
"0.6531044",
"0.6531044",
"0.6531044",
"0.6531044",
"0.6531044",
"0.65221345",
"0.650694",
"0.65015954",
"0.65015954",
"0.65015954",
"0.65015954",
"0.65015954",
"0.65015954"
] | 0.0 | -1 |
Compose URL to Post or PUT data. | private function ComposePostPutURL($id=null, $ignore_auto_number_generation=false, $send=false)
{
$url = $url = $this->URL_BOOKS_ZOHO_ENDPOINT . $this->entity;
if($id)
{
$url .= "/$id/";
}
return $url . '?organization_id=' . $this->organization_id . '&ignore_auto_number_generation=' . $ignore_auto_number_generation . '&send=' . $send .'&authtoken=' . $this->token ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testUpdateUrlUsingPOST()\n {\n }",
"function post_to_url($url, $data) {\r\n\t\t$fields = '';\r\n\t\tforeach($data as $key => $value) {\r\n\t\t\t$fields .= $key . '=' . $value . '&';\r\n\t\t}\r\n \r\n\t\trtrim($fields, '&');\r\n\t\t$post = curl_init();\r\n \r\n\t\t curl_setopt($post, CURLOPT_URL, $url);\r\n\t\t curl_setopt($post, CURLOPT_POST, count($data));\r\n\t\t curl_setopt($post, CURLOPT_POSTFIELDS, $fields);\r\n\t\t curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t $result = curl_exec($post);\r\n\t\t curl_close($post);\r\n\t}",
"public function toUrl()\n {\n $postData = $this->toPostdata();\n $out = $this->getNormalizedHttpUrl();\n if ($postData) {\n $out .= '?'.$postPata;\n }\n return $out;\n }",
"public function to_url()\n {\n $post_data = $this->to_postdata();\n $out = $this->get_http_url();\n if ($post_data) {\n $out .= '?'.$post_data;\n }\n\n return $out;\n }",
"function url( \n\t $name, $title = null, $value = null, \n\t $required = false, \n\t $attributes = null\n\t){\n return $this->input(\n\t $name, \n\t Form::TYPE_URL,\n\t $title, \n\t $value, \n\t $required, \n\t $attributes,\n\t null,\n\t Form::DATA_STRING\n );\n\t}",
"public function to_url()\n {\n $out = $this->get_normalized_http_url() . \"?\";\n $out .= $this->to_postdata();\n return $out;\n }",
"public function to_url() {\n $post_data = $this->to_postdata();\n $out = $this->get_normalized_http_url();\n if ($post_data) {\n $out .= '?'.$post_data;\n }\n return $out;\n }",
"public function buildPostUrl() : string{\n\t\treturn $this->userUri.'/videos';\n\t}",
"function _http_inject_url($url, array $data) {\n // Parse the url\n $url_parts = parse_url($url);\n\n // Explicitly parse the query part as well\n if (isset($url_parts['query']))\n parse_str($url_parts['query'], $url_query);\n else\n $url_query = array();\n\n // Splice in the token authentication\n $url_query = array_merge($data, $url_query);\n\n // Rebuild the url\n $url_parts['query'] = http_build_query($url_query);\n return _http_build_url($url_parts);\n}",
"protected function _getUrl() {\n\t\t\t$this->_url =\timplode('/', array(\n\t\t\t\t$this->_baseUrlSegment,\n\t\t\t\t$this->_apiSegment,\n\t\t\t\timplode('_', array(\n\t\t\t\t\t$this->_type,\n\t\t\t\t\t$this->_language,\n\t\t\t\t\t$this->_locale,\n\t\t\t\t)),\n\t\t\t\t$this->_apiVersionSegment,\n\t\t\t\t$this->controller,\n\t\t\t\t$this->function\t\n\t\t\t));\n\n\t\t\tempty($this->_getFields) ?: $this->_url .= '?' . http_build_query($this->_getFields);\n\t\t}",
"protected function buildUrl()\n {\n $basePath = env('SLACK_API_HOST');\n $postUri = \"chat.postMessage\";\n $this->url = $basePath . $postUri;\n }",
"public function url()\n {\n if (empty($this->parameters)) {\n return $this->url;\n }\n $total = array();\n foreach ($this->parameters as $k => $v) {\n if (is_array($v)) {\n foreach ($v as $va) {\n $total[] = HttpClient::urlencodeRFC3986($k).\"[]=\".HttpClient::urlencodeRFC3986($va);\n }\n } else {\n $total[] = HttpClient::urlencodeRFC3986($k).\"=\".HttpClient::urlencodeRFC3986($v);\n }\n }\n $out = implode(\"&\", $total);\n\n return $this->url.'?'.$out;\n }",
"function PostURL($url, $postData, $options = array())\n\t{\n\t\t//\t\t$postString = '';\n\t\t//\t\tforeach ($postData as $key => $value) { $postString .= \"$key=$value&\"; }\n\n//\t\t\n//\t\t$options['post_string'] = http_build_query($postData);\n\t\t$options['post_array'] = $postData;\n\t\treturn self::FetchURL($url, $options);\n\t\t\n\t}",
"public function url() {\n if (empty($this->parameters)) {\n return $this->url;\n }\n\n return $this->url . '?' . http_build_query($this->parameters);\n }",
"private function addUrlData($url, array $data) {\n // Do nothing, if there is no url data\n if (empty($data)) {\n return $url;\n }\n\n if (strpos($url, '?') !== false) {\n throw new \\InvalidArgumentException();\n }\n\n $parts[] = trim($url, '/');\n foreach ($data as $key => $value) {\n if ($value) {\n $parts[] = urlencode($key) .'/' . urlencode($value);\n } else {\n $parts[] = urlencode($key);\n }\n }\n return implode('/', $parts);\n }",
"function constructURL($object);",
"function make_put_call($mid_url, $put_values) {\n global $base_url, $end_url;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $base_url . $mid_url . $end_url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($put_values));\n \n $output = curl_exec($curl);\n curl_close($curl);\n \n return $output;\n }",
"function elgg_http_build_url(array $parts) {\n\t// build only what's given to us.\n\t$scheme = isset($parts['scheme']) ? \"{$parts['scheme']}://\" : '';\n\t$host = isset($parts['host']) ? \"{$parts['host']}\" : '';\n\t$port = isset($parts['port']) ? \":{$parts['port']}\" : '';\n\t$path = isset($parts['path']) ? \"{$parts['path']}\" : '';\n\t$query = isset($parts['query']) ? \"?{$parts['query']}\" : '';\n\n\t$string = $scheme . $host . $port . $path . $query;\n\n\treturn $string;\n}",
"protected function prepareUrl()\n {\n return 'http://'.$this->_host.'/service/v'.$this->_apiVersion.'/rest.php';\n }",
"function generate_api_url(){\n\t\t$parameters = array(\n\t\t\t'uid' \t\t => $this->uid,\n\t\t\t'pswd' \t\t => $this->pswd,\n\t\t\t'api' \t\t => $this->api,\n\t\t\t'apiversion' => $this->apiversion\t\t\t\n\t\t);\n\t\t\n\t\tif(!empty($this->sid) && !empty($this->encrypted_pswd)){\n\t\t\t$parameters['sid'] = $this->sid;\n\t\t\t$parameters['pswd'] = $this->encrypted_pswd;\n\t\t}\n\t\t\n\t\t//var_dump($parameters);\n\t\t\n\t\treturn self::api_end_point . '?' . http_build_query($parameters);\n\t}",
"public function toUrl()\n {\n $queryParams = '';\n\n $index = 0;\n\n foreach ($this->args as $key => $param) {\n $separator = '?';\n\n if ($index) {\n $separator = '&';\n }\n\n $queryParams .= \"{$separator}{$key}={$param}\";\n\n $index++;\n }\n\n return \"https://dev-ops.mee.ma/glenn/1/5/people.jpg{$queryParams}\";\n }",
"public function getApiUrl() {\n if(in_array($this->getType(), array('presentation', 'document'))) {\n return SERVER_PROTOCOL .'://'. SERVER_ADDRESS .':'.SERVER_PORT . SERVER_ROOT .'/api/'. $this->getType() .'/'. $this->getId() .'/';\n } else {\n return SERVER_PROTOCOL .'://'. SERVER_ADDRESS .':'.SERVER_PORT . SERVER_ROOT .'/api/file/'. $this->getId() .'/';\n }\n }",
"function h_POST(string $url, $data = []) {\n // if URL doesn't start with \"http\", prepend API_URL\n if (!preg_match('/^http/', $url, $matches)) {\n $url = API_URL . $url;\n }\n\n $payload = json_encode($data);\n\n // Prepare new cURL resource\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLINFO_HEADER_OUT, true);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);\n \n // Set HTTP Header for POST request \n curl_setopt(\n $ch,\n CURLOPT_HTTPHEADER,\n [\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($payload)\n ]\n );\n \n // Submit the POST request\n $response = curl_exec($ch);\n curl_close($ch);\n\n return $response;\n}",
"public function url($p)\n {\n if (!is_array($p))\n $p = array('_action' => @func_get_arg(0));\n\n $task = $p['_task'] ? $p['_task'] : ($p['task'] ? $p['task'] : $this->task);\n $p['_task'] = $task;\n unset($p['task']);\n\n $url = './';\n $delm = '?';\n foreach (array_reverse($p) as $key => $val) {\n if ($val !== '' && $val !== null) {\n $par = $key[0] == '_' ? $key : '_'.$key;\n $url .= $delm.urlencode($par).'='.urlencode($val);\n $delm = '&';\n }\n }\n return $url;\n }",
"public function getUrl() {\n\t\t$url = $this->getBaseUrl().$this->getBasePath().$this->getOperation();\n\t\t$params = http_build_query($this->getUrlParameters());\n\t\tif ($params) {\n\t\t\t$url .= '?'.$params;\n\t\t}\n\t\treturn $url;\n\t}",
"private function _buildUrl() {\n $url = OPENDIGI_API_ENDPOINT;\n $url .= '?Vcollection=' . implode('+', $this->_collections);\n if ($this->_languages)\n $url .= '&Vlanguages=' . implode('+', $this->_languages);\n if ($this->_subjectIds)\n $url .= '&Vsubjectids=' . implode('+', $this->_subjectIds);\n\n return $url;\n }",
"public function getPostUrl()\n {\n return self::POST_URL;\n }",
"function _http_build_url($parts) { \n return implode(\"\", array(\n isset($parts['scheme']) ? $parts['scheme'] . '://' : '',\n isset($parts['user']) ? $parts['user'] : '',\n isset($parts['pass']) ? ':' . $parts['pass'] : '',\n (isset($parts['user']) || isset($parts['pass'])) ? \"@\" : '',\n isset($parts['host']) ? $parts['host'] : '',\n isset($parts['port']) ? ':' . intval($parts['port']) : '',\n isset($parts['path']) ? $parts['path'] : '',\n isset($parts['query']) ? '?' . $parts['query'] : '',\n isset($parts['fragment']) ? '#' . $parts['fragment'] : ''\n ));\n}",
"public function httpPost($redirectTo = null) : string;",
"function http_post_data($url, $data = null, ?array $options = null, ?array &$info = null) {}",
"public function ov_url($name, $value = ''){\n $args = func_get_args(); array_shift($args); array_shift($args);\n return $this->generate_input('url', $name, $value, true, $args);\n }",
"public function put($database, $url, $data);",
"protected function _build_url() {\n\n $params = array_filter([\n 'name' => $this->_names,\n 'country_id' => $this->_country_id,\n 'language_id' => $this->_language_id,\n ], function($v) {\n if (!is_array($v)) {\n return strlen(trim($v)) > 0;\n } else {\n return $v;\n }\n });\n //Only pass apikey if there is one set\n if ($api_key = $this->get_api_key()) {\n $params['apikey'] = trim($api_key);\n }\n\n return self::BASE . '?' . http_build_query($params);\n }",
"function rest_put_data($url, $data)\n{\n if (is_array($data)) {\n $data = json_encode($data);\n }\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n curl_close($ch);\n return $result;\n}",
"private function generateUrl() : string\n {\n return $this->apiUrl.$this->ownerRepo.$this->branchPath.$this->branch;\n }",
"protected function get_endpoint_url() {\n\n\t\t$args = http_build_query( array( 'apikey' => $this->api_key ) );\n\t\t$base = $this->route . $this->app_id;\n\t\t$url = \"$base?$args\";\n\n\t\treturn $url;\n\t}",
"function http_build_url($url = null, $parts = null, $flags = null, ?array &$new_url = null) {}",
"abstract public function get_url_update();",
"function http_put_data($url, $data = null, ?array $options = null, ?array &$info = null) {}",
"public function uriFor(string $name, array $data = [], array $queryData = []):string;",
"private function url_params()\n {\n return \"?user={$this->login}&password={$this->password}&answer=json\";\n }",
"public function editUrl() {}",
"function http_post_fields($url, ?array $data = null, ?array $files = null, ?array $options = null, ?array &$info = null) {}",
"private function _url($par = array()) {\n\t\t$get = $_GET;\n\t\t\n\t\tforeach ((array) $par AS $key => $val) { //overide value\n\t\t\tif ($key == 'path') //if path, encode\n\t\t\t\t$get['path'] = \\Crypt::encrypt($val);\n\t\t\telse\n\t\t\t\t$get[$key] = $val;\n\t\t}\n\t\t\n\t\t$url = '//';\n\t\t\n\t\t$url .= $this->_sanitize(g($_SERVER, 'HTTP_HOST').'/'.strtok(g($_SERVER, 'REQUEST_URI'), '?'));\n\t\t\n\t\treturn $url.'?'.http_build_query($get);\n\t}",
"public function Post( $sUrl, array $aFields );",
"public function getURL() {\n return $this->apiURL . $this->endPoint . $this->storeID . $this->jsonFile;\n }",
"public function url();",
"public function url();",
"public function url();",
"protected function composeExecURL()\n {\n $exec_url = self::BASE_URI . \"?key=\" . $this->key . \"&url=\" . urlencode($this->url);\n\n if(!empty($this->options)) {\n foreach($this->options as $key => $value) {\n $exec_url .= \"&\" . $key . \"=\" . $value;\n }\n }\n\n $this->exec_url = $exec_url;\n }",
"abstract public function url($manipulation_name = '');",
"public function makeUrlFromRequest()\n {\n $id = __Request::get('id', null);\n $resolvedVO = $this->createResolvedVO($id);\n return $resolvedVO->url;\n }",
"function _build_url() {\n\t\t// Add transaction ID for better detecting double requests in AUTH server\n\t\tif($GLOBALS['config']['application']['tid'] == '') $GLOBALS['config']['application']['tid'] = rand(0, 10000);\n\n\t\t$url = $this->url.'&action='.$this->action.'&tid='.$GLOBALS['config']['application']['tid'];\n\t\t\n\t\treturn $url;\n\t}",
"public function getGetUrl()\n {\n $scheme = empty($this->rowUrl[\"scheme\"]) ? \"http://\" : $this->rowUrl[\"scheme\"] . \"://\";\n\n $user = empty($this->rowUrl[\"user\"]) ? \"\" : $this->rowUrl[\"user\"];\n $pass = empty($this->rowUrl[\"pass\"]) ? \"\" : $this->rowUrl[\"pass\"];\n\n if (!empty($pass)) $user .= \":\";\n if (!empty($user) || !empty($pass)) $pass .= \"@\";\n\n $host = $this->rowUrl[\"host\"];\n $port = empty($this->rowUrl[\"port\"]) ? \"\" : \":\" . $this->rowUrl[\"port\"];\n\n $path = empty($this->rowUrl[\"path\"]) ? \"\" : $this->rowUrl[\"path\"];\n\n $urlquery = \"\";\n if (count($this->getParams) > 0)\n {\n $urlquery = \"?\" . http_build_query($this->getParams);\n }\n return $scheme . $user . $pass . $host . $port . $path . $urlquery;\n }",
"function rest_url($path = '', $scheme = 'rest')\n {\n }",
"function postRequest( $url, $fields, $optional_headers = null ) {\n\t\t// http_build_query is preferred but doesn't seem to work!\n\t\t// $fields_string = http_build_query($fields, '', '&', PHP_QUERY_RFC3986);\n\t\t\n\t\t// Create URL parameter string\n\t\tforeach( $fields as $key => $value )\n\t\t\t$fields_string .= $key.'='.$value.'&';\n\t\t\t\n\t\t$fields_string = rtrim( $fields_string, '&' );\n\n//\t\techo \"controlKey.php : postRequest() : URL = $url\";\n//\t\techo \"controlKey.php : postRequest() : Fields_string = $fields_string\";\n\t\t\n\t\t$ch = curl_init( $url );\n\t\tcurl_setopt( $ch, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\tcurl_setopt( $ch, CURLOPT_AUTOREFERER, TRUE);\n\t\tcurl_setopt( $ch, CURLOPT_POST, count( $fields ) );\n\t\tcurl_setopt( $ch, CURLOPT_POSTFIELDS, $fields_string );\n\t\t\n\t\t$result = curl_exec( $ch );\n\t\t\n\t\tcurl_close( $ch );\n\t}",
"public function getPostUrl()\n {\n return Util::getLinkHref($this->xml, 'http://schemas.google.com/g/2005#post');\n }",
"function put($url, $fields, $headers)\n{\n $ch = curl_init($url); //initialize and set url\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\"); //set as put request\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); //set fields, ensure they are properly encoded\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); // set headers pass encoding here and tokens.\n $response = curl_exec($ch); // save the response\n curl_close ($ch);\n return $response;\n}",
"public function post($url, $body = array(), $query = array(), $headers = array());",
"public function getUrl()\n {\n return $this->api\n . '?method='\n . $this->getMethod()\n . '&api_key='\n . $this->getApiKey()\n . '&tags='\n . $this->getTag()\n . '&per_page='\n . $this->getPerPage()\n . '&page='\n . $this->getPage()\n . '&format='\n . $this->getFormat()\n . '&photo_id='\n . $this->getPhotoId()\n . '&nojsoncallback=1';\n }",
"function writeUrl() {\n\n }",
"function create_url( $args ) {\n\tglobal $base_url;\n\t\n\t$base_url = add_query_arg( 'wc-api', 'software-api', $base_url );\n\t\n\treturn $base_url . '&' . http_build_query( $args );\n}",
"private function _combineUrl()\n {\n $args = func_get_args();\n $url = '';\n foreach ($args as $arg) {\n if (!is_string($arg)) {\n continue;\n }\n if ($arg[strlen($arg) - 1] !== '/') {\n $arg .= '/';\n }\n $url .= $arg;\n }\n\n return $url;\n }",
"public function postSiteUrl()\n {\n $formAction = Request::attributes()->get('action');\n if($formAction == 'prospect' || !$this->configuration->getEnablePostSiteUrl()) {\n return;\n }\n \n switch ($this->configuration->getUrlSource())\n {\n case 'static':\n $website = preg_replace('#^https?://#', '', $this->configuration->getSiteUrl());\n break;\n \n case 'siteurl':\n $offerUrl = Request::getOfferUrl();\n $website = preg_replace('#^https?://#', '', $offerUrl);\n break;\n\n default:\n break;\n }\n \n $crmType = CrmPayload::get('meta.crmType');\n if(!empty($website)) {\n switch ($crmType)\n {\n case 'limelight':\n CrmPayload::set('website', $website);\n break;\n\n case 'konnektive':\n CrmPayload::set('salesUrl', $website);\n break;\n\n default:\n break;\n }\n \n }\n \n }",
"public function buildBackendUri() {}",
"public function formatLink(Url $url) {\n $query = $url->getQuery();\n $url->setQuery(array());\n\n // extract path to separate params and remove actions\n $parts = explode(self::REWRITE_PARAM_TO_ACTION_DELIMITER, $url->getPath());\n\n foreach ($parts as $part) {\n\n // only extract \"normal\" parameters, avoid actions\n if (strpos($part, '-action') === false) {\n\n $paths = explode('/', strip_tags($part));\n array_shift($paths);\n\n // create key => value pairs from the current request\n $x = 0;\n while ($x <= (count($paths) - 1)) {\n\n if (isset($paths[$x + 1])) {\n $url->setQueryParameter($paths[$x], $paths[$x + 1]);\n }\n\n // increment by 2, because the next offset is the key!\n $x = $x + 2;\n }\n }\n }\n\n // reset the path to not have duplicate path due to generic param generation\n $url->setPath(null);\n\n // merge query now to overwrite values already contained in the url\n $url->mergeQuery($query);\n\n $resultUrl = $this->getFormattedBaseUrl($url);\n\n $path = $url->getPath();\n if (!empty($path)) {\n $resultUrl .= $path;\n }\n\n $query = $url->getQuery();\n if (count($query) > 0) {\n foreach ($query as $name => $value) {\n // allow empty params that are action definitions to not\n // exclude actions with no params!\n if (!empty($value) || (empty($value) && strpos($name, '-action') !== false)) {\n if (strpos($name, '-action') === false) {\n $resultUrl .= '/' . $name . '/' . $value;\n } else {\n // action blocks must be separated with group indicator\n // to be able to parse the parameters\n $resultUrl .= self::REWRITE_PARAM_TO_ACTION_DELIMITER . $name . '/' . $value;\n }\n }\n }\n }\n\n // add fc actions\n $actions = $this->getActionsUrlRepresentation(true);\n if (!empty($actions)) {\n $resultUrl .= self::REWRITE_PARAM_TO_ACTION_DELIMITER . $actions;\n }\n\n return $resultUrl;\n }",
"function buildRESTAPIUrl($SiteURL, $APILink, $ObjectType, $ObjectIdentifier){\n\t\t//TODO: add ability to remove double slashes\n\t\t$url = $SiteURL . $APILink . \"/\" . $ObjectIdentifier . $ObjectType;\n\t\treturn $url;\n\t}",
"protected function getUrl(){\n\t\treturn $this->apiUrl . $this->apiVersion . '/';\n\t}",
"private function _getURL()\n {\n\n $url = $this->_ect . '?';\n foreach ($this as $name => $var) {\n if ($name == 'ect') {\n continue;\n }\n $url .= \"$name=$var&\";\n }\n\n $this->url = $url;\n\n return $this->url;\n }",
"function route($method, $urlData, $formData) {\n require_once 'W:\\domains\\localhost\\db.php';\n \n if ($method === 'POST') {\n $str = file_get_contents('php://input');\n $data = json_decode($str,true);\n\n // GET /orders/my/orders\n if (count($urlData) == 2)\n echo json_encode(getMyOrders($link, $data[\"id_User\"]));\n else\n // GET /orders\n if (empty($urlData)){ \n echo json_encode(getOrders($link, $data[\"id_User\"]));\n }\n // GET /orders/add\n else{\n echo json_encode(addItemToOrder($link, $data['id_Item'], $data['id_User']));\n }\n } \n else\n // PUT /orders/change\n if ($method === 'PUT' && count($urlData) === 1){\n $str = file_get_contents('php://input');\n $data = json_decode($str, true);\n\n echo json_encode(changeCount($link, $data['id_Item'], $data['id_User'], $data['count']));\n }\n else\n // PUT /orders\n if ($method === 'PUT'){\n $str = file_get_contents('php://input');\n $data = json_decode($str, true);\n\n echo json_encode(buy($link, $data['id_User']));\n }\n else\n {\n echo json_encode(array('error'=> 'the query is inc'));\n }\n }",
"public function getUrl ()\n {\n return array(\n 'endpointurl' => '/comment/create',\n 'method' => 'post'\n );\n }",
"protected function CreateUrl($url=null, $method=null, $arguments=null){\n\t\treturn $this->request->CreateUrl($url, $method, $arguments);\n\t}",
"abstract protected function buildSpecificRequestUri();",
"abstract public function post($data);",
"public function testInsertUrlUsingPOST()\n {\n }",
"public function getUrl()\n {\n $url = $params = '';\n $url .= $this->getProtocol() . '://' . self::EBAY_HOST . self::EBAY_URI . '?';\n foreach ($this->getParams() as $name => $value) {\n $params .= '&' . $name . '=' . urlencode($value);\n }\n\n return $url . substr($params, 1);\n }",
"function build_url($parts)\n{\n return ( isset($parts['scheme']) ? \"{$parts['scheme']}:\" : '' ) .\n ( ( isset($parts['user']) || isset($parts['host']) ) ? '//' : '' ) .\n ( isset($parts['user']) ? \"{$parts['user']}\" : '' ) .\n ( isset($parts['pass']) ? \":{$parts['pass']}\" : '' ) .\n ( isset($parts['user']) ? '@' : '' ) .\n ( isset($parts['host']) ? \"{$parts['host']}\" : '' ) .\n ( isset($parts['port']) ? \":{$parts['port']}\" : '' ) .\n ( isset($parts['path']) ? \"{$parts['path']}\" : '' ) .\n ( isset($parts['query']) ? \"?{$parts['query']}\" : '' ) .\n ( isset($parts['fragment']) ? \"#{$parts['fragment']}\" : '' );\n}",
"public function url()\r\n {\r\n return $this->get_base_url() . http_build_query($this->get_query_params());\r\n }",
"public function createUrl()\n\t{\n\t\tif (!$this->getOption('authurl') || !$this->getOption('clientid'))\n\t\t{\n\t\t\tthrow new InvalidArgumentException('Authorization URL and client_id are required');\n\t\t}\n\n\t\t$url = $this->getOption('authurl');\n\n\t\tif (strpos($url, '?'))\n\t\t{\n\t\t\t$url .= '&';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$url .= '?';\n\t\t}\n\n\t\t$url .= 'response_type=code';\n\t\t$url .= '&client_id=' . urlencode($this->getOption('clientid'));\n\n\t\tif ($this->getOption('redirecturi'))\n\t\t{\n\t\t\t$url .= '&redirect_uri=' . urlencode($this->getOption('redirecturi'));\n\t\t}\n\n\t\tif ($this->getOption('scope'))\n\t\t{\n\t\t\t$scope = is_array($this->getOption('scope')) ? implode(' ', $this->getOption('scope')) : $this->getOption('scope');\n\t\t\t$url .= '&scope=' . urlencode($scope);\n\t\t}\n\n\t\tif ($this->getOption('state'))\n\t\t{\n\t\t\t$url .= '&state=' . urlencode($this->getOption('state'));\n\t\t}\n\n\t\tif (is_array($this->getOption('requestparams')))\n\t\t{\n\t\t\tforeach ($this->getOption('requestparams') as $key => $value)\n\t\t\t{\n\t\t\t\t$url .= '&' . $key . '=' . urlencode($value);\n\t\t\t}\n\t\t}\n\n\t\treturn $url;\n\t}",
"function makeUrlFromPostvars($target)\n{\n\tglobal $ATK_VARS;\n\n\tif(count($ATK_VARS ))\n\t{\n\t\t$url = $target.\"?\";\n\t\tforeach ($ATK_VARS as $key => $val)\n\t\t{\n\t\t\t$url .= $key.\"=\".rawurlencode($val).\"&\";\n\t\t}\n\t\treturn $url;\n\t}\n\treturn \"\";\n}",
"public static function urlPUT($url, $data, $headers=null) {\n\n $isJsonForm = false;\n if ($headers == null){\n $headers = array(\"Content-type: application/json\");\n $isJsonForm = true;\n }\n else {\n $stringFromHeaders = implode(\" \",$headers);\n if (preg_match(\"/Content\\-type:/i\",$stringFromHeaders)){\n \n if (preg_match(\"/Content\\-type:\\ {0,4}application\\/json/i\",$stringFromHeaders)){\n $isJsonForm = true; \n array_push($headers,\"Content-type: application/json\");\n }\n\n }\n else{\n $isJsonForm = true; \n array_push($headers,\"Content-type: application/json\");\n }\n }\n\n if ($isJsonForm){\n $data = json_encode($data);\n $dataString = $data;\n }\n else{\n\n $dataString = '';\n $arrKeys = array_keys($data);\n foreach ($data as $key => $value){\n if (preg_match(\"/[a-zA-Z_]{2,100}/\",$key))\n $dataString .= $key . \"=\" . $value .\"&\";\n }\n $dataString .= \"\\n\";\n }\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, $dataString);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n array_push($headers,'Content-Length: ' . strlen($dataString));\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n \n\n if($headers != null && in_array('Custom-SSL-Verification:false',$headers)){\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); \n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n }\n\n $contents = curl_exec($ch);\n\n\n if($errno = curl_errno($ch)) {\n $error_message = curl_strerror($errno);\n //echo \"cURL error ({$errno}):\\n {$error_message}\";\n $contents = \"cURL error ({$errno}):\\n {$error_message}\";\n }\n\n\n curl_close($ch);\n\n return utf8_encode($contents);\n }",
"function cp_url($path, $qs)\n{\n return $path.'?'.$qs;\n}",
"public function create_url( string $url ) {\n\n return esc_url_raw( add_query_arg( $this->action, (string) wp_create_nonce( $this->action ), $url ) );\n\n }",
"public static function url($url, $urlPlaceholder, $humanViewNameSingular, $prefix = null, $crud = null)\n\t{\n $class = Utility::getAttributeClass('url', $prefix, $crud);\n\n $html = '<div class=\"' . $class . '\">';\n $html .= '<h4>';\n $html .= '<label for=\"url\">';\n $html .= Text::sprintf('COM_CAJOBBOARD_DESCRIPTION_EDIT_LABEL', $humanViewNameSingular);\n $html .= '</label>';\n $html .= '</h4>';\n $html .= '<textarea name=\"url\" id=\"' . $prefix . '-url\" class=\"form-control\" rows=\"8\" placeholder=\"' . $urlPlaceholder . '\">';\n $html .= $url;\n $html .= '</textarea>';\n $html .= '</div>';\n\n return $html;\n }",
"function create_url($event = null, $day = null, $set = null, $shot = null) {\n\t\t$event = $event ? \"?event=$event\" : null;\n\t\t$day = $day ? \"&day=$day\" : null;\n\t\t$set = $set ? \"&set=$set\" : null;\n\t\t$shot = $shot ? \"&shot=$shot\" : null;\n\t\treturn \"$event$day$set$shot\";\n\t}",
"public function httpPost($params, $url, $method=\"PUT\") { \n\t\t//print_r($params); \n\t\t$ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $params);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t'Content-Type: application/json', \n 'Content-Length: ' . strlen($params))\n\t\t\t);\n\t\t $result = curl_exec($ch);\n\t\treturn $result;\t//return $result;\n }",
"private function _buildUri(): string {\n return !empty($this->query) ? $this->uri.'?'.http_build_query($this->query) : $this->uri;\n }",
"protected function _curl_buildRequest($method,$url,$data) {\n\t\t$http = curl_init($url);\n\t\t$http_headers = array('Accept: application/json,text/html,text/plain,*/*') ;\n\t\tif ( is_object($data) OR is_array($data) )\n\t\t\t$data = json_encode($data);\n\n\t\tcurl_setopt($http, CURLOPT_CUSTOMREQUEST, $method);\n\n\t\tif ( $method == 'COPY') {\n\t\t\t$http_headers[] = \"Destination: $data\";\n\t\t} elseif ($data) {\n\t\t\tcurl_setopt($http, CURLOPT_POSTFIELDS, $data);\n\t\t}\n\t\tcurl_setopt($http, CURLOPT_HTTPHEADER,$http_headers);\n\t\treturn $http;\n\t}",
"function put($url, $data = null, $options = array()) {\n\t\treturn $this->request($url, array_merge(array('method' => 'PUT', 'body' => $data), $options));\n\t}",
"function salmon_generate_api_url($salmon_for_type=null,$id=null) {\n $url = get_base_url();\n $url .= \"/data_custom/salmon.php\";\n\n if (!is_null($salmon_for_type)) {\n $url .= \"&type=\".$salmon_for_type;\n }\n if (!is_null($id)) {\n $url .= \"&id=\".$id;\n }\n\n return $url;\n}",
"public function getUrlString(){\n\t\treturn rawurlencode($this->getJsonString());\t\n\t}",
"function _request_url($action, $params = null, $format = 'xml') {\n\t\treturn 'http://ws.audioscrobbler.com/1.0/'.$this->_type.'/'.$this->_encode($this->artist).'/'.$this->_encode($this->name).'/'.$action.'.'.$format;\n\n\t}",
"function httpPOST($url, $data)\n{\n $curl = curl_init($url);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n return $response;\n}",
"public function getPatchUri();",
"public function getUrl() {\n $url = $this->request->get_normalized_http_url() . '?';\n $url .= http_build_query($this->request->get_parameters(), '', '&');\n\n return $url;\n }",
"public function getPostURL($id, $key = '')\n {\n $url = Pal::getHostURL() . $id;\n if ($key !== '') {\n $url .= '?key=' . $key;\n }\n return $url;\n }",
"function make_post_call($mid_url, $post_values) {\n global $base_url, $end_url;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $base_url . $mid_url . $end_url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($post_values));\n \n $output = curl_exec($curl);\n curl_close($curl);\n \n return $output;\n }",
"private function addGetData($url, $data) {\n $parts[] = $url;\n if (!empty($data)) {\n $parts[] = http_build_query($data);\n }\n return implode('?', $parts);\n }",
"protected function buildRequestUrl($uri)\n {\n return $this->apiUrl . $uri . '&fmt=json';\n }",
"function rest_url( $path = '', $scheme = 'json' ) {\n\treturn get_rest_url( null, $path, $scheme );\n}",
"private function _makeApiUrl(string $command): string\n {\n if (strpos($command, '/') === 0) {\n $command = substr($command, 1);\n }\n\n return self::API_URL .\n (strpos($command, self::API_URL_PREFIX) !== 0 ? self::API_URL_PREFIX : '') .\n $command;\n }"
] | [
"0.645744",
"0.6062682",
"0.60161537",
"0.5971292",
"0.59617406",
"0.59534997",
"0.59384656",
"0.58469176",
"0.5735287",
"0.5722455",
"0.57156706",
"0.5712839",
"0.56946176",
"0.567975",
"0.5665895",
"0.5622535",
"0.5616676",
"0.56105953",
"0.5590425",
"0.5574939",
"0.5561311",
"0.55396974",
"0.5536494",
"0.54955524",
"0.5485252",
"0.54742557",
"0.54615074",
"0.5456282",
"0.5447898",
"0.5436395",
"0.5417071",
"0.5413325",
"0.5396387",
"0.53689384",
"0.53658944",
"0.5360264",
"0.534998",
"0.53491634",
"0.5347694",
"0.53379214",
"0.5333774",
"0.5333765",
"0.531866",
"0.53186315",
"0.5312067",
"0.53045684",
"0.5302164",
"0.5302164",
"0.5302164",
"0.529753",
"0.52842027",
"0.52821755",
"0.5248196",
"0.52362067",
"0.5233233",
"0.52186793",
"0.5207895",
"0.51986474",
"0.5193944",
"0.5190568",
"0.5188182",
"0.5184597",
"0.51775986",
"0.51700896",
"0.5168657",
"0.5167699",
"0.5163217",
"0.515577",
"0.51529074",
"0.514799",
"0.5141449",
"0.51398706",
"0.513584",
"0.51357794",
"0.5133051",
"0.5131965",
"0.5129383",
"0.5127583",
"0.51239556",
"0.51220345",
"0.5119712",
"0.51146424",
"0.5110604",
"0.51105756",
"0.51090604",
"0.51049966",
"0.50950176",
"0.5092039",
"0.50906295",
"0.50903785",
"0.5086343",
"0.5083784",
"0.5083726",
"0.5081513",
"0.50795823",
"0.50792867",
"0.5076465",
"0.5076381",
"0.5075609",
"0.50643426",
"0.5060781"
] | 0.0 | -1 |
only call this if the upper limit has already been checked. | function getNumericalSession($sessionStart, $timenow, $number){
if($timenow >= $sessionStart){
return getNumericalSession($sessionStart,$timenow - INTERVAL_I, $number+1);
}else{
return $number;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _checkMaxLimt()\r\n {\r\n if ($this->data[$this->name]['max_limit'] >= $this->data[$this->name]['min_limit']) {\r\n return true;\r\n }\r\n return false;\r\n }",
"private function checkBounds()\n {\n $this->page = max($this->page, 0);\n $this->page = min($this->page, $this->lastPage());\n }",
"protected function checkLimits()\n {\n if ($this->isTimeLimit() || $this->isJobLimit()) {\n $this->stop();\n }\n }",
"function _checkMaxQuantityLimt()\r\n {\r\n if ($this->data[$this->name]['buy_max_quantity_per_user'] >= $this->data[$this->name]['buy_min_quantity_per_user']) {\r\n return true;\r\n }\r\n return false;\r\n }",
"private function validate_usage_limit() {\n\t\tif ( $this->usage_limit > 0 && $this->usage_count >= $this->usage_limit ) {\n\t\t\tthrow new Exception( self::E_WC_COUPON_USAGE_LIMIT_REACHED );\n\t\t}\n\t}",
"private function validate_maximum_amount() {\n\t\tif ( $this->maximum_amount > 0 && wc_format_decimal( $this->maximum_amount ) < wc_format_decimal( WC()->cart->subtotal ) ) {\n\t\t\tthrow new Exception( self::E_WC_COUPON_MAX_SPEND_LIMIT_MET );\n\t\t}\n\t}",
"public function isLimitExceeded();",
"public function isLimited()\n {\n return ($this->limit > 0);\n }",
"function _compareItemAndBuyMaxLimt()\r\n {\r\n if (empty($this->data[$this->name]['max_limit']) || $this->data[$this->name]['max_limit'] >= $this->data[$this->name]['buy_max_quantity_per_user']) {\r\n return true;\r\n }\r\n return false;\r\n }",
"public function hasMaxAnger(){\r\n return $this->_has(6);\r\n }",
"private function validiate_limits() {\n\n\t\tforeach( $this->limits as $element_role => $element_limits ) {\n\t\t\tToolset_Association::validate_element_role( $element_role );\n\n\t\t\t$min = toolset_getarr( $element_limits, self::MIN, self::INVALID_VALUE );\n\t\t\t$max = toolset_getarr( $element_limits, self::MAX, self::INVALID_VALUE );\n\n\t\t\tif( $min <= self::INVALID_VALUE || $max <= self::INVALID_VALUE ) {\n\t\t\t\tthrow new InvalidArgumentException( 'Invalid cardinality value.' );\n\t\t\t}\n\n\t\t\tif( self::INFINITY != $max && $min > $max ) {\n\t\t\t\tthrow new InvalidArgumentException( 'Minimum element limit is higher than the maximum one.' );\n\t\t\t}\n\n\t\t\tif( self::ZERO_ELEMENTS == $max ) {\n\t\t\t\tthrow new InvalidArgumentException( 'Maximum element limit is zero.' );\n\t\t\t}\n\t\t}\n\n\t}",
"private function checkPerimeterLimit(): void\n {\n if ($this->n < self::MIN_LIMIT || $this->n > self::MAX_LIMIT) {\n throw new DoubleXorLimitException('n is out of space');\n }\n }",
"public function hasLimit()\n {\n //check is little different than other stuff\n return ($this->_count > 0 || $this->_offset > 0);\n }",
"private function processLimit(): void\n {\n if ($this->request->has(self::LIMIT) && null !== $this->request->get(self::LIMIT)) {\n $itemLimit = (int)$this->request->get(self::LIMIT);\n\n if ($itemLimit > 0) {\n $this->limit = $itemLimit;\n } elseif (0 === $itemLimit) {\n $this->limit = 0;\n }\n }\n }",
"public function setUpperBound($var)\n {\n GPBUtil::checkInt64($var);\n $this->upper_bound = $var;\n }",
"public function limit() : float;",
"private function validateModificationCount()\n {\n if (count($this) >= self::ITEM_LIMIT) {\n throw new \\OverflowException(\n sprintf('You must not do more than %d modifications per request', self::ITEM_LIMIT)\n );\n }\n }",
"public function limitExceeded(): bool\n {\n return $this->limit !== 0 && $this->users()->count() >= $this->limit;\n }",
"public function hasTimeLimitReached(): bool;",
"public function hasMaxVigor(){\r\n return $this->_has(25);\r\n }",
"public function unsetLimit() {}",
"public final function setUpperLimit($val)\n {\n $this->limit['upper'] = (int) $val;\n return $this;\n }",
"public function hasLimit() {\n return $this->_has(3);\n }",
"public function hasLimit() {\n return $this->_has(3);\n }",
"public function hasLimit() {\n return $this->_has(3);\n }",
"public function hasLimit() {\n return $this->_has(3);\n }",
"public function hasLimit() {\n return $this->_has(3);\n }",
"function updateLimitEnabled()\r\n\t{\r\n\t\treturn true;\r\n\t}",
"public function hasQuotaUnlock(){\n return $this->_has(10);\n }",
"private function validate_minimum_amount() {\n\t\tif ( $this->minimum_amount > 0 && wc_format_decimal( $this->minimum_amount ) > wc_format_decimal( WC()->cart->subtotal ) ) {\n\t\t\tthrow new Exception( self::E_WC_COUPON_MIN_SPEND_LIMIT_NOT_MET );\n\t\t}\n\t}",
"protected function abortIfApiLimitReached()\n {\n if($this->request_limit_reached_on && date('Y-m-d h:i', strtotime($this->request_limit_reached_on . \" +10 minutes\")) > date('Y-m-d h:i', time())) {\n $this->requestStatus = false;\n return $this;\n //throw new ErplySyncException('API request limit error reached on: ' . $this->request_limit_reached_on, self::API_REQUEST_LIMIT_PER_HOUR_ERR_CODE);\n }\n }",
"public function setMaxValue($maxValue);",
"function getLimit() ;",
"public function forceIntegerInRangeForcesIntegerIntoDefaultBoundariesDataProvider() {}",
"public function getUpperBound()\n {\n return $this->upper_bound;\n }",
"public function getLimit() {}",
"private function isRateLimitReached()\n {\n if (!$this->getRateLimit()) {\n throw new InstagramThrottleException('400 Bad Request : You have reached Instagram API Rate Limit', 400);\n }\n }",
"public function test_validate_withdraw_limit()\n {\n $amount = 5000;\n $withdraw = $this->obj->validate_withdraw_limit($amount);\n $this->assertTrue($withdraw);\n }",
"private function _checkRateLimit()\n {\n if (empty(self::$_responseHeaders))\n {\n return;\n }\n\n // Default the $limit and $remaining values if not set in the last response header.\n /** @var int $limit */\n $limit = isset(self::$_responseHeaders[self::RATE_LIMIT])\n ? (int)self::$_responseHeaders[self::RATE_LIMIT]\n : self::DEFAULT_RATE_LIMIT;\n\n /** @var int $remaining */\n $remaining = isset(self::$_responseHeaders[self::RATE_LIMIT_REMAINING])\n ? (int)self::$_responseHeaders[self::RATE_LIMIT_REMAINING]\n : self::DEFAULT_RATE_LIMIT;\n\n // If no API calls have been made, no need to delay.\n if ($limit == $remaining)\n {\n return;\n }\n\n // If we are below 5% remaining, sleep for 0.50 seconds.\n if ($remaining / $limit < 0.05)\n {\n usleep(500000);\n return;\n }\n\n // If we are below 10% remaining, sleep for 0.25 seconds.\n if ($remaining / $limit < 0.1)\n {\n usleep(250000);\n }\n }",
"public function testMaxInvalidArgumentException()\n {\n $min = $this->ascendingSequence->getMin();\n $this->ascendingSequence->setMax($min - 1);\n $this->fail(\"Should not be able to set max < min.\");\n }",
"function _isEligibleMaximumQuantity()\r\n {\r\n $items_count = $this->_countUserBoughtItems();\r\n $item = $this->find('first', array(\r\n 'conditions' => array(\r\n 'Item.id' => $this->data[$this->name]['item_id'],\r\n ) ,\r\n 'fields' => array(\r\n 'Item.buy_max_quantity_per_user',\r\n ) ,\r\n 'recursive' => -1\r\n ));\r\n $newTotal = (!empty($items_count[0]['total_count']) ? $items_count[0]['total_count'] : 0) +$this->data[$this->name]['quantity'];\r\n if (empty($item['Item']['buy_max_quantity_per_user']) || $newTotal <= $item['Item']['buy_max_quantity_per_user']) {\r\n return true;\r\n }\r\n return false;\r\n }",
"public function get_limit();",
"public function testCheckMaxAmount() {\n $amount = 1000;\n $this->assertTrue($this->tranche->checkMaxAmount($amount));\n }",
"protected function limit()\n {\n if (count($this->clients) > $this->limit)\n {\n $this->log->info(\"Limit connection exceeded!\");\n\n $this->conn->send('Limit connection exceeded!');\n\n $this->conn->close();\n }\n }",
"protected function exceededRateLimit()\n {\n return $this->cache->get($this->config['keys']['requests']) > $this->config['limit'];\n }",
"function validMax($value, $max)\n {\n return $value <= $max;\n }",
"public function valid()\n {\n return $this->_key + 1 <= $this->_limit;\n }",
"public function setMaximumValue(int $maximumValue): void;",
"private function limitCalls()\n {\n if ($this->lastCallTimestamp > 0) {\n $callsLimit = $this->shopifyClient->callLimit();\n $callsMade = $this->shopifyClient->callsMade();\n $callsLeft = $this->shopifyClient->callsLeft();\n\n Log::debug(\"ShopifyApi.limitCalls: callsLimit=$callsLimit, callsMade=$callsMade, callsLeft=$callsLeft\");\n $currentTimestamp = microtime(true);\n $deltaTimestamp = ($this->lastCallTimestamp > 0) ? $currentTimestamp - $this->lastCallTimestamp : 0;\n Log::debug(\"ShopifyApi.limitCalls: deltaTimestamp=$deltaTimestamp\");\n\n if ($callsLeft < 10) {\n Log::debug(\"ShopifyApi.limitCalls: DELTA < 10: wait 0.5 seconds\");\n usleep(500000);\n }\n } else {\n Log::debug(\"ShopifyApi.limitCalls: first call\");\n }\n $this->lastCallTimestamp = microtime(true);\n }",
"function update_page_upperbound($id, $upper_bound)\n{\n\tglobal $db;\n\n\t// Get current upperbound (epage) for article\n\n\t// Do we have a version of this in the cache?\n\t$sql = 'SELECT epage, hard FROM article_cache\n\t\tWHERE (id = ' . $id . ') \n\t\tAND (created <= NOW())\n\t\tAND (modified > NOW())\t\t\n\t\tLIMIT 1';\n\n\t//echo $sql;\n\t\t\t\t\n\t$result = $db->Execute($sql);\n\tif ($result == false) die(\"failed [\" . __LINE__ . \"]: \" . $sql);\n\t\n\tif ($result->NumRows() == 1)\n\t{\n\t\tif ($result->fields['hard'] == 0)\n\t\t{\n\t\t\t// We don't have a hard upper boundary\n\t\t\t$epage = $result->fields['epage'];\n\t\t\tif ($epage == '')\n\t\t\t{\n\t\t\t\t$epage = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif ($epage < $upper_bound)\n\t\t\t{\n\t\t\t\t$epage = $upper_bound;\n\t\t\t\t\n\t\t\t\t// to do: ensure we update the proper version!\n\t\t\t\t$sql = 'UPDATE article_cache SET epage=' . $db->Quote($upper_bound) . '\n\t\t\t\t\t\t\t\tWHERE (id = ' . $id . ')';\n\t\t\t\t$result = $db->Execute($sql);\n\t\t\t\tif ($result == false) die(\"failed [\" . __LINE__ . \"]: \" . $sql);\n\t\t\t}\n\t\t}\n\t}\n}",
"function _compareItemAndBuyMinLimt()\r\n {\r\n if (empty($this->data[$this->name]['max_limit']) || $this->data[$this->name]['max_limit'] >= $this->data[$this->name]['buy_min_quantity_per_user']) {\r\n return true;\r\n }\r\n return false;\r\n }",
"public function onOutOfBand (): void;",
"public function set_limit($limit);",
"private function isTimeLimitReached() \n {\n return $this->timeLimit < (microtime(true) - $this->startTime);\n }",
"public function limit()\n {\n return self::get() >= Config::get('krisawzm.demomanager::limit', 500);\n }",
"public function adjustMaxMin() {\r\n $tmp = new FloatRange();\r\n $this->calcMinMax($tmp);\r\n $this->minimumvalue = $tmp->min;\r\n $this->maximumvalue = $tmp->max;\r\n $this->iMaximum = $this->maximumvalue;\r\n $this->iMinimum = $this->minimumvalue;\r\n $this->internalCalcRange();\r\n }",
"public function setMaximum($value) {\r\n $this->internalSetMaximum($value);\r\n }",
"protected function checkIfGreaterOrEqualToZero($name, $value)\n {\n }",
"function cb_reached($current)\n{\n echo \"Current is greater than 5A: \" . $current / 1000.0 . \"\\n\";\n}",
"public function validate( $value )\n\t{\n\t\treturn $value < $this->max;\n\t}",
"public function isAPICallLimitErr() {\n // create implementation of this function inside gogoLib for trademe\n // it's easier to hook it there for api call limit checks\n // also if call limit occurs. create log at /var/tragento/apicalllimit.log\n // with dates. than when running new cron process check if date in call is less than 1 hour.\n // actually check if it is in current hour. if current hour than don't execute tragento cron\n // it's nice but requires coding time. don't overcomplicate error handling\n\n // $response->is_ok()\n // $response->error_message()\n // You have exceeded your API call quota for the current hour\n // it's a state for the life of trademe model. when api limit reached it can't be changed to ok later.\n // hovewer in next 5 minutes there will be another call from cron with clear state\n return $this->trademe->isAPICallLimitErr();\n }",
"function exibeAtualMax(){\n $nmin= (($this->atual * $this->numpage) - $this->numpage)+1;\n return $nmax= ($this->numpage + $nmin)-1;\n }",
"private function checkItemPurchaseBounds() : void\n {\n if ($this->item->available < 1) {\n throw new InventoryException('quantity not available');\n }\n\n if ($this->coinService->getCurrenCoinCount() < $this->item->cost) {\n throw new InsufficientFundsException('insufficient funds available');\n }\n }",
"protected function checkPostUploadSizeIsHigherOrEqualMaximumFileUploadSize() {}",
"function getUpperLimit($MemberID) {\n global $mysql;\n $userlimit = $mysql->select(\"select * from _tbl_member where MemberID='\".$MemberID.\"'\");\n if ($userlimit[0]['MoneyTransferLimit']>0) {\n return $userlimit[0]['MoneyTransferLimit'];\n } else {\n $adminLimit = $mysql->select(\"select * from _tbl_members_imps_limits where MemberID='\".$MemberID.\"' and date(TxnDate)=date('\".date(\"Y-m-d\").\"') order by id desc \");\n if (isset($adminLimit[0]['TransferLimit'])) {\n return $adminLimit[0]['TransferLimit'];\n } else {\n $previous_day_balance = $mysql->select(\"select (sum(Credit)-sum(Debit)) as previous_balance from _tbl_accounts where date(TxnDate)<=date('\".date(\"Y-m-d\",strtotime(date(\"Y-m-d\"). ' -1 days')).\"') and MemberID='\".$MemberID.\"'\");\n return isset($previous_day_balance[0]['previous_balance']) ? intval($previous_day_balance[0]['previous_balance']/2) : 0;\n }\n }\n}",
"public function min_limit(){ \n\t\t$total_hrs = $this->data['HrPermission']['no_hrs'];\n\t\t$total_hrs = explode(':', $total_hrs);\t\t\t\n\t\tif($total_hrs[0] == '00' && $total_hrs[1] < 30){\n\t\t\treturn false;\t\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t}",
"public function getLimitReached() {\n return $this->_limitReached = (((int) self::model()->countByAttributes(array('ip'=>$this->ipAddr))) >= self::MAX_REQUESTS);\n }",
"public function is_user_over_quota()\n {\n }",
"public function hasVigorMax(){\r\n return $this->_has(6);\r\n }",
"public function hasHpMax(){\r\n return $this->_has(2);\r\n }",
"protected function exceedsAllowance(float $usageInBytes): bool\n {\n return $usageInBytes > static::toBytes($this->maximumSizeInMegaBytes);\n }",
"function testMaxval(){\n\t\t#mdx:maxval\n\t\tParam::get('age')->filters()->maxval(150, \"Age cannot be more than %d!\");\n\t\t$error = Param::get('age')->process(['age'=>200])->error;\n\t\t#/mdx var_dump($error)\n\n\t\t$this->assertContains(\"more than 150\", $error);\n\t}",
"private function handleValueMaxInclusive(Generator\\ClassGenerator $generator, PHPProperty $prop, PHPClass $class) \n {\n if (!$checks = $this->getAvailableChecks( $prop, $class, 'maxInclusive' )) {\n return;\n }\n // add from `protected function _checkRestrictions($value)`\n $methodBody = \"\";\n foreach ($checks as $maxInclusive) {\n $methodBody .= \"RestrictionUtils::checkMaxInclusive(\\$this->value, {$maxInclusive['value']});\" . PHP_EOL;\n }\n $method = $generator->getMethod('validate');\n $method->setBody( $method->getBody() . $methodBody );\n }",
"public function hasLimit()\n\t\t{\n\t\t\treturn is_array($this->limit);\n\t\t}",
"private function validate_user_usage_limit( $user_id = null ) {\n\t\tif ( ! $user_id ) {\n\t\t\t$user_id = get_current_user_id();\n\t\t}\n\t\tif ( $this->usage_limit_per_user > 0 && is_user_logged_in() && $this->id ) {\n\t\t\tglobal $wpdb;\n\t\t\t$usage_count = $wpdb->get_var( $wpdb->prepare( \"SELECT COUNT( meta_id ) FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = '_used_by' AND meta_value = %d;\", $this->id, $user_id ) );\n\n\t\t\tif ( $usage_count >= $this->usage_limit_per_user ) {\n\t\t\t\tthrow new Exception( self::E_WC_COUPON_USAGE_LIMIT_REACHED );\n\t\t\t}\n\t\t}\n\t}",
"public function testCurrentOverTotalLimitFallingToLast() {\n\t\tAssert::same(\n\t\t\t'|first|1||last|2||prev|1||next|2|',\n\t\t\t(new UI\\AttainablePagination(\n\t\t\t\t9,\n\t\t\t\t50,\n\t\t\t\t100\n\t\t\t))->print(new Output\\FakeFormat(''))->serialization()\n\t\t);\n\t}",
"protected function checkMaxItems($model)\n {\n if (! $this->field->maxItems) {\n return;\n }\n\n $relationsCount = $this->field->getRelationQuery($model)->count();\n\n if ($relationsCount < $this->field->maxItems) {\n return;\n }\n\n abort(405, __lit('crud.fields.relation.messages.max_items_reached', [\n 'count' => $this->field->maxItems,\n ]));\n }",
"protected function checkMaxExecutionTime() {}",
"public function getMaxValue();",
"public function getMaxValue();",
"public function checkCreditLimit() {\n \n Mage::getModel('storesms/apiClient')->checkCreditLimit(); \n \n }",
"public function isLimitReached(Event $event) :bool\n {\n return $event->is_limit_reached;\n }",
"final public function onOutOfBand (): void {\n // do nothing\n }",
"public function notifCountHasReachedMax() {\n\t\tif ( $this->getLocalNotificationCount() >= self::MAX_BADGE_COUNT ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function hasMaxcount(){\n return $this->_has(10);\n }",
"public function limit($limit)\n {\n }",
"public function getLimit();",
"public function getLimit();",
"public function getLimit();",
"public function getLimit();",
"public function getLimit();",
"public function hasMaxHp(){\r\n return $this->_has(2);\r\n }",
"public function setErrorIfMaximumExceeded($errorIfMaximumExceeded)\n {\n $this->errorIfMaximumExceeded = (bool) $errorIfMaximumExceeded;\n }",
"private function unbalancedSupply() {\n $rapporto = $_POST['quantitaCercata'] / $_POST['quantitaOfferta'];\n if ($rapporto >= 0.5 && $rapporto <= 2)\n return false;\n return true;\n }",
"protected function _updateLimit()\n {\n return $this->_updateLimit;\n }",
"public function getOverfillLimit()\n {\n return 20;\n }",
"public function hasMaxBesave(){\n return $this->_has(17);\n }",
"public function hasQuota(){\n return $this->_has(12);\n }",
"public function hasNoLimit() {\n return $this->_has(1);\n }",
"function under (float $value, float $max) : float\n{\n return $value > $max ? $max : $value;\n}",
"private function checkApiRequestsLimit()\n {\n $tempTime = time() - $this->startTime;\n if($this->apiRequestsCount >= $this->apiRequestsLimit && $tempTime < $this->apiTimeLimit) {\n usleep(($this->apiTimeLimit - $tempTime)*1000000);\n $this->apiRequestsCount = 1;\n $this->startTime = time();\n } else {\n $this->apiRequestsCount++;\n }\n }"
] | [
"0.68971336",
"0.679376",
"0.67570704",
"0.6505886",
"0.62577015",
"0.60317695",
"0.6012105",
"0.59300095",
"0.592599",
"0.5891677",
"0.5887585",
"0.5870095",
"0.5783856",
"0.5773334",
"0.56854725",
"0.56521535",
"0.5614473",
"0.56078064",
"0.55763406",
"0.55708796",
"0.5564904",
"0.5562327",
"0.5542728",
"0.5542728",
"0.5542728",
"0.5542728",
"0.5542728",
"0.5522842",
"0.5508396",
"0.5497497",
"0.54938626",
"0.5492303",
"0.5492157",
"0.5490021",
"0.54883385",
"0.5480235",
"0.54740083",
"0.5457781",
"0.5423091",
"0.5420925",
"0.5408177",
"0.54077613",
"0.5399594",
"0.5385762",
"0.53848916",
"0.5378299",
"0.53697926",
"0.5369664",
"0.5368657",
"0.53398335",
"0.5339735",
"0.5336092",
"0.53351223",
"0.5302458",
"0.53000826",
"0.52984667",
"0.5297968",
"0.5296083",
"0.5291491",
"0.5289661",
"0.52824295",
"0.52821386",
"0.52795213",
"0.52757126",
"0.5270812",
"0.5247926",
"0.52449113",
"0.5234222",
"0.522647",
"0.5212603",
"0.52042603",
"0.5201712",
"0.51982486",
"0.5197092",
"0.51912814",
"0.5190269",
"0.517511",
"0.5174461",
"0.515508",
"0.515508",
"0.51489395",
"0.5148928",
"0.51434034",
"0.5138482",
"0.5137347",
"0.5137024",
"0.5129395",
"0.5129395",
"0.5129395",
"0.5129395",
"0.5129395",
"0.51218253",
"0.5119766",
"0.5106957",
"0.5105",
"0.51022893",
"0.50930405",
"0.5092293",
"0.5088723",
"0.5073328",
"0.5071138"
] | 0.0 | -1 |
Populates Frontier with passed Resource. | public function populateFrontier(Resource $resource, $priority = FrontierInterface::PRIORITY_NORMAL, $force = false)
{
Assertion::inArray($priority, [FrontierInterface::PRIORITY_NORMAL, FrontierInterface::PRIORITY_HIGH]);
Assertion::boolean($force);
if ($this->isScheduled($resource) && !$force) {
$this->getLogger()->notice("Url {$resource->getUrl()} is already scheduled");
return;
}
if ($this->isVisited($resource) && !$force && !$this->canContainLinksToNewResources($resource)) {
$this->getLogger()->notice("Url {$resource->getUrl()} is already visited");
return;
}
$this->getFrontier()->populate($resource, $priority);
$this->markScheduled($resource);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function initResource();",
"protected function _init_resource()\n\t{\n\t\t$resource_id = $this->request->param('id');\n\t\tif (!$resource_id)\n\t\t{\n\t\t\t$this->session->set('error', 'Invalid resource id');\n\t\t\t$this->request->redirect('/admin/resource');\n\t\t}\n\t\t\n\t\t// check if resource exists\n\t\t$this->resource = Sprig::factory('resource', array(\n\t\t\t'resource_id' => $resource_id\n\t\t));\n\t\t\n\t\t$this->resource->load();\n\t\tif (!$this->resource->loaded())\n\t\t{\n\t\t\t$this->session->set('error', 'Resource not found');\n\t\t\t$this->request->redirect('/admin/resource');\n\t\t}\n\t}",
"protected function createResource()\n {\n $resourceOptions = [\n 'resource' => $this->info['resource'],\n '--module' => $this->moduleName,\n ];\n\n $options = $this->setOptions([\n 'parent',\n 'assets'=>'uploads',\n 'data'\n ]);\n\n $this->call('engez:resource', array_merge($resourceOptions, $options));\n }",
"abstract protected function getNewResource();",
"public function setResource($resource);",
"public function __construct(RestResource $resource)\n {\n $this->resources = new Collection([$resource]);\n $this->identifier = $resource->getGroupIdentifier();\n }",
"function fuel(){\n $Resource = new Resource($this->con);\n $Resource->fromCode('HE3');\n return $Resource;\n }",
"public function __construct(Resource $resource)\n {\n $this->resource = SqlFactory::load($resource);\n }",
"public function __construct(Resource $resource)\n {\n $this->resource = SqlFactory::load($resource);\n }",
"public function __construct(Resource $resource)\n {\n $this->resource = SqlFactory::load($resource);\n }",
"public function __construct(mixed $resource)\n {\n parent::__construct($resource);\n\n $this->resource = $this->collectResource($resource);\n }",
"public static function fromResource(Resource $resource)\n {\n if (isset($resource->query['with_billets'])) {\n return static::withBillets($resource);\n }\n return parent::fromResource($resource);\n }",
"public function __construct() {\n $data = Ensure::Input(func_get_args());\n parent::_init($data, new DependsResource,\n new LoadsResource(\n array(\"primary\" => \"GET\", \"id\" => \"id\", \"init\" => array(\"conferenceId\"), \"silent\" => false)\n ),\n new SchemaResource(\n array(\"fields\" => array(\n 'id', 'from', 'to', 'recordingEnabled', 'recordingFileFormat', 'callbackUrl', 'events',\n 'direction', 'callbackHttpMethod', 'state', 'startTime', 'endTime', 'activeTime', 'bridgeId'\n ), \"needs\" => array(\"id\", \"direction\", \"from\", \"to\"))\n ),\n new SubFunctionResource(\n array(\n array(\"term\" => \"transcriptions\", \"type\" => \"get\"),\n array(\"term\" => \"recordings\", \"type\" => \"get\"),\n array(\"term\" => \"events\", \"type\" => \"get\"),\n )\n )\n );\n }",
"public function __construct($resource)\n {\n $this->resource = $resource;\n }",
"public function __construct($resource)\n {\n $this->resource = $resource;\n }",
"public function __construct($resource)\n {\n $this->resource = $resource;\n }",
"public function __construct($resource)\n {\n $this->resource = $resource;\n }",
"public function __construct($resource)\n {\n $this->resource = $resource;\n }",
"public function __construct($resource = null)\n {\n $this->resource = $resource ?? new static::$model;\n }",
"abstract protected function createResource();",
"public function resolve($resource, $attribute = null)\n {\n $this->setResource($resource)\n ->setViaResource()\n ->setViaResourceId()\n ->setRelationType()\n ->setName($this->name)\n ->setChildren()\n ->setSchema();\n }",
"protected function _prepareFromResourceData()\n {\n if (count($this->_items) == 0) {\n $i = 0;\n $charities = array();\n \n foreach ($this->_resourceCollection as $item) {\n $item->setData('from',$this->_from);\n $item->setData('to',$this->_to);\n $charities[$item->getData('charity_id')][] = $item;\n }\n foreach($charities as $id => $charity)\n {\n $item = $this->getItemModel()->fromCharityData($charity);\n foreach($item->getData() as $idx => $value)\n {\n $this->getTotals()->setData($idx,$this->getTotals()->getData($idx) + $value);\n }\n $this->_items[] = $item;\n }\n }\n \n return $this;\n }",
"public function setResourceFactory(ResourceFactoryInterface $resourceFactory): self\n {\n // Let this fetch the resources if the factory allows proxying of resources.\n $this->resourceFactory = $resourceFactory->setMyParcelComApi($this);\n\n return $this;\n }",
"private function setResource()\n {\n $path = $_SERVER['PATH_INFO'];\n $params = explode('/', $path);\n $this->_requestResource = $params[2];\n if (!in_array($this->_requestResource, $this->_allowResource)) {\n throw new Exception(\"Request resource not allowed!\", 405);\n }\n\n $this->_version = $params[1];\n\n if (!$this->notValid($params[3])) {\n $this->_requestUri = $params[3];\n }\n }",
"public function resolve(Resource $resource): self\n {\n $this->fields()->each(function(Field $field) use ($resource) {\n $field->resolve($resource);\n });\n\n return $this;\n }",
"public function setResource($resource)\n {\n $this->resource = $resource;\n\n return $this;\n }",
"public function setResource($resource) {\n\n $this->resource = $resource;\n }",
"static private function registerResource(SimpleRdfResource $resource) {\r\n SimpleRdf::$resources[]=$resource;\r\n }",
"protected function setUp() {\n $this->object = new formularioResource;\n }",
"public function createResource()\n {\n $this->resource = new \\Imagick();\n }",
"public function resource($resource) {\n // If the resource has already been computed and cached, just use it. Otherwise, compute and cache it somewhere.\n // Big case statement for each possible type of resource\n // Likely going to be using $this->reference a lot\n switch ($resource) {\n case 'offers':\n if (isset($this->offers)) {\n\treturn $this->offers;\n } else {\n\t$this->offers = array();\n\tforeach ($this->reference->resource('offers') as $offer) {\n\t if ($offer->attr('merchant') == $this->attr('id')) {\n\t $this->offers[] = $offer;\n\t }\n\t}\n\treturn $this->offers;\n }\n case 'deals':\n if (isset($this->deals)) {\n\treturn $this->deals;\n } else {\n\t$this->deals = array();\n\tforeach ($this->reference->resource('deals') as $deal) {\n\t if ($deal->attr('merchant') == $this->attr('id')) {\n\t $this->deals[] = $deal;\n\t }\n\t}\n\treturn $this->deals;\n }\n case 'merchant_type':\n return $this->reference->resourceById('merchant_types', $this->attr('merchant_type'));\n case 'country':\n return $this->reference->resourceById('countries', $this->attr('country'));\n case 'category':\n return $this->reference->resourceById('categories', $this->attr('category'));\n }\n }",
"private function makeExpectedResource(): CustomerResource\n {\n return new CustomerResource(1, 'John Smith', new AddressResource('UK', 'London'));\n }",
"public function __construct($resource = null)\n {\n $this->resource = $resource;\n return $this;\n }",
"public function resource($resource) {\n switch ($resource) {\n case 'product':\n return $this->product;\n case 'merchant':\n return $this->reference->resourceById('merchants', $this->attr('merchant'));\n }\n }",
"abstract public function resource($resource);",
"public function __construct()\n {\n $this->_serviceResource = 'Offers/';\n }",
"public static function add_resource($resource) {\n // Ensure indiciaFns is always the first resource added.\n if (!self::$indiciaFnsDone) {\n self::$indiciaFnsDone = TRUE;\n self::add_resource('indiciaFns');\n }\n $resourceList = self::get_resources();\n // If this is an available resource and we have not already included it,\n // then add it to the list.\n if (array_key_exists($resource, $resourceList) && !in_array($resource, self::$required_resources)) {\n if (isset($resourceList[$resource]['deps'])) {\n foreach ($resourceList[$resource]['deps'] as $dep) {\n self::add_resource($dep);\n }\n }\n self::$required_resources[] = $resource;\n }\n }",
"private function init() {\n $apiParts = $this->request->getApiParts();\n $this->requestedId = array_shift($apiParts);\n $this->apiParts = $apiParts;\n \n $this->siteDriver = Datastore::getSiteDriver();\n }",
"protected function createResource()\n {\n $this->call('make:resource', array_filter([\n 'name' => $this->getNameInput().'Resource',\n ]));\n }",
"public function retrieve(Resource $resource);",
"private function activateResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->activateResource($resource);\n $this->validateActivatedResource($blueprint, $resource);\n }",
"public function __construct(ResourceController $resourceController)\n {\n parent::__construct();\n $this->resourceController = $resourceController;\n }",
"public function prepare()\n {\n $this->_getResource()->prepare($this);\n return $this;\n }",
"public function setResource($rel, $resource)\n {\n if (is_array($resource)) {\n foreach ($resource as $r) {\n $this->addResource($rel, $r);\n }\n\n return $this;\n }\n\n if (!($resource instanceof FikenHal)) {\n throw new InvalidArgumentException('$resource should be of type array or Hal');\n }\n\n $this->resources[$rel] = $resource;\n\n return $this;\n }",
"protected function addResource(Resource $resource)\n {\n $this->view->addResource($resource);\n }",
"public function __construct(public mixed $resource)\n {\n }",
"public function init_rest( $api_manager ) {\n\n\t\t\trequire_once $this->component_path( 'rest-api/add-relation.php' );\n\t\t\trequire_once $this->component_path( 'rest-api/edit-relation.php' );\n\t\t\trequire_once $this->component_path( 'rest-api/get-relation.php' );\n\t\t\trequire_once $this->component_path( 'rest-api/delete-relation.php' );\n\t\t\trequire_once $this->component_path( 'rest-api/get-relations.php' );\n\n\t\t\t$api_manager->register_endpoint( new Jet_Engine_CPT_Rest_Add_Relation() );\n\t\t\t$api_manager->register_endpoint( new Jet_Engine_CPT_Rest_Edit_Relation() );\n\t\t\t$api_manager->register_endpoint( new Jet_Engine_CPT_Rest_Get_Relation() );\n\t\t\t$api_manager->register_endpoint( new Jet_Engine_CPT_Rest_Delete_Relation() );\n\t\t\t$api_manager->register_endpoint( new Jet_Engine_CPT_Rest_Get_Relations() );\n\n\t\t}",
"public function __construct($resource,$isSubCategory)\n {\n parent::__construct($resource);\n $this->resource = $resource;\n $this->isSubCategory = $isSubCategory;\n }",
"public function setToResource()\n {\n $this->type = \"resource\";\n }",
"public function instantiateResource($resource, $directory = null);",
"protected function resourceService(){\n return new $this->resourceService;\n }",
"public function setResource(string $resource): self\n {\n $this->resource = $resource;\n\n return $this;\n }",
"public function createShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathMultipleResource(),\n 'METHOD' => 'POST',\n 'DATA' => [\n /*\n * Using static:: instead of self:: because static:: binds at runtime\n * If we use self this would not work because it would\n * always call ShopifyResource::getResourceSingularName()\n */\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function buildController(Resource $resource);",
"public static function with($resource)\n {\n return new static($resource);\n }",
"abstract public function resource();",
"public function withResource($resource) {\n $this->resource = $resource;\n \n if (is_a($this->resource, 'Illuminate\\Http\\UploadedFile')) {\n $this->resource_type = 'uploaded';\n }\n \n if (filter_var($this->resource, FILTER_VALIDATE_URL)) {\n $this->resource_type = 'url';\n }\n \n if (is_string($this->resource) && file_exists($this->resource)) {\n $this->resource_type = 'path';\n }\n \n if (empty($this->resource_type)) {\n throw new \\Exception('Resource type unsupported.');\n }\n \n return $this;\n }",
"public function __construct($resource, $leaderboard_id)\n {\n // Ensure you call the parent constructor\n parent::__construct($resource);\n $this->resource = $resource;\n \n $this->leaderboard_id = $leaderboard_id;\n }",
"public function resource($resource) {\n // If the resource has already been computed and cached, just use it. Otherwise, compute and cache it somewhere.\n // Big case statement for each possible type of resource\n // Likely going to be using $this->reference a lot\n switch ($resource) {\n case 'offers':\n return $this->offers; // Special case... No caching because of how offers are nested inside products\n case 'category':\n return $this->reference->resourceById('categories', $this->attr('category'));\n case 'brand':\n return $this->reference->resourceById('brands', $this->attr('brand'));\n }\n }",
"public function __construct($resource) {\n\t\tif(!isset($resource)) {\n\t\t\tthrow new Exception(\"Invalid AddonObject construction\");\n\t\t}\n\n\t\t$this->id = intval($resource->id);\n\t\t$this->board = intval($resource->board);\n\t\t$this->blid = intval($resource->blid);\n\t\t$this->name = $resource->name;\n\t\t$this->description = $resource->description;\n\t\t$this->approved = intval($resource->approved);\n\t\t$this->version = $resource->version;\n\n\t\t$this->filename = $resource->filename;\n\t\t$this->deleted = intval($resource->deleted);\n\n\t\t$this->betaVersion = $resource->betaVersion;\n\n\t\t$this->uploadDate = $resource->uploadDate;\n\t\t$this->url = \"https://s3.amazonaws.com/\" . urlencode(AWSFileManager::getBucket()) . \"/addons/\" . $this->id;\n\n\t\t$this->summary = $resource->summary;\n\t}",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"public function gatherData() {\r\n\t\t$this->resource->gatherData();\r\n\t}",
"public function __construct(FedoraResource $resource = null) {\n $this->binaryClass = RC::get('indexerDefaultBinaryClass');\n $this->collectionClass = RC::get('indexerDefaultCollectionClass');\n\n if ($resource !== null) {\n $this->setParent($resource);\n $this->fedora = $resource->getFedora();\n }\n }",
"protected function _construct()\n {\n $this->_init(\\Mage2\\Inquiry\\Model\\ResourceModel\\Inquiry::class);\n }",
"protected function _construct()\n {\n $this->_init(ProductResourceModel::class);\n }",
"public function show(Resource $resource)\n {\n //\n }",
"public function resource(string $resource): ApiClient {\n $this->resource = $resource;\n return $this;\n }",
"public function import(ResourceInterface $resource): void\n {\n if (null === $resource->getId()) {\n $this->entityManager->persist($resource);\n }\n }",
"public function addResource(RestResource $resource)\n {\n $this->resources->contains($resource) ?: $this->resources->push($resource);\n }",
"public function onPreCreate(ResourceEventInterface $event): void\n {\n $member = $this->getMemberFromEvent($event);\n\n $this->getGateway($member->getAudience()->getGateway(), GatewayInterface::INSERT_MEMBER);\n }",
"public function __construct()\n\t\t{\n\t\t\t/*goi thang den ham _init trong ResourceModel*/\n\t\t\tparent::_init('lienhe', 'id', new ContactModel);\n\t\t}",
"public function refresh()\n {\n // Several refresh() calls might happen during one request. If that is the case, the Resource Manager can't know\n // that the first created resource object doesn't have to be persisted / published anymore. Thus we need to\n // delete the resource manually in order to avoid orphaned resource objects:\n if ($this->resource !== null) {\n $this->resourceManager->deleteResource($this->resource);\n }\n\n parent::refresh();\n $this->renderResource();\n }",
"public function setResource(Resource $res)\n {\n $this->setResourceId($res->getResourceId());\n $this->setResourceClass($res->getResourceClass());\n }",
"protected function _construct()\n {\n $this->_init('AVATOR\\ContactUs\\Model\\ResourceModel\\ContactUs');\n }",
"public function add($data, Resource $resource);",
"protected function _setupResources()\n {\n $this->_acl->addResource( new Zend_Acl_Resource('auth') );\n $this->_acl->addResource( new Zend_Acl_Resource('error') );\n \t$this->_acl->addResource( new Zend_Acl_Resource('index') );\n $this->_acl->addResource( new Zend_Acl_Resource('register') );\n $this->_acl->addResource( new Zend_Acl_Resource('dashboard') );\n }",
"protected function _construct()\n {\n $this->_init(Model::class, ResourceModel::class);\n }",
"public function initialize()\n {\n $this->setSchema(\"zeji_qa_admin\");\n $this->setSource(\"tb_resource\");\n }",
"private function collectData()\n {\n // Decode the API data\n $data = $this->callApi();\n\n // Convert the data to JSON\n // - We could return the response()->json($data) here\n // But instead I am converting to JSON to create an Array compatible with the Resource / Transformer / collections\n $json = json_encode($data);\n\n // And convert the JSON to an array for the Resource / Fractal Transformer\n $array = json_decode($json, true);\n\n // This could also be done in one line using:\n // $array = json_decode(json_encode($xml), true);\n // But it was easier as individual lines for improved commenting\n\n $this->data = collect(FloatRatesResource::collection($array[\"item\"])->resolve());\n }",
"protected function _initResources () {\r\n\r\n\t\t$bFreshData = false;\r\n\r\n\t\tif (self::$_bUseCache) {\r\n\t\t\t$oCacheManager = Kwgl_Cache::getManager();\r\n\t\t\t$oAclCache = $oCacheManager->getCache('acl');\r\n\r\n\t\t\tif (($aResourceListing = $oAclCache->load(self::CACHE_IDENTIFIER_RESOURCES)) === false) {\r\n\t\t\t\t// Not Cached or Expired\r\n\r\n\t\t\t\t$bFreshData = true;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$bFreshData = true;\r\n\t\t}\r\n\r\n\t\tif ($bFreshData) {\r\n\t\t\t// Get Resources from the Database\r\n\t\t\t$oDaoResource = Kwgl_Db_Table::factory('System_Resource'); /* @var $oDaoResource Dao_System_Resource */\r\n\t\t\t//$aResourceListing = $oDaoResource->fetchAll();\r\n\t\t\t$aResourceListing = $oDaoResource->getResources();\r\n\r\n\t\t\tif (self::$_bUseCache) {\r\n\t\t\t\t$oAclCache->save($aResourceListing, self::CACHE_IDENTIFIER_RESOURCES);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tforeach ($aResourceListing as $aResourceDetail) {\r\n\t\t\t$sResourceName = $aResourceDetail['name'];\r\n\t\t\tif (is_null($aResourceDetail['parent'])) {\r\n\t\t\t\t// Add the Resource if it hasn't been defined yet\r\n\t\t\t\tif (!$this->has($sResourceName)) {\r\n\t\t\t\t\t$this->addResource(new Zend_Acl_Resource($sResourceName));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// Parent Resource assigned\r\n\t\t\t\t$sResourceParentName = $aResourceDetail['parent'];\r\n\t\t\t\t// Add the Parent Role if the Parent Role hasn't been defined yet\r\n\t\t\t\tif (!$this->has($sResourceParentName)) {\r\n\t\t\t\t\t$this->addResource(new Zend_Acl_Resource($sResourceParentName));\r\n\t\t\t\t}\r\n\t\t\t\t$this->addResource(new Zend_Acl_Resource($sResourceName), $sResourceParentName);\r\n\t\t\t}\r\n\r\n\r\n\t\t}\r\n\t}",
"public function resource($actions, $resource, $model)\n {\n \n //Create a new Resource.\n $instance = $this->resourceFactory->__invoke($actions, $model);\n \n //Attach the resource to the router.\n $this->router->attach('rest.resource.'.$resource, \"{$this->routePrefix}/$resource\", $instance);\n \n //Return it for further manipulation.\n return $instance;\n \n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->model = new ExtendedWarranty;\n\n $this->route .= '.extended-warranty';\n $this->views .= '.extended_warranty';\n $this->url = \"admin/extended-warranty/\";\n\n $this->resourceConstruct();\n\n }",
"public function __construct() {\n\t\tadd_filter( 'rest_pre_insert_post', [ $this, 'set_request' ], 10, 2 );\n\t}",
"public function __construct(Template $resource)\n {\n parent::__construct($resource);\n }",
"public function before()\n\t{\n\t\tparent::before();\n\t\t$this->_rest = Model_RestAPI::factory('RestCustomer', $this->_user);\n\t}",
"public function initialize()\n {\n $schema = new Infra();\n $this->setSchema($schema->getSchemaBanco());\n $this->setSource(\"contrato_exercicio\");\n $this->hasMany('id', 'Circuitos\\Models\\ContratoFinanceiro', 'id_exercicio', ['alias' => 'ContratoFinanceiro']);\n $this->belongsTo('id_contrato', 'Circuitos\\Models\\Contrato', 'id', ['alias' => 'Contrato']);\n }",
"public function __construct() {\n\t\tparent::__construct(FALSE, array(), array(), array('resources'));\n\t\t$this->resources = array();\n\t\t$this->_restrict_write_access();\n\n\t}",
"public function __construct (apiClient $apiClient)\n {\n $this->rpcPath = '/rpc';\n $this->restBasePath = '/plus/v1/';\n $this->version = 'v1';\n $this->serviceName = 'plus';\n\n $apiClient->addService($this->serviceName, $this->version);\n $this->activities = new ActivitiesServiceResource($this,\n $this->serviceName, 'activities',\n json_decode(\n '{\"methods\": {\"search\": {\"scopes\": [\"https://www.googleapis.com/auth/plus.me\"], \"parameters\": {\"orderBy\": {\"default\": \"recent\", \"enum\": [\"best\", \"recent\"], \"location\": \"query\", \"type\": \"string\"}, \"pageToken\": {\"type\": \"string\", \"location\": \"query\"}, \"language\": {\"default\": \"\", \"type\": \"string\", \"location\": \"query\"}, \"maxResults\": {\"format\": \"uint32\", \"default\": \"10\", \"maximum\": \"20\", \"minimum\": \"1\", \"location\": \"query\", \"type\": \"integer\"}, \"query\": {\"required\": true, \"type\": \"string\", \"location\": \"query\"}}, \"id\": \"plus.activities.search\", \"httpMethod\": \"GET\", \"path\": \"activities\", \"response\": {\"$ref\": \"ActivityFeed\"}}, \"list\": {\"scopes\": [\"https://www.googleapis.com/auth/plus.me\"], \"parameters\": {\"pageToken\": {\"type\": \"string\", \"location\": \"query\"}, \"alt\": {\"default\": \"json\", \"enum\": [\"json\"], \"location\": \"query\", \"type\": \"string\"}, \"userId\": {\"required\": true, \"type\": \"string\", \"location\": \"path\"}, \"collection\": {\"required\": true, \"enum\": [\"public\"], \"location\": \"path\", \"type\": \"string\"}, \"maxResults\": {\"format\": \"uint32\", \"default\": \"20\", \"maximum\": \"100\", \"minimum\": \"1\", \"location\": \"query\", \"type\": \"integer\"}}, \"id\": \"plus.activities.list\", \"httpMethod\": \"GET\", \"path\": \"people/{userId}/activities/{collection}\", \"response\": {\"$ref\": \"ActivityFeed\"}}, \"get\": {\"scopes\": [\"https://www.googleapis.com/auth/plus.me\"], \"parameters\": {\"activityId\": {\"required\": true, \"type\": \"string\", \"location\": \"path\"}, \"alt\": {\"default\": \"json\", \"enum\": [\"json\"], \"location\": \"query\", \"type\": \"string\"}}, \"id\": \"plus.activities.get\", \"httpMethod\": \"GET\", \"path\": \"activities/{activityId}\", \"response\": {\"$ref\": \"Activity\"}}}}',\n true));\n $this->comments = new CommentsServiceResource($this, $this->serviceName,\n 'comments',\n json_decode(\n '{\"methods\": {\"list\": {\"scopes\": [\"https://www.googleapis.com/auth/plus.me\"], \"parameters\": {\"pageToken\": {\"type\": \"string\", \"location\": \"query\"}, \"activityId\": {\"required\": true, \"type\": \"string\", \"location\": \"path\"}, \"alt\": {\"default\": \"json\", \"enum\": [\"json\"], \"location\": \"query\", \"type\": \"string\"}, \"maxResults\": {\"format\": \"uint32\", \"default\": \"20\", \"maximum\": \"100\", \"minimum\": \"0\", \"location\": \"query\", \"type\": \"integer\"}}, \"id\": \"plus.comments.list\", \"httpMethod\": \"GET\", \"path\": \"activities/{activityId}/comments\", \"response\": {\"$ref\": \"CommentFeed\"}}, \"get\": {\"scopes\": [\"https://www.googleapis.com/auth/plus.me\"], \"parameters\": {\"commentId\": {\"required\": true, \"type\": \"string\", \"location\": \"path\"}}, \"id\": \"plus.comments.get\", \"httpMethod\": \"GET\", \"path\": \"comments/{commentId}\", \"response\": {\"$ref\": \"Comment\"}}}}',\n true));\n $this->people = new PeopleServiceResource($this, $this->serviceName,\n 'people',\n json_decode(\n '{\"methods\": {\"listByActivity\": {\"scopes\": [\"https://www.googleapis.com/auth/plus.me\"], \"parameters\": {\"pageToken\": {\"type\": \"string\", \"location\": \"query\"}, \"activityId\": {\"required\": true, \"type\": \"string\", \"location\": \"path\"}, \"collection\": {\"required\": true, \"enum\": [\"plusoners\", \"resharers\"], \"location\": \"path\", \"type\": \"string\"}, \"maxResults\": {\"format\": \"uint32\", \"default\": \"20\", \"maximum\": \"100\", \"minimum\": \"1\", \"location\": \"query\", \"type\": \"integer\"}}, \"id\": \"plus.people.listByActivity\", \"httpMethod\": \"GET\", \"path\": \"activities/{activityId}/people/{collection}\", \"response\": {\"$ref\": \"PeopleFeed\"}}, \"search\": {\"scopes\": [\"https://www.googleapis.com/auth/plus.me\"], \"parameters\": {\"pageToken\": {\"type\": \"string\", \"location\": \"query\"}, \"language\": {\"default\": \"\", \"type\": \"string\", \"location\": \"query\"}, \"maxResults\": {\"format\": \"uint32\", \"default\": \"10\", \"maximum\": \"20\", \"minimum\": \"1\", \"location\": \"query\", \"type\": \"integer\"}, \"query\": {\"required\": true, \"type\": \"string\", \"location\": \"query\"}}, \"id\": \"plus.people.search\", \"httpMethod\": \"GET\", \"path\": \"people\", \"response\": {\"$ref\": \"PeopleFeed\"}}, \"get\": {\"scopes\": [\"https://www.googleapis.com/auth/plus.me\", \"https://www.googleapis.com/auth/userinfo.email\"], \"parameters\": {\"userId\": {\"required\": true, \"type\": \"string\", \"location\": \"path\"}}, \"id\": \"plus.people.get\", \"httpMethod\": \"GET\", \"path\": \"people/{userId}\", \"response\": {\"$ref\": \"Person\"}}}}',\n true));\n }",
"public function & __construct ($passedArgument) {\n return $this->setResource ($passedArgument);\n }",
"public function make(ResourceInterface $resource, SerializerAbstract $serializer, array $options = [])\n {\n $options = $this->parseOptions($options, $resource);\n\n return $this->manager->setSerializer($serializer)\n ->parseIncludes($options['includes'])\n ->parseExcludes($options['excludes'])\n ->parseFieldsets($options['fieldsets'])\n ->createData($resource)\n ->toArray();\n }",
"public function getFrom($resource);",
"protected function fillFromAPI($entity) {\n $this->products = [];\n\n // Parse the products from the data\n foreach ($entity->details as $product) {\n $this->addProduct(new InvoiceProduct($product, true));\n }\n\n // unset the entity-details\n unset($entity->details);\n\n // fill the entity with results from the API-response\n parent::fillFromAPI($entity);\n }",
"protected function _construct()\n\t{\n\t\t$this->_init(\n\t\t\t'Unilab\\Inquiry\\Model\\Inquiry',\n\t\t\t'Unilab\\Inquiry\\Model\\ResourceModel\\Inquiry');\n\t}",
"public function create()\n\t{\n\t\treturn new StandardResource($this->arguments[0]->resourceId, 'StandardResource');\n\t}",
"public function init()\n\t{\n\t\t$this->_loadResources();\n\t\t$this->_loadRoles();\n\t\t$this->_loadPrivileges();\n\t\t\n\t\t// cleanup\n\t\t$this->_temp['roles'] = array();\n\t\t$this->_temp['resources'] = array();\n\t\t\n\t\treturn $this;\n\t}",
"public function add( string $resource, Common\\Field\\Field $field ): Common\\Field\\Collection {\n\n\t\t$this->fields[ $resource ][ $field->name() ] = $field;\n\n\t\treturn $this;\n\t}",
"public function fromResource($resource)\n {\n if ($resource instanceof TitleSeoInterface) {\n // backward compatibility\n $this->setTitle($resource->getSeoTitle());\n }\n if ($resource instanceof DescriptionSeoInterface) {\n // backward compatibility\n $this->setDescription($resource->getSeoDescription());\n }\n if ($resource instanceof KeywordsSeoInterface) {\n // backward compatibility\n $this->setKeywords($resource->getSeoKeywords());\n }\n\n // Pagination\n if ($resource instanceof PaginationAwareInterface) {\n $this->setPreviousUrl($resource->getPreviousUrl());\n $this->setNextUrl($resource->getPreviousUrl());\n }\n\n // Resource\n if ($resource instanceof ResourceInterface) {\n $this->setTitle($resource->getTitle());\n $this->setDescription($resource->getDescription());\n if ($keywords = $resource->getKeywords()) {\n $this->setKeywords((is_array($keywords)) ? $keywords : [$keywords]);\n }\n }\n\n return $this;\n }",
"public function resource($resource, array $options = array())\n\t{\n\t\tif(!empty($this->_options))\n\t\t\t\t$options = array_merge($this->_options, $options);\n\n\t\t$only_set = isset($options['only']);\n\n\t\tif($only_set)\n\t\t\t$only = $options['only'];\n\n\t\t$class = \\str::toCamelCase($resource, true);\n\n\t\t$front = isset($options['as']) ? $options['as'] : $resource;\n\t\t$controller = $class::$_controller;\n\n\t\t/* Create */\n\t\tif(!$only_set || in_array('create', $only))\n\t\t\t$this->connect($front.'/', array_merge($options, array('controller' => $controller, 'action' => 'create')), 'post', true);\n\n\t\t/* New */\n\t\tif(!$only_set || in_array('new', $only) || in_array('add', $only)) {\n\t\t\t$this->connect($front.'/new', array_merge($options, array('controller' => $controller, 'action' => 'add')), 'get', true);\n\t\t\t$this->connect($front.'/add', array_merge($options, array('controller' => $controller, 'action' => 'add')), 'get', true);\n\t\t}\n\n\t\t/* Edit */\n\t\tif(!$only_set || in_array('edit', $only))\n\t\t\t$this->connect($front.'/edit', array_merge($options, array('controller' => $controller, 'action' => 'edit')), 'get', true);\n\n\t\t/* Show */\n\t\tif(!$only_set || in_array('show', $only))\n\t\t\t$show = $this->connect($front.'/', array_merge($options, array('controller' => $controller, 'action' => 'show')), 'get', true);\n\n\t\t/* Update */\n\t\tif(!$only_set || in_array('update', $only))\n\t\t\t$this->connect($front.'/', array_merge($options, array('controller' => $controller, 'action' => 'update')), 'put', true);\n\n\t\t/* Delete */\n\t\tif(!$only_set || in_array('delete', $only))\n\t\t\t$this->connect($front.'/', array_merge($options, array('controller' => $controller, 'action' => 'delete')), 'delete', true);\n\n\t\t/* Members */\n\t\tif(isset($show) && isset($options['member'])) {\n\t\t\tforeach($options['member'] as $member => $method){\n\t\t\t\t$show->connect('/'.$member, array('action' => $member), $method);\n\t\t\t}\n\t\t}\n\n\t\treturn isset($show) ? $show : null;\n\t}",
"public function __construct( $requester, $path='/products' ) {\n\t\tparent::__construct($requester);\n\t\t$this->url = $this->url . $path;\n\t}",
"public function initialize()\n {\n $model= new \\Yabasi\\ModelController();\n $this->setSchema($model->model());\n $this->setSource(\"refund\");\n }"
] | [
"0.5990363",
"0.57560897",
"0.56593776",
"0.56284666",
"0.56011945",
"0.558179",
"0.55703336",
"0.5518375",
"0.5518375",
"0.5518375",
"0.54844224",
"0.5442545",
"0.54154545",
"0.5414371",
"0.5414371",
"0.5414371",
"0.5414371",
"0.5414371",
"0.5337583",
"0.5317926",
"0.5305327",
"0.5300208",
"0.52599895",
"0.5234113",
"0.52308995",
"0.52141434",
"0.52136207",
"0.5146819",
"0.5144783",
"0.51358265",
"0.51282203",
"0.51169",
"0.50900036",
"0.5076659",
"0.50687397",
"0.5066839",
"0.5045201",
"0.5044614",
"0.5039092",
"0.50375354",
"0.50371504",
"0.5036025",
"0.50040305",
"0.49938676",
"0.49838123",
"0.49717492",
"0.4953124",
"0.49486494",
"0.49364656",
"0.4936369",
"0.49235553",
"0.48979908",
"0.48952815",
"0.48931774",
"0.48830676",
"0.48802733",
"0.48793757",
"0.48763752",
"0.4875385",
"0.48547134",
"0.4852168",
"0.48495904",
"0.48433167",
"0.4841521",
"0.48388723",
"0.482689",
"0.48215088",
"0.48206156",
"0.48154837",
"0.48148698",
"0.47838217",
"0.4780642",
"0.4766782",
"0.47649485",
"0.4754187",
"0.47427282",
"0.4737044",
"0.47357336",
"0.47299477",
"0.47285247",
"0.47229588",
"0.47197348",
"0.47164172",
"0.47161293",
"0.47125107",
"0.47112882",
"0.47107106",
"0.47085202",
"0.47072342",
"0.4705701",
"0.47007853",
"0.46962956",
"0.46884337",
"0.4687396",
"0.46823335",
"0.46812683",
"0.46807653",
"0.46796307",
"0.46763793",
"0.4670994"
] | 0.50635964 | 36 |
Clear filter of visited Resources | public function clearVisited()
{
$this->getFilter()->clear($this->getProject() . 'visited');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function removeAllFilters();",
"public function resetFilters() {\n $this->filters = array();\n }",
"public function removeFilters();",
"public function reset()\n\t{\n\t\tupdate_option($this->filterName, array());\n\t}",
"public function reset() : void\n {\n\n // load the filters that has to be resetted\n $filters = $this->getFilters();\n\n // reset the filters\n foreach ($filters as $filter) {\n if ($filter instanceof PregMatchFilterInterface) {\n $filter->reset();\n }\n }\n }",
"public function filter() {\r\n\t\t$this->resource->filter();\r\n\t}",
"public function deleteAllResources() {\n\t\t$this->resources = array();\n\t}",
"function clear_filters($filterName = null)\n{\n if ($pluginBroker = get_plugin_broker()) {\n $pluginBroker->clearFilters($filterName);\n }\n}",
"private function clear()\n {\n $this->mappedQueries = [];\n $this->mappedFilters = [];\n $this->requestData = [];\n }",
"public function resetFilter()\n {\n $this->actor = null;\n $this->addTimestamp = null;\n $this->encryptSignature = null;\n $this->expires = null;\n $this->serviceSecurityKey = null;\n $this->signAllHeaders = null;\n $this->tokenReferenceEncryption = null;\n $this->tokenReferenceSignature = null;\n $this->userSecurityKey = null;\n }",
"public static function clear_all() {\n\t\tstatic::$cache = array();\n\t\tstatic::$mapping = array();\n\t}",
"private function _clearCache()\n {\n Cache::forget(\"roaddamage-resource:{$this->id}\");\n foreach ($this->getReports() as $report) {\n Cache::forget(\"report-resource:{$report->id}\");\n }\n }",
"public function resetFilters()\n {\n unset($this->options['AmazonOrderId']);\n unset($this->options['FinancialEventGroupId']);\n $this->resetTimeLimits();\n }",
"public function clearCache() {\n\t\tYii::app()->user->setState('nlsLoadedResources', array());\n\t}",
"public function clearWhere()\n {\n \t$this->_where = null;\n }",
"public function CleanFilter(){\n\t\t$this->_objectFilter = new Model_Aclusuariosonline();\n\t}",
"private function restoreFilters()\n {\n if (count($this->wordpressFilters) > 0) {\n $filters = $this->wordpress->getFilters();\n\n foreach ($this->wordpressFilters as $filterKey => $filter) {\n $filters[$filterKey] = $filter;\n }\n\n $this->wordpress->setFilters($filters);\n $this->wordpressFilters = [];\n }\n }",
"public function clearSuccessful()\n {\n $this->getFilter()->clear($this->getProject() . 'parsed');\n $this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_SUCCESS);\n $this->getLogger()->debug('Cleared \"visited\" and \"scheduled\" filters');\n }",
"protected function clear() {}",
"public function removeAllFilters()\n\t{\n\t\t$this->filters = [];\n\t\treturn $this;\n\t}",
"public function removeAll() {}",
"public function removeAll() {}",
"public function removeAll() {}",
"public function removeAll() {}",
"public function removeAll() {}",
"public function removeAll() {}",
"public function reset()\r\n\t{\r\n\t\t$this->first = null;\r\n\t\t$this->alreadyIncluded = array();\r\n\t\t$this->depths = array();\r\n\t}",
"public function clearFilters()\n {\n $this->parameterFilters = array();\n\n return $this;\n }",
"function removeAll() ;",
"function removeAll() ;",
"public function clear(): void\n {\n $app = App::get();\n $list = $app->data->getList()\n ->filterBy('key', '.temp/cache/', 'startWith');\n foreach ($list as $item) {\n $app->data->delete($item->key);\n };\n }",
"public function clearAll() {}",
"public function clearCache()\n {\n $this->pathsCache = array();\n $this->filterCache = array();\n return $this;\n }",
"public function cleanLookupCache(){\n\t\t$this->lookup = [];\n\t}",
"protected static function cleanFiltersData()\n {\n\n // Gets the arguments\n $arguments = AbstractController::getOriginalArguments();\n\n if ($arguments['special']) {\n // Removes filters in the same page which are not active,\n // that is not selected or with the same contentID\n foreach (self::$filtersData as $filterKey => $filter) {\n if ($filterKey != self::$selectedFilterKey && $filter['pageId'] == $this->getPageId() && $filter['contentUid'] != self::$filtersData[self::$selectedFilterKey]['contentUid']) {\n unset(self::$filtersData[$filterKey]);\n }\n }\n\n // Removes the selectedFilterKey if there no filter associated with it\n if (is_array(self::$filtersData[self::$selectedFilterKey]) === false) {\n self::$selectedFilterKey = null;\n }\n }\n }",
"public function clearAll();",
"public function clearAll();",
"public function clearAll() {\n $this->param = array();\n $this->method_map = array();\n $this->response = NULL;\n $this->query = '';\n }",
"public function clearVenueratings()\n\t{\n\t\t$this->collVenueratings = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"function reset_filters()\r\n{\r\n\t//uitzoeken of het in js of php gedaan word\t\r\n}",
"function clean_permissions_cache() {\n cache_remove_by_pattern('visible_types_filter_for_*');\n \tcache_remove_by_pattern('visible_project_types_filter_for_*');\n \tcache_remove_by_pattern('visible_project_types_for_*');\n }",
"public function clear() {}",
"public function clear() {}",
"public function clear() {}",
"public function clear() {}",
"public function clear_all()\n {\n }",
"public static function clearCache() {\n static::$cachedChecks = [];\n }",
"public function resetFilters()\n {\n $this->filters = array();\n\n return $this;\n }",
"function resetPred(){\n\t\tforeach($vertexList as $v){\n\t\t\t$v->visited = false;\n\t\t\t$v->pret = NULL;\n\t\t}\n\t}",
"public static function deactivateAll()\n {\n foreach (self::$_activeFilters as $target => $filter) {\n $filter->deactivate();\n }\n }",
"public function removeAll();",
"public function removeAll();",
"public function removeAll()\n\t{\n\t\t$this->clear();\n\n\t\t$this->values = array();\n\t}",
"public static function clearCache() {\n self::$steamIds = array();\n }",
"public function clear()\n {\n $this->links = [];\n }",
"public function clearAll()\n {\n }",
"public function resetFilterReport() {\n\t\t$this->table->resetOffset();\n\t\t$this->table->resetFilter();\n\t\t$this->report();\n\t}",
"public function unsetFileAndFolderNameFilters() {}",
"public function removeAll () {\n\t\t$this->exchangeArray(array());\n\t}",
"public static function clear()\n {\n self::$map = array();\n self::$instances = array();\n }",
"public function clearResources()\n {\n AM_Tools::clearContent($this->_getIssueHelpPage()->getThumbnailPresetType(), $this->_getIssueHelpPage()->id_issue);\n AM_Tools::clearResizerCache($this->_getIssueHelpPage()->getThumbnailPresetType(), $this->_getIssueHelpPage()->id_issue);\n }",
"public function clean() {\n $this->requires = array();\n $this->getResource()->clear();\n }",
"public function clearScheduled()\n {\n $this->getFilter()->clear($this->getProject() . 'scheduled');\n }",
"public function clear(): void\n {\n $this->collectionStatsById = [];\n $this->proxyStatsByClass = [];\n }",
"public function ClearSearch()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n // Only the root can clear its search results.\n if (null == $this->_my_root) {\n $this->_search_results = null;\n }\n }",
"public static function reset() {\n\t\tself::$objects = array();\n\t}",
"function clear() {}",
"public function removeAll() {\n\t\t$this->addedObjects = new \\SplObjectStorage();\n\t\tforeach ($this->findAll() as $object) {\n\t\t\t$this->remove($object);\n\t\t}\n\t}",
"public function clearAction() {\n\t\t$this->actionlist = null;\n\t}",
"public function clear ()\n {\n\n $this->groups = null;\n $this->groups = array();\n $this->names = null;\n $this->names = array();\n\n }",
"public function clearSearch(): void {}",
"public function removeAll() {\n\t\t\tif( !$items = $this->getStats( 'items' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$memcache = $this->getMemcache();\n\t\t\tforeach ($items['items'] as $key => $item) {\n\t\t\t\t$dump = $memcache->getStats( 'cachedump', $key, $item['number'] * 2 );\n\t\t\t\tforeach( array_keys( $dump ) as $ckey ) {\n\t\t\t\t\t$memcache->delete( $ckey );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->stats = null;\n\t\t}",
"public function clear()\n {\n $this->routes = array();\n }",
"public function delete_all() {\n\t\t$this->_cache = array();\n\t\t$this->_collections = array();\n\t}",
"public function clear( );",
"function clear() {}"
] | [
"0.71913314",
"0.71107495",
"0.6940135",
"0.6519467",
"0.6508074",
"0.6449197",
"0.64328986",
"0.638552",
"0.63595414",
"0.6312196",
"0.62840015",
"0.62813926",
"0.6274459",
"0.6237364",
"0.62206644",
"0.6212543",
"0.616541",
"0.6156031",
"0.6141826",
"0.6118417",
"0.6109679",
"0.6109679",
"0.6109679",
"0.6109679",
"0.6108736",
"0.6108736",
"0.6097247",
"0.60879076",
"0.60479236",
"0.60479236",
"0.6035363",
"0.6033772",
"0.60014194",
"0.6000055",
"0.59907967",
"0.59897256",
"0.59897256",
"0.59784",
"0.59779763",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.59738827",
"0.5961271",
"0.59479374",
"0.59396785",
"0.59396785",
"0.59396785",
"0.59396785",
"0.5931267",
"0.59064525",
"0.5902549",
"0.58915097",
"0.589104",
"0.5872685",
"0.5872685",
"0.5869244",
"0.585305",
"0.58410555",
"0.58397293",
"0.58321345",
"0.5825227",
"0.58226323",
"0.5818565",
"0.58129835",
"0.5809354",
"0.58059454",
"0.5798601",
"0.57928705",
"0.5789936",
"0.5789269",
"0.5787753",
"0.5778548",
"0.5767048",
"0.5765681",
"0.5764004",
"0.57627237",
"0.5757699",
"0.57493925",
"0.574752"
] | 0.77535236 | 0 |
Clear filter of scheduled Resources | public function clearScheduled()
{
$this->getFilter()->clear($this->getProject() . 'scheduled');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function removeFilters();",
"public function resetFilters()\n {\n unset($this->options['AmazonOrderId']);\n unset($this->options['FinancialEventGroupId']);\n $this->resetTimeLimits();\n }",
"public function removeAllFilters();",
"public function resetFilters() {\n $this->filters = array();\n }",
"public function filter() {\r\n\t\t$this->resource->filter();\r\n\t}",
"function clear_filters($filterName = null)\n{\n if ($pluginBroker = get_plugin_broker()) {\n $pluginBroker->clearFilters($filterName);\n }\n}",
"public function reset()\n\t{\n\t\tupdate_option($this->filterName, array());\n\t}",
"public function deleteAllResources() {\n\t\t$this->resources = array();\n\t}",
"public function clearPending();",
"public function clearFilters()\n {\n $this->parameterFilters = array();\n\n return $this;\n }",
"public function CleanFilter(){\n\t\t$this->_objectFilter = new Model_Aclusuariosonline();\n\t}",
"public function clearSuccessful()\n {\n $this->getFilter()->clear($this->getProject() . 'parsed');\n $this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_SUCCESS);\n $this->getLogger()->debug('Cleared \"visited\" and \"scheduled\" filters');\n }",
"private function _clearCache()\n {\n Cache::forget(\"roaddamage-resource:{$this->id}\");\n foreach ($this->getReports() as $report) {\n Cache::forget(\"report-resource:{$report->id}\");\n }\n }",
"public function resetFilter()\n {\n $this->actor = null;\n $this->addTimestamp = null;\n $this->encryptSignature = null;\n $this->expires = null;\n $this->serviceSecurityKey = null;\n $this->signAllHeaders = null;\n $this->tokenReferenceEncryption = null;\n $this->tokenReferenceSignature = null;\n $this->userSecurityKey = null;\n }",
"public function clearWhere()\n {\n \t$this->_where = null;\n }",
"public function reset() : void\n {\n\n // load the filters that has to be resetted\n $filters = $this->getFilters();\n\n // reset the filters\n foreach ($filters as $filter) {\n if ($filter instanceof PregMatchFilterInterface) {\n $filter->reset();\n }\n }\n }",
"public function resetFilterReport() {\n\t\t$this->table->resetOffset();\n\t\t$this->table->resetFilter();\n\t\t$this->report();\n\t}",
"public function removeAllFilters()\n\t{\n\t\t$this->filters = [];\n\t\treturn $this;\n\t}",
"public function clear(): void\n {\n $app = App::get();\n $list = $app->data->getList()\n ->filterBy('key', '.temp/cache/', 'startWith');\n foreach ($list as $item) {\n $app->data->delete($item->key);\n };\n }",
"public function clearCache() {\n\t\tYii::app()->user->setState('nlsLoadedResources', array());\n\t}",
"public function cleanScheduleAction(){\n \t$actual = new Frogg_Time_Time();\n \t$cleaning_day = $actual->subtract(3*24*60*60);\n \t$cleaning_stamp = $cleaning_day->getUnixTstamp();\n \t$sql = new Frogg_Db_Sql('DELETE FROM `scheduled` WHERE `timestamp` < '.$cleaning_stamp);\n \tdie;\n }",
"private function restoreFilters()\n {\n if (count($this->wordpressFilters) > 0) {\n $filters = $this->wordpress->getFilters();\n\n foreach ($this->wordpressFilters as $filterKey => $filter) {\n $filters[$filterKey] = $filter;\n }\n\n $this->wordpress->setFilters($filters);\n $this->wordpressFilters = [];\n }\n }",
"public function clearAll() {}",
"public function clearAll();",
"public function clearAll();",
"public function resetFilters()\n {\n $this->filters = array();\n\n return $this;\n }",
"public function clearCOMConditions()\n {\n $this->collCOMConditions = null; // important to set this to NULL since that means it is uninitialized\n }",
"public static function deactivateAll()\n {\n foreach (self::$_activeFilters as $target => $filter) {\n $filter->deactivate();\n }\n }",
"public function clearVisited()\n {\n $this->getFilter()->clear($this->getProject() . 'visited');\n }",
"public function resetTimeLimits()\n {\n unset($this->options['RequestedFromDate']);\n unset($this->options['RequestedToDate']);\n }",
"public function clearAuditorias()\n\t{\n\t\t$this->collAuditorias = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function clearAction() {\n\t\t$this->actionlist = null;\n\t}",
"private function clear()\n {\n $this->mappedQueries = [];\n $this->mappedFilters = [];\n $this->requestData = [];\n }",
"public function clearWatchStatus()\n\t\t{\n\t\t\t$model = $this->getModel();\n\t\t\t$model->is_watched = 'no';\n\t\t\t$model->modifying_agent_id = ECash::getAgent()->getAgentId();\n\t\t\t$model->save();\n\t\t}",
"public function clear(): void\n {\n $this->eventRegistry->dequeueEvents();\n }",
"public function removeAll() {}",
"public function removeAll() {}",
"public function removeAll() {}",
"public function removeAll() {}",
"public function removeAll() {}",
"public function removeAll() {}",
"public function resetMarketplaceFilter()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match(\"#MarketplaceId#\", $op)) {\n unset($this->options[$op]);\n }\n }\n }",
"protected static function cleanFiltersData()\n {\n\n // Gets the arguments\n $arguments = AbstractController::getOriginalArguments();\n\n if ($arguments['special']) {\n // Removes filters in the same page which are not active,\n // that is not selected or with the same contentID\n foreach (self::$filtersData as $filterKey => $filter) {\n if ($filterKey != self::$selectedFilterKey && $filter['pageId'] == $this->getPageId() && $filter['contentUid'] != self::$filtersData[self::$selectedFilterKey]['contentUid']) {\n unset(self::$filtersData[$filterKey]);\n }\n }\n\n // Removes the selectedFilterKey if there no filter associated with it\n if (is_array(self::$filtersData[self::$selectedFilterKey]) === false) {\n self::$selectedFilterKey = null;\n }\n }\n }",
"public function reset()\n {\n $this->values[self::_STATUS] = null;\n $this->values[self::_REWARDS] = array();\n }",
"public function remove()\n {\n foreach ($this->filters as $filter) {\n $filterWithoutAcceptedArguments = array_slice($filter, 0, 3);\n call_user_func_array($this->removeCallback, $filterWithoutAcceptedArguments);\n }\n }",
"public function clearRecentActivitys()\n\t{\n\t\t$this->collRecentActivitys = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function unsetFileAndFolderNameFilters() {}",
"public static function clear_all() {\n\t\tstatic::$cache = array();\n\t\tstatic::$mapping = array();\n\t}",
"function reset_filters()\r\n{\r\n\t//uitzoeken of het in js of php gedaan word\t\r\n}",
"public function clearResources()\n {\n AM_Tools::clearContent($this->_getIssueHelpPage()->getThumbnailPresetType(), $this->_getIssueHelpPage()->id_issue);\n AM_Tools::clearResizerCache($this->_getIssueHelpPage()->getThumbnailPresetType(), $this->_getIssueHelpPage()->id_issue);\n }",
"public function clearAll()\n {\n }",
"public function clear(): void\n {\n $this->periods = [];\n }",
"public function clearAllParameters()\n {\n $this->clearModule();\n $this->clearStartDate();\n $this->clearEndDate();\n $this->clearCategories();\n $this->clearLocations();\n $this->clearKeyword();\n }",
"public function clear_all()\n {\n }",
"public function clearFailed()\n {\n $this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_FETCH_FAILED);\n $this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_PARSE_ERROR);\n $this->getLogger()->debug('Cleared \"failed\" and \"not-parsed\" filters');\n }",
"public function clear(): void\n {\n $this->collectionStatsById = [];\n $this->proxyStatsByClass = [];\n }",
"public function clearAll(){\n\n }",
"public function clearOperationScenariis()\n {\n $this->collOperationScenariis = null; // important to set this to null since that means it is uninitialized\n $this->collOperationScenariisPartial = null;\n\n return $this;\n }",
"public function cleanInvalidScheduleAction(){\n \t$sql = new Frogg_Db_Sql('SELECT `rage_id` FROM `newseries` WHERE `flag` = '.Application_Model_NewSeries::INVALID);\n \t$ids = array();\n \tif($sql->rows()){\n \t\twhile($row=$sql->fetch()){\n \t\t\tarray_push($ids, $row['rage_id']);\n \t\t}\n \t}\n \t$ids = implode(',', $ids);\n \t\n \t$sql = new Frogg_Db_Sql('DELETE FROM `scheduled` WHERE `rage_id` IN ('.$ids.')');\n \tdie;\n }",
"public function unsetScheduler() {}",
"public function clearItems();",
"private function clear(): void\n {\n $this->centralDirectoryRecords = [];\n $this->offset = 0;\n\n if($this->operationMode === OperationMode::NORMAL) {\n $this->ready = false;\n $this->recordedSimulation = [];\n } else {\n $this->operationMode = OperationMode::NORMAL;\n }\n }",
"protected function clear() {}",
"public function clearCondition(){\n\t\t$this->where=\"\";\n\t}",
"public function clearEvents()\n {\n $this->recorded = [];\n }",
"public function clear() {}",
"public function clear() {}",
"public function clear() {}",
"public function clear() {}",
"public function clear_scheduled_export() {\n\n\t\twp_clear_scheduled_hook( 'wc_customer_order_csv_export_auto_export_orders' );\n\t}",
"function clean_permissions_cache() {\n cache_remove_by_pattern('visible_types_filter_for_*');\n \tcache_remove_by_pattern('visible_project_types_filter_for_*');\n \tcache_remove_by_pattern('visible_project_types_for_*');\n }",
"public static function clearCache() {\n static::$cachedChecks = [];\n }",
"public function applyQueuedFilters()\n {\n foreach ($this->queuedFilters as $filter) {\n $this->filter($filter['className'], $filter['parameters']);\n }\n $this->queuedFilters = array();\n }",
"public static function clear()\n {\n self::$actionList = new \\SplPriorityQueue();\n self::$errors = [];\n self::$warnings = [];\n }",
"public function clearPesquisas()\n\t{\n\t\t$this->collPesquisas = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function clear(): void\n {\n $this->transactionsByUserAndType = [];\n }",
"public static function wpapp_clear_scheduled_events() {\n\t\twp_clear_scheduled_hook( 'wpcd_wordpress_file_watcher' );\n\t\twp_clear_scheduled_hook( 'wpcd_wordpress_deferred_actions_for_server' );\n\t\twp_clear_scheduled_hook( 'wpcd_wordpress_deferred_actions_for_apps' );\n\t}",
"public function clearOffensives()\n\t{\n\t\t$this->collOffensives = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function reset()\n {\n $this->values[self::_USE_TIMES] = null;\n $this->values[self::_REWARDS] = array();\n $this->values[self::_TIMES] = null;\n }",
"public static function clear_queued_actions() {\n\t\t$store = \\ActionScheduler::store();\n\n\t\tif ( is_a( $store, 'Automattic\\WooCommerce\\Admin\\Overrides\\WPPostStore' ) ) {\n\t\t\t// If we're using our data store, call our bespoke deletion method.\n\t\t\t$action_types = array( self::UNSNOOZE_HOOK );\n\t\t\t$store->clear_pending_wcadmin_actions( $action_types );\n\t\t} else {\n\t\t\tself::queue()->cancel_all( null, array(), self::QUEUE_GROUP );\n\t\t}\n\t}",
"function removeAll() ;",
"function removeAll() ;",
"public static function clearOutput(): void\n {\n rex_extension::register('OUTPUT_FILTER', static function (rex_extension_point $ep) {\n $ep->setSubject(false);\n });\n }",
"public final function resetFilter()\n {\n $this->filter = '';\n $this->param = array();\n return $this;\n }",
"public function clearActions()\n {\n $this->collActions = null; // important to set this to null since that means it is uninitialized\n $this->collActionsPartial = null;\n\n return $this;\n }",
"public function clearContributionss()\n {\n $this->collContributionss = null; // important to set this to NULL since that means it is uninitialized\n }",
"public function unmarkAllExecutions() {}",
"public function clearRecordedEvents()\n {\n $this->latestRecordedEvents = [];\n }",
"public static function removeAll(){\n\n foreach(static::all() as $key => $value){\n static::remove($key);\n }\n }",
"public function clear_rate_limit()\n {\n }",
"public function clearAll() {\n $this->param = array();\n $this->method_map = array();\n $this->response = NULL;\n $this->query = '';\n }",
"public function resetReportStatuses()\n {\n foreach ($this->options as $op => $junk) {\n if (preg_match('#ReportProcessingStatusList#', $op)) {\n unset($this->options[$op]);\n }\n }\n }",
"public function clearVenueratings()\n\t{\n\t\t$this->collVenueratings = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"function remove_all_filters($hook_name, $priority = \\false)\n {\n }",
"private function applyFilters()\n {\n $availableOptions = ['name', 'method', 'uri', 'action', 'middleware'];\n foreach ($this->options() as $key => $option) {\n if (in_array($key, $availableOptions) && null != $option) {\n foreach ($this->routes as $index => $route) {\n if (!str_contains(strtolower($route[$key]), strtolower($option)))\n unset($this->routes[$index]);\n }\n }\n }\n }",
"public function removeFilter(string $name): void;",
"public function clearSolicitacaoResgatesRelatedBySolicitanteId()\n\t{\n\t\t$this->collSolicitacaoResgatesRelatedBySolicitanteId = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function reset()\n {\n $this->values[self::_REWARDS] = array();\n }",
"public function clearSubscribers();",
"public function cancelAllMonitors () {\n $this->callMethod( 'cancelAllMonitors');\n $this->_handlersMonitorFile = array();\n }"
] | [
"0.6856936",
"0.67182255",
"0.6621482",
"0.6518339",
"0.6444722",
"0.63463163",
"0.62133527",
"0.6200486",
"0.6138635",
"0.60996115",
"0.602172",
"0.59422934",
"0.59174",
"0.59133786",
"0.582702",
"0.5820791",
"0.57783026",
"0.5776156",
"0.57720166",
"0.57356787",
"0.57250774",
"0.5712686",
"0.56837404",
"0.563148",
"0.563148",
"0.562984",
"0.56255805",
"0.5621398",
"0.56016403",
"0.55969465",
"0.5587735",
"0.5575739",
"0.5560754",
"0.55382633",
"0.55118984",
"0.5501769",
"0.5501769",
"0.5501769",
"0.5501769",
"0.55016434",
"0.55016434",
"0.54833466",
"0.54703736",
"0.5466006",
"0.5464463",
"0.545281",
"0.5445033",
"0.54386723",
"0.54378057",
"0.5431806",
"0.5426138",
"0.54213136",
"0.54159266",
"0.54079294",
"0.5407382",
"0.5406261",
"0.54056954",
"0.5398796",
"0.5379255",
"0.5366015",
"0.53548074",
"0.5343652",
"0.5338366",
"0.5327082",
"0.53266925",
"0.5323408",
"0.5323408",
"0.5323408",
"0.5323408",
"0.5322691",
"0.5322289",
"0.530833",
"0.5306599",
"0.5296295",
"0.52941585",
"0.52918917",
"0.52884215",
"0.5284516",
"0.5263481",
"0.5262953",
"0.5262273",
"0.5262273",
"0.52603316",
"0.52599543",
"0.5256657",
"0.52499926",
"0.52498907",
"0.5249011",
"0.5248868",
"0.5247925",
"0.5245867",
"0.52394795",
"0.52390754",
"0.5236058",
"0.52335155",
"0.5227299",
"0.5224987",
"0.5218949",
"0.52152133",
"0.52150494"
] | 0.80476165 | 0 |
Clear information about successfully scraped Resources | public function clearSuccessful()
{
$this->getFilter()->clear($this->getProject() . 'parsed');
$this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_SUCCESS);
$this->getLogger()->debug('Cleared "visited" and "scheduled" filters');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function clearResults() {\n\t\t$this->error = '';\n\t\t$this->status_org = false;\n\t\t$this->status_new = false;\n\t}",
"public function reset() {\n $this->customurlscount = 0;\n }",
"public function clear()\n {\n $this->links = [];\n }",
"protected function clear()\n {\n $this->error = '';\n $this->success = false;\n }",
"public function clearResources()\n {\n AM_Tools::clearContent($this->_getIssueHelpPage()->getThumbnailPresetType(), $this->_getIssueHelpPage()->id_issue);\n AM_Tools::clearResizerCache($this->_getIssueHelpPage()->getThumbnailPresetType(), $this->_getIssueHelpPage()->id_issue);\n }",
"public function clear()\n\t{\n\t\t$this->xResponse = null;\n\t}",
"public function clear()\n {\n $this->_headers = null;\n $this->_cookies = null;\n $this->_statusCode = 200;\n $this->statusText = 'OK';\n $this->data = null;\n $this->stream = null;\n $this->content = null;\n $this->isSent = false;\n $this->swoole = null;\n }",
"public function clear()\n\t{\n\t\t$this->uniqid = '';\n\t\t$this->base_url = '';\n\t\t$this->no_result = '';\n\t\t$this->pagination_tmpl = '';\n\n\t\t$this->sort = array();\n\t\t$this->column_config = array();\n\n\t\t$this->jq_template = FALSE;\n\n\t\t$this->rows\t\t\t\t= array();\n\t\t$this->heading\t\t\t= array();\n\t\t$this->auto_heading\t\t= TRUE;\n\t}",
"private function _clearCache()\n {\n Cache::forget(\"roaddamage-resource:{$this->id}\");\n foreach ($this->getReports() as $report) {\n Cache::forget(\"report-resource:{$report->id}\");\n }\n }",
"public function reset_scan() {\r\n\t\tdelete_transient( self::IS_SCANNING_SLUG );\r\n\t\tdelete_option( self::IS_SCANNED_SLUG );\r\n\t\tdelete_option( self::CURRENT_STEP );\r\n\t\tdelete_option( self::CLEAR_CACHE_NOTICE );\r\n\t\t$this->refresh_status();\r\n\t}",
"public static function reset()\n\t{\n\t\tstatic::$returnSize = 1048576;\n\t\tstatic::$reportedSize = 1048576;\n\t\tstatic::$url = 'http://www.example.com/donwload.dat';\n\t\tstatic::$errno = 0;\n\t\tstatic::$error = '';\n\t\tstatic::$httpstatus = 200;\n\t}",
"public function clearResults()\n {\n $this->_return = null;\n }",
"public function reset() {\n\t\t$this->userAgent = 'cURL Class by Kelly Becker';\n\t\t$this->cookieJar = '/tmp/cookies.txt';\n\t\t$this->postData = array();\n\t\t$this->saveFile = false;\n\t\t$this->opts = array();\n\t}",
"public function reset(): void{\n curl_reset($this->handler);\n }",
"private function reset()\r\n {\r\n $this->last_response = null;\r\n $this->last_request = null;\r\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_SERVER_INFO] = array();\n }",
"public function clear()\n\t{\n\t\t$this->pages = [];\n\t}",
"public function clearAll() {\n $this->param = array();\n $this->method_map = array();\n $this->response = NULL;\n $this->query = '';\n }",
"public function clearResponse()\n {\n $this->responseContent = '';\n $this->responseHeader = array();\n $this->responseCode = '200 Ok';\n }",
"public function cleanup()\n\t{\n\t\tif ($this->isHtml())\n\t\t{\n\t\t\t$responseBody = preg_replace('/<link rel=[\"\\' ](pingback|alternate|EditURI|wlwmanifest|index|profile|prev)[\"\\' ](.*?)>/si', '', $this->getResponseBody());\n\t\t\t$responseBody = preg_replace('/<meta name=[\"\\' ]generator[\"\\' ](.*?)>/si', '', $responseBody);\n\t\t\t$this->setResponseBody($responseBody);\n\t\t}\n\t}",
"function reset(){\n curl_setopt($this-> ch, CURLOPT_USERAGENT, \"Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; InfoPath.3; rv:11.0) like Gecko\"); //\"kind spider\"\n curl_setopt($this-> ch, CURLOPT_COOKIEJAR, \"./cookie.txt\");\n curl_setopt($this-> ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($this-> ch, CURLOPT_TIMEOUT, 120);\n }",
"public function reset() {\n $this->values[self::IS_SUPPORTED] = null;\n $this->values[self::URL] = null;\n }",
"public function clearCache() {\n\t\tYii::app()->user->setState('nlsLoadedResources', array());\n\t}",
"protected function clear() {}",
"public function clearFailed()\n {\n $this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_FETCH_FAILED);\n $this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_PARSE_ERROR);\n $this->getLogger()->debug('Cleared \"failed\" and \"not-parsed\" filters');\n }",
"private function resetResults() {\n $this->results = array();\n }",
"function clear()\n {\n $this->meta_name = \"\";\n $this->vocab = \"\";\n $this->text = \"\";\n $this->lang = \"\";\n $this->attrs = array();\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_INFO] = null;\n }",
"public function clearFinished();",
"public function clearRespostaForums()\n\t{\n\t\t$this->collRespostaForums = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function reset() {\r\n $this->header = [];\r\n $this->cookie = [];\r\n $this->content = NULL;\r\n }",
"public function reset()\n {\n $this->returnedFiles = [];\n }",
"public function reset()\n {\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_OPPOS] = array();\n $this->values[self::_IS_ROBOT] = null;\n }",
"public function reset()\n {\n $this->values[self::URL] = null;\n $this->values[self::MIMETYPE] = null;\n $this->values[self::NAME] = null;\n $this->values[self::LENGTH] = null;\n $this->values[self::SHA256] = null;\n $this->values[self::PAGES] = null;\n $this->values[self::REFKEY] = null;\n $this->values[self::FILENAME] = null;\n $this->values[self::THUMBNAIL] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_UIN] = null;\n $this->values[self::_ACCESS_TOKEN] = null;\n $this->values[self::_RECHARGE_URL] = null;\n }",
"public static function clear() \n\t\t{\n\t\t\tSite_CacheManager::flush('page');\n\t\t}",
"protected function cleanup()\n {\n $this->currentRule = '';\n $this->currentUserAgent = self::USER_AGENT;\n }",
"protected function reset()\n {\n $this->uri = \"\";\n $this->contentType = \"application/json\";\n $this->acceptContentType = \"application/json\";\n $this->method = \"GET\";\n $this->apiType = self::API_TYPE_SPACES;\n $this->cacheResponse = false;\n $this->requestBody = null;\n $this->geojsonFile = null;\n }",
"protected function clear()\n {\n $this->optionManager->clear();\n $this->headerManager->clear();\n $this->cookies = [];\n $this->files = [];\n }",
"function reset() {\n Ad::resetCounter();\n unset($_GET['reset']);\n }",
"function reset_data() {\n\t\t$this->data_layer()->clear();\n\t\t$this->log = null;\n\t\t$this->location = null;\n\t\t$this->tax_location = null;\n\t}",
"protected function resetStatuses()\n {\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_READY));\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_BUSY));\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_FAILED));\n }",
"public function clearCheckInformations()\n\t{\n\t\t$this->collCheckInformations = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function resetCaches() {\n $this->datasource = NULL;\n $this->server_object = NULL;\n $this->callbacks = NULL;\n $this->processors = NULL;\n $this->added_properties = NULL;\n $this->fields = array();\n $this->fulltext_fields = array();\n }",
"public function reset()\n {\n $this->values[self::URL] = null;\n $this->values[self::MIMETYPE] = null;\n $this->values[self::SHA256] = null;\n $this->values[self::LENGTH] = null;\n $this->values[self::SECONDS] = null;\n $this->values[self::REFKEY] = null;\n $this->values[self::THUMBNAIL] = null;\n $this->values[self::CAPTION] = null;\n }",
"public function finishedCrawling()\n {\n $this->log->info('link checker summary');\n\n collect($this->urlsGroupedByStatusCode)\n ->each(function ($urls, $statusCode) {\n if ($this->isSuccessOrRedirect($statusCode)) {\n return;\n }\n\n $count = count($urls);\n\n if ($statusCode == static::UNRESPONSIVE_HOST) {\n $this->log->warning(\"{$count} url(s) did have unresponsive host(s)\");\n\n return;\n }\n\n $this->log->warning(\"Crawled {$count} url(s) with statuscode {$statusCode}\");\n });\n }",
"public static function reset()\n {\n self::$SEO = [];\n self::$Imagens = [];\n self::$Videos = [];\n self::$Sounds = [];\n self::$CSS = [];\n self::$JS = [];\n }",
"private function resetAll()\n {\n $this->title = null;\n $this->caption = null;\n $this->categories = null;\n $this->image = null;\n $this->tags = null;\n $this->imagePath = null;\n $this->postId = null;\n }",
"private function clear_variable()\n\t\t{\n\t\t\t$this->count_item_found = 'none';\t\t\t\t\t\t\t\t\t// No item found\n\t\t\t$this->fulllistexpand = Array();\t\t\t\t\t\t\t\t\t// No item list to expand\n\t\t\t$this->sqllistinvolved = '';\t\t\t\t\t\t\t\t\t\t// ??? TODO\n\t\t\t$this->listinvolved = Array();\n\t\t\t$this->html_result = '';\n\t\t}",
"protected function _clearAndOutput() {}",
"public function deleteAllResources() {\n\t\t$this->resources = array();\n\t}",
"public function unsetAll()\n {\n parent::unsetAll();\n $this->_quoteId = null;\n $this->_response = null;\n $this->_redirectMessage = null;\n $this->_redirectTitle = null;\n }",
"public function clear() {\n header( \"Location:\" . $this->url() );\n }",
"function reset()\n {\n $this->_cookies = array();\n }",
"protected function reset() {}",
"protected function reset() {}",
"protected function reset() {}",
"function Reset()\n\t{\t$this->details = array();\n\t\t$this->courses = array();\n\t\t$this->id = 0;\n\t}",
"public function clearResult() {\n $this->_dataHandler->clearResult();\n }",
"public function clearPageCacheContent() {}",
"public function cleanup() {\n $this->object->removeLock();\n $this->clearCache();\n\n $returnArray = $this->object->get(array_diff(array_keys($this->object->_fields), array('content','ta','introtext','description','link_attributes','pagetitle','longtitle','menutitle','articles_container_settings','properties')));\n foreach ($returnArray as $k => $v) {\n if (strpos($k,'tv') === 0) {\n unset($returnArray[$k]);\n }\n if (strpos($k,'setting_') === 0) {\n unset($returnArray[$k]);\n }\n }\n $returnArray['class_key'] = $this->object->get('class_key');\n $this->workingContext->prepare(true);\n $returnArray['preview_url'] = $this->modx->makeUrl($this->object->get('id'), $this->object->get('context_key'), '', 'full');\n return $this->success('',$returnArray);\n }",
"function erase_response() {\n $this->performed = FALSE;\n $this->response = new Trails_Response();\n }",
"public function reset()\n {\n $this->env = array();\n $this->object_handlers = array();\n $this->pagetitle = '';\n }",
"public function reset()\n {\n $this->values[self::contractorstatics] = null;\n $this->values[self::stores] = array();\n $this->values[self::visited] = array();\n $this->values[self::review_info] = array();\n $this->values[self::customer_info] = array();\n $this->values[self::mark_price_info] = array();\n $this->values[self::more_url] = null;\n $this->values[self::order_tracking] = array();\n }",
"function clear(){\n \t\t$this->result = array();\n \t}",
"public function clearAvaliacaoRespostaForums()\n\t{\n\t\t$this->collAvaliacaoRespostaForums = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function clean() {\n\t\t\tif( !$items = $this->getStats( 'items' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$memcache = $this->getMemcache();\n\t\t\tforeach( $items['items'] as $key => $item ) {\n\t\t\t\t$dump = $memcache->getStats( 'cachedump', $key, $item['number'] * 2 );\n\t\t\t\tforeach( array_keys( $dump ) as $ckey ) {\n\t\t\t\t\t$memcache->get( $ckey );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->stats = null;\n\t\t}",
"public function clear() {}",
"public function clear() {}",
"public function clear() {}",
"public function clear() {}",
"public function clearCampaignLinks()\n\t{\n\t\t$this->collCampaignLinks = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function clear() {\n\t\t$this->expected_query = '';\n\t}",
"public function reset()\n {\n $this->values[self::_WORLDCUP_QUERY_REPLY] = null;\n $this->values[self::_WORLDCUP_SUBMIT_REPLY] = null;\n }",
"public function clear_all()\n {\n }",
"public function clearCache()\n {\n if ($this->clear_cache && !empty($this->pageinfo)) {\n $dataHandler = GeneralUtility::makeInstance(DataHandler::class);\n $dataHandler->start([], []);\n $dataHandler->clear_cacheCmd($this->id);\n }\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_HERO] = null;\n $this->values[self::_ITEMS] = array();\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_REWARDS] = array();\n }",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();"
] | [
"0.6807971",
"0.67776424",
"0.6368299",
"0.63516873",
"0.6311707",
"0.62992465",
"0.61869085",
"0.61595553",
"0.61553645",
"0.6148001",
"0.61352545",
"0.60948133",
"0.60750455",
"0.6059821",
"0.6035029",
"0.602861",
"0.6008798",
"0.5999856",
"0.59837186",
"0.59738886",
"0.59656423",
"0.5955144",
"0.5934868",
"0.59343123",
"0.5920446",
"0.58839595",
"0.58644205",
"0.5857513",
"0.5841328",
"0.58036286",
"0.5802332",
"0.57918954",
"0.57721037",
"0.5764811",
"0.5762772",
"0.5749619",
"0.5730168",
"0.57266974",
"0.57249016",
"0.5724599",
"0.57109934",
"0.56853896",
"0.5685383",
"0.5678153",
"0.5677386",
"0.56753445",
"0.5671818",
"0.56651235",
"0.5663796",
"0.5661617",
"0.56573623",
"0.5655877",
"0.5651075",
"0.5650523",
"0.5643921",
"0.56436604",
"0.5642371",
"0.5635062",
"0.56335175",
"0.56090766",
"0.5601791",
"0.5601704",
"0.55967784",
"0.55925137",
"0.558933",
"0.558398",
"0.5571799",
"0.5562735",
"0.5562735",
"0.5562735",
"0.5562735",
"0.55622345",
"0.5560198",
"0.5553923",
"0.5551948",
"0.55469245",
"0.55439097",
"0.5542929",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104",
"0.5539104"
] | 0.6072769 | 13 |
Clear information about failed Resources | public function clearFailed()
{
$this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_FETCH_FAILED);
$this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_PARSE_ERROR);
$this->getLogger()->debug('Cleared "failed" and "not-parsed" filters');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function clearResources()\n {\n AM_Tools::clearContent($this->_getIssueHelpPage()->getThumbnailPresetType(), $this->_getIssueHelpPage()->id_issue);\n AM_Tools::clearResizerCache($this->_getIssueHelpPage()->getThumbnailPresetType(), $this->_getIssueHelpPage()->id_issue);\n }",
"function ClearError() \r\n{ \r\n$this->LastError = null; \r\n}",
"public function deleteAllResources() {\n\t\t$this->resources = array();\n\t}",
"protected function clearResults() {\n\t\t$this->error = '';\n\t\t$this->status_org = false;\n\t\t$this->status_new = false;\n\t}",
"public function clearErrors() {\n $this->errorCodes = [];\n }",
"public function clear() {\n $this->_errors = array();\n }",
"protected function clear()\n {\n $this->error = '';\n $this->success = false;\n }",
"public function clearFailedValidationData()\n {\n FormUtil::clearValidationFailedObjects($this->_objPath);\n }",
"public function clearExceptions()\r\r\n {\r\r\n $this->exceptions = array();\r\r\n }",
"public function clearError() {\n $this->errors = array();\n }",
"public function reset()\n {\n $this->values[self::_INFO] = null;\n $this->values[self::_EXIT] = Down_ErrorInfo_Exit::noneed;\n }",
"protected function clearError()\n {\n $this->lastError = null;\n }",
"public function reset()\n {\n $this->errors = array();\n }",
"public function resetErrors() {}",
"public function clearErrors()\n {\n $this->errors = array();\n }",
"public function clearErrors()\n {\n $this->errorMessages = [];\n }",
"public function clearErrors() {\n $this->fErrors = Array();\n }",
"public function reset()\n {\n $this->values[self::ERRMSG] = null;\n $this->values[self::RET] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_SERVER_INFO] = array();\n }",
"public function clearErrors()\n {\n $this->errors = [];\n }",
"public function cleanup() {\r\n\t\t$this->resource->cleanup();\r\n\t}",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_INFO] = null;\n }",
"public function clean() {\n $this->requires = array();\n $this->getResource()->clear();\n }",
"private function resetErrors() {\n $this->errors = array();\n }",
"public function clearCache() {\n\t\tYii::app()->user->setState('nlsLoadedResources', array());\n\t}",
"public function clearCheckInformations()\n\t{\n\t\t$this->collCheckInformations = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function reset() {\n $this->values[self::ERROR] = null;\n $this->values[self::LINE_INFO_LIST] = array();\n $this->values[self::TICKET_ORDER_INFO] = null;\n }",
"public static function clearCapturedErrors() {\n self::$capturedErrors = array();\n }",
"public function reset() {\n $this->values[self::ERR_NO] = null;\n $this->values[self::ERR_MSG] = null;\n $this->values[self::CONTENTS] = array();\n }",
"protected function resetErrors() {\n $this->errors = array();\n }",
"function resetErrorList(){\n\t\t$this->_errorList = array();\n\t}",
"private function _clearCache()\n {\n Cache::forget(\"roaddamage-resource:{$this->id}\");\n foreach ($this->getReports() as $report) {\n Cache::forget(\"report-resource:{$report->id}\");\n }\n }",
"private function reset()\r\n {\r\n $this->last_response = null;\r\n $this->last_request = null;\r\n }",
"public function __destruct() {\n\t\t\tparent::__destruct();\n\t\t\tunset($this->resource);\n\t\t\tunset($this->methods);\n\t\t\tunset($this->name);\n\t\t}",
"public function reset() : void\n {\n $this->_modified = [];\n $this->_errors = [];\n }",
"protected function reset()\n {\n $this->lastRequest = null;\n $this->lastResponse = null;\n $this->lastException = null;\n }",
"function destructor()\n\t{\n\t\tunset($Resources,$FileName,$FileType,$FileSize,$NumRes,$FileVersion,$Description,$DataOffset);\n\t}",
"function resetErrorData()\n {\n $this->errorData = array();\n }",
"function restablecer()\n {\n $this->_datos = null;\n $this->_errores = array();\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_EXCAVATE] = null;\n }",
"public function reset()\n {\n // clear cache\n $this->pdc->del_prefix('portal.module.realmstatus');\n }",
"public function reset(): void\n {\n $this->issues = [];\n }",
"private function clearLog() {\n $this -> log = array();\n $this -> log[\"success\"] = array();\n $this -> log[\"failure\"] = array();\n }",
"public function clear()\n {\n $this->missingRoles = [];\n }",
"public function reset()\n {\n $this->values[self::_INFO] = null;\n }",
"public function purgeViolations()\n {\n $this->violations = [];\n }",
"public function reset()\n {\n $this->values[self::STATE] = null;\n $this->values[self::RESULT] = null;\n $this->values[self::ERR] = null;\n $this->values[self::IP] = null;\n $this->values[self::STATUS] = null;\n }",
"public function free()\n\t{\n\t\tunset($this->resResult);\n\t}",
"public function reset() /*void*/\n {\n foreach(array_keys($_SESSION[self::KEY]) as $key)\n {\n unset($_SESSION[self::KEY][$key]);\n }\n $_SESSION[self::ERRORS] = array();\n $this->notice(null);\n }",
"public function reset()\n {\n $this->values[self::_STATUS] = null;\n $this->values[self::_REWARDS] = array();\n }",
"public static function destroy(){\n if( $notices = self::$singleton ){\n $buffer = $notices->errors;\n $notices->errors = array();\n self::$singleton = null;\n return $buffer;\n }\n return array();\n }",
"public function reset()\n {\n setResult(self::UNKNOWN);\n }",
"public function reset()\n {\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_RESULT] = null;\n $this->values[self::_REWARDS] = array();\n $this->values[self::_APPLY_REWARDS] = array();\n $this->values[self::_STAGE_OLD_PROGRESS] = null;\n $this->values[self::_JOIN_TIMES] = null;\n $this->values[self::_BREAK_HISTORY] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_NEW_MAN] = null;\n }",
"public function reset()\n {\n $this->values[self::STATUS] = null;\n $this->values[self::ERRORS] = array();\n $this->values[self::VALIDATOR_REVISION] = self::$fields[self::VALIDATOR_REVISION]['default'];\n $this->values[self::SPEC_FILE_REVISION] = self::$fields[self::SPEC_FILE_REVISION]['default'];\n $this->values[self::TRANSFORMER_VERSION] = self::$fields[self::TRANSFORMER_VERSION]['default'];\n $this->values[self::TYPE_IDENTIFIER] = array();\n $this->values[self::VALUE_SET_PROVISIONS] = array();\n $this->values[self::VALUE_SET_REQUIREMENTS] = array();\n }",
"public function cleanup() {\r\n $this->clearCache();\r\n $fields = array('id', 'description', 'locked', 'category');\r\n array_push($fields,($this->classKey == 'modTemplate' ? 'templatename' : 'name'));\r\n return $this->success('',$this->object->get($fields));\r\n }",
"function reset_error_log() {\n $this->error_count = 0;\n $this->error_log = array();\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_UIN] = null;\n $this->values[self::_ACCESS_TOKEN] = null;\n $this->values[self::_RECHARGE_URL] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_GUILD_INFO] = null;\n }",
"function free_result()\n {\n if ($this->res_result) {\n @isis_free_result($this->res_result);\n }\n }",
"public function __destruct() {\n exit((int)$this->_failed);\n }",
"static public function reset() {\r\n\t\t\tself::$i10n = array(\r\n\t\t\t\t'empty_search' => __( 'Nothing found', 'wpmudev' ),\r\n\t\t\t\t'default_msg_ok' => __( 'Okay, we saved your changes!', 'wpmudev' ),\r\n\t\t\t\t'default_msg_err' => __( 'Oops, we could not do this...', 'wpmudev' ),\r\n\t\t\t);\r\n\t\t}",
"public function destroy()\n {\n $this->_info = new stdClass();\n if( is_resource($this->_resource) )\n {\n imagedestroy($this->_resource);\n }\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_REWARDS] = array();\n }",
"public function reset()\n {\n $this->values[self::_INFO] = null;\n $this->values[self::_ADDR] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_STAGE_ID] = null;\n $this->values[self::_REWARDS] = array();\n $this->values[self::_HEROES] = array();\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_APP_QUEUE] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_APP_QUEUE] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_GS] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_GS] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_USER] = null;\n $this->values[self::_TIME_ZONE] = null;\n }",
"public static function clear()\n {\n AlertCollection::getInstance()->clear();\n }",
"protected function resetStatuses()\n {\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_READY));\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_BUSY));\n $this->pubDirectory->delete($this->getRelativeFilePath(self::IMPORT_STATUS_FAILED));\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CONTENTS] = array();\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CONTENTS] = array();\n }",
"public function __destruct()\n\t{\n\t\tif ( ! $this->enable_debug)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! empty($this->errors))\n\t\t{\n\t\t\tforeach ($this->errors as $key => $e)\n\t\t\t{\n\t\t\t\techo '<pre>'.$e.'</pre>';\n\t\t\t}\n\t\t}\n\t}",
"protected function reset() {}",
"protected function reset() {}",
"protected function reset() {}",
"private function clearDataBuffer( )\n {\n $this->data_buffer = array( );\n $this->err_message = '';\n }",
"public function reset()\n {\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_PASS_TIME] = null;\n }",
"private function reset_internal() {\n\t\t$this->started = false;\n\t\t$this->failed = false;\n\t\t$this->querys = array();\n\t\t$this->querys_info = array();\n\t\t$this->querys_info['exec_times'] = array();\n\t\t$this->querys_info['explain_results'] = array();\n\t}",
"public function emptyErrorBag() {\n\t\t$this->errorBag = [];\n\t}",
"public function failed()\n {\n // Do nothing\n }",
"public function clearPanic() {\n $this->execute('panic.clear');\n }",
"public function clearSuccessful()\n {\n $this->getFilter()->clear($this->getProject() . 'parsed');\n $this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_SUCCESS);\n $this->getLogger()->debug('Cleared \"visited\" and \"scheduled\" filters');\n }",
"public function clear()\n\t{\n\t\t$this->xResponse = null;\n\t}",
"public function actionClear()\n {\n //DELETE from xm_report_exam_question where user_id = 3181;\n //DELETE from xm_report_error_question where user_id = 3181;\n //DELETE from xm_report_task where user_id = 3181;\n //DELETE from xm_report_task_detail where user_id = 3181;\n //DELETE from xm_user_rate where uid = 3181;\n //DELETE from xm_report_user_data where user_id = 3181;\n $userId = Yii::$app->request->get('uid');\n Yii::$app->db->createCommand()->delete('xm_report_exam', \"user_id = {$userId}\")->execute();\n Yii::$app->db->createCommand()->delete('xm_report_exam_question', \"user_id = {$userId}\")->execute();\n Yii::$app->db->createCommand()->delete('xm_report_error_question', \"user_id = {$userId}\")->execute();\n Yii::$app->db->createCommand()->delete('xm_report_task', \"user_id = {$userId}\")->execute();\n Yii::$app->db->createCommand()->delete('xm_report_task_detail', \"user_id = {$userId}\")->execute();\n Yii::$app->db->createCommand()->delete('xm_user_rate', \"uid = {$userId}\")->execute();\n Yii::$app->db->createCommand()->delete('xm_report_user_data', \"user_id = {$userId}\")->execute();\n RedisService::deleteKey('wrong_record_uid_'.$userId);\n return $this -> success();\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_RAID_ID] = null;\n $this->values[self::_LEFT_TIME] = null;\n }",
"private function reset()\n {\n $this->human->reset();\n $this->machine->reset();\n $this->memory->reset();\n }",
"public function cleanup()\n {\n }",
"public static function clear()\n {\n self::$actionList = new \\SplPriorityQueue();\n self::$errors = [];\n self::$warnings = [];\n }",
"public function reset()\n {\n $this->values[self::_CURRENT_RAID_ID] = null;\n $this->values[self::_SUMMARY] = array();\n $this->values[self::_STAGE_PASS] = null;\n $this->values[self::_IS_CAN_JUMP] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_HERO] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_HERO] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_HERO] = null;\n }",
"public function cleanup() {\n\t\t//TODO\n\t}",
"public function reset()\n {\n $this->values[self::RET] = null;\n $this->values[self::CMDLIST] = null;\n $this->values[self::CONTINUEFLAG] = null;\n $this->values[self::SYNC_KEY] = null;\n $this->values[self::STATUS] = null;\n $this->values[self::ONLINEVERSION] = null;\n $this->values[self::SVRTIME] = null;\n }",
"public function reset_errors() {\n\t\t$this->errors = new WP_Error();\n\t}",
"public function reset()\n {\n $this->env = array();\n $this->object_handlers = array();\n $this->pagetitle = '';\n }"
] | [
"0.6565199",
"0.628577",
"0.62834895",
"0.6246545",
"0.6156242",
"0.6129662",
"0.60088646",
"0.6005085",
"0.5969712",
"0.5968586",
"0.59132165",
"0.5900586",
"0.58962953",
"0.58950144",
"0.58742803",
"0.5871748",
"0.58457834",
"0.58330554",
"0.5825198",
"0.5788923",
"0.57458097",
"0.57396716",
"0.5726846",
"0.5657458",
"0.56282103",
"0.5589337",
"0.55627394",
"0.5561872",
"0.5561467",
"0.5535584",
"0.55275404",
"0.55135256",
"0.55109555",
"0.5445763",
"0.5444365",
"0.5443376",
"0.5441446",
"0.5433072",
"0.54205656",
"0.54123616",
"0.5404175",
"0.5402839",
"0.5387989",
"0.538716",
"0.5386004",
"0.53840816",
"0.5371095",
"0.53649044",
"0.53466034",
"0.5340426",
"0.53330183",
"0.5329176",
"0.53273284",
"0.5312645",
"0.53065836",
"0.5304135",
"0.5303866",
"0.52672714",
"0.52633697",
"0.5258597",
"0.5250054",
"0.5241156",
"0.52348125",
"0.5234146",
"0.5223038",
"0.5214535",
"0.5213597",
"0.521323",
"0.52121943",
"0.52121943",
"0.5206524",
"0.5199797",
"0.5199442",
"0.5182474",
"0.51821506",
"0.5175197",
"0.51726174",
"0.517209",
"0.51711994",
"0.5170104",
"0.51668847",
"0.5166742",
"0.51626074",
"0.5161354",
"0.5158399",
"0.51549774",
"0.51535124",
"0.515192",
"0.5138412",
"0.51377714",
"0.51368535",
"0.5136533",
"0.51349586",
"0.5129785",
"0.5129785",
"0.5129785",
"0.51265675",
"0.51231235",
"0.5123079",
"0.51204073"
] | 0.6658006 | 0 |
Instantiates a new instance of this class. This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton. | public static function create(ContainerInterface $container)
{
return new static($container->get('some-value'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function factory()\n {\n return new self;\n }",
"public static function create() {\n\t\treturn new self();\n\t}",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function createInstance()\n {\n return new self();\n }",
"public static function create() {\n return new self();\n }",
"public static function create(): self\n {\n return new self();\n }",
"public static function create(): self\n {\n return new self();\n }",
"public static function create()\n\t\t{\n\t\t\treturn new self();\n\t\t}",
"public static function create()\n\t{\n\t\treturn new self;\n\t}",
"public function newInstance()\n {\n return new self();\n }",
"public static function newInstance()\n {\n $instance = new self;\n return $instance;\n }",
"public static function init()\n {\n return new self();\n }",
"public static function make() {\n return new self();\n }",
"public static function factory() {\n\t\tstatic $instance;\n\n\t\tif ( ! $instance ) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setup();\n\t\t}\n\n\t\treturn $instance;\n\t}",
"public static abstract function createInstance();",
"public static function factory()\r\n {\r\n return parent::factory(__CLASS__);\r\n }",
"static public function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static;\n }",
"public static function create()\n {\n return new static;\n }",
"public static function create()\n {\n return new static;\n }",
"public static function create()\n {\n return new static;\n }",
"public static function create(){\r\n\t\tif(self::$instance === null){\r\n\t\t\tself::$instance = new self();\r\n\t\t}\r\n\t\treturn self::$instance;\r\n\t}",
"public static function create(): self\n {\n return new static();\n }",
"public function create(){\r\n\treturn new $this->class();\r\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"static function factory()\n {\n if (self::$_instance == NULL) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }",
"public static function create(): self\n {\n return new static;\n }",
"public function newInstance();",
"public function newInstance();",
"static public function create()\n\t{\n\t\treturn new static;\n\t}",
"public function __construct()\n {\n $this->initializeSingleton();\n\n $this->container = new Container();\n\n $this->loadServices($this->container);\n }",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"static function create(): self;",
"public static function inst()\n {\n return new static();\n }",
"public function create() {\n\t\t$implementationClassName = 'Imagine\\\\' . $this->settings['driver'] . '\\Imagine';\n\t\treturn new $implementationClassName();\n\t}",
"public static function make () {\n return new static;\n }",
"public static function instance() {\n\t\treturn new self;\n\t}",
"public static function make()\n {\n return new static();\n }",
"function __construct($service) {\n // return new $class;\n }",
"public static function make()\n {\n return new static;\n }",
"public static function make()\n {\n return new static;\n }",
"public static function make()\n\t{\n\t\treturn new static;\n\t}",
"public function create()\n {\n return new $this->class;\n }",
"public static function getInstance() {\n return new self();\n }",
"public static function create()\n {\n if (null === self::$instance) {\n self::$instance = new self();\n }\n\n return self::$instance;\n }",
"public static function createInstance()\n {\n return new static();\n }",
"public static function initialization()\n {\n return new static();\n }",
"public static function create() {\n $factory = new static();\n return $factory->createFlo();\n }",
"public static function getInstance()\n {\n return new self();\n }",
"public function construct() {\n\n }",
"public static function new()\n {\n return new static();\n }",
"public function getInstance(/* ... */)\n {\n $reflection = new ReflectionClass($this->getClass());\n return $reflection->newInstanceArgs(func_get_args());\n }",
"public function newInstance(): object;",
"public static function factory() {\n\t\tstatic $instance = false;\n\t\tif ( ! $instance ) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setup();\n\t\t}\n\t\treturn $instance;\n\t}",
"public static function new(){\n self::$instance = new self();\n return self::$instance;\n }",
"public function __construct()\n\t{\n\t\t// If there is no sharedFactoryInstance, prepare it\n\t\tif (is_null(self::$sharedFactoryInstance))\n\t\t{\n\t\t\t// @codeCoverageIgnoreStart\n\t\t\tself::$sharedFactoryInstance = $this;\n\t $this->config = new Config();\n\t $this->logger = new Logger();\n\t $this->events = new Events();\n\t $this->libraries = new Libraries();\n\t $this->helpers = new Helpers();\n\t $this->plugins = new Plugins();\n\n\t return;\n\t\t}\n\t\t// @codeCoverageIgnoreEnd\n\n\t\t// Otherwise, copy the existing instances\n\t\t$x = self::getInstance();\n\t\tforeach ($x as $key => $value)\n\t\t{\n\t\t $this->{$key} = $value;\n\t\t}\n\n\t\treturn;\n\t}",
"public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }",
"public static function make(): self\n\t{\n\t\treturn static::builder()->build();\n\t}",
"public static function make(): self\n\t{\n\t\treturn static::builder()->build();\n\t}",
"public static function make(): self\n\t{\n\t\treturn static::builder()->build();\n\t}",
"public static function make(): self\n\t{\n\t\treturn static::builder()->build();\n\t}",
"protected static function newFactory()\n {\n return ExampleFactory::new();\n }",
"protected static function newFactory()\n {\n //\n }",
"public static function init() {\n\t\treturn Factory::get_instance( self::class );\n\t}"
] | [
"0.776875",
"0.7491823",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.74669075",
"0.7441837",
"0.74059707",
"0.74059707",
"0.7390968",
"0.7359343",
"0.73497397",
"0.7304477",
"0.72960657",
"0.72958964",
"0.7288864",
"0.71892047",
"0.7164955",
"0.7124586",
"0.7117947",
"0.7117947",
"0.7117947",
"0.7117947",
"0.707154",
"0.7068278",
"0.70644605",
"0.70604837",
"0.70604837",
"0.70604837",
"0.70604837",
"0.70604837",
"0.70604837",
"0.70604837",
"0.70604837",
"0.70604837",
"0.70604837",
"0.70604837",
"0.70604837",
"0.70604837",
"0.70604837",
"0.70604837",
"0.70604837",
"0.7033174",
"0.7024935",
"0.7024279",
"0.7024279",
"0.6992241",
"0.69556546",
"0.69387203",
"0.69387203",
"0.69387203",
"0.6927767",
"0.69252425",
"0.69219136",
"0.69132274",
"0.68949056",
"0.68931407",
"0.68907446",
"0.6868893",
"0.6868893",
"0.68589455",
"0.6851628",
"0.6837578",
"0.6835783",
"0.6833943",
"0.6832975",
"0.6821006",
"0.6795684",
"0.67818236",
"0.67786306",
"0.6771676",
"0.67678785",
"0.67669904",
"0.6762541",
"0.6759803",
"0.6753142",
"0.67227805",
"0.67227805",
"0.67227805",
"0.67227805",
"0.66827494",
"0.6677968",
"0.6673016"
] | 0.0 | -1 |
May return the TSFE or not (e.g. in BE mode), thus the nullable return type. | private function getTypoScriptFrontendController(): ?TypoScriptFrontendController
{
return $GLOBALS['TSFE'];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static function getTSFE() {}",
"public function getNullable()\n {\n return $this->_nullable;\n }",
"public function getStrictEnforcement(): ?bool {\n $val = $this->getBackingStore()->get('strictEnforcement');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'strictEnforcement'\");\n }",
"public function getNullable()\n {\n return $this->nullable;\n }",
"function nullableReturnType(?int $param1): ?bool {}",
"public static function null()\n {\n return self::builtinType('null');\n }",
"function isNullable(): bool;",
"public function isNullable(): ?bool;",
"public function valueType(): ?string;",
"public function getFormatNonEtendu(): ?bool {\n return $this->formatNonEtendu;\n }",
"public function isNullable()\n {\n return $this->nullable;\n }",
"public function getIsTransf(): ?bool {\n return $this->isTransf;\n }",
"public function getIsRefinable(): ?bool {\n $val = $this->getBackingStore()->get('isRefinable');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'isRefinable'\");\n }",
"public function getIgnoreVersionDetection(): ?bool {\n $val = $this->getBackingStore()->get('ignoreVersionDetection');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'ignoreVersionDetection'\");\n }",
"public function getContextType(): ?FHIRExtensionContext\n\t{\n\t\treturn $this->contextType;\n\t}",
"public function isNullable()\n {\n\treturn $this->isNullable && true;\n }",
"public function getIsExactMatchRequired(): ?bool {\n $val = $this->getBackingStore()->get('isExactMatchRequired');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'isExactMatchRequired'\");\n }",
"public function getTSamedi(): ?bool {\n return $this->tSamedi;\n }",
"public function getIsSuggested(): ?bool {\n $val = $this->getBackingStore()->get('isSuggested');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'isSuggested'\");\n }",
"public function getIsRequired(): ?bool {\n $val = $this->getBackingStore()->get('isRequired');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'isRequired'\");\n }",
"public function getFactoryResetBlocked(): ?bool {\n $val = $this->getBackingStore()->get('factoryResetBlocked');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'factoryResetBlocked'\");\n }",
"public function getIsServiceProvider(): ?bool {\n $val = $this->getBackingStore()->get('isServiceProvider');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'isServiceProvider'\");\n }",
"public function getType(): ?string;",
"public function getType(): ?string;",
"function __return_null()\n {\n }",
"public function getTDimanche(): ?bool {\n return $this->tDimanche;\n }",
"public function getMixed(): ?bool\n {\n return $this->mixedAttr;\n }",
"public function getMixed(): ?bool\n {\n return $this->mixedAttr;\n }",
"function get_bool_or_null($value)\r\n{\r\n $temp = null ;\r\n\r\n if(is_null($value)){\r\n\r\n $temp .= \"<code style='font_size: 9px ; color:#3465a4 '>\" . PHP_EOL ;\r\n \r\n $temp .= 'null' . PHP_EOL;\r\n \r\n $temp .= \"</code><br>\"; \r\n\r\n }else if(is_bool($value)){\r\n $temp .= '<code style=\"font_size: 10px\">boolean </code>';\r\n \r\n $temp .= \"<code style='font_size: 9px ; color:#75507b '>\" . PHP_EOL ;\r\n \r\n $temp .= $value == true ? 'true' : 'false' . PHP_EOL;\r\n \r\n $temp .= \"</code><br>\";\r\n \r\n }\r\n\r\n return $temp ;\r\n}",
"public function getMontantFixe(): ?bool {\n return $this->montantFixe;\n }",
"public function getNullableInfo()\n {\n return $this->null;\n }",
"public function isNullable(): bool\n {\n return $this->nullable;\n }",
"public function getFsComptaYaAlerte(): ?bool {\n return $this->fsComptaYaAlerte;\n }",
"public function getIsExpeditable(): ?bool {\n $val = $this->getBackingStore()->get('isExpeditable');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'isExpeditable'\");\n }",
"public function getDataWithTypeTsfe() {}",
"public function getType(): ?string\n {\n }",
"public function getType(): ?string\n {\n }",
"public function getEnforceSignatureCheck(): ?bool {\n $val = $this->getBackingStore()->get('enforceSignatureCheck');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'enforceSignatureCheck'\");\n }",
"public function getEnforceSignatureCheck(): ?bool {\n $val = $this->getBackingStore()->get('enforceSignatureCheck');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'enforceSignatureCheck'\");\n }",
"public function getFsFiscal(): ?string {\n return $this->fsFiscal;\n }",
"public function getPersistEsimDataPlan(): ?bool {\n $val = $this->getBackingStore()->get('persistEsimDataPlan');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'persistEsimDataPlan'\");\n }",
"public function value(): ?string;",
"public function getIsTacheTp(): ?int {\n return $this->isTacheTp;\n }",
"public function getEscapedDefault(): ?bool {\n $val = $this->getBackingStore()->get('escapedDefault');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'escapedDefault'\");\n }",
"public function getAllowTextSuggestion(): ?bool {\n $val = $this->getBackingStore()->get('allowTextSuggestion');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowTextSuggestion'\");\n }",
"public function getBlocFc(): ?bool {\n return $this->blocFc;\n }",
"public function getSecurityAllowDebuggingFeatures(): ?bool {\n $val = $this->getBackingStore()->get('securityAllowDebuggingFeatures');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'securityAllowDebuggingFeatures'\");\n }",
"function answer1(): ?int {\n return null; //ok\n}",
"public function test()\n\t{\t\t\n\t\treturn (!PHPFOX_SAFE_MODE ? true : false);\n\t}",
"public function getDataType() {\n return null;\n }",
"public function getTauxFsh(): ?float {\n return $this->tauxFsh;\n }",
"public function getIsOrganizationDefault(): ?bool {\n $val = $this->getBackingStore()->get('isOrganizationDefault');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'isOrganizationDefault'\");\n }",
"public function getIsOrganizationDefault(): ?bool {\n $val = $this->getBackingStore()->get('isOrganizationDefault');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'isOrganizationDefault'\");\n }",
"public function getIsCapable(): ?bool {\n $val = $this->getBackingStore()->get('isCapable');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'isCapable'\");\n }",
"public function getTMardi(): ?bool {\n return $this->tMardi;\n }",
"public function getFsCompta(): ?string {\n return $this->fsCompta;\n }",
"public function getValue(): ?string;",
"public function getSingleSignOnMode(): ?SingleSignOnMode {\n $val = $this->getBackingStore()->get('singleSignOnMode');\n if (is_null($val) || $val instanceof SingleSignOnMode) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'singleSignOnMode'\");\n }",
"public function getValue()\n\t{\n\t\treturn null;\n\t}",
"function float_or_null($f) {\n return $f === null ? null : (float) $f;\n}",
"public function getType()\n\t{\n\t\treturn 'null';\n\t}",
"public function getIsSyncedFromOnPremises(): ?bool {\n $val = $this->getBackingStore()->get('isSyncedFromOnPremises');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'isSyncedFromOnPremises'\");\n }",
"public function getValue()\n {\n return null;\n }",
"public function getFsComptaDateAlerte(): ?DateTime {\n return $this->fsComptaDateAlerte;\n }",
"public function getTLundi(): ?bool {\n return $this->tLundi;\n }",
"public function singleType(): ?string\n {\n return $this->isUnion() ? null : $this->types[0];\n }",
"public function getIsAllowNull()\n {\n return $this->_status;\n }",
"public function setHasTentativeReturnType(): void;",
"public function getTJeudi(): ?bool {\n return $this->tJeudi;\n }",
"public function getType(): ?string\n {\n return $this->type;\n }",
"public function getType(): ?string\n {\n return $this->type;\n }",
"public function getType(): ?string\n {\n return $this->type;\n }",
"public function getType(): ?string\n {\n return $this->type;\n }",
"public function getType(): ?string\n {\n return $this->type;\n }",
"public function getFNumber(): ?float {\n $val = $this->getBackingStore()->get('fNumber');\n if (is_null($val) || is_float($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'fNumber'\");\n }",
"public function getEtatIsActif(): ?string {\n return $this->etatIsActif;\n }",
"public function getAllowAutoFilter(): ?bool {\n $val = $this->getBackingStore()->get('allowAutoFilter');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowAutoFilter'\");\n }",
"public function getOperationType(): ?string;",
"public function getAllowFormatColumns(): ?bool {\n $val = $this->getBackingStore()->get('allowFormatColumns');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowFormatColumns'\");\n }",
"public function getParseMode(): ?string\n {\n return $this->parse_mode;\n }",
"function nullableObjectReturnType(?int $param1): ?object {}",
"public function getFocalLength(): ?float {\n $val = $this->getBackingStore()->get('focalLength');\n if (is_null($val) || is_float($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'focalLength'\");\n }",
"public function getIsRegistrationRequired(): ?bool {\n $val = $this->getBackingStore()->get('isRegistrationRequired');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'isRegistrationRequired'\");\n }",
"function pseudoTypeNull(null $var = null) {}",
"public function getMode(): ?int\n {\n return $this->mode;\n }",
"public function getTMercredi(): ?bool {\n return $this->tMercredi;\n }",
"public function getTypeCarte(): ?string {\n return $this->typeCarte;\n }",
"public function getIsMfaRegistered(): ?bool {\n $val = $this->getBackingStore()->get('isMfaRegistered');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'isMfaRegistered'\");\n }",
"public function getFieldType(): ?string\n {\n return $this->getOption('fieldtype');\n }",
"private function PlainValue()\n\t{\n\t\tif ( $this->lexer->isNextToken( DocLexer::T_OPEN_CURLY_BRACES ) )\n\t\t\treturn $this->Arrayx();\n\n\t\tif ( $this->lexer->isNextToken( DocLexer::T_AT ) )\n\t\t\treturn $this->Annotation();\n\n\t\tif ( $this->lexer->isNextToken( DocLexer::T_IDENTIFIER ) )\n\t\t\treturn $this->Constant();\n\n\t\tswitch ( $this->lexer->lookahead['type'] )\n\t\t{\n\t\t\tcase DocLexer::T_STRING:\n\t\t\t\t$this->match( DocLexer::T_STRING );\n\n\t\t\t\treturn $this->lexer->token['value'];\n\n\t\t\tcase DocLexer::T_INTEGER:\n\t\t\t\t$this->match( DocLexer::T_INTEGER );\n\n\t\t\t\treturn (int) $this->lexer->token['value'];\n\n\t\t\tcase DocLexer::T_FLOAT:\n\t\t\t\t$this->match( DocLexer::T_FLOAT );\n\n\t\t\t\treturn (float) $this->lexer->token['value'];\n\n\t\t\tcase DocLexer::T_TRUE:\n\t\t\t\t$this->match( DocLexer::T_TRUE );\n\n\t\t\t\treturn true;\n\n\t\t\tcase DocLexer::T_FALSE:\n\t\t\t\t$this->match( DocLexer::T_FALSE );\n\n\t\t\t\treturn false;\n\n\t\t\tcase DocLexer::T_NULL:\n\t\t\t\t$this->match( DocLexer::T_NULL );\n\n\t\t\t\treturn null;\n\n\t\t\tdefault:\n\t\t\t\t$this->syntaxError( 'PlainValue' );\n\t\t}\n\n\t\treturn null;\n\t}",
"public function getNonGere(): ?bool {\n return $this->nonGere;\n }",
"public function getType(): ?Type\n {\n return $this->type;\n }",
"public function getCleanValue()\n {\n return null;\n }",
"public function getNoeudLocal(): ?bool {\n return $this->noeudLocal;\n }",
"public function getTVendredi(): ?bool {\n return $this->tVendredi;\n }",
"public function getIsMarketedService(): ?bool\n {\n return $this->isMarketedService;\n }",
"public function getCalculateDiscountOnCreditMemos(): ?bool {\n $val = $this->getBackingStore()->get('calculateDiscountOnCreditMemos');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'calculateDiscountOnCreditMemos'\");\n }",
"public function getIsTest()\n {\n $value = $this->get(self::ISTEST);\n return $value === null ? (boolean)$value : $value;\n }",
"public function getIsRetrievable(): ?bool {\n $val = $this->getBackingStore()->get('isRetrievable');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'isRetrievable'\");\n }",
"public function getAllowPivotTables(): ?bool {\n $val = $this->getBackingStore()->get('allowPivotTables');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowPivotTables'\");\n }",
"public function getMiracastRequirePin(): ?bool {\n $val = $this->getBackingStore()->get('miracastRequirePin');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'miracastRequirePin'\");\n }"
] | [
"0.66490185",
"0.6390941",
"0.6346903",
"0.6306117",
"0.61540735",
"0.6134865",
"0.61342126",
"0.6099988",
"0.60949653",
"0.6000258",
"0.5993642",
"0.5932725",
"0.59251785",
"0.5808151",
"0.58034396",
"0.574196",
"0.57234967",
"0.5714253",
"0.5698978",
"0.56805646",
"0.56777865",
"0.567623",
"0.5675625",
"0.5675625",
"0.5673042",
"0.5672003",
"0.5654841",
"0.5654841",
"0.5654311",
"0.56438774",
"0.56370085",
"0.56267947",
"0.5610082",
"0.5600362",
"0.5586742",
"0.5575646",
"0.5575646",
"0.55692667",
"0.55692667",
"0.55669403",
"0.55644304",
"0.5557963",
"0.55505955",
"0.5543419",
"0.5539791",
"0.5509964",
"0.55088335",
"0.5496962",
"0.54941183",
"0.54800403",
"0.5475601",
"0.54755753",
"0.54755753",
"0.54744554",
"0.54707336",
"0.546284",
"0.5450937",
"0.54451245",
"0.54442483",
"0.5444218",
"0.5443",
"0.5431244",
"0.54287237",
"0.5418813",
"0.54181206",
"0.541409",
"0.5411271",
"0.54103696",
"0.5398843",
"0.5388695",
"0.5388695",
"0.5388695",
"0.5388695",
"0.5388695",
"0.5388288",
"0.5384457",
"0.53596467",
"0.53409487",
"0.5335731",
"0.5333112",
"0.5330057",
"0.5315092",
"0.53106564",
"0.5309942",
"0.53053683",
"0.53023964",
"0.53003263",
"0.52940875",
"0.5280729",
"0.5275884",
"0.5271375",
"0.5263139",
"0.5260508",
"0.52596587",
"0.52542245",
"0.5254223",
"0.5252323",
"0.52478546",
"0.52449673",
"0.5244009",
"0.5239512"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
$categories = [
['parent_id' => 0, 'c_group' => 0, 'name' => 'Gear', 'slug' => 'gear', 'sortorder' => 1, 'active' => 1],
['parent_id' => 0, 'c_group' => 0, 'name' => 'Parts', 'slug' => 'parts', 'sortorder' => 2, 'active' => 1],
['parent_id' => 0, 'c_group' => 0, 'name' => 'Casual', 'slug' => 'casual', 'sortorder' => 3, 'active' => 1],
['parent_id' => 0, 'c_group' => 0, 'name' => 'News', 'slug' => 'news', 'sortorder' => 4, 'active' => 1],
['parent_id' => 1, 'c_group' => 1, 'name' => 'Clothes', 'slug' => 'clothes', 'sortorder' => 1, 'active' => 1],
['parent_id' => 1, 'c_group' => 1, 'name' => 'Helmets', 'slug' => 'helmets', 'sortorder' => 2, 'active' => 1],
['parent_id' => 1, 'c_group' => 1, 'name' => 'Boots', 'slug' => 'boots', 'sortorder' => 3, 'active' => 1],
['parent_id' => 1, 'c_group' => 2, 'name' => 'Suspension', 'slug' => 'suspension', 'sortorder' => 1, 'active' => 1],
['parent_id' => 1, 'c_group' => 2, 'name' => 'Maintenance', 'slug' => 'maintenance', 'sortorder' => 2, 'active' => 1],
['parent_id' => 1, 'c_group' => 2, 'name' => 'Oils', 'slug' => 'oils', 'sortorder' => 3, 'active' => 1],
['parent_id' => 1, 'c_group' => 3, 'name' => 'T-Sirts', 'slug' => 'tshirts', 'sortorder' => 1, 'active' => 1],
['parent_id' => 1, 'c_group' => 3, 'name' => 'Caps', 'slug' => 'caps', 'sortorder' => 2, 'active' => 1],
['parent_id' => 5, 'c_group' => 1, 'name' => 'Jerseys', 'slug' => 'jerseys', 'sortorder' => 1, 'active' => 1],
['parent_id' => 5, 'c_group' => 1, 'name' => 'Pants', 'slug' => 'pants', 'sortorder' => 2, 'active' => 1],
['parent_id' => 6, 'c_group' => 1, 'name' => 'Adults', 'slug' => 'adults-helmets', 'sortorder' => 1, 'active' => 1],
['parent_id' => 6, 'c_group' => 1, 'name' => 'Kids', 'slug' => 'kids-helmets', 'sortorder' => 2, 'active' => 1],
['parent_id' => 7, 'c_group' => 1, 'name' => 'Adults', 'slug' => 'adults-boots', 'sortorder' => 1, 'active' => 1],
['parent_id' => 7, 'c_group' => 1, 'name' => 'Kids', 'slug' => 'kids-boots', 'sortorder' => 2, 'active' => 1],
['parent_id' => 8, 'c_group' => 2, 'name' => 'Fork', 'slug' => 'fork-parts', 'sortorder' => 1, 'active' => 1],
['parent_id' => 8, 'c_group' => 2, 'name' => 'Shock', 'slug' => 'shock-parts', 'sortorder' => 2, 'active' => 1],
['parent_id' => 9, 'c_group' => 2, 'name' => 'Airfilter', 'slug' => 'airfilter', 'sortorder' => 1, 'active' => 1],
['parent_id' => 9, 'c_group' => 2, 'name' => 'Oilfilter', 'slug' => 'oilfilter', 'sortorder' => 2, 'active' => 1],
['parent_id' => 9, 'c_group' => 2, 'name' => 'Brakepads', 'slug' => 'brakepads', 'sortorder' => 3, 'active' => 1],
['parent_id' => 10, 'c_group' => 2, 'name' => 'Engine Oils', 'slug' => 'engine-oils', 'sortorder' => 1, 'active' => 1],
['parent_id' => 10, 'c_group' => 2, 'name' => 'Suspension Oils', 'slug' => 'suspension-oils', 'sortorder' => 2, 'active' => 1],
['parent_id' => 10, 'c_group' => 2, 'name' => 'Maintenance', 'slug' => 'bike-maintenance', 'sortorder' => 3, 'active' => 1],
];
DB::table('categories')->insert($categories);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.7841468",
"0.7834583",
"0.7827792",
"0.7819104",
"0.78088796",
"0.7802872",
"0.7802348",
"0.78006834",
"0.77989215",
"0.7795819",
"0.77903426",
"0.77884805",
"0.77862066",
"0.7778816",
"0.7777486",
"0.7765202",
"0.7762492",
"0.77623445",
"0.77621746",
"0.7761383",
"0.77606887",
"0.77596676",
"0.7757001",
"0.7753607",
"0.7749522",
"0.7749292",
"0.77466977",
"0.7729947",
"0.77289546",
"0.772796",
"0.77167094",
"0.7714503",
"0.77140456",
"0.77132195",
"0.771243",
"0.77122366",
"0.7711113",
"0.77109736",
"0.7710777",
"0.7710086",
"0.7705484",
"0.770464",
"0.7704354",
"0.7704061",
"0.77027386",
"0.77020216",
"0.77008796",
"0.7698617",
"0.76985973",
"0.76973504",
"0.7696405",
"0.7694293",
"0.7692694",
"0.7691264",
"0.7690576",
"0.76882726",
"0.7687433",
"0.7686844",
"0.7686498",
"0.7685065",
"0.7683827",
"0.7679184",
"0.7678287",
"0.76776296",
"0.76767945",
"0.76726556",
"0.76708084",
"0.76690495",
"0.766872",
"0.76686716",
"0.7666299",
"0.76625943",
"0.7662227",
"0.76613766",
"0.7659881",
"0.7656644",
"0.76539344",
"0.76535016",
"0.7652375",
"0.7652313",
"0.7652022"
] | 0.0 | -1 |
Initialize and register all of the screens. | public static function init() {
static::$apis = [
'content' => new Content_API(),
'contributors' => new Contributors_API(),
'dashboards' => new Dashboards_API(),
'options' => new Options_API(),
'post_types' => new Post_Types_API(),
'quick_cards' => new Quick_Cards_API(),
];
add_action( 'rest_api_init', [__CLASS__, 'register_rest_routes'] );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function initScreens()\n\t{\n\t\tadd_action('admin_menu', array($this->Main, 'screensHandler'));\n\n\t\t// Set up handler for admin bar registration (100 = put menu item at the end of standard items)\n\t\tadd_action('admin_bar_menu', array($this->Main, 'adminBarRegister'), 100);\n\t}",
"public function setup_screen() {\n\t\t$screen = get_current_screen();\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) );\n\t}",
"function set_up() {\n\t\tglobal $current_screen;\n\t\t$this->current_screen = $current_screen;\n\t\tparent::set_up();\n\t}",
"public function init()\n {\n $this->_createBoard();\n $this->_createSlots();\n }",
"public function init() {\n\t\tadd_action( 'init', array( $this, 'register' ) );\n\t}",
"public function init()\n {\n\t\tif(!Zend_Auth::getInstance()->hasIdentity())\n {\n $this->_redirect('registration/unregistered');\n }\t\n\t\tZend_Loader::loadClass('Menu',APPLICATION_PATH.'/views/helpers');\n\t\tZend_Loader::loadClass('Users',APPLICATION_PATH.'/models');\n\t\tZend_Loader::loadClass('EditProfile',APPLICATION_PATH.'/forms');\n\t\tZend_Loader::loadClass('Password',APPLICATION_PATH.'/forms');\n\t\tZend_Loader::loadClass('Profile',APPLICATION_PATH.'/models');\n\t\tZend_Loader::loadClass('ThemeForm',APPLICATION_PATH.'/forms');\n\t\tZend_Loader::loadClass('Themes',APPLICATION_PATH.'/models');\n\t\t$this->view->title = \"Universtiyifo\";\n\t\t$this->view->headTitle($this->view->title);\n\t\t$menu = new Menu();\n\t\t$this->view->menu = $menu->menuList('custom');\n }",
"protected function _screen() {}",
"private function setup_actions() {\n\n\t\t\t// Register managers, sections, settings, and controls.\n\t\t\tadd_action( 'butterbean_register', array( $this, 'register' ), 10, 2 );\n\t\t}",
"public static function Initialize() {\n\n Debugger::debugMessage('Registering components register');\n self::ComponentsRegister();\n }",
"public function __construct(Screen $screen)\n {\n $this->screen = $screen;\n }",
"public function init()\n\t{\t\t\n\t\tforeach( (array) $this->args as $id => $args ) :\n\t\t\t$this->Register( $id, $args );\n\t\tendforeach;\n\t}",
"public function init() {\n\t\tdo_action( get_called_class() . '_before_init' );\n\t\tdo_action( get_called_class() . '_after_init' );\n\t\tadd_action( 'wp_enqueue_scripts', array( get_called_class(), 'enqueue_scripts' ), 20 );\n\t\tnew Display();\n\t\tnew Term_Meta();\n\t}",
"protected function initialize() {\n\t add_action( 'widgets_init' , array( $this , 'register_widgets' ) );\n\t $this->add_hooks_and_filters();\n }",
"public function startup() {\n parent::startup(); \n self::renderShow(); \n }",
"public function admin_init()\n\t{\n\t\tforeach( (array) $this->InstanceRegistred as $id => $args ) :\n\t\t\t\\register_setting( $this->page, $args['name'] );\n\t\tendforeach;\n\t}",
"function set_screen()\n {\n $screen = get_current_screen();\n if ($screen) {\n $screen->ngg = TRUE;\n } else {\n if (is_null($screen)) {\n $screen = WP_Screen::get($this->object->name);\n $screen->ngg = TRUE;\n set_current_screen($this->object->name);\n }\n }\n }",
"public function settings_screen () {\n \n $this->ui->get_header();\n\n $screen = $this->ui->get_current_screen();\n\n switch ( $screen ) {\n //** Products screen. */\n case 'more_products':\n $this->more_products = $this->get_more_products();\n require_once( $this->screens_path . 'screen-more.php' );\n break;\n //** Licenses screen. */\n case 'licenses':\n default:\n $this->ensure_keys_are_actually_active();\n $this->installed_products = $this->get_detected_products();\n $this->pending_products = $this->get_pending_products();\n require_once( $this->screens_path . 'screen-manage-' . $this->type . '.php' );\n break;\n }\n\n $this->ui->get_footer();\n }",
"public static function init()\n {\n add_action( 'widgets_init', array(__CLASS__, 'register') );\n }",
"function init() {\n\t\t\t$this->showHeaders();\n\n\t\t\t// Display the CSS content\n\t\t\t$this->createContent();\n\t\t\t$this->showContent();\n\t\t}",
"protected function _initRegistry()\n {\n\n $tables = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application_tables.ini', 'tables', true);\n\n Zend_Registry::set(\"tables\", $tables);\n $tablespk = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application_tables.ini', 'tablespk', true);\n Zend_Registry::set(\"tablespk\", $tablespk);\n\n $appRegions = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application_regions.ini', 'Regions_Controller', true);\n Zend_Registry::set(\"Regions_Controller\", $appRegions);\n }",
"public function boot()\n {\n self::getMenus(MENUTYPE1, 'topmenu');\n self::getMenus(MENUTYPE2, 'sidemenu');\n }",
"public function __construct( $s = array ( 'playscripts' ) )\n {\n $this->screens = $s;\n }",
"public function init() {\n\n\t\t// Gets lcars to load\n \t$lcars = & Lcars_Framework::_lcarsframework_lcars();\n\n\t\t// Checks if lcars are available\n \tif ( $lcars ) {\n\n\t\t\t// Add the lcars page and menu item.\n\t\t\tadd_action( 'admin_menu', array( $this, 'add_lcars_page' ) );\n\n\t\t\t// Add the required scripts and styles\n\t\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );\n\t\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );\n\n\t\t\t// Settings need to be registered after admin_init\n\t\t\tadd_action( 'admin_init', array( $this, 'settings_init' ) );\n\n\t\t\t// Adds lcars menu to the admin bar\n\t\t\tadd_action( 'wp_before_admin_bar_render', array( $this, 'lcarsframework_admin_bar' ) );\n\n\t\t} else {\n\t\t\t// Display a notice if lcars aren't present in the theme\n\t\t\tadd_action( 'admin_notices', array( $this, 'lcars_notice' ) );\n\t\t\tadd_action( 'admin_init', array( $this, 'lcars_notice_ignore' ) );\n\t\t}\n\n }",
"public function init() {\n\t\tadd_filter( 'plugin_action_links_meta-box/meta-box.php', [ $this, 'plugin_links' ], 20 );\n\n\t\t// Add a shared top-level admin menu and Dashboard page. Use priority 5 to show Dashboard at the top.\n\t\tadd_action( 'admin_menu', [ $this, 'add_menu' ], 5 );\n\t\tadd_action( 'admin_menu', [ $this, 'add_submenu' ], 5 );\n\n\t\t// If no admin menu, then hide the About page.\n\t\tadd_action( 'admin_head', [ $this, 'hide_page' ] );\n\n\t\t// Redirect to about page after activation.\n\t\tadd_action( 'activated_plugin', [ $this, 'redirect' ], 10, 2 );\n\t}",
"public static function init()\n {\n self::$browsers = new Browser_Manager();\n self::$users = new User_Manager();\n self::$routes = new Routing_Manager();\n self::$pages = new Page_Manager();\n self::$themes = new Theme_Manager();\n self::$debug = new Debug_Manager();\n\n // disable debugging if we are unit testing\n if (defined('UNIT_TEST') && UNIT_TEST)\n {\n self::$debug->setEnabled(false);\n }\n\n\t\t// with the general environment loaded, we can now load\n\t\t// the modules that are app-specific\n self::$request = new App_Request();\n self::$response = new App_Response();\n self::$conditions = new App_Conditions();\n }",
"public function init()\n {\n $this->getBootstrap()->bootstrap('view');\n $this->_view = $this->getBootstrap()->getResource('view');\n $this->setHeadLinks();\n }",
"public function hook_init() {\n\n\t\t$this->register_blocks();\n\t\t$this->register_assets();\n\n\t}",
"public function init()\n {\n $this->loadThemeComponent();\n $this->loadConfig();\n }",
"public function setRegistry()\n {\n $reg = controllers\\Registry::getInstance();\n foreach ($this->config as $key => $value)\n {\n $reg->setResource($key, $value, true);\n }\n\n\n }",
"public function widgets_init() {\n\t\t// Set widgets_init action function.\n\t\tadd_action( 'widgets_init', array( $this, 'register_sidebars' ) );\n\t\tregister_widget( 'DX\\MOP\\Student_Widget' );\n\t}",
"public function init() {\n\t\t// Display settings page.\n\t\tadd_action( 'beehive_settings_page_content', [ $this, 'settings_page_content' ] );\n\n\t\t// Show success message.\n\t\tadd_action( 'beehive_admin_settings_processed', [ $this, 'updated_message' ] );\n\n\t\t// Render onboarding modals.\n\t\tadd_action( 'beehive_add_modals', [ $this, 'render_onboarding' ] );\n\t}",
"public static function init () : void\n {\n add_action(\"widgets_init\", function ()\n {\n self::unregister_widget();\n self::register_widget();\n self::register_sidebar();\n });\n }",
"function initialize() {\n\t\t$this->number = 1;\n\t\t$this->post_types = array();\n\t\t$this->widget_form_fields = array();\n\n\t\tadd_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );\n\t\tadd_action( 'save_post', array( $this, 'save_widget_post_meta' ), 10, 3 );\n\t}",
"public static function init()\n {\n foreach (self::$_registeredThemes as $registeredTheme) {\n $theme = self::_initializeTheme($registeredTheme);\n self::$_themes[$theme->id()] = $theme;\n }\n\n self::$_initialized = true;\n }",
"private function registerAll()\n {\n $this->registerApp();\n $this->registerPsr();\n $this->registerRequests();\n $this->registerResponses();\n $this->registerPlugins();\n $this->registerCallables();\n $this->registerViews();\n $this->registerUtils();\n }",
"protected function _initLayouts()\n {\n $layouts = [];\n\n if (method_exists($this, 'registerLayouts')) {\n $layouts = $this->registerLayouts();\n }\n\n foreach ($layouts as $layout) {\n $this->_initLayout($layout);\n }\n }",
"public function InitAll ();",
"public static function init() {\n\t\tself::setup_actions();\n\t}",
"public static function init() {\n\t\tself::get_instance(); // make sure we're initialized\n\t\tdo_action( 'wp_forms_register' );\n\t}",
"public function init()\n\t{\n\t\tEvents::register('user_insert', array($this, 'user_insert'));\n\t\tEvents::register('user_insert_ldap', array($this, 'user_insert_ldap'));\n\t\tEvents::register('user_update', array($this, 'user_update'));\n\t\tEvents::register('user_delete', array($this, 'user_delete'));\n\t\tEvents::register('users_import', array($this, 'users_import'));\n\t}",
"public function Init() {\n\t\t\n\t\t$this->exceptions = TRUE;\n\t\t$this->SetAccess(self::ACCESS_ANY);\n\t\t$this->access_groups = array('admin','user','any');\n\t\t$this->current_group = 'any';\n\t\t$this->AccessMode(1);\n\t\t$this->SetModel(SYS.M.'menudata');\n\t\t$this->only_registered(FALSE);\n\t\tif(Helper::Get('admin'.S.'menu') == '')\n\t\t//$this->SetView(SYS.V . \"elements:nav\");\n\t\t$this->Inc(SYS.M.'model');\n\t}",
"public function init() {\n\t\tAnnuaire_User::mustBeConnected();\n\t\t$this->view->setLayout(\"default\");\n\t\t$this->view->addLayoutVar(\"onglet\", 4);\n\t}",
"private function init() {\n\n\t\tif ( ! $this->should_load() ) {\n\t\t\treturn;\n\t\t}\n\t\t$this->setup_admin();\n\t\t$this->setup_api();\n\t}",
"private function setup_actions() {\n\n\t\t// Register panels, sections, settings, controls, and partials.\n\t\tadd_action( 'customize_register', array( $this, 'sections' ) );\n\n\t}",
"function initRegister() {\r\n $register = new Zend_Registry(array(), ArrayObject::ARRAY_AS_PROPS);\r\n Zend_Registry::setInstance($register);\r\n }",
"public function init()\n {\n\n $this->addWPConfigs();\n $this->addSPLConfigs();\n $this->addControllerConfigs();\n $this->addFieldGroupConfigs();\n $this->addFieldConfigs();\n $this->addImageSizeConfigs();\n $this->addLayoutConfigs();\n $this->addModelConfigs();\n $this->addPostTypeConfigs();\n $this->addTaxonomyConfigs();\n $this->addTemplateFunctionConfigs();\n $this->addHookableConfigs();\n $this->addSearchConfigs();\n $this->addBaseThemeConfigs();\n\n }",
"public function settings_page_init() {\n $this->registration();\n $this->sections();\n }",
"public static function register() {\n\t register_widget( __CLASS__ );\n\t}",
"public function registerAll() {\n $this->registerScripts();\n $this->localizeScripts();\n $this->registerStyles();\n }",
"function init(){\n\t\t$this->register_cpt_lumo_slides();\n\n\t\tadd_action( 'admin_head', array($this, 'plugin_header_image') );\n\t\tadd_action( 'admin_head', array($this, 'lumo_cpt_icons') );\n\n\t\tadd_action('admin_menu', array($this, 'admin_menus') );\n\n\t\tadd_action('wp_enqueue_scripts', array($this, 'enqueue') );\n\n\t\t/**\n\t\t *\tSet Custom Main Slider Image size\n\t\t */\n\t\tadd_image_size('home-slider-image', 1600, 600);\n\t\tadd_image_size('home-slider-image-lowrez', 1366, 512);\n\t}",
"public function init()\n {\n $controller = $this->router->getController();\n $action = $this->router->getAction();\n $params = $this->router->getParams();\n\n $objController = registerObject($controller);\n\n call_user_func_array([$objController, $action], $params);\n }",
"function init()\n {\n $rcmail = rcmail::get_instance();\n\n $this->add_texts('localization/', false);\n\n // register task\n $this->register_task('dspam');\n\n // register actions\n $this->register_action('index', array($this, 'action'));\n\n // add taskbar button\n $this->add_button(array(\n 'command' => 'dspam',\n 'class' => 'button-help',\n 'classsel' => 'button-help button-selected',\n 'innerclass' => 'button-inner',\n 'label' => 'dspam.dspam',\n ), 'taskbar');\n\n $skin = $rcmail->config->get('skin');\n if (!file_exists($this->home.\"/skins/$skin/help.css\"))\n $skin = 'default';\n\n // add style for taskbar button (must be here) and Help UI \n $this->include_stylesheet(\"skins/$skin/help.css\");\n }",
"public function init()\n\t{\n\t\t$this->loader->init();\n\t\t$this->routing->init();\n\t}",
"public function init()\n\t{\n\t\t$this -> view -> navigation = $navigation = Engine_Api::_() -> getApi('menus', 'core') -> getNavigation('advmenusystem_admin_main', array(), 'advmenusystem_admin_global_settings');\n\t}",
"public function init() {\n\t\tAnnuaire_User::mustBeConnected();\n\t\t$this->view->setLayout('default');\n\t}",
"public function register()\n {\n add_meta_box($this->id, $this->title, array( $this, 'render' ), $this->screens );\n }",
"public static function init() {\n static::registerSettings();\n }",
"public static function init(){\n self::items_needed_for_brands();\n self::brand_for_product_post_type_metabox();\n }",
"protected function _init() {\n\t\tadd_action( 'cmb2_init', array( $this, 'custom_page_details' ) );\n\t\tadd_action( 'cmb2_init', array( $this, 'custom_page_itinerary' ) );\n\t\tadd_action( 'cmb2_init', array( $this, 'custom_page_content' ) );\n\t\tadd_action( 'cmb2_init', array( $this, 'custom_page_faculty' ) );\n\t}",
"public function initialize()\n {\n $autoloader = $this->registerAutoloader();\n $this->registerPlugins($autoloader);\n }",
"public function __construct( $screens ) {\n\n /**\n * Array of screen ID's the editor can be applied to\n *\n * @var array\n */\n $this->screens = $screens;\n\n // Load initial actions\n add_action( 'load-post.php', array( $this, 'admin_init' ) );\n add_action( 'load-post-new.php', array( $this, 'admin_init' ) );\n\n // Array containing each AJAX action\n $ajax_actions = array(\n 'load_template',\n 'update_template_manager',\n 'refresh_edited_module',\n 'update_editor_value'\n );\n\n // register each AJAX action\n foreach ( $ajax_actions as $action ) {\n add_action('wp_ajax_' . 'cv_ajax_' . $action, array( $this, $action . '_callback' ) );\n add_action('wp_ajax_nopriv_' . 'cv_ajax_' . $action, array( $this, $action . '_callback' ) );\n }\n\n }",
"public function init() {\n\t\tadd_action( 'init', array( $this, 'new_page' ) );\n\t}",
"public function startup() {\n\t\tA('AdminInterface')->bind('GatherAdminPages', array(\n\t\t\t'Core Settings' => array(\n\t\t\t\t'config' => $this->config,\n\t\t\t\t'fields' => array(\n\t\t\t\t\tSETTING_DEFAULT_BASE_PATH => array( \n\t\t\t\t\t\t'title' => 'Base Path',\n\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t'value' => $this->config->getConfigValue(SETTING_DEFAULT_BASE_PATH)),\n\t\t\t\t\tSETTING_SITE_URL => array(\n\t\t\t\t\t\t'title' => 'Base URL',\n\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t'value' => $this->config->getConfigValue(SETTING_SITE_URL, '')),\t\n\t\t\t\t\tSETTING_ENVIRONMENT => array(\n\t\t\t\t\t\t'title' => 'Environment',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'values' => array(\"Development\" => ENV_DEVELOPMENT, \"Test\" => ENV_TEST, \"Production\" => ENV_PRODUCTION),\n\t\t\t\t\t\t'selected' => $this->config->getConfigValue(SETTING_ENVIRONMENT)),\n\t\t\t\t),\n\t\t\t)\n\t\t));\n\t}",
"public function init()\n {\n $this->add_texts('localization/', false);\n $this->add_hook('startup', array($this, 'startup'));\n $this->include_script('gluu_sso.js');\n $this->app = rcmail::get_instance();\n $this->app->output->add_label($this->gettext('gluu_sso'));\n\n $src = $this->app->config->get('skin_path') . '/gluu_sso.css';\n if (file_exists($this->home . '/' . $src)) {\n $this->include_stylesheet($src);\n }\n $this->register_action('plugin.gluu_sso', array($this, 'gluu_sso_init'));\n $this->register_action('plugin.gluu_sso-save', array($this, 'gluu_sso_save'));\n $this->add_hook('template_object_loginform', array($this,'gluu_sso_loginform'));\n }",
"public function init() {\n add_action( 'rest_api_init', array($this, 'register_route'));\n add_action( 'wp_enqueue_scripts', array($this, 'enqueue_script'));\n\t}",
"public function initialize()\n {\n $this->initializeUI(['layout' => false]);\n $this->loadHelper('Text');\n $this->loadHelper('Paginator');\n $this->loadHelper('Menu');\n }",
"private static function initializeResources()\n {\n if (self::$initialized) {\n return;\n }\n\n Resource::init();\n\n Resources\\User::init();\n Resources\\Application::init();\n Resources\\Identity::init();\n Resources\\Processor::init();\n Resources\\Merchant::init();\n Resources\\PaymentInstrument::init();\n Resources\\PaymentCard::init();\n Resources\\BankAccount::init();\n Resources\\Authorization::init();\n Resources\\Transfer::init();\n Resources\\Reversal::init();\n Resources\\Dispute::init();\n Resources\\Webhook::init();\n Resources\\Settlement::init();\n Resources\\Verification::init();\n Resources\\Evidence::init();\n Resources\\Token::init();\n Resources\\InstrumentUpdate::init();\n\n self::$initialized = true;\n }",
"public function init() {\n\t\t$this->getFrontController()->addModuleDirectory(APPLICATION_PATH . '/modules');\n\n\t\t// initialize navigation\n\t\t$this->_initNavigation();\n\t}",
"public function init() {\r\n\t\tadd_action( 'admin_init', array( $this, '_attach' ) );\r\n\t\tadd_action( 'profile_update', array( $this, '_save' ), 10, 1 );\r\n\t\tadd_action( 'user_register', array( $this, '_save' ), 10, 1 );\r\n\t}",
"public function initialize()\n\t{\n\t\tadd_action('widgets_init', array($this, 'action_register_sidebars'));\n\t\tadd_filter('body_class', array($this, 'filter_body_classes'));\n\t}",
"protected function init() {\n\t\t$this->load_image_sizes();\n\n\t\t// Set image size to WP\n\t\t$this->add_image_sizes();\n\t}",
"public function actionInit()\n {\n $this->initRoles($this->roles);\n $this->initPermissions($this->permissions);\n $this->initDependencies($this->dependencies);\n }",
"private function __construct() {\n add_action('after_setup_theme', array(\n $this, 'after_setup_theme'));\n add_action('widgets_init', array($this, 'widgets_init'));\n add_action('wp_enqueue_scripts', array(\n $this, 'wp_enqueue_scripts'));\n }",
"public static function init() {\n\t\tadd_action( 'user_register', array( __CLASS__, 'user_register' ) );\n\t}",
"public function __construct()\r\n {\r\n $this->loadResources('start');\r\n }",
"public function init() {\n\t\t$this->define_constants();\n\t\t$this->load_dependencies();\n\t\tdo_action( 'wprmprc_init' );\n\t\tadd_filter( 'wprm_addon_active', array( $this, 'addon_active' ), 10, 2 );\n\t}",
"function set_screen_options()\n {\n }",
"private function init_hooks() {\n\t\t\tadd_action( 'init', array( $this, 'init' ), 0 );\n\t\t}",
"public function init() {\n # load css file on init\n wp_enqueue_style('verifyGSC_css', plugins_url('css/style.css', __FILE__));\n # setup meta box\n add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) );\n # save when post is saved\n add_action( 'save_post', array( $this, 'save' ) );\n }",
"public function init() {\n\n\t\t/**\n\t\t * Allow adding plugins and themes to hook into core init.\n\t\t */\n\t\tdo_action( 'fimc_init' );\n\t}",
"static function init()\n {\n $return_code = 0;\n\n ob_start();\n self::$monitor = system(\n \"xrandr --listactivemonitors | cut -d' ' -f6 | tail -n 1\"\n );\n ob_end_clean();\n\n if(self::$monitor == \"\")\n {\n echo \"Could not get the current display information, restarting...\\n\";\n exit;\n }\n }",
"public function init() {\n\t\t//theme needs to be set TWO times...\n\t\t$theme = Session::get(\"theme\"); if(!$theme) {$theme = \"main\";}SSViewer::set_theme($theme);\n\t\tparent::init();\n\t\tif($theme == \"main\") {\n\t\t\t$this->addBasicMetatagRequirements();\n\t\t}\n\t\t$theme = Session::get(\"theme\"); if(!$theme) {$theme = \"main\";}SSViewer::set_theme($theme);\n\t}",
"public static function boot ()\n {\n parent::boot();\n self::observe(new UIActionObserver());\n }",
"public function set_current_screen()\n {\n }",
"public function setup () {\n add_action( 'admin_enqueue_scripts',\n array(\n $this,\n 'add_clranger_scripts'\n ) );\n\n add_action( 'admin_notices',\n array(\n $this,\n 'clranger_admin_notice'\n ) );\n\n add_action( 'admin_menu',\n array(\n $this,\n 'add_admin_pages'\n ) );\n\n }",
"public static function register() {\n\t\tstatic::registerStyles();\n\t\tstatic::registerScripts();\n\t\tstatic::registerDOM();\n\t}",
"public function init() {\n\t\tadd_action( 'admin_notices', [ $this, 'showWelcomeMessage' ] );\n\t}",
"public function init() {\n\t\t$this->load_actions();\n\t}",
"public function init() {\n\t\t$this->add_cpt_support();\n\n\t\t$this->init_components();\n\n\t\tdo_action( 'elementor/init' );\n\t}",
"function _elggx_lists_init() {\n\telgg_register_plugin_hook_handler('elggx_lists:can', 'all', '_elggx_list_perms_handler');\n\t\n\telgg_register_plugin_hook_handler('unit_test', 'system', '_elggx_lists_test');\n\n\tforeach (array('add_item', 'remove_item', 'rearrange_items') as $action) {\n\t\telgg_register_action(\n\t\t\t\"elggx_lists/$action\",\n\t\t\tdirname(__FILE__) . \"/actions/elggx_lists/$action.php\"\n\t\t);\n\t}\n}",
"protected function init()\n {\n $this->registerExtensions();\n }",
"public function startup()\n\t{\n\t\tparent::startup();\n\t\t$this->instructions = array(\n\t\t\t'message' => null,\n\t\t\t'redirection' => 'Administration:'\n\t\t);\n\t}",
"public function registerAll()\n {\n $this->registerCommands();\n }",
"function display_init()\n\t{\n\t\tglobal $Messages, $debug, $disp;\n\n\t\t// Request some common features that the parent function (Skin::display_init()) knows how to provide:\n\t\tparent::display_init( array(\n\t\t\t'jquery', // Load jQuery\n\t\t\t'font_awesome', // Load Font Awesome (and use its icons as a priority over the Bootstrap glyphicons)\n\t\t\t'bootstrap', // Load Bootstrap (without 'bootstrap_theme_css')\n\t\t\t'bootstrap_evo_css', // Load the b2evo_base styles for Bootstrap (instead of the old b2evo_base styles)\n\t\t\t'bootstrap_messages', // Initialize $Messages Class to use Bootstrap styles\n\t\t\t'style_css', // Load the style.css file of the current skin\n\t\t\t'colorbox', // Load Colorbox (a lightweight Lightbox alternative + customizations for b2evo)\n\t\t\t'bootstrap_init_tooltips', // Inline JS to init Bootstrap tooltips (E.g. on comment form for allowed file extensions)\n\t\t\t'disp_auto', // Automatically include additional CSS and/or JS required by certain disps (replace with 'disp_off' to disable this)\n\t\t) );\n\n\t\t// Include Masonry Grind for MediaIdx\n\t\tif ( $disp == 'mediaidx' || $disp == 'posts' ) {\n\t\t\trequire_js( 'assets/js/masonry.pkgd.min.js', 'relative' );\n\t\t\trequire_js( 'assets/js/imagesloaded.pkgd.min.js', 'relative');\n\t\t}\n\n\t\tif( $disp == 'posts' ) {\n\t\t\tadd_js_headline(\"\n\t\t\tjQuery( document ).ready( function($) {\n\t\t\t\t$('.main_item_posts').imagesLoaded().done( function( instance ) {\n\t\t\t\t\t$('.main_item_posts').masonry({\n\t\t\t\t\t\t// options\n\t\t\t\t\t\titemSelector: '.item_posts',\n\t\t\t\t\t\tpercentPosition: true,\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t\t\");\n\t\t}\n\n\t\tif ( $disp == 'mediaidx' ) {\n\t\t\tadd_js_headline(\"\n\t\t\tjQuery( document ).ready( function($) {\n\t\t\t\t$('.evo_image_index').imagesLoaded().done( function( instance ) {\n\t\t\t\t\t$('.evo_image_index').masonry({\n\t\t\t\t\t\t// options\n\t\t\t\t\t\titemSelector: '.grid-item',\n\t\t\t\t\t\tpercentPosition: true,\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t\t\");\n\t\t}\n\n\t\trequire_js( 'assets/js/script.js', 'relative' );\n\t\t// Skin specific initializations:\n\n\t\t// Limit images by max height:\n\t\t$max_image_height = intval( $this->get_setting( 'max_image_height' ) );\n\t\tif( $max_image_height > 0 )\n\t\t{\n\t\t\tadd_css_headline( '.evo_image_block img { max-height: '.$max_image_height.'px; width: auto; }' );\n\t\t}\n\n\t\t// Skin specific initializations:\n\t\t// Add custom CSS:\n\t\t$custom_css = '';\n\n\n\t\t/**\n\t\t* ============================================================================\n\t\t* General Settings Output\n\t\t* ============================================================================\n\t\t*/\n\t\tif ( $color = $this->get_setting( 'color_schemes' ) ) {\n\t\t\t// General\n\t\t\t$custom_css .= '\n\t\t\ta, a:hover, a:active, a:focus,\n\t\t\t.disp_search #main-content .search_result .search_content_wrap .search_title a:hover, .disp_search #main-content .search_result .search_content_wrap .search_title a:active, .disp_search #main-content .search_result .search_content_wrap .search_title a:focus,\n\t\t\t.widget_plugin_evo_Calr .bCalendarTable tfoot a:hover, #main-content .evo_post .small.text-muted a:hover span, #main-content .evo_featured_post .small.text-muted a:hover span\n\t\t\t{ color: '.$color.'; }\n\n\t\t\t/* Header */\n\t\t\t.navbar-collapse .nav.nav-tabs li a::after, .navbar-collapse ul li.active a\n\t\t\t{ background-color: '.$color.'; }\n\n\t\t\t/* Posts */\n\t\t\t#content .evo_post_title h2 a:hover,\n\t\t\t#main-content .evo_post .small.text-muted a:hover, #main-content .evo_featured_post .small.text-muted a:hover,\n\t\t\t.disp_search #main-content .search_result .search_result_score.dimmed\n\t\t\t{ color: '.$color.'; }\n\n\t\t\t#main-content .evo_intro_post, #main-content .featurepost,\n\t\t\t.pagination > .active > span, .pagination > .active > span:hover, .pagination > li > a:hover,\n\t\t\t#main-content .post_tags a:hover, #main-content .post_tags a:active, #main-content .post_tags a:focus,\n\t\t\t#main-content .evo_post .evo_post__full .evo_post_more_link a:hover, #main-content .evo_featured_post .evo_post__full .evo_post_more_link a:hover, #main-content .evo_post .evo_post__excerpt .evo_post_more_link a:hover, #main-content .evo_featured_post .evo_post__excerpt .evo_post_more_link a:hover, #main-content .evo_post .evo_post__full .evo_post__excerpt_more_link a:hover, #main-content .evo_featured_post .evo_post__full .evo_post__excerpt_more_link a:hover, #main-content .evo_post .evo_post__excerpt .evo_post__excerpt_more_link a:hover, #main-content .evo_featured_post .evo_post__excerpt .evo_post__excerpt_more_link a:hover, #main-content .evo_post .evo_post__full .evo_post_more_link a:active, #main-content .evo_featured_post .evo_post__full .evo_post_more_link a:active, #main-content .evo_post .evo_post__excerpt .evo_post_more_link a:active, #main-content .evo_featured_post .evo_post__excerpt .evo_post_more_link a:active, #main-content .evo_post .evo_post__full .evo_post__excerpt_more_link a:active, #main-content .evo_featured_post .evo_post__full .evo_post__excerpt_more_link a:active, #main-content .evo_post .evo_post__excerpt .evo_post__excerpt_more_link a:active, #main-content .evo_featured_post .evo_post__excerpt .evo_post__excerpt_more_link a:active, #main-content .evo_post .evo_post__full .evo_post_more_link a:focus, #main-content .evo_featured_post .evo_post__full .evo_post_more_link a:focus, #main-content .evo_post .evo_post__excerpt .evo_post_more_link a:focus, #main-content .evo_featured_post .evo_post__excerpt .evo_post_more_link a:focus, #main-content .evo_post .evo_post__full .evo_post__excerpt_more_link a:focus, #main-content .evo_featured_post .evo_post__full .evo_post__excerpt_more_link a:focus, #main-content .evo_post .evo_post__excerpt .evo_post__excerpt_more_link a:focus, #main-content .evo_featured_post .evo_post__excerpt .evo_post__excerpt_more_link a:focus,\n\t\t\t.disp_front #main-content .widget_core_coll_featured_intro .jumbotron,\n\t\t\t.disp_front #main-content .widget_core_poll .btn-default.active, .disp_front #main-content .widget_core_poll .btn-default.focus, .disp_front #main-content .widget_core_poll .btn-default:active, .disp_front #main-content .widget_core_poll .btn-default:focus, .disp_front #main-content .widget_core_poll .btn-default:hover, .disp_front #main-content .widget_core_poll .open > .dropdown-toggle.btn-default,\n\t\t\t.disp_search #main-content .search_result .search_result_score.dimmed::after,\n\t\t\t.disp_threads #main-content .SaveButton.btn-primary, .disp_messages #main-content .SaveButton.btn-primary, .disp_contacts #main-content .SaveButton.btn-primary,\n\t\t\t.disp_contacts .form_send_contacts .btn-default:hover, .disp_contacts .form_send_contacts .btn-default:active, .disp_contacts .form_send_contacts .btn-default:focus,\n\t\t\t.filters .btn-info,\n\t\t\t.disp_threads #main-content .results .action_icon.btn-primary, .disp_messages #main-content .results .action_icon.btn-primary, .disp_contacts #main-content .results .action_icon.btn-primary,\n\t\t\t.btn-success, .pagination li.active a:hover, .pagination li.active span:hover, .pagination li.active a:active, .pagination li.active span:active, .pagination li.active a:focus, .pagination li.active span:focus, .pagination li.active a, .pagination li.active span, .pagination li a:hover, .pagination li span:hover, .pagination li a:active, .pagination li span:active, .pagination li a:focus, .pagination li span:focus,\n\t\t\t.disp_profile #main-content .profile_tabs li.active a, .disp_avatar #main-content .profile_tabs li.active a, .disp_pwdchange #main-content .profile_tabs li.active a, .disp_userprefs #main-content .profile_tabs li.active a, .disp_subs #main-content .profile_tabs li.active a,\n\t\t\t.disp_profile #main-content .profile_tabs a:hover, .disp_avatar #main-content .profile_tabs a:hover, .disp_pwdchange #main-content .profile_tabs a:hover, .disp_userprefs #main-content .profile_tabs a:hover, .disp_subs #main-content .profile_tabs a:hover, .disp_profile #main-content .profile_tabs a:active, .disp_avatar #main-content .profile_tabs a:active, .disp_pwdchange #main-content .profile_tabs a:active, .disp_userprefs #main-content .profile_tabs a:active, .disp_subs #main-content .profile_tabs a:active, .disp_profile #main-content .profile_tabs a:focus, .disp_avatar #main-content .profile_tabs a:focus, .disp_pwdchange #main-content .profile_tabs a:focus, .disp_userprefs #main-content .profile_tabs a:focus, .disp_subs #main-content .profile_tabs a:focus,\n\t\t\t.disp_profile #main-content .evo_form .panel-heading, .disp_avatar #main-content .evo_form .panel-heading, .disp_pwdchange #main-content .evo_form .panel-heading, .disp_userprefs #main-content .evo_form .panel-heading, .disp_subs #main-content .evo_form .panel-heading,\n\t\t\t.evo_panel__login .btn.btn-success, .evo_panel__lostpass .btn.btn-success, .evo_panel__register .btn.btn-success, .evo_panel__activation .btn.btn-success,\n\t\t\t.disp_edit #item_checkchanges .panel .panel-heading\n\t\t\t{ background-color: '.$color.'; }\n\n\t\t\t.disp_front #main-content .widget_core_poll .btn-default.active, .disp_front #main-content .widget_core_poll .btn-default.focus, .disp_front #main-content .widget_core_poll .btn-default:active, .disp_front #main-content .widget_core_poll .btn-default:focus, .disp_front #main-content .widget_core_poll .btn-default:hover, .disp_front #main-content .widget_core_poll .open > .dropdown-toggle.btn-default,\n\t\t\t.disp_search #main-content .search_result .search_result_score.dimmed,\n\t\t\t.disp_threads #main-content .SaveButton.btn-primary, .disp_messages #main-content .SaveButton.btn-primary, .disp_contacts #main-content .SaveButton.btn-primary,\n\t\t\t.disp_contacts .form_send_contacts .btn-default:hover, .disp_contacts .form_send_contacts .btn-default:active, .disp_contacts .form_send_contacts .btn-default:focus,\n\t\t\t.filters .btn-info,\n\t\t\t.disp_threads #main-content .results .action_icon.btn-primary, .disp_messages #main-content .results .action_icon.btn-primary, .disp_contacts #main-content .results .action_icon.btn-primary,\n\t\t\t.disp_threads #main-content .evo_form__thread input:focus, .disp_messages #main-content .evo_form__thread input:focus, .disp_contacts #main-content .evo_form__thread input:focus, .disp_threads #main-content .evo_form__thread textarea:focus, .disp_messages #main-content .evo_form__thread textarea:focus, .disp_contacts #main-content .evo_form__thread textarea:focus,\n\t\t\t.btn-success, .pagination li.active a:hover, .pagination li.active span:hover, .pagination li.active a:active, .pagination li.active span:active, .pagination li.active a:focus, .pagination li.active span:focus, .disp_msgform #main-content .form_text_input:hover, .disp_msgform #main-content .form_textarea_input:hover, .disp_msgform #main-content .form_text_input:active, .disp_msgform #main-content .form_textarea_input:active, .disp_msgform #main-content .form_text_input:focus, .disp_msgform #main-content .form_textarea_input:focus,\n\n\t\t\t.disp_profile #main-content .evo_form .panel-body .form-control:hover, .disp_avatar #main-content .evo_form .panel-body .form-control:hover, .disp_pwdchange #main-content .evo_form .panel-body .form-control:hover, .disp_userprefs #main-content .evo_form .panel-body .form-control:hover, .disp_subs #main-content .evo_form .panel-body .form-control:hover, .disp_profile #main-content .evo_form .panel-body .form-control:active, .disp_avatar #main-content .evo_form .panel-body .form-control:active, .disp_pwdchange #main-content .evo_form .panel-body .form-control:active, .disp_userprefs #main-content .evo_form .panel-body .form-control:active, .disp_subs #main-content .evo_form .panel-body .form-control:active, .disp_profile #main-content .evo_form .panel-body .form-control:focus, .disp_avatar #main-content .evo_form .panel-body .form-control:focus, .disp_pwdchange #main-content .evo_form .panel-body .form-control:focus, .disp_userprefs #main-content .evo_form .panel-body .form-control:focus, .disp_subs #main-content .evo_form .panel-body .form-control:focus,\n\n\t\t\t#login_form input:focus:invalid:focus, #login_form select:focus:invalid:focus, #login_form textarea:focus:invalid:focus, .evo_panel__login .btn.btn-success, .evo_panel__lostpass .btn.btn-success, .evo_panel__register .btn.btn-success, .evo_panel__activation .btn.btn-success, .form-control:focus,\n\n\t\t\t.disp_edit #item_checkchanges .panel\n\t\t\t{ border-color: '.$color.'; }\n\n\t\t\t.disp_posts #content .evo_featured_post\n\t\t\t{ border-left-color: '.$color.'; }\n\n\t\t\t/* Sidebar - Widget - Single */\n\t\t\t.evo_widget a:hover, .evo_widget a:active, .evo_widget a:focus,\n\t\t\t#main-footer .main_widget a:hover, #main-footer .main_widget a:active, #main-footer .main_widget a:focus,\n\t\t\t.evo_comment .evo_comment_info .delete_link:hover, .evo_comment__preview .evo_comment_info .delete_link:hover, .evo_comment .evo_comment_info .edit_link:hover, .evo_comment__preview .evo_comment_info .edit_link:hover, .evo_comment .evo_comment_info .delete_link:active, .evo_comment__preview .evo_comment_info .delete_link:active, .evo_comment .evo_comment_info .edit_link:active, .evo_comment__preview .evo_comment_info .edit_link:active, .evo_comment .evo_comment_info .delete_link:focus, .evo_comment__preview .evo_comment_info .delete_link:focus, .evo_comment .evo_comment_info .edit_link:focus, .evo_comment__preview .evo_comment_info .edit_link:focus,\n\t\t\t.disp_comments #main-content .evo_comment .evo_comment_title.first a,\n\t\t\t.evo_comment .evo_comment_title a:hover, .evo_comment__preview .evo_comment_title a:hover\n\t\t\t{ color: '.$color.'; }\n\n\t\t\t.widget_core_coll_search_form .search .search_submit,\n\t\t\t.tag_cloud a:hover, .tag_cloud a:active, .tag_cloud a:focus,\n\t\t\t.widget_plugin_evo_Calr .bCalendarTable #bCalendarToday,\n\t\t\t#main-footer .main_widget .widget_core_coll_tag_cloud .tag_cloud a:hover, #main-footer .main_widget .widget_core_coll_tag_cloud .tag_cloud a:active, #main-footer .main_widget .widget_core_coll_tag_cloud .tag_cloud a:focus,\n\t\t\t.bt-top:hover, .bt-top:focus, .bt-top:active,\n\t\t\t.disp_single #feedbacks .evo_comment__meta_info a:hover, .disp_page #feedbacks .evo_comment__meta_info a:hover,\n\t\t\t#comment_form .evo_form .submit,\n\t\t\t#comment_form .evo_form .preview:hover, #comment_form .evo_form .preview:focus, #comment_form .evo_form .preview:active,\n\t\t\t.widget_core_user_login .submit:hover, .widget_core_user_register .submit:hover,\n\t\t\t.disp_single #main-content .pager .previous a::before, .disp_page #main-content .pager .previous a::before, .disp_single #main-content .pager .next a::before, .disp_page #main-content .pager .next a::before,\n\t\t\t.evo_post_comment_notification .btn:hover, .evo_post_comment_notification .btn:active, .evo_post_comment_notification .btn:focus,\n\t\t\t.disp_threads #main-content .submit, .disp_messages #main-content .submit, .disp_contacts #main-content .submit, .disp_msgform #main-content .submit,\n\t\t\t.disp_user #main-content .pager a:hover, .disp_user #main-content .pager a:focus, .disp_user #main-content .pager a:active\n\t\t\t{ background-color: '.$color.'; }\n\n\t\t\t.widget_core_coll_search_form .search .search_field,\n\t\t\t.widget_core_coll_search_form .search .search_submit,\n\t\t\t.bt-top:hover, .bt-top:focus, .bt-top:active,\n\t\t\t.disp_single #feedbacks .evo_comment__meta_info a:hover, .disp_page #feedbacks .evo_comment__meta_info a:hover,\n\t\t\t#comment_form .evo_form .form_text_input:focus, #comment_form .evo_form .form_textarea_input:focus,\n\t\t\t#comment_form .evo_form .submit,\n\t\t\t#comment_form .evo_form .preview:hover, #comment_form .evo_form .preview:focus, #comment_form .evo_form .preview:active,\n\t\t\t.widget_core_user_login .submit:hover, .widget_core_user_register .submit:hover,\n\t\t\t.disp_single #main-content .pager .previous a:hover, .disp_page #main-content .pager .previous a:hover, .disp_single #main-content .pager .next a:hover, .disp_page #main-content .pager .next a:hover,\n\t\t\t.evo_post_comment_notification .btn:hover, .evo_post_comment_notification .btn:active, .evo_post_comment_notification .btn:focus,\n\t\t\t.disp_threads #main-content .submit, .disp_messages #main-content .submit, .disp_contacts #main-content .submit, .disp_msgform #main-content .submit\n\t\t\t{ border-color: '.$color.'; }\n\t\t\t';\n\t\t}\n\n\n\t\t// Site Background\n\t\tif ( $this->get_setting( 'background_type' ) == 'color' ) {\n\t\t\t$color = $this->get_setting( 'site_background_color' );\n\t\t\t$custom_css .= '#skin_wrapper {background-color: '.$color.';}';\n\t\t}\n\n\t\t$bg_image = $this->get_setting( 'bg_image' );\n\t\tif ( $this->get_setting( 'background_type' ) == 'images' && $bg_image ) {\n\t\t\tif($bg_image == \"none\") {\n\t\t\t\t$custom_css .= \"#skin_wrapper { background: transparent; }\";\n\t\t\t} else {\n\t\t\t\t$custom_css .= \"#skin_wrapper { background-image: url('\".$bg_image.\"');}\";\n\t\t\t}\n\t\t}\n\n\t\t// User custom bg images setting\n\t\t$bg_image_custom = $this->get_setting( 'bg_image_custom' );\n\t\tif ( $this->get_setting( 'background_type' ) == 'custom_images' && $bg_image_custom ) {\n\t\t\tif($bg_image_custom == \"none\")\n\t\t\t{\n\t\t\t\t$custom_css .= \"#skin_wrapper { background: transparent; }\";\n\t\t\t} else {\n\t\t\t\t$custom_css .= \"#skin_wrapper { background-image: url('\".$bg_image_custom.\"');}\";\n\t\t\t}\n\t\t}\n\n\t\t$bg_image_custom_attach = $this->get_setting( 'bg_image_custom_attach' );\n\t\tif ( $this->get_setting( 'background_type' ) == 'custom_images' && $bg_image_custom_attach ) {\n\t\t\tif ( $bg_image_custom_attach == 'initial' ) {\n\t\t\t\t$custom_css .= \"#skin_wrapper { background-attachment: initial; }\";\n\t\t\t} else {\n\t\t\t\t$custom_css .= \"#skin_wrapper { background-attachment: fixed; }\";\n\t\t\t}\n\t\t}\n\n\t\t$bg_image_custom_size = $this->get_setting( 'bg_image_custom_size' );\n\t\tif ( $this->get_setting( 'background_type' ) == 'custom_images' && $bg_image_custom_size ) {\n\t\t\tif ( $bg_image_custom_size == 'auto' ) {\n\t\t\t\t$custom_css .= \"#skin_wrapper { background-size: auto; }\";\n\t\t\t} else if ( $bg_image_custom_size == 'contain' ){\n\t\t\t\t$custom_css .= \"#skin_wrapper { background-size: contain; }\";\n\t\t\t} else {\n\t\t\t\t$custom_css .= \"#skin_wrapper { background-size: cover; }\";\n\t\t\t}\n\t\t}\n\n\t\tif ( $bg = $this->get_setting( 'bg_wrap_content' ) ) {\n\t\t\t$custom_css .= '#main-content .evo_post, #main-content .evo_featured_post, .disp_posts #main-content .evo_featured_post, div.error_404, .msg_nothing, #main-content .title_head_post, #main-sidebar .evo_widget, #content .evo_widget, .disp_comments #main-content .evo_comment, .disp_user #main-content .profile_content, .disp_threads #main-content, .disp_messages #main-content, .disp_contacts #main-content, .disp_msgform #main-content, .disp_threads #main-content .title_head_post, .disp_messages #main-content .title_head_post, .disp_contacts #main-content .title_head_post, .disp_msgform #main-content .title_head_post, .disp_help #main-content, .disp_users .results .filters, .disp_users .results .table_scroll, .disp_access_requires_login #main-content, .disp_lostpassword #main-content, .disp_login #main-content, .disp_register #main-content, .disp_search #main-content, .disp_search #main-content .title_head_post, .disp_search #main-content .search_result, .disp_404 #main-content, .disp_front #main-content .evo_widget, .disp_sitemap #main-content h3, .disp_messages #main-content, .disp_messages #main-content .title_head_post, .disp_profile #main-content .evo_form .panel-body, .disp_avatar #main-content .evo_form .panel-body, .disp_pwdchange #main-content .evo_form .panel-body, .disp_userprefs #main-content .evo_form .panel-body, .disp_subs #main-content .evo_form .panel-body, .disp_mediaidx #main-content .evo_image_index .note\n\t\t\t{ background-color: '.$bg.'; }';\n\t\t\t$custom_css .= '.disp_mediaidx #main-content .evo_image_index .item{ border-color: '.$bg.' }';\n\t\t}\n\n\t\t/**\n\t\t * ============================================================================\n\t\t * Page Setting\n\t\t * ============================================================================\n\t\t */\n\t\tif( $font = $this->get_setting('page_font_size') ) {\n\t\t\t$custom_css .= '#skin_wrapper { font-size: '.$font.'px }';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'page_info_color' ) ) {\n\t\t\t$custom_css .= '.disp_posts #main-content .evo_post .small.text-muted, .disp_posts #main-content .evo_featured_post .small.text-muted, .disp_page #main-content .evo_post .small.text-muted, .disp_page #main-content .evo_featured_post .small.text-muted, .disp_single #main-content .evo_post .small.text-muted, .disp_single #main-content .evo_featured_post .small.text-muted { color: '.$color.' }';\n\t\t}\n\n\t\tif ( $color =$this->get_setting( 'page_info_link' ) ) {\n\t\t\t$custom_css .= '.disp_posts #main-content .evo_post .small.text-muted span, .disp_posts #main-content .evo_featured_post .small.text-muted span, #main-content .evo_post .small.text-muted a, .disp_posts #main-content .evo_featured_post .small.text-muted a, .disp_page #main-content .evo_post .small.text-muted span, .disp_page #main-content .evo_featured_post .small.text-muted span, #main-content .evo_post .small.text-muted a, .disp_page #main-content .evo_featured_post .small.text-muted a, .disp_single #main-content .evo_post .small.text-muted span, .disp_single #main-content .evo_featured_post .small.text-muted span, #main-content .evo_post .small.text-muted a, .disp_single #main-content .evo_featured_post .small.text-muted a { color: '.$color.' }';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'page_content_color' ) ) {\n\t\t\t$custom_css .= '#skin_wrapper, .disp_single #feedbacks, .disp_page #feedbacks, #content .evo_widget, .disp_posts #main-content .evo_post__full_text, .disp_posts #main-content .evo_post__excerpt_text, .disp_page #main-content .evo_post__full_text, .disp_page #main-content .evo_post__excerpt_text, .disp_single #main-content .evo_post__full_text, .disp_single #main-content .evo_post__excerpt_text, .disp_comments #main-content .evo_comment .evo_comment_text, .disp_search #main-content .msg_nothing, .disp_search #main-content .search_result .search_content_wrap .result_content\n\t\t\t{ color: '.$color.' !important}';\n\t\t}\n\n\t\tif( $color = $this->get_setting( 'page_heading_color' ) ) {\n\t\t\t$custom_css .= 'h1, h2, h3, h4, h5, h6,\n\t\t\t.disp_front #main-content .evo_widget .title_widget, .disp_mediaidx #main-content .evo_image_index .note, .disp_404 .error_404 .fa-warning, div.error_404 .fa-warning, .disp_search #main-content .search_result .search_content_wrap .search_title, .disp_search #main-content .search_result .search_content_wrap .search_title a\n\t\t\t{ color: '.$color.' }';\n\t\t\t$custom_css .= '.disp_front #main-content .evo_widget .title_widget::after { background-color: '.$color.' }';\n\t\t}\n\n\n\n\t\t/**\n\t\t* ============================================================================\n\t\t* Header Settings Output\n\t\t* ============================================================================\n\t\t*/\n\t\tif ( $width = $this->get_setting( 'head_center_mode' ) ) {\n\t\t\t$custom_css .= '\n\t\t\t@media only screen and ( max-width: '.$width.'px )\n\t\t\tand ( min-width: 768px ) {\n\t\t\t\t#main-header .col-md-4,\n\t\t\t\t#main-header .col-md-8 {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t\tmargin: 0 auto;\n\t\t\t\t}\n\n\t\t\t\t#main-header {\n\t\t\t\t\tpadding-bottom: 2rem;\n\t\t\t\t}\n\n\t\t\t\t#main-header .col-md-4{\n\t\t\t\t\tmargin-bottom: 15px;\n\t\t\t\t}\n\n\t\t\t\t.navbar-collapse .nav.nav-tabs {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t\tmargin: 0 auto;\n\t\t\t\t\tfloat: none;\n\t\t\t\t}\n\t\t\t}\n\t\t\t';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'header_bg_color' ) ) {\n\t\t\t$custom_css .= 'body #main-header { background-color: '.$color.' }';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'nav_color_link' ) ) {\n\t\t\t$custom_css .= '.navbar-collapse .nav.nav-tabs li a{ color: '.$color.' }';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'nav_color_hovlink' ) ) {\n\t\t\t$custom_css .= '.navbar-collapse .nav.nav-tabs li a:hover { color: '.$color.' }';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'head_tagline_bg_color' ) ) {\n\t\t\t$custom_css .= 'body #head_tagline { background-color: '.$color.\" }\\n\";\n\t\t}\n\n\t\t/**\n\t\t* ============================================================================\n\t\t* Posts\n\t\t* ============================================================================\n\t\t*/\n\t\tif ( $color = $this->get_setting( 'posts_title_color' ) ) {\n\t\t\t$custom_css .= '\n\t\t\t.disp_posts #main-content .evo_post_title h1 a, .disp_posts #main-content .evo_post_title h2 a, .disp_posts #main-content .evo_post_title h3 a,\n\t\t\t.disp_posts #main-content .evo_post .evo_post__full h1, .disp_posts #main-content .evo_featured_post .evo_post__full h1, .disp_posts #main-content .evo_post .evo_post__excerpt h1, .disp_posts #main-content .evo_featured_post .evo_post__excerpt h1, .disp_posts #main-content .evo_post .evo_post__full h2, .disp_posts #main-content .evo_featured_post .evo_post__full h2, .disp_posts #main-content .evo_post .evo_post__excerpt h2, .disp_posts #main-content .evo_featured_post .evo_post__excerpt h2, .disp_posts #main-content .evo_post .evo_post__full h3, .disp_posts #main-content .evo_featured_post .evo_post__full h3, .disp_posts #main-content .evo_post .evo_post__excerpt h3, .disp_posts #main-content .evo_featured_post .evo_post__excerpt h3, .disp_posts #main-content .evo_post .evo_post__full h4, .disp_posts #main-content .evo_featured_post .evo_post__full h4, .disp_posts #main-content .evo_post .evo_post__excerpt h4, .disp_posts #main-content .evo_featured_post .evo_post__excerpt h4, .disp_posts #main-content .evo_post .evo_post__full h5, .disp_posts #main-content .evo_featured_post .evo_post__full h5, .disp_posts #main-content .evo_post .evo_post__excerpt h5, .disp_posts #main-content .evo_featured_post .evo_post__excerpt h5, .disp_posts #main-content .evo_post .evo_post__full h6, .disp_posts #main-content .evo_featured_post .evo_post__full h6, .disp_posts #main-content .evo_post .evo_post__excerpt h6, .disp_posts #main-content .evo_featured_post .evo_post__excerpt h6,\n\t\t\t.disp_posts #main-content .post_tags h3\n\t\t\t{ color: '.$color.' }\n\t\t\t';\n\t\t}\n\n\t\t// if ( $color = $this->get_setting( 'posts_info_color' ) ) {\n\t\t// \t$custom_css .= '.disp_posts #main-content .evo_post .small.text-muted, .disp_posts #main-content .evo_featured_post .small.text-muted { color: '.$color.' }';\n\t\t// }\n\t\t//\n\t\t// if ( $color =$this->get_setting( 'posts_info_link' ) ) {\n\t\t// \t$custom_css .= '.disp_posts #main-content .evo_post .small.text-muted span, .disp_posts #main-content .evo_featured_post .small.text-muted span, #main-content .evo_post .small.text-muted a, .disp_posts #main-content .evo_featured_post .small.text-muted a { color: '.$color.' }';\n\t\t// }\n\t\t//\n\t\t// if ( $color = $this->get_setting( 'posts_content_color' ) ) {\n\t\t// \t$custom_css .= '.disp_posts #main-content .evo_post__full_text, .disp_posts #main-content .evo_post__excerpt_text { color: '.$color.' }';\n\t\t// }\n\n\t\t/**\n\t\t* ============================================================================\n\t\t* Tags\n\t\t* ============================================================================\n\t\t*/\n\t\tif ( $color = $this->get_setting( 'tags_color' ) ) {\n\t\t\t$custom_css .= '#main-content .post_tags a, .tag_cloud a, #main-content .post_tags a::before { color: '.$color.' }';\n\t\t}\n\t\tif ( $bg = $this->get_setting( 'tags_bg' ) ) {\n\t\t\t$custom_css .= '#main-content .post_tags a, .tag_cloud a { background-color: '.$bg.' }';\n\t\t}\n\t\tif ( $this->get_setting( 'tags_icon' ) == 0 ) {\n\t\t\t$custom_css .= '#main-content .post_tags a::before, .tag_cloud a::before { content: \\'\\'; display: none }';\n\t\t}\n\n\t\t/**\n\t\t* ============================================================================\n\t\t* Sidebar Widget Options\n\t\t* ============================================================================\n\t\t*/\n\t\t// if ( $bg = $this->get_setting( 'side_bg_wrap' ) ) {\n\t\t// \t$custom_css .= '#main-sidebar .evo_widget { background-color: '. $bg .' }';\n\t\t// }\n\t\tif ( $color = $this->get_setting( 'side_widget_title' ) ) {\n\t\t\t$custom_css .= '#main-sidebar .evo_widget .panel-title { color: '.$color.' }';\n\t\t\t$custom_css .= '#main-sidebar .evo_widget .panel-title::after { background-color: '.$color.' }';\n\t\t}\n\t\tif ( $color = $this->get_setting( 'side_widget_content' ) ) {\n\t\t\t$custom_css .= '\n\t\t\t#main-sidebar .evo_widget,\n\t\t\t#main-sidebar .widget_core_user_login .user_group,\n\t\t\t#main-sidebar .widget_core_user_login .user_level\n\t\t\t{ color: '.$color.' }';\n\t\t}\n\t\tif ( $border = $this->get_setting( 'side_border' ) ) {\n\t\t\t$custom_css .= '\n\t\t\t#content .evo_widget ul li,\n\t\t\t#content .evo_widget ul > ul > li:last-child,\n\t\t\t.widget_core_linkblog ul ul, .widget_core_content_hierarchy ul ul,\n\t\t\t.widget_core_coll_xml_feeds .notes\n\t\t\t{ border-color: '.$border.' }';\n\t\t}\n\t\tif( $color = $this->get_setting( 'side_widget_link' ) ) {\n\t\t\t$custom_css .= '#main-sidebar .evo_widget a { color: '.$color.' }';\n\t\t}\n\n\t\t/**\n\t\t * ============================================================================\n\t\t * UIL Widget Settings\n\t\t * ============================================================================\n\t\t */\n\t\tif ( $this->get_setting( 'uil_widget_readmore' ) == 0 ) {\n\t\t\t$custom_css .= 'div.widget_core_coll_item_list.evo_noexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_featured_posts.evo_noexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_post_list.evo_noexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_page_list.evo_noexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_related_post_list.evo_noexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_item_list.evo_withexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_featured_posts.evo_withexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_post_list.evo_withexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_page_list.evo_withexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_related_post_list.evo_withexcerpt.evo_withteaser div.item_content > a, div.widget_core_coll_item_list.evo_withexcerpt.evo_noteaser div.item_content > a, div.widget_core_coll_featured_posts.evo_withexcerpt.evo_noteaser div.item_content > a, div.widget_core_coll_post_list.evo_withexcerpt.evo_noteaser div.item_content > a, div.widget_core_coll_page_list.evo_withexcerpt.evo_noteaser div.item_content > a, div.widget_core_coll_related_post_list.evo_withexcerpt.evo_noteaser div.item_content > a, div.widget_core_coll_item_list.evo_noexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_featured_posts.evo_noexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_post_list.evo_noexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_page_list.evo_noexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_related_post_list.evo_noexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_item_list.evo_withexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_featured_posts.evo_withexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_post_list.evo_withexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_page_list.evo_withexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_related_post_list.evo_withexcerpt.evo_withteaser div.item_excerpt > a, div.widget_core_coll_item_list.evo_withexcerpt.evo_noteaser div.item_excerpt > a, div.widget_core_coll_featured_posts.evo_withexcerpt.evo_noteaser div.item_excerpt > a, div.widget_core_coll_post_list.evo_withexcerpt.evo_noteaser div.item_excerpt > a, div.widget_core_coll_page_list.evo_withexcerpt.evo_noteaser div.item_excerpt > a, div.widget_core_coll_related_post_list.evo_withexcerpt.evo_noteaser div.item_excerpt > a { display: none }';\n\t\t}\n\n\t\t/**\n\t\t* ============================================================================\n\t\t* Footer Settings Output\n\t\t* ============================================================================\n\t\t*/\n\t\tif ( $bg_color = $this->get_setting( 'footer_bg_color' ) ) {\n\t\t\t$custom_css .= 'body #main-footer { background-color: '.$bg_color.\" }\\n\";\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'footer_widget_title' ) ) {\n\t\t\t$custom_css .= '#main-footer .main_widget .title_widget,\n\t\t\t#main-footer .main_widget .widget_core_org_members .user_link h3 { color: '.$color.' }';\n\t\t\t$custom_css .= '#main-footer .main_widget .title_widget::before { background-color: '.$color.' }';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'footer_sm_color' ) ) {\n\t\t\t$custom_css .= '#main-footer .footer_social_media .ufld_icon_links a span, #main-footer .footer_social_media .ufld_icon_links a .fa { color: '.$color.' }';\n\t\t\t$custom_css .= '#main-footer .footer_social_media .ufld_icon_links a:hover span, #main-footer .footer_social_media .ufld_icon_links a:hover .fa { color: #FFFFFF }';\n\t\t}\n\n\t\tif ( $bg_color = $this->get_setting( 'footer_sm_bgcolor' ) ) {\n\t\t\t$custom_css .= '#main-footer .footer_social_media{ background-color: '.$bg_color.' }';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'footer_widget_content' ) ) {\n\t\t\t$custom_css .= '#main-footer .main_widget { color: '.$color.' }';\n\t\t}\n\n\t\tif( $link = $this->get_setting( 'footer_widget_link' ) ) {\n\t\t\t$custom_css .= '#main-footer .main_widget a { color: '.$link.' }';\n\t\t}\n\n\t\tif ( $border_color = $this->get_setting( 'footer_border_color' ) ) {\n\t\t\t$custom_css .= '#main-footer .main_widget ul li, #main-footer .main_widget ul > ul > li:last-child { border-color: '.$border_color.'; }';\n\t\t\t$custom_css .= '#main-footer .footer_social_media, #main-footer .copyright,\n\t\t\t#main-footer .main_widget .widget_core_coll_xml_feeds .notes,\n\t\t\t#main-footer #content .evo_widget ul li, #main-footer #content .evo_widget ul > ul > li:last-child, #main-footer .widget_core_linkblog ul ul, #main-footer .widget_core_content_hierarchy ul ul, #main-footer .widget_core_coll_xml_feeds .notes\n\t\t\t{ border-color: '.$border_color.'; }';\n\t\t}\n\n\t\tif ( $bg_color = $this->get_setting( 'footer_tags_bg' ) ) {\n\t\t\t$custom_css .= '#main-footer .evo_widget .tag_cloud a { background-color: '.$bg_color.'; }';\n\t\t}\n\n\t\tif ( $color = $this->get_setting( 'footer_copyright_content' ) ) {\n\t\t\t$custom_css .= '#main-footer .copyright .copyright_text { color: '.$color.' }';\n\t\t}\n\n\t\tif ( $link = $this->get_setting( 'footer_copyright_link' ) ) {\n\t\t\t$custom_css .= '#main-footer .copyright .copyright_text a { color: '.$link.' }';\n\t\t}\n\n\t\t/**\n\t\t* ============================================================================\n\t\t* Mediaidx Custom Style\n\t\t* ============================================================================\n\t\t*/\n\t\tif ( $padding = $this->get_setting( 'padding_column' ) ) {\n\t\t\t$custom_css .= '.disp_mediaidx #main-content .evo_image_index .grid-item { padding: '.$padding.'px; }';\n\t\t\t$custom_css .= '.disp_mediaidx #main-content .evo_image_index { margin-left: -'.$padding.'px; margin-right: -'.$padding.'px; }';\n\t\t}\n\n\t\t/**\n\t\t* ============================================================================\n\t\t* Output CSS\n\t\t* ============================================================================\n\t\t*/\n\t\tif( ! empty( $custom_css ) )\n\t\t{ // Function for custom_css:\n\t\t\t$custom_css = '<style type=\"text/css\">\n\t\t\t<!--\n\t\t\t'.$custom_css.'\n\t\t\t-->\n\t\t\t</style>';\n\t\t\tadd_headline( $custom_css );\n\t\t}\n\n\t}",
"protected function _init()\n\t{\n\t\t// inicializando controladores auxiliares\n\t\t$this->_initControllers();\n\t\t\n\t\treturn;\n\t}",
"private function setup_actions() {\r\n\r\n\t\t// Register panels, sections, settings, controls, and partials.\r\n\t\tadd_action( 'customize_register', array( $this, 'sections' ) );\r\n\r\n\t\t// Register scripts and styles for the controls.\r\n\t\tadd_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 );\r\n\t}",
"public function initialize(array $config)\n {\n $this->Controller = $this->_registry->getController();\n }",
"public function initialize() {\n\t\t$this->registerMethod(\"getSettings\");\n\t\t$this->registerMethod(\"setSettings\");\n\t}",
"public function __construct() {\n\t\t\t// register actions\n\t\t\tadd_action( 'admin_menu', array( $this, 'add_menu' ) );\n\t\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'load_front_resources' ) );\n\t\t}",
"function flashMessengerInit()\n\t{\n\t\t/* Getting instance of FlashMessenger Action Helper */\n\t\t$this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');\n\t\t\n\t\t/* Getting stored messages on FlashMessenger and setting in view */\n\t\t$this->view->flashMessengerAlerts = $this->_flashMessenger->getMessages();\n\t}"
] | [
"0.75785637",
"0.6443326",
"0.6224997",
"0.6098496",
"0.598416",
"0.5869184",
"0.5835527",
"0.5799894",
"0.57730573",
"0.57526785",
"0.5747028",
"0.57194054",
"0.5713494",
"0.57098883",
"0.56878674",
"0.5687003",
"0.56636167",
"0.5652091",
"0.56279916",
"0.5623306",
"0.5611123",
"0.5608464",
"0.5528248",
"0.5520087",
"0.54926807",
"0.5472227",
"0.547142",
"0.5461131",
"0.5459734",
"0.5455224",
"0.54543203",
"0.5454128",
"0.5454025",
"0.5453739",
"0.54418254",
"0.5436298",
"0.54259074",
"0.5407578",
"0.5399164",
"0.53961617",
"0.53952765",
"0.53871894",
"0.5385057",
"0.5372726",
"0.5366243",
"0.5365618",
"0.53592217",
"0.53491694",
"0.5344071",
"0.5342638",
"0.53335",
"0.5328926",
"0.5325945",
"0.53229964",
"0.5319229",
"0.53166735",
"0.5313988",
"0.53104246",
"0.5305566",
"0.52965474",
"0.5290512",
"0.52866805",
"0.5283385",
"0.52787334",
"0.527374",
"0.5268201",
"0.526654",
"0.5265095",
"0.5264319",
"0.5262377",
"0.5261073",
"0.5259132",
"0.52589893",
"0.5256235",
"0.5243565",
"0.5243028",
"0.5241252",
"0.5240443",
"0.5236657",
"0.5235545",
"0.5234878",
"0.52292734",
"0.52253443",
"0.5218262",
"0.52156204",
"0.521449",
"0.521138",
"0.52006364",
"0.51951545",
"0.51925564",
"0.51923084",
"0.5191705",
"0.5188834",
"0.51886195",
"0.5187593",
"0.5178978",
"0.5174272",
"0.5173594",
"0.51695824",
"0.51597553"
] | 0.52837425 | 62 |
Register all rest API routes | public static function register_rest_routes() {
foreach (static::$apis as $api) {
$api->register_rest_route();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function register_routes() {\n $namespace = 'junglehunter/v1';\n register_rest_route(\n $namespace,\n '/all',\n array(\n 'methods' => 'GET',\n 'callback' => array($this, 'junglehunter_get_all')\n )\n );\n }",
"public function register_rest_routes() {\n\t\t$controllers = array(\n\t\t\t'GF_REST_Entries_Controller',\n\t\t\t'GF_REST_Entry_Properties_Controller',\n\t\t\t'GF_REST_Entry_Notifications_Controller',\n\t\t\t'GF_REST_Notes_Controller',\n\t\t\t'GF_REST_Entry_Notes_Controller',\n\t\t\t'GF_REST_Form_Entries_Controller',\n\t\t\t'GF_REST_Form_Results_Controller',\n\t\t\t'GF_REST_Form_Submissions_Controller',\n\t\t\t'GF_REST_Forms_Controller',\n\t\t\t'GF_REST_Feeds_Controller',\n\t\t\t'GF_REST_Form_Feeds_Controller',\n\t\t);\n\n\t\tforeach ( $controllers as $controller ) {\n\t\t\t$controller_obj = new $controller();\n\t\t\t$controller_obj->register_routes();\n\t\t}\n\t}",
"public function register_api_endpoints() {\n\n\t\tregister_rest_route( 'nock/v1', '/messages', array(\n\t\t\t'methods' => array( 'POST' ),\n\t\t\t'callback' => array( $this, 'send_message' ),\n\t\t) );\n\n\t\tregister_rest_route( 'nock/v1', '/accounts', array(\n\t\t\t'methods' => array( 'GET' ),\n\t\t\t'callback' => array( $this, 'get_accounts' ),\n\t\t) );\n\n\t\tregister_rest_route( 'nock/v1', '/groups', array(\n\t\t\t'methods' => array( 'GET' ),\n\t\t\t'callback' => array( $this, 'get_groups' ),\n\t\t) );\n\n\t\tregister_rest_route( 'nock/v1', '/sms', array(\n\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t'callback' => array( $this, 'capture_sms' ),\n\t\t) );\n\n\t}",
"public function register_rest_routes() {\n\t\t/**\n\t\t * Setting up custom route for podcast\n\t\t */\n\t\tregister_rest_route(\n\t\t\t'ssp/v1',\n\t\t\t'/podcast',\n\t\t\tarray(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => array( $this, 'get_rest_podcast' ),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Setting up custom route for podcast\n\t\t */\n\t\tregister_rest_route(\n\t\t\t'ssp/v1',\n\t\t\t'/podcast_update',\n\t\t\tarray(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'update_rest_podcast' ),\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * Setting up custom route for episodes\n\t\t */\n\t\t$controller = new Episodes_Controller();\n\t\t$controller->register_routes();\n\n\t}",
"public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => array(),\n\t\t\t)\n\t\t) );\n }",
"public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shops' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_shop' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/manager', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'register_shop_manager' ),\n\t\t\t)\n\t\t) );\n\t}",
"public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'parse_url_details' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'url' => array(\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'description' => __( 'The URL to process.' ),\n\t\t\t\t\t\t\t'validate_callback' => 'wp_http_validate_url',\n\t\t\t\t\t\t\t'sanitize_callback' => 'sanitize_url',\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'format' => 'uri',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'permission_callback' => array( $this, 'permissions_check' ),\n\t\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}",
"public function register_routes() {\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'args' => array(),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'update_item' ),\n\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}",
"private function registerApiRoutes(): void\n {\n $detect = app(Detect::class);\n $monitor = app(Monitor::class);\n\n $type = Settings::TYPE__ROUTE_API_FILE;\n if (!$detect->resourceEnabled($type)) {\n return;\n }\n\n $monitor->startTimer('register ' . $type);\n\n foreach ($detect->getRouteApiFiles() as $path) {\n Route::middleware($detect->routeApiMiddleware())\n ->group($detect->basePath($path));\n }\n $monitor->incRegCount($type, count($detect->getRouteApiFiles()));\n\n $monitor->stopTimer('register ' . $type);\n }",
"public function register_routes()\n {\n\n $namespace = 'api/v1';\n $base = 'categories';\n\n register_rest_route($namespace, '/' . $base, array(\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array($this, 'create_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n\n register_rest_route($namespace, '/' . $base . '/(?P<id>\\d+)', array(\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array($this, 'update_item'),\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(true),\n ),\n ));\n }",
"public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/location', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'update_user_location' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/quiz-result', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'save_quiz_result' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/ranking/(?P<park>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_ranking' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/point/(?P<slug>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_point' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/point/(?P<id>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'set_point_location' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/option/(?P<key>.+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_option' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/user', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'update_user' ),\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/photo', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'upload_photo' ),\n\t\t\t)\n\t\t) );\n\t}",
"protected function registerRoutes()\n {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n }",
"public function register_routes() {\n\n register_rest_route( $this->namespace, '/' . $this->base, array(\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array( $this->service, 'create' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => $this->get_endpoint_args_for_item_schema( true ),\n 'accept_json' => true\n ),\n ) );\n\n register_rest_route( $this->namespace, '/' . $this->base . '/(?P<id>[\\d]+)', array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this->service, 'get' ),\n 'permission_callback' => array( $this, 'getAllUserCheck' ),\n 'args' => array(\n 'context' => array(\n 'default' => 'view',\n )\n ),\n ),\n\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this->service, 'update' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => $this->get_endpoint_args_for_item_schema( false ),\n 'accept_json' => true\n ),\n\n array(\n 'methods' => WP_REST_Server::DELETABLE,\n 'callback' => array( $this->service, 'delete' ),\n 'permission_callback' => array( $this, 'getAdminUserCheck' ),\n 'args' => array(\n 'force' => array(\n 'default' => false,\n ),\n ),\n ),\n ) );\n }",
"public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<status>[\\w-]+)', array(\n\t\t\t'args' => array(\n\t\t\t\t'status' => array(\n\t\t\t\t\t'description' => __( 'An alphanumeric identifier for the status.' ),\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t\t'args' => array(\n\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}",
"public static function register_endpoints() {\n // endpoints will be registered here\n register_rest_route( Liang_API_Endpoints::$base_url, '/index', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( 'Liang_API_Endpoints', 'get_index' ),\n ) );\n }",
"public function register_routes(): void {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'methods' => WP_REST_Server::ALLMETHODS,\n\t\t\t\t\t'callback' => [ $this, 'status_check' ],\n\t\t\t\t\t'permission_callback' => [ $this, 'status_check_permissions_check' ],\n\t\t\t\t\t'args' => [\n\t\t\t\t\t\t'content' => [\n\t\t\t\t\t\t\t'description' => __( 'Test HTML content.', 'web-stories' ),\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t}",
"function register_routes(){\n \tregister_rest_route( parent::get_api_base(), $this->controller . 'get' , array(\n \t\t'methods' => WP_REST_Server::READABLE,\n \t\t'callback' => array($this,'run_cron'),\n\n \t\t//'permission_callback' => array( $this, 'get_item_permissions_check' ),\n \t));\n\t}",
"public function register_routes() {\n\t\t$version = '1';\n\t\t$namespace = 'askmedesk/v' . $version;\n register_rest_route( $namespace, '/tipi-richiesta', array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => [$this, 'get_tipi_richiesta'],\n 'permission_callback' => [$this, 'askmedesk_permission_check']\n\t\t));\n\t\tregister_rest_route($namespace, '/creazione-richiesta', array(\n\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t'callback' => [$this, 'crea_richiesta'],\n\t\t\t'permission_callback' => [$this, 'askmedesk_permission_check'],\n\t\t\t'args' => $this->get_endpoint_args_for_item_schema( false )\n\t\t));\n\t}",
"public function register_routes() {\n\t\tregister_rest_route( $this->namespace, $this->route, [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_options']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_options'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_options'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\n\t\tregister_rest_route( $this->namespace, $this->route . '/(?P<slug>.+)', [\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => [$this, 'get_option']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => [$this, 'update_option'],\n\t\t\t\t'permission_callback' => [$this, 'update_option_permissions_check']\n\t\t\t],\n\t\t\t[\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => [$this, 'delete_option'],\n\t\t\t\t'permission_callback' => [$this, 'delete_option_permissions_check']\n\t\t\t]\n\t\t] );\n\t}",
"public function register_routes() {\n\n\t\t$namespace = $this->namespace;\n\n\t\t$base = $this->rest_base;\n\n\t\tregister_rest_route( $namespace, '/' . $base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'create_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'create_item_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t) );\n\t}",
"public function routes()\n {\n register_rest_route('can', '/donation-forms', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'fundraisingPages'\n ],\n ]);\n\n register_rest_route('can', '/forms', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'forms'\n ],\n ]);\n\n register_rest_route('can', '/petitions', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'petitions'\n ],\n ]);\n\n register_rest_route('can', '/person/add', [\n 'methods' => 'GET',\n 'callback' => [\n $this, 'addPerson'\n ],\n ]);\n }",
"function register_rest_routes() {\n\tif ( class_exists( '\\WP_REST_Controller' ) ) {\n\t\tinclude_once __DIR__ . '/wprest-shortcodes-controller.php';\n\t\t$controller = new rest\\WPREST_Shortcodes_Controller();\n\t\t$controller->register_routes();\n\t}\n}",
"protected function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n });\n }",
"protected function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n });\n }",
"public function add_rest_api_routes() {\n\t\t// Clerk setting get configuration endpoint.\n\t\tregister_rest_route(\n\t\t\t'clerk',\n\t\t\t'/getconfig',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t\t'callback' => array( $this, 'getconfig_endpoint_callback' ),\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t// Clerk setting set configuration endpoint.\n\t\tregister_rest_route(\n\t\t\t'clerk',\n\t\t\t'/setconfig',\n\t\t\tarray(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'setconfig_endpoint_callback' ),\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t// Product endpoint.\n\t\tregister_rest_route(\n\t\t\t'clerk',\n\t\t\t'/product',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t\t'callback' => array( $this, 'product_endpoint_callback' ),\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t// Product endpoint.\n\t\tregister_rest_route(\n\t\t\t'clerk',\n\t\t\t'/page',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t\t'callback' => array( $this, 'page_endpoint_callback' ),\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t// Category endpoint.\n\t\tregister_rest_route(\n\t\t\t'clerk',\n\t\t\t'/category',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t\t'callback' => array( $this, 'category_endpoint_callback' ),\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t// Order endpoint.\n\t\tregister_rest_route(\n\t\t\t'clerk',\n\t\t\t'/order',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t\t'callback' => array( $this, 'order_endpoint_callback' ),\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t// Customer endpoint.\n\t\tregister_rest_route(\n\t\t\t'clerk',\n\t\t\t'/customer',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t\t'callback' => array( $this, 'customer_endpoint_callback' ),\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t// Version endpoint.\n\t\tregister_rest_route(\n\t\t\t'clerk',\n\t\t\t'/version',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t\t'callback' => array( $this, 'version_endpoint_callback' ),\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t// Version endpoint.\n\t\tregister_rest_route(\n\t\t\t'clerk',\n\t\t\t'/plugin',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t\t'callback' => array( $this, 'plugin_endpoint_callback' ),\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\n\t\t// Log endpoint.\n\t\tregister_rest_route(\n\t\t\t'clerk',\n\t\t\t'/log',\n\t\t\tarray(\n\t\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t\t'callback' => array( $this, 'log_endpoint_callback' ),\n\t\t\t\t'permission_callback' => '__return_true',\n\t\t\t)\n\t\t);\n\t}",
"private function register_routes() {\n\t\t$routes = $this->get_routes();\n\t\tforeach ( $routes as $route ) {\n\t\t\t$route->register();\n\t\t}\n\t}",
"protected function registerRoutes()\n {\n $this->registerWebRoutes();\n $this->registerApiRoutes();\n }",
"private function registerRoutes(){\n $appRouter = require_once __DIR__.'/../../routes/app.php';\n $this->registerApplicationRoutes($appRouter);\n $this->registerApplicationRoutes($appRouter, false);\n $this->registerAuthenticationRoutes();\n }",
"public function register_routes() {\n register_rest_route( $this->namespace, '/' . $this->rest_base, array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this, 'get_items' ),\n 'permission_callback' => array( $this, 'get_items_permissions_check' ),\n 'args' => $this->get_collection_params(),\n 'show_in_index' => true,\n ),\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array( $this, 'create_item' ),\n 'permission_callback' => array( $this, 'create_item_permissions_check' ),\n 'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ),\n 'show_in_index' => true,\n ),\n 'schema' => array( $this, 'get_public_item_schema' ),\n ) );\n\n register_rest_route( $this->namespace, '/back_project', array(\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array($this, 'backProjectApiCallback'),\n 'permission_callback' => array( $this, 'get_items_permissions_check' ),\n 'args' => array(\n 'project_id' => array(\n 'validate_callback' => function($param, $request, $key) {\n return is_numeric( $param );\n }\n ),\n 'amount' => array(\n 'validate_callback' => function($param, $request, $key) {\n return is_numeric( $param );\n }\n ),\n ),\n ),\n ) );\n\n register_rest_route( $this->namespace, '/get_balance', array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array($this, 'getBalance'),\n 'permission_callback' => array( $this, 'get_items_permissions_check' ),\n ),\n ) );\n\n register_rest_route( $this->namespace, '/get_transactions', array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array($this, 'getTransactions'),\n 'permission_callback' => array( $this, 'get_items_permissions_check' ),\n ),\n ) );\n\n /**\n * endpoint for sending coins to all accounts\n */\n register_rest_route( $this->namespace, '/setCoinsToAll', array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array($this, 'setCoinsToAll'),\n 'permission_callback' => array( $this, 'get_items_permissions_check' ),\n 'args' => array(\n 'amount' => array(\n 'validate_callback' => function($param, $request, $key) {\n return is_numeric( $param );\n }\n ),\n ),\n ),\n ) );\n\n register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\\d]+)', array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this, 'get_item' ),\n 'permission_callback' => array( $this, 'get_item_permissions_check' ),\n 'args' => array(\n 'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n ),\n 'show_in_index' => true,\n ),\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this, 'update_item' ),\n 'permission_callback' => array( $this, 'update_item_permissions_check' ),\n 'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),\n 'show_in_index' => true,\n ),\n array(\n 'methods' => WP_REST_Server::DELETABLE,\n 'callback' => array( $this, 'delete_item' ),\n 'permission_callback' => array( $this, 'delete_item_permissions_check' ),\n 'args' => array(\n 'force' => array(\n 'default' => true,\n 'description' => __( 'Whether to bypass trash and force deletion.' ),\n ),\n ),\n 'show_in_index' => false,\n ),\n 'schema' => array( $this, 'get_public_item_schema' ),\n ) );\n }",
"public function rest_api_init() {\n register_rest_route('h5p/v1', '/post/(?P<id>\\d+)', array(\n 'methods' => 'GET',\n 'callback' => array($this, 'rest_api_post'),\n 'args' => array(\n 'id' => array(\n 'validate_callback' => function ($param, $request, $key) {\n return $param == intval($param);\n }\n ),\n ),\n 'permission_callback' => array($this, 'rest_api_permission')\n ));\n\n register_rest_route('h5p/v1', 'all', array(\n 'methods' => 'GET',\n 'callback' => array($this, 'rest_api_all'),\n 'permission_callback' => array($this, 'rest_api_permission')\n ));\n }",
"function register_endpoints(){\n\t$route_base = 'wc/v1';\n\n\tregister_rest_route($route_base, '/posts', array(\n\t\t'methods' => 'GET',\n\t\t'callback' => 'api_get_posts',\n\t\t'permission_callback' => 'helper_authentication_check'\n\t));\n\n\tregister_rest_route($route_base, '/posts/(?P<post_id>\\d+)', array(\n\t\t'methods' => 'GET',\n\t\t'callback' => 'api_get_post',\n\t\t'permission_callback' => 'helper_authentication_check'\n\t));\n}",
"protected function registerRoutes() {\n\n $this->get('/crossword', 'getCrossword');\n $this->post('/crossword', 'saveUserState');\n //not used\n //$this->get('/crossword', 'getCrossword');\n //$this->get('/wordData', 'getWordData');\n //);\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"function registerEndpoints()\n{\n $namespace = 'travel-review-app/v1';\n\n register_rest_route(\n $namespace,\n '/destinations-default-wordpress',\n [\n 'methods' => 'GET',\n 'callback' => 'listDestinationsDefaultWordPress',\n ]\n );\n}",
"protected function registerApiRoutes()\n {\n if (config('firefly.api.enabled')) {\n Route::group(config('firefly.api'), function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/api.php');\n });\n }\n }",
"public function register_routes() {\n register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\\d]+)/feedback', [\n [\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => [$this, 'handle_feedback'],\n 'permission_callback' => array($this, 'create_item_permissions_check'),\n 'args' => [\n 'name' => [\n 'type' => 'string',\n 'sanitize_callback' => 'sanitize_text_field',\n ],\n 'email' => [\n 'description' => __('Email address of the author.'),\n 'type' => 'string',\n 'format' => 'email',\n ],\n 'subject' => [\n 'required' => true,\n 'type' => 'string',\n 'sanitize_callback' => 'sanitize_text_field',\n ],\n 'message' => [\n 'required' => true,\n 'type' => 'string',\n 'sanitize_callback' => 'sanitize_textarea_field',\n ],\n ],\n ]\n ] );\n\n register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\\d]+)/helpfullness', [\n [\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => [$this, 'update_helpfullness'],\n 'args' => [\n 'type' => [\n 'required' => true,\n 'type' => 'string',\n 'enum' => ['positive', 'negative'],\n ],\n ],\n ]\n ] );\n\n register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\\d]+)/parents', [\n [\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => [$this, 'get_parents'],\n ]\n ] );\n\n register_rest_route( $this->namespace, '/' . $this->rest_base . '/search', [\n [\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => [$this, 'search_docs'],\n 'args' => [\n 'query' => [\n 'required' => true,\n 'type' => 'string',\n 'description' => __('Limit results to those matching a string.', 'muiteer'),\n 'sanitize_callback' => 'sanitize_text_field',\n 'validate_callback' => 'rest_validate_request_arg',\n ],\n 'in' => [\n 'required' => false,\n 'type' => 'integer',\n 'description' => __('The ID for the parent of the object.', 'muiteer'),\n 'sanitize_callback' => 'absint',\n 'validate_callback' => 'rest_validate_request_arg',\n ],\n 'page' => array(\n 'description' => __('Current page of the collection.', 'muiteer'),\n 'type' => 'integer',\n 'default' => 1,\n 'sanitize_callback' => 'absint',\n 'validate_callback' => 'rest_validate_request_arg',\n 'minimum' => 1,\n ),\n 'per_page' => array(\n 'description' => __('Maximum number of items to be returned in result set.', 'muiteer'),\n 'type' => 'integer',\n 'default' => 10,\n 'minimum' => 1,\n 'maximum' => 100,\n 'sanitize_callback' => 'absint',\n 'validate_callback' => 'rest_validate_request_arg',\n ),\n ],\n ]\n ] );\n }",
"public function register_routes() {\n\t\tparent::register_routes();\n\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base . '/totals',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_totals' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_totals_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}",
"public function registerRoutes()\n {\n $namespace = $this->getNameSpace();\n\n register_rest_route($namespace, '/' . self::ROUTE_UPDATE_CALLBACK, [\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this, 'updateTrapp' ),\n 'permission_callback' => array( $this, 'updateTrappPermissions' ),\n ]);\n }",
"public function register_routes() {\n\n\t\t// Get current user per the JWT token. Depends on JWT plugin.\n\t\tregister_rest_route(\n\t\t\t'wpcampus',\n\t\t\t'/auth/user/',\n\t\t\t[\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => [ $this, 'get_current_user' ],\n\t\t\t]\n\t\t);\n\t}",
"function create_initial_rest_routes()\n {\n }",
"public static function registerEndpoints() {\n $register = register_rest_route(\n\t\t\t'UKM', \n\t\t\t'/informasjon/', \n\t\t\t[\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => ['UKMwpAPI', 'informasjonsMeny'],\n\t\t\t\t'args' => []\n\t\t\t]\n );\n\n /**\n * ENDPOINT 4: Innlegg i bloggen\n */\n $register = register_rest_route(\n\t\t\t'UKM', \n\t\t\t'/nyheter/', \n\t\t\t[\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => ['UKMwpAPI', 'nyheter'],\n\t\t\t\t'args' => []\n\t\t\t]\n );\n\n\n /**\n * ENDPOINT 5: Innlegg fra kategori\n */\n $register = register_rest_route(\n\t\t\t'UKM', \n\t\t\t'/kategori/(?P<id>\\d+)', \n\t\t\t[\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => ['UKMwpAPI', 'kategori'],\n\t\t\t\t'args' => []\n\t\t\t]\n );\n\n /**\n * ENDPOINT 1 Info om en gitt post\n */\n $register = register_rest_route(\n 'UKM',\n '/post/(?P<id>\\d+)',\n [\n 'methods' => 'GET',\n\t\t\t\t'callback' => ['UKMwpAPI', 'post'],\n 'args' => ['id']\n ]\n );\n\n /**\n * ENDPOINT 2: Innholdet i en post\n */\n $register = register_rest_route(\n 'UKM',\n '/content/(?P<id>\\d+)',\n [\n 'methods' => 'GET',\n\t\t\t\t'callback' => ['UKMwpAPI', 'postContent'],\n 'args' => ['id']\n ]\n );\n }",
"function register_api_routes() {\n\tregister_rest_route( Altis\\API_NAMESPACE, '/telemetry', [\n\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t'permission_callback' => function () {\n\t\t\treturn is_user_logged_in();\n\t\t},\n\t\t'callback' => __NAMESPACE__ . '\\\\handle_telemetry_endpoint',\n\t\t'args' => [\n\t\t\t'opt_in' => [\n\t\t\t\t'type' => 'boolean',\n\t\t\t\t'default' => false,\n\t\t\t],\n\t\t],\n\t] );\n}",
"public function register_routes() {\n\t\t$public_post_types = $this->post_type_helper->get_public_post_types();\n\n\t\tforeach ( $public_post_types as $post_type ) {\n\t\t\t\\register_rest_field( $post_type, self::YOAST_HEAD_FIELD_NAME, [ 'get_callback' => [ $this, 'for_post' ] ] );\n\t\t}\n\n\t\t$public_taxonomies = $this->taxonomy_helper->get_public_taxonomies();\n\n\t\tforeach ( $public_taxonomies as $taxonomy ) {\n\t\t\tif ( $taxonomy === 'post_tag' ) {\n\t\t\t\t$taxonomy = 'tag';\n\t\t\t}\n\t\t\t\\register_rest_field( $taxonomy, self::YOAST_HEAD_FIELD_NAME, [ 'get_callback' => [ $this, 'for_term' ] ] );\n\t\t}\n\n\t\t\\register_rest_field( 'user', self::YOAST_HEAD_FIELD_NAME, [ 'get_callback' => [ $this, 'for_author' ] ] );\n\n\t\t\\register_rest_field( 'type', self::YOAST_HEAD_FIELD_NAME, [ 'get_callback' => [ $this, 'for_post_type_archive' ] ] );\n\t}",
"private function buildRoutesRestApi()\n {\n // base route\n $route = RecipeRoute::class;\n $this->api->get('[/]', \"{$route}:getIndex\");\n $this->api->post('[/]', \"{$route}:postIndex\");\n $this->api->get('/{id: [1-9](?:[0-9]+)?}[/]', \"{$route}:getRecipeById\");\n $this->api->post('/{id: [1-9](?:[0-9]+)?}[/]', \"{$route}:postRecipeById\");\n $this->api->delete('/{id: [1-9](?:[0-9]+)?}[/]', \"{$route}:deleteRecipeById\");\n }",
"public function register_routes() {\n\n\t\t\\add_filter( 'do_parse_request', array( $this, 'handle_routing' ) );\n\n\t}",
"public static function register_endpoints() {\n\t\t\n $namespace = sprintf( 'wp/%s', API_VERSION );\n \n // Create a new blank package\n register_rest_route( $namespace, API_PREFIX . 'package/add', array(\n 'methods' => 'GET',\n 'callback' => array( 'Doolittle_Package_REST_API_Endpoints', 'add' ),\n ) );\n \n // Delete a package\n register_rest_route( $namespace, API_PREFIX . 'package/delete', array(\n 'methods' => 'POST',\n 'callback' => array( 'Doolittle_Package_REST_API_Endpoints', 'delete' ),\n 'args' => array(\n 'post_ids' => array(\n 'required' => true,\n 'type' => 'object',\n 'description' => 'Package post_ids',\n ) \n )\n ) );\n \n \n // Delete a package\n register_rest_route( $namespace, API_PREFIX . 'package/update', array(\n 'methods' => 'POST',\n 'callback' => array( 'Doolittle_Package_REST_API_Endpoints', 'update' ),\n 'args' => array(\n 'data' => array(\n 'required' => true,\n 'type' => 'object',\n 'description' => 'Package form',\n ) \n )\n ) );\n\t}",
"public function register_routes() {\n register_rest_route(\n $this->namespace, '/' . $this->base, array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this, 'get_announcements' ),\n 'args' => array_merge(\n $this->get_collection_params(), array(\n 'status' => array(\n 'type' => 'string',\n 'description' => __( 'Announcement status', 'dokan' ),\n 'required' => false,\n ),\n )\n ),\n 'permission_callback' => array( $this, 'get_announcement_permissions_check' ),\n ),\n array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => array( $this, 'create_announcement' ),\n 'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ),\n 'permission_callback' => array( $this, 'create_announcement_permissions_check' ),\n ),\n )\n );\n\n register_rest_route(\n $this->namespace, '/' . $this->base . '/(?P<id>[\\d]+)/', array(\n 'args' => array(\n 'id' => array(\n 'description' => __( 'Unique identifier for the object.', 'dokan' ),\n 'type' => 'integer',\n ),\n ),\n\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this, 'get_announcement' ),\n 'permission_callback' => array( $this, 'get_announcement_permissions_check' ),\n ),\n\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this, 'update_announcement' ),\n 'permission_callback' => array( $this, 'get_announcement_permissions_check' ),\n ),\n\n array(\n 'methods' => WP_REST_Server::DELETABLE,\n 'callback' => array( $this, 'delete_announcement' ),\n 'permission_callback' => array( $this, 'get_announcement_permissions_check' ),\n ),\n\n )\n );\n\n register_rest_route(\n $this->namespace, '/' . $this->base . '/(?P<id>[\\d]+)/restore', array(\n 'args' => array(\n 'id' => array(\n 'description' => __( 'Unique identifier for the object.', 'dokan' ),\n 'type' => 'integer',\n ),\n ),\n\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this, 'restore_announcement' ),\n 'permission_callback' => array( $this, 'restore_announcement_permissions_check' ),\n ),\n )\n );\n\n register_rest_route(\n $this->namespace, '/' . $this->base . '/batch', array(\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this, 'batch_items' ),\n 'permission_callback' => array( $this, 'batch_items_permissions_check' ),\n 'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),\n ),\n )\n );\n }",
"public function register_api_routes( Config $config ) {\n\t\t\\AM\\Endpoint\\Example_Endpoint::init( $config );\n\t}",
"public function registerRoutes() {\n $this->addRoute('default');\n }",
"public static function register(): void\n {\n if (! Route::hasMacro('apiMediaResource')) {\n Route::macro('apiMediaResource', function ($name, $controller) {\n Route::get(\"$name\", \"$controller@index\")->name(\"$name.index\");\n Route::get(\"$name/{media}\", \"$controller@show\")->where('media', '.*')->name(\"$name.show\");\n Route::patch(\"$name/{media}/rename\", \"$controller@rename\")->where('media', '.*')->name(\"$name.rename\");\n Route::post(\"$name/{media}/copy\", \"$controller@copy\")->where('media', '.*')->name(\"$name.copy\");\n Route::patch(\"$name/{media}/move\", \"$controller@move\")->where('media', '.*')->name(\"$name.move\");\n Route::post(\"$name/{media}/download\", \"$controller@download\")->where('media', '.*')->name(\"$name.download\");\n Route::delete(\"$name/delete\", \"$controller@delete\")->name(\"$name.delete\");\n Route::post(\"$name/upload\", \"$controller@upload\")->name(\"$name.upload\");\n Route::post(\"$name/add\", \"$controller@add\")->name(\"$name.add\");\n Route::post(\"$name/zip\", \"$controller@zip\")->name(\"$name.zip\");\n });\n }\n }",
"protected function routes()\n {\n Nova::routes()\n ->withAuthenticationRoutes()\n ->withPasswordResetRoutes()\n ->register();\n }",
"protected function routes()\n {\n Nova::routes()\n ->withAuthenticationRoutes()\n ->withPasswordResetRoutes()\n ->register();\n }",
"public function register() {\n\t\tadd_action(\n\t\t\t'rest_api_init',\n\t\t\tfunction() {\n\t\t\t\t$this->register_routes();\n\t\t\t}\n\t\t);\n\n\t\tadd_filter(\n\t\t\t'do_parse_request',\n\t\t\tfunction( $do_parse_request, $wp ) {\n\t\t\t\tadd_filter(\n\t\t\t\t\t'query_vars',\n\t\t\t\t\tfunction( $vars ) use ( $wp ) {\n\t\t\t\t\t\t// Unsets standard public query vars to escape conflicts between WordPress core\n\t\t\t\t\t\t// and Google Site Kit APIs which happen when WordPress incorrectly parses request\n\t\t\t\t\t\t// arguments.\n\n\t\t\t\t\t\t$unset_vars = ( $wp->request && stripos( $wp->request, trailingslashit( rest_get_url_prefix() ) . self::REST_ROOT ) !== false ) // Check regular permalinks.\n\t\t\t\t\t\t\t|| ( empty( $wp->request ) && stripos( $this->context->input()->filter( INPUT_GET, 'rest_route' ), self::REST_ROOT ) !== false ); // Check plain permalinks.\n\n\t\t\t\t\t\tif ( $unset_vars ) {\n\t\t\t\t\t\t\t// List of variable names to remove from public query variables list.\n\t\t\t\t\t\t\treturn array_values(\n\t\t\t\t\t\t\t\tarray_diff(\n\t\t\t\t\t\t\t\t\t$vars,\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'orderby',\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn $vars;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\treturn $do_parse_request;\n\t\t\t},\n\t\t\t10,\n\t\t\t2\n\t\t);\n\t}",
"public function register_routes() {\n # GET/POST /products\n $routes[$this->base] = array(\n array( array( $this, 'get_products' ), WC_API_Server::READABLE ),\n array( array( $this, 'create_product' ), WC_API_SERVER::CREATABLE | WC_API_Server::ACCEPT_DATA ),\n );\n }",
"function spf_register_route(){\n register_rest_route('wooapp/v1','/shop/products',Array(\n 'methods' => 'GET',\n 'callback' => 'spf_get_shop_products',\n ));\n\n register_rest_route('wooapp/v1', '/auth/register', [\n 'methods' => 'POST',\n 'callback' => 'spf_register_new_user',\n ]);\n\n register_rest_route('wooapp/v1', '/auth/login', [\n 'methods' => 'POST',\n 'callback' => 'spf_login_user',\n ]);\n}",
"function rest_api_register_rewrites()\n {\n }",
"public function register_routes() {\n\n\t\t\t$collection_params = $this->get_collection_params();\n\t\t\t$schema = $this->get_item_schema();\n\n\t\t\t$get_item_args = array(\n\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t);\n\n\t\t\tregister_rest_route(\n\t\t\t\t$this->namespace,\n\t\t\t\t'/' . $this->rest_base . '/(?P<id>[\\d]+)/' . $this->rest_sub_base,\n\t\t\t\tarray(\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t\t'description' => esc_html__( 'User ID', 'learndash' ),\n\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t\t'callback' => array( $this, 'get_user_groups' ),\n\t\t\t\t\t\t'permission_callback' => array( $this, 'get_user_groups_permissions_check' ),\n\t\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t\t\t'callback' => array( $this, 'update_user_groups' ),\n\t\t\t\t\t\t'permission_callback' => array( $this, 'update_user_groups_permissions_check' ),\n\t\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t\t'group_ids' => array(\n\t\t\t\t\t\t\t\t'description' => esc_html__( 'Group IDs to add to User.', 'learndash' ),\n\t\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t\t\t'callback' => array( $this, 'delete_user_groups' ),\n\t\t\t\t\t\t'permission_callback' => array( $this, 'delete_user_groups_permissions_check' ),\n\t\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t\t'group_ids' => array(\n\t\t\t\t\t\t\t\t'description' => esc_html__( 'Group IDs to remove from User.', 'learndash' ),\n\t\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t\t\t\t'items' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t\t)\n\t\t\t);\n\t\t}",
"protected function mapRoutes()\n {\n foreach($this->apiNamespaces as $namespace) {\n $prefix = strtolower($namespace);\n\n Route::prefix('v1/'.$prefix)\n ->middleware('api')\n ->namespace($this->apiBaseNamespace.'\\\\'.$namespace)\n ->group(base_path('routes/api/'.$prefix.'.php'));\n }\n }",
"public function registerRouters () {\n\t\tif ( !current_user_can( 'manage_options' ) )\n\t\t\treturn;\n\n\t\tforeach ( $this->classes as $class ) {\n\t\t\t\\Maven\\Core\\HookManager::instance()->addFilter( 'json_endpoints', array( $class, 'registerRoutes' ) );\n\t\t}\n\t}",
"public function add_api_routes()\n {\n /*\n * Only Apikey validate urls\n *\n */ \n register_rest_route($this->namespace, 'login', [\n 'methods' => 'POST',\n 'callback' => array($this, 'get_login'), \n 'args' => array(\n 'deviceToken' => array(\n 'required' => false,\n ),\n 'deviceId' => array(\n 'required' => true,\n 'description' => __('Please Enter deviceId',$this->plugin_name),\n ),\n 'deviceType' => array(\n 'required' => true,\n 'description' => __('Please Enter deviceType',$this->plugin_name),\n 'type' => 'string',\n 'enum' => array('1','2','3',),\n ),\n 'username' => array(\n 'required' => true,\n 'type' => 'string',\n 'description' => __('Please Enter Username',$this->plugin_name),\n ),\n 'password' => array(\n 'required' => true,\n 'type' => 'string',\n 'description' => __('Please Enter Password',$this->plugin_name),\n ),\n )\n ]);\n\n register_rest_route($this->namespace, 'logout', array(\n 'methods' => 'POST',\n 'callback' => array($this, 'logout'),\n )); \n register_rest_route($this->namespace, 'register', array(\n 'methods' => 'POST',\n 'callback' => array($this, 'register'),\n 'args' => array(\n 'deviceToken' => array(\n 'required' => false,\n ),\n 'deviceId' => array(\n 'required' => true,\n 'description' => __('Please Enter deviceId',$this->plugin_name),\n ),\n 'deviceType' => array(\n 'required' => true,\n 'description' => __('Please Enter deviceType',$this->plugin_name),\n 'type' => 'string',\n 'enum' => array('1','2','3',),\n ),\n 'email' => array(\n 'required' => true,\n 'type' => 'string',\n 'description' => 'The user\\'s email address',\n 'format' => 'email'\n ),\n 'username' => array(\n 'required' => true,\n 'type' => 'string',\n 'description' => __('Please Enter Username',$this->plugin_name),\n ),\n 'password' => array(\n 'required' => true,\n 'type' => 'string',\n 'description' => __('Please Enter Password',$this->plugin_name),\n ),\n 'fname' => array(\n 'required' => true,\n 'type' => 'string',\n 'description' => __('Please Enter Password',$this->plugin_name),\n ),\n 'lname' => array(\n 'required' => true,\n 'type' => 'string',\n 'description' => __('Please Enter Password',$this->plugin_name),\n ),\n\n )\n ));\n\n register_rest_route($this->namespace, 'forgotpassword', array(\n 'methods' => 'POST',\n 'callback' => array($this, 'forgotpassword'),\n 'args' => array(\n 'email' => array(\n 'required' => true,\n 'type' => 'string',\n 'description' => 'The user\\'s email address',\n 'format' => 'email'\n ),\n )\n ));\n\n register_rest_route($this->namespace, 'fblogin', array(\n 'methods' => 'POST',\n 'callback' => array($this, 'fblogin'),\n 'args' => array(\n 'email' => array(\n 'required' => true,\n 'type' => 'string',\n 'description' => 'The user\\'s email address',\n 'format' => 'email'\n ),\n )\n ));\n\n\n \n /*\n * Only Apikey and access token after login.\n *\n */ \n\n \n \n }",
"public function boot_rest_server() {\n add_action('rest_api_init', array($this, 'register_routes'));\n }",
"public function rest_api_init_action() {\r\n \r\n register_rest_route('api-bearer-auth/v1', '/login', [\r\n 'methods' => 'POST',\r\n 'callback' => [$this, 'callback_login'],\r\n 'args' => [\r\n 'username' => [\r\n 'required' => true,\r\n ],\r\n 'password' => [\r\n 'required' => true,\r\n ],\r\n ]\r\n ]);\r\n \r\n register_rest_route('api-bearer-auth/v1', '/tokens/refresh', [\r\n 'methods' => 'POST',\r\n 'callback' => [$this, 'callback_refresh_token'],\r\n 'args' => [\r\n 'token' => [\r\n 'required' => true\r\n ]\r\n ]\r\n ]);\r\n \r\n }",
"public function register_route() {\n register_rest_route( $this->namespace, $this->endpoint , array(\n 'methods' => 'POST',\n 'callback' => array($this, 'get_next_page'),\n 'args' => array(),\n ) );\n }",
"public static function registerCoreEndpoints() {\n\t\tif (\\UserConfig::$apiNamespace) {\n\t\t\tself::register(\\UserConfig::$apiNamespace, 'GET', new \\StartupAPI\\API\\v1\\User\\Get());\n\t\t\tself::register(\\UserConfig::$apiNamespace, 'GET', new \\StartupAPI\\API\\v1\\Accounts());\n\t\t}\n\t}",
"public function register_routes() {\n\t\tparent::register_routes();\n\n\t\t// Add a route for listing variations without specifying the parent product ID.\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/variations',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t)\n\t\t);\n\t}",
"function rest_api_init() {\n\trest_api_register_rewrites();\n\n\tglobal $wp;\n\t$wp->add_query_var( 'rest_route' );\n}",
"function api_wines_routes_api(){\n register_rest_route( 'bestwines/v1', '/wines', array(\n 'methods' => 'GET',\n 'callback' => 'api_get_wines',\n ));\n}",
"protected function routes()\n { \n Route::middleware([])\n ->prefix('api')\n ->namespace(__NAMESPACE__.'\\\\Http\\\\Controllers')\n ->name('sofre.api.')\n ->group(__DIR__.'/../routes/api.php');\n }"
] | [
"0.84524643",
"0.8186029",
"0.81378144",
"0.8137637",
"0.81153286",
"0.80908096",
"0.8053311",
"0.80347514",
"0.79807097",
"0.7979295",
"0.79330146",
"0.79285026",
"0.79153883",
"0.7875627",
"0.78228325",
"0.77830195",
"0.7780726",
"0.7765854",
"0.77462834",
"0.77395916",
"0.77348924",
"0.7712512",
"0.77082044",
"0.77082044",
"0.76919574",
"0.7686107",
"0.7660582",
"0.7647761",
"0.76443815",
"0.76187116",
"0.760677",
"0.7604208",
"0.75970966",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.7596582",
"0.75902635",
"0.7585267",
"0.75689864",
"0.7545306",
"0.75427306",
"0.74527955",
"0.74512",
"0.74496347",
"0.7390877",
"0.73713833",
"0.7281198",
"0.72779113",
"0.72703105",
"0.7238633",
"0.7218499",
"0.7207669",
"0.71815085",
"0.7167787",
"0.7167787",
"0.71579355",
"0.7153192",
"0.71496755",
"0.7142659",
"0.7132902",
"0.7104891",
"0.7101781",
"0.70998913",
"0.7067459",
"0.70657593",
"0.7059927",
"0.7049237",
"0.7029866",
"0.7019019",
"0.70156926",
"0.70064217"
] | 0.9180096 | 0 |
/ Function: checkEmail Author: Emily Kring Purpose: Used to validate email addresses to ensure format and domain requirements are met. Validate an email address | function validate_email($email, $domainCheck = false)
{
if (!empty($email))
{
if (preg_match('/^[a-zA-Z0-9\._-]+\@(\[?)[a-zA-Z0-9\-\.]+'.
'\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/', $email)) {
if ($domainCheck && function_exists('checkdnsrr')) {
list (, $domain) = explode('@', $email);
if (checkdnsrr($domain, 'MX') || checkdnsrr($domain, 'A')) {
return true;
}
return false;
}
return true;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function check_email_address($email) {\n # Check @ symbol and lengths\n if (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\n return false;\n }\n\n # Split Email Address into Sections\n $email_array = explode(\"@\", $email);\n $local_array = explode(\".\", $email_array[0]);\n\n # Validate Local Section of the Email Address\n for ($i = 0; $i < sizeof($local_array); $i++) {\n if (!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\", $local_array[$i])) {\n return false;\n }\n }\n\n # Validate Domain Section of the Email Address\n if (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) {\n $domain_array = explode(\".\", $email_array[1]);\n\n # Check the number of domain elements\n if (sizeof($domain_array) < 2) {\n return false;\n }\n\n # Sanity Check All Email Components\n for ($i = 0; $i < sizeof($domain_array); $i++) {\n if (!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$\", $domain_array[$i])) {\n return false;\n }\n }\n }\n\n # If All Validation Checks have Passed then Return True\n return true;\n }",
"function ValidateEmail( $email ) {\n // Check if address is valid\n if( ! filter_var( $email, FILTER_VALIDATE_EMAIL ) )\n return false;\n\n // Break up into parts\n $parts = explode( '@', $email );\n $user = $parts[0];\n $domain = $parts[1];\n\n // Check if domain resolves\n if( ! checkdnsrr( $domain, 'MX' ) && ( ! checkdnsrr( $domain, 'A' ) || ! checkdnsrr( $domain, 'AAAA' ) ) )\n return false;\n\n return true;\n}",
"function oos_validate_is_email($sEmail) {\n $bValidAddress = true;\n\n $mail_pat = '^(.+)@(.+)$';\n $valid_chars = \"[^] \\(\\)<>@,;:\\.\\\\\\\"\\[]\";\n $atom = \"$valid_chars+\";\n $quoted_user='(\\\"[^\\\"]*\\\")';\n $word = \"($atom|$quoted_user)\";\n $user_pat = \"^$word(\\.$word)*$\";\n $ip_domain_pat='^\\[([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\]$';\n $domain_pat = \"^$atom(\\.$atom)*$\";\n\n if (eregi($mail_pat, $sEmail, $components)) {\n $user = $components[1];\n $domain = $components[2];\n // validate user\n if (eregi($user_pat, $user)) {\n // validate domain\n if (eregi($ip_domain_pat, $domain, $ip_components)) {\n // this is an IP address\n \t for ($i=1;$i<=4;$i++) {\n \t if ($ip_components[$i] > 255) {\n \t $bValidAddress = false;\n \t break;\n \t }\n }\n } else {\n // Domain is a name, not an IP\n if (eregi($domain_pat, $domain)) {\n /* domain name seems valid, but now make sure that it ends in a valid TLD or ccTLD\n and that there's a hostname preceding the domain or country. */\n $domain_components = explode(\".\", $domain);\n // Make sure there's a host name preceding the domain.\n if (count($domain_components) < 2) {\n $bValidAddress = false;\n } else {\n $top_level_domain = strtolower($domain_components[count($domain_components)-1]);\n // Allow all 2-letter TLDs (ccTLDs)\n if (eregi('^[a-z][a-z]$', $top_level_domain) != 1) {\n $sTld = get_all_top_level_domains();\n if (eregi(\"$sTld\", $top_level_domain) == 0) {\n $bValidAddress = false;\n }\n }\n }\n } else {\n \t $bValidAddress = false;\n \t }\n \t}\n } else {\n $bValidAddress = false;\n }\n } else {\n $bValidAddress = false;\n }\n if ($bValidAddress && ENTRY_EMAIL_ADDRESS_CHECK == '1') {\n if (!checkdnsrr($domain, \"MX\") && !checkdnsrr($domain, \"A\")) {\n $bValidAddress = false;\n }\n }\n return $bValidAddress;\n }",
"function is_valid_email($address) {\n $fields = preg_split(\"/@/\", $address, 2);\n if ((!preg_match(\"/^[0-9a-z]([-_.]?[0-9a-z])*$/i\", $fields[0])) || (!isset($fields[1]) || $fields[1] == '' || !is_valid_hostname_fqdn($fields[1], 0))) {\n return false;\n }\n return true;\n}",
"function check_email_address($email) \n{\n // First, we check that there's one @ symbol, and that the lengths are right\n if (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) \n {\n // Email invalid because wrong number of characters in one section, or wrong number of @ symbols.\n return false;\n }\n // Split it into sections to make life easier\n $email_array = explode(\"@\", $email);\n $local_array = explode(\".\", $email_array[0]);\n for ($i = 0; $i < sizeof($local_array); $i++) \n {\n if (!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\", $local_array[$i])) \n {\n return false;\n }\n }\n if (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) \n { // Check if domain is IP. If not, it should be valid domain name\n $domain_array = explode(\".\", $email_array[1]);\n if (sizeof($domain_array) < 2) \n {\n return false; // Not enough parts to domain\n }\n for ($i = 0; $i < sizeof($domain_array); $i++) \n {\n if (!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$\", $domain_array[$i])) \n {\n return false;\n }\n }\n }\n return true;\n}",
"function validate_email($email, $check_domain = \\true)\n {\n }",
"private function _legacy_email_is_valid($email) {\n\t\t$valid_address = true;\n\n\t\t$mail_pat = '^(.+)@(.+)$';\n\t\t$valid_chars = \"[^] \\(\\)<>@,;:\\.\\\\\\\"\\[]\";\n\t\t$atom = \"$valid_chars+\";\n\t\t$quoted_user='(\\\"[^\\\"]*\\\")';\n\t\t$word = \"($atom|$quoted_user)\";\n\t\t$user_pat = \"^$word(\\.$word)*$\";\n\t\t$ip_domain_pat='^\\[([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\]$';\n\t\t$domain_pat = \"^$atom(\\.$atom)*$\";\n\n\t\tif (preg_match(\"/$mail_pat/\", $email, $components)) {\n\t\t\t$user = $components[1];\n\t\t\t$domain = $components[2];\n\t\t\t// validate user\n\t\t\tif (preg_match(\"/$user_pat/\", $user)) {\n\t\t\t\t// validate domain\n\t\t\t\tif (preg_match(\"/$ip_domain_pat/\", $domain, $ip_components)) {\n\t\t\t\t\t// this is an IP address\n\t\t\t\t\tfor ($i=1;$i<=4;$i++) {\n\t\t\t\t\t\tif ($ip_components[$i] > 255) {\n\t\t\t\t\t\t\t$valid_address = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Domain is a name, not an IP\n\t\t\t\t\tif (preg_match(\"/$domain_pat/\", $domain)) {\n\t\t\t\t\t\t/* domain name seems valid, but now make sure that it ends in a valid TLD or ccTLD\n\t\t\t\t\t\tand that there's a hostname preceding the domain or country. */\n\t\t\t\t\t\t$domain_components = explode(\".\", $domain);\n\t\t\t\t\t\t// Make sure there's a host name preceding the domain.\n\t\t\t\t\t\tif (sizeof($domain_components) < 2) {\n\t\t\t\t\t\t\t$valid_address = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$top_level_domain = strtolower($domain_components[sizeof($domain_components)-1]);\n\t\t\t\t\t\t\t// Allow all 2-letter TLDs (ccTLDs)\n\t\t\t\t\t\t\tif (preg_match('/^[a-z][a-z]$/', $top_level_domain) != 1) {\n\t\t\t\t\t\t\t\t$tld_pattern = '';\n\t\t\t\t\t\t\t\t// Get authorized TLDs from text file\n\t\t\t\t\t\t\t\t$tlds = file(DIR_WS_INCLUDES.'tld.txt');\n\t\t\t\t\t\t\t\tforeach($tlds as $line) {\n\t\t\t\t\t\t\t\t\t// Get rid of comments\n\t\t\t\t\t\t\t\t\t$words = explode('#', $line);\n\t\t\t\t\t\t\t\t\t$tld = trim($words[0]);\n\t\t\t\t\t\t\t\t\t// TLDs should be 3 letters or more\n\t\t\t\t\t\t\t\t\tif (preg_match('/^[a-z]{3,}$/', $tld) == 1) {\n\t\t\t\t\t\t\t\t\t\t$tld_pattern .= '^'.$tld.'$|';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Remove last '|'\n\t\t\t\t\t\t\t\t$tld_pattern = substr($tld_pattern, 0, -1);\n\t\t\t\t\t\t\t\tif (preg_match(\"/$tld_pattern/\", $top_level_domain) == 0) {\n\t\t\t\t\t\t\t\t\t$valid_address = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$valid_address = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$valid_address = false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$valid_address = false;\n\t\t}\n\t\tif ($valid_address && ENTRY_EMAIL_ADDRESS_CHECK == 'true') {\n\t\t\tif (!checkdnsrr($domain, \"MX\") && !checkdnsrr($domain, \"A\")) {\n\t\t\t\t$valid_address = false;\n\t\t\t}\n\t\t}\n\t\treturn $valid_address;\n\t}",
"public static function validate_email($email) {\n\t\t// First, we check that there's one @ symbol, \n\t\t// and that the lengths are right.\n\t\tif (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\n\t\t\t// Email invalid because wrong number of characters \n\t\t\t// in one section or wrong number of @ symbols.\n\t\t\treturn false;\n\t\t}\n\t\t// Split it into sections to make life easier\n\t\t$email_array = explode(\"@\", $email);\n\t\t$local_array = explode(\".\", $email_array[0]);\n\t\tfor ($i = 0; $i < sizeof($local_array); $i++) {\n\t\t\tif(!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&\n\t\t\t?'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\",\n\t\t\t$local_array[$i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Check if domain is IP. If not, \n\t\t// it should be valid domain name\n\t\tif (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) {\n\t\t\t$domain_array = explode(\".\", $email_array[1]);\n\t\t\tif (sizeof($domain_array) < 2) {\n\t\t\t\treturn false; // Not enough parts to domain\n\t\t\t}\n\t\t\tfor ($i = 0; $i < sizeof($domain_array); $i++) {\n\t\t\t\tif(!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|\n\t\t\t\t\t?([A-Za-z0-9]+))$\",\n\t\t\t\t$domain_array[$i])) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public static function validate_email($email) {\n\t // First, we check that there's one @ symbol, \n\t // and that the lengths are right.\n\t if (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\n\t // Email invalid because wrong number of characters \n\t // in one section or wrong number of @ symbols.\n\t return false;\n\t }\n\t // Split it into sections to make life easier\n\t $email_array = explode(\"@\", $email);\n\t $local_array = explode(\".\", $email_array[0]);\n\t for ($i = 0; $i < sizeof($local_array); $i++) {\n\t if\n\t(!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&\n\t↪'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\",\n\t$local_array[$i])) {\n\t return false;\n\t }\n\t }\n\t // Check if domain is IP. If not, \n\t // it should be valid domain name\n\t if (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) {\n\t $domain_array = explode(\".\", $email_array[1]);\n\t if (sizeof($domain_array) < 2) {\n\t return false; // Not enough parts to domain\n\t }\n\t for ($i = 0; $i < sizeof($domain_array); $i++) {\n\t if\n\t(!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|\n\t↪([A-Za-z0-9]+))$\",\n\t$domain_array[$i])) {\n\t return false;\n\t }\n\t }\n\t }\n\t return true;\n\t}",
"function EmailValidation($email)\n{ \n $email = htmlspecialchars(stripslashes(strip_tags($email)));\n if(preg_match(\"/^([a-zA-Z0-9])+([a-zA-Z0-9\\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\\._-]+)+$/\",$email))\n {\n /*$domain = explode('@', $email);\n $domain = $domain[1];\n if(!checkdnsrr($domain,'MX'))\n {\n //return false;\n return true;\n }*/\n return true;\n }\n else\n {\n return false;\n }\n}",
"function email_check($email) {\n\tif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\treturn false; \n\t}\n\t$domain = explode(\"@\",$email);\n\tif (!checkdnsrr($domain[1], 'MX')) {\n\t\treturn false; \n\t}\n\treturn true;\n}",
"function smcf_validate_email($email) {\r\n\t$at = strrpos($email, \"@\");\r\n\r\n\t// Make sure the at (@) sybmol exists and \r\n\t// it is not the first or last character\r\n\tif ($at && ($at < 1 || ($at + 1) == strlen($email)))\r\n\t\treturn false;\r\n\r\n\t// Make sure there aren't multiple periods together\r\n\tif (preg_match(\"/(\\.{2,})/\", $email))\r\n\t\treturn false;\r\n\r\n\t// Break up the local and domain portions\r\n\t$local = substr($email, 0, $at);\r\n\t$domain = substr($email, $at + 1);\r\n\r\n\r\n\t// Check lengths\r\n\t$locLen = strlen($local);\r\n\t$domLen = strlen($domain);\r\n\tif ($locLen < 1 || $locLen > 64 || $domLen < 4 || $domLen > 255)\r\n\t\treturn false;\r\n\r\n\t// Make sure local and domain don't start with or end with a period\r\n\tif (preg_match(\"/(^\\.|\\.$)/\", $local) || preg_match(\"/(^\\.|\\.$)/\", $domain))\r\n\t\treturn false;\r\n\r\n\t// Check for quoted-string addresses\r\n\t// Since almost anything is allowed in a quoted-string address,\r\n\t// we're just going to let them go through\r\n\tif (!preg_match('/^\"(.+)\"$/', $local)) {\r\n\t\t// It's a dot-string address...check for valid characters\r\n\t\tif (!preg_match('/^[-a-zA-Z0-9!#$%*\\/?|^{}`~&\\'+=_\\.]*$/', $local))\r\n\t\t\treturn false;\r\n\t}\r\n\r\n\t// Make sure domain contains only valid characters and at least one period\r\n\tif (!preg_match(\"/^[-a-zA-Z0-9\\.]*$/\", $domain) || !strpos($domain, \".\"))\r\n\t\treturn false;\t\r\n\r\n\treturn true;\r\n}",
"function check_email_address($email) {\n\t$isValid = true;\n\t$atIndex = strrpos($email, \"@\");\n\tif (is_bool($atIndex) && !$atIndex) {\n\t\t$isValid = false;\n\t}\n\telse {\n\t\t$domain = substr($email, $atIndex+1);\n\t\t$local = substr($email, 0, $atIndex);\n\t\t$localLen = strlen($local);\n\t\t$domainLen = strlen($domain);\n\t\tif ($localLen < 1 || $localLen > 64) {\n\t\t\t// local part length exceeded\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if ($domainLen < 1 || $domainLen > 255) {\n\t\t\t// domain part length exceeded\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if ($local[0] == '.' || $local[$localLen-1] == '.') {\n\t\t\t// local part starts or ends with '.'\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if (preg_match('/\\\\.\\\\./', $local)) {\n\t\t\t// local part has two consecutive dots\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\n\t\t\t// character not valid in domain part\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if (preg_match('/\\\\.\\\\./', $domain)) {\n\t\t\t// domain part has two consecutive dots\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\n\t\tstr_replace(\"\\\\\\\\\",\"\",$local)))\n\t\t{\n\t\t // character not valid in local part unless \n\t\t // local part is quoted\n\t\t if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\n\t\t\t$isValid = false;\n\t\t }\n\t\t}\n\t\tif ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) {\n\t\t\t// domain not found in DNS\n\t\t\t$isValid = false;\n\t\t}\n\t}\n\treturn $isValid;\n}",
"function bwm_validate_email($email) {\r\n\t$isValid = true;\r\n\t$atIndex = strrpos($email, \"@\");\r\n\tif (is_bool($atIndex) && !$atIndex) {\r\n\t $isValid = false;\r\n\t} else {\r\n $domain = substr($email, $atIndex+1);\r\n $local = substr($email, 0, $atIndex);\r\n $localLen = strlen($local);\r\n $domainLen = strlen($domain);\r\n if ($localLen < 1 || $localLen > 64) {\r\n // local part length exceeded\r\n $isValid = false;\r\n } else if ($domainLen < 1 || $domainLen > 255) {\r\n // domain part length exceeded\r\n $isValid = false;\r\n } else if ($local[0] == '.' || $local[$localLen-1] == '.') {\r\n // local part starts or ends with '.'\r\n $isValid = false;\r\n } else if (preg_match('/\\\\.\\\\./', $local)) {\r\n // local part has two consecutive dots\r\n $isValid = false;\r\n } else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\r\n // character not valid in domain part\r\n $isValid = false;\r\n } else if (preg_match('/\\\\.\\\\./', $domain)) {\r\n // domain part has two consecutive dots\r\n $isValid = false;\r\n } else if (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\r\n // character not valid in local part unless \r\n // local part is quoted\r\n if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\r\n $isValid = false;\r\n }\r\n }\r\n if ($isValid && function_exists('checkdnsrr') && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) {\r\n // domain not found in DNS\r\n $isValid = false;\r\n }\r\n\t}\r\n\treturn $isValid;\r\n}",
"function isValidEmail($email) {\n\n\t\t// First, we check that there's one @ symbol, and that the lengths are right\n\n\t\tif (!preg_match(\"/^[^@]{1,64}@[a-zA-z0-9].{1,255}$/\", $email)) {\n\t\t\t// Email invalid because wrong number of characters in one section, or wrong number of @ symbols.\n\t\t\treturn false;\n\t\t}\n\n\t\t// Split it into sections to make life easier\n\n\t\t$email_array = explode(\"@\", $email);\n\t\t$local_array = explode(\".\", $email_array[0]);\n\t\tfor ($i = 0; $i < sizeof($local_array); $i++) {\n\t\t\tif (!preg_match(\"/^(([A-Za-z0-9!#$%&'*+\\/=?^_`{|}~-][A-Za-z0-9!#$%&'*+\\/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$/\", $local_array[$i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif (!preg_match(\"/^\\[?[0-9\\.]+\\]?$/\", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name\n\t\t\t$domain_array = explode(\".\", $email_array[1]);\n\t\t\tif (sizeof($domain_array) < 2) {\n\t\t\t\treturn false; // Not enough parts to domain\n\t\t\t}\n\n\t\t\tfor ($i = 0; $i < sizeof($domain_array); $i++) {\n\t\t\t\tif (!preg_match(\"/^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$/\", $domain_array[$i])) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n }",
"function validarEmail($email, $checkDomain = true){\n\tif (filter_var($email, FILTER_VALIDATE_EMAIL)){\n\t\t//Valida o dominio\n\t\tif($checkDomain){\n\t\t\t$dominio = explode('@',$email);\n\t\t\tif(!checkdnsrr($dominio[1],'A')){\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n }else{\n\t\treturn false;\n\t}\n}",
"function check_email ($email)\n{\n return (preg_match ('/^[-!#$%&\\'*+\\\\.\\/0-9=?A-Z^_{|}~]+' . '@' . '([-0-9A-Z]+\\.)+' . '([0-9A-Z]){2,4}$/i', trim($email)));\n}",
"private function validateEmail($addr) {\n // Set result to false (guilty until proven innocent)\n $this->log->write('[Form] Email - validation begun');\n $result = FALSE;\n\n $boolDebug = FALSE;\n\n // Part 1: Consult isemail.info via curl\n // 0 = invalid format\n // 1 = valid format\n\n /*\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, \"http://isemail.info/valid/\".$addr);\n // curl_setopt($ch, CURLOPT_URL, \"http://www.asdasdljaskdhf.org/\".$addr);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $out = curl_exec($ch);\n $log->write(\"FORM: Email - check result: \".$out);\n curl_close($ch);\n */\n\n // This uses a local copy of is_email() to verify emails, rather than the remote service\n $out = is_email($addr);\n\n // Part 2: DNS lookup (provided first part passed)\n if($out==1) {\n $this->log->write('[Form] Email validation 1 of 2');\n // isolate the domain (\"remote part\")\n // adapted from http://www.linuxjournal.com/article/9585?page=0,3\n $domain = substr($addr,strrpos($addr, \"@\")+1);\n\n // If domain checks out, set result to true\n if (checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\")) {\n\n $this->log->write('[Form] Email validation 2 of 2');\n\n $result = TRUE;\n\n // A planned third component is to contact the MX server in the email address and \n // confirm that the address is valid. Not all servers will respond, but some will\n\n } else {\n\n $this->log->write('[FORM] Email validation failed step 2');\n\n }\n\n } else {\n $this->log->write('[FORM] Email validation failed step 1');\n }\n\n // Part 3: coming (either here or inside previous block)\n\n return $result;\n}",
"function validate_email ($address) {\n return preg_match('/^[a-z0-9!#$%&\\'*+\\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\\'*+\\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i', $address);\n }",
"function emailValidation($email)\n\t{\n\t\tif (!filter_var($email, FILTER_VALIDATE_EMAIL))\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\treturn 1;\n \t}",
"function isValidEmail($email) {\r\n\treturn preg_match(\"/^[a-zA-Z]\\w+(\\.\\w+)*\\@\\w+(\\.[0-9a-zA-Z]+)*\\.[a-zA-Z]{2,4}$/\", $email);\r\n}",
"function validEmail($email)\r\n{\r\n$isValid = true;\r\n$atIndex = strrpos($email, \"@\");\r\nif (is_bool($atIndex) && !$atIndex)\r\n{\r\n$isValid = false;\r\n}\r\nelse\r\n{\r\n$domain = substr($email, $atIndex+1);\r\n$local = substr($email, 0, $atIndex);\r\n$localLen = strlen($local);\r\n$domainLen = strlen($domain);\r\nif ($localLen < 1 || $localLen > 64)\r\n{\r\n// local part length exceeded\r\n$isValid = false;\r\n}\r\nelse if ($domainLen < 1 || $domainLen > 255)\r\n{\r\n// domain part length exceeded\r\n$isValid = false;\r\n}\r\nelse if ($local[0] == '.' || $local[$localLen-1] == '.')\r\n{\r\n// local part starts or ends with '.'\r\n$isValid = false;\r\n}\r\nelse if (preg_match('/\\\\.\\\\./', $local))\r\n{\r\n// local part has two consecutive dots\r\n$isValid = false;\r\n}\r\nelse if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain))\r\n{\r\n// character not valid in domain part\r\n$isValid = false;\r\n}\r\nelse if (preg_match('/\\\\.\\\\./', $domain))\r\n{\r\n// domain part has two consecutive dots\r\n$isValid = false;\r\n}\r\nelse if\r\n(!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\r\nstr_replace(\"\\\\\\\\\",\"\",$local)))\r\n{\r\n// character not valid in local part unless\r\n// local part is quoted\r\nif (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\r\nstr_replace(\"\\\\\\\\\",\"\",$local)))\r\n{\r\n$isValid = false;\r\n}\r\n}\r\nif ($isValid && !(checkdnsrr($domain,\"MX\") ||\r\n↪checkdnsrr($domain,\"A\")))\r\n{\r\n// domain not found in DNS\r\n$isValid = false;\r\n}\r\n}\r\nreturn $isValid;\r\n}",
"function validate_email_format($email, $expected) {\n\t// Make sure the address is valid\n\tif (filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t// Takes domain part of email after '@'\n\t\t$domain = array_pop(explode('@', $email));\n\t\t// if domain matches expected\n\t\tif ($domain == $expected) {\n\t\t\treturn TRUE;\n\t } else return FALSE;\n\t} else return FALSE;\n}",
"function validEmail($email) {\n\t $isValid = true;\n\t $atIndex = strrpos($email, \"@\");\n\t\tif (is_bool($atIndex) && !$atIndex) {\n\t\t $isValid = false; \n\t\t} else {\n\t\t $domain = substr($email, $atIndex+1);\n\t\t $local = substr($email, 0, $atIndex);\n\t\t $localLen = strlen($local);\n\t\t $domainLen = strlen($domain);\n\t\t if ($localLen < 1 || $localLen > 64)\n\t\t {\n\t\t\t // local part length exceeded\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if ($domainLen < 1 || $domainLen > 255)\n\t\t {\n\t\t\t // domain part length exceeded\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if ($local[0] == '.' || $local[$localLen-1] == '.')\n\t\t {\n\t\t\t // local part starts or ends with '.'\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if (preg_match('/\\\\.\\\\./', $local))\n\t\t {\n\t\t\t // local part has two consecutive dots\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain))\n\t\t {\n\t\t\t // character not valid in domain part\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if (preg_match('/\\\\.\\\\./', $domain))\n\t\t {\n\t\t\t // domain part has two consecutive dots\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\n\t\t\t\t\t str_replace(\"\\\\\\\\\",\"\",$local)))\n\t\t {\n\t\t\t // character not valid in local part unless \n\t\t\t // local part is quoted\n\t\t\t if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\n\t\t\t\t str_replace(\"\\\\\\\\\",\"\",$local)))\n\t\t\t {\n\t\t\t\t$isValid = false;\n\t\t\t }\n\t\t }\n\t\t if ($isValid && !(checkdnsrr($domain,\"MX\"))) {\n\t\t\t // domain not found in DNS\n\t\t\t $isValid = false;\n\t\t }\n\t\t}\n\t return $isValid;\n\t}",
"function is_email($addr)\n{\n $addr = strtolower(trim($addr));\n $addr = str_replace(\"@\",\"@\",$addr);\n if ( (strstr($addr, \"..\")) || (strstr($addr, \".@\")) || (strstr($addr, \"@.\")) || (!preg_match(\"/^[[:alnum:]][a-z0-9_.-]*@[a-z0-9][a-z0-9.-]{0,61}[a-z0-9]\\.[a-z]{2,6}\\$/\", stripslashes(trim($addr)))) ) {\n $emailvalidity = 0;\n } else {\n $emailvalidity = 1;\n }\n return $emailvalidity;\n}",
"function valid_email_address($mail) {\n $user = '[a-zA-Z0-9_\\-\\.\\+\\^!#\\$%&*+\\/\\=\\?\\`\\|\\{\\}~\\']+';\n $domain = '(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.?)+';\n $ipv4 = '[0-9]{1,3}(\\.[0-9]{1,3}){3}';\n $ipv6 = '[0-9a-fA-F]{1,4}(\\:[0-9a-fA-F]{1,4}){7}';\n\n return preg_match(\"/^$user@($domain|(\\[($ipv4|$ipv6)\\]))$/\", $mail);\n}",
"function check_email ($email) {\n\t\n if (preg_match ('/^[-!#$%&\\'*+\\\\.\\/0-9=?A-Z^_{|}~]+' . '@' . '([-0-9A-Z]+\\.)+' . '([0-9A-Z]){2,4}$/i', trim ($email))) {\n \n return true;\n \n } else {\n \n return false;\n \n }\n}",
"function email_is_valid($email) {\r\n return preg_match('/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i',$email);\r\n }",
"function validEmail($email)\n{\n $isValid = true;\n $atIndex = strrpos($email, \"@\");\n if (is_bool($atIndex) && !$atIndex)\n {\n $isValid = false;\n }\n else\n {\n $domain = substr($email, $atIndex+1);\n $local = substr($email, 0, $atIndex);\n $localLen = strlen($local);\n $domainLen = strlen($domain);\n if ($localLen < 1 || $localLen > 64)\n {\n // local part length exceeded\n $isValid = false;\n }\n else if ($domainLen < 1 || $domainLen > 255)\n {\n // domain part length exceeded\n $isValid = false;\n }\n else if ($local[0] == '.' || $local[$localLen-1] == '.')\n {\n // local part starts or ends with '.'\n $isValid = false;\n }\n else if (preg_match('/\\\\.\\\\./', $local))\n {\n // local part has two consecutive dots\n $isValid = false;\n }\n else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain))\n {\n // character not valid in domain part\n $isValid = false;\n }\n else if (preg_match('/\\\\.\\\\./', $domain))\n {\n // domain part has two consecutive dots\n $isValid = false;\n }\n else if\n(!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\n str_replace(\"\\\\\\\\\",\"\",$local)))\n {\n // character not valid in local part unless \n // local part is quoted\n if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\n str_replace(\"\\\\\\\\\",\"\",$local)))\n {\n $isValid = false;\n }\n }\n if ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\")))\n {\n // domain not found in DNS\n $isValid = false;\n }\n }\n return $isValid;\n}",
"function checkEmail($email)\n{\n // checks proper syntax\n if( !preg_match( \"/^([a-zA-Z0-9])+([a-zA-Z0-9\\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\\._-]+)+$/\", $email))\n return false;\n else\n \treturn true;\n}",
"function check_email($emaildddress)\n{\n\t$goodchars = '^[A-Za-z0-9\\._-]+@([A-Za-z][A-Za-z0-9-]{1,62})(\\.[A-Za-z][A-Za-z0-9-]{1,62})+$';\n\n\t$isvalid = true;\n\tif(!ereg($goodchars,$emaildddress))\n\t{\n\t\t$isvalid = false;\n\t}\n\treturn $isvalid;\n}",
"function validEmail($email)\n{\n $isValid = true;\n $atIndex = strrpos($email, \"@\");\n if (is_bool($atIndex) && !$atIndex) {\n $isValid = false;\n }\n else {\n $domain = substr($email, $atIndex+1);\n $local = substr($email, 0, $atIndex);\n $localLen = strlen($local);\n $domainLen = strlen($domain);\n if ($localLen < 1 || $localLen > 64) {\n // local part length exceeded\n $isValid = false;\n } else if ($domainLen < 1 || $domainLen > 255) {\n // domain part length exceeded\n $isValid = false;\n } else if ($local[0] == '.' || $local[$localLen-1] == '.') {\n // local part starts or ends with '.'\n $isValid = false;\n } else if (preg_match('/\\\\.\\\\./', $local)) {\n // local part has two consecutive dots\n $isValid = false;\n } else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\n // character not valid in domain part\n $isValid = false;\n } else if (preg_match('/\\\\.\\\\./', $domain)) {\n // domain part has two consecutive dots\n $isValid = false;\n } else if(!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\n str_replace(\"\\\\\\\\\",\"\",$local))) {\n // character not valid in local part unless \n // local part is quoted\n if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\n str_replace(\"\\\\\\\\\",\"\",$local))) {\n $isValid = false;\n }\n } if ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) {\n // domain not found in DNS\n $isValid = false;\n }\n }\n return $isValid;\n}",
"function validEmail($email)\r\n{\r\n\t$isValid = true;\r\n\t$atIndex = strrpos($email, \"@\");\r\n\tif (is_bool($atIndex) && !$atIndex)\r\n\t{\r\n\t\t$isValid = false;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$domain = substr($email, $atIndex+1);\r\n\t\t$local = substr($email, 0, $atIndex);\r\n\t\t$localLen = strlen($local);\r\n\t\t$domainLen = strlen($domain);\r\n\t\tif ($localLen < 1 || $localLen > 64)\r\n\t\t{\r\n\t\t\t// local part length exceeded\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if ($domainLen < 1 || $domainLen > 255)\r\n\t\t{\r\n\t\t\t// domain part length exceeded\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if ($local[0] == '.' || $local[$localLen-1] == '.')\r\n\t\t{\r\n\t\t\t// local part starts or ends with '.'\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if (preg_match('/\\\\.\\\\./', $local))\r\n\t\t{\r\n\t\t\t// local part has two consecutive dots\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain))\r\n\t\t{\r\n\t\t\t// character not valid in domain part\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if (preg_match('/\\\\.\\\\./', $domain))\r\n\t\t{\r\n\t\t\t// domain part has two consecutive dots\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if\r\n\t\t(!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\r\n\t\t\t\tstr_replace(\"\\\\\\\\\",\"\",$local)))\r\n\t\t{\r\n\t\t\t// character not valid in local part unless\r\n\t\t\t// local part is quoted\r\n\t\t\tif (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\r\n\t\t\t\t\tstr_replace(\"\\\\\\\\\",\"\",$local)))\r\n\t\t\t{\r\n\t\t\t\t$isValid = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) \r\n\t\t{\r\n\t\t\t// domain not found in DNS\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t}\r\n\treturn $isValid;\r\n}",
"function isValidEmail($addr)\n\t{\n\t\t//Called by validateInput().\n\t\t\n\t\t//Only one at-sign\n\t\t$atSplit = explode(\"@\",$addr);\n\t\tif(count($atSplit) != 2)\n\t\t\treturn false;\n\n\t\t$domain = $atSplit[1];\n\n\t\t//Only one period\n\t\t$pdSplit = explode('.',$domain);\n\t\tif(count($pdSplit) < 2)\n\t\t\treturn false;\n\t\t\t\n\t\t$suffix = $pdSplit[count($pdSplit) - 1];\n\t\t\n\t\t//Valid suffix\n\t\tswitch($suffix)\n\t\t{\n\t\t\tcase \"com\":\n\t\t\tcase \"net\":\n\t\t\tcase \"org\":\n\t\t\tcase \"gov\":\n\t\t\tcase \"co\":\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//Valid domain name\n\t\tif(preg_match('/[^\\-\\d\\w\\.]/',$domain))\n\t\t\treturn false;\n\t\t\t\n\t\t//Valid username\n\t\tif(preg_match('/[^\\-\\d\\w]/',$atSplit[0]))\n\t\t\treturn false;\n\t\t\n\t\t//First character is a letter\n\t\tif(preg_match('/[^A-Za-z]/',substr($atSplit[0],0,1)))\n\t\t\treturn false;\n\t\t\t\n\t\treturn true;\n\t}",
"function isValidEmail($addr)\n\t{\n\t\t//Called by validateInput().\n\t\t\n\t\t//Only one at-sign\n\t\t$atSplit = explode(\"@\",$addr);\n\t\tif(count($atSplit) != 2)\n\t\t\treturn false;\n\n\t\t$domain = $atSplit[1];\n\n\t\t//Only one period\n\t\t$pdSplit = explode('.',$domain);\n\t\tif(count($pdSplit) < 2)\n\t\t\treturn false;\n\t\t\t\n\t\t$suffix = $pdSplit[count($pdSplit) - 1];\n\t\t\n\t\t//Valid suffix\n\t\tswitch($suffix)\n\t\t{\n\t\t\tcase \"com\":\n\t\t\tcase \"net\":\n\t\t\tcase \"org\":\n\t\t\tcase \"gov\":\n\t\t\tcase \"co\":\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//Valid domain name\n\t\tif(preg_match('/[^\\-\\d\\w\\.]/',$domain))\n\t\t\treturn false;\n\t\t\t\n\t\t//Valid username\n\t\tif(preg_match('/[^\\-\\d\\w]/',$atSplit[0]))\n\t\t\treturn false;\n\t\t\n\t\t//First character is a letter\n\t\tif(preg_match('/[^A-Za-z]/',substr($atSplit[0],0,1)))\n\t\t\treturn false;\n\t\t\t\n\t\treturn true;\n\t}",
"function check_email($email) \r\n{ \r\n\t$emailArray = preg_split('//', $email); \r\n $atSign = false; \r\n $dotSign = false; \r\n $badCharacter = false; \r\n $validEmail = true; \r\n\tif (in_array (\"@\", $emailArray)) \r\n\t{ \r\n \t$atSign = true; \r\n } \r\n if (in_array (\".\", $emailArray)) \r\n\t{ \r\n \t$dotSign = true; \r\n } \r\n\t$badCharactersArray = array('#', '$', '%', '(', ')', '&', '!'); // Add your own bad \r\n\tfor ($i = 0; $i < sizeof($badCharactersArray); $i++) \r\n\t{ \r\n\t\tif (in_array ($badCharactersArray[$i], $emailArray)) \r\n \t{ \r\n \t\t$badCharacter = true; \r\n \t} \r\n\t} \r\n\tif ((!$atSign) or (!$dotSign) or ($badCharacter)) \r\n \t$validEmail = false; \r\n}",
"function isValidEmail($email) {\n\tif (C_RESTRICT_EMAIL_DOMAIN) {\n\t\t$domain = explode(\"@\", $email);\n\t\tif ($domain[1] === C_VALID_EMAIL_DOMAIN) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t} else {\n\t\treturn (true);\n\t}\n}",
"protected function validEmail($email, $dnscheck = false) {\r\n\t\t$isValid = true;\r\n\t\t$atIndex = strrpos($email, \"@\");\r\n\t\tif (is_bool($atIndex) && !$atIndex) {\r\n\t\t\t$isValid = false;\r\n\t\t} else {\r\n\t\t\t$domain = substr($email, $atIndex+1);\r\n\t\t\t$local = substr($email, 0, $atIndex);\r\n\t\t\t$localLen = strlen($local);\r\n\t\t\t$domainLen = strlen($domain);\r\n\t\t\tif ($localLen < 1 || $localLen > 64) {\r\n\t\t\t\t// local part length exceeded\r\n\t\t\t\t$isValid = false;\r\n\t\t\t} else if ($domainLen < 1 || $domainLen > 255) {\r\n\t\t\t\t// domain part length exceeded\r\n\t\t\t\t$isValid = false;\r\n\t\t\t} else if ($local[0] == '.' || $local[$localLen-1] == '.') {\r\n\t\t\t\t// local part starts or ends with '.'\r\n\t\t\t\t$isValid = false;\r\n\t\t\t} else if (preg_match('/\\\\.\\\\./', $local)) {\r\n\t\t\t\t// local part has two consecutive dots\r\n\t\t\t\t$isValid = false;\r\n\t\t\t} else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\r\n\t\t\t\t// character not valid in domain part\r\n\t\t\t\t$isValid = false;\r\n\t\t\t} else if (preg_match('/\\\\.\\\\./', $domain)) {\r\n\t\t\t\t// domain part has two consecutive dots\r\n\t\t\t\t$isValid = false;\r\n\t\t\t} else if (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\r\n\t\t\t\t// character not valid in local part unless \r\n\t\t\t\t// local part is quoted\r\n\t\t\t\tif (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\r\n\t\t\t\t\tstr_replace(\"\\\\\\\\\",\"\",$local)))\r\n\t\t\t\t{\r\n\t\t\t\t\t$isValid = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ($isValid && $dnscheck && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) {\r\n\t\t\t\t// domain not found in DNS\r\n\t\t\t\t$isValid = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $isValid;\r\n\t}",
"function s2_is_valid_email($email)\n{\n $return = ($hook = s2_hook('fn_is_valid_email_start')) ? eval($hook) : null;\n if ($return != null)\n return $return;\n\n if (strlen($email) > 80)\n return false;\n\n return preg_match('/^(([^<>()[\\]\\\\.,;:\\s@\"\\']+(\\.[^<>()[\\]\\\\.,;:\\s@\"\\']+)*)|(\"[^\"\\']+\"))@((\\[\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\])|(([a-zA-Z\\d\\-]+\\.)+[a-zA-Z]{2,}))$/', $email);\n}",
"function is_valid_email($mail) {\r\t// simple: \t\"/^[-_a-z0-9]+(\\.[-_a-z0-9]+)*@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]{2,6}$/i\"\r\t$r = 0;\r\tif($mail) {\r\t\t$p =\t\"/^[-_a-z0-9]+(\\.[-_a-z0-9]+)*@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.(\";\r\t\t// TLD (01-30-2004)\r\t\t$p .=\t\"com|edu|gov|int|mil|net|org|aero|biz|coop|info|museum|name|pro|arpa\";\r\t\t// ccTLD (01-30-2004)\r\t\t$p .=\t\"ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|az|ba|bb|bd|\";\r\t\t$p .=\t\"be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|\";\r\t\t$p .=\t\"cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|\";\r\t\t$p .=\t\"ec|ee|eg|eh|er|es|et|fi|fj|fk|fm|fo|fr|ga|gd|ge|gf|gg|gh|gi|\";\r\t\t$p .=\t\"gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|\";\r\t\t$p .=\t\"im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|\";\r\t\t$p .=\t\"ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mk|ml|\";\r\t\t$p .=\t\"mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|\";\r\t\t$p .=\t\"nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|\";\r\t\t$p .=\t\"py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|\";\r\t\t$p .=\t\"sr|st|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|\";\r\t\t$p .=\t\"tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|\";\r\t\t$p .=\t\"za|zm|zw\";\r\t\t$p .=\t\")$/i\";\r\r\t\t$r = preg_match($p, $mail) ? 1 : 0;\r\t}\r\treturn $r;\r}",
"function validate_email($email)\n\t{\n\t\t$regexp = \"^([_a-z0-9-]+)(\\.[_a-z0-9-]+)*@([a-z0-9-]+)(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$\";\n\t\t// Presume that the email is invalid\n\t\t$valid = false;\n\t\t// Validate the syntax\n\t\tif (eregi($regexp, $email)) {\n\t\t\tlist($username, $domaintld) = split(\"@\", $email);\n\t\t\t$OS = $this->os_type();\n\t\t\tif ($OS == 'Linux') {\n\t\t\t\tif (checkdnsrr($domaintld, \"MX\")) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn $valid;\n\t}",
"private function isEmailValid($email)\n {\n //We could handle email format validation here\n }",
"function mme_checkemail( $email ) {\n\t$match = preg_match( '/^[A-z0-9_\\-.]+[@][A-z0-9_\\-]+([.][A-z0-9_\\-]+)+[A-z.]{2,4}$/', $email );\n\tif(!$match){\n\t\t$error_msg = 'Invalid E-mail address';\n\t\tmme_error_notice( $error_msg );\n\t\treturn false;\n\t\t}\n\treturn true;\n}",
"function IsValidEmail($input) {\r\n $regex = '/^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.([a-zA-Z]{2,4})$/';\r\n\r\n if (preg_match($regex, $input)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}",
"function is_valid_email($email)\n{\n if (is_null($email) || strlen($email) < 6)\n {\n return false;\n }\n $pattern = \"/^[_a-z0-9\\-]+(\\.[_a-z0-9\\-]+)*@[a-z0-9\\-]+(\\.[a-z0-9\\-]+)*(\\.[a-z]{2,4})$/\";\n return (preg_match($pattern, $email) == 1);\n}",
"function email_is_valid($email) {\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n }",
"private function email_Check_Validation($email){\r\n return (filter_var($email, FILTER_VALIDATE_EMAIL)) ? true : false;\r\n }",
"function check_email($email) \n{\n if (strlen($email)== 0) \n\t\treturn false;\n if (eregi(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$\", $email)) \n\t\treturn true;\n return false;\n}",
"function isValidEmailAddress($emailAddress)\n{\n return filter_var($emailAddress, FILTER_VALIDATE_EMAIL) !== false;\n}",
"function check_email($email) {\r\n\r\n if (filter_var($email, FILTER_VALIDATE_EMAIL)) {\r\n return true;\r\n }\r\n return false;\r\n}",
"protected function validate_email( $p_value ) {\n\t\t$email = trim($p_value);\n\n\t\t$isValid = true;\n\t\t$atIndex = strrpos($email, \"@\");\n\t\tif ( is_bool($atIndex) && !$atIndex ) {\n\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address missing a @\",null);\n\t\t} else {\n\t\t\t// get domain and local string\n\t\t\t$domain = substr($email, $atIndex + 1);\n\t\t\t$local = substr($email, 0, $atIndex);\n\t\t\t// get length of domain and local string\n\t\t\t$localLen = strlen($local);\n\t\t\t$domainLen = strlen($domain);\n\t\t\tif ( $localLen < 1 ) {\n\t\t\t\t// local part length exceeded\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address prior to @ is missing\",null);\n\t\t\t} else if ( $localLen > 64 ) {\n\t\t\t\t// local part length exceeded\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address prior to @ is more than 64 chars\",null);\n\t\t\t} else if ( $domainLen < 1 ) {\n\t\t\t\t// domain part length exceeded\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address domain missing\",null);\n\t\t\t} else if ( $domainLen > 255 ) {\n\t\t\t\t// domain part length exceeded\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address domain is more than 255 chars\",null);\n\t\t\t} else if ( $local[0] == '.' ) {\n\t\t\t\t// local part starts or ends with '.'\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address starts with '.'\",null);\n\t\t\t} else if ( $local[$localLen - 1] == '.' ) {\n\t\t\t\t// local part starts or ends with '.'\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address prior to @ ends with '.'\",null);\n\t\t\t} else if ( preg_match('/\\\\.\\\\./', $local) ) {\n\t\t\t\t// local part has two consecutive dots\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address prior to @ contains '..'\",null);\n\t\t\t} else if ( !preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain) ) {\n\t\t\t\t// character not valid in domain part\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address domain contains invalid character\",null);\n\t\t\t} else if ( preg_match('/\\\\.\\\\./', $domain) ) {\n\t\t\t\t// domain part has two consecutive dots\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address domain contains '..'\",null);\n\t\t\t} else if ( !preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', str_replace(\"\\\\\\\\\",\"\",$local)) ) {\n\t\t\t\t// character not valid in local part unless\n\t\t\t\t// local part is quoted\n\t\t\t\tif (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\n\t\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address prior to @ must be quoted due to special character\",null);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\")) ) {\n\t\t\t\t// domain not found in DNS\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address domain not found in DNS\",null);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->return_handler->results(200,\"\",null);\n\t}",
"function isEmail($input) {\n // Matches Email addresses. (Found out how to break up a RedEx so that it can be nicly commited.)\n return (preg_match(\n \"~(^ ## Match starts at the beginning of the string.\n (?>[[:alnum:]._-])+ ## Matches any alpha numaric character plus the '.', '_', and '-'\n ## For the name part of an address. \n (?>@) ## Matches the at sign.\n (?>[[:alnum:]])+ ## Matches any alpha numaric character\n ## For the Place part of the address.\n \n (?> ## To match things like 'uk.com 'or just '.com'\n (?:\\.[[:alpha:]]{2,3}\\.[[:alpha:]]{2,3}) ## Matches a '.' then 2-3 alphabet characters\n ## then another '.' and 2-3 alphabet characters.\n | ## Or Matches\n (?:\\.[[:alpha:]]{2,3}) ## a single '.' then 2-3 alphabet characters.\n )\n $ ## Match to the end of the string.\n )~x\", $input));\n }",
"function isValidEmail($email) // used in admin_configuration.php, contact-submit.php, user-forgot-password.php, user-register.php, user-resend-activation.php\r\n\r\n{\r\n\r\n\tif (filter_var($email, FILTER_VALIDATE_EMAIL)) {\r\n\r\n\t\treturn true;\r\n\r\n\t}\r\n\r\n\telse {\r\n\r\n\t\treturn false;\r\n\r\n\t}\r\n\r\n}",
"public static function ValidaEmailValido($email) {\n // if (!preg_match('/^([a-zA-Z0-9.-])*([@])([a-z0-9]).([a-z]{2,3})/', $email)) {\n // return false;\n // } else {\n //Valida o dominio\n \n $dominio = explode('@', $email);\nerror_reporting(0);\nini_set('display_errors', FALSE);\n try {\n if (!checkdnsrr($dominio[1], 'A')) {\n return false;\n } else {\n return true;\n } // Retorno true para indicar que o e-mail é valido\n } catch (Exception $ex) {\n return false;\n }\n \n // }\n }",
"function validate_email($email){\n\t\n\tif(empty($email)){\n\t\t\n\t\treturn false;\n\t\t\n\t}\n\tif(count(explode('@',$email)) != 2){\n\t\t\n\t\treturn false;\n\t\t\n\t}\n\telse {\n\t\t\n\t\t$words = explode('@',$email);\n\t\t\t$second = $words[1];\n\t\t\tif(count(explode('.',$email)) != 2){\n\t\t\t\n\t\t\treturn false;\n\t\t\n\t\t}\n\t\t\n\t}\n\t\treturn true;\n\t\n\t\n}",
"function verify_email($email) // Colorize: green\n { // Colorize: green\n return isset($email) // Colorize: green\n && // Colorize: green\n is_string($email) // Colorize: green\n && // Colorize: green\n filter_var($email, FILTER_VALIDATE_EMAIL); // Colorize: green\n }",
"function validate_email($email)\n{\n\treturn preg_match(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,6})$^\", $email);\n}",
"function validateEmail($email) {\n\n\treturn preg_match(\"/^(((([^]<>()[\\.,;:@\\\" ]|(\\\\\\[\\\\x00-\\\\x7F]))\\\\.?)+)|(\\\"((\\\\\\[\\\\x00-\\\\x7F])|[^\\\\x0D\\\\x0A\\\"\\\\\\])+\\\"))@((([[:alnum:]]([[:alnum:]]|-)*[[:alnum:]]))(\\\\.([[:alnum:]]([[:alnum:]]|-)*[[:alnum:]]))*|(#[[:digit:]]+)|(\\\\[([[:digit:]]{1,3}(\\\\.[[:digit:]]{1,3}){3})]))$/\", $email);\n\n}",
"function isEmail($verify_email) {\n\t\n\t\treturn(preg_match(\"/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i\",$verify_email));\n\t\n\t}",
"function ValidEmail( $address, $leMail )\r\n\t\t{\r\n\t\tif( ereg( \".*<(.+)>\", $address, $regs ) )\r\n\t\t\t$address = $regs[1];\r\n\r\n\t\tif( !ereg( \"^[^@ ]+@([a-zA-Z0-9\\-]+\\.)+([a-zA-Z0-9\\-]{2}|net|com|gov|mil|org|edu|int)\\$\",$address) )\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t\t}",
"function isValidMailAddress($address) {\n // enhancement made in 3.6x based on code by Quandary.\n if (preg_match('/^(?!\\\\.)(?:\\\\.?[-a-zA-Z0-9!#$%&\\'*+\\\\/=?^_`{|}~]+)+@(?!\\\\.)(?:\\\\.?(?!-)[-a-zA-Z0-9]+(?<!-)){2,}$/', $address)) {\n return 1;\n } else {\n return 0;\n }\n}",
"function isValidEmail($name){ \n\t$regexp = \"/^[^0-9][A-z0-9_]+([.][A-z0-9_]+)*[@][A-z0-9_]+([.][A-z0-9_]+)*[.][A-z]{2,4}$/\";\n\n\tif(preg_match($regexp, $name)) {\n\t return TRUE;\n\t}else{\n\t\treturn FALSE;\n\t}\n}",
"function validaemail($emailForm){\n if (!ereg('^([a-zA-Z0-9.-])*([@])([a-z0-9]).([a-z]{2,3})',$emailForm)){\n $mensagem='E-mail Inválido!';\n return $mensagem;\n }\n else{\n //Valida o dominio\n $dominio=explode('@',$emailForm);\n if(!checkdnsrr($dominio[1],'A')){\n $mensagem='E-mail Inválido!';\n return $mensagem;\n }\n else{return true;} // Retorno true para indicar que o e-mail é valido\n }\n }",
"function validateEmail($input){\n\t\t//REGEX string courtsey of http://www.white-hat-web-design.co.uk/articles/js-validation.php, others were produced by Robert Chisholm\n\t\t$inputReg = \"#^([A-Za-z0-9_\\-\\.])+\\@([A-Za-z0-9_\\-\\.])+\\.([A-Za-z]{2,4})$#\";\n\t\treturn preg_match($inputReg, $input);\n\t}",
"function emailOk ($email) {\r\n return filter_var($email, FILTER_VALIDATE_EMAIL);\r\n }",
"public static function validate_email($email){\r\n if(!preg_match('/^[a-zA-Z0-9]*(|[-._][a-zA-Z0-9]*)\\@([a-z]*)[.]([a-z]{3,4})/', $email)) return FALSE;\r\n return TRUE;\r\n }",
"function validaremail($email){ \n if (!ereg(\"^([a-zA-Z0-9._]+)@([a-zA-Z0-9.-]+).([a-zA-Z]{2,4})$\",$email)){ \n return FALSE; \n } else { \n return TRUE; \n } \n}",
"function isValidEmail($email)\r\n{\r\n\tif (filter_var($email, FILTER_VALIDATE_EMAIL)) {\r\n\t\treturn true;\r\n\t}\r\n\telse {\r\n\t\treturn false;\r\n\t}\r\n}",
"function check_email($email) {\n if (strlen($email) == 0) return false;\n if (eregi(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$\", $email)) return true;\n return false;\n}",
"function is_email_valid($email) {\n\treturn filter_var($email, FILTER_VALIDATE_EMAIL);\n}",
"function isValidEmail($email)\n{\n if (! filter_var($email, FILTER_VALIDATE_EMAIL)) {\n return false;\n }\n return true;\n}",
"function isValidEmail($email){\n return filter_var($email, FILTER_VALIDATE_EMAIL) !== false;\n}",
"function is_email($value)\r\n{\r\n\treturn preg_match('/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i', $value);\r\n}",
"static public function validateEMail($email) {\n if (preg_match(\"/^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$/i\", $email)) {\n return true;\n }\n else {\n return false;\n }\n }",
"public function is_valid_email()\r\n {\r\n // email address.\r\n\r\n return (!empty($this->address) && preg_match($this->re_email, $this->address));\r\n }",
"function checkEmail($checkemail) {\r\n if(preg_match(\"/^([a-zA-Z0-9])+([a-zA-Z0-9\\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\\._-]+)+$/\" , $checkemail))\r\n {\r\n list($username,$domain)=split('@',$checkemail);\r\n \r\n if(!getmxrr ($domain,$mxhosts)) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n return false;\r\n}",
"function validateEmail($value) {\n\tif(ereg(\"^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$\", $value, $regs)) {\n\t\techo \"true\";\n\t} else {\n\t\techo \"false\";\n\t}\n}",
"function isEmail($email) {\nreturn(preg_match(\"/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i\",$email));\n}",
"function emailIsValid($email,&$reason) {\r\n $isValid= true;\r\n $reasons= array();\r\n $atIndex= strrpos($email, \"@\");\r\n if (is_bool($atIndex) && !$atIndex) {\r\n $isValid= false;\r\n $reasons[]= \"chybí @\";\r\n }\r\n else {\r\n $domain= substr($email, $atIndex+1);\r\n $local= substr($email, 0, $atIndex);\r\n $localLen= strlen($local);\r\n $domainLen= strlen($domain);\r\n if ($localLen < 1 || $localLen > 64) {\r\n $isValid= false;\r\n $reasons[]= \"dlouhé jméno\";\r\n }\r\n else if ($domainLen < 1 || $domainLen > 255) {\r\n $isValid= false;\r\n $reasons[]= \"dlouhá doména\";\r\n }\r\n else if ($local[0] == '.' || $local[$localLen-1] == '.') {\r\n $reasons[]= \"tečka na kraji\";\r\n $isValid= false;\r\n }\r\n else if (preg_match('/\\\\.\\\\./', $local)) {\r\n $reasons[]= \"dvě tečky ve jménu\";\r\n $isValid= false;\r\n }\r\n else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\r\n $reasons[]= \"chybný znak v doméně\";\r\n $isValid= false;\r\n }\r\n else if (preg_match('/\\\\.\\\\./', $domain)) {\r\n $reasons[]= \"dvě tečky v doméně\";\r\n $isValid= false;\r\n }\r\n else if (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\r\n $reasons[]= \"chybný znak ve jménu\";\r\n if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\r\n str_replace(\"\\\\\\\\\",\"\",$local))) {\r\n $isValid= false;\r\n }\r\n }\r\n if ( $domain!='proglas.cz' && $domain!='setkani.org' ) {\r\n if ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) {\r\n $reasons[]= \"$domain je neznámá doména\";\r\n $isValid= false;\r\n }\r\n }\r\n }\r\n $reason= count($reasons) ? implode(', ',$reasons) : '';\r\n return $isValid;\r\n}",
"function check($email)\n\t{\n\t if (preg_match(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$\", $email, $matches))\n\t { \n\t //if (checkdate($matches[2], $matches[3], $matches[1]))\n\t //{ \n\t return true; \n\t //} \n\t } \n\t return false;\n\t}",
"public static function validate($sEmailAddress, $bUseDNS = false)\n {\n if (preg_match(\"/.*?<(.*?)>/\", $sEmailAddress, $aMatch))\n {\n $sEmailAddress = $aMatch[1];\n }\n\n if (empty($sEmailAddress))\n {\n throw new \\Exception('Email address is empty');\n }\n\n if (strpos($sEmailAddress, ' ') !== false)\n {\n throw new \\Exception('Email address is *not* allowed to have spaces in it');\n }\n\n $iAtIndex = strrpos($sEmailAddress, \"@\");\n\n if (false === $iAtIndex)\n {\n throw new \\Exception(\"Email address does not contain an 'at sign' (@)\");\n }\n\n $sLocal = substr($sEmailAddress, 0, $iAtIndex);\n $sLocalLen = strlen($sLocal);\n\n if ($sLocalLen < 1)\n {\n throw new \\Exception(\"The 'local' part of the email address is empty\");\n }\n\n if ($sLocalLen > 64)\n {\n throw new \\Exception(\"The 'local' part of the email address is too long\");\n }\n\n $sDomain = substr($sEmailAddress, $iAtIndex + 1);\n $sDomainLen = strlen($sDomain);\n\n if ($sDomainLen < 1)\n {\n throw new \\Exception(\"The 'domain' part of the email address is empty\");\n }\n\n if ($sDomainLen > 255)\n {\n throw new \\Exception(\"The 'domain' part of the email address is too long\");\n }\n\n if ($sLocal[0] == '.')\n {\n throw new \\Exception(\"The 'local' part of the email address starts with a 'dot' (.)\");\n }\n\n if ($sLocal[$sLocalLen - 1] == '.')\n {\n throw new \\Exception(\"The 'local' part of the email address ends with a 'dot' (.)\");\n }\n\n if (preg_match('/\\\\.\\\\./', $sLocal))\n {\n throw new \\Exception(\"The 'local' part of the email address has two consecutive dots (..)\");\n }\n\n if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $sDomain))\n {\n throw new \\Exception(\"The 'domain' part of the email address contains invalid characters\");\n }\n\n if (preg_match('/\\\\.\\\\./', $sDomain))\n {\n throw new \\Exception(\"The 'domain' part of the email address has two consecutive dots (..)\");\n }\n\n $sSlashLight = str_replace(\"\\\\\\\\\", \"\", $sLocal);\n\n //these characters are invalid\n if (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', $sSlashLight))\n {\n //unless the whole thing is quoted\n if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/', $sSlashLight))\n {\n throw new \\Exception(\"The 'local' part of the email address contains invalid characters\");\n }\n }\n\n if ($bUseDNS)\n {\n if (!checkdnsrr($sDomain, \"MX\") && !checkdnsrr($sDomain, \"A\"))\n {\n throw new \\Exception(\"The 'domain' part of the email address has no valid DNS\");\n }\n }\n }",
"public static function validateEMAIL($email) {\n if (filter_var($email, FILTER_VALIDATE_EMAIL))\n return true;\n else\n return false; \n }",
"function email_validation($str)\n{\n return preg_match(\"/.+@.+/\", $str);\n}",
"function ValidEmailAddress (\t$in_test_address\t///< Either a single email address, or a list of them, comma-separated.\n )\n {\n $valid = false;\n \n if ( $in_test_address )\n {\n global $g_validation_error; ///< This contains an array of strings, that \"log\" bad email addresses.\n $g_validation_error = array();\n $addr_array = split ( \",\", $in_test_address );\n // Start off optimistic.\n $valid = true;\n \n // If we have more than one address, we iterate through each one.\n foreach ( $addr_array as $addr_elem )\n {\n // This splits any name/address pair (ex: \"Jack Schidt\" <[email protected]>)\n $addr_temp = preg_split ( \"/ </\", $addr_elem );\n if ( count ( $addr_temp ) > 1 )\t// We also want to trim off address brackets.\n {\n $addr_elem = trim ( $addr_temp[1], \"<>\" );\n }\n else\n {\n $addr_elem = trim ( $addr_temp[0], \"<>\" );\n }\n $regexp = \"/^([_a-zA-Z0-9-]+)(\\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+)(\\.[a-zA-Z0-9-]+)*(\\.[a-zA-Z]{2,4})$/\";\n if (!preg_match($regexp, $addr_elem))\n {\n array_push ( $g_validation_error, 'The address'.\" '$addr_elem' \".'is not correct.' );\n $valid = false;\n }\n }\n }\n \n return $valid;\n }",
"function email_validation($toemail) \n\t{ \n\t\t$param_array = func_get_args();\n\t\t\n\t\t$GLOBALS['logger_obj']->debug('<br>METHOD email::email_validation() - PARAMETER LIST : ', $param_array);\n\t\t\t\n\t\tif($_SERVER['REMOTE_ADDR'] != \"127.0.0.1\")\n\t\t{\n\t\t\n\t\tglobal $HTTP_HOST; \n\t\t\n\t\t$result = array(); \n\t\t\n\t\t$result[0]=true; \n\t\t\n\t\t$result[1]=\"$toemail appears to be valid.\"; \n\t\t/* this regular expression is not allowing some of the domain names like .name etc., so we check for one @ symbol and \n\t\tatleast 1 \".\" symbol in email id.\n\t\tif (!eregi(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$\", $toemail)) \n\t\t{ \t\t\n\t\t\t$result[0]=false; \n\t\t\t\n\t\t\t$result[1]=\"$toemail is not properly formatted\"; \n\t\t\t\n\t\t}\n\t\t*/\n\t\t\n\t\t//remove the name from the email\n\t\t\n\t\t$earr = explode(\"<\", $toemail);\n\t\t\n\t\tif(count($earr) == 2 && strlen(trim($earr[1])) > 0)\n\t\t\t$email = substr(trim($earr[1]),0,-1);\n\t\telse\n\t\t\t$email = trim($earr[0]);\n\t\t\n\t\t$eml_arr = explode(\"@\",$email);\n\t\t$result[0]=false; \n\t\t\n\t\t$result[1]=\"$toemail is not properly formatted\"; \n\t\tif(count($eml_arr) == 2 && strlen(trim($eml_arr[0])) > 0 && strlen(trim($eml_arr[1])) > 0)\n\t\t{\n\t\t\t$domain_arr = explode(\".\",$eml_arr[1]);\n\t\t\tif(count($domain_arr) > 1 && strlen(trim($domain_arr[0])) > 0 && strlen(trim($domain_arr[1])) > 0)\n\t\t\t{\n\t\t\t\t$result[0]=true; \n\t\t\t\t$result[1]=\"$toemail appears to be valid.\"; \n\t\t\t}\n\t\t}\n\t\t\n\t\tif(1==2)\n\t\t{//need not check by communicating to email server...\n\t\t\n\t\tlist ( $username, $domain ) = split (\"@\",$toemail); \n\t\t\n\t\tif (getmxrr($domain, $MXHost)) \n\t\t{\t\t\n\t\t\t$connectaddress = $MXHost[0];\n\t\t}\n\t\telse \n\t\t{\t\t\n\t\t\t$connectaddress = $domain;\n\t\t} \n\t\t//echo \"Connect address : \" . $connectaddress . \"<br>\";\n\t\t//echo \"Domain Name : \" . $domain . \"<br>\";\n\t\t$connect = fsockopen ( $connectaddress, 25 ); \n\t\t\n\t\tif ($connect) \n\t\t{\t\t\n\t\t\tif (ereg(\"^220\", $Out = fgets($connect, 1024))) \n\t\t\t{ \n\t\t\t\n\t\t\t fputs ($connect, \"HELO $HTTP_HOST\\r\\n\"); \n\t\t\t \n\t\t\t $out = fgets ( $connect, 1024 ); \n\t\t\t \n\t\t\t $this->from_email = $GLOBALS['site_config']['admin_email'];\n\t\t\t \n\t\t\t $from = $this->from_email;\n\t\t\t \n\t\t\t fputs ($connect, \"MAIL FROM: <{$from}>\\r\\n\"); \n\t\t\t \n\t\t\t $from = fgets ( $connect, 1024 ); \n\t\t\t \n\t\t\t fputs ($connect, \"RCPT TO: <{$toemail}>\\r\\n\"); \n\t\t\t \n\t\t\t $to = fgets ($connect, 1024); \n\t\t\t \n\t\t\t fputs ($connect, \"QUIT\\r\\n\"); \n\t\t\t \n\t\t\t fclose($connect); \n\t\t\t \n\t\t\t if (!ereg (\"^250\", $from) || !ereg ( \"^250\", $to )) \n\t\t\t { \n\t\t\t \n\t\t\t\t $result[0]=false; \n\t\t\t\t \n\t\t\t\t $result[1]=\"Server rejected address\"; \n\t\t\t\t \n\t\t\t\t} \n\t\t\t} \n\t\t\t\n\t\t\telse\n\t\t\t{\t\t\t\t\n\t\t\t\t$result[0] = false; \n\t\t\t\t\n\t\t\t\t$result[1] = \"No response from server\"; \n\t\t\t\t\n\t\t\t } \n\t\t\t \n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$result[0]=false; \n\t\t\t\n\t\t\t$result[1]=\"Can not connect E-Mail server.\"; \n\t\t\t\n\t\t\t//return $result; \n\t\t} \n\t\t\n\t\t}\n\t\t\n\t\tif(!$result[0])\n\t\t{\n\n\t\t\t$ttext = \"\";\n\t\t\t$ttext .= \"<table border=0 cellpadding=3 cellspacing=1 align=center width=90%>\";\n\t\t\t$ttext .= \"<tr align=left><td><strong>Error Message</strong></td><td>\" . $result[1] . \" (\" . $toemail . \")\" . \"</td></tr>\";\n\t\t\t$ttext .= \"</table>\";\n\n\t\t\t$GLOBALS['logger_obj']->error('<br>METHOD email::email_validation() - Return Value : ', $ttext,'email');\n\n\t\t}\n\t}\n\t\t$GLOBALS['logger_obj']->debug('<br>METHOD email::email_validation() - Return Value : ', $result);\n\t\treturn $result; \n\t\t\n\t}",
"public static function validateEmailAddr($email)\n {\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n }",
"public static function validateEmailAddr($email)\n {\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n }",
"function validateEmail($field)\n\t{\n //Make sure field is not blank\n if ($field == \"\") return \"Please specify an email address.\\\\n\";\n //Return an error if invalid input\n if (!filter_var($field, FILTER_VALIDATE_EMAIL)) return \"Invalid email address given.\\\\n\";\n\t\treturn \"\";\n\t}",
"function isValidEmail($email) {\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n}",
"function validateEmail($string){\n\tif($string == '') {return 'Email is required! </br>';}\n\tif(!preg_match(\"/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/\", $string)){\n\t\treturn 'Email is invalid </br>';\n\t}\n\treturn '';\n}",
"private function check_Email($email){\r\n\r\n //Remove all illegal characters from an e-mail adress\r\n $email_B = filter_var($email, FILTER_SANITIZE_EMAIL);\r\n\r\n $Validate = self::email_Check_Validation($email_B);\r\n\r\n return (($Validate == false) || ($email != $email_B)) ? true : false;\r\n }",
"public function isValidEmail($email){\n\t //If this check fails, there's no need to continue\n\t if(!filter_var($email, FILTER_VALIDATE_EMAIL))\n\t {\n\t\t return false;\n\t }\n\t //extract host\n\t list($user, $host) = explode(\"@\", $email);\n\t //check, if host is accessible\n\t if (!checkdnsrr($host, \"MX\") && !checkdnsrr($host, \"A\"))\n\t {\n\t\t return false;\n\t }\n\t return true;\n\t}",
"public static function is_email($value) {\r\n\t\t$parts = explode('@', $value, 2);\r\n\t\t$local_part = array_shift($parts);\r\n\t\t$domain = array_shift($parts);\r\n\t\t\r\n\t\t$ret = self::is_domain($domain);\r\n\t\t// local part may be up to 64 characters \r\n\t\t$ret = $ret && (strlen($local_part) <= 64);\r\n\t\t// dot is not allowed at the end or beginning\r\n\t\t// There is also a rule that 2 or more dots are illegal like in '[email protected]'\r\n\t\t// Unfortunately: my neighbor's address IS [email protected]! And I can't lock my neighbor \r\n\t\t// out of the services I program, can I? \r\n\t\t$ret = $ret && (substr($local_part, 0, 1) !== '.');\r\n\t\t$ret = $ret && (substr($local_part, -1) !== '.');\r\n\t\t// Only a-z, A-Z, 0-9 and !#$%&'*+-/=?^_`{|}~ and . are allowed\r\n\t\t// (There is quoting and escaping, but we do not hear, we do not hear, we do not hear...)\r\n\t\t$pattern = \"@^[a-zA-Z0-9!#$%&'*+\\-/=?^_`{|}~.]+$@s\";\r\n\t\t$ret = $ret && preg_match($pattern, strtr($local_part, \"\\r\\n\", ' '));\r\n\t\t\r\n\t\treturn $ret;\r\n\t}",
"function ValidateEmail($email)\n{\n // $pattern = \"/[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/g\";\n return (bool) filter_var($email, FILTER_VALIDATE_EMAIL);\n}",
"public function isValidEmailDomain($email) {\n\n if(preg_match('/^\\w[-.\\w]*@(\\w[-._\\w]*\\.[a-zA-Z]{2,}.*)$/', $email, $matches)) {\n\n if(function_exists('checkdnsrr')) {\n if(checkdnsrr($matches[1] . '.', 'MX')) {\n return true;\n }\n if(checkdnsrr($matches[1] . '.', 'A')) {\n return true;\n }\n }\n }\n else{\n return true;\n }\n return false;\n }",
"private static function validEmail($email) {\n $atIndex = strrpos($email, \"@\");\n if (is_bool($atIndex) && !$atIndex) {\n return false;\n } else {\n $domain = substr($email, $atIndex+1);\n $local = substr($email, 0, $atIndex);\n $localLen = strlen($local);\n $domainLen = strlen($domain);\n if ($localLen < 1 || $localLen > 64) {\n // local part length exceeded\n return false;\n } else if ($domainLen < 1 || $domainLen > 255) {\n // domain part length exceeded\n return false;\n } else if ($local[0] == '.' || $local[$localLen-1] == '.') {\n // local part starts or ends with '.'\n return false;\n }\n else if (preg_match('/\\\\.\\\\./', $local)) {\n // local part has two consecutive dots\n return false;\n } else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\n // character not valid in domain part\n return false;\n } else if (preg_match('/\\\\.\\\\./', $domain)) {\n // domain part has two consecutive dots\n return false;\n } else if (\n !preg_match(\n '/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\n str_replace(\"\\\\\\\\\",\"\",$local)\n ) ) {\n // character not valid in local part unless \n // local part is quoted\n if ( !preg_match(\n '/^\"(\\\\\\\\\"|[^\"])+\"$/',\n str_replace(\"\\\\\\\\\",\"\",$local)) ) {\n return false;\n }\n }\n if ( !( checkdnsrr($domain,\"MX\") \n || checkdnsrr($domain,\"A\") ) ) {\n // domain not found in DNS\n return false;\n }\n }\n return true;\n }",
"function isValidEmail($email){\n\tif (filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\treturn true;\n\t}\n\telse {\n\t\treturn false;\n\t}\n}",
"protected function _validateEmailFormat($email) {\n\t\t\t$email = strtolower(trim($email));\n\t\t\t$emailSplitCharacters = explode('@', $email);\n\t\t\t$validAlphaNumericCharacters = 'abcdefghijklmnopqrstuvwxyz1234567890';\n\t\t\t$validLocalCharacters = '.!#$%&\\'*+-/=?^_`{|}~' . $validAlphaNumericCharacters;\n\t\t\t$validLocalSpecialCharacters = ' (),:;<>@[]';\n\t\t\t$validDomainCharacters = '-.' . $validAlphaNumericCharacters;\n\n\t\t\tif (count($emailSplitCharacters) !== 2) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$localString = $emailSplitCharacters[0];\n\t\t\t$localStringCharacters = str_split($localString);\n\t\t\t$domainString = $emailSplitCharacters[1];\n\t\t\t$domainStringCharacters = str_split($domainString);\n\t\t\t$domainStringSplitCharacters = explode('.', $domainString);\n\n\t\t\tif (\n\t\t\t\tcount($domainStringSplitCharacters) < 2 ||\n\t\t\t\tstrlen(end($domainStringSplitCharacters)) < 2 ||\n\t\t\t\tstrstr(' .-', $lastLocalStringCharacter = end($localStringCharacters)) !== false ||\n\t\t\t\tstrstr(' .-', $firstLocalStringCharacter = reset($localStringCharacters)) !== false ||\n\t\t\t\tstrstr(' .-', $lastDomainStringCharacter = end($domainStringCharacters)) !== false ||\n\t\t\t\tstrstr(' .-', $firstDomainStringCharacter = reset($domainStringCharacters)) !== false ||\n\t\t\t\tstrpos($domainString, '-.') !== false ||\n\t\t\t\tstrpos($domainString, '.-') !== false ||\n\t\t\t\t$lastDomainStringCharacter == '-'\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t$lastLocalStringCharacter == '\"' &&\n\t\t\t\t$firstLocalStringCharacter == '\"'\n\t\t\t) {\n\t\t\t\t$validLocalCharacters .= $validLocalSpecialCharacters;\n\t\t\t\tarray_shift($localStringCharacters);\n\t\t\t\tarray_pop($localStringCharacters);\n\t\t\t\t$localString = implode('', $localStringCharacters);\n\t\t\t\t$localString = str_replace('\\\\' . '\\\\', ' \\\\' . '\\\\ ', $localString);\n\t\t\t\t$localString = str_replace('\\\"', ' \\\" ', $localString);\n\t\t\t\t$localStringCharacters = array();\n\t\t\t\t$localStringSplitCharacters = explode(' ', $localString);\n\n\t\t\t\tforeach ($localStringSplitCharacters as $key => $localStringSplitCharacter) {\n\t\t\t\t\t$localStringCharacters = array_filter(array_merge($localStringCharacters, !in_array($localStringSplitCharacter, array('\\\\' . '\\\\', '\\\"')) ? str_split($localStringSplitCharacter) : array()));\n\t\t\t\t}\n\t\t\t} elseif (\n\t\t\t\t(strpos($domainString, '..') !== false) ||\n\t\t\t\t(strpos($localString, '..') !== false) ||\n\t\t\t\t$localString[0] === '.' ||\n\t\t\t\t$localString[strlen($localString) - 1] === '.'\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t$invalidLocalCharacters = array_diff($localStringCharacters, str_split($validLocalCharacters)) ||\n\t\t\t\t$invalidDomainCharacters = array_diff($domainStringCharacters, str_split($validDomainCharacters))\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$response = $email;\n\t\t\treturn $response;\n\t\t}",
"function isValidEmail($email) {\n if (filter_var($email, FILTER_VALIDATE_EMAIL)) {\n return true;\n } else {\n return false;\n }\n}",
"function isValidEmail(String &$val)\n\t{\n\n\t\tif(isSizedString($val) && strpos($val, '@') !== false && filter_var($val, FILTER_VALIDATE_EMAIL)) return true;\n\t\telse return false;\n\n\t}"
] | [
"0.8301479",
"0.8127754",
"0.80997723",
"0.808551",
"0.8056526",
"0.8020967",
"0.7948242",
"0.7946681",
"0.79420173",
"0.7937563",
"0.78888994",
"0.7815257",
"0.77782816",
"0.77118856",
"0.77063257",
"0.7654788",
"0.7647616",
"0.7596628",
"0.7588071",
"0.75873363",
"0.75870675",
"0.7571506",
"0.7564734",
"0.7556314",
"0.7550581",
"0.75336707",
"0.75335026",
"0.75264144",
"0.7505957",
"0.7500132",
"0.7497185",
"0.7493983",
"0.7489805",
"0.74862695",
"0.74862695",
"0.7459528",
"0.7445748",
"0.7432896",
"0.7432812",
"0.74274874",
"0.74172115",
"0.7414442",
"0.7406456",
"0.7389602",
"0.737797",
"0.7362595",
"0.73613477",
"0.73576087",
"0.73555845",
"0.7349958",
"0.73455507",
"0.7345058",
"0.7341255",
"0.73355806",
"0.7334025",
"0.73330885",
"0.7326562",
"0.7316901",
"0.7311248",
"0.7309735",
"0.7292518",
"0.726749",
"0.72571105",
"0.72545403",
"0.7252092",
"0.7226492",
"0.7225996",
"0.7224617",
"0.7209249",
"0.72084063",
"0.7198791",
"0.7196342",
"0.71915394",
"0.71837515",
"0.7182321",
"0.71820635",
"0.7181803",
"0.71769816",
"0.7169713",
"0.7165006",
"0.7163405",
"0.7158935",
"0.71546537",
"0.7152249",
"0.71444446",
"0.7143563",
"0.7143563",
"0.7142156",
"0.71406674",
"0.71363646",
"0.7135609",
"0.7134056",
"0.7132455",
"0.7130299",
"0.71204776",
"0.71190804",
"0.711505",
"0.7111368",
"0.7100771",
"0.70976263"
] | 0.8085628 | 3 |
/ Function: validate_password Author: Paul Gerndt Purpose: Used to validate passwords to ensure minimum length and content requirements are met. Created: 20150216 | function validate_password($candidate)
{
if (!empty($candidate))
{
// Declare and Initialize Local Variables
$CritCount = 0; //Tabulator for keeping track of number of criteria matched
/*
Regular Expression Example $\S*(?=\S{8,})(?=\S*[a-z])(?=\S*[A-Z])(?=\S*[\d])(?=\S*[\W])\S*$
$ = beginning of string
\S* = any set of characters
(?=\S{8,}) = of at least length 8
(?=\S*[a-z]) = containing at least one lowercase letter
(?=\S*[A-Z]) = and at least one uppercase letter
(?=\S*[\d]) = and at least one number
(?=\S*[\W]) = and at least a special character (non-word characters)
$ = end of the string
*/
// Test for each requirement
if (strlen($candidate) >= 8) $CritCount = $CritCount + 10; // Value of 10 for minimum length
if (preg_match('/[a-z]/', $candidate)) $CritCount = $CritCount + 1; //Contains lower case a-z
if (preg_match('/[A-Z]/', $candidate)) $CritCount = $CritCount + 1; //Contains UPPER case A-Z
if (preg_match('/[\d]/', $candidate)) $CritCount = $CritCount + 1; //Contains at least one numeric digit
if (preg_match('/[^a-zA-Z\d]/', $candidate)) $CritCount = $CritCount + 1; //Contains at least one special Character (!@#$%^&*()-_, etc.)
if ($CritCount > 12) //Meets minimum length, plus 3 additional criteria
{
return TRUE;
}
else
{
return FALSE;
}
}
else
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function isValidPassword($password)\n{\n $len = strlen($password);\n if ($len < MIN_PASSWORD) {\n return false;\n }\n return true;\n}",
"function checkLength($password)\n{\n return strlen($password) >= MIN_PASSWORD;\n}",
"function validate_password($password)\n {\n $reg1='/[A-Z]/'; //Upper case Check\n $reg2='/[a-z]/'; //Lower case Check\n $reg3='/[^a-zA-Z\\d\\s]/'; // Special Character Check\n $reg4='/[0-9]/'; // Number Digit Check\n $reg5='/[\\s]/'; // Number Digit Check\n\n if(preg_match_all($reg1,$password, $out)<1) \n return \"There should be atleast one Upper Case Letter...\";\n\n if(preg_match_all($reg2,$password, $out)<1) \n return \"There should be atleast one Lower Case Letter...\";\n\n if(preg_match_all($reg3,$password, $out)<1) \n return \"There should be atleast one Special Character...\";\n\n if(preg_match_all($reg4,$password, $out)<1) \n return \"There should be atleast one numeric digit...\";\n \n if(preg_match_all($reg5,$password, $out)>=1) \n return \"Spaces are not allowed...\";\n\n if(strlen($password) <= 8 || strlen($password) >= 16 ) \n return \"Password Length should be between 8 and 16\";\n\n return \"OK\";\n }",
"function checkPassword($password, $username = false) {\n $length = strlen($password);\n\n if ($length < 8) {\n return FALSE;\n } elseif ($length > 32) {\n return FALSE;\n } else {\n\n//check for a couple of bad passwords:\n if ($username && strtolower($password) == strtolower($username)) {\n return FALSE;\n } elseif (strtolower($password) == 'password') {\n return FALSE;\n } else {\n\n preg_match_all(\"/(.)\\1{2}/\", $password, $matches);\n $consecutives = count($matches[0]);\n\n preg_match_all(\"/\\d/i\", $password, $matches);\n $numbers = count($matches[0]);\n\n preg_match_all(\"/[A-Z]/\", $password, $matches);\n $uppers = count($matches[0]);\n\n preg_match_all(\"/[^A-z0-9]/\", $password, $matches);\n $others = count($matches[0]);\n\n//see if there are 3 consecutive chars (or more) and fail!\n if ($consecutives > 0) {\n return FALSE;\n } elseif ($others > 1 || ($uppers > 1 && $numbers > 1)) {\n//bulletproof\n return TRUE;\n } elseif (($uppers > 0 && $numbers > 0) || $length > 14) {\n//very strong\n return TRUE;\n } else if ($uppers > 0 || $numbers > 2 || $length > 9) {\n//strong\n return TRUE;\n } else if ($numbers > 1) {\n//fair\n return FALSE;\n } else {\n//weak\n return FALSE;\n }\n }\n }\n return $returns;\n}",
"function check_password($password)\n{\n if (strlen($password) < 8) {\n throw new Exception(\"password_short.\", 1);\n return false;\n }\n if (!preg_match(\"/[0-9]{1,}/\", $password) || !preg_match(\"/[A-Z]{1,}/\", $password)) {\n throw new Exception(\"password_bad\", 1);\n return false;\n }\n return true;\n}",
"function is_valid_password($password)\n{\n if (is_null($password) || strlen($password) < 6 || strlen($password) > 40)\n {\n return false;\n }\n $pattern = \"/^[a-z0-9~`!@#\\$%\\^&\\*\\-_\\+=\\(\\)\\{\\}\\[\\]\\|:;\\\"\\'\\<\\>\\.,\\?\\/]{6,40}$/i\";\n\n return (preg_match($pattern, $password) == 1);\n}",
"function validate_password($field) {\n\t\tif ($field == \"\") return \"No Password was entered.<br>\";\n\t\telse if (strlen($field) < 6)\n\t\t\treturn \"Password must be at least 6 characters.<br>\";\n\t\telse if (!preg_match(\"/[a-z]/\",$field) || !preg_match(\"/[A-Z]/\",$field) || !preg_match(\"/[0-9]/\",$field) )\n\t\t\treturn \"Password require one each of a-z, A-Z,0-9.<br>\";\n\t\treturn \"\";\n\t}",
"public function validate_password()\n\t{\n\t\t//Load language from user component\n\t\t$lang = JFactory::getLanguage();\n\t\t$tag = $lang->getTag();\n\n\t\tif (!$tag)\n\t\t{\n\t\t\t$tag = 'en-GB';\n\t\t}\n\n\t\t$lang->load('com_users', JPATH_ROOT, $tag);\n\t\t$value = $this->input->get('fieldValue', '', 'none');\n\t\t$validateId = $this->input->get('fieldId', '', 'none');\n\t\t$params = JComponentHelper::getParams('com_users');\n\t\t$minimumIntegers = $params->get('minimum_integers');\n\t\t$minimumSymbols = $params->get('minimum_symbols');\n\t\t$minimumUppercase = $params->get('minimum_uppercase');\n\t\t$validPassword = true;\n\t\t$errorMessage = '';\n\n\t\tif (!empty($minimumIntegers))\n\t\t{\n\t\t\t$nInts = preg_match_all('/[0-9]/', $value, $imatch);\n\n\t\t\tif ($nInts < $minimumIntegers)\n\t\t\t{\n\t\t\t\t$errorMessage = JText::plural('COM_USERS_MSG_NOT_ENOUGH_INTEGERS_N', $minimumIntegers);\n\t\t\t\t$validPassword = false;\n\t\t\t}\n\t\t}\n\n\t\tif ($validPassword && !empty($minimumSymbols))\n\t\t{\n\t\t\t$nsymbols = preg_match_all('[\\W]', $value, $smatch);\n\n\t\t\tif ($nsymbols < $minimumSymbols)\n\t\t\t{\n\t\t\t\t$errorMessage = JText::plural('COM_USERS_MSG_NOT_ENOUGH_SYMBOLS_N', $minimumSymbols);\n\t\t\t\t$validPassword = false;\n\t\t\t}\n\t\t}\n\n\n\t\tif ($validPassword && !empty($minimumUppercase))\n\t\t{\n\t\t\t$nUppercase = preg_match_all(\"/[A-Z]/\", $value, $umatch);\n\n\t\t\tif ($nUppercase < $minimumUppercase)\n\t\t\t{\n\t\t\t\t$errorMessage = JText::plural('COM_USERS_MSG_NOT_ENOUGH_UPPERCASE_LETTERS_N', $minimumUppercase);\n\t\t\t\t$validPassword = false;\n\t\t\t}\n\t\t}\n\n\t\t$arrayToJs = array();\n\t\t$arrayToJs[0] = $validateId;\n\n\t\tif (!$validPassword)\n\t\t{\n\t\t\t$arrayToJs[1] = false;\n\t\t\t$arrayToJs[2] = $errorMessage;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$arrayToJs[1] = true;\n\t\t}\n\n\t\techo json_encode($arrayToJs);\n\n\t\t$this->app->close();\n\t}",
"function passwordValid($password) {\n\treturn true;\n}",
"function checkPasswordErrors($password, $username = false) {\n $returns = array(\n 'strength' => 0,\n 'error' => 0,\n 'text' => ''\n );\n\n $length = strlen($password);\n\n if ($length < 8) {\n $returns['error'] = 1;\n $returns['text'] = 'The password is not long enough';\n } elseif ($length > 32) {\n $returns['error'] = 1;\n $returns['text'] = 'The password is too long';\n } else {\n\n//check for a couple of bad passwords:\n if ($username && strtolower($password) == strtolower($username)) {\n $returns['error'] = 4;\n $returns['text'] = 'Password cannot be the same as your Username';\n } elseif (strtolower($password) == 'password') {\n $returns['error'] = 3;\n $returns['text'] = 'Password is too common';\n } else {\n\n preg_match_all(\"/(.)\\1{2}/\", $password, $matches);\n $consecutives = count($matches[0]);\n\n preg_match_all(\"/\\d/i\", $password, $matches);\n $numbers = count($matches[0]);\n\n preg_match_all(\"/[A-Z]/\", $password, $matches);\n $uppers = count($matches[0]);\n\n preg_match_all(\"/[^A-z0-9]/\", $password, $matches);\n $others = count($matches[0]);\n\n//see if there are 3 consecutive chars (or more) and fail!\n if ($consecutives > 0) {\n $returns['error'] = 2;\n $returns['text'] = 'Too many consecutive characters';\n } elseif ($others > 1 || ($uppers > 1 && $numbers > 1)) {\n//bulletproof\n $returns['strength'] = 5;\n $returns['text'] = 'Virtually Bulletproof';\n } elseif (($uppers > 0 && $numbers > 0) || $length > 14) {\n//very strong\n $returns['strength'] = 4;\n $returns['text'] = 'Very Strong';\n } else if ($uppers > 0 || $numbers > 2 || $length > 9) {\n//strong\n $returns['strength'] = 3;\n $returns['text'] = 'Strong';\n } else if ($numbers > 1) {\n//fair\n $returns['strength'] = 2;\n $returns['text'] = 'Fair';\n } else {\n//weak\n $returns['strength'] = 1;\n $returns['text'] = 'Weak';\n }\n }\n }\n return $returns;\n}",
"public static function validatePassword($password) {\n if (\n (strlen($password) > 8 || strlen($password) < 4) || // Check Length\n (!preg_match(\"#[0-9]+#\", $password)) || // Contains a number.\n (!preg_match(\"#[a-zA-Z]+#\", $password)) || // Contains a letter.\n (!preg_match(\"/^[a-z0-9]+$/i\",$password))) // No special characters.\n {\n // Password did not meet one of the requirements.\n return false; \n } else {\n // Password meets all requirements.\n return true;\n }\n }",
"function valid_password($password1,$password2)\n{\n\t// if the comparison of the 2 strings (the passwords)\n\t// results in 0 difference\n\tif(strcmp($password1,$password2)==0)\n\t{\n\t\t// if the password has a length of at least 6 characters\n\t\tif(strlen($password1)>=6)\n\t\t{\n\t\t\t// then return true\n\t\t\treturn true;\n\t\t}\n\t\t// if length lower than 6\n\t\telse\n\t\t{\n\t\t\t// return false\n\t\t\treturn false;\n\t\t}\n\t}\n\t// if 2 passwords are different\n\telse\n\t{\n\t\t// return false\n\t\treturn false;\n\t}\n}",
"function minimum_password_limit( & $errors ) {\r\n\t$min_length = 12;\r\n\tif ( !empty( $_POST['pass1'] ) && $_POST['pass1'] === $_POST['pass2'] && !preg_match('/^.*(?=.{12,})(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).*$/', $_POST['pass1']) ) {\r\n\t\t$errors->add( 'min_pass_length', sprintf( __( '<strong>Security advice</strong>: Your password must be at least %d characters long and have at least one capital letter and one number in it.' ), $min_length ), array( 'form-field' => 'pass1' ) );\r\n\t}\r\n}",
"public function validatePassword()\n {\n $result = false;\n if (strlen($this->password) >= 5) {\n $result = true;\n }\n return $result;\n }",
"public function validate_password($password){\nif(!preg_match('%\\A(?=[-_a-zA-Z0-9]*?[A-Z)(?=[-_a-zA-Z0-9]*?[a-z])(?=[-_a-zA-Z0-9]*?[0-9])\\S{6,}\\z%', $password)){\n\treturn false;\n\t}else{\n\t\treturn true;\n\t\t}\n}",
"function isValidPassword2($password)\n{\n return checkLength($password) && specialChar($password) && containsUpperAndLower($password);\n}",
"function valid_pass($password)\n {\n $r2 = '/[A-z]/'; //lowercase\n $r3 = '/[0-9]/'; //numbers\n $r4 = '/[~!@#$%^&*()\\-_=+{};:<,.>?]/'; // special char\n\n /*if (preg_match_all($r1, $candidate, $o) < 1) {\n $msg = \"密码必须包含至少一个大写字母,请返回修改!\";\n return FALSE;\n }*/\n if (preg_match_all($r2, $password, $o) < 1) {\n $msg = \"密码必须包含至少一个字母,请返回修改!\";\n return ['code' => -1, 'msg' => $msg];\n }\n if (preg_match_all($r3, $password, $o) < 1) {\n $msg = \"密码必须包含至少一个数字,请返回修改!\";\n return ['code' => -1, 'msg' => $msg];\n }\n /*if (preg_match_all($r4, $candidate, $o) < 1) {\n $msg = \"密码必须包含至少一个特殊符号:[~!@#$%^&*()\\-_=+{};:<,.>?],请返回修改!\";\n return FALSE;\n }*/\n if (strlen($password) < 8) {\n $msg = \"密码必须包含至少含有8个字符,请返回修改!\";\n return ['code' => -1, 'msg' => $msg];\n }\n return ['code' => 0, 'msg' => 'success'];\n }",
"public function check_password_strength($password){\n // Validate password strength\n $uppercase = preg_match('@[A-Z]@', $password);\n $lowercase = preg_match('@[a-z]@', $password);\n $number = preg_match('@[0-9]@', $password);\n $specialChars = preg_match('@[^\\w]@', $password);\n\n if(!$uppercase || !$lowercase || !$number || !$specialChars || strlen($password) < 8) {\n $GLOBALS['error_message'] = 'Password should be at least 8 characters in length and should include at least one upper case letter, one number, and one special character.';\n return false;\n }else{\n return true;\n }\n }",
"public function passwordIsValid($password)\n {\n $config = $this->getPasswordConfig();\n\n /**\n * Count lowercase characters, including multibyte characters.\n *\n * @param string $string\n */\n $countLowercase = function ($string) {\n $stringUppercase = mb_strtoupper($string);\n $similar = similar_text($string, $stringUppercase);\n return strlen($string) - $similar;\n };\n /**\n * Count uppercase characters, including multibyte characters.\n *\n * @param string $string\n */\n $countUppercase = function ($string) {\n $stringLowercase = mb_strtolower($string);\n $similar = similar_text($string, $stringLowercase);\n return strlen($string) - $similar;\n };\n\n // Validate minimum password length.\n if (isset($config['min_length']) && is_numeric($config['min_length'])) {\n if (strlen($password) < $config['min_length']) {\n return false;\n }\n }\n // Validate minimum lowercase character count.\n if (isset($config['min_lowercase']) && is_numeric($config['min_lowercase'])) {\n if ($countLowercase($password) < $config['min_lowercase']) {\n return false;\n }\n }\n // Validate minimum uppercase character count.\n if (isset($config['min_uppercase']) && is_numeric($config['min_uppercase'])) {\n if ($countUppercase($password) < $config['min_uppercase']) {\n return false;\n }\n }\n // Validate minimum number character count.\n if (isset($config['min_number']) && is_numeric($config['min_number'])) {\n if (preg_match_all('/[0-9]/', $password) < $config['min_number']) {\n return false;\n }\n }\n // Validate minimum symbol character count.\n if (isset($config['min_symbol']) && is_numeric($config['min_symbol'])\n && isset($config['symbol_list']) && is_string($config['symbol_list'])\n && strlen($config['symbol_list'])\n ) {\n $symbolCount = 0;\n foreach (str_split($config['symbol_list']) as $symbol) {\n $symbolCount += substr_count($password, $symbol);\n }\n if ($symbolCount < $config['min_symbol']) {\n return false;\n }\n }\n\n // The password is valid.\n return true;\n }",
"function validatePassword($password, $retypedPassword)\n\t\t{\n\t\t\t// include the Password Validator Class and create a validator with 5-15 characters long\n\t\t\tinclude(\"class_libraries/PasswordValidator.php\");\n\t\t\t$passwordValidator = new PasswordValidator(5, 15);\n\t\t\t\n\t\t\t// validate the password\n\t\t\t$result = $passwordValidator -> validatePassword($password, $retypedPassword);\n\t\t\t\n\t\t\t// check the result\n\t\t\tif($result == false)\n\t\t\t{\n\t\t\t\t// get the error and return the result\n\t\t\t\treturn $passwordValidator -> getErrors();\n\t\t\t}\n\t\t\t\n\t\t\treturn;\n\t\t}",
"function validatePassword() : bool\n {\n if($this->Password && preg_match('/^[[:alnum:]]{6,20}$/', $this->Password)) // solo numeri-lettere da 6 a 20\n {\n return true;\n }\n else\n return false;\n }",
"private function valid_password() {\n return (strlen($this->password) == 6);\n }",
"function validatePassword($value){\n if (is_int($value)) throw new Exception (\"Password must consist of letters and, if needed, numbers\"); #PASS (Check the string to int if all are numbers)\n $passwordMinLength=7;\n $passwordMaxLength=18;\n if (strlen($value)<=$passwordMinLength || strlen($value)>=$passwordMaxLength){\n throw new Exception (\"Wrong password length. It must be >\".$passwordMinLength.\" and <\".$passwordMaxLength.\" in size\");\n //return;\n } else{\n //throw new Exception (\"Wrong password length. It must be >\".$passwordMinLength.\" and <\".$passwordMaxLength.\" in size\");\n }\n //return;\n}",
"function validatePassword($password, $retypedPassword)\n {\n // include the password validator class and validate the password and retyped password minimum of 5 and max of 15 characters\n include(\"../includes/class_libraries/PasswordValidator.php\");\n $passwordValidator = new PasswordValidator(5,15);\n \n // validate the password\n $result = $passwordValidator -> validatePassword($password, $retypedPassword);\n \n // check the result\n if($result == false)\n {\n // get the error and return it\n return $passwordValidator -> getErrors();\n }\n \n return;\n }",
"private function validate_password($value, $min_length, $max_length)\n\t{\n\t\t/* this field is not saved to the DB only echo'd back in an email */\n\t\t/* therefore decided to limit validation to length and sanitize value */\n\t\t/* before inserting in email */\n\t\t// trim and escape input value \n\t\t$value = trim($value);\n\t\t//echo \"value\" . $value . \"<br>\";\n\t\t// empty user name is not valid\n\t\tif ($value) {\n\t\t\t$p_field_valid = validator_helper::validate_alphanum_textarea($value, $min_length, $max_length);\n\t\t\t//since the validator function returns FALSE if invalid or the value if valid,\n\t\t\t//it's safer to check explicitly for not FALSE)\n\t\t\tif (!$p_field_valid === FALSE) {\n\t\t\t\t//echo \"p_field_valid: \" . $p_field_valid . \"<br>\";\n\t\t\t\treturn 1; // valid\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn 0; /* invalid characters */\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t return 0; /* field empty */\n\t\t}\n\t}",
"public static function validatePassword($password){\r\n\t\tif(strlen($password) >= self::$minPassLength){\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"function valid_password($pwd) {\n\t\tif (!$pwd)\n\t\t\treturn FALSE;\n\t\tif (strlen($pwd) < 6)\n\t\t\treturn FALSE;\n\t\tif (!preg_match('/[a-zA-Z]+/', $pwd) || !preg_match('/[0-9]+/', $pwd))\n\t\t\treturn FALSE;\n\t\treturn TRUE;\n\t}",
"public function validatePasswords()\n {\n $passwd = $this->_sanitized_data['password'];\n $passwd2 = $this->_sanitized_data['password2'];\n\n if ($passwd == '' || $passwd2 == '') {\n $this->_addErrorMessage(\"Missing passwords\");\n return false;\n }\n\n if ($passwd !== $passwd2) {\n $this->_addErrorMessage(\"The submitted passwords do not match\");\n return false;\n }\n\n if (strlen($passwd) < 5 && strlen($passwd2) < 5) {\n $this->_addErrorMessage(\"The submitted password must be at least 5 characters long\");\n return false;\n }\n\n return true;\n }",
"public function testInvalidLengthPassword()\n {\n $password = \"23d3\";\n $response = $this->user->isValidPassword($password);\n\n $this->assertFalse($response);\n }",
"function vPassword2() \r\n\t\t{\r\n\t\t\t# Check password strength\r\n\t\t\t$p = $p1;\r\n\t\t\t\r\n\t\t\tif( strlen($p) < 8 ) $reg_errors[] = \"Password too short!\";\r\n\t\t\t\r\n\t\t\tif( strlen($p) > 20 ) $reg_errors[] = \"Password too long!\";\r\n\t\t\t\r\n\t\t\tif( !preg_match(\"#[0-9]+#\", $p) ) $reg_errors[] = \"Password must include at least one number!\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif( !preg_match(\"#[a-z]+#\", $p) ) $reg_errors[] = \"Password must include at least one letter!\";\r\n\t\t\t\r\n\t\t\tif( !preg_match(\"#[A-Z]+#\", $p) ) $reg_errors[] = \"Password must include at least one CAPS!\";\r\n\t\t\t\r\n\t\t\t/* if( !preg_match(\"#\\W+#\", $p) ) $errors[] = \"Password must include at least one symbol!\"; */\t\r\n\t\t\t\r\n\t\t}",
"public function checkPassword($value);",
"function validate_password($password)\r\n\t{\r\n\t\tif($this->dont_allow_3_in_a_row($password) === FALSE)\r\n\t\t{\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\tif(preg_match(REGEX_PASSWORD, $password) !== 1)\r\n\t\t{\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}",
"public function validatePassword()\n {\n $validator = new Validator(array(\n 'password' => $this->password,\n 'password2' => $this->password2,\n self::$primaryKey => $this->id(),\n ));\n\n $validator\n ->required()\n ->set('password2', 'Confirm password');\n\n $validator\n ->required()\n ->minLength(6)\n ->callback(function ($password, $password2) {\n return $password === $password2;\n }, 'Password is not matching confirm password', array($this->password2))\n ->set('password', 'Password');\n\n return $validator->validate();\n }",
"function validate($firstpw, $secondpw) {\n\tif(strcmp($firstpw, $secondpw) == 0) {\n\t\t// Booleans to check password complexity - if true, then firstpw is ok\n\t\t$uppercase = preg_match('@[A-Z]@', $firstpw);\n\t\t$lowercase = preg_match('@[a-z]@', $firstpw);\n\t\t$number = preg_match('@[0-9]@', $firstpw);\n\t\tif($uppercase && $lowercase && $number && strlen($firstpw) > 8) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}",
"function checkPassword($clientPassword)\n{\n $pattern = '/^(?=.*[[:digit:]])(?=.*[[:punct:]])(?=.*[A-Z])(?=.*[a-z])([^\\s]){8,}$/';\n return preg_match($pattern, $clientPassword);\n}",
"function password_security($tested_password){\r\n $isSecured = false;\r\n $contains_letter = preg_match('/[a-zA-Z]/', $tested_password);\r\n $contains_capital = preg_match('/[A-Z]/', $tested_password);\r\n $contains_digit = preg_match('/\\d/', $tested_password);\r\n $contains_special = preg_match('/[^a-zA-Z\\d]/', $tested_password);\r\n\r\n $contains_all = $contains_letter && $contains_capital && $contains_digit && $contains_special;\r\n\r\n if (strlen($tested_password) >= 8 && $contains_all == \"1\") {\r\n $isSecured = true;\r\n }\r\n return $isSecured;\r\n}",
"function validatePassword($pwd) {\r\n\t\treturn (strlen($pwd) >= 6 && preg_match_all(\"/[0-9]/\", $pwd) >= 2);\r\n\t}",
"function CheckPassword($pw) {\n //if the length of a password is less than 8, an error is show to the user\n if (strlen($pw) < 8) {\n $regError = \"Your password must contain at least 8 characters!\";\n $_SESSION['regError'] = $regError;\n header('location:UserregisterView.php');\n return false;\n }\n //if the password doesnt contain a number, an error is shown to the user\n elseif (!preg_match(\"#[0-9]+#\", $pw)) {\n $regError = \"Your password must contain at least 1 number!\";\n $_SESSION['regError'] = $regError;\n header('location:UserregisterView.php');\n return false;\n }\n //if the password doesnt contain a capital letter, an error is shown to the user\n elseif (!preg_match(\"#[A-Z]+#\", $pw)) {\n $regError = \"Your password must contain at least 1 capital letter!\";\n $_SESSION['regError'] = $regError;\n header('location:UserregisterView.php');\n return false;\n }\n //if the password doesnt contain a lowercase letter, an error is shown to the user\n elseif (!preg_match(\"#[a-z]+#\", $pw)) {\n $regError = \"Your password must contain at least 1 lowercase letter!\";\n $_SESSION['regError'] = $regError;\n header('location:UserregisterView.php');\n return false;\n }\n //if these 4 requirements are met, the function returns true (which means that the password is good)\n else {\n return true;\n }\n}",
"function validatePassword($pass) {\n\t\t$l = getOption('min_password_lenght');\n\t\tif ($l > 0) {\n\t\t\tif (strlen($pass) < $l) return sprintf(gettext('Password must be at least %u characters'), $l);\n\t\t}\n\t\t$p = getOption('password_pattern');\n\t\tif (!empty($p)) {\n\t\t\t$strong = false;\n\t\t\t$p = str_replace('\\|', \"\\t\", $p);\n\t\t\t$patterns = explode('|', $p);\n\t\t\t$p2 = '';\n\t\t\tforeach ($patterns as $pat) {\n\t\t\t\t$pat = trim(str_replace(\"\\t\", '|', $pat));\n\t\t\t\tif (!empty($pat)) {\n\t\t\t\t\t$p2 .= '{<em>'.$pat.'</em>}, ';\n\n\t\t\t\t\t$patrn = '';\n\t\t\t\t\tforeach (array('0-9','a-z','A-Z') as $try) {\n\t\t\t\t\t\tif (preg_match('/['.$try.']-['.$try.']/', $pat, $r)) {\n\t\t\t\t\t\t\t$patrn .= $r[0];\n\t\t\t\t\t\t\t$pat = str_replace($r[0],'',$pat);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$patrn .= addcslashes($pat,'\\\\/.()[]^-');\n\t\t\t\t\tif (preg_match('/(['.$patrn.'])/', $pass)) {\n\t\t\t\t\t\t$strong = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!$strong)\treturn sprintf(gettext('Password must contain at least one of %s'), substr($p2,0,-2));\n\t\t}\n\t\treturn false;\n\t}",
"function validatePassword(&$errors, $field_list, $password_field, $confirm_field)\n{\t//checks if fields are empty\n\tif (!isset($field_list[$password_field])|| empty($field_list[$password_field])|| !isset($field_list[$confirm_field])|| empty($field_list[$confirm_field]))\n\t\t$errors[$password_field] = ' Password Required';\n\telse if (!($field_list[$password_field] == $field_list[$confirm_field])) //checks if both passwords match\n\t\t$errors[$password_field] = \" Password don't match\";\n}",
"function validatePass($password){ \n\t\tif (!preg_match(\"/[a-z]/\", $password)){\n\t\t\t$_SESSION['error'] = \"must contain lowercase\";\n\t\t\theader(\"location:../views/register.php\");\n\t\t}\n\n\t\tif (!preg_match(\"/[A-Z]/\", $password)){\n\t\t\t$_SESSION['error'] = \"must contain uppercase\";\n\t\t\theader(\"location:../views/register.php\");\n\t\t}\n\n\t\tif (!preg_match(\"/[0-9]/\", $password)){\n\t\t\t$_SESSION['error'] = \"must contain lowercase\";\n\t\t\theader(\"location:../views/register.php\");\n\t\t}\n\n\t\tif (strlen($password)< 8){\n\t\t\t$_SESSION['error'] = \"Password too short\";\n\t\t\theader(\"location:../views/register.php\");\n\t\t}\n\t\treturn (true);\n\t}",
"public static function validPassword ($length = 6)\r\n\t{\r\n\t\t# Check that the URL contains an activation key string of exactly 6 lowercase letters/numbers\r\n\t\treturn (preg_match ('/^[a-z0-9]{' . $length . '}$/D', (trim ($_SERVER['QUERY_STRING']))));\r\n\t}",
"function nrua_check_password($pwd) {\n\t$errors = [];\n\t\n\tif (strlen($pwd) < 8) {\n\t$errors[] = \"Password too short!\";\n\t}\n\t\n\tif (!preg_match(\"#[0-9]+#\", $pwd)) {\n\t$errors[] = \"Password must include at least one number!\";\n\t}\n\t\n\tif (!preg_match(\"#[a-zA-Z]+#\", $pwd)) {\n\t$errors[] = \"Password must include at least one letter!\";\n\t}\n\t\n\treturn $errors;\n}",
"function checkPassword($clientPassword){\r\n $pattern = '/^(?=.*[[:digit:]])(?=.*[[:punct:]])(?=.*[A-Z])(?=.*[a-z])([^\\s]){8,}$/';\r\n return preg_match($pattern, $clientPassword);\r\n }",
"public function testValidLengthPassword()\n {\n $password = \"accepted\";\n\n $response = $this->user->isValidPassword($password);\n\n $this->assertTrue($response);\n }",
"static function checkPasswords($input)\r\n {\r\n if (preg_match('/^[\\W\\w\\d!@#$%][\\W\\w\\d!@#$%]{8,20}$/', $input)) {\r\n return true;//Illegal Character found\r\n } else{\r\n echo PageBuilder::printError(\"Password should be between 8 to 20 characters long with alphabets, at the least one number and at the least one special characters from ! @ # $ %.\");\r\n return false;\r\n }\r\n }",
"static function checkPasswords($input)\r\n {\r\n if (preg_match('/^[\\W\\w\\d!@#$%][\\W\\w\\d!@#$%]{8,20}$/', $input)) {\r\n return true;//Illegal Character found\r\n } else{\r\n echo PageBuilder::printError(\"Password should be between 8 to 20 characters long with alphabets, at the least one number and at the least one special characters from ! @ # $ %.\");\r\n return false;\r\n }\r\n }",
"public function passwordEntryIsValid() {\r\n \r\n //todo put logic here (same as email)\r\n // also check if it matches confirmpassword\r\n // set the var equal to function call of getpassword\r\n $password = $this->getPassword();\r\n // If the fields empty\r\n if ( empty($password) ) {\r\n // Will send it to errors as username and display the message to user\r\n $this->errors[\"password\"] = \"Password is missing.\";\r\n } \r\n // Calls the password function above and if its not equal to the orgincal password returns error\r\n else if ( $this->getConfirmpassword() !== $this->getPassword() ){\r\n // Message displayed to user\r\n $this->errors[\"password\"] = \"Password does not match confirmation password.\";\r\n }\r\n // Also goes test the password against the password is valid function in the validator class\r\n else if ( !Validator::passwordIsValid($this->getPassword()) ) {\r\n $this->errors[\"password\"] = \"Password is not valid.\"; \r\n }\r\n //Will return if its empty and whether any errors are contained\r\n return ( empty($this->errors[\"password\"]) ? true : false ) ;\r\n }",
"function checkPasswordComplexity( $password ) {\n\n $this->load->library( \"Passwordvalidator\" );\n\n/* ... check the complexity of the password */\n $this->passwordvalidator->setPassword( $password );\n if ($this->passwordvalidator->validate_non_numeric( 1 )) { //Password must have 1 non-alpha character in it.\n $this->passwordvalidator->validate_whitespace(); //No whitespace please\n }\n\n/* ... if we didn't pass, set an appropriate error message */\n if ($this->passwordvalidator->getValid() == 0) {\n $this->form_validation->set_message('checkPasswordComplexity', 'The %s field must contain a string with no spaces and at least 1 non-alpha character');\n }\n\n/* ... time to go */\n return( $this->passwordvalidator->getValid() == 1 ? TRUE : FALSE );\n }",
"function validate_password($hashed_password, $cleartext_password) {\n if (!is_string($hashed_password) || !is_string($cleartext_password))\n return false;\n if (config\\HASHING_ALGORITHM == \"crypt\") {\n $salt_end = strrpos($hashed_password, \"$\");\n if ($salt_end === false) {\n // DES, first two charachers is salt.\n $salt = substr($hashed_password, 0, 2);\n } else {\n // Salt before $.\n $salt_end++;\n $salt = substr($hashed_password, 0, $salt_end);\n }\n return crypt($cleartext_password, $salt) == $hashed_password;\n } else if (config\\HASHING_ALGORITHM == \"sha1\") {\n if (strlen($hashed_password) != 80)\n return false;\n $salt = substr($hashed_password, 0, 40);\n $hash = substr($hashed_password, 40);\n return $hash == sha1($salt . $cleartext_password, false);\n } else if (config\\HASHING_ALGORITHM == \"md5\") {\n if (strlen($hashed_password) != 64)\n return false;\n $salt = substr($hashed_password, 0, 32);\n $hash = substr($hashed_password, 32);\n return $hash == sha1($salt . $cleartext_password, false);\n } else\n trigger_error(\"The configured hashing algorithm '\" . config\\HASHING_ALGORITHM . \"' is not supported.\", \\E_USER_ERROR);\n}",
"public function isValidPassword($uid, $password);",
"private function validate_password($password){\n\t\treturn TRUE;\n\t}",
"function validPassword($password){\t\r\n \tglobal $API;\r\n return $API->userValidatePassword($this->username,$password); \r\n }",
"function is_secured_password($password)\n{\n if (is_null($password) || strlen($password) < 6 || strlen($password) > 40)\n {\n return false;\n }\n $pattern = \"/^[a-z0-9~`!@#\\$%\\^&\\*\\-_\\+=\\(\\)\\{\\}\\[\\]\\|:;\\\"\\'\\<\\>\\.,\\?\\/]{6,40}$/i\";\n $pattern1 = \"/[A-Z]/\";\n $pattern2 = \"/[a-z]/\";\n $pattern3 = \"/[0-9]/\";\n $pattern4 = \"/[~`!@#\\$%\\^&\\*\\-_\\+=\\(\\)\\{\\}\\[\\]\\|:;\\\"\\'\\<\\>\\.,\\?\\/]/\";\n\n return (preg_match($pattern, $password) == 1) && (preg_match($pattern1, $password) == 1) && (preg_match($pattern2, $password) == 1) && (preg_match($pattern3, $password) == 1) && (preg_match($pattern4, $password) == 1);\n}",
"public function isValid($password)\n {\n if ($this->_minLength) {\n $len = strlen($password);\n if ($len < $this->_minLength) {\n return $this->_setInvalidReason(self::REASON_TOO_SHORT, array(\n 'minimum length' => $this->_minLength,\n 'password length' => $len,\n ));\n }\n }\n if ($this->_minStrength) {\n $strength = $this->calculateStrength($password);\n if ($strength < $this->_minStrength) {\n return $this->_setInvalidReason(self::REASON_TOO_WEAK, array(\n 'minimum strength' => $this->_minStrength,\n 'password strength' => $strength,\n ));\n }\n }\n if ($this->_minEntropy) {\n $entropy = $this->calculateEntropy($password);\n if ($entropy < $this->_minEntropy) {\n return $this->_setInvalidReason(self::REASON_INSUFFICIENT_ENTROPY, array(\n 'minimum entropy' => $this->_minEntropy,\n 'password entropy' => $entropy,\n ));\n }\n }\n foreach ($this->_requiredCharValidators as $validator) {\n list ($chars, $numRequired) = $validator;\n // http://www.php.net/manual/en/function.mb-split.php#99851\n $charArr = preg_split('/(?<!^)(?!$)/u', $chars);\n str_replace($charArr, ' ', $password, $count);\n if ($count < $numRequired) {\n return $this->_setInvalidReason(self::REASON_MISSING_REQUIRED_CHARS, array(\n 'required chars' => $chars,\n 'num required' => $numRequired,\n 'num found' => $count,\n ));\n }\n }\n foreach ($this->_validators as $validator) {\n list($type, $thing) = $validator;\n if ($type === 'callable') {\n $func = $thing;\n } else {\n $func = array($thing, 'isValid');\n }\n $result = call_user_func($func, $password);\n if (! $result) {\n return $this->_setInvalidReason(self::REASON_FAILED_VALIDATOR, array(\n 'validator' => $thing,\n ));\n }\n }\n if ($this->_passwordLists) {\n $file = $this->findPassword($password);\n if ($file) {\n return $this->_setInvalidReason(self::REASON_FOUND_IN_LIST, array(\n 'list file' => $file,\n ));\n }\n }\n return true;\n }",
"function checkPasswordPolicy( $password, $admin=\"y\" ) {\n\t\n\tglobal $CONF;\n\t\n\t$smallLetters\t\t= preg_match( '/[a-z]/', $password );\n\t$capitalLetters\t\t= preg_match( '/[A-Z]/', $password );\n\t$numbers\t\t\t= preg_match( '/[0-9]/', $password );\n\tif( isset( $CONF['passwordSpecialChars'] ) ) {\n\t\t$pattern\t\t= '/'.$CONF['passwordSpecialChars'].'/';\n\t} else {\n\t\t$pattern\t\t= '/'.'[\\!\\\"\\§\\$\\%\\/\\(\\)=\\?\\*\\+\\#\\-\\_\\.\\:\\,\\;\\<\\>\\|\\@]'.'/';\n\t}\n\t$specialChars\t\t= preg_match( $pattern, $password );\n\t$passwordLength\t\t= strlen( $password );\n\t$groups\t\t\t\t= 0;\n\t\n\tif( $smallLetters != 0 ) {\n\t\t$groups++;\n\t}\n\t\n\tif( $capitalLetters != 0 ) {\n\t\t$groups++;\n\t}\n\t\n\tif( $numbers != 0 ) {\n\t\t$groups++;\n\t}\n\t\n\tif( $specialChars != 0 ) {\t\t\n\t\t$groups++;\n\t}\n\t\n\tif( $admin == \"y\" ) {\n\t\t\n\t\tif( isset($CONF['minPasswordlength']) ) {\n\t\t\t$minPasswordLength\t= $CONF['minPasswordlength'];\n\t\t} else {\n\t\t\t$minPasswordLength\t= 14;\n\t\t}\n\t\tif( $passwordLength < $minPasswordLength ) {\n\t\t\t\n\t\t\t$retval\t\t\t= 0;\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tif( isset( $CONF['minPasswordGroups'] ) ) {\n\t\t\t\t$minPasswordGroups\t= $CONF['minPasswordGroups'];\n\t\t\t} else {\n\t\t\t\t$minPasswordGroups\t= 4;\n\t\t\t}\n\t\t\tif( isset( $minPasswordGroups ) ) {\n\t\t\t\n\t\t\t\tif( ($minPasswordGroups < 1) or ($minPasswordGroups > 4) ) {\n\t\t\t\t\t$minGroups\t= 4;\n\t\t\t\t} else {\n\t\t\t\t\t$minGroups\t= $minPasswordGroups;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$minGroups\t\t= 4;\n\t\t\t}\n\t\t\t\n\t\t\tif( $groups < $minGroups ) {\n\t\t\t\n\t\t\t\t$retval\t\t\t= 0;\n\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$retval\t\t\t= 1;\n\t\t\t\t\n\t\t\t}\t\n\t\t}\n\t\n\t} else {\n\t\t\n\t\tif( isset( $CONF['minPasswordlengthUser'] ) ) {\n\t\t\t$minPasswordlengthUser\t\t= $CONF['minPasswordlengthUser'];\n\t\t} else {\n\t\t\t$minPasswordLengthUser\t\t= 8;\n\t\t}\n\t\tif( $passwordLength < $CONF['minPasswordlengthUser'] ) {\n\t\t\t\n\t\t\t$retval\t\t\t= 0;\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tif( isset($CONF['minPasswordGroupsUser']) ) {\n\t\t\t\t\n\t\t\t\tif( ($CONF['minPasswordGroupsUser'] < 1) or ($CONF['minPasswordGroupsUser'] > 4 ) ) {\n\t\t\t\t\t$minGroupsUser\t= 3;\n\t\t\t\t} else {\n\t\t\t\t\t$minGroupsUser\t= $CONF['minPasswordGroupsUser'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$minGroupsUser\t= 3;\n\t\t\t}\n\t\t\t\n\t\t\tif( $groups < $minGroupsUser ) {\n\t\t\t\t\n\t\t\t\t$retval\t\t\t= 0;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$retval\t\t\t= 1;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}\n\t\n\treturn $retval;\n}",
"protected function validatePassword($password) \n {\n if (!empty($password)) {\n if (strlen($password) < '8') {\n $this->errors[] = PASSWORD_TOO_SHORT;\n }\n if (!preg_match(\"#[0-9]+#\", $password)) {\n $this->errors[] = PASSWORD_NEEDS_NUMBER;\n }\n if (!preg_match(\"#[A-Z]+#\", $password)) {\n $this->errors[] = PASSWORD_NEEDS_UPPERCASE;\n }\n if (!preg_match(\"#[a-z]+#\", $password)) {\n $this->errors[] = PASSWORD_NEEDS_LOWERCASE;\n }\n } else {\n $this->errors[] = PASSWORD_MISSING;\n }\n }",
"public function check() {\n // Use preg_match() with a regular expression to check the password for whitespace.\n if (preg_match('/\\s/', $this->_password)) {\n // if there is a whitespace, an error message is stored in the current instance's $_errors array property.\n $this->_errors[] = 'Password cannot contain spaces.';\t\n }\n \n // Check that the value in the current instance's $_password property is less than our set minimum.\n if (strlen($this->_password) < $this->_minimumChars) {\n\t $this->_errors[] = \"Password must be at least $this->_minimumChars characters.\";\n } \n \n // This runs only if the requireMixedCase method is called before check().\n // If $_mixedCase is set to true\n\tif ($this->_mixedCase) {\n // Create a regex pattern to match the value against (checks for characters that are upper and lowercase).\n\t $pattern = '/(?=.*[a-z])(?=.*[A-Z])/';\n // Using preg_match, test characters inside the current instance's $_password property for upper and lowercase.\n\t if (!preg_match($pattern, $this->_password)) {\n\t\t$this->_errors[] = 'Password should include uppercase and lowercase characters.';\n\t }\n\t}\n \n // This runs only if the requireNumbers method is called before check().\n\tif ($this->_minimumNumbers) { \n // Create a regex pattern to check the value in $_password against.\n\t $pattern = '/\\d/'; \n\t $found = preg_match_all($pattern, $this->_password, $matches); // number of matches stored in $found\n \n // If the number of matches is less than the set minimum number property, an error message is passed to the \n // current instance's $_errors property.\n\t if ($found < $this->_minimumNumbers) {\n\t\t$this->_errors[] = \"Password should include at least $this->_minimumNumbers number(s).\";\n\t }\n\t}\n \n // If $_errors has values, check() returns false, indicating the password failed validation; otherwise check() returns true.\n\treturn $this->_errors ? false : true;\n }",
"public function test($password) {\n $error = array();\n if($password == trim($password) && strpos($password, ' ') !== false) {\n $error[] = \"Password can not contain spaces!\";\n }\n \n if(($this->password_lenghtMin!=null) && (strlen($password) < $this->password_lenghtMin)) {\n $error[] = \"Password too short! Minimum \".$this->password_lenghtMin.\" characters.\";\n }\n if(($this->password_lenghtMax!=null) && (strlen($password) > $this->password_lenghtMax)) {\n $error[] = \"Password too long! Maximum \".$this->password_lenghtMax.\" characters.\";\n }\n \n if(($this->password_number!=null) && (!preg_match(\"#[0-9]+#\", $password, $output))) {\n $error[] = \"Password must include at least \".$this->password_number.\" number(s)!\";\n } elseif($this->password_number>1) {\n preg_match_all(\"/\\W+/\", $password, $output);\n $output = $output[0];\n $c = 0;\n foreach($output as $out) {\n $c = $c + strlen($out);\n }\n if($c<$this->password_number) {\n $error[] = \"Password must include at least \".$this->password_number.\" number(s)!\";\n }\n }\n\n if(($this->password_letter!=null) && (!preg_match(\"#[a-z]+#\", $password, $output))) {\n $error[] = \"Password must include at least \".$this->password_letter.\" letter(s)! \";\n } elseif($this->password_letter>1) {\n preg_match_all(\"/\\W+/\", $password, $output);\n $output = $output[0];\n $c = 0;\n foreach($output as $out) {\n $c = $c + strlen($out);\n }\n if($c<$this->password_letter) {\n $error[] = \"Password must include at least \".$this->password_letter.\" letter(s)! \";\n }\n }\n\n if(($this->password_capital!=null) && (!preg_match(\"#[A-Z]+#\", $password, $output))) {\n $error[] = \"Password must include at least \".$this->password_capital.\" capital letter(s)! \";\n } elseif($this->password_capital>1) {\n preg_match_all(\"/\\W+/\", $password, $output);\n $output = $output[0];\n $c = 0;\n foreach($output as $out) {\n $c = $c + strlen($out);\n }\n if($c<$this->password_capital) {\n $error[] = \"Password must include at least \".$this->password_capital.\" capital letter(s)! \";\n }\n }\n \n \n if(($this->password_symbol!=null) && (!preg_match(\"/\\W+/\", $password))) {\n $error[] = \"Password must include at least \".$this->password_symbol.\" symbol(s)!\";\n } elseif($this->password_symbol>1) {\n preg_match_all(\"/\\W+/\", $password, $output);\n $output = $output[0];\n $c = 0;\n foreach($output as $out) {\n $c = $c + strlen($out);\n }\n if($c<$this->password_symbol) {\n $error[] = \"Password must include at least \".$this->password_symbol.\" symbol(s)!\";\n }\n }\n \n if(($this->password_strength!=null) && (($this->strength($password)!==false) && ($this->strength($password)['score']<$this->password_strength))) {\n $error[] = \"Password too weak! \".$this->strength($password)['score'].'/4 minimum '.$this->password_strength;\n }\n\n if(!empty($error)){\n return $error;\n } else {\n return true;\n }\n }",
"public function check_password($password)\n {\n }",
"public function enforceRulePassword($data){\n if (strlen($data) >= 8){\n \t$validPassword= $data;\n \t} \n \telse{\n \t$validPassword= FALSE;\n\t\t\t}\n\t\t\t\n\t\t\t/*if (preg_match (\"/^.*(?=.{8,})(?=.*\\d)(?=.*[a-zA-Z]).*$/\", $data)){\n \t$validPassword= $data;\n \t} \n \telse{\n \t$validPassword= FALSE;\n\t\t\t}*/\n\t\t\t\n\t\t\treturn $validPassword;\n }",
"function error_password($pass, $pass_bis)\n{\n $error = array();\n if (strlen($pass) < 8 || strlen($pass) >= 255)\n array_push($error, \"error password must be longer than 8 and shorter than 255 \");\n if ($pass !== $pass_bis)\n array_push($error, \"password do not match\");\n if (!preg_match(\"/.*[0-9].*/\", $pass))\n array_push($error, \"password must have at least a number in it\");\n return ($error);\n}",
"function isValidPassword($password){\n $hasLower = false;\n $hasDigit = false;\n $hasUpper = false;\n\n if(strlen($password) >= 8 && strlen($password) <= 20){\n $splitStringArray = str_split($password);\n\n for($i = 0; $i < count($splitStringArray); $i++){\n if(ctype_lower($splitStringArray[$i])){\n $hasLower = true;\n }\n else if(ctype_digit($splitStringArray[$i])){\n $hasDigit = true;\n }\n else if(ctype_upper($splitStringArray[$i])){\n $hasUpper = true;\n }\n if($hasLower && $hasDigit && $hasUpper){\n return true;\n }\n }\n }\n return false;\n }",
"static function valid_password($input) {\n return strlen($input) > 5 && trim($input) === $input;\n }",
"function passwordGood($pass) {\n\t// default encoding/encoding specified in php.ini for nginx's php fpm module\n\t// is 'UTF-8'\n\t$len = mb_strlen($pass);\n\t//$len = strlen($pass);\n\t// original code of ($len >= 8 && $len <= 24) doesn't seem to work since I think\n\t// when true these return 1, when false they seem to return nothing, when printed empty string\n\t// be careful, these seem to return nothing or they don't print properly\n\t// this does work though :P\n\tif ( ( $len < 8 ) || ( $len > 24 ) ) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}",
"public function valida_password($password){\n\t\tif (preg_match(\"/^.*(?=.{8,})(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).*$/\", $password)) \n\t\t\techo \"Su password es seguro.\"; \n\t\telse echo \"Su password no es seguro.\";\n\n\t}",
"public function checkPasswordMinLength($password)\n {\n if (strlen($password) < 5) {\n return false;\n } else return true;\n }",
"function testPasswordErr($password) {\n if (empty($password)) {\n $passwordErr = 'Password required';\n } else {\n $password = test_input($password);\n //VALIDATE PASSWORD\n if (!filter_var($password, FILTER_VALIDATE_REGEXP, array(\"options\" => array(\"regexp\" => \"((?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{4,10})\")))) {\n //da 4 a 10 caratteri, deve contenere maiuscole, minuscole e numeri\n $passwordErr = \"Invalid Password format\";\n } else\n $passwordErr = \"*\";\n }\n return $passwordErr;\n }",
"public function testLongPassword ()\n {\n // Function parameters\n $length = 20;\n $minPasswordRequirements = [];\n // Helper\n $securityHelper = new SecurityHelper(new Security()); // Empty security (it does not matter)\n // Check password correctness\n $ok = true;\n for ($i = 0; $i < self::ITERATIONS; $i++) {\n $password = $securityHelper->generatePassword($length, $minPasswordRequirements);\n $result = preg_match('/\\A[0-9a-zA-Z!#$%&*+,-.:;<=>?@_~]{20,}\\z/', $password);\n if ($result === 0) {\n $ok = false;\n break;\n }\n }\n $this->assertTrue($ok);\n }",
"public function ValidPassword($check) {\n\t // have to extract the value to make the function generic\n\t $value = array_values($check);\n\t $value = $value[0];\n\n\t //$uppercase = preg_match('@[A-Z]@', $value);\n\t $lowercase = preg_match('@[a-z]@', $value);\n\t $number = preg_match('@[0-9]@', $value);\n\t //$specialchars = preg_match('/[!@#$%^&*()\\-_=+{};:,<.>]/', $value);\n\t \t// var_dump($value);\n\t // exit();\n\t if(!$lowercase || !$number || strlen($value) < 6 ) {\n\t \t \treturn false; \n\t } else {\n\t return true;\n\t\t\t}\n\t\t}",
"public function validatePassword($password)\n {\n return $this->hashPassword($password)===$this->password;\n }",
"function check_password($password)\n{\n return ($password == 'qwerty');\n}",
"function wp_validate_application_password($input_user)\n {\n }",
"function is_password_valid ($password, $user_data) {\n // the one in the user records.\n $is_valid = $password == $user_data['password'];\n return $is_valid;\n}",
"public function isPassword($password);",
"public function testCheckPassword()\n {\n $hasher = new PasswordHash(8, true);\n\n $testHash = '$P$BbD1flG/hKEkXd/LLBY.dp3xuD02MQ/';\n $testCorrectPassword = 'test123456!@#';\n $testIncorrectPassword = 'test123456!#$';\n\n $this->assertTrue($hasher->CheckPassword($testCorrectPassword, $testHash));\n $this->assertFalse($hasher->CheckPassword($testIncorrectPassword, $testHash));\n }",
"public function passwordValidate($password)\n {\n\n $length = strlen($password);\n\n if ($length < 5) {\n return false;\n } else {\n return true;\n }\n }",
"public function validatePassword(User $user, $password);",
"public function validatePassword()\n {\n /* @var $user User */\n $user = Yii::$app->user->identity;\n if (!$user || !$user->validatePassword($this->password)) {\n $this->addError('password', 'Incorrect password.');\n }\n }",
"public function testValidatePassword()\n\t{\n\t\t$return = $this->auth->register($this->email, $this->password, $this->password . $this->shortPassword);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang(\"Auth.password_nomatch\"));\n\n\t\t// using short password\n\t\t$return = $this->auth->register($this->email, $this->shortPassword, $this->shortPassword);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang('Auth.password_short'));\n\n\t\t// using weak password\n\t\t$return = $this->auth->register($this->email, $this->weakPassword, $this->weakPassword);\n\n\t\t$this->assertTrue($return['error']);\n\t\t$this->assertSame($return['message'], lang('Auth.password_weak'));\n\t}",
"public function testPasswordIsValid($data)\n {\n $pattern = \"/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/\";\n\n $this->assertMatchesRegularExpression($pattern,$data);\n\n }",
"private function validatePassword($password)\n {\n if (strlen($password) < $this->password_length) {\n $this->user_status_message = 'Password must have at least eight characters.';\n return false;\n }\n if (preg_match(\"/(?=[a-zA-Z]*[0-9])(?=[0-9]*[a-zA-Z])([a-zA-Z0-9]+)/\", $password)) {\n return true;\n } else {\n $this->user_status_message = 'Password must heave letters and numbers.';\n return false;\n }\n }",
"public function password_strength_check($str)\n\t{\n\t\tif (preg_match('#[0-9]#', $str) && preg_match('#[a-zA-Z]#', $str)) {\n\t\t\treturn TRUE;\n\t\t}\n\t\telse {\n\t\t\t$this->form_validation->set_message('password_strength_check', 'Your password must be at least 6-19 characters in length and contain a number and both uppercase and lowercase letters');\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t\n\t}",
"function wppb_check_password_value( $message, $field, $request_data, $form_location ){\r\n\tif ( $form_location == 'register' ){\r\n\t\tif ( ( isset( $request_data['passw1'] ) && ( trim( $request_data['passw1'] ) == '' ) ) && ( $field['required'] == 'Yes' ) )\r\n\t\t\treturn wppb_required_field_error($field[\"field-title\"]);\r\n\t\t\r\n\t\telseif ( !isset( $request_data['passw1'] ) && ( $field['required'] == 'Yes' ) )\r\n\t\t\treturn wppb_required_field_error($field[\"field-title\"]);\r\n\t}\r\n\r\n if ( trim( $request_data['passw1'] ) != '' ){\r\n $wppb_generalSettings = get_option( 'wppb_general_settings' );\r\n\r\n if( wppb_check_password_length( $request_data['passw1'] ) )\r\n return '<br/>'. sprintf( __( \"The password must have the minimum length of %s characters\", \"profile-builder\" ), $wppb_generalSettings['minimum_password_length'] );\r\n\r\n\r\n if( wppb_check_password_strength() ){\r\n return '<br/>' . sprintf( __( \"The password must have a minimum strength of %s\", \"profile-builder\" ), wppb_check_password_strength() );\r\n }\r\n }\r\n\r\n return $message;\r\n}",
"function vPassword( $password )\r\n\t\t{\r\n\t\t\t\treturn preg_match( '/^(?=^.{8,}$)((?=.*[A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z]))^.*$/', $password );\r\n\t\t\t\t\r\n\t\t}",
"public function checkPass($password) {\r\n\t\tif(!empty($password)) {\r\n\t\t if (strlen($password) <= '8') {\r\n\t\t return \"Your Password Must Contain At Least 8 Characters!\";\r\n\t\t }\r\n\t\t elseif(!preg_match(\"#[0-9]+#\", $password)) {\r\n\t\t return \"Your Password Must Contain At Least 1 Number!\";\r\n\t\t }\r\n\t\t elseif(!preg_match(\"#[A-Z]+#\", $password)) {\r\n\t\t return \"Your Password Must Contain At Least 1 Capital Letter!\";\r\n\t\t }\r\n\t\t elseif(!preg_match(\"#[a-z]+#\", $password)) {\r\n\t\t return \"Your Password Must Contain At Least 1 Lowercase Letter!\";\r\n\t\t } else {\r\n\t\t \treturn null;\r\n\t\t }\r\n\t\t}\r\n\r\n\t\telseif(empty($password)) {\r\n\t\t return \"Password was left empty\";\r\n\t\t}\r\n\r\n\t}",
"function passwd_verify(string $password, string $hash): bool\n{\n return password_verify($password, $hash);\n}",
"function pwdLongEnough($password) {\n $result=true;\n if(strlen($password) < 8){\n $result =false;\n } \n else {\n $result = true;\n }\n return $result;\n}",
"function validateConfirmPassword($password, $confirmPassword)\n{\n $errorMessage = validatePassword($confirmPassword);\n \n if(strlen($errorMessage) > 0)\n {\n return $errorMessage;\n }\n elseif($confirmPassword != $password) \n {\n $errorMessage = \"Passwords do not match\";\n return $errorMessage;\n }\n else\n {\n return $errorMessage; \n }\n \n\n}",
"function PWValidation($x){\n\t$x = str_split($x, 1);\n\t$faultyCheck = TRUE;\n\twhile($faultyCheck) {\n\t\tforeach($x as $eachOne) {\n\t\t\tif((ctype_alpha($eachOne) OR (is_numeric($eachOne)))) {\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$errorMessage = 'Your password must contain only alphanumeric characters';\n\t\t\t\treturn $errorMessage;\n\t\t\t}\n\t\t}\n\t\t$faultyCheck = FALSE;\n\t}\n}",
"public function check_password($password)\n {\n return FALSE;\n }",
"public function validatePassword()\n {\n /* @var $user User */\n $user = Yii::$app->user->identity;\n if (!$user || !$user->validatePassword($this->oldPassword)) {\n $this->addError('oldPassword', 'Incorrect old password.');\n }\n }",
"public function isPasswordValid(string $encoded, string $raw);",
"function checkPassword($errorString) {\n if(strlen($_POST[\"password\"]) < 6 || strlen($_POST[\"password\"]) > 15) { // (1,2)\n return $errorString.\"Heslo musí být dlouhé alespoň <b>6</b> a maximálně <b>15</b> znaků.<br>\";\n }\n\n if(strcmp($_POST[\"password\"], $_POST[\"password2\"]) != 0) return $errorString.\"Zadaná hesla se <b>neshodují</b>.<br>\"; // (3)\n \n return $errorString;\n}",
"function sloodle_validate_prim_password_verbose($password, &$errors)\n {\n // Initialise variables\n $errors = array();\n $result = true;\n \n // Check that it's a string\n if (!is_string($password)) {\n $errors[] = 'invalidtype';\n $result = false;\n }\n // Check the length\n $len = strlen($password);\n if ($len < 5) {\n $errors[] = 'tooshort';\n $result = false;\n }\n if ($len > 9) {\n $errors[] = 'toolong';\n $result = false;\n }\n \n // Check that it's all numbers\n if (!ctype_digit($password)) {\n $errors[] = 'numonly';\n $result = false;\n }\n \n // Check that it doesn't start with a 0\n if ($password[0] == '0') {\n $errors[] = 'leadingzero';\n $result = false;\n }\n \n return $result;\n }",
"protected function is_password_valid($not_strict = true , String $password = '') : bool\n {\n\n $password = $password ? $password : @$_POST['password'];\n\n if(!$password and $not_strict) return true;\n\n return preg_match(\"/([A-Z])+([a-z])+([0-9])/\",$password);\n\n }",
"function validate_password($plain, $encrypted) {\n if ($plain != \"\" && $encrypted != \"\") {\n// split apart the hash / salt\n $stack = explode(':', $encrypted);\n\n if (sizeof($stack) != 2) return false;\n\n if (md5($stack[1] . $plain) == $stack[0]) {\n return true;\n }\n }\n\n return false;\n }",
"public static function checkPassword($password)\r\n {\r\n if (strlen($password) >= 6) {\r\n return true;\r\n }\r\n return false;\r\n }",
"function password_check($password) {\n\t\treturn password_check_user($this->userid, $password);\n\t}",
"public function authenticationWithValidAlphaCharClassPassword() {}"
] | [
"0.8269009",
"0.81870234",
"0.802889",
"0.7972113",
"0.79659915",
"0.7917638",
"0.7793911",
"0.777222",
"0.7694906",
"0.7689898",
"0.76659703",
"0.76316524",
"0.763059",
"0.7625741",
"0.75845385",
"0.756321",
"0.75374347",
"0.7505892",
"0.7492226",
"0.74788404",
"0.7439981",
"0.74393994",
"0.7435763",
"0.7411348",
"0.74098784",
"0.74070615",
"0.74015063",
"0.7389815",
"0.7381153",
"0.737193",
"0.73698944",
"0.73659533",
"0.736274",
"0.7350693",
"0.7346152",
"0.7328159",
"0.7326119",
"0.73156315",
"0.7302939",
"0.7286831",
"0.72807294",
"0.72771555",
"0.72751707",
"0.72597784",
"0.7255713",
"0.7239212",
"0.7239212",
"0.72317874",
"0.72219586",
"0.72139734",
"0.7205589",
"0.71957827",
"0.71929765",
"0.719035",
"0.71859676",
"0.7184798",
"0.7183174",
"0.71706414",
"0.7167239",
"0.716576",
"0.71641177",
"0.71299356",
"0.7120569",
"0.7117883",
"0.71163225",
"0.7088173",
"0.7069396",
"0.706933",
"0.70564556",
"0.70442027",
"0.70272815",
"0.7023115",
"0.7002012",
"0.699042",
"0.698719",
"0.69847995",
"0.6975049",
"0.6973973",
"0.6961681",
"0.69529456",
"0.69115794",
"0.6903781",
"0.68997985",
"0.6889566",
"0.68645793",
"0.6852574",
"0.68517625",
"0.6850331",
"0.6837881",
"0.6837377",
"0.6828309",
"0.68098825",
"0.68049294",
"0.68017703",
"0.6794945",
"0.6787954",
"0.67868847",
"0.6776663",
"0.6768127",
"0.6763176"
] | 0.79988354 | 3 |
This method gets invoked after the test method is invoked and regard less of its outcome, after the tearDown() call has run. | public function afterTest(TestCase $t) {
// Empty
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() { }",
"protected function tearDown () {\n \n }",
"protected function tearDown() {\r\n \r\n }",
"protected function tearDown() {\r\n \r\n }",
"protected function tearDown() {\r\n \r\n }",
"protected function tearDown ()\n {}",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\n \n }",
"protected function tearDown() {\r\n }",
"protected function tearDown() {\n\t\t\n\t}",
"protected function tearDown() {\n\t\t\n\t}",
"protected function tearDown() {\n\t\t\n\t}",
"protected function tearDown() {\n\t\t\n\t}",
"protected function tearDown() {\n\t\t\n\t}",
"protected function tearDown() {\n\t\t\n\t}",
"protected function tearDown() {\n\t\t\n\t}",
"protected function tearDown() {\n\t\t\n\t}",
"protected function tearDown() {\n\t\n }",
"protected function tearDown() {\n\t\n }",
"protected function tearDown() {\r\n }",
"protected function tearDown() {\r\n }",
"protected function tearDown() {\r\n }",
"protected function tearDown() {\r\n }",
"public function tearDown() {}",
"protected function tearDown(){\r\n \r\n }",
"protected function tearDown(){\r\n \r\n }",
"protected function _tearDown( )\n {\n }",
"protected function tearDown() {\r\n\t\t\r\n\t}",
"protected function tearDown(): void {\n \n }",
"protected function tearDown(): void {\n \n }",
"protected function tearDown(): void {\n \n }",
"protected function tearDown(): void {\n \n }",
"protected function tearDown(): void {\n \n }",
"protected function tearDown()\r\n {\r\n }",
"protected function tearDown()\r\n {\r\n }",
"protected function tearDown()\r\n {\r\n }",
"protected function tearDown()\r\n {\r\n }",
"protected function tearDown()\r\n {\r\n }"
] | [
"0.84019583",
"0.84019583",
"0.84019583",
"0.8401803",
"0.8401803",
"0.8401803",
"0.8401803",
"0.8401361",
"0.8401361",
"0.8401361",
"0.8401361",
"0.8401361",
"0.8401361",
"0.8401361",
"0.8363948",
"0.82749844",
"0.8273428",
"0.8273428",
"0.8273428",
"0.82713103",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82702863",
"0.82214224",
"0.8202407",
"0.8202407",
"0.8202407",
"0.8202407",
"0.8202407",
"0.8202407",
"0.8202407",
"0.8202407",
"0.8202058",
"0.8202058",
"0.819059",
"0.819059",
"0.819059",
"0.819059",
"0.8175341",
"0.81656414",
"0.81656414",
"0.81652",
"0.81530017",
"0.8152934",
"0.8152934",
"0.8152934",
"0.8152934",
"0.8152934",
"0.81500757",
"0.81500757",
"0.81500757",
"0.81500757",
"0.81500757"
] | 0.0 | -1 |
Create the migration file. | private function create_migration(){
$file = $this->path('migrations') . date('Y_m_d_His') . '_create_slender_table.php';
$this->write_file($file, static::$migrationCode);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createMigrationFile()\n {\n $fieldObjects = $this->getFields();\n\n if (@$fieldObjects['id']) {\n unset($fieldObjects['id']);\n }\n\n if (@$fieldObjects['created_at'] && @$fieldObjects['updated_at']) {\n $this->addGenericCall((new Base())->timestamps());\n\n unset($fieldObjects['created_at'], $fieldObjects['updated_at']);\n } // if\n\n if (@$fieldObjects['deleted_at']) {\n $this->addGenericCall((new Base())->softDeletes());\n\n unset($fieldObjects['deleted_at']);\n } // if\n\n $schema = implode(', ', $fieldObjects);\n\n if (strpos($schema, 'enum') !== false) {\n $this->getCommand()->info(sprintf('Please change the enum field of table \"%s\" manually.',\n $this->getName()));\n }\n\n if ($this->isPivotTable()) {\n $tables = array_keys($this->getForeignKeys());\n\n Artisan::call(\n 'make:migration:pivot',\n [\n 'tableOne' => $tables[0],\n 'tableTwo' => $tables[1]\n ]\n );\n } else {\n Artisan::call(\n 'make:migration:schema',\n [\n 'name' => \"create_{$this->getName()}_table\",\n '--model' => $this->needsLaravelModel(),\n '--schema' => $fieldObjects ? $schema : ''\n ]\n );\n\n $migrationFiles = glob(\n database_path('migrations') . DIRECTORY_SEPARATOR . \"*_create_{$this->getName()}_table.php\"\n );\n }\n\n return @$migrationFiles ? end($migrationFiles) : '';\n }",
"private function make()\n {\n \n $file = database_path().'/migrations/'.$this->fileName.'.php';\n \n $content = $this->blueprint();\n \n $this->file_write( $file, $content );\n \n }",
"protected function createMigration()\n {\n $table = Str::snake(Str::pluralStudly(class_basename($this->argument('name'))));\n\n $this->call('make:migration', [\n 'name' => \"create_{$table}_table\",\n '--create' => $table,\n ]);\n }",
"protected function createMigration()\n {\n $table = Str::snake(Str::pluralStudly(class_basename($this->argument('name'))));\n\n if ($this->option('pivot')) {\n $table = Str::singular($table);\n }\n try {\n\n $this->call('make:migration', [\n 'name' => \"create_{$table}_table\",\n '--create' => $table,\n ]);\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }",
"protected function createMigration()\n {\n $migrationsOptions = [\n 'migrationName' => 'create_' . Str::plural(strtolower($this->info['modelName'])) . '_table',\n 'module' => $this->info['moduleName'],\n ];\n\n if ($this->optionHasValue('index')) {\n $migrationsOptions['--index'] = $this->option('index');\n }\n\n if ($this->optionHasValue('unique')) {\n $migrationsOptions['--unique'] = $this->option('unique');\n }\n\n if ($this->optionHasValue('data')) {\n $migrationsOptions['--data'] = $this->option('data');\n }\n\n if ($this->optionHasValue('uploads')) {\n $migrationsOptions['--uploads'] = $this->option('uploads');\n }\n\n if ($this->optionHasValue('int')) {\n $migrationsOptions['--int'] = $this->option('int');\n }\n\n if ($this->optionHasValue('bool')) {\n $migrationsOptions['--bool'] = $this->option('bool');\n }\n\n if ($this->optionHasValue('float')) {\n $migrationsOptions['--float'] = $this->option('float');\n }\n if ($this->optionHasValue('table')) {\n $migrationsOptions['--table'] = $this->option('table');\n }\n\n if (isset($this->info['parent'])) {\n $migrationsOptions['--parent'] = $this->info['parent'];\n }\n\n Artisan::call('engez:migration', $migrationsOptions);\n }",
"protected function writeMigrations()\n {\n $files = $this->migrator->create($this->options);\n\n foreach($files as $file)\n {\n $path = pathinfo($file, PATHINFO_FILENAME);\n $this->line(\" <fg=green;options=bold>create</fg=green;options=bold> $path\");\n }\n }",
"protected function createMigrationTable()\n {\n $migration_table = $this->config_file->getMigrationTable();\n\n $resource = $this->db_adapter->query(\"\n CREATE TABLE $this->migration_table (\n file VARCHAR PRIMARY KEY,\n ran_at TIMESTAMP DEFAULT NOW()\n );\n \");\n }",
"protected function createMigration()\n {\n $name = $this->argument('name');\n\n $this->call('wizard:migration', [\n 'name' => $name,\n ]);\n }",
"public function createMigrationsTable(): void;",
"public function migrate()\n {\n $fileSystem = new Filesystem();\n\n $fileSystem->copy(\n __DIR__.'/../database/migrations/2018_06_29_032244_create_laravel_follow_tables.php',\n __DIR__.'/database/migrations/create_laravel_follow_tables.php'\n );\n\n foreach ($fileSystem->files(__DIR__.'/database/migrations') as $file) {\n $fileSystem->requireOnce($file);\n }\n\n (new \\CreateLaravelFollowTables())->up();\n (new \\CreateUsersTable())->up();\n (new \\CreateOthersTable())->up();\n }",
"private function migration()\n {\n $location = $this->args['location'] . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR;\n if (!is_dir($location))\n {\n mkdir($location);\n }\n\n $backtrace = debug_backtrace();\n $calling_function = $backtrace[1]['function'];\n\n if ($calling_function === \"model\")\n {\n $class_name = 'Migration_Add_';\n $filename = 'add_';\n $table_name = '';\n\n if (!empty($this->args['subdirectories']))\n {\n $dirs = explode(DIRECTORY_SEPARATOR, $this->args['subdirectories']);\n $dirs = join('_', $dirs);\n $class_name .= strtolower($dirs) . '_';\n $filename .= strtolower($dirs) . '_';\n $table_name .= strtolower($dirs) . '_';\n }\n $args = array(\n 'class_name' => $class_name . Inflector::pluralize($this->args['name']),\n 'table_name' => $table_name . Inflector::pluralize(strtolower($this->args['name'])),\n 'filename' => $filename . Inflector::pluralize(ApplicationHelpers::underscorify($this->args['name'])) . '.php',\n 'application_folder' => $this->args['application_folder'],\n 'parent_class' => $this->args['parent_migration'],\n 'extra' => $this->extra\n );\n\n $template_name = 'migration';\n }\n else\n {\n $args = array(\n 'class_name' => 'Migration_' . $this->args['name'],\n 'table_name' => $this->get_table_name_out_of_migration_name(),\n 'filename' => $this->args['filename'],\n 'application_folder' => $this->args['application_folder'],\n 'parent_class' => $this->args['parent_migration'],\n 'extra' => $this->extra\n );\n\n $template_name = 'empty_migration';\n }\n\n $template = new TemplateScanner($template_name, $args);\n $migration = $template->parse();\n\n $migration_number = MigrationHelpers::get_migration_number($this->args['location']);\n $filename = $location . $migration_number . '_' . $args['filename'];\n $potential_duplicate_migration_filename = MigrationHelpers::decrement_migration_number($migration_number) . '_' . $args['filename'];\n $potential_duplicate_migration = $location . $potential_duplicate_migration_filename;\n\n $message = \"\\t\";\n if (file_exists($potential_duplicate_migration))\n {\n $message .= 'Migration already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR . $potential_duplicate_migration_filename;\n }\n else if (file_put_contents($filename, $migration) && MigrationHelpers::add_migration_number_to_config_file($this->args['location'], $migration_number))\n {\n $message .= 'Created Migration: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR . $migration_number . '_' . $args['filename'];\n }\n else\n {\n $message .= 'Unable to create migration: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR . $migration_number . '_' . $this->args['filename'];\n }\n\n fwrite(STDOUT, $message . PHP_EOL);\n\n return;\n }",
"protected function makeMigration()\n {\n new MakeMigration($this, $this->files);\n }",
"public static function createMigration($generation){\n\n $dir = database_path().\"/migrations/\";\n $dir_entities = app_path().\"/\".$generation['head']['directory'];\n\n if (!file_exists($dir)){\n mkdir($dir, 0777, true);\n }\n \n if ($generation){\n \n $function = new Functions();\n $migration = new Migration();\n $sequence = 10;\n foreach($generation['schema']['class'] as $value){\n \n $nameFile = $value->table[\"name\"];\n \n $fullname = (@$generation['head']['namemodel'] == \"Y\") ? \"Y\" : \"N\";\n $nameClass = $function->getNameClass($nameFile,$fullname);\n \n if (!$function->fileExistsContent($dir, \"_create_\".strtolower($nameFile).\"_table\")){\n \n $str = \"\";\n $str .= \"<?php\\n\\n\";\n $str .= self::getHead();\n $str .= \"use Illuminate\\Database\\Schema\\Blueprint;\\n\";\n $str .= \"use Illuminate\\Database\\Migrations\\Migration;\\n\";\n\n if (str_contains($nameFile, \"_\")){\n $class_name = explode(\"_\",$nameFile);\n $nameClass = $function->getNameClassFirstUpperCase($class_name[0]).$function->getNameClassFirstUpperCase($class_name[1]);\n }\n \n $str .= \"class Create\".$function->getNameClassFirstUpperCase($nameFile).\"Table extends Migration\\n\";\n $str .= \"{\\n\";\n $str .= \"\\n\\n\\n\";\n $str .= \"\\t/**\\n\";\n $str .= \"\\t* Run the migrations.\\n\";\n $str .= \"\\t*\\n\";\n $str .= \"\\t* @return void\\n\";\n $str .= \"\\t*/\\n\";\n $str .= \"\\tpublic function up()\\n\";\n $str .= \"\\t{\\n\";\n \n if (@$generation['head']['addcon'] == \"Y\"){\n $str .= \"\\t\\t\\tSchema::connection('\".$generation['head']['connection'].\"')->create('\".$nameFile.\"', function (Blueprint \\$table) {\\n\";\n } else {\n $str .= \"\\t\\t\\tSchema::create('\".$nameFile.\"', function (Blueprint \\$table) {\\n\";\n }\n $tmField = sizeof($value->table[\"fields\"]);\n if ($tmField > 0){\n \n foreach($value->table[\"fields\"] as $field){\n \n $addField = true;\n if (@sizeof($value->table[\"foreign\"]) > 0){\n foreach ($value->table[\"foreign\"] as $vl){\n if ($field->name == $vl->foreign){\n $addField = false;\n break;\n }\n unset($vl);\n }\n }\n if ($addField){\n $str .= \"\\t\\t\\t\\t\".$migration->getMigrationField($field, @$value->table['index']).\"\\n\";\n }\n unset($field);\n }\n \n if (@sizeof($value->table['foreign']) > 0){\n foreach ($value->table['foreign'] as $chave){\n $str .= $migration->getMigrationForeign($chave);\n unset($chave);\n }\n }\n \n $str .= \"\\t\\t\\t\\t\\$table->timestamps();\\n\";\n }\n $str .= \"\\t\\t\\t});\\n\";\n $str .= \"\\t}\\n\";\n \n $str .= \"\\t\\n\\n\\n\";\n $str .= \"\\t/**\\n\";\n $str .= \"\\t * Reverse the migrations.\\n\";\n $str .= \"\\t *\\n\";\n $str .= \"\\t * @return void\\n\";\n $str .= \"\\t */\\n\";\n $str .= \"\\tpublic function down()\\n\";\n $str .= \"\\t{\\n\";\n if ($generation['head']['connection'] != \"\") {\n $str .= \"\\t\\t\\tSchema::connection('\".$generation['head']['connection'].\"')->drop('\".$nameFile.\"');\\n\";\n } else {\n $str .= \"\\t\\t\\tSchema::drop('\".$nameFile.\"');\\n\";\n }\n $str .= \"\\t}\\n\";\n \n $str .= \"\\n\\n}\";\n $micro = microtime();\n $micro = str_ireplace(\".\", \"\", $micro);\n $file_name = date('Y').\"_\".date('m').\"_\".date('d').\"_\".date('Hmisu').$sequence.\"_create_\".strtolower($nameFile).\"_table.php\";\n $sequence++;\n if (!file_exists($dir.$file_name)){\n $fp4 = fopen($dir. $file_name, \"w+\");\n $escreve2 = fwrite($fp4, $str);\n fclose($fp4);\n chmod($dir . $file_name,0777);\n }\n unset($value);\n\n } else {\n\n $name_search = $dir_entities.\"/field/fields_\".strtolower($nameClass).\".php\";\n if (file_exists($name_search)){\n\n $nameclass_alter = date('Y').date('m').date('d').date('Hmisu');\n\n $strFileMigration = \"\";\n $strFileMigration .= \"<?php\\n\";\n $strFileMigration .= self::getHead();\n $strFileMigration .= \"use Illuminate\\Database\\Schema\\Blueprint;\\n\";\n $strFileMigration .= \"use Illuminate\\Database\\Migrations\\Migration;\\n\";\n $strFileMigration .= \"use Illuminate\\Support\\Facades\\Schema;\\n\";\n $strFileMigration .= \"\\n\";\n $strFileMigration .= \"class AddField\".$nameclass_alter.$nameClass.\"Table extends Migration\\n\";\n $strFileMigration .= \"{\\n\";\n $strFileMigration .= \"\\n\";\n $strFileMigration .= \"\\tpublic function up()\\n\";\n $strFileMigration .= \"\\t{\\n\";\n $strFileMigration .= \"\\n\";\n if ($generation['head']['connection'] != \"\") {\n $strFileMigration .= \"\\t\\tSchema::connection('\".$generation['head']['connection'].\"')->table('\".$nameFile.\"', function (\\$table) {\\n\";\n } else {\n $strFileMigration .= \"\\t\\tSchema::table('\".$nameFile.\"', function (\\$table) {\\n\";\n }\n\n $ponteiro = fopen ($dir_entities.\"/field/fields_\".strtolower($nameClass).\".php\",\"r\");\n $stream = \"\";\n while (!feof ($ponteiro)) {\n $stream .= fgets($ponteiro,4096);\n }\n fclose ($ponteiro); \n\n $tmField = sizeof($value->table[\"fields\"]);\n $criaMigration = false;\n if ($tmField > 0){\n \n foreach($value->table[\"fields\"] as $field){\n $addField = false;\n if ($field->name != \"id\"){\n $one_search = \"'\".$field->name.\"'\";\n //$sec_search = \"'\".$field->name.\"'\";\n $find1 = (strpos($stream,$one_search) > -1);\n //$find2 = (strpos($stream, $sec_search) > -1);\n if (($find1 == false)) { //} && ($find2 == false)){\n $addField = true;\n }\n if ($addField){\n $criaMigration = true;\n $strFileMigration .= \"\\t\\t\\t\".$migration->getMigrationField($field, @$value->table['index']).\"\\n\";\n }\n }\n unset($field);\n }\n \n if (@sizeof($value->table['foreign']) > 0){\n foreach ($value->table['foreign'] as $chave){\n $one_search = \"'\".$chave->foreign.\"',\";\n $sec_search = \",'\".$chave->foreign.\"'\";\n $find1 = (strpos($stream,$one_search) > -1);\n $find2 = (strpos($stream, $sec_search) > -1);\n if (($find1 == false) && ($find2 == false)){\n $strFileMigration .= $migration->getMigrationForeign($chave);\n }\n unset($chave);\n }\n }\n } \n\n $strFileMigration .= \"\\t\\t});\\n\";\n $strFileMigration .= \"\\t}\\n\";\n if ($generation['head']['connection'] != \"\") {\n $strFileMigration .= \"\\tpublic function down(){Schema::connection('\".$generation['head']['connection'].\"')->drop('\".$nameFile.\"');}\\n\";\n } else {\n $strFileMigration .= \"\\tpublic function down(){Schema::drop('\".$nameFile.\"');}\\n\";\n }\n \n $strFileMigration .= \"\\t}\\n\";\n\n if ($criaMigration){\n $file_name = date('Y').\"_\".date('m').\"_\".date('d').\"_\".date('Hmisu').$sequence.\"_addField\".$nameclass_alter.strtolower($nameClass).\"_table.php\";\n $sequence++;\n if (!file_exists($dir.\"/\".$file_name)){\n $fp4 = fopen($dir. \"/\" . $file_name, \"w+\");\n $escreve2 = fwrite($fp4, $strFileMigration);\n fclose($fp4);\n chmod($dir. \"/\" . $file_name,0777);\n }\n }\n\n }\n\n }\n \n\n }\n \n }\n\n\n }",
"protected function writeMigration($name, $table = null, $create = null)\n {\n // @codeCoverageIgnoreStart\n if (! file_exists(database_path('content-migrations'))) {\n mkdir(database_path('content-migrations'), 0755);\n }\n // @codeCoverageIgnoreEnd\n\n $file = $this->creator->create(\n $name,\n $this->laravel->databasePath() . DIRECTORY_SEPARATOR . 'content-migrations'\n );\n\n $fileName = basename($file);\n\n $this->line(\"<info>Created Content Migration:</info> {$fileName}\");\n }",
"public function moveMigrationFile()\n {\n $from = base_path('Modules/' . $this->module . '/database/migrations/create_things_table.php.stub');\n $to = getMigrationFileName('create_' . mb_strtolower($this->module) . '_table');\n $this->files->move($from, $to);\n }",
"public function create($name)\n {\n $file = $this->createFile($name);\n $this->autoload();\n $this->note(\"<info>Created Data Migration:</info> $file\");\n }",
"public function createAction()\n {\n $this->request()->commandProperties([\n 'name',\n ]);\n\n if (!$name = $this->request()->command('name'))\n return $this->_('ERROR: Empty migration name parameter');\n\n if (!$name = preg_replace('~[^0-9A-z_]+~iu', '', $name))\n return $this->_('ERROR: Wrong migration name parameter');\n\n if (!is_dir(MIGRATE_PATH))\n return $this->_('ERROR: Directory is not exist \"' . MIGRATE_PATH . '\"');\n\n $name = 'Migrate_' . time() . \"_$name\";\n\n $content = @file_get_contents(BASE_PATH . 'base/migrate/create.tpl');\n $content = str_replace('{name}', $name, $content);\n\n @file_put_contents(MIGRATE_PATH . $name . '.php', $content);\n\n return $this->_('Migration \"' . $name . '\" created');\n }",
"public function createTable()\n {\n $sql = \"\n CREATE TABLE IF NOT EXISTS `\".self::TABLE.\"`(\n `migration` VARCHAR(20) NOT NULL,\n `up` VARCHAR(1000) NOT NULL,\n `down` VARCHAR(1000) NOT NULL\n ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;\n \";\n\n $this->adapter->query($sql, Adapter::QUERY_MODE_EXECUTE);\n }",
"public function generateAction():void{\n new Migration();\n }",
"protected function writeMigration( $name )\n\t{\n\t\t$output = pathinfo( $this->migrator->create( $name, $this->getMigrationsPath() ), PATHINFO_FILENAME );\n\n\t\t$this->line( \" <fg=green;options=bold>create</fg=green;options=bold> $output\" );\n\t}",
"public function migrate()\n {\n $db = new \\SQLite3(\"ATM.db\");\n\n $query = \"CREATE TABLE IF NOT EXISTS \" . $this->table_name . \" \";\n $fields = array();\n\n foreach($this->fields as $name=>$type) {\n $fields[] = \"$name $type\";\n }\n\n $query .= \"(\" . implode(\", \", $fields) . \")\";\n\n $db->exec($query);\n }",
"protected function createMigrationHistoryTable()\n {\n $tableName = $this->db->schema->getRawTableName($this->migrationTable);\n $this->stdout(\"Creating migration history table \\\"$tableName\\\"...\", Console::FG_YELLOW);\n\n $this->db->createCommand()->createTable($this->migrationTable, [\n 'version' => 'String',\n 'apply_time' => 'DateTime',\n ], 'ENGINE = MergeTree() PRIMARY KEY (version) ORDER BY (version)')->execute();\n\n $this->addMigrationHistory(self::BASE_MIGRATION);\n\n $this->stdout(\"Done.\\n\", Console::FG_GREEN);\n }",
"public function makeMigration()\n {\n $name = $this->meta['name'];\n if ($this->files->exists($path = $this->getPath($name))) {\n return $this->error($this->type . ' already exists!');\n }\n $this->makeDirectory($path);\n if($this->files->put($path, $this->compileMigrationStub())){\n return true;\n }\n\n return false;\n }",
"protected function generateMigration($className, $tableName, $args)\n { list($tableAction, $tableEvent) = $this->parseActionType($className);\n\n // Now, we begin creating the contents of the file.\n Template::newClass($className);\n\n /* The Migration Up Function */\n $up = $this->migrationUp($tableEvent, $tableAction, $tableName, $args);\n \n /* The Migration Down Function */\n $down = $this->migrationDown($tableEvent, $tableAction, $tableName, $args);\n\n // Add both the up and down function to the migration class.\n Content::addAfter('{', $up . $down);\n\n return $this->prettify();\n }",
"public function userTableMigrate()\r\n\t{\r\n\t\t$isUserTableExist = $this->schema->tableExist('users');\r\n\t\tif (!$isUserTableExist) {\r\n\r\n\t\t\t$fileName = \"20210408051901_create_users_table.php\";\r\n\t\t\t$dir = $this->migrationFiles . $fileName;\r\n\t\t\t$content = file_get_contents($this->stubsPath . \"user_migration.stubs\");\r\n\r\n\t\t\tif (!file_exists($dir)) {\r\n\t\t\t\t$handle = fopen($dir, 'w+');\r\n\t\t\t\tfwrite($handle, $content);\r\n\t\t\t\tfclose($handle);\r\n\t\t\t\tchmod($dir, 0777);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function migrate()\n {\n /**\n * @var $migrator Migrator\n */\n $migrator = $this->app->make('migrator');\n\n /**\n * @var $migratonRepository DatabaseMigrationRepository\n */\n $migratonRepository = $this->app->make('migration.repository');\n\n $migratonRepository->createRepository();\n\n $migrator->run([__DIR__ . \"/../database/migrations\"]);\n\n }",
"private function _populateMigrationTable()\n\t{\n\t\t$migrations = array();\n\n\t\t// Add the base one.\n\t\t$migration = new MigrationRecord();\n\t\t$migration->version = craft()->migrations->getBaseMigration();\n\t\t$migration->applyTime = DateTimeHelper::currentUTCDateTime();\n\t\t$migrations[] = $migration;\n\n\t\t$migrationsFolder = craft()->path->getAppPath().'migrations/';\n\t\t$migrationFiles = IOHelper::getFolderContents($migrationsFolder, false, \"(m(\\d{6}_\\d{6})_.*?)\\.php\");\n\n\t\tif ($migrationFiles)\n\t\t{\n\t\t\tforeach ($migrationFiles as $file)\n\t\t\t{\n\t\t\t\tif (IOHelper::fileExists($file))\n\t\t\t\t{\n\t\t\t\t\t$migration = new MigrationRecord();\n\t\t\t\t\t$migration->version = IOHelper::getFileName($file, false);\n\t\t\t\t\t$migration->applyTime = DateTimeHelper::currentUTCDateTime();\n\n\t\t\t\t\t$migrations[] = $migration;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ($migrations as $migration)\n\t\t\t{\n\t\t\t\tif (!$migration->save())\n\t\t\t\t{\n\t\t\t\t\tCraft::log('Could not populate the migration table.', LogLevel::Error);\n\t\t\t\t\tthrow new Exception(Craft::t('There was a problem saving to the migrations table: ').$this->_getFlattenedErrors($migration->getErrors()));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tCraft::log('Migration table populated successfully.');\n\t}",
"public function generate()\n {\n $className = 'Version' . date('YmdHis', time());\n $classPath = $this->migrationsDir . DIRECTORY_SEPARATOR . $className . '.php';\n\n if (file_exists($classPath)) {\n throw new MigrationException(sprintf('Migration %s exists!', $className));\n }\n file_put_contents($classPath, $this->getTemplate($className));\n\n return $classPath;\n }",
"function migrate_db() {\r\n \r\n // $migrater->create_migrations_table();\r\n // $migrater->build_schema();\r\n }",
"public function create($name = NULL, $fields = array(), $writeFile = TRUE)\n\t{\n\t\t// Create filename\n\t\t$fileName = time() . \"_$name.php\";\n\n\t\t// Crate class according to the parameters\n\t\t$codeGenerator = new CodeGenerator($name, array(\"$name Migration\", '', '@author {insert_me}'));\n\n\t\t// Add migration namespace\n\t\t$codeGenerator->addNamespace('app\\\\migrations');\n\n\t\t// Add references\n\t\t$codeGenerator->addReference('app\\\\base\\\\Migrator');\n\t\t$codeGenerator->addReference('app\\\\base\\\\MigratorInterface');\n\t\t$codeGenerator->addReference('RedBeanPHP\\R;');\n\n\t\t// Add interface implementation\n\t\t$codeGenerator->addImplementation('MigratorInterface');\n\n\t\t// Extends base class\n\t\t$codeGenerator->addExtends('Migrator');\n\n\t\t// Create UP method\n\t\t$codeGenerator->addMethod('up',\n\t\t\tarray(CodeGenerator::METHOD_PUBLIC),\n\t\t\tarray(),\n\t\t\t$this->addFields($name, $fields),\n\t\t\tarray('Migrate UP'));\n\n\t\t// Create DOWN method\n\t\t$codeGenerator->addMethod('down',\n\t\t\tarray(CodeGenerator::METHOD_PUBLIC),\n\t\t\tarray(),\n\t\t\t$this->deleteTable($name),\n\t\t\tarray('Migrate DOWN'));\n\n\n\t\t// Generate code and write it at migrations folder\n\t\t$code = $codeGenerator->generate();\n\n\t\t// Write file at the migrations folder\n\t\tif ($writeFile)\n\t\t{\n\t\t\t// And write file\n\t\t\t$path = $this->config->getBasePath() . \"/app/migrations/\" . $fileName;\n\t\t\tfile_put_contents($path, $code);\n\t\t}\n\n\t\treturn $code;\n\t}",
"public function testCreate(): void\n {\n /** @var Filesystem $files */\n $files = $this->app->make('files');\n $path = $this->getTemporaryDirectoryPath() . DIRECTORY_SEPARATOR . 'test_migrations_creating';\n\n // Cleanup at first\n if ($files->isDirectory($path)) {\n $files->deleteDirectory($path);\n }\n\n $this->assertDirectoryDoesNotExist($path);\n\n $migration_files = new Files($files, $path);\n\n $this->assertFileDoesNotExist(\n $expected_path = $path . DIRECTORY_SEPARATOR . $migration_files->generateFileName($name = 'test_migration')\n );\n $result = $migration_files->create($name);\n $this->assertEquals($expected_path, $result);\n $this->assertFileExists($result);\n $this->assertStringEqualsFile($result, '');\n\n $result = $migration_files->create('some 2', null, null, $content = 'foo baz');\n $this->assertStringEqualsFile($result, $content);\n\n $result = $migration_files->create('some 2', null, $connection = 'foo_connection', $content = 'bar');\n $this->assertDirectoryExists($path . DIRECTORY_SEPARATOR . $connection);\n $this->assertEquals([$connection], $migration_files->connections());\n $this->assertStringEqualsFile($result, $content);\n\n $files->deleteDirectory($path);\n }",
"public function roleTableMigrate()\r\n\t{\r\n\t\t$isRoleTableExist = $this->schema->tableExist('role');\r\n\t\tif (!$isRoleTableExist) {\r\n\r\n\t\t\t$fileName = \"20210408051901_create_roles_table.php\";\r\n\t\t\t$dir = $this->migrationFiles . $fileName;\r\n\t\t\t$content = file_get_contents($this->stubsPath . \"user_roles.stubs\");\r\n\r\n\t\t\tif (!file_exists($dir)) {\r\n\t\t\t\t$handle = fopen($dir, 'w+');\r\n\t\t\t\tfwrite($handle, $content);\r\n\t\t\t\tfclose($handle);\r\n\t\t\t\tchmod($dir, 0777);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function _migrate($filename) {\n\t\t$migrations = $this->migration;\n\n\t\t$this->conn->execute(file_get_contents(\"migrations/$filename\"));\n\t\t$migrations->save($migrations->newEntity(['migration_file' => $filename]));\n\t}",
"public function open()\n {\n $this->migration_file = fopen(\"/migrations/{date(\"Ymdhis\")}_{$this->table->name()}\", \"w\");\n $this->is_open = true;\n }",
"private function createMigration($moduleName = 'items')\n {\n $table = Str::snake($moduleName);\n $tableClassName = Str::studly($table);\n\n $className = \"Create{$tableClassName}Tables\";\n\n $migrationName = 'create_' . $table . '_tables';\n\n if (!count(glob(database_path('migrations/*' . $migrationName . '.php')))) {\n $migrationPath = $this->laravel->databasePath() . '/migrations';\n\n $fullPath = $this->laravel['migration.creator']->create($migrationName, $migrationPath);\n\n $stub = str_replace(\n ['{{table}}', '{{singularTableName}}', '{{tableClassName}}'],\n [$table, Str::singular($table), $tableClassName],\n $this->files->get(__DIR__ . '/stubs/migration.stub')\n );\n\n if ($this->translatable) {\n $stub = preg_replace('/{{!hasTranslation}}[\\s\\S]+?{{\\/!hasTranslation}}/', '', $stub);\n } else {\n $stub = str_replace([\n '{{!hasTranslation}}',\n '{{/!hasTranslation}}',\n ], '', $stub);\n }\n\n $stub = $this->renderStubForOption($stub, 'hasTranslation', $this->translatable);\n $stub = $this->renderStubForOption($stub, 'hasSlug', $this->sluggable);\n $stub = $this->renderStubForOption($stub, 'hasRevisions', $this->revisionable);\n $stub = $this->renderStubForOption($stub, 'hasPosition', $this->sortable);\n\n $stub = preg_replace('/\\}\\);[\\s\\S]+?Schema::create/', \"});\\n\\n Schema::create\", $stub);\n\n twill_put_stub($fullPath, $stub);\n\n $this->info(\"Migration created successfully! Add some fields!\");\n }\n }",
"public function migrate()\n {\n $fileSystem = new Filesystem();\n $classFinder = new ClassFinder();\n\n foreach ($fileSystem->files(__DIR__.'/../../../../tests/NilPortugues/App/Migrations') as $file) {\n $fileSystem->requireOnce($file);\n $migrationClass = $classFinder->findClass($file);\n (new $migrationClass())->down();\n (new $migrationClass())->up();\n }\n }",
"private function createIfNotExists()\n {\n $table = new Table('schema_migration');\n if ($this->info->isTableExists($table)) {\n return;\n }\n $primaryKey = new PrimaryKey(array('version'));\n $primaryKey->disableAutoIncrement();\n\n $table->addConstraint($primaryKey);\n $table\n ->addColumn(new BigIntegerColumn('version'))\n ->addColumn(new DateTimeColumn('created_at', array('nullable' => false, 'default' => 'now()')));\n $this->manipulation->create($table);\n }",
"public function change(): void\n {\n $this->table('filestore')\n ->addColumn('uuid', 'uuid', ['null' => false])\n ->addColumn('hash', 'string', ['length' => 32, 'null' => false])\n ->addColumn('filename', 'string', ['length' => 100, 'null' => false])\n ->addColumn('bytes', 'integer', ['signed' => false, 'null' => false])\n ->addColumn('parent', 'uuid', ['null' => true])\n ->addColumn('meta', 'json', ['null' => false])\n ->addColumn('created', 'biginteger', ['signed' => false, 'null' => false])\n ->addColumn('created_by', 'uuid', ['null' => false])\n ->addIndex(['uuid'], ['unique' => true])\n ->addIndex(['hash'])\n ->addIndex(['filename'])\n ->addIndex(['parent'])\n ->addForeignKey(['created_by'], 'user', ['uuid'])\n ->create();\n }",
"protected function writeMigration(string $name, string $table, bool $create)\n {\n $file = $this->creator->create(\n $name,\n $this->getMigrationPath(),\n $table,\n $create\n );\n $this->output->writeln(\"<info>Created Migration:</info> {$file}\");\n }",
"public function migrate() \n {\n\n Masteryl_Migration::createOrUpdateDir(MASTERYL_MIGRATIONS_PATH, $this);\n\n if(!empty($this->modules)) {\n foreach($this->modules as $mod) {\n $dir = $mod['path'].'migrations';\n \n if(file_exists($dir))\n Masteryl_Migration::createOrUpdateDir($dir, $this);\n }\n }\n\n }",
"public function up()\n {\n\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable($this->createTableName, [\n 'id' => $this->primaryKey(),\n 'name' => $this->string()->notNull(),\n 'type' => $this->integer(1)->notNull(),\n 'location' => $this->text()->defaultValue(null),\n 'description' => $this->text()->defaultValue(null),\n 'created_by' => $this->integer()->notNull(),\n 'start_at' => $this->integer()->defaultValue(null),\n 'active' => $this->boolean()->defaultValue(true),\n\n ],$tableOptions);\n\n\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n\n $moduleInvite = Module::findOne(['name' => 'Actioncalendar', 'slug' => 'actioncalendar']);\n if(empty($moduleInvite)) {\n $this->batchInsert('{{%module}}', ['parent_id', 'name', 'slug', 'visible', 'sorting'], [\n [null, 'Actioncalendar', 'actioncalendar', 1, 22],\n ]);\n }\n\n }",
"private function createNewMigration() {\n // $this->MigrationFieldCollection[$this->getModel()->getShortModelName()];\n $changes = []; //these fields are added or updated if the fieldnames is not in this array delete it.\n foreach ($this->getModel()->getFieldCollection() as $fieldName => $field) {\n //var_dump($this->checkFieldProperties($field)); --mark if the fieldsproperties are default or not\n $this->checkFieldProperties($field);\n var_dump($field);\n\n if (!empty($this->MigrationFieldCollection[$this->getModel()->getShortModelName()][$fieldName])) {\n $reflection = new \\ReflectionObject($field);\n $changes = [];\n $this->checkFieldProperties($field);\n\n foreach ($reflection->getProperties() as $fieldValues) {\n\n }\n //we want to update this field\n } else {\n\n //copy this field since we create\n }\n }\n foreach ($this->MigrationFieldCollection[$this->getModel()->getShortModelName()] as $migrationFieldName => $migrationField) {\n if (!in_array($migrationFieldName, $changes)) {\n $this->newMigrationLines[] = $this->modelFieldToMigrationString($migrationField['dataStructure'], 'delete');\n }\n }\n }",
"public function up()\n {\n $this->createTable('salmon_main_weapon2', [\n 'id' => $this->primaryKey(),\n 'key' => $this->apiKey(),\n 'name' => $this->string(32)->notNull(),\n 'splatnet' => $this->integer()->null(),\n 'weapon_id' => $this->pkRef('weapon2')->null(),\n ]);\n\n $this->db->transaction(function (): void {\n // copy weapons from {{weapon2}} table\n $this->execute(\n 'INSERT INTO {{salmon_main_weapon2}}([[key]], [[name]], [[splatnet]], [[weapon_id]]) ' .\n 'SELECT [[key]], [[name]], [[splatnet]], [[id]] ' .\n 'FROM {{weapon2}} ' .\n 'WHERE {{weapon2}}.[[id]] = {{weapon2}}.[[main_group_id]] ' .\n 'ORDER BY {{weapon2}}.[[splatnet]] ASC',\n );\n\n $this->batchInsert('salmon_main_weapon2', ['key', 'name'], [\n ['kuma_blaster', 'Grizzco Blaster'],\n ['kuma_brella', 'Grizzco Brella'],\n ['kuma_charger', 'Grizzco Charger'],\n ['kuma_slosher', 'Grizzco Slosher'],\n ]);\n });\n }",
"public function up()\n {\n $this->createTable('views', [\n 'id' => $this->primaryKey(),\n 'news_id' => $this->integer()->notNull(),\n 'user_info' => $this->text()\n ]);\n\n $this->createIndex(\n 'idx-views-news_id',\n 'views',\n 'news_id'\n );\n\n // add foreign key for table `user`\n $this->addForeignKey(\n 'fk-views-news_id',\n 'views',\n 'news_id',\n 'news',\n 'id',\n 'CASCADE'\n );\n }",
"public static function up()\n {\n $table_name = static::getTableName();\n\n Schema::create($table_name, function (Blueprint $blueprint) {\n $class = static::class;\n $schema = (new $class())->getSchema();\n\n $blueprint->id();\n\n $blueprint->timestamps();\n\n if (isset($schema->datas)) {\n self::addDatasToBlueprint($schema->datas, $blueprint);\n }\n\n if (isset($schema->groups)) {\n foreach ($schema->groups as $group) {\n self::addGroupToBlueprint($group, $blueprint);\n }\n }\n });\n }",
"public function up()\n {\n $this->createTable('usuario_refeicao', [\n 'id' => $this->primaryKey(),\n 'usuario_id' => $this->integer(),\n 'refeicao_id' => $this->integer(),\n 'alimento_id' => $this->integer(),\n 'data_consumo' => $this->date(),\n 'horario_consumo' => $this->time(),\n 'quantidade' => $this->double(5,2),\n 'created_at' => $this->integer(),\n 'updated_at' => $this->integer() \n ]);\n\n $this->addForeignKey('fk_usuariorefeicao_usuario_id', 'usuario_refeicao', 'usuario_id', \n 'user', 'id', 'CASCADE');\n $this->addForeignKey('fk_usuariorefeicao_refeicao_id', 'usuario_refeicao', 'refeicao_id', \n 'refeicoes', 'id', 'CASCADE');\n $this->addForeignKey('fk_usuariorefeicao_alimento_id', 'usuario_refeicao', \n 'alimento_id', 'alimentos', 'id', 'CASCADE');\n }",
"function migrate(){\n\n create_table();\n save_migration_tables();\n\n}",
"public function up()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{rights}}\")){\n\t\t\t$this->dropTable(\"authItem\");\n\t\t}\n\n\t\t$this->createTable(\"{{rights}}\", array(\n\t\t\t\"itemname\" => \"varchar(64) CHARACTER SET UTF8 NOT NULL\",\n\t\t\t\"type\"\t => \"int not null\",\n\t\t\t\"weight\" => \"int not null\",\n\t\t\t\"PRIMARY KEY (itemname)\"\n\t\t\t));\n\t}",
"public function up()\n {\n // 创建操作记录表\n $tables = $this->table('history');\n // 用户动作\n $tables->addColumn('action', 'string', ['limit' => 20])\n ->addColumn('ip', 'string', ['limit' => 129])\n // 建立用户\n ->addColumn('user_id', 'integer')\n // 登录时间\n ->addColumn('operation_time', 'datetime')\n // 操作详情\n ->addColumn('desc', 'string',['limit'=>500,'null' => true])\n ->create();\n }",
"public function up()\n {\n $this->createTable($this->tableName, [\n 'id' => $this->primaryKey(),\n 'ads_id' => $this->integer(),\n 'type_id' => $this->integer(),\n 'file' => $this->string(40),\n 'status' => $this->boolean(),\n ]);\n \n $this->createIndex('idx_entity_ads_id', $this->tableName, 'ads_id');\n $this->createIndex('idx_entity_type_id', $this->tableName, 'type_id');\n \n $this->addForeignKey('fk_entity_ads_id', $this->tableName, 'ads_id', 'ads', 'id');\n $this->addForeignKey('fk_entity_type_id', $this->tableName, 'ads_id', 'ads', 'id');\n }",
"public function save(){\n\n // Save the name of migration in prop (0000_00_00_000000_prefix.php)\n $this->migrationName = date('Y_m_d_'.Carbon::now()->format('His'),time()) . \"_\". $this->prefixFileName .\".php\";\n\n $this->document = $this->header;\n\n $this->document.= $this->up;\n $this->document.= $this->endUp;\n $this->document.= $this->down;\n $this->document.= $this->footer;\n\n return Storage::disk('migration')->put($this->migrationName, $this->document);\n\n }",
"public function createChangeLog() {}",
"public function createTable()\n\t{\n\t\t$app = Factory::getApplication();\n\n\t\tif ($app->isSite())\n\t\t{\n\t\t\techo 'Error creating DB table - Need to run this in admin area';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$user = Factory::getUser();\n\n\t\tif (!$user->authorise('core.admin'))\n\t\t{\n\t\t\techo 'Error creating DB table - You need to be superadmin user to exeacute this task';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$jinput = $app->input;\n\t\t$context = $jinput->get->get('context', '', 'cmd');\n\n\t\tif (empty($context))\n\t\t{\n\t\t\techo 'Error creating DB table - No context is passed';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$model = $this->getModel('indexer');\n\t\t$model->createTable($context);\n\t}",
"public function create()\n {\n parent::create();\n\n $sheet = $this->add_sheet();\n\n $this->add_table($sheet, $this->database, $this->generate_table());\n }",
"public function safeUp() {\n\n $this->createTable('user', [\n 'user_id' => Schema::TYPE_PK,\n 'user_first_name' => $this->string(100) . ' NOT NULL',\n 'user_last_name' => $this->string(100) . ' NOT NULL',\n 'user_email' => $this->string(100) . ' NOT NULL',\n 'user_password' => $this->string(500) . ' NOT NULL',\n 'user_access_token' => $this->string(500),\n 'user_auth_token' => $this->string(500),\n 'user_created_at' => $this->integer() . ' NOT NULL',\n 'user_modified_at' => $this->integer() . ' NOT NULL',\n ]);\n\n // Create index of foreign key\n $this->createIndex('user_email_idx', 'user', 'user_email');\n\n // Create index of foreign key\n $this->createIndex('user_password_idx', 'user', 'user_password');\n }",
"public function up()\n\t{\n\t\t$this->createTable('sentence', [\n\t\t\t'intSentenceID' => 'INT(3) UNSIGNED NOT NULL AUTO_INCREMENT',\n\t\t\t'varBody' => 'CHAR(255) NOT NULL',\n\t\t\t'PRIMARY KEY (`intSentenceID`)',\n\t\t\t'UNIQUE INDEX `varBody` (`varBody`)'\n\t\t]);\n\t}",
"protected function createFile() {}",
"private function runTestMigrations()\n {\n $schema = $this->app['db']->connection()->getSchemaBuilder();\n\n if (! $schema->hasTable('users')) {\n $schema->create('users', function (Blueprint $table) {\n $table->increments('id');\n $table->string('name')->nullable();\n $table->string('role_label')->nullable();\n $table->timestamps();\n });\n }\n }",
"public function up()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{user_block}}\")){\n\t\t\t$this->dropTable(\"{{user_block}}\");\n\t\t}\n\n\t\t$this->createTable(\"{{user_block}}\", array(\n\t\t\t\"id\" => \"int UNSIGNED AUTO_INCREMENT\",\n\t\t\t\"id_user\"\t => \"int UNSIGNED\",\n\t\t\t\"username\" => \"varchar(255)\",\n\t\t\t\"ip\" \t => \"varchar(20)\",\n\t\t\t\"date\"\t\t => \"datetime DEFAULT 0\",\n\t\t\t\"PRIMARY KEY (id)\",\n\t\t\t\"KEY id_user (id_user)\",\n\t\t\t\"KEY username (username)\"\n\t\t\t));\n\t}",
"public function run()\n {\n Schema::create('fileuploads', function (Blueprint $table) {\n $table->increments('id');\n $table->string('filename');\n $table->timestamps();\n });\n }",
"public function up()\n {\n $table = $this->table('admins');\n $table->addColumn('name', 'string')\n ->addColumn('role', 'string')\n ->addColumn('username', 'string')\n ->addColumn('password', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true])\n ->create();\n\n\n $data = [ \n [\n 'name' => 'Pedro Santos', \n 'username' => '[email protected]',\n 'password' => '101010',\n 'role' => 'Suporte',\n 'modified' => false\n ],\n ];\n\n $adminTable = TableRegistry::get('Admins');\n foreach ($data as $value) {\n $adminTable->save($adminTable->newEntity($value));\n }\n }",
"public function handle()\n {\n $startTime = Carbon::now();\n $file_time = $startTime->format('Y_m_d_his');\n\n // Collect ERD entities\n $entities = $this->collectEntities();\n\n $relationCollection = [];\n\n // Create all tables first\n // Connect constraint in seperate iteration\n foreach ($entities as $entity) {\n\n // Setup base template\n $template = $this->migrationTemplate();\n\n // Iterate through pregmatches\n $tags = $this->getTemplateTags($template);\n\n // Create and replace classname\n $this->replaceClassName($template, $tags->class_name, $entity->name);\n $template = str_replace('{{table_comment}}', $entity->description, $template);\n\n // Replace tablename\n $this->replaceTableName($template, $tags->schema_table, $entity->name);\n\n // Add columns to template\n $this->addColumns($template, $entity->columns, $entity);\n\n // Create base migration files\n\n $startTime = $startTime->addSeconds(1);\n $file_name = $startTime->format('Y_m_d_his') . '_create_' . strtolower($entity->name) . '_table.php';\n\n // Storage::disk('dataedo')->put(\"Database/{$file_time}/{$file_name}\", $template);\n\n // add constraints\n $this->collectConstraints($relationCollection, $entity);\n }\n\n // generate constraints for migration template\n $this->generateMigrationTemplate($startTime, $relationCollection, $file_time);\n }",
"public function createDatabase()\n {\n /** @var \\Shopware\\Components\\Model\\ModelManager $em */\n $em = $this->get('models');\n $tool = new \\Doctrine\\ORM\\Tools\\SchemaTool($em);\n\n $classes = [\n $em->getClassMetadata('Shopware\\CustomModels\\CustomSort\\ArticleSort'),\n ];\n\n try {\n $tool->createSchema($classes);\n } catch (\\Doctrine\\ORM\\Tools\\ToolsException $e) {\n //\n }\n }",
"protected function main()\n {\n $msg = new Message();\n $dir = new Directory('app/Database/Model');\n $tables = DB::tables();\n $models = [];\n $msg->set(sizeof($dir->fileList()) . ' models has been found.');\n $msg->success('Database migration has started...');\n $n = 0;\n\n foreach($dir->files() as $file)\n {\n $converted = Str::toKebabCase($file->name());\n $models[] = $converted;\n }\n\n // Drop non-existing tables.\n\n foreach($tables as $table)\n {\n if(!in_array($table, $models))\n {\n DB::table($table)->drop();\n $msg->set('{red}' . $table . '{/red} has been dropped.');\n }\n }\n\n // Create new table.\n \n foreach($dir->files() as $model)\n {\n $name = $model->name();\n $model = 'App\\Database\\Model\\\\' . $name;\n $alias = Str::toKebabCase($name);\n\n if(!in_array($alias, $tables))\n {\n $msg->set('{yellow}' . $name . '{/yellow} has started to migrate.');\n $instance = $model::migration();\n\n if($instance->success())\n {\n $n++;\n $msg->set('{yellow}' . $name . '{/yellow} model migration has succeed.');\n }\n else\n {\n $msg->set('{yellow}' . $name . '{/yellow} model migration has failed.');\n }\n }\n else\n {\n $schema = $model::columns()->get();\n $column1 = DB::table($alias)->columns();\n $column2 = Arr::keys($schema);\n $compare1 = Arr::diff($column1, $column2);\n $compare2 = Arr::diff($column2, $column1);\n\n if(!empty($compare1))\n {\n foreach($compare1 as $column)\n {\n $msg->error($column . ' column has been dropped.');\n DB::table($alias)->drop($column);\n }\n }\n else if(!empty($compare2))\n {\n foreach($compare2 as $column)\n {\n $data = $schema[$column];\n \n $msg->success($column . ' column has been added.');\n DB::query('ALTER TABLE ' . $alias . ' ADD ' . $data->generate());\n }\n }\n else\n {\n $msg->set('{yellow}' . $name . '{/yellow} was already migrated.');\n }\n }\n }\n\n if($n != 0)\n {\n $msg->success('Successfully migrated ' . $n . ' models.');\n }\n else\n {\n $msg->error('No model has been migrated.');\n }\n }",
"public function up()\n {\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable('transaction', [\n 'id' => $this->primaryKey(),\n\n 'date' => $this->integer()->notNull(),\n 'operation_id' => $this->integer()->notNull(),\n 'category_id' => $this->integer()->notNull(),\n 'account_id_from' => $this->integer(),\n 'account_id_to' => $this->integer(),\n 'value' => $this->integer()->notNull(),\n 'currency_id' => $this->integer()->notNull(),\n 'contragent_id' => $this->integer(),\n\n 'user_id' => $this->integer()->notNull(),\n 'created_at' => $this->integer()->notNull(),\n ], $tableOptions);\n }",
"public function safeUp() {\n\n $this->createTable('word', [\n 'word_id' => Schema::TYPE_PK,\n 'word_lang_id' => $this->integer(),\n 'word_name' => $this->string(500) . ' NOT NULL',\n 'word_detais' => $this->string(1000),\n ]);\n\n // Add foreign key\n $this->addForeignKey('fk_language_word_1', 'word',\n 'word_lang_id', 'language', 'lang_id', 'CASCADE', 'NO ACTION');\n \n // Create index of foreign key\n $this->createIndex('word_lang_id_idx', 'word', 'word_lang_id');\n }",
"public function up()\n {\n $this->down();\n $t = $this->createTable('horde_metar_airports', array('autoincrementKey' => array('id')));\n $t->column('id', 'integer');\n $t->column('icao', 'string', array('limit' => 4));\n $t->column('name', 'string', array('limit' => 80));\n $t->column('state', 'string', array('limit' => 4));\n $t->column('country', 'string', array('limit' => 50));\n $t->column('municipality', 'string', array('limit' => 80));\n $t->column('latitude', 'float', array('default' => 0));\n $t->column('longitude', 'float', array('default' => 0));\n $t->column('elevation', 'float', array('default' => 0));\n $t->end();\n }",
"public function up() {\r\n\t\t// UP\r\n\t\t$column = parent::Column();\r\n\t\t$column->setName('id')\r\n\t\t\t\t->setType('biginteger')\r\n\t\t\t\t->setIdentity(true);\r\n\t\tif (!$this->hasTable('propertystorage')) {\r\n\t\t\t$this->table('propertystorage', [\r\n\t\t\t\t\t\t'id' => false,\r\n\t\t\t\t\t\t'primary_key' => 'id'\r\n\t\t\t\t\t])->addColumn($column)\r\n\t\t\t\t\t->addColumn('path', 'text', ['limit' => 1024])\r\n\t\t\t\t\t->addColumn('name', 'text', ['limit' => 100])\r\n\t\t\t\t\t->addColumn('valuetype', 'integer',[])\r\n\t\t\t\t\t->addColumn('value', 'text', [])\r\n\t\t\t\t\t->create();\r\n\t\t}\r\n\t}",
"protected function configure()\n {\n $this->setName('create')\n ->setDescription('Creates a new migration file')\n ->addArgument('name', InputArgument::REQUIRED, 'Name of the migration file')\n ->addOption('from-database', null, InputOption::VALUE_NONE, 'Generates a migration based from the database')\n ->addOption('sequential', null, InputOption::VALUE_NONE, 'Generates a migration file with a sequential identifier')\n ->addOption('type', null, InputOption::VALUE_OPTIONAL, 'Data type of the column', 'varchar')\n ->addOption('length', null, InputOption::VALUE_OPTIONAL, 'Length of the column', 50)\n ->addOption('auto_increment', null, InputOption::VALUE_OPTIONAL, 'Generates an \"AUTO_INCREMENT\" flag on the column', false)\n ->addOption('default', null, InputOption::VALUE_OPTIONAL, 'Generates a default value in the column definition', '')\n ->addOption('null', null, InputOption::VALUE_OPTIONAL, 'Generates a \"NULL\" value in the column definition', false)\n ->addOption('primary', null, InputOption::VALUE_OPTIONAL, 'Generates a \"PRIMARY\" value in the column definition', false)\n ->addOption('unsigned', null, InputOption::VALUE_OPTIONAL, 'Generates an \"UNSIGNED\" value in the column definition', false)\n ->addOption('directory', null, InputOption::VALUE_OPTIONAL, 'Name of the \"DIRECTORY\" to have migration', 'varchar');\n }",
"public function up() {\n\t\t$this->dbforge->add_field(array(\n\t\t\t'id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t),\n\t\t\t'name' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\t\t\t'path' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t)\n\t\t));\n\t\t$this->dbforge->add_key('id', TRUE);\n\t\t$this->dbforge->add_key('path');\n\t\t$this->dbforge->create_table('categories');\n\n\t\t// Table structure for table 'event_categories'\n\t\t$this->dbforge->add_field(array(\n\t\t\t'event_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t),\n\t\t\t'category_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t),\n\t\t));\n\t\t$this->dbforge->add_key('event_id', TRUE);\n\t\t$this->dbforge->add_key('category_id', TRUE);\n\t\t$this->dbforge->create_table('event_categories');\n\t}",
"public function up()\n {\n\t\t$tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\t\t\n\t\t$TABLE_NAME = 'HaberDeneme12';\n $this->createTable($TABLE_NAME, [\n 'HaberID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(12)->notNull(),\n 'Baslik' => $this->string(128)->notNull(),\n 'Ozet' => $this->text()->notNull(),\n 'Detay' => $this->text()->notNull(),\n 'Resim' => $this->text()->notNull(),\n 'EklenmeTarihi' => $this->date(),\n 'GuncellenmeTarihi' => $this->date()\n ], $tableOptions);\n\t\t\n\t\t\n\t\t$TABLE_NAME = 'HaberKategoriDeneme12';\n\t\t $this->createTable($TABLE_NAME, [\n 'KategoriID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(20)->notNull()\n ], $tableOptions);\n\t\t\n }",
"public function up()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t'l_value' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_configuration_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_configuration_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}",
"public function mainAction()\n {\n echo shell_exec(\"mysql -u root -e 'CREATE DATABASE IF NOT EXISTS \" . $this->config->database->dbname . \";'\");\n\n // Run migrations if necessary\n echo shell_exec('php vendor/bin/phinx migrate -c config/phinx.php') . \"\\n\";\n }",
"public function up()\n {\n $this->createTable('post',[\n 'id' => $this->primaryKey(),\n 'author_id' => $this->integer(),\n 'title' => $this->string(255)->notNull()->unique(),\n 'content' => $this->text(),\n 'published_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'updated_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'status' => \"ENUM('draft','published')\",\n 'image' => $this->string(255)\n ]); \n\n $this->addForeignKey(\n 'fk_post_author_id',\n 'post',\n 'author_id',\n 'user',\n 'id',\n 'CASCADE',\n 'NO ACTION'\n );\n }",
"public function up()\n\t{\n $this->createTable('Comment', [\n 'id' => 'pk',\n 'content' => 'TEXT',\n 'post_id' => 'INTEGER',\n 'user_id' => 'INTEGER',\n 'date_created' => 'DATE',\n 'status' => 'INTEGER'\n ]);\n $this->addForeignKey('comId', 'Comment', 'user_id', 'User', 'id', 'CASCADE', 'CASCADE');\n\t $this->addForeignKey('pstId', 'Comment', 'post_id', 'Post', 'id', 'CASCADE', 'CASCADE');\n\t}",
"public function up()\n {\n $this->table('agent_order_consignee_address')\n ->addColumn(Column::string('order_number')->setUnique()->setComment('订单编号'))\n \t\t->addColumn(Column::integer('agent_id')->setComment('代理商ID'))\n\t ->addColumn(Column::integer('create_time')->setDefault(1)->setComment('创建时间'))\n\t \n\t ->addColumn(Column::string('consignee_name')->setComment('收货人姓名'))\n\t ->addColumn(Column::string('consignee_phone')->setComment('收货人电话'))\n\t ->addColumn(Column::string('province')->setComment('省份'))\n\t ->addColumn(Column::string('city')->setComment('城市'))\n\t ->addColumn(Column::string('area')->setComment('地区'))\n\t ->addColumn(Column::string('address')->setComment('收货人详细地址'))\n ->create(); \n }",
"public function up()\n {\n $this->createTable('client_composite_membership', [\n 'id' => $this->primaryKey(),\n 'name' => $this->string()->notNull(),\n 'client_id' => $this->integer()->notNull(), // FK to 'client'\n ]);\n\n $this->createIndex(\n 'idx-client_cm__client_id',\n 'client_composite_membership',\n 'client_id',\n );\n\n $this->addForeignKey(\n 'fk-client_cm-client',\n 'client_composite_membership',\n 'client_id',\n 'client',\n 'id',\n 'CASCADE'\n );\n }",
"public function safeUp()\n {\n $this->createTable('user', array(\n 'name' => 'string',\n 'username' => 'string NOT NULL',\n 'password' => 'VARCHAR(32) NOT NULL',\n 'salt' => 'VARCHAR(32) NOT NULL',\n 'role' => \"ENUM('partner', 'admin')\"\n ));\n }",
"public function migrate() {}",
"public function up()\n {\n // Drop table 'table_name' if it exists\n $this->dbforge->drop_table('lecturer', true);\n\n // Table structure for table 'table_name'\n $this->dbforge->add_field(array(\n 'nip' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => true,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'nik' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => false,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'name' => array(\n 'type' => 'VARCHAR(24)',\n 'null' => false,\n ),\n\t\t\t'id_study_program' => array(\n\t\t\t\t'type' => 'VARCHAR(24)',\n\t\t\t\t'null' => false,\n\t\t\t)\n\n ));\n $this->dbforge->add_key('nik', true);\n $this->dbforge->create_table('lecturer');\n }",
"public function up()\n\t{\n\t\t// Add data to committee-members\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Brian O\\'Sullivan',\n\t\t\t'role' => 'Chairman',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Anthony Barker',\n\t\t\t'role' => 'PRO',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\t\t\n\t}",
"public function up()\n {\n $this->createTable('equipment', [\n 'id' => $this->primaryKey(),\n 'equip' => $this->string(),\n 'pc_name' => $this->string(),\n 'player_id' => $this->string(),\n 'net_cable_name' => $this->string(),\n 'patch_port' => $this->string(),\n 'switch_port' => $this->string(),\n 'led_screen_fuse' => $this->string(),\n 'pc_fuse' => $this->string(),\n 'store_id' => $this->integer(),\n 'note' => $this->text(),\n ]);\n }",
"public function safeUp()\r\n {\r\n $this->createTable('tbl_job_application', array(\r\n 'id' => 'pk',\r\n 'job_id' => 'integer NOT NULL',\r\n 'user_id' => 'integer NULL',\r\n 'name' => 'string NOT NULL',\r\n 'email' => 'text NOT NULL',\r\n 'phone' => 'text NOT NULL',\r\n 'resume_details' => 'text NOT NULL',\r\n 'create_date' => 'datetime NOT NULL',\r\n 'update_date' => 'datetime NULL',\r\n ));\r\n }",
"public static function migrate()\n {\n\n // If there is not a declaration that migrations have been run'd\n if( ! isset($GLOBALS['migrated_test_database']))\n {\n // Run migrations\n require path('sys').'cli/dependencies'.EXT;\n\n $which_db = \\Config::get('database.default');\n $database = \\Config::get('database.connections.'.$which_db);\n\n $migration_table = null;\n if($which_db == 'mysql')\n {\n $query = \"SELECT COUNT(*) AS count FROM information_schema.tables WHERE table_schema = ? AND table_name = ?\";\n $migration_table = \\DB::query($query, array($database['database'], $database['prefix'].'laravel_migrations'));\n }\n\n // if($which_db == 'sqlite')\n // {\n // //$migration = \"SELECT * FROM {$database['database']}.sqlite_master WHERE type='table'\";\n // //sqlite3_exec(budb, \"SELECT sql FROM sqlite_master WHERE sql NOT NULL\"\n // \\sqlite_open(\":memory:\", $database['database']);\n // $migration = \\sqlite_exec($database['database'], \"SELECT sql FROM sqlite_master WHERE sql NOT NULL\");\n // }\n\n if(isset($migration_table['0']->count) and $migration_table['0']->count == '0')\n {\n Command::run(array('migrate:install'));\n echo \"\\n\";\n Command::run(array('migrate'));\n }\n else\n {\n Command::run(array('migrate:reset'));\n echo \"\\n\";\n Command::run(array('migrate'));\n }\n\n\n //Insert basic data\n\n // Declare that migrations have been run'd\n $GLOBALS['migrated_test_database'] = true;\n }\n }",
"public function up()\n {\n $this->table('message_answers', ['id' => false, 'primary_key' => ['message_answers_id']])\n ->addColumn('message_answers_id', 'integer', [\n 'autoIncrement' => true,\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ])\n ->addColumn('message_destinations_id', 'integer', [\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ])\n ->addColumn('message_choices_id', 'integer', [\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ])\n ->addColumn('message', 'text', [\n 'default' => null,\n 'null' => true,\n ])\n ->addColumn('created', 'datetime', [\n 'default' => null,\n 'null' => false,\n ])\n ->addColumn('modified', 'datetime', [\n 'default' => null,\n 'null' => false,\n ])\n ->create();\n\n $this->table('message_answers')\n ->addForeignKey(\n 'message_destinations_id',\n 'message_destinations',\n 'message_destinations_id',\n [\n 'update' => 'CASCADE',\n 'delete' => 'CASCADE'\n ]\n )\n ->addForeignKey(\n 'message_choices_id',\n 'message_choices',\n 'message_choices_id',\n [\n 'update' => 'CASCADE',\n 'delete' => 'CASCADE'\n ]\n )\n ->update();\n }",
"public function up() {\n $table = $this->table('user');\n $table->addColumn('username', 'string', ['limit' => 255, 'null' => false])\n ->addColumn('password', 'string', ['limit' => 255, 'null' => false])\n ->addColumn('password_salt', 'string', ['limit' => 255, 'null' => false])\n ->addColumn('email', 'string', ['limit' => 255, 'null' => false])\n ->addColumn('verified', 'boolean', ['default' => 0, 'null' => false])\n ->addColumn('active', 'boolean', ['default' => 0, 'null' => false])\n ->addColumn('created', 'datetime', ['null' => false, 'default' => 'CURRENT_TIMESTAMP'])\n ->addColumn('modified', 'datetime', ['null' => false, 'default' => 'CURRENT_TIMESTAMP'])\n ->addColumn('first_name', 'string', ['limit' => 255, 'null' => false])\n ->addColumn('last_name', 'string', ['limit' => 255, 'null' => false]);\n \n $table->addIndex('username', ['name' => 'BY_USERNAME', 'unique' => true])\n ->addIndex('email', ['name' => 'BY_EMAIL', 'unique' => true])\n ->addIndex('active', ['name' => 'BY_ACTIVE', 'unique' => false]);\n $table->create();\n }",
"public function change()\n {\n $table = $this->table('users');\n $table->addColumn('created', 'integer',['default' => 0])\n ->addColumn('email', 'string',['default' => ''])\n ->addColumn('password', 'string',['default' => ''])\n ->create();\n }",
"public function up()\n {\n $this->createTable('article_category', [\n 'id' => $this->primaryKey()->comment('自增id'),\n 'name' => $this->string(50)->notNull()->comment('分类名称'),\n 'pid' => $this->integer()->notNull()->comment('父id')\n ]);\n $this->batchInsert('article_category',['id','name','pid'],[\n [null,'品牌设计',0],\n [null,'Logo设计',1],\n [null,'VI设计',1],\n ]);\n\n $this->createTable('article', [\n 'id' => $this->primaryKey()->notNull()->comment('自增id'),\n 'cid' => $this->integer()->notNull()->comment('分类id'),\n 'title' => $this->string(50)->notNull()->comment('标题'),\n 'description' => $this->string(100)->comment('描述'),\n 'content' => $this->text()->notNull()->comment('内容'),\n 'sort' => $this->integer()->defaultValue(0)->comment('排序'),\n 'created_at' => $this->integer()->notNull()->comment('创建时间'),\n 'updated_at' => $this->integer()->notNull()->comment('更新时间'),\n ]);\n }",
"protected function updateMigrationTable()\n {\n $migration = str_replace('.php', '', basename(__FILE__));\n $batchResult = \\DB::select(\"SELECT max(batch) as batch FROM {$this->newDbName}.migrations\");\n $batch = $batchResult[0]->batch;\n\n \\DB::getPdo()->exec(\"INSERT INTO {$this->newDbName}.migrations (migration, batch) VALUES ('{$migration}', {$batch} + 1)\");\n }",
"public function up() \n {\n $db = SiteSpecific::get_mysqli_db();\n \n $createArchiveTableQuery = \"CREATE TABLE `logs_archive` (\n `uuid` binary(16) NOT NULL,\n `message` text NOT NULL,\n `context` longtext NOT NULL,\n `priority` int(1) NOT NULL,\n `when` timestamp NOT NULL,\n PRIMARY KEY (`uuid`),\n KEY `priority` (`priority`),\n KEY `when` (`when`)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8;\";\n \n $result = $db->query($createArchiveTableQuery);\n \n if ($result === FALSE)\n {\n throw new Exception(\"Failed to convert logs table to utf8.\");\n }\n }",
"protected function migrateTable()\n {\n DB::schema()->create('models', function ($table) {\n $table->id();\n $table->string('default');\n $table->text('input');\n });\n\n Model::create(['default' => 'model', 'input' => ['en' => 'translation', 'nl' => 'vertaling']]);\n }",
"public function up()\n {\n\n $data = [\n 'id_admin' => [\n 'type' => 'INT',\n 'constraint' => 11,\n 'unsigned' => true,\n 'auto_increment' => true,\n ],\n 'fullname' => [\n 'type' => 'VARCHAR',\n 'constraint' => 250,\n 'null' => false,\n ],\n 'email' => [\n 'type' => 'VARCHAR',\n 'constraint' => 250,\n 'null' => false,\n ],\n 'password' => [\n 'type' => 'VARCHAR',\n 'constraint' => 250,\n 'null' => false,\n ],\n 'is_delete' => [\n 'type' => 'BOOLEAN',\n 'null' => true,\n ],\n 'date' => [\n 'type' => 'TIMESTAMP',\n 'null' => false,\n ],\n ];\n\n $this->dbforge->add_field($data);\n $this->dbforge->add_key('id_admin', TRUE);\n $this->dbforge->create_table('admin');\n }",
"public function up()\n {\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable($this::$table, [\n\n 'id' => $this->primaryKey(),\n 'title' => $this->string(500),\n 'text' => $this->text()->notNull()->defaultValue(''),\n 'draft' => $this->text()->notNull()->defaultValue('')\n\n ], $tableOptions);\n\n }",
"public function up()\n {\n\tSchema::create('activities', function($table)\n\t\t{\n\t\t $table->increments('id');\n\t\t $table->string('title');\n\t\t $table->text('description');\n\t\t $table->integer('creator_id');\n\t\t $table->string('creator_comment', 2048)->nullable();\n\t\t $table->integer('organizationunit_id');\n\t\t $table->integer('assignee_id')->nullable();\n\t\t $table->timestamp('assigning_time')->nullable();\n\t\t $table->timestamp('deadline');\n\t\t $table->timestamp('completed_time')->nullable();\n\t\t $table->integer('progress')->default(0);\n\t\t $table->integer('parent_id')->nullable();\n\t\t $table->boolean('is_valid')->default(true);\n\t\t $table->timestamps();\n\t\t});\n }",
"public function execute() {\n $oldMigrations = new Filesystem(\"App/system/databases/migrations\");\n $oldMigrations->addFilter(new MigrationFilter($this->model->getShortModelName()));\n\n\n //todo: write custom iterator\n $oldMigrations->customCallback([$this, \"applyOldMigrations\"]);\n //todo: get the current model and get the diffrences between that and the migration\n //todo: write a new migration.\n //\n // $this->buildChangeSet();\n //do stuff execute all the things\n $this->createNewMigration();\n\n }",
"public function up()\n {\n\t\t$this->addColumn('{{%user}}', 'is_super', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `status`\");\n\t\t\n\t\t//Add new column for Option Group table\n\t\t$this->addColumn('{{%option_group}}', 'option_type', Schema::TYPE_STRING . \"(25) NULL DEFAULT 'text' AFTER `title`\");\n\t\t\n\t\t//Add new column for Order table\n\t\t$this->addColumn('{{%order}}', 'is_readed', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `shipment_method`\");\n }",
"public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\n\t\tif ( $wpdb->get_var( \"SHOW TABLES LIKE '$this->table_name'\" ) == $this->table_name ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$sql = \"CREATE TABLE \" . $this->table_name . \" (\n\t\tid bigint(20) NOT NULL AUTO_INCREMENT,\n\t\tuser_id bigint(20) NOT NULL,\n\t\tusername varchar(50) NOT NULL,\n\t\temail varchar(50) NOT NULL,\n\t\tname mediumtext NOT NULL,\n\t\tproduct_count bigint(20) NOT NULL,\n\t\tsales_value mediumtext NOT NULL,\n\t\tsales_count bigint(20) NOT NULL,\n\t\tstatus mediumtext NOT NULL,\n\t\tnotes longtext NOT NULL,\n\t\tdate_created datetime NOT NULL,\n\t\tPRIMARY KEY (id),\n\t\tUNIQUE KEY email (email),\n\t\tKEY user (user_id)\n\t\t) CHARACTER SET utf8 COLLATE utf8_general_ci;\";\n\n\t\tdbDelta( $sql );\n\n\t\tupdate_option( $this->table_name . '_db_version', $this->version );\n\t}",
"public function up()\n\t{\n\t\tSchema::create('flows_steps', function($table) {\n\n\t\t\t$table->engine = 'InnoDB';\n\n\t\t $table->increments('stepid');\n\t\t $table->integer('flowid');\n\t\t $table->string('step', 100);\n\t\t $table->integer('roleid');\n\t\t $table->integer('parentid');\n\t\t $table->integer('state');\n\t\t $table->integer('page');\n\t\t $table->integer('condition2');\n\t\t $table->timestamps();\n\n\t\t});\n\t}",
"public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\t$table_name \t = $this->table_name;\n\t\t$charset_collate = $wpdb->get_charset_collate();\n\n\t\t$query = \"CREATE TABLE {$table_name} (\n\t\t\tid bigint(10) NOT NULL AUTO_INCREMENT,\n\t\t\tname text NOT NULL,\n\t\t\tdate_created datetime NOT NULL,\n\t\t\tdate_modified datetime NOT NULL,\n\t\t\tstatus text NOT NULL,\n\t\t\tical_hash text NOT NULL,\n\t\t\tPRIMARY KEY id (id)\n\t\t) {$charset_collate};\";\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $query );\n\n\t}",
"public function up()\n {\n // $this->fields()->create([]);\n // $this->streams()->create([]);\n // $this->assignments()->create([]);\n }"
] | [
"0.8154367",
"0.78457505",
"0.7308281",
"0.73058426",
"0.7291852",
"0.7275333",
"0.7198678",
"0.71922076",
"0.7006299",
"0.69888926",
"0.6978014",
"0.6830445",
"0.66938156",
"0.66419494",
"0.6626336",
"0.6571437",
"0.6570803",
"0.6546038",
"0.6533373",
"0.6480715",
"0.64766645",
"0.644285",
"0.6434412",
"0.6375951",
"0.63715047",
"0.63604504",
"0.6332421",
"0.63214767",
"0.6312946",
"0.6302007",
"0.62539566",
"0.62367845",
"0.62323207",
"0.6194912",
"0.618783",
"0.6176492",
"0.6173542",
"0.6154685",
"0.614413",
"0.6117788",
"0.6082783",
"0.60665524",
"0.60582185",
"0.6027968",
"0.60255545",
"0.602223",
"0.60095716",
"0.6002359",
"0.5992658",
"0.59742117",
"0.597167",
"0.59593606",
"0.59434974",
"0.5931523",
"0.5927629",
"0.5911656",
"0.5904296",
"0.59035695",
"0.5893686",
"0.5880598",
"0.5880127",
"0.5879571",
"0.58733886",
"0.5871908",
"0.5851847",
"0.58465916",
"0.5844858",
"0.5844797",
"0.5838844",
"0.5838029",
"0.58336866",
"0.5830873",
"0.5821018",
"0.5811383",
"0.5809458",
"0.58006555",
"0.5800462",
"0.579901",
"0.57940453",
"0.5790004",
"0.5780711",
"0.57683897",
"0.57671106",
"0.5748501",
"0.57461834",
"0.5734582",
"0.5733237",
"0.57308155",
"0.5721488",
"0.5713436",
"0.5702535",
"0.568753",
"0.56713355",
"0.5668658",
"0.5665579",
"0.566202",
"0.56532896",
"0.56414264",
"0.5638462",
"0.5626733"
] | 0.8150878 | 1 |
Console output header message. | private function _header($text){
echo '[*] ' . $text . PHP_EOL;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Header()\n\t{\n\t\t$this->cabecera_esp();\n\t\t$this->Ln();\n\t}",
"function sendHeader() {\n\t\t$this->console_text('###############################################################################');\n\t\t$this->console_text(' Aseco v' . ASECO_VERSION . ' running on {1}:{2}', $this->server->ip, $this->server->port);\n\t\t$this->console_text(' Game : {1} - {2}', $this->server->game, $this->server->gameinfo->getMode());\n\t\t$this->console_text(' Author: Florian Schnell');\n\t\t$this->console_text('###############################################################################');\n\n\t\tif ($this->welcome_msgs) {\n\t\t\tforeach ($this->welcome_msgs as $message) {\n\t\t\t\t$this->console_text('[' . $message['DATE'][0].'] ' . $message['TEXT'][0]);\n\t\t\t}\n\t\t\t$this->console_text('###############################################################################');\n\t\t}\n\n\t\t// format the text of the message ...\n\t\t$startup_msg = formatText($this->getChatMessage('STARTUP'),\n\t\t\tASECO_VERSION,\n\t\t\t$this->server->ip,\n\t\t\t$this->server->port);\n\n\t\t// replace colors ...\n\t\t$startup_msg = $this->formatColors($startup_msg);\n\n\t\t// send the message ...\n\t\t$this->client->addCall('ChatSendServerMessage', array($startup_msg));\n\t\t$this->client->multiquery();\n\t}",
"public function printHeaders() {\n\t}",
"private function printHeader()\n {\n $this->printer->println('Test-Flight %s', Constants::VERSION);\n }",
"function sendHeader() {\n\n\t\t$this->console_text('###############################################################################');\n\t\t$this->console_text(' XASECO2 v' . XASECO2_VERSION . ' running on {1}:{2}', $this->server->ip, $this->server->port);\n\t\t$this->console_text(' Name : {1} - {2}', stripColors($this->server->name, false), $this->server->serverlogin);\n\t\tif ($this->server->isrelay)\n\t\t\t$this->console_text(' Relays : {1} - {2}', stripColors($this->server->relaymaster['NickName'], false), $this->server->relaymaster['Login']);\n\t\t$this->console_text(' Game : {1} - {2} - {3}', $this->server->game,\n\t\t $this->server->packmask, $this->server->gameinfo->getMode());\n\t\t$this->console_text(' Version: {1} / {2}', $this->server->version, $this->server->build);\n\t\t$this->console_text(' Author : Xymph');\n\t\t$this->console_text('###############################################################################');\n\n\t\t// format the text of the message\n\t\t$startup_msg = formatText($this->getChatMessage('STARTUP'),\n\t\t XASECO2_VERSION,\n\t\t $this->server->ip, $this->server->port);\n\t\t// show startup message\n\t\t$this->client->query('ChatSendServerMessage', $this->formatColors($startup_msg));\n\t}",
"public function header()\n {\n }",
"function Header() {\r\n // print the title\r\n $this->SetTitleFont();\r\n $this->Cell(100, 8, $this->title, 0, 0, \"L\");\r\n\r\n // print the author\r\n $this->SetAuthorFont();\r\n $this->Cell(0, 8, $this->author, 0, 0, \"R\");\r\n\r\n // header line\r\n $this->SetFillColor(0, 0, 0);\r\n $this->Rect(10, 17, 190, 0.2, \"F\");\r\n $this->Rect(10, 17.5, 190, 0.2, \"F\");\r\n $this->Ln(14);\r\n }",
"public function Header(){\n\t\t$this->lineFeed(10);\n\t}",
"public function print_header() {\n return $this->header();\n }",
"function display_header() {}",
"public static function header($title)\n\t{\n\t\tstatic::stdout(' '.$title.PHP_EOL);\n\t\tstatic::stdout(' '.\\str_repeat('-', static::$screenwidth-1).PHP_EOL.PHP_EOL);\n\t}",
"function Header()\n{\n\tglobal $title;\n\t$this->Ln(5);\n}",
"function header() {\n }",
"function header (){\n\t\t$this->setfont('Arial','B', 16);\n\t\t$this->settextcolor(0, 0, 0);\n\t\t$this->cell(0, 10, 'WANANCHI', 0, 0, 'C');\n\t\t$this->Ln(10);\n\t\t$this->setfont('Arial','',12);\n\t\t$this->settextcolor(0, 0, 0);\n\t\t$this->cell(0, 10, 'INFORMATION',0, 0, 'C');\n\t\t$this->Ln(30);\n\t}",
"public function printHeader() {\n\t\t$template = self::$templates[$this->templateName];\n\t\trequire_once $template['path'] . $template['file-header'];\n\t}",
"public function header() {\n\t}",
"public static function renderHeaders()\n {\n echo self::$headers;\n }",
"protected function showHeader($header)\n {\n $names = count($header);\n\n for ($i = 0; $i < $names; $i++) {\n echo ucfirst($header[$i]);\n\n if ($i < $names-1) echo self::SEPARATOR;\n }\n\n echo PHP_EOL;\n }",
"public function showPageHeader() {\n\n\t\techo $this->getPageHeader();\n\t}",
"abstract public function header();",
"function Header(){\n\t\t}",
"public function __Header(){\n $this->Ln(5);\n $this->SetDrawColor(160,160,160);\n $this->SetFillColor(230,230,230);\n $this->SetTextColor(100);\n $this->SetFont('Arial','B',7);\n $this->SetX(($this->w - $this->_tWidth)/2);\n foreach($this->_fields as $field)\n $this->Cell($field[\"size\"],5,$field[\"header\"],1,0,\"C\",true);\n $this->Ln();\n }",
"function display_header_text()\n {\n }",
"function showHeader(){\n\t\t$header = \"\";\n\t\t// print the header row\n\t\t$header .= \"\t<tr>\\n\";\n\t\t// loop the fields\n\t\tforeach ($this->fields as $field) {\n\t\t\t// print each field\n\t\t\t$header .= \"\t\t<th>\".$field.\"</th>\\n\";\n\t\t}\n\t\t// end the header row\n\t\t$header .= \"\t</tr>\\n\";\n\t\treturn $header;\n\t}",
"public function displayHeader()\n {\n // Display the page start in case of an html page\n $this->displayPageStart();\n \n // Display the script header line\n $this->display( sprintf( \"%s - version %s\". PHP_EOL, $this->scriptName, $this->version ) );\n \n // Display settings?\n if( null !== $this->limit || null !== $this->remove || null !== $this->update )\n {\n $this->display( PHP_EOL .'Settings:' );\n\n // Display the \"debug\" setting\n if( true === $this->debug )\n {\n $this->display( PHP_EOL . \"- debug mode enabled\" );\n }\n \n // Display the \"limit\" setting\n if( null !== $this->limit )\n {\n $line = 'no limit';\n if( is_int($this->limit) )\n {\n $line = sprintf( \"%d hour%s\", $this->limit, ( 1 < $this->limit ? 's' : '' ) );\n }\n $this->display( PHP_EOL . sprintf( \"- limit : %s\", $line ) );\n }\n \n // Display the \"remove\" setting\n if( null !== $this->remove )\n {\n $line = \"Data will be removed.\";\n if( true !== $this->remove )\n {\n $line = 'No data is removed from the database!'. PHP_EOL .' Change the \"REMOVE\" setting if you want to remove releases or parts';\n }\n $this->display( PHP_EOL . sprintf( \"- remove: %s\", $line ) );\n }\n \n // Display the \"update\" setting\n if( null !== $this->update )\n {\n $line = \"Data will be updated.\";\n if( true !== $this->update )\n {\n $line = 'No data is updated in the database!'. PHP_EOL .' Change the \"UPDATE\" setting if you want to enable update';\n }\n $this->display( PHP_EOL . sprintf( \"- update: %s\", $line ) );\n }\n \n // Spacer\n $this->display( PHP_EOL );\n }\n \n // End spacer\n $this->display( PHP_EOL );\n }",
"protected function display_data_header()\n\t{\n\t\t$msg =\n\t\t\t\"<p>\" .\n\t\t\t\t\"How good each project was, compared with the other projects scored \" .\n\t\t\t\t\"by the same judge. The higher the number, the better the project.\" .\n\t\t\t\"</p><br>\";\n\n\t\treturn $msg . parent::display_data_header();\n\n\t}",
"public static function show_header() {\n require_once Config::get('prefix') . '/templates/header.inc.php';\n }",
"function displayHeader()\n\t{\n\t\t// output locator\n\t\t$this->displayLocator();\n\n\t\t// output message\n\t\tif($this->message)\n\t\t{\n\t\t\tilUtil::sendInfo($this->message);\n\t\t}\n\t\tilUtil::infoPanel();\n\n//\t\t$this->tpl->setTitleIcon(ilUtil::getImagePath(\"icon_pd_b.gif\"),\n//\t\t\t\"\");\n\t\t$this->tpl->setTitle($this->lng->txt(\"bookmarks\"));\n\t}",
"public function header()\n {\n echo \"<!doctype html>\\n<html lang='pt'>\\n<head>\\n\";\n echo \"\\t<meta charset='UTF-8'>\\n\";\n echo \"\\t<title>{$this->controller->getTitle()}</title>\\n\";\n $this->links();\n echo \"</head>\\n<body>\\n\";\n }",
"public function print_header() {\n header('Content-type: text/csv');\n $filename = $this->page->title;\n $filename = preg_replace('/[^a-z0-9_-]/i', '_', $filename);\n $filename = preg_replace('/_{2,}/', '_', $filename);\n $filename = $filename.'.csv';\n header(\"Content-Disposition: attachment; filename=$filename\");\n }",
"abstract protected function header();",
"function header() {\n //\n //Get the fields in this sql \n $cols= $this->fields->get_array();\n //\n //Loop through the fields and display the <tds>\n foreach ($cols as $col) {\n //\n $name= is_null($col->alias) ? $col->to_str():$col->alias;\n echo \"<th>$name</th>\"; \n }\n }",
"function Header()\n\t\t{\n\t\t\t$this->SetFont('Helvetica','B',18);\n\t\t\t$this->SetTextColor(184,10,10);\n\t\t\t$this->Cell(30);\n\t\t\t$this->Cell(120,10,utf8_decode(\"Mensajes Contestados\"),0,0,'C');\n\t\t\t$this->Ln(20);\n\t\t}",
"public function Header()\r\n\t{\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14);\r\n\t\t$this->Cell(170,7,\"Date :: \". $this->today_date ,1,0,'C');\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14); \r\n\t\t$this->MultiCell(170,8,\"Room Things Report \\n\".$this->title,1,'C');\r\n\t\t$this->Ln(5);\r\n\r\n\t}",
"function printOutputHeader() {\n echo \"Title|Code|Duration|Inclusions|MinPrice\\n\";\n}",
"function getHeader() {\n return '';\n }",
"protected function header()\n {\n\n }",
"function outputHeader()\n {\n global $application;\n\n $output = '';\n if (!is_array($this -> _attrs))\n return $output;\n\n // output error column\n if (is_array($this -> _Errors) && !empty($this -> _Errors))\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-error.tpl.html',\n array()\n );\n\n foreach($this -> _attrs as $k => $v)\n {\n if ($v != 'YES')\n continue;\n\n $template_contents = array(\n 'HeaderName' => getMsg('SYS', @$this -> _headermap[$k])\n );\n $this -> _Template_Contents = $template_contents;\n $application -> registerAttributes($this -> _Template_Contents);\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-cell.tpl.html',\n array()\n );\n }\n\n return $output;\n }",
"function printHeader($text) {\n \treturn \"<h2>\".$text.\"</h2>\";\n }",
"private function writeHeader(): void\n {\n $record = 0x0014; // Record identifier\n\n /* removing for now\n // need to fix character count (multibyte!)\n if (strlen($this->phpSheet->getHeaderFooter()->getOddHeader()) <= 255) {\n $str = $this->phpSheet->getHeaderFooter()->getOddHeader(); // header string\n } else {\n $str = '';\n }\n */\n\n $recordData = StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddHeader());\n $length = strlen($recordData);\n\n $header = pack('vv', $record, $length);\n\n $this->append($header . $recordData);\n }",
"public function Header() {\n\t\t$x = 0;\n\t\t$dx = 0;\n\t\tif ($this->rtl) {\n\t\t\t$x = $this->w + $dx;\n\t\t} else {\n\t\t\t$x = 0 + $dx;\n\t\t}\n\n\t\t// print the fancy header template\n\t\tif($this->print_fancy_header){\n\t\t\t$this->printTemplate($this->header_xobjid, $x, 0, 0, 0, '', '', false);\n\t\t}\n\t\tif ($this->header_xobj_autoreset) {\n\t\t\t// reset header xobject template at each page\n\t\t\t$this->header_xobjid = false;\n\t\t}\n\t\t\n\t\t$this->y = $this->header_margin;\n\t\t$this->SimpleHeader();\n\t\t//$tmpltBase = $this->MakePaginationTemplate();\n\t\t//echo $tmpltBase;die();\n\t\t//echo('trying to print header template: ');\n\t\t//$this->printTemplate($tmpltBase, $x, $this->y, 0, 0, '', '', false);\n\t\t//die();\n\t}",
"function Header() {\n if(empty($this->title) || $this->PageNo() == 1) return;\n $oldColor = $this->TextColor;\n $this->SetTextColor(PDF_HEADER_COLOR['red'],\n PDF_HEADER_COLOR['green'],\n PDF_HEADER_COLOR['blue']);\n $x = $this->GetX();\n $y = $this->GetY();\n $this->SetY(10, false);\n $this->SetFont('', 'B');\n $this->Cell(0, 10, $this->title);\n $this->SetFont('', '');\n $this->SetXY($x, $y);\n $this->TextColor = $oldColor;\n }",
"public static function showHeader() {\r\n\t\t$title = (array_key_exists('headertitle', $_SESSION))?\r\n\t\t\t$_SESSION['headertitle']:\"\";\r\n\t\t\r\n\t\techo \"<!DOCTYPE html>\\n\";\r\n\t\techo \"<html>\\n\";\r\n\t\techo \"<head>\\n\";\r\n\t\techo \"<title>$title</title>\\n\";\r\n\t\techo \"</head>\\n\\t<body>\\n\";\r\n }",
"public static function header_output() {\n\t\tob_start();\n\n\t\tif ( self::options( 'header_type' ) == 'navbar-fixed-top' ) {\n\t\t\techo 'body{padding-top: 50px;}';\n\t\t}\n\n\t\tif ( ! display_header_text() ) {\n\t\t\techo '#site-title,.site-description{position: absolute;clip: rect(1px, 1px, 1px, 1px);}';\n\t\t} else {\n\t\t\tself::generate_css( '#site-title', 'color', 'header_textcolor', '#' );\n\t\t}\n\t\t$extra_css = apply_filters( 'maketador_header_output', ob_get_clean() );\n\t\tif ( ! empty( $extra_css ) ) {\n\t\t\techo '<style type=\"text/css\">' . $extra_css . '</style>';\n\t\t}\n\t\t?>\n\t\t<?php\n\t}",
"public function Header()\n {\n // Set custom header and footer\n $this->setCustomHeader();\n\n if (array_key_exists($this->category, $this->categories)) {\n $title = $this->categories[$this->category]['name'];\n } else {\n $title = '';\n }\n\n $this->SetTextColor(0, 0, 0);\n $this->SetFont($this->currentFont, 'B', 18);\n\n if (0 < PMF_String::strlen($this->customHeader)) {\n $this->writeHTMLCell(0, 0, '', '', $this->customHeader);\n $this->Ln();\n $this->writeHTMLCell(0, 0, '', '', html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 0, false, true, 'C');\n } else {\n $this->MultiCell(0, 10, html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 'C', 0);\n $this->SetMargins(PDF_MARGIN_LEFT, $this->getLastH() + 5, PDF_MARGIN_RIGHT);\n }\n }",
"function displayHeader($title = '',\n $subtitle = '',\n $status = ''){\n global $DOPBSP;\n \n $complete_title = ($title != '' ? '<span class=\"dopbsp-phone-hidden\">'.$title:'').\n ($subtitle != '' ? ' - </span>'.$subtitle:'</span>').\n ($status != '' ? ' '.$status:'');\n?>\n <h2></h2>\n <div class=\"dopbsp-header\">\n <h3><?php echo $complete_title?></h3>\n<?php\n echo $this->getLanguages();\n \n if (DOPBSP_CONFIG_VIEW_DOCUMENTATION){\n?>\n <a href=\"<?php echo DOPBSP_CONFIG_HELP_DOCUMENTATION_URL; ?>\" target=\"_blank\" class=\"dopbsp-tablet-hidden dopbsp-phone-hidden\"><?php echo $DOPBSP->text('HELP_DOCUMENTATION'); ?></a>\n<?php\n }\n?>\n <br class=\"dopbsp-clear\" />\n </div>\n <?php $this->displayBoxes(); ?>\n<?php \n }",
"function do_header_found(){\n\techo\"\n\t\t<html>\n\t\t<title> Race Search </title>\n\t\t<h1> Search Results: </h1>\n\t\";\n}",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\n\t\t$worksheet->set_column(0, 0, 10);\n\t\t$worksheet->set_column(1, 1, 25);\n\t\t$worksheet->set_column(2, 2, 30);\n\t\t$worksheet->set_column(3, 3, 20);\n\t\t$worksheet->set_column(4, 4, 30);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 20);\n\t\t$worksheet->set_column(7, 7, 30);\n\t\t$worksheet->set_column(8, 8, 30);\n\t\t$worksheet->set_column(9, 9, 20);\n\t\t$worksheet->set_column(10, 10, 10);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"สาขาวิชา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"ระดับการศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"สถานศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"ประเทศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"ตำแหน่ง/ระดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ชื่อทุน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"ระยะเวลา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"จำนวนวัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t}",
"public function getOutputHeaders()\n {\n }",
"public function format_for_header()\n {\n }",
"private function writePrintHeaders(): void\n {\n $record = 0x002a; // Record identifier\n $length = 0x0002; // Bytes to follow\n\n $fPrintRwCol = $this->printHeaders; // Boolean flag\n\n $header = pack('vv', $record, $length);\n $data = pack('v', $fPrintRwCol);\n $this->append($header . $data);\n }",
"public function show_head() {\n \n $output = '<head>';\n \n if( empty( $this->title ) ) {\n $this->title = \"No Title Available\";\n } \n\n $output .= '<title>' . $this->title . '</title>';\n $output .= $this->get_header_elements();\n $output .= \"\\n</head>\";\n\n echo $output;\n }",
"public function showAdminHeader() {\n\n\t\techo $this->getAdminHeader();\n\t}",
"public function display_page_header() {\n\t\tglobal $title;\n\n\t\tprintf( '<h1>%s</h1>', esc_html( $title ) );\n\n\t\tsettings_errors( self::POST_ACTION_ID );\n\n\t\tprintf(\n\t\t\t'<p>%s</p>',\n\t\t\tesc_html(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: 1 is the name of the DB table, 2 is a version number, 3 is an option name. */\n\t\t\t\t\t__( 'Your custom table \"%1$s\" is ready and its current version is %2$d. This version number is stored in the (network?) option \"%3$s\".', 'autowpdb-example-plugin' ),\n\t\t\t\t\t$this->table->get_table_definition()->get_table_name(),\n\t\t\t\t\t$this->upgrader->get_db_version(),\n\t\t\t\t\t$this->upgrader->get_db_version_option_name()\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}",
"function echoHeader($spec) {\n\techo('<div class=\"tr\">');\n\tforeach($spec as $col) {\n\t\techo('<div class=\"th\">' . htmlspecialchars($col) . '</div>');\n\t}\n\techo('<div class=\"th\">Actions</div>');\n\techo('</div>');\n}",
"protected function writeHeader()\n {\n fwrite( $this->fd,\n \"<?php\\n\" );\n }",
"protected function output_header() {\n include dirname( __FILE__ ) . '/views/html-csv-import-header.php';\n }",
"function Header()\n\t{\n\t\t// Police Arial gras 24\n\t\t$this->SetTextColor(255,10,22);\n\t\t$this->SetFont('Arial','B',14);\n\t\t// Décalage à droite\n\t\t$this->Cell(10);\n\t\t// Titre (ligne,titre)\n\t\t$this->Cell('',10,'Liste des employes',0,0,'C');\n\t\t// Saut de ligne\n\t\t$this->Ln(20);\n\t}",
"function Header() {\n $this->SetFont('Helvetica', 'B', 18);\n //Judul dalam bingkai\n $this->Cell(0, 5, 'Daftar Hasil Seleksi Calon Siswa Baru', 0, 1, 'C');\n $this->SetFont('Helvetica', 'B', 16);\n $this->Cell(0, 15, 'Sekolah Dasar', 0, 0, 'C');\n //Ganti baris\n $this->Ln(20);\n }",
"function logheader() {\n $str = \"\\n=============================\"\n .\"======================================\";\n $str .= \"\\n============================ \"\n .\"logrecord ============================\";\n $str .= \"\\nstartlogrecord timestamp : \".date(\"Y-m-d H:i:s\",time()).\"\\n\";\n\n $this->prn($str);\n// fwrite($this->fp, $str.\"\\n\");\n }",
"public function printTableHeader($open)\n {\n\n print \"<tr>\\n\";\n print \"<th> \";\n print \" Admin Email\";\n print \" </th>\";\n print \"<th> \";\n print \" Level\";\n print \" </th>\";\n if (!$open)\n print \"</tr>\\n\";\n }",
"public function Header()\n {\n // Set the header logo.\n $this->Image('C:\\xampp\\htdocs\\Nexus\\resource\\img\\fpdf\\Nexus-logo.png', 120, 18, 40, 30);\n\n // Set the font.\n $this->AddFont('BebasNeue-Regular', '', 'BebasNeue-Regular.php');\n $this->SetFont('BebasNeue-Regular', '', 26);\n\n // Line break.\n $this->Ln(42);\n\n // Move to the right.\n $this->Cell(120);\n\n // Set page header title.\n $this->Cell(20, 3, 'NEXUS IT TRAINING CENTER', 0, 0, 'C');\n\n // Set the font.\n $this->AddFont('AsiyahScript', '', 'AsiyahScript.php');\n $this->SetFont('AsiyahScript', '', 40);\n\n // Line break.\n $this->Ln(12);\n\n // Set page header title.\n $this->Cell(259, 15, 'Certificate of Attendance', 0, 0, 'C');\n }",
"public function writeHeader($uHeading, $uMessage)\n {\n echo \"<h{$uHeading}>{$uMessage}</h{$uHeading}>\";\n }",
"static function generateTableHeaderHTML()\n\t{\n\t\techo \"<p class=left>Description:</p>\\n\";\n\t}",
"function Header() \n { \n\n list($r, $b, $g) = $this->xheadercolor; \n $this->setY(10); // shouldn't be needed due to page margin, but helas, otherwise it's at the page top \n $this->SetFillColor($r, $b, $g); \n $this->SetTextColor(0 , 0, 0); \n $this->Cell(0,20, '', 0,1,'C', 1); \n $this->Text(15,26,$this->xheadertext ); \n }",
"function headingLine($msg) {\n echo terminal_style(str_pad($msg . ' ', 120, '=') . \"\\n\\n\", \"light-cyan\");\n}",
"public function getHeader() {\n }",
"public function section_header() {\r\n\t\techo '<p>Other menu options will only show when there is a connection to the API.</p>';\r\n\t}",
"function msdlab_pre_header(){\n print '<div class=\"pre-header\">\n <div class=\"wrap\">';\n do_action('msdlab_pre_header');\n print '\n </div>\n </div>';\n }",
"protected function dumpHeader() {\n\t\treturn trim('\n# TYPO3 Extension Manager dump 1.1\n#\n#--------------------------------------------------------\n');\n\t}",
"private function printHead()\n\t{\n\t\t$out = '<?xml version=\"1.0\" encoding=\"utf-8\"?>' . \"\\n\";\n\t\t$out .= $this->head . PHP_EOL;;\t\t\t\n\t\techo $out;\n\t}",
"function header($title=false) {\n\t\tif(!$title) {\n\t\t\t$title = 'Beerlogger';\n\t\t}\n\t\tob_start();\n\t\tinclude('templates/header.php');\n\t\t$output = ob_get_clean();\n\t\treturn $output;\n\t}",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\t\tglobal $heading_name,$ORG_TITLE;\n\t\t\n\t\t$worksheet->set_column(0, 0, 5);\n\t\t$worksheet->set_column(1, 1, 40);\n\t\t$worksheet->set_column(2, 2, 27);\n\t\t$worksheet->set_column(3, 3, 25);\n\t\t$worksheet->set_column(4, 4, 12);\n\t\t$worksheet->set_column(5, 5, 5);\n\t\t$worksheet->set_column(6, 6, 4);\n\t\t$worksheet->set_column(7, 7, 4);\n\t\t$worksheet->set_column(8, 8, 4);\n\t\t$worksheet->set_column(9, 9, 4);\n\t\t$worksheet->set_column(10, 10, 4);\n\t\t$worksheet->set_column(11, 11, 4);\n\t\t$worksheet->set_column(12, 12, 18);\n\t\t$worksheet->set_column(13, 13, 25);\n\t\t$worksheet->set_column(14, 14, 5);\n\t\t$worksheet->set_column(15, 15, 8);\n\t\t$worksheet->set_column(16, 16, 28);\n\t\t$worksheet->set_column(17, 17, 15);\n\t\t$worksheet->set_column(18, 18, 20);\n\t\t$worksheet->set_column(19, 19, 12);\n\t\t$worksheet->set_column(20, 20, 8);\n\t\t$worksheet->set_column(21, 21, 12);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"(1)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"(2)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"(3)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"(4)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"(5)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"(6)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"(7)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"(8)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"(9)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"(10)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"(11)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"(12)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 17,\"(13)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"(14)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"(15)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"(16)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"(17)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อส่วนราชการ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"เลข\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\",0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"L\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"พื้นที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"วุฒิการศึกษา/\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"อัตรา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ประจำตัว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"เพศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"เกิด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"บรรจุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"หมวด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"ชื่อตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"ชั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"ส่วนกลาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"ปฏิบัติงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"ประกาศนียบัตร\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"เงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"ปีที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\t\t$worksheet->write($xlsRow, 21, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 1, \"$ORG_TITLE\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"เขต/แขวง/ศูนย์\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"ประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 15, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 16, \"/ภูมิภาค\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 17, \"(จังหวัด)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 18, \"เฉพาะทาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 19, \"ปัจจุบัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 20, \"เกษียณ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}",
"public function header($text)\n {\n return '\n\n\t<!-- MAIN Header in page top -->\n\t<h1 class=\"t3js-title-inlineedit\">' . htmlspecialchars($text) . '</h1>\n';\n }",
"protected function dumpHeader() {}",
"function display_portal_header()\r\n {\r\n Display :: header(null);\r\n }",
"function sloodle_print_header()\n {\n global $CFG;\n\n // Offer the user an 'update' button if they are allowed to edit the module\n $editbuttons = '';\n if ($this->canedit) {\n $editbuttons = update_module_button($this->cm->id, $this->course->id, get_string('modulename', 'sloodle'));\n }\n // Display the header\n $navigation = \"<a href=\\\"index.php?id={$this->course->id}\\\">\".get_string('modulenameplural','sloodle').\"</a> ->\";\n sloodle_print_header_simple(format_string($this->sloodle->name), \" \", \"{$navigation} \".format_string($this->sloodle->name), \"\", \"\", true, $editbuttons, navmenu($this->course, $this->cm));\n\n // Display the module name\n $img = '<img src=\"'.$CFG->wwwroot.'/mod/sloodle/icon.gif\" width=\"16\" height=\"16\" alt=\"\"/> ';\n sloodle_print_heading($img.$this->sloodle->name, 'center');\n \n // Display the module type and description\n $fulltypename = get_string(\"moduletype:{$this->sloodle->type}\", 'sloodle');\n echo '<h4 style=\"text-align:center;\">'.get_string('moduletype', 'sloodle').': '.$fulltypename;\n echo sloodle_helpbutton(\"moduletype_{$this->sloodle->type}\", $fulltypename, 'sloodle', true, false, '', true).'</h4>';\n // We'll apply a general introduction to all Controllers, since they seem to confuse lots of people!\n $intro = $this->sloodle->intro;\n if ($this->sloodle->type == SLOODLE_TYPE_CTRL) $intro = '<p style=\"font-style:italic;\">'.get_string('controllerinfo','sloodle').'</p>' . $this->sloodle->intro;\n\t\t// Display the intro in a box, if we have an intro\n\t\tif (!empty($intro)) sloodle_print_box($intro, 'generalbox', 'intro');\n \n }",
"public function add_header() {\n }",
"function header() {\n\t\techo '<div class=\"wrap\">';\n\t\tscreen_icon();\n\t\techo '<h2>化工产品目录CSV导入</h2>';\n\t}",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow, $COM_LEVEL_SALP;\n\n\t\t$worksheet->set_column(0, 0, 6);\n\t\t$worksheet->set_column(1, 1, 20);\n\t\t$worksheet->set_column(2, 2, 25);\n\t\t$worksheet->set_column(3, 3, 50);\n\t\t$worksheet->set_column(4, 4, 15);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 15);\n\t\t$worksheet->set_column(7, 7, 15);\n\t\t$worksheet->set_column(8, 8, 35);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"เลขประจำตัวประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"ชื่อ-นามสกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ตำแหน่ง/สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"อัตราเงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"เงินตอบแทน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"ที่เต็มขั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ร้อยละ 2 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ร้อยละ 4 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}",
"private function _subheader($text){\n echo '[-] ' . $text . PHP_EOL;\n }",
"public function drawHeader($question)\r\n {\r\n echo '\r\n <div class=\"panel-heading\">\r\n <h3 class=\"panel-title\">\r\n <span class=\"glyphicon glyphicon-arrow-right\"></span>'.$question.'\r\n </h3>\r\n </div>';\r\n }",
"function sloodle_print_header()\r\n {\r\n global $CFG;\r\n $navigation = \"<a href=\\\"{$CFG->wwwroot}/mod/sloodle/view.php?_type=course&id={$this->course->id}\\\">\".get_string('courseconfig', 'sloodle').\"</a>\";\r\n\r\n\r\n sloodle_print_header_simple(get_string('courseconfig','sloodle'), \" \", $navigation, \"\", \"\", true, '', navmenu($this->course));\r\n }",
"private function pageheader_print() {\n\t\tif (defined('DEBUG_ENABLED') && DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))\n\t\t\tdebug_log('Entered (%%)',129,0,__FILE__,__LINE__,__METHOD__,$fargs);\n\n\t\t# HTML prepage requirements.\n\t\tforeach ($this->_pageheader as $line)\n\t\t\techo $line.\"\\n\";\n\n\t\t# Page Title\n\t\techo '<head>';\n\t\tprintf('<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />');\n\n\t\t$DNs = get_request('dn','REQUEST');\n\t\tif (is_array($DNs))\n\t\t\t$DNs = '';\n\n\t\tif (isset($_SESSION[APPCONFIG]))\n\t\t\tprintf('<title>%s (%s) - %s%s</title>',\n\t\t\t\t$this->_app['title'],\n\t\t\t\tapp_version(),\n\t\t\t\t$DNs ? htmlspecialchars($DNs).' ' : '',\n\t\t\t\t$_SESSION[APPCONFIG]->getValue('appearance','page_title'));\n\t\telse\n\t\t\tprintf('<title>%s - %s</title>',$this->_app['title'],app_version());\n\n\t\techo '<link rel=\"shortcut icon\" href=\"images/favicon.ico\" type=\"image/vnd.microsoft.icon\" />';\n\t\t# Style sheet.\n\t\tprintf('<link type=\"text/css\" rel=\"stylesheet\" href=\"%s\" />',$this->_app['urlcss']);\n\n\t\tif (defined('JSDIR')) {\n\t\t\tprintf('<link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"%sjscalendar/calendar-blue.css\" title=\"blue\" />',JSDIR);\n\t\t\techo \"\\n\";\n\t\t\tprintf('<script type=\"text/javascript\" src=\"%sajax_functions.js\"></script>',JSDIR);\n\t\t\tprintf('<script type=\"text/javascript\" src=\"%sjscalendar/calendar.js\"></script>',JSDIR);\n\t\t\techo \"\\n\";\n\t\t}\n\n\t\t# HTML head requirements.\n\t\tif (is_array($this->_head) && count($this->_head))\n\t\t\tforeach ($this->_head as $line)\n\t\t\t\techo $line.\"\\n\";\n\n\t\techo '</head>';\n\t\techo \"\\n\";\n\t}",
"protected function displayConfigHeader() {\n\t\t}",
"function printHeader()\n\t{\n\t\t$_SESSION['last_page'] = $_SERVER['QUERY_STRING'];\n\t\tif( isset($_SESSION['admin']) && $_SESSION['admin'])\n\t\t{\n\t\t\t$this->admin_nav = \"<a class=\\\"button\\\" href=\\\"?section=project_management\\\" title=\\\"Go to project management\\\">Project Management</a>\\n\n\t\t\t\t\\t\\t<a class=\\\"button\\\" href=\\\"?section=reference_value_management\\\" title=\\\"Go to reference value management\\\">Reference Value Management</a>\\n\n\t\t\t\t\\t\\t<a class=\\\"button\\\" href=\\\"?section=user_management\\\" title=\\\"Go to user management\\\">User Management</a>\\n\";\n\t\t}\n\t\t$this->initSessionVariables();\n\t\tinclude 'View/Header.html';\n\t}",
"function Header()\n{\n $this->SetFont('Arial','B',15);\n // Move to the right\n $this->Cell(80);\n // Framed title\n\t$this->SetDrawColor(0,80,180);\n $this->SetFillColor(230,230,0);\n $this->SetTextColor(220,50,50);\n // Thickness of frame (1 mm)\n $this->SetLineWidth(1);\n\t$this->Cell($w,9,$title,1,1,'C',true);\n $this->Cell(30,10,'Title',1,0,'C');\n // Line break\n $this->Ln(40);\n}",
"protected function renderTableHeader(): string\n {\n if (!$this->options['showHeader']) {\n return '';\n }\n\n return\n '<thead>' .\n '<tr>' .\n '<th>' . $this->_('differences') . '</th>' .\n '</tr>' .\n '</thead>';\n }",
"public function sendHeader() : void\n {\n http_response_code($this->statusCode);\n\n foreach ($this->headers as $name => $value)\n {\n header(sprintf('%s: %s', $name, $value));\n }\n }",
"public function addHeader()\n {\n }",
"function Header()\n\t{\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','C');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->MultiCell(190,5,tipo_serv(),'0','C');\n\t\t$this->SetFont('Arial','B',10);\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->MultiCell(190,7,strtoupper(_('listado de clientes para cortes')),'0','C');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->SetX(133);\n\t\t$this->Cell(12,5,strtoupper(_('fecha')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"d/m/Y\"),0,0,'L');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->Cell(12,5,strtoupper(_('hora')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"h:i:s A\"),0,0,'L');\n\t\t$this->Ln();\t\t\n\t}",
"public function header() {\r\n $html = <<<HTML\r\n\r\n <header>\r\n <p class=\"welcomeScreen\" ><img src=\"images/title.png\" alt=\"\" ></p>\r\n <h1 class=\"welcomeScreen\">$this->title</h1>\r\n </header>\r\nHTML;\r\n return $html;\r\n }",
"public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nScripting in Bash Shell\nMAINHEADING;\n }",
"private function writeHeader()\n {\n $this->write(AvroDataIO::magic());\n $this->datum_writer->writeData(\n AvroDataIO::metadataSchema(),\n $this->metadata,\n $this->encoder\n );\n $this->write($this->sync_marker);\n }",
"function print_column_headers($screen, $with_id = \\true)\n {\n }",
"public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nCookies, Sessions, and File Upload\nMAINHEADING;\n }",
"protected function _writeHeader() {\n $this->stream->write(\n implode ($this->colDelim, array_values ($this->colName))\n );\n // Insert Newline\n $this->stream->write($this->lineDelim);\n $this->headerWritten= TRUE;\n }",
"private function executeTableShowHeader(array $columns): void\n {\n $separator = '+';\n $header = '|';\n\n foreach ($columns as $column)\n {\n $separator .= str_repeat('-', $column['length'] + 2).'+';\n $spaces = ($column['length'] + 2) - mb_strlen((string)$column['header']);\n\n $spacesLeft = (int)floor($spaces / 2);\n $spacesRight = (int)ceil($spaces / 2);\n\n $fillerLeft = ($spacesLeft>0) ? str_repeat(' ', $spacesLeft) : '';\n $fillerRight = ($spacesRight>0) ? str_repeat(' ', $spacesRight) : '';\n\n $header .= $fillerLeft.$column['header'].$fillerRight.'|';\n }\n\n echo \"\\n\", $separator, \"\\n\";\n echo $header, \"\\n\";\n echo $separator, \"\\n\";\n }",
"public function getHeader();",
"public function getHeader();"
] | [
"0.74785197",
"0.7464337",
"0.74478954",
"0.7406683",
"0.7382785",
"0.72371876",
"0.7205562",
"0.7204328",
"0.7184734",
"0.7147355",
"0.71398515",
"0.71267664",
"0.7080715",
"0.70668525",
"0.69408715",
"0.6938954",
"0.6893825",
"0.6870148",
"0.6866674",
"0.6866494",
"0.6829768",
"0.68047136",
"0.67940366",
"0.67564243",
"0.6748084",
"0.6703546",
"0.6699728",
"0.6683914",
"0.6669333",
"0.66341656",
"0.66292965",
"0.662885",
"0.6624806",
"0.66210526",
"0.6616334",
"0.6568314",
"0.6553763",
"0.6549454",
"0.65388304",
"0.6538162",
"0.6525506",
"0.6508804",
"0.65023583",
"0.6470638",
"0.64575934",
"0.6432607",
"0.6423823",
"0.64137805",
"0.64083487",
"0.6407896",
"0.64064854",
"0.64037836",
"0.6393244",
"0.6391076",
"0.63875914",
"0.6371436",
"0.63552195",
"0.63440573",
"0.63430065",
"0.63375294",
"0.6323165",
"0.6316147",
"0.631313",
"0.62996995",
"0.62973577",
"0.62923014",
"0.6274674",
"0.6268204",
"0.6251694",
"0.6251314",
"0.62510073",
"0.6250593",
"0.62472713",
"0.6244169",
"0.62338763",
"0.62324846",
"0.62223166",
"0.621339",
"0.6205807",
"0.6186305",
"0.6185724",
"0.6185279",
"0.6184045",
"0.61837846",
"0.61826855",
"0.61810464",
"0.6180557",
"0.6172731",
"0.61635745",
"0.6153415",
"0.61496174",
"0.6149432",
"0.61490107",
"0.6143853",
"0.61427957",
"0.6127063",
"0.6126455",
"0.6124771",
"0.61207813",
"0.61207813"
] | 0.7204728 | 7 |
Console output sub header message. | private function _subheader($text){
echo '[-] ' . $text . PHP_EOL;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function subheader($title)\n\t{\n\t\tstatic::stdout\n\t\t\t(\n\t\t\t\t' === '.$title.' '.\\str_repeat('=', \n\t\t\t\tstatic::$screenwidth-6-\\strlen($title)).PHP_EOL.PHP_EOL\n\t\t\t);\n\t}",
"private function printHeader()\n {\n $this->printer->println('Test-Flight %s', Constants::VERSION);\n }",
"public function printHeaders() {\n\t}",
"function sendHeader() {\n\t\t$this->console_text('###############################################################################');\n\t\t$this->console_text(' Aseco v' . ASECO_VERSION . ' running on {1}:{2}', $this->server->ip, $this->server->port);\n\t\t$this->console_text(' Game : {1} - {2}', $this->server->game, $this->server->gameinfo->getMode());\n\t\t$this->console_text(' Author: Florian Schnell');\n\t\t$this->console_text('###############################################################################');\n\n\t\tif ($this->welcome_msgs) {\n\t\t\tforeach ($this->welcome_msgs as $message) {\n\t\t\t\t$this->console_text('[' . $message['DATE'][0].'] ' . $message['TEXT'][0]);\n\t\t\t}\n\t\t\t$this->console_text('###############################################################################');\n\t\t}\n\n\t\t// format the text of the message ...\n\t\t$startup_msg = formatText($this->getChatMessage('STARTUP'),\n\t\t\tASECO_VERSION,\n\t\t\t$this->server->ip,\n\t\t\t$this->server->port);\n\n\t\t// replace colors ...\n\t\t$startup_msg = $this->formatColors($startup_msg);\n\n\t\t// send the message ...\n\t\t$this->client->addCall('ChatSendServerMessage', array($startup_msg));\n\t\t$this->client->multiquery();\n\t}",
"function Header()\n{\n\tglobal $title;\n\t$this->Ln(5);\n}",
"function sendHeader() {\n\n\t\t$this->console_text('###############################################################################');\n\t\t$this->console_text(' XASECO2 v' . XASECO2_VERSION . ' running on {1}:{2}', $this->server->ip, $this->server->port);\n\t\t$this->console_text(' Name : {1} - {2}', stripColors($this->server->name, false), $this->server->serverlogin);\n\t\tif ($this->server->isrelay)\n\t\t\t$this->console_text(' Relays : {1} - {2}', stripColors($this->server->relaymaster['NickName'], false), $this->server->relaymaster['Login']);\n\t\t$this->console_text(' Game : {1} - {2} - {3}', $this->server->game,\n\t\t $this->server->packmask, $this->server->gameinfo->getMode());\n\t\t$this->console_text(' Version: {1} / {2}', $this->server->version, $this->server->build);\n\t\t$this->console_text(' Author : Xymph');\n\t\t$this->console_text('###############################################################################');\n\n\t\t// format the text of the message\n\t\t$startup_msg = formatText($this->getChatMessage('STARTUP'),\n\t\t XASECO2_VERSION,\n\t\t $this->server->ip, $this->server->port);\n\t\t// show startup message\n\t\t$this->client->query('ChatSendServerMessage', $this->formatColors($startup_msg));\n\t}",
"function Header()\n\t{\n\t\t$this->cabecera_esp();\n\t\t$this->Ln();\n\t}",
"private function _header($text){\n echo '[*] ' . $text . PHP_EOL;\n }",
"function display_header() {}",
"function Header() {\r\n // print the title\r\n $this->SetTitleFont();\r\n $this->Cell(100, 8, $this->title, 0, 0, \"L\");\r\n\r\n // print the author\r\n $this->SetAuthorFont();\r\n $this->Cell(0, 8, $this->author, 0, 0, \"R\");\r\n\r\n // header line\r\n $this->SetFillColor(0, 0, 0);\r\n $this->Rect(10, 17, 190, 0.2, \"F\");\r\n $this->Rect(10, 17.5, 190, 0.2, \"F\");\r\n $this->Ln(14);\r\n }",
"function display_header_text()\n {\n }",
"public function print_header() {\n return $this->header();\n }",
"abstract public function header();",
"public function Header(){\n\t\t$this->lineFeed(10);\n\t}",
"public function printHeader() {\n\t\t$template = self::$templates[$this->templateName];\n\t\trequire_once $template['path'] . $template['file-header'];\n\t}",
"public function __Header(){\n $this->Ln(5);\n $this->SetDrawColor(160,160,160);\n $this->SetFillColor(230,230,230);\n $this->SetTextColor(100);\n $this->SetFont('Arial','B',7);\n $this->SetX(($this->w - $this->_tWidth)/2);\n foreach($this->_fields as $field)\n $this->Cell($field[\"size\"],5,$field[\"header\"],1,0,\"C\",true);\n $this->Ln();\n }",
"function header (){\n\t\t$this->setfont('Arial','B', 16);\n\t\t$this->settextcolor(0, 0, 0);\n\t\t$this->cell(0, 10, 'WANANCHI', 0, 0, 'C');\n\t\t$this->Ln(10);\n\t\t$this->setfont('Arial','',12);\n\t\t$this->settextcolor(0, 0, 0);\n\t\t$this->cell(0, 10, 'INFORMATION',0, 0, 'C');\n\t\t$this->Ln(30);\n\t}",
"public function header()\n {\n }",
"function printHeader($text) {\n \treturn \"<h2>\".$text.\"</h2>\";\n }",
"abstract protected function header();",
"function header() {\n }",
"protected function showHeader($header)\n {\n $names = count($header);\n\n for ($i = 0; $i < $names; $i++) {\n echo ucfirst($header[$i]);\n\n if ($i < $names-1) echo self::SEPARATOR;\n }\n\n echo PHP_EOL;\n }",
"function displayHeader($title = '',\n $subtitle = '',\n $status = ''){\n global $DOPBSP;\n \n $complete_title = ($title != '' ? '<span class=\"dopbsp-phone-hidden\">'.$title:'').\n ($subtitle != '' ? ' - </span>'.$subtitle:'</span>').\n ($status != '' ? ' '.$status:'');\n?>\n <h2></h2>\n <div class=\"dopbsp-header\">\n <h3><?php echo $complete_title?></h3>\n<?php\n echo $this->getLanguages();\n \n if (DOPBSP_CONFIG_VIEW_DOCUMENTATION){\n?>\n <a href=\"<?php echo DOPBSP_CONFIG_HELP_DOCUMENTATION_URL; ?>\" target=\"_blank\" class=\"dopbsp-tablet-hidden dopbsp-phone-hidden\"><?php echo $DOPBSP->text('HELP_DOCUMENTATION'); ?></a>\n<?php\n }\n?>\n <br class=\"dopbsp-clear\" />\n </div>\n <?php $this->displayBoxes(); ?>\n<?php \n }",
"function Header(){\n\t\t}",
"function create_subheader_for_answers ( $question_id ) {\n /* $result_answers array\n * $number_of_answers integer\n */\n $result_answers = fetch_answers ( $question_id );\n // to print subheader for Answers\n $number_of_answers = pg_num_rows ( $result_answers );\n\n if ( $number_of_answers == 1 ) \n {\n subheader( $number_of_answers \n . \" Answer\" );\n }\n // to have the underline\n else if ( $number_of_answers == 0 ) {\n subheader( \"Be the first answerer\" );\n }\n else\n {\n echo (\"<div id='subheader'>\"\n . \"<h2>\"\n . $number_of_answers . \" Answers\"\n . \"</h2>\" );\n create_tab_box_thread( $question_id );\n echo ( \"</div>\" );\n }\n}",
"public function header() {\n\t}",
"public static function renderHeaders()\n {\n echo self::$headers;\n }",
"function printOutputHeader() {\n echo \"Title|Code|Duration|Inclusions|MinPrice\\n\";\n}",
"public static function header_output() {\n\t\tob_start();\n\n\t\tif ( self::options( 'header_type' ) == 'navbar-fixed-top' ) {\n\t\t\techo 'body{padding-top: 50px;}';\n\t\t}\n\n\t\tif ( ! display_header_text() ) {\n\t\t\techo '#site-title,.site-description{position: absolute;clip: rect(1px, 1px, 1px, 1px);}';\n\t\t} else {\n\t\t\tself::generate_css( '#site-title', 'color', 'header_textcolor', '#' );\n\t\t}\n\t\t$extra_css = apply_filters( 'maketador_header_output', ob_get_clean() );\n\t\tif ( ! empty( $extra_css ) ) {\n\t\t\techo '<style type=\"text/css\">' . $extra_css . '</style>';\n\t\t}\n\t\t?>\n\t\t<?php\n\t}",
"private function writePrintHeaders(): void\n {\n $record = 0x002a; // Record identifier\n $length = 0x0002; // Bytes to follow\n\n $fPrintRwCol = $this->printHeaders; // Boolean flag\n\n $header = pack('vv', $record, $length);\n $data = pack('v', $fPrintRwCol);\n $this->append($header . $data);\n }",
"public function Header()\r\n\t{\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14);\r\n\t\t$this->Cell(170,7,\"Date :: \". $this->today_date ,1,0,'C');\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14); \r\n\t\t$this->MultiCell(170,8,\"Room Things Report \\n\".$this->title,1,'C');\r\n\t\t$this->Ln(5);\r\n\r\n\t}",
"protected function display_data_header()\n\t{\n\t\t$msg =\n\t\t\t\"<p>\" .\n\t\t\t\t\"How good each project was, compared with the other projects scored \" .\n\t\t\t\t\"by the same judge. The higher the number, the better the project.\" .\n\t\t\t\"</p><br>\";\n\n\t\treturn $msg . parent::display_data_header();\n\n\t}",
"private function writeHeader(): void\n {\n $record = 0x0014; // Record identifier\n\n /* removing for now\n // need to fix character count (multibyte!)\n if (strlen($this->phpSheet->getHeaderFooter()->getOddHeader()) <= 255) {\n $str = $this->phpSheet->getHeaderFooter()->getOddHeader(); // header string\n } else {\n $str = '';\n }\n */\n\n $recordData = StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddHeader());\n $length = strlen($recordData);\n\n $header = pack('vv', $record, $length);\n\n $this->append($header . $recordData);\n }",
"function outputHeader()\n {\n global $application;\n\n $output = '';\n if (!is_array($this -> _attrs))\n return $output;\n\n // output error column\n if (is_array($this -> _Errors) && !empty($this -> _Errors))\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-error.tpl.html',\n array()\n );\n\n foreach($this -> _attrs as $k => $v)\n {\n if ($v != 'YES')\n continue;\n\n $template_contents = array(\n 'HeaderName' => getMsg('SYS', @$this -> _headermap[$k])\n );\n $this -> _Template_Contents = $template_contents;\n $application -> registerAttributes($this -> _Template_Contents);\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-cell.tpl.html',\n array()\n );\n }\n\n return $output;\n }",
"public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nOrganizational Units\nMAINHEADING;\n }",
"public function printTableHeader($open)\n {\n\n print \"<tr>\\n\";\n print \"<th> \";\n print \" Admin Email\";\n print \" </th>\";\n print \"<th> \";\n print \" Level\";\n print \" </th>\";\n if (!$open)\n print \"</tr>\\n\";\n }",
"public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nGROUP BY Command\nMAINHEADING;\n }",
"public function format_for_header()\n {\n }",
"function showHeader(){\n\t\t$header = \"\";\n\t\t// print the header row\n\t\t$header .= \"\t<tr>\\n\";\n\t\t// loop the fields\n\t\tforeach ($this->fields as $field) {\n\t\t\t// print each field\n\t\t\t$header .= \"\t\t<th>\".$field.\"</th>\\n\";\n\t\t}\n\t\t// end the header row\n\t\t$header .= \"\t</tr>\\n\";\n\t\treturn $header;\n\t}",
"public function showPageHeader() {\n\n\t\techo $this->getPageHeader();\n\t}",
"public function section_header() {\r\n\t\techo '<p>Other menu options will only show when there is a connection to the API.</p>';\r\n\t}",
"public function writeHeader($uHeading, $uMessage)\n {\n echo \"<h{$uHeading}>{$uMessage}</h{$uHeading}>\";\n }",
"function logheader() {\n $str = \"\\n=============================\"\n .\"======================================\";\n $str .= \"\\n============================ \"\n .\"logrecord ============================\";\n $str .= \"\\nstartlogrecord timestamp : \".date(\"Y-m-d H:i:s\",time()).\"\\n\";\n\n $this->prn($str);\n// fwrite($this->fp, $str.\"\\n\");\n }",
"public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nCookies, Sessions, and File Upload\nMAINHEADING;\n }",
"function sloodle_print_header()\r\n {\r\n global $CFG;\r\n $navigation = \"<a href=\\\"{$CFG->wwwroot}/mod/sloodle/view.php?_type=course&id={$this->course->id}\\\">\".get_string('courseconfig', 'sloodle').\"</a>\";\r\n\r\n\r\n sloodle_print_header_simple(get_string('courseconfig','sloodle'), \" \", $navigation, \"\", \"\", true, '', navmenu($this->course));\r\n }",
"function displayHeader()\n\t{\n\t\t// output locator\n\t\t$this->displayLocator();\n\n\t\t// output message\n\t\tif($this->message)\n\t\t{\n\t\t\tilUtil::sendInfo($this->message);\n\t\t}\n\t\tilUtil::infoPanel();\n\n//\t\t$this->tpl->setTitleIcon(ilUtil::getImagePath(\"icon_pd_b.gif\"),\n//\t\t\t\"\");\n\t\t$this->tpl->setTitle($this->lng->txt(\"bookmarks\"));\n\t}",
"public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nSQL Basics\nMAINHEADING;\n }",
"public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nWorking with Data in C#\nMAINHEADING;\n }",
"public function print_header() {\n header('Content-type: text/csv');\n $filename = $this->page->title;\n $filename = preg_replace('/[^a-z0-9_-]/i', '_', $filename);\n $filename = preg_replace('/_{2,}/', '_', $filename);\n $filename = $filename.'.csv';\n header(\"Content-Disposition: attachment; filename=$filename\");\n }",
"function Header()\n\t\t{\n\t\t\t$this->SetFont('Helvetica','B',18);\n\t\t\t$this->SetTextColor(184,10,10);\n\t\t\t$this->Cell(30);\n\t\t\t$this->Cell(120,10,utf8_decode(\"Mensajes Contestados\"),0,0,'C');\n\t\t\t$this->Ln(20);\n\t\t}",
"public function Header() {\n\t\t$x = 0;\n\t\t$dx = 0;\n\t\tif ($this->rtl) {\n\t\t\t$x = $this->w + $dx;\n\t\t} else {\n\t\t\t$x = 0 + $dx;\n\t\t}\n\n\t\t// print the fancy header template\n\t\tif($this->print_fancy_header){\n\t\t\t$this->printTemplate($this->header_xobjid, $x, 0, 0, 0, '', '', false);\n\t\t}\n\t\tif ($this->header_xobj_autoreset) {\n\t\t\t// reset header xobject template at each page\n\t\t\t$this->header_xobjid = false;\n\t\t}\n\t\t\n\t\t$this->y = $this->header_margin;\n\t\t$this->SimpleHeader();\n\t\t//$tmpltBase = $this->MakePaginationTemplate();\n\t\t//echo $tmpltBase;die();\n\t\t//echo('trying to print header template: ');\n\t\t//$this->printTemplate($tmpltBase, $x, $this->y, 0, 0, '', '', false);\n\t\t//die();\n\t}",
"public function Header()\n {\n // Set custom header and footer\n $this->setCustomHeader();\n\n if (array_key_exists($this->category, $this->categories)) {\n $title = $this->categories[$this->category]['name'];\n } else {\n $title = '';\n }\n\n $this->SetTextColor(0, 0, 0);\n $this->SetFont($this->currentFont, 'B', 18);\n\n if (0 < PMF_String::strlen($this->customHeader)) {\n $this->writeHTMLCell(0, 0, '', '', $this->customHeader);\n $this->Ln();\n $this->writeHTMLCell(0, 0, '', '', html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 0, false, true, 'C');\n } else {\n $this->MultiCell(0, 10, html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 'C', 0);\n $this->SetMargins(PDF_MARGIN_LEFT, $this->getLastH() + 5, PDF_MARGIN_RIGHT);\n }\n }",
"public function displayHeader()\n {\n // Display the page start in case of an html page\n $this->displayPageStart();\n \n // Display the script header line\n $this->display( sprintf( \"%s - version %s\". PHP_EOL, $this->scriptName, $this->version ) );\n \n // Display settings?\n if( null !== $this->limit || null !== $this->remove || null !== $this->update )\n {\n $this->display( PHP_EOL .'Settings:' );\n\n // Display the \"debug\" setting\n if( true === $this->debug )\n {\n $this->display( PHP_EOL . \"- debug mode enabled\" );\n }\n \n // Display the \"limit\" setting\n if( null !== $this->limit )\n {\n $line = 'no limit';\n if( is_int($this->limit) )\n {\n $line = sprintf( \"%d hour%s\", $this->limit, ( 1 < $this->limit ? 's' : '' ) );\n }\n $this->display( PHP_EOL . sprintf( \"- limit : %s\", $line ) );\n }\n \n // Display the \"remove\" setting\n if( null !== $this->remove )\n {\n $line = \"Data will be removed.\";\n if( true !== $this->remove )\n {\n $line = 'No data is removed from the database!'. PHP_EOL .' Change the \"REMOVE\" setting if you want to remove releases or parts';\n }\n $this->display( PHP_EOL . sprintf( \"- remove: %s\", $line ) );\n }\n \n // Display the \"update\" setting\n if( null !== $this->update )\n {\n $line = \"Data will be updated.\";\n if( true !== $this->update )\n {\n $line = 'No data is updated in the database!'. PHP_EOL .' Change the \"UPDATE\" setting if you want to enable update';\n }\n $this->display( PHP_EOL . sprintf( \"- update: %s\", $line ) );\n }\n \n // Spacer\n $this->display( PHP_EOL );\n }\n \n // End spacer\n $this->display( PHP_EOL );\n }",
"public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nXML Schemas continued..\nMAINHEADING;\n }",
"public static function header($title)\n\t{\n\t\tstatic::stdout(' '.$title.PHP_EOL);\n\t\tstatic::stdout(' '.\\str_repeat('-', static::$screenwidth-1).PHP_EOL.PHP_EOL);\n\t}",
"function header() {\n //\n //Get the fields in this sql \n $cols= $this->fields->get_array();\n //\n //Loop through the fields and display the <tds>\n foreach ($cols as $col) {\n //\n $name= is_null($col->alias) ? $col->to_str():$col->alias;\n echo \"<th>$name</th>\"; \n }\n }",
"public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nScripting in Bash Shell\nMAINHEADING;\n }",
"public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nAdvanced Collections in C#\nMAINHEADING;\n }",
"public function subhead($text) {\n\t\treturn \"<h4 class='subhead'>$text</h4>\";\n\t}",
"public function add_header() {\n }",
"public function getHeaderText()\n {\n return $this->__('View Subscription (ID: %s)', $this->_getModel()->getId());\n }",
"function msdlab_pre_header(){\n print '<div class=\"pre-header\">\n <div class=\"wrap\">';\n do_action('msdlab_pre_header');\n print '\n </div>\n </div>';\n }",
"function Header() {\n if(empty($this->title) || $this->PageNo() == 1) return;\n $oldColor = $this->TextColor;\n $this->SetTextColor(PDF_HEADER_COLOR['red'],\n PDF_HEADER_COLOR['green'],\n PDF_HEADER_COLOR['blue']);\n $x = $this->GetX();\n $y = $this->GetY();\n $this->SetY(10, false);\n $this->SetFont('', 'B');\n $this->Cell(0, 10, $this->title);\n $this->SetFont('', '');\n $this->SetXY($x, $y);\n $this->TextColor = $oldColor;\n }",
"public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nUnique to Oracle\nMAINHEADING;\n }",
"protected function header()\n {\n\n }",
"function getHeader() {\n return '';\n }",
"protected function dumpHeader() {}",
"function blankMiddleBox($header,$subline,$body){\n\t\techo \"<div class='side-body-bg'>\\n\";\n\t\techo \"<span class='scapmain'>$header</span>\\n\";\n\t\techo \"<br />\\n\";\n\t\techo \"<span class='poster'>$subline</span>\\n\";\n\t\techo \"</div>\\n\";\n\t\techo \"<div class='tbl'>$body</div>\\n\";\n\t\techo \"<br />\\n\";\n\t}",
"public static function showHeader() {\r\n\t\t$title = (array_key_exists('headertitle', $_SESSION))?\r\n\t\t\t$_SESSION['headertitle']:\"\";\r\n\t\t\r\n\t\techo \"<!DOCTYPE html>\\n\";\r\n\t\techo \"<html>\\n\";\r\n\t\techo \"<head>\\n\";\r\n\t\techo \"<title>$title</title>\\n\";\r\n\t\techo \"</head>\\n\\t<body>\\n\";\r\n }",
"public function addHeader()\n {\n }",
"function echoHeader($spec) {\n\techo('<div class=\"tr\">');\n\tforeach($spec as $col) {\n\t\techo('<div class=\"th\">' . htmlspecialchars($col) . '</div>');\n\t}\n\techo('<div class=\"th\">Actions</div>');\n\techo('</div>');\n}",
"public function header($text)\n {\n return '\n\n\t<!-- MAIN Header in page top -->\n\t<h1 class=\"t3js-title-inlineedit\">' . htmlspecialchars($text) . '</h1>\n';\n }",
"protected function dumpHeader() {\n\t\treturn trim('\n# TYPO3 Extension Manager dump 1.1\n#\n#--------------------------------------------------------\n');\n\t}",
"public function getOutputHeaders()\n {\n }",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\n\t\t$worksheet->set_column(0, 0, 10);\n\t\t$worksheet->set_column(1, 1, 25);\n\t\t$worksheet->set_column(2, 2, 30);\n\t\t$worksheet->set_column(3, 3, 20);\n\t\t$worksheet->set_column(4, 4, 30);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 20);\n\t\t$worksheet->set_column(7, 7, 30);\n\t\t$worksheet->set_column(8, 8, 30);\n\t\t$worksheet->set_column(9, 9, 20);\n\t\t$worksheet->set_column(10, 10, 10);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"สาขาวิชา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"ระดับการศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"สถานศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"ประเทศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"ตำแหน่ง/ระดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ชื่อทุน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"ระยะเวลา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"จำนวนวัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t}",
"public function showMessage()\n {\n print $this->generator->getHappyMessage() . $this->name;\n }",
"function sloodle_print_header()\n {\n global $CFG;\n\n // Offer the user an 'update' button if they are allowed to edit the module\n $editbuttons = '';\n if ($this->canedit) {\n $editbuttons = update_module_button($this->cm->id, $this->course->id, get_string('modulename', 'sloodle'));\n }\n // Display the header\n $navigation = \"<a href=\\\"index.php?id={$this->course->id}\\\">\".get_string('modulenameplural','sloodle').\"</a> ->\";\n sloodle_print_header_simple(format_string($this->sloodle->name), \" \", \"{$navigation} \".format_string($this->sloodle->name), \"\", \"\", true, $editbuttons, navmenu($this->course, $this->cm));\n\n // Display the module name\n $img = '<img src=\"'.$CFG->wwwroot.'/mod/sloodle/icon.gif\" width=\"16\" height=\"16\" alt=\"\"/> ';\n sloodle_print_heading($img.$this->sloodle->name, 'center');\n \n // Display the module type and description\n $fulltypename = get_string(\"moduletype:{$this->sloodle->type}\", 'sloodle');\n echo '<h4 style=\"text-align:center;\">'.get_string('moduletype', 'sloodle').': '.$fulltypename;\n echo sloodle_helpbutton(\"moduletype_{$this->sloodle->type}\", $fulltypename, 'sloodle', true, false, '', true).'</h4>';\n // We'll apply a general introduction to all Controllers, since they seem to confuse lots of people!\n $intro = $this->sloodle->intro;\n if ($this->sloodle->type == SLOODLE_TYPE_CTRL) $intro = '<p style=\"font-style:italic;\">'.get_string('controllerinfo','sloodle').'</p>' . $this->sloodle->intro;\n\t\t// Display the intro in a box, if we have an intro\n\t\tif (!empty($intro)) sloodle_print_box($intro, 'generalbox', 'intro');\n \n }",
"function myheader($additionalHeaderContent = NULL) {\n\t\tprint '<html>';\n\t\t\tprint '<head>';\n\t\t\t\tprint '<title>';\n\t\t\t\t\tif (defined('TITLE')) {\n\t\t\t\t\t\tprint TITLE;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tprint 'MiddleClik';\n\t\t\t\t\t}\n\t\t\t\tprint '</title>';\n\t\t\t\tprint \"<meta http-equiv=\\\"content-type\\\" content=\\\"text/html; charset=utf-8\\\" />\";\n\t\t\t\tprint $additionalHeaderContent;\n\t\t\t\tprint \"<style type=\\\"text/css\\\">\";\n\t\t\t\t\tprint '//this is where my css, js goes';\n\t\t\t\tprint \"</style>\";\n\t\t\tprint '</head>';\n\t}",
"public function showAdminHeader() {\n\n\t\techo $this->getAdminHeader();\n\t}",
"function printHeader()\n\t{\n\t\t$_SESSION['last_page'] = $_SERVER['QUERY_STRING'];\n\t\tif( isset($_SESSION['admin']) && $_SESSION['admin'])\n\t\t{\n\t\t\t$this->admin_nav = \"<a class=\\\"button\\\" href=\\\"?section=project_management\\\" title=\\\"Go to project management\\\">Project Management</a>\\n\n\t\t\t\t\\t\\t<a class=\\\"button\\\" href=\\\"?section=reference_value_management\\\" title=\\\"Go to reference value management\\\">Reference Value Management</a>\\n\n\t\t\t\t\\t\\t<a class=\\\"button\\\" href=\\\"?section=user_management\\\" title=\\\"Go to user management\\\">User Management</a>\\n\";\n\t\t}\n\t\t$this->initSessionVariables();\n\t\tinclude 'View/Header.html';\n\t}",
"function Header()\n\t{\n\t\t// Police Arial gras 24\n\t\t$this->SetTextColor(255,10,22);\n\t\t$this->SetFont('Arial','B',14);\n\t\t// Décalage à droite\n\t\t$this->Cell(10);\n\t\t// Titre (ligne,titre)\n\t\t$this->Cell('',10,'Liste des employes',0,0,'C');\n\t\t// Saut de ligne\n\t\t$this->Ln(20);\n\t}",
"function Header()\n{\n $this->SetFont('Arial','B',15);\n // Move to the right\n $this->Cell(80);\n // Framed title\n\t$this->SetDrawColor(0,80,180);\n $this->SetFillColor(230,230,0);\n $this->SetTextColor(220,50,50);\n // Thickness of frame (1 mm)\n $this->SetLineWidth(1);\n\t$this->Cell($w,9,$title,1,1,'C',true);\n $this->Cell(30,10,'Title',1,0,'C');\n // Line break\n $this->Ln(40);\n}",
"public function _start_block($header)\n\t{\n\t\techo $header;\n\t}",
"public static function end_header()\n\t{\n\t\treturn sprintf('</h%d>',\n\t\t\tmin(6, self::$nivel_cabecalho)\n\t\t);\n\t}",
"function Header() {\n $this->SetFont('Helvetica', 'B', 18);\n //Judul dalam bingkai\n $this->Cell(0, 5, 'Daftar Hasil Seleksi Calon Siswa Baru', 0, 1, 'C');\n $this->SetFont('Helvetica', 'B', 16);\n $this->Cell(0, 15, 'Sekolah Dasar', 0, 0, 'C');\n //Ganti baris\n $this->Ln(20);\n }",
"private function pageheader_print() {\n\t\tif (defined('DEBUG_ENABLED') && DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))\n\t\t\tdebug_log('Entered (%%)',129,0,__FILE__,__LINE__,__METHOD__,$fargs);\n\n\t\t# HTML prepage requirements.\n\t\tforeach ($this->_pageheader as $line)\n\t\t\techo $line.\"\\n\";\n\n\t\t# Page Title\n\t\techo '<head>';\n\t\tprintf('<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />');\n\n\t\t$DNs = get_request('dn','REQUEST');\n\t\tif (is_array($DNs))\n\t\t\t$DNs = '';\n\n\t\tif (isset($_SESSION[APPCONFIG]))\n\t\t\tprintf('<title>%s (%s) - %s%s</title>',\n\t\t\t\t$this->_app['title'],\n\t\t\t\tapp_version(),\n\t\t\t\t$DNs ? htmlspecialchars($DNs).' ' : '',\n\t\t\t\t$_SESSION[APPCONFIG]->getValue('appearance','page_title'));\n\t\telse\n\t\t\tprintf('<title>%s - %s</title>',$this->_app['title'],app_version());\n\n\t\techo '<link rel=\"shortcut icon\" href=\"images/favicon.ico\" type=\"image/vnd.microsoft.icon\" />';\n\t\t# Style sheet.\n\t\tprintf('<link type=\"text/css\" rel=\"stylesheet\" href=\"%s\" />',$this->_app['urlcss']);\n\n\t\tif (defined('JSDIR')) {\n\t\t\tprintf('<link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"%sjscalendar/calendar-blue.css\" title=\"blue\" />',JSDIR);\n\t\t\techo \"\\n\";\n\t\t\tprintf('<script type=\"text/javascript\" src=\"%sajax_functions.js\"></script>',JSDIR);\n\t\t\tprintf('<script type=\"text/javascript\" src=\"%sjscalendar/calendar.js\"></script>',JSDIR);\n\t\t\techo \"\\n\";\n\t\t}\n\n\t\t# HTML head requirements.\n\t\tif (is_array($this->_head) && count($this->_head))\n\t\t\tforeach ($this->_head as $line)\n\t\t\t\techo $line.\"\\n\";\n\n\t\techo '</head>';\n\t\techo \"\\n\";\n\t}",
"function ua_webtide_resources_set_main_subheader( $subheader ) {\n\t//return get_post_meta( $jobs_page_post->ID, 'page_subheader', true );\n\treturn $subheader;\n}",
"public static function show_header() {\n require_once Config::get('prefix') . '/templates/header.inc.php';\n }",
"function output() {\n if (isset($this->status)) {\n $this->send_header(sprintf('HTTP/1.1 %d %s',\n $this->status, $this->reason),\n TRUE,\n $this->status);\n }\n\n foreach ($this->headers as $k => $v) {\n $this->send_header(\"$k: $v\");\n }\n\n echo $this->body;\n }",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow, $COM_LEVEL_SALP;\n\n\t\t$worksheet->set_column(0, 0, 6);\n\t\t$worksheet->set_column(1, 1, 20);\n\t\t$worksheet->set_column(2, 2, 25);\n\t\t$worksheet->set_column(3, 3, 50);\n\t\t$worksheet->set_column(4, 4, 15);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 15);\n\t\t$worksheet->set_column(7, 7, 15);\n\t\t$worksheet->set_column(8, 8, 35);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"เลขประจำตัวประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"ชื่อ-นามสกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ตำแหน่ง/สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"อัตราเงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"เงินตอบแทน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"ที่เต็มขั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ร้อยละ 2 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ร้อยละ 4 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}",
"function Header() \n { \n\n list($r, $b, $g) = $this->xheadercolor; \n $this->setY(10); // shouldn't be needed due to page margin, but helas, otherwise it's at the page top \n $this->SetFillColor($r, $b, $g); \n $this->SetTextColor(0 , 0, 0); \n $this->Cell(0,20, '', 0,1,'C', 1); \n $this->Text(15,26,$this->xheadertext ); \n }",
"function do_header_found(){\n\techo\"\n\t\t<html>\n\t\t<title> Race Search </title>\n\t\t<h1> Search Results: </h1>\n\t\";\n}",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\t\tglobal $heading_name,$ORG_TITLE;\n\t\t\n\t\t$worksheet->set_column(0, 0, 5);\n\t\t$worksheet->set_column(1, 1, 40);\n\t\t$worksheet->set_column(2, 2, 27);\n\t\t$worksheet->set_column(3, 3, 25);\n\t\t$worksheet->set_column(4, 4, 12);\n\t\t$worksheet->set_column(5, 5, 5);\n\t\t$worksheet->set_column(6, 6, 4);\n\t\t$worksheet->set_column(7, 7, 4);\n\t\t$worksheet->set_column(8, 8, 4);\n\t\t$worksheet->set_column(9, 9, 4);\n\t\t$worksheet->set_column(10, 10, 4);\n\t\t$worksheet->set_column(11, 11, 4);\n\t\t$worksheet->set_column(12, 12, 18);\n\t\t$worksheet->set_column(13, 13, 25);\n\t\t$worksheet->set_column(14, 14, 5);\n\t\t$worksheet->set_column(15, 15, 8);\n\t\t$worksheet->set_column(16, 16, 28);\n\t\t$worksheet->set_column(17, 17, 15);\n\t\t$worksheet->set_column(18, 18, 20);\n\t\t$worksheet->set_column(19, 19, 12);\n\t\t$worksheet->set_column(20, 20, 8);\n\t\t$worksheet->set_column(21, 21, 12);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"(1)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"(2)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"(3)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"(4)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"(5)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"(6)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"(7)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"(8)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"(9)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"(10)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"(11)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"(12)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 17,\"(13)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"(14)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"(15)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"(16)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"(17)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อส่วนราชการ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"เลข\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\",0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"L\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"พื้นที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"วุฒิการศึกษา/\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"อัตรา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ประจำตัว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"เพศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"เกิด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"บรรจุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"หมวด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"ชื่อตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"ชั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"ส่วนกลาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"ปฏิบัติงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"ประกาศนียบัตร\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"เงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"ปีที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\t\t$worksheet->write($xlsRow, 21, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 1, \"$ORG_TITLE\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"เขต/แขวง/ศูนย์\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"ประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 15, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 16, \"/ภูมิภาค\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 17, \"(จังหวัด)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 18, \"เฉพาะทาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 19, \"ปัจจุบัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 20, \"เกษียณ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}",
"function Header(){\r\n\t\t//Aqui va el encabezado\r\n\t\tif ($this->iSector==98){\r\n\t\t\tp_FuenteGrandeV2($this,'B');\r\n\t\t\t$this->Cell($this->iAnchoLibre,5,utf8_decode('Información de depuración'), 0, 0, 'C');\r\n\t\t\t$this->Ln();\r\n\t\t\treturn;\r\n\t\t\t}\r\n\t\t$iConFondo=0;\r\n\t\tif ($this->sFondo!=''){\r\n\t\t\tif (file_exists($this->sFondo)){\r\n\t\t\t\t$this->Image($this->sFondo, 0, 0, $this->iAnchoFondo);\r\n\t\t\t\t$iConFondo=1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t$yPos=$this->GetY();\r\n\t\tif ($yPos<$this->iBordeEncabezado){\r\n\t\t\t$this->SetY($this->iBordeEncabezado);\r\n\t\t\t}\r\n\t\tif ($iConFondo==0){\r\n\t\t\tp_TituloEntidad($this, false);\r\n\t\t\t}else{\r\n\t\t\tp_FuenteGrandeV2($this,'B');\r\n\t\t\t}\r\n\t\tif ($this->iReporte==1902){\r\n\t\t\t//Ubique aqui los componentes adicionales del encabezado\r\n\t\t\t$this->Cell($this->iAnchoLibre,5,'Eventos '.$this->sRefRpt, 0, 0, 'C');\r\n\t\t\t$this->Ln();\r\n\t\t\t}\r\n\t\t$yPos=$this->GetY();\r\n\t\tif ($yPos<$this->iBordeSuperior){\r\n\t\t\t$this->SetY($this->iBordeSuperior);\r\n\t\t\t}\r\n\t\t}",
"protected function output_header() {\n include dirname( __FILE__ ) . '/views/html-csv-import-header.php';\n }",
"private function writeHeader()\n {\n $this->write(AvroDataIO::magic());\n $this->datum_writer->writeData(\n AvroDataIO::metadataSchema(),\n $this->metadata,\n $this->encoder\n );\n $this->write($this->sync_marker);\n }",
"public function getHeader();",
"public function getHeader();",
"public function getHeader();",
"public function getHeader() {\n }"
] | [
"0.6983904",
"0.69063276",
"0.678193",
"0.67444533",
"0.6739505",
"0.67330635",
"0.66642505",
"0.6622341",
"0.6617553",
"0.6534072",
"0.64677656",
"0.64366525",
"0.6414801",
"0.63901216",
"0.6290614",
"0.6288626",
"0.62877136",
"0.6283677",
"0.627967",
"0.62146926",
"0.61994517",
"0.61687773",
"0.61515534",
"0.6130472",
"0.61227745",
"0.6117059",
"0.6113648",
"0.608092",
"0.60630065",
"0.6044013",
"0.60388803",
"0.6032422",
"0.6020741",
"0.60131085",
"0.60025096",
"0.5995855",
"0.59871095",
"0.5984648",
"0.597821",
"0.5962423",
"0.59492105",
"0.59440684",
"0.5937537",
"0.59283614",
"0.5928013",
"0.5921343",
"0.59182763",
"0.5917984",
"0.59127283",
"0.59015757",
"0.59007955",
"0.5889608",
"0.58895314",
"0.58757704",
"0.58668923",
"0.5865446",
"0.58606476",
"0.5846834",
"0.58358353",
"0.5835044",
"0.582823",
"0.5818815",
"0.5816003",
"0.58073854",
"0.5803045",
"0.57956564",
"0.5788307",
"0.5786176",
"0.57785624",
"0.57577413",
"0.57511324",
"0.5741812",
"0.5739214",
"0.5731407",
"0.5721445",
"0.5720275",
"0.5716761",
"0.5715534",
"0.57135653",
"0.5698287",
"0.5696818",
"0.5687389",
"0.5686276",
"0.5685628",
"0.567279",
"0.56699234",
"0.56680834",
"0.5667383",
"0.5664391",
"0.566189",
"0.5644602",
"0.5641773",
"0.563583",
"0.56232554",
"0.5621625",
"0.56151074",
"0.55958277",
"0.55958277",
"0.55958277",
"0.55892414"
] | 0.7573624 | 0 |
Console output warning message. (You don't want to see these!) | private function _warning($text){
echo '[# WARNING] ' . $text . PHP_EOL;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function warning()\n {\n return $this->warn(\"You have no commands to run !\");\n }",
"public static function warning()\n {\n static::returnCode(static::CODE_WARNING);\n }",
"public function showWarnings(): void\n {\n $this->executeLog('show warnings');\n }",
"function Print_Warning($message)\r\n{\r\n print (\"<b>\" . $message . \"</b>\\n<br>\");\r\n}",
"function warning($message);",
"public function warning($message) {}",
"public function showWarning($msg)\n {\n print \"\\tWARNING: \" . $msg . \"\\n\";\n }",
"function display_warning_message($message)\r\n {\r\n Display :: warning_message($message);\r\n }",
"public function warning($msg) {\n $this->writeLine($msg, 'warning');\n }",
"function atkwarning($txt)\n{\n\tatkdebug($txt,DEBUG_WARNING);\n}",
"public static function warningHandler()\n {\n }",
"public function warning(string $text);",
"public static function warning() {\n\t\t# Get arguments to this function:\n\t\t$args = func_get_args();\n\n\t\t# Add message to log:\n\t\treturn self::add(LOG_WARNING, $args);\n\t}",
"function warning($message, array $context = array());",
"protected function warning(string $message)\n {\n if (FLOW_SAPITYPE === 'CLI') {\n echo \"\\033[33m\" . $message . \"\\033[0m\" . PHP_EOL;\n }\n }",
"function warning($output)\n{\n dd('<fg=red>'.$output.'</>');\n}",
"function worldlogger_admin_warnings() {\n\tglobal $wpcom_api_key;\n\tif ( !get_option('worldlogger_hash') && !isset($_POST['submit']) ) {\n\t\tfunction worldlogger_warning() {\n\t\t\techo \"\n\t\t\t<div id='worldlogger-warning' class='updated fade'><p><strong>\".__('Worldlogger is almost ready.').\"</strong> \".sprintf('You must <a href=\"%1$s\">enter a Worldlogger API key</a> for it to work.', \"options-general.php?page=worldlogger-options\").\"</p></div>\n\t\t\t\";\n\t\t}\n\t\tadd_action('admin_notices', 'worldlogger_warning');\n\t\treturn;\n\t}\n}",
"protected function warning()\n\t{\n\t\t\\IPS\\Output::i()->output = \\IPS\\Theme::i()->getTemplate( 'store' )->productOptionsChanged(\n\t\t\tnew \\IPS\\Patterns\\ActiveRecordIterator(\n\t\t\t\t\\IPS\\Db::i()->select( '*', 'nexus_packages', \\IPS\\Db::i()->in( 'p_id', explode( ',', \\IPS\\Request::i()->ids ) ) ),\n\t\t\t\t'IPS\\nexus\\Package'\n\t\t\t)\n\t\t);\n\t}",
"function clear_warning_message()\n {\n $this->_warning_message = \"\";\n }",
"public function warn($msg);",
"public static function write_debug_warning(){\n\t\t\tif(str_replace('none','',CFG::get('DEBUG_MODE'))!='' && !Ajax::is_on()){\n\t\t\t\t$ie6h=(stripos(str_replace(' ','',$_SERVER['HTTP_USER_AGENT']),'MSIE6')!==false); // ie6 hotfix\n\t\t\t\t?><div style=\"-moz-border-radius:8px; -webkit-border-radius:8px; border-radius:8px;\n\t\t\t\t\t-moz-box-shadow:0 0 8px #000; -webkit-box-shadow:0 0 8px #000; box-shadow:0 0 8px #000;\n\t\t\t\t\tbackground:#FEE; border:2px solid #F00; font-family:arial; font-size:12px; font-weight:bold;\n\t\t\t\t\tmargin:2px; padding:0 4px; position:fixed; right:4px; text-shadow:0 0 10px #A00; z-index:10;\n\t\t\t\t\ttop:4px; position:<?php echo $ie6h?'absolute':'fixed'; ?>;\">DEBUG MODE</div><?php\n\t\t\t}\n\t\t}",
"function FMWarning($message)\n\t{\n\t\t$trace = \"\";\n\n\t\tforeach ($this->FMDebug as $level) {\n\t\t\t$trace .= \" > \" . $level;\n\t\t}\n\n\t\terror_log (\"freemoviecompiler warning: $trace --> $message\");\n\t}",
"public function warning() {\r\n echo \"<div id='wpGoogleMaps_warning' class='updated fade-ff0000'><p><strong>\"\r\n .__('Google Maps for WordPress is almost ready.').\"</strong> \"\r\n .sprintf(__('You must <a href=\"%1$s\">enter your Google API key</a> for it to work.'), \"plugins.php?page=wpGoogleMaps-config\")\r\n .\"</p></div>\";\r\n }",
"function sf_warn($data, $force = false, $block_header_on_echo = false)\n {\n IOFunctions::out(\n LogLevel::WARN,\n $data,\n $force,\n $block_header_on_echo\n );\n }",
"private static function warn(string $message): void\n {\n echo \"\\033[43m\\033[30m\" . $message . \"\\033[0m\" . PHP_EOL;\n }",
"public function debugWarnings()\n\t{\n\t\t$stmt = $this->_query('SHOW WARNINGS', true);\n\n\t\t$warnings = array();\n\t\twhile ($warning = $stmt->fetch_assoc())\n\t\t{\n\t\t\t$warnings[] = $warning;\n\t\t}\n\n\t\tforeach ($warnings as $warning)\n\t\t{\n\t\t\tatkwarning(\"MYSQL warning '{$warning['Level']}' (Code: {$warning['Code']}): {$warning['Message']}\");\n\t\t}\n\t}",
"public function testWarning(\\unittest\\TestWarning $warning) {\n $this->status= false;\n $this->stats['warned']++;\n $this->writeFailure($warning);\n }",
"protected function warn()\r\n {\r\n// header('Location: '.$this->warning_url);\r\n $this->send_header($this->warning_url);\r\n exit;\r\n }",
"public function testWarningMessage()\n {\n $this->throwWarningException();\n\n // test if code actually gets here\n $this->assertTrue(true);\n }",
"private function printWarn(string $msg, bool $forceOutput = false): void\n {\n $msg = \"\\e[93m>>> [WARN]: {$msg}\\e[0m\";\n\n if ($forceOutput) {\n print $msg . PHP_EOL;\n } else {\n $this->bufferOutput[] = $msg;\n }\n }",
"function get_warning_message()\n {\n return trim($this->_warning_message);\n clear_warning_message();\n }",
"public function warning( $message ) {\n\n \\WP_CLI::warning( $message );\n }",
"function try_warning($count, $s, $e=\"\") {\n print \"> \". $s .\"*** warning ***<br />> Message: \". $e .\"<br />\";\n return ++$count;\n }",
"public function warning()\n {\n return $this->type('warning');\n }",
"protected function showMessageWarning($argMsg) {\n echo(json_encode(array('code' => 0, 'message' => $argMsg)));\n }",
"public function warning($msg) {\n\t\tif ( $this->level <= self::WARNING && !empty($msg) ) {\n\t\t\t$this->writeLog(\"WARN: \".$msg);\n\t\t}\n\t}",
"public function hasWarnings() {}",
"public function warn($message)\n {\n }",
"public function warn()\n {\n $this->appendLog(\n 'warn',\n \\func_get_args(),\n $this->internal->getErrorCaller()\n );\n }",
"public function warnings($options = array()) {\n\t\tif(!is_array($options)) $options = explode(' ', strtolower($options));\n\t\t$options[] = 'warnings';\n\t\treturn $this->messages($options); \n\t}",
"public function allWarning() {\n return $this->warningMsg;\n }",
"public static function reportRunningWarning($warningMessage)\r\n\t{\r\n\t\tif( self::isDebugContext() )\r\n\t\t\techo \"<p><font style='color: #F84; font-size: 15px; font-weight: bold;'>$warningMessage</font></p>\";\r\n\t}",
"protected function outputWarningMessage(string $message)\n {\n $this->outputLine(\"<fg=yellow>$message</>\");\n }",
"public function warning($message, $trance = null)\n {\n $this->write('warning', $message, $trance);\n }",
"protected function renderWarnings() {\n\t\trequire_once(SLS_DIR.\"lib/data/warning/WarningList.class.php\");\n\t\t$objWarningList = new WarningList();\n\t\t$objWarningList->readWarnings();\n\t\t$this->warnings = $objWarningList->warning;\n\t\t\n\t}",
"public static function warning($message, $context);",
"function warning() {\n\t\t\n\t\t\tglobal $blog_id; //get the current blog id\n\t\t\t\n\t\t\tif ( ( is_multisite() && ( $blog_id != 1 || ! current_user_can( 'manage_network_options' ) ) ) || ! current_user_can( 'activate_plugins' ) ) { //only display to network admin if in multisite\n\t\t\t\treturn;\n\t\t\t}\n\t\t\n\t\t\t//if there is a warning to display\n\t\t\tif ( get_option( 'bwps_intrusion_warning' ) == 1 ) {\n\t\t\t\n\t\t\t\tif ( ! function_exists( 'bit51_filecheck_warning' ) ) {\n\t\t\t\n\t\t\t\t\tfunction bit51_filecheck_warning(){\n\t\t\t\t\n\t\t\t\t\t\tglobal $plugname;\n\t\t\t\t\t\tglobal $plughook;\n\t\t\t\t\t\tglobal $plugopts;\n\t\t\t\t\t\t$adminurl = is_multisite() ? admin_url() . 'network/' : admin_url();\n\t\t\t\t\t\n\t\t\t\t\t echo '<div class=\"error\">\n\t\t\t\t <p>' . __( 'Better WP Security has noticed a change to some files in your WordPress installation. Please review the logs to make sure your system has not been compromised.', $plughook ) . '</p> <p><input type=\"button\" class=\"button \" value=\"' . __( 'View Logs', $plughook ) . '\" onclick=\"document.location.href=\\'?bit51_view_logs=yes&_wpnonce=' . wp_create_nonce('bit51-nag') . '\\';\"> <input type=\"button\" class=\"button \" value=\"' . __('Dismiss Warning', $plughook) . '\" onclick=\"document.location.href=\\'' . $adminurl . 'admin.php?bit51_dismiss_warning=yes&_wpnonce=' . wp_create_nonce( 'bit51-nag' ) . '\\';\"></p>\n\t\t\t\t\t </div>';\n\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//put the warning in the right spot\n\t\t\t\tif ( is_multisite() ) {\n\t\t\t\t\tadd_action( 'network_admin_notices', 'bit51_filecheck_warning' ); //register notification\n\t\t\t\t} else {\n\t\t\t\t\tadd_action( 'admin_notices', 'bit51_filecheck_warning' ); //register notification\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//if they've clicked a button hide the notice\n\t\t\tif ( ( isset( $_GET['bit51_view_logs'] ) || isset( $_GET['bit51_dismiss_warning'] ) ) && wp_verify_nonce( $_REQUEST['_wpnonce'], 'bit51-nag' ) ) {\n\t\t\t\t\n\t\t\t\t//Get the options\n\t\t\t\tif ( is_multisite() ) {\n\t\t\t\t\t\t\n\t\t\t\t\tswitch_to_blog( 1 );\n\t\t\t\t\t\t\n\t\t\t\t\tdelete_option( 'bwps_intrusion_warning' );\n\t\t\t\t\t\t\n\t\t\t\t\trestore_current_blog();\n\t\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\tdelete_option( 'bwps_intrusion_warning' );\n\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//take them back to where they started\n\t\t\t\tif ( isset( $_GET['bit51_dismiss_warning'] ) ) {\t\t\t\t\n\t\t\t\t\twp_redirect( $_SERVER['HTTP_REFERER'], 302 );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//take them to the correct logs page\n\t\t\t\tif ( isset( $_GET['bit51_view_logs'] ) ) {\n\t\t\t\t\tif ( is_multisite() ) {\n\t\t\t\t\t\twp_redirect( admin_url() . 'network/admin.php?page=better-wp-security-logs#file-change', 302 );\n\t\t\t\t\t} else {\n\t\t\t\t\t\twp_redirect( admin_url() . 'admin.php?page=better-wp-security-logs#file-change', 302 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}",
"public static function warning($text = null)\n {\n self::message($text, 'warning');\n }",
"public function get_warnings() {\n\n\t\t$output = '';\n\t\t\n\t\t$warnings = $this->warnings;\n\t\t\n\t\tif ($warnings) {\n\t\t\t$items = '';\n\t\t\tforeach ($warnings as $w) {\n\t\t\t\t$items .= '<li>'.$w.'</li>' .\"\\n\";\n\t\t\t}\n\t\t\t$output = '<ul>'.\"\\n\".$items.'</ul>'.\"\\n\";\n\t\t}\n\t\telse {\n\t\t\t$output = __('There were no warnings.', CCTM_TXTDOMAIN);\n\t\t}\n\t\treturn sprintf('<h2>%s</h2><div class=\"summarize-posts-warnings\">%s</div>'\n\t\t\t, __('Warnings', CCTM_TXTDOMAIN)\n\t\t\t, $output);\n\t}",
"public function getWarningMessage() {\n\t\treturn $this->warningMessage;\n\t}",
"protected function setWarningsExist() {}",
"function raiseWarning ($message)\r\n{\r\n\ttrigger_error ($message, E_USER_WARNING);\r\n}",
"function warnings() {\n\t\t$Warnings = array();\n\t\tif (mysqli_warning_count($this->LinkID)) {\n\t\t\t$e = mysqli_get_warnings($this->LinkID);\n\t\t\tdo {\n\t\t\t\tif ($e->errno == 1592) {\n\t\t\t\t\t// 1592: Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$Warnings[] = 'Code ' . $e->errno . ': ' . display_str($e->message);\n\t\t\t} while ($e->next());\n\t\t}\n\t\t$this->Queries[count($this->Queries) - 1][2] = $Warnings;\n\t}",
"public function getWarning()\n {\n return $this->warning;\n }",
"public function getWarning()\n {\n return $this->warning;\n }",
"static function warningHandler($errno, $errstr, $errfile, $errline, $errcontext) {\n\t if(error_reporting() == 0) return;\n\t\tif(self::$send_warnings_to) self::emailError(self::$send_warnings_to, $errno, $errstr, $errfile, $errline, $errcontext, \"Warning\");\n\t\tself::log_error_if_necessary( $errno, $errstr, $errfile, $errline, $errcontext, \"Warning\");\n\n\t\tif(Director::isDev()) {\n\t\t self::showError($errno, $errstr, $errfile, $errline, $errcontext, \"Warning\");\n\t\t}\n\t}",
"function tb_string_swap_warning() {\n\n\tglobal $current_user;\n\n\t// DEBUG: delete_user_meta( $current_user->ID, 'tb-nag-shortcodes-no-framework' );\n\n\tif ( ! get_user_meta( $current_user->ID, 'tb-nag-string-swap-no-framework' ) ) {\n\t\techo '<div class=\"updated\">';\n\t\techo '<p><strong>Theme Blvd String Swap:</strong> '.__( 'You are not using a theme with the Theme Blvd Framework v2+, and so this plugin will not do anything.', 'theme-blvd-string-swap' ).'</p>';\n\t\techo '<p><a href=\"'.tb_string_swap_disable_url('string-swap-no-framework').'\">'.__('Dismiss this notice', 'theme-blvd-string-swap').'</a> | <a href=\"http://www.themeblvd.com\" target=\"_blank\">'.__('Visit ThemeBlvd.com', 'theme-blvd-string-swap').'</a></p>';\n\t\techo '</div>';\n\t}\n}",
"public function getWarningList()\n {\n return [];\n }",
"public function getWarningList()\n {\n return [];\n }",
"public function getWarningList()\n {\n return [];\n }",
"public function getWarningList()\n {\n return [];\n }",
"public function getWarningList()\n {\n return [];\n }",
"public function test_squad_server_admin_warn()\n {\n $this->assertTrue($this->postScriptumServer->adminWarn('Test', 'Hello World!'));\n }",
"function wpc_client_permissions_admin_notice() {\r\n echo \"<div id='permissions-warning' class='error fade'><p><strong>\" . __( 'You do not have permission to access that page.', WPC_CLIENT_TEXT_DOMAIN ) . \"</strong></p></div>\";\r\n }",
"public function warning($message = null, $newlines = 1, $level = Shell::NORMAL) {\n\t\t$this->out('<warning>' . $message . '</warning>', $newlines, $level);\n\t}",
"public function admin_notices() {\n\t\t\t$current_screen = \\get_current_screen();\n\t\t\t$message = __( 'Do not edit products, orders, customers, or comments on staging as they might get overwritten with <b>Download Data</b> or <b>Publish to Live</b>.', 'woocart' );\n\t\t\t$show = array( 'edit-shop_order', 'users', 'edit-comments', 'edit-product' );\n\t\t\tif ( $this->is_staging() && in_array( $current_screen->id, $show ) ) {\n\t\t\t\tprintf(\n\t\t\t\t\t'<div class=\"notice\" style=\"background: #e3d9f0;\n border-radius: 8px;\n border: none;\n padding: 1em;\"><span style=\"background: orange;\n border-radius: 5px;\n color: white;\n padding: 0.3em;\">WARNING</span> <span style=\"line-height: 22px;\n font-size: 1.07em;\">%1$s</span></div>',\n\t\t\t\t\t$message\n\t\t\t\t);\n\t\t\t}\n\t\t}",
"public function getWarning() {\n return $this->warning;\n }",
"public function getWarnings()\n {\n return self::$warnings;\n }",
"public function warning($message)\r\n {\r\n $this->log($message, SF_LOG_WARNING);\r\n }",
"function tep_output_warning($warning) {\n return (tep_image(DIR_WS_ICONS . 'warning.gif', ICON_WARNING) . ' ' . $warning);\n }",
"public function warning($message, array $context = array())\n {\n }",
"public function warning($message, array $context = array())\n {\n }",
"function logWarning (string $msg): void {\n\tlogString('('.$_SERVER['REMOTE_ADDR'].') ('.date('Y-m-d H:i:s').') [Warning] '.$msg);\n}",
"public function test_squad_server_admin_warn()\n {\n $this->assertTrue($this->btwServer->adminWarn('Test', 'Hello World!'));\n }",
"public function show_admin_warning_unwritable() {\n\t\t$unwritable_mess = htmlspecialchars(str_ireplace('Back Up', 'Backup', __(\"The 'Backup Now' button is disabled as your backup directory is not writable (go to the 'Settings' tab and find the relevant option).\", 'updraftplus')));\n\t\t$this->show_admin_warning($unwritable_mess, \"error\");\n\t}",
"function print_warning($val) {\n\n\nreturn \"<font color=\\\"red\\\">$val</font>\";\n}",
"public function showWarning()\n {\n if ($this->warning === null) {\n $this->convertAdditionalInformation();\n }\n return $this->warning;\n }",
"public function warn(string $string): void\n {\n if (!$this->output->getFormatter()->hasStyle('warning')) {\n $style = new OutputFormatterStyle('yellow');\n\n $this->output->getFormatter()->setStyle('warning', $style);\n }\n\n $this->line($string, 'warning');\n }",
"function checkWarnings(){ \n $this->warnings = array();\n if ($this->feedwater->massFlow>0){\n if ($this->outletSteam->phase<>'Gas' and $this->outletSteam->quality<>1){\n $this->warnings[] = \"Outlet Steam Contains Condensate\";\n }\n if ($this->fuelEnergy<0){\n $this->warnings[] = \"Boiler Using Negative Energy\";\n }\n }\n if ($this->feedwater->massFlow<0){\n $this->warnings[] = \"Steam Flow Negative\";\n }\n return count($this->warnings);\n }",
"public function admin_notices() {\n\t\t$user = wp_get_current_user();\n\n\t\t// Return if the provider is not enabled.\n\t\tif ( ! in_array( __CLASS__, Two_Factor_Core::get_enabled_providers_for_user( $user->ID ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return if we are not out of codes.\n\t\tif ( $this->is_available_for_user( $user ) ) {\n\t\t\treturn;\n\t\t}\n\t\t?>\n\t\t<div class=\"error\">\n\t\t\t<p>\n\t\t\t\t<span><?php printf( // WPCS: XSS OK.\n\t\t\t\t\t__( 'Two-Factor: You are out of backup codes and need to <a href=\"%s\">regenerate!</a>', 'it-l10n-ithemes-security-pro' ),\n\t\t\t\t\tesc_url( get_edit_user_link( $user->ID ) . '#two-factor-backup-codes' )\n\t\t\t\t); ?><span>\n\t\t\t</p>\n\t\t</div>\n\t\t<?php\n\t}",
"public function getWarningList() {\n\t\treturn array();\n\t}",
"public static function warning($inMessage) {\n\t\tself::getInstance()->log($inMessage, systemLogLevel::WARNING);\n\t}",
"public function getWarningList() {\n\t\treturn [];\n\t}",
"public function warn(string $message, bool $deprecation = false);",
"public function warning($message)\n {\n $this->message($message, 'warning');\n }",
"public function getWarnings() : array;",
"function usageError($message)\n\t{\n\t\techo \"Error: $message\\n\\n\";\n\t\texit(1);\n\t}",
"public function isWarning()\n {\n return $this->getName() === 'warning';\n }",
"public static function output_markup_warning() {\n\t\tprintf('<p class=\"description\">%s</p>', __('Use \"Insert Markup\" if you don\\'t want to use shortcodes for your EasyAzon links. Any global changes to your link settings will not affect your non shortcode links.'));\n\t}",
"function display_warning_page($message)\r\n {\r\n $this->display_header();\r\n $this->display_warning_message($message);\r\n $this->display_footer();\r\n }",
"public function warning($message)\n {\n $this->log($message, self::WARNING);\n }",
"function append_warning($aWarning)\n {\n $warning = $this->pop_warning();\n $warning .= $aWarning;\n $this->add_warning($warning);\n }",
"function output_error() {\r\n return false;\r\n }",
"public static function PrintInvalidCommand(){\r\n echo \"Invalid command usage. Run phartools -h or phartools ? to show help.\\n\";\r\n }",
"public function setWarning($text = ''){\n if(!empty($text)){\n $this->addVar('WARNING', $text);\n }\n }",
"public static function admin_notice() {\r\n\t\techo '<div class=\"error\">';\r\n\t\techo '<p>' . esc_html( __( 'Your server does not support communication with servers over HTTPS.', 'inf-member' ) ) . '</p>';\r\n\t\techo '</div>';\r\n\t}",
"public function noScriptWarning() {\n\t\t$return = \"<noscript><h4>Sorry, this site currently requires Javascript to be enabled</h4></noscript>\";\n\t}",
"public function warning($message): void\n {\n $this->log(__FUNCTION__, $message);\n }",
"function errorMessageIllegal( $page, $crewid, $expected, $actual ) {\n\techo \"<div class='body'>\";\n\t\techo \"<span class='fontTitle'>Warning!</span><br /><br />\";\n\t\techo \"You have attempted an illegal operation!\";\n\techo \"</div>\";\n}",
"public function displayWarningMessages_postProcess(array &$warnings) {\n $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['hwt_resubmission']);\n $openResubmissions = tx_hwtresubmission_sv1::getOpenResubmissions($GLOBALS[$BE_USER]->user['uid'], $extConf['resubmissionTime']);\n\n if($openResubmissions) {\n $warnings['hwtresubmission'] = '[EXT: hwt_resubmission] Open Resubmissions:<br />';\n foreach($openResubmissions as $value) {\n $warnings['hwtresubmission'] .= '- tt_content[' . $value['uid'] . '] ' . $value['header'] . '<br />';\n }\n $warnings['hwtresubmission'] .= '<a href=\"javascript:top.goToModule(\\'web_list\\',1)\">zum List-Modul</a>';\n }\n\t}"
] | [
"0.7784434",
"0.77052283",
"0.7610558",
"0.7465206",
"0.7375183",
"0.732393",
"0.7212717",
"0.7126498",
"0.70685446",
"0.7015538",
"0.69874",
"0.6972942",
"0.6902763",
"0.6889078",
"0.6865816",
"0.6825296",
"0.6824176",
"0.67983",
"0.6726387",
"0.67246574",
"0.67184603",
"0.6702089",
"0.66965497",
"0.66865164",
"0.6683938",
"0.6676281",
"0.6663516",
"0.6652749",
"0.66485953",
"0.66375124",
"0.66349775",
"0.6617053",
"0.65840936",
"0.65639824",
"0.6554463",
"0.6552799",
"0.6514246",
"0.6513279",
"0.64986795",
"0.64804554",
"0.646577",
"0.642883",
"0.6422097",
"0.63882345",
"0.63488376",
"0.63477623",
"0.63264954",
"0.6324377",
"0.6324241",
"0.63240373",
"0.63190603",
"0.63139135",
"0.6310125",
"0.62973136",
"0.62973136",
"0.62837154",
"0.6273093",
"0.6267208",
"0.6267208",
"0.6267208",
"0.6267208",
"0.6267208",
"0.62599003",
"0.62506455",
"0.62420183",
"0.6235295",
"0.6234409",
"0.62311226",
"0.6226792",
"0.62171626",
"0.61919796",
"0.61919796",
"0.61687076",
"0.61650884",
"0.61625874",
"0.6159641",
"0.61525464",
"0.61443627",
"0.6131304",
"0.6122333",
"0.6121962",
"0.6112468",
"0.61037225",
"0.6100069",
"0.60903734",
"0.6081999",
"0.60686654",
"0.60678816",
"0.60666305",
"0.6064013",
"0.6063728",
"0.60629106",
"0.6061468",
"0.6060046",
"0.6060045",
"0.60458106",
"0.60309964",
"0.6026538",
"0.6026501",
"0.6023371"
] | 0.77359724 | 1 |
Return the Laravel path to the specified folder. | private function path($dir = ''){
return ($dir !== '') ? (path('app') . "$dir/") : path('app');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function folderPath(){\n\t\treturn DATA.static::$folderPrefix.'files/';\n\t}",
"public function getPath()\n {\n return $this->_folder . DIRECTORY_SEPARATOR . $this->_name;\n }",
"public function getPath($folder = '')\n {\n return $this->getConfig('paths.plugins') . $this->getName() . '/' . $folder;\n }",
"function path($path) {\n\treturn $GLOBALS['laravel_paths'][$path];\n}",
"function path($path)\n{\n\treturn $GLOBALS['laravel_paths'][$path];\n}",
"public function getPath(): string\n {\n return $this->directory->getPath();\n }",
"public function getPath()\n {\n return str_replace(\n ['/', '\\\\'],\n Storage::GetSeparator(),\n Storage::GetPath() . '/' . $this->dirname . '/' . $this->basename\n );\n }",
"function dirPath() { return (\"../\"); }",
"public function getPartialRootPath() {}",
"function dirPath () { return (\"../../\"); }",
"function path($path)\n{\n return $GLOBALS['laravel_paths'][$path];\n}",
"public static function get_directory() : string {\r\n\t\treturn Core::get_app_path( self::$directory );\r\n\t}",
"public function dirPath()\n {\n return config('maxolex.config.views').'/'.$this->parser->singular();\n }",
"public function getFullPath();",
"public static function path(){\n return \\Illuminate\\Foundation\\Application::path();\n }",
"protected function getPath () {\n\tglobal $Config;\n\treturn $Config->get('dir_root').'/'.$this->dir.'/'.$this->name;\n }",
"public function path()\n {\n return $this->basePath . DIRECTORY_SEPARATOR . 'app';\n }",
"public function path()\n {\n return $this->basePath . DIRECTORY_SEPARATOR . 'app';\n }",
"public function getFolder()\n\t{\n\t\treturn $this->router->getFolder();\n\t}",
"private function getTemplatesFolderLocation()\n {\n return str_replace('//', '/', APP_DIR . '/') . self::TEMPLATES_DIR;\n }",
"protected function getViewPath()\n {\n $name = str_replace('\\\\', '/', $this->argument('name'));\n\n return collect(explode('/', $name))\n ->map(function ($part) {\n return Str::camel($part);\n })\n ->implode('/');\n }",
"public function path()\n {\n return $this->basePath.DIRECTORY_SEPARATOR.'app';\n }",
"public function path(): string\n {\n return components_path($this->name);\n }",
"public function getFolder()\n {\n return $this->config['folder'] . '/' . basename($this->themeSlug);\n }",
"public function getFolder();",
"public function path() {\n\t\t\treturn rtrim($this->application->configuration([ \"packagemanager\", \"directory\" ]), \"/\") . \"/\" . $this->package_directory;\n\t\t}",
"protected function destinationDir(): string\n {\n return $this->container->get('config')->get('app', 'app_dir') . '/app/' . $this->namespacePath();\n }",
"function dirPath() {return (\"../../../../\"); }",
"public function getPath()\n {\n return rtrim($this->partials['path'], '/').'/';\n }",
"function public_path($path=null)\n\t{\n\t\treturn rtrim(app()->basePath('../public_html/'.$path), '/');\n\t}",
"private static function folders_path(){\n\t\treturn dirname(__DIR__) . '/content/folders.json';\n\t}",
"public function path(): string\n {\n return 'files/' . $this->model->filename();\n }",
"public function getFullPath(): string;",
"protected function getFilesystemPath()\n {\n return dirname($this->path);\n }",
"public function getPath()\n {\n return $this->dirs[0];\n }",
"public function getPath()\n {\n return $this->dirs[0];\n }",
"public function getPath()\n {\n return $this->directory->getRealPath();\n }",
"protected static function packagePath(): string\n {\n return dirname(dirname(__DIR__));\n }",
"protected function getPath(Migration $migration)\n {\n return $this->app->databasePath('migrations' . DIRECTORY_SEPARATOR . $migration->filename() . '.php');\n }",
"public function getRelativePath() {\n $str = str_replace(Storage::disk('public')->url(''), '', $this->url);\n $str = str_replace($this->file_name, '', $str);\n return $str;\n }",
"public function path()\n {\n return $this->basePath.DIRECTORY_SEPARATOR.'lumen'.DIRECTORY_SEPARATOR.'app';\n }",
"public function getPath(): string\n {\n return asset('storage/upload/'.$this->path);\n }",
"public function get_folder() {\n return $this->folder;\n }",
"public function getFolderPath(){}",
"public function getViewPath()\n {\n return dirname(__DIR__);\n }",
"public function getPath() {\n return str_replace(Storage::disk('public')->url(''), '', $this->url);\n }",
"public static function ViewFolder()\n {\n return dirname(dirname(__DIR__)).DIRECTORY_SEPARATOR.Configuration::getApplicationFolder().DIRECTORY_SEPARATOR.'View';\n }",
"public function getFileRootPath(): string\n {\n return str_replace(\n ':',\n '.',\n $this->getDatasetSubmission()->getDataset()->getUdi()\n ) . DIRECTORY_SEPARATOR;\n }",
"public function app_path($path = null);",
"function AppPath(&$path) { \n return $path = storage_path('app/'.$path);\n }",
"public function getFilesDirectoryPath();",
"public function getPartialRootPath()\r\n {\r\n if (empty($this->partialRootPath)) {\r\n $this->partialRootPath = $this->defaultPartialRootPath;\r\n }\r\n return $this->getDirectoryName($this->partialRootPath);\r\n }",
"public function getPath()\n {\n $path = Yii::getAlias('@webroot') .\n DIRECTORY_SEPARATOR . \"uploads\" .\n DIRECTORY_SEPARATOR . $this->folder_uploads .\n DIRECTORY_SEPARATOR . $this->guid;\n\n if (!is_dir($path)) {\n mkdir($path);\n }\n\n return $path;\n }",
"public static function get_folder($path_with_filename) {\n $parts = explode('/', $path_with_filename);\n array_pop($parts);\n return implode('/', $parts);\n }",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function ressourceToPath($path)\n {\n return __DIR__.'/../'.$path;\n }",
"protected function getPackageRootPath(): string\n {\n return getcwd() . '/';\n }",
"public function getRouteRootDir(): string;",
"public function getFullPath($path)\n {\n return config('view.path') . DS . $path . '.' . config('view.extension');\n }",
"public function getDir();",
"public function getFolderPath()\n {\n $path = CONTENT_DIRECTORY_TESTS . $this->getFolderName();\n return $path;\n }",
"public function baseDir() {\n return 'src/public/FlyerPhotos/photos';\n }",
"private function getDir() {\n return sprintf(\"%s/%s/\", app_path(), config('newportal.portlets.namespace'));\n }",
"public function getFullPath()\n {\n $assetstore = $this->get('assetstore');\n\n return $assetstore->getPath().'/'.$this->getPath();\n }",
"public function path(): string;",
"public function path(): string;",
"function app_path($path = '')\n {\n return app('path.app') . ltrim($path, DIRECTORY_SEPARATOR);\n }",
"public function getFolderPath()\n {\n return $this->_folderPath;\n }",
"public function path();",
"public function dir() {\n\t\treturn dirname($this->_path) . '/';\n\t}",
"public static function ApplicationFolder()\n {\n return dirname(dirname(__DIR__)).DIRECTORY_SEPARATOR.Configuration::getApplicationFolder();\n }",
"protected function getConfigFolder(): string\n {\n return realpath($this->getBasePath().DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'config');\n }",
"public static function publicPath(){\n return \\Illuminate\\Foundation\\Application::publicPath();\n }",
"public function path()\n {\n if (in_array($this->object->extension(), ['html', 'twig', 'md'])) {\n return $this->object->getViewPath();\n } else {\n return $this->object->getAssetPath();\n }\n }",
"function base_path($path)\n{\n return __DIR__.'/../'.$path;\n}",
"function fn_get_http_files_dir_path()\n{\n $path = fn_get_rel_dir(fn_get_files_dir_path());\n $path = Registry::get('config.http_location') . '/' . $path;\n\n return $path;\n}",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getDefaultPartialRootPath()\r\n {\r\n return $this->getDirectoryName($this->defaultPartialRootPath);\r\n }",
"protected function getAppPath()\n {\n return __DIR__. '/../../../../app/';\n }",
"public function getPath($name)\n {\n $name = Str::replaceFirst($this->rootNamespace(), '', $name);\n\n return $this->laravel['path'].'/'.str_replace('\\\\', '/', $name).'.php';\n }"
] | [
"0.70826906",
"0.68311024",
"0.67655706",
"0.672554",
"0.66606694",
"0.66476625",
"0.6616487",
"0.65929943",
"0.6575494",
"0.6532611",
"0.65156287",
"0.65153545",
"0.6505148",
"0.6502707",
"0.6459132",
"0.6458075",
"0.6437229",
"0.6437229",
"0.64347744",
"0.6373335",
"0.637223",
"0.63706714",
"0.6349153",
"0.63322985",
"0.63315666",
"0.6330869",
"0.6328287",
"0.6327797",
"0.6311849",
"0.63032293",
"0.6296485",
"0.6278207",
"0.62453634",
"0.6242566",
"0.6236297",
"0.6236297",
"0.6223978",
"0.62236667",
"0.6222565",
"0.6218287",
"0.6212432",
"0.6209218",
"0.620303",
"0.61952263",
"0.61930734",
"0.6175115",
"0.6168189",
"0.6165354",
"0.6162002",
"0.61451817",
"0.6144716",
"0.61437297",
"0.61425775",
"0.6138687",
"0.6134142",
"0.6134142",
"0.6134142",
"0.6134142",
"0.6134142",
"0.6134142",
"0.6134142",
"0.6134142",
"0.61243105",
"0.6114729",
"0.610707",
"0.6095894",
"0.60886705",
"0.6086645",
"0.6086313",
"0.608562",
"0.6074402",
"0.60648173",
"0.60648173",
"0.60578257",
"0.6051676",
"0.60501623",
"0.60411453",
"0.6036994",
"0.60296565",
"0.6026285",
"0.6008815",
"0.6004273",
"0.60023576",
"0.6002293",
"0.6002293",
"0.6002293",
"0.6002293",
"0.6002293",
"0.6002293",
"0.6002293",
"0.6002293",
"0.6002293",
"0.6002293",
"0.6002293",
"0.6002293",
"0.6002293",
"0.6002293",
"0.6001802",
"0.5997182",
"0.5996083"
] | 0.63559127 | 22 |
Write a file to disk. | private function write_file($filePath, $contents, $overwrite = false){
if($overwrite === false && File::exists($filePath)){
_warning('' . $filePath . ' already exists!');
return;
}
File::mkdir(dirname($filePath));
if(File::put($filePath, $contents) === false){
_warning('Something went wrong writing the file ' . $filePath);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function write($filename);",
"public function write($filename);",
"public function writeFile($path, $data);",
"public function write(string $file, string $content): void;",
"public static function write($content, $file)\n {\n file_put_contents($file, $content);\n }",
"abstract public function writeFile( $fileName );",
"public function writeFile($data);",
"protected function writeFileToDisk(): void\n {\n $this->getFile()->move($this->getUploadRootDir(), $this->fileName);\n }",
"private function writeFile($file, $content) {\n\t\t$handle = fopen($file, 'w+');\n\t\tfwrite($handle, $content);\n\t\tfclose($handle);\n\t}",
"public function writeFile($file, $content)\n {\n if (! @file_put_contents($file, $content)) {\n throw new Exception(\"cannot write file: $file\");\n }\n }",
"public static function writeFile($path, $data) {\n self::assertWritableFile($path);\n\n if (@file_put_contents($path, $data) === false) {\n throw new FilesystemException(\n $path,\n pht(\"Failed to write file '%s'.\", $path));\n }\n }",
"public function save($file, $path);",
"public function write($path, $data);",
"function file_write ($filename, $data) {\r\n $fd = fopen($filename, 'w') or die(\"Can't open file $filename for write!\");\r\n fwrite($fd, $data);\r\n fclose($fd);\r\n }",
"public function write($file_path, $file_data)\n {\n // Check if path is specified\n if (empty($file_path)) {\n throw new \\Exception('No file path specified');\n }\n\n // Converts errors to exceptions\n set_error_handler(\n function($error, $message = '', $file = '', $line = 0) use ($file_path) {\n throw new \\Exception(\n 'Failed to write to file at ' . $file_path\n . ': ' . $message\n );\n }, E_WARNING\n );\n\n // Try to write contents to specified path\n try {\n file_put_contents($file_path, $file_data . PHP_EOL, LOCK_EX);\n }\n catch (\\Exception $e) {\n restore_error_handler();\n throw $e;\n }\n\n // Restore previous error handler\n restore_error_handler();\n }",
"public function writeToFile($data){\t\n\t\tfwrite($this->fptr,$data);\n\t}",
"public function write($file, $content, $overwrite = true){\n\t}",
"public function write_file ( $content ) {\r\n\r\n\t}",
"function write_file($my_file,$new_content){\n\treturn file_put_contents($my_file,$new_content);\n}",
"function write($fileName)\n {\n $fd = fopen ($fileName, \"w\");\n fwrite($fd, $this->content);\n fclose ($fd);\n }",
"function writeFile($filepath, $file_contents) {\n $parent = dirname($filepath);\n if (!is_dir($parent)) {\n mkdir($parent, 0777, TRUE);\n }\n if (file_put_contents($filepath, $file_contents) === FALSE) {\n Logger::log(dt('Error while writing to file @file', array('@file' => $filepath)), 'error');\n }\n else {\n Logger::log(dt('Updated file : @file', array('@file' => $filepath)), 'success');\n }\n }",
"public function writeFile($filename)\n {\n $this->file->writePoFile($filename);\n }",
"private function writeFile($path, $content)\n {\n $fp = fopen($path, 'wb');\n fwrite($fp, $content);\n fclose($fp);\n \\chmod($path, 0755);\n }",
"public function file_put_contents($file, $content);",
"public function writeFile($file, $post, $field)\n {\n $adminsession = Mage::getSingleton('adminhtml/session');\n $io = new Varien_Io_File();\n $io->open(array('path' => Mage::getBaseDir()));\n \n if ($io->fileExists($file))\n {\n if ($io->isWriteable($file))\n {\n try\n {\n $io->streamOpen($file);\n $io->streamWrite($post);\n\n } catch(Mage_Core_Exception $e)\n {\n $adminsession->addError($e->getMessage());\n }\n } else {\n \n $adminsession->addError($file.\" is not writable. Change permissions to 644 to use this feature.\");\n \n }\n } else {\n \n $adminsession->addError($file.\" does not exist. The file was not saved.\");\n }\n \n $io->streamClose();\n }",
"public function storeFile($file, $name, $path, $mode = null)\n {\n $contentOrFalseOnFailure = file_get_contents($file);\n file_put_contents($path . \"/\" . $name, $contentOrFalseOnFailure);\n }",
"public function save(IO\\File $file) {\n\t\t\tfile_put_contents($file, $this->render());\n\t\t\t$this->file = $file;\n\t\t}",
"private function writeFile($stub)\n {\n $this->files->put($this->path, $stub);\n }",
"protected function saveFile($file, $data)\n {\n $zp = @gzopen($file, \"w{$this->_compressionLevel}\");\n if (! $zp) {\n $error = error_get_last();\n throw new AutoloaderException_Index_IO(\n \"Could not write to $file: $error[message]\"\n );\n\n }\n chmod($file, 0777);\n $bytes = gzwrite($zp, $data);\n if (! @gzclose($zp)) {\n $error = error_get_last();\n throw new AutoloaderException_Index_IO(\n \"Could not close $file: $error[message]\"\n );\n\n }\n return $bytes;\n }",
"public function write($filename)\n {\n // TODO: Implement write() method.\n }",
"protected function writeFile(string $path, string $content)\n {\n $config = new Autoload();\n $appPath = $config->psr4[APP_NAMESPACE];\n\n $directory = dirname($appPath . $path);\n\n if (! is_dir($directory))\n {\n mkdir($directory);\n }\n\n try\n {\n write_file($appPath . $path, $content);\n }\n catch (\\Exception $e)\n {\n $this->showError($e);\n exit();\n }\n\n $path = str_replace($appPath, '', $path);\n\n CLI::write(CLI::color(' created: ', 'green') . $path);\n }",
"function file_write($filename, $content)\n\t{\n\t\t$handle = @fopen($filename, 'w');\n\t\t$result = @fwrite($handle, $content, strlen($content));\n\t\t@fclose($handle);\n\t\treturn $result;\n\t}",
"protected function writeFile($fileHandle, $content)\n {\n fwrite($fileHandle, $content);\n fclose($fileHandle);\n $this->cleanupTempFile();\n }",
"public function writeFile(string $fileContent, string $filepath)\n {\n $this->get('filesystem')->dumpFile($filepath, $fileContent);\n }",
"function file_put_contents( $file, $text ) {\n\t\t$fp = fopen( $file, \"w\" );\n\t\tfwrite( $fp, $text );\n\t\tfclose( $fp );\n\t}",
"public function createFile(File $file): void;",
"protected function write_file($file, $content) {\n // Generate a temp file that is going to be unique. We'll rename it at the end to the desired file name.\n // in this way we avoid partial writes.\n $path = dirname($file);\n while (true) {\n $tempfile = $path.'/'.uniqid(sesskey().'.', true) . '.temp';\n if (!file_exists($tempfile)) {\n break;\n }\n }\n\n // Open the file with mode=x. This acts to create and open the file for writing only.\n // If the file already exists this will return false.\n // We also force binary.\n $handle = @fopen($tempfile, 'xb+');\n if ($handle === false) {\n // File already exists... lock already exists, return false.\n return false;\n }\n fwrite($handle, $content);\n fflush($handle);\n // Close the handle, we're done.\n fclose($handle);\n\n if (md5_file($tempfile) !== md5($content)) {\n // The md5 of the content of the file must match the md5 of the content given to be written.\n @unlink($tempfile);\n return false;\n }\n\n // Finally rename the temp file to the desired file, returning the true|false result.\n $result = rename($tempfile, $file);\n @chmod($file, $this->cfg->filepermissions);\n if (!$result) {\n // Failed to rename, don't leave files lying around.\n @unlink($tempfile);\n }\n return $result;\n }",
"function save($filePath);",
"public static function write( $file, $content )\n {\n if (!preg_match('/^[a-z0-9_\\-\\.]+$/i', $file)) {\n return;\n }\n \n $filename = self::$logPath .'/'. $file;\n file_put_contents( $filename, $content.\"\\n\", FILE_APPEND );\n }",
"public function write($filename, $content){\n\t\treturn file_put_contents($this->dirname.'/'.$filename, $content);\n\t}",
"function file_write($file, $data, $flags = 0) {\n if (($bytes = file_put_contents($file, $data, $flags)) !== strlen($data)) {\n error('Failed to write ' . spy($data) . ' to ' . spy($file) . '.');\n }\n\n return $bytes;\n}",
"public function write2File($content, $file) {\n\t\tif (empty($content)) { // check to make sure $content isn't empty\n\t\t\tthrow new Exception('Empty content passed from '.$this->className.\n\t\t\t\t'->'.__FUNCTION__.'() line '.__LINE__\n\t\t\t);\n\t\t} elseif (file_exists($file) && filesize($file) != 0) {\n\t\t\tthrow new Exception('File '.$file.' already exists from '.\n\t\t\t\t$this->className.'->'.__FUNCTION__.'() line '.__LINE__\n\t\t\t);\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t$handle = fopen($file, 'w');\n\t\t\t\t$bytes = fwrite($handle, $content);\n\t\t\t\tfclose($handle);\n\t\t\t\t\t\n\t\t\t\tif ($this->verbose) {\n\t\t\t\t\tfwrite(STDOUT, \"Wrote $bytes bytes to $file!\\n\");\n\t\t\t\t} //<-- end if -->\n\t\t\t\t\t\n\t\t\t\treturn TRUE;\n\t\t\t} catch (Exception $e) { \n\t\t\t\tthrow new Exception($e->getMessage().' from '.$this->className\n\t\t\t\t\t.'->'.__FUNCTION__.'() line '.__LINE__\n\t\t\t\t);\n\t\t\t} //<-- end try -->\n\t\t} //<-- end if -->\n\t}",
"protected function write()\n {\n if (!is_dir($this->path)) {\n mkdir($this->path);\n }\n\n file_put_contents($this->file, json_encode([\n 'network' => $this->network,\n 'epoch' => static::$epoch,\n 'iteration' => static::$iteration,\n 'a' => $this->a,\n 'e' => $this->e\n ]));\n }",
"protected function writeFile($filename, $content)\n {\n $filepath = pathinfo($filename, PATHINFO_DIRNAME);\n\n if ( ! $this->createPathIfNeeded($filepath)) {\n return false;\n }\n\n if ( ! is_writable($filepath)) {\n return false;\n }\n\n $tmpFile = tempnam($filepath, 'swap');\n\n if (file_put_contents($tmpFile, $content) !== false) {\n if (@rename($tmpFile, $filename)) {\n @chmod($filename, 0666 & ~umask());\n\n return true;\n }\n\n @unlink($tmpFile);\n }\n\n return false;\n }",
"public function save(string $file, string $content): void\n {\n $this->filesystem->dumpFile($file, $content);\n }",
"public function saveToFile($file)\n {\n \n }",
"public function write($filePath, $content, $option = NULL){\n $dir = $this->directoryOf($filePath);\n if(!file_exists($dir)){\n mkdir($dir, 0777, true);\n }\n\n if(empty($option)){\n file_put_contents($filePath, $content);\n }\n else{\n file_put_contents($filePath, $content, $option);\n }\n }",
"function write_file($file,$content,$mode=\"w\")\n\t\t{\n\t\t\t$fp=@fopen($file,$mode);\n\t\t\tif(!is_resource($fp))\n\t\t\t\treturn false;\n\t\t\tfwrite($fp,$content);\n\t\t\tfclose($fp);\n\t\t\treturn true;\n\t\t}",
"public function setOutputFile($file);",
"public static function writeFile($filename, $content, $lock = false)\n\t{\n\t\tif (!file_exists($filename)) {\n\t\t\tself::createFile($filename);\n\t\t}\n\t\tfile_put_contents($filename, $content, $lock ? LOCK_EX : 0);\n\t}",
"public function writeFile()\n {\n if (!empty($this->fileName)) {\n if (!file_exists($this->destinationPath)) {\n mkdir($this->destinationPath, 0777);\n }\n $file = $this->file();\n $fileHandle = fopen($file, 'w+');\n fwrite($fileHandle, $this->body);\n fclose($fileHandle);\n return $file;\n } else {\n return false;\n }\n }",
"function write($path, $text) {\n $file = fopen($path, 'wb');\n fwrite($file, $text);\n fclose($file);\n}",
"private function write($path, $content)\n {\n file_put_contents($path, $content);\n }",
"public function save($file)\n\t{\n\t\t$f = fopen($file, 'w');\n\t\t$this->convert();\n\t\tstream_copy_to_stream($this->pipes[1], $f);\n\t\tfclose($f);\n\t\t$this->close();\n\t}",
"public function write() {\n\n try {\n $this->open();\n $sessionData = session_encode(); // Returns an encoded string containing the session data.\n $fileHandle = fopen(self::FILEPATH, \"w+\"); // Open the file\n fwrite($fileHandle, $sessionData); // Write the session data to file\n fclose($fileHandle);\n }\n catch(SessionException $e) {\n echo \"Error writing session to file: \" . $e->getMessage();\n }\n }",
"function fileWrite($filename, &$content, $mode) {\n\tif (!$fp = @fopen($filename, $mode)) {\n\t\treturn \"Cannot open file ($filename)\";\n\t}\n\tif (!is_writable($filename)) {\n\t\tif (!chmod($filename, 0666)) {\n\t\t\t return \"Cannot change the mode of file ($filename)\";\n\t\t\t \n\t\t\t \n\t\t};\n\t}\n\tif (file_put_contents($filename, $content) === FALSE) {\n\t\treturn \"Cannot write to file ($filename)\";\n\t\t\n\t}\n\tif (!fclose($fp)) {\n\t\treturn \"Cannot close file ($filename)\";\n\t\t\n\t}\n\t\n\treturn TRUE;\n}",
"public function saveAs($file, $deleteTempFile = true)\n {\n }",
"public function toFile($path, $text = null)\n {\n if (!is_writeable(dirname($path))) {\n throw new Zend_Environment_Exception('Cannot write file to ' . $path);\n }\n \n if ($text === null) {\n $text = $this->toText();\n }\n\n return file_put_contents($path, $text);\n }",
"public function writeFile($path, $content)\n {\n if (!file_exists($path)) {\n if (!is_dir(dirname($path))) {\n mkdir(dirname($path), 0777, true) ?: function () {\n exit();\n };\n }\n\n return file_put_contents($path, $content);\n }\n\n return false;\n }",
"public function write_file($file_path, $file_data) {\n /* Opening the file for writing. */\n $fp = fopen($file_path, \"w+\");\n /* wrinting into file */\n fwrite($fp, serialize($file_data));\n /* closing the file for writing. */\n fclose($fp);\n $error = $this->db->_error_message();\n $error_number = $this->db->_error_number();\n if ($error) {\n $controller = $this->router->fetch_class();\n $method = $this->router->fetch_method();\n $error_details = array(\n 'error_name' => $error,\n 'error_number' => $error_number,\n 'model_name' => 'Common_Model',\n 'model_method_name' => 'write_file',\n 'controller_name' => $controller,\n 'controller_method_name' => $method\n );\n $this->common_model->errorSendEmail($error_details);\n redirect(base_url() . 'page-not-found'); //create this route\n }\n }",
"public function overWriteFile($file, $text){\r\n\t\t$fileWrite = fopen($file, \"w\");\r\n\t\tfile_put_contents($file, $text, FILE_APPEND);\r\n\t\tfclose($fileWrite);\r\n\t}",
"function writeToFile($filename){\n\t\tif(!file_exists($filename)){\n\t\t\t// File is created with class Files in order to maintain file permissions\n\t\t\tFiles::TouchFile($filename,$err,$err_str);\n\t\t\tif($err){\n\t\t\t\tthrow new Exception(get_class($this).\": cannot do touch on $filename ($err_msg)\");\n\t\t\t}\n\t\t}\n\n\t\t$total_length = $this->getLength();\n\t\t$chunk_size = 1024 * 1024; // 1MB\n\t\t$bytes_written = 0;\n\n\t\tif($total_length===0){\n\t\t\tFiles::EmptyFile($filename,$err,$err_str);\n\t\t\tif($err){\n\t\t\t\tthrow new Exception(get_class($this).\": cannot empty file $filename ($err_msg)\");\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t$f = fopen($filename,\"w\");\n\t\tif($f === false){\n\t\t\tthrow new Exception(get_class($this).\": cannot open $filename for writing\");\n\t\t}\n\t\twhile($bytes_written < $total_length){\n\t\t\t$length = min($chunk_size,$total_length - $bytes_written);\n\t\t\t$chunk = $this->substr($bytes_written,$length);\n\t\t\t$_bytes = fwrite($f,$chunk,$length);\n\t\t\tif($_bytes !== $length){\n\t\t\t\tthrow new Exception(get_class($this).\": cannot write to $filename\");\n\t\t\t}\n\t\t\t$bytes_written += $length;\n\t\t}\n\t\tfclose($f);\n\t}",
"public static function create_file($path,$data) {\n\t\t\t\t\n\t\t// Open Empty File\n\t\tif(!$file = fopen($path,\"w+\")) {\n\t\t\tdie(\"Disk::create_file: Cant open File: \".$path);\n\t\t}\n\t\t\n\t\t// Set Content\n\t\tif(fwrite($file,$data) === false) {\n\t\t\tdie(\"Disk::create_file: Cant write to File: \".$path);\n\t\t}\n\t\t\n\t\t// Close\n\t\tfclose($file);\n\t}",
"public function write($path, $content)\n {\n return FileHelper::write($path, $content);\n }",
"public static function write ($path, $binary = true) {\n\t\tif ($binary === null) {\n\t\t\t$binary = true;\n\t\t}\n\t\treturn new FileOutput(\\fopen($path, ($binary ? \"wb\" : \"w\")));\n\t}",
"private function saveFile($filename, $contents, $compress = true)\n\t{\n\t\t$path = $this->settings->outdir . $filename;\n\n\t\t$file = fopen($path, 'w+');\n\t\tif (!$file) {\n\t\t\tthrow new \\Exception('Unable to open output file for writing: ' . $path);\n\t\t}\n\t\tfwrite($file, $contents);\n\t\tfclose($file);\n\n\t\tif ($compress) {\n\t\t\t$this->compress($path);\n\t\t}\n\t}",
"public function write($path, $data) {\n $basepath = dirname($path);\n if (!is_dir($basepath)) {\n if (mkdir($basepath, 0777, true) === FALSE) {\n throw new \\Exception(\"Failed to create base directory [{$basepath}] for file write.\");\n }\n }\n return file_put_contents($path, $data);\n }",
"function write_file($opt, $contents)\n{\n if (is_writable($opt)) \n {\n if (!$open = fopen($opt, \"w\")) \n {\n exit_program(\"Cannot write to file\\n\", code_error::error_write_file);\n }\n }\n else \n {\n $open = fopen($opt, \"x\");\n }\n fwrite($open, $contents);\n fclose($open);\n return;\n\n}",
"private static function writeCacheFile($file, $content)\n {\n $dir = dirname($file);\n if (!is_writable($dir)) {\n throw new \\RuntimeException(sprintf('Cache directory \"%s\" is not writable.', $dir));\n }\n\n $tmpFile = tempnam($dir, basename($file));\n\n if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) {\n @chmod($file, 0666 & ~umask());\n\n return;\n }\n\n throw new \\RuntimeException(sprintf('Failed to write cache file \"%s\".', $file));\n }",
"public function save($filename) {\r\n file_put_contents($filename, $this->contents);\r\n }",
"public function save(array $data, string $file): void\n {\n if (\\file_put_contents($file, $this->getAdapter($file)->dump($data)) === false) {\n throw new Nette\\IOException(\"Cannot write file '$file'.\");\n }\n }",
"public function writeFile($file, $arr) {\n\t\t$contents = $this->write($arr);\n\t\t$fh = fopen($file, 'w');\n\t\tfwrite($fh, $contents);\n\t\tfclose($fh);\n\t}",
"public function save()\n {\n if ($this->createDirectoryStructure($this->getPath())) {\n $content = $this->generateContents();\n file_put_contents($this->getPathname(), $content);\n }\n }",
"function writeFile($res,$loc){\n $f = fopen($loc,'r+');\n fwrite($f,$res);\n ftruncate($f,strlen($res));\n fclose($f);\n}",
"public static function writeToFile($file, $content)\n {\n $return = false;\n \n $isDir = self::createDirectory(dirname($file));\n if ($isDir) $return = file_put_contents($file, $content, FILE_APPEND|LOCK_EX);\n \n return (bool) $return;\n }",
"public function write($file = '', $data = '', $replace = false, $append = false, $truncate = false)\n {\n if ($append === true) {\n $this->append($file, $data, $replace, $append, $truncate);\n return;\n }\n\n if ($truncate === true) {\n $this->truncate($file, $data, $replace, $append, $truncate);\n return;\n }\n\n if ($this->exists === false) {\n\n } elseif ($this->is_file === true || $this->is_directory === true) {\n\n } else {\n throw new FilesystemException\n ('Ftp Filesystem Write: must be directory or file: '\n . $this->path . '/' . $file);\n }\n\n if (trim($data) == '' || strlen($data) == 0) {\n if ($this->is_file === true) {\n\n throw new FilesystemException\n ('Ftp Filesystem: attempting to write no data to file: '\n . $this->path . '/' . $file);\n }\n }\n\n if (trim($data) == '' || strlen($data) == 0) {\n if ($file == '') {\n throw new FilesystemException\n ('Ftp Filesystem: attempting to write no data to file: '\n . $this->path . '/' . $file);\n\n } else {\n $this->createDirectory($this->path . '/' . $file);\n\n return;\n }\n }\n\n if (file_exists($this->path)) {\n } else {\n $this->createDirectory($this->path);\n }\n\n if ($this->isWriteable($this->path . '/' . $file) === false) {\n throw new FilesystemException\n ('Ftp Filesystem: file is not writable: ' . $this->path . '/' . $file);\n }\n\n if (file_exists($this->path . '/' . $file)) {\n\n if ($replace === false) {\n throw new FilesystemException\n ('Ftp Filesystem: attempting to write to existing file: '\n . $this->path . '/' . $file);\n }\n\n \\unlink($this->path . '/' . $file);\n }\n\n try {\n \\file_put_contents($this->path . '/' . $file, $data);\n\n } catch (\\Exception $e) {\n\n throw new NotFoundException\n ('Ftp Filesystem: error writing file ' . $this->path . '/' . $file);\n }\n\n return;\n }",
"public function writeCompressedFile($compressedFilepath, $filepath): void\n {\n $filePointer = fopen($compressedFilepath, 'w');\n fwrite($filePointer, gzencode(file_get_contents($filepath), 9));\n fclose($filePointer);\n }",
"function atkWriteToFile($text, $file=\"\")\n{\n\t$fp = @fopen($file, \"a\");\n\tif ($fp)\n\t{\n\t\tfwrite($fp, $text.\"\\n\");\n\t\tfclose($fp);\n\t}\n}",
"public function writeFile($file = null, $content = null)\n\t{\n\t\t$path = $this->_root . DIRECTORY_SEPARATOR . $file;\n\t\treturn strlen($content) && file_put_contents($path, $content) > 0;\n\t}",
"public function saveAs(string $path): void;",
"protected static function _doWrite( $file, $txt ){\n\t\t@file_put_contents( $file, \"$txt\\n\", FILE_APPEND );\n\t}",
"public function saveToFile($file)\n {\n $data = '<?php return '.var_export($this->all(), true).';';\n\n file_put_contents($file, $data);\n }",
"private function writeToFilesystem($targetFile, $output, $fileType)\n {\n $this->logger->notice('Writing {type} PageView file: {file}', [\n 'type' => $fileType,\n 'file' => $targetFile,\n ]);\n $this->folder->writeFile($targetFile, $output);\n }",
"public function write(EnvFileInterface $file);",
"public function save($filename, $charset = null)\n {\n $data = $this->getData();\n\n /*\n if ($charset === null) {\n $charset = $this->options['charset'];\n }\n\n */\n // UTF-8 : file_put_contents(\"file.txt\", \"\\xEF\\xBB\\xBF\" . $data);\n\n /*\n\n $data = file_get_contents($npath);\n $data = mb_convert_encoding($data, 'UTF-8', 'OLD-ENCODING');\n file_put_contents('tempfolder/'.$a, $data);\n\n Or alternatively, with PHP's stream filters:\n\n $fd = fopen($file, 'r');\n stream_filter_append($fd, 'convert.iconv.UTF-8/OLD-ENCODING');\n stream_copy_to_stream($fd, fopen($output, 'w'));\n *\n * mb_convert_encoding($data, 'UTF-8', 'auto');\n * mb_convert_encoding($data, 'UTF-8', mb_detect_encoding($data));\n */\n\n $ret = file_put_contents($filename, $data);\n if (!$ret) {\n throw new \\Exception(\"Filename $filename cannot be written\");\n }\n }",
"public function write($data, $filename = '', $uploadDir = '');",
"public function write($file, $message)\n {\n // TODO get $config-values from a config class and delete global\n global $config;\n if (!$this->handle[$file]) {\n $this->handle[$file] = $this->_getFileHandle($file);\n }\n $message = strip_tags($message);\n // we don't need linebreaks in the log\n $search = array(\"\\n\",\"\\r\");\n $replace = array ('','');\n $message = str_replace($search, $replace, $message);\n $logMessage = date('d.m.Y H:i:s') . ' '. $message . \"\\n\";\n $_SESSION['log']['actions'][] = $logMessage;\n $filename = $this->getLogfile($file);\n if (@filesize($filename) > $config['log_maxsize']) {\n Log::delete($file);\n }\n //save to log file\n if ($_SESSION['config']['logcompression'] == 1) {\n $res = @gzwrite($this->handle[$file], $logMessage);\n } else {\n $res = @fwrite($this->handle[$file], $logMessage);\n }\n return $res;\n }",
"public function writeFile()\n {\n $this->eof();\n\n return parent::writeFile();\n }",
"public static function saveToFile($path, $data)\n {\n $content = self::encodeContents($data);\n file_put_contents($path, $content);\n }",
"public static function toFile(string $filename): void\n {\n file_put_contents($filename, self::$csv);\n }",
"public function write($text) {\n return file_put_contents($this->getPath(), $text);\n }",
"function write($data) {\n if (!@fwrite($this->_handler, $data, strlen($data))) {\n \tFire_Error::throwError(sprintf('Failed to write %s data to %s file.',\n \t $data,\n \t $this->_file\n \t ), __FILE__, __LINE__\n \t);\n }\n }",
"public function write($message) {\n if (!is_null($this->handle)) {\n if (fwrite($this->handle, $message) === false) {\n throw new \\RuntimeException('Can`t write to file. Check permissions.');\n }\n }\n }",
"public function saveFile($file, $path)\n\t\t{\n\t\t\treturn Storage::disk('public')->put($path, $file);\n\t\t}",
"public function write()\n\t{\n\t\t$source = $this->compile();\n\n\t\t// file location\n\t\t$file = $this->template->getEnvironment()->getCache() . '/';\n\t\t$file .= $this->template->getEnvironment()->getCacheFilename($this->filename);\n\n\t\t// attempt to create the directory if needed\n\t\tif(!is_dir(dirname($file)))\n\t\t{\n\t\t\tmkdir(dirname($file), 0777, true);\n\t\t}\n\n\t\t// write to tempfile and rename\n\t\t$tmpFile = tempnam(dirname($file), basename($file));\n\t\tif(@file_put_contents($tmpFile, $source) !== false)\n\t\t{\n\t\t\tif(@rename($tmpFile, $file))\n\t\t\t{\n\t\t\t\tchmod($file, 0644);\n\t\t\t}\n\t\t}\n\t}",
"function file_save_contents($filename, $contents, $append=true){\n\t$method = ($append) ? 'a' : 'w';\n\t$fp = fopen($filename, $method);\n\tfwrite($fp, $contents);\n\tfclose($fp);\n}",
"public function reportOutputFile(File $file): void;",
"public static function write($file, $content, $seperator = CRLF)\n\t{\n\t\t$info = self::getInfo($file);\n\t\tif (!$info->exists)\n\t\t{\n\t\t\tthrow new \\Exception ('File does not exist.');\n\t\t}\n\t\tif (!$info->writable)\n\t\t{\n\t\t\tthrow new \\Exception ('File is not writeable');\n\t\t}\n\t\tif (!$info->isfile)\n\t\t{\n\t\t\tthrow new \\Exception ('Can only write to Files, not Directories');\n\t\t}\n\t\tif (is_array($content))\n\t\t{\n\t\t\timplode($seperator, $content);\n\t\t}\n\t\t$handle = fopen($file,'w+');\n\t\tfwrite($handle, $content);\n\t\tfclose($handle);\n\t\treturn true;\n\t}",
"private function writeToFile($message)\n {\n $this->directory->writeFile($this->logFile, $message, 'a+');\n }",
"protected function writefile($file){\n if(!is_writable($this->cache)){\n throw new \\RuntimeException(\"$this->cache no is writable dir\");\n }\n $text = \"<?php\\nreturn \".var_export($this->_conf[$file], TRUE).\";\\n?>\";\n return file_put_contents($this->cacheName($file), $text);\n }"
] | [
"0.71153945",
"0.71153945",
"0.69484586",
"0.66692567",
"0.6654563",
"0.66483176",
"0.6641021",
"0.65406966",
"0.6497568",
"0.6494745",
"0.64713347",
"0.6443511",
"0.6376101",
"0.63478756",
"0.63253325",
"0.6251404",
"0.61443347",
"0.6133612",
"0.6080398",
"0.6070722",
"0.604219",
"0.60377216",
"0.60245544",
"0.5998721",
"0.5998297",
"0.59884626",
"0.59880567",
"0.59860814",
"0.59452975",
"0.59385735",
"0.5925655",
"0.5923217",
"0.5911094",
"0.58896214",
"0.58869106",
"0.5884907",
"0.588205",
"0.5853787",
"0.58480924",
"0.584278",
"0.5823522",
"0.5784644",
"0.5763596",
"0.5763587",
"0.57516503",
"0.5746929",
"0.57450914",
"0.5736848",
"0.572869",
"0.5698085",
"0.5693498",
"0.567125",
"0.5654925",
"0.5647353",
"0.563204",
"0.5618571",
"0.56133235",
"0.5608464",
"0.5584866",
"0.5583687",
"0.55828774",
"0.55535257",
"0.55505586",
"0.55483216",
"0.5543781",
"0.5537989",
"0.55354303",
"0.55321807",
"0.5503871",
"0.5494623",
"0.54918146",
"0.5476157",
"0.5447649",
"0.54394776",
"0.543564",
"0.5416237",
"0.5410505",
"0.54069793",
"0.5398613",
"0.5397742",
"0.5389759",
"0.53882",
"0.53706276",
"0.53703123",
"0.53585714",
"0.5351062",
"0.534693",
"0.5342254",
"0.5336184",
"0.53165936",
"0.53138214",
"0.5308607",
"0.53078926",
"0.53062105",
"0.5304187",
"0.530028",
"0.52736807",
"0.5266379",
"0.5262059",
"0.5250546"
] | 0.6332469 | 14 |
Make a grid builder. | protected function grid()
{
$grid = new Grid(new Community);
$grid->column('id', __('Id'));
$grid->column('permalink', __('Permalink'));
$grid->column('eyecatch_path', __('Eyecatch path'));
$grid->column('name', __('Name'));
$grid->column('pref', __('Pref'));
$grid->column('information', __('Information'));
$grid->column('image1_path', __('Image1 path'));
$grid->column('image2_path', __('Image2 path'));
$grid->column('image3_path', __('Image3 path'));
$grid->column('video1_link', __('Video1 link'));
$grid->column('video2_link', __('Video2 link'));
$grid->column('video3_link', __('Video3 link'));
$grid->column('calendar', __('calendar'));
$grid->column('message_image_path', __('Message image path'));
$grid->column('message', __('Message'));
$grid->column('contact', __('Contact'));
$grid->column('facebook_link', __('Facebook link'));
$grid->column('instagram_link', __('Instagram link'));
$grid->column('website_link', __('Website link'));
$grid->column('created_at', __('Created at'));
$grid->column('updated_at', __('Updated at'));
return $grid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function grid()\n {\n $grid = new Grid(new Formulario());\n\n $grid->disableExport();\n\n $grid->column('name', __('Nombre'));\n $grid->column('description', __('Descripción'));\n $grid->column('go_to_formulario', 'Continuar a formulario')->display(function ($formId) {\n if ($formId) {\n $form = Formulario::find($formId);\n return \"<span>{$form['name']}</span>\";\n }\n });\n\n $grid->model()->orderBy('id', 'asc');\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Direction());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __(trans('hhx.name')));\n $grid->column('intro', __(trans('hhx.intro')));\n $grid->column('Img', __(trans('hhx.img')))->image();\n $grid->column('status', __(trans('hhx.status')))->using(config('hhx.status'));\n $grid->column('order_num', __(trans('hhx.order_num')));\n $grid->column('all_num', __(trans('hhx.all_num')));\n $grid->column('this_year', __(trans('hhx.this_year')));\n $grid->column('stock', __(trans('hhx.stock')));\n $grid->column('created_at', __(trans('hhx.created_at')));\n $grid->column('updated_at', __(trans('hhx.updated_at')));\n\n return $grid;\n }",
"public function getGridBuilder($name);",
"protected function grid()\n {\n $grid = new Grid(new Good);\n $grid->column('id', __('Id'))->sortable();\n $grid->column('name', __('名称'));\n $grid->column('unit', __('单位'));\n //$grid->column('list_img', __('商品图片'))->image()->width(10);\n $grid->column('amount', __('价格'));\n $grid->column('created_at', __('创建时间'));\n $grid->disableExport();\n $grid->disableRowSelector();\n $grid->disableFilter();\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Activity());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('image', __('Image'));\n $grid->column('user_roles', __('User roles'));\n $grid->column('intro', __('Intro'));\n $grid->column('details', __('Details'));\n $grid->column('start_at', __('Start at'));\n $grid->column('end_at', __('End at'));\n $grid->column('created_at', __('Created at'));\n $grid->column('location', __('Location'));\n $grid->column('fee', __('Fee'));\n $grid->column('involves', __('Involves'));\n $grid->column('involves_min', __('Involves min'));\n $grid->column('involves_max', __('Involves max'));\n $grid->column('status', __('Status'));\n $grid->column('organizers', __('Organizers'));\n $grid->column('views', __('Views'));\n $grid->column('collectors_num', __('Collectors num'));\n $grid->column('is_stick', __('Is stick'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new NewEnergy());\n\n $grid->column('user_id', __('用户'));\n $grid->column('car_id', __('车辆ID'));\n $grid->column('start_mileage', __('开始里程'));\n $grid->column('end_mileage', __('结束里程'));\n $grid->column('mileage', __('里程'));\n $grid->column('type', __('车辆类型'));\n $grid->column('status', __('状态'));\n $grid->column('remark', __('备注'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new MachinesStyle());\n\n $grid->model()->latest();\n \n $grid->column('id', __('索引'))->sortable();\n\n $grid->column('style_name', __('型号名称'))->help('机具的型号名称');\n\n $grid->column('machines_fact.factory_name', __('所属厂商'))->help('机具型号所属的厂商');\n\n // $grid->column('machines_fact.machines_types.name', __('所属类型'))->help('机具型号所属的类型');\n\n $grid->column('created_at', __('创建时间'))->date('Y-m-d H:i:s')->help('机具型号的创建时间');\n\n $grid->column('updated_at', __('修改时间'))->date('Y-m-d H:i:s')->help('机具型号的最后修改时间');\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Enseignant());\n\n $grid->column('id', __('Id'));\n $grid->column('matricule', __('Matricule'));\n $grid->column('nom', __('Nom'));\n $grid->column('postnom', __('Postnom'));\n $grid->column('prenom', __('Prenom'));\n $grid->column('sexe', __('Sexe'));\n $grid->column('grade', __('Grade'));\n $grid->column('fonction', __('Fonction'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new LotteryCode());\n $grid->model()->orderBy('prizes_time', 'desc');\n $grid->id('Id');\n $grid->code('抽奖码');\n $grid->batch_num('批次号');\n $grid->prizes_name('奖品');\n $grid->valid_period('有效期');\n $grid->prizes_time('抽奖时间');\n $grid->award_status('发奖状态')->editable('select', [0 => '未发放', 1 => '已发放']);\n $grid->disableCreateButton();\n $grid->disableActions();\n $grid->filter(function($filter){\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n // 在这里添加字段过滤器\n $filter->like('code', '抽奖码');\n $filter->like('batch_num', '批次号');\n $filter->between('prizes_time', '抽奖时间')->datetime();\n });\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Boarding());\n\n $grid->column('id', __('Id'));\n $grid->column('pet.name', __('Pet Name'));\n $grid->column('reservation.date', __('Reservation Date'));\n $grid->column('cage_id', __('Cage Number'));\n $grid->column('end_date', __('End date'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n $grid->filter(function($filter){\n\n $filter->disableIdFilter();\n $filter->like('pet.name', 'Pet Name');\n \n });\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Engine());\n\n $grid->column('id', __('#'));\n $grid->column('power_station_id', __('Power station'))\n ->display(function ($userId) {\n $u = PowerStation::find($userId);\n if (!$u)\n return \"-\";\n return $u->name;\n })\n ->sortable();\n $grid->column('name', __('Tank Name'));\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new gameLog());\n\n $grid->column('onlyId', ___('OnlyId'));\n $grid->column('bigBlindIndex', ___('BigBlindIndex'));\n $grid->column('gameNums', ___('GameNums'));\n $grid->column('smallBlindIndex', ___('SmallBlindIndex'));\n $grid->column('tableCards', ___('TableCards'));\n $grid->column('tableId', ___('TableId'));\n $grid->column('tableSeat1Str1', ___('TableSeat1Str1'));\n $grid->column('tableSeat1Str2', ___('TableSeat1Str2'));\n $grid->column('tableSeat1Str3', ___('TableSeat1Str3'));\n $grid->column('tableSeat1Str4', ___('TableSeat1Str4'));\n $grid->column('tableSeat1Str5', ___('TableSeat1Str5'));\n $grid->column('tableSeat1Str6', ___('TableSeat1Str6'));\n $grid->column('tableSeat1Str7', ___('TableSeat1Str7'));\n $grid->column('time', ___('Time'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Work);\n\n $grid->id('Id')->sortable();;\n $grid->name(trans('Название'))->sortable();;\n $grid->description(trans('Описание'))->sortable();;\n $grid->order_id(trans('Порядок'))->sortable();;\n\n $grid->paginate(20);\n\n $grid->filter(function($filter){\n $filter->disableIdFilter();\n $filter->like('name', trans('Название'));\n });\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Cate());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('link', __('Link'));\n $grid->column('thumb', __('Thumb'));\n $grid->column('status', __('Status'));\n $grid->column('sort', __('Sort'));\n $grid->column('createtime', __('Createtime'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new BrandCooperation);\n\n $grid->sort('排序')->editable()->sortable();\n $grid->name('品牌名称');\n $grid->is_show('是否显示')->editable('select', [1 => '显示', 0 => '隐藏']);\n $grid->created_at('添加时间')->sortable();\n\n// $grid->actions(function ($actions) {\n// $actions->disableView(); // 禁用查看\n// });\n\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n // 查询\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n $filter->like('name', '品牌名称');\n $filter->equal('is_show', '显隐')->radio([1 => '显示', 0 => '隐藏']);\n });\n\n return $grid;\n }",
"public function buildGrid() {\n // Processing Grids\n if ($this->getContext('container.grids')) {\n $grids = new VTCore_Bootstrap_Grid_Column($this->getContext('container.grids'));\n $this->addClass($grids->getClass(), 'grids');\n }\n\n return $this;\n }",
"protected function grid()\n {\n $grid = new Grid(new Category);\n\n $grid->id('ID');\n $grid->name('Название');\n //$grid->intro_img('Превью');\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Activity);\n\n $grid->id('Id');\n $grid->log_name('Log name');\n $grid->description('Description');\n $grid->subject_id('Subject id');\n $grid->subject_type('Subject type');\n $grid->causer_id('Causer id');\n $grid->causer_type('Causer type');\n $grid->properties('Properties');\n $grid->created_at('Created at');\n $grid->updated_at('Updated at');\n\n $grid->disableCreateButton();\n\n $grid->actions(function ($actions) {\n $actions->disableEdit();\n $actions->disableView();\n });\n\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n\n $filter->between('created_at', '创建时间')->datetime();\n });\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Banner);\n\n $grid->id('Id');\n $grid->title('Title');\n $grid->image('Image')->display(function($image) {\n return '<img width=\"30\" src=\"' . (env('APP_URL') . '/storage/' . ($image ?: 'images/default.png')) . '\"\"/>';\n });\n $grid->status('Status');\n $grid->created_at('Created at');\n $grid->updated_at('Updated at');\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new $this->currentModel);\n\n $grid->id('ID')->sortable();\n\n $grid->company_id('公司名称')->display(function ($company_id) {\n $company = Company::find($company_id);\n if ($company) {\n return $company->company_name;\n }\n return $company_id;\n });\n $grid->project_name('项目名称')->sortable();\n $grid->link_url('项目链接');\n $grid->display('公开度')->display(function ($display) {\n return $display == 0 ? '公开' : '私密';\n });\n $grid->created_at('添加时间')->sortable();\n\n return $grid;\n }",
"protected function constructGrid()\n {\n // jquery script for loading first page of grid\n $table = \"\n <script type=\\\"text/javascript\\\">\n // load first page\n WschangeModelPagination(\n '$this->_id',\n '$this->_action',\n '$this->_modelName',\n '$this->noDataText',\n $this->itemsPerPage,\n $this->showEdit,\n '$this->_order',\n '$this->_formId',\n 0,\n '$this->_id'+'_0',\n '$this->_edit_action',\n '$this->_delete_action'\n );\n </script>\n \";\n\n // container for edit dialog\n if ($this->showEdit) {\n $table .= '<div class=\"uk-modal\" id=\"'.$this->_formId.'\"></div>';\n $table .= '<div class=\"uk-modal\" id=\"'.$this->_formId.'_new\"></div>';\n }\n\n // title\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-small-1-1 uk-width-medium-1-1\">';\n $table .= '<h1>'.$this->_model->metaName.'</h1>';\n $table .= '</div>';\n $table .= '</div>';\n\n // add and search controls\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-small-1-1 uk-width-medium-1-2\">';\n $table .= '<form class=\"uk-form uk-form-horizontal\">';\n $table .= '<fieldset data-uk-margin>';\n // new item button\n if ($this->showEdit) {\n $table .= '<button class=\"uk-button uk-button-success\"'\n .' data-uk-modal=\"{target:\\'#'.$this->_formId\n .'_new\\', center:true}\"'\n .' id=\"btn_create_'.$this->_id.'\"'\n .' type=\"button\" onclick=\"WseditModelID('\n .'\\''.$this->_formId.'_new\\', '\n .'\\''.$this->_modelName.'\\', '\n .'0, \\''.$this->_edit_action.'\\')\">';\n $table .= '<i class=\"uk-icon-plus\"></i>';\n $table .= '</button>';\n }\n // search control\n $table .= '<input';\n $table .= ' type=\"text\" id=\"search_'.$this->_id.'\"';\n $table .= '/>';\n $table .= '<button class=\"uk-button\"'\n .' id=\"btn_search_'.$this->_id\n .'\" type=\"button\" onclick=\"WschangeModelPagination('\n .'\\''.$this->_id.'\\', '\n .'\\''.$this->_action.'\\', '\n .'\\''.$this->_modelName.'\\', '\n .'\\''.$this->noDataText.'\\', '\n .$this->itemsPerPage.', '\n .$this->showEdit.', '\n .'\\''.$this->_order.'\\', '\n .'\\''.$this->_formId.'\\', '\n .'0, \\''.$this->_id.'\\'+\\'_0\\', '\n .'\\''.$this->_edit_action.'\\', '\n .'\\''.$this->_delete_action.'\\')\">';\n $table .= '<i class=\"uk-icon-search\"></i>';\n $table .= '</button>';\n\n $table .= '</fieldset>';\n $table .= '</form>';\n $table .= '</div>';\n $table .= '</div>';\n\n // Grid View table\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-1-1\">';\n $table .= '<div class=\"uk-overflow-container\">';\n $table .= '<table class=\"uk-table uk-table-hover uk-table-striped\">';\n $table .= '<thead>';\n $table .= '<tr>';\n foreach ($this->_model->columns as $column) {\n if (!in_array($column, $this->_model->hiddenColumns)) {\n if (isset($this->_model->columnHeaders[$column])) {\n $table .= '<th>'\n .$this->_model->columnHeaders[$column];\n $table .= '</th>';\n } else {\n $table .= '<th>'.$column.'</th>';\n }\n }\n }\n if ($this->showEdit) {\n $table .= '<th></th>';\n }\n $table .= '</tr>';\n $table .= '</thead>';\n\n // container of table data loaded from AJAX request\n $table .= '<tbody id=\"'.$this->_id.'\"></tbody>';\n\n // end of grid table\n $table .= '</table>';\n $table .= '</div>';\n $table .= '</div>';\n $table .= '</div>';\n\n // get number ow rows from query so that we can make pager\n $db = new WsDatabase();\n $countQuery = 'SELECT COUNT(*) AS nrows FROM '.$this->_model->tableName;\n $result = $db->query($countQuery);\n $this->nRows = intval($result[0]['nrows']);\n $db->close();\n\n // number of items in pager\n $nPages = $this->getPagination($this->nRows);\n\n // construct pager\n $table .= '<ul class=\"uk-pagination uk-pagination-left\">';\n // links to pages\n for ($i = 0; $i < $nPages; $i++) {\n $table .= '<li>';\n $table .= '\n <a id=\"'.$this->_id.'_'.$i.'\"\n href=\"javascript:void(0)\"\n onclick=\"WschangeModelPagination('\n .'\\''.$this->_id.'\\', '\n .'\\''.$this->_action.'\\', '\n .'\\''.$this->_modelName.'\\', '\n .'\\''.$this->noDataText.'\\', '\n .$this->itemsPerPage.', '\n .$this->showEdit.', '\n .'\\''.$this->_order.'\\', '\n .'\\''.$this->_formId.'\\', '\n .$i.',\\''.$this->_id.'_'.$i.'\\', '\n .'\\''.$this->_edit_action.'\\', '\n .'\\''.$this->_delete_action.'\\')\"/>'\n .($i+1).'</a>';\n $table .= '</li>';\n }\n // end of pager\n $table .= '</ul>';\n\n // end of master div element\n $table .= '<br/>';\n\n $table .= '<script type=\"text/javascript\">'\n .'$(\"#search_'.$this->_id.'\").keydown(function(event) {'\n .' if(event.keyCode == 13) {'\n .' event.preventDefault();'\n .' $(\"#btn_search_'.$this->_id.'\").click();'\n .' }'\n .'});'\n .'</script>';\n\n unset($i, $nPages, $db, $result, $countQuery);\n return $table;\n }",
"protected function grid()\n {\n $grid = new Grid(new Clinic());\n\n $grid->column('id', __('Id'))->filter();\n $grid->column('image', __('Image'))->image();\n $grid->column('name', __('Name'))->filter();\n $grid->column('type', __('Type'))->using(['1' => 'Clinic', '2' => 'Hospital'])->filter();\n $grid->column('email', __('Email'))->filter();\n $grid->column('phone', __('Phone'))->filter();\n $grid->column('address', __('Address'))->filter();\n $grid->column('website_url', __('Website url'))->link()->filter();\n $grid->column('profile_finish', __('Profile finish'))->bool()->filter();\n $grid->column('status', __('Status'))->bool()->filter();\n $grid->column('created_at', __('Created at'))->filter();\n $grid->column('updated_at', __('Updated at'))->filter();\n\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Information);\n\n $grid->model()->where('adminuser_id', '=', Admin::user()->id);\n $grid->disableCreateButton();\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('项目名称'));\n $grid->column('content', __('项目简介'))->limit(30);\n $grid->column('industry', __('行业类别'));\n $grid->column('investment', __('投资金额')); \n $grid->column('cont_name', __('资方联系人'));\n $grid->column('cont_phone', __('资方联系方式'));\n $grid->column('staff_name', __('工作人员姓名'));\n $grid->column('staff_phone', __('工作人员电话'));\n $grid->column('created_at', __('上报时间'));\n $grid->column('updated_at', __('更新时间'));\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n // 在这里添加字段过滤器\n $filter->like('name', '项目名称');\n $filter->like('cont_name', '资方联系人');\n $filter->like('content', '项目情况');\n });\n\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Order);\n\n $grid->column('id', __('Id'));\n $grid->column('currency', __('Currency'));\n $grid->column('amount', __('Amount'));\n $grid->column('state', __('State'));\n $grid->column('game_id', __('Game id'));\n $grid->column('user_id', __('User id'));\n $grid->column('product_id', __('Product id'));\n $grid->column('product_name', __('Product name'));\n $grid->column('cp_order_id', __('Cp order id'));\n $grid->column('callback_url', __('Callback url'));\n $grid->column('callback_info', __('Callback info'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Dictionary());\n $grid->disableRowSelector();\n $grid->disableExport();\n\n $grid->column('id', __('Id'));\n $grid->column('type', __('Type'))->display(function () {\n return $this->type ? Dictionary::TYPES[$this->type] : null;\n })->label();\n $grid->column('option', __('Option'));\n $grid->column('slug', __('Slug'));\n $grid->column('alternative', __('Alternative'));\n $grid->column('approved', __('Approved'))->switch();\n $grid->column('sort', __('Sort'));\n\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n $filter->expand();\n $filter->where(function ($query) {\n $query->where('dictionaries.type', '=', $this->input);\n }, __('Фильтровать по типу'))->select(Dictionary::TYPES);\n });\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new SpecificationTemplate());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('keys', __('Keys'))->display(function ($keys) {\n return implode(',', $keys);\n });\n $grid->column('content', __('Content'))->display(function ($content) {\n return implode('<br/>', array_map(fn($values) => implode(',', $values), $content));\n });\n $grid->column('sort', __('Sort'))->editable();\n $grid->column('is_display', __('Is display'))->switch();\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n $grid->actions(function (Grid\\Displayers\\Actions $actions) {\n $actions->disableView();\n });\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Order);\n\n\n //only display paid order\n $grid->model()->whereNotNull('paid_at')->orderBy('paid_at', 'desc');\n\n $grid->no('order number');\n $grid->column('user.name', 'Buyer');\n $grid->total_amount('Total Amount')->sortable();\n $grid->paid_at('Paid Time')->sortable();\n $grid->ship_status('Shipment')->display(function($value) {\n return Order::$shipStatusMap[$value];\n });\n $grid->refund_status('Refund Status')->display(function($value) {\n return Order::$refundStatusMap[$value];\n });\n $grid->disableCreateButton();\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->disableEdit();\n });\n $grid->tools(function ($tools) {\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Book());\n\n $grid->column('id', __('Id'));\n $grid->author()->display(function($v) {\n return $v['name'];\n });\n $grid->column('title', __('Title'));\n $grid->column('description', __('Description'));\n $grid->column('year', __('Year'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Blog());\n\n $grid->column('id', __('Id'));\n $grid->column('title', __('Title'));\n $grid->column('sub_title', __('Sub title'));\n $grid->column('tag', __('Tag'));\n $grid->column('body', __('Body'));\n $grid->column('posted_by', __('Posted by'));\n $grid->column('posted_at', __('Posted at'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new PointMachine());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('point.name', __('Point name'));\n $grid->column('machine_no', __('Machine no'));\n // 1-自助型 2-全自动型\n $grid->column('type', __('Type'))->display(function ($type) {\n return $type == 1 ? '自助型 ' : '全自动型';\n });\n $grid->column('cost', __('Cost'));\n $grid->column('cost_at', __('Cost at'));\n $grid->column('build_at', __('Build at'));\n $grid->column('remark', __('Remark'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new City());\n\n $grid->column('id', __('Id'));\n $grid->column('sort', __('Sort'));\n $grid->column('name', __('Name'));\n $grid->column('slug', __('Slug'));\n $grid->column('description', __('field.description'))->display(function ($item) {\n return mb_strimwidth($item, 0, 500, '...');\n });\n $grid->column('files', __('field.images'))->display(function () {\n $images = array();\n foreach ($this->files as $file) {\n array_push($images, preg_replace(\"/images\\//\", \"images/small.\", $file->file));\n }\n return $images;\n })->carousel(150, 100);\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Talent);\n\n $grid->column('talents_id', 'ID');\n $grid->column('name', '姓名')->filter('like');\n $grid->column('sex', '性别')->filter('like');\n $grid->column('jobtitle', '工作单位及职务')->filter('like');\n $grid->column('education', '学历学位')->filter('like');\n $grid->column('university', '毕业院校与专业')->filter('like');\n $grid->column('major', '目前的专业/技术特长')->filter('like');\n $grid->column('linkphone', '联系电话')->filter('like');\n $grid->exporter(new TalentExporter());\n $grid->actions(function ($actions) {\n // 去掉查看\n $actions->disableView();\n });\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Resources);\n\n $grid->id('ID');\n $grid->type('类型')->using(Resources::TYPE)->filter(Resources::TYPE);\n $grid->name('名称');\n $grid->url('图片')->image();\n $grid->sort_num('排序')->editable()->sortable();\n $grid->memo('备注');\n\n $grid->disableExport();\n $grid->disableFilter();\n\n $grid->actions(function ($actions) {\n $actions->disableView();\n $actions->disableDelete();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new SiteHelp);\n\n $grid->model()->latest();\n\n $grid->filter(function ($filter) {\n\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n $filter->equal('site_help_category_id', __('site-help::help.site_help_category_id'))\n ->select(SiteHelpCategory::pluck('name', 'id'));\n $filter->like('title', __('site-help::help.title'));\n $filter->equal('status', __('site-help::help.status.label'))\n ->select(__('site-help::help.status.value'));\n });\n\n $grid->column('thumbnail', __('site-help::help.thumbnail'))->image('', 66);\n $grid->column('id', __('site-help::help.id'));\n $grid->column('category.name', __('site-help::help.site_help_category_id'));\n $grid->column('title', __('site-help::help.title'));\n $grid->column('useful', __('site-help::help.useful'));\n $grid->column('status', __('site-help::help.status.label'))\n ->using(__('site-help::help.status.value'));\n $grid->column('created_at', __('admin.created_at'));\n $grid->column('updated_at', __('admin.updated_at'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Platform());\n\n $grid->column('platform_number', __('Platform number'));\n $grid->column('platform_name', __('Platform name'))->label()\n ->expand(function ($model){\n $shops = $model->shops()->get()->map(function ($shop){\n return $shop->only(['shop_number', 'shop_name']);\n });\n\n return new Table([__('Platform number'), __('Platform name')], $shops->toArray());\n });\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n $grid->filter(function ($filter){\n $filter->disableIdFilter();\n $filter->equal('platform_number', __('Platform number'));\n $filter->like('platform_name', __('Platform name'));\n });\n\n $grid->paginate(10);\n\n $grid->disableRowSelector();\n\n $grid->actions(function ($actions){\n $actions->disableView();\n $actions->disableDelete();\n });\n\n return $grid;\n }",
"public function getDatagridViewBuilder();",
"protected function grid()\n {\n $grid = new Grid(new Barang());\n\n $grid->filter(function($filter){\n $filter->disableIdFilter();\n $filter->like('nama', 'Nama');\n });\n $grid->column('id', __('Id'));\n $grid->column('nama', __('Nama'));\n $grid->column('harga', __('Harga Beli'));\n $grid->column('harga_jual', __('Harga Jual'));\n $grid->column('satuan_id', __('Satuan id'))->display(function($satuan) {\n return Satuan::find($satuan)->nama;\n });\n $grid->column('jumlah_unit', __('Jumlah Unit'));\n $grid->column('parent_id', 'Parent')->display(function($id) {\n if($id) {\n return Barang::find($id)->nama;\n }\n else {\n return null;\n }\n });\n $grid->column('b_pengiriman', __('Pengiriman'));\n $grid->column('b_keamanan', __('Keamanan'));\n // $grid->column('created_at', __('Created at'));\n // $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Collect());\n $grid->disableActions();\n $grid->disableCreateButton();\n $grid->column('name','姓名');\n $grid->column('phone','手机号');\n $grid->column('address','地址');\n $grid->column('time','时间');\n $grid->column('message','备注');\n\n $postsExporter = new ColectExport();\n $postsExporter->fileName = date('Y-m-d H:i:s').'.xlsx';\n $grid->exporter($postsExporter);\n $url = url()->current();\n $url .= \"?_export_=all\";\n $grid->tools(function ($tools)use($grid,$url){\n $tools->append(new Export($grid,$url));\n });\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Customer);\n $grid->model()->where('is_delete',0)->orderBy('id','desc');\n $grid->id('ID')->sortable();\n $grid->code('客户编号');\n $grid->name('客户名称');\n $grid->contactor('联系人');\n $grid->tel('联系电话');\n $grid->email('邮箱');\n $grid->address('地址');\n $grid->receivables('应收账款数字');\n\n $grid->create_time('创建时间')->display(function ($create_time) {\n return date('Y-m-d H:i',$create_time);\n })->sortable();\n\n // 查询过滤\n $grid->filter(function($filter){\n $filter->column(1/2, function ($filter) {\n $filter->like('code', '客户编号');\n $filter->like('name', '客户名称');\n });\n $filter->column(1/2, function ($filter) {\n $filter->like('contactor', '联系人');\n $filter->like('tel', '联系电话');\n $filter->use(new TimestampBetween('create_time','创建时间'))->datetime();\n });\n\n\n });\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Setting());\n\n $grid->column('id', __('Id'));\n $grid->column('member_fee', __('Member fee'));\n $grid->column('task_rate', __('Task rate'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new HhxEquip());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __(trans('hhx.name')));\n $grid->column('hhx_travel_id', __(trans('hhx.hhx_travel_id')))->display(function ($hhx_travel_id){\n return self::getTravelService()->getNameByTravelId($hhx_travel_id);\n });\n $grid->column('status', __(trans('hhx.status')))->select(config('hhx.equip_status'));\n $grid->column('created_at', __(trans('hhx.created_at')));\n $grid->column('updated_at', __(trans('hhx.updated_at')));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Sections());\n\n $grid->column('id', __('ID'))->editable() -> sortable();\n $grid->column('name', __('Nazwa'))->editable() -> sortable();\n $grid->column('pageId', __('ID sekcji (w sensie HTML)'))->editable() -> sortable();\n $grid->column('content', __('Zawartość'))->editable() -> sortable();\n $grid->column('style', __('Style(CSS)'))->editable() -> sortable();\n $grid->column('created_at', __('Utworzono')) -> sortable();\n $grid->column('updated_at', __('Zauktalizowano')) -> sortable() ;\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new MethodPrice);\n\n $grid->id('ID');\n $grid->entity('Сущность')->select(Pest::all()->pluck('name','id'));\n $grid->method('Сущность')->select(Method::all()->pluck('name','id'));\n $grid->chemical('Сущность')->select(Chemical::all()->pluck('name','id'));\n $grid->square_1('Сущность')->select(Chemical::all()->pluck('name','id'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Feedback);\n $grid->column('id', 'ID');\n $grid->column('content', '内容');\n $grid->column('member', '用户')->display(function(){\n return $this->member->nickname;\n });\n $grid->column('created_at', '时间');\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Site());\n\n $grid->id('ID');\n $grid->category()->title('分类');\n $grid->title('标题');\n $grid->thumb('图标')->gallery(['width' => 50, 'height' => 50]);\n $grid->describe('描述')->limit(40);\n $grid->url('地址');\n\n $grid->disableFilter();\n $grid->disableExport();\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Goods);\n\n $grid->id('Id');\n $grid->title(trans('admin.title'));\n $grid->slogan(trans('admin.slogan'));\n $grid->name(trans('admin.name'));\n $grid->price(trans('admin.price'))->editable();\n $grid->created_at(trans('admin.created_at'));\n $grid->updated_at(trans('admin.updated_at'));\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n $grid->disableExport();\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Activity());\n $grid->model()->orderBy('created_at','desc');\n\n $grid->column('id', __('Id'));\n $grid->column('log_name', __('Log name'))->using($this->log_name);\n $grid->column('description', __('Description'))->limit(10);\n $grid->column('subject_id', __('Subject id'));\n $grid->column('subject_type', __('Subject type'));\n $grid->column('causer_id', __('Causer id'));\n $grid->column('causer_type', __('Causer type'));\n $grid->column('properties', __('Properties'))->display(function ($properties) {\n $properties = [\n '详情' => isset($properties['description']) ? $properties['description'] : '',\n '备注' => isset($properties['remark']) ? $properties['remark'] : '',\n ];\n return new Table([], $properties);\n });\n $grid->column('created_at', __('Created at'))->sortable();\n $grid->column('updated_at', __('Updated at'));\n\n $grid->filter(function ($filter) {\n\n $filter->equal('log_name', __('Log name'))->select($this->log_name);\n\n });\n\n #禁用创建按钮\n $grid->disableCreateButton();\n\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->disableView();\n $actions->disableEdit();\n });\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Usertype());\n\n $grid->column('id', 'ID');\n $grid->column('usertype', '分类名称');\n $grid->column('created_at', '创建时间');\n $grid->column('updated_at', '修改时间');\n $grid->disableFilter();\n $grid->disableExport();\n $grid->disableRowSelector();\n $grid->disableColumnSelector();\n $grid->disableActions();\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Regional());\n\n $grid->column('id', 'ID');\n $grid->column('logo', 'Logo')->image('', '50', '50');\n $grid->column('name', 'Nama');\n $grid->column('address', 'Alamat');\n $grid->column('created_at', 'Dibuat')->date('d-m-Y');\n $grid->column('updated_at', 'Diubah')->date('d-m-Y');\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Plan);\n $grid->model()->whereHas('category');\n\n $grid->column('category.name', __('Категория'));\n $grid->column('count', __('План'))->editable()->sortable();\n $grid->column('month_name', __('Месяц'));\n $grid->column('year', __('Год'))->sortable();\n// $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Order());\n\n $grid->column('id', __('Id'));\n $grid->column('trip', __('Trip'))->display(function () {\n return $this->trip->name;\n });\n $grid->column('user', __('User'))->display(function () {\n return $this->user->name . ' ' . $this->user->surname . \" ({$this->user->email})\";\n });\n $grid->column('paid', __('Paid'))->bool()->filter([\n 0 => 'No',\n 1 => 'Yes',\n ]);\n $grid->column('reservation_expires', __('Reservation expires'))->sortable();\n $grid->column('price', __('Price'));\n\n $grid->disableFilter();\n $grid->disableExport();\n $grid->disableCreateButton();\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Terrace());\n\n $grid->column('id', __('Id'))->sortable()->style('text-align:center');\n $grid->column('image', __('平台图片'))->style('text-align:center')->image();\n $grid->column('name', __('平台名称'))->style('text-align:center');\n $grid->column('path', __('外链'))->style('text-align:center');\n $grid->column('notice_info', __('提示语'))->style('text-align:center');\n $grid->column('status', __('状态'))->display(function($status){\n return $status == 1 ? '未推荐' : '已推荐';\n })->style('text-align:center');\n $grid->column('created_at', __('创建时间'))->style('text-align:center');\n $grid->disableExport();\n\n $grid->actions(function ($actions) {\n $actions->disableDelete();\n $actions->add(new Terracedel());\n });\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new WechatUser);\n\n $grid->column('id', __('ID'));\n $grid->column('nick_name', __('昵称'));\n $grid->column('name', __('用户名'));\n $grid->column('password', __('密码'));\n $grid->column('mobile', __('手机号'));\n $grid->column('mini_program_open_id', __('OpenId'));\n $grid->column('created_at', __('创建时间'));\n $grid->column('updated_at', __('更新时间'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Code());\n\n\n \n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n\n $filter->column(1 / 2, function ($filter) {\n $filter->like('phone', '手机号');\n $filter->like('ip', 'IP');\n });\n\n $filter->column(1 / 2, function ($filter) {\n $filter->between('created_at', '时间范围')->datetime();\n });\n\n\n });\n\n\n // $grid->column('id', __('Id'));\n $grid->column('phone', __('手机号'))->filter('like');\n $grid->column('code', __('验证码'));\n $grid->column('created_at', __('发送时间'));\n $grid->column('used_at', __('使用时间'));\n $grid->column('ip', __('IP'));\n $grid->model()->latest();\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Purchase());\n\n $grid->column('id', \"编号\");\n $grid->column('consumer_name', \"客户\")->display(function () {\n return $this->consumer->full_name;\n });\n $grid->column('house_readable_name', \"房源\")->display(function () {\n return $this->house->readable_name;\n });\n $grid->column('started_at', \"生效日期\");\n $grid->column('ended_at', \"结束日期\");\n $grid->column('sell_type', \"出售方式\")->display(function ($sell_type) {\n return Purchase::$type[$sell_type];\n });\n $grid->column('price', \"成交价格\")->display(function ($price) {\n return \"¥$price\";\n });\n $grid->column('created_at', \"创建日期\");\n $grid->column('updated_at', \"更新日期\");\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Specialization);\n\n $grid->id('Id');\n $grid->full_name('Полное найменование');\n $grid->short_name('Краткое найменование');\n $grid->code('Код специальности');\n $grid->cathedra_id('Кафедра')->using(Cathedra::all()->pluck('abbreviation', 'id')->toArray());\n $grid->created_at('Создано');\n $grid->updated_at('Обновлено');\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Gys);\n\n $grid->id('Id');\n $grid->name('公司名称');\n $grid->tel('联系人电话');\n $grid->file('营业执照')->display(function ($v){\n $str = '';\n foreach (explode(',',$v) as $item){\n $str.= '<a target=\"_blank\" href=\"'.env('APP_URL').$item.'\"><img src=\"'.env('APP_URL').$item.'\" width=\"100\" style=\"padding:10px;border:solid #eee 1px;border-radius:3px;margin-right:3px\"/></a>';\n }\n return $str;\n });\n $grid->hyzz('资质证书')->display(function ($v){\n $str = '';\n foreach (explode(',',$v) as $item){\n $str.= '<a target=\"_blank\" href=\"'.env('APP_URL').$item.'\"><img src=\"'.env('APP_URL').$item.'\" width=\"100\" style=\"padding:10px;border:solid #eee 1px;border-radius:3px;margin-right:3px\"/></a>';\n }\n return $str;\n });\n $grid->type('类型');\n $grid->username('用户名称');\n $grid->password('密码');\n $grid->created_at('创建时间');\n $grid->updated_at('更新时间');\n $grid->status('账户状态')->radio([\n 0=> '审核中',\n 1=> '审核通过',\n 2=> '冻结账户'\n ]);\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new City());\n\n// $grid->column('id', __('Id'));\n $grid->column('date', __('Дата'));\n $grid->column('name', __('Город'))->display(function () {\n return '<a href=\"/admin/city-users?set='.$this->id.'\">'.$this->name.'</a>';\n });\n $grid->column('image', 'Картинка')->display(function () {\n $str = $this->image!='' ? '<img src=\"/uploads/images/'.$this->image.'\" height=\"100\"/>' : '';\n return $str;\n });\n// $grid->column('text', __('Text'));\n $grid->column('show', 'Активен')->display(function () {\n return $this->show ? 'да' : 'нет';\n });\n// $grid->column('orders', __('Orders'));\n// $grid->column('created_at', __('Created at'));\n// $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Category);\n\n $grid->id('Id');\n $grid->parent_id('父ID');\n $grid->name('名称');\n $grid->order('排序');\n $grid->image('图片');\n $grid->index_template('首页模版');\n $grid->detail_template('详情模版');\n $grid->status('Status')->display(function ($status){\n return $status ? '<p class=\"text-success\">启用</p>' : '<p class=\"text-muted\">禁用</p>';\n });\n $grid->created_at('创建时间');\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Member());\n\n $grid->column('id', 'id')->sortable();\n $grid->column('username','用户名');\n $grid->column('phone', '手机号')->display(function() {\n return substr($this->phone, 0, 3).'****'.substr($this->phone, 7);\n });\n $grid->column('avatar', '头像')->image('', 50, 50);\n $grid->column('created_at', '注册时间')->sortable();\n $grid->disableCreateButton();\n $grid->disableExport();\n $grid->disableActions();\n $grid->filter(function ($filter) {\n\n // 设置created_at字段的范围查询\n $filter->between('created_at', '创建时间')->datetime();\n });\n\n return $grid;\n }",
"protected function grid() {\n\t\t$grid = new Grid(new Payment);\n\t\t$grid->disableCreateButton();\n\t\t$grid->column('id', __('Id'));\n\t\t$grid->column('user_id', __('用户'));\n\t\t// $grid->column('app_id', __('App id'));\n\t\t$grid->column('price', __('金额'));\n\t\t$grid->column('transaction_id', __('三方订单号'));\n\t\t$grid->column('out_trade_no', __('平台订单号'));\n\t\t$grid->column('type', __('订单类型'))->using(['20' => '商城订单']);\n\t\t$grid->column('status', __('状态'))->using(['0' => '未支付', '1' => '已支付', '2' => '未支付']);\n\t\t// $grid->column('other', __('Other'));\n\t\t$grid->column('payment_at', __('支付时间'));\n\t\t$grid->column('created_at', __('创建时间'));\n\t\t$grid->column('updated_at', __('更新时间'));\n\n\t\treturn $grid;\n\t}",
"protected function grid()\n {\n $grid = new Grid(new Product);\n\n $grid->id('Id');\n $grid->name('商品名');\n $grid->column('category.name', '品类');\n $grid->fabric('Fabric');\n $grid->gsm('Gsm');\n $grid->material('Material');\n $grid->attach('Attach');\n $grid->head_image('商品图')->image('http://yujiaknit.test/images/', 100, 100);\n $grid->created_at('Created at');\n $grid->updated_at('Updated at');\n\n $grid->filter(function ($filter) {\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n });\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Feed());\n\n $grid->column('id', __('Id'));\n $grid->column('url', __('url'));\n $grid->column('id_author', __('Id author'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Withdrawal());\n\n $grid->filter(function($filter){\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n $filter->like('name', __('分区名称'));\n });\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('uid', __('用户昵称(UID)'))->display(function ($uid) {\n return UsersInfo::where('id',$uid)->value('nickname').\"({$uid})\";\n });\n $grid->column('real_name', __('实名姓名'));\n $grid->column('id_card', __('身份证号码'));\n $grid->column('mobile', __('联系电话'));\n $grid->column('amount', __('提现数量'));\n $grid->column('status', __('状态'))->display(function ($status) {\n return Withdrawal::$status[$status];\n });\n $grid->column('created_at', __('创建时间'));\n $grid->column('updated_at', __('修改时间'));\n\n $grid->disableActions();\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new StationBannerImage());\n\n $grid->column('id', __('Id'));\n $grid->column('station.station_name', __('測站'));\n $grid->column('image', __('輪播圖'))->image('', '50');\n $grid->column('url', __('連結'))->link();\n $grid->column('order', __('排序'));\n $grid->column('valid_at', __('有效日期'));\n $grid->column('mod_user', __('異動人員'));\n $grid->column('updated_at', __('異動時間'));\n\n if (Admin::user()->username != 'admin') {\n $grid->model()->where('station_id', '=', Admin::user()->station_id);\n }\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new KuponGroup);\n\n $grid->column('id', __('ID'))->sortable();\n $grid->column('name',__('Nama'));\n $grid->column('total',__('Jumlah Kupon'));\n $grid->column('amount_per_kupon',__('Nilai Per Kupon'));\n $grid->column('expired',__('Kedaluwarsa'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }",
"protected function grid()\n {\n return Admin::grid(Classroom::class, function (Grid $grid) {\n\n $grid->id('ID')->sortable();\n\n // $grid->column();\n\n $grid->column('number', '编号');\n $grid->column('name', '名称');\n $grid->column('location', '地点');\n $grid->column('square', '面积');\n $grid->column('floor', '楼层');\n $grid->column('is_free', '是否空闲');\n $grid->column('building_name', '建筑物名称');\n\n $grid->created_at();\n $grid->updated_at();\n });\n }",
"protected function grid()\n {\n $grid = new Grid(new Milestone);\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('type', __('Type'))->select(Milestone::TYPE_MAP);\n $grid->column('version', __('Version'));\n $grid->column('content', __('Content'));\n $grid->column('detail', __('Detail'));\n $grid->column('created_at', __('Created at'))->sortable()->hide();\n $grid->column('updated_at', __('Updated at'))->sortable()->hide();\n\n $grid->model()->orderBy('id', 'desc');\n\n $grid->filter(function ($filter) {\n $filter->equal('version', '版本');\n $filter->like('content', '内容');\n $filter->equal('type', '类型')->select(Milestone::TYPE_MAP);\n $filter->between('created_at', '创建时间')->datetime();\n $filter->between('updated_at', '更新时间')->datetime();\n });\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Test());\n\n $grid->id('编号');\n $grid->name('教师姓名');\n $grid->work_point('教学分数');\n $grid->science_point('科研分数');\n $grid->disableCreateButton();\n $grid->disableFilter();\n $grid->disableActions();\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new UserHealth());\n\n $grid->column('id', __('Id'))->filter();\n $grid->column('height', __('Height'))->filter();\n $grid->column('weight', __('Weight'))->filter();\n $grid->column('blood_pressure', __('Blood pressure'))->filter();\n $grid->column('sugar_level', __('Sugar level'))->filter();\n $grid->column('blood_type', __('Blood type'))->filter();\n $grid->column('muscle_mass', __('Muscle mass'))->filter();\n $grid->column('metabolism', __('Metabolism'))->filter();\n $grid->column('genetic_history', __('Genetic history'))->filter();\n $grid->column('illness_history', __('Illness history'))->filter();\n $grid->column('allergies', __('Allergies'))->filter();\n $grid->column('prescription', __('Prescription'))->filter();\n $grid->column('operations', __('Operations'))->filter();\n $grid->column('user_id', __('User id'))->filter();\n $grid->column('created_at', __('Created at'))->filter();\n $grid->column('updated_at', __('Updated at'))->filter();\n\n return $grid;\n }",
"protected function grid()\n { \n \n $grid = new Grid(new Blog);\n\n $grid->id('Id')->sortable();\n $grid->title('标题');\n // $grid->content('内容');\n $grid->logo('图片')->display(function ($value) {\n return \"<img width='50' src='/upload/$value'>\";\n });\n $grid->discuss('评论');\n $grid->display('浏览');\n \n $grid->lab_id('标签')->display(function ($value) {\n $lab_name = Lab::select('lab_name')->where('id',$value)->get();\n \n return $lab_name[0]->lab_name;\n });\n\n $grid->cat_id('分类')->display(function ($value) {\n $cat_name = Cat::select('cat_name')->where('id',$value)->get();\n return $cat_name[0]->cat_name;\n });\n \n\n\n $grid->created_at('添加时间');\n \n $grid->actions(function ($actions){\n $actions->disableView();\n });\n\n $grid->filter(function($filter){\n $filter->like('title', '标题');\n $filter->like('content', '内容');\n });\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new User());\n\n $grid->column('id', __('Id'));\n $grid->column('name', __('Name'));\n $grid->column('surname', __('Surname'));\n $grid->column('email', __('Email'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Category());\n $grid->model()->small();\n \n $grid->quickCreate(function (Grid\\Tools\\QuickCreate $create) {\n $create->text('erp_id', 'ERP ID');\n $create->text('name', '小分類名稱');\n $create->select('parent_id', __('中分類'))->options(\n Category::Mid()->pluck('name', 'id')\n );\n $create->text('type','分級(不需改)')->default(3);\n });\n\n $grid->column('erp_id', __('ERP Id'));\n $grid->column('name', __('小分類名稱'));\n $grid->column('parent_id', __('中分類'))->display(function($userId) {\n return Category::find($userId)->name;\n });\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new WechatEvent);\n\n $grid->id('Id');\n $grid->title('事件标题');\n $grid->key('Key');\n $grid->event('事件类型')->using(WechatEvent::EVENTLIST);\n $grid->method('执行方法');\n $grid->column('message.title', '消息标题');\n $grid->created_at('创建时间');\n $grid->updated_at('修改时间');\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Station());\n\n $grid->column('id', __('Id'));\n $grid->column('area.area_name', __(trans('admin.area_name')));\n $grid->column('station_code', __(trans('admin.station_code')));\n $grid->column('station_name', __(trans('admin.station_name')));\n $grid->column('telno', __(trans('admin.telno')));\n $grid->column('order', __(trans('admin.order')));\n $grid->column('valid_at', __(trans('admin.valid_at')));\n $grid->column('mod_user', __(trans('admin.mod_user')));\n $grid->column('updated_at', __(trans('admin.updated_at')));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new GithubRepositories());\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('name', __('项目名'))->limit(20);\n $grid->column('full_name', __('项目全名'))->limit(40);\n $grid->column('description', __('简介'))->limit(60);\n// $grid->column('owner', __('作者资料'));\n $grid->column('html_url', __('网页地址'))->link();\n// $grid->column('original_data', __('原始数据'));\n $grid->column('created_at', __('创建时间'));\n// $grid->column('updated_at', __('更新时间'));\n\n //快捷搜索\n $grid->quickSearch('name', 'full_name', 'description');\n\n //倒叙\n $grid->model()->orderBy('id', 'desc');\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Product);\n\n $grid->column('id', __('Id'));\n $grid->column('type.name', __('分类名称'));\n $grid->column('recommend.name', __('推荐名称'));\n $grid->column('name', __('产品名称'));\n $grid->column('description', __('产品描述'));\n $states = [\n 'off' => ['value' => 0, 'text' => '否', 'color' => 'danger'],\n 'on' => ['value' => 1, 'text' => '是', 'color' => 'success'],\n ];\n $grid->column('pop', __('推荐'))->switch($states);\n $grid->column('logo','logo图')->display(function (){\n if ($this->logo){\n return '<div class=\"pop\"><img src='.env('APP_URl').'/uploads/'.$this->logo.' style=\"width:100px;height:100px;\"></div>';\n }else{\n return ;\n }\n });\n $grid->column('price', __('价格'));\n $grid->column('updated_at', __('更新时间'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Student);\n\n $grid->id('Id');\n $grid->surname('Фамилия');\n $grid->name('Имя');\n $grid->family_name('Отчество');\n $grid->telegram_id('Telegram-id');\n $grid->email('Email');\n $grid->number('Контактный телефон');\n $grid->groups_id('Группа')->using(Group::all()->pluck('name', 'id')->toArray());\n $grid->created_at('Создание записи');\n $grid->updated_at('Редактирование записи');\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Goods);\n $grid->id('ID')->sortable();\n $grid->name('名称');\n $grid->type('分类')->display(function($status) {\n $arr = (new AdminModel('goods_type'))->getAll('',['type','id']);\n foreach ($arr as $key => $value) {\n if($status==$value['id']) return $value['type']; \n }\n \n });\n $grid->cover('商品大图')->image('',70, 70);\n $grid->image('详情图')->image('',70, 70);\n $grid->stock('库存');\n $grid->price('积分价格');\n $grid->status('状态')->display(function($status) {\n if($status==1) return \"上架中\";\n if($status==0) return \"已下架\"; \n });\n $grid->disableExport();//禁用导出数据按钮\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();//禁用查询过滤器\n });\n \n \n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new $this->currentModel);\n\n $grid->filter(function($filter){\n\n // 去掉默认的id过滤器\n //$filter->disableIdFilter();\n\n // 在这里添加字段过滤器\n $filter->like('title_designer_cn', '标题(设计师)');\n $filter->like('title_name_cn', '标题(项目名称)');\n $filter->like('title_intro_cn', '标题(项目介绍)');\n\n });\n\n $grid->id('ID')->sortable();\n $grid->title_designer_cn('标题(中)')->display(function () {\n return CurrentModel::formatTitle($this, 'cn');\n });\n $grid->title_designer_en('标题(英)')->display(function () {\n return CurrentModel::formatTitle($this, 'en');\n });\n $grid->article_status('状态')->display(function ($article_status) {\n switch ($article_status) {\n case '0' :\n $article_status = '草稿';\n break;\n case '1' :\n $article_status = '审核中';\n break;\n case '2' :\n $article_status = '已发布';\n break;\n }\n return $article_status;\n });\n $grid->release_time('发布时间')->sortable();\n \n // $grid->column('created_at', __('发布时间'));\n $grid->created_at('添加时间')->sortable();\n // $grid->column('updated_at', __('添加时间'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new WechatMessage);\n\n $grid->id('Id');\n $grid->msg_type('消息类型');\n $grid->media_id('素材id');\n $grid->title('标题');\n $grid->created_at('创建时间');\n $grid->updated_at('修改时间');\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new User());\n\n $grid->column('id', __('field.id'));\n $grid->column('name', __('Name'));\n $grid->column('email', __('Email'));\n $grid->column('email_verified_at', __('Email verified at'));\n $grid->column('password', __('Password'));\n $grid->column('remember_token', __('Remember token'));\n $grid->column('point', __('Point'));\n $grid->column('status', __('field.status'));\n $grid->column('created_at', __('field.created_at'));\n $grid->column('updated_at', __('field.updated_at'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Product);\n $grid->model()->where('type',$this->getProductType())->orderBy('id','desc');\n //调用自定义的Grid\n\n $this->customGird($grid);\n $grid->actions(function ($actions) {\n $actions->disableView();\n $actions->disableDelete();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new News);\n\n $grid->id('Id');\n $grid->title('题目');\n $grid->category_id('分类ID');\n // $grid->content('内容');\n $grid->thumbnail('封面图');\n $grid->status('状态');\n $grid->read_count('阅读数量');\n $grid->created_at('创建时间');\n $grid->updated_at('更新时间');\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new DbTop());\n $grid->header(function ($query) {\n $alread = DbTop::whereStatus(1)->count();\n $notyet = DbTop::whereStatus(0)->count();\n $notok = DbTop::whereStatus(2)->count();\n $pan = DbTop::where('pan_url', '<>', '')->count();\n $x = '已看:' . $alread . '<br />未看:' . $notyet . '<br />不感兴趣:' . $notok . '<br />资源:' . $pan;\n return '<div class=\"alert alert-success\" role=\"alert\">' . $x . '</div>';\n });\n $grid->column('no', __(trans('hhx.no')))->display(function ($no) {\n return 'No.' . $no;\n });\n $grid->column('img', __(trans('hhx.img')))->image();\n $grid->column('c_title', __(trans('hhx.c_title')))->display(function () {\n return $this->c_title . ' ' . $this->year;\n });\n $grid->column('rating_num', __(trans('hhx.rating_num')));\n $grid->column('inq', __(trans('hhx.inq')));\n $grid->column('actor', __(trans('hhx.actor')));\n $grid->column('type', __(trans('hhx.type')));\n $grid->column('status', __(trans('hhx.status')))->select(config('hhx.db_status'));\n $grid->filter(function ($filter) {\n $filter->like('c_title', '中文名');\n $filter->like('year', '年');\n $filter->like('status', trans('hhx.status'))->select(config('hhx.db_status'));\n });\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Drug);\n\n $grid->id('ID');\n $grid->street_name('«Уличное» название');\n $grid->city('Город');\n $grid->column('photo_drug','Фотография наркотика')->display(function () {\n $photo = Photo::whereDrugId($this->id)->where('type', 0)->first();\n\n if ($photo) {\n return $photo->photo;\n } else {\n return '';\n }\n })->image();\n\n $grid->column('confirm', 'Подтверждение')->display(function ($confirm) {\n if ($confirm) {\n return '✅Подтверждено';\n } else {\n return '❌Не подтверждено';\n }\n });\n $grid->updated_at('Дата изменения');\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Profile());\n\n $grid->column('id', __('ID'))->sortable();\n $grid->column('name', __('ID'))->sortable();\n $grid->column('surname', __('ID'))->sortable();\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new ProductSku);\n\n $grid->column('id', 'ID');\n $grid->column('name', 'sku名称')->editable();\n $grid->column('sku_number', 'sku编号')->editable();\n // $grid->column('description', 'sku描述');\n $grid->product(\"所属商品\")->display(function ($product) {\n return $product['name'];\n });\n $grid->column('price', '原价')->editable();\n $grid->column('stock', '库存量')->editable();\n $grid->column('is_on_sale', '是否上架')->using([0 => '否', 1 => '是']);\n $grid->column('primary_picture', '商品主图');\n $grid->column('retail_price', '零售价格')->editable();\n $grid->column('is_promotion', '是否促销')->using([0 => '否', 1 => '是']);\n $grid->column('promotion_price', '促销价格')->editable();\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Leavetime());\n $grid->filter(function ($filter) {\n $filter->like('designer.name', '设计师');\n $filter->between('created_at','创建时间')->datetime();\n });\n $grid->column('id', __('Id'));\n $grid->column('designer.name', __('设计师'));\n $grid->column('type', __('请假类型'))->display(function ($value) {\n return $value ? '半天' : '全天';\n });\n $grid->column('date', __('请假日期'));\n $grid->column('time', __('时间段'))->display(function ($time) {\n $html = '';\n foreach ($time as $k => $value){\n $work = Worktime::where('id','=',$value)->first();\n if($work){\n $html .= \"<span class='label label-success' style='margin-left: 10px'>{$work['time']}</span>\";\n }else{\n $html = '';\n }\n\n }\n return $html;\n });\n $grid->column('created_at', __('创建日期'));\n $grid->actions(function ($actions) {\n $actions->disableView();\n //$actions->disableDelete();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n $grid->model()->orderBy('id', 'desc');\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new ProductSku());\n\n $grid->column('id', __('Id'));\n $grid->column('product', __('产品'))->display(function ($product){\n return $product['title'];\n });\n $grid->column('title', __('Title'));\n $grid->column('description', __('Description'));\n $grid->column('price', __('Price'));\n $grid->column('stock', __('Stock'));\n $grid->column('options', __('sku规格'))->display(function ($options){\n if (count($options) > 0){\n $strOption = '';\n foreach ($options as $option) {\n $strOption .= \"<p>{$option['product_property_name']}:{$option['product_property_value']}</p>\";\n }\n return $strOption;\n }\n return '';\n });\n\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Order);\n // 只展示已支付的订单,并且默认按支付时间倒序排序\n $grid->model()->whereNotNull('paid_at')->orderBy('paid_at', 'desc');\n\n $grid->no('订单流水号');\n //展示关联关系的字段时,使用column方法\n $grid->column('user.name','买家');\n $grid->total_amount('总金额')->sortable();\n $grid->paid_at('支付时间')->sortable();\n $grid->ship_status('物流')->display(function($value) {\n return Order::$shipStatusMap[$value];\n });\n $grid->refund_status('退款状态')->display(function($value) {\n return Order::$refundStatusMap[$value];\n });\n // 禁用创建按钮,后台不需要创建订单\n $grid->disableCreateButton();\n $grid->actions(function ($actions) {\n // 禁用删除和编辑按钮\n $actions->disableDelete();\n $actions->disableEdit();\n });\n $grid->tools(function ($tools) {\n // 禁用批量删除按钮\n $tools->batch(function ($batch) {\n $batch->disableDelete();\n });\n });\n// return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new SkuModel);\n\n $grid->column('s_id', __('skuid'));\n $grid->column('sku_num', __('编号'));\n $grid->column('goods_id', __('商品id'));\n $grid->column('sku_name', __('sku名称'));\n $grid->column('sku_price', __('Sku价格'));\n $grid->column('sku_goods_repertory', __('库存'));\n $grid->column('sku_goods_img', __('照片'))->image();\n $grid->column('created_at', __('添加时间'));\n $grid->column('updated_at', __('修改时间'));\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new StockProduct);\n\n $grid->column('id', __('Id'));\n // $grid->column('product_id', __('Product id'))->modal('Product Name', function($model){\n // $products = $model->product()->get()->map(function($product) {\n // return $product->only('id','product_name');\n // });\n // return new Table(['ID', 'Product Name'], $products->toArray());\n // });\n $grid->column('product.product_name', __('Name'));\n $grid->column('moq', __('Moq'));\n $grid->column('quantity', __('Quantity'));\n $grid->column('price', __('Price'));\n $grid->column('note', __('Note'));\n $grid->column('created_at', __('Created at'));\n $grid->column('updated_at', __('Updated at'));\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Project());\n $grid->model()->orderBy('id', 'desc');\n $grid->id('ID')->sortable();\n $grid->name('项目名称')->editable();\n $grid->url('项目地址')->link();\n $grid->username('账号');\n $grid->password('密码');\n $status = [\n 'on' => ['value' => 1, 'text' => '启用', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '禁用', 'color' => 'danger'],\n ];\n $grid->status('状态')->switch($status);\n $grid->created_at('创建时间');\n $grid->actions(function ($actions) {\n $actions->disableView();\n });\n $grid->disableFilter();\n $grid->disableExport();\n $grid->disableRowSelector();\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new Subscribe());\n $grid->column('number', __('商品编号'));\n $grid->column('name', __('商品名称'));\n $grid->column('subtitle', __('商品副标题'));\n $grid->column('price', __('单价'));\n $grid->column('quantity', __('库存'));\n $grid->column('type', __('分类'));\n $grid->column('status', __('状态'));\n $grid->column('recommend', __('推荐'));\n $grid->column('sold', __('总售量'));\n $grid->column('integral', __('返还碳积分'));\n $grid->column('emission', __('返还碳减排'));\n $grid->column('place', __('地点'));\n $grid->column('maintenance', __('养护'));\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new GroupTask());\n $grid->column('name', __('messages.name'));\n $grid->column('active', __('messages.active'))->switch();\n $grid->column('sort', __('messages.sort'))->editable();\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new HotRank());\n\n// $grid->column('id', __('Id'));\n $grid->column('sort', __('排序'))->editable();\n $grid->column('nickname', __('昵称'));\n $grid->column('avatar', __('头像'))->image();\n $grid->column('gender', __('性别'))->using([\n 1 => '男',\n 2 => '女'\n ]);\n// $grid->column('role', __('Role'));\n// $grid->column('intro', __('Intro'));\n $grid->column('fans', __('粉丝数'));\n $grid->column('red_book_link', __('小红书链接'));\n $grid->column('red_book_fans', __('小红书粉丝'));\n $grid->column('douyin_link', __('抖音链接'));\n $grid->column('douyin_fans', __('抖音粉丝'));\n $grid->column('created_at', __('创建时间'));\n $grid->actions(function ($actions) use ($grid) {\n // 去掉删除\n// $actions->disableDelete();\n// // 去掉编辑\n// $actions->disableEdit();\n // 去掉查看\n $actions->disableView();\n });\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new TaskOrder);\n $grid->model()->orderBy('id', 'desc');\n $grid->filter(function($filter){\n $filter->disableIdFilter();\n $filter->equal('eid','快递单号')->integer();\n $filter->equal('store','快递网点')->select(storedatas(1));\n $filter->equal('etype','快递公司')->select(edatas());\n $filter->equal('sname','客服名称');\n $filter->between('created_at', '导入时间')->datetime();\n });\n $grid->id('ID');\n $grid->eid('快递单号');\n $grid->sname('客服名称');\n $grid->store('快递网点');\n $grid->etype('快递公司');\n\n $grid->created_at('分配时间');\n //$grid->updated_at('分配时间');\n $excel = new ExcelExpoter();\n $excel->setAttr([ '快递单号','快递网点','快递公司','负责客服','导入时间'], ['eid','store','etype','sname','created_at']);\n $grid->exporter($excel);\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new AnswerList);\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('title', trans('admin.title_answer'))->width(500);\n $grid->column('A', trans('admin.A'))->width(150);\n $grid->column('B', trans('admin.B'))->width(150);\n $grid->column('C', trans('admin.C'))->width(150);\n $grid->column('D', trans('admin.D'))->width(150);\n $grid->column('correct', trans('admin.correct'))->width(100);\n $grid->column('status', trans('admin.status'))->using(AnswerList::STATUSES)->label(['warning', 'primary']);\n $grid->column('created_at', trans('admin.created_at'));\n $grid->column('updated_at', trans('admin.updated_at'));\n\n $grid->filter(function ($filter){\n $filter->disableIdFilter();\n $filter->column(1 / 2, function ($filter) {\n $filter->equal('id', __('Id'));\n });\n $filter->column(1 / 2, function ($filter) {\n $filter->like('title', trans('admin.title'));\n });\n });\n\n return $grid;\n }",
"protected function grid()\n {\n $grid = new Grid(new userWhitelist());\n $grid->filter(function ($filter) {\n $filter->disableIdFilter();\n $filter->like('accountName', ___('accountName'));\n });\n $grid->column('id', ___('Id'));\n $grid->column('accountId', ___('AccountId'));\n $grid->column('accountName', ___('AccountName'));\n $grid->column('nickName', ___('NickName'));\n\n return $grid;\n }",
"protected function grid()\n {\n $Adv=new Adv();\n $grid = new Grid($Adv);\n\n $platform= $Adv->platform;\n $type= $Adv->type;\n $status= $Adv->status;\n\n $list_array=[\n array(\"field\"=>\"title\",\"title\"=>\"标题\",\"type\"=>\"value\"),\n array(\"field\"=>\"platform\",\"title\"=>\"平台\",\"type\"=>\"array\",\"array\"=>$platform),\n array(\"field\"=>\"type\",\"title\"=>\"类型\",\"type\"=>\"array\",\"array\"=>$type),\n array(\"field\"=>\"image\",\"title\"=>\"图片\",\"type\"=>\"image\"),\n array(\"field\"=>\"start_time\",\"title\"=>\"活动开始时间\",\"type\"=>\"value\"),\n array(\"field\"=>\"end_time\",\"title\"=>\"活动结束时间\",\"type\"=>\"value\"),\n array(\"field\"=>\"status\",\"title\"=>\"状态\",\"type\"=>\"array\",\"array\"=>$status),\n array(\"field\"=>\"created_at\",\"title\"=>\"创建时间\",\"type\"=>\"value\")\n ];\n BaseControllers::setlist_show($grid,$list_array);\n\n $grid->filter(function($filter) use($platform,$type){\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n\n $filter->in('platform', \"平台\")->multipleSelect($platform);\n $filter->in('type', \"类型\")->multipleSelect($type);\n });\n return $grid;\n }"
] | [
"0.72541326",
"0.7218252",
"0.7064843",
"0.70040804",
"0.6995721",
"0.69847125",
"0.695367",
"0.6928443",
"0.6927314",
"0.69256824",
"0.6923453",
"0.69233567",
"0.6922796",
"0.6907988",
"0.6889554",
"0.6888196",
"0.6878719",
"0.6845261",
"0.68254143",
"0.6818076",
"0.6810526",
"0.6801908",
"0.68007404",
"0.6792371",
"0.67900723",
"0.6785066",
"0.67814827",
"0.67809147",
"0.6773841",
"0.67679495",
"0.6767842",
"0.67664576",
"0.67600983",
"0.6759144",
"0.6747873",
"0.67451704",
"0.6735288",
"0.6732706",
"0.6727944",
"0.6718374",
"0.6718129",
"0.67142314",
"0.6713679",
"0.67077774",
"0.66969377",
"0.66829485",
"0.6681708",
"0.66795236",
"0.66743",
"0.6665543",
"0.66581196",
"0.6655195",
"0.6648576",
"0.6647211",
"0.6639091",
"0.6634314",
"0.66231555",
"0.6622456",
"0.6605076",
"0.6601071",
"0.6595906",
"0.6595102",
"0.6593814",
"0.65931946",
"0.6590833",
"0.65907514",
"0.65832734",
"0.657433",
"0.6573453",
"0.65642095",
"0.65639156",
"0.655778",
"0.65577185",
"0.6556319",
"0.6553949",
"0.6552593",
"0.6549884",
"0.6542962",
"0.65393496",
"0.65337956",
"0.6528965",
"0.6526889",
"0.65218806",
"0.650997",
"0.6508564",
"0.65050364",
"0.6498207",
"0.6491189",
"0.647587",
"0.6474169",
"0.6469046",
"0.6464774",
"0.6463954",
"0.64510244",
"0.6450445",
"0.6450348",
"0.64481837",
"0.64450586",
"0.6444865",
"0.6443929",
"0.64308834"
] | 0.0 | -1 |
Make a show builder. | protected function detail($id)
{
$show = new Show(Community::findOrFail($id));
$show->field('id', __('Id'));
$show->field('permalink', __('Permalink'));
$show->field('eyecatch_path', __('Eyecatch path'));
$show->field('name', __('Name'));
$show->field('pref', __('Pref'));
$show->field('information', __('Information'));
$show->field('image1_path', __('Image1 path'));
$show->field('image2_path', __('Image2 path'));
$show->field('image3_path', __('Image3 path'));
$show->field('video1_link', __('Video1 link'));
$show->field('video2_link', __('Video2 link'));
$show->field('video3_link', __('Video3 link'));
$show->field('calendar', __('calendar'));
$show->field('message_image_path', __('Message image path'));
$show->field('message', __('Message'));
$show->field('contact', __('Contact'));
$show->field('facebook_link', __('Facebook link'));
$show->field('instagram_link', __('Instagram link'));
$show->field('website_link', __('Website link'));
$show->field('created_at', __('Created at'));
$show->field('updated_at', __('Updated at'));
return $show;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract function buildShowLayout(): void;",
"public function buildShowLayout()\n {\n $this->addSection('Section', function(ShowLayoutSection $section) {\n $section->addColumn(6, function(ShowLayoutColumn $column) {\n $column->withSingleField('id');\n $column->withSingleField('name');\n $column->withSingleField('url');\n $column->withSingleField('vendor_id');\n $column->withSingleField('parent_id');\n $column->withSingleField('created_at');\n $column->withSingleField('updated_at');\n });\n })->addEntityListSection('products', 'products');\n }",
"function Show()\n {}",
"public static function builder();",
"public function buildShowFields()\n {\n $this->addField(\n SharpShowTextField::make('id')\n ->setLabel('Id:')\n )->addField(\n SharpShowTextField::make('name')\n ->setLabel('name:')\n )->addField(\n SharpShowTextField::make('url')\n ->setLabel('url:')\n )->addField(\n SharpShowTextField::make('vendor_id')\n ->setLabel('vendor_id')\n )->addField(\n SharpShowTextField::make('parent_id')\n ->setLabel('parent_id')\n )->addField(\n SharpShowTextField::make('created_at')\n ->setLabel('Created At:')\n )->addField(\n SharpShowTextField::make('updated_at')\n ->setLabel('Updated At:')\n )->addField(\n SharpShowEntityListField::make('products', 'product')\n ->hideFilterWithValue('category', function($instanceId) {\n return $instanceId;\n })\n ->showEntityState(false)\n ->showReorderButton(true)\n ->showCreateButton(false)\n );\n }",
"public function show() {\n \n }",
"public function show();",
"public function show();",
"public function show();",
"public function show();",
"public function show() {\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t\n\t}",
"abstract protected function show();",
"public function show()\n\t{\n\n\t}",
"public function show($show)\n {\n \n }",
"public function show()\n {\n }",
"public function show()\n {\n }",
"public function show()\n {\n }",
"public function show()\n {\n }",
"public function show()\n {\n }",
"public function show()\n {\n }",
"public function show()\n {\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"abstract function buildShowFields(): void;",
"public function show()\n {\n //\n }",
"public function show()\n {\n \n }",
"public function show()\n {\n \n }",
"public function show() {\n \n \n }",
"function Show()\r\n\t{\r\n\r\n\t}",
"public function show()\n\t{\n\t\treturn $this;\n\t}",
"public function Show(){\n\t\techo(\"\n\t\t<div class='$this->claseCSS'>\n\t\t<div class='WidgetTitle'><a id='TitleBlock' href='$this->masURL'><div id='TitleText'>$this->Titulo</div></a></div>\n\t\t\t$this->Contenido\n\t\t\t<div class='footer'><a href='$this->masURL'>Ver más...</a></div>\n\t\t</div>\n\t\t\");\n\t}",
"public function show()\n {\n \n }",
"public function show()\n {\n \n }",
"public function show()\n {\n\n }",
"public function makeView() {\n\t\treturn \n\t\t\t$this->getView()\n\t\t\t\t->with('option', $this);\n\t}",
"public function show()\n {\n\n }",
"public function show()\n {\n\n }",
"public function show()\n {\n\n }",
"public function show()\n {\n\n }",
"public function show()\n {\n\n }",
"public function show()\n {\n\n }",
"public function show()\n {\n\n }",
"public function show()\n {\n\n }",
"public function show()\n {\n\n }",
"public function show()\n { \n \n }",
"function show()\n {\n }",
"public function show()\n { \n }",
"public function show()\n {\n //\n }",
"public function show()\n {\n //\n }",
"public function show()\n {\n //\n }",
"public function show()\n {\n //\n }",
"public function show()\n {\n //\n }",
"public function show()\n {\n //\n }",
"public function show()\n {\n //\n }",
"public function show()\n {\n //\n }",
"public function show()\n {\n //\n }",
"public function show()\n {\n //\n }",
"public function show()\n {\n //\n }",
"public function show()\n {\n //\n }",
"public static function builder() {\n\t\treturn new Builder();\n\t}",
"public function show_box()\n\t\t{\n\t\t\techo '<div id=\"mfn-wrapper\">';\n\t\t\t\techo '<input type=\"hidden\" name=\"mfn-builder-nonce\" value=\"'. wp_create_nonce('mfn-builder-nonce') .'\" />';\n\t\t\t\tmfn_builder_show();\n\t\t\techo '</div>';\n\t\t}",
"public function createBuilder();",
"protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }",
"public function display() {\r\n $this->_display->show();\r\n\r\n return $this;\r\n }",
"public function show(){\n\n }",
"public function show(){\n\n }",
"public function show()\n {\n new $this->controller();\n }",
"public function show()\n {\n //\n }",
"public function show(Menu_builder $menu_builder)\n {\n //\n }",
"public function getBuilder();",
"public static function builder() {\n return new self();\n }",
"function buildShowConfig(): void\n {\n // No default implementation\n }",
"public function show()\n {\n return view('scaffold::show');\n }",
"function show(){\n\t}",
"public function build() {\n\t\t$this->add($this->Html->A(array('href' => 'http://cakephp.org', 'target' => '_blank', 'text' => 'CakePHP')));\n\t\t$this->add($this->Html->Abbr(array('text' => __('This is an abrreviation'))));\n\t\t$this->add($this->Html->Address(array('text' => __('This is an address'))));\n\t\t$this->add($this->Html->B(array('text' => __('This is bold text'))));\n\t\t$this->add($this->Html->Bdo(array('name' => 'value')));\n\t\t$this->add($this->Html->Blockquote(array('text' => __('This is a block quote'))));\n\t\t$this->add($this->Html->Br());\n\t\t$this->add($this->Html->Button(array('value' => __('This is a button'))));\n\t\t$this->add($this->Html->Cite(array('text' => __('This is a citation'))));\n\t\t$this->add($this->Html->Code(array('text' => __('This is a code block'))));\n\t\t$this->add($this->Html->Comment(array('text' => __('This is a comment'))));\n\t\t$this->add($this->Html->Del(array('text' => __('This is deleted text'))));\n\t\t$this->add($this->Html->Dfn(array('text' => __('This is a definition'))));\n\t\t$this->add($this->Html->Div(array('text' => __('This is a division'))));\n\t\t$dl = $this->Html->Dl(array('text' => __('This is a defined list')));\n\t\t$dl->add($this->Html->Dt(array('text' => __('This is a definition title'))));\n\t\t$dl->add($this->Html->Dd(array('text' => __('This is a definition data'))));\n\t\t$this->add($dl);\n\t\t$this->add($this->Html->Em(array('text' => __('This is text with emphasis'))));\n\t\t$form = $this->Html->Form(array('name' => 'example'));\n\t\t\t$fieldset = $this->Html->Fieldset();\n\t\t\t$fieldset->add($this->Html->Legend(array('text' => __('This is a legend of a fieldset'))));\n\t\t\t$fieldset->add($this->Html->Label(array('text' => __('This is a label'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'text', 'type' => 'text', 'value' => __('This is a text input'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'password', 'type' => 'password', 'value' => __('This is a password input'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'radio', 'type' => 'radio', 'value' => 'radio')));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'checkbox', 'type' => 'checkbox', 'value' => 'checkbox')));\n\t\t\t$fieldset->add($this->Html->Textarea(array('name' => 'textarea', 'text' => __('This is a textarea'))));\n\t\t\t\t$select = $this->Html->Select(array('name' => 'select'));\n\t\t\t\t\t$optgroup = $this->Html->Optgroup(array('label' => __('This is an option group')));\n\t\t\t\t\t$optgroup->add($this->Html->Option(array('value' => 123, 'text' => __('This is an option'))));\n\t\t\t\t$select->add($optgroup);\n\t\t\t$fieldset->add($select);\n\t\t$form->add($fieldset);\n\t\t$this->add($form);\n\t\t$this->add($this->Html->Hr());\n\t\t$this->add($this->Html->I(array('text' => __('This is text in italics'))));\n\t\t$this->add($this->Html->Iframe(array('name' => 'ctk', 'src' => 'https://github.com/jameswatts/cake-toolkit')));\n\t\t$this->add($this->Html->Img(array('src' => 'http://cakephp.org/img/cake-logo.png', 'alt' => 'CakePHP')));\n\t\t$this->add($this->Html->Ins(array('text' => __('This is inserted text'))));\n\t\t$this->add($this->Html->Kbd(array('text' => __('This is keyboard text'))));\n\t\t$map = $this->Html->Map();\n\t\t$map->add($this->Html->Area());\n\t\t$this->add($map);\n\t\t$this->add($this->Html->Noscript(array('text' => __('This is displayed if you do not have JavaScript enabled'))));\n\t\t$object = $this->Html->Object();\n\t\t$object->add($this->Html->Param(array('name' => 'example', 'value' => 123)));\n\t\t$this->add($object);\n\t\t$this->add($this->Html->P(array('text' => __('This is a paragraph of text'))));\n\t\t$this->add($this->Html->Pre(array('text' => __('This is preformatted text'))));\n\t\t$this->add($this->Html->Q(array('text' => __('This is a quotation'))));\n\t\t$this->add($this->Html->S(array('text' => __('This is a strike-through text'))));\n\t\t$this->add($this->Html->Samp(array('text' => __('This is a sample text'))));\n\t\t$this->add($this->Html->Small(array('text' => __('This is small text'))));\n\t\t$this->add($this->Html->Span(array('text' => __('This is a span'))));\n\t\t$this->add($this->Html->Strong(array('text' => __('This is a strong text'))));\n\t\t$this->add($this->Html->Style(array('name' => 'value')));\n\t\t$this->add($this->Html->Sub(array('text' => __('This is a sub-text'))));\n\t\t$this->add($this->Html->Sup(array('text' => __('This is a super-text'))));\n\t\t$table = $this->Html->Table(array('border' => 1));\n\t\t$table->add($this->Html->Caption(array('text' => __('This is a table caption'))));\n\t\t\t$colgroup = $this->Html->Colgroup();\n\t\t\t$colgroup->add($this->Html->Col(array('span' => 1)));\n\t\t\t$colgroup->add($this->Html->Col(array('span' => 1)));\n\t\t\t$tbody = $this->Html->Tbody();\n\t\t\t\t$tr = $this->Html->Tr();\n\t\t\t\t$tr->add($this->Html->Th(array('text' => __('This is a table header'))));\n\t\t\t\t$tr->add($this->Html->Td(array('text' => __('This is a table data'))));\n\t\t\t$tbody->add($tr);\n\t\t$table->add($colgroup);\n\t\t$table->add($tbody);\n\t\t$this->add($table);\n\t\t$ol = $this->Html->Ol();\n\t\t$ol->add($this->Html->Li(array('text' => __('This is an ordered list item'))));\n\t\t$this->add($ol);\n\t\t$ul = $this->Html->Ul();\n\t\t$ul->add($this->Html->Li(array('text' => __('This is an unordered list item'))));\n\t\t$this->add($ul);\n\t\t$this->add($this->Html->Var(array('text' => __('This is a variable'))));\n\t}",
"protected function setupShowOperation()\n {\n $this->crud->set('show.setFromDb', false);\n\n CRUD::addColumn([\n 'name' => 'description',\n 'label' => 'Description',\n 'type' => 'string'\n ]);\n\n $this->crud->addColumn([\n 'name' => 'items',\n 'label' => 'Code Items',\n 'type' => 'table',\n 'columns' => [\n 'description' => 'Description',\n 'show_is_visible' => 'Is Visible'\n ]\n ]);\n\n CRUD::addColumn([\n 'name' => 'is_visible',\n 'label' => 'Is Visible',\n 'type' => 'boolean'\n ]);\n }",
"public function __construct(bool $show = false)\n {\n $this->show = $show;\n }",
"public static function build() {\n return new Builder();\n }",
"public function setShow($val = 'null')\n {\n $this->addParams('show', $val);\n\n return $this;\n }",
"public function show()\n {\n return view(\n 'manager/job-builder-root'\n )->with([\n 'title' => Lang::get('manager/job_builder.title'),\n ]);\n }",
"public function show() {\n echo $this->mountElement();\n }",
"public function builder()\n {\n return new Builder($this);\n }",
"public function show()\n {\n echo $this->constructGrid();\n }",
"static public function builder(): Builder\n {\n return new Builder;\n }",
"private function viewBuilder() {\n $html = '';\n $file = false;\n // Create fields\n foreach ($this->formDatas as $field) {\n $type = $field['type'];\n switch ($type) {\n case 'text' :\n case 'password' :\n case 'hidden' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n // Addon - 2013-07-31\n case 'date' :\n case 'datetime' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"text\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n\n\n if ($type == 'datetime') {\n $plugin = $this->addPlugin('widget', false);\n $plugin = $this->addPlugin('date');\n }\n $plugin = $this->addPlugin($type);\n if (!isset($this->js['script'])) {\n $this->js['script'] = '';\n }\n if ($type == 'datetime') {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datetimepicker({ dateFormat: \"yy-mm-dd\", timeFormat : \"HH:mm\"});});</script>';\n } else {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datepicker({ dateFormat: \"yy-mm-dd\"});});</script>';\n }\n break;\n // End Addon\n case 'select' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <select name=\"' . $field['name'] . '\">';\n // Add options\n foreach ($field['options'] as $option) {\n $html .= '\n <option value=\"' . $option . '\" <?php echo set_select(\"' . $field['name'] . '\", \"' . $option . '\"); ?>>' . $option . '</option>';\n }\n $html .= '\n </select>';\n break;\n case 'checkbox' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['checkbox'] as $option) {\n $html .= '\n <input type=\"checkbox\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'radio' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['radio'] as $option) {\n $html .= '\n <input type=\"radio\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'reset' :\n case 'submit' :\n $html .= '\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n case 'textarea' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <textarea name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\"><?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?></textarea>';\n break;\n case 'file' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"file\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" />';\n $file = true;\n break;\n }\n }\n\n $view = '\n <html>\n <head>\n <link type=\"text/css\" rel=\"stylesheet\" href=\"<?php echo base_url() ?>assets/css/generator/' . $this->cssName . '.css\">\n '; // Addon - 2013-07-31\n foreach ($this->css as $css) {\n $view .= $css . '\n ';\n }\n foreach ($this->js as $js) {\n $view .= $js . '\n ';\n }\n // End Addon\n $view .= '\n </head>\n <body>\n <?php\n // Show errors\n if(isset($error)) {\n switch($error) {\n case \"validation\" :\n echo validation_errors();\n break;\n case \"save\" :\n echo \"<p class=\\'error\\'>Save error !</p>\";\n break;\n }\n }\n if(isset($errorfile)) {\n foreach($errorfile as $name => $value) {\n echo \"<p class=\\'error\\'>File \\\"\".$name.\"\\\" upload error : \".$value.\"</p>\";\n }\n }\n ?>\n <form action=\"<?php echo base_url() ?>' . $this->formName . '\" method=\"post\" ' . ($file == true ? 'enctype=\"multipart/form-data\"' : '') . '>\n ' . $html . '\n </form>\n </body>\n </html>';\n return array(str_replace('<', '<', $view), $view);\n }",
"public function create()\n {\n /*return view(\"banda\");*/\n }",
"public function __construct(){\n // 表示部分で使うオブジェクトを作成\n $this->initDisplayObj();\n }",
"public function create()\n {\n return view('Samples.create', [\n 'create' => new FormBuilder(\n [\n 'title'=>'text',\n 'slug'=>'text',\n 'type_id'=>'hidden',\n 'id'=>'hidden' \n ],\n ['samples.store'],\n 'POST',\n 'Create'\n ) \n ]);\n }",
"function\n\tShow ()\n\t{\n\t\t$this->sourceStrings();\n\t\t\n\t\tif ($this->Title == '')\n\t\t{\n\t\t\t$this->Title = $this->_STRINGS['DEFAULT_QUERY_TITLE'];\n\t\t}\n\n\t\tif (count($this->Additional) > 0)\n\t\t\t$this->Fields = array_merge($this->Fields, $this->Additional);\n\t\t\n\t\t$this->display();\n\t}",
"public function setAsBuilder() {\r\n\t\t$this->setFrontEnd(false);\r\n\t\t$this->RenderWhole = true;\r\n\t\t$this->setMenuTemplate(__DIR__ . '/myNavigationBuilder.latte');\r\n\t}",
"protected function buildControl()\n\t\t{\n\t\t\tswitch($this->getDisplayMode())\n\t\t\t{\n\t\t\t\tcase self::DISPLAYMODE_ICONS :\n\t\t\t\t\t$this->buildIconView();\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::DISPLAYMODE_LIST :\n\t\t\t\t\t$this->buildListView();\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::DISPLAYMODE_DETAILS :\n\t\t\t\t\t$this->buildDetailView();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstatic::fail(\"Unknown DisplayMode '%s'\", $this->getDisplayMode());\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"public function create()\n {\n return view('liquors.create')->with(['makers' => Maker::toSelectArray()]);\n }",
"public function show()\n {\n return view('panel::show');\n }",
"public function show()\n {\n return view('panel::show');\n }",
"protected function setupShowOperation()\n {\n CRUD::addColumn(['name' => 'text_one', 'label' => 'Текст первый.']); // columns\n CRUD::addColumn(['name' => 'image_one', 'type' => 'image', 'label' => 'Изображение первое.']); // columns\n CRUD::addColumn(['name' => 'text_two', 'label' => 'Текст второй.']); // columns\n CRUD::addColumn(['name' => 'image_two', 'type' => 'image', 'label' => 'Изображение второе.']); // columns\n CRUD::addColumn(['name' => 'text_third', 'label' => 'Текст третий.']); // columns\n CRUD::addColumn(['name' => 'image_third', 'type' => 'image', 'label' => 'Изображение третье.']); // columns\n CRUD::addColumn(['name' => 'image_four', 'type' => 'image', 'label' => 'Изображение четвертое.']); // columns\n\n /**\n * Columns can be defined using the fluent syntax or array syntax:\n * - CRUD::column('price')->type('number');\n * - CRUD::addColumn(['name' => 'price', 'type' => 'number']);\n */\n }",
"public function setBuilder(ViewBuilder $builder): View;",
"public function show()\n {\n return $this->view();\n }",
"public function show()\n {\n return view('hirmvc::show');\n }"
] | [
"0.65263224",
"0.6506714",
"0.6487851",
"0.64461046",
"0.6348537",
"0.6289141",
"0.6258667",
"0.6258667",
"0.6258667",
"0.6258667",
"0.6252768",
"0.6236633",
"0.6236633",
"0.6236633",
"0.6230517",
"0.62238616",
"0.6219512",
"0.6176135",
"0.6117357",
"0.6117357",
"0.6117357",
"0.6117357",
"0.6117357",
"0.6117357",
"0.6117357",
"0.6100439",
"0.60961765",
"0.60741913",
"0.6065963",
"0.6065963",
"0.60627675",
"0.60331833",
"0.6030393",
"0.60017025",
"0.59868807",
"0.59868807",
"0.5969887",
"0.5969277",
"0.5956367",
"0.5956367",
"0.5956367",
"0.5956367",
"0.5956367",
"0.5956367",
"0.5956367",
"0.5956367",
"0.5956367",
"0.59311247",
"0.5922362",
"0.5919412",
"0.5901687",
"0.5901687",
"0.5901687",
"0.5901687",
"0.5901687",
"0.5901687",
"0.5901687",
"0.5901687",
"0.5901687",
"0.5901687",
"0.5901687",
"0.5901687",
"0.5879426",
"0.5866889",
"0.5852736",
"0.583881",
"0.5833435",
"0.5788621",
"0.5788621",
"0.57789695",
"0.5775939",
"0.5770892",
"0.5769842",
"0.5753881",
"0.5724051",
"0.5723691",
"0.5711465",
"0.56960076",
"0.5679958",
"0.565883",
"0.5645221",
"0.5629538",
"0.56258243",
"0.56133115",
"0.559692",
"0.5579023",
"0.55683374",
"0.55629027",
"0.55605346",
"0.55403745",
"0.5526947",
"0.5521237",
"0.5515049",
"0.5511844",
"0.5506704",
"0.5504769",
"0.5504769",
"0.55001634",
"0.5500038",
"0.54944843",
"0.5489662"
] | 0.0 | -1 |
Make a form builder. | protected function form()
{
$form = new Form(new Community);
$form->text('permalink', __('Permalink'));
$form->text('eyecatch_path', __('Eyecatch path'));
$form->text('name', __('Name'));
$form->text('pref', __('Pref'));
$form->text('information', __('Information'));
$form->text('image1_path', __('Image1 path'));
$form->text('image2_path', __('Image2 path'));
$form->text('image3_path', __('Image3 path'));
$form->text('video1_link', __('Video1 link'));
$form->text('video2_link', __('Video2 link'));
$form->text('video3_link', __('Video3 link'));
$form->text('calendar', __('calendar'));
$form->text('message_image_path', __('Message image path'));
$form->text('message', __('Message'));
$form->text('contact', __('Contact'));
$form->text('facebook_link', __('Facebook link'));
$form->text('instagram_link', __('Instagram link'));
$form->text('website_link', __('Website link'));
return $form;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function form_builder()\n {\n // ToDo run checks when form is being created, please.\n// if(!empty($this->check())):\n// throw new ValidationError(checks_html_output($this->check()));\n//\n// endif;\n\n return new form\\ModelForm($this, $this->_field_values());\n }",
"private function createForm()\n\t{\n\t\t$builder = $this->getService('form')->create();\n\t\t$builder->setValidatorService($this->getService('validator'));\n\t\t$builder->setFormatter(new BasicFormFormatter());\n\t\t$builder->setDesigner(new DoctrineDesigner($this->getDoctrine(), 'Entity\\User',array('location')));\n\n\t\t$builder->getField('location')->setRequired(true);\n\t\t$builder->submit($this->getRequest());\n\n\t\treturn $builder;\n\t}",
"public function setFormFieldBuilder(FormFieldBuilder $form_field_builder): Form;",
"public function setFormBuilder(FormBuilder $form_builder): Form;",
"public function getFormFieldBuilder(): FormFieldBuilder;",
"protected function form()\n {\n $form = new Form(new Banner);\n\n $form->text('title', 'Title');\n $form->image('image', 'Image')->rules('required')->move('images/banners');\n $form->switch('status', 'Published')->default(1);\n\n $form->footer(function ($footer) {\n // disable `View` checkbox\n $footer->disableViewCheck();\n\n // disable `Continue editing` checkbox\n $footer->disableEditingCheck();\n\n // disable `Continue Creating` checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('name', __('Name'));\n $form->image('image', __('Image'));\n $form->text('intro', __('Intro'));\n $form->UEditor('details', __('Details'));\n $form->datetime('start_at', __('Start at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_at', __('End at'))->default(date('Y-m-d H:i:s'));\n $form->text('location', __('Location'));\n $form->decimal('fee', __('Fee'))->default(0.00);\n $form->number('involves', __('Involves'));\n $form->number('involves_min', __('Involves min'));\n $form->number('involves_max', __('Involves max'));\n $form->switch('status', __('Status'));\n $form->text('organizers', __('Organizers'));\n $form->number('views', __('Views'));\n $form->switch('is_stick', __('Is stick'));\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Activity);\n\n $form->text('log_name', 'Log name');\n $form->textarea('description', 'Description');\n $form->number('subject_id', 'Subject id');\n $form->text('subject_type', 'Subject type');\n $form->number('causer_id', 'Causer id');\n $form->text('causer_type', 'Causer type');\n $form->text('properties', 'Properties');\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('log_name', __('Log name'));\n $form->text('description', __('Description'));\n $form->number('subject_id', __('Subject id'));\n $form->text('subject_type', __('Subject type'));\n $form->number('causer_id', __('Causer id'));\n $form->text('causer_type', __('Causer type'));\n $form->textarea('properties', __('Properties'));\n\n return $form;\n }",
"public function getFormBuilder()\n {\n $this->formOptions['data_class'] = $this->getClass();\n\n $this->formOptions['allow_extra_fields'] = true;\n $this->formOptions['validation_groups'] = false;\n $this->formOptions['error_bubbling'] = false;\n\n $formBuilder = $this->getFormContractor()->getFormBuilder(\n $this->getUniqid(),\n $this->formOptions\n );\n\n $this->defineFormBuilder($formBuilder);\n\n return $formBuilder;\n }",
"protected function form()\n {\n $form = new Form(new Book());\n\n $form->select('author_id', __('Author id'))\n ->options(collect(Author::all())->mapWithKeys(function ($v){\n return [$v->id => $v->name];\n }));\n\n $form->text('title', __('Title'));\n $form->textarea('description', __('Description'));\n $form->text('year', __('Year'));\n\n return $form;\n }",
"function store_form($model = null, $prefix = null)\n {\n return new FormBuilder($model, $prefix);\n }",
"protected function form()\n {\n $form = new Form(new Resources);\n\n $form->text('name', '名称')->rules('required',['required' => '请输入 配置项的名称']);\n\n $form->radio('type', '类型')->options(Resources::TYPE);\n\n $form->cropper('url','图片');\n\n $form->number('sort_num','排序');\n\n $form->textarea('memo','备注');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n return $form;\n }",
"public function create() {\r\n\t\r\n\t$form = new Form();\r\n\t$form->setTranslator($this->translator);\r\n\treturn $form;\r\n }",
"protected function form()\n {\n $form = new Form(new GuestBook);\n\n $form->textarea('body', __('Body'));\n $form->number('user_id', __('User id'));\n $form->number('guest_id', __('Guest id'));\n $form->number('guest_book_id', __('Guest book id'));\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new BorrowComment);\n\n $form->text('shared_book_name', __('Shared book name'));\n $form->text('student_name', __('Student name'));\n $form->image('student_avatar', __('Student avatar'));\n $form->textarea('content', __('Content'));\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Gys);\n\n $form->text('name', 'Name');\n $form->text('tel', 'Tel');\n $form->textarea('file', 'File');\n $form->number('type', 'Type');\n $form->text('username', 'Username');\n $form->password('password', 'Password');\n $form->number('status', 'Status');\n // 在表单提交前调用\n $form->saving(function (Form $form) {\n if ($form->password && $form->model()->password != $form->password) {\n $form->password = bcrypt($form->password);\n }\n });\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new LotteryCode());\n\n $form->text('code', __('Code'));\n $form->number('batch_num', __('Batch num'));\n $form->text('prizes_name', __('Prizes name'));\n $form->datetime('valid_period', __('Valid period'))->default(date('Y-m-d H:i:s'));\n $form->datetime('prizes_time', __('Prizes time'))->default(date('Y-m-d H:i:s'));\n $form->text('operator', __('Operator'));\n $form->switch('award_status', __('Award status'));\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new BoxOrder);\n\n\n return $form;\n }",
"protected function createForm()\n {\n if (!$this->form) {\n $this->form = new \\Gems_Form(array('class' => 'form-horizontal', 'role' => 'form'));\n $this->mailElements->setForm($this->form);\n }\n return $this->form;\n }",
"protected function form()\n {\n $form = new Form(new Goodss);\n $form->switch('is_enable','状态')->options([\n 'on' => ['value' => 1, 'text' => '正常', 'color' => 'primary'],\n 'off' => ['value' => 0, 'text' => '禁止', 'color' => 'default'],\n ]);\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n //$footer->disableReset();\n\n // 去掉`提交`按钮\n //$footer->disableSubmit();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }",
"public function builder(FormInterface $form)\n {\n return $this->dispatch(new GetStandardFormBuilder($form));\n }",
"protected function form()\n {\n $form = new Form(new Blog());\n\n $form->text('title', __('Title'));\n $form->text('sub_title', __('Sub title'));\n $form->text('tag', __('Tag'));\n $form->textarea('body', __('Body'));\n $form->text('posted_by', __('Posted by'));\n $form->datetime('posted_at', __('Posted at'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Cate());\n\n $form->text('name', __('Name'));\n $form->url('link', __('Link'));\n $form->text('thumb', __('Thumb'));\n $form->switch('status', __('Status'));\n $form->number('sort', __('Sort'));\n $form->datetime('createtime', __('Createtime'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Barang());\n\n $form->text('nama', __('Nama'));\n $form->currency('harga', __('Harga Beli'))->symbol('Rp');\n $form->currency('harga_jual', __('Harga Jual'))->symbol('Rp');\n $form->select('satuan_id', __('Satuan id'))->options(\n Satuan::get()->pluck('nama', 'id')\n );\n $form->number('jumlah_unit', __('Jumlah Unit'));\n $form->select('parent_id', 'Parent Barang')->options(\n Barang::where('satuan_id', 1)->get()->pluck('nama', 'id')\n );\n $form->currency('b_pengiriman', __('Pengiriman'))->symbol('Rp');\n $form->currency('b_keamanan', __('Keamanan'))->symbol('Rp');\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Formulario());\n\n $form->text('name', 'Nombre')\n ->required()\n ->creationRules(['required', \"unique:formularios\"])\n ->updateRules(['required', \"unique:formularios,name,{{id}}\"]);\n $form->text('description', 'Descripción');\n\n $fields = Field::all()->pluck('name', 'id')->toArray();\n $form->multipleSelect('fields', 'Campos')->options($fields);\n\n $forms = Formulario::all()->pluck('name', 'id')->toArray();\n $form->select('go_to_formulario', 'Continuar a formulario')->options($forms);\n\n $form->divider('Quiénes tienen acceso a este Formulario?');\n\n $permissions = Permission::all()->pluck('name', 'id')->toArray();\n $form->multipleSelect('permissions', 'Permisos')->options($permissions);\n\n $roles = Role::all()->pluck('name', 'id')->toArray();\n $form->multipleSelect('roles', 'Roles')->options($roles);\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Config);\n\n $form->text('key', '配置项')->readOnly();\n\n $form->text('value', '值');\n\n $form->text('desc', '描述');\n\n $form->tools(function(Form\\Tools $tools) {\n $tools->disableView();\n });\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new User());\n\n $form->mobile('phone', __('手机号'));\n $form->text('uname', __('姓名'));\n $form->text('wechat', __('微信号'));\n $form->text('phonenumber', __('联系电话'));\n $form->text('position', __('岗位'));\n $form->text('company', __('公司'));\n $form->switch('role', __('角色'));\n $form->switch('state', __('核实状态'));\n $form->datetime('create_date', __('创建时间'))->default(date('Y-m-d H:i:s'));\n // $form->text('openid', __('Openid'));\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new CompanyCulture());\n\n $form->text('name', '企业名称')->rules('required');\n $form->text('en_name', '企业名称(en)')->rules('required');\n $form->image('image_url', '图片')->rules('required|image');\n $form->editor('content', '内容')->rules('required');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`列表`按钮\n $tools->disableList();\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }",
"private function makeform() {\n\tglobal $qqi;\n\t\n\t$form=new llform($this,'form');\n\t$form->addFieldset('d','');\n\t$form->addControl('d',new ll_listbox($form,'users','Users'));\n\t$form->addControl('d',new ll_button($form,'allusers','Select All','button'));\n\t$form->addControl('d',new ll_listbox($form,'functions','Functions'));\n\t$form->addControl('d',new ll_button($form,'allfunctions','Select All','button'));\n\t$rg=new ll_radiogroup($form,'showby');\n\t\t$rg->addOption('byusers','Rows of Users');\n\t\t$rg->addOption('byfunctions','Rows of Functions');\n\t\t$rg->setValue('byfunctions');\n\t$form->addControl('d',$rg);\t\n\t$form->addControl('d',new ll_button($form,'update','Update Display','button'));\n\treturn $form;\n}",
"public static function builder() {\n\t\treturn new Builder();\n\t}",
"protected function form()\n {\n $form = new Form(new SiteHelp);\n\n $form->select('site_help_category_id', __('site-help::help.site_help_category_id'))\n ->options(SiteHelpCategory::pluck('name', 'id'));\n $form->text('title', __('site-help::help.title'));\n $form->number('useful', __('site-help::help.useful'))->default(0);\n $form->textarea('desc', __('site-help::help.desc'));\n $form->image('thumbnail', __('site-help::help.thumbnail'))\n ->removable()\n ->uniqueName()\n ->move('site-help');\n $form->UEditor('content', __('site-help::help.content'));\n $form->select('status', __('site-help::help.status.label'))\n ->default(1)\n ->options(__('site-help::help.status.value'));\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Site);\n\n $form->select('category_id', '分类')->options(SiteCategory::selectOptions(null, ''))->rules('required');\n $form->text('title', '标题')->attribute('autocomplete', 'off')->rules('required|max:50');\n $form->image('thumb', '图标')->resize(120, 120)->uniqueName();\n $form->text('describe', '描述')->attribute('autocomplete', 'off')->rules('required|max:300');\n $form->url('url', '地址')->attribute('autocomplete', 'off')->rules('required|max:250');\n $this->disableFormFooter($form);\n return $form;\n }",
"public function builder()\n\t{\n\t\t$builder = new Builder($this->request);\n\t\treturn $builder;\n\t}",
"protected function form()\n {\n $form = new Form(new Code());\n\n $form->mobile('phone', __('Phone'));\n $form->number('code', __('Code'));\n $form->ip('ip', __('IP'));\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Terrace());\n\n $form->image('image', __('平台图片'))->rules('required', ['required' => '平台图片不能为空']);\n $form->text('name', __('平台名称'))->rules('required', ['required' => '平台名称不能为空']);\n $form->text('path', __('外链'))->rules('required', ['required' => '平台外链不能为空']);\n $form->text('notice_info', __('提示语'))->rules('required', ['required' => '平台提示语不能为空']);\n $form->radio('status','状态')->options(['1' => '未推荐', '2'=> '已推荐'])->default(1);\n\n return $form;\n }",
"public function buildForm()\n {\n }",
"protected function form()\n {\n $this->opt();\n $form = new Form(new ComDep);\n\n $form->text('alias', 'Alias');\n $form->text('name', 'Name');\n $form->select('company_id', 'Company')->options($this->optcom);\n $form->select('id_com_dep_admin', 'Company department admin')->options($this->optcomdep);\n $form->select('service_type_id', 'Service type')->options($this->optsertype);\n $form->textarea('info', 'Info');\n $form->textarea('info_for_vp_admin', 'Info for vp admin');\n $form->text('address', 'Address');\n $form->textarea('info_station', 'Info station');\n $form->text('telephone', 'Telephone');\n $form->text('e_mail', 'E mail');\n $form->text('class', 'Class');$form->saving(function (Form $form) {\n $form->model()->id_admin_add=Admin::user()->id;\n });\n\n return $form;\n }",
"abstract function builder_form(): string;",
"public function toForm(){\n return $this->form_builder()->form();\n }",
"public function build() { $this->form_built = TRUE; return $this; }",
"public function getFormBuilder()\n {\n return $this['form.factory'];\n }",
"public static function builder();",
"protected function form()\n {\n $form = new Form(new Order);\n\n\n\n return $form;\n }",
"protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }",
"protected function form()\n {\n $form = new Form(new Cases);\n\n $form->select('cate_id', '分类')->options('/admin/api/getcasecate');\n $form->select('algw_id', '顾问')->options('/admin/api/getgw');\n $form->text('title', '标题');\n $form->text('keywords', 'SEO关键字');\n $form->text('description', 'SEO描述');\n $form->text('desc', '副标题');\n $form->text('author', '来源');\n $form->radio('is_tj', '推荐')->options([0=>'否',1=>'是']);\n $form->image('thumb', '缩略图')->uniqueName();\n $form->editor('data', '详情');\n\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new WechatUser);\n\n $form->text('nick_name', __('昵称'));\n $form->text('name', __('用户名'));\n $form->password('password', __('密码'));\n $form->mobile('mobile', __('手机号'));\n $form->text('mini_program_open_id', __('OpenId'));\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Goods);\n\n $form->text('title', trans('admin.title'))->required()->rules('required');\n $form->text('slogan', trans('admin.slogan'))->required()->rules('required');\n $form->text('name', trans('admin.name'))->required()->rules('required');\n $form->decimal('price', trans('admin.price'))->required()->rules('required');\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n return $form;\n }",
"public function createForm();",
"public function createForm();",
"protected function form()\n {\n $form = new Form(new BuSong);\n\n// $form->number('serialid', __('Serialid'));\n $form->text('svrkey', __('svrkey'));\n $form->text('songname', __('歌名'));\n $form->text('singer', __('歌星'));\n $form->select('langtype', __('语种'))->options([0=>'国语',1=>'粤语',2=>'英语',3=>'台语',4=>'日语',5=>'韩语',6=>'不详']);\n $form->text('remarks', __('备注'));\n $form->datetime('createdate', __('创建时间'))->default(date('Y-m-d H:i:s'));\n $form->select('ischeck', __('是否检查'))->options([0=>'否',1=>'是']);\n $form->select('buState', __('状态'))->options([0=>'新增',1=>'处理中',2=>'完成',3=>'歌曲信息出错',4=>'取消无法处理',5=>'已上传',6=>'彻底删除']);\n $form->text('musicdbpk', __('musicdbpk'));\n $form->text('optionRemarks', __('操作日志'));\n\n return $form;\n }",
"protected function form()\n {\n return Form::make(new Liuchengku(), function (Form $form) {\n\t\t\t$form->display('id');\n\t\t\t$form->text('brand','品牌名称')->required();\n\t\t\t$form->tab('加盟流程', function (Form $form) {\n\t\t\t\t $form->textarea('jmlc','加盟流程')->rows(12);\n\t\t\t\t /* $form->editor('jmlc','加盟流程')->options([\n\t\t\t\t\t//'toolbar' => ['undo redo | styleselect | bold italic | link image',],\n\t\t\t\t\t'toolbar' => [],\n\t\t\t\t]); */\n\t\t\t\t})->tab('加盟支持', function (Form $form) {\n\t\t\t\t $form->editor('jmzc','加盟支持');\n\t\t\t\t})->tab('加盟优势', function (Form $form) {\n\t\t\t\t $form->editor('jmys','加盟优势');\n\t\t\t\t});\n //$form->text('type');\n //$form->text('retype');\n\t\t\t//$form->text('is_make');\n\t\t\t//$form->text('user_id');\n $form->hidden('user_id');\n\t\t\t$form->hidden('is_make');\n\t\t\t$form->display('created_at');\n $form->display('updated_at');\n $form->saving(function (Form $form) {\n if ($form->isCreating()) {\n $form->user_id=Admin::user()->id;\n\t\t\t\t\t$form->is_make=1;\n\t\t\t\t\t}\n });\n });\n }",
"abstract public function createForm();",
"abstract public function createForm();",
"protected function form()\n {\n $form = new Form(new Direction());\n\n $form->text('name', __(trans('hhx.name')));\n $form->text('intro', __(trans('hhx.intro')));\n $form->image('Img', __(trans('hhx.img')))->move('daily/direction')->uniqueName();\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.status'));;\n $form->number('order_num', __(trans('hhx.order_num')));\n $form->hidden('all_num', __(trans('hhx.all_num')))->default(0.00);\n $form->decimal('stock', __(trans('hhx.stock')));\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Engine());\n\n $form->text('name', __('Name'))\n ->required();\n $form->select('power_station_id', __('Power station'))\n ->options(PowerStation::all()->pluck('name', 'id'))\n ->required();\n $form->image('photo', __('Photo'));\n $form->textarea('details', __('Details'));\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Dictionary());\n $form->disableViewCheck();\n $form->disableEditingCheck();\n $form->disableCreatingCheck();\n\n\n $form->select('type', __('Type'))->options(Dictionary::TYPES);\n $form->text('option', __('Title'))->required();\n $form->text('slug', __('Slug'))->rules('nullable|regex:/(\\w\\d\\_)*/', [\n 'regex' => 'Только латинские буквы и знаки подчеркивания',\n ]);\n $form->text('alternative', __('Alternative'));\n $form->switch('approved', __('Approved'))->default(1);\n $form->number('sort', __('Sort'));\n\n $form->saving(function (Form $form) {\n if ($form->slug === null) {\n $form->slug = Str::slug($form->option);\n }\n });\n return $form;\n }",
"protected function buildForm()\n {\n $this->formBuilder\n ->add('host', 'text', array(\n 'data' => ElasticProduct::getConfigValue('host'),\n 'required' => false,\n 'attr' => ['placeholder' => 'localhost'],\n 'label' => Translator::getInstance()->trans('Host', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'host'\n )\n ))\n ->add('port', 'text', array(\n 'data' => ElasticProduct::getConfigValue('port'),\n 'required' => false,\n 'attr' => ['placeholder' => '9200'],\n 'label' => Translator::getInstance()->trans('Port', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'port'\n )\n ))\n ->add('username', 'text', array(\n 'data' => ElasticProduct::getConfigValue('username'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Username', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'username'\n )\n ))\n ->add('password', PasswordType::class, array(\n 'data' => ElasticProduct::getConfigValue('password'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Password', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'password'\n )\n ))\n ->add('index_prefix', 'text', array(\n 'data' => ElasticProduct::getConfigValue('index_prefix'),\n 'required' => false,\n 'attr' => ['placeholder' => 'my_website_name'],\n 'label' => Translator::getInstance()->trans('Index prefix', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'index_prefix'\n )\n ));\n }",
"protected function form()\n {\n $form = new Form(new Usertype());\n\n $form->text('usertype', '类型名称')->rules('required|max:10');\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableList();\n $tools->disableDelete();\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n $footer->disableReset();\n $footer->disableViewCheck();\n $footer->disableEditingCheck();\n $footer->disableCreatingCheck();\n });\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Category);\n\n $form->text('name', 'Имя');\n\n $form->textarea('text');\n\n $form->switch('status', 'Статус')->states([\n 'on' => ['value' => '1', 'text' => 'Публиковать', 'color' => 'success'],\n 'off' => ['value' => '0', 'text' => 'Не публиковать', 'color' => 'danger'],\n ]);\n\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Member);\n\n $form->text('open_id', 'Open id');\n $form->text('wx_open_id', 'Wx open id');\n $form->text('access_token', 'Access token');\n $form->number('expires', 'Expires');\n $form->text('refresh_token', 'Refresh token');\n $form->text('unionid', 'Unionid');\n $form->text('nickname', 'Nickname');\n $form->switch('subscribe', 'Subscribe');\n $form->switch('sex', 'Sex');\n $form->text('headimgurl', 'Headimgurl');\n $form->switch('disablle', 'Disablle');\n $form->number('time', 'Time');\n $form->mobile('phone', 'Phone');\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Enseignant());\n\n $form->text('matricule', __('Matricule'));\n $form->text('nom', __('Nom'));\n $form->text('postnom', __('Postnom'));\n $form->text('prenom', __('Prenom'));\n $form->text('sexe', __('Sexe'));\n $form->text('grade', __('Grade'));\n $form->text('fonction', __('Fonction'));\n\n return $form;\n }",
"public function createBuilder();",
"protected function form()\n {\n $form = new Form(new News);\n\n $form->text('title', '题目');\n // $form->number('category_id', '分类');\n $form->select('category_id','分类')->options('/api/admin_categories');\n // $form->textarea('content', 'Content');\n $form->ueditor('content','新闻内容')->rules('required');\n // $form->text('thumbnail', '封面图');\n $form->image('thumbnail', '封面图')->move('public/uploads/thunbnails');\n $form->number('status', '状态');\n $form->number('read_count', '阅读次数');\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Good);\n $form->text('name', __('名称'))->rules('required');\n $form->decimal('amount', __('价格'))->default(0.00)->rules('required');\n $form->text('unit', __('单位'))->rules('required');\n $form->image('list_img', __('缩略图(320*320)'))->creationRules('required');\n $form->hasMany('goodsimgs', __('轮播图(640*640)'),function(Form\\NestedForm $form){\n $form->image('img',__('轮播图'))->creationRules('required');\n });\n $form->kindeditor('describe', __('描述'));\n // 去掉`查看`checkbox\n $form->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $form->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $form->disableCreatingCheck();\n return $form;\n }",
"static public function builder(): Builder\n {\n return new Builder;\n }",
"protected function form()\n {\n $form = new Form(new Order());\n\n $form->switch('paid', __('Paid'));\n $form->datetime('reservation_expires', __('Reservation expires'))->default(date('Y-m-d H:i:s'));\n $form->decimal('price', __('Price'));\n\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableView();\n });\n\n\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Customer);\n\n $form->text('code', '客户编号');\n $form->text('name', '客户名称');\n// $form->text('openid', '客户openid');\n $form->text('contactor', '联系人');\n $form->text('tel', '联系电话');\n $form->email('email', '邮箱');\n $form->text('address', '地址');\n $form->decimal('receivables', '应收账款数字')->default(0.00);\n $form->text('fax', '传真');\n $form->switch('is_delete', '是否删除');\n\n return $form;\n }",
"protected function makeFormCreator()\n {\n if ($this->isTestMode()) {\n return null;\n }\n\n if (empty($this->formConfiguration)) {\n throw new BadMethodCallException(\n 'Please define the form configuration to use via $this->setFormConfiguration().', 1333293139\n );\n }\n\n \\tx_rnbase::load(\\tx_mkforms_forms_Factory::class);\n $form = \\tx_mkforms_forms_Factory::createForm(null);\n\n /**\n * Configuration instance for plugin data. Necessary for LABEL translation.\n *\n * @var \\tx_rnbase_configurations $pluginConfiguration\n */\n $pluginConfiguration = \\tx_rnbase::makeInstance(tx_rnbase_configurations::class);\n $pluginConfiguration->init($this->conf, $this->cObj, 'mkforms', 'mkforms');\n\n // Initialize the form from TypoScript data and provide configuration for the plugin.\n $form->initFromTs(\n $this, $this->formConfiguration,\n ($this->getObjectUid() > 0) ? $this->getObjectUid() : false,\n $pluginConfiguration, 'form.'\n );\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Specialization);\n\n $form->text('full_name', 'Полное найменование')->rules('required|max:255');\n $form->text('short_name', 'Краткое найменование')->rules('required|max:255');\n $form->text('code', 'Код специальности')->rules('nullable|max:100');\n $form->select('cathedra_id', 'Кафедра')->options(Cathedra::all()->pluck('name', 'id'))\n ->rules('required|numeric|exists:cathedras,id');\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Good);\n\n $form->hidden('group_id')->value(session('group_id'));\n $form->text('name', __('Наименование'));\n $form->text('size', __('Объем/кол-во'));\n $form->decimal('price', __('Цена'))->default(0);\n $form->image('file', 'Фото');\n\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Project());\n $form->text('name', '项目名称')->rules('required')->required();\n $form->url('url', '项目地址')->rules('required')->required();\n $form->text('username', '账号');\n $form->text('password', '密码');\n $status = [\n 'on' => ['value' => 1, 'text' => '启用', 'color' => 'success'],\n 'off' => ['value' => 2, 'text' => '禁用', 'color' => 'danger'],\n ];\n $form->switch('status', '状态')->states($status)->default(1);\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n $footer->disableReset();\n $footer->disableViewCheck();\n $footer->disableEditingCheck();\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Sections());\n\n $form->text('name', __('Nazwa'));\n $form->text('pageId', __('ID sekcji (w sensie HTML)'));\n $form->textarea('content', __('Zawartość'));\n $form->textarea('style', __('Style(CSS'));\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Order);\n\n $form->text('no', 'No');\n $form->number('user_id', 'User id');\n $form->textarea('address', 'Address');\n $form->decimal('total_amount', 'Total amount');\n $form->textarea('remark', 'Remark');\n $form->datetime('paid_at', 'Paid at')->default(date('Y-m-d H:i:s'));\n $form->text('payment_method', 'Payment method');\n $form->text('payment_no', 'Payment no');\n $form->text('refund_status', 'Refund status')->default('pending');\n $form->text('refund_no', 'Refund no');\n $form->switch('closed', 'Closed');\n $form->switch('reviewed', 'Reviewed');\n $form->text('ship_status', 'Ship status')->default('pending');\n $form->textarea('ship_data', 'Ship data');\n $form->textarea('extra', 'Extra');\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new TagModel);\n\n $form->text('tag_name', 'Tag name');\n $form->number('tag_id', 'Tag id');\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new GoodsModel);\n\n $form->select('cid', __('分类'))->options(CategoryModel::selectOptions());\n $form->text('goods_name', __('Goods name'));\n $form->image('goods_img', __('Goods img'));\n $form->textarea('content', __('Content'));\n $form->number('goods_pricing', __('Goods pricing'));\n $form->number('goods_price', __('Goods price'));\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Boarding()); \n \n $form->select('pet_id',__('Pet Name'))->options(Pet::all()->pluck('name','id'))->rules('required');\n $form->select('reservation_id',__('Reservation'))->options(Reservation::all()->pluck('date','id'))->rules('required');\n $form->select('cage_id',__('Available Cages'))->options(Cage::get()->where(\"availability\",\"Available\")->pluck('id','id'))->rules('required');\n $form->datetime('end_date', __('End date'))->default(date('Y-m-d H:i:s'))->rules('required');\n \n return $form; \n }",
"protected function form()\n {\n $form = new Form(new UsersOpenclose);\n\n $form->text('srvkey', __('srvkey'));\n $form->text('KtvBoxid', __('机器码'));\n $form->datetime('opendate', __('开房时间'))->default(date('Y-m-d H:i:s'));\n $form->datetime('closedate', __('关房时间'))->default(date('Y-m-d H:i:s'));\n $form->select('feesmode', __('收费模式'))->options([0=>'非扫码收费',1=>'扫码收费']);\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Member());\n\n $form->text('open_id', __('微信openid'));\n $form->image('head', __('头像'));\n $form->text('nickname', __('昵称'));\n $form->mobile('mobile', __('手机号码'));\n $form->text('email', __('邮箱'));\n $form->text('name', __('姓名'));\n $form->text('weixin', __('微信号'));\n $form->text('qq', __('qq'));\n $form->text('city', __('所在城市'));\n $form->text('yidudian', __('易读点'));\n $form->text('integral', __('积分'));\n $form->text('balance', __('余额'));\n $states = [\n 'on' => ['value' => 1, 'text' => '正常', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '冻结', 'color' => 'danger'],\n ];\n $form->switch('status', '是否使用')->states($states);\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Movie());\n\n $form->text('title', __('名字'));\n $form->number('director', __('导演'));\n $form->text('describe', __('简介'));\n $form->number('rate', __('评价'));\n $form->switch('released', __('是否上映'));\n $form->datetime('release_at', __('发行时间'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new RequestForConfirmation());\n\n $form->switch('status', __('Status'));\n $form->text('comment', __('Comment'));\n $form->select('user_id', __('User id'))->options(User::all()->pluck('name', 'id'))->required();\n $form->select('project_id', __('Project id'))->options(Project::all()->pluck('project_name', 'id'))->required();\n\n\n return $form;\n }",
"public function create(): Form\n {\n $form = new Form();\n \n return $form;\n }",
"protected function form()\n {\n $form = new Form(new $this->currentModel);\n \n $form->display('id', 'ID');\n $form->select('company_id', '公司名称')->options(Company::getSelectOptions());\n $form->text('project_name', '项目名称');\n $form->image('project_photo', '项目图片')->uniqueName()->move('public/photo/images/custom_thum/');\n $form->url('link_url', '项目链接');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1'=> '保密'])->default('0');\n //$form->display('created_at', 'Created At');\n //$form->display('updated_at', 'Updated At');\n\n return $form;\n }",
"public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }",
"protected function form()\n {\n $form = new Form(new Platform());\n\n $form->text('platform_number', __('Platform number'))\n ->creationRules(['required', 'max:30', 'unique:platforms'])\n ->updateRules(['required', 'max:30']);\n $form->text('platform_name', __('Platform name'))\n ->creationRules(['required', 'max:30', 'unique:platforms'])\n ->updateRules(['required', 'max:30']);\n\n $form->footer(function ($footer){\n $footer->disableEditingCheck();\n });\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new User);\n\n// $form->number('role_id', 'Role id');\n $form->text('name', 'Name');\n// $form->email('email', 'Email');\n// $form->image('avatar', 'Avatar')->default('users/default.png');\n// $form->password('password', 'Password');\n// $form->text('remember_token', 'Remember token');\n// $form->textarea('settings', 'Settings');\n $form->text('username', 'Username');\n// $form->text('access_token', 'Access token');\n// $form->text('no_hp', 'No hp');\n// $form->number('location_id', 'Location id');\n// $form->switch('gender', 'Gender')->default(1);\n\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Carousel);\n\n $form->select('carousel_category_id', __('carousel::carousel.carousel_category_id'))\n ->options(CarouselCategory::all()->pluck('name', 'id'));\n $form->text('title', __('carousel::carousel.title'));\n $form->text('url', __('carousel::carousel.url'));\n $form->image('img_src', __('carousel::carousel.img_src'))\n ->removable()\n ->uniqueName()\n ->move('carousel');\n $form->text('alt', __('carousel::carousel.alt'));\n $form->textarea('remark', __('carousel::carousel.remark'));\n $form->select('status', __('carousel::carousel.status.label'))\n ->default(1)\n ->options(__('carousel::carousel.status.value'));\n $form->datetime('start_time', __('carousel::carousel.start_time'))\n ->default(date('Y-m-d H:i:s'));\n $form->datetime('end_time', __('carousel::carousel.end_time'))\n ->default(date('Y-m-d H:i:s'));\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Setting());\n\n $form->decimal('member_fee', __('会员年费'))->required();\n $form->decimal('task_rate', __('任务佣金抽成比例'))->required()->help('将扣除对应比例,比例范围0-1');\n $form->tools(function (Form\\Tools $tools) {\n\n // 去掉`列表`按钮\n $tools->disableList();\n\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n $footer->disableReset();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n //保存后回调\n $form->saved(function (Form $form) {\n $success = new MessageBag([\n 'title' => '提示',\n 'message' => '保存成功',\n ]);\n\n return back()->with(compact('success'));\n });\n return $form;\n }",
"protected function form()\n {\n return new Form(new Attention);\n }",
"protected function form()\n {\n $form = new Form(new Purchase());\n if ($form->isCreating()) {\n $form->select('consumer_id', \"客户\")->options(Consumer::all()->pluck('full_name', 'id'))->required();\n $form->select('house_id', \"购买房源\")->options(House::purchasable()->pluck('readable_name', 'id'))->required();\n }\n $form->datetime('started_at', \"生效日期\");\n $form->datetime('ended_at', \"结束日期\");\n $form->select('sell_type', \"出售方式\")->options(Purchase::$type)->required();\n $form->currency('price', \"成交价格\")->symbol('¥')->required();\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Drug);\n\n $form->text('street_name', '«Уличное» название');\n $form->text('city', 'Город');\n $form->text('active_substance', 'Активное вещество');\n $form->text('symbol', 'Символ');\n $form->text('state', 'Состояние');\n $form->text('color', 'Цвет');\n $form->text('inscription', 'Надпись');\n $form->text('shape', 'Форма');\n $form->text('weight', 'Вес таблетки');\n $form->text('weight_active', 'Вес действующего вещества');\n $form->text('description', 'Описание');\n $form->text('negative_effect', 'Негативный эффект');\n $form->switch('confirm', 'Подтверждение');\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Room);\n\n if ($form->isEditing())\n $form->display('id', 'ID');\n\n $form->text('name', 'Nama');\n $form->select('room_type_id', 'Tipe Ruangan')->options(function ($id) {\n return RoomType::all()->pluck('name', 'id');\n });\n $form->slider('max_people', 'Maksimal Orang')->options([\n 'min' => 1,\n 'max' => 100,\n 'from' => 20,\n 'postfix' => ' orang'\n ]);\n $form->radio('status', 'Status')->options(RoomStatus::asSelectArray())->stacked();\n $form->textarea('notes', 'Catatan');\n\n if ($form->isEditing()) {\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n }\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new WechatEvent);\n\n $form->text('title', '事件标题')->help('起说明性作用');\n $form->text('key', 'Key')->default(md5(time()));\n $form->select('event', '事件类型')->options(WechatEvent::EVENTLIST);\n $form->text('method', '执行方法')->help('namespace\\\\class@method');\n $form->select('wechat_message_id', '消息')->options(WechatMessage::select('id', 'title')->pluck('title', 'id'));\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new User());\n\n $form->text('name', __('Name'));\n $form->email('email', __('Email'));\n $form->datetime('email_verified_at', __('Email verified at'))->default(date('Y-m-d H:i:s'));\n $form->password('password', __('Password'));\n $form->text('remember_token', __('Remember token'));\n $form->decimal('point', __('Point'))->default(0.000);\n $form->switch('status', __('field.status'));\n\n return $form;\n }",
"public function builder()\n {\n return new Builder($this);\n }",
"protected function form()\n {\n $form = new Form(new ThemePoster());\n\n $form->select('domain_id', __('domain_id'))->options(DomainConfig::getDomainMap())->rules('required');\n $form->radio('type', __('type'))->options(ThemePoster::getTypeMap())->when(1, function (Form $form){\n $form->select('type_id', __('type_id'))->options(array_merge(['0' => '总列表'], Product::getCategoryMap()->toArray()))->rules('required');\n\n })->when(2, function (Form $form){\n $form->select('type_id', __('type_id'))->options(array_merge(['0' => '总列表'], Article::getCategoryMap()))->rules('required');\n\n });\n $form->text('title', __('title'))->rules('required');\n $form->text('alt', __('alt'))->rules('required');\n $form->image('site', '图片尺寸 1600*300')\n ->uniqueName()\n ->rules('required|max:150')->resize(1600, 300);\n $form->url('link', __('link'));\n $form->switch('is_show', __('is_show'));\n\n return $form;\n }",
"public function getBuilder();",
"protected function form()\n {\n return Form::make(new Linkman(), function (Form $form) {\n $form->display('id');\n $form->text('name');\n $form->text('mobile')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('gender');\n $form->text('birthday')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('province_id');\n $form->text('city_id');\n $form->text('area_id');\n $form->text('address')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('description');\n $form->text('nickname')->saving(function ($value) {\n return (string) $value;\n });\n \n $form->display('created_at');\n $form->display('updated_at');\n });\n }",
"function buildForm(){\n\t\t# menampilkan form\n\t}",
"protected function form()\n {\n\n $form = new Form(new Goods);\n\n //分类树形\n $cateTree = getTree(Category::all()->where('is_show',1)->toArray());\n $cate_map = [];\n foreach ($cateTree as $key => $value) {\n $cate_map[$value['id']] = str_repeat('  ',$value['level']).$value['title'];\n }\n\n $form->display('id', 'ID');\n $form->select('cate_id', '分类')->rules('required')->options($cate_map);\n $form->text('name', '商品')->rules('required')->attribute(['autocomplete' => 'off']);\n $form->textarea('remark', '备注');\n $states = [\n 'on' => ['value' => 1, 'text' => '是', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '否', 'color' => 'danger'],\n ];\n $form->switch('is_valid',trans('admin.is_show'))->states($states)->default(1);\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n $form->hidden('operated_admin_id')->value(Admin::user()->id);\n $form->hidden('hos_id')->value(session('hos_id'));\n\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Posts);\n\n $form->text('title', 'Title');\n $form->text('content', 'Content');\n $form->text('video_url', 'Video url');\n $form->switch('status', '审核状态')->states( [ \n 'off' => ['value' => 0, 'text' => '禁止', 'color' => 'primary'],\n 'on' => ['value' => 1, 'text' => '通过', 'color' => 'default']\n ]);\n $form->number('content_type', 'Content type');\n $form->number('member_id', 'Member id');\n return $form;\n }"
] | [
"0.7876884",
"0.7563207",
"0.7518167",
"0.7356229",
"0.7287756",
"0.7230112",
"0.71921307",
"0.7176219",
"0.71556574",
"0.71318495",
"0.7072142",
"0.70605636",
"0.70538306",
"0.70511967",
"0.70281005",
"0.70109546",
"0.700963",
"0.7000893",
"0.699135",
"0.6986861",
"0.6979974",
"0.6975677",
"0.6967696",
"0.69618577",
"0.6958165",
"0.6932718",
"0.6931257",
"0.69268525",
"0.69261456",
"0.6919133",
"0.6898824",
"0.6896308",
"0.6895907",
"0.68850464",
"0.68820494",
"0.68767923",
"0.6873939",
"0.6855952",
"0.68555087",
"0.684766",
"0.6846724",
"0.6843792",
"0.683849",
"0.6837029",
"0.68360937",
"0.6835654",
"0.68338263",
"0.68321586",
"0.68261683",
"0.68261683",
"0.68253165",
"0.6821316",
"0.6811116",
"0.6811116",
"0.6809404",
"0.68068945",
"0.67969346",
"0.6794034",
"0.67930216",
"0.67898595",
"0.6786553",
"0.6786533",
"0.6780389",
"0.6777887",
"0.6768574",
"0.6764771",
"0.6762455",
"0.6762416",
"0.6759921",
"0.6754496",
"0.67458314",
"0.6744613",
"0.67419064",
"0.6731701",
"0.6729932",
"0.6726232",
"0.6722076",
"0.6716024",
"0.6714663",
"0.6714286",
"0.6714119",
"0.6712684",
"0.67061925",
"0.67027384",
"0.6702656",
"0.66966575",
"0.66858375",
"0.6681371",
"0.66798395",
"0.6678209",
"0.6674076",
"0.6670792",
"0.66697335",
"0.6669309",
"0.6668735",
"0.66635114",
"0.6654671",
"0.6648014",
"0.66414875",
"0.6639264",
"0.66366684"
] | 0.0 | -1 |
Display a listing of the resource. GET /chats | public function index()
{
$pusher = $this->pusher;
$this->pusher->trigger('demoChannel', 'userNewMessage', ['message'=>'hello world']);
if(Input::has('get')) {
if(Input::get('get')=='channels') {
return json_decode($this->pusher->get('/channels/demoChannel/users'));
}
}
return View::make('chats.index', compact('pusher'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getChats()\n {\n return $this->doRequest('GET', 'chats', []);\n }",
"public function index()\n {\n $services = $this->client->chat->v2->services->read();\n $channels = array();\n $userChannels = array();\n if ($services) {\n $channels = $this->client->chat->v2->services($services[0]->sid)->channels->read();\n if (Session::has('user')) {\n $userChannels = $this->client->chat->v2->services($services[0]->sid)->users(Session::get('user.sid'))->userChannels->read();\n }\n }\n return view('chats.index', compact('channels', 'userChannels'));\n }",
"public function index()\n {\n return Inertia::render('User/Chats/Index', [\n 'chats' => Chat::get()\n ]);\n }",
"public function index()\n {\n $chats = Chat::where('read_admin', false)->groupBy('user_id')->orderBy('created_at', 'desc')->get();\n return view('chats.index', compact('chats'));\n }",
"public function actionChats()\n {\n $last_id = Yii::$app->request->get('lastID', 0);\n $query = UserChatMessage::find()->where([\n '>',\n 'id',\n $last_id\n ]);\n \n $response = [];\n foreach ($query->all() as $entry) {\n $response[] = [\n 'id' => $entry->id,\n 'message' => $entry->message,\n 'author' => [\n 'name' => $entry->user->displayName,\n 'gravatar' => $entry->user->getProfileImage()->getUrl(),\n 'profile' => Url::toRoute([ \n '/user/profile',\n 'uguid' => $entry->user->guid\n ])\n ],\n 'time' => [\n 'hours' => Yii::$app->formatter->asTime($entry->created_at, 'php:H'),\n 'minutes' => Yii::$app->formatter->asTime($entry->created_at, 'php:i')\n ]\n ];\n }\n Yii::$app->response->format = 'json';\n return $response;\n }",
"public function index()\n {\n return view('chats.chat');\n }",
"public function index()\n {\n $chats = DB::table('chats')->where('author', '=', Auth::user()->email)->orWhere('sendto', '=', Auth::user()->email);\n return view('Chat', compact('chats'));\n }",
"public function index()\n {\n $user_id = auth()->user()->id;\n\n $send = auth()->user()->talkedTo()->get();\n \n\n \n $chat = auth()->user()->allmyChats();\n if($chat == null){\n return response()->json(['success' => false, 'message' => 'No chat history'], 401); \n }\n return new ChatCollection($chat);\n \n \n //return response()->json(['success' => true, 'chats' => $chat]);\n }",
"public function index(Project $project)\n\t{\n\t\treturn $project->chats;\n\t}",
"public function index()\n {\n $chats = PublicChat::all();\n return view('chatPublic',['chats' => $chats]);\n }",
"public function show($id)\n {\n return $this->chats->findOrFail($id);\n }",
"public function index()\n {\n $channels = Channel::all();\n\n return view('channel/list')->with('channels', $channels);\n }",
"public function chatList(GetChatListRequest $request)\n {\n $chats = Chat::groupChatByFrom($request->input('from'))\n ->filterByToName($request->input('name'))\n ->orderByDesc('id')\n ->get();\n\n return ChatResource::collection($chats);\n }",
"public function actionIndex() {\n\t\t$searchModel = new WechatsSearch ();\t\n\t\t$dataProvider = $searchModel->search ( Yii::$app->request->queryParams );\n\t\t\n\t\treturn $this->render ( 'index', [ \n\t\t\t\t'searchModel' => $searchModel,'dataProvider' => $dataProvider \n\t\t] );\n\t}",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $chatMessages = $em->getRepository('ReclamationBundle:ChatMessage')->findAll();\n\n return $this->render('chatmessage/index.html.twig', array(\n 'chatMessages' => $chatMessages,\n 'page_title' => 'Chat'\n ));\n }",
"public function index(int $id): string\n {\n return $this->service->getChatsOfUser($id);\n }",
"public function index()\n {\n $ads = ChatRoom::with('autochat')->get();\n $data = json_decode($ads);\n return view('superadmin::autochat.index', compact('data'));\n }",
"public function index()\n {\n $user = \\Auth::guard('api')->user();\n\n $lists = \\Acelle\\Model\\Campaign::getAll()\n ->select('uid', 'name', 'type', 'subject', 'html', 'plain', 'from_email', 'from_name', 'reply_to', 'status', 'delivery_at', 'created_at', 'updated_at')\n ->where('customer_id', '=', $user->customer->id)\n ->get();\n\n return \\Response::json($lists, 200);\n }",
"public function getChats()\n {\n return $this->hasMany(Chat::className(), ['user_id' => 'id']);\n }",
"public function index()\n {\n return Channel::all();\n }",
"public function index(){\n $chatters = DB::table('users')\n ->orderBy('name', 'asc')\n ->get();\n return view('home', [\"chatters\" => $chatters]);\n }",
"public function index()\n {\n $channels = Channels::paginate(6);\n return view('channels.index_channels')->with('channels',$channels);\n }",
"public function index()\n {\n $channels = Channel::all();\n return view('home.channels.index', compact('channels'));\n }",
"public function directchatmessagesAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $chatMessages = $em->getRepository('ReclamationBundle:ChatMessage')->findAll();\n\n return $this->render('chatmessage/direct_chat_messages.html.twig', array(\n 'chatMessages' => $chatMessages,\n 'page_title' => 'Chat'\n ));\n }",
"public function chat_roomsAction()\n\t{\n\t\t$user = $this->user;\n $user_id = $user['id'];\n $application_id = $user['Application_ID'];\n\n $user = UsersMobile::findFirst($user_id);\n\n $cms = $user->getCms([\n \t\"secured = 0 AND application_id = {$application_id}\"\n \t]);\n\n $data = [];\n\t\tforeach ($cms as $key => $chat) {\n\t\t\t$data[\"messages\"][$key][\"name\"] = $chat->title;\n\t\t\t$data[\"messages\"][$key][\"created_at\"] = $chat->datetime;\n\t\t\t$data[\"messages\"][$key][\"id\"] = $chat->id;\n\t\t}\n\n\t\t$final_array = $this->structureMessages($data[\"messages\"]);\n\n\t\t$response = [\n \t\"status\" => $this->apiFactory->getStatus(200, \"Success\"),\n \t\"data\" => $final_array\n ];\n\n return $this->sendJson($response);\n\t}",
"public function index()\n {\n $users= User::all();\n return view('chat.index')->with('users', $users);\n }",
"public function actionIndex()\n {\n $searchModel = new TblchannelsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->query->orderBy(['updated_at'=>SORT_DESC])->all();\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index(Request $request)\n {\n $this->authorizeForUser($request->user('api'),'viewAny', Chatroom::class);\n $chatrooms = Chatroom::all();\n return response()->json(['chatrooms' => $chatrooms], 200);\n }",
"public function index()\n {\n $messages = [];\n\n $to = null;\n\n $users = User::all();\n\n $conversations = Conversation::where('from_id', Auth::user()->id)->orWhere('to_id', Auth::user()->id)->orderBy('updated_at', 'desc')->get();\n return view(\"doctor.doctormessages\")->with(\"messages\", $messages)->with(\"chats\", $conversations)->with(\"to\", $to)->with('users', $users);\n }",
"public function index()\n {\n return ChannelResource::collection(Channel::all());\n }",
"public function chats()\n {\n return $this->hasMany('App\\Modules\\Models\\Chat');\n }",
"public function list()\n {\n \n $stream = Category::all();\n \n return response()->json(['categories' => $stream], 200);\n }",
"public function index()\n {\n return $this->response->view($this->getViewName('index'), [\n 'data' => $this->repository->findByConference($this->getConference()->id)->paginate(25)\n ]);\n }",
"public function index(Request $request)\n {\n //投稿に対してチャットするためチャットボタン押下した投稿情報を取得 \n $post = Post::find($request->post_id);\n\n $id = $request->my_user_id;\n //自分と相手のチャット情報取得(チャット履歴を更新履歴の昇順)\n $chats = Chat::where('post_id', intval($request->post_id))\n ->where(function($query) use($post,$request){\n $query->where('send_user_id', intval($request->send_user_id))\n ->where('my_user_id', intval($request->my_user_id))\n ->orwhere('send_user_id', intval($request->my_user_id))\n ->where('my_user_id', intval($request->send_user_id));\n })\n ->orderby('created_at', 'asc')->get();\n\n $send_user_id = $request->send_user_id;\n $chat_channel = $request->chat_channel;\n $notification_channel = $request->notification_channel;\n\n return view('chat', compact('post','send_user_id', 'chats', 'notification_channel', 'chat_channel'));\n }",
"public function index()\n {\n $discussions = $this->discussions->getRecent();\n $categoryCount = $this->categories->count();\n\n return $this->respond('home.index', compact('discussions', 'categoryCount'));\n }",
"public function getChat()\n {\n return view('chat');\n }",
"public function index()\n {\n $matches = Match::closed()\n ->with(['game', 'roles.user'])\n ->orderBy('created_at','desc')\n ->limit(10)\n ->get();\n\n $users = User::leaders()->limit(10)->get();\n\n $channel = Channel::first();\n\n return view('home', compact('matches','users','channel'));\n }",
"public function index()\n {\n $channels = Channel::all();\n\n return view('admin.channels.index')->withChannels($channels);\n }",
"public function chat_messagesAction()\n\t{\n\t\t$chat_id = $this->request->getQuery(\"chat_id\");\n\n\t\t$user = $this->user;\n $user_id = $user['id'];\n $application_id = $user['Application_ID'];\n\n $messages = MessagesRelation::find([\n \"application_id = {$application_id} AND data_cms_id = {$chat_id}\"\n ]);\n\n\t\t$data = [];\n\t\tforeach ($messages as $key => $msg) {\n\t\t\t$data[\"messages\"][$key][\"from_user\"] = $msg->sender->Title;\n\t\t\t$data[\"messages\"][$key][\"from_user_id\"] = $msg->sender->ID;\n\t\t\t$data[\"messages\"][$key][\"last_message\"] = $msg->message->content;\n\t\t\t$data[\"messages\"][$key][\"last_message_time\"] = $msg->message->created_at;\n\t\t}\n\n\t\t$response = [\n \t\"status\" => $this->apiFactory->getStatus(200, \"Success\"),\n \t\"data\" => $data\n ];\n\n return $this->sendJson($response);\n\t}",
"public function index()\n {\n return view('chat.chat');\n }",
"public function index()\n {\n return view('chat.chat');\n }",
"public function index()\n {\n $groups = $this->Chat->getAllRoom();\n $this->set(['title' => 'Chat Online', 'groups' => $groups]);\n $this->render('index');\n }",
"public function index()\n {\n $fcms = Fcm::all();\n return $fcms;\n }",
"public function actionIndex()\n {\n $searchModel = new ChannelSearch();\n\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams, ['pid' => Yii::$app->request->get('pid',0)]);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction()\n {\n return view('blog.category.list');\n }",
"public function index()\n\t{\n\t\t// Create pagination links\n\t\t$total_rows = $this->video_channel_m->count_all();\n\t\t$pagination = create_pagination('admin/video/channels/index', $total_rows);\n\t\t\t\n\t\t// Using this data, get the relevant results\n\t\t$result = $this->video_channel_m->limit($pagination['limit'])->get_all();\n\n\t\t$channels = array();\n\t\tforeach ($result as $channel)\n\t\t{\n\t\t\t$channels[$channel->parent_id][] = $channel;\n\t\t}\n\t\t\t\n\t\t$this->template\n\t\t\t->title($this->module_details['name'], lang('video_channel:list_title'))\n\t\t\t->set('channels', $channels)\n\t\t\t->set('pagination', $pagination)\n\t\t\t->build('admin/channels/index', $this->data);\n\t}",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $pushSubscriptions = $em->getRepository('AppBundle:PushSubscription')->findAll();\n\n return $this->render('pushsubscription/index.html.twig', [\n 'pushSubscriptions' => $pushSubscriptions,\n ]);\n }",
"public function showAll(Request $request)\n {\n return $this->listChannels();\n }",
"public function listAction()\n {\n $data = $this->getGiftcards();\n\n $cardCode = $this->getCollection(Giftcards::select('card_id', 'card_code')->orderBy('card_id', 'desc')->get(),\n 'card_code');\n\n return View::make(\"admin.dashboard.index_more\", array(\n \"lists\" => $data,\n \"scope\" => $this->scope,\n \"url\" => Request::url(),\n \"search_arr\" => ['card_code' => \"Card Code\", 'mail_from' => 'Mail From', 'mail_to' => 'Mail To'],\n \"search_key\" => isset($this->search_key) ? $this->search_key : '',\n \"search_by\" => isset($this->search_by) ? $this->search_by : '',\n \"cardCodeCollection\" => $cardCode\n ));\n }",
"public function _list() {\n\t\t// assign user based on api key\n\t\tif (empty($this->params[0])) {\n\t\t\t$json = [\n\t\t\t\t'error' => 'No channel specified'\n\t\t\t];\n\t\t\treturn $json;\n\t\t}\n\t\t$account = filter_var($this->params[0], FILTER_SANITIZE_STRING);\n\t\t$params = array($account);\n\t\t$sql = \"SELECT * FROM \" . $this->db->sub_table . \" WHERE subscriber = $1 OR host_account = $1\";\n\t\t$result = pg_query_params($this->db->link, $sql, $params);\n\t\t$subscribed = [];\n\t\t$subscribers = [];\n\t\twhile ($row = pg_fetch_assoc($result)) {\n\t\t\tif ($row['host_account'] === $account) {\n\t\t\t\t$subscribers[] = $row['subscriber'];\n\t\t\t} \n\t\t\tif ($row['subscriber'] === $account) {\n\t\t\t\t$subscribed[] = $row['host_account'];\n\t\t\t}\n\t\t}\n\t\t$json = [\n\t\t\t'subscribed' => $subscribed,\n\t\t\t'subscribers' => $subscribers\n\t\t];\n\t\treturn json_encode($json);\n\t}",
"public function listAction()\n {\n $request = $this->get('request');\n $currentUser = $this->getUser();\n $page = $request->query->get('page', 1);\n\n /** @var UserFriendshipRepository $friendshipRepository */\n $friendshipRepository = $this->getDoctrine()->getRepository('KibokoSocialNetworkBundle:UserFriendship');\n\n return $this->render('KibokoSocialNetworkBundle:Friendship:list.html.twig',\n [\n 'friendsAsking' => $friendshipRepository->findAskingFriends($currentUser),\n 'friends' => $friendshipRepository->findAcceptedAndPendingFriends($currentUser, $page, $this->get('knp_paginator')),\n ]\n );\n }",
"public function index()\n {\n $discussions = Discussion::filterByChannels()->paginate(10);\n return view('discussion.index', compact('discussions'));\n }",
"public function listAction()\n {\n // category argument override targetedCategories settings\n if ($this->request !== null) {\n $args = $this->request->getArguments();\n $categoryUid = $args['category'];\n\n\n if ($categoryUid !==null && !empty($categoryUid)) {\n $this->settings['targetedCategories'] = $categoryUid;\n }\n\n $news = $this->newsRepository->findAllBySettings($this->settings);\n }\n $this->view->assign('news', $news)\n ->assign('settings', $this->settings);\n }",
"public function index()\n\t{\n $clients = Client::with(['services'])->get()->toArray();\n\n return View::make('subscriptions.index', compact('clients'));\n\n\t}",
"public function index()\n {\n $friends = Auth::user()->friends();\n \n return view('conversation.index')->withFriends($friends);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $conferences = $em->getRepository('AppBundle:Conference')->findAll();\n\n return $this->render('conference/index.html.twig', array(\n 'conferences' => $conferences,\n ));\n }",
"public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t$param = $this->getInput(array('start_time','channel_id', 'ad_type', 'title'));\r\n\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\t$search = array();\r\n\t\tif($param['ad_type']) $search['ad_type'] = $param['ad_type'];\r\n\t\t$search['channel_id'] = $param['channel_id'];\r\n if(!empty($param['start_time']))$search['search_time'] = array(\r\n array('>=',strtotime($param['start_time'])),\r\n array('<',strtotime($param['start_time'])+3600*24),\r\n );\r\n if($param['title']) $search['title'] = array('LIKE', trim($param['title']));\r\n\t\tlist($total, $ads) = Gou_Service_Ad::getList($page, $perpage, $search);\r\n\t\t$this->assign('ad_types', $this->ad_types[$param['channel_id']]);\r\n\t\t$this->assign('search', $param);\r\n\t\t$this->assign('ads', $ads);\r\n\t\t$this->cookieParams();\r\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\r\n\t}",
"public function index() {\n $bots = MyChannel::latest()\n ->paginate(20);\n $links = $bots->render();\n\n return view('front.mychannel.index', compact('bots', 'links'));\n }",
"public function index()\n {\n $user = Auth::user();\n $users = array();\n $doctor = Doctor::where(\"user_id\", $user->id)->first();\n\n if ($doctor){\n $chats = DoctorChat::all()->where(\"doctor\", $user->id);\n\n foreach ($chats as $chat){\n if (!in_array($chat->patient, $users)){\n array_push($users, User::all()->where(\"id\", $chat->patient));\n }\n }\n }else{\n $chats = DoctorChat::all()->where(\"patient\", $user->id);\n foreach ($chats as $chat){\n if (!in_array($chat->patient, $users)){\n array_push($users, User::all()->where(\"id\", $chat->patient));\n }\n }\n }\n return view('home', [\"users\" => $users]);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $user = $this->container->get('security.context')->getToken()->getUser();\n\n //dump($user->getGroups());\n $groups = array();\n foreach ($user->getGroups() as $group)\n {\n $groups[] = $group->getId();\n }\n //dump($groups);\n \n if ($user->hasRole('ROLE_SUPER_ADMIN'))\n {\n $channels = $em->getRepository('AppBundle:Channel')->findAll();\n }\n else\n {\n $channels = $em->getRepository('AppBundle:Channel')->findByGroup($groups);\n }\n\n return $this->render('channel/index.html.twig', array(\n 'channels' => $channels,\n ));\n }",
"public function syncChatList()\n\t{\n\t\t$chat = New Chats;\n\n\t\t$data = $chat->getAll(array('id'),'id','ASC',array(array('id_user_1',$this->id),array('id_user_2',$this->id,'OR')));\n\n\t\tforeach ($data as $value) {\n\t\t\t$chats[] = $value['id'];\n\t\t}\n\t\t\n\t\tforeach ($chats as $key => $value) {\n\t\t\t$chat = New Chats;\n\t\t\t$chat->set('id',$value);\n\t\t\t$chat->hydrate();\n\t\t\t$chat->countNewMsg();\n\t\t\n\t\t\t$chat_list[] = $chat;\n\t\t\t\n\t\t}\n\n\t\t$this->chats = $chat_list;\n\n\n\t}",
"public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\tlist($total, $notices) = Gou_Service_Notice::getList($page, $perpage);\r\n\t\t$this->assign('notices', $notices);\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'] . '/?'));\r\n\t\t$this->assign('channels', $this->channels);\r\n\t}",
"public function index()\n {\n $latest = auth()->user()->conversations()->has(\"messages\")->latest(\"updated_at\")->count();\n if ($latest) {\n return redirect()->route(\"conversation.show\", $latest);\n }\n else {\n return view(\"conversation.index\");\n }\n\n }",
"public function index()\n {\n $ticketComments = TicketComment::paginate();\n\n return $this->sendResponse(new TicketCommentCollection($ticketComments), 'ticketCommenties retrieved successfully.');\n }",
"public function index()\n {\n $customerMessages = CustomerMessage::orderBy('created_at', 'desc')->get();\n return view('customerMessage/index', compact('customerMessages'));\n }",
"public function chats() \n {\n return $this->hasMany('App\\Chat');\n }",
"public function newAction()\n {\n $entity = new Achats();\n $form = $this->createCreateForm($entity);\n\n return $this->render('AEDashBundle:Achats:index.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function index()\n {\n $campaigns = Campaign::where('user_id', Auth::id())->get();\n return view('admin.list-campaign')->with('campaigns', $campaigns);\n }",
"public function chats()\n {\n return $this->hasMany('App\\ChatMessage',\"chat_id\", \"id\");\n }",
"public function index()\n {\n $user = User::with(\"subscriptions\")->find(Auth::user()->id);\n $subscriptions = $user->subscriptions->toArray();\n\n return ResponseHelper::success($subscriptions, __(\"Retornando assinatura\"));\n }",
"public function index()\n {\n $channel = $this->repository->all();\n\n return View::make('admin.channels.index', compact('channel'));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $activityTickets = $em->getRepository('querofCodeBundle:ActivityTicket')->findAll();\n\n return $this->render('activityticket/index.html.twig', array(\n 'activityTicket' => $activityTickets,\n ));\n }",
"public function getAction()\n {\n\n if(Auth::hasLastChatId())\n {\n\n $_POST['last_chat_id'] = Auth::getLastChatId();\n $chat = new Chat($_POST);\n\n if ($chat->hasChatAfter())\n {\n $chats = $chat->getAfter(Auth::getLastChatId());\n\n View::renderTemplate('App/chat.html', [\n 'chats' => $chats\n ]);\n\n Auth::setLastChatId($chat->getLastChatId());\n }\n\n }\n else\n {\n Auth::setLastChatId(0);\n\n }\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('TryCatchApiBundle:ComponentChannel')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function index()\n {\n $canchas = Cancha::all();\n return response()->json($canchas, 200);\n }",
"public function index()\n {\n if (auth()->user()->role->name == \"super_admin\"){\n $schools = School::all();\n $parents = StudentParent::all();\n $gchats = Chat::get()->groupBy('parent_id');\n\n $chats = [];\n\n foreach ($gchats as $gcs){\n foreach ($gcs as $gc){\n $gc;\n }\n array_push($chats, $gc);\n }\n }\n\n if (auth()->user()->role->name == \"admin\"){\n $schools = null;\n $students = Student::with('parent:student_id,mother_email,id')->where('school_id', auth()->user()->school->id)->get();\n $parents = [];\n foreach ($students as $key => $st){\n array_push($parents,$st->parent);\n }\n\n $gchats = Chat::where('school_id', auth()->user()->school->id)->get()->groupBy('parent_id');\n\n $chats = [];\n\n foreach ($gchats as $gcs){\n foreach ($gcs as $gc){\n $gc;\n }\n array_push($chats, $gc);\n }\n }\n\n// if (auth()->user()->role->name == \"parent\"){\n// $chats = Chat::where('parent_id', auth()->user()->parent->id)->orderBy('created_at','DESC')->get();\n// }\n\n return view('admin.chat.index', compact(['chats','schools','parents']));\n }",
"public function index_get() {\n\t\t$uid = 15;\n\t\t$messages = $this->Messages_model->getMessagesByFromUserID($uid);\n\t\t$this->response($messages);\n\t}",
"public function index()\n {\n $messages = Sms::orderBy('id', 'desc')->paginate();\n $count = Sms::get();\n return view('admin.contato.messages.index')->with(['messages' => $messages, 'count' => $count]);\n }",
"public function index()\n {\n\n\t\ttry{\n\t\t $subscribes = SubscribeUsers::all();\n\t\t \n\t\t return view('subscribeusers.list')->with('subscribes',$subscribes); \n\t\t}catch(Exception $e){\n\t\t\techo $e->getMessage();\n\t\t\t\n\t\t}\n\n\t\t\n\n }",
"public function index()\n {\n $subscriptions = Subscription::all();\n\n return view('subscriptions.index', ['subscriptions' => $subscriptions]);\n }",
"public function action_chat_history() {\n\t\t$this->_template->set('page_title', 'All Messages');\n\t\t$this->_template->set('page_info', 'view and manage chat messages');\n\t\t$messages = ORM::factory('Message')->get_grouped_messages($this->_current_user->id);\n\t\t$this->_template->set('messages', $messages);\n\t\t$this->_set_content('messages');\n\t}",
"public function index()\n {\n $cates = Category::SimplePaginate(10);\n\n return view('admin.category.list',compact('cates'));\n }",
"public function index()\n {\n //\n return view('subscriptions.index');\n }",
"public function index()\n {\n $customers = Customer::all();\n $message = count($customers) . ' found';\n\n return $this->sendResponse($customers, $message);\n }",
"public function chats()\n {\n return $this->hasMany(Chat::class, 'creator_id', 'id');\n }",
"public function index()\n {\n $id=Auth::user()->id;\n $users =User::Where('id','!=', $id)->get();\n return view('chat.view',compact('users','id'));\n }",
"public function index()\n {\n $categories = Category::all();\n return response([ 'categories' => CategoryResource::collection( $categories ), 'message' => 'Retrieved successfully.'], 200);\n }",
"public function channel($sid)\n {\n $services = $this->client->chat->v2->services->read();\n \n $channels = $this->client->chat->v2->services($services[0]->sid)->channels->read();\n foreach ($channels as $record) {\n if ($record->sid == $sid) {\n $channel = $record;\n }\n }\n return view('chats/chat', compact('channel'));\n }",
"public function index()\n {\n //\n $topics = Topic::orderBy('id', 'desc')->get()->toJson(JSON_PRETTY_PRINT);\n return response($topics, 200);\n }",
"public function show(Chat $chat)\n {\n //\n }",
"public function index(Request $request,$chat_id)\n {\n $query = Message::messageHistory()->where('chat_id',$chat_id);\n\n // Check for limit parameter\n if($request->limit){\n $limit=$request->limit;\n $query->take($request->limit);\n }\n\n\n $query=collect($query->get());\n $chatHistory = $query->toArray();\n\n\n $paginate = 25;\n $page = $request->page;\n\n $offSet = ($page * $paginate) - $paginate;\n $itemsForCurrentPage = array_slice($chatHistory, $offSet, $paginate, true);\n $result = new Presenter($itemsForCurrentPage, count($chatHistory), $paginate, $page);\n $result = $result->toArray();\n\n return response()->json($result);\n\n }",
"public function actionIndex()\n {\n $userid = Yii::$app->user->id;\n $messages = Message::find()->where(['to_user_id' => $userid])->orderBy(['id' => SORT_DESC])->all();\n $usersinfo = Message::find()->where(['to_user_id' => $userid])->select(['from_user_id'])->all();\n $names = Yii::$app->db->createCommand('\n SELECT DISTINCT from_user_id FROM message WHERE to_user_id='.$userid.'\n UNION ALL\n SELECT DISTINCT to_user_id FROM message WHERE from_user_id='.$userid.'\n')->queryAll();\n $dataProvider = new ActiveDataProvider([\n 'query' => Message::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n 'messages' => $messages,\n 'usersinfo' => $usersinfo,\n 'names' => $names,\n ]);\n }",
"public function index()\n {\n $categories = Category::all();\n\n return $this->showAll($categories);\n }",
"public function show($id)\n {\n $user_id = auth()->user()->id;\n $messages = Chat::where(function ($query) use ($id){\n $query->where('sender_id', '=', auth()->user()->id)->where('reciever_id', '=', $id);})->orWhere(function ($query) use ($id){\n $query->where('sender_id', '=', $id)->where('reciever_id', '=', auth()->user()->id);\n })->latest()->get();\n\n if(count($messages) < 1){\n return response()->json(['success' => false, 'message' => 'No chat history'], 401); \n }\n \n return response()->json(['success' => true, 'chats' => $messages]);\n }",
"public function index() {\r\n $data['topics'] = Topic::find('all', array('include' => 'activity'));\r\n $data['menu'] = 'activities';\r\n $data['check'] = '';\r\n $this->template->title('Available Activities')\r\n ->set_layout($this->front_tpl)\r\n ->set('page_title', 'Activities')\r\n ->build($this->user_folder . '/activities/list', $data);\r\n }",
"public function list()\n {\n $categories = Category::select(['id', 'name'])->get();\n\n return response()->json(['categories' => $categories], 200);\n }",
"public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AEDashBundle:Achats')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Achats entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AEDashBundle:Achats:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function index($id)\n {\n $messages = Message::where([\n ['user_id', Auth::id()],\n ['reciever_id', $id]\n ])\n ->orWhere([\n ['user_id', $id],\n ['reciever_id', Auth::id()] \n ])\n ->with('user')\n ->get();\n\n return request()->ajax() ? $messages : view('chat');\n }",
"public function show(Chat $chat)\n {\n $messages = Message::where('chat_id', $chat->id)\n ->with('user')\n ->oldest()\n ->get();\n return Inertia::render('User/Chats/Show', [\n 'chat' => $chat,\n 'messages' => $messages,\n ]);\n }",
"public function getCurrentChats(Request $request)\n {\n// 'search_text' => 'required|string',\n// ]);\n// if ($validator->fails()) {\n// return sendError('The given data is invalid', $validator->getMessageBag());\n// }\n $text = isset($request->search_text)?$request->search_text:\"\";\n $per_page = isset($request->per_page) ? $request->per_page : 20;\n $user_id = Auth::id();\n if (!empty($text)) {\n $ids = User::Where('first_name', 'like', '%' . $text . '%')->orWhere('last_name', 'like', '%' . $text . '%')->distinct('id')->pluck('id');\n\n if (!$ids) {\n\n return sendSuccess('No result found!', null);\n }\n $per_page = isset($request->per_page) ? $request->per_page : 20;\n\n $chats = Chat::with('sender', 'sender.stance_id', 'receiver', 'receiver.stance_id', 'lastMessage')->where(function ($q) use ($ids) {\n $q->where('sender_id', Auth::id());\n $q->orWhere('receiver_id', Auth::id());\n })->where(function ($q) use ($ids) {\n $q->whereIn('sender_id', $ids);\n $q->orWhereIn('receiver_id', $ids);\n })->paginate($per_page);\n\n\n return sendSuccess('Search Result!', $chats);\n } else {\n\n if (!$request->type || $request->type == 'current') {\n $chats = Chat::with('sender', 'sender.stance_id', 'receiver', 'receiver.stance_id', 'lastMessage')\n ->withCount(['messages' => function ($q) {\n $q->where('is_read', 0);\n }])\n ->where(function ($q) use ($user_id) {\n $q->where('sender_id', $user_id);\n $q->orWhere('receiver_id', $user_id);\n })\n ->whereRaw(\"IF(`sender_id` = $user_id, `sender_deleted`, `receiver_deleted`)= 0\")\n ->orderBy('updated_at', 'desc')\n ->paginate($per_page);\n return sendSuccess('Got chat successfully.', $chats);\n } else if ($request->type == 'past') {\n\n $chats = Chat::with('sender', 'sender.stance_id', 'receiver', 'receiver.stance_id', 'lastMessage')\n ->withCount(['messages' => function ($q) {\n $q->where('is_read', 0);\n }])\n ->where(function ($q) use ($user_id) {\n $q->where('sender_id', $user_id);\n $q->orWhere('receiver_id', $user_id);\n })\n ->whereRaw(\"IF(`sender_id` = $user_id, `sender_deleted`, `receiver_deleted`)= 0\")\n ->orderBy('updated_at', 'desc')\n ->paginate($per_page);\n return sendSuccess('Got chat successfully.', $chats);\n } else {\n return sendError(\"Invalid type only allowed 'current' or 'past' \", null);\n }\n\n\n }\n }"
] | [
"0.8202715",
"0.74284804",
"0.7355493",
"0.7325189",
"0.72068435",
"0.705108",
"0.6978977",
"0.694375",
"0.66639435",
"0.6651567",
"0.6535031",
"0.6505062",
"0.6502711",
"0.64691824",
"0.6392978",
"0.6379457",
"0.63554376",
"0.62587124",
"0.6220791",
"0.61849946",
"0.6174374",
"0.6174252",
"0.6165536",
"0.6155356",
"0.6152145",
"0.61037654",
"0.6065836",
"0.6046679",
"0.6039297",
"0.6016377",
"0.5972119",
"0.5960046",
"0.5957474",
"0.5946853",
"0.5940507",
"0.5906306",
"0.589998",
"0.58931905",
"0.5890614",
"0.58904076",
"0.58904076",
"0.5879644",
"0.5866367",
"0.5861726",
"0.58542806",
"0.58304375",
"0.58180577",
"0.5812228",
"0.580692",
"0.5796064",
"0.57889223",
"0.5786365",
"0.57841504",
"0.5774888",
"0.57717806",
"0.57674074",
"0.57657355",
"0.57640904",
"0.5755803",
"0.57502586",
"0.5749005",
"0.5742871",
"0.57396525",
"0.57361406",
"0.57359165",
"0.5731825",
"0.5721552",
"0.57125187",
"0.57066923",
"0.5699649",
"0.5696666",
"0.5694002",
"0.5691557",
"0.5682386",
"0.5674032",
"0.5672257",
"0.56717116",
"0.56625944",
"0.5656475",
"0.5645864",
"0.56313276",
"0.56296825",
"0.5622311",
"0.56148285",
"0.5614518",
"0.56115913",
"0.56065565",
"0.5599288",
"0.5598236",
"0.55956817",
"0.5591483",
"0.5589782",
"0.5587042",
"0.5584782",
"0.55838305",
"0.55797696",
"0.5579071",
"0.5573763",
"0.5572008",
"0.5563644"
] | 0.6524159 | 11 |
Show the form for creating a new resource. GET /chats/create | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function newAction()\n {\n $entity = new Achats();\n $form = $this->createCreateForm($entity);\n\n return $this->render('AEDashBundle:Achats:index.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $chatroom = ChatRoom::all();\n return view('superadmin::autochat.create', compact('chatroom'));\n }",
"public function create()\n\t{\n\t\treturn view('retreats.create');\n\t}",
"public function create()\n {\n $idUser = $this->checkUserIsLogged();\n $d_Post = file_get_contents('php://input');\n $data = json_decode($d_Post, true);\n $tokenchat = uniqid();\n try {\n $chats = new Chats;\n $existChat = $chats->verify(['idemisor' => $idUser, 'idreceptor' => $data['idusuario'], 'tokenchat' => $tokenchat]);\n if (!$existChat) {\n $chats->create(['idemisor' => $idUser, 'idreceptor' => $data['idusuario'], 'tokenchat' => $tokenchat]);\n View::renderJson(['status' => 1, 'message' => 'Chat creado exitosamente.', 'data' => $chats]);\n } else {\n View::renderJson(['status' => 1, 'message' => 'Chat obtenido exitosamente.', 'data' => $chats]);\n }\n } catch (Exeption $e) {\n View::renderJson(['status' => 0, 'message' => $e]);\n }\n }",
"public function create()\n {\n return view('backend.seats.create');\n }",
"public function create()\n {\n return view('home.channels.create');\n }",
"public function create()\n {\n //return \"Form to add cats\";\n return view('cats.create');\n }",
"public function actionCreate() {\n\t\t$model = new Wechats ();\n\t\tif ($model->load( Yii::$app->request->post () )) {\n\t\t\tif(Yii::$app->request->post('isNormal') == 'normal'){\n\t\t\t\t$model->scenario = 'normal';\n\t\t\t\t$model->updataNormal();\n\t\t\t}else{\n\t\t\t\t$model->scenario = 'onekey';\n\t\t\t}\n\t\t\t$model->save();\n\t\t\treturn $this->redirect ( [ \n\t\t\t\t\t'view','id' => $model->weid \n\t\t\t] );\n\t\t} else {\n\t\t\treturn $this->render ( 'create', [ \n\t\t\t\t\t'model' => $model \n\t\t\t] );\n\t\t}\n\t}",
"public function actionCreate()\n {\n $model = new Customer();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id, 'wechat_id' => $model->wechat_id, 'kf_id' => $model->kf_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n {\n return view('channels.create_channels');\n }",
"public function create()\n {\n return view('customer_messages.create');\n }",
"public function create()\n {\n return view('subscriptions.create');\n }",
"public function create()\n {\n //\n return view('backend.subscriptions.create');\n }",
"public function actionCreate()\n\t{\n\t\t$model = new ChannelPartners();\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t} else {\n\t\t\treturn $this->render('create', [\n\t\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}",
"public function create()\n {\n $users = User::where('id', '!=', Auth::id())->get();\n\n return view('messenger.create', compact('users'));\n }",
"public function create()\n\t{\n\t\treturn View::make('userCardio.create');\n\t}",
"public function create()\n {\n return view('surats.create');\n }",
"public function create()\n {\n return view(\"add_contact\", compact(\"\"));\n }",
"public function create()\n {\n return View::make('admin.channels.create');\n }",
"public function actionCreate()\n {\n $model = new Subscribeclass();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n\t{\n\t\treturn View::make('feedbacks.create');\n\t}",
"public function actionCreate()\n {\n $model = new Customers();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function create()\n {\n // $this->authorize('create', User::class);\n\n return view('news.form')\n ->with('categorys', News::getSelectCategory());\n }",
"public function create()\n {\n return view(\"admin.subscriptions.create\");\n }",
"public function actionCreate()\n {\n $model = new Account();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n $currencies = CurrencyController::currenciesList();\n $id_user = Yii::$app->user->id;\n\n return $this->render('create', [\n 'model' => $model,\n 'id_user' => $id_user,\n 'currencies' => $currencies,\n ]);\n }",
"public function create()\n {\n $categories = auth()->user()->categories()->get();\n return view('bill_receives.create', compact('categories'));\n }",
"public function create()\n {\n\n $page_name = 'Create a chanel';\n return view('profile.chanel.create', compact('total', 'page_name'));\n }",
"public function create()\n {\n return view('messages.create');\n }",
"public function create()\n {\n return view('messages.create');\n }",
"public function create()\n {\n $hotel_id = Session::get('hotel_id');\n if (!$hotel_id)\n $hotel_id = null;\n Session::forget('hotel_id');\n\n return view('contact.create', compact('hotel_id'));\n }",
"public function create()\n {\n return view('talks.create');\n }",
"public function create()\n\t{\n\t\t$categories = Category::pluck('name', 'id');\t\n\t\treturn view('maintenance.room.create', compact('categories'));\n\t}",
"public function create()\n {\n return view('calltacs.create');\n }",
"public function create()\n\t{\n\t\t$customers = Customer::all();\n\t\t$categorys = Category::all();\n\t\treturn view('newlog.create', compact('customers', 'categorys'));\n\t}",
"public function create()\n {\n $this->data['categories'] = $this->categoryService->getAll();\n return view('news.form', $this->data);\n }",
"public function create()\n\t{\n\t\treturn View::make('messages.create');\n\t}",
"public function actionCreate()\n {\n $model = new Tickets();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Cuenta();\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n {\n return view('feedback.create');\n }",
"public function create()\n {\n return view('feedback.create');\n }",
"public function create()\n {\n $accountDetail = AccountDetail::latest()->first();\n return view('contact.create', [\n 'account_code' => $accountDetail->account_code,\n ]);\n }",
"public function create()\n {\n return view ('contatos.create');\n }",
"public function create()\n {\n return view('admin/createChannel');\n }",
"public function actionCreate()\n {\n $model = new Message();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function create()\n {\n $categories = Category::all();\n return view('users.create',compact('categories'));\n }",
"public function create()\n {\n $credit_cards = CreditCard::all();\n\n return view('transaction.customer.create', compact('credit_cards'));\n }",
"public function create()\n {\n return view('Feedback.create');\n }",
"public function create()\n {\n return view('achat.create');\n }",
"public function create()\n {\n $data = [\n 'route' => 'myc::contacts.store',\n 'method' => 'POST',\n 'type' => 'create'\n ];\n\n return view('contact.form', ['page' => Constants::PageContacts, 'data' => $data]);\n }",
"public function store(ChatRequest $request)\n {\n return Chat::create($request->all());\n }",
"public function create()\n\t{\n $customer = new Customer();\n return View::make('customers.form', compact('customer'));\n\t}",
"public function create()\n {\n //\n $data = [\n 'pagename' => $this->pagename,\n 'route' => $this->route,\n 'method' => 'POST',\n // 'title' => 'Thêm mới',\n 'action' => route('category.store')\n ];\n return view('backend.user.form', $data);\n }",
"public function actionCreate()\n {\n $model = new WechatMenu();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n\t{\n\t\treturn view('subscribers/create');\n\t}",
"public function actionCreate()\n {\n $model = new Category();\n\n Yii::$app->view->params['active'] = 'category';\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash('success', 'Категория добавлена');\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function create()\n {\n return view('contact::create');\n }",
"public function create()\n {\n $categories = Category::get();\n return view('Annonce.create', compact('categories'));\n }",
"public function create()\n {\n return view('contatos.create');\n }",
"public function create()\n {\n return View::make('talks.create');\n }",
"public function create()\n {\n return view('admin.concert.create');\n }",
"public function create()\n {\n\n $title = \"Ajouter une newsletter\";\n\n return view('dashboard.cruds.newsletter.create', compact('title'));\n }",
"public function create()\n {\n $action = route('contrato.store');\n $contrato = new Contrato();\n return view('contrato.create')->with(compact('action','contrato'));\n }",
"public function actionCreate()\n {\n $model = new Message();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'from' => $model->to_user_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n\t{\n\t\t$form = \\View::make('message.form');\n\t\t$form->project_id = \\Session::get('active_project');\n\t\t$form->action = array('action' => 'Toomdrix\\Pm\\MessageController@store', 'class'=>'form-signup');\n\t\treturn $form;\n\t}",
"public function create()\n {\n return view('subscription::create');\n }",
"public function create()\n {\n\n createLog(Contact::class);\n return view('backEnd.admin.contact.create');\n }",
"public function create()\n {\n $users = User::pluck('id', 'id')->all();\n\n return view('messag_records.create', compact('users'));\n }",
"public function create()\n\t{\n\t\treturn view('kagi::users.create');\n\t}",
"public function create()\n {\n return view(\"catagory.create\");\n }",
"public function create()\n {\n //\n $cuentas = Cuenta::all();\n return view('cuentas.create', compact('cuentas'));\n }",
"public function create()\n {\n $message =Messages::orderBy('created_at', 'desc')->get();\n $category =ProgramCatrgories::orderBy('program_category_name', 'asc')->get();\n return view('administrator.messages.create')->with([\n 'message' => $message,\n 'category' => $category,\n ]);\n }",
"public function create()\n {\n //\n $cates = Category::all();\n return view('backend.categories.addCate',compact('cates'));\n }",
"public function create()\n {\n return view('myactivity.add_myactivity');\n }",
"public function create()\n {\n return view('back.cards.create');\n }",
"public function create()\n {\n $subscriptions = Subscription::all();\n\n return view('subscription.subscribe', compact('subscriptions'));\n }",
"public function create()\n {\n return view('cards.create');\n }",
"public function create()\n {\n return view('cards.create');\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n {\n\n //显示创建资源表单页\n return view('/home/friend/create',['title'=>'添加友情链接']);\n }",
"public function create()\n {\n return view('contact.create');\n }",
"public function create()\n {\n return view('contact.create');\n }",
"public function create()\n {\n return view('contact.create');\n }",
"public function create()\n {\n return view('contact.create');\n }",
"public function create()\n {\n return view('contact.create');\n }",
"public function create()\n {\n $categories = Category::get()->toTree();\n\n return view('account.topics.create', ['categories' => $categories]);\n }",
"public function create()\n {\n return view('discuss.create');\n }",
"public function create()\n {\n return view('admin.contact.create');\n }",
"public function create()\n {\n return view('admin.contact.create');\n }",
"public function create()\n {\n return view('campaigns.create');\n }",
"public function create()\n {\n return view('admin.championships.add');\n }",
"public function actionCreate()\n {\n $model = new Contact();\n $model->user_id = $this->user->id;\n $model->scenario = 'form';\n\n if (Yii::$app->request->isPost && ($postData = Yii::$app->request->post()) && $model->load($postData)) {\n if ($model->save()) {\n return $this->redirect([\n 'view',\n 'id' => $model->id,\n ]);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function create()\n {\n //\n return view('admin.conversions.create');\n }",
"public function create()\n {\n return view('contato.form');\n }",
"public function create()\n\t{\n\t\t//\n\t\treturn View::make('customers.create');\n\t}",
"public function create()\n {\n return view('admin.danhmucsach.create');\n }",
"public function create()\n {\n $categories = Category::query()->get();\n $colors = Color::query()->get();\n $types = Type::query()->get();\n return view('dashboard.phone.create', compact('categories', 'types', 'colors'));\n }",
"public function actionCreate()\n {\n $model = new Message();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save())\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model\n ]);\n }\n }",
"public function create()\n {\n // $admins = Admin::whereDoesntHave('conversations')->get();\n\n $admins = Admin::all();\n\n return view('admin.conversations.create',compact('admins'));\n }",
"public function create()\n {\n return view('account::accounts.create');\n }",
"public function create()\n {\n return view('actor.create');\n }",
"public function create()\n { \n return view('convocatorias.create');\n }"
] | [
"0.7042078",
"0.6956043",
"0.68015903",
"0.67729974",
"0.6741159",
"0.6576497",
"0.6568198",
"0.65311056",
"0.6437974",
"0.64369047",
"0.6397384",
"0.63417786",
"0.63267577",
"0.6317097",
"0.6303244",
"0.6285088",
"0.6275685",
"0.6275226",
"0.62641895",
"0.6247726",
"0.6233208",
"0.62310195",
"0.6214969",
"0.6207059",
"0.62018573",
"0.6186488",
"0.6168867",
"0.6166385",
"0.6166385",
"0.61655223",
"0.61484873",
"0.614189",
"0.6134157",
"0.61309123",
"0.6130142",
"0.6121919",
"0.6114015",
"0.6110368",
"0.6096548",
"0.6096548",
"0.60960984",
"0.60955137",
"0.6095404",
"0.6091051",
"0.6088942",
"0.6080477",
"0.60600287",
"0.605862",
"0.6055639",
"0.60554266",
"0.6052604",
"0.60519874",
"0.6050308",
"0.6050246",
"0.60472125",
"0.60463476",
"0.60386336",
"0.6038567",
"0.6035414",
"0.6035114",
"0.6034273",
"0.6028795",
"0.6027358",
"0.60182965",
"0.6011257",
"0.6008347",
"0.6007783",
"0.6006425",
"0.6004603",
"0.60038483",
"0.6000008",
"0.5999161",
"0.59978044",
"0.5996537",
"0.5996505",
"0.59963703",
"0.59963703",
"0.59951115",
"0.5984642",
"0.59844095",
"0.59844095",
"0.59844095",
"0.59844095",
"0.59844095",
"0.5980135",
"0.5976237",
"0.59741735",
"0.59741735",
"0.5972434",
"0.59680235",
"0.5964692",
"0.5961195",
"0.5960987",
"0.5960405",
"0.59597415",
"0.59595525",
"0.5958121",
"0.595329",
"0.5950514",
"0.59480083",
"0.594718"
] | 0.0 | -1 |
Store a newly created resource in storage. POST /chats | public function store()
{
$this->pusher->trigger(Input::get('channel_name'), 'userNewMessage', array('username'=>Sentry::getUser()->username), Input::get('socket_id'));
$this->pusher->presence_auth(Input::get('channel_name'),Input::get('socket_id'), '123456', array('username'=>Sentry::getUser()->username));
return $this->pusher->get('/channels/demoChannel');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store(StoreChatRequest $request)\n {\n $from = $request->user()->id;\n $to = intval($request->input('to'));\n\n $chat = Chat::create([\n 'from' => $from,\n 'to' => $to,\n 'to_name' => $request->input('to_name'),\n 'message' => $request->input('message'),\n ]);\n\n broadcast(new ChatUpdatesEvent($to, $from))->toOthers();\n\n return new ChatResource($chat);\n }",
"public function store(Request $request)\n {\n $chat=$request->all();\n $send_id=Auth::user()->id;\n $chat['send_id']=$send_id;\n //dd($chat);\n Chat::create($chat);\n return Redirect::back();\n }",
"public function store(ChatRequest $request)\n {\n return Chat::create($request->all());\n }",
"public function store()\n {\n $input = Input::all();\n $thread = Thread::create([\n 'subject' => $input['subject'],\n ]);\n\n // Message\n Message::create([\n 'thread_id' => $thread->id,\n 'user_id' => Auth::id(),\n 'body' => $input['message'],\n ]);\n\n // Sender\n Participant::create([\n 'thread_id' => $thread->id,\n 'user_id' => Auth::id(),\n 'last_read' => new Carbon,\n ]);\n\n // Recipients\n $thread->addParticipant($input['recipient']);\n\n return redirect()->route('messages.show', $thread->id);\n }",
"public function store(Request $request)\n {\n $channel = Channel::create($request->all());\n\n return redirect()->back()->withSuccess('Creaste el canal '.$channel->name);\n }",
"public function store(Request $request)\n {\n $data = $request->input();\n\n $validation = \\Validator::make($data, ValidationRequest::$chat);\n if ($validation->fails()) {\n $errors = $validation->messages();\n return Redirect::back()->with('errors', $errors);\n }\n// $ticket = Tickets::find($data['job_id']);\n//// $user->UserChatAdd()->attach(\\Sentinel::getUser()->id);\n\n $chat = new Chat;\n $chat->chat = $data['chatAdd'];\n $chat->user_id = \\Sentinel::getUser()->id;\n $chat->tickets_id = $data['job_id'];\n $chat->save();\n $chat->save();\n\n Session::flash('success', Config::get('message.options.SUCESS'));\n return Redirect::back();\n }",
"public function store(ChannelRequest $request)\n {\n $channel = new Channel();\n \n $channel->channel_no = $request->channel_no;\n $channel->channel_name = $request->channel_name;\n $channel->epg_date = $request->epg_date;\n $channel->program_id = $request->program_id;\n $channel->epg_start_time = $request->epg_start_time;\n $channel->epg_end_time = $request->epg_end_time;\n \n $channel->save();\n \n return response([\n 'data' => new ChannelResource($channel)\n ],\n 201 \n );\n }",
"public function create()\n {\n $idUser = $this->checkUserIsLogged();\n $d_Post = file_get_contents('php://input');\n $data = json_decode($d_Post, true);\n $tokenchat = uniqid();\n try {\n $chats = new Chats;\n $existChat = $chats->verify(['idemisor' => $idUser, 'idreceptor' => $data['idusuario'], 'tokenchat' => $tokenchat]);\n if (!$existChat) {\n $chats->create(['idemisor' => $idUser, 'idreceptor' => $data['idusuario'], 'tokenchat' => $tokenchat]);\n View::renderJson(['status' => 1, 'message' => 'Chat creado exitosamente.', 'data' => $chats]);\n } else {\n View::renderJson(['status' => 1, 'message' => 'Chat obtenido exitosamente.', 'data' => $chats]);\n }\n } catch (Exeption $e) {\n View::renderJson(['status' => 0, 'message' => $e]);\n }\n }",
"public function store()\n {\n $attributes = request()->validate([\n 'title' => 'bail|required|min:3|max:255|string',\n 'body' => 'bail|required|string|min:5',\n 'attachment' => 'sometimes|nullable|file|mimes:png,jpeg,gif,pdf|max:1024'\n ]);\n \n if (request()->hasFile('attachment')) {\n $path = request()->file('attachment')->store('/', 'ticket');\n $attributes['attachment'] = $path;\n }\n \n $ticket = auth()->user()->tickets()->create($attributes);\n \n if (request()->expectsJson()) {\n return response()->json($ticket->load('replies'));\n }\n \n return redirect(route('tickets.create', app()->getLocale()));\n }",
"public function store(Request $request)\n {\n $message = $this->user->messages()->create(array('message' => $request->message));\n\n $this->pusher->trigger(\n \t$this->chatChannel, \n \t'new-message', \n \tarray('message' => $request->message));\n\n return response()->json(array('message' => $request->message));\n }",
"public function store(Request $request, Channel $channel)\n {\n return auth()->user()->subscriptions()->create(['channel_id' => $channel->id]);\n }",
"public function store()\n {\n $data = request()->validate([\n 'name' => 'required|unique:cards',\n 'health' => ['required', 'integer', new Positive],\n 'damage' => ['required', 'integer', new Positive],\n 'rarity_id' => 'required',\n 'power_id' => 'required',\n 'image' => 'nullable'\n ]);\n\n $card = Card::create($data + ['user_id' => auth()->id()]);\n\n session()->flash('flash', 'The card has been added successfully!');\n\n if (request()->wantsJson()) {\n return response($card, 201);\n }\n\n return redirect(route('admin.cards.index'));\n }",
"public function store(Request $request)\n {\n //dd($request->all());\n AutoChat::create([\n 'chatroom_id' => $request->chatroom_id,\n 'html_code' => $request->code,\n 'occurence' => $request->occurence\n ]);\n\n return Redirect::route('autochat.create')->with('success', 'Ad Post Created Successfully');\n }",
"public function store()\n {\n // validate request data -> array of validated attributes\n $attributes = request()->validate(['body'=>'required|max:255']);\n Tweet::create([\n 'user_id' => auth()->id(),\n 'body' => $attributes['body']\n ]);\n\n // once persisted -> redirect\n return redirect('/home');\n }",
"public function store(Request $request)\n {\n if (request('image')) {\n $validator = Validator::make($request->all(), [\n 'message' => '',\n 'sender_id' => 'required',\n 'reciever_id' => 'required',\n 'type' => 'required',\n 'unread' => 'required',\n 'isLiked' => '',\n 'location' => '',\n 'latitude' => '',\n 'longitude' => '',\n 'image' => 'image|required',\n ]);\n }else{\n $validator = Validator::make($request->all(), [\n 'message' => 'required',\n 'sender_id' => 'required',\n 'reciever_id' => 'required',\n 'type' => 'required',\n 'unread' => 'required',\n 'isLiked' => 'required',\n 'location' => '',\n 'latitude' => '',\n 'longitude' => '',\n 'image' => '',\n ]);\n }\n\n if ($validator->fails()) { \n return response()->json(['success' => false, 'error'=>$validator->errors()], 401); \n }\n\n $validatedData = $request->all();\n \n if (request('image')) {\n $imagePath = request('image')->store('chats', 'public');\n $imageArray = ['image' => $imagePath];\n }\n\n \n $user = auth()->user();\n $chat = $user->talkedTo()->create(array_merge(\n $validatedData,\n $imageArray ?? []\n ));\n\n\n return response()->json(['success' => true, 'message'=>'sent sucessfully'], 200);\n\n }",
"public function store(Request $request,Chat $chat)\n {\n $message = $chat->messages()->create([\n 'body' => $request->body,\n 'user_id' => auth()->id()\n ]);\n broadcast(new NewChatMessageEvent($message, auth()->user()))->toOthers();\n return back();\n }",
"public function store(Thread $thread)\n {\n $thread->addSubscription();\n\n return response('Subscription added', 200);\n }",
"public function store()\n {\n $validator = Validator::make($data = Input::all(), $this->repository->getRules());\n\n if ($validator->fails()) {\n return Redirect::back()->withErrors($validator)->withInput();\n }\n\n $this->repository->create($data);\n\n return Redirect::route('admin.channels.index')\n ->with('success', 'Channel Created.');\n }",
"public function store()\n {\n $channel = Channel::create(\n request()->validate([\n 'name' => 'required|unique:channels'\n ])\n );\n\n cache()->forget('channels');\n\n return $channel;\n }",
"public function store(Request $request)\n {\n // Twilio::message('+8801784622362', 'how are yo?');\n }",
"public function store()\n {\n\n $lesson = Lesson::findorFail(request('lesson_id'));\n $user = User::findOrFail(request('user_id'));\n\n\n //reduce spaces left\n $lesson->spaces_left = $lesson->spaces_left - 1;\n $lesson->save();\n\n //attach the items to the receipt.\n $user->lessons()->attach($lesson);\n\n\n //create stripe customer\n $customer = Customer::create([\n 'email' => request('stripeEmail'),\n 'source' => request('stripeToken')\n\n ]);\n\n //charge stripe customer\n Charge::create([\n 'customer' => $customer->id,\n 'amount' => $lesson->subject->price,\n 'currency' => 'gbp'\n ]);\n\n return ['redirect' => '/classes'];\n\n }",
"public function store(Request $request)\n {\n date_default_timezone_set('Europe/Paris');\n // validation des données de la requête\n $this->validate(\n $request,\n [\n 'lieu' => 'required',\n 'prix' => 'required',\n 'jeu' => 'required',\n ]\n );\n\n // code exécuté uniquement si les données sont validaées\n // sinon un message d'erreur est renvoyé vers l'utilisateur\n\n // préparation de l'enregistrement à stocker dans la base de données\n $jeu= Jeu::find($request->jeu);\n $achat = new Achats;\n $achat->jeu_id = $jeu->id;\n $achat->user_id=Auth::id();\n $achat->prix = $request->prix;\n $achat->lieu = $request->lieu;\n $achat->date_achat=$today = date(\"Y-m-d H:i:s\");\n $achat->save();\n // redirection vers la page qui affiche la liste des tâches\n $user=User::find(Auth::id());\n return redirect('/user/'.Auth::id().'/profil')->with('user', $user);\n }",
"public function store(Request $request)\n {\n //get session token\n $this->token = session('token');\n \n //trello url to creates a new card\n $url = \"https://api.trello.com/1/cards?\".\n \"idList=$request->list&\".\n \"name=$request->name&\".\n \"key=$this->key&token=$this->token\";\n \n $client = new Client();\n $response = $client->post($url);\n \n //after creation this method return to card list\n return back();\n }",
"public function persist()\n {\n Channel::from(auth()->user())\n ->contribute($this->all());\n }",
"public function store(Request $request)\n {\n $this->authorizeForUser($request->user('api'),'create', Chatroom::class);\n $request->validate([\n 'private' => 'required|integer',\n 'allow_people_id' => 'required|json',\n ]);\n\n $roles = array($request->owner_id => \"admin\") ;\n $invited = json_decode($request->allow_people_id);\n for($i = 0; $i < count($invited); $i++){\n $roles[$invited[$i]] = \"normal\";\n }\n\n $roles = json_encode($roles);\n\n $chatroom = new Chatroom([\n 'joinchat' => $this->getNewJoinchat(),\n 'private' => $request->private,\n 'owner_id' => $request->user(),\n 'allow_people_id' => $request->allow_people_id,\n 'roles' => $roles\n ]);\n\n $chatroom->save();\n return response()->json(['message' => 'chatroom.creation_succes', 'chatroom' => $chatroom], 201);\n }",
"public function store()\n {\n $this->validate(request(), [\n 'subject' => 'required',\n 'content' => 'required',\n 'priority_id' => 'required',\n ]);\n\n $newTicketRequest = request()->only('subject', 'content', 'priority_id');\n\n $newTicket = array_merge(\n $newTicketRequest,\n ['ticket_number' => app(UniqueIDGeneration::class)->generate()]\n );\n\n $ticket = $this->ticket->create($newTicket);\n\n $ticketData = fractal($ticket, new TicketTransformer)->toArray();\n $ticketData['success'] = \"You have created a new Ticket!\";\n\n return $ticketData;\n }",
"public function store(Request $request)\n {\n $message = $request->user()->messages()->create([\n 'body' => $request->body\n ]);\n\n broadcast(new MessageCreated($message))\n ->toOthers();\n\n return response()->json($message);\n }",
"public function store()\n {\n $this->validate();\n if ($this->honeyPasses()) {\n $subscription = SubscriptionModel::create([\n 'email' => $this->email,\n 'remember_token' => Str::random(16)\n ]);\n dispatch(new SendSubscriptionConfirmationMailJob($subscription));\n session()->flash('success', 'We just sent you a confirmation email. Proceed to confirm');\n }\n }",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(Question $question,Request $request)\n {\n ///question id come form $question automatically inject\n $reply=$question->replies()->create($request->all());\n if($reply->user_id!==$question->user_id){\n $user=$question->user;\n $user->notify(new ReplyNotification($reply));\n }\n return response(['reply'=>new ReplyResource($reply)]);\n\n }",
"public function store()\n {\n $data = Input::all();\n\n $rules = $this->account_rules;\n\n // Make validator\n $validator = Validator::make($data, $rules);\n\n if ($validator->passes()) {\n // Save\n $talk = new Talk;\n $talk->title = Input::get('title');\n $talk->description = Input::get('description');\n $talk->body = Input::get('body');\n $talk->author_id = Auth::user()->id;\n // Add author\n $talk->save();\n\n Session::flash('message', 'Successfully created new talk.');\n\n return Redirect::to('/talks/' . $talk->id);\n }\n\n return Redirect::to('talks/create')\n ->withErrors($validator)\n ->withInput();\n }",
"public function store(Request $request)\n {\n $input = $request->all();\n $thread = Thread::create(\n [\n 'subject' => $input['subject'],\n ]\n );\n // Message\n Message::create(\n [\n 'thread_id' => $thread->id,\n 'user_id' => Auth::user()->id,\n 'body' => $input['message'],\n ]\n );\n // Sender\n Participant::create(\n [\n 'thread_id' => $thread->id,\n 'user_id' => Auth::user()->id,\n 'last_read' => new Carbon(),\n ]\n );\n $thread->addParticipant($input['receiver']);\n $data['statues'] = \"200 Ok\";\n $data['error'] = null;\n $data['data'] = null;\n return response()->json($data, 200);\n\n }",
"public function store(){\n\n // requesting data from form\n $userdata = request('question');\n\n // creating new model instance\n $question = new Question();\n $question->question = $userdata;\n\n // saving data to DB\n if($question->save()){\n\n // returning view and results\n return redirect('/')->with('message', 'A változásokat sikeresen mentette a rendszer!');\n } else {\n\n // returning view and results\n return redirect('/')->with('message', 'HIBA! Kérjük próbálkozzon újra.');\n }\n }",
"public function store(Request $request)\n {\n // Required parameters are (conversation_id, text)\n $conversation = Conversation::findOrFail($request['conversation_id']);\n\n if ($this->user_id == $conversation->user_id || $this->user_id == $conversation->shop_owner_id) {\n\n $request['sender_id'] = $this->user_id;\n\n $type = null;\n $receiver_id = null;\n\n if ($this->user_id == $conversation->user_id) {\n $type = \"shop\";\n $receiver_id = $conversation->shop_owner_id;\n } else {\n $type = \"customer\";\n $receiver_id = $conversation->user_id;\n }\n\n $msg = Message::create($request->all());\n\n\n $msg['receiver'] = 'true';\n\n broadcast(new NewMessage($msg->toArray(), $type, $receiver_id));\n\n $conversation->update([\n \"last_sender_id\" => $this->user_id,\n \"last_message\" => $request['text'],\n \"is_read\" => 0\n ]);\n\n return response()->json($msg, 200);\n }\n\n return response()->json(\"User is not a participant in the conversation\", 401);\n }",
"public function store(Requests\\StoreQuestionRequest $request)\n\t{\n\t $tags = $this->normalizeTag($request->get('tags'));\n\t\t$data = [\n 'title' => $request->get('title'),\n 'content' => $request->get('mdContent'),\n 'username' => Auth::user()->name,\n ];\n\n\t\t$question = Question::create($data);\n\n\t\t$question->tags()->attach($tags);\n $user = User::find(Auth::user()->id)->increment('questions_count');\n\n\t\tflash('提问成功!', 'success');\n\n\t\treturn redirect()->route('questions.show', [$question->id]);\n\t}",
"public function store(StoreActivity $request)\n {\n $validated = $request->validated();\n $activity = new Activity($validated);\n $activity->user()->associate($request->user());\n $activity->save();\n return redirect()->action('ActivityController@index')\n ->withSuccess(__('Activity created successfully.'));\n }",
"public function store(CreateFeedbackRequest $request)\n {\n $this->feedback->create($request->all());\n\n return redirect()->route('public_about')\n ->with('status', Lang::get('alert.feedback_sent'));\n }",
"public function store()\n {\n try {\n if (!request()->isJson()) {\n return $this->response->unauthorized();\n }\n\n $validate = $this->validateData(request()->all());\n\n if ($validate->fails()) {\n return $this->response->exception($validate->errors());\n }\n\n $ticket = new Ticket();\n\n $code = $this->findCurrentCorrelative(request()->course_registered_user_id);\n\n $ticket->course_registered_user_id = request()->course_registered_user_id;\n $ticket->type_ticket_id = request()->type_ticket_id;\n $ticket->status_ticket_id = request()->status_ticket_id;\n $ticket->source_ticket_id = request()->source_ticket_id;\n $ticket->priority_ticket_id = request()->priority_ticket_id;\n $ticket->motive_ticket_id = request()->motive_ticket_id;\n $ticket->ticket_code = $this->createTicketCode($code, 1);\n $ticket->user_create_id = auth()->id();\n $ticket->user_assigned_id = request()->user_assigned_id;\n\n\n if (isset(request()->closing_date)) {\n $ticket->closing_date = Carbon::now()->format('Y-m-d H:i:s');\n }\n\n $ticket->save();\n\n return $this->response->success($ticket->fresh()->format());\n } catch (\\Exception $exception) {\n return $this->response->exception($exception->getMessage());\n }\n }",
"public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$validation = Validator::make($input, Feedback::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\n\t\t\t$this->feedback->create($input);\n\n \t\t$mails = [ '[email protected]', '[email protected]', '[email protected]' ];\n\n\t\t\tforeach ($mails as $mail) {\n\t\t\t\t$data = array('input' => $input);\n\t\t\t\tSession::flash('input', $input);\n\t\t\t\tMail::send('emails/feedback', $data, function($message) use ($mail) {\n\t\t\t\t\t$message->to($mail)->subject('A feedback has been send in bIS Project');\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn Response::json([ 'hide_feedback' => true ]);\n\t\t}\n\n\t\t// return Redirect::route('feedbacks.create')\n\t\t// \t->withInput()\n\t\t// \t->withErrors($validation)\n\t\t// \t->with('message', 'There were validation errors.');\n\t}",
"public function store(Request $request)\n {\n // Validate data\n $request->validate([\n 'name' => 'required|max:100',\n 'link' => 'required'\n ],[],[\n\n 'name' => 'website name ',\n 'link' => 'Link '\n\n ]);\n \n $data = $request->all();\n\n Channels::create($data);\n \n return redirect()->back()->with('toast_success', 'Your channels added sucessfully');\n }",
"public function store(Request $request, Thread $thread)\n {\n $message = Message::create(['sender_id' => auth()->id(), 'receiver_id' => request('receiver_id'), \n 'message' => request('message'), 'thread_id' => $thread->id]);\n\n User::findOrFail(request('receiver_id'))->notify(new NewChatMessage($message));\n\n broadcast(new NewMessage($message))->toOthers();\n\n return response(['message' => $message], 200);\n }",
"public function store()\n {\n Room::create(request()->validate([\n 'name'=>['required', 'min:3'],\n 'slug'=>['required', 'min:3'],\n 'description'=>['required', 'min:3'],\n 'available_seats'=>['required'],\n 'is_active'=>['required'],\n 'can_teleconference'=>['required'],\n ]));\n\n // $rooms= new Rooms;\n // $rooms->name=request('name');\n // $rooms->slug=request('slug');\n // $rooms->description=request('description');\n // $rooms->available_seats=request('available_seats');\n // $rooms->is_active=request('is_active');\n // $rooms->can_teleconference=request('can_teleconference');\n \n // $rooms->save();\n\n return redirect('/')->with('success', 'Room created successfully.');\n }",
"public function store(Question $question, Request $request)\n {\n //\n $reply = $question->replies()->create($request->all());\n $user = $question->user;\n $rep = new ReplyResource($reply);\n broadcast(new ReplyEvent($rep, 1))->toOthers();\n return response([\"reply\" => new ReplyResource($reply)], 200);\n }",
"public function store(ChatMessageForm $request, $id)\n {\n try {\n $user = JWTAuth::toUser();\n \n $chat = Chat::find($id);\n\n $message = ChatMessage::create([\n 'message' => $request->get('message'),\n 'user_id' => $user->id,\n 'chat_id' => $chat->id\n ]);\n\n $message->user;\n\n return response()->json(['message' => 'Chat created successfully','data' => $message], Response::HTTP_CREATED);\n } catch (\\Exception $e) {\n return response()->json(['message' => 'An error was encountered', 'errors'=> $e->getMessage()], Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n }",
"public function store(ThreadRequest $request)\n {\n $request->merge(['user_id' => auth()->id()]);\n $thread = $this->repository->create($request->all());\n\n $thread->creator->notify(new SendSlackThread($thread));\n\n return redirect($thread->path);\n }",
"public function store()\n\t{\n\t\t$input = Request::only('internal_number', 'external_number', 'name', 'category', 'partner_id', 'description', 'duration', 'format', 'visible', 'cancelled', 'image', 'start_at', 'tags');\n\n\t\t$input['tags'] = Request::has('hidden-tags') ? explode(',', Request::get('hidden-tags')) : [];\n\n\t\t$course = $this->execute(CreateCommand::class, $input);\n\n\t\tFlash::success(sprintf('El curso %s fue creada con éxito!', $course->name));\n\n\t\treturn Redirect::action('Admin\\CoursesController@index');\n\t}",
"public function store(Request $request)\n {\n $request->validate([\n 'command' => 'required',\n 'content' => 'required',\n 'thread_id' => 'numeric',\n ]);\n\n $command = $request->command;\n $content = $request->content;\n $thread_id = $request->thread_id;\n\n // 該当するスレッドが存在しない場合はエラー\n // 想定されるパターンは 数値を書き換えた or 操作中にスレッドが削除された\n // なので「エラーが発生しました」と表示してホーム画面に戻す\n if (!($thread_id == 0 || \\App\\Thread::find($thread_id)->exists())) {\n return back();\n }\n\n $res = new \\App\\BotSpeak;\n $res->command = $command;\n $res->content = $content;\n $res->save();\n \n $command_id = $res->id;\n \n $ava = new \\App\\CommandAvailable;\n $ava->command_id = $command_id;\n $ava->thread_id = $thread_id;\n $ava->save();\n\n \\Log::info('store BotSpeak.', [\"bot_speak_id\" => $command_id, \"thread_id\" => 0, \"ip\" => $request->ip()]);\n\n return back();\n }",
"public function store()\n {\n $message = new Message(Request::all());\n\n $message->creator_id = user()->id;\n $message->updater_id = user()->id;\n $message->createSlug();\n $message->setReceiverByName(Request::get('receiver_name'));\n\n $okay = $message->save();\n\n if ($okay) {\n // Reset the message counter cache of the receiving user:\n Cache::forget(User::CACHE_KEY_MESSAGES.$message->receiver_id);\n\n $this->alertFlash(trans('messages::message_sent'));\n return Redirect::to('messages/outbox');\n } else {\n return Redirect::to('messages/create')->withInput()->withErrors($message->getErrors());\n }\n }",
"public function store()\n {\n DB::transaction(function () {\n\n $url = null;\n\n if (request()->hasFile('file')) {\n $url = $this->files();\n }\n\n\n\n $this->thread = Thread::create([\n 'subject' => bin2hex(random_bytes(10)),\n ]);\n\n // Message\n $this->message = Message::create([\n 'thread_id' => $this->thread->id,\n 'user_id' => request()->user()->id,\n 'body' => request()->body ?? null,\n 'file_url' => $url ?? null,\n 'type' => request()->type ?? null\n ]);\n\n // Sender\n Participant::create([\n 'thread_id' => $this->thread->id,\n 'user_id' => request()->user()->id,\n 'last_read' => new Carbon,\n ]);\n\n // Recipients\n if (request()->has('recipients')) {\n $this->thread->addParticipant((int) request()->recipients);\n }\n });\n\n /**\n * dispatches an event\n */\n event(new NewMessage(\n [\n 'id' => $this->thread->id,\n 'users' => $this->thread->users,\n 'participants' => $this->thread->participants,\n 'extras' => collect($this->thread->users)->map(function ($user) {\n return [\n 'profile_picture' => $user->profilePictures()->latest('created_at')->first(),\n 'count' => $this->thread->userUnreadMessagesCount($user->id),\n 'user_id' => $user->id\n ];\n }),\n 'messages' => $this->thread->messages\n ]\n ));\n\n\n return new ThreadResource($this->thread);\n }",
"public function store(Request $request, Chat $chat)\n {\n try\n {$request->validate([\"message\" => \"nullable|string\", \"attachment\" => \"file|mimes:png,jpeg,jpg,pdf\"]);\n $chat = $chat->find((int) $request->id);\n if ($chat->id) {\n if ($request->attachment) {\n $dir = 'public/chatAttachment/';\n $file_name = time() . date('Y-m-d-h-i-s') . '.' . $request->attachment->getClientOriginalExtension();\n if ($request->attachment->storeAs($dir, Auth::user()->id . $file_name)) {\n $path = '/storage/chatAttachment/' . Auth::user()->id . $file_name;\n $chat->users()->attach(Auth::user()->id, [\"body\" => $request->message,\"path\"=>$path]);\n }\n }\n else $chat->users()->attach(Auth::user()->id, [\"body\" => $request->message]);\n }\n return redirect(route(\"chatView\", 'id' . '=' . $chat->id));}\n catch(Exception $e){\n abort(404);\n }\n }",
"public function store(Request $request)\n {\n $message = new MessageThreadMessage($request->all());\n $message->thread_id = $request->input('threadId');\n $message->user_id = Auth::user()->id;\n $message->save();\n // TODO: Reload user for data sent back to client\n $message->load('postedBy');\n // TODO: If there's an attachment, add it\n return response()->json($message);\n }",
"public function store(Request $request)\n {\n Chambre::create($request->all());\n return redirect()->route('chambres.index')->with('success','Chambre created successfully');\n }",
"public function store(Request $request)\n {\n $request->validate([\n 'msg' => 'required|string',\n 'chat' => 'required|numeric'\n ]);\n Mensaje::create([\n 'usuario_id' => \\Auth::user()->id,\n 'chat_id' => $request->chat,\n 'mensaje' => $request->msg,\n ]);\n }",
"public function store(StoreSpeakersCongressesRequest $request) {\n if (!Gate::allows('speakers_congress_create')) {\n return abort(401);\n }\n $speakers_congress = SpeakersCongress::create($request->all());\n\n\n\n return redirect()->route('admin.speakers_congresses.index');\n }",
"public function store(Requests\\NewChallenge $request)\n {\n \n if (Auth::check()) {\n $challenge = Challenge::create([\n 'description'=>$request->description, \n 'name'=>$request->name,\n 'start_date' => $request->start_date,\n 'end_date' => $request->end_date,\n 'owner_id' => \\Auth::user()->id\n ]);\n\n if (Challenge::find($challenge->id)){\n\t\t\t\t$challenge->users()->attach( \\Auth::user()->id );\n\t\t\t\t//to remove:\n\t\t\t\t//$challenge->users()->detach(id);\n\t\t\t\t//all users:\n\t\t\t\t//$challenge->users()->detach();\n\t\t\t\t$challenge->save();\n \tprint \"success\";\n }\n return redirect('/challenges');\n }else{\n return redirect('/');\n }\n }",
"public function store(ThreadRequest $request)\n {\n Auth::user()->saveThread(Thread::new($request));\n\n return redirect()->route('threads.index')\n ->with('flash', 'Your thread has been published.');\n }",
"public function store(CreateFeedbackAPIRequest $request)\r\n {\r\n $profile = \\Auth::user();\r\n\r\n $input = $request->all();\r\n $input['profile_id'] = $profile->id;\r\n\r\n $feedback = $this->feedbackRepository->create($input);\r\n\r\n return $this->sendResponse($feedback->toArray(), 'Feedback saved successfully');\r\n }",
"public function store(Request $request)\n {\n $request->validate([\n 'reply' => 'required|max:255'\n ]);\n\n Reply::create($request->all());\n\n $url = '/thread' . '/' . $request->thread_id;\n return redirect($url);\n }",
"public function store()\n\t{\n\t\t$fbf_historico_atleta_cameponato = new FbfHistoricoAtletaCameponato;\n\t\t$fbf_historico_atleta_cameponato->idcampeonato = Input::get('idcampeonato');\n$fbf_historico_atleta_cameponato->idatleta = Input::get('idatleta');\n$fbf_historico_atleta_cameponato->idtime = Input::get('idtime');\n$fbf_historico_atleta_cameponato->classificacao = Input::get('classificacao');\n$fbf_historico_atleta_cameponato->jogos = Input::get('jogos');\n$fbf_historico_atleta_cameponato->gols = Input::get('gols');\n\n\t\t$fbf_historico_atleta_cameponato->save();\n\n\t\t// redirect\n\t\tSession::flash('message', 'Registro cadastrado com sucesso!');\n\t\treturn Redirect::to('fbf_historico_atleta_cameponato');\n\t}",
"public function store(SubscribeRequest $request)\n {\n $this->subscribes->create($request);\n setMessage('message','success',\"Create Successfully\");\n return redirect()->route('subscribe.index');\n }",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'slug' => 'required'\n ]);\n\n $channelExists = Channel::where('slug', $request->slug)->first();\n if ($channelExists == null) {\n $channel = Channel::create([\n 'title' => request('title'),\n 'slug' => request('slug')\n ]);\n\n return redirect($channel->path())->with('msg', 'De channel is aangemaakt.');\n }else{\n return redirect(route('createNewChannel'))\n ->with('msg', 'Die channel bestaat al!');\n }\n }",
"public function store()\n {\n $data = \\Request::all();\n $category = CategoryService::create($data);\n \\Msg::success($category->name . ' has been <strong>added</strong>');\n return redir('account/categories');\n }",
"public function store(Request $request)\n {\n // dd($request->all());\n\n $validatedData = $request->validate([\n 'name' => 'required|min:2|max:50',\n 'description' => 'nullable|min:5',\n ]);\n\n $channel = new Channel();\n\n $channel = $this->handleImageUpload($request, $channel);\n\n $channel->name = $request->name;\n $channel->description = $request->description;\n $channel->user_id = auth()->id();\n\n $channel->save();\n\n // dd($request->all(), $user);\n\n return redirect()->to('/channels')->with(['message' => 'Canal adicionado com sucesso']);\n\n }",
"public function store(Request $request)\n {\n $validatedData = $request->validate([\n 'sender' => 'required',\n 'message' => 'required',\n 'chatRoomId' => 'required|numeric',\n ]);\n\n try {\n $chatRoomMessage = new ChatRoom_Message;\n\n $chatRoomMessage->chatRoom_id = $request->chatRoomId;\n $chatRoomMessage->message = $request->message;\n $chatRoomMessage->sender = $request->sender;\n\n $chatRoomMessage->save();\n\n broadcast(new MessageSent($chatRoomMessage->id, $chatRoomMessage->message, $chatRoomMessage->sender, $chatRoomMessage->chatRoom_id, $chatRoomMessage->created_at));\n\n return response()->json(null, 201);\n } catch (\\Exception $e) {\n return response()->json([\n 'error' => true,\n 'message' => $e->getMessage()\n ], 400);\n }\n }",
"public function store(WhatsAndWeChatRequest $request ,CrudRepository $crud , WahatsAndWeChate $wechat)\n {\n //\n $crud->store($request,$wechat);\n return redirect()->back();\n }",
"public function store(Request $request)\n {\n $request->validate([\n 'content' => 'required'\n ]);\n\n $reply = Reply::create([\n 'content' => request('content'),\n 'user_id' => auth()->id(),\n 'discussion_id' => request('discussion_id')\n ]);\n\n $discussion = Discussion::find(request('discussion_id'));\n\n $watchers = array();\n\n foreach($discussion->watchers as $watcher)\n {\n array_push($watchers, $watcher->user);\n }\n\n Notification::send($watchers, new \\App\\Notifications\\NewReplyAdded($discussion));\n\n $reply->user->upPointsForReply();\n\n session()->flash('success', 'Successfully posted answer');\n\n return back();\n }",
"public function store(Request $request)\n\t{ \n\t\t$actor = Actor::create($request->all());\n\t\treturn response()->json($actor);\n\t}",
"public function store(CreateactivityRequest $request)\n {\n $input = $request->all();\n\n $activity = $this->activityRepository->create($input);\n\n Flash::success('Actividad Guardada.');\n\n return redirect(route('activities.index'));\n }",
"public function store(Request $request)\n {\n $this->validate($request, array(\n 'name' => 'required|max:255' , \n 'tel' => 'required|max:255' ,\n 'national' => 'required|max:11' , \n 'job' => 'required|max:255' , \n 'city' => 'required|max:255' \n ));\n\n $doctor = new Doctor;\n\n $name = $doctor->name = $request->name ;\n $tel = $doctor->tel = $request->tel ;\n $job = $doctor->job = $request->job ;\n $national = $doctor->national = $request->input('national'); \n $city = $doctor->city = $request->city ;\n $address = $doctor->address = $request->address ; \n \n $doctor->save(); \n \n $id = $doctor->id ; \n \n Session::flash('success', 'تم اضافة ');\n \n $dataBuilder = new PayloadDataBuilder();\n $dataBuilder->addData([\n 'type' => 'Doctors',\n 'id' => $id, \n 'name' => $name , \n 'tel' => $tel , \n 'job' => $job , \n 'city' => $city , \n 'address' => $address \n ]);\n \n $data = $dataBuilder->build();\n \n \n $topic = new Topics();\n $topic->topic('wiqaia');\n \n $topicResponse = FCM::sendToTopic($topic, null, null , $data );\n \n $result = $topicResponse->isSuccess();\n $topicResponse->shouldRetry();\n $topicResponse->error(); \n \n \n //return redirect()->route('doctors.show',$doctor->id);\n //return view('index');\n return redirect()->back() ->with('alert', 'تم التسجيل بنجاح!');\n }",
"public function store()\n\t{\n\t\t$this->actions->create(Input::all());\n\t\treturn Redirect::route('actions.index');\n\t}",
"public function store(CreateChargeRequest $request)\n {\n $this->authorize('can-be-caretaker', User::class);\n $user = Auth::user()->charges()->save($this->users->createPatient($request->all()));\n $this->createRelation(Auth::user(), $user, $request->get('relation_id'));\n return redirect()->route('charges.index');\n }",
"public function store()\r\n\t{\r\n\t\t$jsonData = $this->getAll();\r\n\r\n\t $data = array(\r\n\t\t\t'username'=> $this->user->username,\r\n\t\t\t'post'=> $this->post,\r\n\t\t\t'date'=> $this->date,\r\n\t );\r\n\r\n\t\tarray_unshift($jsonData, $data);\r\n\r\n\t\t$this->save($jsonData);\r\n\t}",
"public function store(Request $request) {\n \t$cancer = Cancer::create($request->all());\n\n $bitacora = new Bitacora();\n $bitacora->ip = $request->getClientIp();\n $bitacora->operacion = 'crear';\n $bitacora->tabla = 'cancer';\n $bitacora->save();\n\n \treturn response()->json($cancer);\n }",
"public function store(Request $request)\n {\n $thread = Thread::create([\n 'subject' => $request->get('subject','new'),\n ]);\n\n // Message\n Message::create([\n 'thread_id' => $thread->id,\n 'user_id' => Auth::user()->id,\n 'body' => $request->get('message'),\n ]);\n\n // Sender\n Participant::create([\n 'thread_id' => $thread->id,\n 'user_id' => Auth::user()->id,\n 'last_read' => new Carbon,\n ]);\n\n // Recipients\n if ($request->has('recipients')) {\n $thread->addParticipant($request->get('recipients'));\n }\n\n return response()->json($thread);\n }",
"public function store(Request $request)\n {\n return TimeActivity::Create([\n 'date_time' => $request->date_time,\n 'hours' => $request->hours,\n 'activity_id' => $request->activity_id\n ]);\n \n\n }",
"public function store($channelID, Request $request, Thread $thread)\n {\n //Validate incoming request\n $request->validate([\n 'reply' => 'required',\n ]);\n\n //Make a reply object and associate with the thread\n $thread->addReply([\n 'reply'=> request('reply'),\n 'expert_id' => auth('expert')->user()->id,\n ]);\n\n return back();\n }",
"public function store(Channel $channel)\n {\n return $channel->subscriptions()->create([\n 'user_id' => auth()->user()->id\n ]);\n }",
"public function store(Request $request)\n {\n \n if($request->isMethod('post')){\n\n $chauffeur = new chauffeur();\n \n\n $chauffeur->NomchauffTaxi=$request->input('NomChof');\n $chauffeur ->PrechauffTaxi = $request->input('PrenomChof');\n $chauffeur->Sexe = $request->input('SexeChof');\n $chauffeur ->AdrChauffTaxi = $request->input('AdresseChof');\n $chauffeur ->CategoriPermis = $request->input('CategorieChof');\n $chauffeur ->Numero = $request->input('NumeroChof');\n $chauffeur ->Identifiant = $request->input('EmailChof');\n $chauffeur ->Password = $request->input('PasswordChof');\n\n\n $chauffeur ->photo = $request->PhotoChof->store('image');\n \n //if($request->hasFile('permis')){\n \n $chauffeur ->permis = $request->PermisChof->store('image');\n \n\n $chauffeur->save();\n\n $attribution = new attribution();\n\n $attribution ->CodeChauffTaxi = $chauffeur->id;\n $attribution ->CodeTaxi= $request->input('TaxiChof');\n $attribution ->dateAttrib = date(\"Y-m-d H:i:s\");\n\n\n //dd($attribution);\n $attribution->save();\n \n }\n\n$msg=\"inscription en cours\";\n $mailable= new MessageCreated($chauffeur ->NomchauffTaxi,$chauffeur ->Identifiant,$msg) ; \nMail::to('[email protected]')->send($mailable); \n\nsession()->flash('message','Chauffeur a été créer avec succès!!!');\n\n return redirect('/Chauffeurs');\n }",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'phone' => 'required',\n 'email' => 'required',\n 'message' => 'required',\n ], [], trans('feedback.attributes'));\n\n $feedback = Feedback::create($request->all());\n\n event(new FeedbackSent($feedback));\n\n return response()->json([\n 'message' => trans('feedback.messages.sent'),\n ]);\n }",
"public function store()\n\t{\n\t\t$user = new UserCardio;\n\t\t$user->user_id = Auth::id();\n\t\t$user->cardioType = Input::get('cardioType');\n\t $user->cardioDuration = Input::get('cardioDuration');\n\t $user->cardioLength = Input::get('cardioLength');\n\t\t$user->cardioCaloriesBurnt = Input::get('cardioCaloriesBurnt');\n\t \t$user->save();\n\n\t \n\t\t\n \treturn Redirect::to('user/cardio/');\n\t}",
"public function store()\n\t{\n\t $button = Input::get('sent');\n\t if($button === 'sent') {\n\t $nombre = Input::get('nombre');\n\t $apellido = Input::get('apellido');\n $rfc = Input::get('rfc');\n $rol = Input::get('rol');\n $correo = Input::get('correo');\n $bool = Usuario::postUsuario($nombre,$apellido,$rfc,$rol,$correo);\n if($bool){\n return Redirect::route('usuarios.index')->withMessage(\"Usuario registrado\");\n }\n else{\n return Redirect::route('usuarios.index')->withMessage(\"Algo ha salido mal\");\n }\n\n }\n\t}",
"public function store(Request $request)\n {\n $request->validate([\n 'name' => ['required', 'string', 'min:3']\n ]);\n\n $input = request()->all();\n\n $topic = Topic::create($input);\n\n return response()->json(['data' => $topic], 201);\n }",
"public function store(addNewSpeaker $request)\n {\n $speaker = Speakers::create([\n 'name' => $request->input('name'),\n 'overview' => $request->input('overview'),\n 'twitter' => $request->input('twitter'),\n 'snap' => $request->input('snap'),\n 'instagram' => $request->input('instagram'),\n 'facebook' => $request->input('facebook'),\n 'photo' => $request->file('image') ? $this->storeImage($request->file('image') , 'admin/images/profile') : ''\n ]);\n return redirect()->to(route('speakers.index'))->with(['msg' => 'Successfully Added speaker']);\n }",
"public function store(Request $request)\n {\n $user = User::where('name', request()->user['name'])->first();\n\n $message = $user->messages()->create([\n 'message' => request()->get('message'),\n 'room_id' => request()->get('room')\n ]);\n\n $room = \"room.\". request()->get('room');\n\n broadcast(new MessageCreated($message, $user, $room))->toOthers();\n\n return ['status' => 'OK'];\n }",
"public function store(StoreThread $form)//\n {\n $channel = collect(config('channel'))->keyby('id')->get($form->channel_id);\n if(!$channel||!auth('api')->user()){abort(404);}\n\n if(auth('api')->user()->no_posting){abort(403,'禁言中');}\n\n if($channel->type==='book'&&(auth('api')->user()->level<1||auth('api')->user()->quiz_level<1)&&!auth('api')->user()->isAdmin()){abort(403,'发布书籍,必须用户等级1以上,答题等级1以上');}\n\n if($channel->type<>'book'&&(auth('api')->user()->level<4||auth('api')->user()->quiz_level<2)&&!auth('api')->user()->isAdmin()){abort(403,'发布非书籍主题,必须用户等级4以上,答题等级2以上');}\n\n if(!$channel->is_public&&!auth('api')->user()->canSeeChannel($channel->id)){abort(403,'不能访问这个channel');}\n\n if(!auth('api')->user()->isAdmin()&&Cache::has('created-thread-' . auth('api')->id())){abort(410,\"不能短时间频繁建立新主题\");}\n\n //针对创建清单进行一个数值的限制\n if($channel->type==='list'){\n $list_count = Thread::where('user_id', auth('api')->id())->withType('list')->count();\n if($list_count > auth('api')->user()->user_level){abort(410,'额度不足,不能创建更多清单');}\n }\n if($channel->type==='box'){\n $box_count = Thread::where('user_id', auth('api')->id())->withType('box')->count();\n if($box_count >=1){abort(410,'目前每个人只能建立一个问题箱');}\n }\n\n $thread = $form->generateThread($channel);\n\n Cache::put('created-thread-' . auth('api')->id(), true, 10);\n\n if($channel->type==='list'&&auth('api')->user()->info->default_list_id===0){\n auth('api')->user()->info->update(['default_list_id'=>$thread->id]);\n }\n if($channel->type==='box'&&auth('api')->user()->info->default_box_id===0){\n auth('api')->user()->info->update(['default_box_id'=>$thread->id]);\n }\n\n $thread = $this->threadProfile($thread->id);\n\n return response()->success(new ThreadProfileResource($thread));\n }",
"public function store(Request $request)\n {\n $threadId = $request->get('threadId');\n $msg = $request->get('msg');\n $thread = Thread::findOrFail($threadId);\n $thread->activateAllParticipants();\n // Message\n $msg = Message::create(\n [\n 'thread_id' => $thread->id,\n 'user_id' => $request->user()->id,\n 'body' => $msg,\n ]\n );\n\n // Add replier as a participant\n $participant = Participant::firstOrCreate(\n [\n 'thread_id' => $thread->id,\n 'user_id' => $request->user()->id\n ]\n );\n $participant->last_read = new Carbon();\n $participant->save();\n // Recipients\n if ($request->has('recipients')) {\n $thread->addParticipants($request->get('recipients'));\n }\n $msg->load('user');\n\n return response()->json($msg);\n }",
"public function store(InsertAdherentRequest $request)\n {\n Adherent::create($request->all());\n return back()->with('info', 'L\\'adhérent a bien été ajouté à la base de données');\n }",
"public function store(CreateReplyRequest $request, Discussion $discussion)\n {\n auth()->user()->replies()->create([\n 'content' => $request->content,\n 'discussion_id' => $discussion->id\n ]);\n\n auth()->user()->points += 25;\n auth()->user()->save();\n\n if($discussion->author->id !== auth()->user()->id) {\n $discussion->author->notify(new NewReplyAdded($discussion));\n }\n\n session()->flash('success', 'Reply Added!');\n\n return redirect()->back();\n }",
"public function store(Request $request)\n {\n $data = $request->all();\n\n $data['created_by'] = \"1\";\n\n $success = CallLog::create($data);\n\n if ($success) {\n $notification=array(\n 'message' => 'Call Log Added Successfully ',\n 'alert-type' => 'success'\n );\n return redirect()->back()->with($notification);\n }\n }",
"public function store(StoreThread $form)//\n {\n $channel = $form->channel();\n if(empty($channel)||((!$channel->is_public)&&(!auth('api')->user()->canSeeChannel($channel->id)))){abort(403);}\n\n //针对创建清单进行一个数值的限制\n if($channel->type==='list'){\n $list_count = Thread::where('user_id', auth('api')->id())->withType('list')->count();\n if($list_count > auth('api')->user()->user_level){abort(403);}\n }\n if($channel->type==='box'){\n $box_count = Thread::where('user_id', auth('api')->id())->withType('box')->count();\n if($box_count >=1){abort(403);}//暂时每个人只能建立一个问题箱\n }\n $thread = $form->generateThread();\n return response()->success(new ThreadProfileResource($thread));\n }",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'category_id' => 'required',\n 'date_launch' => 'required|date',\n 'name' => 'required|min:3|max:255',\n 'value' => 'required|numeric'\n ]);\n \n auth()->user()->bill_receives()->create($request->all());\n\n Session::flash('success', 'Conta a receber criada com sucesso');\n\n return redirect()->route('bill_receives.index');\n }",
"public function store(Request $request)\n {\n //\n // Createa new topic\n $topic = new Topic;\n $topic->topic_name = $request->topic_name;\n $topic->topic_body = $request->topic_body;\n $topic->topic_tags = $request->topic_tags;\n $topic->topic_image = $request->topic_image;\n\n $topic->save();\n \n return response()->json([\n \"message\" => \"topic created successfully\"\n ], 201);\n }",
"public function store(Request $request)\n {\n // $this->validate($request, [\n // 'text' => 'required|max:255',\n // ]);\n\n // $request->user()->categories()->create([\n // 'text' => $request->text,\n // ]);\n/*\n $category = new Category;\n $category->name = $request->name;\n $category->color = $request->color;\n $category->user_id = $request->user()->id;\n $category->save();\n*/\n\n $category = $request->user()->categories()->create([\n 'name' => $request->name,\n 'color'=> $request->color,\n ]);\n\n $obj = array();\n $obj['html'] = view('frontend.category_item', [\n 'category' => $category,\n ])->render();\n $obj['jsonCategory'] = json_encode($category);\n return $obj;\n }",
"public function store(Request $request)\n {\n $contactResult = Contact::create($request->all());\n $contact = Contact::findOrFail($contactResult->id);\n\n event(new MessageWasReceived($contact));\n\n //Guardar el Id de un usuario en un mensaje que ya fue guardado con anterioridad\n //Esto es para cuando un usuario puede o no estar autenticado\n auth()->user()->contacts()->save($contact);\n\n //We can use this line whe all the users are autenticated\n //auth()->user()->contacts()->create($request->all());\n\n //We can do it this too\n //$contact->user_id = auth()->id();\n //$contact->save();\n\n /* Service DATA */\n config('services.newservice.key');\n env('NEW_SERVICE_KEY');\n /**/\n\n return redirect()->route('contacts.index');\n }",
"public function store()\n\t{\n\t\t$data = Input::all();\n\t\t$data['user_id'] = Auth::id();\n\n\t\t$validator = Validator::make($data , Pitch::$rules);\n\n\t\tif ( $validator->fails() )\n\t\t{\n\t\t\treturn Response::json( $validator->messages() );\n\t\t}\n\n\t\tPitch::create($data);\n\n\t\treturn Response::json( ['good job' => 'wooot'] );\n\t}",
"public function store(StoreTopicRequest $request)\n {\n// dd($user->ownsTopic(11));\n $result = Topic::create([\n 'user_id' => $request->user()->id,\n 'title' => trim($request->title),\n 'content' => $request->topic_content\n ]);\n if ($result){\n return response()->json([\n 'message' => '创建成功',\n 'data' => new TopicResource($result)\n ],201);\n }\n return response()->json([\n 'msg' => '服务器错误 创建失败'\n ],400);\n }",
"public function store(CreateMatchRequest $request)\n {\n $this->matchService->addNewMatch($request->only('title_ar', 'title_en', 'description_ar', 'description_en', 'week_id', 'image', 'video'));\n \n return redirect()->route('matches.index')->with('success','Match created successfully.');\n }",
"public function store(Request $request) {\n $input = $request->all();\n $validator = \\Validator::make($input, $this->roomRepo->validateCreate());\n if ($validator->fails()) {\n return redirect()->back()->withErrors($validator)->withInput();\n }\n $input['temp_product_id'] = $input['product_id'];\n $input['status'] = isset($input['status']) ? 1 : 0;\n $input['is_hot'] = isset($input['is_hot']) ? 1 : 0;\n $input['is_new'] = isset($input['is_new']) ? 1 : 0;\n $input['created_by'] = \\Auth::user()->id;\n $input['view_count'] = 0;\n $input['post_schedule'] = isset($input['post_schedule']) ? $input['post_schedule_submit'] : date('Y-m-d H:i:s');\n $room = $this->roomRepo->create($input);\n //Thêm vào lịch sử đăng bài\n $this->addPostHistory($room);\n //thêm khách sạn \n //Thêm danh mục sản phẩm\n // $product->categories()->attach($input['category_id']);\n //Thêm thuộc tính sản phẩm\n $facilities = $this->getRoomFacilities($input);\n $room->facilities()->attach($facilities);\n\n if ($room) {\n return redirect()->route('admin.room.index')->with('success', 'Tạo mới thành công');\n } else {\n return redirect()->route('admin.room.index')->with('error', 'Tạo mới thất bại');\n }\n }",
"public function store(Request $request)\n {\n //\n $this->validator($request->all())->validate();\n $sender = Sender::create($request->all());\n return response()->json($sender,201);\n }",
"public function store(){\n\n apiwat::create(request(['title','author', 'price','publish_date', 'website', 'id']));\n\n return back();\n }"
] | [
"0.654061",
"0.6455073",
"0.64084196",
"0.6346593",
"0.6337734",
"0.63215244",
"0.6218274",
"0.61983913",
"0.6195074",
"0.615334",
"0.6147825",
"0.61340994",
"0.60901433",
"0.60754323",
"0.6059505",
"0.6044388",
"0.6028299",
"0.6004514",
"0.5942181",
"0.5933102",
"0.59243727",
"0.59200096",
"0.5913516",
"0.59058887",
"0.5905693",
"0.5900601",
"0.58964914",
"0.58953536",
"0.58950126",
"0.5890629",
"0.588666",
"0.58822197",
"0.58759636",
"0.58727735",
"0.5868116",
"0.58631676",
"0.5853912",
"0.58530724",
"0.5845052",
"0.5842925",
"0.58373463",
"0.58335716",
"0.58199704",
"0.5817587",
"0.5816215",
"0.58143544",
"0.5794368",
"0.57907635",
"0.57618076",
"0.5761227",
"0.57523555",
"0.575101",
"0.5740421",
"0.57398117",
"0.5728952",
"0.57201374",
"0.5718333",
"0.5718093",
"0.5718005",
"0.57112175",
"0.57105285",
"0.5706172",
"0.5706129",
"0.5701294",
"0.5697056",
"0.5696185",
"0.569488",
"0.5692314",
"0.5692309",
"0.5692148",
"0.5683319",
"0.5681685",
"0.5676917",
"0.5675026",
"0.56749177",
"0.5669245",
"0.5668313",
"0.56650597",
"0.56610954",
"0.56580704",
"0.56565565",
"0.56543505",
"0.56506",
"0.56495243",
"0.5646563",
"0.56436914",
"0.5637493",
"0.56364435",
"0.56356335",
"0.563549",
"0.5633208",
"0.5627285",
"0.56269",
"0.56243956",
"0.56237537",
"0.5622981",
"0.56218207",
"0.5618864",
"0.5617262",
"0.5616234"
] | 0.6008131 | 17 |
echo "mensaje desde el controlador"; | public function index()
{
$data["page_id"] = 1;
$data["page_tag"] = "Articulos";
$data["page_title"] = "Articulos - Yo contribuyo";
$data["page_name"] = "articulos";
$data["nav_articulos"] = "active";
$data["script"] = "Articulo/articulos.js";
$this->getView("Articulo/articulos", $data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function mostrar()\n {\n echo $this -> mensaje;\n }",
"public function hablar($mensaje){\n echo $mensaje; \n }",
"public function correu(){\n echo \" correu !\";\n }",
"public function locomover()\n {\n echo \"<p>Voando</p>\";\n }",
"function printErro(){\n\tif ( $_SESSION['msg'] ) {\n\t\tprint $_SESSION['msg'];\n\t\t$_SESSION['msg'] = '';\n\t}\n}",
"function mensaje_entregables(){\n\t$_SESSION['estado']='9';\n\techo \" <script>window.location='admin_registro.php'; </script>\";\n}",
"public function dialogoMensaje(){\n\t \t$template = file_get_contents('tpl/dialogo_msg_tpl.html');\n\t \tprint($template);\n\t }",
"public function run()\r\n\t{\r\n\t\treturn 'faz de conta...';\r\n\t}",
"function feedbackAvaliador() {\n echo '<p class=\"feedback success\"><b>Revisor adicionado com sucesso.</b></p>';\n }",
"function refus($msg) {\n echo \"<b><font color=red>$msg</font></b><br>\";\n echo \"Action non commenc�e; rectifier les conditions initiales avant de reprendre<br>\";\n}",
"public function hablar($mensaje)\n {\n echo $mensaje. $this -> nombre . $this -> apellido.\"<br>\";\n }",
"function gagal() {\n echo $_err = ErrorMsg(\"Login Gagal\", \"Kode Login dan Password salah!!!\n <hr size=1 color=#3b5998>\n Perhatikan Anda Login sebagai siapa dan pastikan Anda memasukan Kode Login dan password dengan benar.\n\t <hr size=1 color=#3b5998>\n Untuk informasi lebih lanjut hubungi Administrator.\n\t <hr size=1 color=#3b5998>\n Silahkan <a href='index.php'>Coba Lagi</a>\");\n}",
"public function Locomover()\n {\n echo \"<br>Saltando\";\n }",
"function mensaje() {\n $mensaje = $this->miConfigurador->getVariableConfiguracion('mostrarMensaje');\n //$this->miConfigurador->setVariableConfiguracion ( 'mostrarMensaje', null );\n\n if ($mensaje) {\n\n $tipoMensaje = $this->miConfigurador->getVariableConfiguracion('tipoMensaje');\n\n if ($tipoMensaje == 'json') {\n\n $atributos ['mensaje'] = $mensaje;\n $atributos ['json'] = true;\n } else {\n $atributos ['mensaje'] = $this->lenguaje->getCadena($mensaje);\n }\n // -------------Control texto-----------------------\n $esteCampo = 'divMensaje';\n $atributos ['id'] = $esteCampo;\n $atributos [\"tamanno\"] = '';\n $atributos [\"estilo\"] = 'information';\n $atributos [\"etiqueta\"] = '';\n $atributos [\"columnas\"] = ''; // El control ocupa 47% del tamaño del formulario\n echo $this->miFormulario->campoMensaje($atributos);\n unset($atributos);\n }\n\n return true;\n }",
"function vue_connexion() {\n echo '\n <h1>Bienvenue sur OUISCAN.</h1>\n <p>Pour lire les mangas, veuillez d\\'abord rentrer le mot de passe.</p><br/>\n <form action=\"VerifMDP.php\" method=\"post\">\n <label>Identifiant</label>\n <input type=\"username\" name=\"uname\" size=\"8\"/><br/>\n <label>Mot de passe</label>\n <input type=\"password\" name=\"mdp\" size=\"8\"/><br/>\n <input class=\"btn1\" type=\"submit\" value=\"Valider\"/>\n </form>\n <div class=\"clearfix\"></div>';\n}",
"public function index()\n {\n echo \"Accion de Queja\"; die();\n }",
"public function showMessage(){\n\t\t\n\n\t\ttry {\n\n\t\t\tif(!empty($_POST)){// si un commentaire est poter\n\t\t\t\tTchatModel::setMessage($_POST[\"message\"],$_POST[\"idUsr\"]);\n\t\t\t}\n\n\t\t\t$data = TchatModel::getMessage();\n\t\t} catch (Exception $e) {\n\t\t\t$data = TchatModel::getMessage();\n\t\t\t$warning = $e->getMessage();\n\t\t}\n\t\trequire_once'ViewFrontend/tchat.php';\n\t}",
"public function connexion()\n {\n # echo '<h1>JE SUIS LA PAGE CONNEXION</h1>';\n $this->render('membre/connexion');\n }",
"public function message()\n {\n return 'Los datos de acceso no son correctos.';\n }",
"public function mostrar(){\n\t\t\t\techo \"<p> Hola soy un $this->marca, modelo $this->modelo</php> \";\n\t\t\t}",
"function mensaje_campos(){\n\t$_SESSION['estado']='1';\n\techo \" <script>window.location='admin_registro.php'; </script>\";\n\n}",
"public function voirsolde()\n {\n echo \"le solde du compte est de $this->solde \";\n }",
"function saludo(){\n echo \"<hr>\";\n echo \"Buenas tardes aprendices, bienvenidos a las clases de PHP\";\n echo \"<hr>\";\n }",
"public function affectation()\n {\n session_start();\n $bdd = new PDO('mysql:host=localhost;dbname=projet', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n $allmsg = $bdd->query('SELECT * FROM role ORDER BY ordre ASC ');\n //on va devoir ajouter une colonne dans la BD ca sera le pseudo du joueur on va voir ca\n while($msg= $allmsg->fetch())\n {\n ?>\n <br> <b><?php echo $msg['pseudo'].' a choisis le rôle: ' . $msg['role']. ' !' ?> </b> </br>\n <?php\n }\n\n //nombre de lignes dans la table\n $JoueursRestant = 7 - $allmsg->rowCount();\n\n if($JoueursRestant != 0)\n {\n echo \" <p id='avantlancer1'> En attente de \". $JoueursRestant .\" Joueurs</p>\t<img src=\\\"ajax-loader.gif\\\" alt=\\\"patientez...\\\" id='ajax'> </br>\";\n }\n else{\n echo '<p id=\"avantlancer2\">La partie va commencer dans: <p/>';\n\n\n }\n\n }",
"function _mostrar(){\n $html = $this->Cabecera();\n $html .= $this->contenido();\n // $html .= $this->tablaDatos();\n $html .= $this->Pata();\n echo $html;\n }",
"function _mostrar(){\n $html = $this->Cabecera();\n $html .= $this->contenido();\n // $html .= $this->tablaDatos();\n $html .= $this->Pata();\n echo $html;\n }",
"function _mostrar(){\n $html = $this->Cabecera();\n $html .= $this->contenido();\n $html .= $this->Pata();\n echo $html;\n }",
"public function showMessage($msg){\n// $message += ($msg +\"<br/>\");\n// require APP . 'view/_templates/header.php';\n// require APP . 'view/home/message.php';\n// require APP . 'view/post/index.php';\n// require APP . 'view/_templates/footer.php';\n// return;\n }",
"public function response(){\n\t\t\t\n\t\t\t\tif( !empty($this->errores)){\n\t\t\t\t\techo '<u>Lista de errores:</u> <br />';\n\t\t\t\t\techo $this->errores;\n\t\t\t\t}else{\n\t\t\t\t\t//mail($destinatario1, $asunto, $msj);\n\t\t\t\t\t//mail($destinatario2, $asunto, $msj);\n\t\t\t\t\techo \"Mensaje enviado con exito\";\n\t\t\t\t\techo \"<script type='text/javascript'> parent.document.formu.reset(); </script>\"; \n\t\t\t\t}\n\t\t\t}",
"public function displayMessage() {}",
"function formConnexion() {\n\t\tif (isset($_SESSION['id'])) {\n\t\t\theader(\"Location: ?module=accueil\");\n\t\t\texit();\n\t\t}\n\t\telse\n\t\t\t$this -> vue -> afficheConnexion('');\n\t}",
"public function ew_display_s($mensaje){\n\t\t\techo(\"<h3>\".$mensaje.\"</h3>\");\n\t\t}",
"public function verificacionmostrar(){\n $objetoretornado = $this->mostrar();\n require '../vistas/servicios/mostrar.php';\n }",
"public function displayAdminPage()\n {\n ob_start();\n echo 'test';\n\n }",
"public function sendWelcomeMsg()\n\t{\n\t}",
"public function laporan()\n {\n echo \"OK\";\n }",
"public function message()\n {\n return 'Ya se hizo un registro el día de de hoy.';\n }",
"function StatusCon(){\n\t\tif(!$this->con){\n\t\t\techo \"<h3>O sistema no est conectado [$this->banco] em [$this->host].</h3>\";\n\t\texit;\n\t\t}else{\n\t\t\techo \"<h3>O sistema est conectado [$this->banco] em [$this->host].</h3>\";\n\t\t}\n\t}",
"public function verif()\n {;\n if(empty($_SESSION['pseudo']))\n {\n $_SESSION['erreur2'] = \"Vous devez vous connecter !\";\n header('Location:ContenuRecette?id='.$_SESSION['recette']);\n }\n else\n {\n if(empty($_POST['commentaireRecette']))\n {\n echo 'vide';\n }\n else\n {\n $commentaire = htmlspecialchars($_POST['commentaireRecette']);\n $test = new RecetteModel();\n $test->postCommentaire($commentaire,$_SESSION['pseudo'],$_SESSION['recette']);\n header('Location:ContenuRecette?id='.$_SESSION['recette']);\n }\n }\n \t\n }",
"function success() {\n echo \"<br />\";\n \n echo \"Thank you for contacting us. We will be in touch with you very soon.\";\n \n echo \"<br />\";\n \n \n \n }",
"public function message()\n {\n return 'Ese código ya está en uso';\n }",
"public function show($id)\n {\n echo \"Thank you \";\n }",
"public function message()\n {\n return 'Ya tienes un empleo seleccionado como trabajo actual.';\n }",
"public function index(){\n echo \"<h2>LA PAGINA QUE BUSCAS NO EXISTE</h2>\";\n }",
"function sendFaildVer(){\n\n}",
"public function pageconnexionerreur(){\n\t\t$vue = new Vue(\"ConnexionErreur\");\n\t\t$vue->generer(array());\n\t}",
"static public function ctrMensajeRevisado($datos){\n\n\t\t\t$tabla = \"mensajes\";\n\n\t\t\t$datosController = $datos;\n\n\t\t\t$respuesta = ModeloMensajes::mdlMensajeRevisado($tabla, $datosController);\n\n\t\t\techo $respuesta;\n\n\t\t}",
"function fdl_contenu($err) {\n\t\n\t$source = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '../index.php';\n\t\n\techo\n\t\t'<h1>Connexion à BookShop</h1>', \n\t\t($err != 0) ? '<p class=\"erreur\">Echec de l\\'authentification</p>' : '',\n\t\t'<form action=\"connexion.php\" method=\"post\" class=\"bcFormulaireBoite\">',\t\t\t\n\t\t\t'<p class=\"enteteBloc\">Déjà inscrit ?</p>',\n\t\t\t'<input type=\"hidden\" name=\"source\" value=\"', $source,'\">', \n\t\t\t'<table style=\"margin: 0px auto;\">', \n\t\t\t\tfd_form_ligne('Email :', fd_form_input(FD_Z_TEXT,'email','',20)),\n\t\t\t\tfd_form_ligne('Mot de passe :', fd_form_input(FD_Z_PASSWORD,'password','',20)),\n\t\t\t'</table>',\n\t\t\t'<p class=\"centered bottomed\"><input type=\"submit\" style=\"margin-top: 0px\" value=\"Se connecter\" name=\"btnConnexion\"></p>',\n\t\t'</form>',\n\t\t\n\t\t'<form action=\"inscription.php\" method=\"post\" class=\"bcFormulaireBoite\">',\t\t\t\n\t\t\t'<p class=\"enteteBloc\">Pas encore inscrit ?</p>',\n\t\t\t'<input type=\"hidden\" name=\"source\" value=\"', $source,'\">', \n\t\t\t'<p>L\\'inscription est gratuite et ne prend que quelques secondes.</p>', // <br>N\\'hésitez pas.</p>',\n\t\t\t'<p class=\"centered bottomed\"><input type=\"submit\" value=\"S\\'inscrire\" name=\"btnInscription\"></p>',\n\t\t'</form>'; \n}",
"static public function ctrBorrarMensaje(){\n\n\t\t\tif(isset($_GET[\"idMensaje\"])){\n\n\t\t\t\t$tabla = \"mensajes\";\n\t\t\t\t$datos = $_GET[\"idMensaje\"];\n\n\t\t\t\t$respuesta = ModeloMensajes::mdlBorrarMensaje($tabla, $datos);\n\n\t\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\t\techo '<script>\n\n\t\t\t\t\t\tswal({\n\n\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\ttitle: \"¡El mensaje se ha borrado correctamente!\",\n\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t\t}).then((result)=>{\n\n\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\twindow.location = \"mensaje\";\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\t</script>';\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}",
"function generarErrorVuelta(){\r\n $mensaje= \"<form id=\".'formularioRegreso'.\" action=\".'PizzaNet.php'.\"><table>\r\n <tr><td><input type=\".'submit'.\" value=\".'Inicio'. \" name=\".'Enviar'.\" class=\".'centroBoton'.\">\r\n </td></tr></table></form>\";\r\n echo $mensaje;\r\n}",
"public function message()\n {\n $result = $this->dtbs->list('message');\n $data['info'] = $result;\n $this->load->view('back/message/anasehife',$data);\n }",
"function TradicionalHolaMundo1 (){ \r\necho \"hola mundo nuevamente\"; \r\n}",
"public function show()\n {\n echo 1;die;\n }",
"function displayConnexionAgent(){\n\t$contentsError='';\n\t$contents=displayFormChoiseAgent();\n\trequire_once('gabarit_agent.php');\n\t// $contents=displayFormSynthese();\n\t// $contents.=displayFormNssPatient();\n\t// $contents.=displayTakeAppointment();\n\t// $contents.=displayPayement();\n\t// $contents.=displayDepot();\n\t// $contentsError='';\n\t// require_once('gabarit_agent.php');\n}",
"static function welcome()\n\t{\n\t\techo 'wellcome to our project';\n\t}",
"public function message()\n { \n //Se falso retornar mensagem para o usuário\n return 'O cliente deve ser maior de 18 anos.';\n }",
"function afficherErreurSynthaxe ($errorCode=null, $message){\n if($errorCode && $errorCode == 1146){ // problème de synthaxe avec une table de la bdd //\n echo \n \"<div class='alert alert-danger text-center'> Erreur de connexion avec la base de données. Merci de réessayer ultérieurement. </div>\";\n }\n}",
"public function mostrar(){\n }",
"public function message()\n {\n return \"L'heure de rendez vous est deja prise\";\n }",
"function died($error) {\necho \"Xảy ra lỗi!!! \";\necho \"<br /><br />\";\necho $error.\"<br /><br />\";\necho \"Hãy trở lại và sữa chữa các lỗi:<br /><br />\";\ndie();\n}",
"static private function showMessages() {\n if (isset($_SESSION['messages'])) {\n\n $messages = new View(\"global.messages\", array(\"messages\" => $_SESSION['messages']));\n echo $messages->getHtml();\n // du coup on peut supprimer les messages\n unset($_SESSION['messages']);\n }\n }",
"function difundir() {\n $frase = $this->obtener_frase();\n echo $frase;\n }",
"public function limpiarError(){\n\t\t$this->mensaje_error = null;\n\t}",
"public function connexion(){\n $errors = false;\n if(!empty($_POST)){\n $auth = new DBAuth(App::getInstance()->getDb());\n if($auth->connexion($_POST['pseudo_auteur'], $_POST['motdepasse_auteur'])){\n header('Location: index.php?p=admin.chapitres.index');\n } else {\n $errors = true;\n }\n }\n $form = new BootstrapForm($_POST);\n $this->render('auteurs.connexion', compact('form', 'errors'));\n }",
"function client_ask_admin($submit_button, $client_name, $client_email, $client_phone, $client_msg_content){\n\t\tif( isset($_POST[$submit_button]) ){\n\t\t\t\tglobal $base;\n\n\t\t\t\t$query = \"SELECT * FROM users WHERE role='master_admin'\";\n\t $find_id = user::find_this_query($query);\n\t $master_admin_id='';\n\t\t foreach ($find_id as $id) {\n\t\t $master_admin_id = $id->user_id;\n\t\t\t\t\t}\n\n\t\t\t\t$messages_admin = new messages_admin();\n\t\t\t\t$messages_admin->admin_id\t\t= $master_admin_id;\n\t\t\t\t$messages_admin->client_name\t= $_POST[$client_name];\n\t\t\t\t$messages_admin->client_email\t= $_POST[$client_email];\n\t\t\t\t$messages_admin->client_phone\t= $_POST[$client_phone];\n\t\t\t\t$messages_admin->content \t\t= $_POST[$client_msg_content];\n\t\t\t\t$messages_admin->date \t\t\t= date('Y-m-d H:i:s');\n\n\t\t\t\t\n\t\t\t\t$messages_admin->create();\n\n\t\t\t\tmail( '[email protected]', 'Pitanje Externog Korisnika: '.$base->clear_string($_POST[$client_name]), $base->clear_string($_POST[$client_msg_content]), \"From: \".$base->clear_string($_POST[$client_email]) );\n\t\t\t\t\n\n\t\t\t\techo (\"\n\t\t\t\t\t<SCRIPT LANGUAGE='JavaScript'>\n\t\t\t\t\t\twindow.alert('Uspešno Ste poslali poruku. Odgovor će Vam biti prosleđen na E-mail.')\n\t\t\t\t \twindow.location.href='../../../contact.php';\n\t\t\t\t </SCRIPT>\n\t\t\t\t\");\n\n\t\t\t}\n}",
"function reply($message) {\n echo $message;\n exit();\n }",
"public function contarInventario(){\n\t}",
"function envoyer_message() {\r\n verification();\r\n $destinataire = @$_GET['joueurs'];\r\n $contenu = '<center><h2>Messagerie</h2></center>';\r\n $contenu .= '<p>Voici votre messagerie. Vous pouvez envoyer, consulter et répondre à vos messages privés.</p>\r\n <div class=\"double_choix\">\r\n <span><a href=\"index.php?page=envoyer_message\">Envoyer un message</a></span>\r\n <span><a href=\"index.php?page=messagerie\">Boite de reception</a></span>\r\n </div>';\r\n $contenu .= '<form id=\"form_envoie\" action=\"index.php?page=message_envoye\" method=\"post\">\r\n <div>\r\n <input type=\"text\" placeholder=\"Destinataire\" maxlength=\"20\" name=\"destinataire\" value=\"' . $destinataire . '\">\r\n <input type=\"text\" placeholder=\"Objet\" maxlength=\"20\" name=\"objet\">\r\n </div>\r\n\t\t\t<textarea name=\"message\" id=\"message\" placeholder=\"Tapez votre message\"></textarea>\r\n\t\t\t<input type=\"submit\" value=\"Envoyer\">\r\n\t\t\r\n\t\t';\r\n display($contenu);\r\n}",
"function ufclas_matlab_admin_notice_success(){\n\t$message = ufclas_matlab_get_success();\n\t?>\n <div class=\"notice notice-success\">\n <p><?php echo __( 'Import successful. View the imported page: ', 'ufclas-matlab' ) . $message; ?> </p>\n </div>\n <?php\n\t\n}",
"private function success() : void\n {\n session_destroy();\n session_unset();\n (new Repository())->disconnect();\n (new Session())->set('user','success', 'Votre compte a bien été supprimé');\n header('Location:' . self::REDIRECT_SIGNUP);\n die();\n\n }",
"function message(){\n\t\t\treturn \"New Admin has been successfully created!\";\n\t\t}",
"function greeting(){\n\t\t\techo \"Idol ni Noli si Pong\";\n\t\t}",
"public function enviarNuestroSonido( ) {\n $cmd = new ComandoFlash(\"VIDEOCONFERENCIA\",\"NUESTRO_SONIDO\",$this->getNuestroSonido());\n $this->enviarPeticion($cmd->getComando());\n\n }",
"function checkMessage() {\n if (isset($_SESSION['message'])) {\n echo \"\n <br>\n <div class='container'>\n <div class='alert alert-dismissible alert-{$_SESSION['message']['type']}' role='alert'>\n <strong>{$_SESSION['message']['name']}</strong> {$_SESSION['message']['desc']}\n <button type='button' class='close' data-dismiss='alert' aria-label='Close'>\n <span aria-hidden='true'>×</span>\n </button>\n </div>\n </div>\";\n unset($_SESSION['message']);\n }\n }",
"function salida_abrupta($mensaje){\n\techo \"<script language=\\\"javascript\\\" type=\\\"text/javascript\\\">\n\t\t\t\t\t\talert(\\\"{$mensaje}\\\");\n\t\t\t\t\t\t</script>\";\t\n\techo \"<script>window.close()</script>\";\n\texit;\n}",
"function salida_abrupta($mensaje){\n\techo \"<script language=\\\"javascript\\\" type=\\\"text/javascript\\\">\n\t\t\t\t\t\talert(\\\"{$mensaje}\\\");\n\t\t\t\t\t\t</script>\";\t\n\techo \"<script>window.close()</script>\";\n\texit;\n}",
"public function message()\n {\n return 'No es una cédula';\n }",
"public function mostrar_mensajes($id_usuario_abrir_conversacion=0,$abrir_emergente=0)\n\t{\n\t\t//VALIDAMOS SI HAY USUARIO ACTIVO\n\t\tif($this->session->userdata('logueado'))\n\t\t{\n\t\t\t$usuario=$this->session->userdata('id');\n\t\t\t$datos['mensajes']=$this->Mensaje_model->buscar_conversaciones($usuario);//TODO cambiar por $usuario\n\t\t\t//var_dump($datos['mensajes']);\n\t\t\t//die;\n\t\t\t$datos['css']='mostrar_mensajes';\n\t\t\t\n\t\t\t\n\t\t\t//mandamos abrir la ventana emergente para iniciar conversacion\n\t\t\tif(isset($abrir_emergente)&&$abrir_emergente!=0)\n\t\t\t{\n\t\t\t\t$datos['abrirEmergente']=1;\n\t\t\t\t$datos['id_otro_usuario_mensaje']=$id_usuario_abrir_conversacion;\n\t\t\t\tenmarcar($this,'mensaje/mostrar_mensajes.php',$datos);\n\t\t\t}\n\t\t\t\n\t\t\t//abrimos el panel con una conversacion abierta\n\t\t\telse if(isset($id_usuario_abrir_conversacion)&&$id_usuario_abrir_conversacion!=0)\n\t\t\t{\n\t\t\t\t$datos['abrirEmergente']=0;\n\t\t\t\t$datos['activarConversacion']=$id_usuario_abrir_conversacion;\n\t\t\t\tenmarcar($this,'mensaje/mostrar_mensajes.php',$datos);\n\t\t\t}\n\t\t\t//abrimos el panel de mensajes\n\t\t\t else if(isset($id_usuario_abrir_conversacion)&&$id_usuario_abrir_conversacion==0)\n\t\t\t{\n\t\t\t\t$datos['abrirEmergente']=0;\n\t\t\t\tenmarcar($this,'mensaje/mostrar_mensajes.php',$datos);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse//SI NO ESTA LOGUEADO LE MANDAMOS AL LOGIN CON UN CAMPO REDIRECCION PARA QUE LUEGO LE LLEVE A LA PAGINA QUE QUERIA\n\t\t{\n\t\t\t$datos['errorLogin']='Por favor inicia sesion';\n\t\t\tenmarcar($this,'index.php',$datos);\n\t\t}\t\t\n\t}",
"function mostraAvviso(){\nif(isset($_SESSION['messaggio'])){\necho $_SESSION['messaggio'];\nunset ($_SESSION['messaggio']);\n}\n}",
"function registradoadmin(){\n\t\tif (isset($_SESSION[\"adminvalido\"])==false){\n\t\t\theader(\"Refresh: 0; URL=index.php\");\n\t\t\tob_end_flush();\n\t\t\texit();\n\t\t}\n\t}",
"public function connexionAction()\n {\n return $this->render('PPEGSBBundle:Default:ap_connexion.html.twig');\n }",
"function verifica_admin() {\n\n if ( @$_SESSION['tipo_usuario'] == 3 ) {\n\n\n print utf8_encode(\"<script> alert('NAO PERMITIDO'); window.location = 'index.php';</script>\");\n }\n}",
"function form_borrarBD(){\n\techo \"\n\t<div align='center'>\t\n\t\t<div class='login'>\n\t\t\t<p class='error'> Esta accion borrará todo el contenido de la base de datos</p>\n\t\t\t<p class='error'>¿Seguro que desea continuar?</p>\n\t\t\t<div class='centrar'>\n\t\t\t<a class='admin-botones' href='\".htmlspecialchars($_SERVER[\"PHP_SELF\"]).\"?accion=borrarBD&confirmacion='si'#modificar'>SI</a>\n\t\t\t<a class='admin-botones' href='\".htmlspecialchars($_SERVER[\"PHP_SELF\"]).\"?accion=''>NO</a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t\t\t\";\n}",
"public function msg() {\n return '';\n }",
"public function msg() {\n return '';\n }",
"function info(){\n\n\tglobal $nombre;\n\tglobal $apellido;\n\t\t\n\t$rf = $_POST['ref'];\n\t$nombre = $_POST['Nombre'];\n\t$apellido = $_POST['Apellidos'];\n\t\t\n\t$ActionTime = date('H:i:s');\n\t\n\tglobal $logtext;\n\t$logtext = PHP_EOL.\"- USERS VER DETALLES \".$ActionTime.PHP_EOL.\"\\t Nombre: \".$nombre.\" \".$apellido.PHP_EOL;\n\n\trequire 'Inc_Log_Total.php';\n\n\t}",
"function ErrorAcceso(){\n\t\tinclude('view/view_ErrorAcceso.php');\n\t}",
"function show_register_message_on_login()\n {\n echo '<div>Si no tienes cuenta <a href=\"'.get_permalink(ConstantBD::BD_POST_SIGNUP).'\">registrate</a> en un solo paso. </div>';\n }",
"public function connexion() {\n\t\t$vue = new View(\"Connexion\");\n\t\t$vue->generer();\n\t}",
"public function ejecutar_sentencia(){\n\t\t$this->abrir_conexion();\n\t\t$this->conexion->query($this->sentencia);\n\t\t$this->cerrar_conexion();\n\t}",
"public function verifArticle(){//Fonction qui s'active après qu'il y ait eu Validation\n\n //mettre les $_POST en variable.\n if (isset($_POST['nom_article'])&& !empty($_POST['nom_article'])&& isset($_POST['theme1'])&& ($_POST['theme1']!=\"choix\") && isset($_POST['contenu'])&& !empty($_POST['contenu'])){\n $this->recordArticle();\n\n } else {\n\n \t$_SESSION['nom_article']=$_POST['nom_article'];//permet de maintenir le nom de l'article en place si il y a des champs manquant\n \t$_SESSION['contenu']=$_POST['contenu'];//conserve le contenu si il y a des champs manquant\n\n\n $message='Oups, on dirait que tout les champs n’ont pas été remplis, si vous changez de page maintenant, vos données seront perdu';\n\n echo '<script type=\"text/javascript\">window.alert(\"'.$message.'\");</script>';\n\n\n \t\t}\n \t}",
"function enviarAAltaOk(){\n\t\theader('location: altaOk.php'); exit;\n\t}",
"static public function ctrMostrarMensaje(){\n\n\t\t\t$tabla = \"mensajes\";\n\n\t\t\t$respuesta = ModeloMensajes::mdlMostrarMensaje($tabla);\n\n\t\t\tif(!$respuesta){\n\n\t\t\t\techo '<tr class=\"d-flex justify-content-center\">\n\t\n\t\t\t\t\t\t<td>No hay datos disponible</td>\n\t\t\t\t\t\t\n\t\t\t\t\t</tr>';\n\t\t\t}else{\n\n\t\t\t\tforeach ($respuesta as $key => $value){\n\n\t\t\t\t\techo '<tr>\n\t\t\t\t\t\t\t<td style=\"font-size: 16px;\">\n\t\t\t\t\t\t\t\t<a href=\"index.php?ruta=leer-mensaje&id='.$value[\"id\"].'\" title=\"Ver Mensaje\">'.ucfirst($value[\"autor\"]).'</a>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td style=\"font-size: 16px;\"><b>'.$value[\"correo\"].'</b></td>\n\n\t\t\t\t\t\t\t<td class=\"mailbox-date\" style=\"font-size: 16px;\">'.$value[\"creado\"].'</td>\n\t\t\t\t\t\t\t<td class=\"text-center\">\n\t\t\t\t\t\t\t\t<button class=\"btn btn-danger btn-sm btnEliminarMensaje\" idMensaje=\"'.$value[\"id\"].'\"><i class=\"far fa-trash-alt\"></i></button>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>';\n\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\n\t\t}",
"function ingresoController(){\n\t\tif ( empty($_POST['usuariolg']) || empty($_POST['passlg'])) {\n\t\t\t//echo \"Varibles vacias\";\n\t\t}else{\n\t\t\t\n\t\t\t$respuesta = (new AdminModel) -> ingresoM($_POST['usuariolg'], $_POST['passlg']);\n\t\t\tif (strtolower($respuesta[\"usuario\"]) == strtolower($_POST['usuariolg']) && $respuesta[\"password\"] == $_POST['passlg']) {\t\n\t\t\t\techo \"<span class=''>Salió</span>\";\n\t\t\t\tif($_SESSION['usuario']){\n\t\t\t\t\techo '<br>';\n\t\t\t\t\tif (empty($_GET['Tid'])) {\n\t\t\t\t\t\theader('Location: ?');\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\theader('Location: ?action=cartelera&Tid='.$_GET['Tid']);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t\techo \"<span class='noti'>Verifique sus datos<br> \".$respuesta['usuario'].\"</span>\";\n\t\t\t\t\t}\n\t\t\t}\t\n\t}",
"public function mensaje_ejecucion_operaciones_mes($dist_id,$nro){\n $ddep = $this->model_proyecto->dep_dist($dist_id);\n $tabla='';\n $tabla.='\n <div class=\"alert alert-success\" role=\"alert\">\n <h4 class=\"alert-heading\">SEGUIMIENTO POA!</h4>\n <p>Hola '.$this->session->userdata('funcionario').', la '.strtoupper($ddep[0]['dist_distrital']).' tiene programado para el mes de '.$this->verif_mes[2].' '.$nro.' Operaciones en su Plan Operativo Anual POA '.$this->gestion.', Operaciones que deben ser Ejecutados, el registro de las mismas se las realizara a traves del formulario de Seguimiento POA que se encuentra en el modulo de Evaluación POA.</p>\n <hr>\n <p class=\"mb-0\"><a href=\"#\" data-toggle=\"modal\" data-target=\"#modal_ope_mes\" id=\"'.$dist_id.'\" class=\"ope_mes\" title=\"CAMBIAR GESTIÓN\">Ver Operaciones Programadas</a></p>\n </div>';\n\n return $tabla;\n }",
"function modifica(){\n $mensaje=\"\";\n $model = new DB;\n $conexion = $model->singleton();\n $n2 = $_POST['nombreact']; //nombre actual de usuario\n $n = $_POST['nombre']; //nuevo nombre\n $c = $_POST['cognoms'];\n $e = $_POST['email'];\n $p = $_POST['password'];\n if (empty($n) || empty($c) || empty($e) || empty($p)||empty($n2)) {\n $mensaje = 'Todos los campos tienen que estar llenos.';\n }else{\n $sql = \"INSERT INTO usuaris (nom, cognoms, email, password)VALUES ('$n', '$c', '$e', '$p') WHERE nom = '$n2'\";\n \n $consulta = $conexion->prepare($sql);\n $consulta->execute();\n \n if(!$consulta){\n header('Location: '.APP_W.'error');\n }else{\n header('Location: '.APP_W.'correcto');\n }\n }\n\n echo $mensaje;\n \n\n\n }",
"public function showMessage()\n {\n print $this->generator->getHappyMessage() . $this->name;\n }",
"function died($error) {\r\n echo \"Sentimos muito mas o formulário enviado contém erros<br/>\";\r\n echo \"Os erros seguintes apareceram:<br /><br />\";\r\n echo $error.\"<br /><br />\";\r\n echo \"Por favor, volte e corrija-os.<br /><br />\";\r\n die();\r\n }",
"public function entregado() {\n $this->load->view('ceye/entregado'); \n }",
"public static function parler()\n {\n echo 'Je suis un personnage <br/>';\n }",
"function died($error) {\n echo \"Lo sentimos, pero hay algunos errores con el formulario enviado.\";\n echo \"Estos errores se muestran a continuación.<br /><br />\";\n echo $error.\"<br /><br />\";\n echo \"Por favor corrija estos errores.<br /><br />\";\n die();\n }"
] | [
"0.77207005",
"0.7615034",
"0.7232078",
"0.7002965",
"0.68309116",
"0.6753759",
"0.67343426",
"0.6728354",
"0.6681412",
"0.6647356",
"0.65659755",
"0.65161276",
"0.64989996",
"0.6440048",
"0.6428877",
"0.6428027",
"0.6401578",
"0.6382192",
"0.6358726",
"0.6355493",
"0.63315445",
"0.6325445",
"0.6293982",
"0.6269436",
"0.6263895",
"0.6263895",
"0.6262447",
"0.6248244",
"0.62298983",
"0.62093157",
"0.6189789",
"0.6178713",
"0.6178624",
"0.6163755",
"0.61435544",
"0.6138259",
"0.61296016",
"0.6125516",
"0.61242247",
"0.6098224",
"0.6077683",
"0.6063234",
"0.60531086",
"0.60510427",
"0.60509974",
"0.60367244",
"0.60214394",
"0.6021217",
"0.60195494",
"0.601912",
"0.6015293",
"0.6009802",
"0.6008264",
"0.5990756",
"0.5988917",
"0.59888095",
"0.5986084",
"0.5979984",
"0.5978732",
"0.5973028",
"0.59697014",
"0.59502035",
"0.5946879",
"0.59409744",
"0.59385896",
"0.59347403",
"0.59293103",
"0.592862",
"0.592342",
"0.59178114",
"0.5917511",
"0.5914667",
"0.5913576",
"0.59124565",
"0.5909571",
"0.5909571",
"0.5901032",
"0.5897064",
"0.5894477",
"0.58899593",
"0.58879346",
"0.58842605",
"0.5881776",
"0.5876775",
"0.5876775",
"0.5866208",
"0.5865351",
"0.586402",
"0.5863481",
"0.5861038",
"0.5860748",
"0.58584404",
"0.5854788",
"0.58543336",
"0.58503485",
"0.5844261",
"0.5836372",
"0.5834057",
"0.5833543",
"0.5830666",
"0.5829738"
] | 0.0 | -1 |
Parses yaml file with caching. Uses if available | public static function parse ( $file )
{
$file_path = XT_PROJECT_DIR .'/'. $file;
$cached_path = XT_PROJECT_DIR .'/cache/'. $file;
// Check if YAML file was updated since the last caching
if ( !file_exists ( $cached_path ) ||
filemtime ( $file_path ) > filemtime ( $cached_path ) )
{
// Generate a new cache
$cached_dir = dirname ( $cached_path );
if ( !is_dir ( $cached_dir ) )
{
mkdir ( $cached_dir, 0777, true );
chmod ( $cached_dir, 0777 );
}
// Parse, cache & return
if ( extension_loaded ( 'yaml' ) )
{
$parsed = yaml_parse_file ( $file_path );
}
else
{
$parsed = yaml::load ( $file_path );
}
file_put_contents ( $cached_path, serialize ( $parsed ) );
// Chmod file if it isn't already world-writeable
$perms = substr ( decoct ( fileperms ( $cached_path ) ), -3 );
if ( $perms != 777 ) chmod ( $cached_path, 0777 );
return $parsed;
}
// Return cached file
return unserialize ( file_get_contents ( $cached_path ) );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function load()\n {\n if ($this->sites) {\n return;\n }\n $data = Yaml::parse(file_get_contents($this->file));\n $this->sites = $data['sites'];\n }",
"protected function pull()\n {\n $this->definition = array();\n \n if (file_exists(\\sfConfig::get('sf_cache_dir') . DIRECTORY_SEPARATOR . $this->file_name)) {\n $this->definition = \\sfYaml::load(\\sfConfig::get('sf_cache_dir') . DIRECTORY_SEPARATOR . $this->file_name);\n }\n }",
"public function loadYamlConfig($filepath);",
"function yml_parse_file($ymlFile)\n {\n return yml::parseFile($ymlFile);\n }",
"private function load($file) {\n $yml = new \\Yaml($file);\n $data = $yml->parse();\n\n $this->name = \\a::get($data, 'name', NULL);\n $this->theme = \\a::get($data, 'theme', \\c::get('theme', 'grass'));\n $this->eventdate = \\a::get($data, 'eventdate', NULL);\n $this->intro = \\a::get($data, 'intro', NULL);\n $this->storeFields(\\a::get($data, 'fields', FALSE));\n $this->action = \\a::get($data, 'action', NULL);\n }",
"protected static function parseYaml($filename) {\n if (!file_exists($filename)) {\n throw new \\Exception('A config.yml file must exist in the project root.');\n }\n return Yaml::parse(file_get_contents($filename));\n }",
"public function parseYaml()\n {\n if ($this->getMimeType() == 'application/x-yaml' || $this->getMimeType() == 'text/yaml') {\n return yaml_parse($this->getContents());\n }\n }",
"function yml_parse($yml)\n {\n return yml::parse($yml);\n }",
"protected function loadMappingFile($file)\n {\n return Yaml::parse(file_get_contents($file));\n }",
"public function loadFromFile()\n {\n $this->getLogger()->debug('Reading metadata from ' . $this->defFile);\n $fields = Yaml::parse($this->defFile);\n if (!is_array($fields)) {\n $fields = array();\n $this->getLogger()->warning('No definition found in metadata file.');\n }\n $res = array();\n foreach ($fields as $field_data) {\n $res[$field_data['id']] = $field_data;\n }\n ksort($res);\n return $res;\n }",
"function load($input) {\n\t// See what type of input we're talking about\n\t// If it's not a file, assume it's a string\n\tif (!empty($input) && (strpos($input, \"\\n\") === false)\n\t\t&& file_exists($input)) {\n\t\t$yaml = file($input);\n\t} else {\n\t\t$yaml = explode(\"\\n\",$input);\n\t}\n\t// Initiate some objects and values\n\t$base = new YAMLNode (1);\n\t$base->indent = 0;\n\t$this->_lastIndent = 0;\n\t$this->_lastNode = $base->id;\n\t$this->_inBlock = false;\n\t$this->_isInline = false;\n\t$this->_nodeId = 2;\n\n\tforeach ($yaml as $linenum => $line) {\n\t\t$ifchk = trim($line);\n\n\t\t// If the line starts with a tab (instead of a space), throw a fit.\n\t\tif (preg_match('/^(\\t)+(\\w+)/', $line)) {\n\t\t$err = 'ERROR: Line '. ($linenum + 1) .' in your input YAML begins'.\n\t\t\t\t' with a tab. YAML only recognizes spaces. Please reformat.';\n\t\tdie($err);\n\t\t}\n\n\t\tif ($this->_inBlock === false && empty($ifchk)) {\n\t\tcontinue;\n\t\t} elseif ($this->_inBlock == true && empty($ifchk)) {\n\t\t$last =& $this->_allNodes[$this->_lastNode];\n\t\t$last->data[key($last->data)] .= \"\\n\";\n\t\t} elseif ($ifchk{0} != '#' && substr($ifchk,0,3) != '---') {\n\t\t// Create a new node and get its indent\n\t\t$node = new YAMLNode ($this->_nodeId);\n\t\t$this->_nodeId++;\n\n\t\t$node->indent = $this->_getIndent($line);\n\n\t\t// Check where the node lies in the hierarchy\n\t\tif ($this->_lastIndent == $node->indent) {\n\t\t\t// If we're in a block, add the text to the parent's data\n\t\t\tif ($this->_inBlock === true) {\n\t\t\t$parent =& $this->_allNodes[$this->_lastNode];\n\t\t\t$parent->data[key($parent->data)] .= trim($line).$this->_blockEnd;\n\t\t\t} else {\n\t\t\t// The current node's parent is the same as the previous node's\n\t\t\tif (isset($this->_allNodes[$this->_lastNode])) {\n\t\t\t\t$node->parent = $this->_allNodes[$this->_lastNode]->parent;\n\t\t\t}\n\t\t\t}\n\t\t} elseif ($this->_lastIndent < $node->indent) {\n\t\t\tif ($this->_inBlock === true) {\n\t\t\t$parent =& $this->_allNodes[$this->_lastNode];\n\t\t\t$parent->data[key($parent->data)] .= trim($line).$this->_blockEnd;\n\t\t\t} elseif ($this->_inBlock === false) {\n\t\t\t// The current node's parent is the previous node\n\t\t\t$node->parent = $this->_lastNode;\n\n\t\t\t// If the value of the last node's data was > or | we need to\n\t\t\t// start blocking i.e. taking in all lines as a text value until\n\t\t\t// we drop our indent.\n\t\t\t$parent =& $this->_allNodes[$node->parent];\n\t\t\t$this->_allNodes[$node->parent]->children = true;\n\t\t\tif (is_array($parent->data)) {\n\t\t\t\t$chk = '';\n\t\t\t\tif (isset ($parent->data[key($parent->data)]))\n\t\t\t\t\t$chk = $parent->data[key($parent->data)];\n\t\t\t\tif ($chk === '>') {\n\t\t\t\t$this->_inBlock = true;\n\t\t\t\t$this->_blockEnd = ' ';\n\t\t\t\t$parent->data[key($parent->data)] =\n\t\t\t\t\t\tstr_replace('>','',$parent->data[key($parent->data)]);\n\t\t\t\t$parent->data[key($parent->data)] .= trim($line).' ';\n\t\t\t\t$this->_allNodes[$node->parent]->children = false;\n\t\t\t\t$this->_lastIndent = $node->indent;\n\t\t\t\t} elseif ($chk === '|') {\n\t\t\t\t$this->_inBlock = true;\n\t\t\t\t$this->_blockEnd = \"\\n\";\n\t\t\t\t$parent->data[key($parent->data)] =\n\t\t\t\t\t\tstr_replace('|','',$parent->data[key($parent->data)]);\n\t\t\t\t$parent->data[key($parent->data)] .= trim($line).\"\\n\";\n\t\t\t\t$this->_allNodes[$node->parent]->children = false;\n\t\t\t\t$this->_lastIndent = $node->indent;\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t} elseif ($this->_lastIndent > $node->indent) {\n\t\t\t// Any block we had going is dead now\n\t\t\tif ($this->_inBlock === true) {\n\t\t\t$this->_inBlock = false;\n\t\t\tif ($this->_blockEnd = \"\\n\") {\n\t\t\t\t$last =& $this->_allNodes[$this->_lastNode];\n\t\t\t\t$last->data[key($last->data)] =\n\t\t\t\t\ttrim($last->data[key($last->data)]);\n\t\t\t}\n\t\t\t}\n\n\t\t\t// We don't know the parent of the node so we have to find it\n\t\t\t// foreach ($this->_allNodes as $n) {\n\t\t\tforeach ($this->_indentSort[$node->indent] as $n) {\n\t\t\tif ($n->indent == $node->indent) {\n\t\t\t\t$node->parent = $n->parent;\n\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($this->_inBlock === false) {\n\t\t\t// Set these properties with information from our current node\n\t\t\t$this->_lastIndent = $node->indent;\n\t\t\t// Set the last node\n\t\t\t$this->_lastNode = $node->id;\n\t\t\t// Parse the YAML line and return its data\n\t\t\t$node->data = $this->_parseLine($line);\n\t\t\t// Add the node to the master list\n\t\t\t$this->_allNodes[$node->id] = $node;\n\t\t\t// Add a reference to the parent list\n\t\t\t$this->_allParent[intval($node->parent)][] = $node->id;\n\t\t\t// Add a reference to the node in an indent array\n\t\t\t$this->_indentSort[$node->indent][] =& $this->_allNodes[$node->id];\n\t\t\t// Add a reference to the node in a References array if this node\n\t\t\t// has a YAML reference in it.\n\t\t\tif (\n\t\t\t( (is_array($node->data)) &&\n\t\t\t\tisset($node->data[key($node->data)]) &&\n\t\t\t\t(!is_array($node->data[key($node->data)])) )\n\t\t\t&&\n\t\t\t( (preg_match('/^&([^ ]+)/',$node->data[key($node->data)]))\n\t\t\t\t||\n\t\t\t\t(preg_match('/^\\*([^ ]+)/',$node->data[key($node->data)])) )\n\t\t\t) {\n\t\t\t\t$this->_haveRefs[] =& $this->_allNodes[$node->id];\n\t\t\t} elseif (\n\t\t\t( (is_array($node->data)) &&\n\t\t\t\tisset($node->data[key($node->data)]) &&\n\t\t\t\t(is_array($node->data[key($node->data)])) )\n\t\t\t) {\n\t\t\t// Incomplete reference making code. Ugly, needs cleaned up.\n\t\t\tforeach ($node->data[key($node->data)] as $d) {\n\t\t\t\tif ( !is_array($d) &&\n\t\t\t\t( (preg_match('/^&([^ ]+)/',$d))\n\t\t\t\t\t||\n\t\t\t\t\t(preg_match('/^\\*([^ ]+)/',$d)) )\n\t\t\t\t) {\n\t\t\t\t\t$this->_haveRefs[] =& $this->_allNodes[$node->id];\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\t}\n\t}\n\tunset($node);\n\n\t// Here we travel through node-space and pick out references (& and *)\n\t$this->_linkReferences();\n\n\t// Build the PHP array out of node-space\n\t$trunk = $this->_buildArray();\n\treturn $trunk;\n\t}",
"public function parse($input) {\r\n try {\r\n $output = sfYaml::load($input);\r\n }\r\n catch(InvalidArgumentException $ex) {\r\n self::_throwException($ex->getMessage());\r\n } \r\n return $output; \r\n }",
"public static function getYamlContents(string $filename)\n {\n $result = null;\n if (file_exists($filename)) {\n $result = Yaml::parse(file_get_contents($filename));\n }\n return $result;\n }",
"function YAMLLoad($input) {\n\t\t$spyc = new Spyc;\n\t\treturn $spyc->load($input);\n\t}",
"private function loadConfigYamlFile($filepath)\n {\n if (!file_exists($filepath)) {\n throw new \\Exception('Project config file could not be loaded! \"'.$filepath.'\"');\n }\n return YamlHelper::parse(file_get_contents($filepath));\n }",
"public static function load($path, $cache = false)\r\n {\r\n\r\n $hash = md5(filemtime($path) . $path);\r\n if ($cache && file_exists(Config::path('cache') . '/' . $hash . '.php')) {\r\n include(Config::path('cache') . '/' . $hash . '.php');\r\n } else {\r\n $yml = self::parse(file_get_contents($path));\r\n Cache::saveOutput($hash . '.php', self::createCache($yml));\r\n }\r\n\r\n return $yml;\r\n }",
"private function parseYaml($yaml)\n {\n $parser = new Parser();\n return $parser->parse($yaml);\n }",
"private function parseYaml($contents)\n {\n $result = Yaml::parse($contents);\n return $result;\n }",
"protected function loadYml($path)\n {\n if (empty($path)) {\n return [];\n }\n // TODO: Perhaps cache these alias files, as they may be read multiple times.\n return (array) Yaml::parse(file_get_contents($path));\n }",
"public function loadYamlFile($fullFileName)\n {\n $data = false;\n if ($fullFileName && file_exists($fullFileName)) {\n $data = sfYaml::load($fullFileName);\n }\n return $data;\n }",
"public static function parseYamlConfigFile($filename = null)\n {\n try {\n return Yaml::parse(file_get_contents($filename));\n } catch (ParseException $p) {\n throw $p;\n } catch (\\Exception $e) {\n return null;\n }\n }",
"private function get($file, $format = null, $path=null)\n {\n $result = null;\n $this->format = $this->validateFormat($format);\n\n $this->setFile($file);\n $this->setPath($path);\n\n $checksum = md5($this->path.$this->file);\n if (!in_array($checksum, $this->cache['files']))\n {\n $this->cache['files'][] = $checksum;\n }\n else\n {\n // abort processing\n return;\n }\n\n $locator = new FileLocator($this->path);\n $location = $locator->locate($this->file);\n $contents = file_get_contents($location);\n\n if (!$contents) {\n return;\n }\n\n $this->parser = str_replace('yml', 'yaml', $this->format);\n $config = call_user_func_array(array($this, 'parse'.ucfirst($this->parser)), array($contents, $location));\n\n $this->validateConfig($config);\n $this->importResources($config);\n\n $result = $config ?: $result;\n return $result;\n }",
"protected function loadData($file)\n {\n $path = realpath(dirname(__FILE__) . '/../fixtures/');\n\n return Yaml::parse(file_get_contents($path . '/' . $file . '.yml'));\n }",
"protected function loadFile($file)\n {\n if (!stream_is_local($file)) {\n throw new InvalidArgumentException(sprintf('This is not a local file \"%s\".', $file));\n }\n\n if (!file_exists($file)) {\n throw new InvalidArgumentException(sprintf('The service file \"%s\" is not valid.', $file));\n }\n\n return Yaml::parse(file_get_contents($file));\n }",
"public static function fromYaml($file)\n {\n if (! file_exists($file)) {\n return new self();\n }\n\n $values = Yaml::parse(file_get_contents($file));\n\n $config = new self();\n\n if (! is_array($values)) {\n return $config;\n }\n\n if (array_key_exists('exclude', $values)) {\n $config->exclude = (array) $values['exclude'];\n }\n if (array_key_exists('directory', $values)) {\n $config->directory = trim($values['directory']);\n }\n if (array_key_exists('baseUrl', $values)) {\n $config->baseUrl = rtrim(trim($values['baseUrl']), '/');\n }\n if (array_key_exists('before', $values)) {\n $config->before = (array) $values['before'];\n }\n if (array_key_exists('after', $values)) {\n $config->after = (array) $values['after'];\n }\n\n return $config;\n }",
"static protected function _setYamlConfig($file)\n {\n if (file_exists($file)) {\n self::_setConfig(Yaml::parse($file));\n return true;\n }\n \n return false;\n }",
"private function parseFile($filename) {\n if (is_null($filename) || !file_exists($filename)) {\n throw new MultidomainException('Missing config.yml file.');\n }\n $this->configFile = $filename;\n\n // get configuration values\n $this->config = json_decode(json_encode(\n Yaml::parseFile($filename)\n ));\n }",
"public function parseConfig()\n {\n $fileContents = file_get_contents($this->filename);\n if (!$fileContents) {\n $this->error = 'Failed to read file contents';\n\n return false;\n }\n\n $config = json_decode($fileContents, true);\n if (json_last_error()) {\n $this->error = json_last_error_msg();\n\n return false;\n }\n\n $this->config = new Data(array_replace_recursive($config, $this->overrides));\n\n return true;\n }",
"public function load()\n\t{\n\t\tif (file_exists(self::$configPath))\n\t\t{\n\t\t\t$this->config = json_decode(file_get_contents(self::$configPath), true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->config = array();\n\t\t}\n\t}",
"private function loadConfig() {\n if (file_exists($this->_data['cache_config_file'])) {\n $data = unserialize(file_get_contents($this->_data['cache_config_file']));\n \n self::$_configInstance = (object)$data; //instance of stdClass with all the properties public\n //$this->_data = (array)$data; \n return true;\n } \n return false;\n }",
"function load($filename){\n\n\t\t//Check if the input is valid\n\t\tif(!\\lib_validation\\validate($filename, LV_STRING))\n\t\t\treturn null;\n\t\t\n\t\t//Escape characters just to be safe \n\t\t$filename = addslashes($filename);\n\t\t\n\t\t//Convert namespace to a file path\n\t\t$filename = \"configs/\" . $filename . \".json\";\n\t\t\n\t\t//Checks if the file exists\n\t\tif(!file_exists($filename))\n\t\t\treturn null;\n\t\t\n\t\t//Load the file\n\t\t$json = file_get_contents($filename);\n\t\t\n\t\t//Parse the file\n\t\t$data = json_decode($json, true);\n\t\t\n\t\t//Return the results (associative array)\n\t\treturn $data;\n\t}",
"public function parseFile(string $file)\n {\n if (false === \\function_exists('yaml_parse_file')) {\n throw new Exception('Pecl YAML extension is not installed');\n }\n\n return \\yaml_parse_file($file);\n }",
"protected function load()\n {\n if ($this->contentLoaded) {\n return;\n }\n\n $content = file_get_contents($this->path);\n\n if (!$content) {\n $this->contentLoaded = true;\n return;\n }\n\n preg_match_all('/\\@([a-z]+)\\s([^\\r\\n\\@]+)/i', $content, $matches, PREG_SET_ORDER);\n\n foreach ($matches as $match) {\n $fullMatch = $match[0];\n $variable = $match[1];\n $value = $match[2];\n\n $content = str_replace($fullMatch, '', $content);\n $this->metadata[$variable] = $value;\n }\n\n $this->content = trim($content, \"\\r\\n\");\n $this->contentLoaded = true;\n }",
"public function parse(string $file_path): ?\\stdClass {\n $cid = $file_path . ':' . md5_file($file_path);\n $cached = $this->cache->get($cid);\n if ($cached) {\n if (($cached->data['plugin'] ?? NULL) === $this->getPluginId()) {\n return $cached->data['object'] ?? NULL;\n }\n return NULL;\n }\n\n if (!file_exists($file_path)) {\n $this->logger->warning(\"File doesn't exists: {$file_path}\");\n return NULL;\n }\n\n $file_info = pathinfo($file_path);\n $file_ext = $file_info['extension'];\n\n $input = file_get_contents($file_path);\n if (($file_ext === 'yaml') || ($file_ext === 'yml')) {\n try {\n $openapi = Yaml::parse($input, Yaml::PARSE_OBJECT | Yaml::PARSE_OBJECT_FOR_MAP);\n }\n catch (ParseException $e) {\n throw ParseException::yamlParseError($file_path, $e->getMessage(), $e);\n }\n }\n elseif ($file_ext === 'json') {\n $openapi = json_decode($input, FALSE);\n if ($openapi === NULL) {\n throw ParseException::jsonParseError($file_path, json_last_error_msg(), json_last_error());\n }\n }\n else {\n throw new InvalidArgumentException(\"Unsupported source file extension: {$file_ext}. Please use YAML or JSON source.\");\n }\n\n if (!$this->isValid($openapi)) {\n return NULL;\n }\n\n $this->validate($openapi);\n\n $this->cache->set($cid, [\n 'object' => $openapi,\n 'plugin' => $this->getPluginId(),\n ]);\n\n return $openapi;\n }",
"function init($url=null) {\r\n $yamlSrce = file_get_contents($url ? $url : 'defaultmap.yaml');\r\n if (!($map = yaml_parse($yamlSrce))) {\r\n header('Content-Type: text/plain; charset=UTF-8');\r\n die();\r\n }\r\n if (!isset($map['uniqid']))\r\n $map['uniqid'] = uniqid('map',true);\r\n return $map;\r\n}",
"function yml_get_file($search, $ymlfile)\n {\n return yml::getFile($search, $ymlfile);\n }",
"function loadSite($file, $tryCache=true, $replace=false) {\n\n // if we dont have a reader yet, make it\n if ($this->cfgReader == NULL) {\n global $SM_rootDir;\n $this->cfgReader = SM_loadConfigReader('SMCONFIG', $this, $SM_rootDir.SM_SMCONFIG_READER_FILE);\n }\n\n // set replace\n $this->cfgReader->addDirective('replace',$replace);\n $tryCache = $tryCache && $this->cfgReader->useCache(); \n\n if ($tryCache) {\n\n // XXX this may not return the correct results if you have two different config objects that load the \n // same base file, and then the same consecutive file where one objects uses replace and one doesn't\n // we never do that so i'm ignoreing that case\n $this->fileLoadList .= $file;\n if (xcache_isset($this->fileLoadList)) {\n $this->debugLog(\"loading cached xsm file: {$this->fileLoadList}\");\n $this->sectionList = unserialize(xcache_get($this->fileLoadList));\n if ($this->sectionList)\n return;\n // if we get here, we couldn't unserialize, so fall through\n }\n\n }\n\n // fall through. either caching is off, cache didn't exist, or cache was stale\n // read in config, setting my properties at the same time\n $this->cfgReader->readConfigXML($file);\n \n // should we cache the config file?\n if ($tryCache) {\n xcache_set($this->fileLoadList, serialize($this->sectionList), $this->cfgReader->directive['cacheTTL']);\n }\n\n }",
"private function readCache(): void{\n //stdClass é uma classe predefinido ou dinamica\n $this->cache = new stdClass();\n if(file_exists('cache.cache')){\n $this->cache = json_decode(file_get_contents('cache.cache'));\n }\n }",
"public function getConfig($file) {\n $config = array();\n if (file_exists($file)) {\n $yaml = new Parser();\n $config = $yaml->parse(file_get_contents($file));\n }\n return $config;\n }",
"public function load()\n\t\t{\n\t\t\tif ($this->exists()) {\n\t\t\t\t$this->content = self::read($this->get_path());\n\t\t\t\t$this->is_cached = true;\n\t\t\t\treturn $this;\n\t\t\t} else throw new \\System\\Error\\File('Cannot read file. It does not exists on the filesystem.');\n\t\t}",
"static function loadConfig() {\n\t\t$config = self::file($_SERVER[\"DOCUMENT_ROOT\"] . \"/../config.json\");\n\t\tif (!is_null($config))\n\t\t\tself::$config = json_decode($config);\n\t}",
"protected function _load()\n\t{\n\t\t$_file = $this->_storagePath . DIRECTORY_SEPARATOR . $this->_fileName;\n\n\t\tif ( is_file( $_file ) && file_exists( $_file ) && is_readable( $_file ) )\n\t\t{\n\t\t\tif ( false !== ( $_data = Utility\\Storage::defrost( file_get_contents( $_file ) ) ) )\n\t\t\t{\n\t\t\t\t//\tIf it wasn't frozen, a JSON string may be returned\n\t\t\t\tif ( is_string( $_data ) && false !== json_decode( $_data ) )\n\t\t\t\t{\n\t\t\t\t\t$_data = json_decode( $_data, true );\n\t\t\t\t}\n\n\t\t\t\t$this->merge( $_data );\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"protected function loadFromCache() {}",
"protected function importYAML($yamlString, $key = '')\n {\n $yamlString = $this->getFileOrValue($yamlString);\n $import = (new Yaml())->parse($yamlString);\n\n return $this->cacheKeyValue($import, $key);\n }",
"public function testParseGoodYAMLImport()\n {\n $importer = new WorkflowDefinitionImporter();\n $source = <<<'EOD'\n---\nName: exportedworkflow\n---\nSilverStripe\\Core\\Injector\\Injector:\n ExportedWorkflow:\n class: Symbiote\\AdvancedWorkflow\\Templates\\WorkflowTemplate\n constructor:\n - 'My Workflow 4 20/02/2014 03-12-55'\n - 'Exported from localhost on 20/02/2014 03-12-55 by joe bloggs using SilverStripe versions Framework 4.0.0-beta3'\n - 0.2\n - 0\n - 3\n properties:\n structure:\n 'Step One':\n type: Symbiote\\AdvancedWorkflow\\DataObjects\\WorkflowAction\n transitions:\n - Step One T1: 'Step Two'\n 'Step Two':\n type: Symbiote\\AdvancedWorkflow\\DataObjects\\WorkflowAction\n Symbiote\\AdvancedWorkflow\\Services\\WorkflowService:\n properties:\n templates:\n - '%$ExportedWorkflow'\nEOD;\n\n $this->assertNotEmpty($importer->parseYAMLImport($source));\n }",
"public static function getYamlConfig()\n {\n return file_get_contents(self::fixtureDir().'/fixture_config.yml');\n }",
"protected function _get_post($filename)\n {\n $configStr = \"\";\n $content = \"\";\n $handle = @fopen(\"$this->post_folder/$filename\", \"r\");\n if ($handle) {\n $cnt = 0;\n while (($buffer = fgets($handle, 4096)) !== false) {\n if (false !== strpos($buffer, '---')){\n ++$cnt;\n if ($cnt > 1)\n break;\n }\n $configStr .= $buffer;\n }\n\n while (($buffer = fgets($handle, 4096)) !== false) {\n $content .= $buffer;\n }\n\n if (!feof($handle)) {\n echo \"Error: unexpected fgets() fail\\n\";\n }\n fclose($handle);\n }\n\n $config = Spyc::YAMLLoadString($configStr);\n $config['content'] = $content;\n return $config;\n }",
"private function loadConfig()\n {\n $base = APP_ROOT.'config/';\n $filename = $base.'app.yml';\n if (!file_exists($filename)) {\n throw new ConfigNotFoundException('The application config file '.$filename.' could not be found');\n }\n\n $config = Yaml::parseFile($filename);\n\n // Populate the environments array\n $hostname = gethostname();\n $environments = Yaml::parseFile($base.'env.yml');\n foreach ($environments as $env => $hosts) {\n foreach ($hosts as $host) {\n if (fnmatch($host, $hostname)) {\n $this->environments[] = $env;\n\n // Merge the app config for the environment\n $filename = $base.$env.'/app.yml';\n if (file_exists($filename)) {\n $envConfig = Yaml::parseFile($filename);\n $config = array_merge($config, $envConfig);\n }\n }\n }\n }\n\n // Loop through each of the config files and add them\n // to the main config array\n foreach (glob(APP_ROOT.'config/*.yml') as $file) {\n $key = str_replace('.yml', '', basename($file));\n $config[$key] = Yaml::parseFile($file);\n\n // Loop through each of the environments and merge their config\n foreach ($this->environments as $env) {\n $filename = $base.$env.'/'.$key.'.yml';\n if (file_exists($filename)) {\n $envConfig = Yaml::parseFile($filename);\n $config[$key] = array_merge($config[$key], $envConfig);\n }\n }\n }\n\n // Create and store the config object\n return $this->config = new Config($config);\n }",
"protected function readTweaksFile()\n {\n $bookDir = $this->app['publishing.dir.book'];\n $themeDir = Toolkit::getCurrentThemeDir($this->app);\n\n // first path is the book Contents dir\n $contentsDir = $bookDir.'/Contents';\n\n // second path is the theme \"<format>/Config\" dir\n $configFormatDir = sprintf('%s/%s/Config', $themeDir, $this->format);\n\n // third path is the theme \"Common/Config\" dir\n $configCommonDir = sprintf('%s/Common/Config', $themeDir);\n\n // look for either one\n $dirs = [\n $contentsDir,\n $configFormatDir,\n $configCommonDir,\n ];\n\n $file = $this->app->getFirstExistingFile('html-tweaks.yml', $dirs);\n\n if (!$file) {\n $this->writeLn('No html-tweaks.yml file found. Looked up directories:', 'error');\n foreach ($dirs as $dir) {\n $this->writeLn('- '.$dir);\n }\n\n return;\n }\n\n $this->tweaks = Yaml::parse(file_get_contents($file));\n }",
"public function init($yamlFilePath)\n {\n if (!is_file($yamlFilePath)) {\n throw new ConfigNotFoundException();\n };\n\n try {\n $this->config = Yaml::parse(file_get_contents($yamlFilePath));\n } catch (\\Exception $e) {\n throw new ConfigSyntaxException($yamlFilePath);\n }\n }",
"public abstract function loadConfig($fileName);",
"private function getYamlParser()\n\t{\n\t\tif (!$this->yamlParser) {\n\t\t\t$this->yamlParser = new Yaml();\n\t\t}\n\n\t\treturn $this->yamlParser;\n\t}",
"public function parse(FileInterface $file,ParseOptions $options)\n {\n $value = null; \n \n try {\n $yaml = new YamlParser();\n $value = $yaml->parse($this->read($file));\n \n } catch (ParseException $e) {\n throw new ParserException(\"Unable to parse the YAML string: %s\", $e->getMessage());\n } \n\n return $value;\n }",
"protected function getRouting_Loader_YamlService()\n {\n return $this->services['routing.loader.yaml'] = new \\Symfony\\Component\\Routing\\Loader\\YamlFileLoader(${($_ = isset($this->services['file_locator']) ? $this->services['file_locator'] : $this->getFileLocatorService()) && false ?: '_'});\n }",
"private function loadJson(){\n if(file_exists($this->fullPath.$this->jsonFile)) {\n $arCfg = get_object_vars(json_decode(file_get_contents($this->fullPath.$this->jsonFile)));\n $this->loadConfigs($arCfg);\n }\n }",
"private function parse()\n {\n $handle = fopen($this->filepath, 'r');\n if(! $handle) throw new \\Exception(\"Can't read file $this->filepath\");\n\n $plugin = null;\n\n while(($line = fgets($handle)) !== false) {\n\n /* Remove next line character from end of line */\n $line = str_replace(PHP_EOL, '', $line);\n\n /* Skip comments and empty lines */\n if(starts_with($line, '#') || trim($line) === '') continue;\n\n /* Find description setting */\n else if(starts_with($line, 'description')) $this->parseDescription($line);\n\n /* Find help setting */\n else if(starts_with($line, 'help')) $this->parseHelp($line);\n\n /* Capture commands */\n else if(starts_with_whitespace($line)) $plugin->parseCommand($line);\n\n /* Start plugin capture */\n else {\n $plugin = $this->parseCurrentPlugin($line);\n }\n }\n\n fclose($handle);\n\n /* Set state as parsed */\n $this->isParsed = true;\n }",
"public function parse($file);",
"public function parse($file);",
"public function readConfigFile(): void\n {\n $configPath = __DIR__ . '/../../.config';\n if (!file_exists($configPath)) {\n echo \"Could not find .config\\n\";\n die;\n }\n $lines = preg_split('/[\\r\\n]+/', file_get_contents($configPath));\n foreach ($lines as $line) {\n if (empty($line)) {\n continue;\n }\n if (substr($line, 0, 1) == '#') {\n continue;\n }\n $kv = preg_split(\"/=/\", $line);\n $key = $kv[0];\n $value = $kv[1];\n $this->data[$key] = $value;\n }\n }",
"public function parseYamlToArray(): array\n {\n // Get the file contents\n $yaml = (file_get_contents($this->filePath));\n\n // Create an array of the lines in the yaml file\n $lines = explode(PHP_EOL, $yaml);\n\n // Initialize the array\n $array = [];\n\n // Loop through the lines\n foreach ($lines as $line) {\n // Check if the line matches the list format (space, space, dash, space)\n if (str_starts_with($line, \" - \")) {\n // Remove the list key from the line to just get the slug\n // and add it to the array. The index will be automatically\n // assigned by using $array[]\n $array[] = substr($line, 4);\n }\n }\n\n // Return the array\n return $array;\n }",
"protected function getTranslation_Loader_YmlService()\n {\n return $this->services['translation.loader.yml'] = new \\Symfony\\Component\\Translation\\Loader\\YamlFileLoader();\n }",
"protected function _loadCache($filename) {\n\n\t\t\tif (file_exists($filename)) {\n\t\t\t\t$file = file_get_contents($filename);\n\t\t\t\treturn json_decode($file, true);\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}",
"public function load()\n\t{\n\t\tif(($cache=$this->getApplication()->getCache())!==null && ($value=$cache->get(self::CACHE_NAME))!==false)\n\t\t\treturn unserialize($value);\n\t\telse\n\t\t{\n\t\t\tif(($content=@file_get_contents($this->getStateFilePath()))!==false)\n\t\t\t\treturn unserialize($content);\n\t\t\telse\n\t\t\t\treturn null;\n\t\t}\n\t}",
"public static function readCache(){\r\n\t\trequire('./config.php');\r\n\t\tif(!file_exists($cachePath)){\r\n\t\t\treturn self::refreshCache();\r\n\t\t}\r\n\t\t//$myFile = $cachePath;\r\n\t\t$myFile = \"catalogCache.txt\";\r\n\t\t$fh = fopen($myFile, 'r');\r\n\t\t$catalogJson = fread($fh, filesize($myFile));\r\n\t\tfclose($fh);\r\n\t\t$catalog_groups = json_decode($catalogJson);\r\n\r\n\r\n\r\n\t\t//error_log(print_r($catalog_groups, true));\r\n\r\n\t\treturn $catalog_groups;\r\n\t}",
"public function load()\n {\n $configFilePath = $this->configFilePath();\n if (!file_exists($configFilePath)) {\n $this->hosts = [];\n } else {\n $this->hosts = $this->parser->parse(file_get_contents($configFilePath));\n }\n return $this->hosts();\n }",
"protected function load_config() {\n $this->config = Kohana::$config->load('imagecache');\n $this->config_patterns = Kohana::$config->load('imagecache_patterns');\n }",
"protected function parse($file) {\n self::loadSpycLibrary();\n $config = Spyc::YAMLLoad($file);\n \n if (!$config) {\n throw new Exception(\"Configuration is either empty or contains fatal errors\");\n }\n \n return $config;\n }",
"function loadConfig(){\n $file = file_get_contents($this->config_dir, FILE_USE_INCLUDE_PATH);\n $urls = json_decode($file,TRUE);\n //not the best way but error handling\n if ($file == NULL || $urls == NUll ){\n print(\"Error reading the config file or it it is empty\");\n }\n else{\n $this->config_data = $urls;\n\n }\n }",
"public function collectYamlFiles()\r\n {\r\n $folder = array($this->app_root.'/config');\r\n $files_found = $this->findFiles(\r\n $folder,\r\n array(\"yml\"),\r\n array(\"parameters.yml\")\r\n );\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }",
"function config_parser($path)\n{\n $conffile = fopen($path, 'r');\n $config = fread($conffile, filesize($path));\n\n $parsed_config = array();\n $parsed_config['head'] = array();\n $parsed_config['body'] = \"\";\n\n// split into head and body sections\n $lines = explode(\"\\n\", $config);\n\n $head = $body = array();\n $mode = 0;\n\n foreach($lines as $line)\n {\n if(preg_match(\"/--body--/i\", $line) and $mode == 0)\n $mode = 1;\n else {\n if($mode == 0) array_push($head, $line);\n else array_push($body, $line);\n }\n }\n\n// Parse key-value pares\n foreach($head as $line)\n {\n $result = explode(':', $line);\n\n $key = array_shift($result);\n $value = \"\";\n\n $id = 0;\n foreach($result as $item) {\n if($id > 0) $value .= \":$item\";\n else $value .= trim($item);\n\n $id ++;\n }\n\n if($key != \"\") {\n $parsed_config['head'] = array_merge(\n $parsed_config['head'], array(strtolower($key) => $value));\n }\n }\n\n// Re join body\n $body_txt = \"\";\n\n foreach($body as $line)\n $body_txt .= \"$line\\n\";\n\n $parsed_config['body'] = trim($body_txt);\n\n return $parsed_config;\n}",
"protected function _get_config()\n {\n $config = Spyc::YAMLLoad(\"config.yaml\");\n return $config;\n }",
"public static function load()\n {\n $entries = Configuration::get();\n \n foreach ($entries as $entry) {\n self::$config[$entry->id] = unserialize($entry->value);\n }\n }",
"function readXmlFile($xmlfile) {\n\tglobal $statistics;\n\n\t$xml = file_get_contents($xmlfile);\n\t$o = TypeConverter::xmlToArray($xml,TypeConverter::XML_GROUP);\n\tif ( ! $o ) return false;\n\n\t# Fix some errors in templates prior to continuing\n\n\t$o['Path'] = $xmlfile;\n\t$o['Author'] = getAuthor($o);\n\t$o['DockerHubName'] = strtolower($o['Name']);\n\t$o['Base'] = $o['BaseImage'];\n\t$o['SortAuthor'] = $o['Author'];\n\t$o['SortName'] = $o['Name'];\n\t$o['Forum'] = $Repo['forum'];\n# configure the config attributes to same format as appfeed\n# handle the case where there is only a single <Config> entry\n\n\tif ( $o['Config']['@attributes'] )\n\t\t$o['Config'] = array('@attributes'=>$o['Config']['@attributes'],'value'=>$o['Config']['value']);\n\n\tif ( $o['Plugin'] ) {\n\t\t$o['Author'] = $o['PluginAuthor'];\n\t\t$o['Repository'] = $o['PluginURL'];\n\t\t$o['SortAuthor'] = $o['Author'];\n\t\t$o['SortName'] = $o['Name'];\n\t\t$statistics['plugin']++;\n\t} else\n\t\t$statistics['docker']++;\n\n\treturn $o;\n}",
"function _parse() {\n $file = $this->_get_file();\n $search = array();\n $replace = array();\n $i = 0;\n foreach($this->_keys as $key => $value) {\n $search[$i] = $value;\n $replace[$i] = $this->_vals[$key];\n if(is_object($replace[$i])) {\n $replace[$i] = $replace[$i]->get_string();\n }\n ++$i;\n }\n return str_replace($search, $replace, $file);\n }",
"protected function loadYamlFromPath($path)\n {\n if (!$assoc = Yaml::parse($path)) {\n throw new IllegalConfigurationException(\n sprintf(\n 'Not able to get data from %s',\n $path\n )\n );\n }\n\n return $assoc;\n }",
"private function loadFiles()\n {\n $finder = new Finder();\n\n foreach (Config::get('routing_dirs') as $directory) {\n $finder\n ->files()\n ->name('*.yml')\n ->in($directory)\n ;\n\n foreach ($finder as $file) {\n $resource = $file->getRealPath();\n $this->routes = array_merge($this->routes, Yaml::parse(file_get_contents($resource)));\n }\n }\n }",
"public function loadCache()\r\n {\r\n if (!file_exists($this->cachePath)) {\r\n $this->rebuildCache();\r\n }\r\n\r\n // $data = json_decode(file_get_contents($this->cachePath), true);\r\n\r\n $data = include $this->cachePath;\r\n\r\n if ($data === null) {\r\n throw new \\Exception(\"Invalid theme cache json file [{$this->cachePath}]\");\r\n }\r\n return $data;\r\n }",
"public function parse()\n {\n $this->data = parse_ini_file($this->fileName);\n }",
"private static function _load() {\n $kategorier = Yaml::parse( file_get_contents( UKMrapporter::getPluginPath() .'rapporter/kategorier.yml') );\n foreach( $kategorier as $id => $kategori_data ) {\n $kategori = new Kategori( $id, $kategori_data );\n static::$data[ $kategori->getId() ] = $kategori;\n }\n }",
"public function testLoadConfigurationFromFile()\n {\n // TODO can I mock the Yaml classes too?\n //$this->markTestSkipped('The namespace hack is actually working. Now I am missing Symfony\\'s Yaml classes. :(');\n //$this->assertEquals(expected, actual);\n\n $newHelper = $this->helper->createFromFile('/some/path');\n $this->assertInstanceOf('\\CTLib\\Helper\\ConfigValidator', $newHelper);\n $this->assertEquals(\n [\n 'activity.exec_sources',\n 'activity.filter_groups',\n 'activity.travel_distance_sources',\n 'activity.travel_time_sources',\n 'activity.export_when_alerts_cleared'\n ],\n $newHelper->getConfigKeys()\n );\n }",
"abstract protected function load();",
"abstract protected function load();",
"abstract protected function load();",
"abstract protected function load();",
"public function load_maps_file()\r\n {\r\n log_message('debug', 'Reloading '. XML_MAPS_FILE .' file from manaserv');\r\n\r\n // load the configured path and filename from config file\r\n $this->maps_file = $this->CI->config->item('manaserv-data_path') . XML_MAPS_FILE;\r\n\r\n // check if the file really exists and is readable\r\n if (!file_exists($this->maps_file))\r\n {\r\n show_error('The '. XML_MAPS_FILE .' file ' . $this->maps_file . ' configured'.\r\n ' in mana_config.php cannot be found');\r\n return;\r\n }\r\n else\r\n {\r\n // reset current maps\r\n $this->maps = array();\r\n\r\n // load and parse the xml file\r\n $maps = simplexml_load_file($this->maps_file);\r\n foreach ($maps as $map)\r\n {\r\n // loop through defined maps and build internal array\r\n $m = new Map(\r\n intval($map->attributes()->id), // id\r\n strval($map->attributes()->name) // name\r\n );\r\n\r\n // set description if available\r\n if (strlen(strval($map->attributes()->description)) > 0)\r\n {\r\n $m->setDescription(strval($map->attributes()->description));\r\n }\r\n\r\n $this->maps[$m->getId()] = $m;\r\n }\r\n\r\n $this->flush_maps();\r\n }\r\n log_message('debug', 'Reloading '. XML_MAPS_FILE .' file ... done');\r\n }",
"public function load() {\n\t\t$this->copyFromTemplateIfNeeded();\n\t\trequire $this->filePath;\n\t\t$this->vars = $vars;\n\t}",
"function parse_data(){\n\n\t $key_file = file_get_contents(\"resp_key.json\");\n\t $built_in_file = file_get_contents(\"built_in_resp.json\");\n\t $this->key_dictonary = json_decode($key_file);\n\t $this->built_in_dictionary = json_decode($built_in_file);\n\n\t if($this->built_in_dictionary == null)\n\t\tvar_dump(\"Built in didn't work\");\n\t if($this->key_dictonary == null)\n\t\tvar_dump(\"key dictionary didn't work\");\n\n }",
"public function load($file);",
"public function load($file);",
"public function load($file);",
"public static function load(string $file) : array\n {\n try\n {\n $data = SymfonyYaml::parse(file_get_contents($file));\n }\n catch (ParseException $e)\n {\n throw new OptionLoaderException(\n \"File $file does not appear to be valid YAML: \"\n .$e->getMessage()\n );\n }\n\n return $data;\n }",
"function read_cache(&$var, $filename, $auto_expire = false){\n $filename = DIR_FS_CACHE . $filename;\n $success = false;\n\n if (($auto_expire == true) && file_exists($filename)) {\n $now = time();\n $filetime = filemtime($filename);\n $difference = $now - $filetime;\n\n if ($difference >= $auto_expire) {\n return false;\n }\n }\n\n// try to open file\n if ($fp = @fopen($filename, 'r')) {\n// read in serialized data\n $szdata = fread($fp, filesize($filename));\n fclose($fp);\n// unserialze the data\n $var = unserialize($szdata);\n\n $success = true;\n }\n\n return $success;\n }",
"public function load()\n {\n $loader = new Loader($this->filePath, true);\n return $loader->load();\n }",
"protected function loadMetaData() {}",
"function loadIniFiles()\n {\n \n $ff = HTML_FlexyFramework::get();\n $ff->generateDataobjectsCache(true);\n $this->dburl = parse_url($ff->database);\n \n \n $dbini = 'ini_'. basename($this->dburl['path']);\n \n \n $iniCache = isset( $ff->PDO_DataObject) ? $ff->PDO_DataObject['schema_location'] : $ff->DB_DataObject[$dbini];\n if (!file_exists($iniCache)) {\n return;\n }\n \n $this->schema = parse_ini_file($iniCache, true);\n $this->links = parse_ini_file(preg_replace('/\\.ini$/', '.links.ini', $iniCache), true);\n \n\n \n }",
"public function overLoad()\n {\n $loader = new Loader($this->filePath, false);\n return $loader->load();\n }",
"public function withYamlConfig($file)\n {\n if (!class_exists(Yaml::class)) {\n throw new RuntimeException(\"You need to install 'symfony/yaml' to use this feature\");\n }\n\n if (!is_readable($file)) {\n throw new RuntimeException(\"The configuration file is not readable\");\n }\n\n $config = Yaml::parse(file_get_contents($file));\n if (!is_array($config)) {\n throw new RuntimeException(\"The configuration is not valid\");\n }\n\n $this->withConfig($config);\n\n return $this;\n }",
"public function testConfigFromSingleFile()\n {\n $cfg = new Configuration();\n $cfg->setBaseDirectories($this->dirs);\n $config = $cfg->load(\"view\");\n\n $this->assertInternalType(\"array\", $config);\n $this->assertArrayHasKey(\"file\", $config);\n $this->assertArrayHasKey(\"config\", $config);\n $this->assertArrayNotHasKey(\"items\", $config);\n $this->assertContains(\"a view\", $config[\"config\"]);\n }",
"public function load($content)\n\t{\n\t\t$data = Yaml::parse($content);\n\n\t\tif (!key_exists('providers', $data))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ($data['providers'] as $alias => $service)\n\t\t{\n\t\t\tif (!class_exists($service['class']))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$arguments = [];\n\n\t\t\tif (key_exists('arguments', $service))\n\t\t\t{\n\t\t\t\tforeach ($service['arguments'] as $argument)\n\t\t\t\t{\n\t\t\t\t\tif (!$this->container->has($argument))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$arguments[] = $this->container->get($argument);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$reflect = new \\ReflectionClass($service['class']);\n\n\t\t\t$provider = $reflect->newInstanceArgs($arguments);\n\t\t\t$this->container->registerServiceProvider($provider, $alias);\n\t\t}\n\t}",
"function load() {\r\n\t\t$this->log .= \"load() called<br />\";\r\n\t\tif (!file_exists($this->filename)) {\r\n\t\t\t$this->log .= $this->filename.\" does not exist.<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (!$x = @file_get_contents($this->filename)) {\r\n\t\t\t$this->log .= \"Could not read \".$this->filename.\"<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (!$this->data = unserialize($x)) {\r\n\t\t\t$this->log .= \"unserialize failed<br />\";\r\n\t\t\t$this->data = array();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\treturn true;\r\n\t\t}"
] | [
"0.663372",
"0.6606961",
"0.65717536",
"0.6263219",
"0.6199485",
"0.6124811",
"0.6055848",
"0.593784",
"0.5917581",
"0.5903929",
"0.5881257",
"0.58606184",
"0.58503187",
"0.58020586",
"0.57767034",
"0.5773183",
"0.5748266",
"0.57258004",
"0.5694039",
"0.5685027",
"0.5669432",
"0.5634761",
"0.5616643",
"0.5529986",
"0.55177265",
"0.5480237",
"0.5476376",
"0.5450669",
"0.54257447",
"0.5419831",
"0.5406733",
"0.540183",
"0.5384754",
"0.53697747",
"0.53031504",
"0.52981466",
"0.52838826",
"0.5273715",
"0.5264392",
"0.5252829",
"0.5242464",
"0.5236102",
"0.52325463",
"0.52305204",
"0.5227912",
"0.5157634",
"0.5147594",
"0.5146593",
"0.51408505",
"0.5139398",
"0.5129432",
"0.5129369",
"0.5113168",
"0.51101327",
"0.51058465",
"0.5094659",
"0.5087199",
"0.5087199",
"0.5085826",
"0.50810474",
"0.50697434",
"0.505457",
"0.50385135",
"0.503547",
"0.50319964",
"0.5031385",
"0.5024778",
"0.50177395",
"0.50146216",
"0.50025207",
"0.49920073",
"0.49891454",
"0.49826282",
"0.49752083",
"0.4971899",
"0.49718538",
"0.4962728",
"0.4961642",
"0.49598417",
"0.4957701",
"0.4951625",
"0.4951625",
"0.4951625",
"0.4951625",
"0.49453574",
"0.49448273",
"0.4944512",
"0.49418846",
"0.49418846",
"0.49418846",
"0.49412215",
"0.4938819",
"0.49353513",
"0.49307495",
"0.49225667",
"0.49222454",
"0.49161926",
"0.4903285",
"0.48944598",
"0.48902"
] | 0.7357435 | 0 |
Create a new command instance. | public function __construct()
{
parent::__construct();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }",
"public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}",
"public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}",
"protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }",
"static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }",
"public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;",
"public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }",
"public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }",
"public function command(Command $command);",
"public function __construct($command)\n {\n $this->command = $command;\n }",
"public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }",
"protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }",
"public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }",
"public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }",
"public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }",
"public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;",
"private function _getCommandByClassName($className)\n {\n return new $className;\n }",
"public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }",
"public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }",
"private function __construct($command = null)\n {\n $this->command = $command;\n }",
"public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }",
"public function getCommand() {}",
"protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }",
"public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }",
"public function getCommand();",
"protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }",
"public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }",
"public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }",
"public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }",
"public function getCommand()\n {\n }",
"public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }",
"protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }",
"public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}",
"public function addCommand($command);",
"public function add(Command $command);",
"abstract protected function getCommand();",
"public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}",
"protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }",
"public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }",
"protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }",
"private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }",
"public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }",
"public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }",
"public function create() {}",
"protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }",
"public function create(){}",
"protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }",
"public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }",
"protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}",
"public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }",
"public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }",
"public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }",
"public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }",
"public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }",
"public function createCommand(?string $sql = null, array $params = []): Command;",
"public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }",
"public function generateCommands();",
"protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }",
"protected function buildCommand()\n {\n return $this->command;\n }",
"public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }",
"public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }",
"public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }",
"protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }",
"protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }",
"public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }",
"protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}",
"public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }",
"public function buildCommand()\n {\n return parent::buildCommand();\n }",
"private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }",
"public function getCommand(string $command);",
"protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}",
"public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }",
"public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }",
"protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }",
"private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }",
"public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }",
"public function generateCommand($singleCommandDefinition);",
"public function create() {\n }",
"public function create() {\n }",
"public function create() {\r\n }",
"public function create() {\n\n\t}",
"private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }",
"public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }",
"public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }",
"public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }",
"public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();"
] | [
"0.8010746",
"0.7333379",
"0.72606754",
"0.7164165",
"0.716004",
"0.7137585",
"0.6748632",
"0.67234164",
"0.67178184",
"0.6697025",
"0.6677973",
"0.66454077",
"0.65622073",
"0.65437883",
"0.64838654",
"0.64696646",
"0.64292693",
"0.6382209",
"0.6378306",
"0.63773245",
"0.6315901",
"0.6248427",
"0.6241929",
"0.6194334",
"0.6081284",
"0.6075819",
"0.6069913",
"0.60685146",
"0.6055616",
"0.6027874",
"0.60132784",
"0.60118896",
"0.6011778",
"0.5969603",
"0.59618074",
"0.5954538",
"0.59404427",
"0.59388787",
"0.5929363",
"0.5910562",
"0.590651",
"0.589658",
"0.589658",
"0.589658",
"0.58692765",
"0.58665586",
"0.5866528",
"0.58663124",
"0.5852474",
"0.5852405",
"0.58442044",
"0.58391577",
"0.58154446",
"0.58055794",
"0.5795853",
"0.5780188",
"0.57653266",
"0.57640004",
"0.57584697",
"0.575748",
"0.5742612",
"0.5739361",
"0.5732979",
"0.572247",
"0.5701043",
"0.5686879",
"0.5685233",
"0.56819254",
"0.5675983",
"0.56670785",
"0.56606543",
"0.5659307",
"0.56567776",
"0.56534046",
"0.56343585",
"0.56290466",
"0.5626615",
"0.56255764",
"0.5608852",
"0.5608026",
"0.56063116",
"0.56026554",
"0.5599553",
"0.5599351",
"0.55640906",
"0.55640906",
"0.5561977",
"0.5559745",
"0.5555084",
"0.5551485",
"0.5544597",
"0.55397296",
"0.5529626",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908"
] | 0.0 | -1 |
Execute the console command. | public function handle()
{
$namespaces = [];
foreach (app('router')->getRoutes() as $route) {
$compiledRoute = (new RouteCompiler($route))->compile();
if (substr($route->uri, 0, 3) !== 'api'
|| !isset($route->action['controller']) || !$compiledRoute) {
continue;
}
$action = $route->action;
$parts = explode('Actions\\', $action['controller']);
if (count($parts) < 2) {
continue;
}
$actionArray = array_reverse(explode('\\', $parts[1]));
if (count($actionArray) < 2) {
continue;
}
$namespace = $actionArray[1];
$method = $actionArray[0];
$params = $compiledRoute->getVariables();
array_push($params, 'formData');
$methodName = strtolower($route->methods[0]);
if ($methodName === 'post') {
$params[] = 'callback';
}
$namespaces[$namespace][] = [
'method' => $methodName,
'name' => $method,
'params' => $params,
'path' => str_replace('?', '', str_replace('{', '${', $route->uri))
];
}
return file_put_contents(resource_path('assets/js/api.js'), view('core::apiClass', compact('namespaces'))->render());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }",
"public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }",
"public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }",
"public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }",
"public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }",
"public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }",
"public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }",
"public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }",
"public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }",
"public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }",
"public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }",
"public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }",
"public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }",
"public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}",
"public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}",
"public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }",
"public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }",
"public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }",
"public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }",
"public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }",
"public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }",
"public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}",
"public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }",
"public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }",
"public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }",
"public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }",
"public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }",
"public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }",
"public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }",
"public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }",
"public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }",
"public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }",
"public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }",
"public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }",
"public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }",
"public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }",
"public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }",
"public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }",
"public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }",
"public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }",
"public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }",
"public function handle()\n {\n $this->revisions->updateListFiles();\n }",
"public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }",
"public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }",
"public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }",
"public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }",
"public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }",
"public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }",
"public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }",
"public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }",
"public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }",
"public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }",
"public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }",
"public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }",
"public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }",
"public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }",
"public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }",
"public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }",
"public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }",
"public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }",
"public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }",
"public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }",
"public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }",
"public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }",
"public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }",
"public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }",
"public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }",
"public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }",
"public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }",
"public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }",
"public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }",
"public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }",
"public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }",
"public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }",
"public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }",
"public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}",
"public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }",
"public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }",
"public function handle(Command $command);",
"public function handle(Command $command);",
"public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }",
"public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }",
"public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }",
"public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }",
"public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }",
"public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }",
"public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }",
"public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }",
"public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }",
"public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }",
"public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }",
"public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }",
"public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }",
"public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }",
"public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }",
"public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }",
"public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }",
"public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }",
"public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }",
"public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }",
"public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }"
] | [
"0.6469971",
"0.64641356",
"0.6427384",
"0.6349752",
"0.63188183",
"0.62750113",
"0.6261585",
"0.6261214",
"0.6235854",
"0.6225116",
"0.6222161",
"0.6214144",
"0.6193531",
"0.6191337",
"0.6183868",
"0.61772275",
"0.61766857",
"0.6172786",
"0.6149171",
"0.6148903",
"0.61484134",
"0.61469173",
"0.6138112",
"0.61347705",
"0.61316174",
"0.61158997",
"0.6113888",
"0.6110495",
"0.6108539",
"0.61056405",
"0.6102598",
"0.61022663",
"0.61016774",
"0.6096468",
"0.6094955",
"0.60922974",
"0.6088507",
"0.6083433",
"0.6082336",
"0.6077499",
"0.60767883",
"0.6075641",
"0.6073871",
"0.6072606",
"0.60701466",
"0.60694647",
"0.60693175",
"0.6067332",
"0.6061484",
"0.6059711",
"0.6059688",
"0.60574067",
"0.60503477",
"0.6042625",
"0.6040687",
"0.6032303",
"0.60306066",
"0.602774",
"0.60255086",
"0.60207987",
"0.60190594",
"0.6018816",
"0.60144967",
"0.60144013",
"0.6014115",
"0.6011956",
"0.60092497",
"0.6007996",
"0.60079277",
"0.60061836",
"0.60051036",
"0.6001119",
"0.6001112",
"0.6000026",
"0.5999729",
"0.5991934",
"0.59873074",
"0.5987054",
"0.59868026",
"0.59868026",
"0.59856236",
"0.59836555",
"0.5980716",
"0.5976703",
"0.5976261",
"0.5973673",
"0.5969664",
"0.59683484",
"0.5966431",
"0.5965345",
"0.59645647",
"0.59615767",
"0.5960291",
"0.59555584",
"0.59549415",
"0.5952351",
"0.59519506",
"0.594845",
"0.5946748",
"0.5946337",
"0.5944945"
] | 0.0 | -1 |
Twenty Seventeen functions and definitions Register style in functions | function add_style(){
wp_enqueue_style('style',get_template_directory_uri()."/css/style.css");
wp_enqueue_style('bootstrap',get_template_directory_uri()."/css/bootstrap.min.css");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function register_style() {\n}",
"abstract public function register_style();",
"function functions() {\n \n }",
"abstract protected function registerFunctions();",
"function styles() {\n\twp_register_style(\n\t\t'fontawesome',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/lib/fontawesome/css/font-awesome.min.css\",\n\t\tarray(),\n\t\tVINCENTRAGOSTA_COM_VERSION\n\t);\n\n\twp_register_style(\n\t\t'ionicons',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/lib/ionicons/css/ionicons.min.css\",\n\t\tarray(),\n\t\tVINCENTRAGOSTA_COM_VERSION\n\t);\n\n\twp_register_style(\n\t\t'bootstrap',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/lib/bootstrap/dist/css/bootstrap.min.css\",\n\t\tarray( 'fontawesome' ),\n\t\tVINCENTRAGOSTA_COM_VERSION\n\t);\n\n\twp_register_style(\n\t\t'sanitize',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/lib/sanitize/sanitize.min.css\",\n\t\tarray(),\n\t\tVINCENTRAGOSTA_COM_VERSION\n\t);\n\n\twp_enqueue_style(\n\t\t'vincentragosta',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/css/vincentragosta---twenty-seventeen.css\",\n\t\tarray( 'bootstrap', 'fontawesome', 'ionicons', 'sanitize' ),\n\t\tVINCENTRAGOSTA_COM_VERSION\n\t);\n}",
"function setup() {\n\t$n = function( $function ) {\n\t\treturn __NAMESPACE__ . \"\\\\$function\";\n\t};\n\n\tadd_action( 'after_setup_theme', $n( 'vincentragosta_setup' ) );\n\tadd_action( 'wp_enqueue_scripts', $n( 'scripts' ) );\n\tadd_action( 'wp_enqueue_scripts', $n( 'styles' ) );\n}",
"function wp_register_style($handle, $src, $deps = array(), $ver = \\false, $media = 'all')\n {\n }",
"function hook_style() {\n\t\treturn null;\n\t}",
"function wp_styles()\n {\n }",
"function hookRegisterStyles() {\n\t \tif (!is_admin() && get_option('fse_load_fc_libs') == true) {\n\t \t\t// Check if user has its own CSS file in the theme folder\n\t \t\t$custcss = get_template_directory().'/fullcalendar.css';\n\t \t\tif (file_exists($custcss))\n\t \t\t$css = get_bloginfo('template_url').'/fullcalendar.css';\n\t \t\telse\n\t \t\t$css = self::$plugin_css_url.'fullcalendar.css';\n\t \t\twp_enqueue_style('fullcalendar', $css);\n\t \t}\n\t }",
"function add_my_stylesheet() {\n}",
"function locale_stylesheet()\n {\n }",
"public function private_theme_functions()\n {\n // Adds plus button\n add_action('in_admin_header', [ & $this, 'addParallaxBlock'], -200);\n\n // Replace the common scripts\n add_action('wp_default_scripts', [$this, 'changeCommonScript'], 11);\n }",
"function print_late_styles()\n {\n }",
"function setup() {\n\t$n = function( $function ) {\n\t\treturn __NAMESPACE__ . \"\\\\$function\";\n\t};\n\n\tadd_action( 'after_setup_theme', $n( 'i18n' ) );\n\tadd_action( 'after_setup_theme', $n( 'theme_setup' ) );\n\tadd_action( 'wp_enqueue_scripts', $n( 'scripts' ) );\n\tadd_action( 'wp_enqueue_scripts', $n( 'styles' ) );\n}",
"function schechter_setup() {\r\n add_editor_style();\r\n\r\n // Grab Image_Text_WIdget.\r\n require( dirname( __FILE__ ) . '/inc/widgets.php' );\r\n\r\n // Add default posts and comments RSS feed links to <head>.\r\n add_theme_support( 'automatic-feed-links' );\r\n\r\n // This theme uses wp_nav_menu() sidebar.\r\n register_nav_menu( 'primary', __( 'Primary Menu', 'schechterthemeprivate' ) );\r\n \r\n // This theme uses Featured Images for attach image to logo and photo\r\n add_theme_support( 'post-thumbnails' );\r\n\t\r\n}",
"function register_block_style($block_name, $style_properties)\n {\n }",
"function ruven_register_styles() {\n\n\t$theme_version = wp_get_theme()->get( 'Version' );\n\t$env = ( wp_get_environment_type() === 'local') ? 'min.' : '';\n\n\twp_enqueue_style( 'ruven-style', get_template_directory_uri() . '/assets/css/style.'. $env .'css', array(),\n\t$theme_version );\n\twp_style_add_data( 'ruven-style', 'rtl', 'replace' );\n\n\n}",
"function loadStyleScript() {\n # Sike\n}",
"function custom_construction() {\r\n\t\r\n\t\r\n\t}",
"function ft_hook_add_css() {}",
"public function customize_register()\n {\n }",
"public function customize_register()\n {\n }",
"function jehaann_style(){\n wp_register_style('style', get_stylesheet_uri(),'','1.0','all');\n\n //cargando hojas de estilos\n\n wp_enqueue_style('style');\n}",
"function display_themes()\n {\n }",
"function get_themes()\n {\n }",
"public function registerStyles() {\n $this->registerStylesCommon();\n \n if(is_admin()) {\n $this->registerStylesAdmin();\n } else {\n $this->registerStylesFrontend();\n }\n }",
"public function custom_definition() {}",
"public function custom_definition() {}",
"public function custom_definition() {}",
"function zweidrei_eins_register_styles() {\n\n\t$theme_version = wp_get_theme()->get( 'Version' ); \n\twp_enqueue_style( 'style', get_stylesheet_uri(), array(), $theme_version );\n\n\t/** \t\n\t * Add custom css\n\t * Bulma: Free, open source, and modern CSS framework based on Flexbox\n\t * https://bulma.io/ \n\t * Version: 0.9.0\n\t * Child: custom.css\n\t */\n\twp_enqueue_style( 'style1', get_template_directory_uri() . '/assets/css/bulma.min.css', array(), $theme_version );\n\twp_enqueue_style( 'style2', get_template_directory_uri() . '/assets/css/custom.css', array(), $theme_version );\n\n\t\n\n}",
"function DiscountConstructFunctions()\n\t{\t\n\t}",
"function wp_register_styles() {\n // Developer Tier Admin Stylesheet\n wp_register_style( \"{$this->namespace}-admin\", SLIDEDECK2_DEVELOPER_URLPATH . \"/css/admin.css\", array(), '2.1', 'screen' );\n // CodeMirror Library\n wp_register_style( \"codemirror\", SLIDEDECK2_DEVELOPER_URLPATH . \"/css/codemirror.css\", array(), '2.25', 'screen' );\n }",
"function SA_dev_register_style($handle, $src, $ver){echo '<link rel=\"stylesheet\" href=\"'.$src.'\" type=\"text/css\" charset=\"utf-8\" />'.\"\\n\";}",
"private function initStyle(){\n\t\t\t$file_style_normal = $this->root_path.'portal/realmstatus/wowclassic/styles/wowstatus.style_normal.class.php';\n\t\t\t$file_style_gdi = $this->root_path.'portal/realmstatus/wowclassic/styles/wowstatus.style_gdi.class.php';\n\t\t\t\n\t\t\t// include the files\n\t\t\tinclude_once($file_style_normal);\n\t\t\tinclude_once($file_style_gdi);\n\t\t\t\n\t\t\t// get class\n\t\t\tif ($this->config->get('gd', 'pmod_'.$this->moduleID))\n\t\t\t\t$this->style = registry::register('wowstatus_style_gdi');\n\t\t\t\telse\n\t\t\t\t\t$this->style = registry::register('wowstatus_style_normal');\n\t\t}",
"function switch_theme($stylesheet)\n {\n }",
"public function theme()\n {\n }",
"function background_color()\n {\n }",
"function egg_styles()\n{\n\tglobal $wp_styles; // call global $wp_styles variable to add conditional wrapper around ie stylesheet\n\n\t// register main stylesheet\n\twp_register_style( 'egg-stylesheet', get_stylesheet_directory_uri() . '/assets/css/style.css?091714', array(), '', 'all' );\n\t// wp_register_style( 'egg-stylesheet', get_stylesheet_directory_uri() . '/assets/css/style.min.css', array(), '', 'all' );\n\n\t// ie-only style sheet\n\twp_register_style( 'egg-ie-only', get_stylesheet_directory_uri() . '/assets/css/ie.css', array(), '' );\n\n\twp_enqueue_style( array(\n\t\t'egg-stylesheet',\n\t\t'egg-ie-only'\n\t) );\n\t\n\t$wp_styles->add_data( 'egg-ie-only', 'conditional', 'lt IE 9' ); // add conditional wrapper around ie stylesheet\n}",
"public function register() {\n\t\t$this->register_script();\n\t\t$this->register_style();\n\t\t$this->register_type();\n\t}",
"function adventure_inline_css() {\r\n \r\n //Favicon\r\n if ( get_theme_mod('favicon_setting') != '' ) {\r\n echo '<!-- Favicon Image -->' . \"\\n\";\r\n echo '<link rel=\"shortcut icon\" href=\"' . get_theme_mod('favicon_setting') . '\" />' . \"\\n\\n\";}\r\n\t\t\r\n\t\t// Convert Content from Hex to RGB\r\n\t\tif ( get_theme_mod('backgroundcolor_setting') != '#b4b09d' ) {\r\n\t\t\t$hex = str_replace(\"#\", \"\", get_theme_mod('backgroundcolor_setting'));\r\n\t\t\tif(strlen($hex) == 3) {\r\n\t\t\t\t$r = hexdec(substr($hex,0,1).substr($hex,0,1));\r\n\t\t\t\t$g = hexdec(substr($hex,1,1).substr($hex,1,1));\r\n\t\t\t\t$b = hexdec(substr($hex,2,1).substr($hex,2,1)); }\r\n\t\t\telse {\r\n\t\t\t\t$r = hexdec(substr($hex,0,2));\r\n\t\t\t\t$g = hexdec(substr($hex,2,2));\r\n\t\t\t\t$b = hexdec(substr($hex,4,2)); } }\r\n\r\n\t\t// Convert Sidebar from Hex to RGB\r\n\t\tif ( ( get_theme_mod('sidebarcolor_setting') != '#000000' ) ) {\r\n\t\t$hexs = str_replace(\"#\", \"\", get_theme_mod('sidebarcolor_setting'));\r\n\r\n\t\tif(strlen($hexs) == 3) {\r\n\t\t\t$rs = hexdec(substr($hexs,0,1).substr($hexs,0,1));\r\n\t\t\t$gs = hexdec(substr($hexs,1,1).substr($hexs,1,1));\r\n\t\t\t$bs = hexdec(substr($hexs,2,1).substr($hexs,2,1)); }\r\n\t\telse {\r\n\t\t\t$rs = hexdec(substr($hexs,0,2));\r\n\t\t\t$gs = hexdec(substr($hexs,2,2));\r\n\t\t\t$bs = hexdec(substr($hexs,4,2)); } }\r\n\t\t\r\n if ( ( get_theme_mod('titlefontstyle_setting') != 'Default') || (get_theme_mod('taglinefontstyle_setting') != 'Default') || (get_theme_mod('bodyfontstyle_setting') != 'Default') || (get_theme_mod('headerfontstyle_setting') != 'Default')) {\r\n echo '<!-- Custom Font Styles -->' . \"\\n\";\r\n if (get_theme_mod('titlefontstyle_setting') != 'Default') {echo \"<link href='https://fonts.googleapis.com/css?family=\" . get_theme_mod('titlefontstyle_setting') . \"' rel='stylesheet' type='text/css'>\" . \"\\n\"; }\r\n if (get_theme_mod('taglinefontstyle_setting') != 'Default') {\techo \"<link href='https://fonts.googleapis.com/css?family=\" . get_theme_mod('taglinefontstyle_setting') . \"' rel='stylesheet' type='text/css'>\" . \"\\n\"; }\r\n if (get_theme_mod('bodyfontstyle_setting') != 'Default') {\techo \"<link href='https://fonts.googleapis.com/css?family=\" . get_theme_mod('bodyfontstyle_setting') . \"' rel='stylesheet' type='text/css'>\" . \"\\n\"; }\r\n if (get_theme_mod('headerfontstyle_setting') != 'Default') {\techo \"<link href='https://fonts.googleapis.com/css?family=\" . get_theme_mod('headerfontstyle_setting') . \"' rel='stylesheet' type='text/css'>\" . \"\\n\"; }\r\n echo '<!-- End Custom Fonts -->' . \"\\n\\n\";}\r\n\r\n\t\techo '<!-- Custom CSS Styles -->' . \"\\n\";\r\n echo '<style type=\"text/css\" media=\"screen\">' . \"\\n\";\r\n if (is_page() || is_single()) $featured_background = get_post_meta( get_queried_object_ID(), 'featured-background', true ); if (!empty($featured_background)) echo ' body, body.custom-background {background-image:url(' . $featured_background . '); background-size:cover;}' . \"\\n\";\r\n\t\tif ( get_theme_mod('backgroundsize_setting') != 'auto' ) echo '\tbody, body.custom-background {background-size:' . get_theme_mod('backgroundsize_setting') . ';}' . \"\\n\";\r\n\t\tif ( get_theme_mod('backgroundcolor_setting') != '#b4b09d' ) echo '\t.contents {background: rgba(' . $r . ',' . $g . ', ' . $b . ', ' . get_theme_mod('contentbackground_setting') . ');}' . \"\\n\";\r\n if ( get_theme_mod('backgroundcolor_setting') != '#b4b09d' ) echo ' @media only screen and (max-width:55em) { .contents {background: rgba(' . $r . ',' . $g . ', ' . $b . ', .95 );} }' . \"\\n\";\r\n\t\tif ( ( get_theme_mod('sidebarcolor_setting') != '#000000' ) || ( get_theme_mod('sidebarbackground_setting') != '.50' ) ) echo '\taside {background: rgba(' . $rs . ',' . $gs . ', ' . $bs . ', ' . get_theme_mod('sidebarbackground_setting') . ');}' . \"\\n\";\r\n\t\tif ( get_theme_mod('titlecolor_setting') != '#eee2d6' ) echo '\t.header h1 a {color:' . get_theme_mod('titlecolor_setting') . ';}' . \"\\n\";\r\n\t\tif ( get_theme_mod('taglinecolor_setting') != '#066ba0' ) echo '\t.header h1 i {color:' . get_theme_mod('taglinecolor_setting') . ';}' . \"\\n\";\r\n\t\tif ( get_theme_mod('title_size_setting') != '4.0' ) echo '\t.header h1 {font-size:' . get_theme_mod('title_size_setting') . 'em;}' . \"\\n\"; \r\n\t\tif ( get_theme_mod('tagline_rotation_setting') != '-1.00' ) echo '\t.header h1 i {-moz-transform:rotate(' . get_theme_mod('tagline_rotation_setting') . 'deg); transform:rotate(' . get_theme_mod('tagline_rotation_setting') . 'deg);}' . \"\\n\";\r\n\t\tif ( (get_theme_mod('bannerimage_setting') != 'purple.png') && (get_theme_mod('bannerimage_setting') != '') ) echo '\t.header {background: bottom url(' . get_template_directory_uri() . '/images/' . get_theme_mod('bannerimage_setting') . ');}'. \"\\n\";\r\n\t\tif ( get_theme_mod('headerspacing_setting') != '18' ) echo '\t.spacing {height:' . get_theme_mod('headerspacing_setting') . 'em;}'. \"\\n\";\r\n\t\tif ( get_theme_mod('menu_setting') == 'notitle' ) { echo '\t.header {position: fixed;margin-top:0px;}' . \"\\n\" . '\t.admin-bar .header {margin-top:28px;}' . \"\\n\" . '.header h1:first-child, .header h1:first-child i, .header img:first-child {display: none;}' . \"\\n\"; }\r\n\t\tif ( get_theme_mod('menu_setting') == 'bottom' ) { echo '\t.header {position: fixed; bottom:0; top:auto;}' . \"\\n\" . '\t.header h1:first-child, .header h1:first-child i, .header img:first-child {display: none;}' . \"\\n\" . '.header li ul {bottom:2.78em; top:auto;}' . \"\\n\";}\r\n if ( get_theme_mod('border_setting') == 'hidden' ) { echo '\t.contents {border:none; box-shadow:0 0 3px #111;}' . \"\\n\";}\r\n if ( (get_theme_mod('border_setting') != '3px') && (get_theme_mod('border_setting') != 'hidden') ) { echo '\t.contents {border-width:' . get_theme_mod('border_setting') . ';}' . \"\\n\";}\r\n if ( get_theme_mod('bordercolor_setting') != '#4a4646') { echo '\t.contents {border-color:' . get_theme_mod('bordercolor_setting') . ';}' . \"\\n\";}\r\n if ( get_theme_mod('content_bg_setting') != '') { echo ' .contents {background-image:url(' . get_theme_mod('content_bg_setting') . ');}' . \"\\n\";}\r\n \r\n\t\t\r\n\t\tif ( get_theme_mod('titlefontstyle_setting') != 'Default' ) {\r\n\t\t\t$q = get_theme_mod('titlefontstyle_setting');\r\n\t\t\t$q = preg_replace('/[^a-zA-Z0-9]+/', ' ', $q);\r\n\t\t \techo\t\"\t.header h1 {font-family: '\" . $q . \"';}\" . \"\\n\"; }\r\n\r\n\t\tif ( get_theme_mod('taglinefontstyle_setting') != 'Default') {\r\n\t\t\t$x = get_theme_mod('taglinefontstyle_setting');\r\n\t\t\t$x = preg_replace('/[^a-zA-Z0-9]+/', ' ', $x);\r\n\t\t\techo\t\"\t.header h1 i {font-family: '\" . $x . \"';}\" . \"\\n\"; }\r\n\r\n\r\n if ( get_theme_mod('bodyfontstyle_setting') != 'Default' ) {\r\n $xs = get_theme_mod('bodyfontstyle_setting');\r\n $xs = preg_replace('/[^a-zA-Z0-9]+/', ' ', $xs);\r\n echo\t\"\tbody {font-family: '\" . $xs . \"';}\" . \"\\n\"; }\r\n \r\n if ( get_theme_mod('headerfontstyle_setting') != 'Default' ) {\r\n $xd = get_theme_mod('headerfontstyle_setting');\r\n $xd = preg_replace('/[^a-zA-Z0-9]+/', ' ', $xd);\r\n echo\t\"\t.contents h1, .contents h2, .contents h3, .contents h4, .contents h5, .contents h6, aside h1, aside h2, aside h3, aside h4, aside h5, aside h6 {font-family: '\" . $xd . \"';}\" . \"\\n\"; }\r\n \r\n if ( get_theme_mod('linkcolor_setting') != '#0b6492' ) echo '\ta {color:' . get_theme_mod('linkcolor_setting') . ';}' . \"\\n\";\r\n if ( get_theme_mod('linkcolorhover_setting') != '#FFFFFF' ) echo '\ta:hover {color:' . get_theme_mod('linkcolorhover_setting') . ';}' . \"\\n\";\r\n if ( get_theme_mod('link_text_shadow_setting') != '' ) echo '\t.contents a {text-shadow:.1em .1em 0 ' . get_theme_mod('link_text_shadow_setting') . ';}' . \"\\n\";\r\n if ( get_theme_mod('fontcolor_setting') != '#000000' ) echo '\tbody {color:' . get_theme_mod('fontcolor_setting') . ';}' . \"\\n\";\r\n if ( get_theme_mod('navcolor_setting') != '#CCCCCC' ) echo '\t.header li a {color:' . get_theme_mod('navcolor_setting') . ';}' . \"\\n\";\r\n if ( get_theme_mod('navcolorhover_setting') != '#0b6492' ) echo '\t.header li a:hover {color:' . get_theme_mod('navcolorhover_setting') . ';}' . \"\\n\";\r\n if ( get_theme_mod('dropcolor_setting') != '#BBBBBB' ) echo '\t.header li ul li a {color:' . get_theme_mod('dropcolor_setting') . ';}' . \"\\n\";\r\n if ( get_theme_mod('dropcolorhover_setting') != '#0b6492' ) echo '\t.header li ul li a:hover {color:' . get_theme_mod('dropcolorhover_setting') . ';}' . \"\\n\";\r\n if ( get_theme_mod('fontsizeadjust_setting') != '1' ) echo '\t.contents, aside {font-size:' . get_theme_mod('fontsizeadjust_setting') . 'em;}' . \"\\n\";\r\n if ( get_theme_mod('removefooter_setting') != 'visible' ) echo '\tfooter {visibility:' . get_theme_mod('removefooter_setting') . ';}' . \"\\n\";;\r\n if ( get_theme_mod('header_image_width_setting') != '20' ) {\r\n $header_margin_percentage = (100 - get_theme_mod('header_image_width_setting')) / 2;\r\n echo '\t.header li.website_logo {margin:0 ' . $header_margin_percentage . '%; width:' . get_theme_mod('header_image_width_setting') . '%;}' . \"\\n\";}\r\n if ( get_theme_mod('custombanner_setting') != '') echo '\t.header {background: bottom url(' . get_theme_mod('custombanner_setting') . ');}' . \"\\n\";\r\n\r\n\t\techo '</style>' . \"\\n\";\r\n\t\techo '<!-- End Custom CSS -->' . \"\\n\";\r\n\t\techo \"\\n\"; }",
"function setup() {\n\t$n = function( $function ) {\n\t\treturn __NAMESPACE__ . \"\\\\$function\";\n\t};\n\n\tadd_action( 'after_setup_theme', $n( 'i18n' ) \t\t\t);\n\tadd_action( 'wp_enqueue_scripts', $n( 'scripts' ) \t\t\t);\n\tadd_action( 'wp_enqueue_scripts', $n( 'styles' ) \t\t\t);\n\tadd_action( 'wp_head', $n( 'header_meta' ) \t\t\t);\n\tadd_action( 'after_setup_theme', $n( 'rss_feed_links' )\t\t);\n\tadd_action( 'after_setup_theme', $n( 'title_tag_support' )\t\t);\n\tadd_action( 'after_setup_theme', $n( 'post_thumbnail_support' ));\n\tadd_action( 'after_setup_theme', $n( 'image_sizes' ) );\n\tadd_action( 'after_setup_theme', $n( 'nav_menu_register' )\t\t);\n\tadd_action( 'after_setup_theme', $n( 'html5_elements' )\t\t);\n\tadd_action( 'wp_head', $n( 'add_custom_fonts' ) );\n\n\tremove_action( 'wp_head', 'print_emoji_detection_script', 7 );\n\tremove_action( 'admin_print_scripts', 'print_emoji_detection_script' );\n\tremove_action( 'wp_print_styles', 'print_emoji_styles' );\n\tremove_action( 'admin_print_styles', 'print_emoji_styles' );\n\tremove_action('wp_head', 'rsd_link' );\n\tremove_action('wp_head', 'wp_generator' );\n\tremove_action('wp_head', 'feed_links', 2 );\n\tremove_action('wp_head', 'index_rel_link' );\n\tremove_action('wp_head', 'wlwmanifest_link' );\n\tremove_action('wp_head', 'feed_links_extra', 3 );\n\tremove_action('wp_head', 'start_post_rel_link', 10, 0 );\n\tremove_action('wp_head', 'parent_post_rel_link', 10, 0 );\n\tremove_action('wp_head', 'adjacent_posts_rel_link', 10, 0 );\n}",
"function wp_functionality_constants()\n {\n }",
"function style ( $arguments = \"\" ) {\n $arguments = func_get_args();\n $rc = new ReflectionClass('tstyle');\n return $rc->newInstanceArgs( $arguments ); \n}",
"public function register(): void {\n\t\tif ( $this->type === 'script' ) {\n\t\t\t$this->register_script();\n\t\t}\n\n\t\tif ( $this->type === 'style' ) {\n\t\t\t$this->register_style();\n\t\t}\n\t}",
"public function add_theme_support() {\n\t}",
"function wptheme_register_styles() {\n\t\t$theme = wp_get_theme();\n\t\t$version = $theme['Version'];\n\t\t$stylesheets = '';\n\n\t\t// Register stylesheets\n\t $stylesheets .= wp_register_style('wptheme', get_stylesheet_directory_uri().'/style.css', array(), $version, 'screen, projection');\n\n\t\t// enqueue registered styles\n\t\twp_enqueue_style('wptheme');\n\n\t}",
"function setup() {\n\t$n = function( $function ) {\n\t\treturn __NAMESPACE__ . \"\\\\$function\";\n\t};\n\n\tadd_action( 'after_setup_theme', $n( 'i18n' ) );\n\tadd_action( 'after_setup_theme', $n( 'theme_support' ) );\n\tadd_action( 'widgets_init', $n( 'register_theme_sidebar' ) );\n\tadd_action( 'init', $n( 'register_theme_menus' ) );\n\tadd_action( 'wp_enqueue_scripts', $n( 'scripts' ), 1000 );\n\tadd_action( 'wp_enqueue_scripts', $n( 'styles' ) );\n\tadd_action( 'wp_head', $n( 'header_meta' ) );\n\n\t// Skip duplicate parser hooks.\n\tadd_filter( 'wp_parser_skip_duplicate_hooks', '__return_true' );\n\n\t// Use custom more text.\n\tadd_filter( 'the_content_more_link', $n( 'more_link' ), 10, 2 );\n}",
"function setup(){\n\t\t$n = function( $function ){\n\t\t\treturn __NAMESPACE__ . '\\\\' . $function;\n\t\t};\n\t\t\n\t\t//add the hooks and filters here\n\t\tadd_action( \"init\", $n(\"register_block\") );\n\t}",
"public function register_styles() {\n\n\t\t\twp_register_style(\n\t\t\t\t\"$this->ID-style\",\n\t\t\t\tplugins_url( 'style.css', __FILE__ ),\n\t\t\t\tnull,\n\t\t\t\t$this->version\n\t\t\t);\n $file_tmpl = 'ui/timeago/locale/jquery.timeago.%s.js';\n wp_register_script( 'timeago-locale', WP_STREAM_URL . sprintf( $file_tmpl, 'en' ), array( 'timeago' ), '1' );\n wp_register_style( 'select2', WP_STREAM_URL . 'ui/select2/select2.css', array(), '3.5.1' );\n\t\t}",
"function setup() {\n\t$n = function( $function ) {\n\t\treturn __NAMESPACE__ . \"\\\\$function\";\n\t};\n\n\tadd_action( 'after_setup_theme', $n( 'i18n' ) );\n\tadd_action( 'after_setup_theme', $n( 'theme_setup' ) );\n\tadd_action( 'wp_enqueue_scripts', $n( 'scripts' ) );\n\tadd_action( 'wp_enqueue_scripts', $n( 'styles' ) );\n\tadd_action( 'wp_head', $n( 'js_detection' ), 0 );\n\tadd_action( 'wp_head', $n( 'add_manifest' ), 10 );\n\n\tadd_filter( 'script_loader_tag', $n( 'script_loader_tag' ), 10, 2 );\n}",
"function twentynineteen_setup() {\n\t\tadd_theme_support( 'wp-block-styles' );\n\t\t// Add support for full and wide align images.\n\t\tadd_theme_support( 'align-wide' );\n\t\t// Add support for editor styles\n\t\tadd_theme_support( 'editor-styles' );\n\t\t// Enqueue editor styles\n\t\tadd_editor_style( 'style-editor.css' );\n }",
"static function _style_on() {\n\t\treturn self::style( true );\n\t}",
"function import_STE()\n{\n}",
"function CustomThemeSupport(){\n // coloring\n if(!empty(SELF::$WPgutenberg_ColorPalette)):\n $newColors = array();\n foreach (SELF::$WPgutenberg_ColorPalette as $colorkey => $color) {\n $newColors[] = array(\n 'name' => __( $color[\"key\"], 'WPgutenberg' ),\n 'slug' => prefix_core_BaseFunctions::Slugify($color[\"key\"]),\n 'color'\t=> $color[\"value\"],\n );\n }\n add_theme_support( 'editor-color-palette', $newColors );\n endif;\n // font sizes\n if(!empty(SELF::$WPgutenberg_FontSizes)):\n $newColors = array();\n foreach (SELF::$WPgutenberg_FontSizes as $sizekey => $size) {\n $newColors[] = array(\n 'name' => __( $size[\"key\"], 'WPgutenberg' ),\n 'slug' => prefix_core_BaseFunctions::Slugify($size[\"key\"]),\n 'size'\t=> $size[\"value\"],\n );\n }\n add_theme_support( 'editor-font-sizes', $newColors );\n // disable custom color picker\n if(SELF::$WPgutenberg_ColorPalette_CP == 0):\n add_theme_support( 'disable-custom-colors');\n endif;\n endif;\n // disable default patterns\n if($this->WPgutenberg_DefaultPatterns == 0):\n remove_theme_support( 'core-block-patterns' );\n endif;\n\n }",
"function virustotalscan_replace_style()\r\n{\r\n global $mybb, $templates, $virustotalscan_url_css, $plugins;\r\n $groups = explode(\",\", $mybb->settings['virustotalscan_setting_url_groups']);\r\n // doar in cazul in care modulul de scanare al legaturilor este activ se trece la adaugarea codului CSS in forum\r\n if ($mybb->settings['virustotalscan_setting_url_enable'] && virustotalscan_check_server_load($mybb->settings['virustotalscan_setting_url_loadlimit']) && !empty($mybb->settings['virustotalscan_setting_key']) && !in_array($mybb->user['usergroup'], $groups))\r\n {\r\n eval(\"\\$virustotalscan_url_css = \\\"\".$templates->get(\"virustotalscan_url_css\").\"\\\";\"); \r\n // in acest caz va exista scanarea URL-urilor\r\n $plugins->add_hook('parse_message_end', 'virustotalscan_scan_url');\r\n }\r\n}",
"function preview_theme()\n {\n }",
"private static function addFunctions()\n {\n \tself::$twig->addFunction(new \\Twig_SimpleFunction('asset', function ($asset) {\n return sprintf('%s', ltrim($asset, '/'));\n\t\t}));\n\n self::$twig->addFunction(new \\Twig_SimpleFunction('getBaseUrl', function () {\n return getBaseUrl();\n }));\n\n self::$twig->addFunction(new \\Twig_SimpleFunction('csrf_token', function () {\n return csrf_token();\n }));\n }",
"public function registerStylesCommon() {\n $v = Wpjb_Project::VERSION;\n $p = plugins_url().'/wpjobboard/public/css/';\n $x = plugins_url().'/wpjobboard/application/vendor/';\n \n wp_register_style(\"wpjb-vendor-datepicker\", $x.\"date-picker/css/datepicker.css\");\n wp_register_style('wpjb-glyphs', $p.\"wpjb-glyphs.css\", array(), $v );\n wp_register_style('wpjb-stripe-elements', $p.\"wpjb-stripe-elements.css\", array(), $v );\n }",
"function chappell_construction_register_stylesheets() {\n wp_register_style('home', CHILD_CSS_URL . '/home.css', array(), 1.0);\n wp_register_style('residence', CHILD_CSS_URL . '/residence.css', array(), 1.0);\n}",
"function Sparql_ParserFunctionSetup($parser) {\n // Set a function hook associating the \"example\" magic word with our function\n $parser->setFunctionHook(\"twinkle\", \"Sparql_ParserFunctionRender\" );\n // no hash needed \n $parser->setFunctionHook(\"sparqlencode\", \"Sparql_SparqlEncode\", SFH_NO_HASH);\n return true;\n}",
"public function custom()\n\t{\n\t}",
"protected function livewireStyleDefinition()\n {\n return <<<'EOF'\n\n@livewireStyles\n\nEOF;\n }",
"public function __construct()\n\t{\n\t\tadd_shortcode('Opening_hours', array($this, 'Opening_hours_fct') ); // link new function to shortcode name\n\t\tadd_shortcode('Opening_hours_table', array($this, 'Opening_hours_table_fct') ); // link new function to shortcode name\n\t\tadd_shortcode('Opening_hours_alert', array($this, 'Opening_hours_alert_fct') ); // link new function to shortcode name\n\t\tadd_shortcode('Opening_hours_clock', array($this, 'Opening_hours_clock_fct') ); // link new function to shortcode name\n\t}",
"function add_editor_style($stylesheet = 'editor-style.css')\n {\n }",
"public function color()\n {\n }",
"private function define_public_hooks() {\n\n\t\t$theme_public = new THC_Public( $this->get_theme_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'wp_enqueue_scripts', $theme_public, 'theme_styles' );\n\t\t$this->loader->add_action( 'wp_enqueue_scripts', $theme_public, 'theme_scripts' );\n\t\t$this->loader->add_action( 'wp_head', $theme_public, 'theme_head' );\n\t\t$this->loader->add_action( 'after_setup_theme', $theme_public, 'theme_setup' );\n\t\t$this->loader->add_filter( 'wp_resource_hints', $theme_public, 'thc_resource_hints', 10, 2 );\n\n\t}",
"function wp_using_themes()\n {\n }",
"function get_stylesheet()\n {\n }",
"function sp_admin_scripts_style_sc ($hook) {\n\tif( $hook == 'post.php' || $hook == 'post-new.php' ) {\n\twp_register_style( 'shortcode-style', esc_url( get_template_directory_uri() . '/library/shortcode/css/sc-style.css' ) );\n\twp_enqueue_style( 'shortcode-style' );\n\t}\n}",
"function setup() {\n\t$n = function( $function ) {\n\t\treturn __NAMESPACE__ . \"\\\\$function\";\n\t};\n\n\tadd_action( 'after_setup_theme', $n( 'i18n' ) );\n\tadd_action( 'wp_enqueue_scripts', $n( 'scripts' ) );\n\tadd_action( 'wp_enqueue_scripts', $n( 'styles' ) );\n\tadd_action( 'wp_head', $n( 'header_meta' ) );\n\tadd_action( 'after_setup_theme', $n( 'additive_navmenus' ) );\n\tadd_action( 'widgets_init', $n( 'additive_widgets_init' ));\n add_action( 'init', $n( 'register_fablabs_post_type' ) );\n\n add_filter( 'post_gallery', \t\t\t$n('additive_gallery'), 10, 3);\n\t/*\n\t * Switch default core markup for search form, comment form, and comments\n\t * to output valid HTML5.\n\t */\n\tadd_theme_support( 'html5', array(\n\t\t'search-form',\n\t\t'gallery',\n\t\t'caption',\n\t) );\n\n\t/*\n\t * Enable support for Post Formats.\n\t *\n\t * See: https://codex.wordpress.org/Post_Formats\n\t */\n\tadd_theme_support( 'post-formats', array(\n\t\t'aside',\n\t\t'image',\n\t\t'video',\n\t\t'quote',\n\t\t'link',\n\t\t'gallery',\n\t\t'status',\n\t\t'audio',\n\t\t'chat',\n\t) );\n\n\tadd_theme_support('post-thumbnails', array('post', 'page', 'additive_fab_lab'));\n\n}",
"function gopathemes_save_custom_css(){\n \n if (!function_exists('ot_get_option')) {\n return;\n }\n \n /* CUSTOM COLOR STYLING */\n if (ot_get_option('haira_custom_styling', 'off') == 'on') {\n\n $primary_color = ot_get_option('haira_primary_color','#FFBA00');\n $secondary_color = ot_get_option( 'haira_secondary_color', '#333333' );\n $body_bg = ot_get_option( 'haira_body_background', '#f6f6f6' );\n \n $body_font = ot_get_option('haira_body_font', \n array(\n 'font-family' => \"source-sans-pro, sans-serif\", \n 'font-color' => '#8a8a8a', \n 'font-size' => '14px',\n 'line-height' => '24px',\n 'font-weight' => '400'\n ));\n \n $heading_font = ot_get_option('haira_heading_font', \n array(\n 'font-family' => \"source-sans-pro, sans-serif\", \n 'font-color' => '#333333', \n 'font-weight' => '700'\n ));\n \n $menu_typo = ot_get_option( 'haira_menu_typography',\n array(\n 'font-color' => '#FFFFFF', \n 'font-size' => '13px', \n 'font-weight' => '400', \n 'letter-spacing' => '0.03em', \n 'text-transform' => 'none'\n ));\n \n $submenu_typo = ot_get_option( 'haira_submenu_typography',\n array(\n 'font-color' => '#FFFFFF', \n 'font-size' => '12px', \n 'font-weight' => '400', \n 'line-height' => '45px', \n 'letter-spacing' => '0.03em', \n 'text-transform' => 'none'\n ));\n\n $variables = array(\n 'primary-color' => $primary_color,\n 'second-color' => $secondary_color,\n 'bg-color' => $body_bg,\n \n 'header-bg' => ot_get_option( 'haira_header_bg' ),\n 'header-height' => ot_get_option( 'haira_header_height' ),\n \n 'menu-fs' => $menu_typo['font-size'],\n 'menu-link-color' => $menu_typo['font-color'],\n 'menu-link-color-hover' => ot_get_option( 'haira_menu_link_color_hover' ),\n 'menu-link-bg-hover' => ot_get_option( 'haira_menu_link_bg_hover' ),\n 'menu-link-ls' => $menu_typo['letter-spacing'],\n 'menu-font-weight' => $menu_typo['font-weight'],\n 'menu-text-transform' => $menu_typo['text-transform'],\n \n 'submenu-bg' => ot_get_option( 'haira_submenu_bg' ),\n 'submenu-fs' => $submenu_typo['font-size'],\n 'submenu-link-color' => $submenu_typo['font-color'],\n 'submenu-link-color-hover' => ot_get_option( 'haira_submenu_link_color_on_hover' ),\n 'submenu-link-bg-hover' => ot_get_option( 'haira_submenu_link_bg_on_hover' ),\n 'submenu-link-ls' => $submenu_typo['letter-spacing'],\n 'submenu-font-weight' => $submenu_typo['font-weight'],\n 'submenu-text-transform' => $submenu_typo['text-transform'],\n 'submenu-lh' => $submenu_typo['line-height'],\n \n 'heading-color' => $heading_font['font-color'],\n 'heading-font' => $heading_font['font-family'],\n 'hweight' => $heading_font['font-weight'],\n \n 'text-color' => $body_font['font-color'],\n 'body-font' => $body_font['font-family'],\n 'fsize' => $body_font['font-size'],\n 'lheight' => $body_font['line-height'],\n 'bweight' => $body_font['font-weight']\n );\n\n\n $default_vars = file( get_template_directory().'/scss/_vars.scss' );\n \n gopathemes_compile_css( haira_setup_scss_vars($default_vars, $variables) );\n }\n \n}",
"static function defineFunctions()\n\t{\n\t\tif ( !function_exists('json_decode') ) {\n\t\t\tfunction json_decode($content, $assoc=false){\n\t\t\t\tif ( $assoc ){\n\t\t\t\t\t$json = new Pie_Json(SERVICES_JSON_LOOSE_TYPE);\n\t\t\t\t} else {\n\t\t\t\t\t$json = new Pie_Json;\n\t\t\t\t}\n\t\t\t\treturn $json->decode($content);\n\t\t\t}\n\t\t}\n\n\t\tif ( !function_exists('json_encode') ) {\n\t\t\tfunction json_encode($content){\n\t\t\t\t$json = new Services_JSON;\n\t\t\t\treturn $json->encode($content);\n\t\t\t}\n\t\t}\n\t}",
"protected static function registerStyles() {\n\t\tforeach (static::$styles as $handle => $stylePath) {\n\t\t\tstatic::registerStyle($handle, $stylePath);\n\t\t}\n\t}",
"function callback_color($args)\n {\n }",
"function add_style_definitions() {\n\t\t\t\t$options = $this->get_options();\n\t\t\t\tif( 'yes' === $options['add_styles_to_header'] ) {\n\t\t\t\t\techo \"<!-- Styles added by Cap & Run plugin -->\\n\";\n\t\t\t\t\techo \"<style type=\\\"text/css\\\">\\n\";\n\t\t\t\t\techo $options['styles_to_add'];\n\t\t\t\t\techo \"</style>\\n\";\n\t\t\t\t\techo \"<!-- End of Cap & Run style additions -->\\n\\n\";\n\t\t\t\t}\n\t\t\t}",
"function inc_spip2odt_styliser($odf_dir, $contexte){\n\t// pas de fond dans le contexte\n\tunset($contexte['fond']);\n\n\tcompiler_xml_oasis($odf_dir . \"content.xml\", $contexte);\n\tcompiler_xml_oasis($odf_dir . \"styles.xml\", $contexte);\n\n\tspip2odt_ajouter_styles_perso(\"templates/styles.xml\", $odf_dir . \"styles.xml\");\n\n\tspipoasis_ecrire_meta($odf_dir, $contexte);\n}",
"function non_functional()\n{\n $lots = of_code();\n //goes here\n\n /**\n * this is an example doc block that should be detected. It sits above an action inside a function.\n */\n $defaults = do_action('single_quote_name_no_spaces', $first = array('fake', array(1,2,3)), $second, $last);\n}",
"function LiangLeeThemeDesigner_lib(){\n/*\n * Register Global Variables for Topbar Background image.\n *\n * @access public\n */\nglobal $liangtopbar_bg;\n/*\n * Register Global Variables for Topbar Background color.\n *\n * @access public\n */\nglobal $liangtopbar_color;\n/*\n * Register Global Variables for Topbar height.\n *\n * @access public\n */\nglobal $liangtopbar_height;\n/*\n * Register Global Variables for Header Background Color.\n *\n * @access public\n */\nglobal $liangheader_color;\n/*\n * Register Global Variables for Head Logo.\n *\n * @access public\n */\nglobal $lianglogo;\n/*\n * Register Global Variables for Header Background image.\n *\n * @access public\n */\nglobal $liangheader_bgimg;\n/*\n * Register Global Variables for Search Bar Border Color.\n *\n * @access public\n */\nglobal $liangsearch_br;\n\n/*\n * Register Global Variables for Header Height.\n *\n * @access public\n */\nglobal $liangheader_height;\n/*\n * Register Global Variables for WalledGarden Image.\n *\n * @access public\n */\nglobal $liangwalledg_bgimg;\n\n/*\n * Fetch Settings for Header Height.\n *\n * @access public\n */\n$liang_walledg = elgg_get_plugin_setting(\"Leethemed_walledg_background\", \"LiangLeeThemeDesigner\");\nif (!elgg_get_plugin_setting(\"Leethemed_walledg_background\", \"LiangLeeThemeDesigner\")) {\n $liangwalledg_bgimg = '90px';\n } else { \n $liangwalledg_bgimg = $liang_walledg;\n}\n\n/*\n * Fetch Settings for Header Height.\n *\n * @access public\n */\n$liang_header_height = elgg_get_plugin_setting(\"Leethemed_header_height\", \"LiangLeeThemeDesigner\");\nif (!elgg_get_plugin_setting(\"Leethemed_header_height\", \"LiangLeeThemeDesigner\")) {\n $liangheader_height = '90px';\n } else { \n $liangheader_height = $liang_header_height;\n}\n/*\n * Fetch Settings for Topbar Background.\n *\n * @access public\n */\n$liang_topbar_bg = elgg_get_plugin_setting(\"Leethemed_background\", \"LiangLeeThemeDesigner\");\nif (!elgg_get_plugin_setting(\"Leethemed_background\", \"LiangLeeThemeDesigner\")) {\n $liangtopbar_bg = elgg_get_site_url().'_graphics/toptoolbar_background.gif';\n } else { \n $liangtopbar_bg = $liang_topbar_bg;\n}\n\n/*\n * Fetch Settings for Topbar Background Color.\n *\n * @access public\n */\n$liang_topbar_color = elgg_get_plugin_setting(\"Leethemed_tbar_bgcolor\", \"LiangLeeThemeDesigner\");\nif (!elgg_get_plugin_setting(\"Leethemed_tbar_bgcolor\", \"LiangLeeThemeDesigner\")) {\n $liangtopbar_color = '#333333';\n } else { \n $liangtopbar_color = $liang_topbar_color;\n}\n/*\n * Fetch Settings for Topbar Height.\n *\n * @access public\n */\n$liang_topbar_height = elgg_get_plugin_setting(\"Leethemed_tbar_height\", \"LiangLeeThemeDesigner\");\nif (!elgg_get_plugin_setting(\"Leethemed_tbar_height\", \"LiangLeeThemeDesigner\")) {\n $liangtopbar_height = '24';\n } else { \n $liangtopbar_height = $liang_topbar_height;\n}\n/*\n * Fetch Settings for Header Background image.\n *\n * @access public\n */\n$liang_header_bgimg = elgg_get_plugin_setting(\"Leethemed_header_bgimg\", \"LiangLeeThemeDesigner\");\nif (!elgg_get_plugin_setting(\"Leethemed_header_bgimg\", \"LiangLeeThemeDesigner\")) {\n $liangheader_bgimg = '#4690D6 url('.elgg_get_site_url().'_graphics/header_shadow.png) repeat-x bottom left';\n } else { \n $liangheader_bgimg = $liang_header_bgimg;\n}\n/*\n * Fetch Settings for Header Background Image.\n *\n * @access public\n */\n$liang_header_color = elgg_get_plugin_setting(\"Leethemed_header_bgcolor\", \"LiangLeeThemeDesigner\");\nif (!elgg_get_plugin_setting(\"Leethemed_header_bgcolor\", \"LiangLeeThemeDesigner\")) {\n $liangheader_color = '#4690D6';\n } else { \n $liangheader_color = $liang_header_color;\n}\n/*\n * Fetch Settings for Topbar Logo.\n * Display ($site->name) site name if logo not setup.\n * @access public\n */\n$liang_logo = elgg_get_plugin_setting(\"Leethemed_logo\", \"LiangLeeThemeDesigner\");\nif (!elgg_get_plugin_setting(\"Leethemed_logo\", \"LiangLeeThemeDesigner\")) {\n $site = elgg_get_site_entity();\n $site_name = $site->name;\n $lianglogo = $site_name;\n } else { \n $lianglogo = $liang_logo;\n}\n\n}",
"function init(){\r\n wp_register_style( 'twitlink_style',$this->plugin_url.'css/style.css',null,$this->version ); \r\n }",
"protected function regStyles() {\n $this->modx->regClientCSS($this->config['cssUrl'] . 'web/bbcode/bbcode.css');\n $this->modx->regClientCSS($this->config['cssUrl'] . 'web/styles.css');\n }",
"function harvest_style_override(){\n\t$primary = harvest_option( 'accent', '#006f7c' );\n\t$secondary = harvest_option( 'secondary_accent', '#b4b2b1' );\n\t$logo_css = harvest_option( 'logo_name_css', '');\n\t$style = \".logo_name { $logo_css }\";\n\twp_add_inline_style( 'harvest-stylesheet', $style );\t\n\t\n\t$style = \".accent-background, \n\t\t.r-tabs .r-tabs-state-active {\n\t\t\tbackground: $primary;\n\t\t}\n\t\t.secondary-accent-background,\n\t\t.recent-sermon h2, \n\t\t.weekly-calendar h2 {\n\t\t\tbackground: $secondary;\n\t\t}\n\t\t.r-tabs a,\n\t\t.r-tabs .r-tabs-anchor {\n\t\t\tcolor: $primary;\n\t\t}\n\t\t.r-tabs .r-tabs-tab {\n\t\t\tborder-bottom-color: $secondary;\n\t\t\tborder-top-color: $secondary;\n\t\t}\n\t\t.r-tabs .r-tabs-accordion-title{\n\t\t\tborder-bottom-color: $secondary;\n\t\t}\n\t\t.content a:not(.button),\n\t\t.content a:hover {\n\t\t\tcolor: $primary;\n\t\t}\n\t\t.content a.button:hover {\n\t\t\tcolor: $primary;\n\t\t\tborder-color: $primary;\n\t\t}\";\n\t\twp_add_inline_style( 'harvest-stylesheet', $style );\t\n}",
"function ag_set_predefined_style() {\n\tif(!isset($_POST['lcwp_nonce']) || !wp_verify_nonce($_POST['lcwp_nonce'], 'lcwp_nonce')) {die('Cheating?');}\n\tif(!isset($_POST['style'])) {die('data is missing');}\n\n\trequire_once(AG_DIR .'/settings/preset_styles.php');\n\trequire_once(AG_DIR .'/functions.php');\n\t\n\t$style_data = ag_preset_styles_data($_POST['style']);\n\tif(empty($style_data)) {die('Style not found');}\n\t\n\t\n\t// override values\n\tforeach($style_data as $key => $val) {\n\t\tupdate_option($key, $val);\t\t\n\t}\n\n\n\t// if is not forcing inline CSS - create static file\n\tif(!get_option('mg_inline_css')) {\n\t\tag_create_frontend_css();\n\t}\n\t\n\tdie('success');\n}",
"function first_edition_customize_css() {\n\t$selected_fonts = first_edition_font_list();\n\t$color = get_option( 'first_edition_colors' );\n\t$bgcolor = get_theme_mod( 'background_color' );\n\t$customized_css = '.custom-background { background-color: #' . esc_attr( $bgcolor ) . '; }'\n\t\t. \"\\n\" . 'a { color: #' . $color['link'] . '; }'\n\t\t. \"\\n\" . 'body, a:hover, a:focus, a:active, .main-navigation ul .current_page_item > a { color: #' . esc_attr( $color['text'] ) . '; }'\n\t\t. \"\\n\" . '.comment-form input[type=\"submit\"]:hover { background: #' . esc_attr( $color['text'] ) . '; color: #' . esc_attr( $bgcolor) . '; }';\n\t$font = get_option( 'first_edition_font_pair' );\n\tif ( '' != $font ) {\n\tswitch ( $font ) {\n\t\tcase 'pair1':\n\t\t\twp_enqueue_style( 'lustria', \"//fonts.googleapis.com/css?family=\" . esc_url( $selected_fonts['lustria'] ) );\n\t\t\twp_enqueue_style( 'lato', \"//fonts.googleapis.com/css?family=\" . esc_url( $selected_fonts['lato'] ) );\n\t\t\t$customized_css .= \"\\nh1,h2,h3,h4,h5,h6 { font-family: 'Lustria', serif; }\";\n\t\t\t$customized_css .= \"\\nbody { font-family: 'Lato', 'Open Sans', sans-serif; font-weight: 300; }\";\n\t\t\tbreak;\n\n\t\tcase 'pair2':\n\t\t\twp_enqueue_style( 'ubutnu', \"//fonts.googleapis.com/css?family=\" . esc_url( $selected_fonts['ubutnu'] ) );\n\t\t\twp_enqueue_style( 'lora', \"//fonts.googleapis.com/css?family=\" . esc_url( $selected_fonts['lora'] ) );\n\t\t\t$customized_css .= \"\\nh1,h2,h3,h4,h5,h6 { font-family: 'Ubuntu', serif; }\";\n\t\t\t$customized_css .= \"\\nbody { font-family: 'Lora', 'Open Sans', sans-serif; }\";\n\t\t\tbreak;\n\n\t\tcase 'pair3':\n\t\t\twp_enqueue_style( 'raleway', \"//fonts.googleapis.com/css?family=\" . esc_url( $selected_fonts['raleway'] ) );\n\t\t\twp_enqueue_style( 'merriweather', \"//fonts.googleapis.com/css?family=\" . esc_url( $selected_fonts['merriweather'] ) );\n\t\t\t$customized_css .= \"\\nh1,h2,h3,h4,h5,h6 { font-family: 'Raleway', serif; } \";\n\t\t\t$customized_css .= \"\\nbody { font-family: 'Merriweather', 'Open Sans', sans-serif; font-weight: 300; }\";\n\t\t\tbreak;\n\n\t\tcase 'pair4':\n\t\t\twp_enqueue_style( 'roboto-slab', \"//fonts.googleapis.com/css?family=\" . esc_url( $selected_fonts['roboto-slab'] ) );\n\t\t\twp_enqueue_style( 'roboto', \"//fonts.googleapis.com/css?family=\" . esc_url( $selected_fonts['roboto'] ) );\n\t\t\t$customized_css .= \"\\nh1,h2,h3,h4,h5,h6 { font-family: 'Roboto Slab', serif; }\";\n\t\t\t$customized_css .= \"\\nbody { font-family: 'Roboto', 'Open Sans', sans-serif; font-weight: 300; }\";\n\t\t\tbreak;\n\n\t\tcase 'pair5':\n\t\t\twp_enqueue_style( 'quattrocento', \"//fonts.googleapis.com/css?family=\" . esc_url( $selected_fonts['quattrocento'] ) );\n\t\t\twp_enqueue_style( 'quattrocento-sans', \"//fonts.googleapis.com/css?family=\" . esc_url( $selected_fonts['quattrocento-sans'] ) );\n\t\t\t$customized_css .= \"\\nh1,h2,h3,h4,h5,h6 { font-family: 'Quattrocento', serif; }\";\n\t\t\t$customized_css .= \"\\nbody { font-family: 'Quattrocento Sans', 'Open Sans', sans-serif; font-weight: 300; }\";\n\t\t\tbreak;\n\t} }\n\twp_add_inline_style( 'first-edition-style', $customized_css );\n}",
"function _s_setup() {\n\n\t/**\n\t * Custom template tags for this theme.\n\t */\n\trequire( get_template_directory() . '/inc/template-tags.php' );\n\n\t/**\n\t * Custom functions that act independently of the theme templates\n\t */\n\trequire( get_template_directory() . '/inc/extras.php' );\n\n\t/**\n\t * Custom Theme Options\n\t */\n\t//require( get_template_directory() . '/inc/theme-options/theme-options.php' );\n\n\t/**\n\t * WordPress.com-specific functions and definitions\n\t */\n\t//require( get_template_directory() . '/inc/wpcom.php' );\n\n\t/**\n\t * Make theme available for translation\n\t * Translations can be filed in the /languages/ directory\n\t * If you're building a theme based on _s, use a find and replace\n\t * to change '_s' to the name of your theme in all the template files\n\t */\n\tload_theme_textdomain( '_s', get_template_directory() . '/languages' );\n\n\t/**\n\t * Add default posts and comments RSS feed links to head\n\t */\n\tadd_theme_support( 'automatic-feed-links' );\n\n\t/**\n\t * Enable support for Post Thumbnails\n\t */\n\tadd_theme_support( 'post-thumbnails' );\n\n\t/**\n\t * This theme uses wp_nav_menu() in one location.\n\t */\n\tregister_nav_menus( array(\n\t\t'primary' => __( 'Primary Menu', '_s' ),\n\t) );\n\n\t/**\n\t * Add support for the Aside Post Formats\n\t */\n\tadd_theme_support( 'post-formats', array( 'aside', ) );\n}",
"public function init()\n {\n $this->shortcode->getHandlers()->add('color', function (ShortcodeInterface $sc) {\n $color = $sc->getParameter('c', null);\n $bgColor = $sc->getParameter('bg', null);\n $padding = $sc->getParameter('padding', 3);\n\n if ($color || $bgColor) {\n $colorString = sprintf(\"%s%s%s\",\n $color !== null ? \"color:{$color};\" : '',\n $bgColor !== null ? \"background-color:{$bgColor};\" : '',\n $bgColor !== null ? \"padding-left:{$padding}px;padding-right:{$padding}px;\" : ''\n );\n\n return '<span style=\"' . $colorString . '\">' . $sc->getContent() . '</span>';\n }\n });\n }",
"function add_color(){\r\n echo '<style>\r\n\r\n #adminmenu,#adminmenu li,#adminmenu li ul,#adminmenu li ul li,#adminmenuwrap,#adminmenuback,.wp-submenu \r\n {background: gray !important}\r\n\r\n #wp-toolbar, .nojq \r\n {background: gray !important}\r\n\r\n\t\t</style>';\r\n\r\n}",
"function drawStyle()\r\n\t{\r\n\t}",
"function your_namespace()\n{\n wp_register_style('namespace', plugins_url('inc/style.css', __FILE__));\n wp_enqueue_style('namespace');\n}",
"function farmhouse_custom_block_style() {\n\n\tif ( ! function_exists( 'register_block_style' ) ) {\n\t\treturn;\n\t}\n\n\t$names = genesis_get_config( 'block-styles' );\n\n\tforeach ( $names as $name => $styles ) {\n\t\tforeach ( $styles as $style ) {\n\t\t\tregister_block_style( $name, $style );\n\t\t}\n\t}\n\n}",
"function my_login_stylesheet() {\n\n wp_register_style( 'animate', plugin_dir_url( __FILE__ ) . 'css/animate.css', array(), '3.2.5', 'screen' );\n wp_register_script( 'md5', plugin_dir_url( __FILE__ ) . 'js/md5-min.js', false, '2.2', true);\n\n\n wp_enqueue_style( 'login-style', plugin_dir_url( __FILE__ ) . 'css/login-style.css', array('animate'), '1.0', false );\n wp_enqueue_script( 'login-style-engine', plugin_dir_url( __FILE__ ) . 'js/login-style-engine.js', array( 'md5', 'jquery' ), '1.0', true );\n}",
"public function css();",
"public function registerStylesAdmin() {\n $v = Wpjb_Project::VERSION;\n $p = plugins_url().'/wpjobboard/public/css/';\n $x = plugins_url().'/wpjobboard/application/vendor/';\n \n wp_register_style(\"wpjb-admin-css\", $p.\"admin.css\", array(), $v);\n wp_register_style(\"wpjb-colorpicker-css\", $p.\"colorpicker.css\", array(), $v);\n wp_register_style(\"wpjb-vendor-ve-css\", $x.\"visual-editor/visual-editor.css\", array(), $v);\n wp_register_style(\"wpjb-multi-level-accordion-menu\", $p.\"multi-level-accordion-menu.css\", array(), $v);\n }",
"public function define();",
"function wpstandard_files() {\n\n $parent_style = 'twentynineteen-style'; // This is 'twentynineteen-style' for the Twenty nineteen theme.\n \n wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );\n \n wp_enqueue_style( 'child-style',\n get_stylesheet_directory_uri() . '/style.css',\n array( $parent_style ),\n wp_get_theme()->get('Version') \n );\n \n \n wp_enqueue_script('main-chealeyv2-js', get_theme_file_uri('/js/scripts-bundled.js'), NULL, microtime(), true);\n wp_enqueue_style('custom-google-fonts', '//fonts.googleapis.com/css?family=Roboto+Condensed:300,300i,400,400i,700,700i|Roboto:100,300,400,400i,700,700i');\n wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');\n wp_enqueue_style( 'dashicons' );\n\n wp_enqueue_style('chealeyv2_main_styles', get_stylesheet_uri(), NULL, microtime());\n\n wp_localize_script('main-chealeyv2-js', 'chealeyv2Data', array(\n 'root_url' => get_site_url(),\n 'nonce' => wp_create_nonce('wp_rest')\n ));\n}",
"function mu_themes_in_use(){$this->__construct();}",
"function wp_add_inline_style($handle, $data)\n {\n }",
"function register() {\n\tadd_action( 'admin_menu', '\\\\Sgdd\\\\Admin\\\\AdminPage\\\\add_menu' );\n\tadd_action( 'admin_init', '\\\\Sgdd\\\\Admin\\\\AdminPage\\\\action_handler' );\n\tadd_action( 'admin_enqueue_scripts', '\\\\Sgdd\\\\Admin\\\\AdminPage\\\\register_style' );\n\n\t\\Sgdd\\Admin\\SettingsPages\\Basic\\register();\n\t\\Sgdd\\Admin\\SettingsPages\\Advanced\\register();\n\t\\Sgdd\\Admin\\Editor\\register();\n}",
"function display_theme($theme)\n {\n }",
"public function register_hooks() {\n\t\t\\add_filter( 'category_description', [ $this, 'add_shortcode_support' ] );\n\t\t\\add_filter( 'term_description', [ $this, 'add_shortcode_support' ] );\n\t}",
"function labs_admin_header_style() {\n?>\n<?php\n}"
] | [
"0.7701661",
"0.69940877",
"0.6115355",
"0.60321015",
"0.6008079",
"0.5964369",
"0.59529996",
"0.59514225",
"0.5888041",
"0.587987",
"0.58676535",
"0.5865487",
"0.58546937",
"0.5830268",
"0.58135563",
"0.5809773",
"0.5807954",
"0.57751805",
"0.5739739",
"0.57361466",
"0.5726531",
"0.5725483",
"0.5725483",
"0.57228744",
"0.57040167",
"0.569301",
"0.56920695",
"0.56857187",
"0.56857187",
"0.56857187",
"0.5681413",
"0.5677095",
"0.56671476",
"0.56506944",
"0.56449467",
"0.5638452",
"0.56347746",
"0.5629497",
"0.5628326",
"0.56216556",
"0.5613357",
"0.5610515",
"0.5599819",
"0.5599721",
"0.55929303",
"0.5576174",
"0.5574784",
"0.55378556",
"0.55240774",
"0.5522138",
"0.5511564",
"0.55107176",
"0.5509519",
"0.550533",
"0.55040824",
"0.5502493",
"0.5497702",
"0.5497649",
"0.54906994",
"0.54837793",
"0.54806715",
"0.54679257",
"0.5458409",
"0.5451418",
"0.54476273",
"0.5440364",
"0.543967",
"0.54363066",
"0.5427569",
"0.5425647",
"0.5422339",
"0.5419526",
"0.5416339",
"0.54138285",
"0.5413332",
"0.5412451",
"0.5403553",
"0.5401393",
"0.53832775",
"0.53745013",
"0.5371916",
"0.5366773",
"0.5355943",
"0.5355387",
"0.535467",
"0.5351685",
"0.5346894",
"0.53458285",
"0.5344833",
"0.53446317",
"0.53392386",
"0.5335814",
"0.53288203",
"0.53243124",
"0.53219235",
"0.53174716",
"0.5315258",
"0.5309721",
"0.53054565",
"0.5304869",
"0.53036755"
] | 0.0 | -1 |
Register multiple menu in functions | function register_my_menus() {
register_nav_menus(
array(
'header-menu' => __('Header Menu')
)
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function menus();",
"protected function registerMenu()\n {\n }",
"function show_my_menus(){\n register_nav_menu('mainmenu', 'Huvudmeny');\n register_nav_menu('footermenu', 'Sociala medier');\n register_nav_menu('sidemenu', 'Sidomeny');\n register_nav_menu('blogsidepage', 'Blogg sidomeny sidor');\n register_nav_menu('blogsidearchive', 'Blogg sidomeny arkiv');\n register_nav_menu('blogsidecategory', 'Blogg sidomeny kategorier');\n}",
"function fp_menus() {\n\t\n \tregister_nav_menus( \n\t\tarray(\n\t\t\t'header-menu' => 'Header Menu',\n\t\t\t'footer-menu' => 'Footer Menu'\n\t\t) \n\t);\n}",
"function register_my_menu()\r\n{\r\n register_nav_menus(\r\n array(\r\n 'main' => 'Menu Principal',\r\n 'footer' => 'Menu Bas de Page',\r\n 'social' => 'Menu Réseaux Sociaux',\r\n 'side' => 'Menu bouton toggler'\r\n )\r\n );\r\n}",
"public function registerMenus() {\n $locations = array();\n foreach (Project::$menus as $slug => $name) {\n $locations[$slug] = __($name, Project::$projectNamespace);\n }\n register_nav_menus($locations);\n }",
"function registerMenus() {\n\t\t\tregister_nav_menu( 'nav-1', __( 'Top Navigation' ) );\n\t\t}",
"function register_my_menu() {\n register_nav_menus(array(\n \t'top_menu' \t \t\t=> 'Top Menu',\n \t'council_first_menu'=> 'Council First Menu',\n \t'council_sec_menu' \t=> 'Council Second Menu',\n \t'council_third_menu'=> 'Council Third Menu',\n \t'contact_menu_one'\t=> 'Contact First Menu',\n \t'contact_menu_two'\t=> 'Contact Second Menu',\n \t'enjoy_menu'\t\t=> 'Enjoy Kasrin Menu',\n \t'news_menu'\t\t\t=> 'News Menu',\n \t'initate_menu' \t \t=> 'Initate Menu',\n \t'footer_menu_one' => 'Footer Menu 1',\n\t\t'footer_menu_tow' => 'Footer Menu 2',\n\t\t'footer_menu_three' => 'Footer Menu 3',\n\t\t'footer_menu_four' => 'Footer Menu 4',\n\t\t'footer_menu_five' => 'Footer Menu 5'\n ));\n}",
"function ft_hook_menu() {}",
"protected function menus()\n {\n\n }",
"public function add_menus()\n {\n }",
"function register_menus() {\n\t\t\n\t\t\tregister_nav_menu( 'headermenu', __( 'Menú cabecera' ) );\n\t\t\tregister_nav_menu( 'footermenu', __( 'Menú pie' ) );\n\t\t\tregister_nav_menu( 'footermenulegal', __( 'Menú pie legal' ) );\t\t\t\n\n\t\t}",
"public function register_menus() {\n // register_nav_menus(array(\n // 'header_menu' => 'Header Navigation Menu'\n // ));\n }",
"function register_my_menus() {\n register_nav_menus(\n array( \n \t'header_navigation' => __( 'Header Navigation' ), \n \t'sidebar_navigation' => __( 'Sidebar Navigation' ),\n \t'mobile_navigation' => __( 'Mobile Navigation' ),\n \t'footer_navigation_1' => __( 'Footer Navigation 1' ),\n \t'footer_navigation_2' => __( 'Footer Navigation 2' ),\n \t'footer_navigation_3' => __( 'Footer Navigation 3' ),\n \t'footer_navigation_4' => __( 'Footer Navigation 4' )\n )\n );\n}",
"function menuConfig()\t{\n\t\tglobal $LANG;\n\t\t$this->MOD_MENU = Array (\n\t\t\"function\" => Array (\n\t\t\"1\" => $LANG->getLL(\"function1\"),\n\t\t\"2\" => $LANG->getLL(\"function2\"),\n\t\t)\n\t\t);\n\t\tparent::menuConfig();\n\t}",
"function register_menu() {\n\n register_nav_menu('header-menu',__('Header Menu'));\n\n}",
"function gymfitness_menus(){ \n register_nav_menus(array(\n 'menu-principal' =>__('Menu principal', 'gymfitness'),\n 'menu-principal2' =>__('Menu principal2', 'gymfitness')\n\n ));\n}",
"function register_my_menus() {\r\n register_nav_menus(\r\n array(\r\n 'primary-nav' => __( 'Primary Navigation' ),\r\n 'bottom-nav' => __( 'Bottom Navigation' )\r\n )\r\n );\r\n}",
"function register_menus()\n{\n register_nav_menus(array(\n 'header' => __('Header Menu', 'html5blank'),\n 'sidebar' => __('Sidebar Menu', 'html5blank'),\n 'footer' => __(\"Footer Menu\", \"html5blank\"),\n 'kievari' => \"Kievari Menu\"\n ));\n}",
"function menuConfig()\t{\n\t\t\t\t\tglobal $LANG;\n\t\t\t\t\t$this->MOD_MENU = Array (\n\t\t\t\t\t\t'function' => Array (\n\t\t\t\t\t\t\t'1' => $LANG->getLL('function1')/*,\n\t\t\t\t\t\t\t'2' => $LANG->getLL('function2'),\n\t\t\t\t\t\t\t'3' => $LANG->getLL('function3'),*/\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\tparent::menuConfig();\n\t\t\t\t}",
"function register_menus()\n{\n register_nav_menus(array(\n 'primary' => __('Primary Navigation', 'pd'),\n 'footer' => __('Footer Navigation', 'pd'),\n ));\n}",
"public function modMenu() {}",
"public function modMenu() {}",
"public function modMenu() {}",
"function register_my_menus() {\n register_nav_menus(\n array(\n 'top-menu' => __( 'Top Menu' ),\n 'footer-menu' => __( 'Footer Menu' )\n )\n );\n }",
"public function fxm_register_menus()\n\t\t{\n\t\t\t$locations = array(\n\t\t\t\t'primary' \t=> __('Primary Menu', 'fxm'),\n\t\t\t\t'utilities' => __('Utilities Menu', 'fxm'),\n\t\t\t\t'mobile' \t \t=> __('Mobile Hamburger Menu', 'fxm'),\n\t\t\t\t'footer' \t \t=> __('Footer Menu', 'fxm'),\n\t\t\t\t'social' \t=> __( 'Social Menu', 'twentytwenty' ),\n\t\t\t);\n\t\t\tregister_nav_menus($locations);\n\t\t}",
"function register_my_menus() {\n register_nav_menus(\n array(\n 'header-menu' => __( 'Header Menu' ),\n 'footer-menu' => __( 'Footer Menu' ),\n\t 'topbar-menu' => __( 'Topbar Menu' )\n )\n );\n}",
"function elzero_add_menu() {\n // register_nav_menu('manin-menu', __('Main Navigation Menu'));\n register_nav_menus(array(\n 'main-menu' => 'Main Navigation Menu',\n 'footer-menu' => 'Footer Classic Menu'\n ));\n}",
"function menuConfig()\t{\n\t\tglobal $LANG;\n\t\t$this->MOD_MENU = Array (\n\t\t\t'function' => Array (\n\t\t\t\t/*'1' => $LANG->getLL('function1'),\n\t\t\t\t'2' => $LANG->getLL('function2'),\n\t\t\t\t'3' => $LANG->getLL('function3'),*/\n\t\t\t)\n\t\t);\n\t\tparent::menuConfig();\n\t}",
"function register_menus() {\n register_nav_menus(\n array(\n 'header-menu' => __( 'Menu Główne' ),\n 'photo-menu' => __( 'Photo Menu' )\n \n \n )\n );\n}",
"function register_my_menus() {\n register_nav_menus(\n array(\n 'footer-menu' => __( 'Footer Menu' ),\n 'header-menu' => __( 'Header Menu' ),\n )\n );\n }",
"function menuConfig()\t{\n\t\tglobal $LANG;\n\t\t$this->MOD_MENU = Array (\n\t\t\t'function' => Array (\n\t\t\t\t'1' => $LANG->getLL('function1'),\n\t\t\t\t'2' => $LANG->getLL('function2'),\n\t\t\t\t'3' => $LANG->getLL('function3'),\n\t\t\t)\n\t\t);\n\t\tparent::menuConfig();\n\t}",
"function register_my_menus() {\n\n\t register_nav_menus(\n\t array(\n\t 'header-menu' => __( 'Header Menu' ),\n\t 'footer-menu' => __( 'Footer Menu' ),\n\t )\n\t );\n\n\t}",
"function register_my_menus() {\n\n\tregister_nav_menus(\n\n\t\tarray(\n\n\t\t\t'header-menu' => __( 'Header Menu' )\n\n\t\t)\n\n\t);\n\n}",
"function theme_nav_menus(){\n register_nav_menus( array(\n 'main'=>'Main Menu',\n 'footer'=>'Footer Menu'\n ) );\n}",
"function register_basics_menus() {\n register_nav_menus(\n array(\n 'header-menu' => __( 'Header Menu' ),\n 'extra-menu' => __( 'Extra Menu' )\n )\n );\n}",
"function register_my_menus()\n{\n register_nav_menus(\n array(\n 'main-menu' => __('Main Menu'),\n 'footer-menu' => __('Footer Menu'),\n 'social-menu' => __('Social Menu')\n )\n );\n}",
"function register_my_menu() {\n register_nav_menu('header-menu',__( 'Header Menu' ));\n}",
"function register_my_menu() {\n register_nav_menu('main-menu',__( 'Navegador Primario' ));\n }",
"function omega_register_menus() {\n\tregister_nav_menu( 'primary', _x( 'Primary', 'nav menu location', 'omega' ) );\n}",
"function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"RAD Facility\", \"LIBRARIES\", \"_rad_facility\");\n module::set_menu($this->module, \"RAD DX Codes\", \"LIBRARIES\", \"_rad_dxcodes\");\n module::set_menu($this->module, \"RAD DX Codes\", \"LIBRARIES\", \"_rad_\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }",
"function register_menus() {\n register_nav_menu('header-menu', __('Header Menu'));\n}",
"function register_my_menus() {\n register_nav_menus(\n array(\n 'primary-menu' => __( 'Primary Menu' ),\n 'footer-menu' => __( 'Footer Menu' )\n )\n );\n}",
"function theme_nav_menus(){\n\t register_nav_menus( array(\n\t 'main'=>'Main Menu',\n\t 'footer'=>'Footer Menu'\n\t ) );\n\t}",
"function register_po_nav_menus() {\n\n $locations = array(\n 'main-navi' => __( 'Site main navigations', 'text_domain' ),\n 'footer-link' => __( 'Site secondary links', 'text_domain' ),\n 'cart-link' => __( 'Cart links', 'text_domain' ),\n 'socmed-link' => __( 'Social media links', 'text_domain' )\n );\n register_nav_menus( $locations );\n}",
"function urbanfitness_menus()\n{\n // Wordpress Function\n //registering menu we created\n //pass in a associative array\n register_nav_menus([\n 'main-menu' => 'Main Menu',\n ]);\n}",
"function mkRegisterMenu() {\n \n register_nav_menu('primary', 'Main Menu');\n \n }",
"function register_my_menu() {\n register_nav_menu( 'main', __( 'Main' ) );\n register_nav_menu( 'footer', __( 'Footer' ) ); \n}",
"function register_my_menus() {\n register_nav_menus (\n array(\n 'top-menu' => 'Top menu'\n )\n );\n}",
"function h_add_menu(string $title, array $args) {\n h_add_menus([\n $title => $args\n ]);\n}",
"function register_my_menus() {\n register_nav_menus(\n array('header-menu' => __('Header Menu'),\n 'secondary-menu' => 'secondary menu'\n )\n );\n}",
"function register_my_menus() {\n\tregister_nav_menus(\n\t\tarray(\n\t\t\t'header-menu' => __( 'Header Menu' )\n\t\t\t)\n\t);\n}",
"function register_my_menus() {\n\tregister_nav_menus(\n\t\tarray(\n\t\t\t'header-menu' => __( 'Header Menu' )\n\t\t\t)\n\t);\n}",
"function setup_menus() {\n\t$icon = '';\n\tadd_menu_page('Site Features', 'Site Features', 'publish_pages', 'pop_site_features', '', $icon, 36);\n\tadd_submenu_page('pop_site_features','','','publish_pages','pop_site_features','homepage_touts_page');\n\tadd_submenu_page('pop_site_features', 'Homepage Features', 'Homepage Features', 'publish_pages', 'pop_homepage_features', 'homepage_features_page');\n\tadd_submenu_page('pop_site_features', 'Homepage Ticker', 'Homepage Ticker', 'publish_pages', 'pop_homepage_ticker', 'homepage_ticker_page');\n\tadd_submenu_page('pop_site_features', 'Homepage Touts', 'Homepage Touts', 'publish_pages', 'pop_homepage_touts', 'homepage_touts_page');\n\tadd_submenu_page('pop_site_features', 'Movement Touts', 'Movement Touts', 'publish_pages', 'pop_movement_touts', 'movement_touts_page');\n\tadd_submenu_page('pop_site_features', 'PoP & Local Events', 'PoP & Local Events', 'publish_pages', 'pop_events', 'movement_events_page');\n\tadd_submenu_page('pop_site_features', 'Season of 1000', 'Season of 1000 Promises', 'publish_pages', 'season1000', 'season_1000_page');\n}",
"function zweidrei_eins_menus() {\n\n\t$locations = array(\n\t\t'header' => __( 'Header Menu'),\n\t\t'footer' => __( 'Footer Menu'),\n );\n\n\tregister_nav_menus( $locations );\n}",
"function pantomime_register_menu(){\n\tif ( function_exists( 'register_nav_menus' ) ) {\n\t\tregister_nav_menus(\n\t\t\tarray(\n\t\t\t 'main_nav' => 'Main Navigation'\n\t\t\t)\n\t\t);\n\t}\t\n}",
"function tarful_register_menus() {\n register_nav_menus(\n array(\n 'credits-1' => __( 'Footer IZQ' ),\n 'credits-2' => __( 'Footer CTR' ),\n 'credits-3' => __( 'Footer DER' )\n )\n );\n}",
"public function menuConfig() {\r\n $this->MOD_MENU = array(\r\n 'function' => array(\r\n '1' => $GLOBALS['LANG']->getLL('function1')\r\n )\r\n );\r\n parent::menuConfig();\r\n }",
"function add_menu() {\n // Add \"Telegram Bot\" menu\n $telegram_logo = \"https://upload.wikimedia.org/wikipedia/commons/8/82/Telegram_logo.svg\";\n add_menu_page(\"Telegram Bot\", \"Telegram Bot\", 4, sanitize_key(\"home\"), \"plugin_home_page\", $telegram_logo);\n \n // Add \"Admin panel\" submenu\n add_submenu_page(sanitize_key(\"home\"), \"Admin panel\", \"Admin panel\", 4, sanitize_key(\"admin\"), \"plugin_admin_panel_page\");\n}",
"function get_registered_nav_menus()\n {\n }",
"function supreme_register_menus() {\r\n\r\n\t/* Get theme-supported menus. */\r\n\t$menus = get_theme_support( 'supreme-core-menus' );\r\n\r\n\t/* If there is no array of menus IDs, return. */\r\n\tif ( !is_array( $menus[0] ) )\r\n\t\treturn;\r\n\r\n\t/* Register the 'primary' menu. */\r\n\tif ( in_array( 'primary', $menus[0] ) )\r\n\t\tregister_nav_menu( 'primary', _x( 'Primary', 'nav menu location', 'supreme-core' ) );\r\n\r\n\t/* Register the 'secondary' menu. */\r\n\tif ( in_array( 'secondary', $menus[0] ) )\r\n\t\tregister_nav_menu( 'secondary', _x( 'Secondary', 'nav menu location', 'supreme-core' ) );\r\n\r\n\t/* Register the 'subsidiary' menu. */\r\n\tif ( in_array( 'subsidiary', $menus[0] ) )\r\n\t\tregister_nav_menu( 'subsidiary', _x( 'Subsidiary', 'nav menu location', 'supreme-core' ) );\r\n\r\n\tif ( in_array( 'footer', $menus[0] ) )\r\n\t\tregister_nav_menu( 'footer', _x( 'Footer', 'nav menu location', 'supreme-core' ) );\r\n}",
"function register_nav_menus($locations = array())\n {\n }",
"private function registerMenus()\n {\n if (!isset($this->config['menus'])) {\n return;\n }\n\n $menus = $this->config['menus'];\n add_action('init', function () use ($menus) {\n register_nav_menus($menus);\n });\n }",
"function dsobletTheme_register_my_menus() {\n register_nav_menus(\n array(\n 'header-menu' => __( 'Header Menu' , 'dsobletheme'),\n 'footer-menu' => __( 'Footer Menu' , 'dsobletheme')\n )\n );\n }",
"public function writeMenu() {}",
"public function writeMenu() {}",
"public function writeMenu() {}",
"public function writeMenu() {}",
"function register_menus() { \n register_nav_menus(\n array(\n 'main-menu' => 'Main Menu', //primary menu\n )\n ); \n}",
"function register_my_menus() {\n\tregister_nav_menus(\n\t\tarray(\n\t\t\t'main-menu' => __( 'Main Menu' ),\n\t\t\t'categories-menu' => __( 'Categories Menu' )\n\t\t)\n\t);\n}",
"function register_my_menus() {\n register_nav_menus(\n array('primary' => ( 'To display menu properly please select \"Main menu\" from list below.' ))\n );\n}",
"function admin_menu()\n {\n }",
"function admin_menu()\n {\n }",
"function admin_menu()\n {\n }",
"function wpmu_menu()\n {\n }",
"function gucci_register_menus() {\n\tregister_nav_menus(\n\t\tarray( 'main-menu' => __('Main Menu') )\n\t);\n}",
"function ruven_menus() {\n\n\t$locations = array(\n\t\t'primary' => __( 'Primary Menu', 'ruven' ),\n\t\t'secondary' => __( 'Secondary Menu', 'ruven' ),\n\t);\n\n\tregister_nav_menus( $locations );\n}",
"function travomath_register_nav_menu() {\n\tregister_nav_menu( 'primary', 'Header Navigation Menu' );\n\tregister_nav_menu( 'secondary', 'Footer Navigation Menu' );\n}",
"function register_html5_menu()\n{\n register_nav_menus(array( // Using array to specify more menus if needed\n 'header-menu' => __('Header Menu', 'oh'), // Main Navigation\n 'sidebar-menu' => __('Redes sociales Menu', 'oh'), // Sidebar Navigation\n 'extra-menu' => __('Extra Menu', 'oh') // Extra Navigation if needed (duplicate as many as you need!)\n ));\n}",
"function nt_admin_menus(){\r\n\t\t// \t\t\t\t\t\t\t\t\t\t\tcallable $function = '', string $icon_url = '', int $position = null )\r\n\t\tadd_menu_page(\r\n\t\t\t__( 'Settings', 'newTheme'),\r\n\t\t\t__( 'NewTheme', 'newTheme'),\r\n\t\t\t'edit_theme_options',\r\n\t\t\t'nt_theme_options_page',\r\n\t\t\t'nt_theme_options_function'\r\n\t\t);\t\r\n\r\n\t\t//add_submenu_page( string $parent_slug, string $page_title, string $menu_title, string $capability, string $menu_slug, \r\n\t\t//\t\t\t\t\t\t\tcallable $function = '' )\r\n\t\tadd_submenu_page( \r\n\t\t\t'nt_theme_options_page', \r\n\t\t\t__( 'Settings', 'newTheme'), \r\n\t\t\t__( 'NewTheme options', 'newTheme'),\r\n\t\t\t'edit_theme_options',\r\n\t\t\t'nt_theme_options_page',\r\n\t\t\t'nt_theme_options_function'\r\n \t);\r\n\t}",
"public function makeMenu() {}",
"public function register_menu() {\n $parent_slug = 'comparrot';\n $capability = 'manage_options';\n\n add_menu_page( 'Comparrot', 'Comparrot', $capability, $parent_slug, [$this, 'import_from_csv_page'], 'dashicons-admin-page', 2 );\n\n add_submenu_page( $parent_slug, __( 'Import from CSV', 'comparrot' ), __( 'Import from CSV', 'comparrot' ), $capability, $parent_slug, [$this, 'import_from_csv_page'] );\n add_submenu_page( $parent_slug, __( 'General settings', 'comparrot' ), __( 'General settings', 'comparrot' ), $capability, 'comparrot-general-settings', [$this, 'general_settings_page'] );\n }",
"public function register_nav_menus()\n {\n \\register_nav_menus(\n array(\n 'header-menu' => __('Header Menu'),\n 'footer-menu' => __('Footer Menu'),\n 'mobile-menu' => __('Mobile Menu')\n )\n );\n }",
"function addMenu()\n{\n add_menu_page (\"Members and Email\", \"Members / Email\", 4, \"members-email-1\", \"MeMenu\" );\n add_submenu_page(\"members-email-1\", \"Email List\", \"Email\", 4, \"members-email-sub-1\", \"MeMenuSub1\");\n add_submenu_page(\"members-email-1\", \"Tracking\", \"Tracking Scripts\", 4, \"tracking-scripts-1\", \"MeMenuSub2\");\n\n\n}",
"function register_my_menus() {\n register_nav_menus(\n array( \n 'primary' => __( 'Main one page navigation' ),\n 'secondary' => __( 'Post and Page navigation' ),\n )\n );\n}",
"function register_theme_menus() {\n register_nav_menus(array(\n 'pagrindinis-menu' => __( 'Pagrindinis meniu' ),\n 'apatinis-menu' => __( 'Apatinis meniu' ),\n ));\n}",
"function registrar_menu() {\nregister_nav_menu('menuprincipal', __('Menu Principal'));\n}",
"function menuConfig() {\n global $LANG;\n $this->MOD_MENU = Array (\n \"function\" => Array (\n \"1\" => $LANG->getLL(\"overview\"),\n \"2\" => $LANG->getLL(\"new\"),\n \"3\" => $LANG->getLL(\"function3\"),\n )\n );\n parent::menuConfig();\n }",
"function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"Notifiable Diseases\", \"LIBRARIES\", \"_notifiable\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }",
"function register_menu_locations() {\n register_nav_menus(\n array(\n 'primary-menu' => __( 'Primary Menu' ),\n 'footer-menu' => __( 'Footer Menu' )\n )\n );\n }",
"function fumseck_register_menus() {\n\tregister_nav_menus(\n\t\tarray(\n\t\t\t'fumseck_top_nav' => __( 'Primary top navigation', 'fumseck' ),\n\t\t\t'fumseck_about_menu' => __( 'Menu for About page set', 'fumseck' )\n\t\t)\n\t);\n}",
"function base_registerMenus() {\n register_nav_menus(\n array(\n 'header-menu' => __( 'Header Menu' ),\n )\n );\n}",
"function skudo_menus() {\n\tregister_nav_menu('PrimaryNavigation', 'Main Navigation');\n\tregister_nav_menu('woonav', 'WooCommerce Menu');\n\tregister_nav_menu('topbarnav', 'Top Bar Navigation');\n}",
"function thiredtheme_menu_item()\n {\n register_nav_menus(\n array(\n 'header'=>__('header menu'),\n 'footer'=>__('footer menu'))); \n }",
"function mainMenu()\r\n{\r\n echo \"\\n========= MAIN MENU ============\\n\";\r\n echo \"1.root\\n2.Admin\\n3.customer\\n\";\r\n}",
"public static function menuInit()\n {\n global $menu, $submenu;\n//print_r($temp);\n// exit;\n /**\n * Menu items that need completed\n * Registrations\n * Transactions\n * Settings\n * General\n * Payment Methods\n */\n\n // Add in locations\n foreach ([\n 'event_location',\n 'event_registration',\n 'event_transaction'\n ] as $temp) {\n $temp = get_post_type_object($temp);\n\n $submenu['edit.php?post_type=event'][] = [\n $temp->labels->menu_name,\n 'manage_options',\n admin_url('edit.php?post_type=' . $temp->name)\n ];\n\n }\n\n add_submenu_page(\n 'edit.php?post_type=event',\n __('General Settings', __NAMESPACE__),\n __('General Settings', __NAMESPACE__),\n 'manage_options',\n 'general',\n ['\\\\' . __NAMESPACE__ . '\\\\PageGeneral', 'Display'],\n get_stylesheet_directory_uri('stylesheet_directory') . \"/images/media-button-other.gif\"\n );\n\n $temp = get_post_type_object('event_payment_method');\n $submenu['edit.php?post_type=event'][] = [\n $temp->labels->menu_name,\n 'manage_options',\n admin_url('edit.php?post_type=event_payment_method')\n ];\n\n\n // Easy save post handler.\n add_action('save_post', [self::$_class, 'saveHandler'], 10, 1);\n\n }",
"public function menus()\n\t{\n\t\tregister_nav_menus(array(\n\t\t\t'mega-meu'\t\t\t\t\t\t=> esc_html( 'Mega Menu', 'ema_theme' );\n\t\t));\n\t}",
"protected function generateMenu() {}",
"protected function generateMenu() {}"
] | [
"0.74238884",
"0.7394668",
"0.73642564",
"0.7254563",
"0.7161574",
"0.711063",
"0.7080793",
"0.70750135",
"0.7032471",
"0.69798905",
"0.6977202",
"0.6975457",
"0.69701535",
"0.6950045",
"0.6914154",
"0.6898178",
"0.68850607",
"0.68760854",
"0.68637747",
"0.68458474",
"0.6841207",
"0.6835323",
"0.6835097",
"0.6834599",
"0.6814243",
"0.6808267",
"0.6803869",
"0.68034714",
"0.67886496",
"0.677632",
"0.6754482",
"0.6754431",
"0.6731632",
"0.6727507",
"0.6725598",
"0.67240804",
"0.67169505",
"0.6700038",
"0.66984814",
"0.669746",
"0.6689867",
"0.6666906",
"0.6663302",
"0.66555095",
"0.665354",
"0.66520333",
"0.66429937",
"0.66306186",
"0.6627463",
"0.6622991",
"0.662176",
"0.6618084",
"0.6618084",
"0.66132367",
"0.6608904",
"0.6594385",
"0.65920866",
"0.6580905",
"0.6573988",
"0.65653104",
"0.6563904",
"0.65597194",
"0.65516305",
"0.6549512",
"0.6540989",
"0.65406793",
"0.65406793",
"0.6539228",
"0.65322566",
"0.65314484",
"0.65282476",
"0.6522754",
"0.6522754",
"0.6522754",
"0.65216786",
"0.6518756",
"0.6515436",
"0.65111905",
"0.65072215",
"0.6497039",
"0.6490233",
"0.6479706",
"0.647954",
"0.6466952",
"0.64582014",
"0.64549285",
"0.6449955",
"0.6446972",
"0.6442157",
"0.64214504",
"0.64167446",
"0.63984853",
"0.6397996",
"0.638872",
"0.6381369",
"0.63794625",
"0.6377038",
"0.6368625",
"0.6368625"
] | 0.64800274 | 81 |
Register Post Type (add imagee) | function add_image(){
add_theme_support('post-thumbnails');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ks_create_post_type() {\n\tregister_post_type( 'image-entry',\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => __( 'Comp. Entries', 'kilpailusivu' ),\n\t\t\t\t'singular_name' => __( 'Entry', 'kilpailusivu' ),\n\t\t\t\t'add_new' => __( 'Add New', 'kilpailusivu' ),\n\t\t\t\t'add_new_item' => __( 'Add New Entry', 'kilpailusivu' ),\n\t\t\t\t'edit' => __( 'Edit', 'kilpailusivu' ),\n\t\t\t\t'edit_item' => __( 'Edit Entry', 'kilpailusivu' ),\n\t\t\t\t'new_item' => __( 'New Entry', 'kilpailusivu' ),\n\t\t\t\t'view' => __( 'View', 'kilpailusivu' ),\n\t\t\t\t'view_item' => __( 'View Entry', 'kilpailusivu' ),\n\t\t\t\t'search_items' => __( 'Search Entries', 'kilpailusivu' ),\n\t\t\t\t'not_found' => __( 'No Entries found', 'kilpailusivu' ),\n\t\t\t\t'not_found_in_trash' => __( 'No Entries found in Trash', 'kilpailusivu' )\n\t\t\t),\n\t\t\t'public' => true,\n\t\t\t'hierarchical' => true,\n\t\t\t'has_archive' => true,\n\t\t\t'supports' => array(\n\t\t\t\t'title',\n\t\t\t),\n\t\t\t'menu_icon' => 'dashicons-smiley',\n\t\t\t'can_export' => true,\n\t\t\t'taxonomies' => array()\n\t\t) );\n}",
"function wpbm_register_post_type(){\n include('inc/admin/register/wpbm-register-post.php');\n register_post_type( 'WP Blog Manager', $args );\n }",
"public function register_post(): void\n {\n $args = $this->register_post_type_args();\n register_post_type($this->post_type, $args);\n }",
"function pluginprefix_setup_post_type()\n{\n register_post_type('post-nasa-gallery', [\n 'label' => 'Nasa Images Posts',\n 'public' => true\n ]);\n}",
"private function registerPostType() {\n\t global $superfood_elated_global_Framework;\n\n\t $menuPosition = 5;\n\t $menuIcon = 'dashicons-admin-post';\n\n\t if(eltd_core_theme_installed()) {\n\t\t $menuPosition = $superfood_elated_global_Framework->getSkin()->getMenuItemPosition('masonry-gallery');\n\t\t $menuIcon = $superfood_elated_global_Framework->getSkin()->getMenuIcon('masonry-gallery');\n\t }\n\n register_post_type($this->base,\n array(\n 'labels' \t\t=> array(\n 'name' \t\t\t\t=> esc_html__('Masonry Gallery', 'eltdf-core' ),\n 'all_items'\t\t\t=> esc_html__('Masonry Gallery Items', 'eltdf-core'),\n 'singular_name' \t=> esc_html__('Masonry Gallery Item', 'eltdf-core' ),\n 'add_item'\t\t\t=> esc_html__('New Masonry Gallery Item', 'eltdf-core'),\n 'add_new_item' \t\t=> esc_html__('Add New Masonry Gallery Item', 'eltdf-core'),\n 'edit_item' \t\t=> esc_html__('Edit Masonry Gallery Item', 'eltdf-core')\n ),\n 'public'\t\t=>\tfalse,\n 'show_in_menu'\t=>\ttrue,\n 'rewrite' \t\t=> \tarray('slug' => 'masonry-gallery'),\n\t\t\t\t'menu_position' => \t$menuPosition,\n 'show_ui'\t\t=>\ttrue,\n 'has_archive'\t=>\tfalse,\n 'hierarchical'\t=>\tfalse,\n 'supports'\t\t=>\tarray('title', 'thumbnail'),\n\t\t\t\t'menu_icon' => $menuIcon\n )\n );\n }",
"public function register_post_type() {\n\t\tadd_action( 'init', array( $this, 'post_registration_callback' ), 0, 0 );\n\t}",
"function register_post_types(){\n }",
"function register_post_types(){\n }",
"public static function register_post_types() {}",
"function register_post_types()\n {\n }",
"function BH_register_posttypes() {\r\n\r\n\tBH_register_posttype_event();\r\n\tBH_register_posttype_gallery();\r\n\r\n}",
"public function flo_reg_custom_post_type(){\n\t\t// call the methods that are registering the post types\n\t\t$this->flo_reg_forms_post_type();\n\t\t$this->flo_reg_entrie_post_type();\n\n\t\t$this->flo_register_form_entries_taxonomy();\n\t}",
"public function registerCustomPostTypes() {\n\n\n }",
"function thirdtheme_photo_page()\n {\n add_theme_support('post-thumbnails');\n add_image_size('medium',400,400);\n $args = array(\n 'labels' => array('name' =>__('photo page'),\n 'add_new' =>__('add new photo')),\n \n 'public' => true,\n 'menu_icon' =>'dashicons-format-image',\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title','thumbnail')); \n register_post_type('photo',$args);\n }",
"public function register_post_types() {\n\n\t}",
"function carbon_register_post_types(){\n\n // carbon_register_post_type(array(\n // 'singular' => 'Type', // required\n // 'plural' => 'Types', // required\n // 'type' => 'type', // required\n // 'slug' => 'types/type',\n // 'menu_icon' => 'dashicons-admin-post',\n // 'has_archive' => true,\n // 'exclude_from_search' => true,\n // ));\n }",
"public function register_custom_post() {\n foreach ( $this->posts as $key => $value ) {\n register_post_type( $key, $value );\n }\n }",
"function register_post_types() {\n\t}",
"function register_post_types() {\n\t}",
"public function register_post_type(){\r\n //Capitilize the words and make it plural\r\n $name = ucwords( str_replace( '_', ' ', $this->post_type_name ) );\r\n $plural = $name . 's';\r\n $menupos = $this->post_type_pos;\r\n\r\n // We set the default labels based on the post type name and plural. We overwrite them with the given labels.\r\n $labels = array_merge(\r\n\r\n // Default\r\n array(\r\n 'name' => _x( $plural, 'post type general name' ),\r\n 'singular_name' => _x( $name, 'post type singular name' ),\r\n 'add_new' => _x( 'Add New', strtolower( $name ) ),\r\n 'add_new_item' => __( 'Add New ' . $name ),\r\n 'edit_item' => __( 'Edit ' . $name ),\r\n 'new_item' => __( 'New ' . $name ),\r\n 'all_items' => __( 'All ' . $plural ),\r\n 'view_item' => __( 'View ' . $name ),\r\n 'search_items' => __( 'Search ' . $plural ),\r\n 'not_found' => __( 'No ' . strtolower( $plural ) . ' found'),\r\n 'not_found_in_trash' => __( 'No ' . strtolower( $plural ) . ' found in Trash'),\r\n 'parent_item_colon' => '',\r\n 'menu_name' => $plural\r\n ),\r\n\r\n // Given labels\r\n $this->post_type_labels\r\n\r\n );\r\n\r\n // Same principle as the labels. We set some defaults and overwrite them with the given arguments.\r\n $args = array_merge(\r\n\r\n // Default\r\n array(\r\n 'capability_type' => 'post',\r\n 'hierarchical' => false,\r\n 'label' => $plural,\r\n 'labels' => $labels,\r\n 'menu_position' => $menupos,\r\n 'public' => true,\r\n 'publicly_queryable' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array('slug' => $plural),\r\n 'show_in_nav_menus' => true,\r\n 'show_ui' => true,\r\n 'supports' => array( 'title', 'editor'),\r\n '_builtin' => false,\r\n ),\r\n\r\n // Given args\r\n $this->post_type_args\r\n\r\n );\r\n\r\n // Register the post type\r\n register_post_type( $this->post_type_name, $args );\r\n }",
"function briavers_register_image_contest(){\n $labels = array(\n 'name' => __('Image Contest', 'briavers'),\n 'singular_name' => __('Image Contest', 'briavers'),\n 'add_new' => __('Register new image for the contest', 'briavers'),\n 'all_items' => __('All images for the contest', 'briavers'),\n 'add_new_item' => __('Register new image for the contest', 'briavers'),\n 'edit_item' => __('Edit image', 'briavers'),\n 'new_item' => __('New image', 'briavers'),\n 'view_item' => __('View image', 'briavers'),\n 'search_item' => __('Search image', 'briavers'),\n 'not_found' => __('Images for the contest not found', 'briavers'),\n 'not_found_in_trash' => __('Images for the contest not found in trash', 'briavers'),\n 'parent_item_colon ' => __('Add new image for the contest', 'briavers'),\n );\n $arg = array(\n 'labels' => $labels,\n 'public' => true,\n 'has_archive' => true,\n 'publicly_queryable' => true,\n 'publicly_var' => true,\n 'rewrite' => array('slug'=> 'imageContest'),\n 'capabilty_type' => 'post',\n 'hierachical' => false,\n 'supports' => array(\n 'title',\n 'thumbnail',\n // 'custom-fields'\n ),\n\n 'menu_position' => 5,\n 'exclude_from_search' => false,\n 'show_in_rest' => true,\n 'rest_base'=>'imageContest',\n 'menu_icon' => 'dashicons-format-image'\n\n );\n\n register_post_type('image_contest', $arg);\n}",
"function function_callback_post_types()\n\t{\n\t\t$all_post_registered = get_post_types();\n\t\t#Setear a todos agregando una imagen destacada\n\t\tadd_theme_support('post-thumbnails', $all_post_registered );\n\t}",
"function create_posttype_smile() {\n\n\tregister_post_type( 'smile',\n\t\t\t\t\t array(\n\t\t\t\t\t\t 'labels' => array(\n\t\t\t\t\t\t\t 'name' => __( 'Smile Gallery' ),\n\t\t\t\t\t\t\t 'singular_name' => __( 'smile-gallery' )\n\t\t\t\t\t\t ),\n\t\t\t\t\t\t 'public' => true,\n\t\t\t\t\t\t 'has_archive' => true,\n\t\t\t\t\t\t 'rewrite' => array('slug' => 'smile-gallery'),\n\t\t\t\t\t\t 'show_in_rest' => true,\n\t\t\t\t\t\t 'supports'=> array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),\n\t\t\t\t\t )\n\t\t\t\t\t );\n}",
"function thirdtheme_room_page()\n {\n add_theme_support('post-thumbnails');\n add_image_size('room_size',268,281); \n $args = array(\n 'labels' => array('name' =>__('room page'),\n 'add_new' =>__('add new room photo')),\n \n 'public' => true,\n 'menu_icon' =>'dashicons-art',\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail','excerpt')); \n register_post_type('room',$args);\n }",
"public function registerCustomPostType()\n {\n if (!post_type_exists($this->slug)) {\n register_post_type($this->slug, $this->arguments);\n }\n }",
"function thirdtheme_custom_post_type()\n {\n $args = array(\n 'labels' => array('name' =>__(' my custom post'),\n 'singular name' =>__('my custom post')),\n 'public' => true,\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail'));\n register_post_type('custompost',$args);\n \n }",
"function registerPostTypes()\n{\n register_post_type('destination', [\n 'public' => true,\n 'label' => 'Destinations',\n 'supports' => ['title', 'editor', 'thumbnail']\n ]);\n register_post_type('review', [\n 'public' => true,\n 'label' => 'Reviews',\n 'supports' => ['title', 'editor']\n ]);\n}",
"function register_post_types(){\n\t\t\trequire('lib/custom-types.php');\n\t\t}",
"public function register_qmgt_custom_post() {\r\n\t\trequire_once( QMGT_ROOT . '/qmgt-custom-post-type.php');\r\n\t}",
"function bf_register_custom_post_type() {\r\n /* Añado las etiquetas que aparecerán en el escritorio de WordPress */\r\n\t$labels = array(\r\n\t\t'name' => _x( 'Ponentes', 'post type general name', 'text-domain' ),\r\n\t\t'singular_name' => _x( 'Ponente', 'post type singular name', 'text-domain' ),\r\n\t\t'menu_name' => _x( 'Ponentes', 'admin menu', 'text-domain' ),\r\n\t\t'add_new' => _x( 'Añadir nuevo', 'ponente', 'text-domain' ),\r\n\t\t'add_new_item' => __( 'Añadir nuevo ponente', 'text-domain' ),\r\n\t\t'new_item' => __( 'Nuevo Ponente', 'text-domain' ),\r\n\t\t'edit_item' => __( 'Editar Ponente', 'text-domain' ),\r\n\t\t'view_item' => __( 'Ver ponente', 'text-domain' ),\r\n\t\t'all_items' => __( 'Todos los ponentes', 'text-domain' ),\r\n\t\t'search_items' => __( 'Buscar ponentes', 'text-domain' ),\r\n\t\t'not_found' => __( 'No hay ponentes.', 'text-domain' ),\r\n\t\t'not_found_in_trash' => __( 'No hay ponentes en la papelera.', 'text-domain' )\r\n\t);\r\n\r\n /* Configuro el comportamiento y funcionalidades del nuevo custom post type */\r\n\t$args = array(\r\n\t\t'labels' => $labels,\r\n\t\t'description' => __( 'Descripción.', 'text-domain' ),\r\n\t\t'public' => true,\r\n\t\t'publicly_queryable' => true,\r\n\t\t'show_ui' => true,\r\n\t\t'show_in_menu' => true,\r\n\t\t'show_in_nav_menus' => true,\r\n\t\t'query_var' => true,\r\n\t\t'rewrite' => array( 'slug' => 'ponente' ),\r\n\t\t'capability_type' => 'post',\r\n\t\t'hierarchical' => false,\r\n\t\t'menu_position' => null,\r\n 'menu_icon' => 'dashicons-businessman',\r\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\r\n\t\t'show_in_rest'\t \t => true,\r\n\t\t'public' \t\t\t => true,\r\n\t\t'has_archive' \t\t => true,\r\n\t\t'taxonomies' => array('category','categoria-conferencias')\r\n\t);\r\n\r\n\tregister_post_type('ponentes', $args );\r\n}",
"public function create_post_types() {\n }",
"function gallery_init() {\n $labels = array(\n 'name' => 'Imágenes de la galería',\n 'singular_name' => 'Imagen de la galería',\n 'add_new_item' => 'New Image de la galería',\n 'edit_item' => 'Editar Imagen de la galería',\n 'new_item' => 'Nueva Imagen de la galería',\n 'view_item' => 'Ver Imagen de la galería',\n 'search_items' => 'Buscar Imágenes de la galería',\n 'not_found' => 'Imágenes de la galería noencontradas',\n 'not_found_in_trash' => 'Ninguna Imagen de la galería en la papelera'\n );\n $args = array(\n 'labels' => $labels,\n 'public' => false,\n 'show_ui' => true,\n 'supports' => array('thumbnail')\n );\n\n register_post_type( 'gallery', $args );\n}",
"function photos_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => _x( 'User Photos', 'Post Type General Name', 'twodayssss' ),\n\t\t\t'singular_name' => _x( 'User Album', 'Post Type Singular Name', 'twodayssss' ),\n\t\t\t'menu_name' => __( 'User Photos', 'twodayssss' ),\n\t\t\t'name_admin_bar' => __( 'User Photos', 'twodayssss' ),\n\t\t\t'archives' => __( 'Item Archives', 'twodayssss' ),\n\t\t\t'attributes' => __( 'Item Attributes', 'twodayssss' ),\n\t\t\t'parent_item_colon' => __( 'Parent Item:', 'twodayssss' ),\n\t\t\t'all_items' => __( 'All Items', 'twodayssss' ),\n\t\t\t'add_new_item' => __( 'Add New Item', 'twodayssss' ),\n\t\t\t'add_new' => __( 'Add New', 'twodayssss' ),\n\t\t\t'new_item' => __( 'New Item', 'twodayssss' ),\n\t\t\t'edit_item' => __( 'Edit Item', 'twodayssss' ),\n\t\t\t'update_item' => __( 'Update Item', 'twodayssss' ),\n\t\t\t'view_item' => __( 'View Item', 'twodayssss' ),\n\t\t\t'view_items' => __( 'View Items', 'twodayssss' ),\n\t\t\t'search_items' => __( 'Search Item', 'twodayssss' ),\n\t\t\t'not_found' => __( 'Not found', 'twodayssss' ),\n\t\t\t'not_found_in_trash' => __( 'Not found in Trash', 'twodayssss' ),\n\t\t\t'featured_image' => __( 'Album Cover', 'twodayssss' ),\n\t\t\t'set_featured_image' => __( 'Set album cover', 'twodayssss' ),\n\t\t\t'remove_featured_image' => __( 'Remove album cover', 'twodayssss' ),\n\t\t\t'use_featured_image' => __( 'Use as album cover', 'twodayssss' ),\n\t\t\t'insert_into_item' => __( 'Insert into item', 'twodayssss' ),\n\t\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'twodayssss' ),\n\t\t\t'items_list' => __( 'Items list', 'twodayssss' ),\n\t\t\t'items_list_navigation' => __( 'Items list navigation', 'twodayssss' ),\n\t\t\t'filter_items_list' => __( 'Filter items list', 'twodayssss' ),\n\t\t);\n\t\t$args = array(\n\t\t\t'label' => __( 'User Photos', 'twodayssss' ),\n\t\t\t'description' => __( 'Image gallery for Ultimate member Users', 'twodayssss' ),\n\t\t\t'labels' => $labels,\n\t\t\t'supports' => array( 'title','thumbnail','author'),\n\t\t\t'hierarchical' => false,\n\t\t\t'public' => false,\n\t\t\t'show_ui' => false,\n\t\t\t'show_in_menu' => false,\n\t\t\t'menu_position' => 5,\n\t\t\t'show_in_admin_bar' => true,\n\t\t\t'show_in_nav_menus' => false,\n\t\t\t'can_export' => true,\n\t\t\t'has_archive' => false,\n\t\t\t'exclude_from_search' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'capability_type' => 'page',\n\t\t);\n\t\tregister_post_type( 'um_user_photos', $args );\n\t}",
"public function createPostTypes()\n {\n }",
"function create_post_type(){\n register_post_type('recipes', [ \n 'labels' => [\n 'name' => 'Recipes', //Etikett i plural Etikett i singular\n 'singular_name' => 'Recipe', //Vad som ska stå i ”Lägg till...” knappen\n 'add_new' => 'New Recipe', //Vad som ska stå i ”Lägg till ny...” knappen\n 'add_new_item' => 'New Recipe', //Vad som ska stå i ”Ny...” länken\n 'edit_item' => 'Edit Recipe', //Vad som ska stå i ”Redigera...” länken\n 'new_item' => 'New Recipe', //Vad som ska stå i ”Ny...” länken\n 'search_items' => 'Search for Recipe', //Vad som ska stå i sökrutan i listningen\n 'not_found' => 'No Recipe Found', \n 'all_items' => 'All Recipes', //Vad som ska stå i ”Alla...” länken\n ],\n 'supports' => array( 'thumbnail' ),\n 'description' => 'The Big Tasty!', //En kort beskrivning av posttypen\n 'public' => true, //Om och hur posttypen ska visas för olika användare\n 'exclude_from_search' => false, //Om posttypens poster ska exkluderas vid sökning\n 'show_ui' => true, //Om posttypen ska kunna hanteras från admin\n 'show_in_nav_menus' => true, //Om poster av posttypen ska kunna läggas till i menyer\n 'show_in_menu' => true, //Vart posttypen ska listas i admin (vänster eller topp)\n 'show_in_admin_bar' => true, //Om posttypen ska visas i toppbar’en\n 'menu_position' => 10, //Vart i vänstermenyn posttypen ska visas\n 'hierarchical' => false, //Om poster i posttypen ska kunna ha föräldrar, likt Sidor\n 'menu_icon' => 'dashicons-food', //Ikon för posttypen\n 'supports' => array('title' , 'editor'), //Vad som ska synas när man skapar/redigerar en post \n 'taxonomies' => array('category'), //Vilka taxonomier som ska tillhöra posttypen\n 'has_archive' => true, //Om posttypen ska ha arkivsida\n 'rewrite' => [ //Hur posttypens rewrites ska hanteras...\n 'slug' => 'recipe', //Permalänkstrukturen för posttypen\n 'with_front' => true //Om permalänkarna ska låta föregås av sluggen\n ] \n ]);\n\n}",
"function create_post_type() {\r\n\r\n\tregister_post_type( 'Editorials',\r\n\t// CPT Options\r\n\t\tarray(\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => __( 'Editorials' ),\r\n\t\t\t\t'singular_name' => __( 'Editorial' )\r\n\t\t\t),\r\n\t\t\t'public' => true,\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'rewrite' => array('slug' => 'editorials'),\r\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'comments' ),\r\n \t'show_ui' => true,\r\n\t\t)\r\n\t);\r\n\tregister_post_type( 'Local news',\r\n\t// CPT Options\r\n\t\tarray(\r\n\t\t\t'labels' => array(\r\n\t\t\t\t\r\n\t\t\t\t'name' => __( 'Local news' ),\r\n\t\t\t\t'singular_name' => __( 'Local new' )\r\n\t\t\t),\r\n\t\t\t'public' => true,\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'rewrite' => array('slug' => 'local news'),\r\n\t\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'comments' ),\r\n \t'show_ui' => true,\r\n\t\t)\r\n\t);\r\n}",
"function register_post_types(){\n\t\trequire('lib/custom-types.php');\n\t}",
"public function add_custom_post_types() {\n //\n }",
"public function register_post_type(){\n\t\tif(!class_exists('CPT')) return;\n\t\n\t\t$this->post_type = new CPT(\n\t\t\tarray(\n\t\t\t 'post_type_name' => 'slide',\n\t\t\t 'singular' => 'Slide',\n\t\t\t 'plural' => 'Slides',\n\t\t\t 'slug' => 'slide'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'has_archive' \t\t\t=> \ttrue,\n\t\t\t\t'menu_position' \t\t=> \t8,\n\t\t\t\t'menu_icon' \t\t\t=> \t'dashicons-layout',\n\t\t\t\t'supports' \t\t\t\t=> \tarray('title', 'excerpt', 'content','thumbnail', 'post-formats', 'custom-fields')\n\t\t\t)\n\t\t);\n\t\t\n\t\t$labels = array('menu_name'=>'Types');\n\t\t$this->post_type->register_taxonomy('type',array(\n\t\t\t'hierarchical' => true,\n\t\t\t'public' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t\t'show_tagcloud' => true,\n\t\t),$labels);\n\t}",
"public static function register_post_type()\n {\n\n \t register_post_type( 'books',\n\t\t array(\n\t\t 'labels' => array(\n\t\t 'name' => __( 'Books' ),\n\t\t 'singular_name' => __( 'Books' )\n\t\t ),\n\t\t 'public' => true,\n\t\t 'has_archive' => false,\n\t\t )\n\t\t );\n\n }",
"function qtgallery_register_type() {\n\n\t$labelsoption = array(\n 'name' => esc_attr__(\"Gallery\",\"qt-extensions-suite\"),\n 'singular_name' => esc_attr__(\"Gallery\",\"qt-extensions-suite\"),\n 'add_new' => esc_attr__(\"Add new\",\"qt-extensions-suite\"),\n 'add_new_item' => esc_attr__(\"Add new gallery\",\"qt-extensions-suite\"),\n 'edit_item' => esc_attr__(\"Edit gallery\",\"qt-extensions-suite\"),\n 'new_item' => esc_attr__(\"New gallery\",\"qt-extensions-suite\"),\n 'all_items' => esc_attr__(\"All galleries\",\"qt-extensions-suite\"),\n 'view_item' => esc_attr__(\"View gallery\",\"qt-extensions-suite\"),\n 'search_items' => esc_attr__(\"Search gallery\",\"qt-extensions-suite\"),\n 'not_found' => esc_attr__(\"No galleries found\",\"qt-extensions-suite\"),\n 'not_found_in_trash' => esc_attr__(\"No galleries found in trash\",\"qt-extensions-suite\"),\n 'menu_name' => esc_attr__(\"Galleries\",\"qt-extensions-suite\")\n );\n\n \t$args = array(\n 'labels' => $labelsoption,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true, \n 'show_in_menu' => true, \n 'query_var' => true,\n 'rewrite' => true,\n 'capability_type' => 'page',\n 'has_archive' => true,\n 'hierarchical' => false,\n 'menu_position' => 40,\n 'menu_icon' => 'dashicons-format-gallery',\n \t'page-attributes' => false,\n \t'show_in_nav_menus' => true,\n \t'show_in_admin_bar' => true,\n \t'show_in_menu' => true,\n 'supports' => array('title','thumbnail','editor')\n \t); \n\n register_post_type( CUSTOMTYPE_GALLERY , $args );\n \n //add_theme_support( 'post-formats', array( 'gallery','status','video','audio' ) );\n\t\n\t$labels = array(\n\t\t'name' => esc_attr__( 'Gallery type',\"qt-extensions-suite\" ),\n\t\t'singular_name' => esc_attr__( 'Types',\"qt-extensions-suite\" ),\n\t\t'search_items' => esc_attr__( 'Search by type',\"qt-extensions-suite\" ),\n\t\t'popular_items' => esc_attr__( 'Popular type',\"qt-extensions-suite\" ),\n\t\t'all_items' => esc_attr__( 'All types',\"qt-extensions-suite\" ),\n\t\t'parent_item' => null,\n\t\t'parent_item_colon' => null,\n\t\t'edit_item' => esc_attr__( 'Edit Type',\"qt-extensions-suite\" ), \n\t\t'update_item' => esc_attr__( 'Update Type',\"qt-extensions-suite\" ),\n\t\t'add_new_item' => esc_attr__( 'Add New Type',\"qt-extensions-suite\" ),\n\t\t'new_item_name' => esc_attr__( 'New Type Name',\"qt-extensions-suite\" ),\n\t\t'separate_items_with_commas' => esc_attr__( 'Separate Types with commas',\"qt-extensions-suite\" ),\n\t\t'add_or_remove_items' => esc_attr__( 'Add or remove Types',\"qt-extensions-suite\" ),\n\t\t'choose_from_most_used' => esc_attr__( 'Choose from the most used Types',\"qt-extensions-suite\" ),\n\t\t'menu_name' => esc_attr__( 'Types',\"qt-extensions-suite\" ),\n\t); \n\n\t\n\n $fields = array(\n /* */ \n\t\tarray(\n\t\t\t'label' => 'Style',\n\t\t\t'class' => 'style',\n\t\t\t'id' => 'style',\n\t\t\t'type' => 'select',\n\t\t\t'options' => array(\n\t array('label' => 'Masonry','value' => 'masonry'),\n\t array('label' => 'Carousel','value' => 'carousel')\n\t )\n\t\t\t),\n\t\tarray( // Repeatable & Sortable Text inputs\n\t\t\t'label'\t=> 'Gallery', // <label>\n\t\t\t'id'\t=> 'galleryitem', // field id and name\n\t\t\t'type'\t=> 'repeatable', // type of field\n\t\t\t'sanitizer' => array( // array of sanitizers with matching kets to next array\n\t\t\t\t'featured' => 'meta_box_santitize_boolean',\n\t\t\t\t'title' => 'sanitize_text_field',\n\t\t\t\t'desc' => 'wp_kses_data'\n\t\t\t)\n\t\t\t,'repeatable_fields' => array ( // array of fields to be repeated\n\t\t\t\t'title' => array(\n\t\t\t\t\t'label' => 'Title',\n\t\t\t\t\t'id' => 'title',\n\t\t\t\t\t'type' => 'text'\n\t\t\t\t),\n\t\t\t\t'video' => array(\n\t\t\t\t\t'label' => 'Video',\n\t\t\t\t\t'id' => 'video',\n\t\t\t\t\t'description' => 'Youtube or Vimeo url',\n\t\t\t\t\t'type' => 'text'\n\t\t\t\t),\n\t\t\t\t'image' => array(\n\t\t\t\t\t'label' => 'Image',\n\t\t\t\t\t'id' => 'image',\n\t\t\t\t\t'type' => 'image'\n\t\t\t\t)\n\t\t\t)\n\t\t)\t \n );\n if(post_type_exists(CUSTOMTYPE_GALLERY)){\n if(function_exists('custom_meta_box_field')){\n $sample_box \t\t= new custom_add_meta_box(CUSTOMTYPE_GALLERY, 'Gallery details', $fields, CUSTOMTYPE_GALLERY, true );\n }\n }\n\t\n}",
"function neurovision_images() {\n \tregister_post_type( 'images', /* (http://codex.wordpress.org/Function_Reference/register_post_type) */\n \t \t// let's now add all the options for this post type\n \t\tarray('labels' => array(\n \t\t\t'name' => __('Images', 'neurovisiontheme'), /* This is the Title of the Group */\n \t\t\t'singular_name' => __('Image', 'neurovisiontheme'), /* This is the individual type */\n \t\t\t'all_items' => __('All Images', 'neurovisiontheme'), /* the all items menu item */\n \t\t\t'add_new' => __('Add New Image', 'neurovisiontheme'), /* The add new menu item */\n \t\t\t'add_new_item' => __('Add New Image', 'neurovisiontheme'), /* Add New Display Title */\n \t\t\t'edit' => __( 'Edit', 'neurovisiontheme' ), /* Edit Dialog */\n \t\t\t'edit_item' => __('Edit Image', 'neurovisiontheme'), /* Edit Display Title */\n \t\t\t'new_item' => __('New Image', 'neurovisiontheme'), /* New Display Title */\n \t\t\t'view_item' => __('View Image', 'neurovisiontheme'), /* View Display Title */\n \t\t\t'search_items' => __('Search Images', 'neurovisiontheme'), /* Search Custom Type Title */\n \t\t\t'not_found' => __('Nothing found in the Database.', 'neurovisiontheme'), /* This displays if there are no entries yet */\n \t\t\t'not_found_in_trash' => __('Nothing found in Trash', 'neurovisiontheme'), /* This displays if there is nothing in the trash */\n \t\t\t'parent_item_colon' => ''\n \t\t\t), /* end of arrays */\n \t\t\t'description' => __( 'neurovision Images', 'neurovisiontheme' ), /* Custom Type Description */\n\n \t\t\t'public' => true,\n \t\t\t'publicly_queryable' => true,\n \t\t\t'exclude_from_search' => false,\n \t\t\t'show_ui' => true,\n \t\t\t'query_var' => true,\n \t\t\t'menu_position' => 6, /* this is what order you want it to appear in on the left hand side menu */\n \t\t\t'menu_icon' => 'dashicons-format-image', /* the icon for the custom post type menu */\n \t\t\t'rewrite'\t=> array( 'slug' => 'images', 'with_front' => false ), /* you can specify its url slug */\n \t\t\t'has_archive' => true, /* you can rename the slug here */\n \t\t\t'capability_type' => 'post',\n \t\t\t'hierarchical' => false,\n \t\t\t/* the next one is important, it tells what's enabled in the post editor */\n \t\t\t'supports' => array( 'title', 'editor', 'page-attributes', 'thumbnail')\n \t \t) /* end of options */\n \t); /* end of register post type */\n\n }",
"public function register_post_type()\n {\n $labels = [\n 'name' => _x('Chiro Quizzes', 'post type general name', $this->token),\n 'singular_name' => _x('Chiro Quiz', 'post type singular name', $this->token),\n 'add_new' => _x('Add New', $this->token, $this->token),\n 'add_new_item' => sprintf(__('Add New %s', $this->token), __('Chiro Quiz', $this->token)),\n 'edit_item' => sprintf(__('Edit %s', $this->token), __('Chiro Quiz', $this->token)),\n 'new_item' => sprintf(__('New %s', $this->token), __('Chiro Quiz', $this->token)),\n 'all_items' => sprintf(__('All %s', $this->token), __('Chiro Quizzes', $this->token)),\n 'view_item' => sprintf(__('View %s', $this->token), __('Chiro Quiz', $this->token)),\n 'search_items' => sprintf(__('Search %a', $this->token), __('Chiro Quizzes', $this->token)),\n 'not_found' => sprintf(__('No %s Found', $this->token), __('Chiro Quizzes', $this->token)),\n 'not_found_in_trash' => sprintf(__('No %s Found In Trash', $this->token), __('Chiro Quizzes', $this->token)),\n 'parent_item_colon' => '',\n 'menu_name' => __('Chiro Quizzes', $this->token)\n ];\n\n $slug = __('chiro-quiz', 'pf_chiro_quiz');\n $custom_slug = get_option('pf_chiro_quiz_slug');\n if ($custom_slug && strlen($custom_slug) > 0 && $custom_slug != '') {\n $slug = $custom_slug;\n }\n\n $args = [\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'exclude_from_search' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => ['slug' => $slug],\n 'capability_type' => 'post',\n 'has_archive' => false,\n 'hierarchical' => false,\n 'supports' => ['title'],\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-admin-quiz'\n ];\n\n register_post_type($this->token, $args);\n }",
"function create_post_type() {\r\n register_post_type( 'nyheter',\r\n array(\r\n 'labels' => array(\r\n 'name' => __( 'Nyheter' ),\r\n 'singular_name' => __( 'Nyheter' )\r\n ),\r\n 'public' => true,\r\n 'has_archive' => true,\r\n 'supports' => array('title', 'editor', 'thumbnail')\r\n )\r\n );\r\n}",
"static function register_post_type() {\n\n $args = array(\n 'labels' => array(\n\t\t'name' => __( 'Forms', 'pwp' ),\n\t\t'singular_name' => __( 'Form', 'pwp' ),\n\t\t'add_new' => __( 'Add New', 'pwp' ),\n\t\t'add_new_item' => __( 'Add New Form', 'pwp' ),\n\t\t'edit_item' => __( 'Edit Form', 'pwp' ),\n\t\t'new_item' => __( 'New Form', 'pwp' ),\n\t\t'all_items' => __( 'All Forms', 'pwp' ),\n\t\t'view_item' => __( 'View Form', 'pwp' ),\n\t\t'search_items' => __( 'Search Forms', 'pwp' ),\n\t\t'not_found' => __( 'No forms found', 'pwp' ),\n\t\t'not_found_in_trash' => __( 'No forms found in Trash', 'pwp' ),\n\t\t'parent_item_colon' => __( ':', 'pwp' ),\n\t\t'menu_name' => __( 'Forms', 'pwp' )\n\t ),\n 'public' => false,\n 'show_ui' => true,\n 'query_var' => false,\n 'supports' => array( 'title', 'custom-fields', 'editor' )\n );\n\tregister_post_type( 'form', $args );\n }",
"function compendium_register_type($slug, $name, $pname, $dicon) {\n $pt_slug = $slug;\n $tax_slug = $slug . '-category';\n\n register_post_type($pt_slug, array(\n 'labels' => array(\n 'name' => $pname,\n 'singular_name' => $name,\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New '.$name,\n 'edit_item' => 'Edit '.$name,\n 'new_item' => 'New '.$name,\n 'view_item' => 'View '.$name,\n 'search_items' => 'Search '.$pname,\n 'not_found' => 'No '.$pname.' found',\n 'not_found_in_trash' => 'No '.$pname.' found in trash',\n ),\n 'public' => true,\n 'menu_position' => 35,\n 'supports' => array('title','editor','thumbnail','excerpt'),\n 'menu_icon' => $dicon,\n 'rewrite' => array(\n 'slug' => 'resource-center/' . $pt_slug,\n 'with_front' => true\n ),\n ));\n\n register_taxonomy($tax_slug, $pt_slug, array(\n 'labels' => array(\n 'name' => 'Categories',\n 'singular_name' => 'Category',\n ),\n 'hierarchical' => true,\n ));\n}",
"protected function register_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => __( 'geopin', 'geopin-post-type' ),\n\t\t\t'singular_name' => __( 'geopin Member', 'geopin-post-type' ),\n\t\t\t'add_new' => __( 'Add geopin', 'geopin-post-type' ),\n\t\t\t'add_new_item' => __( 'Add geopin', 'geopin-post-type' ),\n\t\t\t'edit_item' => __( 'Edit geopin', 'geopin-post-type' ),\n\t\t\t'new_item' => __( 'New geopin', 'geopin-post-type' ),\n\t\t\t'view_item' => __( 'View geopin', 'geopin-post-type' ),\n\t\t\t'search_items' => __( 'Search geopin', 'geopin-post-type' ),\n\t\t\t'not_found' => __( 'No geopins found', 'geopin-post-type' ),\n\t\t\t'not_found_in_trash' => __( 'No geopins in the trash', 'geopin-post-type' ),\n\t\t);\n\n\t\t$supports = array(\n\t\t\t'title',\n\t\t\t// 'editor',\n\t\t\t'thumbnail',\n\t\t\t// 'custom-fields',\n\t\t\t// 'revisions',\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'supports' => $supports,\n\t\t\t'public' => true,\n\t\t\t'capability_type' => 'post',\n\t\t\t'rewrite' => array( 'slug' => 'geopin', ), \n\t\t\t'menu_position' => 5,\n\t\t\t'menu_icon' => 'dashicons-admin-site',\n\t\t);\n\n\t\t$args = apply_filters( 'geoPin_post_type_args', $args );\n\n\t\tregister_post_type( $this->post_type, $args );\n\t}",
"function register_post_type(){\n \n $capability = acf_get_setting('capability');\n \n if(!acf_get_setting('show_admin'))\n $capability = false;\n \n register_post_type($this->post_type, array(\n 'label' => 'Options Page',\n 'description' => 'Options Page',\n 'labels' => array(\n 'name' => 'Options Pages',\n 'singular_name' => 'Options Page',\n 'menu_name' => 'Options Pages',\n 'edit_item' => 'Edit Options Page',\n 'add_new_item' => 'New Options Page',\n ),\n 'supports' => array('title'),\n 'hierarchical' => true,\n 'public' => false,\n 'show_ui' => true,\n 'show_in_menu' => 'edit.php?post_type=acf-field-group',\n 'menu_icon' => 'dashicons-layout',\n 'show_in_admin_bar' => false,\n 'show_in_nav_menus' => false,\n 'can_export' => false,\n 'has_archive' => false,\n 'rewrite' => false,\n 'exclude_from_search' => true,\n 'publicly_queryable' => false,\n 'capabilities' => array(\n 'publish_posts' => $capability,\n 'edit_posts' => $capability,\n 'edit_others_posts' => $capability,\n 'delete_posts' => $capability,\n 'delete_others_posts' => $capability,\n 'read_private_posts' => $capability,\n 'edit_post' => $capability,\n 'delete_post' => $capability,\n 'read_post' => $capability,\n ),\n 'acfe_admin_orderby' => 'title',\n 'acfe_admin_order' => 'ASC',\n 'acfe_admin_ppp' => 999,\n ));\n \n }",
"private function register_post_type() {\n\t\t\t// register the post type\n\t\t\t$args = array('label' => __('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t'description' => '',\n\t\t\t\t\t\t\t\t\t\t'public' => false,\n\t\t\t\t\t\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t\t\t\t\t\t'show_in_menu' => true,\n\t\t\t\t\t\t\t\t\t\t'capability_type' => 'post',\n\t\t\t\t\t\t\t\t\t\t'map_meta_cap' => true,\n\t\t\t\t\t\t\t\t\t\t'hierarchical' => false,\n\t\t\t\t\t\t\t\t\t\t'rewrite' => array('slug' => $this->post_type, 'with_front' => false),\n\t\t\t\t\t\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t\t\t\t\t\t'exclude_from_search' => true,\n\t\t\t\t\t\t\t\t\t\t'menu_position' => 100,\n\t\t\t\t\t\t\t\t\t\t'menu_icon' => 'dashicons-admin-generic',\n\t\t\t\t\t\t\t\t\t\t'supports' => array('title','custom-fields','revisions'),\n\t\t\t\t\t\t\t\t\t\t'labels' => array('name' => __('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'singular_name' => __('Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'menu_name' =>\t__('Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'add_new' => __('Add Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'add_new_item' => __('Add New Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'edit' => __('Edit', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'edit_item' => __('Edit Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'new_item' => __('New Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'view' => __('View Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'view_item' => __('View Options Page', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'search_items' => __('Search Options Pages', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'not_found' => __('No Options Pages Found', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'not_found_in_trash' => __('No Options Pages Found in Trash', $this->text_domain),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'parent' => __('Parent Options Page', $this->text_domain)));\n\t\t\tregister_post_type($this->post_type, $args);\n\t\t}",
"function add_config_post_type() {\n\t\t\n\t\t$labels = array(\n 'name' => _x( 'Công trình', 'Post Type General Name'),\n 'singular_name' => _x( 'Công trình', 'Post Type Singular Name'),\n 'menu_name' => __( 'Công trình'),\n 'name_admin_bar' => __( 'Công trình'),\n 'archives' => __( 'Item Archives'),\n 'attributes' => __( 'Item Attributes'),\n 'parent_item_colon' => __( 'Parent Item:'),\n 'all_items' => __( 'Tất cả công trình'),\n 'add_new_item' => __( 'Add công trình'),\n 'add_new' => __( 'Thêm công trình'),\n 'new_item' => __( 'Thêm mới'),\n 'edit_item' => __( 'Chỉnh sửa'),\n 'update_item' => __( 'Cập nhật'),\n 'view_item' => __( 'View Item'),\n 'view_items' => __( 'View Items'),\n 'search_items' => __( 'Search Item'),\n 'not_found' => __( 'Not found'),\n 'not_found_in_trash' => __( 'Not found in Trash'),\n 'featured_image' => __( 'Featured Image'),\n 'set_featured_image' => __( 'Set featured image'),\n 'remove_featured_image' => __( 'Remove featured image'),\n 'use_featured_image' => __( 'Use as featured image'),\n 'insert_into_item' => __( 'Insert into item'),\n 'uploaded_to_this_item' => __( 'Uploaded to this item'),\n 'items_list' => __( 'Bản ghi'),\n 'items_list_navigation' => __( 'Items list navigation'),\n 'filter_items_list' => __( 'Filter items list'),\n );\n $args = array(\n 'label' => __( 'Công trình'),\n 'description' => __( 'Công trình'),\n 'labels' => $labels,\n 'supports' => array( 'title','editor','revisions','thumbnail','author'),\n 'taxonomies' => array('category'),\n 'hierarchical' => true,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'post',\n // 'rewrite' => array( 'slug' => 'danhsach' ),\n 'query_var' => true,\n 'menu_icon' => 'dashicons-admin-home'\n );\n register_post_type( 'estate', $args );\n \n }",
"function products_type() {\n\n $labels = array(\n 'name' => 'Productos',\n 'singular_name' => 'Producto',\n 'menu_name' => 'Productos',\n );\n\n $args = array(\n 'label' => 'Productos',\n 'description' => 'Productos de Platzi',\n 'labels' => $labels,\n 'supports' => array('title', 'editor', 'thumbnail', 'revisions'),\n 'public' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-cart',\n 'can_export' => true,\n 'publicly' => true,\n 'rewrite' => true,\n 'show_in_rest' => true,\n );\n\n register_post_type('producto', $args);\n}",
"public static function register_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Collections', 'post type general name', 'wp-recipe-maker-premium' ),\n\t\t\t'singular_name' => _x( 'Collection', 'post type singular name', 'wp-recipe-maker-premium' ),\n\t\t);\n\n\t\t$args = apply_filters( 'wprm_recipe_collections_post_type_arguments', array(\n\t\t\t'labels' \t=> $labels,\n\t\t\t'public' \t=> false,\n\t\t\t'rewrite' \t=> false,\n\t\t\t'capability_type' \t=> 'post',\n\t\t\t'query_var' \t=> false,\n\t\t\t'has_archive' \t=> false,\n\t\t\t'supports' \t\t\t\t=> array( 'title', 'author' ),\n\t\t\t'show_in_rest'\t\t\t=> true,\n\t\t\t'rest_base'\t\t\t\t=> WPRMPRC_POST_TYPE,\n\t\t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n\t\t));\n\n\t\tregister_post_type( WPRMPRC_POST_TYPE, $args );\n\t}",
"public function register()\n {\n $args = apply_filters( $this->name.'_post_type_config', $this->config );\n $args['labels'] = apply_filters( $this->name.'_post_type_labels', $this->labels);\n\n register_post_type( $this->name, $args );\n }",
"function rng_create_post_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Post Types Plural', 'Post Type General Name', 'translate_name' ),\n\t\t'singular_name' => _x( 'Post Type Singular', 'Post Type Singular Name', 'translate_name' ),\n\t\t'menu_name' => __( 'Post Types', 'translate_name' ),\n\t\t'name_admin_bar' => __( 'Post Type', 'translate_name' ),\n\t\t'archives' => __( 'Item Archives', 'translate_name' ),\n\t\t'attributes' => __( 'Item Attributes', 'translate_name' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'translate_name' ),\n\t\t'all_items' => __( 'All Items', 'translate_name' ),\n\t\t'add_new_item' => __( 'Add New Item', 'translate_name' ),\n\t\t'add_new' => __( 'Add New', 'translate_name' ),\n\t\t'new_item' => __( 'New Item', 'translate_name' ),\n\t\t'edit_item' => __( 'Edit Item', 'translate_name' ),\n\t\t'update_item' => __( 'Update Item', 'translate_name' ),\n\t\t'view_item' => __( 'View Item', 'translate_name' ),\n\t\t'view_items' => __( 'View Items', 'translate_name' ),\n\t\t'search_items' => __( 'Search Item', 'translate_name' ),\n\t\t'not_found' => __( 'Not found', 'translate_name' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'translate_name' ),\n\t\t'featured_image' => __( 'Featured Image', 'translate_name' ),\n\t\t'set_featured_image' => __( 'Set featured image', 'translate_name' ),\n\t\t'remove_featured_image' => __( 'Remove featured image', 'translate_name' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'translate_name' ),\n\t\t'insert_into_item' => __( 'Insert into item', 'translate_name' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'translate_name' ),\n\t\t'items_list' => __( 'Items list', 'translate_name' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'translate_name' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'translate_name' ),\n\t);\n\t$args = array(\n 'public' => true,\n\t\t'label' => __( 'Post Type Singular', 'translate_name' ),\n\t\t'description' => __( 'Post Type Description', 'translate_name' ),\n 'labels' => $labels,\n 'exclude_from_search' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_menu'\t\t\t=> true,\n\t\t'show_in_admin_bar'\t\t=> true,\n\t\t'menu_position'\t\t\t=> 5,\n\t\t// 'menu_icon' \t\t\t=> get_bloginfo('template_directory') . '/images/portfolio-icon.png',\n\t\t'menu_icon'\t\t\t\t=> 'dashicon-groups',\n\t\t'has_archive'\t\t\t=> true,\n\t\t'capability_type'\t\t=> array('book','books'),\n\t\t'capabilities' \t\t\t=> array(\n\t\t\t'edit_post' => 'edit_book', \n\t\t\t'read_post' => 'read_book', \n\t\t\t'delete_post' => 'delete_book', \n\t\t\t'edit_posts' => 'edit_books', \n\t\t\t'edit_others_posts' => 'edit_others_books', \n\t\t\t'publish_posts' => 'publish_books', \n\t\t\t'read_private_posts' => 'read_private_books', \n\t\t\t'create_posts' => 'edit_books', \n\t\t),\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'page-attributes', 'post-formats' ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t\t'hierarchical' => true,\n\t);\n\tregister_post_type( 'book', $args );\n\n}",
"public function register_post_type() {\n\t $args = array(\n\t\t\t'public' => true,\n\t\t\t'label' => 'Questions'\n\t\t);\n\t register_post_type( 'questions', $args );\n\t}",
"public function register_post_type() {\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Movies', 'Post type general name', 'plugintest' ),\n\t\t\t'singular_name' => _x( 'Movie', 'Post type singular name', 'plugintest' ),\n\t\t\t'menu_name' => _x( 'Movies', 'Admin Menu text', 'plugintest' ),\n\t\t\t'name_admin_bar' => _x( 'Movie', 'Admin Menu Toolbar text', 'plugintest' ),\n\t\t\t'add_new' => __( 'Add New', 'plugintest' ),\n\t\t\t'add_new_item' => __( 'Add New Movie', 'plugintest' ),\n\t\t\t'new_item' => __( 'Aaaaaa', 'plugintest' ),\n\t\t\t'view_item' => __( 'View Movie', 'plugintest' ),\n\t\t\t'edit_item' => __( 'Edit Movie', 'plugintest' ),\n\t\t\t'all_items' => __( 'All Movies', 'plugintest' ),\n\t\t\t'search_items' => __( 'Search Movies', 'plugintest' ),\n\t\t\t'parent_item_colon' => __( 'Parent Movies', 'plugintest' ),\n\t\t\t'not_found' => __( 'No Movies found.', 'plugintest' ),\n\t\t\t'not_found_in_trash' => __( 'No Movies found in Trash.', 'plugintest' ),\n\t\t\t'featured_image' => _x( 'Movie Cover Image', 'Overrides the “Featured Image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'set_featured_image' => _x( 'Set cover image', 'Overrides the “Set featured image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'remove_featured_image' => _x( 'Remove cover image', 'Overrides the “Remove featured image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'use_featured_image' => _x( 'Use as cover image', 'Overrides the “Use as featured image” phrase for this post type. Added in 4.3', 'plugintest' ),\n\t\t\t'item_published' => __( 'New Movie Published.', 'plugintest' ),\n\t\t\t'item_updated' => __( 'Movie post updated.', 'plugintest' ),\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => array( 'slug' => 'movie' ),\n\t\t\t'capability_type' => 'post',\n\t\t\t'hierarchical' => false,\n\t\t\t'has_archive' => true,\n\t\t\t'menu_position' => null,\n\t\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\n\t\t\t'taxonomies' => array( 'category', 'post_tag' ), // Using wordpess category and tags.\n\t\t);\n\n\t\tregister_post_type( 'movie', $args );\n\t\tflush_rewrite_rules();\n\n\t\t$category_labels = array(\n\t\t\t'name' => esc_html__( 'Movies Categories', 'plugintest' ),\n\t\t\t'singular_name' => esc_html__( 'Movie Category', 'plugintest' ),\n\t\t\t'all_items' => esc_html__( 'Movies Categories', 'plugintest' ),\n\t\t\t'parent_item' => null,\n\t\t\t'parent_item_colon' => null,\n\t\t\t'edit_item' => esc_html__( 'Edit Category', 'plugintest' ),\n\t\t\t'update_item' => esc_html__( 'Update Category', 'plugintest' ),\n\t\t\t'add_new_item' => esc_html__( 'Add New Movie Category', 'plugintest' ),\n\t\t\t'new_item_name' => esc_html__( 'New Movie Name', 'plugintest' ),\n\t\t\t'menu_name' => esc_html__( 'Genre', 'plugintest' ),\n\t\t\t'search_items' => esc_html__( 'Search Categories', 'plugintest' ),\n\t\t);\n\n\t\t$category_args = array(\n\t\t\t'hierarchical' => false,\n\t\t\t'public' => true,\n\t\t\t'labels' => $category_labels,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'rewrite' => array( 'slug' => 'genre' ),\n\t\t);\n\n\t\tregister_taxonomy( 'genre', array( self::$post_type ), $category_args );\n\t}",
"public static function register_post_type() {\n\t\tregister_post_type( 'drsa_ad', self::arguments() );\n\t}",
"function add_my_custom_posttype_recepten(){\n //LABELS DIFINIËREN\n $labels = array(\n 'add_new' => 'Voeg nieuw recept toe',\n 'add_new_item' => 'Voeg nieuw recept toe',\n 'name' => 'Recepten',\n 'singular_name' => 'recept',\n );\n //ARGUMENTEN DIFINIËREN\n $args = array(\n 'labels' => $labels, // de array labels van hier boven linken aan het argument labels\n 'Description' => 'Lactosevrije recepten van B & J',\n 'public' => true,\n 'menu_position' => 4,\n 'menu_icon' => 'dashicons-book-alt', //Een icoon kiezen\n 'supports' => array('title', 'editor', 'thumbnail', 'page-attributes', 'comments'), \n 'has_archive' => true, //Maak een archief aan (opsomming van alle elementen), anders gaan we archive-recepten.php nooit kunnen aanspreken.\n 'show_in_nav_menus' => TRUE,\n\n );\n\n register_post_type( 'recepten', $args ); \n \n }",
"function gallery_post_type() {\n\n $labels = array(\n 'name' => _x( 'Galerías', 'Post Type General Name', 'text_domain' ),\n 'singular_name' => _x( 'Galería', 'Post Type Singular Name', 'text_domain' ),\n 'menu_name' => __( 'Galerías', 'text_domain' ),\n 'name_admin_bar' => __( 'Galería', 'text_domain' ),\n 'archives' => __( 'Archivo de Galerías', 'text_domain' ),\n 'parent_item_colon' => __( 'Galería superior:', 'text_domain' ),\n 'all_items' => __( 'Todas las Galerías', 'text_domain' ),\n 'add_new_item' => __( 'Agregar Galería nueva', 'text_domain' ),\n 'add_new' => __( 'Agregar nueva', 'text_domain' ),\n 'new_item' => __( 'Galería nueva', 'text_domain' ),\n 'edit_item' => __( 'Editar Galería', 'text_domain' ),\n 'update_item' => __( 'Actualizar Galería', 'text_domain' ),\n 'view_item' => __( 'Ver Galería', 'text_domain' ),\n 'search_items' => __( 'Buscar Galería', 'text_domain' ),\n 'not_found' => __( 'No encontrado', 'text_domain' ),\n 'not_found_in_trash' => __( 'No encontrado en la papelera', 'text_domain' ),\n 'featured_image' => __( 'Imagen destacada', 'text_domain' ),\n 'set_featured_image' => __( 'Establecer imagen destacada', 'text_domain' ),\n 'remove_featured_image' => __( 'Quitar imagen destacada', 'text_domain' ),\n 'use_featured_image' => __( 'Usar como imagen destacada', 'text_domain' ),\n 'insert_into_item' => __( 'Insertar en Galería', 'text_domain' ),\n 'uploaded_to_this_item' => __( 'Cargar en esta Galería', 'text_domain' ),\n 'items_list' => __( 'Lista de Galerías', 'text_domain' ),\n 'items_list_navigation' => __( 'Navegar lista de Galerías', 'text_domain' ),\n 'filter_items_list' => __( 'Filtrar lista de Galerías', 'text_domain' ),\n );\n $rewrite = array(\n 'slug' => 'galeria',\n 'with_front' => true,\n 'pages' => true,\n 'feeds' => true,\n );\n $args = array(\n 'label' => __( 'Galería', 'text_domain' ),\n 'description' => __( 'Galerías de fotos & videos', 'text_domain' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail', ),\n 'taxonomies' => array( 'artistas' ),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-format-gallery',\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => true, \n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'rewrite' => $rewrite,\n 'capability_type' => 'page',\n );\n register_post_type( 'gallery', $args );\n\n}",
"public function register_custom_post_type() {\n $labels = array (\n 'name' => __('Custom', self::$plugin_obj->class_name ),\n 'singular_name' => __('item', self::$plugin_obj->class_name ),\n 'add_new' => __('new item', self::$plugin_obj->class_name ),\n 'add_new_item' => __('new item', self::$plugin_obj->class_name ),\n 'new_item' => __('new item', self::$plugin_obj->class_name ),\n 'edit' => __('edit item', self::$plugin_obj->class_name ),\n 'edit_item' => __('edit item', self::$plugin_obj->class_name ),\n 'view' => __('view item', self::$plugin_obj->class_name ),\n 'view_item' => __('view item', self::$plugin_obj->class_name ),\n 'search_items' => __('search item', self::$plugin_obj->class_name ),\n 'not_found' => __('no item found', self::$plugin_obj->class_name ),\n 'not_found_in_trash' => __('no item in trash', self::$plugin_obj->class_name ),\n 'parent' => __('parent item', self::$plugin_obj->class_name )\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => TRUE,\n 'publicly_queryable' => TRUE,\n 'show_ui' => TRUE,\n 'show_in_menu' => TRUE,\n 'query_var' => TRUE,\n 'capability_type' => 'page',\n 'has_archive' => TRUE,\n 'hierarchical' => TRUE,\n 'exclude_from_search' => FALSE,\n 'menu_position' => 100 ,\n 'supports' => array('title','editor','excerpt','custom-fields','revisions','thumbnail','page-attributes'),\n 'taxonomies' => array('category','post_tag')\n );\n\n register_post_type('custom', $args);\n }",
"function register_post_metabox( $id,$title,$post_type) {\r\n\t\t$this->has_post_meta = true;\r\n\t\tadd_meta_box( \r\n\t\t\t$id, \r\n\t\t\t$title, \r\n\t\t\tarray(&$this,'post_meta_builder'), \r\n\t\t\t$post_type, \r\n\t\t\t'normal', \r\n\t\t\t'high', \r\n\t\t\t$this->postmeta[$post_type][$id] \r\n\t\t);\r\n\t}",
"function planoType() {\r\n\t$labels = array(\r\n\t\t'name' => _x('Planos', 'post type general name'),\r\n\t 'singular_name' => _x('Plano', 'post type singular name'),\r\n\t 'add_new' => _x('Adicionar Novo', 'slideshow item'),\r\n\t 'add_new_item' => __('Adicionar Novo Plano'),\r\n\t 'edit_item' => __('Editar Plano'),\r\n\t 'new_item' => __('Novo Plano'),\r\n\t 'view_item' => __('Ver Plano'),\r\n\t 'search_items' => __('Procurar Plano'),\r\n\t 'not_found' => __('Nenhum Plano Encontrado'),\r\n\t 'not_found_in_trash' => __('Nenhum Plano na Lixeira'),\r\n\t 'parent_item_colon' => ''\r\n\t);\r\n\r\n $args = array(\r\n 'labels' => $labels,\r\n 'public' => true,\r\n 'publicly_queryable' => true,\r\n 'show_ui' => true,\r\n 'query_var' => true,\r\n 'rewrite' => true,\r\n 'capability_type' => 'post',\r\n 'hierarchical' => false,\r\n 'menu_position' => 4,\r\n 'supports' => array('title','editor'),\r\n 'rewrite' => array('slug' => 'plano')\r\n );\r\n\r\n register_post_type( 'plano' , $args ); # registering the new post type\r\n}",
"function stock_toolkit_custom_post()\n\t{\n\tregister_post_type('slide', array(\n\t\t'labels' => array(\n\t\t\t'name' => __('Slides') ,\n\t\t\t'singular_name' => __('Slide')\n\t\t) ,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'custom-fields',\n\t\t\t'thumbnail',\n\t\t\t'page-attributes'\n\t\t) ,\n\t\t'public' => false,\n\t\t'show_ui' => true\n\t));\n\t}",
"function thirdtheme_our_client_about_page()\n {\n add_theme_support('post-thumbnails'); \n //add_image_size('client_image',400,400);\n $args = array(\n 'labels' => array('name' =>__('our client '),\n 'add_new' =>__('add client image')),\n \n 'public' => true,\n 'menu_icon' =>'dashicons-image-filter',\n 'supports' => array( 'title','thumbnail')); \n register_post_type('our_client',$args);\n }",
"function cadastrando_post_type_clientes() {\n\n $nomeSingular = 'Cliente';\n $nomePlural = 'Clientes';\n $descricao = 'Clientes da minha empresa';\n\n $labels = array(\n 'name' => $nomePlural,\n 'name_singular' => $nomeSingular,\n 'add_new_item' => 'Adicionar novo ' . $nomeSingular,\n 'edit_item' => 'Editar ' . $nomeSingular\n );\n\n $supports = array(\n 'title',\n 'editor',\n 'thumbnail'\n );\n\n $args = array(\n 'labels' => $labels,\n 'description' => $descricao,\n 'public' => true,\n 'menu_icon' => 'dashicons-id-alt',\n 'supports' => $supports\n );\n\n register_post_type( 'cliente', $args);\n}",
"function thirdtheme_custom_icon()\n {\n add_theme_support('post-thumbnails');\n add_image_size('iconsize',55,45);\n $args = array(\n 'labels' => array('name' =>__('icon'),\n 'add_new' =>__('add new icon')),\n \n 'public' => true,\n 'menu_icon' => 'dashicons-art',\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title','editor','thumbnail' )); \n register_post_type('icon',$args);\n }",
"public static function post_type(){}",
"public static function registerWPPostType()\n {\n register_post_type\n (\n 'fs_feed_entry',\n array\n (\n 'label' => 'Feed Entries',\n 'labels' => array\n (\n 'name' => 'Feed Entries',\n 'singular_name' => 'Feed Entry',\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New Feed Entry',\n 'edit_item' => 'Edit Feed Entry',\n 'new_item' => 'New Feed Entry',\n 'view_item' => 'View Feed Entry',\n 'search_items' => 'Search Feed Entries',\n 'not_found' => 'No Feed Entries Found',\n 'not_found_in_trash' => 'No Feed Entries Found In Trash',\n 'parent_item_colon' => 'Parent Feed Entries:',\n 'edit' => 'Edit',\n 'view' => 'View Feed Entry'\n ),\n 'public' => false,\n 'show_ui' => true\n )\n );\n }",
"function zmpm_register_post_type() {\n\t\n\t$labels = array(\n\t\t'name' => 'Permissions',\n\t\t'singular_name' => 'Permission',\n\t\t'menu_name' => 'Permissions',\n\t\t'name_admin_bar' => 'Permission',\n\t\t'archives' => 'Permission Archives',\n\t\t'attributes' => 'Permission Attributes',\n\t\t'parent_item_colon' => 'Parent Permission:',\n\t\t'all_items' => 'Permissions',\n\t\t'add_new_item' => 'Add New Permission',\n\t\t'add_new' => 'Add New',\n\t\t'new_item' => 'New Permission',\n\t\t'edit_item' => 'Edit Permission',\n\t\t'update_item' => 'Update Permission',\n\t\t'view_item' => 'View Permission',\n\t\t'view_items' => 'View Permissions',\n\t\t'search_items' => 'Search Permission',\n\t\t'not_found' => 'Not found',\n\t\t'not_found_in_trash' => 'Not Found in Trash',\n\t\t'featured_image' => 'Featured Image',\n\t\t'set_featured_image' => 'Set featured image',\n\t\t'remove_featured_image' => 'Remove featured image',\n\t\t'use_featured_image' => 'Use as featured image',\n\t\t'insert_into_item' => 'Insert into permission',\n\t\t'uploaded_to_this_item' => 'Uploaded to this permission',\n\t\t'items_list' => 'Permissions list',\n\t\t'items_list_navigation' => 'Permissions list navigation',\n\t\t'filter_items_list' => 'Filter permissions list',\n\t);\n\t$args = array(\n\t\t'label' => 'Permission',\n\t\t'description' => 'ZingMap permissions',\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title' ),\n\t\t'hierarchical' => false,\n\t\t'public' => false,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => 'users.php',\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-lock',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => false,\n\t\t'can_export' => true,\n\t\t'has_archive' => false,\n\t\t'exclude_from_search' => true,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type( 'zmpm_permission', $args );\n\t\n}",
"function add_my_custom_posttype_waarden(){\n //LABELS DIFINIËREN\n $labels = array(\n 'add_new' => 'Voeg nieuwe waarde toe',\n 'add_new_item' => 'Voeg nieuwe waarde toe',\n 'name' => 'waarden',\n 'singular_name' => 'waarden',\n );\n //ARGUMENTEN DIFINIËREN\n $args = array(\n 'labels' => $labels, // de array labels van hier boven linken aan het argument labels\n 'Description' => 'waarden van Ben & Jerry',\n 'public' => true,\n 'menu_position' => 6,\n 'menu_icon' => 'dashicons-layout', //Een icoon kiezen\n 'supports' => array('title', 'editor', 'thumbnail'), \n 'has_archive' => true, //Maak een archief aan (opsomming van alle elementen), anders gaan we archive-waarden.php nooit kunnen aanspreken.\n 'show_in_nav_menus' => TRUE,\n \n );\n register_post_type( 'waarden', $args ); \n }",
"function albums_post_type() {\n\n $labels = array(\n 'name' => _x( 'Albums', 'Post Type General Name', 'text_domain' ),\n 'singular_name' => _x( 'Album', 'Post Type Singular Name', 'text_domain' ),\n 'menu_name' => __( 'Albums', 'text_domain' ),\n 'name_admin_bar' => __( 'Album', 'text_domain' ),\n 'archives' => __( 'Album', 'text_domain' ),\n 'parent_item_colon' => __( 'Superior:', 'text_domain' ),\n 'all_items' => __( 'Todos', 'text_domain' ),\n 'add_new_item' => __( 'Agregar Album nuevo', 'text_domain' ),\n 'add_new' => __( 'Agregar nuevo', 'text_domain' ),\n 'new_item' => __( 'Nuevo Album', 'text_domain' ),\n 'edit_item' => __( 'Editar Album', 'text_domain' ),\n 'update_item' => __( 'Actualizar Album', 'text_domain' ),\n 'view_item' => __( 'Ver Album', 'text_domain' ),\n 'search_items' => __( 'Buscar Album', 'text_domain' ),\n 'not_found' => __( 'No encontrado', 'text_domain' ),\n 'not_found_in_trash' => __( 'No encontrado en la Papelera', 'text_domain' ),\n 'featured_image' => __( 'Carátula del disco', 'text_domain' ),\n 'set_featured_image' => __( 'Cargar carátula', 'text_domain' ),\n 'remove_featured_image' => __( 'Quitar carátula', 'text_domain' ),\n 'use_featured_image' => __( 'Usar como carátula', 'text_domain' ),\n 'insert_into_item' => __( 'Insertar en el Album', 'text_domain' ),\n 'uploaded_to_this_item' => __( 'Cargado en este Album', 'text_domain' ),\n 'items_list' => __( 'Lista de Albums', 'text_domain' ),\n 'items_list_navigation' => __( 'Navegar la lista de Albums', 'text_domain' ),\n 'filter_items_list' => __( 'Filtrar Albums', 'text_domain' ),\n );\n $args = array(\n 'label' => __( 'Album', 'text_domain' ),\n 'description' => __( 'Albums lanzados por Domus', 'text_domain' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt' ),\n 'taxonomies' => array( 'artistas' ),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-format-audio',\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => true, \n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n register_post_type( 'albums', $args );\n\n}",
"function register_fablabs_post_type () {\n\t$labels = array(\n 'name' => _x( 'Fab Labs', 'post type general name', 'additive_tcp' ),\n 'singular_name' => _x( 'Fab Lab', 'post type singular name', 'additive_tcp' ),\n 'menu_name' => _x( 'Fab Labs', 'admin menu', 'additive_tcp' ),\n 'name_admin_bar' => _x( 'Fab Lab', 'add new on admin bar', 'additive_tcp' ),\n 'add_new' => _x( 'Add New', 'fablab', 'additive_tcp' ),\n 'add_new_item' => __( 'Add New Fab Lab', 'additive_tcp' ),\n 'new_item' => __( 'New Fab Lab', 'additive_tcp' ),\n 'edit_item' => __( 'Edit Fab Lab', 'additive_tcp' ),\n 'view_item' => __( 'View Fab Lab', 'additive_tcp' ),\n 'all_items' => __( 'All Fab Labs', 'additive_tcp' ),\n 'search_items' => __( 'Search Fab Labs', 'additive_tcp' ),\n 'parent_item_colon' => __( 'Parent Fab Lab:', 'additive_tcp' ),\n 'not_found' => __( 'No fab labs found.', 'additive_tcp' ),\n 'not_found_in_trash' => __( 'No fab labs found in Trash.', 'additive_tcp' )\n );\n\tregister_post_type('additive_fab_lab', array(\n\t\t'labels' => $labels,\n\t\t'description' => 'Fab Labs which will appear on the Fab Labs page.',\n\t\t'public' => true,\n\t\t'hierarchical' => false,\n\t\t'capability_type' => 'post',\n\t\t'supports' => array('title', 'editor', 'custom-fields', 'thumbnail')\n\t));\n}",
"public function register_post_types() {\n require_once('includes/post-types.php');\n }",
"function wpmudev_create_post_type() {\n\t$labels = array(\n \t\t'name' => 'Actividades',\n \t'singular_name' => 'Actividad',\n \t'add_new' => 'Añade Nueva Actividad',\n \t'add_new_item' => 'Añade una nueva Actividad',\n \t'edit_item' => 'Edita la Actividad',\n \t'new_item' => 'Nueva Actividad',\n \t'all_items' => 'Todas las Actividades',\n \t'view_item' => 'Ver Actividad',\n \t'search_items' => 'Buscar Actividades',\n \t'not_found' => 'No se han encontrado Actividades',\n \t'not_found_in_trash' => 'No se han encontrado Actividades en la Papelera', \n \t'parent_item_colon' => '',\n \t'menu_name' => 'Actividades',\n );\n \n $args = array(\n\t\t'labels' => $labels,\n\t\t'has_archive' => true,\n \t\t'public' => true,\n\t\t'supports' => array( 'title', 'custom-fields', 'thumbnail', 'comments', 'page-attributes', 'author' ),\n\t\t'exclude_from_search' => false,\n\t\t'capability_type' => 'post',\n\t\t//'map_meta_caps' => true,\n\t\t'rewrite' => array( 'slug' => 'actividades' ),\n\t);\n\t\n\tregister_post_type( 'actividad', $args );\n}",
"public function register_estate_post_type() {\r\n $options = get_option( 'myhome_redux' );\r\n // define post type slug\r\n if ( ! empty( $options['mh-estate-slug'] ) ) {\r\n $slug = $options['mh-estate-slug'];\r\n } else {\r\n $slug = 'properties';\r\n }\r\n\r\n register_post_type( 'estate', array(\r\n 'labels' => array(\r\n 'name'\t\t\t => esc_html__( 'Properties', 'myhome-core' ),\r\n 'singular_name'\t => esc_html__( 'Property', 'myhome-core' ),\r\n 'menu_name' => esc_html__( 'Properties', 'myhome-core' ),\r\n 'name_admin_bar' => esc_html__( 'Add New Property', 'myhome-core' ),\r\n 'add_new' => esc_html__( 'Add New Property', 'myhome-core' ),\r\n 'add_new_item' => esc_html__( 'Add New Property', 'myhome-core' ),\r\n 'new_item' => esc_html__( 'New Property', 'myhome-core' ),\r\n 'edit_item' => esc_html__( 'Edit Property', 'myhome-core' ),\r\n 'view_item' => esc_html__( 'View Property', 'myhome-core' ),\r\n 'all_items' => esc_html__( 'Properties', 'myhome-core' ),\r\n 'search_items' => esc_html__( 'Search property', 'myhome-core' ),\r\n 'not_found' => esc_html__( 'No Property Found found.', 'myhome-core' ),\r\n 'not_found_in_trash' => esc_html__( 'No Property found in Trash.', 'myhome-core' )\r\n ),\r\n 'show_in_rest' => true,\r\n 'query_var' => true,\r\n 'public'\t\t => true,\r\n 'has_archive'\t => true,\r\n 'menu_position' => 21,\r\n 'menu_icon' => 'dashicons-admin-home',\r\n 'capability_type' => array( 'estate', 'estates' ),\r\n 'map_meta_cap' => true,\r\n 'rewrite'\t\t => array( 'slug' => $slug ),\r\n 'supports'\t\t => array(\r\n 'title',\r\n 'author',\r\n 'editor',\r\n 'thumbnail',\r\n )\r\n ) );\r\n }",
"function carouF_init(){\n\n $labels = array(\n \"name\" => \"Carrousel\",\n \"singular_name\" => \"Carrousel\",\n \"add_new\" => \"Ajouter un Carrousel\",\n \"add_new_item\" => \"Ajouter un nouveau Slide\",\n \"new_item\" => \"Nouveau Carrousel\",\n \"view_item\" => \"Voir Carrousel\",\n \"search_item\" => \"Rechercher un Carrousel\",\n \"not_found\" => \"aucun Carrousel\",\n \"not_found_in_trash\" => \"aucun Caroussel dans la corbeille\",\n \"parent_item_colon\" => \"\",\n \"menu_name\" => \"Carrousel\"\n\n );\n\n register_post_type(\"slide\", array(\n \"public\" => true,\n \"publicity_queryable\" => false,\n \"labels\" => $labels,\n \"menu_position\" => 8,\n \"capability_type\" => \"post\",\n \"supports\" => array(\"title\", \"thumbnail\")\n ));\n\n add_image_size(\"Caroussel\", 1000, 3000, true);\n}",
"function tower_custom_post_types() {\n foreach (TOWER_CUSTOM_POSTS as $key => $custom_type) {\n register_post_type($key, $custom_type['config']);\n }\n}",
"public function registerPostTypes()\n {\n $projectLabels = array(\n 'name' => __( 'Projects'),\n 'singular_name' => __( 'Project'),\n 'menu_name' => __( 'Projects'),\n 'parent_item_colon' => __( 'Parent Project'),\n 'all_items' => __( 'All Projects'),\n 'view_item' => __( 'View Project'),\n 'add_new_item' => __( 'Add New Project'),\n 'add_new' => __( 'Add New'),\n 'edit_item' => __( 'Edit Project'),\n 'update_item' => __( 'Update Project'),\n 'search_items' => __( 'Search Project'),\n 'not_found' => __( 'Not Found'),\n 'not_found_in_trash' => __( 'Not found in Trash'),\n );\n $componentLabels = array(\n 'name' => __( 'Components'),\n 'singular_name' => __( 'Component'),\n 'menu_name' => __( 'Components'),\n 'parent_item_colon' => __( 'Parent Component'),\n 'all_items' => __( 'All Components'),\n 'view_item' => __( 'View Component'),\n 'add_new_item' => __( 'Add New Component'),\n 'add_new' => __( 'Add New'),\n 'edit_item' => __( 'Edit Component'),\n 'update_item' => __( 'Update Component'),\n 'search_items' => __( 'Search Component'),\n 'not_found' => __( 'Not Found'),\n 'not_found_in_trash' => __( 'Not found in Trash'),\n );\n $componentTypeTaxLabels = array(\n 'name' => __('Component types'),\n 'singular_name' => __('Component type'),\n 'search_items' => __( 'Search Component types' ),\n 'popular_items' => __( 'Popular Component types' ),\n 'all_items' => __( 'All Component types' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Component type' ),\n 'update_item' => __( 'Update Component type' ),\n 'add_new_item' => __( 'Add New Component type' ),\n 'new_item_name' => __( 'New Component type Name' ),\n 'separate_items_with_commas' => __( 'Separate component types with commas' ),\n 'add_or_remove_items' => __( 'Add or remove component types' ),\n 'choose_from_most_used' => __( 'Choose from the most used ones' ),\n 'menu_name' => __( 'Component types' ),\n ); \n \n // Set other options for custom post types\n $projectArgs = array(\n 'label' => __( 'projects'),\n 'description' => __( 'Stuff that you have done or used'),\n 'labels' => $projectLabels,\n 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 6,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n \n $componentArgs = array(\n 'label' => __( 'components'),\n 'description' => __( 'Things used in projects'),\n 'labels' => $componentLabels,\n 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields'),\n 'taxonomies' => array('components'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 7,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n \n $componentTypeTaxArgs = array(\n 'hierarchical' => false,\n 'labels' => $componentTypeTaxLabels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'type' ),\n );\n \n // Registering your Custom Post Type\n register_taxonomy('component_type', 'component', $componentTypeTaxArgs);\n register_post_type('component', $componentArgs);\n register_post_type( 'project', $projectArgs );\n }",
"function classTools_post_type() {\n\n $labels = array(\n 'name' => _x( 'Ferramentas', 'Post Type General Name', 'text_domain' ),\n 'singular_name' => _x( 'ferramenta', 'Post Type Singular Name', 'text_domain' ),\n 'menu_name' => __( 'Ferramenta', 'text_domain' ),\n 'name_admin_bar' => __( 'Post Type', 'text_domain' ),\n 'archives' => __( 'Item Archives', 'text_domain' ),\n 'attributes' => __( 'Item Attributes', 'text_domain' ),\n 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n 'all_items' => __( 'todas as ferramentas', 'text_domain' ),\n 'add_new_item' => __( 'Add novaferramenta', 'text_domain' ),\n 'add_new' => __( 'nova ferramenta', 'text_domain' ),\n 'new_item' => __( 'nova ferramenta', 'text_domain' ),\n 'edit_item' => __( 'Edit Item', 'text_domain' ),\n 'update_item' => __( 'Update Item', 'text_domain' ),\n 'view_item' => __( 'View Item', 'text_domain' ),\n 'view_items' => __( 'View Items', 'text_domain' ),\n 'search_items' => __( 'Search Item', 'text_domain' ),\n 'not_found' => __( 'não encontrado', 'text_domain' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n 'featured_image' => __( 'Featured Image', 'text_domain' ),\n 'set_featured_image' => __( 'Set featured image', 'text_domain' ),\n 'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),\n 'use_featured_image' => __( 'Use as featured image', 'text_domain' ),\n 'insert_into_item' => __( 'Insert into item', 'text_domain' ),\n 'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n 'items_list' => __( 'Items list', 'text_domain' ),\n 'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n 'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n );\n $args = array(\n 'label' => __( 'ferramentas', 'text_domain' ),\n 'description' => __( 'ferramentas', 'text_domain' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n register_post_type( 'classTools_post_type', $args );\n\n}",
"function cursos_post_type() {\n\n $labels = array(\n 'name' => _x( 'cursos', 'Post Type General Name', 'text_domain' ),\n 'singular_name' => _x( 'curso', 'Post Type Singular Name', 'text_domain' ),\n 'menu_name' => __( 'cursos', 'text_domain' ),\n 'name_admin_bar' => __( 'Post Type', 'text_domain' ),\n 'archives' => __( 'Item Archives', 'text_domain' ),\n 'attributes' => __( 'Item Attributes', 'text_domain' ),\n 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n 'all_items' => __( 'Todos os cursos', 'text_domain' ),\n 'add_new_item' => __( 'Add nova pergunta', 'text_domain' ),\n 'add_new' => __( 'novo cursoa', 'text_domain' ),\n 'new_item' => __( 'nova pergunta', 'text_domain' ),\n 'edit_item' => __( 'Edit Item', 'text_domain' ),\n 'update_item' => __( 'Update Item', 'text_domain' ),\n 'view_item' => __( 'View Item', 'text_domain' ),\n 'view_items' => __( 'View Items', 'text_domain' ),\n 'search_items' => __( 'Search Item', 'text_domain' ),\n 'not_found' => __( 'não encontrato', 'text_domain' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n 'featured_image' => __( 'Featured Image', 'text_domain' ),\n 'set_featured_image' => __( 'Set featured image', 'text_domain' ),\n 'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),\n 'use_featured_image' => __( 'Use as featured image', 'text_domain' ),\n 'insert_into_item' => __( 'Insert into item', 'text_domain' ),\n 'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n 'items_list' => __( 'Items list', 'text_domain' ),\n 'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n 'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n );\n $args = array(\n 'label' => __( 'cursos', 'text_domain' ),\n 'description' => __( 'cursos', 'text_domain' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'excerpt'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n register_post_type( 'cursos_post_type', $args );\n\n}",
"function create_posttype() \n {\n register_post_type( 'mist_employee',\n array(\n 'labels' => array(\n 'name' => __( 'Employees' ),\n 'singular_name' => __( 'Employee' )\n ),\n \n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'employees'),\n 'supports' => array('title','editor','thumbnail','excerpt'),\n 'menu_icon' => 'dashicons-businessman'\n )\n );\n register_post_type( 'mist_message',\n array(\n 'labels' => array(\n 'name' => __( 'Person Messages' ),\n 'singular_name' => __( 'Message' ),\n ),\n \n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'message'),\n 'supports' => array('title','editor','thumbnail','excerpt'),\n 'menu_icon' => 'dashicons-testimonial'\n )\n );\n add_post_type_support('mist_message', 'excerpt');\n \n }",
"static function register_post_type ()\n {\n register_post_type(\n 'person',\n array(\n 'labels' => array(\n 'name' => __x( 'People', 'post type general name' ),\n 'singular_name' => __x( 'Person', 'post type singular name' ),\n 'menu_name' => __x( 'People', 'admin menu' ),\n 'name_admin_bar' => __x( 'Person', 'add new on admin bar' ),\n 'add_new' => __x( 'Add New', 'book' ),\n 'add_new_item' => ___( 'Add New Person' ),\n 'new_item' => ___( 'New Person' ),\n 'edit_item' => ___( 'Edit Person' ),\n 'view_item' => ___( 'View Person' ),\n 'all_items' => ___( 'All People' ),\n 'search_items' => ___( 'Search People' ),\n 'parent_item_colon' => ___( 'Parent People:' ),\n 'not_found' => ___( 'No persons found.' ),\n 'not_found_in_trash' => ___( 'No persons found in Trash.' )\n ),\n 'description' => ___( 'Noteworthy people' ),\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'people' ),\n 'capability_type' => 'post',\n 'has_archive' => true,\n 'hierarchical' => false,\n 'menu_position' => null,\n 'menu_icon' => 'dashicons-welcome-learn-more',\n 'supports' => array( 'title', 'editor', 'thumbnail' )\n ));\n }",
"function custom_post_type() {\n $labels = array(\n 'name' => _x( 'Ort', 'Post Type General Name', 'twentythirteen' ),\n 'singular_name' => _x( 'Ort', 'Post Type Singular Name', 'twentythirteen' ),\n 'menu_name' => __( 'Orter', 'twentythirteen' ),\n 'all_items' => __( 'Alla Orter', 'twentythirteen' ),\n 'view_item' => __( 'View Ort', 'twentythirteen' ),\n 'add_new_item' => __( 'Skapa ny Ort', 'twentythirteen' ),\n 'add_new' => __( 'Skapa ny Ort', 'twentythirteen' ),\n 'edit_item' => __( 'Redigera Ort', 'twentythirteen' ),\n 'update_item' => __( 'Upddatera Ort', 'twentythirteen' ),\n 'search_items' => __( 'Sök Ort', 'twentythirteen' ),\n 'not_found' => __( 'Not Found', 'twentythirteen' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'twentythirteen' ),\n );\n \n $args = array(\n 'label' => __( 'cities', 'twentythirteen' ),\n 'description' => __( 'City Post Page', 'twentythirteen' ),\n 'labels' => $labels,\n 'supports' => array('title','thumbnail',),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n \n register_post_type( 'cities', $args );\n\n }",
"function prso_init_theme_post_types() {\n\t\n\t//Init vars\n\tglobal $prso_posttype_admin_icon;\n\t$file_path = plugin_dir_path( __FILE__ ) . \"theme-post-types\";\n\t\n\t$prso_posttype_admin_icon = get_stylesheet_directory_uri() . '/images/admin/custom_post_icon.png';\n\t\n\t//include_once( $file_path . '/cuztom-post-type_TEMPLATE.php' );\n\t\n}",
"function register_content_type( $singular, $plural, $type, $ns = 'theme' )\n{\n // Hook into the 'init' action\n add_action( 'init', function() use ( $singular, $plural, $type, $ns ) {\n\n $labels = [\n 'name' => _x( $plural, 'Post Type General Name', $ns ),\n 'singular_name' => _x( $singular, 'Post Type Singular Name', $ns ),\n 'menu_name' => __( $plural, $ns ),\n 'parent_item_colon' => __( 'Parent ' . $singular . ':', $ns ),\n 'all_items' => __( 'All ' . $plural, $ns ),\n 'view_item' => __( 'View ' . $singular, $ns ),\n 'add_new_item' => __( 'Add New ' . $singular, $ns ),\n 'add_new' => __( 'Add New', $ns ),\n 'edit_item' => __( 'Edit ' . $singular, $ns ),\n 'update_item' => __( 'Update ' . $singular, $ns ),\n 'search_items' => __( 'Search ' . $plural, $ns ),\n 'not_found' => __( 'Not found', $ns ),\n 'not_found_in_trash' => __( 'Not found in Trash', $ns ),\n ];\n $args = [\n 'label' => __( $singular, $ns ),\n 'description' => __( $plural, $ns ),\n 'labels' => $labels,\n 'supports' => [ 'title', 'editor', 'custom-fields', 'thumbnail' ],\n 'taxonomies' => [ 'category', 'post_tag' ],\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n ];\n register_post_type( $type, $args );\n\n }, 0 );\n}",
"function carbon_register_post_type($settings){\n\n $labels = array(\n 'name' => _x($settings['plural'],'post type plural name','carbon'),\n 'singular_name' => _x($settings['singular'],'post type singular name','carbon'),\n 'add_new' => _x('Add New',$settings['singular'],'carbon'),\n 'add_new_item' => __('Add New ' .$settings['singular']),\n 'edit_item' => __('Edit ' .$settings['singular']),\n 'new_item' => __('New ' .$settings['singular']),\n 'all_items' => __('All ' .$settings['plural']),\n 'view_item' => __('View ' .$settings['singular']),\n 'search_items' => __('Search ' .$settings['plural']),\n 'not_found' => __('No ' .$settings['plural'].' found'),\n 'not_found_in_trash' => __('No ' .$settings['plural'].' found in Trash'),\n 'parent_item_colon' => ':',\n 'menu_name' => $settings['plural'],\n );\n\n $args = array(\n 'labels' => $labels,\n 'can_export' => (isset($settings['can_export']) ? $settings['can_export'] : true), // defaults true\n 'capability_type' => (isset($settings['capability_type']) ? $settings['behavior'] : 'post'), // default post\n // 'capabilities' // default capability_type\n 'exclude_from_search' => (isset($settings['exclude_from_search']) ? $settings['exclude_from_search'] : false), // default opposite of public\n 'hierarchical' => (isset($settings['hierarchical']) ? $settings['hierarchical'] : false), // default false\n 'has_archive' => (isset($settings['has_archive']) ? $settings['has_archive'] : false), // default false\n // 'permalink_epmask' // default EP_PERMALINK\n 'public' => (isset($settings['public']) ? $settings['public'] : true), // default false\n 'publicly_queryable' => (isset($settings['publicly_queryable']) ? $settings['publicly_queryable'] : true), // default public\n 'query_var' => (isset($settings['query_var']) ? $settings['query_var'] : true), // default true type\n 'show_ui' => (isset($settings['show_ui']) ? $settings['show_ui'] : true), // default public\n 'show_in_menu' => (isset($settings['show_in_menu']) ? $settings['show_in_menu'] : true), // default public\n 'show_in_admin_bar' => (isset($settings['show_in_admin_bar']) ? $settings['show_in_admin_bar'] : true), // default show_in_menu\n 'menu_position' => (isset($settings['menu_position']) ? $settings['menu_position'] : null), // default null\n 'menu_icon' => (isset($settings['menu_icon']) ? $settings['menu_icon'] : 'dashicons-admin-post'),\n 'supports' => (isset($settings['supports']) ? $settings['supports'] : array('title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'page-attributes')), // default title editor\n 'taxonomies' => (isset($settings['taxonomies']) ? $settings['taxonomies'] : array()), // default none\n // 'register_meta_box_cb' // default none\n 'rewrite' => (isset($settings['rewrite']) ? $settings['rewrite'] : array( // default true name\n 'slug' => (isset($settings['slug']) ? $settings['slug'] : $settings['type']), // default type\n 'with_front' => (isset($settings['with_front']) ? $settings['with_front'] : false), // default true\n 'feeds' => (isset($settings['feeds']) ? $settings['feeds'] : false), // default has_archive\n 'pages' => (isset($settings['pages']) ? $settings['pages'] : true), // defaults true\n // 'ep_mask' // default permalink_epmask EP_PERMALINK\n )),\n );\n register_post_type($settings['type'], $args);\n }",
"function add_custom_post_type() \n {\n // add custom type evenementen\n $labels = array(\n 'name' => _x('Quotes', 'post type general name', $this->localization_domain),\n 'singular_name' => _x('Quote', 'post type singular name', $this->localization_domain),\n 'add_new' => _x('Add Quote', 'event', $this->localization_domain),\n 'add_new_item' => __('Add New Quote', $this->localization_domain),\n 'edit_item' => __('Edit Quote', $this->localization_domain),\n 'new_item' => __('New Quote', $this->localization_domain),\n 'view_item' => __('View Quote', $this->localization_domain),\n 'search_items' => __('Search Quotes', $this->localization_domain),\n 'not_found' => __('No Quotes found', $this->localization_domain),\n 'not_found_in_trash' => __('No Quotes found in Trash', $this->localization_domain), \n 'parent_item_colon' => ''\n );\n $type_args = array(\n 'labels' => $labels,\n 'description' => __('bbQuotations offers a simple quotes custom post type. Useful for pull quotes or just random quotes on your site.',\n $this->localization_domain),\n 'public' => false,\n 'publicly_queryable' => false,\n 'show_ui' => true, \n 'query_var' => true,\n 'rewrite' => array('slug' => $this->options['bbquotations-slug']),\n 'capability_type' => 'post',\n 'hierarchical' => false,\n 'menu_position' => 5,\n 'supports' => array('title','editor','author')\n ); \n register_post_type( $this->custom_post_type_name, $type_args);\n }",
"function fr_carousel_slider(){\r\n\tregister_post_type('fr_slider', array(\r\n\t\t\t'supports' => array('title', 'editor', 'excerpt'),\r\n\t\t\t'rewrite' => array('slug' => 'fr_slider'),\r\n\t\t\t'has_archive' => true,\r\n\t\t\t'public' => true,\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => 'FR_Slider',\r\n\t\t\t\t'add_new_item' => 'FR Add New Slider',\r\n\t\t\t\t'edit_item' => 'FR Edit Slider',\r\n\t\t\t\t'singular_name' => 'FR Slider'\r\n\t\t\t),\r\n\t\t\t'menu_icon' => 'dashicons-images-alt'));\r\n}",
"function reserva_post_type() {\n\n $labels = array(\n 'name' => _x( 'reservas', 'Post Type General Name', 'text_domain' ),\n 'singular_name' => _x( 'reserva', 'Post Type Singular Name', 'text_domain' ),\n 'menu_name' => __( 'Post Types', 'text_domain' ),\n 'name_admin_bar' => __( 'Post Type', 'text_domain' ),\n 'archives' => __( 'Item Archives', 'text_domain' ),\n 'attributes' => __( 'Item Attributes', 'text_domain' ),\n 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n 'all_items' => __( 'All Items', 'text_domain' ),\n 'add_new_item' => __( 'Add New Item', 'text_domain' ),\n 'add_new' => __( 'Add New', 'text_domain' ),\n 'new_item' => __( 'New Item', 'text_domain' ),\n 'edit_item' => __( 'Edit Item', 'text_domain' ),\n 'update_item' => __( 'Update Item', 'text_domain' ),\n 'view_item' => __( 'View Item', 'text_domain' ),\n 'view_items' => __( 'View Items', 'text_domain' ),\n 'search_items' => __( 'Search Item', 'text_domain' ),\n 'not_found' => __( 'Not found', 'text_domain' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n 'featured_image' => __( 'Featured Image', 'text_domain' ),\n 'set_featured_image' => __( 'Set featured image', 'text_domain' ),\n 'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),\n 'use_featured_image' => __( 'Use as featured image', 'text_domain' ),\n 'insert_into_item' => __( 'Insert into item', 'text_domain' ),\n 'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n 'items_list' => __( 'Items list', 'text_domain' ),\n 'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n 'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n );\n $args = array(\n 'label' => __( 'reserva', 'text_domain' ),\n 'description' => __( 'personalizanilazioón de reserva', 'text_domain' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail' ),\n 'taxonomies' => array( 'category', 'post_tag' ),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-welcome-write-blog',\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n register_post_type( 'reserva', $args );\n\n}",
"function custom_post_type() {\n\n// Set UI labels for Custom Post Type\n\t$labels = array(\n\t\t'name' => _x( 'Новости', 'Новости сайта', 'p1atform' ),\n\t\t'singular_name' => _x( 'Новость', 'Post Type Singular Name', 'p1atform' ),\n\t\t'menu_name' => __( 'Новости', 'p1atform' ),\n\t\t'parent_item_colon' => __( 'Parent Новость', 'p1atform' ),\n\t\t'all_items' => __( 'Все новости', 'p1atform' ),\n\t\t'view_item' => __( 'Просмотреть новость', 'p1atform' ),\n\t\t'add_new_item' => __( 'Добавить новость', 'p1atform' ),\n\t\t'add_new' => __( 'Добавить новость', 'p1atform' ),\n\t\t'edit_item' => __( 'Редактировать новость', 'p1atform' ),\n\t\t'update_item' => __( 'Обновить новость', 'p1atform' ),\n\t\t'search_items' => __( 'Поиск новости', 'p1atform' ),\n\t);\n\n\t$args = array(\n\t\t'label' => __( 'Отзывы', 'p1atform' ),\n\t\t'description' => __( 'Отзывы', 'p1atform' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'excerpt',\n\t\t\t'author',\n\t\t\t'thumbnail',\n\t\t\t'comments',\n\t\t\t'revisions',\n\t\t\t'custom-fields'\n\t\t),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-format-aside',\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\n\tregister_post_type( 'news', $args );\n\n\t$labels = array(\n\t\t'name' => _x( 'Клиенты', 'Новости сайта', 'p1atform' ),\n\t\t'singular_name' => _x( 'Клиент', 'Post Type Singular Name', 'p1atform' ),\n\t\t'menu_name' => __( 'Клиенты', 'p1atform' ),\n\t\t'parent_item_colon' => __( 'Парент Клиент', 'p1atform' ),\n\t\t'all_items' => __( 'Все клиенты', 'p1atform' ),\n\t\t'view_item' => __( 'Просмотреть клиента', 'p1atform' ),\n\t\t'add_new_item' => __( 'Добавить клиента', 'p1atform' ),\n\t\t'add_new' => __( 'Добавить клиента', 'p1atform' ),\n\t\t'edit_item' => __( 'Редактировать клиента', 'p1atform' ),\n\t\t'update_item' => __( 'Обновить клиента', 'p1atform' ),\n\t\t'search_items' => __( 'Поиск клиента', 'p1atform' ),\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'editor',\n\t\t\t'excerpt',\n\t\t\t'author',\n\t\t\t'thumbnail',\n\t\t\t'comments',\n\t\t\t'revisions',\n\t\t\t'custom-fields',\n\t\t),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 6,\n\t\t'menu_icon' => 'dashicons-admin-users',\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t);\n\n\tregister_post_type( 'clients', $args );\n\n\tregister_post_type( 'reviews', array(\n\t\t'labels' => array(\n\t\t\t'name' => 'Отзывы', // Основное название типа записи\n\t\t\t'singular_name' => 'Отзыв', // отдельное название записи типа Book\n\t\t\t'add_new' => 'Добавить Отзыв',\n\t\t\t'add_new_item' => 'Добавить Отзыв',\n\t\t\t'edit_item' => 'Редактировать Отзыв',\n\t\t\t'new_item' => 'Новая Отзыв',\n\t\t\t'view_item' => 'Посмотреть Отзыв',\n\t\t\t'search_items' => 'Найти Отзыв',\n\t\t\t'not_found' => 'Книг не найдено',\n\t\t\t'not_found_in_trash' => 'В корзине книг не найдено',\n\t\t\t'parent_item_colon' => '',\n\t\t\t'menu_name' => 'Отзывы'\n\n\t\t),\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => true,\n\t\t'capability_type' => 'post',\n\t\t'has_archive' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-format-chat',\n\t\t'hierarchical' => false,\n\t\t'menu_position' => null,\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )\n\t) );\n\n}",
"function mfn_news_post_type()\n{\n mfn_register_types();\n}",
"function productos_type(){\n\n $labels = array(\n 'name' => 'Productos',\n 'singular_name' => 'Producto',\n // define el nombre en el menú\n 'menu_name' => 'Productos'\n );\n $args = array(\n 'label' => 'productos',\n 'description' => 'productos de platzi',\n 'labels' => $labels,\n // supports hace referencia a los skils que tendrá este custon type\n 'supports' => array('title', 'editor', 'thumbnail', 'revisions'),\n // Define el estado de publicación borrador false, publicadas true\n 'public' =>true,\n // define si el custon type puede usarse desde los menus\n 'taxonomies' => array( 'category', 'post_tag' ),\n 'show_in_menu' =>true,\n // en qué posición se colocará en el menu\n 'menu_position' => 5,\n // icono del custon type\n // repositorio: https://developer.wordpress.org/resource/dashicons/#cart\n 'menu_icon' => 'dashicons-cart',\n 'can_export' => true,\n // Puede hacerse un loop personalizado\n 'publicly_queryable' => true,\n // hace que tenga una URL asignada\n 'rewrite' =>true,\n // genera el editor de codigo gutember\n 'show_in_rest' => true,\n );\n // es la función que me crea el custon_type\n register_post_type( 'producto', $args );\n}",
"function business_register_taxonomy_for_images() {\n register_taxonomy_for_object_type( 'category', 'attachment' );\n\tregister_taxonomy_for_object_type( 'content_type', 'attachment' );\n}",
"function add_my_custom_posttype_smaken(){\n //LABELS DIFINIËREN\n $labels = array(\n 'add_new' => 'Voeg nieuwe smaak toe',\n 'add_new_item' => 'Voeg nieuwe smaak toe',\n 'name' => 'Smaken',\n 'singular_name' => 'Smaak',\n );\n //ARGUMENTEN DIFINIËREN\n $args = array(\n 'labels' => $labels, // de array labels van hier boven linken aan het argument labels\n 'Description' => 'Lactosevrije smaken van B & J',\n 'public' => true,\n 'menu_position' => 4,\n 'menu_icon' => 'dashicons-carrot', //Een icoon kiezen\n 'supports' => array('title', 'editor', 'thumbnail', 'page-attributes'), \n 'has_archive' => true, //Maak een archief aan (opsomming van alle elementen), anders gaan we archive-waarden.php nooit kunnen aanspreken.\n 'show_in_nav_menus' => TRUE,\n );\n register_post_type( 'smaken', $args ); \n }",
"function rawlins_register_post_types() {\n\t$rawlins_magic_post_type_maker_array = array(\n\t\t/*array(\n\t\t\t'cpt_single' => 'Resource',\n\t\t\t'cpt_plural' => 'Resources',\n\t\t\t'slug' => 'resource',\n\t\t\t'cpt_icon' => 'dashicons-index-card',\n\t\t\t'exclude_from_search' => false,\n\t\t),*/\n\n\t);\n\n\tforeach( $rawlins_magic_post_type_maker_array as $post_type ){\n\t\t$cpt_single = $post_type['cpt_single'];\n\t\t$cpt_plural = $post_type['cpt_plural'];\n\t\t$slug = $post_type['slug'];\n\t\t$cpt_icon = $post_type['cpt_icon'];\n\t\t$exclude_from_search = $post_type['exclude_from_search'];\n\n\t\t// Admin Labels\n\t \t$labels = rawlins_generate_label_array($cpt_plural, $cpt_single);\n\n\t \t// Arguments\n\t\t$args = rawlins_generate_post_type_args($labels, $cpt_plural, $cpt_icon, $exclude_from_search);\n\n\t\t// Just do it\n\t\tregister_post_type( $slug, $args );\n\t}\n\n}",
"public function add_post_type( $name ) {\n\t\t$this->post_types[] = $name;\n\t}",
"function create_post_type() {\n\tregister_post_type( 'Architects', array(\n\t\t'labels' => array(\n\t\t\t'name' => __( 'Architects' ),\n\t\t\t'singular_name' => __( 'Architect' ),\n\t\t\t'add_new_item' => __( 'Add architect' ),\n\t\t\t'edit' => __( 'Edit' ),\n\t\t\t'edit_item' => __( 'Edit this architect' ),\n\t\t\t'new_item' => __( 'New architect' ),\n\t\t\t'view' => __( 'View architect' ),\n\t\t\t'view_item' => __( 'View this architect' ),\n\t\t\t'search_items' => __( 'Search architects' ),\n\t\t\t'not_found' => __( 'No architect was found' ),\n\t\t\t'not_found_in_trash' => __( 'No architects in the trash' ),\n\t\t\t'parent' => __( 'Parent' )\n\t\t),\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'exclude_from_search' => false,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => get_template_directory_uri() . '/images/icon-post.type-integrantes.png',\n\t\t'hierarchical' => true, // if true this post type will be as pages\n\t\t'query_var' => true,\n\t\t'supports' => array('title', 'editor','excerpt','custom-fields','author','page-attributes','trackbacks'),\n\t\t'rewrite' => array('slug'=>'architect','with_front'=>false),\n\t\t'can_export' => true,\n\t\t'_builtin' => false,\n\t\t'_edit_link' => 'post.php?post=%d',\n\t));\n\t// Remotes custom post type\n\tregister_post_type( 'Remotes', array(\n\t\t'labels' => array(\n\t\t\t'name' => __( 'Projects' ),\n\t\t\t'singular_name' => __( 'Project' ),\n\t\t\t'add_new_item' => __( 'Add projects' ),\n\t\t\t'edit' => __( 'Edit' ),\n\t\t\t'edit_item' => __( 'Edit this project' ),\n\t\t\t'new_item' => __( 'New project' ),\n\t\t\t'view' => __( 'View project' ),\n\t\t\t'view_item' => __( 'View this project' ),\n\t\t\t'search_items' => __( 'Search project' ),\n\t\t\t'not_found' => __( 'No project was found' ),\n\t\t\t'not_found_in_trash' => __( 'No project in the trash' ),\n\t\t\t'parent' => __( 'Parent' )\n\t\t),\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'exclude_from_search' => false,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => get_template_directory_uri() . '/images/icon-post.type-integrantes.png',\n\t\t'hierarchical' => false, // if true this post type will be as pages\n\t\t'query_var' => true,\n\t\t'supports' => array('title', 'editor','excerpt','custom-fields','author','comments','trackbacks'),\n\t\t'rewrite' => array('slug'=>'project','with_front'=>false),\n\t\t'can_export' => true,\n\t\t'_builtin' => false,\n\t\t'_edit_link' => 'post.php?post=%d',\n\t));\n\t// Scienticic custom post type\n\tregister_post_type( 'scientifics', array(\n\t\t'labels' => array(\n\t\t\t'name' => __( 'Scientifics' ),\n\t\t\t'singular_name' => __( 'Scientific' ),\n\t\t\t'add_new_item' => __( 'Add scientific' ),\n\t\t\t'edit' => __( 'Edit' ),\n\t\t\t'edit_item' => __( 'Edit this scientific' ),\n\t\t\t'new_item' => __( 'New scientific' ),\n\t\t\t'view' => __( 'View scientific' ),\n\t\t\t'view_item' => __( 'View this scientific' ),\n\t\t\t'search_items' => __( 'Search scientific' ),\n\t\t\t'not_found' => __( 'No scientific was found' ),\n\t\t\t'not_found_in_trash' => __( 'No scientifics in the trash' ),\n\t\t\t'parent' => __( 'Parent' )\n\t\t),\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'exclude_from_search' => false,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => get_template_directory_uri() . '/images/icon-post.type-integrantes.png',\n\t\t'hierarchical' => true, // if true this post type will be as pages\n\t\t'query_var' => true,\n\t\t'supports' => array('title', 'editor','excerpt','custom-fields','author','page-attributes','trackbacks'),\n\t\t'rewrite' => array('slug'=>'scientific','with_front'=>false),\n\t\t'can_export' => true,\n\t\t'_builtin' => false,\n\t\t'_edit_link' => 'post.php?post=%d',\n\t));\n\n}",
"public function registerCustomPost()\n {\n add_action('do_meta_boxes', array($this,'hideMetaBoxes' ));\n add_action('admin_head', array($this,'hideControlls' ));\n add_action('admin_init', array($this, 'buildCustomPostWidgets'));\n add_action('the_post', array($this, 'setFeaturedImage' ));\n add_action('save_post', array($this, 'setFeaturedImage' ));\n add_action('draft_to_publish', array($this, 'setFeaturedImage' ));\n }",
"function my_custom_post_registry() {\n\t$registry_labels = array(\n\t\t'name' => 'Registrations',\n\t\t'singular_name' => 'Cozmeena Shawl Registration',\n\t\t'add_new' => 'Add New',\n\t\t'all_items' => 'All Registrations',\n\t\t'add_new_item' => 'Add New Registration',\n\t\t'edit_item' => 'Edit Registration',\n\t\t'new_item' => 'New Registration',\n\t\t'view_item' => 'View Registration',\n\t\t'search_items' => 'Search Registrations',\n\t\t'not_found' => 'No Registrations found',\n\t\t'not_found_in_trash' => 'No Registrations found in trash',\n\t\t'parent_item_colon' => '',\n\t\t'menu_name' => 'Cozmeena Shawl Registrations'\n\t);\n\t$registry_args = array(\n\t\t'labels' => $registry_labels,\n\t\t'description' => \"The International Cozmeena Registry is the official record of Cozmeena Shawls\",\n\t\t'public' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => '',\n\t\t'supports' => array('title','author', 'editor','thumbnail'),\n\t\t'capability_type' => 'coz_registry', // need to assign capabilities via plugin\n\t\t'map_meta_cap' => true,\n\t\t'has_archive' => true,\n\t); \n\tregister_post_type('coz_registry',$registry_args);\n}",
"function post_type_minibanners() {\n\n register_post_type(\n 'minibanners',\n array('label' => __('Mini Banners'),\n 'singular_label' => __('Mini Banner'),\n 'public' => true,\n 'rewrite' => array('slug' => 'mini-banners'), // modify the page slug / permalink\n 'show_ui' => true,\n 'capability_type' => 'post',\n 'hierarchical' => false, //it means we cannot have parent and sub pages\n 'query_var' => false,\n 'exclude_from_search' => true,\n 'supports' => array(\n 'title', // entry title\n 'thumbnail', // featured image\n 'editor', //standard wysywig editor\n 'page-attributes'),\n 'labels' => array(\n 'name' => __( 'Mini Banners' ),\n 'singular_name' => __( 'Mini Banner' ),\n 'add_new' => __( 'Add New' ),\n 'add_new_item' => __( 'Add New Mini Banner' ),\n 'edit' => __( 'Edit' ),\n 'edit_item' => __( 'Edit Mini Banner' ),\n 'new_item' => __( 'New Mini Banner' ),\n 'view' => __( 'View Mini Banners' ),\n 'view_item' => __( 'View Mini Banner' ),\n 'search_items' => __( 'Search Mini Banners' ),\n 'not_found' => __( 'No Mini Banners Found' ),\n 'not_found_in_trash' => __( 'No Mini Banners Found in Trash' ),\n 'parent' => __( 'Parent Mini Banner' )\n )\n )\n\n );\n\n register_taxonomy_for_object_type('post_tag', 'minibanners'); // Change to match custom content name\n}",
"public function create_post_type() {\n\n register_post_type( self::POST_TYPE,\n array(\n\n 'labels' => array(\n 'name' => __( 'Fundraisers' ),\n 'singular_name' => __( 'Fundraiser' )\n ),\n 'description' => 'Fundraisers that allow users to purchase items through the WooCommerce Stores',\n 'menu_icon' => 'dashicons-chart-line',\n 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt',\n 'revisions' ),\n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array(\n 'slug' => __( 'fundraisers' ),\n 'with_front' => false\n )\n )\n );\n }"
] | [
"0.77122635",
"0.7666254",
"0.7632909",
"0.76141346",
"0.7601364",
"0.7546025",
"0.7545849",
"0.75189126",
"0.7511664",
"0.74273306",
"0.7402771",
"0.73973",
"0.73842436",
"0.7375255",
"0.73636967",
"0.7361844",
"0.7345887",
"0.7328538",
"0.7328538",
"0.7297205",
"0.7276741",
"0.72514445",
"0.72452897",
"0.7235014",
"0.7212523",
"0.7211608",
"0.7211516",
"0.7205577",
"0.7201482",
"0.7194588",
"0.719314",
"0.7163634",
"0.7152664",
"0.7140852",
"0.71228784",
"0.71189326",
"0.71136516",
"0.710919",
"0.71019083",
"0.7090117",
"0.707382",
"0.7070418",
"0.7070284",
"0.70572084",
"0.70425403",
"0.7031035",
"0.7028582",
"0.7026245",
"0.7020091",
"0.70004565",
"0.6978184",
"0.69713897",
"0.69711953",
"0.6954828",
"0.69531363",
"0.694576",
"0.6939903",
"0.6937024",
"0.6931348",
"0.69231707",
"0.69086283",
"0.68913126",
"0.68872744",
"0.68841445",
"0.6872557",
"0.68645513",
"0.68636703",
"0.685466",
"0.6854554",
"0.68542826",
"0.6836405",
"0.6834711",
"0.68337876",
"0.6827033",
"0.68120205",
"0.68069136",
"0.6805159",
"0.67971444",
"0.6794078",
"0.67934465",
"0.6792034",
"0.6790711",
"0.67904204",
"0.67822444",
"0.6782139",
"0.67759466",
"0.67749095",
"0.67743415",
"0.67737716",
"0.6772273",
"0.67548114",
"0.6752361",
"0.6748613",
"0.6746519",
"0.67384416",
"0.67378855",
"0.6737323",
"0.67369556",
"0.6719501",
"0.6716063",
"0.6713853"
] | 0.0 | -1 |
Save an entity to repository. | public function save($entity); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function saveEntity($entity)\n\t{\n\t\t$entityManager = $this->getDoctrine()->getManager();\n\t $entityManager->persist($entity);\n\t $entityManager->flush();\n\t}",
"protected function saveEntity($entity)\n {\n $this->om->persist($entity);\n $this->om->flush($entity);\n }",
"public function saveModel($entity){\n $this->entityManager->persist($entity);\n $this->entityManager->flush();\n }",
"public function save()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n if ($entity->getMarkedAsDeleted())\n {\n $entity->delete();\n } \n else if ($entity->getMarkedAsUpdated())\n {\n $entity->saveWithDetails();\n }\n }\n }\n );\n }",
"public function save($entity) : bool;",
"public function save($entity) {\n throw new NotImplementedException;\n }",
"public function save(Entity $entity): void\n {\n $this->db->save($entity);\n }",
"public function save() {\n return $this->entity->save();\n }",
"public function save($entity)\n {\n $this->model->save($entity);\n return $this->findOne($entity->id);\n }",
"public function persist($entity)\n {\n }",
"public function save( LogEntity $logEntity );",
"public function saveHokodoEntity(HokodoEntityInterface $hokodoEntity): void;",
"public function save(): void\n {\n $this->em->persist($this->model);\n $this->em->flush();\n }",
"protected function saveNew($entity)\n {\n $this->em->persist($entity);\n $this->update();\n }",
"public function save(GameLocation $entity)\n {\n $em = $this->getEntityManager();\n\n $em->persist($entity);\n $em->flush();\n }",
"protected function persist($entity)\n {\n if (!$this->em()->isOpen()) {\n $this->getDoctrine()->resetManager();\n }\n\n $this->em()->persist($entity);\n $this->em()->flush();\n\n }",
"public static function save($entity, $data)\n {\n return static::mapper()->save($entity, $data);\n }",
"public function postPersist($entity);",
"function save(iEntityComment $entity);",
"public function save(EntityInterface $entity, array $options = []): EntityInterface|false;",
"public function persist($entity)\n {\n $visited = [];\n $this->doPersist($entity, $visited);\n }",
"public function save()\n {\n $this->checkForNecessaryProperties();\n\n $this->update($this->getCurrentId(), $this->data);\n }",
"public function update($entity)\n {\n $this->getObjectManager()->persist($entity);\n $this->getObjectManager()->flush();\n }",
"public function save(AbstractEntity $entity)\n {\n // Execute an update if ID is present in data\n if ($entity->getData($this->entityIdColumnName) != null) {\n // If ID is present, run an update statement and check if one record is updated\n return $this->adapter->update($entity->getData());\n }\n // Otherwise, run an insert statement and check if one record is added\n return $this->adapter->insert($entity->getData());\n }",
"public function persist(IEntity $entity): void\n\t{\n\t\t$this->beginTransaction();\n\t\t$data = $this->entityToArray($entity);\n\t\t$data = $this->getConventions()->convertEntityToStorage($data);\n\n\t\tif (!$entity->isPersisted()) {\n\t\t\t$this->processInsert($entity, $data);\n\n\t\t} else {\n\t\t\t$primary = [];\n\t\t\t$id = (array) $entity->getPersistedId();\n\t\t\tforeach ($entity->getMetadata()->getPrimaryKey() as $key) {\n\t\t\t\t$primary[$key] = array_shift($id);\n\t\t\t}\n\t\t\t$primary = $this->getConventions()->convertEntityToStorage($primary);\n\n\t\t\t$this->processUpdate($entity, $data, $primary);\n\t\t}\n\t}",
"protected function persistAndFlush($entity)\n\t{\n\t\t$this->em->persist($entity);\n\t\t$this->em->flush();\n\t}",
"protected function persist(EntityInterface $entity, Model $model) {\n $this->save();\n\n $entity->fromArray($model->toArray());\n }",
"public function save()\n {\n return $this->address_srl ? $this->repo->update($this) : $this->repo->insert($this);\n }",
"public function save( EntityInterface $entity )\n {\n $this->validateEntity( $entity );\n\n $mapper = $this->getMapper();\n\n return $mapper->save( $entity );\n }",
"public function save($object)\n {\n $this->entityManager->persist($object);\n $this->entityManager->flush();\n }",
"public function save()\n {\n $this->persist($this->state);\n }",
"public function testPersistSavesEntityToDatabase(): void\n {\n $entityFactoryManager = $this->getEntityFactoryManager([\n 'Tests\\EoneoPay\\Externals\\ORM\\Stubs\\Factories\\\\' => 'Tests\\EoneoPay\\Externals\\ORM\\Stubs'\n ]);\n\n $entity = $entityFactoryManager->create(EntityStub::class);\n self::assertNull($entity->getEntityId());\n\n $entity = $entityFactoryManager->persist(EntityStub::class);\n self::assertNotNull($entity->getEntityId());\n }",
"public function save($entity, $context) {\n unset($entity->id);\n $entity->is_new = TRUE;\n entity_save($this->entityType, $entity);\n }",
"protected function persistAndFlush($entity)\n {\n $this->persist($entity);\n $this->flush();\n }",
"public function save($oneOrManyEntities): void;",
"public function save()\n {\n if ($this->id) {\n $this->update();\n } else {\n $this->id = $this->insert();\n }\n }",
"public function entitySave($entity) {\n farm_asset_save($entity);\n }",
"public function entitySave($entity) {\n return waywire_video_save($entity);\n }",
"public function save($object);",
"public function save()\n {\n if ($this->id === null) {\n $this->insert();\n } else {\n $this->update();\n }\n }",
"function _save_entity($entity)\n {\n $post = $this->object->_convert_entity_to_post($entity);\n $primary_key = $this->object->get_primary_key_column();\n // TODO: unsilence this. Wordpress 3.9-beta2 is generating an error that should be corrected before its\n // final release.\n if ($post_id = @wp_insert_post($post)) {\n $new_entity = $this->object->find($post_id, TRUE);\n if ($new_entity) {\n foreach ($new_entity->get_entity() as $key => $value) {\n $entity->{$key} = $value;\n }\n }\n // Save properties as post meta\n $this->object->_flush_and_update_postmeta($post_id, $entity instanceof stdClass ? $entity : $entity->get_entity());\n $entity->{$primary_key} = $post_id;\n // Clean cache\n $this->object->_cache = array();\n }\n $entity->id_field = $primary_key;\n return $post_id;\n }",
"public function write(EntityInterface $Entity);",
"public function save(EntityInterface $entity) {\n return SAVED_NEW;\n }",
"public function save()\n {\n $data = $this->getSaveData();\n $errorString = '<h5 class=\"alert-heading\">Can\\'t save ' . $this->entityName . ' because of the following problems:</h5>';\n\n $errors = $this->checkRequiredColumns( $data );\n if ( !empty( $errors ) ) {\n return $this->addError( $errorString . HTMLTags::getListGroup( $errors ) );\n }\n\n if ( defined( 'DEBUG' ) && DEBUG === true ) {\n $dataToSave = !empty( $data ) ? $this->getDataHTMLTable( $data ) : 'None';\n $this->messages->add(\n 'Entity - ' . $this->entityName\n . '<br>Changed - ' . print_r( $this->changed, true )\n . '<br>Data to save - ' . $dataToSave\n . '<br>All column properties - ' . $dataToSave,\n 'info'\n );\n }\n $errors = $this->healthCheck();\n if ( !empty( $errors ) ) {\n return $this->addError( $errorString . HTMLTags::getListGroup( $errors ) );\n }\n if ( $this->exists ) {\n return $this->updateDBRow( $data );\n }\n $addRow = $this->addDBRow( $data );\n if ( is_int( $addRow ) ) {\n $this->id = $addRow;\n $this->exists = true;\n }\n return $addRow;\n }",
"public function persist();",
"public abstract function save();",
"public function add($entity)\n {\n $this->getObjectManager()->persist($entity);\n $this->getObjectManager()->flush();\n }",
"public function persist($entity)\n {\n if (!$this->isRepositoryWritable()) {\n throw $this->createNotWritableException();\n }\n\n return $this->trigger(__FUNCTION__, [\n 'entity' => $entity,\n ]);\n }",
"public function save() {\n\t\t$args = func_get_args();\n\t\t\n\t\t// no argument, so save current object\n\t\tif (empty($args))\n\t\t\t$o = $this;\n\t\t// argument given, so save that object\n\t\telse\n\t\t\t$o = $args[0];\n\n\t\t// ID is set, so update existing object\n\t\tif (isset($o->id))\n\t\t\treturn $this->update($o->id, $o);\n\n\t\t// ID is not set, so create new object\n\t\treturn $this->add($o);\n\t}",
"public function persist(Entity\\Base $entity)\n {\n $this->getEntityManager()->persist($entity);\n }",
"public function persist($object);",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"public function save(Article $entity)\n {\n if ($entity->getId() > 0) {\n $request = self::$pdo->prepare('UPDATE article SET title=:title, content=:content, category=:category WHERE id = :id');\n $request->bindValue(':id', $entity->getId());\n } else {\n $request = self::$pdo->prepare('INSERT INTO article (title, content, category) VALUES (:title, :content, :category)');\n }\n\n $request->bindValue(':title', $entity->getTitle());\n $request->bindValue(':content', $entity->getContent());\n $request->bindValue(':category', $entity->getCategory());\n\n if (!$request->execute()) {\n // Affiche l'erreur PDO sous forme de warning PHP\n $error = $request->errorInfo();\n trigger_error($error[2], E_USER_WARNING);\n }\n }",
"public function save() {}",
"public function save() {}",
"public function save() {}",
"public function save(ModelContract $entity)\n {\n $entity->user()->associate($this->vars->get('user', $entity->user));\n\n $this->throwExceptionParamsNull([\n 'name' => $entity->name,\n ]);\n\n\n return parent::save($entity);\n }",
"function time_tracker_activity_save(&$entity) {\n return entity_get_controller('time_tracker_activity')->save($entity);\n}",
"private function saveEntity( $entity, EntityManager $entityManager = null )\n {\n if( null === $entityManager )\n {\n $entityManager = $this->getDoctrine()->getManager();\n }\n\n try\n {\n $entityManager->persist($entity);\n $entityManager->flush();\n }\n catch( \\Exception $exc )\n {\n throw new HttpException(500, \"Error occured while saving an entity\");\n }\n }",
"abstract public function store(Entity $oMappedEntity);",
"public function persistEntity($obj)\n\t{\n\t\t$this->db->persistEntity($obj);\n\t}",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save($entity = NULL)\n {\n if ($entity !== NULL) {\n $result = $this->add($entity);\n $this->flush();\n\n return $result;\n }\n\n $this->flush();\n return array();\n }",
"public function save($object, bool $flush = true);",
"public function save()\n {\n $this->em->saveEntity( $this->entity );\n return $this;\n }",
"public function save(Identifiable $model);",
"public final function save() {\n }",
"public function save (ValueObjectAbstract $valueObject);",
"public function save(&$entity){\n\t\t$data = $entity->toArray();\n\t\ttry {\n\t\t\tif(isset($entity->_id)&&(!empty($entity->_id))){\n\t\t\t\t$this->update($entity);\n\t\t\t}else{\n\t\t\t\t$this->insert($entity);\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (BulkWriteException $e) {\n\t\t\t\n\t\t\t$tmp = $e->getWriteResult()->getWriteErrors();\n\t\t\t$tmp = current($tmp);\n\t\t\tif($tmp->getCode()===11000){\n\t\t\t\t$var = explode('.', $tmp->getMessage());\n\t\t\t\t$var = explode(' ', $var[2]);\n\t\t\t\t$var = substr($var[0], 1);\n\t\t\t\t$entity->messageValidate[$var] = 'est deja utiliser';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthrow $e;\n\t\t}\n\t}",
"public function save()\n \t{\n \t $this->getMapper()->save($this);\n \t}",
"public static function save($em, $obj)\n {\n $em->persist($obj);\n $em->flush();\n }",
"public function save($entity, $data = array()) {\n // if association hold id not actual object, \n // then find that object to set the corresponding property with it\n $classMetadata = $this->entityManager->getClassMetadata($this->entityName);\n $associationNames = $classMetadata->getAssociationNames();\n foreach ($associationNames as $associationName) {\n if (isset($data[$associationName])) {\n $currentValue = $data[$associationName];\n } else {\n $currentValue = $entity->$associationName;\n }\n if (!is_object($currentValue) && is_numeric($currentValue)) {\n $targetClass = $classMetadata->getAssociationTargetClass($associationName);\n $currentValue = $this->find($targetClass, $currentValue);\n if (isset($data[$associationName])) {\n $data[$associationName] = $currentValue;\n } else {\n $entity->$associationName = $currentValue;\n }\n }\n }\n\n if (!empty($data) && method_exists($entity, 'exchangeArray')) {\n $entity->exchangeArray($data);\n }\n $this->entityManager->persist($entity);\n $this->entityManager->flush($entity);\n }",
"public function persist($oneOrManyEntities): void;",
"public function save()\n {\n $this->_validateModifiable();\n\n if($this->isNew())\n {\n $this->_getDataSource()->create($this);\n }\n else\n {\n $this->_getDataSource()->update($this);\n }\n\n $this->_saveRelations();\n $this->_setNew(false);\n }",
"public function save(Persistable $persistable) : void;",
"public function persist( UserEntityInterface $user ): UserEntityInterface;",
"public function persist($obj)\r\n {\r\n }"
] | [
"0.7579266",
"0.73962927",
"0.727839",
"0.7157777",
"0.71353596",
"0.7115545",
"0.70606893",
"0.70390826",
"0.70053864",
"0.6863863",
"0.6776856",
"0.67650044",
"0.673296",
"0.6628384",
"0.65823925",
"0.6521103",
"0.65112805",
"0.6454482",
"0.6411596",
"0.640052",
"0.63952583",
"0.6390214",
"0.6373335",
"0.6373282",
"0.63620627",
"0.63296735",
"0.63275963",
"0.6325683",
"0.6315324",
"0.6311616",
"0.629518",
"0.62915397",
"0.6287782",
"0.6287055",
"0.6253619",
"0.6250021",
"0.62493676",
"0.62488645",
"0.62288535",
"0.62250346",
"0.6214727",
"0.61916906",
"0.61489576",
"0.6128981",
"0.6120642",
"0.60932094",
"0.60901845",
"0.6079899",
"0.6079199",
"0.60734993",
"0.60611147",
"0.6058327",
"0.6058327",
"0.6058327",
"0.6058327",
"0.6058327",
"0.60537887",
"0.60466194",
"0.6046502",
"0.6046502",
"0.6037959",
"0.5986456",
"0.5985428",
"0.59821486",
"0.597351",
"0.59706515",
"0.59706515",
"0.59706515",
"0.59706515",
"0.59706515",
"0.59706515",
"0.59706515",
"0.59706515",
"0.59706515",
"0.59706515",
"0.59706515",
"0.59706515",
"0.59706515",
"0.59706515",
"0.59706515",
"0.59706515",
"0.59706515",
"0.59706515",
"0.5962135",
"0.59605646",
"0.59314716",
"0.59277785",
"0.59184533",
"0.59168446",
"0.591008",
"0.58878756",
"0.58846253",
"0.58635396",
"0.58632374",
"0.5859185",
"0.58570397",
"0.5845145",
"0.5831475"
] | 0.7868986 | 1 |
Fetch an entity from repository by its identity. | public function fetch($id, $throws = false); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function retrieve($entityName, $id);",
"public function findEntity($id);",
"protected function findEntity($id, $repositoryName=\"\")\n {\n return $this->getRepository($repositoryName)->find($id);\n }",
"public function getOneByEntityFetcher(PersistentEntityFetcher $entityFetcher)\n {\n return $this->getEntityManager()->find($entityFetcher);\n }",
"public function findByIdentity($identity)\n\t{\n\t\treturn $this->getTable()\n\t\t\t->where(':identities.identity', $identity);\n\t}",
"public function fetch(): ?IEntity;",
"public function findOneById( int $int ): UserEntityInterface;",
"public function find($entity_id);",
"public function getById($id): ?IEntity;",
"protected function getEntity($repository, $id)\n {\n return $this->getEm()->find($repository, intval($id));\n }",
"public function retrieveById($identifier) {}",
"function getEntity() {\n if (!empty($this->entity_id) && !empty($this->entity_type) && entity_get_info($this->entity_type)) {\n // Create an array because array_shift passes in by reference.\n $entities = entity_load($this->entity_type, array($this->entity_id));\n return array_shift($entities);\n }\n }",
"public function get($id)\n\t{\n\t\t// Getting by ID?\n\t\tif (is_numeric($id))\n\t\t{\n\t\t\treturn $this->get_by('entities.id', $id);\n\t\t}\n\n\t\t// Retrieve by username.\n\t\tif (is_string($id))\n\t\t{\n\t\t\treturn $this->get_by('entities.username', $id);\n\t\t}\n\n\t\t// Fall-back to get_by method.\n\t\treturn $this->get_by($id);\n\t}",
"public function retrieveById($identifier);",
"public function retrieveById($identifier);",
"public function retrieveById($identifier);",
"public function retrieveById(mixed $identifier);",
"private function getEntity($id) {\n // when the request uses the internal id the given id starts with an underscore\n if(substr($id, 0, 1) == '_') {\n // get entity via _internal_id\n return Entity::findOrFail(substr($id, 1));\n } else {\n // get entity via GIS id\n return Entity::where('id', $id)->firstOrFail();\n }\n }",
"protected function getEntity($entityId)\n {\n // is entityId is numeric then assume it is a transaction ID\n if (is_numeric($entityId)) {\n return $this->getRepo($this->repo)->fetchById($entityId);\n }\n\n // if not numeric assume it is a transaction reference\n return $this->getRepo($this->repo)->fetchByReference($entityId);\n }",
"public function find($id) {\r\n\t\t// Tries first the identity cache\r\n\t\tif($this->_hasIdentity($id)) {\r\n\t\t\treturn $this->_getIdentity($id);\r\n\t\t}\r\n\t\t// Else get entity from table\r\n\t\t$rowset = $this->_getGateway()->find($id);\r\n\t\tif(count($rowset)) {\r\n\t\t\treturn $this->_rowToEntity($rowset->current());\r\n\t\t}\r\n\t}",
"protected function getEntity($key)\n {\n $id = $this->getIdentifierFields();\n\n if (count($id) > 1) {\n // $key is a collection index\n $entities = $this->getEntities();\n return $entities[$key];\n } else if ($this->entities) {\n return $this->entities[$key];\n } else if ($qb = $this->getQueryBuilder()) {\n // should we clone the builder?\n $alias = $qb->getRootAlias();\n $where = $qb->expr()->eq($alias.'.'.current($id), $key);\n\n return $qb->andWhere($where)->getQuery()->getSingleResult();\n }\n\n return $this->getOption('em')->find($this->getOption('class'), $key);\n }",
"public function get(BaseEntity $entity): BaseEntity\n {\n $result = $this->entityManager\n ->getRepository($entity->getClassName())\n ->find($entity);\n\n return $result ? $result : $entity;\n }",
"public function findEntityById($id)\n {\n if (isset($this->entities[$id])) {\n return $this->entities[$id];\n }\n }",
"public function retrieveEntity($entityId)\n {\n return $this->start()->uri(\"/api/entity\")\n ->urlSegment($entityId)\n ->get()\n ->go();\n }",
"public function find($entityName, $id) {\n return $this->setEntity($entityName)->entityRepository->find($id);\n }",
"public function retrieveById($identifier) {\n return $this->model->newQuery()->find($identifier);\n }",
"public function get(\n mixed $primaryKey,\n array|string $finder = 'all',\n CacheInterface|string|null $cache = null,\n Closure|string|null $cacheKey = null,\n mixed ...$args\n ): EntityInterface;",
"public function get($id) {\r\n\treturn $this->getRepository()->find($id);\r\n }",
"public function findOrFail(string $identifier): object\n {\n $entity = $this->find($identifier);\n\n if ($entity !== null) {\n return $entity;\n }\n\n throw $this->entityNotFoundException(['id' => $identifier]);\n }",
"public function getUserByIdentity($identity)\n {\n if (!is_array($identity) || empty($identity)) {\n throw new \\Exception('Invalid identity param');\n }\n\n $qb = $this->_em->createQueryBuilder();\n $qb->select('e')\n ->from($this->_entityName, 'e');\n\n $firstWhere = true;\n foreach ($identity as $attribute => $value) {\n if ($firstWhere) {\n $qb->where($qb->expr()->eq('e.' . $attribute, ':' . $attribute));\n } else {\n $qb->orWhere($qb->expr()->eq('e.' . $attribute, ':' . $attribute));\n }\n $qb->setParameter($attribute, $value);\n\n $firstWhere = false;\n }\n\n $result = null;\n try {\n $result = $qb->getQuery()->getSingleResult();\n } catch (\\Doctrine\\ORM\\NoResultException $ex) {\n }\n\n return $result;\n }",
"public function fetch($id);",
"public function fetch($id);",
"public function read()\n {\n $identity = parent::read();\n\n if (null !== $identity && !is_object($identity)) {\n $identity = $this->getObjectRepository()->find($identity);\n }\n\n return $identity;\n }",
"public function fetchSingleById($id);",
"public function fetchSingleById($id);",
"public function lookup($key)\r\n {\r\n\t\t// create the unique cache key of the entity\r\n \t$cacheKey = $this->getCacheKey($key);\r\n \t// check if a entity with the passed primary key is available\r\n if (array_key_exists($cacheKey, $this->_entities)) {\r\n \treturn $this->_entities[$cacheKey];\r\n }\r\n // check if the requested entity exists in cache\r\n elseif($this->getCache()->test($cacheKey)) {\r\n \treturn $this->getCache()->load($cacheKey);\r\n }\r\n // if not return null\r\n else {\r\n \treturn null;\r\n }\r\n }",
"public function getEntity(): object\n {\n $entity = $this->entityManager->getRepository($this->className)->find($this->id);\n if (!$entity) {\n throw new Error('Entity not found for class `' . $this->className . '` and ID `' . $this->id . '`.');\n }\n\n return $entity;\n }",
"public function retrieveById($identifier)\n {\n }",
"public function findOneEntity()\n {\n $company = $this->em->getRepository('APICoreBundle:Company')->findOneBy([\n 'title' => 'Test Company'\n ]);\n\n if ($company instanceof Company) {\n return $company;\n }\n\n return $this->createEntity();\n }",
"public function retrieveById($identifier)\n {\n $user = $this->model->find($identifier);\n return $this->getGenericUser($user);\n }",
"public function getById() {}",
"protected function fetchEntity(string $id): EntityInterface\n {\n $table = $this->loadModel();\n Assert::isInstanceOf($table, Table::class);\n\n $primaryKey = $table->getPrimaryKey();\n if (! is_string($primaryKey)) {\n throw new UnsupportedPrimaryKeyException();\n }\n\n try {\n $entity = $table->find()\n ->where([$table->aliasField($primaryKey) => $id])\n ->enableHydration(true)\n ->firstOrFail();\n Assert::isInstanceOf($entity, EntityInterface::class);\n\n return $entity;\n } catch (Exception $e) {\n // $id is a UUID, re-throwing the exception as we cannot fetch the record by lookup field(s)\n if (Validation::uuid($id)) {\n throw $e;\n }\n }\n\n /**\n * Try to fetch record by lookup field(s)\n *\n * @var \\Cake\\Datasource\\EntityInterface\n */\n $entity = $table->find()\n ->applyOptions(['lookup' => true, 'value' => $id])\n ->enableHydration(true)\n ->firstOrFail();\n\n return $entity;\n }",
"public function retrieveById($identifier)\n {\n return $this->createModel()->newQuery()->remember(10)->find($identifier);\n }",
"public function getFirstById($id)\n {\n if (!$user = $this->findFirstById($id)) {\n throw new Exceptions\\EntityNotFoundException($id);\n }\n\n return $user;\n }",
"public function retrieveById($identifier)\n {\n return $this->createModel()->newQuery()->{$this->scope}()->find($identifier);\n }",
"public function fetchById($id)\r\n {\r\n return $this->findByPk($id);\r\n }",
"abstract public function retrieve($id);",
"public function getEntity() {\n\t\treturn get_entity($this->entity_guid);\n\t}",
"public function getEntity()\n\t{\n\t\treturn $this->hasKey() ? $this->database->find($this->key) : null;\n\t}",
"public function getById(int $id): EntityInterface\n {\n }",
"public function getFirstById($id)\n {\n if (!$user = $this->findFirstById($id)) {\n throw new EntityNotFoundException($id, 'userId');\n }\n return $user;\n }",
"public function getFirstById($id)\n {\n if (!$user = $this->findFirstById($id)) {\n throw new EntityNotFoundException($id, 'userId');\n }\n return $user;\n }",
"public function load($id) {\n\t\t$this->logger->debug('[EntityManager]Loading Entity with id '.$id);\n\t\treturn $this->getRepository()\n\t\t->find($id);\n\t}",
"public function retrieveById($id);",
"public function findById($id)\n {\n return $this->getEntityRepository()->find($id);\n }",
"abstract public function getById($id);",
"abstract public function getById($id);",
"public function find($id)\n { \n $entity = $this->_find($id);\n return $entity;\n }",
"public function getEntity($name);",
"public abstract function getById($id);",
"protected function getEntityFromStorage() {\n $entity_type = $this->store->get('entity_type');\n $entity_id = $this->store->get('entity_id');\n\n /** @var \\Drupal\\Core\\Entity\\EntityInterface $entity */\n $entity = $this->entityTypeManager()->getStorage($entity_type)\n ->load($entity_id);\n\n return $entity;\n }",
"public function retrieveById($identifier)\n {\n return User::find($identifier);\n }",
"public function fetchById(int|string $objectId): DomainObjectInterface;",
"function GetResourceEntity($resourceEntityId)\n\t{\n\t\t$result = $this->sendRequest(\"GetResourceEntity\", array(\"ResourceEntityId\"=>$resourceEntityId));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}",
"public function getBy(array $where): ?IEntity;",
"public function findByIdentifier($identifier)\n {\n return $this->persistenceManager->getObjectByIdentifier($identifier, $this->objectType);\n }",
"public function getByEntityId(int $entityId): HokodoEntityInterface;",
"public function getFirstByUsername($name)\n {\n if (!$user = $this->findFirstByUsername($name)) {\n throw new Exceptions\\EntityNotFoundException($name, 'username');\n }\n\n return $user;\n }",
"public function getFirstByUsername($name)\n {\n if (!$user = $this->findFirstByUsername($name)) {\n throw new Exceptions\\EntityNotFoundException($name, 'username');\n }\n\n return $user;\n }",
"public function asDomainEntity()\n {\n return $this->app['company.repository']->find($this->getUID());\n }",
"public function getEntity();",
"public function getEntity();",
"public function getEntity();",
"public function retrieveById($identifier)\n {\n return $this->auth->getByIdentifier($identifier);\n }",
"public abstract function get($id);",
"public function fetchById($id)\n {\n return $this->findByPk($id);\n }",
"public function fetchById($id)\n {\n return $this->findByPk($id);\n }",
"abstract public function get($id);",
"abstract public function get($id);",
"abstract public function get($id);",
"public function retrieveById($identifier): ?Authenticatable\n {\n return $this->repository->find($identifier);\n }",
"function find($entity, $model = FALSE)\n {\n $retval = NULL;\n // Get primary key of the entity\n $pkey = $this->object->get_primary_key_column();\n if (!is_numeric($entity)) {\n $entity = isset($entity->{$pkey}) ? intval($entity->{$pkey}) : FALSE;\n }\n // If we have an entity ID, then get the record\n if ($entity) {\n $results = $this->object->select()->where_and(array(\"{$pkey} = %d\", $entity))->limit(1, 0)->run_query();\n if ($results) {\n $retval = $model ? $this->object->convert_to_model($results[0]) : $results[0];\n }\n }\n return $retval;\n }",
"abstract public function fetchUserById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"public function getById($id);",
"abstract protected function _doFetch($id);",
"public function fetch($id)\n {\n return parent::fetch($id);\n }",
"abstract protected function getEntity();"
] | [
"0.6885615",
"0.6697973",
"0.6623351",
"0.66210693",
"0.6476789",
"0.646898",
"0.6442858",
"0.6433002",
"0.64013356",
"0.6382388",
"0.63641435",
"0.6360448",
"0.6356885",
"0.63524157",
"0.63524157",
"0.63524157",
"0.63278645",
"0.6308263",
"0.6282753",
"0.6277844",
"0.6274753",
"0.6214501",
"0.6200694",
"0.61734784",
"0.6158378",
"0.6121327",
"0.60959196",
"0.60947436",
"0.6068794",
"0.60460836",
"0.6041311",
"0.6041311",
"0.60304534",
"0.60163534",
"0.60163534",
"0.6002593",
"0.5985735",
"0.5983703",
"0.59818363",
"0.59780836",
"0.5974278",
"0.5954939",
"0.5940099",
"0.5935477",
"0.5932026",
"0.59299845",
"0.5919235",
"0.58908796",
"0.58840257",
"0.58833265",
"0.58789986",
"0.58789986",
"0.5874016",
"0.58717567",
"0.5861067",
"0.58530307",
"0.58530307",
"0.58459425",
"0.5840194",
"0.58327127",
"0.5831856",
"0.58314884",
"0.5812551",
"0.5806889",
"0.5803006",
"0.5786402",
"0.57700574",
"0.5765817",
"0.5765817",
"0.57590556",
"0.5711537",
"0.5711537",
"0.5711537",
"0.5710193",
"0.56979835",
"0.5690273",
"0.5690273",
"0.5679029",
"0.5679029",
"0.5679029",
"0.5657622",
"0.5650252",
"0.5633046",
"0.56281227",
"0.56281227",
"0.56281227",
"0.56281227",
"0.56281227",
"0.56281227",
"0.56281227",
"0.56281227",
"0.56281227",
"0.56281227",
"0.56281227",
"0.56281227",
"0.56281227",
"0.56281227",
"0.56281227",
"0.5622281",
"0.5611035",
"0.5601615"
] | 0.0 | -1 |
Create a new command instance. | public function __construct() {
parent::__construct();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }",
"public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}",
"public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}",
"protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }",
"static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }",
"public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;",
"public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }",
"public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }",
"public function command(Command $command);",
"public function __construct($command)\n {\n $this->command = $command;\n }",
"public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }",
"protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }",
"public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }",
"public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }",
"public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }",
"public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;",
"private function _getCommandByClassName($className)\n {\n return new $className;\n }",
"public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }",
"public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }",
"private function __construct($command = null)\n {\n $this->command = $command;\n }",
"public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }",
"public function getCommand() {}",
"protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }",
"public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }",
"public function getCommand();",
"protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }",
"public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }",
"public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }",
"public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }",
"public function getCommand()\n {\n }",
"public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }",
"protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }",
"public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}",
"public function addCommand($command);",
"public function add(Command $command);",
"abstract protected function getCommand();",
"public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}",
"protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }",
"public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }",
"protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }",
"private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }",
"public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }",
"public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }",
"public function create() {}",
"protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }",
"public function create(){}",
"protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }",
"public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }",
"protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}",
"public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }",
"public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }",
"public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }",
"public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }",
"public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }",
"public function createCommand(?string $sql = null, array $params = []): Command;",
"public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }",
"public function generateCommands();",
"protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }",
"protected function buildCommand()\n {\n return $this->command;\n }",
"public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }",
"public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }",
"public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }",
"protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }",
"protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }",
"public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }",
"protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}",
"public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }",
"public function buildCommand()\n {\n return parent::buildCommand();\n }",
"private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }",
"public function getCommand(string $command);",
"protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}",
"public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }",
"public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }",
"protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }",
"private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }",
"public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }",
"public function generateCommand($singleCommandDefinition);",
"public function create() {\n }",
"public function create() {\n }",
"public function create() {\r\n }",
"public function create() {\n\n\t}",
"private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }",
"public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }",
"public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }",
"public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }",
"public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();"
] | [
"0.8010746",
"0.7333379",
"0.72606754",
"0.7164165",
"0.716004",
"0.7137585",
"0.6748632",
"0.67234164",
"0.67178184",
"0.6697025",
"0.6677973",
"0.66454077",
"0.65622073",
"0.65437883",
"0.64838654",
"0.64696646",
"0.64292693",
"0.6382209",
"0.6378306",
"0.63773245",
"0.6315901",
"0.6248427",
"0.6241929",
"0.6194334",
"0.6081284",
"0.6075819",
"0.6069913",
"0.60685146",
"0.6055616",
"0.6027874",
"0.60132784",
"0.60118896",
"0.6011778",
"0.5969603",
"0.59618074",
"0.5954538",
"0.59404427",
"0.59388787",
"0.5929363",
"0.5910562",
"0.590651",
"0.589658",
"0.589658",
"0.589658",
"0.58692765",
"0.58665586",
"0.5866528",
"0.58663124",
"0.5852474",
"0.5852405",
"0.58442044",
"0.58391577",
"0.58154446",
"0.58055794",
"0.5795853",
"0.5780188",
"0.57653266",
"0.57640004",
"0.57584697",
"0.575748",
"0.5742612",
"0.5739361",
"0.5732979",
"0.572247",
"0.5701043",
"0.5686879",
"0.5685233",
"0.56819254",
"0.5675983",
"0.56670785",
"0.56606543",
"0.5659307",
"0.56567776",
"0.56534046",
"0.56343585",
"0.56290466",
"0.5626615",
"0.56255764",
"0.5608852",
"0.5608026",
"0.56063116",
"0.56026554",
"0.5599553",
"0.5599351",
"0.55640906",
"0.55640906",
"0.5561977",
"0.5559745",
"0.5555084",
"0.5551485",
"0.5544597",
"0.55397296",
"0.5529626",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908"
] | 0.0 | -1 |
Execute the console command. | public function handle() {
try {
//delete old one
DB::table('operation_renewal_notification as re')
->join('policies as p', 'p.id', '=', 're.policy_id')
->whereRaw('DATEDIFF(p.end_date,now())<-30')->delete();
$policyDetails = DB::table('policies as p')
->join('customers as c', 'c.id', '=', 'p.customer_id')
->leftJoin('insurance_product as pr', 'pr.id', '=', 'p.product_id')
->select('p.id as policyId','p.customer_id', DB::raw("(case p.policy_type when 2 then 'Medical' when 3 then 'Motor' else 'General' end) AS lobdata"),DB::raw(" DATEDIFF(p.end_date,now()) as daydifference"), 'c.channel', DB::raw('DATEDIFF(p.end_date,now()) as datediff'), 'p.end_date as expirydate', 'p.start_date as inceptiondate','c.name as customerName','pr.product_name as productName')->where('p.policy_status', 2)->whereRaw('DATEDIFF(p.end_date,now())<=60')->get();
$datetime = date('Y-m-d H:i');
//dd($policyDetails);
$insert_data = array();
$renewalRequstArray = array();
$customerArray = array();
if ($policyDetails && count($policyDetails) > 0) {
foreach ($policyDetails as $policyDetail) {
$existpolicyDetails = DB::table('operation_renewal_notification')->where('policy_id', $policyDetail->policyId)->select('id')->first();
if ($existpolicyDetails && count(get_object_vars($existpolicyDetails)) > 0) {
continue;
}
$insert_data[] = array(
'customer_id' =>$policyDetail->customer_id,
'policy_id' => $policyDetail->policyId,
'created_date' => $datetime,
'policy_type' => $policyDetail->lobdata
);
$salespersonDetails = $this->findSaleperson($policyDetail->customer_id);
$assignUser = DB::table('users')->select('id')->where('status', '1')->where('roles', 'like', "%ROLE_OPERATION_SUPERVISER%")->orderBy('id', 'desc')->first();
$requestNo = substr("CRM-" . uniqid(date("Ymdhis")), 0, -13);
$policySalesperson = ($salespersonDetails !='')? $salespersonDetails->policy_sales_person:null;
$lineofbusiness = DB::table('line_of_business')->select('id')->where('status', '1')->where('title', 'like', "%".$policyDetail->productName."%")->orderBy('id', 'desc')->first();
$renewalRequstArray = array(
'customer_id' =>$policyDetail->customer_id,
'crm_request_id' => $requestNo,
'assigned_to' => $assignUser->id,
'user_id' => $assignUser->id,
'status' => 0,
'type' => 3,
'notification_start_date' => date('Y-m-d', strtotime('+10 days')),
'policy_sales_person' => $policySalesperson,
'updated_date' => $datetime,
'crm_line_of_business'=>($lineofbusiness !='')? $lineofbusiness->id:null,
'renewal_policy_id'=>$policyDetail->policyId
);
$customerArray[] = $policyDetail->customerName;
//Insert request details
$requestId = DB::table('crm_main_table')->insertGetId($renewalRequstArray);
$maildetails = array();
$maildetails['cc_data'] =['[email protected]','[email protected]'];
//Operation supervisor
$operationSupervisor = DB::table('users')->select('email','name')->where('status', '1')->where('roles', 'like', "%ROLE_OPERATION_SUPERVISER%")->orderBy('id', 'desc')->first();
$maildetails['to'] = $operationSupervisor->email;
$maildetails['name'] = $operationSupervisor->name;
//Operation lead
$operationLead = DB::table('users')->select('email')->where('status', '1')->where('roles', 'like', "%ROLE_OPERATION_LEAD%")->orderBy('id', 'desc')->first();
if($operationLead && count(get_object_vars($operationLead))>0){
$maildetails['cc_data'][] = $operationLead->email;
}
//Sales Manager
$salesManager = DB::table('users')->select('email')->where('status', '1')->where('roles', 'like', "%ROLE_SALES_LEAD%")->orderBy('id', 'desc')->first();
if($salesManager && count(get_object_vars($salesManager))>0){
$maildetails['cc_data'][] = $salesManager->email;
}
//Technical manager
$technicalManager = DB::table('users')->select('email')->where('status', '1')->where('roles', 'like', "%ROLE_TECHNICAL_HEAD%")->orderBy('id', 'desc')->first();
$maildetails['cc_data'][] = $technicalManager->email;
//Sales person
if($salespersonDetails !='') {
$maildetails['cc_data'][] = $salespersonDetails->email;
}
$template = 'emails.renewalnotification';
$url = route('crmrequestOverview', ['requestId' => $requestId]);
$data['link'] = $url;
$data['Request_no'] = $requestNo;
$data['customerName'] = $policyDetail->customerName;
//Renewal request creation mail send area
Mail::send($template, $data, function($message) use($maildetails,$data) {
$message->to($maildetails['to'], $maildetails['name'])->subject
('New renewal request has created for customers '.$data['customerName']);
$message->cc($maildetails['cc_data']);
$message->from('[email protected]', 'Diamond Broker');
});
}
}
if (!empty($insert_data)) {
DB::table('operation_renewal_notification')->insert($insert_data);
}
$this->info('Renewal count down cron run successfully!');
} catch (Exception $e) {
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }",
"public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }",
"public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }",
"public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }",
"public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }",
"public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }",
"public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }",
"public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }",
"public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }",
"public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }",
"public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }",
"public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }",
"public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }",
"public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}",
"public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}",
"public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }",
"public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }",
"public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }",
"public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }",
"public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }",
"public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }",
"public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}",
"public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }",
"public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }",
"public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }",
"public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }",
"public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }",
"public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }",
"public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }",
"public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }",
"public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }",
"public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }",
"public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }",
"public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }",
"public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }",
"public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }",
"public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }",
"public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }",
"public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }",
"public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }",
"public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }",
"public function handle()\n {\n $this->revisions->updateListFiles();\n }",
"public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }",
"public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }",
"public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }",
"public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }",
"public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }",
"public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }",
"public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }",
"public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }",
"public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }",
"public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }",
"public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }",
"public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }",
"public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }",
"public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }",
"public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }",
"public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }",
"public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }",
"public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }",
"public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }",
"public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }",
"public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }",
"public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }",
"public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }",
"public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }",
"public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }",
"public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }",
"public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }",
"public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }",
"public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }",
"public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }",
"public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }",
"public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }",
"public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }",
"public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}",
"public function handle(Command $command);",
"public function handle(Command $command);",
"public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }",
"public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }",
"public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }",
"public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }",
"public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }",
"public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }",
"public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }",
"public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }",
"public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }",
"public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }",
"public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }",
"public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }",
"public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }",
"public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }",
"public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }",
"public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }",
"public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }",
"public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }",
"public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }",
"public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }",
"public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }",
"public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }",
"public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }"
] | [
"0.6469962",
"0.6463639",
"0.64271367",
"0.635053",
"0.63190264",
"0.62747604",
"0.6261977",
"0.6261908",
"0.6235821",
"0.62248456",
"0.62217945",
"0.6214421",
"0.6193356",
"0.61916095",
"0.6183878",
"0.6177804",
"0.61763877",
"0.6172579",
"0.61497146",
"0.6148907",
"0.61484164",
"0.6146793",
"0.6139144",
"0.61347336",
"0.6131662",
"0.61164206",
"0.61144686",
"0.61109483",
"0.61082935",
"0.6105106",
"0.6103338",
"0.6102162",
"0.61020017",
"0.60962653",
"0.6095482",
"0.6091584",
"0.60885274",
"0.6083864",
"0.6082142",
"0.6077832",
"0.60766655",
"0.607472",
"0.60739267",
"0.607275",
"0.60699606",
"0.6069931",
"0.6068753",
"0.6067665",
"0.6061175",
"0.60599935",
"0.6059836",
"0.605693",
"0.60499364",
"0.60418284",
"0.6039709",
"0.6031963",
"0.6031549",
"0.6027515",
"0.60255647",
"0.60208166",
"0.6018581",
"0.60179937",
"0.6014668",
"0.60145515",
"0.60141796",
"0.6011772",
"0.6008498",
"0.6007883",
"0.60072047",
"0.6006732",
"0.60039204",
"0.6001778",
"0.6000803",
"0.59996396",
"0.5999325",
"0.5992452",
"0.5987503",
"0.5987503",
"0.5987477",
"0.5986996",
"0.59853584",
"0.5983282",
"0.59804505",
"0.5976757",
"0.5976542",
"0.5973796",
"0.5969228",
"0.5968169",
"0.59655035",
"0.59642595",
"0.59635514",
"0.59619296",
"0.5960217",
"0.5955025",
"0.5954439",
"0.59528315",
"0.59513766",
"0.5947869",
"0.59456027",
"0.5945575",
"0.5945031"
] | 0.0 | -1 |
Start batch submit callback. | public static function startBatch(array &$form, FormStateInterface $form_state) {
$form_state->setRedirect('glazed_builder.admin_paths');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n Sp_batch::insert([\n \t\t'batch'=>'1',\n ]);\n\n Sp_batch::insert([\n \t\t'batch'=>'2',\n ]);\n\n Sp_batch::insert([\n \t\t'batch'=>'3',\n ]);\n\n Sp_batch::insert([\n \t\t'batch'=>'4',\n ]);\n\n Sp_batch::insert([\n \t\t'batch'=>'5',\n ]);\n }",
"function submitBatch() {\n\tglobal $gMaxQueueLength;\n\t$submittedTests = countTestsWithCode(SUBMITTED);\n\t$unsubmitTests = obtainTestsWithCode(NOT_STARTED);\n\tif ( !isEmptyQuery($unsubmitTests) ) {\n\t\twhile ($row = mysqli_fetch_assoc($unsubmitTests)) {\n\t\t\tsubmitTest($row, 0);\n\t\t\t// Limit the number of in-flight tests\n\t\t\tif ($gMaxQueueLength) {\n\t\t\t\t$submittedTests++;\n\t\t\t\tif ($submittedTests >= $gMaxQueueLength)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}",
"function batch_callback_run_batch_process_submit($form, $form_state) {\n //grab global setting example\n $some_global_setting = variable_get('batch_callback_some_global_setting', '');\n\n // gather up your things to get processed\n // in this case all uids\n $user_query = new EntityFieldQuery();\n $user_result = $user_query->entityCondition('entity_type', 'user')\n ->execute();\n\n // the values from the batch start form\n $form_values = $form_state['values'];\n\n // setup array of operations\n $operations = array();\n if(!empty($user_result['user'])) {\n\n foreach (array_keys($user_result['user']) as $uid) {\n $operations[] = array('_batch_callback_batch_process_callback', array($form_values, $uid));\n }\n\n // setup batch\n $batch = array(\n 'operations' => $operations,\n 'finished' => 'batch_callback_batch_process_finished',\n );\n batch_set($batch);\n }\n}",
"public function batchExecute() {\n\n }",
"function submit() {\n foreach ($this->submit_callbacks as $callback) {\n call_user_func($callback, $this);\n }\n foreach ($this->children as $element) {\n $element->submit();\n }\n }",
"public function run()\n {\n $quit = false;\n while (!$quit)\n {\n \\Mutex::lock($this->thread_mutex);\n if (count($this->req_queue) == 0)\n {\n \\Cond::wait($this->thread_cond, $this->thread_mutex);\n if (count($this->req_queue) == 0)\n {\n \\Mutex::unlock($this->thread_mutex);\n continue;\n }\n }\n $reqs = array();\n while (count($this->req_queue) > 0 and count($reqs) < 10)\n {\n $m = $this->req_queue->shift();\n if ($m[0] == 'stop')\n {\n $quit = true;\n break;\n }\n $reqs[] = array($m[1], $m[2], $m[3], $m[4]);\n }\n \\Mutex::unlock($this->thread_mutex);\n if (count($reqs) > 0)\n $this->pubbatch($reqs);\n }\n }",
"protected function start_bulk_operation() {\n\n\t\t// Disable term count updates for speed\n\t\twp_defer_term_counting( true );\n\t}",
"public function run($request)\n {\n $jobID = $request->getVar('id');\n\n if (!$jobID) {\n $this->exitWithError('No job id is given');\n }\n\n /* @var $job BatchUploadJob */\n $job = BatchUploadJob::get()->byID($jobID);\n if ($job->Status !== BatchUploadJob::STATUS_PENDING) {\n $this->exitWithError('This job is not under PENDING status');\n }\n\n $job->Status = BatchUploadJob::STATUS_PROCESSING;\n $job->write();\n\n $playlist = $job->Playlist();\n $files = $job->StreamFiles();\n foreach ($files as $file) {\n /* @var $file File */\n echo 'Processing File: ' . $file->getFilename() . \"\\n\";\n\n try {\n $song = Song::create();\n $song->StreamFile = $file;\n $info = $song->getID3Info();\n foreach ($info as $key => $value) {\n $song->$key = $value;\n }\n $song->write();\n $song->StreamFile->owner->publishRecursive();\n\n // add to playlist if need\n if ($playlist->exists()) {\n $playlist->addSong($song);\n }\n\n /** @noinspection IncrementDecrementOperationEquivalentInspection */\n $job->ProcessedNumberOfFiles += 1;\n $job->write();\n } catch (\\Exception $e) {\n $job->Status = BatchUploadJob::STATUS_ERROR;\n $job->Remark = $e->getMessage();\n $job->write();\n $this->exitWithError($e);\n }\n }\n\n $job->Status = BatchUploadJob::STATUS_FINISHED;\n $job->write();\n }",
"protected function handleBatch()\n {\n if (!($requests = $this->router->getVariable('requests'))) {\n throw new \\ApiException(\\Phork::language()->translate('Missing batch definitions'), 400);\n }\n \n if (!(is_string($requests) && $requests = json_decode($requests, true))) {\n throw new \\ApiException(\\Phork::language()->translate('Invalid batch definitions'), 400);\n }\n \n foreach ($requests as $key => $request) {\n $key = isset($request['key']) ? $request['key'] : $key;\n if (!empty($request['method']) && !empty($request['url'])) {\n switch (strtolower($request['method'])) {\n case 'get':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::get($request['url'], false);\n break;\n\n case 'post':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::post($request['url'], !empty($request['args']) ? $request['args'] : array(), false);\n break;\n\n case 'put':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::put($request['url'], false);\n break;\n\n case 'delete':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::delete($request['url'], false);\n break;\n }\n } else {\n throw new \\ApiException(\\Phork::language()->translate('Missing request type and/or URL'), 400);\n }\n }\n\n $this->success = true;\n $this->result = array(\n 'batched' => isset($result) ? $result : array()\n );\n }",
"protected function start_bulk_operation() {\n\t\t// Disable term count updates for speed\n\t\twp_defer_term_counting( true );\n\t}",
"public function run()\n {\n $batches = [\n [\n 'name' => '45',\n ],\n [\n 'name' => '46',\n ],\n [\n 'name' => '47',\n ],\n [\n 'name' => '48',\n ],\n [\n 'name' => '49',\n ],\n [\n 'name' => '50',\n ],\n [\n 'name' => '51',\n ],\n [\n 'name' => '52',\n ],\n [\n 'name' => '53',\n ],\n [\n 'name' => '54',\n ],\n ];\n Batch::truncate();\n Batch::insert($batches);\n }",
"public function test_successful_register_batch() {\n\t\t$this->register_successful_batch( '1' );\n\n\t\t$all_batches = locomotive_get_all_batches();\n\t\t$this->assertCount( 1, $all_batches );\n\n\t\tregister_batch_process( array(\n\t\t\t'name' => 'My Test Batch process',\n\t\t\t'type' => 'user',\n\t\t\t'callback' => __NAMESPACE__ . '\\\\my_callback_function',\n\t\t\t'args' => array(\n\t\t\t\t'number' => 10,\n\t\t\t),\n\t\t) );\n\n\t\t$all_batches = locomotive_get_all_batches();\n\t\t$this->assertCount( 2, $all_batches );\n\t}",
"function submit()\n {\n\t\t//all data is handled by submit2()\n }",
"public function process()\n\t{\n\t\tif( $this->list_table->process_batch_action() ) return;\n\n\t\tif( empty($_REQUEST['action']) ) return;\n\t\t\n\t\tswitch( $_REQUEST['action'] )\n\t\t{\n\t\t\tcase 'clear':\n\t\t\t\t$this->model->upload->clear_blog_batch_items();\n\t\t\t\t$this->handler->force_redirect_url = $this->get_page_url();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'delete':\n\t\t\t\tif( empty($_GET['id']) || !is_numeric($_GET['id']) )\n\t\t\t\t{\n\t\t\t\t\t$this->set_error( 'No id provided or is invalid.' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->model->upload->delete_item( $_GET['id'] );\n\t\t\t\t$this->handler->force_redirect_url = $this->get_page_url();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'process':\n\t\t\t\tif( empty($_GET['id']) || !is_numeric($_GET['id']) )\n\t\t\t\t{\n\t\t\t\t\t$this->set_error( 'No id provided or is invalid.' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$result = $this->model->upload->process_item( $_GET['id'] );\n\t\t\t\t$this->set_notice( 'Processed 1 item.' );\n\t\t\t\tif( !$result )\n\t\t\t\t\t$this->set_error( $this->model->last_error );\n\t\t\t\t$this->handler->force_redirect_url = $this->get_page_url();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'process-all-items':\n\t\t\t\t$result = $this->model->upload->process_items();\n\t\t\t\t$this->set_notice( 'Processed all items.' );\n\t\t\t\tif( !$result )\n\t\t\t\t\t$this->set_error( $this->model->last_error );\n\t\t\t\t$this->handler->force_redirect_url = $this->get_page_url();\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public abstract function sendJobs();",
"function addBatchToQueue() {\n if(count($this->_importQueueBatch) == 0) {\n return;\n }\n $queueParams = array(\n 'entity' => $this->_entity,\n 'params' => $this->_importQueueBatch,\n 'errorFileName' => $this->_errorFileName,\n );\n $task = new CRM_Queue_Task(\n array('CRM_Csvimport_Task_Import', 'ImportEntity'),\n $queueParams,\n ts('Importing entity') . ': ' . $this->_lineCount\n );\n $this->_importQueue->createItem($task);\n $this->_importQueueBatch = array();\n }",
"private function _processSubmit()\n {\n global $interface;\n global $configArray;\n\n // Without IDs, we can't continue\n if (empty($_REQUEST['ids'])) {\n header(\n \"Location: \" . $this->followupUrl . \"?errorMsg=bulk_noitems_advice\"\n );\n exit();\n }\n\n $url = $configArray['Site']['url'] . \"/Search/Results?lookfor=\" .\n urlencode(implode(\" \", $_POST['ids'])) . \"&type=ids\";\n $result = $this->sendEmail(\n $url, $_POST['to'], $_POST['from'], $_POST['message']\n );\n\n if (!PEAR::isError($result)) {\n $this->followupUrl .= \"?infoMsg=\" . urlencode(\"bulk_email_success\");\n header(\"Location: \" . $this->followupUrl);\n exit();\n } else {\n // Assign Error Message and Available Data\n $this->errorMsg = $result->getMessage();\n $interface->assign('formTo', $_POST['to']);\n $interface->assign('formFrom', $_POST['from']);\n $interface->assign('formMessage', $_POST['message']);\n $interface->assign('formIDS', $_POST['ids']);\n }\n }",
"protected function start_bulk_operation(){\n\t\twpcom_vip_start_bulk_operation();\n\n\t}",
"public function afterBatch();",
"public function handleBatch(array $records)\n {\n }",
"public function enqueue() {\n\t}",
"public function bulkAction()\r\n {\r\n $this->checkIfDemo();\r\n $this->AdminJobModel->bulkAction();\r\n }",
"public function startBatch() {\n if ($this->isBatch) {\n throw new JsonRpcException('Batch operation already in progress, execute it by calling executeBatch() or cancel it by calling discardBatch()');\n }\n\n $this->batchRequests = [];\n $this->isBatch = true;\n\n return $this;\n }",
"public function process_bulk_action() \n\t{\n\t\t$action = $this->current_action();\n\t\t\n\t\tif ( $action and array_key_exists( $action, $this->bulkActions ) )\n\t\t{\n\t\t\t$class = $this->activeRecordClass;\n\t\t\tforeach( $_POST[ 'item' ] as $item_id )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$item = $class::load( $item_id );\n\t\t\t\t\tif ( is_callable( array( $item, $action ) ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tcall_user_func( array( $item, $action ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch( \\Exception $e ) { }\n\t\t\t}\n\t\t}\n\t}",
"public function runQueue();",
"public function process_batch_action()\n\t{\n\t\t$action = $this->current_action();\n\t\t$items = ( isset($_REQUEST['item']) ? $_REQUEST['item'] : array() );\n\t\t\n\t\tswitch( $action )\n\t\t{\n\t\t\tcase 'remove-items':\n\t\t\t\tforeach( $items as $item_id )\n\t\t\t\t\t$this->model->upload->delete_item( $item_id );\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'process-items':\n\t\t\t\tforeach( $items as $item_id )\n\t\t\t\t{\n\t\t\t\t\t$result = $this->model->upload->process_item( $item_id );\n\t\t\t\t\tif( !$result )\n\t\t\t\t\t\t$this->parent->add_error( $this->model->last_error );\n\t\t\t\t}\n\t\t\t\t$this->parent->add_notice( 'Processed '.count($items).' items.' );\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"function enqueue(){\n\t\t}",
"public function execute() {\n //the request map that maps the request queue to request curl handles\n $requests_map = [];\n $multi_handle = curl_multi_init();\n $num_outstanding = 0;\n\n //start processing the initial request queue\n $num_initial_requests = min($this->_maxConcurrent, count($this->requests));\n for($i = 0; $i < $num_initial_requests; $i++) {\n $this->init_request($i, $multi_handle, $requests_map);\n $num_outstanding++;\n }\n\n do{\n do{\n $mh_status = curl_multi_exec($multi_handle, $active);\n } while($mh_status == CURLM_CALL_MULTI_PERFORM);\n if($mh_status != CURLM_OK) {\n break;\n }\n\n //a request is just completed, find out which one\n while($completed = curl_multi_info_read($multi_handle)) {\n $this->process_request($completed, $multi_handle, $requests_map);\n $num_outstanding--;\n\n //try to add/start a new requests to the request queue\n while(\n $num_outstanding < $this->_maxConcurrent && //under the limit\n $i < count($this->requests) && isset($this->requests[$i]) // requests left\n ) {\n $this->init_request($i, $multi_handle, $requests_map);\n $num_outstanding++;\n $i++;\n }\n }\n\n usleep(15); //save CPU cycles, prevent continuous checking\n } while ($active || count($requests_map)); //End do-while\n\n $this->reset();\n curl_multi_close($multi_handle);\n }",
"public static function process_batch_request() {\n\t\t// Batch ID.\n\t\t$batch_id = isset( $_REQUEST['batch_id'] ) ? sanitize_key( $_REQUEST['batch_id'] ) : false;\n\n\t\tif ( ! $batch_id ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => __( 'A batch process ID must be present to continue.', 'popup-maker' ),\n\t\t\t) );\n\t\t}\n\n\t\t// Nonce.\n\t\tif ( ! isset( $_REQUEST['nonce'] ) || ( isset( $_REQUEST['nonce'] ) && false === wp_verify_nonce( $_REQUEST['nonce'], \"{$batch_id}_step_nonce\" ) ) ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => __( 'You do not have permission to initiate this request. Contact an administrator for more information.', 'popup-maker' ),\n\t\t\t) );\n\t\t}\n\n\t\t// Attempt to retrieve the batch attributes from memory.\n\t\t$batch = PUM_Batch_Process_Registry::instance()->get( $batch_id );\n\n\t\tif ( $batch === false ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => sprintf( __( '%s is an invalid batch process ID.', 'popup-maker' ), esc_html( $_REQUEST['batch_id'] ) ),\n\t\t\t) );\n\t\t}\n\n\t\t$class = isset( $batch['class'] ) ? sanitize_text_field( $batch['class'] ) : '';\n\t\t$class_file = isset( $batch['file'] ) ? $batch['file'] : '';\n\n\t\tif ( empty( $class_file ) || ! file_exists( $class_file ) ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => sprintf( __( 'An invalid file path is registered for the %1$s batch process handler.', 'popup-maker' ), \"<code>{$batch_id}</code>\" ),\n\t\t\t) );\n\t\t} else {\n\t\t\trequire_once $class_file;\n\t\t}\n\n\t\tif ( empty( $class ) || ! class_exists( $class ) ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => sprintf( __( '%1$s is an invalid handler for the %2$s batch process. Please try again.', 'popup-maker' ), \"<code>{$class}</code>\", \"<code>{$batch_id}</code>\" ),\n\t\t\t) );\n\t\t}\n\n\t\t$step = sanitize_text_field( $_REQUEST['step'] );\n\n\t\t/**\n\t\t * Instantiate the batch class.\n\t\t *\n\t\t * @var PUM_Interface_Batch_Exporter|PUM_Interface_Batch_Process|PUM_Interface_Batch_PrefetchProcess $process\n\t\t */\n\t\tif ( isset( $_REQUEST['data']['upload']['file'] ) ) {\n\n\t\t\t// If this is an import, instantiate with the file and step.\n\t\t\t$file = sanitize_text_field( $_REQUEST['data']['upload']['file'] );\n\t\t\t$process = new $class( $file, $step );\n\n\t\t} else {\n\n\t\t\t// Otherwise just the step.\n\t\t\t$process = new $class( $step );\n\n\t\t}\n\n\t\t// Garbage collect any old temporary data.\n\t\t// TODO Should this be here? Likely here to prevent case ajax passes step 1 without resetting process counts?\n\t\tif ( $step < 2 ) {\n\t\t\t$process->finish();\n\t\t}\n\n\t\t$using_prefetch = ( $process instanceof PUM_Interface_Batch_PrefetchProcess );\n\n\t\t// Handle pre-fetching data.\n\t\tif ( $using_prefetch ) {\n\t\t\t// Initialize any data needed to process a step.\n\t\t\t$data = isset( $_REQUEST['form'] ) ? $_REQUEST['form'] : array();\n\n\t\t\t$process->init( $data );\n\t\t\t$process->pre_fetch();\n\t\t}\n\n\t\t/** @var int|string|WP_Error $step */\n\t\t$step = $process->process_step();\n\n\t\tif ( is_wp_error( $step ) ) {\n\t\t\twp_send_json_error( $step );\n\t\t} else {\n\t\t\t$response_data = array( 'step' => $step );\n\n\t\t\t// Map fields if this is an import.\n\t\t\tif ( isset( $process->field_mapping ) && ( $process instanceof PUM_Interface_CSV_Importer ) ) {\n\t\t\t\t$response_data['columns'] = $process->get_columns();\n\t\t\t\t$response_data['mapping'] = $process->field_mapping;\n\t\t\t}\n\n\t\t\t// Finish and set the status flag if done.\n\t\t\tif ( 'done' === $step ) {\n\t\t\t\t$response_data['done'] = true;\n\t\t\t\t$response_data['message'] = $process->get_message( 'done' );\n\n\t\t\t\t// If this is an export class and not an empty export, send the download URL.\n\t\t\t\tif ( method_exists( $process, 'can_export' ) ) {\n\n\t\t\t\t\tif ( ! $process->is_empty ) {\n\t\t\t\t\t\t$response_data['url'] = pum_admin_url( 'tools', array(\n\t\t\t\t\t\t\t'step' => $step,\n\t\t\t\t\t\t\t'nonce' => wp_create_nonce( 'pum-batch-export' ),\n\t\t\t\t\t\t\t'batch_id' => $batch_id,\n\t\t\t\t\t\t\t'pum_action' => 'download_batch_export',\n\t\t\t\t\t\t) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Once all calculations have finished, run cleanup.\n\t\t\t\t$process->finish();\n\t\t\t} else {\n\t\t\t\t$response_data['done'] = false;\n\t\t\t\t$response_data['percentage'] = $process->get_percentage_complete();\n\t\t\t}\n\n\t\t\twp_send_json_success( $response_data );\n\t\t}\n\n\t}",
"public function setOnOperationSubmit($callback)\n\t{\n\t\tif (!is_array($this->onOperationSubmit)) {\n\t\t\t$this->onOperationSubmit = array();\n\t\t}\n\t\t$this->onOperationSubmit[] = $callback;\n\t}",
"public static function enqueue();",
"public function run(): void\n {\n $this->logger->debug('Start processing queue messages.');\n $count = 0;\n\n while ($this->loop->canContinue() && $message = $this->driver->nextMessage()) {\n $this->worker->process($message, $this);\n $count++;\n }\n\n $this->logger->debug(\n 'Finish processing queue messages. There were {count} messages to work with.',\n ['count' => $count]\n );\n }",
"public function markSubmitted(): void\n {\n $user = Auth::user()->callsign;\n $uploadDate = date('n/j/y G:i:s');\n $batchInfo = $this->batchInfo ?? '';\n\n foreach ($this->bmids as $bmid) {\n $bmid->status = Bmid::SUBMITTED;\n\n /*\n * Make a note of what provisions were set\n */\n\n $showers = [];\n if ($bmid->showers) {\n $showers[] = 'set';\n }\n\n if ($bmid->earned_showers) {\n $showers[] = 'earned';\n }\n if ($bmid->allocated_showers) {\n $showers[] = 'allocated';\n }\n if (empty($showers)) {\n $showers[] = 'none';\n }\n\n $meals = [];\n if (!empty($bmid->meals)) {\n $meals[] = $bmid->meals . ' set';\n }\n if (!empty($bmid->earned_meals)) {\n $meals[] = $bmid->earned_meals . ' earned';\n }\n if (!empty($bmid->allocated_meals)) {\n $meals[] = $bmid->allocated_meals . ' allocated';\n }\n\n if (empty($meals)) {\n $meals[] = 'none';\n }\n\n /*\n * Figure out which provisions are to be marked as submitted.\n *\n * Note: Meals and showers are not allowed to be banked in the case were the\n * person earned them yet their position (Council, OOD, Supervisor, etc.) comes\n * with a provisions package.\n */\n\n $items = [];\n if ($bmid->effectiveShowers()) {\n $items[] = Provision::WET_SPOT;\n }\n\n if (!empty($bmid->meals) || !empty($bmid->allocated_meals)) {\n // Person is working.. consume all the meals.\n $items = [...$items, ...Provision::MEAL_TYPES];\n } else if (!empty($bmid->earned_meals)) {\n // Currently only two meal provision types, All Eat, and Event Week\n $items[] = ($bmid->earned_meals == Bmid::MEALS_ALL) ? Provision::ALL_EAT_PASS : Provision::EVENT_EAT_PASS;\n }\n\n\n if (!empty($items)) {\n $items = array_unique($items);\n Provision::markSubmittedForBMID($bmid->person_id, $items);\n }\n\n $meals = '[meals ' . implode(', ', $meals) . ']';\n $showers = '[showers ' . implode(', ', $showers) . ']';\n $bmid->notes = \"$uploadDate $user: Exported $meals $showers\\n$bmid->notes\";\n $bmid->auditReason = 'exported to print';\n $bmid->batch = $batchInfo;\n $bmid->saveWithoutValidation();\n }\n }",
"public function test_all_batches() {\n\t\t$this->register_successful_batch( 'my-batch' );\n\t\t$batches = locomotive_get_all_batches();\n\n\t\t$this->assertNotNull( $batches['my-batch']['last_run'] );\n\t\t$this->assertNotNull( $batches['my-batch']['status'] );\n\n\t\t$post_batch = new Posts();\n\t\t$post_batch->register( array(\n\t\t\t'name' => 'Hey there',\n\t\t\t'type' => 'post',\n\t\t\t'callback' => __NAMESPACE__ . '\\\\my_callback_function',\n\t\t\t'args' => array(\n\t\t\t\t'posts_per_page' => 10,\n\t\t\t\t'post_type' => 'post',\n\t\t\t),\n\t\t) );\n\n\t\t$post_batch->run( 1 );\n\t\t$batches = locomotive_get_all_batches();\n\n\t\t$this->assertTrue( ( 'no results found' === $batches['hey-there']['status'] ) );\n\t}",
"public function batch_process( $files_to_process ) {\n\t\tif ( ! empty( $files_to_process ) && is_array( $files_to_process ) ) {\n\t\t\t$this->save_on_shutdown = true;\n\n\t\t\t$this->background_process->push_to_queue( $files_to_process );\n\t\t}\n\t}",
"public function run()\n {\n while (($payload = array_shift($this->payloads)) !== null) {\n list($ttr, $message) = $payload;\n $this->startedId = $this->finishedId + 1;\n $this->handleMessage($this->startedId, $message, $ttr, 1);\n $this->finishedId = $this->startedId;\n $this->startedId = 0;\n }\n }",
"protected function executeTasks() {}",
"public function start()\n {\n //Start pushing data\n }",
"function FBOD_Batch($server)\n{\n\t//echo __FUNCTION__ . \" called\\n\";\n\tFBOD_Batch::Call();\n}",
"public function run() {\n // Run until we break\n while (true) {\n $i++;\n $job = $this->fetch();\n\n // Break if there are no jobs to run\n if (!$job) {\n break;\n }\n\n $this->info($job->getRequestID().' - running job'); \n $result = $job->run();\n \n // Log any errors we hit and run the next\n if (!$result || !$result['success']) {\n $this->alert($job->getRequestID().' - error running job');\n\n continue;\n }\n\n $this->info($job->getRequestID().' - successfully completed job');\n }\n }",
"public function enqueue()\n {\n }",
"public function enqueue()\n {\n }",
"public function enqueue()\n {\n }",
"public function enqueue()\n {\n }",
"public function enqueue()\n {\n }",
"public function enqueue()\n {\n }",
"public function executeBatch() {\n if (!$this->isBatch) {\n throw new JsonRpcException('Client is not in batch mode, start a batch operation by calling startBatch() first');\n }\n\n if (empty($this->batchRequests)) {\n throw new JsonRpcException('No batch requests are attached. Use call() first');\n }\n\n $batchRequests = $this->batchRequests;\n $this->discardBatch();\n\n return $this->parseBatchResponse($this->performRequest($batchRequests));\n }",
"public function run()\n {\n foreach(range(1,50) as $index)\n {\n Task::create($this->data($index));\n }\n }",
"public function processEventQueue()\n {\n if (!$this->googleClient)\n {\n try \n {\n $this->googleClient = $this->createGoogleConnection(); \n } \n catch (\\Exception $e) \n {\n $this->syncProblemNotification($e->getMessage());\n die($e->getMessage());\n }\n \n }\n\n $db = \\JFactory::getDbo();\n\n $query = $db->getQuery(true);\n $query->select('*')->from('#__pbbooking_sync')->where('status is null')->order('id ASC');\n $events = $db->setQuery($query)->loadObjectList();\n\n foreach ($events as $event)\n {\n $success = false;\n switch ($event->action)\n {\n case 'create':\n $success = $this->sendEvent($event);\n break;\n case 'delete':\n $success = $this->deleteEvent($event);\n break;\n }\n\n //update the error flag so that it can be reported on in the admin console.\n $event->status = ($success) ? 'success' : 'error';\n if ($success)\n echo '<br/>Event '.$event->action.' success';\n else\n echo '<br/>Event '.$event->action.' failed';\n \n $db->updateObject('#__pbbooking_sync',$event,'id');\n }\n }",
"private function register_successful_batch( $slug = 'test-batch' ) {\n\t\tregister_batch_process( array(\n\t\t\t'name' => 'My Test Batch process',\n\t\t\t'slug' => $slug,\n\t\t\t'type' => 'post',\n\t\t\t'callback' => __NAMESPACE__ . '\\\\my_callback_function',\n\t\t\t'args' => array(\n\t\t\t\t'posts_per_page' => 10,\n\t\t\t\t'post_type' => 'post',\n\t\t\t),\n\t\t) );\n\t}",
"function atos_esuite_import_batch_worker(&$context) {\n if (empty($context['sandbox'])) {\n $context['sandbox']['done'] = 0;\n $context['sandbox']['max'] = variable_get('atos_esuite_finish_margin', 250);\n $context['sandbox']['last'] = 0;\n $context['sandbox']['last_found'] = 0;\n $context['sandbox']['errors'] = 0;\n $context['sandbox']['starttime'] = time();\n }\n\n $url = variable_get('atos_esuite_url', '');\n $query = array(\n 'id' => implode(',', range($context['sandbox']['last'] + 1, $context['sandbox']['last'] + variable_get('atos_esuite_chunk_size', 10))),\n );\n $url = \"$url?\" . http_build_query($query, '', '&');\n if ($result = _atos_esuite_process_feed($url)) {\n list($done, $errors, $last_atos_id) = $result;\n $context['sandbox']['done'] += $done;\n $context['sandbox']['last_found'] = max($context['sandbox']['last_found'], $last_atos_id);\n $context['sandbox']['last'] += variable_get('atos_esuite_chunk_size', 10);\n $context['sandbox']['max'] = $context['sandbox']['last_found'] + variable_get('atos_esuite_finish_margin', 250);\n }\n else {\n $context['sandbox']['errors']++;\n }\n\n $context['message'] = t('Imported @count items.', array(\n '@count' => $context['sandbox']['done'],\n ));\n $context['finished'] = $context['sandbox']['last'] >= $context['sandbox']['max'];\n if ($context['finished']) {\n _atos_esuite_delete_nodes($context['sandbox']['starttime']);\n $context['results']['count'] = $context['sandbox']['done'];\n }\n}",
"public function run()\n\t{\n\t\t$response = $this->dispatch($this['request']);\n\n\t\t$response->send();\n\n\t\t$this->callFinishMiddleware($response);\n\t}",
"public function serve_batch_request_v1(\\WP_REST_Request $batch_request)\n {\n }",
"private function processing_batch()\n\t{\n\t\t// load the sync db\n\t\tee()->sync_db = ee()->load->database('sync_db', true);\n\n\t\t// find the most recent unprocessed shipments\n\t\t$query = ee()->sync_db->where('processed !=', '1')->order_by('id', 'asc')->get('orders_processed', 50);\n\n\t\t// create arrays for shipment ids and tracking numbers\n\t\t$ids_processed = array();\n\n\t\t// find our shipped status\n\t\t$status = Store\\Model\\Status::where('name', 'Processing')->first();\n\n\t\t// loop through each shipment\n\t\tforeach($query->result() as $processed)\n\t\t{\n\t\t\t// update the status of each order with the tracking numbers\n\t\t\t$order_object = Store\\Model\\Order::find($processed->order_id);\n\t\t\tif(!empty($order_object))\n\t\t\t{\n\t\t\t\t$order_object->updateStatus($status, 0, '');\n\t\t\t\t// add id to the processed array\n\t\t\t\t$ids_processed[] = $processed->id;\n\t\t\t}\n\t\t}\n\n\t\t// update the shipment records to indicate they've been processed\n\t\tif(count($ids_processed) > 0)\n\t\t{\n\t\t\tee()->sync_db->where_in('id', $ids_processed)->set('processed', 1)->update('orders_processed');\n\t\t}\t\n\t\t\n\t}",
"public function start_batch($amount): array\n {\n return $this->record_batch($amount);\n }",
"public function run()\n {\n if (!GOOGLE_APPENGINE) { // GAE has its own external task queue\n require_code('tasks');\n\n $task_rows = $GLOBALS['SITE_DB']->query_select('task_queue', array('*'), array('t_locked' => 0));\n foreach ($task_rows as $task_row) {\n $GLOBALS['SITE_DB']->query_update('task_queue', array(\n 't_locked' => 1,\n ), array(\n 'id' => $task_row['id'],\n ), '', 1);\n\n require_code('files');\n //$url = find_script('tasks') . '?id=' . strval($task_row['id']) . '&secure_ref=' . urlencode($task_row['t_secure_ref']);\n //http_download_file($url);\n execute_task_background($task_row);\n }\n }\n }",
"public function requestDataSending()\n {\n $this->start();\n }",
"public function flushBatch()\n\t{\n\t\tif ($this->batching)\n\t\t{\n\t\t\t$this->batching = FALSE;\n\t\t\t\n\t\t\t$this->statpro->endBatch();\n\t\t}\n\t}",
"function batch()\n\t{\n\t\tJRequest::checkToken() or jexit(JText::_('JInvalid_Token'));\n\n\t\t// Initialize variables.\n\t\t$app\t= &JFactory::getApplication();\n\t\t$model\t= &$this->getModel('User');\n\t\t$vars\t= JRequest::getVar('batch', array(), 'post', 'array');\n\t\t$cid\t= JRequest::getVar('cid', array(), 'post', 'array');\n\n\t\t// Sanitize user ids.\n\t\t$cid = array_unique($cid);\n\t\tJArrayHelper::toInteger($cid);\n\n\t\t// Remove any values of zero.\n\t\tif (array_search(0, $cid, true)) {\n\t\t\tunset($cid[array_search(0, $cid, true)]);\n\t\t}\n\n\t\t// Attempt to run the batch operation.\n\t\tif (!$model->batch($vars, $cid))\n\t\t{\n\t\t\t// Batch operation failed, go back to the users list and display a notice.\n\t\t\t$message = JText::sprintf('USERS_USERS_BATCH_FAILED', $model->getError());\n\t\t\t$this->setRedirect('index.php?option=com_users&view=users', $message, 'error');\n\t\t\treturn false;\n\t\t}\n\n\t\t$message = JText::_('USERS_USERS_BATCH_SUCCESS');\n\t\t$this->setRedirect('index.php?option=com_users&view=users', $message);\n\t\treturn true;\n\t}",
"public function processAll();",
"function tripal_jobs_launch ($do_parallel = 0){\n \n // first check if any jobs are currently running\n // if they are, don't continue, we don't want to have\n // more than one job script running at a time\n if(!$do_parallel and tripal_jobs_check_running()){\n return;\n }\n \n // get all jobs that have not started and order them such that\n // they are processed in a FIFO manner. \n $sql = \"SELECT * FROM {tripal_jobs} TJ \".\n \"WHERE TJ.start_time IS NULL and TJ.end_time IS NULL \".\n \"ORDER BY priority ASC,job_id ASC\";\n $job_res = db_query($sql);\n while($job = db_fetch_object($job_res)){\n\n\t\t// set the start time for this job\n\t\t$record = new stdClass();\n\t\t$record->job_id = $job->job_id;\n\t\t$record->start_time = time();\n\t\t$record->status = 'Running';\n\t\t$record->pid = getmypid();\n\t\tdrupal_write_record('tripal_jobs',$record,'job_id');\n\n\t\t// call the function provided in the callback column.\n\t\t// Add the job_id as the last item in the list of arguments. All\n\t\t// callback functions should support this argument.\n\t\t$callback = $job->callback;\n\t\t$args = split(\"::\",$job->arguments);\n\t\t$args[] = $job->job_id;\n\t\tprint \"Calling: $callback(\" . implode(\", \",$args) . \")\\n\"; \n\t\tcall_user_func_array($callback,$args);\n\t\t\n\t\t// set the end time for this job\n\t\t$record->end_time = time();\n\t\t$record->status = 'Completed';\n\t\t$record->progress = '100';\n\t\tdrupal_write_record('tripal_jobs',$record,'job_id');\n\t\t\n\t\t// send an email to the user advising that the job has finished\n }\n}",
"public function bulk($jobs, $data = '', $queue = null);",
"public function run()\n {\n $this->_fnameFlagStop = dirname(__FILE__) . '/' . $this->getIndividualFilenameAsFlag();\n $this->checkIfShouldStopWork();\n\n $worker = Mage::getModel('myproject_gearman/worker'); // just a wrapper around PHP Gearman class\n\n $worker->addFunction($this->getJobName(), function (GearmanJob $job) {\n $this->_curJobObject = $job;\n $data = unserialize($job->workload());\n $this->processDataWrapper($data, $job);\n });\n\n $worker->addFunction($this->getIndividualFilenameAsFlag(), function (GearmanJob $job) {\n $this->log('Got job to exit. Job name: ' . $this->getIndividualFilenameAsFlag());\n $job->sendComplete('ok'); // without this line queue not cleans and task stay in this queue\n exit;\n });\n\n $worker->work();\n }",
"private function Run()\n\t{\n\t\t$apps = $this->getApps();\n\t\t\n\t\tif(count($apps) > 0)\n\t\t{\n\t\t\t$this->log->Write(\"Found \" . count($apps) . \" to process.\");\n\n\t\t\t//build batch file\n\t\t\t$file = $this->buildBatch($apps);\n\n\t\t\t//send batch\n\t\t\t$batch_status = $this->sendBatch($file);\n\t\t\tif (strtolower($batch_status) == 'sent')\n\t\t\t{\t\n\t\t\t\t\n\t\t\t\t//mark applications as approved/sent & hit certegy_sent stat\n\t\t\t\t$this->updateApps($apps);\n\t\t\t\t\n\t\t\t\t//E-mail Certegy to inform them that the new batch is available\n\t\t\t\t$mail = eCash_Mail::FBOD_CERTEGY_BATCH();\n\t\t\t}\n\t\t\t\n\t\t\t$this->log->Write(\"Batch Status: {$batch_status}\");\n\t\t\t\n\t\t\t//write batch to table\n\t\t\t$batch_id = $this->insertBatch($file,$batch_status);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->log->Write(\"There were no applications to process.\");\n\t\t}\n\t\t\n\t\t//Check to see if we'll be needing new Certegy Bill dates any time soon.\n\t\t$this->Verify_Bill_Dates();\n\t}",
"public function cron_action()\n\t{\n\n\t\t// process any recently updated inventory\n\t\t$this->inventory_batch();\n\t\t\n\t\t// process any recently shipped orders\n\t\t$this->shipping_batch();\n\n\t\t// process any recently processing orders\n\t\t$this->processing_batch();\n\n\t\t// process any product updates\n\t\t$this->product_batch(); \n\n\t\t// clean up any old records from the queues\n\t\t$this->cleanup();\n\t\texit('done');\n\n\t}",
"function async_work() {\n\t\t$posix_pid = posix_getpid();\n\t\t$this->predis->sadd('workers', $posix_pid);\n\t\t//set_error_handler('error_as_exception');\n\t\twhile(true) {\n\t\t\tlist($liste, $sdata) = $this->predis->brpop(\"posix_pid:$posix_pid\", 'queue', 300);\n\t\t\tif($sdata != NULL) {\n\t\t\t\t$data = unserialize($sdata);\n\t\t\t\tif(sizeof($data) > 2) {\n\t\t\t\t\t$_PID = $data[2];\n\t\t\t\t\t$_CONTEXT = new Context($_PID);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\t//var_dump($sdata);\n\t\t\t\t\t$result = call_user_func_array($data[0], $data[1]);\n\t\t\t\t\t$msg = array('r', $result);\n\t\t\t\t} catch( Exception $e) {\n\t\t\t\t\t$msg = array('e', $e);\n\t\t\t\t}\n\t\t\t\tif(sizeof($data) > 2) {\n\t\t\t\t\t$this->predis->lpush(\"pid:$data[2]\", serialize($msg));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\trestore_error_handler();\n\t}",
"public function run()\n {\n $data = $this->getUrlList();\n $this->db = \\DB::table('rec_urls');\n array_map(function ($url) {\n if ($url) {\n $this->insertUrl($url);\n }\n }, $data);\n }",
"private function getNextBatch()\n {\n\n $statusFilter = $this->objectManager->create('Magento\\Framework\\Api\\Filter');\n $statusFilter->setData('field', 'status');\n $statusFilter->setData('value', 0);\n $statusFilter->setData('condition_type', 'eq');\n\n $statusFilterGroup = $this->objectManager->create('Magento\\Framework\\Api\\Search\\FilterGroup');\n $statusFilterGroup->setData('filters', [$statusFilter]);\n\n\n $priorityFilter = $this->objectManager->create('Magento\\Framework\\Api\\Filter');\n $priorityFilter->setData('field', 'priority');\n $priorityFilter->setData('value', $this->crawlThreshold);\n $priorityFilter->setData('condition_type', 'gteq');\n\n $priorityFilterGroup = $this->objectManager->create('Magento\\Framework\\Api\\Search\\FilterGroup');\n $priorityFilterGroup->setData('filters', [$priorityFilter]);\n\n\n $sortOrder = $this->objectManager->create('Magento\\Framework\\Api\\SortOrder');\n $sortOrders = [\n $sortOrder->setField('priority')->setDirection(\\Magento\\Framework\\Api\\SortOrder::SORT_DESC)\n ];\n\n /** @var \\Magento\\Framework\\Api\\SearchCriteriaInterface $search_criteria */\n $search_criteria = $this->objectManager->create('Magento\\Framework\\Api\\SearchCriteriaInterface');\n $search_criteria ->setFilterGroups([$statusFilterGroup, $priorityFilterGroup])\n ->setPageSize($this->batchSize)\n ->setCurrentPage(1)\n ->setSortOrders();\n\n $search_criteria->setSortOrders($sortOrders);\n\n $this->queue = $this->pageRepository->getList($search_criteria);\n }",
"public function handleDataSubmission() {}",
"public function execute(): Iterator\n {\n if ($this->requests) {\n $this->processedCount = 0;\n $retryProxy = $this->api->createRetry($this->api->logger(), $this->api->maxAttempts());\n yield from $retryProxy->call(function (): iterator {\n try {\n foreach ($this->runBatchRequest() as $response) {\n do {\n yield from $this->processBatchResponse($response);\n $response = $this->getNextPage($response);\n } while ($response !== null);\n }\n } catch (BatchRequestException $e) {\n Helpers::processRequestException($e);\n }\n });\n }\n }",
"public function runRequest() {\n }",
"public function run() {\n\t\tforeach ( $this->filters as $hook ) {\n\t\t\tadd_filter( $hook['hook'], [\n\t\t\t\t$hook['component'],\n\t\t\t\t$hook['callback']\n\t\t\t], $hook['priority'], $hook['acc_args'] );\n\t\t}\n\t\tforeach ( $this->actions as $hook ) {\n\t\t\tadd_action( $hook['hook'], [\n\t\t\t\t$hook['component'],\n\t\t\t\t$hook['callback']\n\t\t\t], $hook['priority'], $hook['acc_args'] );\n\t\t}\n\t}",
"function durp_import_batch_run(&$context) {\n $queue = DrupalQueue::get('durp');\n\n if (empty($context['sandbox'])) {\n $context['sandbox']['done'] = 0;\n $context['sandbox']['max'] = $queue->numberOfItems();\n }\n\n if ($item = $queue->claimItem()) {\n _durp_map_node($item->data->id, $item->data->xml);\n $queue->deleteItem($item);\n ++$context['sandbox']['done'];\n }\n else {\n $context['sandbox']['max'] = $context['sandbox']['done'];\n }\n\n $context['message'] = t('Imported @count items.', array(\n '@count' => $context['sandbox']['done'],\n ));\n $context['finished'] = $context['sandbox']['done'] >= $context['sandbox']['max'];\n if ($context['finished']) {\n $context['results']['count'] = $context['sandbox']['done'];\n }\n}",
"public function run()\n {\n\n /**\n * Insert Google Shopping categories on insert\n */\n $google_shopping = \\App\\DfCore\\DfBs\\Import\\Category\\CategoryImportFactory::setChannel(\\App\\DfCore\\DfBs\\Enum\\CategoryChannels::GOOGLE_SHOPPING);\n foreach($google_shopping as $g_data) {\n DB::table('category')->insert($g_data);\n }\n\n\n\n\n }",
"public function run()\n {\n foreach ($this->counties as $index => $county)\n {\n $result = \\App\\Models\\Counties::create($county);\n if (!$result) {\n $this->command->info(\"Insert failed at record $index.\");\n return;\n }\n }\n $this->command->info('Inserted '.count($this->counties). ' records');\n }",
"public function executeAsync(): BatchInterface;",
"protected function perform()\n {\n // The first curl_multi_select often times out no matter what, but is usually required for fast transfers\n $selectTimeout = 0.001;\n // Limit to 100 exec calls here.\n $max = 100;\n do {\n do {\n $mrc = curl_multi_exec($this->multiHandle, $active);\n } while ($mrc == CURLM_CALL_MULTI_PERFORM);\n\n $this->checkCurlResult($mrc);\n\n $this->processMessages();\n\n if ($active && curl_multi_select($this->multiHandle, $selectTimeout) === -1) {\n // Perform a usleep if a select returns -1: https://bugs.php.net/bug.php?id=61141\n usleep(150);\n }\n\n // Set select timeout to 100 milliseconds to save CPU cycles.\n $selectTimeout = 0.1;\n } while (\n // Limit number of iterations\n --$max > 0 &&\n // It there is a limit and it is reached, process till we get under the limit again.\n (($this->number_parallel != 0) && ($this->handles->count() >= $this->number_parallel))\n );\n }",
"public function setup_batch_processes() {\n\n\t\t// Handle deleting our storify stories.\n\t\tregister_batch_process( array(\n\t\t\t'name' => 'Delete Storify Stories',\n\t\t\t'type' => 'post',\n\t\t\t'args' => array(\n\t\t\t\t'post_type' => 'storify-stories',\n\t\t\t\t'post_status' => 'any',\n\t\t\t),\n\t\t\t'callback' => array( $this, 'delete_storify_stories' ),\n\t\t));\n\n\t\t// Delete all the individual elements.\n\t\tregister_batch_process( array(\n\t\t\t'name' => 'Delete Storify Elements',\n\t\t\t'type' => 'comment',\n\t\t\t'args' => array(\n\t\t\t\t'type' => 'storify-element',\n\t\t\t\t'status' => 'approve',\n\t\t\t),\n\t\t\t'callback' => array( $this, 'delete_storify_elements' ),\n\t\t));\n\t}",
"public function doAction() : void {\n $this->doJob();\n }",
"public function run() {\n\t\t$this->addFields();\n\t\t$this->addData();\n\t}",
"public function handleBatch(array $records): void\n {\n $records = $this->recordFilter($records);\n if (!$records) {\n return;\n }\n\n $this->write($records);\n }",
"public function execute() {\n\t\tContext::get()->setSourceType( 'job-runner' );\n\t\t// Get some defaults from configuration\n\t\t$basePath = 'maintenance/job-runner/';\n\n\t\t$consumer = new JobQueueConsumer(\n\t\t\t$this->getOption( 'queue' ),\n\t\t\t$this->getOptionOrConfig( 'time-limit', $basePath . 'time-limit' ),\n\t\t\t$this->getOptionOrConfig( 'max-messages', $basePath . 'message-limit' )\n\t\t);\n\n\t\t$startTime = time();\n\t\t$messageCount = $consumer->dequeueMessages();\n\n\t\t$successCount = $consumer->getSuccessCount();\n\t\t$elapsedTime = time() - $startTime;\n\t\tLogger::info(\n\t\t\t\"Processed $messageCount ($successCount successful) jobs in $elapsedTime seconds.\"\n\t\t);\n\t}",
"protected function execute()\n {\n // Clean the utilistion index.\n DUtilisationRecord::cleanDatabase();\n // Determine objects that are searchable.\n $models = DModel::search()\n ->removeDefaultFilters();\n // Track progress of task execution.\n $totalObjects = $models->getCount();\n $currentObject = 0;\n foreach ($models as $model) {\n /* @var $model DModel */\n try {\n $event = new DOnSave();\n $event->setFieldValue('dispatcher', $model);\n DUtilisationRecord::index($event);\n $model->free();\n // Catch and report any exception to allow processing to continue.\n } catch (Exception $exception) {\n DErrorHandler::logException($exception);\n }\n // Update progress of task execution.\n ++$currentObject;\n $this->updateProgress($currentObject, $totalObjects);\n }\n }",
"public function run()\n {\n DB::table('job_service')->insert([\n 'jobId' => 1,\n 'serviceId' => 1,\n 'isActive' => 1,\n 'isComplete' => 1,\n 'isVoid' => 0,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n \n DB::table('job_service')->insert([\n 'jobId' => 2,\n 'serviceId' => 1,\n 'isActive' => 1,\n 'isComplete' => 1,\n 'isVoid' => 0,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n }",
"public function commit()\n\t{\n\t\t$recordArray = $this->dataSet;\n\n\t\tif (count($recordArray) >= 1)\n\t\t{\n\t\t\t// Process data in batch\n\t\t\t$dataBatch\t= array();\n\t\t\t$count\t\t= 0;\n\n\t\t\tforeach ($recordArray as $k => $obj)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t// Push data into array\n\t\t\t\t\tarray_push($dataBatch, $obj);\n\n\t\t\t\t\tif (count($dataBatch) == $this->batchSize)\n\t\t\t\t\t{\n\t\t\t\t\t\t$processData\t= $this->algoliaADIndex->saveObjects($dataBatch);\n\t\t\t\t\t\t$dataBatch\t\t= array();\n\t\t\t\t\t\t$count\t\t\t+= count($processData['objectIDs']);\n\n\t\t\t\t\t\tforeach ($processData['objectIDs'] as $key => $val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$processedData1[] = $val;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$processedData = $processedData1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (exception $e)\n\t\t\t\t{\n\t\t\t\t\tdie('Error occured while inserting records into Algolia! - ' . $e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Insert records in Algolia if record array is less than batchSize\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (count($dataBatch) < $this->batchSize && count($dataBatch) > 0)\n\t\t\t\t{\n\t\t\t\t\t\t$processData\t= $this->algoliaADIndex->saveObjects($dataBatch);\n\t\t\t\t\t\t$dataBatch\t\t= array();\n\t\t\t\t\t\t$count\t\t\t+= count($processData['objectIDs']);\n\n\t\t\t\t\t\tforeach ($processData['objectIDs'] as $key => $val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$processedData2[] = $val;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (count($processedData1) > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$processedData = array_merge($processedData1, $processedData2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$processedData = $processedData2;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (exception $e)\n\t\t\t{\n\t\t\t\treturn 'Error occured while inserting records into Algolia! - ' . $e->getMessage();\n\t\t\t}\n\n\t\treturn $processedData;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t}",
"public function run()\n {\n $workerList = [\n \"Андрей\",\n \"Сергей\",\n \"Михаил\",\n \"Стас\",\n \"Артем\",\n \"Татьяна\",\n \"Евгений\",\n \"Катя\",\n \"Борис\",\n ];\n\n\n foreach ($workerList as $item) {\n (new Workers([\"name\" => $item]))->save();\n }\n }",
"private function submit(){\n $post_params['authToken'] = $this->usersAuthToken;\n $post_params['internalSystemAuth'] = $this->internalSystemAuth;\n $post_params['job_id'] = $this->job_id;\n $post_params['status'] = $this->status;\n $post_params['additional_info'] = $this->additional_info;\n $post_params['datasource_id'] = $this->datasource_id;\n \n //$response = $this->utilities->curlPost($this->baseDomain.$this->url_path, $post_params);\n $response = $this->postCurlCall($this->baseDomain.$this->url_path, $post_params);\n $curInfo = $this->utilities->getLastCurlInfo();\n\n if($response == '{\"status\":\"UPDATED\"}'){\n $this->errors = 'Update Failed';\n return true;\n }\n else\n return false;\n }",
"protected function startRequestsFromQueue()\n {\n while (\n !$this->requestQueue->isEmpty() &&\n // Either start all when no maximum set, or only till maximum is reached.\n ($this->number_parallel == 0 || $this->countActive() < $this->number_parallel)\n ) {\n $request = $this->requestQueue->next();\n $request->setState(RequestInterface::STATE_TRANSFER);\n $handle = $this->createCurlHandle($request)->getHandle();\n $this->checkCurlResult(curl_multi_add_handle($this->multiHandle, $handle));\n }\n }",
"function run_job()\r\n\t{\r\n\t}",
"public function run()\n {\n foreach (self::$emails as $chave => $valor) {\n DB::table('emails')->insert([\n 'nome' => $valor[0],\n 'email' => $valor[1],\n 'bolo_id' => $valor[2],\n 'created_at' => NOW(),\n 'updated_at' => NOW(),\n ]);\n }\n }",
"public function run()\n {\n DB::table('jobs')->insert([\n 'worker_id'=>1,\n 'client_id'=>2,\n 'status_id'=>3,\n 'name'=>'order1',\n 'description'=>\"description tutututututu\",\n 'price'=>1000000,\n ]);\n DB::table('jobs')->insert([\n 'worker_id'=>2,\n 'client_id'=>3,\n 'status_id'=>3,\n 'name'=>'order2',\n 'description'=>\"description tutututututu\",\n 'price'=>1000000,\n ]);\n }",
"public function batch()\n\t{\n\t\t// Check for a valid token. If invalid, send a 403 with the error message.\n\t\tJSession::checkToken('request') or $this->sendResponse(new Exception(JText::_('JINVALID_TOKEN'), 403));\n\n\t\t// Put in a buffer to silence noise.\n\t\tob_start();\n\n\t\t// Remove the script time limit.\n\t\t@set_time_limit(0);\n\n\t\t$state = CmcSyncerState::getState();\n\n\t\t$chimp = new CmcHelperChimp;\n\n\t\t$members = $chimp->listMembers($state->lists[0]['mc_id'], 'subscribed', $state->offset * $state->batchSize, $state->batchSize);\n\n\t\t// Save the users in our database\n\t\tCmcHelperUsers::save($members, $state->lists[0]['id'], $state->lists[0]['mc_id']);\n\n\t\t$pages = $state->lists[0]['toSync'] / $state->batchSize;\n\n\t\tif ($state->offset < $pages)\n\t\t{\n\t\t\t$state->offset = $state->offset + 1;\n\t\t\t$state->header = JText::sprintf('COM_CMC_BATCH_SYNC_IN_LIST', $state->lists[0]['name']);\n\t\t\t$state->message = JText::sprintf('COM_CMC_BATCH_SYNC_PROGRESS', $state->offset * $state->batchSize, $state->batchSize);\n\t\t}\n\n\t\tif ($state->offset >= $pages)\n\t\t{\n\t\t\t// First list in the array was synced, lets remove it\n\t\t\t$oldList = array_shift($state->lists);\n\n\t\t\t// If we still have lists, then let us reset the offset\n\t\t\tif (count($state->lists))\n\t\t\t{\n\t\t\t\t$state->header = JText::sprintf('COM_CMC_BATCH_SYNC_IN_OLD_LIST_COMPLETE', $oldList['name']);\n\t\t\t\t$state->message = JText::sprintf('COM_CMC_BATCH_SYNC_IN_OLD_LIST_COMPLETE_DESC', $oldList['toSync'], $oldList['name'], $state->lists[0]['name']);\n\n\t\t\t\t$state->offset = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$state->header = JText::_('COM_CMC_SYNC_COMPLETE');\n\t\t\t\t$state->message = '<div class=\"alert alert-info\">' . JText::_('COM_CMC_SYNC_COMPLETE_DESC') . '</div>';\n\t\t\t}\n\t\t}\n\n\t\tCmcSyncerState::setState($state);\n\n\t\t$this->sendResponse($state);\n\t}",
"public function bulkAction() {\n\t\t$this->_helper->ajaxgrid->massActions ();\n\t}",
"public function bulkAction() {\n\t\t$this->_helper->ajaxgrid->massActions ();\n\t}",
"public function preBatchAction(string $actionName, ProxyQueryInterface $query, array &$idx, bool $allElements = false): void;",
"public function process_bulk_action() {\n\n\t\tswitch ( $this->current_action() ) {\n\t\t\tcase 'delete':\n\t\t\t\t// This case is handled in \\WPMailSMTP\\Pro\\Emails\\Logs\\Logs::process_email_delete().\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function run() {\n\t\tforeach ( $this->filters as $hook ) {\n\t\t\tadd_filter( $hook['hook'], $hook['callback'], $hook['priority'], $hook['accepted_args'] );\n\t\t}\n\n\t\tforeach ( $this->actions as $hook ) {\n\t\t\tadd_action( $hook['hook'], $hook['callback'], $hook['priority'], $hook['accepted_args'] );\n\t\t}\n\t}",
"public function enqueueRequests()\n {\n if (!$this->has_requests) {\n\t\treturn \"No requests to send\";\n\t}\n\t\n\t$finished = \"Error connecting to redis\";\n \n try {\n $redis = new Redis();\n $redis->pconnect(REDIS_ADDRESS);\n \n $multi = $redis->multi();\n \n //Executing all posts to Redis in one multi batch\n foreach ($this->data_requests as $key => $request) {\n $uuid = $request->getUUID();\n \n $multi->lPush(PENDING_QUEUE, $uuid);\n $multi->hSet(VALUES_HASH, $uuid, $request->getFormattedURL());\n $multi->hSet(VALUES_HASH, $uuid . ':method', $this->endpoint->method);\n $multi->hSet(STATS_HASH, $uuid . ':start', $this->start_time);\n }\n \n $ret = $multi->exec();\n \n $finished = \"Postback Delivered\";\n \n //Seach results for any errors from Redis commands\n foreach ($ret as $idx => $result) {\n if (!$result) {\n $finished = \"Redis call failed: \" . $idx;\n }\n }\n \n }\n catch (Exception $e) {\n return \"Error posting to Redis\";\n }\n \n return $finished;\n \n }",
"public function batchProcess($queueId);",
"public function onSubmit()\n {\n $this->prepareComponent();\n\n $this->defaultSuffix = 'pc-table-body';\n\n $searchWidgetName = $this->toolbarWidget->searchWidget->getName();\n $searchTerm = post($searchWidgetName);\n $this->toolbarWidget->searchWidget->setActiveTerm($searchTerm);\n $this->listWidget->setSearchTerm($searchTerm);\n\n $this->listWidget->setSearchOptions([\n 'mode' => $this->toolbarWidget->searchWidget->mode,\n 'scope' => $this->toolbarWidget->searchWidget->scope,\n ]);\n\n $this->listWidget->prepareVars();\n\n $data = [\n 'componentOptions' => $this->options,\n 'listWidget' => $this->listWidget\n ];\n\n /*\n * Save or reset search term in session\n */\n $this->setActiveTerm(post($this->toolbarWidget->searchWidget->getName()));\n\n /*\n * Trigger class event, merge results as viewable array\n */\n $params = func_get_args();\n //In result there is a return of refreshTableBody method\n $result = $this->fireEvent('pc.list.search.submit', [$params]);\n if ($result && is_array($result)) {\n $result = call_user_func_array('array_merge', $result);\n }\n\n return $this->refreshListTable();\n }",
"public function run()\n {\n $this->consoleOutputService->writeln('Start fetching attachments...');\n\n try {\n $attachments = $this->fromClient->fetchAttachments($this->allowedMimeTypes);\n $this->notifier->notify('Notifying first user that '. count($attachments) .' of his attachments fetched');\n } catch (\\Exception $e) {\n dump($e->getMessage());\n exit;\n }\n\n $this->consoleOutputService->writeln('Start uploading files to storage...');\n\n try {\n /** @var Attachment $file */\n $storage = $this->toClient->getStorage();\n foreach ($attachments as $file) {\n $storage->uploadFile($file);\n }\n\n $this->notifier->notify(\n 'Notifying second user that he got ' . count($attachments) . ' new attachments in his storage'\n );\n\n } catch (\\Exception $e) {\n dump('Something when wrong while uploading attachments to storage');\n dump($e->getMessage());\n exit;\n }\n\n }"
] | [
"0.6395741",
"0.6367636",
"0.62361085",
"0.61705965",
"0.60444856",
"0.57669455",
"0.57488984",
"0.57232606",
"0.5682217",
"0.56328124",
"0.5629722",
"0.5561507",
"0.55205846",
"0.5509823",
"0.54953027",
"0.5467385",
"0.54573786",
"0.5455755",
"0.54425967",
"0.5407169",
"0.5358254",
"0.5331694",
"0.53306633",
"0.53242",
"0.5290482",
"0.528037",
"0.5276036",
"0.52744734",
"0.5267044",
"0.52576166",
"0.5232623",
"0.52093256",
"0.52031827",
"0.51965284",
"0.5177047",
"0.5174157",
"0.51524603",
"0.514649",
"0.5118016",
"0.5117442",
"0.5112207",
"0.5112207",
"0.5112207",
"0.5112207",
"0.5112207",
"0.5112207",
"0.51015306",
"0.50833166",
"0.5060028",
"0.50504124",
"0.5050383",
"0.50478333",
"0.5045279",
"0.5041298",
"0.5039013",
"0.50349903",
"0.50302166",
"0.5019089",
"0.5013313",
"0.50107396",
"0.50039977",
"0.50037336",
"0.4998935",
"0.49881655",
"0.49858823",
"0.49808308",
"0.49802014",
"0.49799648",
"0.4976019",
"0.49714383",
"0.4970423",
"0.49636868",
"0.49594128",
"0.49460146",
"0.49249694",
"0.49241245",
"0.4916437",
"0.4906141",
"0.49047014",
"0.4899146",
"0.48990294",
"0.48966274",
"0.48931274",
"0.48918292",
"0.48809737",
"0.48637748",
"0.4849101",
"0.48479414",
"0.48436522",
"0.4833602",
"0.4832252",
"0.48191518",
"0.48166925",
"0.48166925",
"0.48158374",
"0.481497",
"0.48132327",
"0.4807859",
"0.4800147",
"0.47981486",
"0.47969896"
] | 0.0 | -1 |
Display a listing of the resource. | public function index() {
return view('admin.dorp.dcrud', ['dorpen' => Dorp::all()]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create() {
return view('admin.dorp.create');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request) {
$dorp = new Dorp;
$dorp->naam = $request->naam;
$dorp->save();
if($request->hasFile('avatar')) {
$avatar = $request->file('avatar');
$filename = $request->naam . '.' . $avatar->getClientOriginalExtension();
Image::make($avatar)->resize(500, 860)->save( public_path('/img/' . $filename ) );
$image = new Imagemanager;
$image->img = $filename;
$image->dorp_id = $dorp->id;
$image->save();
}
return view('admin.dorp.create', [ 'message' => 'Dorp added to the database' ]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id) {
return view('admin.dorp.edit', [ 'dorp' => $dorp = Dorp::find($id) ]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.7855416",
"0.769519",
"0.72748375",
"0.724256",
"0.7173659",
"0.7064689",
"0.70549816",
"0.6985127",
"0.6949479",
"0.69474626",
"0.694228",
"0.6929372",
"0.6903047",
"0.6899655",
"0.6899655",
"0.688039",
"0.68649715",
"0.68618995",
"0.68586665",
"0.68477386",
"0.68366665",
"0.6812782",
"0.6807947",
"0.68078786",
"0.6803727",
"0.6796845",
"0.67935634",
"0.67935634",
"0.67894953",
"0.67862976",
"0.67815566",
"0.6777874",
"0.67700446",
"0.6764179",
"0.6747784",
"0.6747784",
"0.67476946",
"0.6746584",
"0.67417157",
"0.67370653",
"0.6727131",
"0.6714694",
"0.66953164",
"0.6693583",
"0.6690321",
"0.66898996",
"0.6689058",
"0.66865313",
"0.6684526",
"0.66717213",
"0.6670211",
"0.6666833",
"0.6666833",
"0.66633433",
"0.6663041",
"0.6661699",
"0.6658396",
"0.6657984",
"0.665473",
"0.6644314",
"0.66343915",
"0.6633082",
"0.6629606",
"0.6629606",
"0.6620677",
"0.6620635",
"0.66180485",
"0.66171867",
"0.6612161",
"0.6610249",
"0.660762",
"0.6597593",
"0.6596027",
"0.6595597",
"0.65925545",
"0.65920216",
"0.65896076",
"0.65822965",
"0.6581996",
"0.65817595",
"0.65770084",
"0.65768373",
"0.6575926",
"0.65713066",
"0.6569505",
"0.656938",
"0.65680295",
"0.65636957",
"0.65636957",
"0.65624565",
"0.65597314",
"0.6559697",
"0.65576696",
"0.65573514",
"0.65564495",
"0.6556307",
"0.655628",
"0.65558994",
"0.6549784",
"0.6549675",
"0.65461886"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id) {
$dorp = Dorp::find($id);
$dorp->naam = $request->naam;
$dorp->save();
if($request->hasFile('avatar')) {
try {
$image = Imagemanager::where('dorp_id', '=', $id)->first();
Storage::delete('/img/' . $image->img);
} catch (\ErrorException $e) {
$image = new Imagemanager;
}
$avatar = $request->file('avatar');
$filename = $request->naam . '.' . $avatar->getClientOriginalExtension();
Image::make($avatar)->resize(500, 860)->save( public_path('/img/' . $filename ));
$image->img = $filename;
$image->dorp_id = $dorp->id;
$image->save();
}
return view('admin.dorp.edit', [ 'dorp' => Dorp::find($id),
'message' => 'Dorp is successfully edited']);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id) {
try {
Storage::delete('/img/' . Imagemanager::where('dorp_id', '=', $id)->first()->img);
Imagemanager::where('dorp_id', '=', $id)->first()->delete();
} catch (\ErrorException $e) {
}
Dorp::find($id)->delete();
return redirect('admin/dorp/');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
fonction pour supprimer un commentaire | public function deleteComment($commentId)
{
$db = $this->dbconnect();
$deletedComment = $db->prepare('DELETE from comments WHERE id = ?');
$affectedLines = $deletedComment->execute(array($commentId));
return $affectedLines;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function remove()\n {\n $model = $this->getModel('comments');\n $count = $model->delete();\n if($count === false){\n $msg = JText::_('COM_JOOMGALLERY_COMMAN_MSG_ERROR_DELETING_COMMENT');\n } else {\n if($count == 1){\n $msg = JText::_('COM_JOOMGALLERY_COMMAN_MSG_COMMENT_DELETED');\n } else {\n $msg = JText::sprintf('COM_JOOMGALLERY_COMMAN_MSG_COMMENTS_DELETED', $count);\n }\n }\n\n $this->setRedirect($this->_ambit->getRedirectUrl(), $msg);\n }",
"function supprimerCommentaire($_idCommentaire){\n $connexion= my_connect();\n $requette_commentaire=\"DELETE FROM Commentaires where Idcommentaire = $_idCommentaire\";\n $table_commentaire_resultat = mysqli_query($connexion,$requette_commentaire); \n if(!$table_commentaire_resultat){ \n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo\"message de mysqli:\".mysqli_error($connexion); \n }\n mysqli_close($connexion);\n }",
"public function DeleteComment(){\r\n $this->idPost();\r\n $this->comment(); \r\n $this->_commentManager->DeleteComment($this->_idPostSecure);\r\n header('location: Gestioncommentaire'); \r\n }",
"function warquest_home_comment_delete_do() {\r\n\t\r\n\t/* input */\r\n\tglobal $uid;\r\n\t\r\n\t/* output */\r\n\tglobal $comment;\r\n\tglobal $output;\r\n\t\r\n\tif (warquest_db_comment_delete($uid) == 1) {\r\n\t\t\r\n\t\t$message = t('HOME_MESSAGE_DELETED');\r\n\t\t$output->popup .= warquest_box_icon(\"info\", $message);\t\t\r\n\t\t\r\n\t\t$comment=\"\";\r\n\t\t$uid=0;\r\n\t}\r\n}",
"function wp_untrash_comment($comment_id)\n {\n }",
"public function removeAllComments() {}",
"function deleteComment($id){\n}",
"public function DeleteCommentProfil(){\n $valInfoMovie = new InfoMovie();\n $valUser = new User();\n $pre_reponse = $valInfoMovie->SQLgetOne(BDD::getInstance(),$_GET[\"param\"]);\n\n //On vérifie que la personne qui supprime est l'auteur ou admin\n if (($pre_reponse[1][\"ID_USER\"] != $_SESSION[\"ID_USER\"]) OR ($valUser->CheckAdminUser())){\n header(\"location:/\");\n }\n\n $valInfoMovie->setRate(-1);\n $valInfoMovie->setComment(\"\");\n\n $response = $valInfoMovie->SQLUpdateInfoMovie(BDD::getInstance(),$_GET[\"param\"]);\n\n if ($response[0]) {\n header(\"location:/profil\");\n } else {\n echo \"Une erreur c'est produite : \" . $response[1];\n }\n }",
"public function delete_comment() {\n\t\tif ($this->request->is('get')) {\n\t\t\t$comment_id = $_GET['comment_id'];\n\t\t\t$content_id = $_GET['content_id'];\n\t\t\t$db = ConnectionManager::getDataSource('default');\n\t\t\t$db->rawQuery(\"DELETE FROM tweet_comments WHERE id=\".$comment_id.' AND comment_type= \"tweets\"');\n\t\t\t\n\t\t\t$total_tweet_reply = ClassRegistry::init('tweet_comments')->find('all',array('fields'=>array('tweet_comments.content_id'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'conditions'=>array('tweet_comments.content_id='.$content_id.' AND tweet_comments.comment_type=\"tweets\"')));\n\t\t\techo $total_tweet_reply = sizeof($total_tweet_reply);\n\t\t\t$this->autorender = false;\n\t \t$this->layout = false;\n\t \t$this->render('delete_comment');\n\t\t}\n\t\t\n\t}",
"public function deleteComment() {\n parse_str(file_get_contents('php://input'), $_DELETE);\n if(isset($_DELETE['idComm'])) {\n try {\n $modelComment = new Comments(Database::instance());\n $modelComment->deleteComment($_DELETE['idComm']);\n\n $this->commentLog(\"/\", \"DELETE\", 204);\n } catch (\\PDOException $ex) {\n $this->errorLog(\"deleteComment()\", $ex->getMessage());\n\n }\n\n } else {\n $this->json(null, 403);\n }\n }",
"public function delete()\n {\n $data = Comment::where(\"reply\", $this->id)->get();\n foreach ($data as $comment) {\n $comment->delete();\n }\n\n /**\n * Delete self\n */\n parent::delete();\n }",
"function delete_comment_data(){\n\t\t$this->layout = 'ajax';\n\t\t$comment_id = $_POST['comment_id'];\n\n\t\tif($this->Comment->delete($comment_id)){\n\t\t\techo 'deleted';\n\t\t}\n\t\texit;\n\t}",
"function erase($id) {\r\n\t\r\n\tglobal $link;\r\n\tdelete(array('table' => 'commentaires', 'link' => $link, 'id' => $id));\r\n\tSession::write('success','Commentaire supprimé avec succès.');\r\n\tredirect('commentaires/index');\r\n}",
"public function deleteComment($receipePage,$commentToRemove) {\n $this->chatHandler->deleteComment($receipePage,$commentToRemove);\n }",
"public function delete() {\n\t\tif(isset($this->args[1]) && $this->user()) {\n\t\t\ttry {\n\t\t\t\t$this->commentsModel->delete($this->args[1], $this->user->model->userID);\n\t\t\t\t$this->view->setVar('message', 'Deleted comment');\n\t\t\t} catch(exception $excpt) {\n\t\t\t\t$this->view->setError($excpt);\n\t\t\t}\n\t\t}\n\t}",
"function wp_delete_comment($comment_id, $force_delete = \\false)\n {\n }",
"function supprimerToutCommentaires($_idRecette){\n // recherche de tout les commentaires de la recette\n $connexion= my_connect();\n $requette_commentaire=\"SELECT Idcommentaire FROM Commentaires where Idrecette = $_idRecette\";\n $table_commentaire_resultat = mysqli_query($connexion,$requette_commentaire); \n if($table_commentaire_resultat){ \n while($ligne_commentaire=mysqli_fetch_object($table_commentaire_resultat)){\n supprimerCommentaire($ligne_commentaire->Idcommentaire);\n }\n }\n else{\n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo\"message de mysqli:\".mysqli_error($connexion);\n }\n mysqli_close($connexion);\n }",
"function delete_comment($comment_id) {\n global $db;\n $query = 'DELETE FROM comments\n WHERE comment_id = :comment_id';\n $statement = $db->prepare($query);\n $statement->bindValue(':comment_id', $comment_id);\n $statement->execute();\n $statement->closeCursor();\n }",
"function wp_unspam_comment($comment_id)\n {\n }",
"public function removeAllComments() {\n\t\t$this->comments = $this->objectManager->create('\\\\TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\ObjectStorage');\n\t}",
"function delete_comment($comment_id){\n $comment_id = (int)$comment_id;\n\n mysql_query(\"DELETE FROM comments WHERE comment_id = $comment_id\");\n }",
"private function deleteComment()\n {\n try\n {\n $request = $_REQUEST;\n //check if video id provided\n if( !isset($request['comment_id']) || $request['comment_id']==\"\" )\n throw_error_msg(\"comment id not provided\");\n\n if(!is_numeric($request['comment_id']))\n throw_error_msg(\"invalid comment id\");\n\n //check if type provided\n if( !isset($request['type']) || $request['type']==\"\" )\n throw_error_msg(\"type not provided\");\n\n if(!userid())\n throw_error_msg(lang(\"you_not_logged_in\"));\n\n global $myquery;\n\n $cdetails = $myquery->get_comment((int)$request['comment_id']);\n \n if(!$cdetails)\n throw_error_msg(\"provided comment not exist\");\n \n $myquery->delete_comment((int)$request['comment_id'], clean($request['type']));\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg())\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'comments deleted', \"data\" => array());\n $this->response($this->json($data));\n }\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }",
"public function deleteComment($ucid)\n {\n $content = $this->md_to_html->text(htmlspecialchars(urldecode('_[[deleted]]_')));\n $timestamp = date(DateTime::ISO8601);\n $stmt = $this->db->prepare('UPDATE comments SET content = :content, timestamp = :timestamp, is_deleted = 1 WHERE ucid = :ucid');\n $stmt->bindValue(':content', $content);\n $stmt->bindValue(':timestamp', $timestamp);\n $stmt->bindValue(':ucid', $ucid);\n $stmt->execute();\n }",
"public function commentDestroy($id) {\n\t\t$id = $_POST['id'];\n\t\techo Comment::destroy($id);\n\t}",
"public function destroy(Commentaire $commentaire)\n {\n //\n }",
"public function deletecommentaire($id){\n \n $bdd = $this->bdConnect();\n $req = $bdd->prepare('DELETE FROM commentaires WHERE id=?');\n $req->execute(array($id));\n }",
"public function delete(Comment $comment)\n {\n $this->db->pdo->exec('DELETE FROM comments WHERE idnews = '. $comment->idNews());\n }",
"public function afterDelete()\n {\n if (parent::afterDelete()) {\n (new Query)->createCommand()\n ->delete('comment', ['id' => $this->id])\n ->execute();\n }\n }",
"function remove(iEntityComment $entity);",
"function delete_comment($comment_id) {\n $comment_id = (int)$comment_id;\n \n mysql_query(\"DELETE FROM `comments` WHERE `comment_id`=$comment_id AND `user_id`=\".$_SESSION['user_id']);\n}",
"public function del_com($id){\n $query = $this->db->prepare(\"DELETE FROM commentaires WHERE id_com = '$id'\");\n \n $query->execute();\n }",
"function deleteComment($commentid) {\n\t$commentid = intval($commentid);\n\treturn(dbQuery(\"UPDATE comments SET deleted=1 WHERE id=$commentid AND userid=$_SESSION[id]\"));\n}",
"public function actionDelVehicleCommentInd(){\n\t $id = $_POST['comment_id'];\n\t $c = VehicleComments::model()->findByPk($id);\n\t $c->deleted = 1;\n\t $c->save();\n\t \n\t}",
"public function deleteComment(int $id);",
"function delete_comment($cid, $objid) {\n global $myquery;\n $tdetails = $this->get_topic_details($objid);\n $gdetails = $this->get_group_details($tdetails['group_id']);\n\n $forceDelete = false;\n if (userid() == $gdetails['userid'])\n $forceDelete = true;\n $myquery->delete_comment($cid, 't', false, $forceDelete);\n $this->update_comments_count($objid);\n }",
"public function delete()\n {\n $oRemark = oxNew(\"oxRemark\");\n $oRemark->delete(oxRegistry::getConfig()->getRequestParameter(\"rem_oxid\"));\n }",
"function delete_comment_meta($comment_id, $meta_key, $meta_value = '')\n {\n }",
"public function deleteComment($id){\n $deleteComment= \"DELETE FROM comments WHERE comment_id = '\".$id.\"'\";\n return parent::executeModification($deleteComment);\n }",
"public function deletComment($user, $timestamp) {\r\n \r\n $sql = \"DELETE FROM RecipeComments\r\n WHERE username = '$user' AND timestamp = '$timestamp' AND page = '$this->page'\";\r\n \r\n mysqli_query($this->conn, $sql);\r\n \r\n }",
"function deleteComment()\n {\n /*if(isset($_REQUEST['comment_id']) && $_REQUEST['comment_id']>0 && $_REQUEST['id'] > 0)\n {\n $result=DB::query(\"select * from \" . CFG::$tblPrefix . \"ticket_comment where id=%d\",$_REQUEST['comment_id']);\n if(count($result)>0)\n {\n foreach($result as $key=>$value)\n {\n \n $sub_comment=DB::query(\"select * from \" . CFG::$tblPrefix . \"ticket_comment where parent_commentId=%d\",$value['id']);\n if(count($sub_comment)>0)\n {\n foreach($sub_comment as $skey=>$svalue)\n {\n \n $arrFields['is_deleted'] = \"1\";\n DB::Update(CFG::$tblPrefix.\"ticket_comment\",Stringd::processString($arrFields),\" id = %d \",$svalue['id']); \n $this->sub_comment_delete($svalue['id']);\n }\n }\n $arrFields['is_deleted'] = \"1\";\n DB::Update(CFG::$tblPrefix.\"ticket_comment\",Stringd::processString($arrFields),\" id = %d \",$value['id']); \n }\n }\n \n $_SESSION['actionResult']=array(\"success\"=>\"Comment have been deleted successfully\"); // different type success, info, warning, error\n \n UTIL::redirect(URI::getUrl(APP::$moduleName,\"ticket_view\",$_REQUEST['id']));\n }\n else\n {\n $_SESSION['actionResult']=array(\"error\"=>\"Comment have not been deleted successfully\"); // different type success, info, warning, error\n UTIL::redirect(URI::getUrl(APP::$moduleName,\"ticket_view\",$_REQUEST['id']));\n }*/\n \n /*\n * \n * Delete for single comment\n */\n if(isset($_REQUEST['comment_id']) && $_REQUEST['comment_id']>0 && $_REQUEST['id'] > 0)\n {\n $result=DB::query(\"select * from \" . CFG::$tblPrefix . \"ticket_comment where id=%d\",$_REQUEST['comment_id']);\n if(count($result)>0)\n {\n foreach($result as $key=>$value)\n {\n $arrFields['is_deleted'] = \"1\";\n DB::Update(CFG::$tblPrefix.\"ticket_comment\",Stringd::processString($arrFields),\" id = %d \",$value['id']); \n }\n $_SESSION['actionResult']=array(\"success\"=>\"Comment have been deleted successfully\"); // different type success, info, warning, error\n \n UTIL::redirect(URI::getUrl(APP::$moduleName,\"ticket_view\",$_REQUEST['id']));\n }\n else\n {\n $_SESSION['actionResult']=array(\"error\"=>\"Comment have not been deleted successfully\"); // different type success, info, warning, error\n UTIL::redirect(URI::getUrl(APP::$moduleName,\"ticket_view\",$_REQUEST['id']));\n }\n \n }\n else\n {\n $_SESSION['actionResult']=array(\"error\"=>\"Comment have not been deleted successfully\"); // different type success, info, warning, error\n UTIL::redirect(URI::getUrl(APP::$moduleName,\"ticket_view\",$_REQUEST['id']));\n }\n \n }",
"function wp_ajax_delete_comment()\n {\n }",
"public function deleteComment($comment_uid) {\r\n\t\ttx_cwtcommunity_lib_common::dbUpdateQuery('DELETE FROM tx_cwtcommunity_photo_comments WHERE uid = \"'.intval($comment_uid).'\";');\r\n\t}",
"public function destroy(comment $comment)\n {\n //\n }",
"function wpachievements_wordpress_comment_del($cid){\r\n if( !empty($cid) ){\r\n $cdata = get_comment($cid);\r\n $type='comment_remove'; $uid=$cdata->user_id; $postid='';\r\n if( !function_exists(WPACHIEVEMENTS_CUBEPOINTS) && !function_exists(WPACHIEVEMENTS_MYCRED) ){\r\n if(function_exists('is_multisite') && is_multisite()){\r\n $points = (int)get_blog_option(1, 'wpachievements_comment_points');\r\n } else{\r\n $points = (int)get_option('wpachievements_comment_points');\r\n }\r\n }\r\n if(empty($points)){$points=0;}\r\n wpachievements_new_activity($type, $uid, $postid, -$points);\r\n }\r\n }",
"public function commentDelete(){\n if (Security::isAuthenticated()) {\n $commentid = $_GET['id'];\n $commentRepository = new CommentRepository();\n //call to readById\n $comment = $commentRepository->readById($commentid);\n if ($comment->id == Security::getUserId()) {\n if($commentRepository->deleteById($commentid)){\n header('Location: /comment/showComments?id='.$comment->postid);\n }\n }\n }\n }",
"function del_comments(){\n\nglobal $db,$log;\n$id = $_POST['selecionar'];\n$ids = implode(',',$id);\nif ($id != null) {\n$showids = $ids ;\n}else {\nshow_error(HACKING_ATTEMPT);\n}\n\n$result = $db->sql_query(\"DELETE FROM \". COMMENTS_TABLE .\" WHERE tid IN ($ids)\");\n$result = $db->sql_query(\"UPDATE \".STORY_TABLE.\" SET comments=comments-1 WHERE sid IN ($ids)\");\nif ($result) {\n$log->lwrite('admin',''. _ADMIN .\":\". LOG_MULTI_DELETE_COMMENTS.'');\n header(\"Location: \".$_SERVER['HTTP_REFERER'].\" \"); \n}else {\nshow_error(SQL_ERROR .\"<br>\".mysql_error());\n}\n}",
"public function deleteCommentAction()\n {\n $this->confirmSession();\n $this->view->disable();\n if ($this->request->hasPost('commentId')) {\n $comment = Comments::findFirst([\n 'conditions' => 'id = ?0 AND isDeleted = 0 AND userId = ?1',\n 'bind' => [\n $this->request->getPost('commentId'),\n $this->session->get('user')['id']\n ]\n ]);\n \n if (!$comment) {\n $this->redirect('/index/notFound');\n return;\n }\n\n $comment->isDeleted = 1;\n $comment->updatedAt = date('Y-m-d H:i:s');\n\n $comment->save();\n\n $this->redirect(\"/index/postDetails?id={$comment->newsId}\");\n }\n }",
"function delete_comments($tid) {\n global $myquery;\n $tdetails = $this->get_topic_details($tid);\n $gdetails = $this->get_group_details($tdetails['group_id']);\n $forceDelete = false;\n if (userid() == $gdetails['userid']) {\n $forceDelete = true;\n $myquery->delete_comments($tid, 't', $forceDelete);\n $this->update_comments_count($objid);\n }\n }",
"public function delete() {\n $commentid = $_GET['commentid'];\n Comment::deleteComment($commentid);\n \n //note to self: might be a solution to redirect after deleting?\n// require_once('views/comments/readwithcomments.php');\n }",
"function suggestcomment_delete_comment($id){\n global $wpdb;\n $table_name = $wpdb->prefix . \"suggestcomment\";\n $sql = \"DELETE FROM $table_name WHERE comment_id='$id'\";\n $results = $wpdb->query($sql);\n}",
"public function delCommentaire($idCommentaire)\n {\n $ids = implode(\",\",array_map('intval',$_POST['id_del']));\n $sql = 'SELECT COUNT(*) FROM commentaires WHERE id IN(' . $ids . ')';\n $nbSuppr = $this->executerRequete($sql, array());\n $sql = 'SELECT COUNT(*) FROM commentaires WHERE abusif=1';\n $nbTotalAbusif = $this->executerRequete($sql, array());\n $sql = 'DELETE FROM commentaires WHERE id IN(' . $ids . ')';\n $this->executerRequete($sql, array($idCommentaire));\n $tab=array($nbSuppr,$nbTotalAbusif);\n return $tab;\n }",
"public function destroy($id) {\n Comment::destroy($id);\n\n return 'Commentaire supprimé';\n }",
"public function adminDelComm()\n {\n $commID = $_POST['commID'];\n $del = \"DELETE FROM comment_section WHERE comm_id = ?\";\n $do = $this->connect()->prepare($del);\n $do->execute([$commID]);\n }",
"function deleteCom($comId)\n{\n $affectedLines = commentDelete($comId);\n if ($affectedLines === false) {\n throw new Exception('Impossible de supprimer le commentaires');\n }\n else {\n header('Location: index.php?action=manageComments');\n }\n}",
"function delete_comment($id){\n $sql=\"delete from comment where id = ?\";\n DB::delete($sql, array($id));\n}",
"public function delete_comment($id){\n// if(!$this->get_comment($comment_id)){\n// return FALSE;\n// }\n// \n// //delete media in comment\n// $this->load->model('member_model');\n// $medias = $this->member_model->get_medias_by('topic_comment_id', $comment_id);\n// if($medias){\n// foreach ($medias as $media){\n// $this->member_model->delete_media($media->id);\n// }\n// }\n \n //delete comment\n $this->db->where('id', $id);\n $this->db->update('user_pettalk_comments', array('status' => 2));\n \n return TRUE;\n }",
"public function destroy(Comment $comment)\n {\n //\n }",
"public function destroy(Comment $comment)\n {\n //\n }",
"public function destroy(Comment $comment)\n {\n //\n }",
"public function destroy(Comment $comment)\n {\n //\n }",
"public function destroy(Comment $comment)\n {\n //\n }",
"public function destroy(Comment $comment)\n {\n //\n }",
"public function destroy(Comment $comment)\n {\n //\n }",
"public function destroy(Comment $comment)\n {\n //\n }",
"function remove() {\n\t\t$option = JRequest::getCmd('option');\n\t\t// Se obtienen los ids de los registros a borrar\n\t\t$cids = JRequest::getVar('cid', array(0), 'post', 'array');\n $product_type_code = JRequest::getVar('product_type_code');\n\n\t\t// Lanzar error si no se ha seleccionado al menos un registro a borrar\n if (count($cids) < 1 || !$product_type_code) {\n\t\t\tJError::raiseError(500, JText::_('CP.SELECT_AN_ITEM_TO_DELETE'));\n\t\t}\n\n\t\t// Se obtiene el modelo\n\t\t$model = $this->getModel('comments');\n\t\t// Se intenta el borrado\n\t\tif ($model->delete($cids, $product_type_code)) {\n\t\t\t$msg = JText::_('CP.DATA_DELETED');\n\t\t\t$type = 'message';\n\t\t} else {\n\t\t\t// Si hay algún error se ajusta el mensaje\n\t\t\t$msg = $model->getError();\n\t\t\tif (!$msg) {\n\t\t\t\t$msg = JText::_('CP.ERROR_ONE_OR_MORE_DATA_COULD_NOT_BE_DELETED');\n\t\t\t}\n\t\t\t$type = 'error';\n\t\t}\n\n\t\t$this->setRedirect('index.php?option=' . $option . '&view=comments', $msg, $type);\n\t}",
"function wp_trash_comment($comment_id)\n {\n }",
"function deleteComment($commentId)\n{\n global $conn;\n\n $sql = \"UPDATE `comment` SET `deleted`= 1 WHERE `commentId`= '$commentId'\";\n mysqli_query($conn, $sql);\n\n\n}",
"function wp_untrash_post_comments($post = \\null)\n {\n }",
"public function removeNodeComments()\n\t{\n\t\t$this->removeNode( 'comments' );\n\t}",
"public function delete() {\n $this->remove_content();\n\n parent::delete();\n }",
"public function delete()\n\t{\n\t\tFoundry::checkToken();\n\n\t\t// Only registered users are allowed here.\n\t\tFoundry::requireLogin();\n\n\t\t// Get the view\n\t\t$view = Foundry::view( 'comments', false );\n\n\t\t// Check for permission first\n\t\t$access = Foundry::access();\n\n\t\t$id\t= JRequest::getInt( 'id', 0 );\n\n\t\t$table\t= Foundry::table( 'comments' );\n\n\t\t$state = $table->load( $id );\n\n\t\tif( !$state )\n\t\t{\n\t\t\t$view->setMessage( $table->getError(), SOCIAL_MSG_ERROR );\n\t\t\treturn $view->call( __FUNCTION__ );\n\t\t}\n\n\t\tif( ! ( $access->allowed( 'comments.delete' ) || ( $access->allowed( 'comments.deleteown' ) && $table->isAuthor() ) ) )\n\t\t{\n\t\t\t$view->setMessage( JText::_( 'COM_EASYSOCIAL_COMMENTS_NOT_ALLOWED_TO_DELETE' ) , SOCIAL_MSG_ERROR );\n\t\t\treturn $view->call( __FUNCTION__ );\n\t\t}\n\n\t\t$state\t= $table->delete();\n\n\t\tif( !$state )\n\t\t{\n\t\t\t$view->setMessage( $table->getError(), SOCIAL_MSG_ERROR );\n\t\t}\n\n\t\t$view->call( __FUNCTION__ );\n\t}",
"function removeSubComments($tid) {\r\n global $prefix, $dbi;\r\n $result = sql_query(\"select tid from $prefix\"._comments.\" where pid='$tid'\", $dbi);\r\n $numrows = sql_num_rows($result, $dbi);\r\n if($numrows>0) {\r\n\twhile(list($stid) = sql_fetch_row($result, $dbi)) {\r\n removeSubComments($stid);\r\n sql_query(\"delete from $prefix\"._comments.\" where tid=$stid\", $dbi);\r\n }\r\n }\r\n sql_query(\"delete from $prefix\"._comments.\" where tid=$tid\", $dbi);\r\n}",
"public function delete($id) {\n // Delete the comment\n $this->getDb()->delete('t_comment', array('com_id' => $id));\n }",
"function remove($id) {\n $query = $this->db->prepare('DELETE FROM comments WHERE id = ?');\n $query->execute([$id]);\n }",
"function deleteComment($commentId, $postId)\r\n{\r\n $commentManager = new Writer\\Blog\\Model\\CommentManager();\r\n $postManager = new Writer\\Blog\\Model\\PostManager();\r\n $blogManager = new Writer\\Blog\\Model\\BlogManager;\r\n \r\n $affectedLines = $commentManager->deleteComment($commentId);\r\n $post = $postManager->getPost($postId);\r\n $comments = $commentManager->getCommentsByStatus($postId);\r\n $descBlog = $blogManager->getBlog();\r\n $counter = $commentManager->matchComments($postId);\r\n \r\n if ($affectedLines === FALSE) {\r\n throw new Exception('Imposible de mettre à jour le commentaire');\r\n }\r\n else {\r\n session_start();\r\n require('view/backend/postView.php');\r\n }\r\n}",
"function deleteAffiliateArticleComment($articleID,$commentID)\n\t\t{ \n\t\t\t$query = \"delete from tbl_subscriber_comment_aff_article where article_id =\".\n\t\t\t$articleID .\" and id =\".$commentID;\t\t\t\t\n\t\t\t\t\n\t\t\t\tif($this->Execute($query))\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\telse\t\n\t\t\t\t\treturn false;\n\t\t}",
"public function clearQuestionComments()\n\t{\n\t\t$this->collQuestionComments = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function deleteCommentaire($idCommentaire)\n {\n $sql=('DELETE FROM T_COMMENTAIRE WHERE COM_ID=?');\n $this->executerRequete($sql, array($idCommentaire));\n }",
"function backoffice_delete($id) {\n\t\n\tglobal $link;\n\t\n\tdelete (array ('table' => 'commentaires', 'link' => $link, 'id' => $id));\n\theader(\"location:\".BASE_URL.\"/homes/backoffice_commentaires\");\t\n\n}",
"function del_magic($id){\n if($id) { // *\n if ($id == $this->stop) { // if this comment is last and oldest\n $query = \"DELETE FROM comments WHERE ID=\".$id; // kill him witch special honors\n $this->my->query($query);\n } else {\n $query = \"SELECT PARENT_ID FROM comments WHERE ID=\".$id;\n try {\n $q = $this->my->query($query);\n $row = $q->fetch_assoc();\n $next_id = $row['PARENT_ID']; // dont forget to store ID of next victim\n $query = \"DELETE FROM comments WHERE ID=\".$id; // *\n $this->my->query($query); // kill\n $this->del_magic($next_id); // continue massacre\n } catch (mysqli_sql_exception $e) {\n echo $e;\n }\n }\n }\n }",
"public function deleteAction()\n {\n $authorization = Zend_Auth::getInstance();\n if(!$authorization -> hasIdentity()) {\n $this->redirect('/users/login');\n }\n else\n {\n // Check if user is Admin\n $userObj = $authorization->getIdentity();\n \n //$this -> view -> data = $this -> model -> listAllUsers(); \n // Get User Id\n $id = $this->getRequest()->getParam('id');\n $thread_id = $this->getRequest()->getParam('thread_id');\n if($comment = $this->model ->getCommentById($id)){\n if ($this->model->deleteComment($id))\n {\n $this->redirect('threads/index/id/'.$thread_id);\n }\n }\n else\n {\n $this->redirect('thread/view/id/'.$thread_id);\n }\n\n\n \n }\n }",
"public function destroy(InstagramAutoComments $instagramAutoComments)\n {\n //\n }",
"function fbComments_uninit() {\n\tdelete_option('fbComments');\n}",
"public function deleteComment($params = [])\n {\n $id_comentario = $params[':ID'];\n $comentario = $this->model->get($id_comentario);\n if (!empty($comentario)) {\n $this->model->delete($id_comentario);\n $this->view->response(\"El comentario se elimino\", 200);\n } else {\n $this->view->response(\"El comentario no existe \", 404);\n }\n }",
"public function deleteip()\n {\n $query = $this->_db->getQuery(true)\n ->update(_JOOM_TABLE_COMMENTS)\n ->set('cmtip='.\"''\");\n\n $this->_db->setQuery($query);\n\n if(!$this->_db->execute())\n {\n // Redirect to maintenance manager because this task is usually launched there\n $this->setRedirect($this->_ambit->getRedirectUrl('maintenance&tab=comments'), $this->_db->getErrorMsg(), 'error');\n\n return;\n }\n\n // Redirect to maintenance manager because this task is usually launched there\n $this->setRedirect($this->_ambit->getRedirectUrl('maintenance&tab=comments'), JText::_('COM_JOOMGALLERY_MAIMAN_CM_MSG_COMMENTS_IPS_DELETED'));\n }",
"public function clearAnswerComments()\n\t{\n\t\t$this->collAnswerComments = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function deletekomen($data)\n {\n return $this->db->delete('tm_comment', array('comment_id' => $data));\n }",
"function deLikeComment($userId, $commentId)\n{\n $sqlDelike = \"DELETE FROM `user_like_comment` WHERE `userId` = '$userId' AND `commentId` = $commentId\";\n mysqli_query($GLOBALS[\"conn\"], $sqlDelike);\n\n}",
"public function delete($id) {\n $query = $this->bdd->prepare('SELECT * FROM chapitres WHERE id = :id');\n $query->execute(['id' => $id]);\n if ($query->rowCount() === 0) {\n $this->errors['delete'] = 'Le chapitre $id n\\'existe pas, vous ne pouvez donc pas le supprimer !';\n } else {\n $comment = new Comment();\n $comment->deleteAllOfArticle($id);\n $reponse = $this->bdd->prepare('DELETE FROM chapitres WHERE id = :id');\n $reponse->execute(['id' => $id]);\n }\n }",
"public function deleted(Comment $comment)\n {\n Cache::forget('comment_'.$comment->id);\n }",
"public function delete()\n {\n $this->comments()->delete();\n return parent::delete();\n }",
"public function deletecomment($record_id, Request $request){ \n\n if($request->user_id == Auth::user()->id || Auth::user()->id == 1){\n $comment = AhkamComment::findOrFail($record_id);\n $notis = Noti::where('comment_id', $record_id);\n DB::transaction(function() use ($comment, $notis) {\n $comment->delete();\n $notis->delete();\n /*\n * Safe saving a file if an error occure db transaction rollback everything\n */\n });\n\n $request->session()->flash('alert-success', ' نظر شما حذف گردید ' );\n return redirect()->back();\n } else {\n return \"انجام نشد \";\n }\n\n\n}",
"function remove_spam_value($id,$status){\r\n if($status == 'spam'){\r\n $tempcomment = get_comment($id);\r\n $email = $tempcomment->comment_author_email;\r\n global $wpdb;\r\n $query = $wpdb->prepare(\"DELETE FROM {$wpdb->prefix}wptwitipid WHERE email = %s\",$email);\r\n $result = $wpdb->query($query); \r\n }\r\n }",
"public function destroy(DirectComment $directComment)\n {\n //\n }",
"public function testCollectionTicketCommentsDelete()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function deleteTextPostComment(TextPostComment $comment){\n if(Auth::user()->can('delete', $comment))\n {\n $comment->delete();\n }\n return redirect()->back();\n }",
"function supprimerRecette($_idRecette){\n // suppression de la table des favoris des tilisateurs qui l'ot msie comme favoris\n supprimerFavoris($_idRecette);\n // suppression de tout les commentaires de la recette\n supprimerToutCommentaires($_idRecette);\n // suppression des ingrédients de la recette\n supprimerToutIngredients($_idRecette);\n // suppression de la recette\n $connexion= my_connect();\n $requette_recettes=\"DELETE FROM Recettes where Idrecette = $_idRecette\";\n $table_recettes_resultat = mysqli_query($connexion,$requette_recettes); \n if(!$table_recettes_resultat){ \n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo\"message de mysqli:\".mysqli_error($connexion); \n }\n mysqli_close($connexion);\n }",
"function SupprimerMessage($Utilisateur1,$Utilisateur2){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"DELETE FROM Messages WHERE ((mp_receveur='$Utilisateur1')||(mp_expediteur='$Utilisateur1'))&&((mp_receveur='$Utilisateur2')||(mp_expediteur='$Utilisateur2'))\";\r\n\t\t$ligne= mysqli_query($conn, $requete);\t\r\n\t\tmysqli_close($conn);\r\n\t\t}",
"public function destroy(ImageComment $imageComment)\n {\n //\n }",
"public function remove_comment($id)\r\n\t{\r\n\t\t// returns true|false on success|fail\r\n\t\treturn $this->db->delete($this->_table['comments'], ['id' => $id]);\r\n\t}",
"public function destroy($id)\n\t{\n\t\t$delete_data = fc_comment::where('id',$id)->first();\n\t\t$delete_data->delete();\n\t\treturn redirect(\"admin/comments\");\n\t}"
] | [
"0.7541959",
"0.7455158",
"0.72495204",
"0.7248715",
"0.7136635",
"0.70373666",
"0.6997191",
"0.6949782",
"0.69133735",
"0.6850445",
"0.6828559",
"0.6785951",
"0.67853415",
"0.67823714",
"0.675948",
"0.6756106",
"0.6751455",
"0.674438",
"0.67413884",
"0.6662638",
"0.6661989",
"0.6654885",
"0.6646273",
"0.6645088",
"0.6630089",
"0.6626676",
"0.6624776",
"0.6610874",
"0.6597053",
"0.6592206",
"0.6585237",
"0.6568903",
"0.6544713",
"0.65263885",
"0.6517891",
"0.651121",
"0.65011",
"0.64972955",
"0.64874816",
"0.6483559",
"0.64772195",
"0.64740753",
"0.6468883",
"0.6460703",
"0.6409384",
"0.640933",
"0.63964266",
"0.639376",
"0.63897926",
"0.6382474",
"0.6379681",
"0.6366738",
"0.6314098",
"0.6312805",
"0.6309926",
"0.6307289",
"0.62993866",
"0.62993866",
"0.62993866",
"0.62993866",
"0.62993866",
"0.62993866",
"0.62993866",
"0.62993866",
"0.62784714",
"0.6273718",
"0.6271247",
"0.62592876",
"0.62585026",
"0.6253774",
"0.6252309",
"0.62506586",
"0.62485164",
"0.6246655",
"0.6237557",
"0.6178759",
"0.61633134",
"0.6157333",
"0.6150722",
"0.61330324",
"0.61321217",
"0.6128374",
"0.6124494",
"0.6121038",
"0.6097663",
"0.6091295",
"0.6087501",
"0.6084596",
"0.60844654",
"0.6058335",
"0.6048756",
"0.6015334",
"0.601312",
"0.60128796",
"0.60119224",
"0.60111153",
"0.5990653",
"0.59792745",
"0.59788644",
"0.5976136",
"0.5955736"
] | 0.0 | -1 |
fonction pour signaler un commentaire | public function reportComment($commentId)
{
$db = $this->dbConnect();
$reportedComment = $db->prepare('UPDATE comments SET report = 1 WHERE id = ?');
$reportedComment->execute(array($commentId));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function record_comment(){\n\t\t\t\n\t\t}",
"abstract public function comment();",
"function postCommentNotify($id, $postId){\r\n $commentManager = new CommentsManager();\r\n $notify = $commentManager->postNotify($id);\r\n}",
"function addCommentHandler() {\n global $inputs;\n\n $content = $inputs['content'];\n $id = $inputs['id'];\n $replyId = insert('reply',[\n 'content' => $content\n ]);\n\n insert('posting_reply',[\n 'posting_id' => $id,\n 'reply_id' => $replyId\n ]);\n\n insert('member_reply',[\n 'member_id' => getLogin()['mid'],\n 'posting_id' => $id\n ]);\n\n formatOutput(true, 'success');\n}",
"function wp_new_comment_notify_moderator($comment_id)\n {\n }",
"public function the_comment()\n {\n }",
"function wp_spam_comment($comment_id)\n {\n }",
"public function comments(){\n }",
"public function flag_comment() {\n\t\t\tif ( empty( $_REQUEST[ 'comment_id' ] ) || (int) $_REQUEST[ 'comment_id' ] != $_REQUEST[ 'comment_id' ] ) {\n\t\t\t\t$this->cond_die( __( $this->invalid_values_message ) );\n\t\t\t}\n\n\t\t\t$comment_id = (int) $_REQUEST[ 'comment_id' ];\n\t\t\tif ( $this->already_flagged( $comment_id ) ) {\n\t\t\t\t$this->cond_die( __( $this->already_flagged_message ) );\n\t\t\t}\n\n\t\t\t// checking if nonces help\n\t\t\tif ( ! isset( $_REQUEST[ 'sc_nonce' ] ) || ! wp_verify_nonce( $_REQUEST[ 'sc_nonce' ], $this->_plugin_prefix . '_' . $this->_nonce_key ) ) {\n\t\t\t\t$this->cond_die( __( $this->invalid_nonce_message ) );\n\t\t\t} else {\n\t\t\t\t$this->mark_flagged( $comment_id );\n\t\t\t\t$this->cond_die( __( $this->thank_you_message ) );\n\t\t\t}\n\n\t\t}",
"function register_block_core_comment_reply_link()\n {\n }",
"function warquest_home_comment_save_do() {\r\n\r\n\t/* input */\r\n\tglobal $player;\r\n\tglobal $uid;\r\n\tglobal $other;\r\n\tglobal $comment;\r\n\r\n\t/* output */\r\n\tglobal $output;\r\n\r\n\tif (strlen($comment)>0) {\r\n\t\r\n\t\tif ($uid==0) {\r\n\t\t\twarquest_db_comment_insert(0, 0, $player->pid, $other->pid, $comment);\r\n\t\t} else {\t\t\r\n\t\t\twarquest_db_comment_update($uid, $comment);\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($other->pid)) {\r\n\t\t\r\n\t\t\t$other->comment_notification++;\r\n\t\t\twarquest_comment_mail($other->pid, $comment, $player->name);\r\n\t\t\t$message = t('ALLIANCE_COMMENT_PLAYER', player_format($other->pid, $other->name, $other->country));\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\t$message = t('ALLIANCE_COMMENT_ALL');\r\n\t\t\twarquest_info(\"Post message: \".$comment);\t\t\r\n\t\t}\t\t\r\n\r\n\t\t/* Clear input parameters */\r\n\t\t$uid = 0;\r\n\t\t\r\n\t\t$output->popup .= warquest_box_icon(\"info\", $message);\r\n\t}\r\n}",
"public function changeComment($comment)\r\n {\r\n\r\n }",
"static function comment_post($id_comment){\n if(!(($id_user = PDOQueries::get_post_publisher_id_by_comment($id_comment)) > 0) || !(($id_post = PDOQueries::get_post_id_by_comment($id_comment)) > 0) || !(($id_publisher = PDOQueries::get_publisher_id($id_post)) > 0))\n throw new \\PersonalizeException(2001);\n $marker = '{comment_post}{id_publisher/'.$id_user.'}';\n $link = 'index.php?'.Navigation::$navigation_marker.'='.Timeline::$post_id_page.'#'.$id_post.$id_comment;\n return PDOQueries::add_notification($id_publisher,$marker,$link);\n }",
"public function comment($comment)\n {\n $this->comments[] = $comment;\n }",
"public function addOneComment(){\n\t\tif (!empty($_POST['user_name']) && !empty($_POST['content'])){\n\t\t\t$values = array(\n \t\t'user_name' => $_POST['user_name'],\n\t\t\t'content' => $_POST['content'],\n\t\t\t'post_id' => $_POST['post_id']\n\t\t);\n\n\t\t$sqlfuncs = array(\n \t\t'date_creation' => 'NOW()',\n\t\t);\n\n\t$this->pInsertFunc(\"INSERT INTO\", \"comment\", $values, $sqlfuncs);\n\t\t\techo '<script>alert(\"Le commentaire a bien été envoyé.\")</script>';\n\t\t}\n\n\t}",
"public function addComment()\n {\n session_start();\n $superglobalsPost = $this->getSuperglobals()->get_POST();\n $newComment = new CommentManager;\n $superglobalsPost['status'] = \"waiting\";\n $newComment->createComment($superglobalsPost);\n if (isset($superglobalsPost['post_id'])) {\n $post_id = $superglobalsPost['post_id'];\n }\n $titleAction = \"Confirmation d'enregistrement\"; //confirmation message\n $actionConfirmation = \"/post?id=\" . $post_id;\n $textConfirmation = \"Votre commentaire a bien été enregistré\";\n echo $this->getRender()->render('confirmationTemplate.twig', [\n 'titleAction' => $titleAction,\n 'actionConfirmation' => $actionConfirmation,\n 'textConfirmation' => $textConfirmation,\n 'session' => $this->getSuperglobals()->get_SESSION()\n ]);\n }",
"public function comment($comment) {\n $comment['InsertUserID'] = Gdn::session()->UserID;\n $comment['DateInserted'] = Gdn_Format::toDateTime();\n $comment['InsertIPAddress'] = ipEncode(Gdn::request()->ipAddress());\n\n $this->Validation->applyRule('ActivityID', 'Required');\n $this->Validation->applyRule('Body', 'Required');\n $this->Validation->applyRule('DateInserted', 'Required');\n $this->Validation->applyRule('InsertUserID', 'Required');\n\n $this->EventArguments['Comment'] = &$comment;\n $this->fireEvent('BeforeSaveComment');\n\n if ($this->validate($comment)) {\n $activity = $this->getID($comment['ActivityID'], DATASET_TYPE_ARRAY);\n\n $_ActivityID = $comment['ActivityID'];\n // Check to see if this is a shared activity/notification.\n if ($commentActivityID = val('CommentActivityID', $activity['Data'])) {\n Gdn::controller()->json('CommentActivityID', $commentActivityID);\n $comment['ActivityID'] = $commentActivityID;\n }\n\n $storageObject = FloodControlHelper::configure($this, 'Vanilla', 'ActivityComment');\n if ($this->checkUserSpamming(Gdn::session()->User->UserID, $storageObject)) {\n return false;\n }\n\n // Check for spam.\n $spam = SpamModel::isSpam('ActivityComment', $comment);\n if ($spam) {\n return SPAM;\n }\n\n // Check for approval\n $approvalRequired = checkRestriction('Vanilla.Approval.Require');\n if ($approvalRequired && !val('Verified', Gdn::session()->User)) {\n LogModel::insert('Pending', 'ActivityComment', $comment);\n return UNAPPROVED;\n }\n\n $iD = $this->SQL->insert('ActivityComment', $comment);\n\n if ($iD) {\n // Check to see if this comment bumps the activity.\n if ($activity && val('Bump', $activity['Data'])) {\n $this->SQL->put('Activity', ['DateUpdated' => $comment['DateInserted']], ['ActivityID' => $activity['ActivityID']]);\n if ($_ActivityID != $comment['ActivityID']) {\n $this->SQL->put('Activity', ['DateUpdated' => $comment['DateInserted']], ['ActivityID' => $_ActivityID]);\n }\n }\n\n // Send a notification to the original person.\n if (val('ActivityType', $activity) === 'WallPost') {\n $this->notifyWallComment($comment, $activity);\n }\n }\n\n return $iD;\n }\n return false;\n }",
"function charangoten_custom_comment(&$a1, $op) {\n if ($op == 'insert' || $op == 'update') {\n if ($a1['stream_publish']) {\n //dpm($a1, \"dff_custom_comment, publishing to stream\");\n $node = node_load($a1['nid']);\n \n // http://wiki.developers.facebook.com/index.php/Attachment_(Streams)\n $attachment = array(\n 'name' => $a1['subject'],\n 'href' => url('node/' . $a1['nid'], array('absolute' => TRUE, 'fragment' => 'comment-' . $a1['cid'])),\n 'description' => $a1['comment'],\n 'properties' => array(t('In reply to') => array('text' => $node->title, 'href' => url(\"node/\" . $node->nid, array('absolute' => TRUE)))),\n );\n\n $user_message = t('Check out my latest comment on !site...',\n array('!site' => variable_get('site_name', t('my Drupal for Facebook powered site'))));\n $actions = array();\n $actions[] = array('text' => t('Read More'),\n 'href' => url('node/'.$a1['nid'], array('absolute' => TRUE)),\n );\n fb_stream_publish_dialog(array('user_message' => $user_message,\n 'attachment' => $attachment,\n 'action_links' => $actions,\n ));\n }\n }\n\n}",
"function slack_comment( $comment_id ) : void {\n\t$comment = get_comment( $comment_id );\n\t$post = get_post( $comment->comment_post_ID );\n\t$category = get_the_category( $post->ID )[0]->slug;\n\t$author = get_user_by( 'id', $comment->user_id );\n\t$message = stripslashes( wp_strip_all_tags( sanitize_textarea_field( wp_unslash( $comment->comment_content ) ) ) );\n\n\t$channel = [\n\t\t'air' => '#airseries',\n\t\t'air-pro' => '#airseries-pro',\n\t\t'capsules' => '#capsules',\n\t\t'in-training-exam-prep' => '#ite-prep',\n\t][ $category ] ?? '#aliemu';\n\n\tslack_message(\n\t\t$channel,\n\t\t[\n\t\t\t'fallback' => \"Comment from {$comment->comment_author} on {$post->post_title}: {$message}\",\n\t\t\t'pretext' => \"*Comment Received: <{$post->guid}|{$post->post_title}>*\",\n\t\t\t'author_name' => $comment->comment_author,\n\t\t\t'author_link' => \"https://www.aliemu.com/user/{$author->user_login}\",\n\t\t\t'author_icon' => add_query_arg(\n\t\t\t\t[\n\t\t\t\t\t'size' => 16,\n\t\t\t\t\t'default' => 'mp',\n\t\t\t\t],\n\t\t\t\t'https://www.gravatar.com/avatar/' . md5( strtolower( trim( $author->user_email ) ) )\n\t\t\t),\n\t\t\t'text' => $message,\n\t\t\t'actions' => [\n\t\t\t\t(object) [\n\t\t\t\t\t'type' => 'button',\n\t\t\t\t\t'text' => 'View Comment',\n\t\t\t\t\t'url' => get_comment_link( $comment ),\n\t\t\t\t],\n\t\t\t],\n\t\t]\n\t);\n}",
"function updateSpeakerComment(){\n\t\t// to follow\n\t}",
"function the_comment()\n {\n }",
"function commentmeta_insert_handler( $meta_id, $comment_id=null ) {\n\t\tif ( empty( $comment_id ) || wp_get_comment_status( $comment_id ) != 'spam' )\n\t\t\t$this->add_ping( 'db', array( 'commentmeta' => $meta_id ) );\n\t}",
"public function addComment() {\n $body = $this->getData();\n\n $comentario = $body->comentario;\n $usuario = $body->usuario;\n $fecha = $body->fecha;\n $puntaje = $body->puntaje;\n $id_jugador = $body->id_jugador;\n $id_comentario = $this->model->insert($comentario, $usuario, $fecha, $puntaje, $id_jugador);\n\n if($id_comentario) {\n $this->view->response(\"Se agrego el comentario nùmero: {$id_comentario}\", 200);\n } else {\n $this->view->response(\"El comentario no se pudo agregar \", 500);\n }\n\n }",
"public function alertComment($id,$alertComment)\n\t{\n\t\t$commentsManager = new Comments();\n\t\t$alertComments = $commentsManager-> updateComment($id,$alertComment); //appel d'une fonction d'un objet\n\t\trequire('view/ViewFrontEnd/signalCommentView.php');\n\t}",
"static public function comment_submission() {\n ?>\n\n /**\n * Déclenchement d'événements Google analytics lors de la soumission\n * d'un commentaire.\n *\n * source https://felix-arntz.me/blog/customizing-google-analytics-configuration-site-kit-plugin/\n */\n $('#commentform input[type=\"submit\"]').on('click',function(){\n console.log('SFP: Comment submited');\n if(typeof gtag=='function'){\n gtag('event','Commentaire',{\n 'event_category':'Implication',\n 'event_label':window.location.href\n });\n }\n });\n\n <?php\n }",
"function comment_action_handler( $comment_id ) {\n\t\tif ( !is_array( $comment_id ) ) {\n\t\t\tif ( wp_get_comment_status( $comment_id ) != 'spam' )\n\t\t\t\t$this->add_ping( 'db', array( 'comment' => $comment_id ) );\n\t\t} else {\n\t\t\tforeach ( $comment_id as $id ) {\n\t\t\t\tif ( wp_get_comment_status( $comment_id ) != 'spam' )\n\t\t\t\t\t$this->add_ping( 'db', array( 'comment' => $id) );\n\t\t\t}\n\t\t}\n\t}",
"public function signalComment($idComment)\n\t{ \n\t\t$comment=$this->getComment($idComment);\n\t\t$moderate=$comment->getModerate();\n\t\t$moderate=$moderate+1;\n\t\t\n\n\t\t$req=$this->_bdd->prepare('UPDATE Comments SET moderate=:moderate WHERE id=:idComment');\n\t\t$req->bindValue(':idComment', $idComment, PDO::PARAM_INT);\n\t\t$req->bindValue(':moderate', $moderate, PDO::PARAM_INT);\n\t\t$req->execute();\n\n\t\treturn $req;\n\t}",
"public function newComment() {\n $datas['chapter_id'] = abs((int) $_GET['id']);\n $datas['author'] = trim(htmlspecialchars((string) $_POST['newCommentAuthor']));\n $datas['content'] = trim(htmlspecialchars((string) $_POST['newCommentContent']));\n\n if (!empty($datas['content']) && !empty($datas['author'])) {\n $commentMngr = new CommentManager();\n $commentMngr->add($datas);\n \n $_SESSION['commentsPseudo'] = $datas['author'];\n } else {\n $GLOBALS['error']['newComment'] = \"Un commentaire ne peut pas être vide et doit impérativement être associé à un pseudo.\";\n }\n }",
"public function comment($msg) {\n $this->writeLine($msg, 'comment');\n }",
"public function addComment(): void\n {\n $this->articleId = $_GET['articleId'];\n $this->content = $_POST['comment'];\n $this->author = $_POST['nickname'];\n $datetime = new DateTime();\n $this->date = $datetime->format('Y-m-d H:i:s');\n\n $this->commentModel->addComment($this->content, $this->date, $this->author, $this->articleId);\n\n // Redirect to the article page\n Router::redirectTo('articleDetails&id=' . $this->articleId);\n exit();\n }",
"function save_comment($comment_id)\n {\n }",
"function set_comment($new_comment)\n {\n $this->comment = $new_comment;\n }",
"public function commentAction() {\r\n $data = json_decode($_POST['data'], true);\r\n if (empty($data['comments'])) {\r\n exit('access deny!');\r\n }\r\n\r\n if (stristr($data['sourceid'], 'nav_fun_')) {\r\n $id = intval(str_ireplace('nav_fun_', '', $data['sourceid']));\r\n $info = Nav_Service_NewsDB::getRecordDao()->get($id);\r\n if (!empty($info['id'])) {\r\n $total = $info['c_num'] + 1;\r\n Nav_Service_NewsDB::getRecordDao()->update(array('c_num' => $total), $id);\r\n $rcKey = 'NAV_FUN_OP:' . intval($info['id']);\r\n Common::getCache()->hSet($rcKey, 'c_num', $total);\r\n }\r\n }\r\n\r\n $addData = array(\r\n 'content' => trim($data['comments'][0]['content']),\r\n 'ctime' => substr($data['comments'][0]['ctime'], 0, 10),\r\n 'ip' => $data['comments'][0]['ip'],\r\n 'cmtid' => $data['comments'][0]['cmtid'],\r\n 'userid' => $data['comments'][0]['user']['userid'],\r\n 'sourceid' => $data['sourceid'],\r\n 'url' => $data['url'],\r\n 'created_at' => Common::getTime(),\r\n );\r\n\r\n // error_log(date('Y-m-d H:i:s') . \" \" . Common::jsonEncode($addData) . \"\\n\", 3, '/tmp/3g_changyan_comment');\r\n User_Service_Changyan::getDao()->insert($addData);\r\n\r\n exit;\r\n }",
"public function setComment(Comment $comment): void;",
"public function reportComment() {\n $commentId = $this->request->getParameter(\"comId\");\n $postId = $this->request->getParameter(\"postId\");\n $this->comment->report($commentId);\n $this->redirect('Post','index/'.$postId);\n }",
"public function comment() {\n if (isset($_POST) && !empty($_POST) && isset($_POST['comment']) && !empty($_POST['comment'])) {\n if (isset($_POST['token']) && $this->_model->compareTokens($_POST['token'])) {\n if (!$this->_model->comment(explode(\"/\", $this->_url)[1], $_POST['comment'])) {\n echo \"error\";\n }\n }\n }\n }",
"public function setComment($comment);",
"public function setComment($comment);",
"function set_comment() {\n $this->sale_lib->set_comment($this->input->post('comment'));\n }",
"function register_block_core_comment_content()\n {\n }",
"function Comment($content) {\n\n /* Variablen initialisieren */\n $this->content = $content;\n }",
"public function isComment() {}",
"public function comm($c){\n\t\t$this->comment = $c;\n\t}",
"public function next_comment()\n {\n }",
"public function NewCommentManga(){\r\n $this->comment(); \r\n $this->pseudoPost();\r\n $this->contentPost();\r\n $this->_commentManager->AddComment($this->_pseudoPostSecure, $this->_contentPostSecure, $_GET['id'],true,false); \r\n header('location: Tome&id='.$_GET[\"id\"]); \r\n }",
"function comment_notification_text($notify_message, $comment_id) {\n extract($this->get_comment_data($comment_id));\n if ($comment->comment_type == 'facebook') {\n ob_start();\n $content = strip_tags($comment->comment_content);\n ?>\nNew Facebook Comment on your post \"<?php echo $post->post_title ?>\"\n\nAuthor : <?php echo $comment->comment_author ?> \nURL : <?php echo $comment->comment_author_url ?> \n\nComment:\n\n<?php echo $content ?> \n\nParticipate in the conversation here:\n<?php echo $this->get_permalink($post->ID) ?> \n\n <?php\n return ob_get_clean();\n } else {\n return $notify_message;\n }\n }",
"public function signalerCom($idCom, $idBillet)\n {\n $this->commentaire->updateCommentaire('FALSE', $idCom);\n $_SESSION['info'] = 'Le commentaire a été signalé à l\\'auteur, merci. ';\n header('Location: index.php?action=billet&id='.$idBillet.'&page=1#postCom');\n }",
"public function getComment() {}",
"function get_comment_ID()\n {\n }",
"public function comment() {\n if (isLoggedIn() == false) {\n flash('login_to_post', 'Please, login to comment');\n redirect('/users/login');\n }\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n // Sanitize array\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n $data = [\n 'body' => trim($_POST['body']),\n 'post_id' => trim($_POST['post_id']),\n 'user_id' => $_SESSION['user_id'],\n 'user_name' => $this->userModel->getUserById($_SESSION['user_id'])->name\n ];\n\n if (!empty($data['body']) && !empty($data['post_id']) && !empty($data['user_id']) && !empty($data['user_name'])) {\n // Save comment\n $this->postModel->comment($data);\n $post = $this->postModel->getPostById($data['post_id']);\n $receiver = $this->userModel->getUserById($post->user_id);\n if ($receiver->receive_email == true) {\n $this->mail($receiver->email, $receiver->name, $post->id);\n }\n }\n redirect('/posts/show/' . $_POST['post_id']);\n }\n\n }",
"public function comment()\n {\n $commentManager = new CommentManager();\n \n $comment = $commentManager->getComment($_GET['id']);\n \n require (__DIR__ . '/../view/frontend/commentView.php');\n }",
"function wp_ajax_dim_comment()\n {\n }",
"public function ajax_comment(){\n\t\t\n $comment = isset( $_POST['message'] ) ? sanitize_text_field( $_POST['message'] ) : '';\n $post_id = isset( $_POST['post_id'] ) ? sanitize_text_field( $_POST['post_id'] ) : '';\n\t\t\t$user_id = isset( $_POST['user_id'] ) ? sanitize_text_field( $_POST['user_id'] ) : '';\n\t\t\t\n\t\t\t//Traigo data de usuario\n $user_data = get_userdata( $user_id );\n\n\t\t\t//Verifico que venga con informacion\n\t\t\tif ( '' === $comment \n\t\t\t\tOR '' === $post_id\n\t\t\t\tOR '' === $user_id\n\t\t\t) {\n\t\t\t\twp_send_json_error( 'Error en el pedido de informacion.');\t\n\t\t\t\t die();\n\t\t\t}\n\n $commentdata = array(\n\t\t\t\t'comment_author' => $user_data->user_login,\n\t\t\t\t'comment_content' \t=> $comment,\n\t\t\t\t'user_id' => $user_id,\n 'comment_post_ID' => $post_id,\n\t\t\t\t'comment_approved' => '1',\n\t\t\t\t'comment_type' => 'public'\n );\n \n if ( wp_insert_comment( $commentdata ) ) { \n\n //Tomo la data de la id denuncia\n $commentary = array();\n $commentaux['comment'] = $comment;\n $commentaux['user'] = $user_data->user_login;\n $commentaux['time'] = date( 'Y-m-d H:i:s', current_time( 'timestamp', 0 ) );\n array_push( $commentary , $commentaux ); //array\n\n\n\t\t\t\t\t$user = wp_get_current_user();\n\t\t\t\t\t//print_r($user);\n\t\t\t\t\t//Si lo puso una persona aviso a usuarios\n\t\t\t\t\tif ( ( $user->roles[0] == 'denunciante' ) OR ( $user->roles[0] == 'suscriptor' ) ){\n\t\t\t\t\t\t\t//Envio de mail\n\t\t\t\t\t\t\tmail_new_comment_vecino ( $user->user_nicename, '', '', $post_id );\n\t\t\t\t\t}\n\n echo json_encode( array(\n 'status' => 'success', \n 'commentary' => $commentary \n ));\n\t\t\t}else{\n\t\t\t\techo json_encode( array('loggedin'=>false, 'message'=>__('Error de usuario o contraseña. Volve a intentarlo.')));\n\t\t\t}\n\t\t\t\n\t\t\tdie();\t}",
"private function spamComment()\n {\n try\n {\n global $myquery;\n\n $types = array('v','p','cl','t','u');\n\n $request = $_POST;\n\n if(!isset($request['cid']) || $request['cid']==\"\")\n throw_error_msg(\"cid not provided\"); \n \n if( !is_numeric($request['cid']) )\n throw_error_msg(\"invalid cid provided\"); \n\n if(!isset($request['type']) || $request['type']==\"\" )\n throw_error_msg(\"type not provided\");\n\n if(!in_array($request['type'], $types))\n throw_error_msg(\"invalid type provided.\"); \n\n $cid = $request['cid'];\n $myquery->spam_comment($cid);\n \n \n if($request['type'] != 't' && isset($request['typeid']))\n {\n $type = $requets['type'];\n $typeid = mysql_clean();\n update_last_commented($type,$typeid); \n }\n \n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n else\n {\n $msg = msg_list();\n $data = array('code' => \"204\", 'status' => \"success\", \"msg\" => \"success\", \"data\" => $msg[0]);\n $this->response($this->json($data)); \n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage()); \n }\n\n }",
"public function addComment($receipePage,$message) {\n $this->chatHandler->addComment($receipePage, $this->username, $message);\n }",
"public function commenting() {\n if(strlen($this->request->getParameter(\"content\")) > 10)\n {\n $postId = $this->request->getParameter(\"id\");\n $author = $this->request->getParameter(\"author\");\n $content = $this->request->getParameter(\"content\");\n \n $this->comment->addComment($author, $content, $postId);\n $this->redirect('Post','index/'.$postId);\n }\n else {\n echo \"Commentaire trop court\";\n }\n \n // Execute the default action to reload and display the Posts list\n $this->executeAction(\"index\");\n\n }",
"public function have_comments()\n {\n }",
"function wap8_trackbacks( $comment ) {\n$GLOBALS['comment'] = $comment; ?>\n<li><?php printf( __( '%s', 'designcrumbs' ), get_comment_author_link() ) ?> <?php edit_comment_link( __( 'Edit', 'designcrumbs' ), '<span>', '</span>' ); ?>\n<?php\n}",
"function addComment(){\n\t\t$this->Article->Comment->create();\n\t\tif ($this->Article->Comment->save($this->data)) {\n\t\t\techo __('Your comment has been added successfully, and will be viewed soon after approving.', true);\n\t\t} else {\n\t\t\techo __('Your comment could not be added.', true);\n\t\t\techo '<br />';\n\t\t\tforeach($this->Article->Comment->validationErrors as $key=>$val){\n\t\t\t\techo $val.',<br />';\n\t\t\t}\n\t\t\techo 'and try again.';\n\t\t}\n\t\t$this->autoRender = false;\n\t}",
"function comment()\n {\n $this->load->library('service');\n $data = file_get_contents('php://input');\n $ret = array(\n 'out' => $this->service->handle('comment', $data)\n );\n $this->output($ret);\n }",
"function do_salmon_as_comment($module,$id,$self_url,$self_title,$title=NULL,$post=NULL,$email='',$poster_name_if_guest='',$forum=NULL,$validated=NULL)\n\t{\n\t\tif (!is_null($post)) $_POST['post'] = $post;\n\t\tif (!is_null($title)) $_POST['title'] = $title;\n\t\t$_POST['email'] = $email;\n\t\t$_POST['poster_name_if_guest'] = $poster_name_if_guest;\n\t\t\n\t\treturn do_comments(true,$module,$id,$self_url,$self_title,$forum,true,$validated,false,true);\n\t}",
"function ffeeeedd_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) {\n case 'pingback' :\n case 'trackback' :\n // On affiche différemment les trackbacks. ?>\n <li <?php comment_class(); ?>>\n <p><?php _e( 'Pingback :', 'ffeeeedd' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'ffeeeedd' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n <?php break;\n default :\n // On passe aux commentaires standards.\n global $post; ?>\n <li itemscope itemtype=\"http://schema.org/UserComments\">\n <article role=\"article\">\n <header>\n <?php echo get_avatar( $comment, 44 );\n printf( '<cite itemprop=\"creator\">%1$s %2$s</cite>',\n get_comment_author_link(),\n ( $comment->user_id === $post->post_author ) ? '<small> (' . __( 'Post author', 'ffeeeedd' ) . ' ) </small>' : ''\n );\n printf( '<time datetime=\"%2$s\" itemprop=\"commentTime\">%3$s</time>',\n esc_url( get_comment_link( $comment->comment_ID ) ),\n get_comment_time( 'c' ),\n sprintf( '%1$s à %2$s', get_comment_date(), get_comment_time() )\n ); ?>\n </header>\n\n <?php if ( '0' == $comment->comment_approved ) { ?>\n <p><?php _e( 'Your comment is awaiting moderation.', 'ffeeeedd' ); ?>.</p>\n <?php } ?>\n\n <div itemprop=\"commentText\">\n <?php comment_text(); ?>\n <?php edit_comment_link( __( 'Edit', 'ffeeeedd' ), '<p>', '</p>' ); ?>\n </div>\n\n <div class=\"reply\" itemprop=\"replyToUrl\">\n <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'ffeeeedd' ), 'after' => ' <span>↓</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div>\n </article>\n <?php break;\n }\n }",
"function edit_comment($comment)\n {\n }",
"protected function report_comment_success_message(){\r\n\t\treturn 'The comment has been reported.';\r\n\t}",
"public function ReportComment(){ \r\n $this->comment();\r\n $this->reportPost();\r\n $this->_commentManager->getReportComment($this->_reportPostSecure,\"1\");\r\n header('location: '.$_GET[\"url\"].'&id='.$_GET[\"id\"]);\r\n }",
"function wp_comment_trashnotice()\n {\n }",
"function warquest_home_comment_delete_do() {\r\n\t\r\n\t/* input */\r\n\tglobal $uid;\r\n\t\r\n\t/* output */\r\n\tglobal $comment;\r\n\tglobal $output;\r\n\t\r\n\tif (warquest_db_comment_delete($uid) == 1) {\r\n\t\t\r\n\t\t$message = t('HOME_MESSAGE_DELETED');\r\n\t\t$output->popup .= warquest_box_icon(\"info\", $message);\t\t\r\n\t\t\r\n\t\t$comment=\"\";\r\n\t\t$uid=0;\r\n\t}\r\n}",
"function addAction($postId, $author, $comment)\n{\n\n // if ($affectedLines === false) {\n // // Erreur gérée. Elle sera remontée jusqu'au bloc try du routeur !\n // throw new Exception('Impossible d\\'ajouter le commentaire !');\n // }\n // else {\n // header('Location: index.php?action=post&id=' . $postId);\n // }\n echo \"ajoute un commentaire\";\n}",
"public function message()\n {\n return 'wrong comment id';\n }",
"function comment($id_post, $comment) {\n\n\t\tif(!empty($comment))\n\t\t{\n\t\t\t$req = $GLOBALS['bdd']->prepare('INSERT INTO badin(balsamine, bigarade, bouquetin, brimade, bryophite) VALUES(:id_posts, :id_auteur, 2, NOW(), :comment)');\n\t\t\t$req->execute(array('id_posts' => $id_post,\n\t\t\t\t\t\t\t\t'id_auteur' => $_SESSION['id'],\n\t\t\t\t\t\t\t\t'comment' => $comment,\n\t\t\t));\n\t\t}\n\t\telse {\n\t\t}\n\t}",
"public function didUserPressPostComment(){\n\t\t\tif(isset($_POST['comment'])){\n\t\t\t\t\n\t\t\t\treturn $_POST['comment'];\n\t\t\t}\n\t\t\treturn \"\";\n\t\t}",
"public function addComment(): void{\n Quizzes::addComment($_SESSION[\"quizID\"], $_SESSION[\"email\"], $_POST[\"commentText\"]);\n\n $qfa = new QuizFinishUser($_SESSION[\"q\"], $_SESSION[\"ua\"], $_SESSION[\"aa\"]);\n $qfa->generateHTML();\n }",
"function setComment($comment)\n {\n $this->comment = $comment;\n }",
"function setComment($comment)\n {\n $this->comment = $comment;\n }",
"function wp_notify_postauthor($comment_id, $deprecated = \\null)\n {\n }",
"public function add_comm()\n {\n $this->comments++;\n }",
"Public function addComment(Request $request){\n // return $id;\n\n $this->validate($request,[ \n 'comment' => 'required', \n ],\n\n [\n 'comment.required' => ' اجرات خود را بنویسید ',\n ]);\n\n $user_id = Auth::user()->id;\n $comment = new AhkamComment;\n $comment->comment = $request->comment;\n $comment->ahkam_id = $request->ahkam_id;\n $comment->user_id = $user_id;\n DB::transaction(function() use ($comment) {\n $comment->save();\n });\n //to generate its notifications\n Helper::add_noti('Ahkam', $comment->id, $comment->ahkam_id);\n $request->session()->flash('alert-success', ' اجرات شما افزوده شد ' );\n return redirect()->back();\n \n }",
"function comment_ID()\n {\n }",
"private function _writeComment()\n {\n $connectionTime = time() - $this->start;\n if ($connectionTime % $this->keepAliveTime === 0) {\n $comment = sprintf(': %s', sha1(mt_rand()) . PHP_EOL);\n\n echo $comment . PHP_EOL;\n }\n }",
"function have_comments()\n {\n }",
"public function onBeforeSave()\n\t{\n\t\tif (empty($this->allow_comments))\n\t\t{\n\t\t\t$this->allow_comments = $this->Channel->deft_comments;\n\t\t}\n\t}",
"public function actionComment()\n {\n\n if(isset($_POST['Comment']))\n {\n $model = new Comment;\n //$model->attributes=$_POST['Comment'];\n $model->a_id = $_POST['answer_id'];\n $model->author_id = $_POST['author_id'];\n\n $model->text = strip_tags($_POST['Comment']['text']);\n\n if($model->save()) {\n $receivers = User::model()->with(array('follow_question' => array('condition' => 'follow_question.q_id = ' . $_POST['question_id'])))->findAll();\n if ($receivers) {\n foreach ($receivers as $key => $receiver) {\n $notifications = UserNotifications::model()->findByPk($receiver->id);\n\n if ($receiver && $notifications)\n if ($notifications->comment_on_question == 1) {\n\n $subject = 'Question has been commented at ' . Yii::app()->name . '!';\n $message = CHtml::link('Question',\n 'http://' . $_SERVER['HTTP_HOST']. Yii::app()->baseUrl . '/question/view/id/' . $_POST['question_id']) . ' you are following has been commented ';\n\n UserModule::sendMail($receiver->email,$subject,$message);\n }\n }\n }\n Yii::app()->user->setFlash('answerCommented', \"Comment was posted successfully\");\n $this->redirect($this->createUrl('/question/view/id/' . $_POST['question_id']));\n }\n\n }\n\n }",
"public function getComment();",
"public function getComment();",
"public function getComment();",
"public function getComment();",
"public function getComment();",
"public function getComment();",
"function recvcommentdata( $parid, $username, $usermessage ) {\n\t\t$this->result = $this->conn->addcomment ( \"x@y\", $parid, $usermessage );\n\t\tif( !$this->result ) {\n\t\t\t$this->outstr .= \"<error>\" . mysql_error() . \"</error>\";\n\t\t\treturn $this->outstr;\n\t\t}\n\t\treturn \"<ok>ok</ok>\";\n\t}",
"public function commentQuery()\n {\n $uznName = $_POST['uzn_name'];\n $uznID = $_POST['uzn_id'];\n\n $authID = @$_SESSION['sess_user_id'];\n $authName = @$_SESSION['sess_user_name'];\n $commText = htmlspecialchars($_POST['comment'], ENT_QUOTES);\n if(!isset($_SESSION['sess_user_id'])){\n echo 'Rakstīt atsauksmes var tikai ielogoti lietotāji. <br>';\n }\n if(isset($_SESSION['user_email_status']) &&\n $_SESSION['user_email_status'] == 'email_code_is_checked_email_verified'){\n\n $insert = \"INSERT INTO comment_section\n (comm_location_uzn, comm_location_uzn_id, comm_author_id, comm_auth_name,\n comm_tetx, comm_date)\n VALUES\n (?, ?, ?, ?, ?, NOW())\";\n $do = $this->connect()->prepare($insert);\n $do->execute([$uznName, $uznID, $authID, $authName, $commText]);\n echo \"Komentārs ir veiksmīgi izveidots.\";\n\n } else{\n echo 'Jums ir jāapstiprina e-pasts pirms rakstīt atsauksmes.';\n }\n }",
"function voyage_mikado_comment($comment, $args, $depth) {\n\n $GLOBALS['comment'] = $comment;\n\n global $post;\n\n $is_pingback_comment = $comment->comment_type == 'pingback';\n $is_author_comment = $post->post_author == $comment->user_id;\n\n $comment_class = 'mkdf-comment clearfix';\n\n if($is_author_comment) {\n $comment_class .= ' mkdf-post-author-comment';\n }\n\n if($is_pingback_comment) {\n $comment_class .= ' mkdf-pingback-comment';\n }\n\n ?>\n\n <li>\n <div class=\"<?php echo esc_attr($comment_class); ?>\">\n <?php if(!$is_pingback_comment) { ?>\n <div class=\"mkdf-comment-image\"> <?php echo voyage_mikado_kses_img(get_avatar($comment, 75)); ?> </div>\n <?php } ?>\n <div class=\"mkdf-comment-text\">\n <div class=\"mkdf-comment-info\">\n <h5 class=\"mkdf-comment-name\">\n <?php if($is_pingback_comment) {\n esc_html_e('Pingback:', 'voyage');\n } ?>\n <?php echo wp_kses_post(get_comment_author_link()); ?>\n </h5>\n <span class=\"mkdf-comment-date\"><?php comment_time(get_option('date_format')); ?><?php esc_html_e(' at ', 'voyage'); ?><?php comment_time(get_option('time_format')); ?></span>\n </div>\n\n <?php if(!$is_pingback_comment) { ?>\n <div class=\"mkdf-text-holder\" id=\"comment-<?php echo comment_ID(); ?>\">\n <?php comment_text(); ?>\n <div class=\"mkdf-comment-reply-holder\">\n <?php\n comment_reply_link(array_merge($args, array(\n 'depth' => $depth,\n 'max_depth' => $args['max_depth']\n )));\n edit_comment_link();\n ?>\n </div>\n </div>\n <?php } ?>\n </div>\n </div>\n <?php //li tag will be closed by WordPress after looping through child elements ?>\n\n <?php\n }",
"function register_block_core_comment_edit_link()\n {\n }",
"function wp_ajax_replyto_comment($action)\n {\n }",
"public function changeCommentary()\n {\n global $data, $imageId, $size, $zoom;\n $this->getParams();\n\n $this->setContentView();\n $this->setMenuView();\n }",
"public function stream_comments(){\n\t\t$timestamp = (int) trim( $_GET['timestamp'] );\n\t\t$sess_id = (int) trim( $_GET['sess_id'] );\n\t\t$condo_id = (int) trim( $_GET['condo_id'] );\n\t\t$lastId = isset( $_GET['lastId'] ) && !empty( $_GET['lastId'] ) ? $_GET['lastId'] : 0;\n\n\t\tif( empty( $timestamp ) ){\n\t\t\tdie( json_encode( array( 'status' => 'error' ) ) );\n\t\t}\n\n\t\t$time_wasted = 0;\n\t\t$lastIdQuery = '';\n\t\tif( !empty( $lastId ) ){\n\t\t\t$lastIdQuery = ' AND id > ' . $lastId;\n\t\t}\n\n\t\t$new_messages_check = $this->db->query(\"SELECT * FROM notifications WHERE condo_id=$condo_id and msg_time >= {$timestamp}\" . $lastIdQuery .\" AND read_noti=0 ORDER BY id DESC\");// AND session_id=\".$this->session->userdata('resident_id').\"\n\t\t$num_rows = $new_messages_check->num_rows();\n\t\tif($num_rows <=0){\n\t\t\n\t\t\twhile( $num_rows <= 0 ){\n\t\t\t\tif( $num_rows <= 0 ){\n\t\t\t\t\t\n\t\t\t\t\t// 40 Seconds are enough to forbid the request and send another one\n\t\t\t\t\tif( $time_wasted >= 60 ){\n\t\t\t\t\t\tdie( json_encode( array( 'status' => 'no-results', 'lastId' => 0, 'timestamp' => time() ) ) );\n\t\t\t\t\t\texit;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tsleep( 1 );\n\t\t\t\t\t$new_messages_check = $this->db->query(\"SELECT * FROM notifications WHERE condo_id=$condo_id and msg_time >= {$timestamp}\" . $lastIdQuery . \" AND read_noti=0 ORDER BY id DESC\");// AND session_id=\".$this->session->userdata('resident_id').\"\n\t\t\t\t\t$num_rows = $new_messages_check->num_rows();\n\t\t\t\t\t$time_wasted += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$new_messages = array();\n\t\tif( $num_rows >= 1){\n\t\t\tforeach($new_messages_check->result_array() as $row){\n\t\t\t\t$noti_id = $row['id'];\n\t\t\t\t$curr_session_id = $row['session_id'];\n\t\t\t\t$posted_by = $row['person_id'];\n\t\t\t\t$log_content = $row['code'];\n\t\t\t\t$facility_id = $this->General_model->get_value_by_id('condo_facilities', $row['facility_id'], 'name');\n\t\t\t\t\n\t\t\t\t$display_field_actor = '';\n\t\t\t\tif($curr_session_id == $sess_id){\n\t\t\t\t\t$display_field_actor = 'your';\n\t\t\t\t} else if($curr_session_id == $posted_by){\n\t\t\t\t\t$display_field_actor = 'his/her';\n\t\t\t\t} else {\n\t\t\t\t\t$display_field_actor = $this->General_model->get_value_by_id('residents', $curr_session_id, 'name').'\\'s';\t\t\t}\n\t\t\t\tif($posted_by == 0){\n\t\t\t\t\t$actor = '';\t\n\t\t\t\t} else {\n\t\t\t\t\t$actor = $this->General_model->get_value_by_id('residents', $posted_by, 'name');\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t//if($posted_by!=$sess_id){\n\t\t\t\t\t$new_messages[] = array( \n\t\t\t\t\t\t'id' \t\t\t \t\t=> $row['id'],\n\t\t\t\t\t\t'person_id' \t \t\t => $posted_by, \n\t\t\t\t\t\t'session_id' \t => $curr_session_id,\n\t\t\t\t\t\t'facility_id' \t => $facility_id,\n\t\t\t\t\t\t'display_field_actor' => $display_field_actor,\n\t\t\t\t\t\t'actor' \t\t\t\t => $actor,\n\t\t\t\t\t\t'code' \t\t => $log_content,\n\t\t\t\t\t\t'insertDate' \t => $row['insertDate'],\n\t\t\t\t\t\t'icount' => $num_rows\n\t\t\t\t\t );\n\t\t\t\t//}\n\t\t\t}\n\t\t}\n\t\t$last_msg = end( $new_messages );\n\t\t$last_id = $last_msg['id'];\n\t\t\n\t\tdie( json_encode( array( 'status' => 'results', 'timestamp' => time(), 'lastId' => $last_id, 'data' => $new_messages ) ) );\n\t}",
"function handle_editcomment($commentid)\n{\n\tdie(\"A hozzászólások nem szerkeszthetőek. A bejegyzések tulajdonosai <a href=\\\"/delcomment/$commentid\\\">törölhetik</a> a hozzászólásokat.\");\n}",
"public function addComment()\n {\n $this->isConnect();\n\n $post = $this->token->check($_POST);\n\n $formMessage = $this->commentsValidationForm->checkForm($post);\n\n if(!$formMessage)\n {\n $post['user_id'] = $_SESSION['id'];\n $post['validated'] = ($_SESSION['statut'] === 'admin') ? 1 : null;\n $this->comments->add($post);\n header('Location: index.php?route=front.postById&id=' . $_POST['post_id'] . '&success=' . $_SESSION['statut'] . '#comments');\n exit;\n }\n else\n {\n $postAddUnvalid = $post;\n $post = $this->posts->postById($_GET['id']);\n $comments = $this->comments->commentsById($_GET['id']);\n $this->render('postById', compact('formMessage', 'postAddUnvalid', 'post', 'comments'));\n }\n }",
"function change_request_comment($comm,$id)\n\t{\n\t\t$data['request_comment'] =$comm;\n\t return $this->db->update('pamm_requests', $data, \"request_id = $id\");\n\t}",
"public function commentaireAction(){\n\t\t\t$mode \t\t= \"backend\";\n\t\t\t$action = @$_GET['action']; \n\t\t\t$this->cmt->setIdentifiant(@$_GET['idcom']);\n\t\t\t\n\t\t\tswitch($action){\n\t\t\t\tcase \"reset\"; \n\t\t\t\t\t$commentaires = $this->com->resetReport($this->cmt);\n\t\t\t\t\tbreak; \t\n\t\t\t\t\t\n\t\t\t\tcase \"delete\"; \n\t\t\t\t\t$commentaires = $this->com->deleteComment($this->cmt); \n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"valide\"; \n\t\t\t\t\t$commentaires = $this->com->confirmComment($this->cmt); \n\t\t\t\t\tbreak; \t\n\t\t\t\t\t\t\n\t\t\t\tdefault;\n\t\t\t\t\t$this->cmt->setNbrReport(@$_POST['valRprt']);\n\t\t\t\t\t$mode = \"frontend\";\n\t\t\t\t\t$commentaires = $this->com->reportComment($this->cmt); \n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\techo $this->info->resultAff(\"commen\", \"commentaires\", $commentaires, $mode);\n\t\t}",
"function wp_throttle_comment_flood($block, $time_lastcomment, $time_newcomment)\n {\n }",
"function wyz_new_bus_post_comm_ajax() {\n\t$nonce = filter_input( INPUT_POST, 'nonce' );\n\n\t$_id = intval( $_POST['id'] );\n\n\tif ( ! wp_verify_nonce( $nonce, \"wyz-business-post-comment-nonce-$_id\" ) ) {\n\t\twp_die( 'busted' );\n\t}\n\n\t$_comment = $_POST['comment'];\n\n\tif ( '' == $_comment || ! is_user_logged_in() || ! comments_open( $_id ) ) {\n\t\twp_die( false );\n\t}\n\n\t$_comment = esc_html( $_comment );\n\t$current_user = wp_get_current_user();\n\n\t$time = current_time('mysql');\n\n\t$data = array(\n\t\t'comment_post_ID' => $_id,\n\t\t'comment_author' => $current_user->user_login,\n\t\t'comment_author_email' => $current_user->user_email,\n\t\t'comment_author_url' => $current_user->user_url,\n\t\t'comment_content' => $_comment,\n\t\t'user_id' => $current_user->ID,\n\t\t'comment_date' => $time,\n\t\t'comment_approved' => 1,\n\t);\n\t$comment_id = wp_insert_comment( $data );\n\t$the_comment = get_comment( $comment_id );\n\n\tif ( null == $the_comment ) {\n\t\twp_die( false );\n\t}\n\n\twp_die( WyzBusinessPost::get_the_comment( $the_comment ) );\n}"
] | [
"0.7591362",
"0.70423377",
"0.7038375",
"0.6871365",
"0.6742379",
"0.6600258",
"0.65263706",
"0.6508232",
"0.6488092",
"0.64655125",
"0.6428186",
"0.642761",
"0.6416256",
"0.6414281",
"0.6410347",
"0.6392172",
"0.6391395",
"0.63911396",
"0.6362661",
"0.6361557",
"0.6351672",
"0.632759",
"0.63109857",
"0.63076437",
"0.6300861",
"0.6291968",
"0.6272788",
"0.6226181",
"0.62165",
"0.6187619",
"0.6184954",
"0.61657184",
"0.616187",
"0.61466074",
"0.6116436",
"0.61149925",
"0.60821044",
"0.60821044",
"0.6082046",
"0.60775787",
"0.60627556",
"0.60549605",
"0.60481983",
"0.604249",
"0.60339904",
"0.60329545",
"0.6031235",
"0.602805",
"0.60270435",
"0.6025498",
"0.60247564",
"0.60194653",
"0.60133946",
"0.6013095",
"0.60096747",
"0.6007566",
"0.60060006",
"0.6002305",
"0.59953165",
"0.59940183",
"0.59859806",
"0.5979826",
"0.5977184",
"0.59764135",
"0.5974255",
"0.5970269",
"0.59616536",
"0.5956118",
"0.59547174",
"0.5942735",
"0.5938803",
"0.5932538",
"0.59322345",
"0.59322345",
"0.59260726",
"0.5918531",
"0.5911503",
"0.5895251",
"0.5850083",
"0.5834609",
"0.5833888",
"0.583333",
"0.5814997",
"0.5814997",
"0.5814997",
"0.5814997",
"0.5814997",
"0.5814997",
"0.58108556",
"0.5810535",
"0.5804456",
"0.58003706",
"0.5798648",
"0.5795941",
"0.5794787",
"0.57850695",
"0.57755303",
"0.5772097",
"0.5771966",
"0.5758454",
"0.5757417"
] | 0.0 | -1 |
fonction pour signaler un commentaire | public function moderateComment($commentId)
{
$db = $this->dbConnect();
$reportedComment = $db->prepare('UPDATE comments SET report = 2 WHERE id = ?');
$reportedComment->execute(array($commentId));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function record_comment(){\n\t\t\t\n\t\t}",
"abstract public function comment();",
"function postCommentNotify($id, $postId){\r\n $commentManager = new CommentsManager();\r\n $notify = $commentManager->postNotify($id);\r\n}",
"function addCommentHandler() {\n global $inputs;\n\n $content = $inputs['content'];\n $id = $inputs['id'];\n $replyId = insert('reply',[\n 'content' => $content\n ]);\n\n insert('posting_reply',[\n 'posting_id' => $id,\n 'reply_id' => $replyId\n ]);\n\n insert('member_reply',[\n 'member_id' => getLogin()['mid'],\n 'posting_id' => $id\n ]);\n\n formatOutput(true, 'success');\n}",
"function wp_new_comment_notify_moderator($comment_id)\n {\n }",
"public function the_comment()\n {\n }",
"function wp_spam_comment($comment_id)\n {\n }",
"public function comments(){\n }",
"public function flag_comment() {\n\t\t\tif ( empty( $_REQUEST[ 'comment_id' ] ) || (int) $_REQUEST[ 'comment_id' ] != $_REQUEST[ 'comment_id' ] ) {\n\t\t\t\t$this->cond_die( __( $this->invalid_values_message ) );\n\t\t\t}\n\n\t\t\t$comment_id = (int) $_REQUEST[ 'comment_id' ];\n\t\t\tif ( $this->already_flagged( $comment_id ) ) {\n\t\t\t\t$this->cond_die( __( $this->already_flagged_message ) );\n\t\t\t}\n\n\t\t\t// checking if nonces help\n\t\t\tif ( ! isset( $_REQUEST[ 'sc_nonce' ] ) || ! wp_verify_nonce( $_REQUEST[ 'sc_nonce' ], $this->_plugin_prefix . '_' . $this->_nonce_key ) ) {\n\t\t\t\t$this->cond_die( __( $this->invalid_nonce_message ) );\n\t\t\t} else {\n\t\t\t\t$this->mark_flagged( $comment_id );\n\t\t\t\t$this->cond_die( __( $this->thank_you_message ) );\n\t\t\t}\n\n\t\t}",
"function register_block_core_comment_reply_link()\n {\n }",
"function warquest_home_comment_save_do() {\r\n\r\n\t/* input */\r\n\tglobal $player;\r\n\tglobal $uid;\r\n\tglobal $other;\r\n\tglobal $comment;\r\n\r\n\t/* output */\r\n\tglobal $output;\r\n\r\n\tif (strlen($comment)>0) {\r\n\t\r\n\t\tif ($uid==0) {\r\n\t\t\twarquest_db_comment_insert(0, 0, $player->pid, $other->pid, $comment);\r\n\t\t} else {\t\t\r\n\t\t\twarquest_db_comment_update($uid, $comment);\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($other->pid)) {\r\n\t\t\r\n\t\t\t$other->comment_notification++;\r\n\t\t\twarquest_comment_mail($other->pid, $comment, $player->name);\r\n\t\t\t$message = t('ALLIANCE_COMMENT_PLAYER', player_format($other->pid, $other->name, $other->country));\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\t$message = t('ALLIANCE_COMMENT_ALL');\r\n\t\t\twarquest_info(\"Post message: \".$comment);\t\t\r\n\t\t}\t\t\r\n\r\n\t\t/* Clear input parameters */\r\n\t\t$uid = 0;\r\n\t\t\r\n\t\t$output->popup .= warquest_box_icon(\"info\", $message);\r\n\t}\r\n}",
"public function changeComment($comment)\r\n {\r\n\r\n }",
"static function comment_post($id_comment){\n if(!(($id_user = PDOQueries::get_post_publisher_id_by_comment($id_comment)) > 0) || !(($id_post = PDOQueries::get_post_id_by_comment($id_comment)) > 0) || !(($id_publisher = PDOQueries::get_publisher_id($id_post)) > 0))\n throw new \\PersonalizeException(2001);\n $marker = '{comment_post}{id_publisher/'.$id_user.'}';\n $link = 'index.php?'.Navigation::$navigation_marker.'='.Timeline::$post_id_page.'#'.$id_post.$id_comment;\n return PDOQueries::add_notification($id_publisher,$marker,$link);\n }",
"public function comment($comment)\n {\n $this->comments[] = $comment;\n }",
"public function addOneComment(){\n\t\tif (!empty($_POST['user_name']) && !empty($_POST['content'])){\n\t\t\t$values = array(\n \t\t'user_name' => $_POST['user_name'],\n\t\t\t'content' => $_POST['content'],\n\t\t\t'post_id' => $_POST['post_id']\n\t\t);\n\n\t\t$sqlfuncs = array(\n \t\t'date_creation' => 'NOW()',\n\t\t);\n\n\t$this->pInsertFunc(\"INSERT INTO\", \"comment\", $values, $sqlfuncs);\n\t\t\techo '<script>alert(\"Le commentaire a bien été envoyé.\")</script>';\n\t\t}\n\n\t}",
"function charangoten_custom_comment(&$a1, $op) {\n if ($op == 'insert' || $op == 'update') {\n if ($a1['stream_publish']) {\n //dpm($a1, \"dff_custom_comment, publishing to stream\");\n $node = node_load($a1['nid']);\n \n // http://wiki.developers.facebook.com/index.php/Attachment_(Streams)\n $attachment = array(\n 'name' => $a1['subject'],\n 'href' => url('node/' . $a1['nid'], array('absolute' => TRUE, 'fragment' => 'comment-' . $a1['cid'])),\n 'description' => $a1['comment'],\n 'properties' => array(t('In reply to') => array('text' => $node->title, 'href' => url(\"node/\" . $node->nid, array('absolute' => TRUE)))),\n );\n\n $user_message = t('Check out my latest comment on !site...',\n array('!site' => variable_get('site_name', t('my Drupal for Facebook powered site'))));\n $actions = array();\n $actions[] = array('text' => t('Read More'),\n 'href' => url('node/'.$a1['nid'], array('absolute' => TRUE)),\n );\n fb_stream_publish_dialog(array('user_message' => $user_message,\n 'attachment' => $attachment,\n 'action_links' => $actions,\n ));\n }\n }\n\n}",
"public function addComment()\n {\n session_start();\n $superglobalsPost = $this->getSuperglobals()->get_POST();\n $newComment = new CommentManager;\n $superglobalsPost['status'] = \"waiting\";\n $newComment->createComment($superglobalsPost);\n if (isset($superglobalsPost['post_id'])) {\n $post_id = $superglobalsPost['post_id'];\n }\n $titleAction = \"Confirmation d'enregistrement\"; //confirmation message\n $actionConfirmation = \"/post?id=\" . $post_id;\n $textConfirmation = \"Votre commentaire a bien été enregistré\";\n echo $this->getRender()->render('confirmationTemplate.twig', [\n 'titleAction' => $titleAction,\n 'actionConfirmation' => $actionConfirmation,\n 'textConfirmation' => $textConfirmation,\n 'session' => $this->getSuperglobals()->get_SESSION()\n ]);\n }",
"public function comment($comment) {\n $comment['InsertUserID'] = Gdn::session()->UserID;\n $comment['DateInserted'] = Gdn_Format::toDateTime();\n $comment['InsertIPAddress'] = ipEncode(Gdn::request()->ipAddress());\n\n $this->Validation->applyRule('ActivityID', 'Required');\n $this->Validation->applyRule('Body', 'Required');\n $this->Validation->applyRule('DateInserted', 'Required');\n $this->Validation->applyRule('InsertUserID', 'Required');\n\n $this->EventArguments['Comment'] = &$comment;\n $this->fireEvent('BeforeSaveComment');\n\n if ($this->validate($comment)) {\n $activity = $this->getID($comment['ActivityID'], DATASET_TYPE_ARRAY);\n\n $_ActivityID = $comment['ActivityID'];\n // Check to see if this is a shared activity/notification.\n if ($commentActivityID = val('CommentActivityID', $activity['Data'])) {\n Gdn::controller()->json('CommentActivityID', $commentActivityID);\n $comment['ActivityID'] = $commentActivityID;\n }\n\n $storageObject = FloodControlHelper::configure($this, 'Vanilla', 'ActivityComment');\n if ($this->checkUserSpamming(Gdn::session()->User->UserID, $storageObject)) {\n return false;\n }\n\n // Check for spam.\n $spam = SpamModel::isSpam('ActivityComment', $comment);\n if ($spam) {\n return SPAM;\n }\n\n // Check for approval\n $approvalRequired = checkRestriction('Vanilla.Approval.Require');\n if ($approvalRequired && !val('Verified', Gdn::session()->User)) {\n LogModel::insert('Pending', 'ActivityComment', $comment);\n return UNAPPROVED;\n }\n\n $iD = $this->SQL->insert('ActivityComment', $comment);\n\n if ($iD) {\n // Check to see if this comment bumps the activity.\n if ($activity && val('Bump', $activity['Data'])) {\n $this->SQL->put('Activity', ['DateUpdated' => $comment['DateInserted']], ['ActivityID' => $activity['ActivityID']]);\n if ($_ActivityID != $comment['ActivityID']) {\n $this->SQL->put('Activity', ['DateUpdated' => $comment['DateInserted']], ['ActivityID' => $_ActivityID]);\n }\n }\n\n // Send a notification to the original person.\n if (val('ActivityType', $activity) === 'WallPost') {\n $this->notifyWallComment($comment, $activity);\n }\n }\n\n return $iD;\n }\n return false;\n }",
"function slack_comment( $comment_id ) : void {\n\t$comment = get_comment( $comment_id );\n\t$post = get_post( $comment->comment_post_ID );\n\t$category = get_the_category( $post->ID )[0]->slug;\n\t$author = get_user_by( 'id', $comment->user_id );\n\t$message = stripslashes( wp_strip_all_tags( sanitize_textarea_field( wp_unslash( $comment->comment_content ) ) ) );\n\n\t$channel = [\n\t\t'air' => '#airseries',\n\t\t'air-pro' => '#airseries-pro',\n\t\t'capsules' => '#capsules',\n\t\t'in-training-exam-prep' => '#ite-prep',\n\t][ $category ] ?? '#aliemu';\n\n\tslack_message(\n\t\t$channel,\n\t\t[\n\t\t\t'fallback' => \"Comment from {$comment->comment_author} on {$post->post_title}: {$message}\",\n\t\t\t'pretext' => \"*Comment Received: <{$post->guid}|{$post->post_title}>*\",\n\t\t\t'author_name' => $comment->comment_author,\n\t\t\t'author_link' => \"https://www.aliemu.com/user/{$author->user_login}\",\n\t\t\t'author_icon' => add_query_arg(\n\t\t\t\t[\n\t\t\t\t\t'size' => 16,\n\t\t\t\t\t'default' => 'mp',\n\t\t\t\t],\n\t\t\t\t'https://www.gravatar.com/avatar/' . md5( strtolower( trim( $author->user_email ) ) )\n\t\t\t),\n\t\t\t'text' => $message,\n\t\t\t'actions' => [\n\t\t\t\t(object) [\n\t\t\t\t\t'type' => 'button',\n\t\t\t\t\t'text' => 'View Comment',\n\t\t\t\t\t'url' => get_comment_link( $comment ),\n\t\t\t\t],\n\t\t\t],\n\t\t]\n\t);\n}",
"function updateSpeakerComment(){\n\t\t// to follow\n\t}",
"function the_comment()\n {\n }",
"function commentmeta_insert_handler( $meta_id, $comment_id=null ) {\n\t\tif ( empty( $comment_id ) || wp_get_comment_status( $comment_id ) != 'spam' )\n\t\t\t$this->add_ping( 'db', array( 'commentmeta' => $meta_id ) );\n\t}",
"public function addComment() {\n $body = $this->getData();\n\n $comentario = $body->comentario;\n $usuario = $body->usuario;\n $fecha = $body->fecha;\n $puntaje = $body->puntaje;\n $id_jugador = $body->id_jugador;\n $id_comentario = $this->model->insert($comentario, $usuario, $fecha, $puntaje, $id_jugador);\n\n if($id_comentario) {\n $this->view->response(\"Se agrego el comentario nùmero: {$id_comentario}\", 200);\n } else {\n $this->view->response(\"El comentario no se pudo agregar \", 500);\n }\n\n }",
"public function alertComment($id,$alertComment)\n\t{\n\t\t$commentsManager = new Comments();\n\t\t$alertComments = $commentsManager-> updateComment($id,$alertComment); //appel d'une fonction d'un objet\n\t\trequire('view/ViewFrontEnd/signalCommentView.php');\n\t}",
"static public function comment_submission() {\n ?>\n\n /**\n * Déclenchement d'événements Google analytics lors de la soumission\n * d'un commentaire.\n *\n * source https://felix-arntz.me/blog/customizing-google-analytics-configuration-site-kit-plugin/\n */\n $('#commentform input[type=\"submit\"]').on('click',function(){\n console.log('SFP: Comment submited');\n if(typeof gtag=='function'){\n gtag('event','Commentaire',{\n 'event_category':'Implication',\n 'event_label':window.location.href\n });\n }\n });\n\n <?php\n }",
"function comment_action_handler( $comment_id ) {\n\t\tif ( !is_array( $comment_id ) ) {\n\t\t\tif ( wp_get_comment_status( $comment_id ) != 'spam' )\n\t\t\t\t$this->add_ping( 'db', array( 'comment' => $comment_id ) );\n\t\t} else {\n\t\t\tforeach ( $comment_id as $id ) {\n\t\t\t\tif ( wp_get_comment_status( $comment_id ) != 'spam' )\n\t\t\t\t\t$this->add_ping( 'db', array( 'comment' => $id) );\n\t\t\t}\n\t\t}\n\t}",
"public function signalComment($idComment)\n\t{ \n\t\t$comment=$this->getComment($idComment);\n\t\t$moderate=$comment->getModerate();\n\t\t$moderate=$moderate+1;\n\t\t\n\n\t\t$req=$this->_bdd->prepare('UPDATE Comments SET moderate=:moderate WHERE id=:idComment');\n\t\t$req->bindValue(':idComment', $idComment, PDO::PARAM_INT);\n\t\t$req->bindValue(':moderate', $moderate, PDO::PARAM_INT);\n\t\t$req->execute();\n\n\t\treturn $req;\n\t}",
"public function newComment() {\n $datas['chapter_id'] = abs((int) $_GET['id']);\n $datas['author'] = trim(htmlspecialchars((string) $_POST['newCommentAuthor']));\n $datas['content'] = trim(htmlspecialchars((string) $_POST['newCommentContent']));\n\n if (!empty($datas['content']) && !empty($datas['author'])) {\n $commentMngr = new CommentManager();\n $commentMngr->add($datas);\n \n $_SESSION['commentsPseudo'] = $datas['author'];\n } else {\n $GLOBALS['error']['newComment'] = \"Un commentaire ne peut pas être vide et doit impérativement être associé à un pseudo.\";\n }\n }",
"public function comment($msg) {\n $this->writeLine($msg, 'comment');\n }",
"public function addComment(): void\n {\n $this->articleId = $_GET['articleId'];\n $this->content = $_POST['comment'];\n $this->author = $_POST['nickname'];\n $datetime = new DateTime();\n $this->date = $datetime->format('Y-m-d H:i:s');\n\n $this->commentModel->addComment($this->content, $this->date, $this->author, $this->articleId);\n\n // Redirect to the article page\n Router::redirectTo('articleDetails&id=' . $this->articleId);\n exit();\n }",
"function save_comment($comment_id)\n {\n }",
"function set_comment($new_comment)\n {\n $this->comment = $new_comment;\n }",
"public function commentAction() {\r\n $data = json_decode($_POST['data'], true);\r\n if (empty($data['comments'])) {\r\n exit('access deny!');\r\n }\r\n\r\n if (stristr($data['sourceid'], 'nav_fun_')) {\r\n $id = intval(str_ireplace('nav_fun_', '', $data['sourceid']));\r\n $info = Nav_Service_NewsDB::getRecordDao()->get($id);\r\n if (!empty($info['id'])) {\r\n $total = $info['c_num'] + 1;\r\n Nav_Service_NewsDB::getRecordDao()->update(array('c_num' => $total), $id);\r\n $rcKey = 'NAV_FUN_OP:' . intval($info['id']);\r\n Common::getCache()->hSet($rcKey, 'c_num', $total);\r\n }\r\n }\r\n\r\n $addData = array(\r\n 'content' => trim($data['comments'][0]['content']),\r\n 'ctime' => substr($data['comments'][0]['ctime'], 0, 10),\r\n 'ip' => $data['comments'][0]['ip'],\r\n 'cmtid' => $data['comments'][0]['cmtid'],\r\n 'userid' => $data['comments'][0]['user']['userid'],\r\n 'sourceid' => $data['sourceid'],\r\n 'url' => $data['url'],\r\n 'created_at' => Common::getTime(),\r\n );\r\n\r\n // error_log(date('Y-m-d H:i:s') . \" \" . Common::jsonEncode($addData) . \"\\n\", 3, '/tmp/3g_changyan_comment');\r\n User_Service_Changyan::getDao()->insert($addData);\r\n\r\n exit;\r\n }",
"public function setComment(Comment $comment): void;",
"public function reportComment() {\n $commentId = $this->request->getParameter(\"comId\");\n $postId = $this->request->getParameter(\"postId\");\n $this->comment->report($commentId);\n $this->redirect('Post','index/'.$postId);\n }",
"public function comment() {\n if (isset($_POST) && !empty($_POST) && isset($_POST['comment']) && !empty($_POST['comment'])) {\n if (isset($_POST['token']) && $this->_model->compareTokens($_POST['token'])) {\n if (!$this->_model->comment(explode(\"/\", $this->_url)[1], $_POST['comment'])) {\n echo \"error\";\n }\n }\n }\n }",
"public function setComment($comment);",
"public function setComment($comment);",
"function set_comment() {\n $this->sale_lib->set_comment($this->input->post('comment'));\n }",
"function register_block_core_comment_content()\n {\n }",
"function Comment($content) {\n\n /* Variablen initialisieren */\n $this->content = $content;\n }",
"public function isComment() {}",
"public function comm($c){\n\t\t$this->comment = $c;\n\t}",
"public function next_comment()\n {\n }",
"public function NewCommentManga(){\r\n $this->comment(); \r\n $this->pseudoPost();\r\n $this->contentPost();\r\n $this->_commentManager->AddComment($this->_pseudoPostSecure, $this->_contentPostSecure, $_GET['id'],true,false); \r\n header('location: Tome&id='.$_GET[\"id\"]); \r\n }",
"function comment_notification_text($notify_message, $comment_id) {\n extract($this->get_comment_data($comment_id));\n if ($comment->comment_type == 'facebook') {\n ob_start();\n $content = strip_tags($comment->comment_content);\n ?>\nNew Facebook Comment on your post \"<?php echo $post->post_title ?>\"\n\nAuthor : <?php echo $comment->comment_author ?> \nURL : <?php echo $comment->comment_author_url ?> \n\nComment:\n\n<?php echo $content ?> \n\nParticipate in the conversation here:\n<?php echo $this->get_permalink($post->ID) ?> \n\n <?php\n return ob_get_clean();\n } else {\n return $notify_message;\n }\n }",
"public function getComment() {}",
"public function signalerCom($idCom, $idBillet)\n {\n $this->commentaire->updateCommentaire('FALSE', $idCom);\n $_SESSION['info'] = 'Le commentaire a été signalé à l\\'auteur, merci. ';\n header('Location: index.php?action=billet&id='.$idBillet.'&page=1#postCom');\n }",
"function get_comment_ID()\n {\n }",
"public function comment()\n {\n $commentManager = new CommentManager();\n \n $comment = $commentManager->getComment($_GET['id']);\n \n require (__DIR__ . '/../view/frontend/commentView.php');\n }",
"public function comment() {\n if (isLoggedIn() == false) {\n flash('login_to_post', 'Please, login to comment');\n redirect('/users/login');\n }\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n // Sanitize array\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n $data = [\n 'body' => trim($_POST['body']),\n 'post_id' => trim($_POST['post_id']),\n 'user_id' => $_SESSION['user_id'],\n 'user_name' => $this->userModel->getUserById($_SESSION['user_id'])->name\n ];\n\n if (!empty($data['body']) && !empty($data['post_id']) && !empty($data['user_id']) && !empty($data['user_name'])) {\n // Save comment\n $this->postModel->comment($data);\n $post = $this->postModel->getPostById($data['post_id']);\n $receiver = $this->userModel->getUserById($post->user_id);\n if ($receiver->receive_email == true) {\n $this->mail($receiver->email, $receiver->name, $post->id);\n }\n }\n redirect('/posts/show/' . $_POST['post_id']);\n }\n\n }",
"function wp_ajax_dim_comment()\n {\n }",
"private function spamComment()\n {\n try\n {\n global $myquery;\n\n $types = array('v','p','cl','t','u');\n\n $request = $_POST;\n\n if(!isset($request['cid']) || $request['cid']==\"\")\n throw_error_msg(\"cid not provided\"); \n \n if( !is_numeric($request['cid']) )\n throw_error_msg(\"invalid cid provided\"); \n\n if(!isset($request['type']) || $request['type']==\"\" )\n throw_error_msg(\"type not provided\");\n\n if(!in_array($request['type'], $types))\n throw_error_msg(\"invalid type provided.\"); \n\n $cid = $request['cid'];\n $myquery->spam_comment($cid);\n \n \n if($request['type'] != 't' && isset($request['typeid']))\n {\n $type = $requets['type'];\n $typeid = mysql_clean();\n update_last_commented($type,$typeid); \n }\n \n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n else\n {\n $msg = msg_list();\n $data = array('code' => \"204\", 'status' => \"success\", \"msg\" => \"success\", \"data\" => $msg[0]);\n $this->response($this->json($data)); \n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage()); \n }\n\n }",
"public function ajax_comment(){\n\t\t\n $comment = isset( $_POST['message'] ) ? sanitize_text_field( $_POST['message'] ) : '';\n $post_id = isset( $_POST['post_id'] ) ? sanitize_text_field( $_POST['post_id'] ) : '';\n\t\t\t$user_id = isset( $_POST['user_id'] ) ? sanitize_text_field( $_POST['user_id'] ) : '';\n\t\t\t\n\t\t\t//Traigo data de usuario\n $user_data = get_userdata( $user_id );\n\n\t\t\t//Verifico que venga con informacion\n\t\t\tif ( '' === $comment \n\t\t\t\tOR '' === $post_id\n\t\t\t\tOR '' === $user_id\n\t\t\t) {\n\t\t\t\twp_send_json_error( 'Error en el pedido de informacion.');\t\n\t\t\t\t die();\n\t\t\t}\n\n $commentdata = array(\n\t\t\t\t'comment_author' => $user_data->user_login,\n\t\t\t\t'comment_content' \t=> $comment,\n\t\t\t\t'user_id' => $user_id,\n 'comment_post_ID' => $post_id,\n\t\t\t\t'comment_approved' => '1',\n\t\t\t\t'comment_type' => 'public'\n );\n \n if ( wp_insert_comment( $commentdata ) ) { \n\n //Tomo la data de la id denuncia\n $commentary = array();\n $commentaux['comment'] = $comment;\n $commentaux['user'] = $user_data->user_login;\n $commentaux['time'] = date( 'Y-m-d H:i:s', current_time( 'timestamp', 0 ) );\n array_push( $commentary , $commentaux ); //array\n\n\n\t\t\t\t\t$user = wp_get_current_user();\n\t\t\t\t\t//print_r($user);\n\t\t\t\t\t//Si lo puso una persona aviso a usuarios\n\t\t\t\t\tif ( ( $user->roles[0] == 'denunciante' ) OR ( $user->roles[0] == 'suscriptor' ) ){\n\t\t\t\t\t\t\t//Envio de mail\n\t\t\t\t\t\t\tmail_new_comment_vecino ( $user->user_nicename, '', '', $post_id );\n\t\t\t\t\t}\n\n echo json_encode( array(\n 'status' => 'success', \n 'commentary' => $commentary \n ));\n\t\t\t}else{\n\t\t\t\techo json_encode( array('loggedin'=>false, 'message'=>__('Error de usuario o contraseña. Volve a intentarlo.')));\n\t\t\t}\n\t\t\t\n\t\t\tdie();\t}",
"public function addComment($receipePage,$message) {\n $this->chatHandler->addComment($receipePage, $this->username, $message);\n }",
"public function commenting() {\n if(strlen($this->request->getParameter(\"content\")) > 10)\n {\n $postId = $this->request->getParameter(\"id\");\n $author = $this->request->getParameter(\"author\");\n $content = $this->request->getParameter(\"content\");\n \n $this->comment->addComment($author, $content, $postId);\n $this->redirect('Post','index/'.$postId);\n }\n else {\n echo \"Commentaire trop court\";\n }\n \n // Execute the default action to reload and display the Posts list\n $this->executeAction(\"index\");\n\n }",
"public function have_comments()\n {\n }",
"function wap8_trackbacks( $comment ) {\n$GLOBALS['comment'] = $comment; ?>\n<li><?php printf( __( '%s', 'designcrumbs' ), get_comment_author_link() ) ?> <?php edit_comment_link( __( 'Edit', 'designcrumbs' ), '<span>', '</span>' ); ?>\n<?php\n}",
"function comment()\n {\n $this->load->library('service');\n $data = file_get_contents('php://input');\n $ret = array(\n 'out' => $this->service->handle('comment', $data)\n );\n $this->output($ret);\n }",
"function addComment(){\n\t\t$this->Article->Comment->create();\n\t\tif ($this->Article->Comment->save($this->data)) {\n\t\t\techo __('Your comment has been added successfully, and will be viewed soon after approving.', true);\n\t\t} else {\n\t\t\techo __('Your comment could not be added.', true);\n\t\t\techo '<br />';\n\t\t\tforeach($this->Article->Comment->validationErrors as $key=>$val){\n\t\t\t\techo $val.',<br />';\n\t\t\t}\n\t\t\techo 'and try again.';\n\t\t}\n\t\t$this->autoRender = false;\n\t}",
"function do_salmon_as_comment($module,$id,$self_url,$self_title,$title=NULL,$post=NULL,$email='',$poster_name_if_guest='',$forum=NULL,$validated=NULL)\n\t{\n\t\tif (!is_null($post)) $_POST['post'] = $post;\n\t\tif (!is_null($title)) $_POST['title'] = $title;\n\t\t$_POST['email'] = $email;\n\t\t$_POST['poster_name_if_guest'] = $poster_name_if_guest;\n\t\t\n\t\treturn do_comments(true,$module,$id,$self_url,$self_title,$forum,true,$validated,false,true);\n\t}",
"function ffeeeedd_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) {\n case 'pingback' :\n case 'trackback' :\n // On affiche différemment les trackbacks. ?>\n <li <?php comment_class(); ?>>\n <p><?php _e( 'Pingback :', 'ffeeeedd' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'ffeeeedd' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n <?php break;\n default :\n // On passe aux commentaires standards.\n global $post; ?>\n <li itemscope itemtype=\"http://schema.org/UserComments\">\n <article role=\"article\">\n <header>\n <?php echo get_avatar( $comment, 44 );\n printf( '<cite itemprop=\"creator\">%1$s %2$s</cite>',\n get_comment_author_link(),\n ( $comment->user_id === $post->post_author ) ? '<small> (' . __( 'Post author', 'ffeeeedd' ) . ' ) </small>' : ''\n );\n printf( '<time datetime=\"%2$s\" itemprop=\"commentTime\">%3$s</time>',\n esc_url( get_comment_link( $comment->comment_ID ) ),\n get_comment_time( 'c' ),\n sprintf( '%1$s à %2$s', get_comment_date(), get_comment_time() )\n ); ?>\n </header>\n\n <?php if ( '0' == $comment->comment_approved ) { ?>\n <p><?php _e( 'Your comment is awaiting moderation.', 'ffeeeedd' ); ?>.</p>\n <?php } ?>\n\n <div itemprop=\"commentText\">\n <?php comment_text(); ?>\n <?php edit_comment_link( __( 'Edit', 'ffeeeedd' ), '<p>', '</p>' ); ?>\n </div>\n\n <div class=\"reply\" itemprop=\"replyToUrl\">\n <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'ffeeeedd' ), 'after' => ' <span>↓</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div>\n </article>\n <?php break;\n }\n }",
"function edit_comment($comment)\n {\n }",
"protected function report_comment_success_message(){\r\n\t\treturn 'The comment has been reported.';\r\n\t}",
"public function ReportComment(){ \r\n $this->comment();\r\n $this->reportPost();\r\n $this->_commentManager->getReportComment($this->_reportPostSecure,\"1\");\r\n header('location: '.$_GET[\"url\"].'&id='.$_GET[\"id\"]);\r\n }",
"function wp_comment_trashnotice()\n {\n }",
"function warquest_home_comment_delete_do() {\r\n\t\r\n\t/* input */\r\n\tglobal $uid;\r\n\t\r\n\t/* output */\r\n\tglobal $comment;\r\n\tglobal $output;\r\n\t\r\n\tif (warquest_db_comment_delete($uid) == 1) {\r\n\t\t\r\n\t\t$message = t('HOME_MESSAGE_DELETED');\r\n\t\t$output->popup .= warquest_box_icon(\"info\", $message);\t\t\r\n\t\t\r\n\t\t$comment=\"\";\r\n\t\t$uid=0;\r\n\t}\r\n}",
"function addAction($postId, $author, $comment)\n{\n\n // if ($affectedLines === false) {\n // // Erreur gérée. Elle sera remontée jusqu'au bloc try du routeur !\n // throw new Exception('Impossible d\\'ajouter le commentaire !');\n // }\n // else {\n // header('Location: index.php?action=post&id=' . $postId);\n // }\n echo \"ajoute un commentaire\";\n}",
"public function message()\n {\n return 'wrong comment id';\n }",
"function comment($id_post, $comment) {\n\n\t\tif(!empty($comment))\n\t\t{\n\t\t\t$req = $GLOBALS['bdd']->prepare('INSERT INTO badin(balsamine, bigarade, bouquetin, brimade, bryophite) VALUES(:id_posts, :id_auteur, 2, NOW(), :comment)');\n\t\t\t$req->execute(array('id_posts' => $id_post,\n\t\t\t\t\t\t\t\t'id_auteur' => $_SESSION['id'],\n\t\t\t\t\t\t\t\t'comment' => $comment,\n\t\t\t));\n\t\t}\n\t\telse {\n\t\t}\n\t}",
"public function didUserPressPostComment(){\n\t\t\tif(isset($_POST['comment'])){\n\t\t\t\t\n\t\t\t\treturn $_POST['comment'];\n\t\t\t}\n\t\t\treturn \"\";\n\t\t}",
"public function addComment(): void{\n Quizzes::addComment($_SESSION[\"quizID\"], $_SESSION[\"email\"], $_POST[\"commentText\"]);\n\n $qfa = new QuizFinishUser($_SESSION[\"q\"], $_SESSION[\"ua\"], $_SESSION[\"aa\"]);\n $qfa->generateHTML();\n }",
"function setComment($comment)\n {\n $this->comment = $comment;\n }",
"function setComment($comment)\n {\n $this->comment = $comment;\n }",
"function wp_notify_postauthor($comment_id, $deprecated = \\null)\n {\n }",
"public function add_comm()\n {\n $this->comments++;\n }",
"Public function addComment(Request $request){\n // return $id;\n\n $this->validate($request,[ \n 'comment' => 'required', \n ],\n\n [\n 'comment.required' => ' اجرات خود را بنویسید ',\n ]);\n\n $user_id = Auth::user()->id;\n $comment = new AhkamComment;\n $comment->comment = $request->comment;\n $comment->ahkam_id = $request->ahkam_id;\n $comment->user_id = $user_id;\n DB::transaction(function() use ($comment) {\n $comment->save();\n });\n //to generate its notifications\n Helper::add_noti('Ahkam', $comment->id, $comment->ahkam_id);\n $request->session()->flash('alert-success', ' اجرات شما افزوده شد ' );\n return redirect()->back();\n \n }",
"function comment_ID()\n {\n }",
"private function _writeComment()\n {\n $connectionTime = time() - $this->start;\n if ($connectionTime % $this->keepAliveTime === 0) {\n $comment = sprintf(': %s', sha1(mt_rand()) . PHP_EOL);\n\n echo $comment . PHP_EOL;\n }\n }",
"function have_comments()\n {\n }",
"public function onBeforeSave()\n\t{\n\t\tif (empty($this->allow_comments))\n\t\t{\n\t\t\t$this->allow_comments = $this->Channel->deft_comments;\n\t\t}\n\t}",
"public function actionComment()\n {\n\n if(isset($_POST['Comment']))\n {\n $model = new Comment;\n //$model->attributes=$_POST['Comment'];\n $model->a_id = $_POST['answer_id'];\n $model->author_id = $_POST['author_id'];\n\n $model->text = strip_tags($_POST['Comment']['text']);\n\n if($model->save()) {\n $receivers = User::model()->with(array('follow_question' => array('condition' => 'follow_question.q_id = ' . $_POST['question_id'])))->findAll();\n if ($receivers) {\n foreach ($receivers as $key => $receiver) {\n $notifications = UserNotifications::model()->findByPk($receiver->id);\n\n if ($receiver && $notifications)\n if ($notifications->comment_on_question == 1) {\n\n $subject = 'Question has been commented at ' . Yii::app()->name . '!';\n $message = CHtml::link('Question',\n 'http://' . $_SERVER['HTTP_HOST']. Yii::app()->baseUrl . '/question/view/id/' . $_POST['question_id']) . ' you are following has been commented ';\n\n UserModule::sendMail($receiver->email,$subject,$message);\n }\n }\n }\n Yii::app()->user->setFlash('answerCommented', \"Comment was posted successfully\");\n $this->redirect($this->createUrl('/question/view/id/' . $_POST['question_id']));\n }\n\n }\n\n }",
"public function getComment();",
"public function getComment();",
"public function getComment();",
"public function getComment();",
"public function getComment();",
"public function getComment();",
"public function commentQuery()\n {\n $uznName = $_POST['uzn_name'];\n $uznID = $_POST['uzn_id'];\n\n $authID = @$_SESSION['sess_user_id'];\n $authName = @$_SESSION['sess_user_name'];\n $commText = htmlspecialchars($_POST['comment'], ENT_QUOTES);\n if(!isset($_SESSION['sess_user_id'])){\n echo 'Rakstīt atsauksmes var tikai ielogoti lietotāji. <br>';\n }\n if(isset($_SESSION['user_email_status']) &&\n $_SESSION['user_email_status'] == 'email_code_is_checked_email_verified'){\n\n $insert = \"INSERT INTO comment_section\n (comm_location_uzn, comm_location_uzn_id, comm_author_id, comm_auth_name,\n comm_tetx, comm_date)\n VALUES\n (?, ?, ?, ?, ?, NOW())\";\n $do = $this->connect()->prepare($insert);\n $do->execute([$uznName, $uznID, $authID, $authName, $commText]);\n echo \"Komentārs ir veiksmīgi izveidots.\";\n\n } else{\n echo 'Jums ir jāapstiprina e-pasts pirms rakstīt atsauksmes.';\n }\n }",
"function recvcommentdata( $parid, $username, $usermessage ) {\n\t\t$this->result = $this->conn->addcomment ( \"x@y\", $parid, $usermessage );\n\t\tif( !$this->result ) {\n\t\t\t$this->outstr .= \"<error>\" . mysql_error() . \"</error>\";\n\t\t\treturn $this->outstr;\n\t\t}\n\t\treturn \"<ok>ok</ok>\";\n\t}",
"function voyage_mikado_comment($comment, $args, $depth) {\n\n $GLOBALS['comment'] = $comment;\n\n global $post;\n\n $is_pingback_comment = $comment->comment_type == 'pingback';\n $is_author_comment = $post->post_author == $comment->user_id;\n\n $comment_class = 'mkdf-comment clearfix';\n\n if($is_author_comment) {\n $comment_class .= ' mkdf-post-author-comment';\n }\n\n if($is_pingback_comment) {\n $comment_class .= ' mkdf-pingback-comment';\n }\n\n ?>\n\n <li>\n <div class=\"<?php echo esc_attr($comment_class); ?>\">\n <?php if(!$is_pingback_comment) { ?>\n <div class=\"mkdf-comment-image\"> <?php echo voyage_mikado_kses_img(get_avatar($comment, 75)); ?> </div>\n <?php } ?>\n <div class=\"mkdf-comment-text\">\n <div class=\"mkdf-comment-info\">\n <h5 class=\"mkdf-comment-name\">\n <?php if($is_pingback_comment) {\n esc_html_e('Pingback:', 'voyage');\n } ?>\n <?php echo wp_kses_post(get_comment_author_link()); ?>\n </h5>\n <span class=\"mkdf-comment-date\"><?php comment_time(get_option('date_format')); ?><?php esc_html_e(' at ', 'voyage'); ?><?php comment_time(get_option('time_format')); ?></span>\n </div>\n\n <?php if(!$is_pingback_comment) { ?>\n <div class=\"mkdf-text-holder\" id=\"comment-<?php echo comment_ID(); ?>\">\n <?php comment_text(); ?>\n <div class=\"mkdf-comment-reply-holder\">\n <?php\n comment_reply_link(array_merge($args, array(\n 'depth' => $depth,\n 'max_depth' => $args['max_depth']\n )));\n edit_comment_link();\n ?>\n </div>\n </div>\n <?php } ?>\n </div>\n </div>\n <?php //li tag will be closed by WordPress after looping through child elements ?>\n\n <?php\n }",
"function register_block_core_comment_edit_link()\n {\n }",
"function wp_ajax_replyto_comment($action)\n {\n }",
"public function changeCommentary()\n {\n global $data, $imageId, $size, $zoom;\n $this->getParams();\n\n $this->setContentView();\n $this->setMenuView();\n }",
"public function stream_comments(){\n\t\t$timestamp = (int) trim( $_GET['timestamp'] );\n\t\t$sess_id = (int) trim( $_GET['sess_id'] );\n\t\t$condo_id = (int) trim( $_GET['condo_id'] );\n\t\t$lastId = isset( $_GET['lastId'] ) && !empty( $_GET['lastId'] ) ? $_GET['lastId'] : 0;\n\n\t\tif( empty( $timestamp ) ){\n\t\t\tdie( json_encode( array( 'status' => 'error' ) ) );\n\t\t}\n\n\t\t$time_wasted = 0;\n\t\t$lastIdQuery = '';\n\t\tif( !empty( $lastId ) ){\n\t\t\t$lastIdQuery = ' AND id > ' . $lastId;\n\t\t}\n\n\t\t$new_messages_check = $this->db->query(\"SELECT * FROM notifications WHERE condo_id=$condo_id and msg_time >= {$timestamp}\" . $lastIdQuery .\" AND read_noti=0 ORDER BY id DESC\");// AND session_id=\".$this->session->userdata('resident_id').\"\n\t\t$num_rows = $new_messages_check->num_rows();\n\t\tif($num_rows <=0){\n\t\t\n\t\t\twhile( $num_rows <= 0 ){\n\t\t\t\tif( $num_rows <= 0 ){\n\t\t\t\t\t\n\t\t\t\t\t// 40 Seconds are enough to forbid the request and send another one\n\t\t\t\t\tif( $time_wasted >= 60 ){\n\t\t\t\t\t\tdie( json_encode( array( 'status' => 'no-results', 'lastId' => 0, 'timestamp' => time() ) ) );\n\t\t\t\t\t\texit;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tsleep( 1 );\n\t\t\t\t\t$new_messages_check = $this->db->query(\"SELECT * FROM notifications WHERE condo_id=$condo_id and msg_time >= {$timestamp}\" . $lastIdQuery . \" AND read_noti=0 ORDER BY id DESC\");// AND session_id=\".$this->session->userdata('resident_id').\"\n\t\t\t\t\t$num_rows = $new_messages_check->num_rows();\n\t\t\t\t\t$time_wasted += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$new_messages = array();\n\t\tif( $num_rows >= 1){\n\t\t\tforeach($new_messages_check->result_array() as $row){\n\t\t\t\t$noti_id = $row['id'];\n\t\t\t\t$curr_session_id = $row['session_id'];\n\t\t\t\t$posted_by = $row['person_id'];\n\t\t\t\t$log_content = $row['code'];\n\t\t\t\t$facility_id = $this->General_model->get_value_by_id('condo_facilities', $row['facility_id'], 'name');\n\t\t\t\t\n\t\t\t\t$display_field_actor = '';\n\t\t\t\tif($curr_session_id == $sess_id){\n\t\t\t\t\t$display_field_actor = 'your';\n\t\t\t\t} else if($curr_session_id == $posted_by){\n\t\t\t\t\t$display_field_actor = 'his/her';\n\t\t\t\t} else {\n\t\t\t\t\t$display_field_actor = $this->General_model->get_value_by_id('residents', $curr_session_id, 'name').'\\'s';\t\t\t}\n\t\t\t\tif($posted_by == 0){\n\t\t\t\t\t$actor = '';\t\n\t\t\t\t} else {\n\t\t\t\t\t$actor = $this->General_model->get_value_by_id('residents', $posted_by, 'name');\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t//if($posted_by!=$sess_id){\n\t\t\t\t\t$new_messages[] = array( \n\t\t\t\t\t\t'id' \t\t\t \t\t=> $row['id'],\n\t\t\t\t\t\t'person_id' \t \t\t => $posted_by, \n\t\t\t\t\t\t'session_id' \t => $curr_session_id,\n\t\t\t\t\t\t'facility_id' \t => $facility_id,\n\t\t\t\t\t\t'display_field_actor' => $display_field_actor,\n\t\t\t\t\t\t'actor' \t\t\t\t => $actor,\n\t\t\t\t\t\t'code' \t\t => $log_content,\n\t\t\t\t\t\t'insertDate' \t => $row['insertDate'],\n\t\t\t\t\t\t'icount' => $num_rows\n\t\t\t\t\t );\n\t\t\t\t//}\n\t\t\t}\n\t\t}\n\t\t$last_msg = end( $new_messages );\n\t\t$last_id = $last_msg['id'];\n\t\t\n\t\tdie( json_encode( array( 'status' => 'results', 'timestamp' => time(), 'lastId' => $last_id, 'data' => $new_messages ) ) );\n\t}",
"function handle_editcomment($commentid)\n{\n\tdie(\"A hozzászólások nem szerkeszthetőek. A bejegyzések tulajdonosai <a href=\\\"/delcomment/$commentid\\\">törölhetik</a> a hozzászólásokat.\");\n}",
"public function addComment()\n {\n $this->isConnect();\n\n $post = $this->token->check($_POST);\n\n $formMessage = $this->commentsValidationForm->checkForm($post);\n\n if(!$formMessage)\n {\n $post['user_id'] = $_SESSION['id'];\n $post['validated'] = ($_SESSION['statut'] === 'admin') ? 1 : null;\n $this->comments->add($post);\n header('Location: index.php?route=front.postById&id=' . $_POST['post_id'] . '&success=' . $_SESSION['statut'] . '#comments');\n exit;\n }\n else\n {\n $postAddUnvalid = $post;\n $post = $this->posts->postById($_GET['id']);\n $comments = $this->comments->commentsById($_GET['id']);\n $this->render('postById', compact('formMessage', 'postAddUnvalid', 'post', 'comments'));\n }\n }",
"public function commentaireAction(){\n\t\t\t$mode \t\t= \"backend\";\n\t\t\t$action = @$_GET['action']; \n\t\t\t$this->cmt->setIdentifiant(@$_GET['idcom']);\n\t\t\t\n\t\t\tswitch($action){\n\t\t\t\tcase \"reset\"; \n\t\t\t\t\t$commentaires = $this->com->resetReport($this->cmt);\n\t\t\t\t\tbreak; \t\n\t\t\t\t\t\n\t\t\t\tcase \"delete\"; \n\t\t\t\t\t$commentaires = $this->com->deleteComment($this->cmt); \n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"valide\"; \n\t\t\t\t\t$commentaires = $this->com->confirmComment($this->cmt); \n\t\t\t\t\tbreak; \t\n\t\t\t\t\t\t\n\t\t\t\tdefault;\n\t\t\t\t\t$this->cmt->setNbrReport(@$_POST['valRprt']);\n\t\t\t\t\t$mode = \"frontend\";\n\t\t\t\t\t$commentaires = $this->com->reportComment($this->cmt); \n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\techo $this->info->resultAff(\"commen\", \"commentaires\", $commentaires, $mode);\n\t\t}",
"function change_request_comment($comm,$id)\n\t{\n\t\t$data['request_comment'] =$comm;\n\t return $this->db->update('pamm_requests', $data, \"request_id = $id\");\n\t}",
"function wp_throttle_comment_flood($block, $time_lastcomment, $time_newcomment)\n {\n }",
"function wyz_new_bus_post_comm_ajax() {\n\t$nonce = filter_input( INPUT_POST, 'nonce' );\n\n\t$_id = intval( $_POST['id'] );\n\n\tif ( ! wp_verify_nonce( $nonce, \"wyz-business-post-comment-nonce-$_id\" ) ) {\n\t\twp_die( 'busted' );\n\t}\n\n\t$_comment = $_POST['comment'];\n\n\tif ( '' == $_comment || ! is_user_logged_in() || ! comments_open( $_id ) ) {\n\t\twp_die( false );\n\t}\n\n\t$_comment = esc_html( $_comment );\n\t$current_user = wp_get_current_user();\n\n\t$time = current_time('mysql');\n\n\t$data = array(\n\t\t'comment_post_ID' => $_id,\n\t\t'comment_author' => $current_user->user_login,\n\t\t'comment_author_email' => $current_user->user_email,\n\t\t'comment_author_url' => $current_user->user_url,\n\t\t'comment_content' => $_comment,\n\t\t'user_id' => $current_user->ID,\n\t\t'comment_date' => $time,\n\t\t'comment_approved' => 1,\n\t);\n\t$comment_id = wp_insert_comment( $data );\n\t$the_comment = get_comment( $comment_id );\n\n\tif ( null == $the_comment ) {\n\t\twp_die( false );\n\t}\n\n\twp_die( WyzBusinessPost::get_the_comment( $the_comment ) );\n}"
] | [
"0.7591346",
"0.7042539",
"0.7038271",
"0.68709236",
"0.6740591",
"0.6600419",
"0.6526642",
"0.65084934",
"0.64881945",
"0.64662343",
"0.6427823",
"0.6426412",
"0.6415647",
"0.64138913",
"0.6410248",
"0.63925505",
"0.639196",
"0.6391385",
"0.63631153",
"0.63615096",
"0.63518965",
"0.6326751",
"0.6311516",
"0.63072175",
"0.6301204",
"0.6292411",
"0.62697476",
"0.6225873",
"0.62166715",
"0.61874163",
"0.61840296",
"0.61646867",
"0.61625946",
"0.6146343",
"0.61170965",
"0.6115681",
"0.60817134",
"0.60817134",
"0.6081435",
"0.60783696",
"0.6064199",
"0.6056215",
"0.60493875",
"0.60434616",
"0.6034022",
"0.6033512",
"0.6029518",
"0.60281557",
"0.6026973",
"0.6026092",
"0.60260504",
"0.6019675",
"0.60134226",
"0.60125965",
"0.60100347",
"0.60081005",
"0.6006933",
"0.6002687",
"0.5994976",
"0.5994969",
"0.59861445",
"0.5980851",
"0.59769464",
"0.59762084",
"0.59753233",
"0.59697133",
"0.5961672",
"0.59551513",
"0.5954244",
"0.59410876",
"0.59384453",
"0.59320587",
"0.59309113",
"0.59309113",
"0.5924144",
"0.5919269",
"0.591168",
"0.5894553",
"0.58509177",
"0.58353823",
"0.5834813",
"0.58331376",
"0.58164424",
"0.58164424",
"0.58164424",
"0.58164424",
"0.58164424",
"0.58164424",
"0.5809928",
"0.5809497",
"0.5804769",
"0.58008647",
"0.5799158",
"0.57960355",
"0.5795662",
"0.578354",
"0.5775474",
"0.5772134",
"0.57713896",
"0.57586205",
"0.57569563"
] | 0.0 | -1 |
This is just a dummy Twilio callback. | public function callback()
{
$this->jsonResponse([
'ok' => true
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function callback();",
"public function callback() {\n\t\t$this->load->library('twconnect');\n\n\t\t$ok = $this->twconnect->twprocess_callback();\n\t\t\n\t\tif ( $ok ) { redirect('twtest/success'); }\n\t\telse redirect ('twtest/failure');\n\t}",
"function handle_callback() {\r\n }",
"public function callback(AMQPMessage $req);",
"public function callback(){\n $body = file_get_contents('php://input');\n $res = json_decode($body, true);\n \\Think\\Log::write('点播回调开始 begin');\n \n if($res['status'] == 'fail'){\n \\Think\\Log::write('点播回调失败 fail');\n }else{\n \\Think\\Log::write('点播回调成功 success');\n $this->_handle($res);\n }\n }",
"abstract protected function registerCallback();",
"public function getDefaultCallback();",
"public function callback() {\n\t\tif (isset($_SESSION['REQUEST_TOKEN'])) {\n\t\t\t$co = new Config();\n\t\t\t$co->setPackageObject(Package::getByHandle('rest_wordpress'));\n\t\t\t$wp_rest_api_url = $co->get('WP_REST_API_URL');\n\t\t\t$oauth_key = $co->get('WP_REST_API_OAUTH_KEY');\n\t\t\t$oauth_secret = $co->get('WP_REST_API_OAUTH_SECRET');\n\t\t\t\n\t\t\t$consumer = $this->getOauthConsumer($wp_rest_api_url, $oauth_key, $oauth_secret);\n\t\t\t\n\t\t\tif (is_object($consumer)) {\n\t\t\t\t// Get Zend_Oauth_Token_Access object\n\t\t\t\t$token = $consumer->getAccessToken($_GET, unserialize($_SESSION['REQUEST_TOKEN']));\n\t\t\t\t$oauth_token = $token->getToken();\n\t\t\t\t$oauth_token_secret = $token->getTokenSecret();\n\t\t\t\t\n\t\t\t\t$co->save('WP_REST_API_OAUTH_TOKEN', $oauth_token);\n\t\t\t\t$co->save('WP_REST_API_OAUTH_TOKEN_SECRET', $oauth_token_secret);\n\t\t\t\t\n\t\t\t\t$_SESSION['REQUEST_TOKEN'] = null;\n\t\t\t\t\n\t\t\t\t$this->redirect('/dashboard/wp_rest_api/authentication','authenticated');\n\t\t\t} else {\n\t\t\t\t$this->redirect('/dashboard/wp_rest_api/settings','required');\n\t\t\t}\n\t\t} else {\n\t\t\t$this->redirect('/dashboard/wp_rest_api/authentication','invalid_request_token');\n\t\t}\n\t}",
"function callBackUpdate($_TELEGRAM, $th, $tc){\n // YOUR BOT CODE GOES HERE\n if ($_TELEGRAM['text'] == \"/start\")\n {\n send($_TELEGRAM['cid'], \"Hi! Welcome on MTgBot Example!\\nThis message was sent by Thread #$th.\\nThe Thread #$th sent $tc messages.\");\n }\n\n}",
"private function callCallback() {\n\t\tif ($this->callback !== null) {\n\t\t\t$response = $this->buildResponse();\n\t\t\tcall_user_func($this->callback, $response, $this->data);\n\t\t}\n\t}",
"public function postHandleCallback() {\n $data = \\Input::all();\n $msg = new Message();\n $msg->text = trim($data['text']);\n $msg->api_id = $data['id'];\n $msg->sender = $data['from'];\n $msg->receiver = $data['to'];\n $msg->save();\n\n //for correct counting\n \\DB::transaction(function() use ($msg) {\n $response = MessageHelper::decode($msg);\n if ($response) {\n $msg->campaign_id = $response->campaign_id;\n $msg->save();\n }\n });\n return 'Hello World';\n }",
"public function sendPhoneVerificationNotification();",
"function callBack (&$controller, &$request, &$context) {\n\t}",
"public function callback() {\n $params = array();\n parse_str( $_POST['form_data'], $params );\n\n if ( !wp_verify_nonce( $params['nonce'], 'sk-operation-messages' ) ) {\n die( 'Hey hey, stop messing around!!!' );\n }\n\n if ( isset( $params['om_message_id'] ) ) {\n\n if ( $this->update_message( $params['om_message_id'], $params ) ) {\n\n wp_send_json_success(\n 'Updated!!'\n );\n\n }\n\n }\n\n // Check OK. Save the message.\n if ( $this->save_message( $params ) ) {\n\n wp_send_json_success(\n 'Created!'\n );\n\n }\n\n wp_send_json_error( 'Failed!' );\n\n }",
"public function getAfterSendCallback(): array;",
"public function testEventCallBackGet()\n {\n }",
"public function CallBack($response) {\n\t\n\t}",
"function my_twilio_admin_test_form_submit($form, &$form_state) {\n $sent = my_twilio_send(\n $form_state['values']['number'],\n $form_state['values']['message'],\n $form_state['values']['country'],\n !empty($form_state['values']['media']) ? $form_state['values']['media'] : NULL\n );\n\n if ($sent) {\n drupal_set_message(t('Your message has been sent'));\n }\n else {\n drupal_set_message(t('Unable to send your message.'), 'error');\n }\n}",
"public function callbackAction() {\n\t\t$request = $this->getRequest ();\n\t\t$response = $request->getParams ();\n\n\t\tif (! empty ( $response ['custom'] ) && is_numeric ( trim($response ['custom'] ))) {\n\t\t\t\n\t\t\t// Getting the md5 value in order to match with the class name.\n\t\t\t$classrequest = $request->gateway;\n\n\t\t\t// Orderid back from the bank\n\t\t\t$order_id = trim($response ['custom']);\n\t\t\t\n\t\t\t// Get the bank selected using the MD5 code\n\t\t\t$bank = Banks::findbyMD5 ( $classrequest );\n\t\t\tif (! empty ( $bank [0] ['classname'] )) {\n\t\t\t\tif (! empty ( $bank [0] ['classname'] ) && class_exists ( $bank [0] ['classname'] )) {\n\t\t\t\t\t\n\t\t\t\t\t$class = $bank [0] ['classname'];\n\t\t\t\t\t$payment = new $class ( $response ['custom'] );\n\t\t\t\t\t\n\t\t\t\t\t// Check if the method \"Response\" exists in the Payment class and send all the bank information to the payment module\n\t\t\t\t\tif (method_exists ( $class, \"Response\" )) {\n\t\t\t\t\t\tShineisp_Commons_Utilities::logs ( \"Callback called: $class\\nParameters: \" . json_encode ( $response ), \"payments.log\" );\n\t\t\t\t\t\t$payment->Callback ( $response );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdie ();\t\n\t}",
"public function testEventCallBackGetInboundReferences()\n {\n }",
"public function HandleCallback()\r\n\t{\r\n\t\t$rsField = array();\r\n\r\n\t foreach ((array)$_REQUEST as $ixField => $fieldValue)\r\n\t {\r\n $rsField[$ixField] = $fieldValue;\r\n\t }\r\n\r\n\t\t$sSignatureBase =\r\n\t\t\tsprintf(\"%03s\", $rsField['ver']) .\r\n\t\t\tsprintf(\"%-10s\", $rsField['id']) .\r\n\t\t\tsprintf(\"%012s\", $rsField['ecuno']) .\r\n\t\t\tsprintf(\"%06s\", $rsField['receipt_no']) .\r\n\t\t\tsprintf(\"%012s\", $rsField['eamount']) .\r\n\t\t\tsprintf(\"%3s\", $rsField['cur']) .\r\n\t\t\t$rsField['respcode'] .\r\n\t\t\t$rsField['datetime'] .\r\n\t\t\tsprintf(\"%-40s\", $rsField['msgdata']) .\r\n\t\t\tsprintf(\"%-40s\", $rsField['actiontext']);\r\n\r\n\t function hex2str($hex)\r\n\t {\r\n\t\t\tfor($i=0;$i<strlen($hex);$i+=2) $str.=chr(hexdec(substr($hex,$i,2)));\r\n\t\t\treturn $str;\r\n\t\t}\r\n\r\n\t\t$mac = hex2str($rsField['mac']);\r\n\t\t$sSignature = sha1($sSignatureBase);\r\n\t\t$flKey = openssl_get_publickey(file_get_contents($this->flBankCertificate));\r\n\r\n\t\tif (!openssl_verify ($sSignatureBase, $mac, $flKey))\r\n\t\t{\r\n\t\t\ttrigger_error (\"Invalid signature\", E_USER_ERROR);\r\n\t\t}\r\n\t\tif ($rsField['receipt_no'] == 000000) # Payment was cancelled\r\n\t\t{\r\n\t\t\treturn new CPayment($rsField['ecuno'], $rsField['msgdata'], null, null, False);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn new CPayment($rsField['ecuno'], $rsField['msgdata'], $rsField['eamount']/100, $rsField['cur'], True);\r\n\t\t}\r\n\t}",
"public function active_callback()\n {\n }",
"public function active_callback()\n {\n }",
"public function active_callback()\n {\n }",
"public function active_callback()\n {\n }",
"public function active_callback()\n {\n }",
"public function __construct()\n\t{\n // ensure Curl is installed\n if(!extension_loaded(\"curl\"))\n throw(new Exception(\"Curl extension is required for TwilioRestClient to work\"));\n\t\t\n\t\t// instead check for curl module\n\t\t\n\t\t//$this->config = (object) Kohana::config('twilio');\n\t\t\n\t\t#Twilio::$AccountSid = $accountSid;\n\t\t#Twilio::$AuthToken = $authToken;\n\t\t\n\t\t$this->Endpoint = Twilio::$ApiUrl.\"/Accounts/\".Twilio::$AccountSid.\"/\";\n\t}",
"public function handle_api_callback ()\r\n\t{\r\n\t\t// Read URL parameters\r\n\t\t$action = Mage::app ()->getRequest ()->getParam ('oa_action');\r\n\t\t$connection_token = Mage::app ()->getRequest ()->getParam ('connection_token');\r\n\r\n\t\t// Callback Handler\r\n\t\tif (strtolower ($action) == 'social_login' and ! empty ($connection_token))\r\n\t\t{\r\n\t\t\t// Read settings\r\n\t\t\t$settings = array ();\r\n\t\t\t$settings ['api_connection_handler'] = Mage::getStoreConfig ('oneall_sociallogin/connection/handler');\r\n\t\t\t$settings ['api_connection_port'] = Mage::getStoreConfig ('oneall_sociallogin/connection/port');\r\n\t\t\t$settings ['api_subdomain'] = Mage::getStoreConfig ('oneall_sociallogin/general/subdomain');\r\n\t\t\t$settings ['api_key'] = Mage::getStoreConfig ('oneall_sociallogin/general/key');\r\n\t\t\t$settings ['api_secret'] = Mage::getStoreConfig ('oneall_sociallogin/general/secret');\r\n\r\n\t\t\t// API Settings\r\n\t\t\t$api_connection_handler = ((! empty ($settings ['api_connection_handler']) and $settings ['api_connection_handler'] == 'fsockopen') ? 'fsockopen' : 'curl');\r\n\t\t\t$api_connection_port = ((! empty ($settings ['api_connection_port']) and $settings ['api_connection_port'] == 80) ? 80 : 443);\r\n\t\t\t$api_connection_protocol = ($api_connection_port == 80 ? 'http' : 'https');\r\n\t\t\t$api_subdomain = (! empty ($settings ['api_subdomain']) ? trim ($settings ['api_subdomain']) : '');\r\n\r\n\t\t\t// We cannot make a connection without a subdomain\r\n\t\t\tif (! empty ($api_subdomain))\r\n\t\t\t{\r\n\t\t\t\t// See: http://docs.oneall.com/api/resources/connections/read-connection-details/\r\n\t\t\t\t$api_resource_url = $api_connection_protocol . '://' . $api_subdomain . '.api.oneall.com/connections/' . $connection_token . '.json';\r\n\r\n\t\t\t\t// API Credentials\r\n\t\t\t\t$api_credentials = array ();\r\n\t\t\t\t$api_credentials ['api_key'] = (! empty ($settings ['api_key']) ? $settings ['api_key'] : '');\r\n\t\t\t\t$api_credentials ['api_secret'] = (! empty ($settings ['api_secret']) ? $settings ['api_secret'] : '');\r\n\r\n\t\t\t\t// Retrieve connection details\r\n\t\t\t\t$result = $this->do_api_request ($api_connection_handler, $api_resource_url, $api_credentials);\r\n\r\n\t\t\t\t// Check result\r\n\t\t\t\tif (is_object ($result) and property_exists ($result, 'http_code') and $result->http_code == 200 and property_exists ($result, 'http_data'))\r\n\t\t\t\t{\r\n\t\t\t\t\t// Decode result\r\n\t\t\t\t\t$decoded_result = @json_decode ($result->http_data);\r\n\t\t\t\t\tif (is_object ($decoded_result) and isset ($decoded_result->response->result->data->user))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Extract user data.\r\n\t\t\t\t\t\t$data = $decoded_result->response->result->data;\r\n\r\n\t\t\t\t\t\t// The user_token uniquely identifies the user.\r\n\t\t\t\t\t\t$user_token = $data->user->user_token;\r\n\r\n\t\t\t\t\t\t// The identity_token uniquely identifies the social network account.\r\n\t\t\t\t\t\t$identity_token = $data->user->identity->identity_token;\r\n\r\n\t\t\t\t\t\t// The source name\r\n\t\t\t\t\t\t$source_name = $data->user->identity->source->name;\r\n\r\n\t\t\t\t\t\t// Check if we have a user for this user_token.\r\n\t\t\t\t\t\t$oneall_entity = Mage::getModel ('oneall_sociallogin/entity')->load ($user_token, 'user_token');\r\n\t\t\t\t\t\t$customer_id = $oneall_entity->customer_id;\r\n\r\n\t\t\t\t\t\t// No user for this token, check if we have a user for this email.\r\n\t\t\t\t\t\tif (empty ($customer_id))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (isset ($data->user->identity->emails) and is_array ($data->user->identity->emails))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$customer = Mage::getModel (\"customer/customer\");\r\n\t\t\t\t\t\t\t\t$customer->setWebsiteId (Mage::app ()->getWebsite ()->getId ());\r\n\t\t\t\t\t\t\t\t$customer->loadByEmail ($data->user->identity->emails [0]->value);\r\n\t\t\t\t\t\t\t\t$customer_id = $customer->getId ();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// If the user does not exist anymore.\r\n\t\t\t\t\t\telse if (! Mage::getModel (\"customer/customer\")->load ($customer_id)->getId ()) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Cleanup our table.\r\n\t\t\t\t\t\t\t$oneall_entity->delete ();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Reset customer id\r\n\t\t\t\t\t\t\t$customer_id = null;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// This is a new customer.\r\n\t\t\t\t\t\tif (empty ($customer_id))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Generate email address\r\n\t\t\t\t\t\t\tif (isset ($data->user->identity->emails) and is_array ($data->user->identity->emails))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$email = $data->user->identity->emails [0]->value;\r\n\t\t\t\t\t\t\t\t$email_is_random = false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$email = $this->create_random_email ();\r\n\t\t\t\t\t\t\t\t$email_is_random = true;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// Create a new customer.\r\n\t\t\t\t\t\t\t$customer = Mage::getModel ('customer/customer');\r\n\r\n\t\t\t\t\t\t\t// Generate a password for the customer.\r\n\t\t\t\t\t\t\t$password = $customer->generatePassword (8);\r\n\r\n\t\t\t\t\t\t\t// Setup customer details.\r\n\t\t\t\t\t\t\t$first_name = 'unknown';\r\n\t\t\t\t\t\t\tif (! empty ($data->user->identity->name->givenName))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$first_name = $data->user->identity->name->givenName;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if (! empty ($data->user->identity->displayName))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$names = explode (' ', $data->user->identity->displayName);\r\n\t\t\t\t\t\t\t\t$first_name = $names[0];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if (! empty($data->user->identity->name->formatted))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$names = explode (' ', $data->user->identity->name->formatted);\r\n\t\t\t\t\t\t\t\t$first_name = $names[0];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$last_name = 'unknown';\r\n\t\t\t\t\t\t\tif (! empty ($data->user->identity->name->familyName))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$last_name = $data->user->identity->name->familyName;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if (!empty ($data->user->identity->displayName))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$names = explode (' ', $data->user->identity->displayName);\r\n\t\t\t\t\t\t\t\tif (! empty ($names[1]))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$last_name = $names[1];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse if (!empty($data->user->identity->name->formatted))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$names = explode (' ', $data->user->identity->name->formatted);\r\n\t\t\t\t\t\t\t\tif (! empty ($names[1]))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$last_name = $names[1];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$customer->setFirstname ($first_name);\r\n\t\t\t\t\t\t\t$customer->setLastname ($last_name);\r\n\t\t\t\t\t\t\t$customer->setEmail ($email);\r\n\t\t\t\t\t\t\t//$customer->setSkipConfirmationIfEmail ($email);\r\n\t\t\t\t\t\t\t$customer->setPassword ($password);\r\n\t\t\t\t\t\t\t$customer->setPasswordConfirmation ($password);\r\n\t\t\t\t\t\t\t$customer->setConfirmation ($password);\r\n\t\t\t\t\t\t\t$customer->setSignupResource($source_name);\r\n\t\t\t\t\t\t\t// Validate user details.\r\n\t\t\t\t\t\t\t$errors = $customer->validate ();\r\n\r\n\t\t\t\t\t\t\t// Do we have any errors?\r\n\t\t\t\t\t\t\tif (is_array ($errors) && count ($errors) > 0)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tMage::getSingleton ('core/session')->addError (implode (' ', $errors));\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t// Save user.\r\n\t\t\t\t\t\t\t\t$customer->save ();\r\n\t\t\t\t\t\t\t\t$customer_id = $customer->getId ();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Save OneAll user_token.\r\n\t\t\t\t\t\t\t\t$model = Mage::getModel ('oneall_sociallogin/entity');\r\n\t\t\t\t\t\t\t\t$model->setData ('customer_id', $customer->getId ());\r\n\t\t\t\t\t\t\t\t$model->setData ('user_token', $user_token);\r\n\t\t\t\t\t\t\t\t$model->setData ('identity_token', $identity_token);\r\n\t\t\t\t\t\t\t\t$model->save ();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Send email.\r\n\t\t\t\t\t\t\t\tif (! $email_is_random)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t// Site requires email confirmation.\r\n\t\t\t\t\t\t\t\t\tif ($customer->isConfirmationRequired ())\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t$customer->sendNewAccountEmail ('confirmation');\r\n\t\t\t\t\t\t\t\t\t\tMage::getSingleton ('core/session')->addSuccess (\r\n\t\t\t\t\t\t\t\t\t\t\t\t__ ('Account confirmation is required. Please, check your email for the confirmation link. To resend the confirmation email please <a href=\"%s\">click here</a>.',\r\n\t\t\t\t\t\t\t\t\t\t\t\tMage::helper ('customer')->getEmailConfirmationUrl ($customer->getEmail ())));\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t$customer->sendNewAccountEmail ('registered');\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// No email found in identity, but email confirmation required.\r\n\t\t\t\t\t\t\t\telse if ($customer->isConfirmationRequired ())\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tMage::getSingleton ('core/session')->addError (\r\n\t\t\t\t\t\t\t\t\t\t\t\t__ ('Account confirmation by email is required. To provide an email address, <a href=\"%s\">click here</a>.',\r\n\t\t\t\t\t\t\t\t\t\t\t\tMage::helper ('customer')->getEmailConfirmationUrl ('')));\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// This is an existing customer.\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Check if we have a user for this user_token.\r\n\t\t\t\t\t\t\tif (strlen (Mage::getModel ('oneall_sociallogin/entity')->load($user_token, 'user_token')->customer_id) == 0)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// Save OneAll user_token.\r\n\t\t\t\t\t\t\t\t$model = Mage::getModel ('oneall_sociallogin/entity');\r\n\t\t\t\t\t\t\t\t$model->setData ('customer_id', $customer_id);\r\n\t\t\t\t\t\t\t\t$model->setData ('user_token', $user_token);\r\n\t\t\t\t\t\t\t\t$model->setData ('identity_token', $identity_token);\r\n\t\t\t\t\t\t\t\t$model->save ();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Login\r\n\t\t\t\t\t\tif (! empty ($customer_id))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Login\r\n\t\t\t\t\t\t\tMage::getSingleton ('customer/session')->loginById ($customer_id);\r\n\r\n\t\t\t\t\t\t\tif (!Mage::getStoreConfigFlag(Mage_Customer_Helper_Data::XML_PATH_CUSTOMER_STARTUP_REDIRECT_TO_DASHBOARD)) {\r\n\r\n\t\t\t\t\t\t\t\t$referer = $this->_getRequest()->getParam(Mage_Customer_Helper_Data::REFERER_QUERY_PARAM_NAME);\r\n\t\t\t\t\t\t\t\tif ($referer) {\r\n\t\t\t\t\t\t\t\t\t// Rebuild referer URL to handle the case when SID was changed\r\n\t\t\t\t\t\t\t\t\t$referer = Mage::getModel('core/url')->getRebuiltUrl(Mage::helper('core')->urlDecode($referer));\r\n\r\n\t\t\t\t\t\t\t\t\tif (strpos($referer, 'http') !== false) {\r\n\t\t\t\t\t\t\t\t\t\tif ((strpos($referer, Mage::app()->getStore()->getBaseUrl()) === 0)\r\n\t\t\t\t\t\t\t\t\t\t\t|| (strpos($referer, Mage::app()->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, true)) === 0)\r\n\t\t\t\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\t\t\t\tMage::app()->getResponse()->setRedirect($referer)->sendResponse();\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Done\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Not logged in.\r\n\t\treturn false;\r\n\t}",
"function wpib_register_route() {\n\tregister_rest_route( 'wpib/1.0/', '/inbox', array(\n\t\tarray(\n\t\t\t'methods' => 'POST',\n\t\t\t'callback' => 'wpib_on_email_recived',\n\t\t\t'args' => array(\n\t\t\t\t'mandrill_events' => array(\n\t\t\t\t\t'required' => true\n\t\t\t\t),\n\t\t\t)\n\t\t),\n\t) );\n}",
"function _sms($alarm)\n {\n }",
"public function actionCall()\n {\n $req = Yii::$app->request;\n \n $phoneTo = (int)$req->get('phoneTo');\n if (!is_numeric($phoneTo)) return 'Phone must be a number';\n\n $phoneFrom = self::PHONE_ADMIN;\n $sid = $req->get('sid');\n $token = $req->get('token');\n \n $twiloiSet = (isset($sid) && isset($token));\n if (!$twiloiSet) return \"Twilio API call. From: $phoneFrom To: $phoneTo\";\n\n $client = new Client($sid, $token);\n\n $call = $client->calls->create(\n $phoneTo,\n $phoneFrom,\n [\"url\" => \"http://demo.twilio.com/docs/voice.xml\"]\n );\n echo $call->sid;\n }",
"function twilio_authentication($variables_from_get_number_info, $twil_auth_token) {\n\n $validator = new Services_Twilio_RequestValidator($twil_auth_token);\n\n // The Twilio request URL.\n\n $twiml_app_url = 'https://www.yourwebsite.com/phone_tracking_google_analytics/handle_incoming_call.php?';\n\n // The X-Twilio-Signature header\n $signature = $_SERVER[\"HTTP_X_TWILIO_SIGNATURE\"];\n\n if ($validator->validate($signature, $twiml_app_url, $variables_from_get_number_info)) {\n return true;\n }\n else {\n error_log(__FILE__ . ': ' . __LINE__ . ': Something is fishy. This request not sent from twilio');\n return false;\n }\n }",
"public function CallBack($response);",
"public function testEventCallBackGetItem()\n {\n }",
"public function callback()\n {\n $transaction = PaytmWallet::with('receive');\n\n $response = $transaction->response(); // To get raw response as array\n $invoiceId = $this->getInvoiceId($response['ORDERID']);\n \\Storage::put('/txn/_' . $response['ORDERID'] . '.json', json_encode($response));\n\n if ($transaction->isSuccessful()) {\n $payment = (new \\Modules\\Payments\\Helpers\\PaymentEngine('paytm', $response))->transact();\n toastr()->success('Payment received successfully', langapp('response_status'));\n return redirect()->route('invoices.index');\n }\n // Schedule Job to check transaction\n RecheckPaytmStatus::dispatch($response['ORDERID'])->delay(now()->addMinutes(3));\n toastr()->warning('We will verify your transaction shortly', langapp('response_status'));\n return redirect()->route('invoices.index');\n }",
"public function testEventCallBackCreate()\n {\n }",
"function callback($retval, $callinfo) {\r\n\r\n var_dump($callinfo);\r\n print_r($retval . PHP_EOL);\r\n\r\n}",
"function forwardCall($num) {\r\n return \"<?xml version='1.0' encoding='UTF-8'?><Response><Dial>$num</Dial></Response>\"; \r\n}",
"function callback_number(array $args)\n {\n }",
"function mwznb_subscribe_callback() {\r\n\tif (!isset($_POST['mwznb_form_nonce']) || !wp_verify_nonce($_POST['mwznb_form_nonce'], basename(__FILE__))) {\r\n\t\texit(MailWizzApi_Json::encode(array(\r\n 'result' => 'error', \r\n 'message' => __('Invalid nonce!', 'mwznb')\r\n )));\r\n\t}\r\n\r\n $uid = isset($_POST['uid']) ? sanitize_text_field($_POST['uid']) : null;\r\n if ($uid) {\r\n unset($_POST['uid']);\r\n }\r\n unset($_POST['action'], $_POST['mwznb_form_nonce']);\r\n \r\n if (empty($uid) || !($uidData = get_option('mwznb_widget_instance_' . $uid))) {\r\n exit(MailWizzApi_Json::encode(array(\r\n 'result' => 'error', \r\n 'message' => __('Please try again later!', 'mwznb')\r\n )));\r\n }\r\n \r\n $keys = array('api_url', 'public_key', 'private_key', 'list_uid');\r\n foreach ($keys as $key) {\r\n if (!isset($uidData[$key])) {\r\n exit(MailWizzApi_Json::encode(array(\r\n 'result' => 'error', \r\n 'message' => __('Please try again later!', 'mwznb')\r\n )));\r\n }\r\n }\r\n \r\n $oldSdkConfig = MailWizzApi_Base::getConfig();\r\n MailWizzApi_Base::setConfig(mwznb_build_sdk_config($uidData['api_url'], $uidData['public_key'], $uidData['private_key']));\r\n\r\n $endpoint = new MailWizzApi_Endpoint_ListSubscribers();\r\n $response = $endpoint->create($uidData['list_uid'], $_POST);\r\n $response = $response->body->toArray();\r\n \r\n mwznb_restore_sdk_config($oldSdkConfig);\r\n unset($oldSdkConfig);\r\n \r\n if (isset($response['status']) && $response['status'] == 'error' && isset($response['error'])) {\r\n $errorMessage = $response['error'];\r\n if (is_array($errorMessage)) {\r\n $errorMessage = implode(\"\\n\", array_values($errorMessage));\r\n }\r\n exit(MailWizzApi_Json::encode(array(\r\n 'result' => 'error', \r\n 'message' => $errorMessage\r\n )));\r\n }\r\n \r\n if (isset($response['status']) && $response['status'] == 'success') {\r\n exit(MailWizzApi_Json::encode(array(\r\n 'result' => 'success', \r\n 'message' => __('Please check your email to confirm the subscription!', 'mwznb')\r\n )));\r\n }\r\n \r\n exit(MailWizzApi_Json::encode(array(\r\n 'result' => 'success', \r\n 'message' => __('Unknown error!', 'mwznb')\r\n )));\r\n}",
"function msgsrv_receive($callback, $timeout = 30000 , $link = null) {}",
"function cb_init(){\n\t}",
"public function INTincScript_processCallback() {}",
"function example_callback( $example ) {\n echo \"HAI\";\n return $example;\n}",
"public function callNow()\n {\n $c = $this->callback;\n $c();\n }",
"public static function callbackStaticTestFunction() {}",
"public function setCallbacks()\n {\n // __AUTH__ must return true or false\n $this->on('__AUTH__', function($auth, $request) {\n if (is_object($auth)) {\n if ($auth->type == 'Basic') {\n if ($auth->user == 'Andrew' && $auth->password == 'foo') {\n return true;\n }\n }\n }\n\n return false;\n });\n\n // dummy callback, just shows how to add return headers to be used\n $this->on('rate.limit.headers', function($remoteAddr) {\n // .. do something with the remoteAddr\n return ['X-RateLimit-Limit' => 5000, 'X-RateLimit-Remaining' => 4999];\n });\n }",
"public function handle_callback_request_data($data)\n {\n if (!isset($data['call_types'])) {\n $data['call_types'] = ['phone'];\n }\n\n $update_data = [\n 'call_type' => json_encode($data['call_types']),\n 'firstname' => $data['client_firstname'],\n 'lastname' => $data['client_lastname'],\n 'email' => $data['client_email'],\n 'status' => 1,\n 'phone_number' => $data['client_phone'],\n 'timezone' => $data['timezone'],\n 'message' => htmlentities($data['client_message']),\n 'date_start' => to_sql_date($data['date_from'], true),\n 'date_end' => to_sql_date($data['date_to'], true),\n ];\n\n if ($this->db->insert($this->_table, $update_data)) {\n\n $responsiblePerson = get_option('callbacks_responsible_person');\n\n if ($responsiblePerson != '') {\n\n $staff = appointly_get_staff($responsiblePerson);\n\n send_mail_template('appointly_callbacks_notification_newcallback_to_staff', 'appointly', array_to_object($staff));\n\n add_notification([\n 'description' => 'callbacks_new_callback_request',\n 'touserid' => $responsiblePerson,\n 'fromcompany' => true,\n 'link' => 'appointly/callbacks',\n ]);\n }\n /**\n * In case responsible person is not set notification will be sent to Admin with default id of 1\n * i.e person who installed CRM\n */\n if ($responsiblePerson == '') $responsiblePerson = 1;\n\n pusher_trigger_notification([$responsiblePerson]);\n\n return true;\n }\n return false;\n }",
"public function callbackAction()\n {\n // set needed request method parameter\n if ($this->_request->isPost()) {\n $_SERVER['REQUEST_METHOD'] = 'post';\n } else {\n $_SERVER['REQUEST_METHOD'] = 'get';\n }\n\n // disable rendering\n $this->_helper->viewRenderer->setNoRender();\n\n // disable layout for Ajax requests\n $this->_helper->layout()->disableLayout();\n\n // get the subscription storage\n $subscriptionStorage = new PubSubHubbub_Subscription(\n $this->_subscriptionModelInstance,\n $this->_privateConfig->get('subscriptions')\n );\n\n //get the Callback instance and hond over the storage\n $callback = new PubSubHubbub_Subscriber_Callback;\n $callback->setStorage($subscriptionStorage);\n\n // handle request and immediatly send response, to avoid blocking the hub\n $callback->handle($this->_request->getParams(), true);\n\n // ######## Feed Update Handling ########\n // if hub sends you a couple of feed updates\n if (true === $callback->hasFeedUpdate()) {\n //get filepath for the feed update files\n $filePath = $this->_owApp->erfurt->getTmpDir() .\n \"pubsub_\" .\n $this->_request->getParam('xhub_subscription') .\n \"_\" .\n time() .\n \".xml\";\n\n // if filepath is not writable\n if ( false === ( $fh = fopen($filePath, 'w') ) ) {\n // can't open the file\n $m = \"No write permissions for \". $filePath;\n throw new CubeViz_Exception($m);\n }\n\n // write the hole feed update to the file\n fwrite($fh, $callback->getFeedUpdate() . \"\\n\");\n // set file mode\n chmod($filePath, 0755);\n // clsoe file\n fclose($fh);\n\n // collect all subscripton properties\n $subscriptionResourceData = $subscriptionStorage->getSubscription(\n $this->_request->getParam('xhub_subscription')\n );\n\n // create erfurt event\n $event = new Erfurt_Event('onFeedUpdate');\n\n // attach some information to the event\n $event->autoInsertFeedUpdates = 'true' == $this->_privateConfig\n ->get('subscriptions')\n ->get('autoInsertFeedUpdates') ? true : false;\n $event->feedUpdateFilePath = $filePath;\n $event->feedUpdates = $callback->getFeedUpdate();\n\n // extract model iri from subscription entry in subscriptions model\n $modelIriProperty = $this->_privateConfig->get('subscriptions')->get('modelIri');\n $modelIri = $subscriptionResourceData['resourceProperties'][$modelIriProperty][0]['uri'];\n $event->modelInstance = new Erfurt_Rdf_Model($modelIri);\n\n // add source resource to the event\n $event->sourceResource = $subscriptionStorage->getSourceResource(\n $this->_request->getParam('xhub_subscription')\n );\n\n // add subscripton properties to the event\n $event->subscriptionResourceProperties = $subscriptionResourceData['resourceProperties'];\n\n // trigger the event\n $event->trigger();\n }\n }",
"public function callback(){\n\t\techo \"<strong>Note: </strong>Application should set callback URL to application-side for further specific authentication process.\\n<br>\";\n\t\t\n\t/**\n\t* Fetch auth\n\t*/\n\t\t$response = null;\n\t\tswitch($this->env['Callback.transport']){\n\t\t\tcase 'session':\n\t\t\t\tsession_start();\n\t\t\t\t$response = $_SESSION['opauth'];\n\t\t\t\tunset($_SESSION['opauth']);\n\t\t\t\tbreak;\n\t\t\tcase 'post':\n\t\t\t\t$response = $_POST;\n\t\t\t\tbreak;\n\t\t\tcase 'get':\n\t\t\t\t$response = $_GET;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\techo '<strong style=\"color: red;\">Error: </strong>Unsupported Callback.transport.'.\"<br>\\n\";\n\t\t\t\tbreak;\n\t\t}\n\t\t\t\t\n\t/**\n\t * Validation\n\t */\n\t\tif (empty($response['auth']) || empty($response['timestamp']) || empty($response['signature']) || empty($response['auth']['provider']) || empty($response['auth']['uid'])){\n\t\t\techo '<strong style=\"color: red;\">Invalid auth response: </strong>Missing key auth response components.'.\"<br>\\n\";\n\t\t}\n\t\telseif (!$this->validate(sha1(print_r($response['auth'], true)), $response['timestamp'], $response['signature'], $reason)){\n\t\t\techo '<strong style=\"color: red;\">Invalid auth response: </strong>'.$reason.\".<br>\\n\";\n\t\t}\n\t\telse{\n\t\t\techo '<strong style=\"color: green;\">OK: </strong>Auth response is validated.'.\"<br>\\n\";\n\t\t}\n\t\t\n\t\t\n\t/**\n\t * Auth response dump\n\t */\n\t\techo \"<pre>\";\n\t\tprint_r($response);\n\t\techo \"</pre>\";\n\t}",
"public function __construct()\n {\n $this->twilioClient = new Services_Twilio(env('TWILIO_ACCOUNT_SID'), env('TWILIO_AUTH_TOKEN'));\n }",
"public function sendText(Request $request)\n {\n // Step 2: set our AccountSid and AuthToken from https://twilio.com/console\n $AccountSid = env('TWILIO_ID');\n $AuthToken = env('TWILIO_TOKEN');\n\n\n// // Step 3: instantiate a new Twilio Rest Client\n $client = new Client($AccountSid, $AuthToken);\n\n// // Step 4: make an array of people we know, to send them a message. \n// // Feel free to change/add your own phone number and name here.\n// //input rules\n\n\n // $rules = [\n // 'friendName1'=>'required|min:1',\n // 'friendPhone1'=>'required|numeric|min:11',\n // 'friendName2'=>'required|min:1',\n // 'friendPhone2'=>'required|numeric|min:11',\n // ];\n\n // $request->session()->flash('ERROR_MESSAGE','Text Message was not sent');\n\n // $this->validate($request, $rules);\n\n // $request->session()->forget('ERROR_MESSAGE');\n\n \n\n $people = array(\n // \"+1(210)317-55-00\" => \"Snow White\",\n // $request->friendPhone1 => $request->friendName1,\n // $request->friendPhone2 => $request->friendName2\n\n );\n\n foreach($request->mytext as $phonenumber)\n {\n $people[$phonenumber] = \"name\";\n }\n $request->session()->flash('SUCCESS_MESSAGE', 'Message sent succesfully');\n\n// $rules = [\n// 'friendName1'=>'required|min:1',\n// 'friendPhone1'=>'required|numeric|min:11',\n// 'friendName2'=>'required|min:1',\n// 'friendPhone2'=>'required|numeric|min:11',\n// ];\n\n// $request->session()->flash('ERROR_MESSAGE','Text Message was not sent');\n\n// $this->validate($request, $rules);\n\n// $request->session()->forget('ERROR_MESSAGE');\n\n\n // Step 5: Loop over all our friends. $number is a phone number above, and \n // $name is the name next to it\n foreach ($people as $number => $name) {\n\n $sms = $client->account->messages->create(\n\n // the number we are sending to - Any phone number\n $number,\n\n array(\n // Step 6: Change the 'From' number below to be a valid Twilio number \n // that you've purchased\n 'from' => \"+12108800682\", \n \n // the sms body\n 'body' => $request->email_body\n\n // \"Hey $name, we're going to Olive Garden at 7pm. Here's the location:https://goo.gl/maps/FN6mtQYign62 .See you then!\"\n\n )\n );\n\n// // // Display a confirmation message on the screen\n echo \"Sent message to $name\".PHP_EOL;\n }\n\n\n\n\n return view('restaurants.restaurant');\n }",
"public static function call(){\n\t\t\t$request = self::get_request();\n\t\t\t$method = self::get_method();\n\t\t\t\n\t\t\t$callback_information = self::route($method, $request);\n\t\t\t$callback = $callback_information[0];\n\t\t\t$params = $callback_information[1];\n\n\t\t\t// Start an output buffer, execute the callback function for our route, and store all the captured output in $body:\n\t\t\tob_start();\n\n\t\t\t\tif(count($params) == 0)\n\t\t\t\t\tcall_user_func($callback);\n\t\t\t\telse\n\t\t\t\t\tcall_user_func($callback, $params);\n\t\t\t\t\n\t\t\t\tif (self::$body == '')\n\t\t\t\t\tself::$body = ob_get_contents();\n\t\t\t\t\n\t\t\tob_end_clean();\n\t\t}",
"public function handleGatewayCallback()\n {\n $paymentDetails = Paystack::getPaymentData();\n\n //dd($paymentDetails['status']);\n\n }",
"public function sendOTP_post()\n {\n $phone = $this->input->post('phone');\n $otp = $this->generateRandomString();\n $check = $this->User_model->select_data('*',\"tbl_otp\",array('phone'=>$phone));\n if (empty($check)) {\n $this->User_model->insert_data('tbl_otp',array('phone'=>$phone,'otp'=>$otp,'addedOn'=>date(\"Y-m-d H:i:s\")));\n } else {\n $this->User_model->update_data('tbl_otp',array('otp'=>$otp,'updatedOn'=>date(\"Y-m-d H:i:s\")),array('phone'=>$phone));\n }\n\n\n $msg = array('to'=>$phone,'body'=>\"Your verification code for Kudos is: $otp\");\n // print_r($this->twilioMessage()); die;\n $this->twilioMessage($msg);\n $status = 1;\n $response = array();\n\n if ( $status == 0 ) {\n $response['status'] = 'error';\n $response['message'] = 'This failed';\n } else {\n $response['status'] = 'success';\n $response['message'] = 'OTP sent successfully';\n $response['otp'] = $otp;\n }\n\n //echo json_encode($response);\n $this->set_response($response, REST_Controller::HTTP_OK);\n /* Twilio sms verification End */\n }",
"public function exampleCall()\n {\n return \"howdy\";\n }",
"public function sendMessage(){\n\n\n }",
"function ds_callback(): void\n {\n # Save the redirect eg if present\n $redirectUrl = false;\n if (isset($_SESSION['eg'])) {\n $redirectUrl = $_SESSION['eg'];\n }\n # reset the session\n $this->ds_logout_internal();\n $this->authService->authCallback($redirectUrl);\n }",
"public function testEventCallBackDelete()\n {\n }",
"public function testGetCallback()\n {\n $response = $this->getJson('callback');\n\n $response->assertStatus(405);\n }",
"public function testPostCallback()\n {\n $response = $this->postJson('callback');\n\n $response->assertStatus(200);\n }",
"public function testEventCallBackPatch()\n {\n }",
"public function testCallbackProcessing()\n {\n // make sure we get the processed result\n self::assertEquals(\n 'Hello, test.php!',\n $this->processor->process(\n 'test.php',\n 'Hello, world!'\n )\n );\n }",
"function send_sms($msg,$phone_number){\r\n /**\r\n * This is for Twilo\r\n */\r\n if(config('sms-gateway',1) == 1){\r\n //require_once path('plugins/sms/pages/Twilio.php');\r\n $sid = config('twilio-account-id',''); // Your Account SID from www.twilio.com/user/account\r\n $token = config('twilio-token-id',''); // Your Auth Token from www.twilio.com/user/account\r\n\r\n // Get the PHP helper library from twilio.com/docs/php/install\r\n //$client = new Services_Twilio($sid, $token);\r\n //$sms = $client->account->sms_messages->create(config('from-twilio-number',''),$phone_number, $msg, array());\r\n\r\n //using curl\r\n $ch = curl_init('https://api.twilio.com/2010-04-01/Accounts/'.$sid.'/Messages.json');\r\n $data = array(\r\n 'To' => $phone_number,\r\n 'From' => config('from-twilio-number',''),\r\n 'Body' => $msg,\r\n );\r\n $auth = $sid .\":\". $token;\r\n curl_setopt($ch, CURLOPT_POST, 1);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_USERPWD, $auth);\r\n curl_setopt($ch, CURLOPT_USERAGENT , 'Mozilla 5.0');\r\n $response = curl_exec($ch);\r\n curl_close($ch);\r\n }\r\n elseif(config('sms-gateway',1) == 2){\r\n //46elks\r\n $url = 'https://api.46elks.com/a1/SMS';\r\n $username = config('46elks_app_id');\r\n $password = config('46elks_api_password');\r\n $sms = array('from' => config('sms-from','Lightedphp'),\r\n 'to' => $phone_number,\r\n 'message' => $msg);\r\n\r\n $context = stream_context_create(array(\r\n 'http' => array(\r\n 'method' => 'POST',\r\n 'header' => \"Authorization: Basic \".\r\n base64_encode($username.':'.$password). \"\\r\\n\".\r\n \"Content-type: application/x-www-form-urlencoded\\r\\n\",\r\n 'content' => http_build_query($sms),\r\n 'timeout' => 10\r\n )\r\n ));\r\n $response = file_get_contents($url, false, $context);\r\n }\r\n elseif(config('sms-gateway',1) == 3){\r\n $url = 'http://api.clickatell.com/http/sendmsg';\r\n $user = config('clickatell-username','');\r\n $password = config('clickatell-password','');\r\n $api_id = config('clickatell-app_id');\r\n $to = $phone_number;\r\n $text = $msg;\r\n $data = array(\r\n 'user' => $user,\r\n 'password'=>$password,\r\n 'api_id'=>$api_id,\r\n 'to'=>$to,\r\n 'text' => $text\r\n );\r\n\r\n // use key 'http' even if you send the request to https://...\r\n $options = array(\r\n 'http' => array(\r\n 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\r\n 'method' => 'POST',\r\n 'content' => http_build_query($data)\r\n )\r\n );\r\n $context = stream_context_create($options);\r\n $result = file_get_contents($url, false, $context);\r\n if ($result === FALSE) { /* Handle error */ }\r\n return $result;\r\n // return var_dump($result);\r\n }\r\n elseif(config('sms-gateway',4) == 4){\r\n //echo \"Quick sms\";\r\n $url = 'http://www.quicksms1.com/api/sendsms.php';\r\n $user = config('quicksms_username','');\r\n $password = config('quicksms_password','');\r\n $to = $phone_number;\r\n $text = $msg;\r\n $data = array(\r\n 'username' => $user,\r\n 'password'=>$password,\r\n 'sender'=>config('sms-from','Betayan'),\r\n 'message'=>$text,\r\n 'recipient'=>$to,\r\n 'convert'=> 1\r\n );\r\n\r\n // use key 'http' even if you send the request to https://...\r\n $options = array(\r\n 'http' => array(\r\n 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\r\n 'method' => 'POST',\r\n 'content' => http_build_query($data)\r\n )\r\n );\r\n $context = stream_context_create($options);\r\n $result = file_get_contents($url, false, $context);\r\n\r\n return $result;\r\n // print_r($result);\r\n // exit;\r\n }elseif(config('sms-gateway',1) == 10){\r\n //Text local\r\n $apiKey = config('text-local-api-key','');\r\n $apiKey = urlencode($apiKey);\r\n\r\n // Message details\r\n $numbers = array($phone_number);\r\n $sender = urlencode(config('sms-from','LightedPHP'));\r\n $message = rawurlencode($msg);\r\n\r\n $numbers = implode(',', $numbers);\r\n\r\n // Prepare data for POST request\r\n $data = array('apikey' => $apiKey, 'numbers' => $numbers, \"sender\" => $sender, \"message\" => $message);\r\n\r\n // Send the POST request with cURL\r\n $ch = curl_init('https://api.textlocal.in/send/');\r\n curl_setopt($ch, CURLOPT_POST, true);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n $response = curl_exec($ch);\r\n curl_close($ch);\r\n\r\n // Process your response here\r\n print_r($response);die();\r\n\r\n }\r\n return true;\r\n}",
"public function handleGatewayCallback()\n {\n $paymentDetails = Paystack::getPaymentData();\n\n dd($paymentDetails);\n // Now you have the payment details,\n // you can store the authorization_code in your db to allow for recurrent subscriptions\n // you can then redirect or do whatever you want\n }",
"abstract public function handler() : void;",
"public function getBeforeSendCallback(): array;",
"public function hangupCall(string $uuid): void\n {\n $this->sender->get(\"rest/calls/active/{$uuid}/\" . RestInterface::HANGUP_CALL);\n }",
"public function testReceiveWithInvalidCallback()\n {\n $callback = 'invalid';\n $eventName = 'foo-bar';\n\n $this->adapter->expects($this->never())->method('receive');\n\n $this->eventReceiver->receive($eventName, $callback);\n }",
"function sendMessageToNumber($number, $message, $client, $myNumber) {\n if ($number != \"\" && $number != NULL && strlen($number) >= 10) {\n $client->account->messages->create(array( \n 'To' => $number, \n 'From' => $myNumber, \n 'Body' => $message, \n ));\n }\n else {\n \n echo \"Cannot send number to null or blank number\";\n }\n}",
"function tn_messages() {\n\tdo_action( 'tn_messages' );\n}",
"function handleRequest() ;",
"function registerHandler($format, $callback);",
"function mci_twilio_admin_test_form_submit($form, &$form_state) {\n $sent = mci_twilio_send(\n $form_state['values']['number'],\n $form_state['values']['message'],\n $form_state['values']['country'],\n !empty($form_state['values']['media']) ? $form_state['values']['media'] : NULL\n );\n\n if ($sent) {\n drupal_set_message(t('Your message has been sent'));\n }\n else {\n drupal_set_message(t('Unable to send your message.'), 'error');\n }\n}",
"function mailUser($transcript, $phoneNumber, $CallSid)\n{\n\t $inCallEmployeeId = getOne(\"select user_id from schedule where ph_id = (select ph_id from phone_numbers where phone_number like '%\".trim($phoneNumber).\"') and is_active=1\");\n\t$inCallEmployeeMail = getOne(\"select user_email from users where user_id = '\".$inCallEmployeeId.\"'\");\n\t$voiceURL = getOne(\"select recording_url from incomming_calls where call_sid = '\".$CallSid.\"'\");\n\t\n\t\n\tif(trim($inCallEmployeeMail) != \"\")\n\t{\n\t\t$message = \"\n\t\t\t<h3> New Call for you..!!</h3>\n\t\t\t<br />\n\t\t\tYou have a new message.<br />\n\t\t\tTranscription: \".$transcript.\"<br />\n\t\t\tVoice Url: \".$voiceURL.\"<br /><br />\n\t\t\tLog in to VBX scheduler for more details.<br />\n\t\t\tThanks.\t\t\n\t\t\";\n\t\tmailEmployee($inCallEmployeeMail, $message);\n\t}\n}",
"public function handleProviderCallback()\n {\n $user = Socialite::driver('telegram')->user();\n dd($user);\n\n // $user->token;\n }",
"function thrive_transactions_callblack() {\n\n\t// Always check for nonce before proceeding...\n\t$nonce = filter_input( INPUT_GET, 'nonce', FILTER_SANITIZE_STRING );\n\n\t// If INPUT_GET is empty try input post\n\tif ( empty( $nonce ) ) {\n\n\t\t$nonce = filter_input( INPUT_POST, 'nonce', FILTER_SANITIZE_STRING );\n\n\t}\n\n\tif ( ! wp_verify_nonce( $nonce, 'thrive-transaction-request' ) ) \n\t{\n\n\t\tdie( \n\t\t\t__( 'Invalid Request. Your session has already expired (invalid nonce). \n\t\t\t\tPlease go back and refresh your browser. Thanks!', 'thrive' ) \n\t\t);\n\n\t}\n\n\t$method = filter_input( INPUT_POST, 'method', FILTER_SANITIZE_ENCODED );\n\n\tif ( empty( $method ) ) {\n\t\t// try get action\n\t\t$method = filter_input( INPUT_GET, 'method', FILTER_SANITIZE_ENCODED );\n\t}\n\n\t$allowed_callbacks = array(\n\n\t\t// Tickets/Tasks callbacks\n\t\t'thrive_transaction_add_ticket',\n\t\t'thrive_transaction_delete_ticket',\n\t\t'thrive_transaction_fetch_task',\n\t\t'thrive_transaction_edit_ticket',\n\t\t'thrive_transaction_complete_task',\n\t\t'thrive_transaction_renew_task',\n\n\t\t// Comments callback functions.\n\t\t'thrive_transaction_add_comment_to_ticket',\n\t\t'thrive_transaction_delete_comment',\n\n\t\t// Project callback functions.\n\t\t'thrive_transactions_update_project',\n\t\t'thrive_transactions_delete_project',\n\t);\n\n\tif ( function_exists( $method ) ) {\n\t\tif ( in_array( $method, $allowed_callbacks ) ) {\n\t\t\t// execute the callback\n\t\t\t$method();\n\t\t} else {\n\t\t\tthrive_api_message(array(\n\t\t\t\t'message' => 'method is not listed in the callback',\n\t\t\t));\n\t\t}\n\t} else {\n\t\tthrive_api_message(array(\n\t\t\t'message' => 'method not allowed or method does not exists',\n\t\t));\n\t}\n\n\tthrive_api_message(array(\n\t\t\t'message' => 'transaction callback executed',\n\t\t));\n}",
"public static function handle(int $signal, Closure $callback): void\n {\n self::addCallback($signal, $callback);\n }",
"function sina_weibo_callback() {\n $o = new WeiboOAuth(variable_get('sina_weibo_api_key', '') , variable_get('sina_weibo_api_secret', '') , $_SESSION['sina_weibo_keys']['oauth_token'] , $_SESSION['sina_weibo_keys']['oauth_token_secret']);\n unset($_SESSION['sina_weibo_keys']);\n $last_key = $o->getAccessToken($_REQUEST['oauth_verifier']);\n if(sina_weibo_check_error($last_key)) {\n return '';\n }\n $c = new WeiboClient(variable_get('sina_weibo_api_key', '') , variable_get('sina_weibo_api_secret', ''), $last_key['oauth_token'] , $last_key['oauth_token_secret']);\n $me = $c->verify_credentials();\n if(sina_weibo_check_error($last_key)) {\n return '';\n }\n\n $uid = db_result(db_query('SELECT uid FROM {weibo_sina_users} WHERE sina_uid=%d', $me['id']));\n // User is already registered\n if($uid) {\n $account = user_load($uid);\n user_external_login($account);\n db_query('UPDATE {weibo_sina_users} SET oauth_token=\"%s\", oauth_token_secret=\"%s\" WHERE uid=%d', $last_key['oauth_token'], $last_key['oauth_token_secret'], $account->uid);\n drupal_goto();\n }\n // User is not registered. Register new user\n else {\n $_SESSION['sina_weibo_token'] = $last_key + array('screen_name' => $me['screen_name']);\n drupal_goto('user/register/sina-weibo');\n }\n}",
"function recruitPlayer($cxn,$player,$request)\r\n {\r\n \r\n }",
"function failure_callback( $host, $port ) {\n\t}",
"public function listen(callable $callback);",
"public function setCallback($callback);",
"public function callback()\n {\n /* Load helpers */\n $this->load->helper('Twispay_TW_Helper_Response');\n $this->load->helper('Twispay_TW_Logger');\n $this->load->helper('Twispay_TW_Notification');\n $this->load->helper('Twispay_TW_Status_Updater');\n $this->load->helper('Twispay_TW_Thankyou');\n\n $this->language->load('extension/payment/twispay');\n $this->load->model('extension/payment/twispay');\n $this->load->model('checkout/order');\n\n /* Get the Site ID and the Private Key. */\n if (!$this->config->get('twispay_testMode')) {\n $this->secretKey = $this->config->get('twispay_live_site_key');\n } else {\n $this->secretKey = $this->config->get('twispay_staging_site_key');\n }\n\n if (!empty($_POST)) {\n echo $this->language->get('processing');\n sleep(1);\n\n /* Check if the POST is corrupted: Doesn't contain the 'opensslResult' and the 'result' fields. */\n if (((FALSE == isset($_POST['opensslResult'])) && (FALSE == isset($_POST['result'])))) {\n $this->_log($this->lang('log_error_empty_response'));\n Twispay_TW_Notification::notice_to_cart($this);\n die( $this->lang('log_error_empty_response') );\n }\n\n /* Check if there is NO secret key. */\n if ('' == $this->secretKey) {\n $this->_log($this->lang('log_error_invalid_private'));\n Twispay_TW_Notification::notice_to_cart($this);\n die( $this->lang('log_error_invalid_private') );\n }\n\n /* Extract the server response and decript it. */\n $decrypted = Twispay_TW_Helper_Response::twispay_tw_decrypt_message(/*tw_encryptedResponse*/(isset($_POST['opensslResult'])) ? ($_POST['opensslResult']) : ($_POST['result']), $this->secretKey);\n\n /* Check if decryption failed. */\n if (FALSE === $decrypted) {\n $this->_log($this->lang('log_error_decryption_error'));\n Twispay_TW_Notification::notice_to_cart($this);\n die( $this->lang('log_error_decryption_error') );\n } else {\n $this->_log($this->lang('log_ok_string_decrypted'). json_encode($decrypted));\n }\n\n /* Validate the decripted response. */\n $orderValidation = Twispay_TW_Helper_Response::twispay_tw_checkValidation($decrypted, $this);\n if (TRUE !== $orderValidation) {\n $this->_log($this->lang('log_error_validating_failed'));\n Twispay_TW_Notification::notice_to_cart($this);\n die( $this->lang('log_error_validating_failed') );\n }\n\n /* Extract the order. */\n $orderId = explode('_', $decrypted['externalOrderId'])[0];\n $order = $this->model_checkout_order->getOrder($orderId);\n\n /* Check if the order extraction failed. */\n if (FALSE == $order) {\n $this->_log($this->lang('log_error_invalid_order'));\n Twispay_TW_Notification::notice_to_cart($this);\n die( $this->lang('log_error_invalid_order') );\n }\n\n /* If transaction already exists */\n $transaction = $this->model_extension_payment_twispay->checktransactions($decrypted['transactionId']);\n if(empty($transaction)){\n /* If there is no invoice created */\n if (!$order['invoice_no']) {\n /* Create invoice */\n $invoice = $this->model_extension_payment_twispay->createInvoiceNo($decrypted['externalOrderId'],$order['invoice_prefix']);\n $decrypted['invoice'] = $invoice;\n $this->model_extension_payment_twispay->loggTransaction($decrypted);\n }\n }\n Twispay_TW_Status_Updater::updateStatus_backUrl($orderId, $decrypted, $this);\n } else {\n $this->_log($this->lang('no_post'));\n Twispay_TW_Notification::notice_to_cart($this, '', $this->lang('no_post'));\n }\n }",
"public static function listen(Closure $callback)\n {\n }",
"public function __construct()\n {\n $this->callbacks = array(\n \n );\n \n $this->initializeMessages();\n }",
"public function callbackAction() {\n $responseToken = (string)$this->getRequest()->getParam('cko-payment-token');\n $session = Mage::getSingleton('chargepayment/session_quote');\n $isLocalPayment = $session->isCheckoutLocalPaymentTokenExist($responseToken);\n\n $modelWebhook = Mage::getModel('chargepayment/webhook');\n\n if ($responseToken) {\n $result = $modelWebhook->authorizeByPaymentToken($responseToken);\n\n if ($isLocalPayment) {\n $this->_redirect('chargepayment/api/complete', array('_query' => 'token=' . $responseToken));\n return;\n }\n\n if ($result['is_admin'] === false) {\n $redirectUrl = 'checkout/onepage/success';\n\n if ($result['error'] === true) {\n $redirectUrl = Mage::helper('checkout/url')->getCheckoutUrl();\n Mage::getSingleton('core/session')->addError('Please check you card details and try again. Thank you');\n\n if(!is_null($result['order_increment_id'])){\n $order = Mage::getModel('sales/order')->loadByIncrementId($result['order_increment_id']);\n $order->cancel();\n $order->addStatusHistoryComment('Order has been cancelled.');\n $order->save();\n }\n\n $this->_redirectUrl($redirectUrl);\n return;\n }\n\n $this->_redirect($redirectUrl);\n }\n\n return;\n }\n }",
"function sendSMS($client, $number, $message) {\r\n $client->messages->create(\r\n $number,\r\n array(\r\n \"from\" => \"+16474901643\",\r\n \"body\" => \"Reminder: \".$message\r\n )\r\n );\r\n}",
"function reserv_cb() {\n\n $fields = array();\n $errors = new WP_Error();\n\n // Buffer output\n ob_start();\n\n // Custom registration, go!\n reserv($fields, $errors);\n\n // Return buffer\n// return ob_get_clean();\n}",
"function myServiceMethod ($request, $response)\n\t\t{\n $response->data['message'] = 'I received from you: ' . $request->data['message'];\n $response->data['success'] = 'true';\n\t\t}",
"function executeCallbacks() {\n\n\t\t// receive callbacks with a timeout (default: 2 ms)\n\t\t$this->client->resetError();\n\t\t$this->client->readCB();\n\n\t\t// now get the responses out of the 'buffer'\n\t\t$calls = $this->client->getCBResponses();\n\t\tif ($this->client->isError()) {\n\t\t\ttrigger_error('ExecCallbacks XMLRPC Error [' . $this->client->getErrorCode() . '] - ' . $this->client->getErrorMessage(), E_USER_ERROR);\n\t\t}\n\n\t\tif (!empty($calls)) {\n\t\t\twhile ($call = array_shift($calls)) {\n\t\t\t\tswitch ($call[0]) {\n\t\t\t\t\tcase 'TrackMania.PlayerConnect': // [0]=Login, [1]=IsSpectator\n\t\t\t\t\t\t$this->playerConnect($call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.PlayerDisconnect': // [0]=Login\n\t\t\t\t\t\t$this->playerDisconnect($call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.PlayerChat': // [0]=PlayerUid, [1]=Login, [2]=Text, [3]=IsRegistredCmd\n\t\t\t\t\t\t$this->playerChat($call[1]);\n\t\t\t\t\t\t$this->releaseEvent('onChat', $call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.PlayerCheckpoint': // [0]=PlayerUid, [1]=Login, [2]=TimeOrScore, [3]=CurLap, [4]=CheckpointIndex\n\t\t\t\t\t\tif (!$this->server->isrelay)\n\t\t\t\t\t\t\t$this->releaseEvent('onCheckpoint', $call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.PlayerFinish': // [0]=PlayerUid, [1]=Login, [2]=TimeOrScore\n\t\t\t\t\t\t$this->playerFinish($call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.BeginRace': // [0]=Challenge\n\t\t\t\t\t\t// ignore, use BeginChallenge\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.EndRace': // [0]=Rankings[], [1]=Challenge\n\t\t\t\t\t\t// ignore, use BeginChallenge\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.BeginRound': // none\n\t\t\t\t\t\t$this->beginRound();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.EndRound': // none\n\t\t\t\t\t\t$this->endRound();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.StatusChanged': // [0]=StatusCode, [1]=StatusName\n\t\t\t\t\t\t// update status changes\n\t\t\t\t\t\t$this->prevstatus = $this->currstatus;\n\t\t\t\t\t\t$this->currstatus = $call[1][0];\n\t\t\t\t\t\t// check WarmUp state\n\t\t\t\t\t\tif ($this->currstatus == 3 || $this->currstatus == 5) {\n\t\t\t\t\t\t\t$this->client->query('GetWarmUp');\n\t\t\t\t\t\t\t$this->warmup_phase = $this->client->getResponse();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($this->currstatus == 4) { // Running - Play\n\t\t\t\t\t\t\t$this->runningPlay();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->releaseEvent('onStatusChangeTo' . $this->currstatus, $call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.BeginChallenge': // [0]=Challenge, [1]=WarmUp, [2]=MatchContinuation\n\t\t\t\t\t\t$this->beginMap($call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.EndChallenge': // [0]=Rankings[], [1]=Challenge, [2]=WasWarmUp, [3]=MatchContinuesOnNextChallenge, [4]=RestartChallenge\n\t\t\t\t\t\t$this->endMap($call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.PlayerManialinkPageAnswer': // [0]=PlayerUid, [1]=Login, [2]=Answer, [3]=Entries\n\t\t\t\t\t\t$this->releaseEvent('onPlayerManialinkPageAnswer', $call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.BillUpdated': // [0]=BillId, [1]=State, [2]=StateName, [3]=TransactionId\n\t\t\t\t\t\t$this->releaseEvent('onBillUpdated', $call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.ChallengeListModified': // [0]=CurChallengeIndex, [1]=NextChallengeIndex, [2]=IsListModified\n\t\t\t\t\t\t$this->releaseEvent('onMapListModified', $call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.PlayerInfoChanged': // [0]=PlayerInfo\n\t\t\t\t\t\t$this->playerInfoChanged($call[1][0]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.PlayerIncoherence': // [0]=PlayerUid, [1]=Login\n\t\t\t\t\t\t$this->releaseEvent('onPlayerIncoherence', $call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.TunnelDataReceived': // [0]=PlayerUid, [1]=Login, [2]=Data\n\t\t\t\t\t\t$this->releaseEvent('onTunnelDataReceived', $call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.Echo': // [0]=Internal, [1]=Public\n\t\t\t\t\t\t$this->releaseEvent('onEcho', $call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.ManualFlowControlTransition': // [0]=Transition\n\t\t\t\t\t\t$this->releaseEvent('onManualFlowControlTransition', $call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.VoteUpdated': // [0]=StateName, [1]=Login, [2]=CmdName, [3]=CmdParam\n\t\t\t\t\t\t$this->releaseEvent('onVoteUpdated', $call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// new MP callbacks:\n\n\t\t\t\t\tcase 'TrackMania.RulesScriptCallback': // [0]=Param1, [1]=Param2\n\t\t\t\t\t\t$this->releaseEvent('onRulesScriptCallback', $call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// do nothing\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $calls;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function handleRequest() {}",
"function wp_check_jsonp_callback($callback)\n {\n }",
"public function start_call()\n {\n if (post_data('tokbox_session_key') == NULL || post_data('tokbox_token') == NULL)\n {\n exit(json_encode(array('status' => '0')));\n }\n\n $this->session->set_userdata('tokbox_data', post_data());\n exit(json_encode(array('status' => '1')));\n }",
"function executeCallbacks() {\n\n\t\t// receive callbacks with a timeout of 1 second ...\n\t\t$this->client->readCB(2000);\n\n\t\t// now get the responses out of the 'buffer' ...\n\t\t$calls = $this->client->getCBResponses();\n\n\t\tif (!empty($calls)) {\n\t\t\twhile ($call = array_shift($calls)) {\n\t\t\t\tswitch ($call[0]) {\n\t\t\t\t\tcase 'TrackMania.PlayerConnect':\n\t\t\t\t\t\t// event is released in the function!\n\t\t\t\t\t\t$this->playerConnect($call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.PlayerDisconnect':\n\t\t\t\t\t\t// event is released in the function!\n\t\t\t\t\t\t$this->playerDisconnect($call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.PlayerManialinkPageAnswer':\n\t\t\t\t\t\t$this->playerServerMessageAnswer($call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.BillUpdated':\n\t\t\t\t\t\t$this->releaseEvent('onBillUpdated', $call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.PlayerFinish':\n\t\t\t\t\t\t$this->playerFinish($call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.PlayerChat':\n\t\t\t\t\t\t$this->playerChat($call[1]);\n\t\t\t\t\t\t$this->releaseEvent('onChat', $call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.BeginRace':\n\t\t\t\t\t\t$this->beginRace($call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.EndRace':\n\t\t\t\t\t\t$this->endRace($call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.PlayerCheckpoint':\n\t\t\t\t\t\t$this->releaseEvent('onCheckpoint', $call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.PlayerIncoherence':\n\t\t\t\t\t\t$this->releaseEvent('onPlayerIncoherence', $call[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.BeginRound':\n\t\t\t\t\t\t$this->beginRound();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TrackMania.StatusChanged':\n//\t\t\t\t\t\t$this->console_text($call[1][0].\" - \".$call[1][1]);\n\t\t\t\t\t\tif ( $call[1][0] == 4 )\t\t// Running - Play\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->runningPlay();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( $call[1][0] == 3 )\t\t// Synchronisation (always)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayAllPlayerInfo($this, $this->server->challenge);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( $call[1][0] == 2 )\t\t// Launching (new map)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( $call[1][0] == 5 )\t\t// Finish (always)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// do nothing ...\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $calls;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function getCallBackUrl()\r\n {\r\n \r\n }",
"function sendMessage($msg) {\n // Your Account SID and Auth Token from twilio.com/console\n $sid = '<YOUR OWN TWILIO ACCOUNTSID>';\n $token = '<YOUR OWN TWILIO TOKEN>>';\n $client = new Client($sid, $token);\n try {\n $client->messages->create(\n // the number you'd like to send the message to\n '<TWILIIO RECEIPIENT>',\n array(\n // A Twilio phone number you purchased at twilio.com/console\n 'from' => '<TWILIO NUMBER THAT YOU HAVE BEEN GIVEN>',\n // the body of the text message you'd like to send\n 'body' => $msg\n )\n );\n echo \"Sms sent with msg :\\n\".$msg;\n } catch (TwilioException $e){\n echo \"Could not send. Twilio replied with: \" . $e;\n } \n}",
"public function __construct($recipient, $callback)\n {\n $this->callback = $callback;\n\n parent::__construct($recipient);\n }",
"public function callback() {\n\t\t$order_id = $this->request->get['order_id'];\n\t\t$data['continue'] = $this->url->link('checkout/success');\n\t\t\n\t\t$this->load->language('payment/paynow');\n\t\t$this->load->model('payment/paynow');\n\t\t\n\t\t$paynowInfo = $this->model_payment_paynow->getPaynowInfo($order_id);\n\t\t$data['redirect_url'] = \"\";\n\t\t\n\t\tif ($paynowInfo)\n\t\t{\n\t\t\t$this->session->data['order_id'] = $order_id;\n\n\t\t\t$ch = curl_init();\n\n\t\t\t//set the url, number of POST vars, POST data\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $paynowInfo['poll_url']);\n\t\t\tcurl_setopt($ch, CURLOPT_POST, 0);\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, '');\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n\t\t\t//execute post\n\t\t\t$result = curl_exec($ch);\n \n\t\t\tif($result) {\n\n\t\t\t\t//close connection\n\t\t\t\t$msg = $this->ParseMsg($result);\n\t\t\t\t\n\t\t\t\t$MerchantKey = $this->config->get('paynow_config_merchant_key');\n\t\t\t\t$validateHash = $this->CreateHash($msg, $MerchantKey);\n \n\t\t\t\tif($validateHash != $msg[\"hash\"]){\n\t\t\t\t\t$data['text_message'] = \"Paynow reply hashes do not match : \" . $validateHash . \" - \" . $msg[\"hash\"];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->model_payment_paynow->update($order_id\n\t\t\t\t\t\t\t\t, $paynowInfo['browser_url']\n\t\t\t\t\t\t\t\t, $msg[\"pollurl\"]\n\t\t\t\t\t\t\t\t, $msg[\"paynowreference\"]\n\t\t\t\t\t\t\t\t, $msg[\"amount\"]\n\t\t\t\t\t\t\t\t, $msg[\"status\"]\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t$this->load->model('checkout/order');\n\n\t\t\t\t\tif (trim(strtolower($msg[\"status\"])) == $this->language->get('ps_awaiting_redirect') || trim(strtolower($msg[\"status\"])) == $this->language->get('ps_created_but_not_paid')){\n\t\t\t\t\t\t$data['text_message'] = \"Transaction has not yet been paid on Paynow.<br /><br />\"\n\t\t\t\t\t\t\t\t . \"<a class='s_button_1 s_main_color_bgr' href='\" . $paynowInfo['browser_url'] . \"'><span class='s_text'>Return to Paynow</span></a>\";\n\t\t\t\t\t}\n\t\t\t\t\telse if (trim(strtolower($msg[\"status\"])) == $this->language->get('ps_cancelled')){\n\n\t\t\t\t\t\t$data['text_message'] = \"Transaction was cancelled by the user. You will be redirected back to the checkout page.<br /><br />\";\n\t\t\t\t\t\t$data['redirect_url'] = str_replace('&', '&', $this->url->link('checkout/checkout'));\n\n\t\t\t\t\t\t$order = $this->model_checkout_order->getOrder($order_id);\n\t\t\t\t\t\tif($order[\"order_status_id\"] != 7){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$data['text_message'] = \"Transaction was cancelled by the user. You will be redirected back to the checkout page.<br /><br />\";\n $data['redirect_url'] = str_replace('&', '&', $this->url->link('checkout/checkout'));\n\t\t\t\t\t\t\t$this->model_checkout_order->addOrderHistory($order_id, 7, \"Cancelled by user.\", true);\n\t\t\t\t\t\t\t//$this->model_checkout_order->confirm($order_id, 7, \"Cancelled by user.\", true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (trim(strtolower($msg[\"status\"])) == $this->language->get('ps_failed')){\n\t\t\t\t\t\t$data['text_message'] = \"Transaction payment has failed on Paynow. You can still resume the payment.<br /><br />\"\n\t\t\t\t\t\t\t\t . \"<a class='s_button_1 s_main_color_bgr' href='\" . $paynowInfo['browser_url'] . \"'><span class='s_text'>Return to Paynow</span></a>\";\n\t\t\t\t\t}\n\t\t\t\t\telse if (trim(strtolower($msg[\"status\"])) == $this->language->get('ps_paid') || trim(strtolower($msg[\"status\"])) == $this->language->get('ps_awaiting_delivery') || trim(strtolower($msg[\"status\"])) == $this->language->get('ps_delivered')){\n\t\t\t\t\t\t$data['text_message'] = \"Transaction Paid Successfully. You will be redirected to a confirmation page.<br /><br />\";\n\t\t\t\t\t\t$data['redirect_url'] = str_replace('&', '&', $this->url->link('checkout/success'));\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t$order = $this->model_checkout_order->getOrder($order_id);\n\t\t\t\t\t\tif($order[\"order_status_id\"] != $this->final_order_status){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->model_checkout_order->addOrderHistory($order_id, $this->final_order_status);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t $data['text_message'] = \"Invalid status in from Paynow, cannot continue.\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t $data['text_message'] = \"Could not update order info from Paynow.\";\n\t\t\t //TODO do we trust this? Probably not... should still get the results to confirm.\n\t\t\t\t\t\n\t\t\t\t//trigger_error(sprintf('Curl failed with error #%d: %s',\t$e->getCode(), $e->getMessage()),E_USER_NOTICE);\n\t\t\t}\n\n\t\t\tcurl_close($ch);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['text_message'] = \"Paynow order info not found.\";\n\t\t}\n\t\t$data['heading_title'] = \"Paynow Results\";\n\n\t\t$this->response->redirect($data['redirect_url']);\n\t\t\n\t}",
"public function actionApi() {\n Yii::import('application.extensions.Payments.*');\n\n $way = Yii::app()->request->getParam('way');\n if ($way == '99bill') {\n $type = Yii::app()->request->getParam('callback');\n $func = $type . 'Callback';\n $payment = new PaymentsKuaiqian();\n $result = $payment->$func();\n if ($result['result'] == 1) {//成功\n $SmsHandler = new SMS();\n $SmsHandler->sendPaymentMsg($result['orderId']);\n }\n if ($type == 'async' || Yii::app()->user->isGuest) {\n $url = 'http://' . $_SERVER['HTTP_HOST'] . '/order/payments/completed/id/' . $result['orderId'];\n echo \"<result>{$result['result']}</result><redirecturl>$url</redirecturl>\";\n exit();\n } else {\n $this->redirect('/order/payments/completed/id/' . $result['orderId']);\n }\n }\n }"
] | [
"0.6735467",
"0.63991416",
"0.62943685",
"0.61327505",
"0.60058695",
"0.574995",
"0.5714228",
"0.565994",
"0.5649607",
"0.5649387",
"0.5557216",
"0.5537729",
"0.55124456",
"0.5477619",
"0.545547",
"0.5451063",
"0.5441673",
"0.5428308",
"0.53810996",
"0.53808165",
"0.5365673",
"0.53386956",
"0.53386956",
"0.53373015",
"0.53373015",
"0.53372777",
"0.53321946",
"0.533006",
"0.5308916",
"0.53060246",
"0.52713984",
"0.52567995",
"0.525404",
"0.52534497",
"0.5241281",
"0.52217305",
"0.52158827",
"0.5210709",
"0.52063453",
"0.5204091",
"0.52028435",
"0.5201506",
"0.5200246",
"0.5197949",
"0.5196537",
"0.51914525",
"0.5183987",
"0.5179589",
"0.51789886",
"0.5175518",
"0.51318157",
"0.5121509",
"0.5112362",
"0.5105716",
"0.5101025",
"0.50901717",
"0.50698596",
"0.50657743",
"0.5051555",
"0.5044347",
"0.50384283",
"0.50316083",
"0.5021157",
"0.50181013",
"0.5010773",
"0.50088954",
"0.49985698",
"0.49983212",
"0.49920568",
"0.49833593",
"0.4978267",
"0.49775285",
"0.4975304",
"0.4974644",
"0.49736768",
"0.49665838",
"0.49642578",
"0.49617043",
"0.49568853",
"0.49549878",
"0.49529433",
"0.49509352",
"0.49467203",
"0.49431017",
"0.49363106",
"0.49311307",
"0.49259752",
"0.4924094",
"0.49217308",
"0.49168098",
"0.49129736",
"0.4909048",
"0.49036834",
"0.4901241",
"0.4896409",
"0.48942226",
"0.48929006",
"0.4891216",
"0.48854458",
"0.48826548"
] | 0.5478984 | 13 |
Get users based on usernames or group. | function hc_get_users($args, $widget = false){
//set gravatar size
if (!isset($args['gravatarsize']) || $args['gravatarsize'] == '') {
$gravatarSize = '32';
}else{
$gravatarSize = $args['gravatarsize'];
}
//display group or single
if(isset($args['single']) && ($args['single'] == 'single' || $args['single'] == true)){
$hc_users = array();
$user = $args['username'];
$userArr = explode(',',$user);
foreach ($userArr as $key => $username) {
$hc_users[] = get_user_by('login', $username);
}
}else{
//args for getting users
if (empty($args['group']))
return new WP_Error('No users', __("No group or user specified", 'hypercontact'));
$roles = array(
'role' => $args['group'],
'fields' => array('ID')
);
// Create a new user query
$wp_user_query = new WP_User_Query($roles);
// Get user meta
$groupId = $wp_user_query->get_results();
$hc_users = array();
foreach ($groupId as $key => $value) {
$hc_users[] = get_user_by('id', $value->ID);
}
}
foreach ($hc_users as $index => $user) {
$user->gravatar = get_avatar( $user->user_email, $gravatarSize);
$user = hc_filter($user, $widget);
}
if(isset($args['fields'])){
$fieldsString = $args['fields'];
$fieldsArray = explode(',',$fieldsString);
$fieldsArray = array_map('trim', $fieldsArray);
foreach ($hc_users as $key => $user){
foreach ($user as $field => $value) {
if (!in_array($field, $fieldsArray)) {
unset($user->$field);
}
}
}
}
if (!empty($hc_users) && (isset($hc_users[0]) && !empty($hc_users[0]))){
return $hc_users;
}else{
return new WP_Error('No info', __("No user info could be found", 'hypercontact'));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getUsers() {\n\n\tglobal $db;\n\treturn $db->getUsersByGroup ( $GLOBALS [\"targetId\"] );\n\n}",
"function group_users($group_name=NUL){\n $result = array();\n if ($group_name==NULL){ return (false); }\n if (!$this->_bind){ return (false); }\n $filter=\"(&(|(objectClass=posixGroup)(objectClass=groupofNames))(\".$this->_group_cn_identifier.\"=\".$this->ldap_search_encode($group_name).\"))\";\n\n $fields=array(\"member\",\"memberuid\");\n $sr=ldap_search($this->_conn,$this->_base_dn,$filter,$fields);\n if (FALSE === $sr) {\n $this->_warning_message = \"group_users: ldap_search error \".ldap_errno($this->_conn).\": \".ldap_error($this->_conn);\n echo \"DEBUG: \".$this->_warning_message.\"\\n\";\n }\n $entries = $this->ldap_get_entries_raw($sr);\n\n // DEBUG\n if (0 == count($entries)) {\n $this->_warning_message = \"group_users: No entry for the specified filter $filter\";\n echo \"DEBUG: \".$this->_warning_message;\n }\n\n if (isset($entries[0][\"member\"][0]))\n {\n $result = $this->nice_names($entries[0][\"member\"]);\n /*\n for ($i=0; $i++; $i < $entries[0][\"member\"][count])\n {\n $result[] == ($entries[0][\"member\"][$i]);\n }\n */\n }\n elseif (isset($entries[0][\"memberuid\"][0]))\n {\n $result = $this->nice_names($entries[0][\"memberuid\"]);\n }\n else\n {\n $result = array();\n }\n return ($result);\n }",
"public function getUsersInGroup()\n\t{\n\t\tself::authenticate();\n\n\t\t$group = FormUtil::getPassedValue('group', null, 'GETPOST');\n\n\t\tif($group == null) {\n\t\t\treturn self::retError('ERROR: No group passed!');\n\t\t}\n\n\t\t$group = UserUtil::getGroups('name = \\'' . mysql_escape_string($group) . '\\'');\n\t\t$return = array();\n\t\tif(count($group) == 1) {\n\t\t\tforeach($group as $item) {\n\t\t\t\t$users = UserUtil::getUsersForGroup($item['gid']);\n\t\t\t\tforeach($users as $uid) {\n\t\t\t\t\t$return[] = UserUtil::getVar('uname', $uid);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$return = array();\n\t\t}\n\n\t\treturn self::ret($return);\n\t}",
"public function getUsers()\n {\n\t\treturn $this->api->listUsersOfGroup($this->getID());\n }",
"public function findUsers();",
"public function findUsers();",
"public function getUsers();",
"public function getUsers();",
"public function getUsers();",
"function wfSpecialListusers( $par = null ) {\n\tglobal $wgRequest;\n\n\tlist( $limit, $offset ) = wfCheckLimits();\n\n\n\t$slu = new ListUsersPage();\n\t\n\t/**\n\t * Get some parameters\n\t */\n\t$groupTarget = isset($par) ? $par : $wgRequest->getVal( 'group' );\n\t$slu->requestedGroup = $groupTarget;\n\t$slu->requestedUser = $wgRequest->getVal('username');\n\n\treturn $slu->doQuery( $offset, $limit );\n}",
"public function retrieve_users()\n {\n $search_query = Request::post(self::PARAM_SEARCH_QUERY);\n \n // Set the conditions for the search query\n if ($search_query && $search_query != '')\n {\n $conditions[] = Utilities::query_to_condition(\n $search_query, \n array(\n new PropertyConditionVariable(User::class_name(), User::PROPERTY_USERNAME), \n new PropertyConditionVariable(User::class_name(), User::PROPERTY_FIRSTNAME), \n new PropertyConditionVariable(User::class_name(), User::PROPERTY_LASTNAME)));\n }\n \n // Only include active users\n $conditions[] = new EqualityCondition(\n new PropertyConditionVariable(User::class_name(), User::PROPERTY_ACTIVE), \n new StaticConditionVariable(1));\n \n // Combine the conditions\n $count = count($conditions);\n if ($count > 1)\n {\n $condition = new AndCondition($conditions);\n }\n \n if ($count == 1)\n {\n $condition = $conditions[0];\n }\n \n $this->user_count = DataManager::count(User::class_name(), $condition);\n $parameters = new DataClassRetrievesParameters(\n $condition, \n 100, \n $this->get_offset(), \n array(\n new OrderBy(new PropertyConditionVariable(User::class_name(), User::PROPERTY_LASTNAME)), \n new OrderBy(new PropertyConditionVariable(User::class_name(), User::PROPERTY_FIRSTNAME))));\n \n return DataManager::retrieves(User::class_name(), $parameters);\n }",
"function GetUsers($userid = 0, $sortinfo = array(), $countonly = false, $start = 0, $perpage = 10, $quicksearch = false, $groupID = false)\n\t{\n\t\t$userid = intval($userid);\n\t\t$start = intval($start);\n\t\t$groupID = intval($groupID);\n\n\t\t$searchSQL = '';\n\t\t$groupIDSQL = '';\n\n\t\tif (!empty($quicksearch) ) {\n\t\t\tif (!empty($searchSQL)) {\n\t\t\t\t$searchSQL .= ' AND ';\n\t\t\t}\n\n\t\t\t$quicksearch = $this->Db->Quote($quicksearch);\n\t\t\tif ($quicksearch{0} != '%' && substr($quicksearch, -1) != '%') {\n\t\t\t\t$quicksearch = \"%{$quicksearch}%\";\n\t\t\t}\n\n\t\t\t$comparisonOperator = (SENDSTUDIO_DATABASE_TYPE == 'pgsql' ? 'ILIKE' : 'LIKE');\n\n\t\t\t$searchSQL .= \"(\n\t\t\t\tusername {$comparisonOperator} '{$quicksearch}'\n\t\t\t\tOR fullname {$comparisonOperator} '{$quicksearch}'\n\t\t\t\tOR emailaddress {$comparisonOperator} '{$quicksearch}'\n\t\t\t)\";\n\t\t}\n\n\t\tif (!empty($groupID)) {\n\t\t\tif (!empty($searchSQL)) {\n\t\t\t\t$searchSQL .= ' AND ';\n\t\t\t}\n\n\t\t\t$searchSQL .= \"u.groupid = {$groupID}\";\n\t\t}\n\n\t\tif ($countonly) {\n\t\t\t$query = \"SELECT COUNT(userid) AS count FROM [|PREFIX|]users AS u\";\n\n\t\t\tif ($userid) {\n\t\t\t\t$query .= \" WHERE userid={$userid} {$searchSQL}\";\n\t\t\t} elseif (!empty($searchSQL)) {\n\t\t\t\t$query .= \" WHERE {$searchSQL}\";\n\t\t\t}\n\n\t\t\t$result = $this->Db->Query($query);\n\t\t\tif (!$result) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn $this->Db->FetchOne($result, 'count');\n\t\t}\n\n\t\t$query = \"\n\t\t\tSELECT\tu.*, g.groupname\n\t\t\tFROM\t[|PREFIX|]users AS u\n\t\t\t\t\t\tLEFT JOIN [|PREFIX|]usergroups AS g\n\t\t\t\t\t\t\tON u.groupid = g.groupid\n\t\t\";\n\t\tif ($userid) {\n\t\t\t$query .= \" WHERE userid={$userid} {$searchSQL}\";\n\t\t} elseif (!empty($searchSQL)) {\n\t\t\t$query .= \" WHERE {$searchSQL}\";\n\t\t}\n\n\t\t$order = (isset($sortinfo['SortBy']) && !is_null($sortinfo['SortBy'])) ? strtolower($sortinfo['SortBy']) : $this->DefaultOrder;\n\t\t$order = (in_array($order, array_keys($this->ValidSorts))) ? $this->ValidSorts[$order] : $this->DefaultOrder;\n\n\t\t$direction = (isset($sortinfo['Direction']) && !is_null($sortinfo['Direction'])) ? $sortinfo['Direction'] : $this->DefaultDirection;\n\n\t\t$direction = (strtolower($direction) == 'up' || strtolower($direction) == 'asc') ? 'ASC' : 'DESC';\n\t\t$query .= \" ORDER BY \" . $order . \" \" . $direction;\n\n\t\tif ($perpage != 'all' && ($start || $perpage)) {\n\t\t\t$query .= $this->Db->AddLimit($start, $perpage);\n\t\t}\n\n\t\t$result = $this->Db->Query($query);\n\t\tif (!$result) {\n\t\t\tlist($error, $level) = $this->Db->GetError();\n\t\t\ttrigger_error($error, $level);\n\t\t\treturn false;\n\t\t}\n\t\t$users = array();\n\t\twhile ($row = $this->Db->Fetch($result)) {\n\t\t\t$users[] = $row;\n\t\t}\n\t\treturn $users;\n\t}",
"public function findUsers($args)\n {\n // Need read access to call this function\n if (!SecurityUtil::checkPermission(\"{$this->name}::\", '::', ACCESS_READ)) {\n return false;\n }\n\n $profileModule = System::getVar('profilemodule', '');\n $useProfileMod = (!empty($profileModule) && ModUtil::available($profileModule));\n\n $dbtable = DBUtil::getTables();\n $userstable = $dbtable['users'];\n $userscolumn = $dbtable['users_column'];\n\n // Set query conditions (unless some one else sends a hardcoded one)\n $where = array();\n if (!isset($args['condition']) || !$args['condition']) {\n // Do not include anonymous user\n $where[] = \"({$userscolumn['uid']} != 1)\";\n\n foreach ($args as $arg => $value) {\n if ($value) {\n switch($arg) {\n case 'uname':\n // Fall through to next on purpose--no break\n case 'email':\n $where[] = \"({$userscolumn[$arg]} LIKE '%\".DataUtil::formatForStore($value).\"%')\";\n break;\n case 'ugroup':\n $uidList = UserUtil::getUsersForGroup($value);\n if (is_array($uidList) && !empty($uidList)) {\n $where[] = \"({$userscolumn['uid']} IN (\" . implode(', ', $uidList) . \"))\";\n }\n break;\n case 'regdateafter':\n $where[] = \"({$userscolumn['user_regdate']} > '\"\n . DataUtil::formatForStore($value) . \"')\";\n break;\n case 'regdatebefore':\n $where[] = \"({$userscolumn['user_regdate']} < '\"\n . DataUtil::formatForStore($value) . \"')\";\n break;\n case 'dynadata':\n if ($useProfileMod) {\n $uidList = ModUtil::apiFunc($profileModule, 'user', 'searchDynadata', array(\n 'dynadata' => $value\n ));\n if (is_array($uidList) && !empty($uidList)) {\n $where[] = \"({$userscolumn['uid']} IN (\" . implode(', ', $uidList) . \"))\";\n }\n }\n break;\n default:\n // Skip unknown values--do nothing, and no error--might be other legitimate arguments.\n }\n }\n }\n }\n // TODO - Should this exclude pending delete too?\n $where[] = \"({$userscolumn['activated']} != \" . Users_Constant::ACTIVATED_PENDING_REG . \")\";\n $where = 'WHERE ' . implode(' AND ', $where);\n\n $permFilter = array();\n $permFilter[] = array(\n 'realm' => 0,\n 'component_left' => $this->name,\n 'component_middle' => '',\n 'component_right' => '',\n 'instance_left' => 'uname',\n 'instance_middle' => '',\n 'instance_right' => 'uid',\n 'level' => ACCESS_READ,\n );\n $objArray = DBUtil::selectObjectArray('users', $where, 'uname', null, null, null, $permFilter);\n\n return $objArray;\n }",
"function find_all_user(){\n global $db;\n $results = array();\n $sql = \"SELECT u.id,u.name,u.username,u.user_level,u.status,u.last_login,email,\";\n $sql .=\"g.group_name \";\n $sql .=\"FROM users u \";\n $sql .=\"LEFT JOIN user_groups g \";\n $sql .=\"ON g.group_level=u.user_level ORDER BY u.name ASC\";\n $result = find_by_sql($sql);\n return $result;\n }",
"private function getUsers()\n {\n $url = $this->base_uri.'user/assignable/multiProjectSearch?projectKeys='.$this->project;\n $users = $this->request($url);\n if (!$this->infos['errorBoolean']) {\n return json_decode($users);\n }\n }",
"public function usersInGroup($group)\n {\n if (is_numeric($group)) {\n return $this->groupModel->getUsersForGroup($group);\n }\n\n $g = $this->groupModel->where('name', $group)->first();\n\n return $this->groupModel->getUsersForGroup($g->id);\n }",
"function users($group_id)\n\t{\n\t\tif(!is_numeric($group_id) || $group_id < 1)\n\t\t{\n\t\t\tthrow new InvalidArgumentException('Invalid group id.');\n\t\t}\n\n\t\treturn $this->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t$this->name . '.group_id' => $group_id,\n\t\t\t),\n\t\t\t'contain' => array(\n\t\t\t\t'User',\n\t\t\t\t'Group',\n\t\t\t\t'Role',\n\t\t\t),\n\t\t\t'order' => 'User.name',\n\t\t));\n\t}",
"function find_all_user(){\n global $db;\n $results = array();\n $sql = \"SELECT u.id,u.clave,u.nivel_usuario,u.status,u.ultimo_login,u.name,u.IdDepartamento,\";\n $sql .=\"g.group_name \";\n $sql .=\"FROM users u \";\n $sql .=\"LEFT JOIN user_groups g \";\n $sql .=\"ON g.group_level=u.nivel_usuario ORDER BY u.clave ASC\";\n $result = find_by_sql($sql);\n return $result;\n}",
"public function getUsers()\n\t{\n\t\t$groupUsers = new ArrayObject();\n\t\t$group = $this->getGroup();\n\t\tif ($group != null) {\n\t\t\t$users = $this->groupService->getUsersInGroup($this->getGroup(), true);\n\t\t\t\n\t\n\t foreach ($users as $user) {\n\t $groupUsers[$user->id] = $user;\n\t }\t\n\t\t}\n \n return $groupUsers;\n\t}",
"public function findUsers(): iterable;",
"public function getGroupUsersFromDatabase() {\n $db = \\Helper::getDB();\n $db->where('g.groupId', $db->escape($this->getId()));\n $db->join('users u', 'u.id = g.userId', 'LEFT');\n $results = $db->get('group_users g', NULL, 'u.*');\n // Process all users\n foreach($results as $user) {\n $user = new \\Models\\User($user['id'], $user['username'], $user['email'], $user['firstName'], $user['lastName'], $user['lastLogin']);\n $this->addUser($user);\n }\n }",
"function &getUsers($uids)\n {\n $criteria = new CriteriaCompo();\n $criteria->add(new Criteria('uid', '(' . implode(',', $uids) . ')', 'IN'));\n $criteria->setSort('uid');\n\n $member_handler =& xoops_gethandler('member');\n $users =& $member_handler->getUsers($criteria, true);\n return $users;\n }",
"public function ldap_get_users($extrafilter = '') {\n global $CFG;\n\n $ret = array();\n $ldapconnection = $this->ldap_connect();\n if (!$ldapconnection) {\n return $ret;\n }\n\n $filter = \"(\" . $this->config['user_attribute'] . \"=*)\";\n if (!empty($this->config['objectclass'])) {\n $filter .= \"&(\" . $this->config['objectclass'] . \"))\";\n }\n if ($extrafilter) {\n $filter = \"(&$filter($extrafilter))\";\n }\n\n // get all contexts and look for first matching user\n $ldap_contexts = explode(\";\", $this->config['contexts']);\n\n foreach ($ldap_contexts as $context) {\n $context = trim($context);\n if (empty($context)) {\n continue;\n }\n\n if ($this->config['search_sub'] == 'yes') {\n // use ldap_search to find first user from subtree\n $ldap_result = ldap_search($ldapconnection, $context, $filter, array($this->config['user_attribute']));\n\n }\n else {\n // search only in this context\n $ldap_result = ldap_list($ldapconnection, $context, $filter, array($this->config['user_attribute']));\n }\n\n if ($entry = ldap_first_entry($ldapconnection, $ldap_result)) {\n do {\n $value = ldap_get_values_len($ldapconnection, $entry, $this->config['user_attribute']);\n $value = $value[0];\n array_push($ret, $value);\n\n } while ($entry = ldap_next_entry($ldapconnection, $entry));\n }\n ldap_free_result($ldap_result); // free mem\n\n }\n $this->ldap_close($ldapconnection);\n return $ret;\n }",
"private function getUserBatch() {\n\t\t// Include also hidden (disabled) users to the export\n\t\t$hidden_status = access_get_show_hidden_status();\n\t\taccess_show_hidden_entities(true);\n\n\t\t// Ignore access settings to get all users\n\t\telgg_set_ignore_access(true);\n\n\t\t$users = elgg_get_entities(array(\n\t\t\t'type' => 'user',\n\t\t\t'limit' => $this->limit,\n\t\t\t'offset' => $this->offset,\n\t\t));\n\n\t\t// Set access level to normal\n\t\telgg_set_ignore_access(false);\n\n\t\t// Set hidden status to normal\n\t\taccess_show_hidden_entities($hidden_status);\n\n\t\treturn $users;\n\t}",
"public function getAllUsers() {\n //Example of the auth class (you have to change the functionality for yourself)\n AuthHandler::needsAuth(array(\n 'auth' => true\n ));\n\n return ModelLoader::getModel('UserData')->getMultipleUsers(array(\n 1, 2, 3\n ));\n }",
"protected function readUsers() {\n\t\t// get user ids\n\t\t$userIDs = array();\n\t\t$sql = \"SELECT\t\tuser_table.userID\n\t\t\tFROM\t\twcf\".WCF_N.\"_user user_table\n\t\t\t\".(isset($this->options[$this->sortField]) ? \"LEFT JOIN wcf\".WCF_N.\"_user_option_value USING (userID)\" : '').\"\n\t\t\t\".(!empty($this->sqlConditions) ? 'WHERE '.$this->sqlConditions : '').\"\n\t\t\tORDER BY\t\".(($this->sortField != 'email' && isset($this->options[$this->sortField])) ? 'userOption'.$this->options[$this->sortField]['optionID'] : $this->sortField).\" \".$this->sortOrder;\n\t\t$result = WCF::getDB()->sendQuery($sql, $this->itemsPerPage, ($this->pageNo - 1) * $this->itemsPerPage);\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t$userIDs[] = $row['userID'];\n\t\t}\n\n\t\t// get user data\n\t\tif (count($userIDs)) {\n\t\t\t$sql = \"SELECT\t\toption_value.*, user_table.*,\n\t\t\t\t\t\tGROUP_CONCAT(groupID SEPARATOR ',') AS groupIDs\n\t\t\t\tFROM\t\twcf\".WCF_N.\"_user user_table\n\t\t\t\tLEFT JOIN\twcf\".WCF_N.\"_user_option_value option_value\n\t\t\t\tON\t\t(option_value.userID = user_table.userID)\n\t\t\t\tLEFT JOIN\twcf\".WCF_N.\"_user_to_groups groups\n\t\t\t\tON\t\t(groups.userID = user_table.userID)\n\t\t\t\tWHERE\t\tuser_table.userID IN (\".implode(',', $userIDs).\")\n\t\t\t\tGROUP BY\tuser_table.userID\n\t\t\t\tORDER BY\t\".(($this->sortField != 'email' && isset($this->options[$this->sortField])) ? 'option_value.userOption'.$this->options[$this->sortField]['optionID'] : 'user_table.'.$this->sortField).\" \".$this->sortOrder;\n\t\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t\t$accessible = Group::isAccessibleGroup(explode(',', $row['groupIDs']));\n\t\t\t\t$row['accessible'] = $accessible;\n\t\t\t\t$row['deletable'] = ($accessible && WCF::getUser()->getPermission('admin.user.canDeleteUser') && $row['userID'] != WCF::getUser()->userID) ? 1 : 0;\n\t\t\t\t$row['editable'] = ($accessible && WCF::getUser()->getPermission('admin.user.canEditUser')) ? 1 : 0;\n\t\t\t\t$row['isMarked'] = intval(in_array($row['userID'], $this->markedUsers));\n\t\t\t\t\n\t\t\t\t$this->users[] = new User(null, $row);\n\t\t\t}\n\t\t\t\n\t\t\t// get special columns\n\t\t\tforeach ($this->users as $key => $user) {\n\t\t\t\tforeach ($this->columns as $column) {\n\t\t\t\t\tif (isset($this->options[$column])) {\n\t\t\t\t\t\tif ($this->options[$column]['outputClass']) {\n\t\t\t\t\t\t\t$outputObj = $this->getOutputObject($this->options[$column]['outputClass']);\n\t\t\t\t\t\t\t$this->columnValues[$user->userID][$column] = $outputObj->getOutput($user, $this->options[$column], $user->{$column});\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$this->columnValues[$user->userID][$column] = StringUtil::encodeHTML($user->{$column});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tswitch ($column) {\n\t\t\t\t\t\t\tcase 'email':\n\t\t\t\t\t\t\t\t$this->columnValues[$user->userID][$column] = '<a href=\"mailto:'.StringUtil::encodeHTML($user->email).'\">'.StringUtil::encodeHTML($user->email).'</a>';\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'registrationDate':\n\t\t\t\t\t\t\t\t$this->columnValues[$user->userID][$column] = DateUtil::formatDate(null, $user->{$column});\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function users()\n\t{\n\t\t$users_table = Config::get('sentry::sentry.table.users');\n\t\t$groups_table = Config::get('sentry::sentry.table.groups');\n\n\t\t$users = DB::connection(static::$db_instance)\n\t\t\t->table($users_table)\n\t\t\t->where(static::$join_table.'.'. static::$group_identifier, '=', $this->group['id'])\n\t\t\t->join(static::$join_table,\n\t\t\t\t\t\tstatic::$join_table.'.user_id', '=', $users_table.'.id')\n\t\t\t->get($users_table.'.*');\n\n\t\tif (count($users) == 0)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t// Unset password stuff\n\t\tforeach ($users as &$user)\n\t\t{\n\t\t\t$user = get_object_vars($user);\n\t\t\tunset($user['password']);\n\t\t\tunset($user['password_reset_hash']);\n\t\t\tunset($user['activation_hash']);\n\t\t\tunset($user['temp_password']);\n\t\t\tunset($user['remember_me']);\n\t\t}\n\n\t\treturn $users;\n\t}",
"function getAllUsersMatching($terms){\n\t\treturn $this->avalanche->getAllUsersMatching($terms);\n\t}",
"function all_users($include_desc = false, $search = \"*\", $sorted = true){\n if (!$this->_bind){\n return (false);\n }\n \n //perform the search and grab all their details\n $filter = \"(&(objectClass=user)(samaccounttype=\". ADLDAP_NORMAL_ACCOUNT .\")(objectCategory=person)(cn=\".$search.\"))\";\n $fields=array($this->_cn_identifier,\"displayname\");\n $sr=ldap_search($this->_conn,$this->_base_dn,$filter,$fields);\n $entries = $this->ldap_get_entries_raw($sr);\n\n $users_array = array();\n for ($i=0; $i<$entries[\"count\"]; $i++){\n if ($include_desc && strlen($entries[$i][\"displayname\"][0])>0){\n $users_array[ $entries[$i][$this->_cn_identifier][0] ] = $entries[$i][\"displayname\"][0];\n } elseif ($include_desc){\n $users_array[ $entries[$i][$this->_cn_identifier][0] ] = $entries[$i][$this->_cn_identifier][0];\n } else {\n array_push($users_array, $entries[$i][$this->_cn_identifier][0]);\n }\n }\n if ($sorted){ asort($users_array); }\n return ($users_array);\n }",
"public function getUsers() {\n\t\ttry {\n\t\t\treturn $this->getBounded1MInstance(\"XTUsersRecords\", $filter, $order, $limit, $whereAdd);\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}",
"function GetUsers($strRole='A',$strValue='',$strOrder='name')\n{\n global $oDB;\n \n $strQ = 'SELECT id,name FROM '.TABUSER.' WHERE role=\"A\" ORDER BY '.$strOrder;\n\n if ( $strRole=='M' ) $strQ = 'SELECT id,name FROM '.TABUSER.' WHERE role=\"A\" OR role=\"M\" ORDER BY '.$strOrder;\n if ( $strRole=='M-' ) $strQ = 'SELECT id,name FROM '.TABUSER.' WHERE role=\"M\" ORDER BY '.$strOrder;\n if ( $strRole=='name') $strQ = 'SELECT id,name FROM '.TABUSER.' WHERE name=\"'.$strValue.'\" ORDER BY '.$strOrder;\n if ( substr($strRole,-1,1)=='*' )\n {\n $like = 'LIKE'; if ( $oDB->type=='pg' ) $like = 'ILIKE';\n $strQ = 'SELECT id,name FROM '.TABUSER.' WHERE name '.$like.' \"'.substr($strRole,0,-1).'%\" ORDER BY '.$strOrder;\n }\n\n $oDB->Query($strQ);\n\n $arrUsers = array();\n $i=1;\n while ($row=$oDB->Getrow())\n {\n $arrUsers[$row['id']]=$row['name'];\n $i++;\n if ( $i>200 ) break;\n }\n return $arrUsers;\n}",
"function get_users()\n\t{\n\t\tglobal $db;\n\t\t\n\t\t$query = $db->query(\"SELECT * FROM users\");\n\t\t\n\t\treturn $db->results($query);\n\t}",
"public function get_users($order_by=null, $sort='DESC', $limit = null, $offset=0){\n\t\t$this->db->select('users.id, first_name, last_name, username, email, password,groups.name AS group_name');\n\t\t$this->db->from('users');\n\t\t$this->db->join('groups', 'groups.id=users.group_id', 'INNER');\n\t\t\n\t\tif($limit != null){\n\t\t\t$this->db->limit($limit, $offset);\n\t\t}\n\t\tif($order_by != null){\n\t\t\t$this->db->order_by($order_by, $offset);\n\t\t}\n\t\t\n\t\t$query=$this->db->get();\n\t\t$users=$query->result();\n\t\treturn $users;\n\t}",
"public function getUserList() {\n $where = [];\n $this->usersModel->setTableName(\"cvd_users\");\n\n $role_name = $this->request->input(\"role_name\");\n if ($role_name) {\n $where[] = [\"roles.role_name\", \"=\", $role_name];\n }\n\n $user_id = $this->request->input(\"user_id\");\n if ($user_id) {\n $where[] = [\"users.user_id\", \"=\", $user_id];\n }\n $orderBy = \"users.user_id\";\n $this->usersModel->setWhere($where);\n $users = $this->usersModel->getUsers($orderBy);\n\n return $users;\n }",
"public function getUsers() {\n $this->checkValidUser();\n\n $this->db->sql = 'SELECT id, username FROM '.$this->db->dbTbl['users'].' ORDER BY username';\n\n $res = $this->db->fetchAll();\n\n if($res === false) {\n $this->output = array(\n 'success' => false,\n 'key' => 'sdop6'\n );\n } else {\n $this->output = array(\n 'success' => true,\n 'key' => 'ffUI8',\n 'users' => $res\n );\n }\n\n $this->renderOutput();\n }",
"public function getUsers()\n {\n $sql = \"SELECT * FROM users\";\n return $this->get($sql, array());\n }",
"public function getUsers( array $usernames ) : PromiseInterface;",
"function getUsers() {\n\t\t$dbObject = getDatabase();\n\t\t\n\t\t// now the sql again\n\t\t$sql = \"select users_username from users\";\n\t\t\n\t\t// run the query\n\t\t$result = $dbObject->query($sql);\n\t\t\n\t\t// iterate over the results - we expect a simple array containing\n\t\t// a list of usernames\n\t\t$i = 0;\n\t\t$users = array();\n\t\tforeach($result as $row) {\n\t\t\t$users[$i] = $row[\"username\"];\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t// now return the list\n\t\treturn $users;\n\t}",
"public function users() {\n $matches = array();\n if ($name = $this->input->get('q')) {\n $users = ORM::factory('user')->where('site_id', $this->site->id)->like('searchname', text::searchable($name))->where('status', 1)->find_all();\n foreach ($users as $user) {\n if ($user->id != $this->user->id) { // Can't send a message to yourself.\n $matches[] = (object) array('id' => $user->id, 'name' => $user->name());\n }\n }\n }\n print json_encode($matches);\n die();\n }",
"function getUsers()\n {\n $users = User::where('users.department_info_id', '=', Auth::user()->department_info_id)\n ->where('users.user_type_id', '=', 1)\n ->where('users.status_work', '=', 1)\n ->get();\n return $users;\n }",
"private function _searchUsers( array $aGet=array() ) {\n \n $_aArgs = $aGet + array(\n 'number' => 100, // the maximum number to return.\n );\n \n // Set the callback to modify the database query string.\n add_action( 'pre_user_query', array( $this, '_replyToModifyMySQLWhereClauseToSearchUsers' ) );\n \n $_oResults = new WP_User_Query( $_aArgs );\n\n // Format the data\n $_aData = array();\n foreach( $_oResults->results as $_iIndex => $_oUser ) {\n $_aData[ $_iIndex ] = array(\n 'id' => $_oUser->ID,\n 'name' => $_oUser->data->display_name,\n );\n } \n return $_aData;\n \n }",
"public static function getUsers(){\n $query = UserQuery::init()\n ->joinUserStatus()->selectName('status')->endUse();\n //->joinUserDetails()->selectUserId()->selectAddress()->selectZipCode()->selectLocal()->endUse()\n //->joinUserGuard()->selectUserId()->selectUsername()->selectSalt()->selectUserkey()->endUse()\n //->joinUserHasGroup()->selectUserId()->selectUserGroup()->endUse()\n //->joinUserLog()->selectId()->selectUserId()->selectUserEvent()->selectTimestamp()->endUse();\n \n return $query;\n }",
"public function getUsersByUsername($username)\n\t{\n\t\tself::connectToDB(); /* Using DB connection */\n\n $this->sql = \"SELECT * \n \t\t\tFROM users\n \t\t\tWHERE users.username LIKE ?\";\n\n try\n {\n $this->query = $this->handler->prepare($this->sql);\n\t\t\t\n $this->query->execute(array('%' . $username . '%'));\n $this->result = $this->query->fetchAll(PDO::FETCH_ASSOC);\n $this->query->closeCursor();\n $this->handler = null;\n\n foreach ($this->result as $row)\n {\n $this->list[] = new User($row['id'], $row['username'], $row['password'], $row['email'], $row['firstname'], $row['lastname'], $row['admin'], $row['blocked'], $row['image_path'], $row['registration_date']);\n }\n return $this->list;\n }\n catch (Exception $e)\n {\n echo \"Error: query failure\";\n return false;\n }\n\t}",
"public function getUsers() {\n\n $users = $this->users_model->getallusers();\n exit;\n }",
"public function users()\n {\n return User::join('group_user', 'group_user.user_id', '=', 'users.id')\n ->join('groups', 'group_user.group_id', '=', 'groups.id')\n ->join('stores', 'stores.group_id', '=', 'groups.id')\n ->where('stores.id', $this->id)\n ->select('users.*')\n ->get();\n }",
"public function allUsers()\n {\n $users = User::query()\n ->whereSearch(request('search'))\n ->get();\n return new UserCollection($users);\n }",
"public function get_users()\n\t{\n\t\t$sql=\"SELECT * FROM waf_users WHERE 1=1\";\n\t\t$result=$this->db->LIST_Q($sql);\n\t\treturn $result;\n\t}",
"function getUsers(){\n }",
"function getUsers(){\n }",
"public function get_users_list() {\n\n\t\t\t$users = get_users();\n\n\t\t\t$result = array( '0' => esc_html__( 'Select a user', 'cherry' ) );\n\n\t\t\tif ( empty( $users ) ) {\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\tforeach ( $users as $user ) {\n\t\t\t\t$result[ $user->data->ID ] = $user->data->user_nicename;\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}",
"function getUsers(){\n\t\t $data = array();\n\t $this->db->select('*');\n\t\t\t$this->db->from('be_users');\n\t\t\t$this->db->where('group',3);\n\t\t\t$this->db->where('active',1);\n\t\t\t$this->db->order_by('be_users.username','ASC');\n\t $Q = $this->db->get();\n\t if ($Q->num_rows() > 0){\n\t foreach ($Q->result_array() as $row)\n\t\t\t {\n\t $data[] = $row;\n\t }\n\t }\n\t $Q->free_result(); \n\t return $data; \n\t }",
"private function listUsers()\n {\n $users = get_users();\n $user_ids = array();\n\n foreach ($users as $u) {\n $user_ids[] = $u['id'];\n }\n\n if (count($this->ids) != 0) {\n return array_intersect($this->ids, $user_ids);\n } else {\n return $user_ids;\n }\n }",
"function GetUsers($set_type = 'all', $get_data = false)\n\t{\n\t\t$where_clause = array('sid' => $this->sid);\n\t\t\n\t\tswitch ($set_type) {\n\t\t\tcase 'active':\n\t\t\t\t$where_clause['status'] = array ('!=', 'closed');\n\t\t\t\t$where_clause['actual_time + INTERVAL '. LC_ALLOWED_IDLE_TIME] = array ('>', 'NOW()');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'all':\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'requester':\n\t\t\t\t$where_clause = array (\n\t\t\t\t\t'#WHERE' => array (\n\t\t\t\t\t\t'sid' => $this->sid\n\t\t\t\t\t),\n\t\t\t\t\t'#ORDER' => 'user_id ASC',\n\t\t\t\t\t'#LIMIT' => 1\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tif (is_array($set_type)) {\n\t\t\t\t\t$where_clause = $set_type;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$r = $this->db->q('SELECT user_id FROM #_PREF_lc_users', $where_clause);\n\t\t$users = array();\n\t\twhile ($ud = $this->db->fetchAssoc($r)) {\n\t\t\t$user = new LcUser($ud['user_id']);\n\t\t\tif ($get_data) $user->getData();\n\t\t\t$users[] = $user;\n\t\t}\n\t\t\n\t\treturn $users;\n\t}",
"function getUsers()\n {\n $sql = \"SELECT * FROM \" . DB_NAME . \".`customers`\";\n\n try {\n $result = $this->connexion->prepare($sql);\n $var = $result->execute();\n $users = [];\n\n while ($data = $result->fetch(PDO::FETCH_OBJ)) {\n $user = new UserEntity();\n $user->setIdUser($data->idUser);\n $user->setNom_societe($data->Nom_societe);\n $user->setAbreviations($data->Abreviations);\n $user->setAdresse($data->Adresse);\n $user->setTel($data->Tel);\n $user->setEmail($data->Email);\n $user->setSecteur($data->Secteur);\n $user->setCreatedAt($data->createdat);\n\n $users[] = $user;\n }\n\n if ($users) {\n return $users;\n } else {\n return FALSE;\n }\n } catch (PDOException $th) {\n return NULL;\n }\n }",
"public abstract function find_users($search);",
"public static function getAllUsers() {\r\n // Create a User object\r\n $user = new User();\r\n // Return an array of user objects from the database, ordered by firstname\r\n return $user->getCollection([\"ORDER\" => ['firstname' => 'ASC']]);\r\n }",
"function fetchUsers()\r\n {\r\n $users = $this->DB->database_select('users', array('username', 'uid'));\r\n return $users;\r\n }",
"function get_users()\n\t{\n\n\t\trequire_once('modules/Users/User.php');\n\t\t\n\t\t$query = \"SELECT user_id as id FROM roles_users WHERE role_id='$this->id' AND deleted=0\";\n\t\t\n\t\treturn $this->build_related_list($query, new User());\n\t}",
"public function searchUsers($str) {\n return user_find($str);\n }",
"public function users_get()\n\t{\n\t\t$users = [\n\t\t\t['id' => 0, 'name' => 'John', 'email' => '[email protected]'],\n\t\t\t['id' => 1, 'name' => 'Jim', 'email' => '[email protected]'],\n\t\t];\n\n\t\t$id = $this->get('id');\n\n\t\tif ($id === null) {\n\t\t\t// Check if the users data store contains users\n\t\t\tif ($users) {\n\t\t\t\t// Set the response and exit\n\t\t\t\t$this->response($users, 200);\n\t\t\t} else {\n\t\t\t\t// Set the response and exit\n\t\t\t\t$this->response([\n\t\t\t\t\t'status' => false,\n\t\t\t\t\t'message' => 'No users were found'\n\t\t\t\t], 404);\n\t\t\t}\n\t\t} else {\n\t\t\tif (array_key_exists($id, $users)) {\n\t\t\t\t$this->response($users[$id], 200);\n\t\t\t} else {\n\t\t\t\t$this->response([\n\t\t\t\t\t'status' => false,\n\t\t\t\t\t'message' => 'No such user found'\n\t\t\t\t], 404);\n\t\t\t}\n\t\t}\n\t}",
"function get_group_users($groupid, $sort='u.lastaccess DESC', $exceptions='',\n $fields='u.*') {\n global $CFG;\n if (!empty($exceptions)) {\n $except = ' AND u.id NOT IN ('. $exceptions .') ';\n } else {\n $except = '';\n }\n // in postgres, you can't have things in sort that aren't in the select, so...\n $extrafield = str_replace('ASC','',$sort);\n $extrafield = str_replace('DESC','',$extrafield);\n $extrafield = trim($extrafield);\n if (!empty($extrafield)) {\n $extrafield = ','.$extrafield;\n }\n return get_records_sql(\"SELECT DISTINCT $fields $extrafield\n FROM {$CFG->prefix}user u,\n {$CFG->prefix}groups_members m\n WHERE m.groupid = '$groupid'\n AND m.userid = u.id $except\n ORDER BY $sort\");\n}",
"public function get_users($organization_id, $user_type);",
"public function getUserslistToInvite()\n\t{\n\t\t//get current login user session\n\t\t$results = array();\n\t\t$user = $this->Session->read('UserData.userName');\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\t\t\n\t\t//get Course and section name\n\t\t$course_info = $this->getCourseNameOfUser($user_course_section);\n\t\t$course_name = $course_info->course_name;\n\t\t$course_section = $course_info->section_name;\n\t\t//get allsection setting sections for same course\n\t\t$sections_list = $this->__allSections();\n\t\t$options = array('course'=>$course_name,'section'=>$sections_list,'userName !='=>$user);\n\t\t$results = $this->PleUser->find('all',array('conditions'=>$options,'fields'=>array('userName','name'),'order' => array('PleUser.name ASC')));\n\t\tif ($results) {\n\t\t\treturn $results;\n\t\t}\n\t\treturn $results;\n\t}",
"public function getUserGroups()\n\t{\n\t\tself::authenticate();\n\n\t\t$uname = FormUtil::getPassedValue('user', null);\n\t\tif($uname == null) {\n\t\t\treturn self::retError('ERROR: No user name passed!');\n\t\t}\n\n\t\t$uid = UserUtil::getIdFromName($uname);\n\t\tif($uid == false) {\n\t\t\treturn self::ret(false);\n\t\t}\n\n\t\t$groups = UserUtil::getGroupsForUser($uid);\n\t\t$return = array();\n\t\tforeach($groups as $item) {\n\t\t\t$group = UserUtil::getGroup($item);\n\t\t\t$return[] = $group['name'];\n\t\t}\n\t\tif(SecurityUtil::checkPermission('Owncloud::Admin', '::', ACCESS_MODERATE, $uid)) {\n\t\t\t$return[] = 'admin';\n\t\t}\n\t\treturn self::ret($return);\n\t}",
"function GetUsers($NotAdmin){\n\t$stringBuilder = \"SELECT u.user_id, u.email, l.name \";\n\t$stringBuilder .= \"FROM `user` u \";\n\t$stringBuilder .= \"INNER JOIN location l ON l.location_id=u.location \";\n\tif($NotAdmin){\n\t\t$stringBuilder .= \"WHERE u.admin=0 \";\n\t}\n\t$stringBuilder .= \"ORDER BY l.name \";\n\t// Preparing query\n\t$query = GetDatabaseConnection()->prepare($stringBuilder);\n\t$query->execute(); //Putting in the parameters\n\t$result = $query->fetchAll(); //Fetching it\n\treturn $result;\n}",
"public function getUsers()\n {\n $st = $this->execute('SELECT * FROM '. self::$prefix .'user ORDER BY `userid`;');\n\n $rs = $st->fetchAll(PDO::FETCH_ASSOC);\n\n $users = array();\n foreach($rs AS $row) {\n $user = new sspmod_janus_User($this->_config->getValue('store'));\n $user->setUid($row['uid']);\n $user->load();\n $users[] = $user;\n }\n \n return $users;\n }",
"public function getUsers(){\n\t\t\t$users = $this->db->get(\"users\");\n\t\t\treturn $users;\n\t\t}",
"abstract function getNonRegisteredUsers();",
"public function getUsers( $users , $isSort = false, $pagination = null )\n\t{\n\t\t$ajax \t\t= Foundry::ajax();\n\n\t\t$filter \t= JRequest::getWord( 'filter' );\n\t\t$sort \t\t= JRequest::getWord( 'sort' );\n\n\t\t$theme \t\t= Foundry::themes();\n\t\t$theme->set( 'users' \t, $users );\n\t\t$theme->set( 'isSort' \t, $isSort );\n\t\t$theme->set( 'filter'\t, $filter );\n\t\t$theme->set( 'sort'\t\t, $sort );\n\t\t$contents \t= $theme->output( 'site/users/default.list' );\n\n\t\tif($pagination )\n\t\t{\n\t\t\t$contents .= '<div class=\"es-pagination-footer\" data-users-pagination>' . $pagination->getListFooter( 'site' ) . '</div>';\n\t\t}\n\n\t\treturn $ajax->resolve( $contents );\n\t}",
"protected function get_users() {\n\t\t\t$users = wp_cache_get( 'mycred_users' );\n\n\t\t\tif ( false === $users ) {\n\t\t\t\t$users = array();\n\t\t\t\t$blog_users = get_users( array( 'orderby' => 'display_name' ) );\n\t\t\t\tforeach ( $blog_users as $user ) {\n\t\t\t\t\tif ( false === $this->core->exclude_user( $user->ID ) )\n\t\t\t\t\t\t$users[ $user->ID ] = $user->display_name;\n\t\t\t\t}\n\t\t\t\twp_cache_set( 'mycred_users', $users );\n\t\t\t}\n\n\t\t\treturn apply_filters( 'mycred_log_get_users', $users );\n\t\t}",
"function findAllUsers() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM users;'));\r\n\r\n\t}",
"function getUserByUsername($username, $users)\n {\n foreach ($users as $user)\n {\n if ($user['username'] == $username)\n {\n return $user;\n }\n }\n return NULL;\n }",
"function get_all_users($params = array())\n {\n $this->db->order_by('id', 'desc');\n if(isset($params) && !empty($params))\n {\n $this->db->limit($params['limit'], $params['offset']);\n if(!empty($params['search_val'])){\n\t\t\t\t$this->db->like('name',$params['search_val']);\n\t\t\t\t$this->db->or_like('handle_name',$params['search_val']);\n\t\t\t\t$this->db->or_like('phone_number',$params['search_val']);\n\t\t\t}\n\t\t\tif(!empty($params['user_filter'])){\n\t\t\t\t$this->db->where('user_type', $params['user_filter'] );\n\t\t\t}\n\t\t\tif(!empty($params['login_with'])){\n\t\t\t\t$this->db->where('login_with', $params['login_with'] );\n\t\t\t}\n }\n $result = $this->db->get('users')->result_array();\n //echo $this->db->last_query();\n return $result;\n }",
"public static function getUsers() {\n\t\t$res = self::$db->query(\"SELECT id, email, username, logins, last_login FROM `\".self::$users_tbl.\"` ORDER BY username\");\n\t\t$row = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\treturn $row;\n\t}",
"public function getUserList($data)\n {\n $return = [];\n foreach(UserModel::where(\"first_name\",\"like\", \"%{$data->value}%\")->get() as $q)\n {\n $return[][\"username\"] = $q->first_name;\n }\n if(!empty($return))\n {\n return $return;\n }\n return false;\n }",
"public function getUsers()\n\t{\n\t\t$documetn=array();\n\n\t\t$documents= $this->collection->find($documetn);\n\t\treturn $documents;\n\t}",
"public function searchUsers($ids)\n {\n return $this->start()->uri(\"/api/user/search\")\n ->urlParameter(\"ids\", $ids)\n ->get()\n ->go();\n }",
"public function listUsers($fields = null);",
"public function getUserId($name){\n $names = explode(\",\", $name);\n // Search each Name Field for any specified Name\n return User::where(function ($query) use ($names) {\n $query->whereIn('first_name', $names);\n\n $query->orWhere(function ($query) use ($names) {\n $query->whereIn('middle_name', $names);\n });\n $query->orWhere(function ($query) use ($names) {\n $query->whereIn('last_name', $names);\n });\n })->get();\n }",
"public function getUsers($value = null)\n {\n $query = $this->createQueryBuilder('u')\n ->select('u.id as userid')\n ->addSelect('u.name')\n ->addSelect('u.last')\n ->addSelect('up.phone')\n ->addSelect('up.status')\n ->innerJoin('MainBundle:UserPhone', 'up', 'WITH', 'u.id = up.user');\n if($value['name']){\n $query->Where('u.name = :name')\n ->setParameter('name', $value['name']);\n }\n if($value['phone']){\n $query->andWhere('up.phone = :phone')\n ->setParameter('phone', $value['phone']);\n }\n \n return $query->getQuery()->getResult();\n }",
"function list_users(){\r\n\t\t$query = $this->db->query(\"SELECT userid, concat(fname, ' ', lname, ' (', username, ')') as name FROM nf_users\");\r\n\t\t$return = array();\r\n\t\tforeach($query->result() as $row){\r\n\t\t\t$return[$row->userid] = $row->name;\r\n\t\t}\r\n\t\treturn $return;\r\n\t}",
"public function filterUsers()\n {\n if ($this->hasRole('admin')) {\n $users = User::all();\n } elseif ($this->hasRole('manager')) {\n $users = $this->employees()->get();\n } elseif ($this->hasRole('employee')) {\n $users = $this->managers()->get();\n } else {\n return (new User)->newCollection();\n }\n\n if ($users->count() === 0) {\n $users = (new User)->newCollection();\n }\n\n return $users;\n\n }",
"public function getUsers( $condition = [] ){\n\n if( empty( $condition ) ){\n return $this->getAllUsers();\n }else{\n return User::find()->where($condition)->all();\n }\n\n }",
"public function listUsers($parameters = [])\n {\n $results = new \\Google_Service_Directory_Users();\n if (!key_exists('domain', $parameters)) {\n $parameters['domain'] = 'ZZZZZZZ';\n }\n if (!key_exists('maxResults', $parameters)) {\n $parameters['maxResults'] = 100;\n }\n if (!key_exists('query', $parameters)) {\n $parameters['query'] = '';\n }\n $parameters['query'] = urldecode($parameters['query']);\n $sqliteUtils = new SqliteUtils($this->dbFile);\n $allData = $sqliteUtils->getData($this->dataType, $this->dataClass);\n foreach ($allData as $userRecord) {\n $userEntry = json_decode($userRecord['data'], true);\n if ($this->doesUserMatch($userEntry, $parameters['query'])) {\n /** @var \\Google_Service_Directory_UserName $newName */\n $newName = new \\Google_Service_Directory_UserName([\n 'familyName' => $userEntry['name']['familyName'],\n 'fullName' =>\n $userEntry['name']['fullName'] ??\n $userEntry['name']['givenName'] . ' ' . $userEntry['name']['familyName'],\n 'givenName' => $userEntry['name']['givenName'],\n ]);\n /** @var \\Google_Service_Directory_User $newEntry */\n $newEntry = new \\Google_Service_Directory_User(array(\n 'primaryEmail' => $userEntry['primaryEmail'],\n 'customerId' => $userEntry['primaryEmail'],\n ));\n $newEntry->setName($newName);\n \n $allResultsUsers = $results->getUsers();\n $allResultsUsers[] = $newEntry;\n $results->setUsers($allResultsUsers);\n }\n if (count($results->getUsers()) >= $parameters['maxResults']) {\n break;\n }\n }\n return $results;\n }",
"function get_users(){\n global $conf;\n global $LDAP_CON;\n\n $sr = ldap_list($LDAP_CON,$conf['usertree'],\"ObjectClass=inetOrgPerson\");\n $result = ldap_get_binentries($LDAP_CON, $sr);\n $users = array();\n if(count($result)){\n foreach ($result as $entry){\n if(!empty($entry['sn'][0])){\n $users[$entry['dn']] = $entry['givenName'][0].\" \".$entry['sn'][0];\n }\n }\n }\n return $users;\n}",
"function d4os_io_db_070_os_users_load_by_uuids($uuids) {\n if (!is_array($uuids)) {\n return FALSE;\n }\n $users = array();\n $query = \"SELECT *, CONCAT_WS(' ', FirstName, LastName) AS name FROM {UserAccounts} AS ua\"\n . \" LEFT JOIN {auth} AS a ON a.UUID=ua.PrincipalID\"\n . \" LEFT JOIN {GridUser} AS gu ON gu.UserID=ua.PrincipalID\"\n . \" WHERE ua.PrincipalID IN (\". implode(\"','\", $uuids). \"')\";\n\n d4os_io_db_070_set_active('os_users');\n $result = db_query($query);\n while ($user = db_fetch_object($result)) {\n $users[] = $user;\n }\n d4os_io_db_070_set_active('default');\n\n return $users;\n}",
"public function usersAutoComplete(Request $request, Group $group)\n {\n $query = $request->get('query');\n\n // Get users who aren't members\n $data = User::select([Constants::FLD_USERS_USERNAME . ' as name'])\n ->where(Constants::FLD_USERS_USERNAME, 'LIKE', \"%$query%\")\n ->where(Constants::FLD_USERS_USERNAME, '!=', Auth::user()[Constants::FLD_USERS_USERNAME])\n ->whereDoesntHave('joiningGroups', function ($query) use ($group) {\n $query->whereId($group[Constants::FLD_GROUPS_ID]);\n })\n ->get();\n return response()->json($data);\n }",
"public function getOrderUsers() {\n // Load the list items.\n $db = $this->getDbo();\n $query = $db->getQuery(true);\n\n // Select the required fields from the table.\n $query->select('o.user_id as id, users.name as name');\n $query->from('#__sdi_order AS o');\n $query->innerJoin('#__sdi_user AS sdi_user ON sdi_user.id = o.user_id');\n $query->innerJoin('#__users AS users ON users.id = sdi_user.user_id');\n $query->order('users.name');\n $query->group('users.name');\n $query->group('o.user_id');\n\n\n try {\n $items = $this->_getList($query);\n } catch (RuntimeException $e) {\n $this->setError($e->getMessage());\n return false;\n }\n return $items;\n }",
"public function all_users($include_desc = false, $search = \"*\", $sorted = true){\n if (!$this->_bind){ return (false); }\n \n // Perform the search and grab all their details\n $filter = \"(&(objectClass=user)(samaccounttype=\". ADLDAP_NORMAL_ACCOUNT .\")(objectCategory=person)(cn=\".$search.\"))\";\n $fields=array(\"samaccountname\",\"displayname\");\n $sr=ldap_search($this->_conn,$this->_base_dn,$filter,$fields);\n $entries = ldap_get_entries($this->_conn, $sr);\n\n $users_array = array();\n for ($i=0; $i<$entries[\"count\"]; $i++){\n if ($include_desc && strlen($entries[$i][\"displayname\"][0])>0){\n $users_array[ $entries[$i][\"samaccountname\"][0] ] = $entries[$i][\"displayname\"][0];\n } elseif ($include_desc){\n $users_array[ $entries[$i][\"samaccountname\"][0] ] = $entries[$i][\"samaccountname\"][0];\n } else {\n array_push($users_array, $entries[$i][\"samaccountname\"][0]);\n }\n }\n if ($sorted){ asort($users_array); }\n return ($users_array);\n }",
"public function listUsersOfGroup( $id)\n {\n\t\t$data = $this->call(array(), \"GET\", \"groups/\".$id.\"/users.json\");\n\t\t$data = $data->{'users'};\n\t\t$userArray = new ArrayObject();\n\t\tfor($i = 0; $i<count($data);$i++){\n\t\t\t$userArray->append(new User($data[$i], $this));\n\t\t}\n\t\treturn $userArray;\n }",
"public function searchUsersByIds($ids)\n {\n return $this->start()->uri(\"/api/user/search\")\n ->urlParameter(\"ids\", $ids)\n ->get()\n ->go();\n }",
"function get_users()\n {\n //Unimplemented\n }",
"public function listGroupByUser($name){\n \n $this->connect->connector();\n $ad = $this->connect->getConnector();\n \n \n $racine = \"cn=Users,dc=admc, dc=com\";\n $rechercheGroupe = ldap_search($ad, $racine, \"(&(objectclass=user)(name=\".$name.\"))\");\n $entries = ldap_get_entries($ad, $rechercheGroupe);\n $listGroup = False;\n \n for ($x=0; $x<$entries['count']; $x++){\n \n if(!empty($entries[$x]['memberof'][0])){\n //var_dump($entries[$x]['memberof']);\n for($y=0; $y< $entries[$x]['memberof']['count']; $y++){\n\n\n $listGroup[$y] = $this->getBetween($entries[$x]['memberof'][$y], \"=\", \",\");\n }\n\n }\n }\n return $listGroup;\n \n \n }",
"public function getUsers($username, $page = 1) {\n $url = 'http://www.last.fm/community/users/search?q=' . urlencode($username) . '&page=' . $page;\n $html = $this->getExternalContents($url);\n /*preg_match_all(\"/<\\/span> .+<\\/a><\\/strong>/\",$rawContents,$users);\n $users = preg_replace(\"/<\\/span> (.+)<\\/a><\\/strong>/\", \"$1\",$users[0]);*/\n $containers = explode('<div class=\"userContainer\">',$html);\n if(preg_match(\"/lastTrack/\",$containers)) {\n\n }\n\n return $users; //array(string}\n }",
"public function getUsers() {\n \n // Call getAllUsers method in userDataService and set to variable\n $users = $this->getAllUsers();\n \n // Return array of users\n return $users;\n }",
"private function lookupUsers ($who = array()) {\n if (is_string($who)) {\n $who = explode(',', $who);\n }\n // TODO:\n // Split big $who values into batches of 100, as that's Twitter's limit.\n // @see https://dev.twitter.com/docs/api/1.1/get/users/lookup\n // NOTE: For some reason this doesn't work with POST requests\n // (using an array as the second parameter) and I think\n // that this is a bug.\n // See:\n // https://github.com/J7mbo/twitter-api-php/issues/70\n return $this->getAllUsersFromCollection('users/lookup', '?skip_status=true&user_id=' . implode(',', $who));\n }",
"public function getAllUsers($parameters = array());",
"public function getUsers(){\n //Gets the users inputed search first and last name\n $firstName = $_GET[\"firstName\"];\n $lastName = $_GET[\"lastName\"];\n //This function gets all the group requests that have been sent out\n $requestConnections = $this->individualGroupModel->getRequestedConnections();\n //Gets all the people who are already in the group\n $friendsList = $this->individualGroupModel->getGroupFriends();\n //Gets a search result based on the first and last name input\n $userSearch = $this->individualGroupModel->userSearch($firstName, $lastName);\n //declare empty return variables\n $returnData = [];\n \n //This runs through two for loops and comprares the search results ids and the request connection ids.\n //Anybody who has already been sent a group request does not show up in the search result\n for($j=0; $j < sizeof($userSearch); $j++){\n //Sets the trigger to check if the ids match if they dont match then the item is pushed to the created empty array\n $trigger = false;\n for($i=0; $i < sizeof($requestConnections); $i++){\n //Checks for connection\n if($requestConnections[$i]->Receiver_Id == $userSearch[$j]->User_Id){\n $trigger = true;\n break;\n }\n }\n //If trigger is false means there was no match\n if($trigger == false){\n array_push($returnData, $userSearch[$j]);\n }\n\n }\n\n //These loops do a similar thing to the two loops above the difference is this loop checks for users that have \n //already been added to the group. If they have been then the array is unset\n for($i=0; $i < sizeof($friendsList); $i++){\n for($j=0; $j < sizeof($returnData); $j++){\n if($returnData[$j]->User_Id == $friendsList[$i]->User_Id){\n unset($returnData[$j]);\n $returnData = array_values($returnData);\n break;\n }\n }\n \n }\n //echos out the result json encoded\n echo json_encode($returnData);\n }",
"function getUsers() {\n\t\t$users = json_decode(\n\t\t\t\t\tfile_get_contents(\"data/users.json\"),\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\treturn $users;\n\t}",
"function getUsers() {\r\n\t\t\t$sql = \"SELECT users.user_id, users.email, users.student_id, 'Click to change password', users.active, societies.society_name FROM `users`, `societies` WHERE societies.society_id=users.society_id\";\r\n\t\t\t$result = $this->query($sql);\r\n\t\t\tif (mysql_num_rows($result) == 0) return false;\r\n\t\t\twhile ($row = mysql_fetch_object($result)) $rows[] = array($row->user_id, $row->email, $row->student_id, \"Click to change\", str_replace(array(1, 0), array(\"Yes\", \"No\"), $row->active), $row->society_name);\r\n\t\t\treturn $rows;\r\n\t\t}"
] | [
"0.70128715",
"0.68453884",
"0.6828521",
"0.6817417",
"0.67922497",
"0.67922497",
"0.67274773",
"0.67274773",
"0.67274773",
"0.67226136",
"0.66707397",
"0.6659928",
"0.6657218",
"0.6627891",
"0.6565068",
"0.651909",
"0.6495842",
"0.64605284",
"0.6454021",
"0.642578",
"0.6418885",
"0.6415375",
"0.64121854",
"0.63887095",
"0.6355577",
"0.6348983",
"0.63411885",
"0.6332733",
"0.63319284",
"0.6331857",
"0.6331709",
"0.6316525",
"0.63104945",
"0.630174",
"0.6300645",
"0.6297066",
"0.6292584",
"0.6285129",
"0.6275213",
"0.6261596",
"0.62559825",
"0.62297803",
"0.6228234",
"0.6225033",
"0.62242067",
"0.62231225",
"0.62185663",
"0.61929435",
"0.61929435",
"0.61881113",
"0.61854637",
"0.6185336",
"0.6182651",
"0.6166856",
"0.61667186",
"0.6160676",
"0.6160535",
"0.6156567",
"0.6152837",
"0.61510783",
"0.61467445",
"0.6144593",
"0.6144232",
"0.6142813",
"0.61421126",
"0.6120009",
"0.61160433",
"0.61097836",
"0.61070514",
"0.609936",
"0.6094067",
"0.6093564",
"0.60866874",
"0.60807437",
"0.6080209",
"0.6080025",
"0.6079556",
"0.6077864",
"0.6070405",
"0.60697424",
"0.6068862",
"0.6068368",
"0.6058966",
"0.60580325",
"0.6053641",
"0.60495013",
"0.6048495",
"0.6041459",
"0.6037371",
"0.60340965",
"0.60163635",
"0.60124296",
"0.6012381",
"0.6007958",
"0.6007236",
"0.60036224",
"0.5986983",
"0.5986166",
"0.59837013",
"0.59813184"
] | 0.6269052 | 39 |
Displays a single filed drom a single user | function hc_user_field($user, $field){
$args = array(
'single' => true,
'username' => $user,
'fields' => $field
);
$userObject = hc_get_users($args);
echo $userObject[0]->$field;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function show( $id_user ) {\n\n\t\treturn '';\n\t}",
"private function userDisplay() {\n $showHandle = $this->get('username');\n if (isset($showHandle)) {\n echo '<li class=\"user-handle\">'.$showHandle.'</li>';\n }\n }",
"public function displayUser()\n {\n $entry = $this->getEntry();\n if ($entry) {\n return $entry->displayUser();\n }\n }",
"public final function display(){\n echo \"Username is{$this->user} and user id is{$this->userId}\";\n }",
"public function showSingleUser(array $context) {\n\n echo $this->render('show_user.html', array(\n $this->user => $context[$this->user],\n $this->repos => $context[$this->repos],\n $this->followers => $context[$this->followers],\n $this->auth => $context[$this->auth],\n $this->search_q => $this->searchFieldName\n ));\n }",
"public function show(Userdato $userdato)\n {\n //\n }",
"public function byuserAction()\n\t{\n\t\t$username = $this->_getParam('id');\n\t\t$this->view->username = $username;\n\t\t$this->view->comments = $this->_commentMapper->findByUser($username);\n\t\t$this->render('byuser');\n\t}",
"public function viewUserAction()\n {\n \tif($this->getRequest()->getParam('id')){\n \t\t$db = new RsvAcl_Model_DbTable_DbUser();\n \t\t$user_id = $this->getRequest()->getParam('id');\n \t\t$rs=$db->getUser($user_id);\n \t\t//print_r($rs); exit;\n \t\t$this->view->rs=$rs;\n \t} \t \n \t\n }",
"function show_person($user_id, $args) {\n\tif( $ar = get_user_meta($user_id) ){\n\t\t$meta = array_map( function( $a ){ \n\t\t\treturn $a[0];\n\t\t}, $ar);\n\t}\n\n\t$defaults = array(\"avatar_size\" => 96);\n\t$args = wp_parse_args($args, $defaults);\n\n\t# $id must me present for use in _members.php\n\t$id = $user_id;\n\n\tob_start();\n\tinclude THEME_ABSPATH.\"partials/_member.php\";\n\techo ob_get_clean();\n}",
"public function show($id)\n\t{\n\t\treturn \"Profil de l'utilisateur \" . $id;\n\t}",
"public function show()\n {\n $user_identifier = $this->session->userdata('identifier');\n $user_details = $this->user_m->read($user_identifier);\n $this->data['user_details'] = $user_details;\n $this->load_view('Profil Akun', 'user/profil');\n }",
"public function showAction($userId) {\r\n\t\t$this->view->user = Users::findFirst ( $userId );\r\n\t}",
"public function view_user($id)\n {\n\n\n }",
"function display_user_profile_fields() {\r\n global $wpdb, $user_id, $wpi_settings;\r\n $profileuser = get_user_to_edit($user_id);\r\n\r\n include($wpi_settings['admin']['ui_path'] . '/profile_page_content.php');\r\n }",
"function showProfile ($user)\n\t{\n\t\tif (file_exists(\"user.jpg\"))\n\t\t\techo \"<img src='user.jpg' style='float:left;>\";\n\t\t$result = queryMysql(\"SELECT * FROM profiles WHERE user='$user'\");\n\t\tif ($result->num_rows)\n\t\t{\n\t\t\t$row = $result->fetch_array(MYSQLI_ASSOC);\n\t\t\techo stripslashes($row['text']) . \"<br style='clear:left;'><br>\";\n\t\t}\n\t}",
"public function show(type_of_user $type_of_user)\n {\n //\n }",
"public function show($user_id)\n\t{\n\n\t\t$user = User::find($user_id);\n\t\treturn view('pages/tools.referee.user.show', compact('user'));\n\t}",
"public function show(NameUser $nameUser)\n {\n //\n }",
"public function show(user $user)\n {\n //\n }",
"public function show(user $user)\n {\n //\n }",
"public function edituser(){\n\t\t$id = $this->uri->segment(3);\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/edit_londontec_users';\n\t\t$mainData = array(\n\t\t\t'pagetitle' => 'Edit Londontec users',\n\t\t\t'londontec_users' => $this->setting_model->Get_Single('londontec_users','user_id',$id)\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}",
"public function viewUser($userid)\n {\n $user = $this->user->find($userid);\n if ($user) {\n $this->show('admin/userdetails.php', ['user' => $user]);\n } else {\n $this->showNotFound();\n }\n }",
"public function show(user $user)\n {\n return $user;\n }",
"public function user()\n\t{\n\n\t\t$data['data_user'] = $this->model_admin->get_user();\n\t\t$data['halaman'] = 'view_user';\n\t\t$this->load->view('admin/page', $data);\n\t}",
"public function r_user(){\n\t\tif (!empty($this -> user)) {\n\t\t\techo 'value = \"'.$this -> user.'\"';\n\t\t}\n\t}",
"function render_edit($user)\n {\n }",
"public function show($id)\n {\n $user = User::findOrFail($id);\n\n\n return view('agent.users.singleuser', [\n 'user' =>$user,\n\n ]);\n }",
"function view($id = NULL)\n {\n\tif (!is_numeric($id)) {\n\t $result = $this->_get('user_id');\n\t $data = $this->page_settings('view', $result, 'users', 'View users', 'users');\n\t} else {\n\t $result = $this->_get_where($id);\n\t $data = $this->page_settings('view_single', $result->row(), 'user', 'View user', 'users');\n\t}\n\t//$this->load->view('view', $result);\n\t$this->templates->backend($data);\n }",
"public function idAction($id = null)\n {\n\n $user = $this->users->find($id);\n \n $this->theme->setTitle(\"View user with id\");\n $this->views->add('me/userView', [\n 'user' => $user,\n 'title' => \"Kolla in denna användaren:\"\n ]);\n }",
"function showdetails(EUtente &$user, $avatar)\n {\n $this->smarty->assign('UtenteType', lcfirst(substr(get_class($user), 1)));\n $this->smarty->registerObject('user', $user);\n\n $this->smarty->assign('avatar', $avatar);\n\n //mostro il contenuto della pagine\n $this->smarty->display('TVGAvatarDetails.tpl');\n }",
"public function actionView($id){ // function to view user by their ID\n //redirect a user if not super admin\n if (!Yii::$app->CustomComponents->check_permission('view_user')) {\n return $this->redirect(['index']); \n }\n\t\t$model = DvUsers::find()->where([\"id\"=>$id])->one();\n $current_user_role = \"\";\n\n $get_userrole = $this->getUserRole($id); /* get the current user's role */\n if (!empty($get_userrole)) {\n $current_user_role = $get_userrole[0]['meta_value'];\n }\n\t\t\n $user_social_meta = $this->check_email_view_page($model->email);\n\t\t/*echo \"<pre>\";\n\t\tprint_r($user_social_meta);die;*/\n return $this->render('view', [ 'model' => $model, 'user_social_meta' => $user_social_meta, 'current_user_role' => $current_user_role]);\n }",
"public function profile($user_name = NULL) {\n\n\n if(!$this->user){\n //Router::redirect('/');\n die('Members Only <a href=\"/users/login\">Login</a>');\n\n }\n\n $this->template->content=View::instance('v_users_profile'); \n // $content=View::instance('v_users_profile'); \n $this->template->title= APP_NAME. \" :: Profile :: \".$user_name;\n \n $q= 'Select * \n From users \n WHERE email=\"'.$user_name.'\"';\n $user= DB::instance(DB_NAME)->select_row($q);\n\n $this->template->content->user=$user;\n \n # Render View \n echo $this->template;\n\n \n }",
"public function show($id)\n {\n $user = $this->user->find($id);\n \n// echo $article->tag_1. \"aaaaa\";\n// foreach($tags[0] as $tag)\n// \techo $tag-> id.\"<br>\";\n// exit();\n \n \treturn view('dashboard.user.form', ['user'=>$user]);\n }",
"public function edit() {\n $token = $this->require_authentication();\n $user = $token->getUser();\n require \"app/views/user/user_edit.phtml\";\n }",
"public function show(User $user)\n {\n \n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function show(User $user)\n {\n //\n }",
"public function showUser()\n {\n return view('admin.users-key.view');\n }"
] | [
"0.77957076",
"0.7396798",
"0.71890646",
"0.7060027",
"0.7008797",
"0.69479007",
"0.689526",
"0.6861521",
"0.68554735",
"0.68409884",
"0.6800803",
"0.6789776",
"0.6746153",
"0.674344",
"0.67190313",
"0.6694245",
"0.66941774",
"0.6634533",
"0.6612618",
"0.6612618",
"0.6593292",
"0.6588104",
"0.65789276",
"0.6571653",
"0.656979",
"0.65665144",
"0.65410715",
"0.6540735",
"0.65398306",
"0.6527563",
"0.6524282",
"0.65051544",
"0.6486954",
"0.6483694",
"0.6464548",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.64452267",
"0.6444714"
] | 0.0 | -1 |
Display a unordered list | function hc_users($args){
$users = hc_get_users($args);
if ( is_wp_error($users) ){
echo $users->get_error_message();
return false;
}
foreach ($users as $key => $user) {
echo '<ul class="hc_user_list">';
echo '<li class="hc_user_name">'.$user->display_name.'</li>';
echo '<li class="hc_user_gravatar">'.$user->gravatar.'</li>';
echo '<ul class="hc_user_info">';
foreach ($user as $field => $value) {
if (($field !=' display_name' && $field != 'gravatar') && $value != '') {
if ($field == 'user_url') {
echo '<li><a href="'.$value.'">'.$value.'</a></li>';
}else{
echo '<li>'.$value.'</li>';
}
}
}
echo '</ul>';
echo '</ul>';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ul( $list, $attributes = '' )\n\t{\n\t\treturn _list( 'ul', $list, $attributes );\n\t}",
"function ul(array $list, $attributes = ''): string\n {\n return _list('ul', $list, $attributes);\n }",
"public function display() {\n\t\t$singular = $this->_args['singular'];\n\n\t\t$data_attr = '';\n\n\t\tif ( $singular ) {\n\t\t\t$data_attr = \" data-wp-lists='list:$singular'\";\n\t\t}\n\n\t\t$this->display_tablenav( 'top' );\n\n?>\n<div class=\"wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>\">\n<?php\n\t$this->screen->render_screen_reader_content( 'heading_list' );\n?>\n\t<div id=\"the-list\"<?php echo $data_attr; ?>>\n\t\t<?php $this->display_rows_or_placeholder(); ?>\n\t</div>\n</div>\n<?php\n\t\t$this->display_tablenav( 'bottom' );\n\t}",
"abstract protected function displayList($list);",
"public function renderListContent() {}",
"public function ul($list, $attr = array())\n\t{\n\t\treturn $this->_listing('ul', $list, $attr);\n\t}",
"public function treeUl($list) {\n $output = '';\n if (is_array($list) || $list instanceof Iterator) {\n if (count($list) > 0) {\n $output = \"<ul>\\n\";\n foreach ($list as $item) {\n $output .= \"\\t<li>\";\n if(is_string($item)) {\n $output .= $this->_view->escape($item);\n } else {\n $output .= $this->treeUl($item);\n }\n $output .= \"</li>\\n\";\n }\n $output .= \"</ul>\\n\";\n }\n }\n return $output;\n }",
"public function getUl() {}",
"public static function ul($list, $attributes = array()) {\n\t\treturn static::listing('ul', $list, $attributes);\n\t}",
"public function actionLst()\n {\n return $this->render('lst',\n [\n 'name'=>'王聪',\n 'age'=>18,\n ]);\n }",
"function print_list() {\r\n if (!empty($this->data)) {\r\n $ol = '<ol>';\r\n foreach ($this->data as $result) {\r\n \r\n // Add proxy prefixto URL if necessary\r\n if ($this->proxy_required) {\r\n $url = PROXY_PREFIX . $result['url'];\r\n }\r\n else {\r\n $url = $result['url'];\r\n }\r\n \r\n // Add list item\r\n $ol .= '<li>';\r\n if (!empty($result['image'])) {\r\n $ol .= '<img src=\"' . $result['image'] . '\" alt=\"' . $result['text'] . '\" />';\r\n }\r\n $ol .= '<a href=\"' . $url . '\" target=\"_blank\">' . $result['text'] . '</a>';\r\n if (!empty($result['type'])) {\r\n $ol .= ' (<span class=\"nowrap\">' . $result['type'] . '</span>)';\r\n }\r\n $ol .= '<span class=\"subtext\">' . $result['subtext'] . '</span>';\r\n $ol .= '</li>';\r\n }\r\n $ol .= '</ol>';\r\n return $ol;\r\n }\r\n else {\r\n return false;\r\n }\r\n }",
"private function displayList()\r\n\t{\r\n\t\t//Fetch the list\r\n\t\t$this->model->getDepartmentList();\r\n\t\t$num = $this->model->numberOfDepartments;\r\n\t\tfor ($i = 0; $i < $num; $i++)\r\n\t\t{ \r\n\t\t\t$this->dList .=\r\n '<tr>\r\n <td><a href=\"ServiceHRM.php?action=ManageDepartment&deptID='.$this->model->result[$i]['id'].'\">'.$this->model->result[$i]['id'].' - '.$this->model->result[$i]['name'].'</a></td>\r\n </tr>';\r\n\t\t}\r\n\t}",
"public function renderList()\n {\n $html = '';\n foreach ($this->data as $listItem) {\n $html .= $this->render($listItem);\n }\n return $html;\n }",
"public function renderList()\n {\n return $this->renderAdminPage('Light_Kit_Admin_UserData/kit/zeroadmin/generated/luda_resource_has_tag_list', [], PageConfUpdator::create()->updateWidget(\"body.light_realist\", [\n 'vars' => [\n 'request_declaration_id' => 'Light_Kit_Admin_UserData:generated/luda_resource_has_tag',\n ],\n ]));\n }",
"static function ul(array $list_items, $id = Null, $class = Null, $make_link = False)\n {\n $display = '<ul'.self::_id($id).self::_class($class).'>'.self::$_nl;\n foreach ($list_items as $list_item => $value) {\n $display .= '<li>'.self::$_nl;\n if($make_link) {\n $display .= self::a($value, $list_item).self::$_nl;\n } else {\n $display .= $value;\n }\n $display .= \"</li>\".self::$_nl;\n }\n $display .= \"</ul>\".self::$_nl;\n\n return $display;\n }",
"private static function listing($type, $list, $attributes = array()) {\n\t\t$html = '';\n\n\t\tif (count($list) == 0) return $html;\n\n\t\tforeach ($list as $key => $value) {\n\t\t\t// If the value is an array, we will recurse the function so that we can\n\t\t\t// produce a nested list within the list being built. Of course, nested\n\t\t\t// lists may exist within nested lists, etc.\n\t\t\tif (is_array($value)) {\n\t\t\t\tif (is_int($key)) {\n\t\t\t\t\t$html .= static::listing($type, $value);\n\t\t\t\t} else {\n\t\t\t\t\t$html .= '<li>'.$key.static::listing($type, $value).'</li>';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$html .= '<li>'.static::entities($value).'</li>';\n\t\t\t}\n\t\t}\n\n\t\treturn '<'.$type.static::attributes($attributes).'>'.$html.'</'.$type.'>';\n\t}",
"public static function ul(array $list = array(), $attr = false)\n\t{\n\t\treturn self::build_list('ul', $list, $attr);\n\t}",
"public function run()\n\t{\n\t\techo \"</ul>\";\n\t}",
"public function output() {\n\t\treturn array_merge(\n\t\t\tarray(\"<ul data-divider-theme='b' id='list_{$this->options['id']}' \".($this->options['inset']?'data-inset=\"true\" ':'').($this->options['actions']?\"data-split-icon='{$this->options['icon']}' data-split-theme='a'\":\"\").\" data-role='listview'>\"),\n\t\t\t$this->items,\n\t\t\tarray(\"</ul>\"));\n\t}",
"function listcontent_open() {\n $this->doc .= '<div class=\"li\">';\n }",
"function ll_makelist($ll_infolinks, $widgetname){\n\techo '<nav class=\"' . $widgetname .'\"><ul class=\"liblinks-list ' . $widgetname .'\">';\n\tforeach ($ll_infolinks as $linktitle => $linkhref) {\n\t\techo '<li><a href=\"' . $linkhref . '\">' . $linktitle . '</a></li>';\n }\n echo '</ul></nav>';\n}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function view()\n {\n $pages = explode(' ', $this->list);\n\n if ($this->current_page < 1 || $this->current_page > $this->total_pages) {\n $this->current_page = 1;\n }\n $output = null;\n\n $output .= '<ul class=\"pagination\">';\n $output .= $this->beginning();\n $output .= $this->middle($pages);\n $output .= $this->ending();\n $output .= '</ul>';\n \n return $output;\n }",
"protected function outputUnorderedList(array $data)\n {\n foreach ($data as $value) {\n $this->outputLine(' - ' . $value);\n }\n }",
"function make_list(array $array)\n {\n echo \"<ul>\";\n \n foreach($array as $numb)\n {\n make_tag(\"li\", $numb);\n }\n\n echo \"</ul>\";\n }",
"function theme_node_add_list($content) {\n $output = '';\n\n if ($content) {\n $output = '<dl class=\"node-type-list\">';\n foreach ($content as $item) {\n $output .= '<dt>'. l($item['title'], $item['href'], $item['localized_options']) .'</dt>'; \n $output .= '<dd>'. filter_xss_admin($item['description']) .'</dd>';\n }\n $output .= '</dl>';\n }\n return $output;\n}",
"private function display($list)\n {\n $this->view->downNumber = count($list);\n $this->view->downHostList = $list;\n }",
"function components_list(){\n\n\t\t?><li data-type=\"test\" title=\"Sample Title\"></li><?php\n\t}",
"function _list(string $type = 'ul', $list = [], $attributes = '', int $depth = 0): string\n {\n // Set the indentation based on the depth\n $out = str_repeat(' ', $depth)\n // Write the opening list tag\n . '<' . $type . stringify_attributes($attributes) . \">\\n\";\n\n // Cycle through the list elements. If an array is\n // encountered we will recursively call _list()\n\n foreach ($list as $key => $val) {\n $out .= str_repeat(' ', $depth + 2) . '<li>';\n\n if (! is_array($val)) {\n $out .= $val;\n } else {\n $out .= $key\n . \"\\n\"\n . _list($type, $val, '', $depth + 4)\n . str_repeat(' ', $depth + 2);\n }\n\n $out .= \"</li>\\n\";\n }\n\n // Set the indentation for the closing tag and apply it\n return $out . str_repeat(' ', $depth) . '</' . $type . \">\\n\";\n }",
"public function toHtml() {\n\t\techo '<ol '.$this->getAttributes().'>'.$this->renderChildren().'</ol>';\n\t}",
"public function liste()\n {\n $discs = $this->LoadModel('Disc');\n $discDetail = $discs->info_record();\n $this->render('liste', [\n 'discs' => $discDetail\n ]);\n }",
"protected function getTag()\n {\n return 'ul';\n }",
"public function listDisplayElements();",
"public function ul(array $list, array $options = [], array $itemOptions = []): string\n {\n return $this->nestedList($list, ['tag' => 'ul'] + $options, $itemOptions);\n }",
"function OrderedList( $atts, $content = null ) {\r\n return '<div class=\"OrderedList\">' . $content . '</div>';}",
"public function ul ($menu, $opts=[])\n {\n if (isset($opts['type']))\n $type = $opts['type'];\n else\n $type = 'ul';\n\n $list = $this->build_list($menu, $type);\n\n return $this->return_value($list, $opts);\n }",
"protected function listTag($aContents, $bOrderedList = false) {\n \n if(!$bOrderedList){\n echoln('<ul>');\n } else {\n echoln('<ol>');\n }\n \n foreach ($aContents as $sValue) {\n echoln('<li>'.$sValue.'</li>');\n }\n \n if(!$bOrderedList){\n echoln('</ul>');\n } else {\n echoln('</ol>');\n }\n }",
"function _list( $type = 'ul', $list = [ ], $attributes = '', $depth = 0 )\n\t{\n\t\t// If an array wasn't submitted there's nothing to do...\n\t\tif ( ! is_array( $list ) )\n\t\t{\n\t\t\treturn $list;\n\t\t}\n\n\t\t// Set the indentation based on the depth\n\t\t$out = str_repeat( ' ', $depth )\n\t\t\t// Write the opening list tag\n\t\t\t. '<' . $type . _stringify_attributes( $attributes ) . \">\\n\";\n\n\n\t\t// Cycle through the list elements. If an array is\n\t\t// encountered we will recursively call _list()\n\n\t\tstatic $_last_list_item = '';\n\t\tforeach ( $list as $key => $val )\n\t\t{\n\t\t\t$_last_list_item = $key;\n\n\t\t\t$out .= str_repeat( ' ', $depth + 2 ) . '<li>';\n\n\t\t\tif ( ! is_array( $val ) )\n\t\t\t{\n\t\t\t\t$out .= $val;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$out .= $_last_list_item . \"\\n\" . _list( $type, $val, '', $depth + 4 ) . str_repeat( ' ', $depth + 2 );\n\t\t\t}\n\n\t\t\t$out .= \"</li>\\n\";\n\t\t}\n\n\t\t// Set the indentation for the closing tag and apply it\n\t\treturn $out . str_repeat( ' ', $depth ) . '</' . $type . \">\\n\";\n\t}",
"public static function ul($lists_array, $options = array())\n {\n if (empty($lists_array)) return null;\n\n $lists = static::li($lists_array);\n\n return static::tag('ul', \"\\n\".$lists.\"\\n\", $options);\n }",
"static function renderUList(array $items, $attributes = null)\n {\n self::renderOpenTag('ul', $attributes);\n foreach($items as $item)\n {\n self::renderTag('li', null, $item);\n }\n echo '</ul>';\n }",
"protected function render() {\n\t\t$args = $this->get_settings_for_display();\n\t\t$args['url'] = $args['url']['url'];\n\t\t$args['disabled'] = $args['disabled'] == 'yes' ? true : false;\n\t\t$args['top_border'] = $args['top_border'] == 'yes' ? true : false;\n\n\t\techo list_item_shortcode($args);\n\t}",
"public function render()\n\t{\n\t\treturn '<li>'.$this->html->link($this->link, $this->title, $this->attributes).$this->renderNestedMenu().'</li>';\n\t}",
"public function renderList()\n {\n $this->template->articles = $this->articleManager->getArticles();\n }",
"public function PrintAsList()\n {\n $items = array();\n /** @var Node $current */\n $current = $this->head;\n while($current != null) \n\t\t{\n\t\t\t\n array_push($items, $current->data);\n $current = $current->next;\n }\n\t\t\n\t\t$this->bubbleSort($items);\n\t\t\n foreach($items as $item)\n {\n\t\t\techo $item . \"->\";\n }\n\n echo PHP_EOL;\n }",
"function listu_close() {\n $this->doc .= '</ul>'.DOKU_LF;\n }",
"public function showList() {\n\t \treturn 0;\n\t }",
"public function end()\n\t{\n\t\t$this->show('</ul>' . LF);\n\t}",
"protected function openListTag($node)\n {\n $class = $this->getClass($node);\n if ($class) $class = ' class=\"'.$class.'\"';\n echo \"<li{$class}>\";\n }",
"public function listGroupAdmin() {\n $group = (string)$this->object->info->info->form->group;\n $items = $this->object->getValues($group, true);\n $listItems = '';\n foreach ($items as $key=>$item) {\n $sortableListClass = ($this->object->hasOrd()) ? 'sortableList' : '';\n $list = new ListObjects($this->type, array('where'=>$group.'=\"'.$key.'\"',\n 'function'=>'Admin',\n 'order'=>$this->orderField()));\n $listItems .= '<div class=\"lineAdminBlock\">\n <div class=\"lineAdminTitle\">'.$item.'</div>\n <div class=\"lineAdminItems\">\n <div class=\"listAdmin '.$sortableListClass.'\" rel=\"'.url($this->type.'/sortSave/', true).'\">\n '.$list->showList(array('function'=>'Admin',\n 'message'=>'<div class=\"message\">'.__('noItems').'</div>'),\n array('userType'=>$this->login->get('type'))).'\n </div>\n </div>\n </div>';\n }\n return '<div class=\"lineAdminBlockWrapper\">'.$listItems.'</div>';\n }",
"protected function renderListNavigation()\n {\n $totalPages = ceil($this->totalItems / $this->iLimit);\n\n $content = '';\n\n // Show page selector if not all records fit into one page\n if ($totalPages > 1) {\n $first = $previous = $next = $last = '';\n $listURL = $this->listURL('', $this->table);\n\n // 1 = first page\n $currentPage = floor(($this->firstElementNumber + 1) / $this->iLimit) + 1;\n\n // Compile first, previous, next, last and refresh buttons\n if ($currentPage > 1) {\n $labelFirst = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:first');\n\n $first = '<a href=\"' . $listURL . '&pointer=0\"><img' . IconFactory::skinImg('control_first.gif')\n . 'alt=\"' . $labelFirst . '\" title=\"' . $labelFirst . '\" /></a>';\n } else {\n $first = '<img' . IconFactory::skinImg('control_first_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n if (($currentPage - 1) > 0) {\n $labelPrevious = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:previous');\n\n $previous = '<a href=\"' . $listURL . '&pointer=' . (($currentPage - 2) * $this->iLimit) . '\"><img' . IconFactory::skinImg('control_previous.gif')\n . 'alt=\"' . $labelPrevious . '\" title=\"' . $labelPrevious . '\" /></a>';\n } else {\n $previous = '<img' . IconFactory::skinImg('control_previous_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n if (($currentPage + 1) <= $totalPages) {\n $labelNext = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:next');\n\n $next = '<a href=\"' . $listURL . '&pointer=' . (($currentPage) * $this->iLimit) . '\"><img' . IconFactory::skinImg('control_next.gif')\n . 'alt=\"' . $labelNext . '\" title=\"' . $labelNext . '\" /></a>';\n } else {\n $next = '<img' . IconFactory::skinImg('control_next_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n if ($currentPage != $totalPages) {\n $labelLast = $GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:last');\n\n $last = '<a href=\"' . $listURL . '&pointer=' . (($totalPages - 1) * $this->iLimit) . '\"><img' . IconFactory::skinImg('control_last.gif')\n . 'alt=\"' . $labelLast . '\" title=\"' . $labelLast . '\" /></a>';\n } else {\n $last = '<img' . IconFactory::skinImg('control_last_disabled.gif') . 'alt=\"\" title=\"\" />';\n }\n\n $pageIndicator = sprintf($GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:pageIndicator'),\n $currentPage, $totalPages);\n\n if ($this->totalItems > ($this->firstElementNumber + $this->iLimit)) {\n $lastElementNumber = $this->firstElementNumber + $this->iLimit;\n } else {\n $lastElementNumber = $this->totalItems;\n }\n $rangeIndicator = '<span class=\"pageIndicator\">'\n . sprintf($GLOBALS['LANG']->sL('LLL:EXT:tt_news/Classes/Module/locallang.xml:rangeIndicator'),\n $this->firstElementNumber + 1, $lastElementNumber, $this->totalItems)\n . '</span>';\n\n $content .= '<div class=\"ttnewsadmin-pagination\">'\n . $first . $previous\n . ' '\n . $rangeIndicator . ' ('\n . $pageIndicator . ') '\n . $next . $last\n . '</div>';\n } // end of if pages > 1\n\n $data = Array();\n $titleColumn = $this->fieldArray[0];\n $data[$titleColumn] = $content;\n\n return ($this->addElement(1, '', $data));\n }",
"function alist ($array) { //This function prints a text array as an html list.\n $alist = \"<ul>\";\n for ($i = 0; $i < sizeof($array); $i++) {\n $alist .= \"<li>$array[$i]\";\n }\n $alist .= \"</ul>\";\n return $alist;\n}",
"function scrappy_renderList( $data ) {\n if ( !is_array( $data ) ) return; \n $html = '';\n foreach ( $data as $key => $value ) {\n $html .= '<ul style=\"padding-left:15px\">';\n if (is_object( $value ) ) $value = get_object_vars( $value );\n if (is_array( $value ) ) {\n $html .= '<li><strong>' . $key .':</strong> ';\n $html .= scrappy_renderList( $value );\n $html .= '</li>';\n } else {\n $html .= '<li><strong>' . $key .':</strong> '. $value . '</li>';\n }\n $html .= '</ul>'; \n }\n return $html;\n}",
"public function __toString()\n\t{\n\t\t$list_html = $this->build_list($this->data);\n\t\t\n\t\treturn $list_html;\n\t}",
"static public function writeList($list = [], $options = []) : string\n {\n if (empty($list)) {\n return '';\n }\n $html = [static::writeTag('ul', $options['ul'] ?? null)];\n foreach ($list as $entry) {\n $html[] = static::writeTag(\n 'li',\n $options['li'] ?? null,\n $entry,\n $options\n );\n }\n $html[] = \"</ul>\\n\";\n return implode(\"\\n\", $html);\n }",
"public function story_list()\n\t{\n\t\t$data['page']='Story List';\n\t\t$data['stories_list']=$this->stories->get_all();\n\t\t$view = 'admin/stories/admin_stories_list_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}",
"public function addUl (array $list = array (), $attr = FALSE)\n\t{\n\t\treturn static ::build_list('ul', $list, $attr);\n\t}",
"function display(){\n\n\t\t$current = $this->head;\n\t\tif($this->head == NULL){\n\t\t\techo \"List is empty\\n\";\n\t\t\treturn;\n\t\t}\n\t\techo \"Total Nodes are : \" . $this->countNodes() . \"\\n\";\n\t\techo \"Single Linked List nodes are: \";\n\t\twhile($current != NULL){\n\t\t\tif($current != NULL){\n\t\t\techo $current->data ;\n\t\t\tif($current->next != NULL)\n\t\t\techo \"->\";\n\t\t\t}\n\t\t\t$current = $current->next;\n\t\t}\n\t\techo \"\\n\";\n\t}",
"public function getHtml() {\n if (!$this->hasItems()) {\n return '';\n }\n\n $html = '<ul' . $this->getIdHtml() . $this->getClassHtml() . $this->getAttributesHtml() . '>';\n foreach ($this->items as $item) {\n if ($item === self::SEPARATOR) {\n $html .= '<li class=\"separator\"></li>';\n continue;\n }\n\n $item->setBaseUrl($this->baseUrl);\n\n if ($item instanceof self) {\n if ($item->hasItems()) {\n $html .= '<li class=\"menu\"><a href=\"#\" class=\"menu\">' . $item->getLabel() . '</a>' . $item->getHtml() . '</li>';\n }\n } else {\n $html .= $item->getHtml();\n }\n }\n $html .= '</ul>';\n\n return $html;\n }",
"public static function showList() {\n $template = file_get_contents(plugin_dir_path(__FILE__) . 'templates/login_history.html');\n\n $results = self::queryLoginHistories('desc', 25);\n $histories = '';\n foreach ($results as $history) {\n $histories .= '<tr><td>' . $history->logged_in_at. '</td><td>' . $history->user_login . '</td><td>' . $history->remote_ip . '</td><td>' . $history->user_agent . '</td></tr>';\n }\n\n $output = str_replace('%%page_title%%', get_admin_page_title(), $template);\n $output = str_replace('%%login_histories%%', $histories, $output);\n $output = str_replace('%%Recent%%', __('Recent', 'simple-login-history'), $output);\n $output = str_replace('%%record%%', __('record', 'simple-login-history'), $output);\n $output = str_replace('%%csv_download_link%%', plugin_dir_url(__FILE__) . 'download.php', $output);\n echo $output;\n }",
"public function listt(){\n\t \treturn view('menu_list', array('menus' => Menu::orderBy('date')->get()));\n\t }",
"public function render(): string\n {\n $language = $this->lang;\n $query = new QueryString($this->whitelist);\n $str = '';\n $cssId = $this->cssId === null ? '' : ' id=\"'.$this->cssId.'\"';\n $str .= '<ul'.$cssId.' class=\"'.$this->cssClass.'\">';\n foreach ($language->arrLang as $lang => $label) {\n $page = $this->lang->createPage($this->web->page, $lang);\n $path = $this->web->getDir();\n $text = $this->useLabel ? $label : strtoupper($lang);\n if (file_exists($this->web->getDocRoot().$path.$page)) {\n $url = $path.$page.$query->withString(['lang' => $lang]);\n } else {\n $url = $this->redirect.$query->withString(['lang' => $lang, 'url' => $path.$page]);\n }\n if ($lang === $language->get()) {\n $str .= '<li class=\"'.$this->liClassActive.'\">'.$text.'</li>';\n } else {\n $str .= '<li><a href=\"'.htmlspecialchars($url).'\" title=\"'.$label.'\">'.$text.'</a></li>';\n }\n }\n $str .= '</ul>';\n\n return $str;\n }",
"protected function renderItems($items)\n {\n $n=count($items);\n $lines=[];\n foreach($items as $i => $item)\n {\n $options=array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', []));\n $tag=ArrayHelper::remove($options, 'tag', 'li');\n $class=[];\n $this->getItemClasses($item,$class,$i,$n);\n $this->getClassOptions($class,$options);\n $menu=$this->renderItem($item);\n\n if(!empty($item['items']))\n {\n $menu.=strtr($this->submenuTemplate, [\n '{show}' => $item['active'] ? \"style='display: block'\" : \"style='display: none'\",\n '{items}' => $this->renderItems($item['items']),\n ]);\n }\n $lines[]=Html::tag($tag, $menu, $options);\n }\n\n if(Yii::$app->sys->discord_invite_url!==false)\n $lines[]='<li class=\"nav-item\"><b>'.Html::a('<i class=\"fab fa-discord text-discord\"></i><p class=\"text-discord\">Join our Discord!</p>', Yii::$app->sys->discord_invite_url, ['target'=>'_blank','class'=>'nav-link']).'</b></li>';\n if(Yii::$app->sys->patreon_menu===false)\n {\n $lines[]='<li><hr/></li>';\n $lines[]='<li class=\"nav-item\"><b>'.Html::a('<i class=\"fab fa-patreon text-danger\"></i><p class=\"text-danger\">Become a Patron!</p>', 'https://www.patreon.com/bePatron?u=31165836', ['target'=>'_blank','class'=>'nav-link']).'</b></li>';\n }\n\n return implode(\"\\n\", $lines);\n }",
"public function render() {\n\t\treturn '<li class=\"uk-nav-divider\"></li>';\n\t}",
"public function render() {\n\t\t$hidemainmenu = $this->app->request->getVar('hidemainmenu');\n\t\t$html = array('<li '.JArrayHelper::toString($this->_attributes).'>');\n\t\t$icon = $this->getAttribute('icon') ? '<i class=\"uk-icon-'.$this->getAttribute('icon').'\"> </i>' : '';\n\t\t$has_children = count($this->getChildren());\n\n\t\tif (!$hidemainmenu) {\n\t\t\t$html[] = '<a href=\"'.JRoute::_($this->_link).'\">'.$icon.$this->getName().($has_children ? ' <i class=\"uk-icon-caret-down\"> </i>' : '').'</a>';\n\t\t} else {\n\t\t\t$html[] = '<span>'.$this->getName().'</span>';\n\t\t}\n\n\t\tif ($has_children && !$hidemainmenu) {\n\t\t\t$html[] = '<div class=\"uk-dropdown uk-dropdown-navbar\"><ul>';\n\t\t\tforeach ($this->getChildren() as $child) {\n\t\t\t\t$html[] = $child->render();\n\t\t\t}\n\t\t\t$html[] = '</ul></div>';\n\t\t}\n\n\t\t$html[] = '</li>';\n\n\t\treturn implode(\"\\n\", $html);\n\t}",
"public function run() {\n\t\tif(empty($this->links))\n\t\t\treturn;\n\n\t\techo CHtml::openTag($this->tagName,$this->htmlOptions).\"\\n\";\n\t\t$links=array();\n\t\tif($this->homeLink===null)\n\t\t\t$links[]='<li>'.CHtml::link(Yii::t('zii','Home'),Yii::app()->homeUrl).'</li>';\n\t\telse if($this->homeLink!==false)\n\t\t\t$links[]='<li>'.$this->homeLink.'</li>';\n\t\tforeach($this->links as $label=>$url)\n\t\t{\n\t\t\tif(is_string($label) || is_array($url))\n\t\t\t\t$links[]='<li>'.CHtml::link($this->encodeLabel ? CHtml::encode($label) : $label, $url).'</li>';\n\t\t\telse\n\t\t\t\t$links[]='<li class=\"current\">'.($this->encodeLabel ? CHtml::encode($url) : $url).'</li>';\n\t\t}\n\t\techo implode($this->separator,$links);\n\t\techo CHtml::closeTag($this->tagName);\n\t}",
"function exam_list() {\n \n //$vNumberOfColumns = 4;\n \n $vContent = t(ExamInstance::getListingOfExams());\n \n return $vContent;\n \n //foreach ($links as $link) {\n // $items[] = l($link['title'], $link['href'], $item['localized_options'])\n // . ': ' . filter_xss_admin($link['description']);\n //}\n\n //return theme('item_list', array('items' => $items));\n \n}",
"public function lists();",
"public function sort_list()\r\n {\r\n return view( $this->_skin .'.web.help_sort');\r\n }",
"function theme_jplayer_item_list($variables) {\n $items = $variables['items'];\n $title = $variables['title'];\n $type = $variables['type'];\n $attributes = $variables['attributes'];\n\n $output = '';\n if (isset($title)) {\n $output .= '<h3>' . $title . '</h3>';\n }\n\n if (!empty($items)) {\n $output .= \"<$type\" . drupal_attributes($attributes) . '>';\n $num_items = count($items);\n $data = '';\n foreach ($items as $i => $item) {\n $attributes = array();\n $children = array();\n if (is_array($item)) {\n foreach ($item as $key => $value) {\n if ($key == 'data') {\n $data = $value;\n }\n elseif ($key == 'children') {\n $children = $value;\n }\n else {\n $attributes[$key] = $value;\n }\n }\n }\n else {\n $data = $item;\n }\n if (count($children) > 0) {\n // Render nested list.\n $data .= theme_item_list(array(\n 'items' => $children,\n 'title' => NULL,\n 'type' => $type,\n 'attributes' => $attributes,\n ));\n }\n if ($i == 0) {\n $attributes['class'][] = 'first jp-playlist-first';\n }\n if ($i == $num_items - 1) {\n $attributes['class'][] = 'last jp-playlist-last';\n }\n $context_menu = (!variable_get('jplayer_protect', FALSE) && variable_get('jplayer_encourage_download', FALSE)) ? 'true' : 'false';\n $attributes['oncontextmenu'] = \"return $context_menu;\";\n $output .= '<li' . drupal_attributes($attributes) . '>' . $data . \"</li>\\n\";\n }\n $output .= \"</$type>\";\n }\n return $output;\n}",
"public function renderList($list, $depth = 1)\n\t{\n\t\t$output = '';\n\n\t\t$items = $list->items();\n\n\t\tif( ! empty($items))\n\t\t{\n\t\t\t$output = $this->format('<ul'.$this->attributes($list['ul']).'>', $depth);\n\n\t\t\t$itemCount = count($items);\n\n\t\t\tforeach($items as $key => $item)\n\t\t\t{\n\t\t\t\tif($itemCount == 1)\n\t\t\t\t{\n\t\t\t\t\t$item['li.class'] = $this->options['class.single'];\n\t\t\t\t}\n\n\t\t\t\t$output .= $this->renderItem($item, $depth+1);\n\t\t\t}\n\n\t\t\t$output .= $this->format('</ul>', $depth);\n\t\t}\n\n\t\treturn $output;\n\t}",
"public function userlist()\n\t{\n\t\t$data['page']='Userlist';\n\t\t$data['users_list']=$this->users->get_many_by('userlevel_id',2);\n\t\t$view = 'admin/userlist/admin_userlist_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}",
"public function datalist() {\n\t\t\tif ( false !== $this->data( 'options' ) ) {\n\t\t\t\techo '<datalist id=\"' . $this->js_field_id() . 'inputLists\">';\n\t\t\t\t$options = ( ! wponion_is_array( $this->data( 'options' ) ) ) ? $this->element_data( $this->data( 'options' ) ) : $this->data( 'options' );\n\n\t\t\t\tforeach ( $options as $key => $option ) {\n\t\t\t\t\tif ( wponion_is_array( $option ) && isset( $option['label'] ) ) {\n\t\t\t\t\t\techo $this->sel_option( $this->handle_options( $key, $option ) );\n\t\t\t\t\t} elseif ( wponion_is_array( $option ) && ! isset( $option['label'] ) ) {\n\t\t\t\t\t\techo '<optgroup label=\"' . $key . '\">';\n\t\t\t\t\t\tforeach ( $option as $k => $v ) {\n\t\t\t\t\t\t\techo $this->sel_option( $this->handle_options( $k, $v ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo '</optgroup>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo $this->sel_option( $this->handle_options( $key, $option ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo '</datalist>';\n\t\t\t}\n\t\t}",
"function li($category, $list, $offset)\n {\n $result = array();\n $result[\"error\"] = NULL;\n if(!empty($list))\n {\n $result[\"list\"] = \"<p><strong>{$category}:</strong></p>\\n<ul>\";\n $count = count($list);\n for ($i=0; $i<$count; $i++)\n {\n $item = htmlentities($list[$i][\"id\"], ENT_QUOTES, 'UTF-8');\n $result[\"list\"] .= \"\\n<li>{$item}</li>\";\n }\n $result[\"list\"] .= \"\\n</ul>\";\n }\n return $result;\n }",
"public function executeList()\n {\n return $this->renderComponent('roles', 'list');\n }",
"function listu_open($classes = null) {\n $class = '';\n if($classes !== null) {\n if(is_array($classes)) $classes = join(' ', $classes);\n $class = \" class=\\\"$classes\\\"\";\n }\n $this->doc .= \"<ul$class>\".DOKU_LF;\n }",
"function parse_list($code)\n\t{\n\t\tpreg_match_all('`((?: |\\t)+)(--|\\*\\*|[-*])(.*)`', $code[0], $out, PREG_SET_ORDER);\n\t\tif(!$out) return '';\n\t\t$html = '';\n\t\t$last_lvl = 0;\n\t\t$last_type = array();\n\t\tforeach($out as $o)\n\t\t{\n\t\t\tlist(, $spaces, $opening, $content) = $o;\n\t\t\t$lvl = strlen($spaces);\n\t\t\tif($lvl != $last_lvl)\n\t\t\t{\n\t\t\t\tif($opening == '*') $type = 'ul';\n\t\t\t\telseif($opening== '-') $type = 'ol';\n\t\t\t\telse $type = 'dl';\n\n\t\t\t\tif($lvl > $last_lvl)\n\t\t\t\t{\n\t\t\t\t\t$html .= \"<$type>\";\n\t\t\t\t\t$last_type[] = $type;\n\t\t\t\t}\n\t\t\t\twhile($lvl < $last_lvl)\n\t\t\t\t{\n\t\t\t\t\t$html .= '</' . array_pop($last_type) . '>';\n\t\t\t\t\t$last_lvl -= 2;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// definition lists items\n\t\t\tif($type == 'dl') {\n\t\t\t\t// term/definition\n\t\t\t\t$pos = strpos($content, $opening);\n\t\t\t\tif($pos !== false) {\n\t\t\t\t\t$html .= '<dt>' . substr($content, 0, $pos) . '</dt>';\n\t\t\t\t\t$html .= '<dd>' . substr($content, $pos + 2) . '</dd>';\n\t\t\t\t}\n\t\t\t\t// term only\n\t\t\t\telseif($opening == '**') $html .= '<dt>' . $content . '</dt>';\n\t\t\t\t// definition only\n\t\t\t\telse $html .= '<dd>' . $content . '</dd>';\n\t\t\t}\n\t\t\t// classical lists items\n\t\t\telse $html .= '<li>' . $content . '</li>';\n\t\t\t$last_lvl = $lvl;\n\t\t}\n\t\treturn $html . \"</$type>\";\n\t}",
"function minorite_item_list($variables) {\n $items = $variables['items'];\n $type = $variables['type'];\n $attributes = $variables['attributes'];\n $output = '';\n\n if (!empty($items)) {\n $output = \"<$type\" . drupal_attributes($attributes) . '>';\n $num_items = count($items);\n foreach ($items as $item) {\n $attributes = array();\n $children = array();\n $data = '';\n if (is_array($item)) {\n foreach ($item as $key => $value) {\n if ($key == 'data') {\n $data = $value;\n }\n elseif ($key == 'children') {\n $children = $value;\n }\n else {\n $attributes[$key] = $value;\n }\n }\n }\n else {\n $data = $item;\n }\n if (count($children) > 0) {\n // Render nested list.\n $data .= minorite_item_list(array('items' => $children, 'title' => NULL, 'type' => $type, 'attributes' => $attributes));\n }\n $output .= '<li' . drupal_attributes($attributes) . '>' . $data . \"</li>\\n\";\n }\n $output .= \"</$type>\";\n }\n\n return $output;\n}",
"public function renderMenu()\n {\n echo \"<ul class=\\\"sidebar-menu\\\">\\n\";\n foreach ($this->_menus as $menu) {\n if (count($menu->subMenu()) == 0) {\n echo \"<li \".$this->is_li_class_active($menu->getLinks()).\">\\n\";\n echo \"<a href=\\\"\".SystemURLs::getRootPath() . \"/\" . $menu->getUri().\"\\\">\\n\";\n echo \"<i class=\\\"\".$menu->getIcon().\"\\\"></i> <span>\".gettext($menu->getTitle()).\"</span>\\n\";\n echo \"</a>\\n\";\n echo \"</li>\\n\";\n } else {// we are in the case of a treeview\n echo \"<li class=\\\"treeview\".$this->is_treeview_Opened($menu->getLinks()).\"\\\">\";\n echo \"<a href=\\\"\".SystemURLs::getRootPath() . \"/\" . $menu->getUri().\"\\\">\\n\";\n echo \" <i class=\\\"\".$menu->getIcon().\"\\\"></i>\\n\";\n echo \" <span>\".gettext($menu->getTitle()).\"</span>\\n\";\n echo \" <i class=\\\"fa fa-angle-left pull-right\\\"></i>\\n\";\n if (count($menu->getBadges()) > 0) {\n foreach ($menu->getBadges() as $badge) {\n if ($badge['id'] != ''){\n echo \"<small class=\\\"\".$badge['class'].\"\\\" id=\\\"\".$badge['id'].\"\\\">\".$badge['value'].\"</small>\\n\";\n } else if ($badge['data-id'] != ''){\n echo \"<small class=\\\"\".$badge['class'].\"\\\" data-id=\\\"\".$badge['data-id'].\"\\\">\".$badge['value'].\"</small>\\n\"; \n } else {\n echo \"<small class=\\\"\".$badge['class'].\"\\\">\".$badge['value'].\"</small>\\n\";\n }\n }\n }\n echo \"</a>\\n\";\n echo \"<ul \".$this->is_treeview_menu_open($menu->getLinks()).\">\\n\";\n $this->addSubMenu($menu->subMenu());\n echo \"</ul>\\n\";\n echo \"</li>\\n\";\n } \n }\n echo \"</ul>\\n\";\n }",
"public function renderList()\n {\n $listUnit = $this->interActor->listUnit($this->inputHandler->getArrayMap());\n\n $view = new \\View\\Model(\n \\View\\Customer::list($listUnit),\n $this->inputHandler->routeArrayMap()\n );\n return $view->render();\n }",
"function show()\n {\n \t$this->out->elementStart('ol', array('id' => 'notices', 'class' => 'noavatar'));\n $cnt = 0;\n\n while ($this->notice != null \n \t&& $this->notice->fetch() && $cnt <= MESSAGES_PER_PAGE) {\n $cnt++;\n \n if ($cnt > MESSAGES_PER_PAGE) {\n break;\n }\n \n $item = $this->newListItem($this->notice);\n $item->show();\n }\n \n if (0 == $cnt) {\n $this->out->showEmptyList();\n }\n \n $this->out->elementEnd('ol');\n }",
"function showCategory($catList) {\n $str =\"<ul id='menu-categories-menu'>\";\n foreach ($catList->getCategoriesActive()->getList() as $k => $v) {\n $str .=\"<li><a href='#'>\".$v->getCatname().\"</a></li>\";\n }\n $str .=\"</ul>\";\n return $str;\n}",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public static function htmlList($menuName, array $attributes = array())\n\t{\n\t\t$menu = self::getMenuStructure($menuName);\n\t\t\n\t\t// Add special level counter class\n\t\t$attributes['class'][] = 'level-0';\n\t\t$attributes = \\spcms\\core\\HtmlRender::buildAttributes($attributes);\t\t\n\t\t\n\t\t$output\t = \"<ul {$attributes}>\";\n\t\t$output .= self::buildHtmlMenu($menu);\n\t\t$output .= '</ul>';\n\t\t\n\t\treturn $output;\n\t}",
"function list_items($list)\n{\n\t$result = '';\n\tforeach ($list as $key => $value) {\n // Display each item and a newline\n $add = $key + 1; \n $result .= \"[{$add}] {$value}\\n\";\n }\n\t\n\treturn $result;\n}",
"static function renderOList(array $items, $attributes = null)\n {\n self::renderOpenTag('ol', $attributes);\n foreach($items as $item)\n {\n self::renderTag('li', null, $item);\n }\n echo '</ol>';\n }",
"public function userList() {\n /** @var User[] $users */\n $users = $this->entityManager->getRepository(\"Entity\\\\User\")->findAll(); // Retrieve all User objects registered in database\n echo $this->twig->render('admin/lists/users.html.twig', ['users' => $users]);\n }",
"public function list();",
"public function list();",
"public function list();",
"function ll_makelist2($ll_sociallinks, $widgetname){\n\techo '<nav class=\"' . $widgetname .'\"><ul class=\"liblinks-list ' . $widgetname .'\">';\n\tforeach ($ll_sociallinks as $ll_link) {\n\t\techo '<li><a href=\"' . $ll_link[1] . '\" data-icon=\"' . $ll_link[2] . '\">' . $ll_link[0] . '</a></li>';\n\t}\n\techo '</ul></nav>';\n\tunset($ll_links);\n}",
"public function showList()\n {\n // Get posts datas\n $postList = $this->currentModel->getListWithAuthor();\n // Loop to find any existing comments attached to each post\n for ($i = 0; $i < count($postList); $i ++) {\n // Retrieve (or not) single post comments\n $postComments = $this->currentModel->getCommentListForSingle($postList[$i]->id);\n // Comments are found for a post.\n if ($postComments != false) {\n // Add temporary param \"postComments\" to object\n $postList[$i]->postComments = $postComments;\n }\n // Retrieve single post images\n $postImages = $this->currentModel->getImageListForSingle($postList[$i]->id);\n // Images are found for a post.\n if ($postImages != false) {\n // Add temporary param \"postImages\" to object\n $postList[$i]->postImages = $postImages;\n }\n }\n $varsArray = [\n 'metaTitle' => 'Posts list',\n 'metaDescription' => 'Here, you can follow our news and technical topics.',\n 'imgBannerCSSClass' => 'post-list',\n 'postList' => $postList\n ];\n echo $this->page->renderTemplate('Blog/Post/post-list.tpl', $varsArray);\n }",
"public function listView()\r\n {\r\n $data['page'] = lang('interview_categories');\r\n $data['menu'] = 'interview_categories';\r\n $this->load->view('admin/layout/header', $data);\r\n $this->load->view('admin/interview-categories/list');\r\n }",
"function list_array( $des_array ){\n\tif( is_array( $des_array ) ){\n\t\techo '<ul>';\n\t\tforeach( $des_array as $item ){\n\t\t\techo '<li>' . $item . '</li>';\n\t\t}\n\t\techo '</ul>';\n\t}\n}",
"function my_list()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['list'] = $this->_bid->my_list();\n\t\t\n\t\t$this->load->view('bids/my_list', $data);\n\t}",
"function show_list()\n\t{\n\t\t$out = $this->get_value_list();\n\t\treturn $out;\n\t}",
"function content_nav() {\n\t\t$current_individual_nav_items = 0;\n\t\t$max_individual_nav_items = 4;\n\t\t\n\t\tforeach($this->data['content_actions'] as $key => $item) :\n\t\t\tif ( $current_individual_nav_items == $max_individual_nav_items ) { ?>\n\t\t\t\t<?\n\t\t\t}\n\t\t\t\n\t\t\techo $this->makeListItem( $key, $item );\n\t\t\t$current_individual_nav_items++;\n\t\tendforeach;\n\t\t\n\t\t?></ul></li><?\n\t}",
"function getMenu($links, $vertical) {\n $key=null;$mean=null;\n echo \"<ul>\";\n if($vertical) {\n foreach ($links as $key => $mean) {\n echo \"<li><a href='$mean'>$key</li>\";\n }\n } else {\n foreach ($links as $key => $mean) {\n echo \"<li style='display:inline; margin-right: 10px;'><a href='$mean'>$key</li>\";\n }\n }\n echo \"</ul>\";\n }",
"function drawList($items, $style = 'stream') {\n\t\t\t\t\tif (is_array($items) && !empty($items) && !empty($style)) {\n\t\t\t\t\t\t$t = new \\Bonita\\Templates($this);\n\t\t\t\t\t\t$t->items = $items;\n\t\t\t\t\t\treturn $t->draw('list/'. $style);\n\t\t\t\t\t}\n\t\t\t\t\treturn '';\n\t\t\t\t}",
"public function run(){\n echo CHtml::closeTag($this->listTag);\n echo CHtml::closeTag($this->containerTag);\n }",
"public function buildListLayout(): void\n {\n $this->addColumn('name', 3)\n ->addColumn('pseudo', 3)\n ->addColumn('role_id', 3)\n ->addColumn('created_at', 3);\n }",
"public function GerarLista(){\n\t\t\t//$list= $ob -> ListarProdutosMaisBuscados();\n\t\t\t//$n = count($list);\n\t\t\t\n\t\t\t$ob = new produtoDAO;\n\t\t\t$m= $ob -> ListarProdutosMaisBuscados();\n\t\t\t$num = count($m);\n\t\t\t\t\t//$ob = new produtoDAO();\n\t\t\t\t\t//$m= $ob -> ListarProdutosMaisBuscados();\n\t\t\t\t\t//$n = count($m);\n\t\t\t\t\techo '<ul id=\"screen\">';\n\t\t\t\t\t//criando setinhas esquerda\n\t\t\t\t\techo '<li>';\n\t\t\t\t\techo '<a id=\"left\" class=\"seta\" href=\"#\"><<</a>';\n\t\t\t\t\techo '</li>';\n\t\t\t\t\techo '<li id=\"view\">';\n\t\t\t\t\techo '<ul id=\"images\">';\n\t\t\t\t\t//lista que tem as imagens\n\t\t\t\t\tfor($i=0;$i<$num;$i++){\n\t\t\t\t\t\t\t//$m[$i]['id_produto'];\n\t\t\t\t\t\t\t//abrindo a tela\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<li>';\n\t\t\t\t\t\t\techo '<div class=\"jq-ss-crop\" style=\"overflow: hidden; height: 300px; width: 212.5px;\">';\n\t\t\t\t\t\t\techo '<a target=\"_blank\" class=\"jq-ss-link\">'; \n\t\t\t\t\t\t\techo '<p class=\"preco\"> R$' . number_format($m[$i]['preco'], 2, ',', '.'). '</p>';\n\t\t\t\t\t\t\techo '<img src=\"miniaturas/'.$m[$i]['id_produto'].'\" class=\"imgMiniatura\"/>';\n\t\t\t\t\t\t\techo '<a class=\"nome\" href=\"paginas.php?acao=telaProd&id='.$m[$i]['id_produto'].'&nome='.$m[$i]['nome'].'\">' .$m[$i]['nome']. '</a>';\n\t\t\t\t\t\t\techo '</a>';\n\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\techo '</li>';\n\t\t\t\t\t\t}\n\t\t\t\t\t//fechando a tela\n\t\t\t\t\t//setinhas lado direito\n\n\t\t\t\t\techo '</ul>';\n\t\t\t\t\techo '</li>';\n\t\t\t\t\techo '<li>';\n\t\t\t\t\techo '<a id=\"right\" class=\"seta\" href=\"#\">>></a>';\n\t\t\t\t\techo '</li>';\n\t\t\t\t\techo '</ul>';\n\t\t}"
] | [
"0.7361656",
"0.7120589",
"0.6950768",
"0.6892926",
"0.68504846",
"0.6805155",
"0.6787533",
"0.677713",
"0.67704785",
"0.6716094",
"0.66842705",
"0.65790826",
"0.65501153",
"0.65442073",
"0.65290487",
"0.6510044",
"0.64838153",
"0.6439371",
"0.6426895",
"0.6418856",
"0.6362661",
"0.6340833",
"0.63079095",
"0.6294158",
"0.62837076",
"0.6263755",
"0.62563187",
"0.62551486",
"0.6246621",
"0.6217717",
"0.62165034",
"0.6215496",
"0.61830086",
"0.6172747",
"0.6165865",
"0.615231",
"0.6148432",
"0.6126824",
"0.61233896",
"0.6074334",
"0.6045429",
"0.60433996",
"0.60269046",
"0.6024102",
"0.60194975",
"0.6017849",
"0.6008731",
"0.5982196",
"0.5981442",
"0.597628",
"0.59487265",
"0.5945708",
"0.5930096",
"0.5920418",
"0.59074837",
"0.5903398",
"0.58887196",
"0.58884865",
"0.5882674",
"0.5874792",
"0.58723086",
"0.5867236",
"0.586338",
"0.5861971",
"0.58564985",
"0.58533436",
"0.58430016",
"0.5842206",
"0.5839013",
"0.58368915",
"0.583479",
"0.58323836",
"0.583051",
"0.5827249",
"0.58225715",
"0.5816978",
"0.58169013",
"0.5815731",
"0.5812975",
"0.5811445",
"0.58087945",
"0.580509",
"0.5793513",
"0.5789759",
"0.57839984",
"0.57834554",
"0.5781553",
"0.5781553",
"0.5781553",
"0.5765382",
"0.5762648",
"0.5750094",
"0.5740694",
"0.5738067",
"0.57379955",
"0.5733627",
"0.5728251",
"0.57262075",
"0.5721344",
"0.572005",
"0.5718733"
] | 0.0 | -1 |
Get information about author | function hc_get_the_author($gravatarSize = '', $field = ''){
global $post;
$username = get_user_by('id',$post->post_author);
$username = $username->user_login;
$args = array('single' => true, 'username' => $username, 'gravatarsize' => $gravatarSize);
if($field != '')
$args['fields'] = $field;
$users = hc_get_users($args);
if ( is_wp_error($users) ){
echo $users->get_error_message();
return false;
}
return $users;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAuthor();",
"public function getAuthor();",
"public function getAuthor();",
"public function getAuthor() {}",
"function GetAuthor()\n {\n return 'calguy1000';\n }",
"abstract public function getAuthor();",
"public function getAuthorname() {}",
"public function getAuthor(): string\n {\n return $this->_author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function author();",
"public function get_author() {\n\t\treturn $this->author();\n\t}",
"public function getAuthor() {\n return $this->author;\n }",
"public function getAuthor() {\n return $this->author;\n }",
"public function getAuthor() {\n return $this->author;\n }",
"function getAuthor() \n\t{\n\t\t$author = array();\n\t\tinclude_once \"./Services/MetaData/classes/class.ilMD.php\";\n\t\t$md =& new ilMD($this->getId(), 0, $this->getType());\n\t\t$md_life =& $md->getLifecycle();\n\t\tif ($md_life)\n\t\t{\n\t\t\t$ids =& $md_life->getContributeIds();\n\t\t\tforeach ($ids as $id)\n\t\t\t{\n\t\t\t\t$md_cont =& $md_life->getContribute($id);\n\t\t\t\tif (strcmp($md_cont->getRole(), \"Author\") == 0)\n\t\t\t\t{\n\t\t\t\t\t$entids =& $md_cont->getEntityIds();\n\t\t\t\t\tforeach ($entids as $entid)\n\t\t\t\t\t{\n\t\t\t\t\t\t$md_ent =& $md_cont->getEntity($entid);\n\t\t\t\t\t\tarray_push($author, $md_ent->getEntity());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn join($author, \",\");\n }",
"public function getAuthor() \r\n { \r\n return $this->_author; \r\n }",
"public function get_author()\n\t{\n\t\treturn '';\n\t}",
"public function getAuthor() {\n\t\treturn $this->author;\n\t}",
"public function get_author()\n {\n return 'Kamen Blaginov';\n }",
"public function get_author()\n {\n return 'Kamen Blaginov';\n }",
"public function api_getAuthorInfo($author_id = null) {\t\n\t\t$authors = $this->find('all', array(\n\t\t\t'conditions' => array('Author.author_id' => $author_id),\n\t\t\t'fields' => array('Author.document_id', 'Author.fullname'),\n\t\t\t// 'order' => array('Author.lastname' => 'asc'),\n\t\t\t// 'limit' => 3\n\t\t));\n\t\treturn $authors;\n\t}",
"public function getAuthor() {\n return $this->_author;\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"function get_author_info($author_id) {\n\n global $data_base;\n\n $request = $data_base->prepare(\"\n SELECT *\n FROM imago_info_creator \n WHERE creator_id = ? \n \");\n\n $request->execute(array($author_id));\n\n return $request->fetch(PDO::FETCH_ASSOC); \n }",
"public function author()\n {\n return optional($this->author);\n }",
"public function get_author_permastruct()\n {\n }",
"public function author() {\n\t\t\t\n\t\t\t$output = array();\n\n\t\t\t$author = $this->post->post_author;\n\t\t\t\n\t\t\t$output['id'] = $author;\n\t\t\t$output['nicename'] = get_the_author_meta('nickname', $author);\n\t\t\t$output['name'] = get_the_author_meta('user_firstname', $author).' '.get_the_author_meta('user_lastname', $author);\n\t\t\t$output['url'] = get_author_posts_url($author);\n\t\t\t$output['description'] = get_the_author_meta('description', $author);\n\t\t\t\n\t\t\treturn $output;\n\t\t}",
"public function get_authors();",
"function GetAuthor()\n {\n return 'texus';\n }",
"function get_the_author_aim()\n {\n }",
"public function author() : string\n {\n if (isset($this->entity->author)) {\n return $this->entity->author->name;\n }\n\n return 'Sin autor';\n }",
"public function getAuthor() {\n\t\treturn UserManager::getFromBlid($this->blid);\n\t}",
"public function getAuthorName()\n {\n return 'Fightmaster.publication.author.name';\n }",
"public function getAuthor() {\n\t\t\treturn $this->MODULE_AUTHOR;\n\t\t}",
"public function getAuthor() {\n return $this->randomQuote->author_name;\n }",
"public function getByAuthor()\n {\n return $this->by_author;\n }",
"private static function getAuthorInfo()\n {\n $curTimeStamp = time();\n $author = static::$appId . '-' . $curTimeStamp;\n $authorPwd = md5($curTimeStamp . static::$appSecret);\n\n return $author . ':' . $authorPwd;\n }",
"public function getBookAuthor()\n {\n return $this->author;\n }",
"public function getAuthorName() : void {\n\t\treturn $this->authorName;\n\t}",
"function get_the_author_yim()\n {\n }",
"public function getAuthorUsername()\n {\n return $this->AUTHOR_USERNAME;\n }",
"function get_the_author_description()\n {\n }",
"function GetAuthorEmail()\n {\n return '[email protected]';\n }",
"public function getAuthorID();",
"public function getAuthor()\n {\n return $this->author = get_userdata($this->get()->post_author);\n }",
"public function getAuthorInfo($name) {\n\t\tif (isset($this->authorInfo[$name])) return $this->authorInfo[$name];\n\t\treturn null;\n\t}",
"public function getAuthor($encoding = 'UTF-8') {}",
"function get_the_author_msn()\n {\n }",
"function author($id)\n{\n global $app;\n\n $details = $app->calibre->authorDetails($id);\n if (is_null($details)) {\n $app->getLog()->debug(\"no author\");\n $app->notFound();\n }\n $app->render('author_detail.html', [\n 'page' => mkPage(getMessageString('author_details'), 3, 2),\n 'author' => $details['author'],\n 'books' => $details['books']]);\n}",
"public function getAuthors();",
"function the_author() {\n\tglobal $discussion;\n\treturn $discussion['author'];\n}",
"public function author()\n {\n if ($this->user_id) {\n $field = config(\"binshopsblog.comments.user_field_for_author_name\",\"name\");\n return optional($this->user)->$field;\n }\n\n return $this->author_name;\n }",
"public function gettodoAuthor(): string {\n\t\treturn $this->todoAuthor;\n\t}",
"public function getAuthorcompany() {}",
"function get_the_author_nickname()\n {\n }",
"function get_author_name($auth_id = \\false)\n {\n }",
"function getDataAuthor($data)\n{\n\t$dataAuthor = getData($data, \"Page/Author\");\n\treturn $dataAuthor[0];\n}",
"public function getAuthorName()\n\t{\n\t\tif(is_null($this->_authorName)){\n\t\t\t$this->loadData();\n\t\t}\n\t\treturn $this->_authorName;\n\t}",
"public function getAuthorLabel()\n {\n return (string) $this->_theme->themeAuthor->authorLabel;\n }",
"private function get_article_author() {\n\n\t\tif ( ! $this->is_json_valid() )\n\t\t\treturn [];\n\n\t\tif ( ! $post = $this->get_current_post() ) {\n\t\t\t$this->invalidate( 'amp' );\n\t\t\treturn [];\n\t\t}\n\n\t\t$author = \\get_userdata( $post->post_author );\n\t\t$name = isset( $author->display_name ) ? $author->display_name : '';\n\n\t\tif ( ! $name ) {\n\t\t\t$this->invalidate( 'amp' );\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t'author' => [\n\t\t\t\t'@type' => 'Person',\n\t\t\t\t'name' => \\esc_attr( $name ),\n\t\t\t],\n\t\t];\n\t}",
"public function get_author_description() {\n\t\t\t$user = get_userdata( intval( $this->instance['user_id'] ) );\n\n\t\t\tif ( ! $user ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn sprintf(\n\t\t\t\t'<div class=\"about-author_description\">%s</div>',\n\t\t\t\twp_filter_post_kses( $user->description )\n\t\t\t);\n\t\t}",
"function showAuthor()\n {\n $this->out->elementStart('div', 'author');\n\n $this->out->elementStart('span', 'vcard author');\n\n $attrs = array('href' => $this->profile->profileurl,\n 'class' => 'url',\n 'title' => $this->profile->nickname);\n\n $this->out->elementStart('a', $attrs);\n $this->showAvatar();\n $this->out->text(' ');\n $user = common_current_user();\n if (!empty($user) && $user->streamNicknames()) {\n $this->out->element('span',array('class' => 'fn'),\n $this->profile->nickname);\n } else {\n $this->out->element('span',array('class' => 'fn'),\n $this->profile->getBestName());\n }\n $this->out->elementEnd('a');\n\n $this->out->elementEnd('span');\n\n $this->showAddressees();\n\n $this->out->elementEnd('div');\n }",
"public function get_author($key = 0)\n {\n }",
"public function meta_author_name()\n\t{\n\t\treturn $this->get_context_meta_value( __FUNCTION__ );\n\t}",
"public function get_author($key = 0)\n {\n }",
"public function authorDetails($id);",
"function getAuthor(){\n $author = $this->getResource('schema:author');\n if (empty($author)){\n $author = $this->getResource('schema:creator');\n }\n return $author;\n }",
"public function getAuthor() {\n $contributors = $this->product->getContributors();\n foreach ($contributors as $contributor) {\n if($contributor->getRole() == PONIpar\\ProductSubitem\\Contributor::ROLE_AUTHOR) {\n\n $value = $contributor->getValue();\n\n if(key_exists('PersonName',$value)) {\n return $value['PersonName'];\n }\n elseif(key_exists('PersonNameInverted',$value)) {\n $inverted = $value['PersonNameInverted'];\n $author = implode(' ',array_reverse(explode(', ',$inverted)));\n }\n\n // if the first author string is too long (might be a collections of authors), skip to the next\n if(strlen($author) < 100) return $author;\n else continue;\n\n }\n }\n // if we reach this that means we haven't found an author\n return null;\n }",
"public function Author()\n {\n return $this->rssField($this->authorField);\n }",
"function print_author_tag() {\n\t\t\n\t\techo \"<meta name='author' content='{$this->options->site_author}' />\\r\\n\";\n\t}",
"function hc_author_field($field , $gravatarSize = ''){\n\t\t$info = hc_get_author_field($field , $gravatarSize);\n\t\techo $info;\n\t}",
"public function getAuthors()\n {\n return $this->getValue('authors');\n }",
"private function getAuthor()\n {\n $tokenStorage = $this->getOption('token_storage');\n\n return $tokenStorage->getToken()->getUser();\n }",
"public function getAuthorId() : string\n {\n return $this->authorId;\n }",
"public function authorLink() { return $this->post->post_author; }",
"function get_the_modified_author()\n {\n }",
"public function getAuthorEmail(){\n return $this->AUTHOR_EMAIL;\n }",
"public function getAuthorId()\n {\n return $this->_authorId;\n }",
"function get_the_author_ID()\n {\n }",
"public function author(): ?string\n {\n return $this->author;\n }",
"function get_the_author_link()\n {\n }",
"function get_author_ID() {\n\t\treturn $this->get_data( 'user_id' );\n\t}",
"public function checkAuthor()\n {\n if ($this->author()) {\n return $this->author->name;\n }\n return 'N/A';\n }",
"function GetAuthorEmail()\n {\n return '[email protected]';\n }",
"public function getAuthor_id()\n {\n return $this->author_id;\n }",
"public function getIdAuthor()\n {\n return $this->id_author;\n }",
"public function getIdAuthor()\n {\n return $this->id_author;\n }",
"public function get_autor()\n {\n return $this->_autor;\n }",
"function get_the_author_firstname()\n {\n }"
] | [
"0.84662867",
"0.84662867",
"0.84662867",
"0.8375912",
"0.82269514",
"0.81720644",
"0.81317747",
"0.80669045",
"0.7971506",
"0.7971506",
"0.7971506",
"0.7971506",
"0.7971506",
"0.7971506",
"0.7971506",
"0.7971506",
"0.79615307",
"0.7946916",
"0.7900962",
"0.7900962",
"0.7900962",
"0.7847884",
"0.78471845",
"0.7843418",
"0.7819791",
"0.7792798",
"0.7792798",
"0.77908295",
"0.7711696",
"0.76787007",
"0.76787007",
"0.76787007",
"0.76787007",
"0.76787007",
"0.76787007",
"0.7678275",
"0.76441497",
"0.7617934",
"0.75937515",
"0.75865257",
"0.75845873",
"0.7583057",
"0.75767595",
"0.7573758",
"0.7547658",
"0.75265884",
"0.74917483",
"0.7476175",
"0.7473958",
"0.74706805",
"0.74352294",
"0.74196506",
"0.73980725",
"0.728637",
"0.72802556",
"0.72777766",
"0.7244632",
"0.7234758",
"0.72251636",
"0.72030693",
"0.7202006",
"0.72018576",
"0.72013056",
"0.71942586",
"0.71873343",
"0.71197265",
"0.7109287",
"0.7107966",
"0.70934093",
"0.708662",
"0.7083521",
"0.7064752",
"0.7062998",
"0.7051653",
"0.7050318",
"0.7048245",
"0.7048129",
"0.7046267",
"0.704609",
"0.7043618",
"0.70418537",
"0.70322454",
"0.70288545",
"0.7017956",
"0.70082176",
"0.70007914",
"0.7000065",
"0.6990979",
"0.6965357",
"0.69638383",
"0.6959377",
"0.69570845",
"0.69557214",
"0.695473",
"0.6951464",
"0.69504946",
"0.6914083",
"0.69137937",
"0.69137937",
"0.69034076",
"0.68941534"
] | 0.0 | -1 |
Dsiplay information about the author | function hc_the_author($gravatarSize = ''){
$info = hc_get_the_author($gravatarSize);
foreach ($info as $index => $author) {
if(file_exists(get_bloginfo('stylesheet_directory').'plugins/hypercontact/templates/author.php')){
include(get_bloginfo('stylesheet_directory').'plugins/hypercontact/templates/author.php');
}else{
include('templates/author.php');
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function GetAuthor()\n {\n return 'calguy1000';\n }",
"public function getAuthorname() {}",
"public function author();",
"public function getAuthor() {}",
"public function getAuthor();",
"public function getAuthor();",
"public function getAuthor();",
"function GetAuthor()\n {\n return 'texus';\n }",
"public function getAuthorName()\n {\n return 'Fightmaster.publication.author.name';\n }",
"abstract public function getAuthor();",
"public function get_author_permastruct()\n {\n }",
"public function get_author()\n\t{\n\t\treturn '';\n\t}",
"public function get_author()\n {\n return 'Kamen Blaginov';\n }",
"public function get_author()\n {\n return 'Kamen Blaginov';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function getAuthor(): string\n {\n return $this->_author;\n }",
"function print_author_tag() {\n\t\t\n\t\techo \"<meta name='author' content='{$this->options->site_author}' />\\r\\n\";\n\t}",
"function get_the_author_description()\n {\n }",
"function showAuthor()\n {\n $this->out->elementStart('div', 'author');\n\n $this->out->elementStart('span', 'vcard author');\n\n $attrs = array('href' => $this->profile->profileurl,\n 'class' => 'url',\n 'title' => $this->profile->nickname);\n\n $this->out->elementStart('a', $attrs);\n $this->showAvatar();\n $this->out->text(' ');\n $user = common_current_user();\n if (!empty($user) && $user->streamNicknames()) {\n $this->out->element('span',array('class' => 'fn'),\n $this->profile->nickname);\n } else {\n $this->out->element('span',array('class' => 'fn'),\n $this->profile->getBestName());\n }\n $this->out->elementEnd('a');\n\n $this->out->elementEnd('span');\n\n $this->showAddressees();\n\n $this->out->elementEnd('div');\n }",
"public function getAuthor() \r\n { \r\n return $this->_author; \r\n }",
"function get_the_author_aim()\n {\n }",
"function getAuthor() \n\t{\n\t\t$author = array();\n\t\tinclude_once \"./Services/MetaData/classes/class.ilMD.php\";\n\t\t$md =& new ilMD($this->getId(), 0, $this->getType());\n\t\t$md_life =& $md->getLifecycle();\n\t\tif ($md_life)\n\t\t{\n\t\t\t$ids =& $md_life->getContributeIds();\n\t\t\tforeach ($ids as $id)\n\t\t\t{\n\t\t\t\t$md_cont =& $md_life->getContribute($id);\n\t\t\t\tif (strcmp($md_cont->getRole(), \"Author\") == 0)\n\t\t\t\t{\n\t\t\t\t\t$entids =& $md_cont->getEntityIds();\n\t\t\t\t\tforeach ($entids as $entid)\n\t\t\t\t\t{\n\t\t\t\t\t\t$md_ent =& $md_cont->getEntity($entid);\n\t\t\t\t\t\tarray_push($author, $md_ent->getEntity());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn join($author, \",\");\n }",
"function the_author_description()\n {\n }",
"function get_the_author_yim()\n {\n }",
"private static function getAuthorInfo()\n {\n $curTimeStamp = time();\n $author = static::$appId . '-' . $curTimeStamp;\n $authorPwd = md5($curTimeStamp . static::$appSecret);\n\n return $author . ':' . $authorPwd;\n }",
"public function getAuthor() {\n\t\t\treturn $this->MODULE_AUTHOR;\n\t\t}",
"function get_the_author_msn()\n {\n }",
"public function author() : string\n {\n if (isset($this->entity->author)) {\n return $this->entity->author->name;\n }\n\n return 'Sin autor';\n }",
"public function author()\n {\n return optional($this->author);\n }",
"public function api_getAuthorInfo($author_id = null) {\t\n\t\t$authors = $this->find('all', array(\n\t\t\t'conditions' => array('Author.author_id' => $author_id),\n\t\t\t'fields' => array('Author.document_id', 'Author.fullname'),\n\t\t\t// 'order' => array('Author.lastname' => 'asc'),\n\t\t\t// 'limit' => 3\n\t\t));\n\t\treturn $authors;\n\t}",
"public function _getModuleAuthor()\n {\n return \"Daniel Dušek <[email protected]>\";\n }",
"function the_author_msn()\n {\n }",
"public function getAuthorName() : void {\n\t\treturn $this->authorName;\n\t}",
"function author($id)\n{\n global $app;\n\n $details = $app->calibre->authorDetails($id);\n if (is_null($details)) {\n $app->getLog()->debug(\"no author\");\n $app->notFound();\n }\n $app->render('author_detail.html', [\n 'page' => mkPage(getMessageString('author_details'), 3, 2),\n 'author' => $details['author'],\n 'books' => $details['books']]);\n}",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public static function author(){ //Here author can not be override bcz its a final method\n return \"My name is \".self::$name.\" Sen\";\n }",
"function get_author_name($auth_id = \\false)\n {\n }",
"public function getAuthorID();",
"function the_author_yim()\n {\n }",
"function get_author_info($author_id) {\n\n global $data_base;\n\n $request = $data_base->prepare(\"\n SELECT *\n FROM imago_info_creator \n WHERE creator_id = ? \n \");\n\n $request->execute(array($author_id));\n\n return $request->fetch(PDO::FETCH_ASSOC); \n }",
"function the_author() {\n\tglobal $discussion;\n\treturn $discussion['author'];\n}",
"public function get_author_description() {\n\t\t\t$user = get_userdata( intval( $this->instance['user_id'] ) );\n\n\t\t\tif ( ! $user ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn sprintf(\n\t\t\t\t'<div class=\"about-author_description\">%s</div>',\n\t\t\t\twp_filter_post_kses( $user->description )\n\t\t\t);\n\t\t}",
"public function getAuthor() {\n return $this->author;\n }",
"public function getAuthor() {\n return $this->author;\n }",
"public function getAuthor() {\n return $this->author;\n }",
"function the_author_aim()\n {\n }",
"function the_author_nickname()\n {\n }",
"function hc_author_field($field , $gravatarSize = ''){\n\t\t$info = hc_get_author_field($field , $gravatarSize);\n\t\techo $info;\n\t}",
"public function getAuthor() {\n return $this->randomQuote->author_name;\n }",
"function GetAuthorEmail()\n {\n return '[email protected]';\n }",
"function get_the_author_nickname()\n {\n }",
"public function getAuthor() {\n\t\treturn $this->author;\n\t}",
"public function get_author() {\n\t\treturn $this->author();\n\t}",
"public function author() {\n\t\t\t\n\t\t\t$output = array();\n\n\t\t\t$author = $this->post->post_author;\n\t\t\t\n\t\t\t$output['id'] = $author;\n\t\t\t$output['nicename'] = get_the_author_meta('nickname', $author);\n\t\t\t$output['name'] = get_the_author_meta('user_firstname', $author).' '.get_the_author_meta('user_lastname', $author);\n\t\t\t$output['url'] = get_author_posts_url($author);\n\t\t\t$output['description'] = get_the_author_meta('description', $author);\n\t\t\t\n\t\t\treturn $output;\n\t\t}",
"public function getAuthorLabel()\n {\n return (string) $this->_theme->themeAuthor->authorLabel;\n }",
"function devlySimpleAuthor() { \n\n\t$authID = get_the_author_meta('ID'); \n\t$size\t= '78';\n\t\n\t?>\n\n\t<div id=\"authorBioContainer\">\n\t\t\n\t\t<div class=\"gravatar\"><?php echo get_avatar($authID, $size); ?></div>\n\t\t\n\t\t<div class=\"aboutAuthor\">\n\t\t\t<h3 class=\"authorName\"><?php the_author(); ?></h3>\n\t\t\t<p><?php echo get_the_author_meta('description') ?></p>\n\t\t</div>\n\t\t\n\t</div>\n\t\n\t<?php\n\n}",
"function material_design_theme_posted_by() {\n\t\t$byline = '<span class=\"author vcard\">' . get_avatar( get_the_author_meta( 'ID' ), 36 ) . '<a class=\"url fn n mdc-typography--caption\" href=\"' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '\">' . esc_html( get_the_author() ) . '</a></span>';\n\n\t\techo '<div class=\"byline\"> ' . $byline . '</div>'; // phpcs:ignore\n\n\t}",
"public function gettodoAuthor(): string {\n\t\treturn $this->todoAuthor;\n\t}",
"public function checkAuthor()\n {\n if ($this->author()) {\n return $this->author->name;\n }\n return 'N/A';\n }",
"public function getAuthorUsername()\n {\n return $this->AUTHOR_USERNAME;\n }",
"public function getAuthor() {\n return $this->_author;\n }",
"public function authorLink() { return $this->post->post_author; }",
"public function authorDetails($id);",
"function newsdot_posted_by() {\n\t\tif ( get_theme_mod( 'newsdot_show_post_author', true ) ) :\n\t\t\t?>\n\t\t\t<span class=\"byline\">\n\t\t\t\t<i class=\"far fa-user-circle\"></i>\n\t\t\t\t<span class=\"author vcard\"><a class=\"url fn n\" href=\"<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>\"><?php echo esc_html( get_the_author() ); ?></a></span>\n\t\t\t</span>\n\t\t\t<?php\n\t\tendif;\n\t}",
"protected function author()\n {\n if ($this->presenter->wasByCurrentUser() || !$this->wrappedObject->user_id) {\n return 'You ';\n }\n\n if (!$this->wrappedObject->security) {\n return 'This user ';\n }\n\n return $this->presenter->author().' ';\n }",
"public function Author()\n {\n return $this->rssField($this->authorField);\n }",
"function rdf_author_contents( $my_post, $indent ) {\n $tag = \"role:AUT\";\n rdf_open_tag( $tag, $indent );\n $arr = preg_split( \"/,/\", $my_post->post_title );\n $fullname_arr = preg_split( \"/ /\", $arr[ 0 ] );\n $lastname = $fullname_arr[ count( $fullname_arr ) - 1 ];\n $restofname = join( \" \", array_slice( $fullname_arr, 0, -1, true ) );\n $author = $lastname . \", \" . $restofname;\n echo $author;\n rdf_close_tag( $tag, 0 );\n}",
"function the_author_firstname()\n {\n }",
"function GetAuthorEmail()\n {\n return '[email protected]';\n }",
"function get_the_author_ID()\n {\n }",
"public function get_authors();",
"public function author()\n {\n if ($this->user_id) {\n $field = config(\"binshopsblog.comments.user_field_for_author_name\",\"name\");\n return optional($this->user)->$field;\n }\n\n return $this->author_name;\n }",
"function the_author($deprecated = '', $deprecated_echo = \\true)\n {\n }",
"function get_the_modified_author()\n {\n }",
"public function getAuthorId() : string\n {\n return $this->authorId;\n }",
"public function meta_author_name()\n\t{\n\t\treturn $this->get_context_meta_value( __FUNCTION__ );\n\t}",
"public function getAuthor($encoding = 'UTF-8') {}",
"public function show(Author $author)\n {\n //\n }",
"public function getAuthor() {\n\t\treturn UserManager::getFromBlid($this->blid);\n\t}",
"function get_the_author_firstname()\n {\n }",
"function the_author_ID()\n {\n }",
"public function getHeaderText() \n {\n\tif ($this->_coreRegistry->registry('simpleblog_author')->getId()) \n\t{\n\t\t return __(\"Edit Author '%1'\", $this->escapeHtml($this->_coreRegistry->registry('simpleblog_author')->getTitle()));\n\t} else { return __('New Author'); }\n\t\n }",
"function pixelgrade_the_author_info_box() {\n\tif ( pixelgrade_user_has_access( 'pro-features' ) ) {\n\t\techo pixelgrade_get_the_author_info_box(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t}\n}",
"public function getAuthorName()\n\t{\n\t\tif(is_null($this->_authorName)){\n\t\t\t$this->loadData();\n\t\t}\n\t\treturn $this->_authorName;\n\t}",
"public function getBookAuthor()\n {\n return $this->author;\n }",
"protected function getBio()\n\t{\n\t\treturn apply_filters('the_author_description', $this->rawDescription, $this->id);\n\t}",
"function render_block_core_comment_author_name($attributes, $content, $block)\n {\n }",
"public function authors_tab_content() {\n\t\techo '<h2>Authors</h2>';\n\t\t$content = get_post_meta( get_the_ID(), 'authordesc', true );\n\t\t$content = htmlspecialchars_decode( $content );\n\t\t$content = wpautop( $content );\n\t\techo $content;\n\t}",
"function get_the_author_link()\n {\n }"
] | [
"0.79558855",
"0.7904509",
"0.77215576",
"0.764562",
"0.7542337",
"0.7542337",
"0.7542337",
"0.74981505",
"0.7492772",
"0.74481726",
"0.74422085",
"0.7435193",
"0.73829925",
"0.73829925",
"0.7333721",
"0.7333721",
"0.7333721",
"0.7333721",
"0.7333721",
"0.7333721",
"0.727595",
"0.7258355",
"0.72096246",
"0.7186075",
"0.71631217",
"0.7093795",
"0.7087708",
"0.7029362",
"0.7026885",
"0.7006966",
"0.69554496",
"0.69546807",
"0.69516283",
"0.69514686",
"0.6931277",
"0.69060946",
"0.6896636",
"0.6881034",
"0.68750703",
"0.68233323",
"0.68233323",
"0.68233323",
"0.68233323",
"0.68233323",
"0.68233323",
"0.68233323",
"0.68233323",
"0.68187225",
"0.6796936",
"0.67924845",
"0.67772734",
"0.6775294",
"0.6773999",
"0.6765138",
"0.67494226",
"0.67494226",
"0.67494226",
"0.67475283",
"0.67462415",
"0.67289317",
"0.67279065",
"0.67264485",
"0.6712389",
"0.67069983",
"0.6706211",
"0.670569",
"0.6683841",
"0.6657792",
"0.66288596",
"0.6620331",
"0.6619284",
"0.66164446",
"0.66163516",
"0.6584249",
"0.6582808",
"0.6563077",
"0.6534905",
"0.6532246",
"0.650794",
"0.6506873",
"0.64913744",
"0.6487412",
"0.6487024",
"0.6468323",
"0.64643097",
"0.6459953",
"0.64500606",
"0.6443204",
"0.64313316",
"0.64298666",
"0.6428107",
"0.64201",
"0.6412899",
"0.64098406",
"0.6407579",
"0.6405341",
"0.6391124",
"0.63882077",
"0.6385055",
"0.6382782",
"0.6377657"
] | 0.0 | -1 |
return field from the author | function hc_get_author_field($field , $gravatarSize = ''){
$info = hc_get_the_author($gravatarSize, $field);
$author = $info[0];
$field = $author->$field;
return $field;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAuthor() {}",
"public function getAuthor();",
"public function getAuthor();",
"public function getAuthor();",
"public function getAuthor() \r\n { \r\n return $this->_author; \r\n }",
"public function getAuthor(): string\n {\n return $this->_author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthorname() {}",
"abstract public function getAuthor();",
"function hc_author_field($field , $gravatarSize = ''){\n\t\t$info = hc_get_author_field($field , $gravatarSize);\n\t\techo $info;\n\t}",
"public function getAuthor() {\n return $this->author;\n }",
"public function getAuthor() {\n return $this->author;\n }",
"public function getAuthor() {\n return $this->author;\n }",
"public function getAuthor() {\n\t\treturn $this->author;\n\t}",
"function nb_get_author_name( $object, $field_name, $request ) {\n return get_the_author_meta( 'display_name', $object['author'] );\n}",
"public function get_author() {\n\t\treturn $this->author();\n\t}",
"function get_the_author_meta($field = '', $user_id = \\false)\n {\n }",
"function GetAuthor()\n {\n return 'calguy1000';\n }",
"public function author()\n {\n return optional($this->author);\n }",
"public function getAuthor() {\n return $this->_author;\n }",
"public function getAuthor()\n {\n return $this->author = get_userdata($this->get()->post_author);\n }",
"public function getAuthorID();",
"public function author()\n {\n if ($this->user_id) {\n $field = config(\"binshopsblog.comments.user_field_for_author_name\",\"name\");\n return optional($this->user)->$field;\n }\n\n return $this->author_name;\n }",
"public function getByAuthor()\n {\n return $this->by_author;\n }",
"public function getAuthor() {\n return $this->randomQuote->author_name;\n }",
"function get_the_author_aim()\n {\n }",
"function the_author() {\n\tglobal $discussion;\n\treturn $discussion['author'];\n}",
"public function Author()\n {\n return $this->rssField($this->authorField);\n }",
"function getAuthor() \n\t{\n\t\t$author = array();\n\t\tinclude_once \"./Services/MetaData/classes/class.ilMD.php\";\n\t\t$md =& new ilMD($this->getId(), 0, $this->getType());\n\t\t$md_life =& $md->getLifecycle();\n\t\tif ($md_life)\n\t\t{\n\t\t\t$ids =& $md_life->getContributeIds();\n\t\t\tforeach ($ids as $id)\n\t\t\t{\n\t\t\t\t$md_cont =& $md_life->getContribute($id);\n\t\t\t\tif (strcmp($md_cont->getRole(), \"Author\") == 0)\n\t\t\t\t{\n\t\t\t\t\t$entids =& $md_cont->getEntityIds();\n\t\t\t\t\tforeach ($entids as $entid)\n\t\t\t\t\t{\n\t\t\t\t\t\t$md_ent =& $md_cont->getEntity($entid);\n\t\t\t\t\t\tarray_push($author, $md_ent->getEntity());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn join($author, \",\");\n }",
"public function getBookAuthor()\n {\n return $this->author;\n }",
"function get_the_author_firstname()\n {\n }",
"public function author();",
"public function getAuthor() {\n\t\treturn UserManager::getFromBlid($this->blid);\n\t}",
"public function author() : string\n {\n if (isset($this->entity->author)) {\n return $this->entity->author->name;\n }\n\n return 'Sin autor';\n }",
"public function get_author()\n {\n return 'Kamen Blaginov';\n }",
"public function get_author()\n {\n return 'Kamen Blaginov';\n }",
"public function get_author_permastruct()\n {\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function getAuthor() {\n\t\t\treturn $this->MODULE_AUTHOR;\n\t\t}",
"function get_the_modified_author()\n {\n }",
"public function get_author()\n\t{\n\t\treturn '';\n\t}",
"public function gettodoAuthor(): string {\n\t\treturn $this->todoAuthor;\n\t}",
"public function authorId() { return $this->post->post_author; }",
"function the_author_meta($field = '', $user_id = \\false)\n {\n }",
"function get_the_author_ID()\n {\n }",
"function get_the_author_lastname()\n {\n }",
"function get_author_ID() {\n\t\treturn $this->get_data( 'user_id' );\n\t}",
"public function getAuthor_id()\n {\n return $this->author_id;\n }",
"public function getAuthorName() : void {\n\t\treturn $this->authorName;\n\t}",
"public function meta_author_name()\n\t{\n\t\treturn $this->get_context_meta_value( __FUNCTION__ );\n\t}",
"public function getAuthorName()\n {\n return 'Fightmaster.publication.author.name';\n }",
"public function authorLink() { return $this->post->post_author; }",
"public function get_autor()\n {\n return $this->_autor;\n }",
"function emc_get_the_author( $post_id ) {\r\n\r\n\tif ( ! class_exists( 'Acf', false ) ) return false;\r\n\r\n\t$author = get_post_meta( $post_id, 'byline', true );\r\n\r\n\tif ( isset( $author ) && ! empty( $author ) ) {\r\n\r\n\t\t$html = sprintf( __( ' by %s', 'emc' ),\r\n\t\t\tesc_html( $author )\r\n\t\t);\r\n\t\treturn $html;\r\n\r\n\t}\r\n\r\n\treturn false;\r\n\r\n}",
"function GetAuthor()\n {\n return 'texus';\n }",
"function getAuthor(){\n $author = $this->getResource('schema:author');\n if (empty($author)){\n $author = $this->getResource('schema:creator');\n }\n return $author;\n }",
"public function getUserfield();",
"function get_the_author_login()\n {\n }",
"public function author(): ?string\n {\n return $this->author;\n }",
"function get_the_author_nickname()\n {\n }",
"public function getAuthorId() : string\n {\n return $this->authorId;\n }",
"public function getIdAuthor()\n {\n return $this->id_author;\n }",
"public function getIdAuthor()\n {\n return $this->id_author;\n }",
"public function getAuthorUsername()\n {\n return $this->AUTHOR_USERNAME;\n }",
"function get_author_name($auth_id = \\false)\n {\n }",
"function getDataAuthor($data)\n{\n\t$dataAuthor = getData($data, \"Page/Author\");\n\treturn $dataAuthor[0];\n}",
"function the_author_firstname()\n {\n }",
"public function fetchField();",
"function getLastchangeAuthor() {\n\t\treturn $this->get(\"lastchangeauthor\");\n\t}",
"function reply_author() {\n\tglobal $reply;\n\treturn $reply['author'];\n}",
"public function getAuthor() {\n $contributors = $this->product->getContributors();\n foreach ($contributors as $contributor) {\n if($contributor->getRole() == PONIpar\\ProductSubitem\\Contributor::ROLE_AUTHOR) {\n\n $value = $contributor->getValue();\n\n if(key_exists('PersonName',$value)) {\n return $value['PersonName'];\n }\n elseif(key_exists('PersonNameInverted',$value)) {\n $inverted = $value['PersonNameInverted'];\n $author = implode(' ',array_reverse(explode(', ',$inverted)));\n }\n\n // if the first author string is too long (might be a collections of authors), skip to the next\n if(strlen($author) < 100) return $author;\n else continue;\n\n }\n }\n // if we reach this that means we haven't found an author\n return null;\n }",
"public function getAuthorId()\n {\n return $this->_authorId;\n }",
"function get_the_author_yim()\n {\n }",
"public function getAuthorEmail(){\n return $this->AUTHOR_EMAIL;\n }",
"public function get_field(/* .... */)\n {\n return $this->_field;\n }",
"function rs_author($post)\n{\n wp_nonce_field('rs_meta_box', 'rs_meta_box_nonce');\n $value = get_post_meta($post->ID, '_author', true);\n echo '<label for=\"rs_author\" class=\"screen-reader-text\">Autor</label> <input type=\"text\" name=\"rs_author\" id=\"rs_author\" value=\"' . $value . '\">';\n}",
"function the_author_ID()\n {\n }",
"public function getAuthorName()\n {\n return $this->author ? $this->author : $this->createUser->firstname . ' ' . $this->createUser->lastname;\n }",
"public function getAuthorId() {\n\t\treturn $this->authorId;\n\t}",
"public function getAuthor($realValue = false) {\n\t\treturn ($realValue) ? $this->author : UsersManagement::getUserName($this->author);\n\t}",
"public function getAuthor($encoding = 'UTF-8') {}",
"public function getAuthorLabel()\n {\n return (string) $this->_theme->themeAuthor->authorLabel;\n }",
"private function getAuthor()\n {\n $tokenStorage = $this->getOption('token_storage');\n\n return $tokenStorage->getToken()->getUser();\n }",
"public function author()\n\t{\n\t\treturn $this->belongs_to('User', 'uid');\n\t}",
"public function getAuthorcompany() {}",
"public function getAuthorName()\n\t{\n\t\tif(is_null($this->_authorName)){\n\t\t\t$this->loadData();\n\t\t}\n\t\treturn $this->_authorName;\n\t}",
"function get_the_author_email()\n {\n }",
"protected function getFirstAuthor() {\r\n\t\treturn $this->authors[0];\r\n\t}"
] | [
"0.7781827",
"0.77806413",
"0.77806413",
"0.77806413",
"0.7651809",
"0.7600425",
"0.75850916",
"0.75850916",
"0.75850916",
"0.75850916",
"0.75850916",
"0.75850916",
"0.75850916",
"0.75850916",
"0.7561902",
"0.75602776",
"0.75276774",
"0.7515637",
"0.7515637",
"0.7515637",
"0.74920243",
"0.7438321",
"0.74202955",
"0.73782516",
"0.7330071",
"0.73298764",
"0.7278764",
"0.7251384",
"0.722304",
"0.72226983",
"0.72050625",
"0.7187004",
"0.7177426",
"0.71614164",
"0.71004796",
"0.7096366",
"0.7074252",
"0.7073567",
"0.7069307",
"0.70604455",
"0.7050388",
"0.70242983",
"0.70242983",
"0.6974623",
"0.6965587",
"0.6965587",
"0.6965587",
"0.6965587",
"0.6965587",
"0.6965587",
"0.69545454",
"0.69500846",
"0.6948554",
"0.6939455",
"0.69101715",
"0.6878137",
"0.68619514",
"0.6861098",
"0.68515605",
"0.68509597",
"0.68437636",
"0.68397397",
"0.68214446",
"0.68127805",
"0.68042386",
"0.6800211",
"0.6786277",
"0.67841434",
"0.67742753",
"0.67563105",
"0.6755032",
"0.67487407",
"0.67487204",
"0.6719033",
"0.6719033",
"0.67152286",
"0.6711066",
"0.67022395",
"0.67014897",
"0.6697023",
"0.6696325",
"0.66849315",
"0.66597134",
"0.6654981",
"0.6640363",
"0.6627",
"0.66216916",
"0.6589338",
"0.6567508",
"0.6536138",
"0.6521431",
"0.65187275",
"0.65175074",
"0.6509907",
"0.65041405",
"0.6496391",
"0.6495233",
"0.64904875",
"0.6485625",
"0.6485492"
] | 0.8280632 | 0 |
display field from the author | function hc_author_field($field , $gravatarSize = ''){
$info = hc_get_author_field($field , $gravatarSize);
echo $info;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAuthorname() {}",
"public function getAuthor() {}",
"public function getAuthor();",
"public function getAuthor();",
"public function getAuthor();",
"public function get_author()\n\t{\n\t\treturn '';\n\t}",
"function hc_get_author_field($field , $gravatarSize = ''){\n\t\t$info = hc_get_the_author($gravatarSize, $field);\n\t\t$author = $info[0];\n\t\t$field = $author->$field;\n\t\treturn $field;\n\t}",
"function nb_get_author_name( $object, $field_name, $request ) {\n return get_the_author_meta( 'display_name', $object['author'] );\n}",
"public function get_author()\n {\n return 'Kamen Blaginov';\n }",
"public function get_author()\n {\n return 'Kamen Blaginov';\n }",
"public function getAuthor() \r\n { \r\n return $this->_author; \r\n }",
"function GetAuthor()\n {\n return 'calguy1000';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function get_author()\n {\n return 'Chris Graham';\n }",
"public function author();",
"public function get_author_permastruct()\n {\n }",
"public function getAuthorName()\n {\n return 'Fightmaster.publication.author.name';\n }",
"function print_author_tag() {\n\t\t\n\t\techo \"<meta name='author' content='{$this->options->site_author}' />\\r\\n\";\n\t}",
"public function getAuthor(): string\n {\n return $this->_author;\n }",
"public function authors_tab_content() {\n\t\techo '<h2>Authors</h2>';\n\t\t$content = get_post_meta( get_the_ID(), 'authordesc', true );\n\t\t$content = htmlspecialchars_decode( $content );\n\t\t$content = wpautop( $content );\n\t\techo $content;\n\t}",
"public function author() : string\n {\n if (isset($this->entity->author)) {\n return $this->entity->author->name;\n }\n\n return 'Sin autor';\n }",
"function get_the_author_aim()\n {\n }",
"function get_the_author_description()\n {\n }",
"abstract public function getAuthor();",
"public function getAuthorLabel()\n {\n return (string) $this->_theme->themeAuthor->authorLabel;\n }",
"function showAuthor()\n {\n $this->out->elementStart('div', 'author');\n\n $this->out->elementStart('span', 'vcard author');\n\n $attrs = array('href' => $this->profile->profileurl,\n 'class' => 'url',\n 'title' => $this->profile->nickname);\n\n $this->out->elementStart('a', $attrs);\n $this->showAvatar();\n $this->out->text(' ');\n $user = common_current_user();\n if (!empty($user) && $user->streamNicknames()) {\n $this->out->element('span',array('class' => 'fn'),\n $this->profile->nickname);\n } else {\n $this->out->element('span',array('class' => 'fn'),\n $this->profile->getBestName());\n }\n $this->out->elementEnd('a');\n\n $this->out->elementEnd('span');\n\n $this->showAddressees();\n\n $this->out->elementEnd('div');\n }",
"public function authorLink() { return $this->post->post_author; }",
"function get_author_link($display, $author_id, $author_nicename = '')\n {\n }",
"public function Author()\n {\n return $this->rssField($this->authorField);\n }",
"function the_author_description()\n {\n }",
"public function getHeaderText() \n {\n\tif ($this->_coreRegistry->registry('simpleblog_author')->getId()) \n\t{\n\t\t return __(\"Edit Author '%1'\", $this->escapeHtml($this->_coreRegistry->registry('simpleblog_author')->getTitle()));\n\t} else { return __('New Author'); }\n\t\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function getAuthor()\n {\n return $this->author;\n }",
"public function author()\n {\n $this->renderView('author.twig',['articleList' => $this->articleList]);\n }",
"protected function author()\n {\n if ($this->presenter->wasByCurrentUser() || !$this->wrappedObject->user_id) {\n return 'You ';\n }\n\n if (!$this->wrappedObject->security) {\n return 'This user ';\n }\n\n return $this->presenter->author().' ';\n }",
"public function author()\n {\n if ($this->user_id) {\n $field = config(\"binshopsblog.comments.user_field_for_author_name\",\"name\");\n return optional($this->user)->$field;\n }\n\n return $this->author_name;\n }",
"public function getAuthor() {\n return $this->author;\n }",
"public function getAuthor() {\n return $this->author;\n }",
"public function getAuthor() {\n return $this->author;\n }",
"function devlySimpleAuthor() { \n\n\t$authID = get_the_author_meta('ID'); \n\t$size\t= '78';\n\t\n\t?>\n\n\t<div id=\"authorBioContainer\">\n\t\t\n\t\t<div class=\"gravatar\"><?php echo get_avatar($authID, $size); ?></div>\n\t\t\n\t\t<div class=\"aboutAuthor\">\n\t\t\t<h3 class=\"authorName\"><?php the_author(); ?></h3>\n\t\t\t<p><?php echo get_the_author_meta('description') ?></p>\n\t\t</div>\n\t\t\n\t</div>\n\t\n\t<?php\n\n}",
"function GetAuthor()\n {\n return 'texus';\n }",
"function the_author_firstname()\n {\n }",
"function get_the_author_nickname()\n {\n }",
"function get_the_author_firstname()\n {\n }",
"public function getAuthor() {\n\t\treturn $this->author;\n\t}",
"function material_design_theme_posted_by() {\n\t\t$byline = '<span class=\"author vcard\">' . get_avatar( get_the_author_meta( 'ID' ), 36 ) . '<a class=\"url fn n mdc-typography--caption\" href=\"' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '\">' . esc_html( get_the_author() ) . '</a></span>';\n\n\t\techo '<div class=\"byline\"> ' . $byline . '</div>'; // phpcs:ignore\n\n\t}",
"public function show(Author $author)\n {\n //\n }",
"public function get_author_description() {\n\t\t\t$user = get_userdata( intval( $this->instance['user_id'] ) );\n\n\t\t\tif ( ! $user ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn sprintf(\n\t\t\t\t'<div class=\"about-author_description\">%s</div>',\n\t\t\t\twp_filter_post_kses( $user->description )\n\t\t\t);\n\t\t}",
"function emc_get_the_author( $post_id ) {\r\n\r\n\tif ( ! class_exists( 'Acf', false ) ) return false;\r\n\r\n\t$author = get_post_meta( $post_id, 'byline', true );\r\n\r\n\tif ( isset( $author ) && ! empty( $author ) ) {\r\n\r\n\t\t$html = sprintf( __( ' by %s', 'emc' ),\r\n\t\t\tesc_html( $author )\r\n\t\t);\r\n\t\treturn $html;\r\n\r\n\t}\r\n\r\n\treturn false;\r\n\r\n}",
"function the_author_nickname()\n {\n }",
"function newsdot_posted_by() {\n\t\tif ( get_theme_mod( 'newsdot_show_post_author', true ) ) :\n\t\t\t?>\n\t\t\t<span class=\"byline\">\n\t\t\t\t<i class=\"far fa-user-circle\"></i>\n\t\t\t\t<span class=\"author vcard\"><a class=\"url fn n\" href=\"<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>\"><?php echo esc_html( get_the_author() ); ?></a></span>\n\t\t\t</span>\n\t\t\t<?php\n\t\tendif;\n\t}",
"function column_author( $item ) {\r\n\t\t$user = get_user_by( 'id', $item->post_author );\r\n\r\n\t\tif ( isset( $user->data->display_name ) ) {\r\n\t\t\treturn sprintf( '<a href=\"%s\" title=\"' . __( 'Filter by', 'media-library-assistant' ) . ' ' . __( 'Author', 'media-library-assistant' ) . '\">%s</a>', esc_url( add_query_arg( array_merge( array(\r\n\t\t\t\t 'page' => MLACore::ADMIN_PAGE_SLUG,\r\n\t\t\t\t'author' => $item->post_author,\r\n\t\t\t\t'heading_suffix' => urlencode( __( 'Author', 'media-library-assistant' ) . ': ' . $user->data->display_name ) \r\n\t\t\t), self::mla_submenu_arguments( false ) ), 'upload.php' ) ), esc_html( $user->data->display_name ) );\r\n\t\t}\r\n\r\n\t\treturn 'unknown';\r\n\t}",
"function rs_author($post)\n{\n wp_nonce_field('rs_meta_box', 'rs_meta_box_nonce');\n $value = get_post_meta($post->ID, '_author', true);\n echo '<label for=\"rs_author\" class=\"screen-reader-text\">Autor</label> <input type=\"text\" name=\"rs_author\" id=\"rs_author\" value=\"' . $value . '\">';\n}",
"public function author()\n {\n return optional($this->author);\n }",
"public function getAuthor() {\n return $this->randomQuote->author_name;\n }",
"public function getAuthorName() : void {\n\t\treturn $this->authorName;\n\t}",
"public function get_author() {\n\t\treturn $this->author();\n\t}",
"public function getAuthor() {\n\t\t\treturn $this->MODULE_AUTHOR;\n\t\t}",
"function rtheme_get_author() {\n $byline = sprintf(\n esc_html_x( ' by %s', 'post author', 'rtheme' ),\n '<span class=\"author vcard\"><a href=\" ' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . ' \">' . esc_html( get_the_author() ) . '</a></span>'\n );\n echo '<span class=\"\">' . $byline . '</span>';\n}",
"function caldol_modify_author_display_name($author_name, $reply_id){\n\t$author_name = $author_name . \"\";\nreturn $author_name;\n\n}",
"function the_author() {\n\tglobal $discussion;\n\treturn $discussion['author'];\n}",
"public function getAuthorID();",
"function the_author_lastname()\n {\n }",
"function get_the_author_lastname()\n {\n }",
"function get_author_name($auth_id = \\false)\n {\n }",
"public function getAuthor() {\n return $this->_author;\n }",
"public function meta_author_name()\n\t{\n\t\treturn $this->get_context_meta_value( __FUNCTION__ );\n\t}",
"function the_author_aim()\n {\n }",
"function pantomime_author_box(){\n\tif ( is_single() ) :\n\t// Get the author email -> for Gravatar\n\t$author_email = get_the_author_meta('user_email');\n\t\t\n\t// Get the author description\n\t$author_description = get_the_author_meta('description');\t\n\t?>\n\n\t<div id=\"author-box\" class=\"emboss\">\n\t\t<h4 class=\"section-title\"><?php _e('About The Author', 'pantomime'); ?></h4>\n\t\t<?php\n\t\t\techo get_avatar($author_email, 50, '');\n\t\t\techo '<p>' . get_the_author_link() . ' - ' . $author_description . '</p>';\n\t\t?>\n\t</div>\n\t\n\t<?php\n\tendif;\n}",
"function author($id)\n{\n global $app;\n\n $details = $app->calibre->authorDetails($id);\n if (is_null($details)) {\n $app->getLog()->debug(\"no author\");\n $app->notFound();\n }\n $app->render('author_detail.html', [\n 'page' => mkPage(getMessageString('author_details'), 3, 2),\n 'author' => $details['author'],\n 'books' => $details['books']]);\n}",
"function pixelgrade_the_author_info_box() {\n\tif ( pixelgrade_user_has_access( 'pro-features' ) ) {\n\t\techo pixelgrade_get_the_author_info_box(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t}\n}",
"function getAuthor() \n\t{\n\t\t$author = array();\n\t\tinclude_once \"./Services/MetaData/classes/class.ilMD.php\";\n\t\t$md =& new ilMD($this->getId(), 0, $this->getType());\n\t\t$md_life =& $md->getLifecycle();\n\t\tif ($md_life)\n\t\t{\n\t\t\t$ids =& $md_life->getContributeIds();\n\t\t\tforeach ($ids as $id)\n\t\t\t{\n\t\t\t\t$md_cont =& $md_life->getContribute($id);\n\t\t\t\tif (strcmp($md_cont->getRole(), \"Author\") == 0)\n\t\t\t\t{\n\t\t\t\t\t$entids =& $md_cont->getEntityIds();\n\t\t\t\t\tforeach ($entids as $entid)\n\t\t\t\t\t{\n\t\t\t\t\t\t$md_ent =& $md_cont->getEntity($entid);\n\t\t\t\t\t\tarray_push($author, $md_ent->getEntity());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn join($author, \",\");\n }",
"function childtheme_override_author_loop() {\r\n\tglobal $post;\r\n\r\n\t$author = get_queried_object();\r\n\r\n\t$user = get_user_by('id',$author->ID);\r\n\t$userid = 'user_'.$user->ID;\r\n\r\n\t$authortitle = get_field('author-title', $userid);\r\n\r\n\techo '<article class=\"detail\">'.\"\\n\";\r\n\r\n\techo '<h2>'.$user->first_name.' '.$user->last_name.', '.$authortitle.'</h2>'.\"\\n\";\r\n\r\n\techo wpautop($user->description);\r\n\r\n\techo '</article><!-- .detail -->'.\"\\n\";\r\n}",
"function get_the_author_link()\n {\n }",
"function render_block_core_post_author_name($attributes, $content, $block)\n {\n }",
"public function author() {\n\t\t\t\n\t\t\t$output = array();\n\n\t\t\t$author = $this->post->post_author;\n\t\t\t\n\t\t\t$output['id'] = $author;\n\t\t\t$output['nicename'] = get_the_author_meta('nickname', $author);\n\t\t\t$output['name'] = get_the_author_meta('user_firstname', $author).' '.get_the_author_meta('user_lastname', $author);\n\t\t\t$output['url'] = get_author_posts_url($author);\n\t\t\t$output['description'] = get_the_author_meta('description', $author);\n\t\t\t\n\t\t\treturn $output;\n\t\t}",
"public function getAuthorName()\n {\n return $this->author ? $this->author : $this->createUser->firstname . ' ' . $this->createUser->lastname;\n }",
"protected function getBio()\n\t{\n\t\treturn apply_filters('the_author_description', $this->rawDescription, $this->id);\n\t}",
"function get_the_modified_author()\n {\n }",
"function get_the_author_msn()\n {\n }",
"public function gettodoAuthor(): string {\n\t\treturn $this->todoAuthor;\n\t}",
"public function get_author_meta( $post ){\n $author = get_the_author_meta( 'display_name', $post->post_author );\n return '<div><span class=\"wm-title\">Author:</span> ' . $author . '</div>';\n }",
"public function getBookAuthor()\n {\n return $this->author;\n }",
"public function getDisplayField()\n {\n foreach(['title', 'name'] as $attribute) {\n if ($this->hasAttribute($attribute)) {\n return $this->getAttribute($attribute);\n }\n }\n\n $pk = $this->getPrimaryKey();\n if (is_array($pk))\n {\n $pk = print_r($pk, true);\n }\n\n\n return \"No title for \" . get_class($this) . \"($pk)\";\n }",
"public function getAuthorUsername()\n {\n return $this->AUTHOR_USERNAME;\n }",
"public function getAuthorName()\n\t{\n\t\tif(is_null($this->_authorName)){\n\t\t\t$this->loadData();\n\t\t}\n\t\treturn $this->_authorName;\n\t}",
"private function render_dynamic_field_author( $args = array() ) {\n\n\t\t$post_title = the_title_attribute( array( 'echo' => 0 ) );\n\t\t$post_author = get_post_field( 'post_author', get_the_ID() );\n\n\t\t$args['alt'] = ! empty( $args['alt'] ) ? $args['alt'] : $post_title;\n\t\t$args['title'] = ! empty( $args['title'] ) ? $args['title'] : $post_title;\n\t\t$args['data-classes'] = ! empty( $args['data-classes'] ) ? $args['data-classes'] : 'tve_image';\n\t\t$args['data-css'] = ! empty( $args['data-css'] ) ? $args['data-css'] : '';\n\t\t$args['loading'] = ! empty( $args['loading'] ) ? $args['loading'] : '';\n\n\t\t/**\n\t\t * Allow vendors to filter author dynamic field\n\t\t * - e.g.: TA course author\n\t\t */\n\t\treturn get_avatar( apply_filters( 'tcb_dynamic_field_author', $post_author ), 256, '', $args['alt'], array(\n\t\t\t'class' => $args['data-classes'],\n\t\t\t'extra_attr' => ' data-d-f=\"author\" title=\"' . $args['title'] . '\" width=\"500\" height=\"500\" data-css=\"' . $args['data-css'] . '\"',\n\t\t\t'loading' => $args['loading'],\n\t\t) );\n\t}",
"public function ViewAction()\r\n\t{\r\n\t\t$this->View->author = $this->Author->select();\r\n\t}",
"function get_the_author_meta($field = '', $user_id = \\false)\n {\n }",
"private function maybe_render_author_box() {\n\t\t$author_description = get_the_author_meta( 'description' );\n\t\tif ( empty( $author_description ) ) {\n\t\t\treturn;\n\t\t}\n\t\t?>\n\t\t<div class=\"card card-profile card-plain\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-md-2\">\n\t\t\t\t\t<div class=\"card-avatar\">\n\t\t\t\t\t\t<a href=\"<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>\"\n\t\t\t\t\t\t\t\ttitle=\"<?php echo esc_attr( get_the_author() ); ?>\"><?php echo get_avatar( get_the_author_meta( 'ID' ), 100 ); ?></a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"col-md-10\">\n\t\t\t\t\t<h4 class=\"card-title\"><?php the_author(); ?></h4>\n\t\t\t\t\t<p class=\"description\"><?php the_author_meta( 'description' ); ?></p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}"
] | [
"0.76121664",
"0.74682343",
"0.7414243",
"0.7414243",
"0.7414243",
"0.7344687",
"0.72971785",
"0.7285783",
"0.7276654",
"0.7276654",
"0.7262898",
"0.7222383",
"0.718863",
"0.718863",
"0.718863",
"0.718863",
"0.718863",
"0.718863",
"0.71846473",
"0.7177265",
"0.71614164",
"0.7140701",
"0.71381646",
"0.7137517",
"0.7128854",
"0.7113129",
"0.7096315",
"0.7082922",
"0.7059985",
"0.70364",
"0.70352525",
"0.7027916",
"0.7015413",
"0.69423115",
"0.69413954",
"0.69328666",
"0.69328666",
"0.69328666",
"0.69328666",
"0.69328666",
"0.69328666",
"0.69328666",
"0.69328666",
"0.69301885",
"0.690073",
"0.68859494",
"0.6847284",
"0.6847284",
"0.6847284",
"0.68313026",
"0.6828276",
"0.6825556",
"0.68082464",
"0.6797592",
"0.6793432",
"0.6787092",
"0.6780503",
"0.67774594",
"0.6776109",
"0.6765915",
"0.67628986",
"0.67540705",
"0.6745883",
"0.67200816",
"0.6714211",
"0.6710505",
"0.67080635",
"0.670363",
"0.6697374",
"0.66761166",
"0.6656928",
"0.6653207",
"0.6649844",
"0.66364634",
"0.6629125",
"0.66282713",
"0.66266376",
"0.66255957",
"0.66082084",
"0.6596403",
"0.65942436",
"0.6585192",
"0.6564837",
"0.65613794",
"0.6548187",
"0.6541247",
"0.6525607",
"0.65191054",
"0.648627",
"0.6486056",
"0.64839363",
"0.6479427",
"0.647595",
"0.6473385",
"0.6460598",
"0.6450227",
"0.64495224",
"0.64490896",
"0.64477795",
"0.6446393"
] | 0.77923477 | 0 |
Filters output to only display allowed fields | function hc_filter($user, $widget = false){
$json = get_option('hc_extra_fields');
$json = json_decode($json);
foreach ($user as $key => $info) {
$display = 0;
foreach ($json as $fields => $field) {
if ($widget) {
if ($field->field == $key && $field->widget) {
$display = 1;
}
}else{
if ($field->field == $key) {
$display = 1;
}
}
}
if (!$display) {
unset($user->$key);
}
}
return $user;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function restrict_fields()\n {\n }",
"abstract public function filterFields();",
"public function action_allowed_fields() {\n return array();\n }",
"abstract protected function filterFieldvalue();",
"function acf_allow_unfiltered_html()\n{\n}",
"public function getAllowedExcludeFields() {}",
"abstract protected function filterField(): string;",
"public function getModlogOmitFields();",
"protected function getExcludeFields() {}",
"public function hideExtraField()\n {\n $this->houses=false;\n $this->jobs_training=false;\n $this->motorcycles =false;\n $this->cars = false;\n $this->offices=false;\n $this->lands_plots=false;\n return;\n }",
"function getEnableFieldsToBeIgnored() ;",
"protected function getHtmlArmorExcludedFields() {\n\t\treturn [ 'id', 'class', 'aria' ];\n\t}",
"public function getFrontEndRequiredFields();",
"public function filter($fields)\n {\n }",
"function Page_FilterValidated() {\n\n\t\t// Example:\n\t\t//global $MyTable;\n\t\t//$MyTable->MyField1->SearchValue = \"your search criteria\"; // Search value\n\n\t}",
"function Page_FilterValidated() {\n\n\t\t// Example:\n\t\t//global $MyTable;\n\t\t//$MyTable->MyField1->SearchValue = \"your search criteria\"; // Search value\n\n\t}",
"protected function matchHideForNonAdminsCondition() {}",
"protected function getFieldsFromShowItem() {}",
"function Page_FilterValidated() {\n\n\t\t// Example:\n\t\t//$this->MyField1->SearchValue = \"your search criteria\"; // Search value\n\n\t}",
"function Page_FilterValidated() {\n\n\t\t// Example:\n\t\t//$this->MyField1->SearchValue = \"your search criteria\"; // Search value\n\n\t}",
"public static function getExcludeFields() {}",
"public static function getFilterableFields(): array\n {\n return ['name', 'accessCode'];\n }",
"public function getAllowedFields() {\n\t\treturn array('date', 'amount');\n\t}",
"function drush_hide_output_fields($fields_to_hide = array()) {\n $already_hidden = drush_get_context('DRUSH_HIDDEN_OUTPUT_FIELDS');\n if (!is_array($fields_to_hide)) {\n $fields_to_hide = array($fields_to_hide);\n }\n $result = array_merge($already_hidden, $fields_to_hide);\n drush_set_context('DRUSH_HIDDEN_OUTPUT_FIELDS', $result);\n return $result;\n}",
"private function filterFields() {\n\n // Initialize an associate array of our field name and value pairs.\n $values = array();\n\n // Initialize an associate array of our field name and filters pairs.\n $filters = array();\n\n // Populate the arrays.\n foreach ($this->fields as $field) {\n if ($field->getFilters()) {\n $values[$field->getName()] = $field->getValue();\n $filters[$field->getName()] = $field->getFilters();\n }\n }\n\n // Load an instance of GUMP to use to sanitize and filter our field values.\n $gump = new \\GUMP();\n\n // Sanitize the field values.\n $values = $gump->sanitize($values);\n\n // Pass the arrays to GUMP and let it do the heavy-lifting.\n $values = $gump->filter($values, $filters);\n\n // Set the values of all fields to their filtered values.\n foreach ($values as $name => $value) {\n $this->passValue($name, $value);\n }\n }",
"function restrict_listing_by_filter() {\n global $wpdb;\n\t\n\t$screen = get_current_screen();\n\t$hidden_columns = get_hidden_columns($screen);\n\t\n\tif(in_array('featured_listing', $hidden_columns)) {\n\t\t$featured_listing_filter_style = 'style=\"display:none;\"'; \n\t}\n\t?>\n\t\n\t<select name=\"featured_listing_filter\" id=\"featured_listing_filter\" class=\"column-featured_listing\" <?php echo $featured_listing_filter_style;?>>\n\t\t<option value=\"\">Show All Listings</option>\n\t\t<option value=\"yes\">Featured</option>\n\t\t<option value=\"no\">Non-Featured</option>\n\t</select>\n\t\n <?php\n}",
"protected function getModelMakeVisibleFields(): string\n {\n $model = $this->option('model');\n $model = new $model;\n \n $fields = array_values(\n array_intersect($model->getFillable(), $model->getHidden())\n );\n\n $string = count($fields) ? \"\\n\" : '';\n\n foreach ($fields as $field) {\n $string .= \" '{$field}',\\n\";\n }\n\n if (count($fields)) {\n $string .= \" \";\n }\n\n return $string;\n }",
"public function sanitize_input_fields()\n {\n }",
"public function getEnableFieldsToBeIgnored() {}",
"public function filters()\n {\n return [\n 'first_name' => 'trim|escape',\n 'last_name' => 'trim|escape',\n 'email_address' => 'trim|escape',\n 'message' => 'trim|escape',\n 'business_name' => 'trim|escape'\n ];\n }",
"public function getFrontendFields();",
"function advanced_settings_fields_filter1($fields) {\n $model_config = WYSIJA::get('config', 'model');\n if ($model_config->getValue('premium_key')) {\n unset($fields['bounce_email']);\n }\n return $fields;\n }",
"public function getSupportedFields()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getViewRight()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$fields = array_values(array_diff($this->getHandler()->getSupportedFields(), $this->getRestrictedFields()));\n\t\t\t\t$array = new ArrayList($fields);\n\n\t\t\t\t$this->setResponse($array);\n\t\t\t}\n\t\t\tcatch(\\Exception $e)\n\t\t\t{\n\t\t\t\t$msg = new Message($e->getMessage(), false);\n\n\t\t\t\t$this->setResponse($msg);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = new Message('Access not allowed', false);\n\n\t\t\t$this->setResponse($msg, null, $this->user->isAnonymous() ? 401 : 403);\n\t\t}\n\t}",
"public function filters()\n {\n return [\n 'team_name' => 'trim|escape'\n ];\n }",
"public function fields();",
"public function fields();",
"public function fields();",
"public function fields();",
"public function fields();",
"public function getParameterFields()\n {\n return false;\n }",
"function formFilter()\r\n\t{\r\n\t\tglobal $langs;\r\n\r\n\t\t$s='';\r\n\t\t$s.='<input type=\"text\" name=\"xinputuser\" class=\"flat minwidth300\" value=\"'.GETPOST(\"xinputuser\").'\">';\r\n\t\treturn $s;\r\n\t}",
"public function useAllFields() {\n $this->__onlyFields = array();\n }",
"function filter_field() {\n $data['email'] = addslashes(filter_var($_POST['email'], FILTER_VALIDATE_EMAIL));\n $data['username'] = addslashes(filter_var($_POST['username'], FILTER_SANITIZE_STRING));\n $data['password'] = addslashes(strip_tags($_POST['password']));\n $data['name'] = addslashes(filter_var($_POST['name'], FILTER_SANITIZE_STRING));\n $data['surname'] = addslashes(filter_var($_POST['surname'], FILTER_SANITIZE_STRING));\n \n if(isset($_POST['bio']))\n $data['bio'] = addslashes(filter_var($_POST['bio'], FILTER_SANITIZE_STRING));\n else\n $data['bio'] = null;\n\n foreach ($data as $key => $value) {\n if($value != null && $value === false)\n launch_error(\"Problem with your data, try changing them.\");\n }\n\n return $data;\n}",
"function getIgnoreEnableFields() ;",
"public static function getFilterList()\n {\n return ['nospaces'];\n }",
"function show_password_fields($show_password_fields)\n{\n return false;\n}",
"protected function renderHiddenFieldForEmptyValue() {}",
"function showField($diak,$field) {\n if (!isset($diak[$field]) || $diak[$field]==\"\")\n return false;\n if (($diak[$field][0]!=\"~\") || isUserLoggedOn()) {\n if (ltrim($diak[$field],\"~\")!=\"\") {\n return true;\n } else {\n return false;\n }\n }\n return false;\n\n}",
"public function filters() {\n\t\treturn array(\n\t\t 'name' => array(array('trim')),\n\t\t);\n\t}",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"public static function get_output_fields()\n {\n }",
"function marco_comment_form_hidden_fields()\n {\n comment_id_fields();\n if ( current_user_can( 'unfiltered_html' ) )\n {\n wp_nonce_field( 'unfiltered-html-comment_' . get_the_ID(), '_wp_unfiltered_html_comment', false );\n }\n }",
"function rest_filter_response_fields($response, $server, $request)\n {\n }",
"public function getReadOnlyFields();",
"private function getCheckableFields()\n {\n return ['index', 'city', 'countryIso', 'text', 'region'];\n }",
"protected function getFilterField(){\n $aField = parent::getFilterField();\n $oRequest = AMI::getSingleton('env/request');\n if(!$oRequest->get('category', 0)){\n $aField['disableSQL'] = TRUE;\n }\n return $aField;\n }",
"public function filters(){\n\t\treturn array( 'accessControl' );\n\t}",
"public function get_display_fields() {\n return $this->displayable_fields;\n }",
"public function getFilteredDetails();",
"function ihc_get_public_register_fields($exclude_field=''){\n\t$return = array();\n\t$fields_meta = ihc_get_user_reg_fields();\n\tforeach ($fields_meta as $arr){\n\t\tif ($arr['display_public_reg']>0 && !in_array($arr['type'], array('payment_select', 'social_media', 'upload_image', 'plain_text', 'file', 'capcha')) && $arr['name']!='tos'){\n\t\t\tif ($exclude_field && $exclude_field==$arr['name']){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$return[$arr['name']] = $arr['name'];\n\t\t}\n\t}\n\treturn $return;\n}",
"private function getHiddenFieldsWithoutAccess(): array\n\t{\n\t\treturn [\n\t\t\t'STORE_TO',\n\t\t\t'STORE_TO_INFO',\n\t\t\t'STORE_TO_TITLE',\n\t\t\t'STORE_TO_AMOUNT',\n\t\t\t'STORE_TO_RESERVED',\n\t\t\t'STORE_TO_AVAILABLE_AMOUNT',\n\t\t\t'STORE_FROM',\n\t\t\t'STORE_FROM_INFO',\n\t\t\t'STORE_FROM_TITLE',\n\t\t\t'STORE_FROM_AMOUNT',\n\t\t\t'STORE_FROM_RESERVED',\n\t\t\t'STORE_FROM_AVAILABLE_AMOUNT',\n\t\t\t'PURCHASING_PRICE',\n\t\t\t'BASE_PRICE',\n\t\t\t'TOTAL_PRICE',\n\t\t\t'AMOUNT',\n\t\t];\n\t}",
"protected function getFilterableFields() {\n $fields = $this->config->getFilterableFields();\n\n if(count($fields) == 0) {\n return false;\n }\n\n return $fields;\n }",
"public function VisibleFields()\n {\n return $this->Fields()->VisibleFields();\n }",
"public function filtering();",
"public function include_fields()\n {\n }",
"public function filterAllowedFields(array $fields = array()) {\n $allowedFields = $this->controller->getProperty('allowedFields','');\n if (!empty($allowedFields)) {\n $allowedFields = is_array($allowedFields) ? $allowedFields : explode(',',$allowedFields);\n $userGroupField = $this->controller->getProperty('usergroupsField','');\n $usernameField = $this->controller->getProperty('usernameField','username');\n $fullnameField = $this->controller->getProperty('fullnameField','fullname');\n $passwordField = $this->controller->getProperty('passwordField','password');\n $emailField = $this->controller->getProperty('emailField','email');\n array_push($allowedFields,$usernameField,$fullnameField,$passwordField,'password_confirm',$emailField,'class_key');\n if (!empty($userGroupField)) array_push($allowedFields,$userGroupField);\n $allowedFields = array_unique($allowedFields);\n foreach ($fields as $k => $v) {\n if (!in_array($k,$allowedFields)) unset($fields[$k]);\n }\n }\n return $fields;\n }",
"protected function filterDropdownFields(): array\n {\n return [];\n }",
"function kpl_user_bio_visual_editor_unfiltered() {\r\n\tremove_all_filters('pre_user_description');\r\n}",
"protected function renderTrustedPropertiesField() {}",
"public function filters() {\n\t\treturn array(\n\t\t TRUE => array(array('trim')),\n\t\t);\n\t}",
"public function getTableFilterHTML()\n\t{\n\t\treturn $this->render();\n\t}",
"public function getValidatedData()\n {\n return $this->only([\n // Footer inputs\n 'name', 'localization', 'uri', 'locale', 'page',\n // SEO Metas inputs\n 'seo_title', 'seo_description', 'seo_keywords',\n ]);\n }",
"public static function input_fields()\n {\n }",
"function wpvideocoach_hide_introduction_disable_fields()\r\n{\r\n\tglobal $wpvideocoach_introduction;\r\n\tif($wpvideocoach_introduction == 1){\r\n\t\techo \"disabled='disabled'\";\r\n\t}\r\n}",
"protected function getAllowedItems() {}",
"protected function getAllowedItems() {}",
"protected function getAllowedItems() {}",
"public function filter() {\r\n\t\t$this->resource->filter();\r\n\t}",
"protected function allow_html() {\n\t\tremove_filter( 'pre_term_description', 'wp_filter_kses' );\n\t\tremove_filter( 'term_description', 'wp_kses_data' );\n\n\t\tadd_filter( 'pre_term_description', 'wp_filter_post_kses' );\n\t}",
"abstract public function getFieldsSearchable();",
"function get_filter_form(Table $table) {\n return $table->renderFilter();\n}",
"public function getFields() {}",
"public function getFields() {}",
"public function getFields() {}",
"public function filterVisible(): self;",
"protected function filterSliderFields(): array\n {\n return [];\n }",
"public function getListFields();",
"public function getAllowSpecific();",
"abstract function display( $p_filter_value );",
"function getFields();"
] | [
"0.70206517",
"0.69598395",
"0.66163784",
"0.65169704",
"0.6397913",
"0.6299588",
"0.6257747",
"0.6253222",
"0.6213388",
"0.614839",
"0.6116486",
"0.6073218",
"0.59841883",
"0.59530145",
"0.5946287",
"0.5946287",
"0.5917061",
"0.59163415",
"0.59079033",
"0.59079033",
"0.5905267",
"0.58991814",
"0.5876524",
"0.58583474",
"0.5843292",
"0.58326155",
"0.58298534",
"0.5819008",
"0.58118993",
"0.5796282",
"0.57908887",
"0.57719225",
"0.5762337",
"0.5753283",
"0.5737767",
"0.5737767",
"0.5737767",
"0.5737767",
"0.5737767",
"0.5718646",
"0.57108223",
"0.5704837",
"0.5699709",
"0.5679869",
"0.567853",
"0.5669404",
"0.56691986",
"0.5658743",
"0.56562215",
"0.56389904",
"0.56389904",
"0.56389904",
"0.56389904",
"0.56389904",
"0.56389904",
"0.56389904",
"0.56389904",
"0.56389904",
"0.56389904",
"0.56389904",
"0.56389904",
"0.56389904",
"0.5638642",
"0.5635197",
"0.5627907",
"0.56022453",
"0.56011933",
"0.5593091",
"0.5592182",
"0.5589199",
"0.5587391",
"0.55788934",
"0.5573977",
"0.5563211",
"0.5547033",
"0.55459785",
"0.55446965",
"0.55363023",
"0.5530666",
"0.5529403",
"0.5528943",
"0.5523676",
"0.5522748",
"0.5513487",
"0.55073315",
"0.55072093",
"0.55072093",
"0.55072093",
"0.55065644",
"0.55051214",
"0.55042607",
"0.5498893",
"0.5498789",
"0.5498789",
"0.5498789",
"0.5495152",
"0.54856443",
"0.5481994",
"0.54801834",
"0.54792607",
"0.5475465"
] | 0.0 | -1 |
return field name for a field | function hc_get_field_name($field){
$json = get_option('hc_extra_fields');
$json = json_decode($json);
foreach ($json as $key => $value) {
if ($value->field == $field) {
return $value->fieldname;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_field_name();",
"public function getFieldName($field) {\n return $field['name'];\n }",
"public function name($field) {\n\t\treturn $field;\n\t}",
"public function getDbFieldName($field_name);",
"public function get_field_name($field_name)\n {\n }",
"public function getFieldName()\n {\n return $this->fieldName;\n }",
"public function getFieldName()\n {\n return $this->fieldName;\n }",
"public function getFieldName()\n {\n return $this->fieldName;\n }",
"public function getFieldName() {}",
"public function getFieldName() {\n return $this->fieldName;\n }",
"function hc_field_name($field){\n\t\techo hc_get_field_name($field);\n\t}",
"public function getFieldName() {\r\n return $this->_fieldName;\r\n }",
"public function getField(): string\n {\n return $this->field;\n }",
"public function getFieldName()\r\n\t{\r\n\t\treturn $this->name;\r\n\t}",
"public function getField($field_name);",
"function getFieldName($n){\n\t\t$field = $this->fields[$n]['Field'];\n\t\treturn $field;\n\t}",
"function get_fields_name()\n\t{\n\t\treturn $this->db->list_fields( $this->table );\n\t}",
"public function get_field_label() {\n\t\treturn $this->get_field_attr( 'name' );\n\t}",
"public function getField($fieldName) {}",
"public function fieldName()\n\t{\n\t\tif(strpos($this->key, '_id'))\n\t\t{\n\t\t\treturn str_replace('_id', '', $this->key);\n\t\t}\n\n\t\treturn $this->key;\n\t}",
"public function get_field_name($name)\n {\n if( ! $this->_model)\n {\n return $name;\n }\n return $this->get_model()->get_field_name($name);\n }",
"public function getFieldName(): float|int|string|null\n {\n return $this->field?->getFieldName();\n }",
"function get_cf_name($field)\n\t{\n\t\treturn substr($field,1);\n\t}",
"public function getField()\n {\n $value = $this->name;\n if (null != $this->field) {\n $value = $this->field;\n }\n return $value;\n }",
"private function course_bank_get_field_name($field) {\n return get_string($field, 'tool_coursebank');\n }",
"function getFieldLabel($fieldName){\n\n\t\tif( isset($this->labels[$fieldName]) ) return $this->labels[$fieldName];\n\t\telse return ucwords( str_replace(\"_\", \" \", $fieldName) );\n\n\t}",
"public function get_field( string $field ) {\n\t\tif ( array_key_exists( $field, $this->data ) ) {\n\t\t\treturn $this->data[ $field ];\n\t\t}\n\n\t\treturn '';\n\t}",
"public function getName()\n {\n return $this->__get(self::FIELD_NAME);\n }",
"private static function _field($field)\n {\n if (preg_match(\"/([\\w]+)/\", $field, $m) && $m[0] == $field) {\n return $field;\n }\n\n return '';\n }",
"public function getField(): string;",
"function get_field_name( $str ){\n\t\treturn 'field-'.$this->id_base.'['.$this->number.']['.$str.']';\n\t}",
"function db_field_name($qid, $fieldno) {\n\n\treturn mysqli_fetch_field_direct($qid, $fieldno);\n}",
"public static function getFieldName($field_name)\n {\n preg_match('/\\[([a-zA-Z0-9_-]+)]/', $field_name, $matches);\n return (isset($matches[1])) ? $matches[1] : $field_name;\n }",
"public function field_name( $qHanle, $offset )\r\n\t{\r\n\t\treturn $qHanle->Fields( $offset )->Name;\r\n\t}",
"public function get_field_name($field_name) {\n\t\treturn 'widget-' . $this->id_base . '[' . $this->number . '][' . $field_name . ']';\n\t}",
"public function field($field, $name = FALSE)\n\t{\n\t\tif (empty($this->_fields[$field]))\n\t\t{\n\t\t\t$this->_fields[$field] = Jelly_Meta::field($this, $field);\n\t\t}\n\t\t\n\t\tif ($name)\n\t\t{\n\t\t\tif (is_object($this->_fields[$field]))\n\t\t\t{\n\t\t\t\treturn $this->_fields[$field]->name;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->_fields[$field];\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}",
"function fieldname($fieldnum) {\r\n\t\treturn @mysql_field_name( $this->result, $fieldnum );\r\n\t}",
"public function get_field_key() {\n\t\treturn $this->get_field_attr( 'field_key' );\n\t}",
"public function getFieldName(): ?string\n {\n return $this->getOption('fieldname');\n }",
"function graphql_format_field_name($field_name)\n {\n }",
"public function getField()\n {\n return $this->field;\n }",
"public function getField()\n {\n return $this->field;\n }",
"public function getField()\n {\n return $this->field;\n }",
"public function getField()\n {\n return $this->field;\n }",
"function getFieldName(DataProperty &$property)\n {\n if (!is_object($property)) debug($property); // <-- this throws an exception\n // support [database.]table.field syntax\n if (preg_match('/^(.+)\\.(\\w+)$/', $property->source, $matches)) {\n $table = $matches[1];\n $field = $matches[2];\n return $field;\n }\n }",
"public function getField($name) { return $this->fields[$name]; }",
"public abstract function field_name($offset);",
"function getfield($field){\n\n\t\treturn($this->record[$field]);\n\t}",
"public function getFieldName($field_name)\n {\n\n return sfConfig::get('app_sf_guard_plugin_profile_'.$field_name.'_name', $field_name);\n }",
"public function getIdFieldName()\n {\n return $this->_idFieldName;\n }",
"public function getField() {\n\t\treturn $this->field; \n\t}",
"public function getField() {\n\t\treturn $this->field;\n\t}",
"public function getField();",
"public function getField();",
"public function getField();",
"public function get_field(/* .... */)\n {\n return $this->_field;\n }",
"protected function getFieldNameFromPropertyPath($field)\n {\n $pieces = explode('.', $field);\n return $pieces[0];\n }",
"function get_cf_field($name)\n\t{\n\t\treturn self::CF_PREFIX.$name;\n\t}",
"protected function _fieldName($field)\n\t{\n\t\tif (is_string($field)) {\n\t\t\tif (preg_match('/^[a-z0-9_-]+\\.[a-z0-9_-]+$/i', $field)) {\n\t\t\t\tlist($first, $second) = explode('.', $field, 2);\n\t\t\t\treturn $second;\n\t\t\t}\n\t\t}\n\t\treturn $field;\n\t}",
"function getName () {return $this->getFieldValue ('name');}",
"public function getField() {\n\t\treturn $this->_field;\n\t}",
"public function getField()\n {\n return $this->_field;\n }",
"public function fieldName($name) {\n\t\treturn self::FORM_NAME.'['.$name.']';\n\t}",
"function wrapper_field_name($columnnum) {\n\t\treturn $this->functions['field_name']($this->query_id, $columnnum);\n\t}",
"protected static function getBindName($field)\n {\n return \"{$field}\";\n }",
"function field_name($sth,$index){\n try{\n switch(dbconection::$conntype){\n case \"pdo\" : return $sth->getColumnMeta($index)[\"name\"]; break;\n case \"mysql\" : return mysqli_fetch_field_direct($sth,$index)->name; break;\n case \"postgresql\" : return pg_field_name($sth,$index); break;\n default : throw new Exception(\"Nenhum tipo de conexão definida.\");\n }\n }catch(Exception $e){\n printr(\"NAME FIELDS ERROR : \".$e->getMessage());\n }\n }",
"public function getField(){\n return $this->field;\n }",
"public function getName(){ return $this->getField('name'); }",
"function sql_field_name($res, $offset = 0)\n {\n $column = $res->getColumnMeta($offset);\n if ($column) {\n return $column['name'];\n }\n return false;\n }",
"private function getFieldQuery(string $name, array $field):string{\n return $name.' '.$field['mtype'].\n (isset($field['length']) ? ' ('.$field['length'].')' : '').\n ($field['nullable'] ? ' NULL' : ' NOT NULL').\n (isset($field['default']) ? ' default '.$field['default'] : '').\n (isset($field['extra']) ? ' '.$field['extra'] : '');\n }",
"public function field_name( $qHanle, $offset )\r\n\t{\r\n\t\treturn db2_field_name($qHanle, $offset);\r\n\t}",
"private function getFieldTypeName(FormBuilder $field)\n {\n return get_class($field->getType()->getInnerType());\n }",
"function getFieldValue($field);",
"public function getTitleField() {\n\t\t$this->loadFields();\n\t\tforeach($this->fields as $field) {\n\t\t\tif (get_class($field) == \"ItemFieldString\") return $field;\n\t\t}\n\t}",
"public static function get_field_name($record)\n {\n return array_keys($record->getAttributes());\n }",
"public function getIdFieldName()\n {\n if (empty($this->_idFieldName)) {\n Virtual::throwException('Empty identifier field name');\n }\n\n return $this->_idFieldName;\n }",
"public function field_name($result, $index){\r\n\t\t$obj_field = new ADOFieldObject();\r\n\t\t$obj_field = $result->FetchField($index);\r\n\t\treturn isset($obj_field->name) ? $obj_field->name : \"\";\r\n\t}",
"private function getPropertyName($name)\n {\n $customField = $this->getWrapper()->getCustomFieldByApiName($name);\n if (empty($customField)) {\n return $name;\n }\n // CustomField detected\n return $customField->deputyField;\n }",
"public function getTitleField() {\n return $this->getFields()[$this->getTitleFieldName()];\n }",
"abstract function getProfileColumnName($field_name);",
"function acf_get_field_label($field, $context = '')\n{\n}",
"public function getField($fieldKey){\n $fields = $this->getFields();\n return $fields->{$fieldKey};\n }",
"protected function getFieldNamePrefix() {}",
"protected function getFieldNamePrefix() {}",
"public function getField($name) {\n return $this->getFields()[$name];\n }",
"function f($field)\n {\n if (isset($this->_data[$field])) {\n return $this->_data[$field];\n } else {\n return '';\n }\n }",
"public function getLabel(string $field_name): string\n {\n if (isset($this->labels[$field_name])) {\n return $this->labels[$field_name];\n }\n\n // This should always be done the same was as Field::makeLabel()\n return ucfirst(str_replace('_', ' ', $field_name));\n }",
"public function actionGetfieldname($id)\n\t{\n\t\t$field = Field::find()->where(['id' => $id])->one();\n\t\tif($field)\n\t\t{\n\t\t\treturn $field->getAttribute('name').' '.$field->getAttribute('model').' '.$field->getAttribute('value');\n\t\t}\n\t\treturn \"\";\n\t}",
"public function getField($name) {\n\t\treturn $this->fields[$name];\n\t}",
"public function getRecordIdFieldName()\n {\n $metadata = $this->exportMetaData();\n $recordIdFieldName = $metadata[0]['field_name'];\n return $recordIdFieldName;\n }",
"public static function getFieldTitle($fieldName)\n {\n return self::getResource()->get($fieldName);\n }",
"public function getBillingField($field) {\n\t\treturn $this->billingDetails[$field];\n\t}",
"public function getFieldTitle() {\r\n return $this->_fieldTitle;\r\n }",
"public function getFieldValue(/*string*/ $fieldName);",
"private function fieldName($fieldName){\n if(array_key_exists($fieldName, $this->customNames)){\n return $this->customNames[$fieldName];\n }\n return ucfirst($fieldName);\n }",
"function getField(){\n\t\treturn $this->Field;\n\t}",
"public function field_name( $qHanle, $offset )\r\n\t{\r\n\t\treturn @mssql_field_name($qHanle, $offset);\r\n\t}",
"public function getField($name)\n {\n return $this->fields[$name];\n }",
"abstract function getProfilePhpName($field_name);",
"function fieldLabel($field, $option = [])\n{\n if (!empty($option['label'])) {\n return $option['label'];\n }\n\n return ucfirst($field);\n}"
] | [
"0.8976763",
"0.8629746",
"0.8415228",
"0.8260565",
"0.81128466",
"0.81089085",
"0.81089085",
"0.81089085",
"0.81003463",
"0.8058309",
"0.80272865",
"0.8022192",
"0.7982532",
"0.7925729",
"0.7765974",
"0.7674025",
"0.75414056",
"0.75409913",
"0.7539312",
"0.74961215",
"0.74934083",
"0.74730676",
"0.7431164",
"0.7426448",
"0.7407812",
"0.73569417",
"0.7343817",
"0.7324435",
"0.7323571",
"0.7309771",
"0.7306739",
"0.73046476",
"0.72839403",
"0.72780913",
"0.7246412",
"0.7227235",
"0.71993464",
"0.7184288",
"0.71825045",
"0.71748894",
"0.7161846",
"0.7161846",
"0.7161846",
"0.7161846",
"0.7158312",
"0.711702",
"0.71014845",
"0.70900697",
"0.7073295",
"0.7062149",
"0.7043731",
"0.7031587",
"0.7026756",
"0.7026756",
"0.7026756",
"0.7025937",
"0.70131594",
"0.7008478",
"0.69924825",
"0.69892347",
"0.69750386",
"0.6973912",
"0.6953321",
"0.6952595",
"0.69053197",
"0.68961936",
"0.6896192",
"0.688713",
"0.6881376",
"0.68637633",
"0.6848596",
"0.6833232",
"0.68133587",
"0.6802179",
"0.68010575",
"0.6797028",
"0.678372",
"0.6769394",
"0.6767032",
"0.6759989",
"0.6757244",
"0.67572",
"0.6755036",
"0.6755036",
"0.6753747",
"0.6751279",
"0.67453",
"0.6744373",
"0.67121106",
"0.67004305",
"0.6683258",
"0.6681017",
"0.66755515",
"0.6664984",
"0.666153",
"0.6655714",
"0.66553694",
"0.66529524",
"0.6649975",
"0.66495013"
] | 0.7492836 | 21 |
Display field name for a field | function hc_field_name($field){
echo hc_get_field_name($field);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_field_name();",
"public function get_field_label() {\n\t\treturn $this->get_field_attr( 'name' );\n\t}",
"public function getFieldName() {}",
"public function name($field) {\n\t\treturn $field;\n\t}",
"public function getFieldName($field) {\n return $field['name'];\n }",
"public function get_field_name($field_name)\n {\n }",
"function getLabelField()\n {\n return 'person_fname';\n }",
"public function getFieldName()\r\n\t{\r\n\t\treturn $this->name;\r\n\t}",
"public function getName(){ return $this->getField('name'); }",
"function get_fields_name()\n\t{\n\t\treturn $this->db->list_fields( $this->table );\n\t}",
"public function getName()\n {\n return $this->__get(self::FIELD_NAME);\n }",
"public function getFieldName() {\n return $this->fieldName;\n }",
"function getName () {return $this->getFieldValue ('name');}",
"function getFieldLabel($fieldName){\n\n\t\tif( isset($this->labels[$fieldName]) ) return $this->labels[$fieldName];\n\t\telse return ucwords( str_replace(\"_\", \" \", $fieldName) );\n\n\t}",
"public function getFieldName()\n {\n return $this->fieldName;\n }",
"public function getFieldName()\n {\n return $this->fieldName;\n }",
"public function getFieldName()\n {\n return $this->fieldName;\n }",
"public function getField(): string\n {\n return $this->field;\n }",
"public function getFieldName() {\r\n return $this->_fieldName;\r\n }",
"public function get_field_name($name)\n {\n if( ! $this->_model)\n {\n return $name;\n }\n return $this->get_model()->get_field_name($name);\n }",
"public function get_field_name($field_name) {\n\t\treturn 'widget-' . $this->id_base . '[' . $this->number . '][' . $field_name . ']';\n\t}",
"function fieldLabel($field, $option = [])\n{\n if (!empty($option['label'])) {\n return $option['label'];\n }\n\n return ucfirst($field);\n}",
"public function getDbFieldName($field_name);",
"public function getField($field_name);",
"function graphql_format_field_name($field_name)\n {\n }",
"function acf_get_field_label($field, $context = '')\n{\n}",
"public function getFieldTitle() {\r\n return $this->_fieldTitle;\r\n }",
"public function fieldName($name) {\n\t\treturn self::FORM_NAME.'['.$name.']';\n\t}",
"public function field_name( $qHanle, $offset )\r\n\t{\r\n\t\treturn $qHanle->Fields( $offset )->Name;\r\n\t}",
"function acf_render_field_label($field)\n{\n}",
"function getFieldName($n){\n\t\t$field = $this->fields[$n]['Field'];\n\t\treturn $field;\n\t}",
"function get_field_name( $str ){\n\t\treturn 'field-'.$this->id_base.'['.$this->number.']['.$str.']';\n\t}",
"public function getDisplayField()\n {\n foreach(['title', 'name'] as $attribute) {\n if ($this->hasAttribute($attribute)) {\n return $this->getAttribute($attribute);\n }\n }\n\n $pk = $this->getPrimaryKey();\n if (is_array($pk))\n {\n $pk = print_r($pk, true);\n }\n\n\n return \"No title for \" . get_class($this) . \"($pk)\";\n }",
"function get_field_label($field_instance) {\n return $field_instance['label'];\n }",
"function GetDisplayNameField($table = \"\")\n{\n\tglobal $cDisplayNameField;\n\treturn $cDisplayNameField;\n}",
"public function label($name) {\n\t\tif(!$this->field) return '';\n\t\treturn $this->field->type->getLabel($this->field, $name); \n\t}",
"function acf_get_field_type_label($name = '')\n{\n}",
"public function getName()\r\n\t{\r\n\t\tif ($this->def->getField(\"name\"))\r\n\t\t\treturn $this->getValue(\"name\");\r\n\t\tif ($this->def->getField(\"title\"))\r\n\t\t\treturn $this->getValue(\"title\");\r\n\t\tif ($this->def->getField(\"subject\"))\r\n\t\t\treturn $this->getValue(\"subject\");\r\n\t\tif ($this->def->getField(\"full_name\"))\r\n\t\t\treturn $this->getValue(\"full_name\");\r\n\t\tif ($this->def->getField(\"first_name\"))\r\n\t\t\treturn $this->getValue(\"first_name\");\r\n\r\n\t\treturn $this->getId();\r\n\t}",
"public function getField(): string;",
"function getLabelField() \n {\n return \"label_label\";\n }",
"public function field($field, $name = FALSE)\n\t{\n\t\tif (empty($this->_fields[$field]))\n\t\t{\n\t\t\t$this->_fields[$field] = Jelly_Meta::field($this, $field);\n\t\t}\n\t\t\n\t\tif ($name)\n\t\t{\n\t\t\tif (is_object($this->_fields[$field]))\n\t\t\t{\n\t\t\t\treturn $this->_fields[$field]->name;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->_fields[$field];\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}",
"function Name(){\n\t\tif(!$this->title) {\n\t\t\t$fs = $this->FieldSet();\n\t\t\t$compositeTitle = '';\n\t\t\t$count = 0;\n\t\t\tforeach($fs as $subfield){\n\t\t\t\t$compositeTitle .= $subfield->Name();\n\t\t\t\tif($subfield->Name()) $count++;\n\t\t\t}\n\t\t\tif($count == 1) $compositeTitle .= 'Group';\n\t\t\treturn ereg_replace(\"[^a-zA-Z0-9]+\",\"\",$compositeTitle);\n\t\t}\n\n\t\treturn ereg_replace(\"[^a-zA-Z0-9]+\",\"\",$this->title);\t\n\t}",
"public function get_form_editor_field_title() {\n\t\treturn esc_attr__( 'Simple', 'simplefieldaddon' );\n\t}",
"function db_field_name($qid, $fieldno) {\n\n\treturn mysqli_fetch_field_direct($qid, $fieldno);\n}",
"public function getField($fieldName) {}",
"public function getTitleField()\n {\n return !$this->title ?: $this->title->getName();\n }",
"public function actionGetfieldname($id)\n\t{\n\t\t$field = Field::find()->where(['id' => $id])->one();\n\t\tif($field)\n\t\t{\n\t\t\treturn $field->getAttribute('name').' '.$field->getAttribute('model').' '.$field->getAttribute('value');\n\t\t}\n\t\treturn \"\";\n\t}",
"function hc_get_field_name($field){\n\t\t$json = get_option('hc_extra_fields');\n\t\t$json = json_decode($json);\n\t\tforeach ($json as $key => $value) {\n\t\t\tif ($value->field == $field) {\n\t\t\t\treturn $value->fieldname;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public function field_name($result, $index){\r\n\t\t$obj_field = new ADOFieldObject();\r\n\t\t$obj_field = $result->FetchField($index);\r\n\t\treturn isset($obj_field->name) ? $obj_field->name : \"\";\r\n\t}",
"public static function getFieldTitle($fieldName)\n {\n return self::getResource()->get($fieldName);\n }",
"function form__label($field, $text = '') {\n if(empty($text)) {\n $text = ucfirst(str_replace('_', ' ', $field));\n }\n\n return '<label for=\"' . form__field_id($field) . '\">' . $text . '</label>';\n}",
"public function fieldDisplay(): FieldDisplay;",
"function getFieldNames();",
"public abstract function field_name($offset);",
"public function smtp_name_field( $args ) {\n $field_id = $args['label_for'];\n $value = get_option( $field_id, $args['default'] );\n\n printf( \"<input type='text' name=%s id=%s value=%s />\", $field_id, $field_id, $value );\n }",
"public function getTitleField() {\n return $this->getFields()[$this->getTitleFieldName()];\n }",
"public function fieldName()\n\t{\n\t\tif(strpos($this->key, '_id'))\n\t\t{\n\t\t\treturn str_replace('_id', '', $this->key);\n\t\t}\n\n\t\treturn $this->key;\n\t}",
"function get_cf_name($field)\n\t{\n\t\treturn substr($field,1);\n\t}",
"function field_name($sth,$index){\n try{\n switch(dbconection::$conntype){\n case \"pdo\" : return $sth->getColumnMeta($index)[\"name\"]; break;\n case \"mysql\" : return mysqli_fetch_field_direct($sth,$index)->name; break;\n case \"postgresql\" : return pg_field_name($sth,$index); break;\n default : throw new Exception(\"Nenhum tipo de conexão definida.\");\n }\n }catch(Exception $e){\n printr(\"NAME FIELDS ERROR : \".$e->getMessage());\n }\n }",
"public function getDisplayNameSourceField(): string\n {\n switch ($this->getDisplayNameSourceFieldConf()) {\n case self::INHERIT:\n $type = $this->Type();\n // ID check to prevent infinite recursion since type returns itself as its type\n if ($type && $type->exists() && $type->ID !== $this->ID) {\n return $type->getDisplayNameSourceField();\n }\n\n return 'Title';\n case self::SINGULAR:\n return 'Title';\n case self::PLURAL:\n return 'TitlePlural';\n case self::CUSTOM:\n return 'TitleCustom';\n default:\n return 'Title';\n }\n }",
"function sql_field_name($res, $offset = 0)\n {\n $column = $res->getColumnMeta($offset);\n if ($column) {\n return $column['name'];\n }\n return false;\n }",
"function get_cf_field($name)\n\t{\n\t\treturn self::CF_PREFIX.$name;\n\t}",
"public function getLabel(string $field_name): string\n {\n if (isset($this->labels[$field_name])) {\n return $this->labels[$field_name];\n }\n\n // This should always be done the same was as Field::makeLabel()\n return ucfirst(str_replace('_', ' ', $field_name));\n }",
"public function getFieldDescription($fieldName);",
"public abstract function getTitleFieldName();",
"public function getLabelField() {}",
"public static function format_field_name(string $field_name)\n {\n }",
"public function getFieldName($field_name)\n {\n\n return sfConfig::get('app_sf_guard_plugin_profile_'.$field_name.'_name', $field_name);\n }",
"function getLabelFromId($id) {\n return 'field_'.$id;\n }",
"function getLabelField() \n {\n return \"No Field Label Marked\";\n }",
"function getLabelField() \n {\n return \"No Field Label Marked\";\n }",
"function getLabelField() \n {\n return \"No Field Label Marked\";\n }",
"function getLabelField() \n {\n return \"No Field Label Marked\";\n }",
"function getLabelField() \n {\n return \"No Field Label Marked\";\n }",
"function getLabelField() \n {\n return \"No Field Label Marked\";\n }",
"private function course_bank_get_field_name($field) {\n return get_string($field, 'tool_coursebank');\n }",
"public static function displayFieldName($field, $class = __CLASS__, $htmlentities = true, JeproshopContext $context = null)\n {\n }",
"function field($name, $echo = true) {\n if (($at = strpos($name, '[]')) !== false) {\n $field = sprintf('%s_settings[%s][]', __CLASS__, substr($name, 0, $at));\n } else {\n $field = sprintf('%s_settings[%s]', __CLASS__, $name);\n }\n if ($echo) {\n echo $field;\n } else {\n return $field;\n }\n }",
"public function getName()\n {\n return 'ic_core_field.twig.extension.aliasToLabel';\n }",
"function wrapper_field_name($columnnum) {\n\t\treturn $this->functions['field_name']($this->query_id, $columnnum);\n\t}",
"private function getFieldQuery(string $name, array $field):string{\n return $name.' '.$field['mtype'].\n (isset($field['length']) ? ' ('.$field['length'].')' : '').\n ($field['nullable'] ? ' NULL' : ' NOT NULL').\n (isset($field['default']) ? ' default '.$field['default'] : '').\n (isset($field['extra']) ? ' '.$field['extra'] : '');\n }",
"function fieldname($fieldnum) {\r\n\t\treturn @mysql_field_name( $this->result, $fieldnum );\r\n\t}",
"public function getTitleField() {\n\t\t$this->loadFields();\n\t\tforeach($this->fields as $field) {\n\t\t\tif (get_class($field) == \"ItemFieldString\") return $field;\n\t\t}\n\t}",
"public function getField()\n {\n $value = $this->name;\n if (null != $this->field) {\n $value = $this->field;\n }\n return $value;\n }",
"public function getField();",
"public function getField();",
"public function getField();",
"public function getFieldName(): ?string\n {\n return $this->getOption('fieldname');\n }",
"public function display($field)\n {\n\t\treturn $field->value; \n }",
"function _field_heading($fval) \n {\n return '<span class=\"formHeading\">' . $this->descrip . '</span>';\n\t}",
"public function getDisplayField()\n {\n if ($this->_displayField === null) {\n $primary = (array)$this->getPrimaryKey();\n $this->_displayField = array_shift($primary);\n\n $schema = $this->getSchema();\n if ($schema->getColumn('title')) {\n $this->_displayField = 'title';\n }\n if ($schema->getColumn('name')) {\n $this->_displayField = 'name';\n }\n }\n\n return $this->_displayField;\n }",
"public function field_name( $qHanle, $offset )\r\n\t{\r\n\t\treturn db2_field_name($qHanle, $offset);\r\n\t}",
"public function showAsField() {\n return $this->configuration['show_as_field'];\n }",
"public function getName()\n {\n return 'translatable_field';\n }",
"public function getFieldNames() {}",
"public function getIdFieldName()\n {\n return $this->_idFieldName;\n }",
"protected function addNamesLabelsValues() {\n foreach ($this->__fields() as $field) {\n $this->$field->__name = $field;\n if (!$this->$field->label && $this->$field->label !== '') $this->$field->label = strtoupper($field[0]) . substr ($field, 1);\n $this->setFieldValue($field);\n $this->$field->setForm($this);\n }\n }",
"public function getField(){\n return $this->field;\n }",
"public function getName()\n {\n return 'field_widget';\n }",
"public function getFieldName(): float|int|string|null\n {\n return $this->field?->getFieldName();\n }"
] | [
"0.85888934",
"0.8006008",
"0.7874715",
"0.7757387",
"0.7756327",
"0.7720972",
"0.7611952",
"0.7594246",
"0.75942224",
"0.75537986",
"0.7534981",
"0.7510652",
"0.74924153",
"0.7444177",
"0.7436201",
"0.7436201",
"0.7436201",
"0.73844594",
"0.73829764",
"0.7267953",
"0.72235864",
"0.7219606",
"0.71852875",
"0.71551186",
"0.7130789",
"0.71188706",
"0.7113209",
"0.71080416",
"0.70989734",
"0.70892805",
"0.7072622",
"0.70662683",
"0.7015881",
"0.6999574",
"0.6988007",
"0.6979077",
"0.69782704",
"0.6956585",
"0.6932018",
"0.6913696",
"0.68913394",
"0.6889777",
"0.68893117",
"0.68795973",
"0.68685913",
"0.6867291",
"0.6866975",
"0.6852069",
"0.684078",
"0.6836331",
"0.6834952",
"0.6823217",
"0.68206376",
"0.68167365",
"0.6807492",
"0.67988765",
"0.67930925",
"0.67837036",
"0.6781142",
"0.6763808",
"0.6759074",
"0.675085",
"0.6741689",
"0.67414063",
"0.673401",
"0.6733656",
"0.67241836",
"0.6717035",
"0.67143506",
"0.6692459",
"0.6692459",
"0.6692459",
"0.6692459",
"0.6692459",
"0.6692459",
"0.6688162",
"0.6679453",
"0.6678273",
"0.66602486",
"0.6654547",
"0.664281",
"0.66272885",
"0.66266245",
"0.66188943",
"0.6601719",
"0.6601719",
"0.6601719",
"0.65902704",
"0.6586889",
"0.6578829",
"0.65658003",
"0.65653604",
"0.6557029",
"0.655676",
"0.655222",
"0.65490675",
"0.6544238",
"0.65335023",
"0.6531466",
"0.6530744"
] | 0.815123 | 1 |
overriding a method just to call the same method from the super class without performing any other actions is useless and misleading; | public function __construct(DrawingApi $drawingApi)
{
$this->drawingApi = $drawingApi;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function test3(){\n echo \"test3 method overridden<br>\";\n }",
"public function test1(){\n echo \"test1 method overridden</br>\";\n }",
"public function test5(){\n echo \"test5 method overidden<br>\";\n }",
"final public function moreTesting() {\n echo \"BaseClass::moreTesting() called\\n\";\n }",
"final public function moreTesting() {\n echo \"BaseClass::moreTesting() called\\n\";\n }",
"public function myFunc(){\n //calling parent myfunction\n parent::myFunc();\n\n echo \"<br>Myclass1 function\";\n\n }",
"public function abc(){\r\n\t\techo 'abc method from child class';\r\n\t}",
"protected function protected_method() {}",
"private function _callToDefault()\n {\n foreach (get_class_methods($this) as $method) {\n try {\n $that = new ReflectionMethod($this, $method);\n } catch (ReflectionException $exception) {\n break;\n }\n if (\n $that->isProtected()\n && !array_key_exists($method, $this->query())\n ) {\n $this->{$method}($this->builder);\n }\n }\n }",
"protected function baseOperation1(): void\n {\n echo \"AbstractClass says: I am doing the bulk of the work\\n\";\n }",
"public function method() {\n\t}",
"abstract protected function doEvil();",
"function chouXiang()\n {\n echo '必须继承重写的抽象类的抽象方法'.'</br>';\n }",
"private function method2()\n\t{\n\t}",
"private function __construct()\n {\n // disabled method\n }",
"abstract protected function setMethod();",
"public function getBase(): void {}",
"public function __construct()\r\n\t{\r\n\t\techo \"Implements Function overloading\";\r\n\t}",
"private function method1()\n\t{\n\t}",
"public function overload(): void;",
"abstract protected function _unimplemented() : Exception;",
"abstract protected function _unimplemented() : Exception;",
"abstract protected function _unimplemented() : Exception;",
"abstract public function inherit($parent);",
"abstract public function otherfoo();",
"function qa_call_override($function, $args)\n{\n\tglobal $qa_overrides;\n\n\tif (strpos($function, '_override_') !== false) {\n\t\tqa_fatal_error('Override functions should not be calling qa_call_override()!');\n\t}\n\n\tif (!function_exists($function . '_base')) {\n\t\t// define the base function the first time that it's needed\n\t\teval('function ' . $function . '_base() { global $qa_direct; $qa_direct[\\'' . $function . '\\']=true; $args=func_get_args(); return qa_call(\\'' . $function . '\\', $args); }');\n\t}\n\n\treturn qa_call($qa_overrides[$function], $args);\n}",
"protected abstract function applyNoArg();",
"abstract public function __invoke(): void;",
"public function custom()\n\t{\n\t}",
"abstract protected function before();",
"public function oops () {\n }",
"function call_delete() {\n parent::call_delete();\n }",
"public function getDefaultMethodNotMain()\n {\n return 2;\n }",
"function __call($methodName, $args)\n {\n echo 'undefined method name: ' . $methodName;\n exit;\n }",
"protected function beforeMethod()\n {\n }",
"function method_no_specs() {}",
"protected function __callHook($method, array & $arguments)\n { }",
"public function dummyMethod($arg)\n {\n }",
"public function run(){\n parent::run();\n //Do stuff...\n }",
"public function __construct()\n {\n // Hide the parent arguments from the public signature\n parent::__construct();\n }",
"private function private_method() {}",
"public function method();",
"public function method();",
"public function method();",
"public function method();",
"function overload() { }",
"function overload() { }",
"protected abstract function before();",
"public function __call($method, $arguments) {}",
"public function __call($method, $arguments) {}",
"public function __call($method, array $arguments) {}",
"protected abstract function performImpl();",
"public function __construct()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n parent::__construct();\n }",
"public function __construct()\n {\n clearos_profile(__METHOD__, __LINE__);\n parent::__construct('smartd');\n }",
"public function isOverrideAllowed();",
"public function __wakeup()\n {\n _doing_it_wrong(__FUNCTION__, __('Cheatin’ huh?'), $this->parent->_version);\n }",
"protected function callCommandMethod() {}",
"public function inOriginal();",
"public function __invoke()\n {\n }",
"public function __wakeup () {\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?' ), $this->parent->_version );\n\t}",
"public function __wakeup () {\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?' ), $this->parent->_version );\n\t}",
"public function call() {\n\t\treturn false;\n\t}",
"function __call($method, $params)\n {\n if ($method == 'delete') {\n return $this->_delete();\n }\n\n trigger_error(\"Call to undefined method \" . get_class($this) . \"::{$method}()\", E_USER_ERROR);\n die;\n }",
"public function pre_action()\n\t{\n\t\tparent::pre_action();\n\t}",
"function __construct(){parent::__construct();}",
"public static function methodAnnoExtends($className, $method, $superAnnotationClassName)\n {\n return static::annoExtends(static::byMethod($className, $method), $superAnnotationClassName);\n }",
"public function protectedMethod()\n {\n $this->getInitialContext()->getSystemLogger()->info(\n sprintf('%s has successfully been invoked', __METHOD__)\n );\n }",
"protected function __construct() {\r\r\n // contain shared code in its constructor\r\r\n parent::__construct();\t\r\r\n\t}",
"abstract function before();",
"public function method()\n {\n\n }",
"private function __clone()\n {\n // @codeCoverageIgnoreStart\n throw new BadMethodCallException();\n // @codeCoverageIgnoreEnd\n }",
"private function __clone()\n {\n // @codeCoverageIgnoreStart\n throw new BadMethodCallException();\n // @codeCoverageIgnoreEnd\n }",
"public function __callIntern($methodName);",
"public function nothing(): void;",
"final public function onOutOfBand (): void {\n // do nothing\n }",
"public function __clone()\n {\n _doing_it_wrong(__FUNCTION__, __('Cheatin’ huh?'), $this->parent->_version);\n }",
"protected function protectedMethodWithNoArguments()\n {\n return 'protected:no-arguments';\n }",
"public function overrideUC() {}",
"private function forgotRun()\n {\n //If no executed run method then run it now.\n if (!$this->mergeCollection && !$this->baseCollection)\n $this->run();\n }",
"function runkit_class_adopt($classname, $parentname)\n{\n}",
"abstract protected function doWorkChildImpl();",
"protected function fixSelf() {}",
"protected function fixSelf() {}",
"function __construct() {\n\t\tparent::__construct();\n\t\techo \"<p>Die Konstruktormethode der Subklasse wurde abgearbeitet.</p>\";\n\t}",
"public function __call($method, $message)\n {\n }",
"private function __() {\n }",
"public function __construct(){parent::__construct();}",
"function __call($name, $arguments)\n {\n echo \"方法不存在\";\n }",
"public function nop()\n {\n }",
"private function __call($method)\r\n\t{\r\n\t\tthrow new TACException('Invalid method called => (' . __CLASS__ . '::' . $method . ')');\r\n\t}",
"function runkit_method_copy($dClass, $dMethod, $sClass, $sMethod = null)\n{\n}",
"public function testRespondsToParentCall() {\n\t\terror_reporting(($backup = error_reporting()) & ~E_USER_DEPRECATED);\n\n\t\t$this->assertTrue(Locale::respondsTo('invokeMethod'));\n\t\t$this->assertFalse(Locale::respondsTo('fooBarBaz'));\n\n\t\terror_reporting($backup);\n\t}",
"public function __clone () {\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?' ), $this->parent->_version );\n\t}",
"public function __clone () {\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?' ), $this->parent->_version );\n\t}",
"public function __invoke()\n {\n\n }",
"public function __construct(){\n\t\t/* calling parent construct */\n\t\tparent::__construct();\n\t}",
"public function __construct(){\n\t\t/* calling parent construct */\n\t\tparent::__construct();\n\t}",
"protected function callActionMethod() {}",
"public function __wakeup() {\n _doing_it_wrong(__FUNCTION__, '', $this->parent->_version);\n }",
"public function run()\n {\n /* this particular object won't run */\n }",
"public function avoidMethod(string $method): bool {}"
] | [
"0.6797181",
"0.6755164",
"0.66392714",
"0.6355156",
"0.6355156",
"0.6269181",
"0.62642145",
"0.6229907",
"0.60907584",
"0.60673046",
"0.60358083",
"0.60155857",
"0.5945254",
"0.5925487",
"0.5893805",
"0.5887868",
"0.5840724",
"0.58375823",
"0.583276",
"0.57541615",
"0.5739599",
"0.5739599",
"0.5739599",
"0.57187235",
"0.57152075",
"0.570785",
"0.57018363",
"0.5701819",
"0.56512827",
"0.5608579",
"0.55961746",
"0.55683875",
"0.55627924",
"0.55608296",
"0.5545219",
"0.55370665",
"0.55358696",
"0.5525997",
"0.55227655",
"0.5522171",
"0.55193585",
"0.55157465",
"0.55157465",
"0.55157465",
"0.55157465",
"0.55089295",
"0.55089295",
"0.54971695",
"0.54965264",
"0.54965264",
"0.5463125",
"0.54606",
"0.5458515",
"0.54580045",
"0.5457327",
"0.5456008",
"0.5439877",
"0.5427065",
"0.5424231",
"0.5420765",
"0.5420765",
"0.5419385",
"0.54189897",
"0.54027295",
"0.53941464",
"0.539278",
"0.5390773",
"0.5381335",
"0.53808814",
"0.53786397",
"0.53681713",
"0.53681713",
"0.5367571",
"0.536618",
"0.53598297",
"0.53589016",
"0.5355455",
"0.5353123",
"0.53389525",
"0.53371716",
"0.53357196",
"0.53203887",
"0.53203887",
"0.53124374",
"0.53049785",
"0.52973384",
"0.52945256",
"0.52942276",
"0.5278895",
"0.5271345",
"0.5269043",
"0.5267128",
"0.5250747",
"0.5250747",
"0.5246339",
"0.52397794",
"0.52397794",
"0.5235664",
"0.52345604",
"0.52318233",
"0.52292913"
] | 0.0 | -1 |
Plugin Name: Two Column Data Description: Simple Two Column Data Version: 1.0 Author: rjoaquin | function the_table ( $content ) {
return $content .= '<table>
<tr><th>Column 1</th><th>Column 2</th<</tr>
<tr><td>Column 1 Text 1</td><td>Column 2 Text 1</td></tr>
<tr><td>Column 1 Text 2</td><td>Column 2 Text 2</td></tr>
</table>';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public static function columnData();",
"function columns_data( $column ) {\r\n\r\n\t\tglobal $post, $wp_taxonomies;\r\n\r\n\t\tswitch( $column ) {\r\n\t\t\tcase \"listing_thumbnail\":\r\n\t\t\t\tprintf( '<p>%s</p>', genesis_get_image( array( 'size' => 'thumbnail' ) ) );\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"listing_details\":\r\n\t\t\t\tforeach ( (array) $this->property_details['col1'] as $label => $key ) {\r\n\t\t\t\t\tprintf( '<b>%s</b> %s<br />', esc_html( $label ), esc_html( get_post_meta($post->ID, $key, true) ) );\r\n\t\t\t\t}\r\n\t\t\t\tforeach ( (array) $this->property_details['col2'] as $label => $key ) {\r\n\t\t\t\t\tprintf( '<b>%s</b> %s<br />', esc_html( $label ), esc_html( get_post_meta($post->ID, $key, true) ) );\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"listing_features\":\r\n\t\t\t\techo get_the_term_list( $post->ID, 'features', '', ', ', '' );\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"listing_categories\":\r\n\t\t\t\tforeach ( (array) get_option( $this->settings_field ) as $key => $data ) {\r\n\t\t\t\t\tprintf( '<b>%s:</b> %s<br />', esc_html( $data['labels']['singular_name'] ), get_the_term_list( $post->ID, $key, '', ', ', '' ) );\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t}",
"public static function second_column() {\r\n\r\n echo '<div class=\"sup-doublet-second-column uk-width-expand\">';\r\n\r\n }",
"public function column_plugins($blog)\n {\n }",
"function get_columns() {\n return $columns= array(\n 'col_what'=>__('What','wpwt'),\n 'col_user'=>__('User Name','wpwt'),\n 'col_groupName'=>__('Group Name','wpwt'),\n 'col_application'=>__('Application','wpwt')\n );\n }",
"function get_columns() {\n\n return $columns= array(\n 'cb' => '<input type=\"checkbox\" onclick=\"jQuery(\\'.hypernews_checkbox\\').toggleCheckbox();\" />',\n 'status'=>'<img src=\"'.WP_PLUGIN_URL.'/hypernews/img/tag.png\" />',\n 'title'=>__('Headline', 'hypernews'),\n 'pubdate'=>__('Published', 'hypernews'),\n 'channel'=>__('Channel', 'hypernews'),\n 'source'=>__('Source', 'hypernews'),\n 'notes'=>__('Note', 'hypernews')\n );\n}",
"function add_custom_columns($column) \n {\n global $post;\n \n //var_dump($post);\n switch($column) {\n case 'shortcode':\n printf(\"[bbquote id='%s']\", $post->ID);\n break;\n case 'quote':\n echo $post->post_content;\n break;\n }\n }",
"private function renderTwoColumns(array $columnData) {\n\t\t$this->setMarker(\n\t\t\t'column_content_1', $this->renderRawColumn($columnData[0])\n\t\t);\n\t\t$this->setMarker(\n\t\t\t'column_content_2', $this->renderRawColumn($columnData[1])\n\t\t);\n\n\t\treturn $this->getSubpart('TWO_COLUMNS');\n\t}",
"function Viradeco_add_user_columns($column) {\n $column['viraclub'] = __('ViraClub ID','itstar');\n $column['phone'] = __('Phone','itstar');\n $column['email'] = __('Email','itstar');\n \n return $column;\n}",
"static function get_column_info( $page = '' ) {\n\n\t\t$columns = array(\n\t\t\t'posts' => array(\n\t\t\t\t'author' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-posts-author',\n\t\t\t\t\t\t'title' => _x( 'Author', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'categories' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-posts-categories',\n\t\t\t\t\t\t'title' => _x( 'Categories', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'tags' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-posts-tags',\n\t\t\t\t\t\t'title' => _x( 'Tags', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'comments' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-posts-comments',\n\t\t\t\t\t\t'title' => _x( 'Comments', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'date' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-posts-date',\n\t\t\t\t\t\t'title' => _x( 'Date', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\t'pages' => array(\n\t\t\t\t'author' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-pages-author',\n\t\t\t\t\t\t'title' => _x( 'Author', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor',\n\t\t\t\t\t\t\t'author'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0,\n\t\t\t\t\t\t\t'author' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'comments' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-pages-comments',\n\t\t\t\t\t\t'title' => _x( 'Comments', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor',\n\t\t\t\t\t\t\t'author'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0,\n\t\t\t\t\t\t\t'author' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'date' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-pages-date',\n\t\t\t\t\t\t'title' => _x( 'Date', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor',\n\t\t\t\t\t\t\t'author'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0,\n\t\t\t\t\t\t\t'author' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\t'media' => array(\n\t\t\t\t'icon' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-media-icon',\n\t\t\t\t\t\t'title' => _x( 'File icon / thumbnail preview', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'author' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-media-author',\n\t\t\t\t\t\t'title' => _x( 'Author', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'parent' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-media-parent',\n\t\t\t\t\t\t'title' => _x( 'Uploaded to', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'comments' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-media-comments',\n\t\t\t\t\t\t'title' => _x( 'Comments', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'date' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-media-date',\n\t\t\t\t\t\t'title' => _x( 'Date', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\t'users' => array(\n\t\t\t\t'username' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-users-username',\n\t\t\t\t\t\t'help' => __( 'The user\\'s username and avatar', 'clientside' ),\n\t\t\t\t\t\t'title' => __( 'Username' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor',\n\t\t\t\t\t\t\t'author',\n\t\t\t\t\t\t\t'editor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0,\n\t\t\t\t\t\t\t'author' => 0,\n\t\t\t\t\t\t\t'editor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'name' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-users-name',\n\t\t\t\t\t\t'title' => _x( 'Name', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'help' => __( 'The user\\'s full name', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor',\n\t\t\t\t\t\t\t'author',\n\t\t\t\t\t\t\t'editor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0,\n\t\t\t\t\t\t\t'author' => 0,\n\t\t\t\t\t\t\t'editor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'email' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-users-email',\n\t\t\t\t\t\t'title' => _x( 'E-mail', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor',\n\t\t\t\t\t\t\t'author',\n\t\t\t\t\t\t\t'editor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0,\n\t\t\t\t\t\t\t'author' => 0,\n\t\t\t\t\t\t\t'editor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'role' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-users-role',\n\t\t\t\t\t\t'title' => _x( 'Role', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor',\n\t\t\t\t\t\t\t'author',\n\t\t\t\t\t\t\t'editor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0,\n\t\t\t\t\t\t\t'author' => 0,\n\t\t\t\t\t\t\t'editor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'posts' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-users-posts',\n\t\t\t\t\t\t'title' => _x( 'Posts', 'Admin column title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'help' => __( 'The user\\'s post count', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'disabled-for' => array(\n\t\t\t\t\t\t\t'subscriber',\n\t\t\t\t\t\t\t'contributor',\n\t\t\t\t\t\t\t'author',\n\t\t\t\t\t\t\t'editor'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'clientside-default' => 1,\n\t\t\t\t\t\t\t'subscriber' => 0,\n\t\t\t\t\t\t\t'contributor' => 0,\n\t\t\t\t\t\t\t'author' => 0,\n\t\t\t\t\t\t\t'editor' => 0\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t// WooCommerce columns\n\t\tif ( class_exists( 'WooCommerce' ) ) {\n\t\t\t$columns['woocommerce-products'] = array(\n\t\t\t\t'thumb' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-thumb',\n\t\t\t\t\t\t'title' => __( 'Product image', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'name' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-name',\n\t\t\t\t\t\t'title' => __( 'Product title', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'sku' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-sku',\n\t\t\t\t\t\t'title' => __( 'SKU', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'is_in_stock' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-is_in_stock',\n\t\t\t\t\t\t'title' => __( 'Stock', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'price' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-price',\n\t\t\t\t\t\t'title' => __( 'Price', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'product_cat' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-product_cat',\n\t\t\t\t\t\t'title' => __( 'Categories', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'product_tag' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-product_tag',\n\t\t\t\t\t\t'title' => __( 'Tags', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'featured' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-featured',\n\t\t\t\t\t\t'title' => __( 'Featured product', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'product_type' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-product_type',\n\t\t\t\t\t\t'title' => __( 'Product type', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'date' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-products-date',\n\t\t\t\t\t\t'title' => __( 'Date', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['woocommerce-orders'] = array(\n\t\t\t\t'order_status' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-order_status',\n\t\t\t\t\t\t'title' => __( 'Order status', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'order_title' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-order_title',\n\t\t\t\t\t\t'title' => __( 'Order', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'order_items' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-order_items',\n\t\t\t\t\t\t'title' => __( 'Order items', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'billing_address' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-billing_address',\n\t\t\t\t\t\t'title' => __( 'Billing address', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'shipping_address' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-shipping_address',\n\t\t\t\t\t\t'title' => __( 'Shipping address', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'customer_message' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-customer_message',\n\t\t\t\t\t\t'title' => __( 'Customer message', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'order_notes' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-order_notes',\n\t\t\t\t\t\t'title' => __( 'Order notes', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'order_date' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-order_date',\n\t\t\t\t\t\t'title' => __( 'Order date', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'order_total' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-order_total',\n\t\t\t\t\t\t'title' => __( 'Order total', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'order_actions' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-orders-order_actions',\n\t\t\t\t\t\t'title' => __( 'Order actions', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['woocommerce-coupons'] = array(\n\t\t\t\t'coupon_code' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-coupons-coupon_code',\n\t\t\t\t\t\t'title' => __( 'Coupon code', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'type' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-coupons-type',\n\t\t\t\t\t\t'title' => __( 'Coupon type', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'amount' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-coupons-amount',\n\t\t\t\t\t\t'title' => __( 'Coupon value', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'description' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-coupons-description',\n\t\t\t\t\t\t'title' => __( 'Description', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'products' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-coupons-products',\n\t\t\t\t\t\t'title' => __( 'Product IDs', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'usage' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-coupons-usage',\n\t\t\t\t\t\t'title' => __( 'Usage / Limit', 'woocommerce' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'expiry_date' => array(\n\t\t\t\t\t'field' => array(\n\t\t\t\t\t\t'name' => 'admin-column-manager-woocommerce-coupons-expiry_date',\n\t\t\t\t\t\t'title' => __( 'Expiry date', 'clientside' ),\n\t\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t\t'default' => 1\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\t// Yoast columns\n\t\tif ( defined( 'WPSEO_FILE' ) ) {\n\n\t\t\t// Yoast: Posts\n\t\t\t$columns['posts']['wpseo-links'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-posts-wpseo-links',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Internal links', 'clientside' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['posts']['wpseo-score'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-posts-wpseo-score',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'SEO score', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['posts']['wpseo-score-readability'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-posts-wpseo-score-readability',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Readability score', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['posts']['wpseo-title'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-posts-wpseo-title',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'SEO Title', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['posts']['wpseo-metadesc'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-posts-wpseo-metadesc',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Meta Desc.', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['posts']['wpseo-focuskw'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-posts-wpseo-focuskw',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Focus KW', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['posts']['wpseo-links'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-posts-wpseo-links',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Internal links', 'clientside' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Yoast: Pages\n\t\t\t$columns['pages']['wpseo-links'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-pages-wpseo-links',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Internal links', 'clientside' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['pages']['wpseo-score'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-pages-wpseo-score',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'SEO score', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['pages']['wpseo-score-readability'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-pages-wpseo-score-readability',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Readability score', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['pages']['wpseo-title'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-pages-wpseo-title',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'SEO Title', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['pages']['wpseo-metadesc'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-pages-wpseo-metadesc',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Meta Desc.', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['pages']['wpseo-focuskw'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-pages-wpseo-focuskw',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Focus KW', 'wordpress-seo' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\t\t\t$columns['pages']['wpseo-links'] = array(\n\t\t\t\t'field' => array(\n\t\t\t\t\t'name' => 'admin-column-manager-pages-wpseo-links',\n\t\t\t\t\t'title' => sprintf( __( 'Yoast SEO: %s', 'clientside' ), __( 'Internal links', 'clientside' ) ),\n\t\t\t\t\t'secondary-title' => __( 'Enable for %s', 'clientside' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'role-based' => true,\n\t\t\t\t\t'default' => 1\n\t\t\t\t)\n\t\t\t);\n\n\t\t}\n\n\t\t// Return\n\t\tif ( $page ) {\n\t\t\treturn isset( $columns[ $page ] ) ? $columns[ $page ] : array();\n\t\t}\n\t\treturn $columns;\n\n\t}",
"function foool_partner_add_column($columns){\n\n $custom_columns = array();\n foreach($columns as $key => $title) {\n\n if ($key=='title') {\n $custom_columns['thumb'] = 'Visuel';\n $custom_columns[$key] = $title;\n } else { \n $custom_columns[$key] = $title;\n }\n }\n return $custom_columns;\n}",
"private function initColumns(){\n //Initialize our custom post type column management\n $this->cptWPDSCols = new Columns($this->wpdsPostType);\n \n //Remove our title\n $this->cptWPDSCols->removeColumn('title');\n \n //Add our content column\n $this->cptWPDSCols->addColumn('content', 'Content', 2);\n \n //Add our content column content\n $this->cptWPDSCols->addColumnPostContent('content');\n \n //Add our content column content\n $this->cptWPDSCols->addColumnOptionData('content', 'site_url');\n \n //Reposition column\n $this->cptWPDSCols->reorderColumn('content', 1);\n }",
"public function set_custom_columns_data( $column , $post_id )\n {\n $data = get_post_meta ( $post_id , '_mtk_testimonial_key' , true );\n\n /* Create the variables where we are going to sort the information */\n /* Author Name */\n $name = isset($data['name']) ? $data['name'] : '';\n /* Email */\n $email = isset($data['email']) ? $data['email'] : '';\n /* approved */\n $approved = ( isset($data['approved']) && ( $data['approved'] === 1 ) ) ? '<strong>YES</strong>' : 'NO';\n /* featured */\n $featured = ( isset($data['featured']) && ( $data['featured'] === 1 ) ) ? '<strong>YES</strong>' : 'NO';\n\n switch ( $column )\n {\n case 'name':\n echo '<strong>' . $name . '</strong><br /><a href=\"mailto:'. $email .'\">'. $email .'</a>';\n break;\n case 'approved':\n echo ($approved);\n break;\n case 'featured':\n echo ($featured);\n break;\n }\n }",
"function uc_group_columns( $columns ) {\n unset( $columns['date'] );\n $columns['school_year'] = __( 'School Year', UPTOWNCODE_PLUGIN_NAME );\n $columns['class'] = __( 'Class', UPTOWNCODE_PLUGIN_NAME );\n $columns['activity'] = __( 'Activity', UPTOWNCODE_PLUGIN_NAME );\n $columns['signup'] = __( 'Signup', UPTOWNCODE_PLUGIN_NAME );\n return $columns;\n}",
"function ts_registerTmcePluginColumns($plugin_array)\r\n{\r\n\t$plugin_array['ColumnsSelector'] = get_template_directory_uri() . '/framework/js/tinymce_ColumnsSelector.js.php';\r\n\treturn $plugin_array;\r\n}",
"function get_columns()\n {\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />', //Render a checkbox instead of text\n// 'type' => 'Type',\n// 'name' => 'Name',\n 'tag' => 'Shortcode Name',\n 'kind' => 'Kind',\n 'description' => 'Description',\n 'example' => 'Example',\n 'code' => 'Code',\n 'created_datetime' => 'Created Datetime'\n );\n return $columns;\n }",
"public function column()\r\n {\r\n if (!empty($this->configs->column))\r\n return $this->configs->column;\r\n\r\n return ZArrayHelper::merge(parent::column(), [\r\n\r\n 'program' => function (FormDb $column) {\r\n\r\n $column->index = true;\r\n $column->title = Az::l('Программа Обучения');\r\n $column->tooltip = Az::l('Программа Обучения Стипендианта');\r\n $column->dbType = dbTypeString;\r\n $column->data = [\r\n 'intern' => Az::l('Стажировка'),\r\n 'doctors' => Az::l('Докторантура'),\r\n 'masters' => Az::l('Магистратура'),\r\n 'qualify' => Az::l('Повышение квалификации'),\r\n ];\r\n $column->rules = [\r\n [\r\n 'zetsoft\\\\system\\\\validate\\\\ZRequiredValidator',\r\n ],\r\n ];\r\n $column->widget = ZKSelect2Widget::class;\r\n\r\n //start|AlisherXayrillayev|2020-10-16\r\n //$column->ajax = false;\r\n //end|AlisherXayrillayev|2020-10-16\r\n\r\n return $column;\r\n },\r\n\r\n 'currency' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Валюта');\r\n $column->tooltip = Az::l('Валюта');\r\n $column->dbType = dbTypeString;\r\n $column->data = CurrencyData::class;\r\n $column->widget = ZKSelect2Widget::class;\r\n $column->rules = ZRequiredValidator::class;\r\n //start|AlisherXayrillayev|2020-10-16\r\n $column->ajax = false;\r\n //end|AlisherXayrillayev|2020-10-16\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'email' => function (FormDb $column) {\r\n\r\n $column->index = true;\r\n $column->title = Az::l('E-mail');\r\n $column->tooltip = Az::l('Электронный адрес стипендианта (E-mail)');\r\n $column->dbType = dbTypeString;\r\n $column->rules = [\r\n [\r\n 'zetsoft\\\\system\\\\validate\\\\ZRequiredValidator',\r\n ],\r\n [\r\n validatorEmail,\r\n ],\r\n [\r\n validatorUnique,\r\n ],\r\n ];\r\n $column->hiddenFromExport = true;\r\n $column->changeSave = true;\r\n return $column;\r\n },\r\n\r\n 'passport' => function (FormDb $column) {\r\n\r\n $column->index = true;\r\n $column->title = Az::l('Серия и номер паспорта');\r\n $column->tooltip = Az::l('Серия и номер паспорта стипендианта');\r\n $column->dbType = dbTypeString;\r\n $column->rules = [\r\n [\r\n 'zetsoft\\\\system\\\\validate\\\\ZRequiredValidator',\r\n ],\r\n [\r\n validatorUnique,\r\n ],\r\n ];\r\n $column->widget = ZInputMaskWidget::class;\r\n $column->options = [\r\n 'config' => [\r\n 'type' => 'ready',\r\n 'ready' => 'AA-9999999',\r\n ],\r\n ];\r\n \r\n return $column;\r\n },\r\n\r\n\r\n 'passport_give' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Когда и кем выдан');\r\n $column->tooltip = Az::l('Когда и кем выдан пасспорт');\r\n $column->dbType = dbTypeString;\r\n $column->rules = [\r\n [\r\n 'zetsoft\\\\system\\\\validate\\\\ZRequiredValidator',\r\n ],\r\n ];\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'birthdate' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Дата рождение');\r\n $column->tooltip = Az::l('Дата рождение стипендианта');\r\n $column->dbType = dbTypeDate;\r\n $column->rules = [\r\n [\r\n 'zetsoft\\\\system\\\\validate\\\\ZRequiredValidator',\r\n ],\r\n ];\r\n $column->auto = true;\r\n $column->value = function (EyufScholar $model) {\r\n return Az::$app->cores->date->fbDate();\r\n };\r\n $column->widget = ZKDatepickerWidget::class;\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'user_id' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Пользователь');\r\n $column->tooltip = Az::l('Пользователь');\r\n $column->dbType = dbTypeInteger;\r\n $column->showForm = false;\r\n $column->widget = ZKSelect2Widget::class;\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'place_country_id' => function (FormDb $column) {\r\n\r\n $column->index = true;\r\n $column->title = Az::l('Страна обучение');\r\n $column->tooltip = Az::l('Страна обучения пользователя');\r\n $column->dbType = dbTypeInteger;\r\n $column->rules = [\r\n [\r\n 'zetsoft\\\\system\\\\validate\\\\ZRequiredValidator',\r\n ],\r\n ];\r\n $column->widget = ZKSelect2Widget::class;\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'status' => function (FormDb $column) {\r\n\r\n $column->index = true;\r\n $column->title = Az::l('Статус');\r\n $column->tooltip = Az::l('Статус стипендианта');\r\n $column->dbType = dbTypeString;\r\n $column->data = [\r\n 'register' => Az::l('Стипендиант зарегистрирован'),\r\n 'docReady' => Az::l('Все документы загружены'),\r\n 'stipend' => Az::l('Утвержден отделом стипендий'),\r\n 'accounter' => Az::l('Утвержден отделом бухгалтерии'),\r\n 'education' => Az::l('Учеба завершена'),\r\n 'process' => Az::l('Учеба завершена'),\r\n ];\r\n\r\n //start|JakhongirKudratov|2020-10-27\r\n\r\n $column->event = function (EyufScholar $model) {\r\n Az::$app->App->eyuf->scholar->sendNotify($model);\r\n\r\n };\r\n\r\n //end|JakhongirKudratov|2020-10-27\r\n\r\n $column->widget = ZKSelect2Widget::class;\r\n\r\n //start|AlisherXayrillayev|2020-10-16\r\n $column->ajax = false;\r\n //end|AlisherXayrillayev|2020-10-16\r\n\r\n $column->showForm = false;\r\n $column->width = '200px';\r\n $column->hiddenFromExport = true;\r\n /*$column->roleShow = [\r\n 'scholar',\r\n 'user',\r\n 'guest',\r\n 'admin',\r\n 'accounter'\r\n ];*/\r\n\r\n return $column;\r\n },\r\n\r\n 'age' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Возраст');\r\n $column->tooltip = Az::l('Возраст стипендианта');\r\n $column->dbType = dbTypeInteger;\r\n $column->autoValue = function (EyufScholar $model) {\r\n return Az::$app->App->eyuf->user->getAge($model->birthdate);\r\n };\r\n\r\n $column->rules = [\r\n [\r\n validatorInteger,\r\n ],\r\n ];\r\n\r\n\r\n $column->showForm = false;\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'edu_start' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Начала обучения');\r\n $column->tooltip = Az::l('Начала обучения стипендианта');\r\n $column->dbType = dbTypeDate;\r\n $column->widget = ZKDatepickerWidget::class;\r\n $column->options = [\r\n 'config' => [\r\n 'type' => 2,\r\n 'pickerButton' => [\r\n 'icon' => '',\r\n ],\r\n 'pluginOptions' => [\r\n 'autoclose' => true,\r\n 'format' => 'dd-M-yyyy',\r\n ],\r\n 'hasIcon' => true,\r\n ],\r\n ];\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'edu_end' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Завершение обучения');\r\n $column->tooltip = Az::l('Завершение обучения стипендианта');\r\n $column->dbType = dbTypeDate;\r\n $column->widget = ZKDatepickerWidget::class;\r\n $column->options = [\r\n 'config' => [\r\n 'type' => 2,\r\n 'pickerButton' => [\r\n 'icon' => '',\r\n ],\r\n 'pluginOptions' => [\r\n 'autoclose' => true,\r\n 'format' => 'dd-M-yyyy',\r\n ],\r\n 'hasIcon' => true,\r\n ],\r\n ];\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'user_company_id' => function (FormDb $column) {\r\n\r\n $column->index = true;\r\n $column->title = Az::l('Вышестоящая организация');\r\n $column->tooltip = Az::l('Вышестоящая организация');\r\n $column->dbType = dbTypeInteger;\r\n $column->rules = [\r\n [\r\n 'zetsoft\\\\system\\\\validate\\\\ZRequiredValidator',\r\n ],\r\n ];\r\n $column->widget = ZKSelect2Widget::class;\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'company_type' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Тип рабочего места');\r\n $column->tooltip = Az::l('Тип рабочего места стипендианта');\r\n $column->dbType = dbTypeString;\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'edu_area' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Область знаний');\r\n $column->tooltip = Az::l('Область знаний стипендианта');\r\n $column->dbType = dbTypeString;\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'edu_sector' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Сектор образования');\r\n $column->tooltip = Az::l('Сектор образования стипендианта');\r\n $column->dbType = dbTypeString;\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'edu_type' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Направление образования');\r\n $column->tooltip = Az::l('Направление образования стипендианта');\r\n $column->dbType = dbTypeString;\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'speciality' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Специальность');\r\n $column->tooltip = Az::l('Специальность стипендианта');\r\n $column->dbType = dbTypeString;\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'edu_place' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Место обучения(ВУЗ)');\r\n $column->tooltip = Az::l('Место обучения(ВУЗ) стипендианта');\r\n $column->dbType = dbTypeInteger;\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'finance' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Источник финансирования');\r\n $column->tooltip = Az::l('Источник финансирования стипендианта');\r\n $column->dbType = dbTypeInteger;\r\n //start|AsrorZakirov|2020-10-25\r\n\r\n $column->showForm = false;\r\n\r\n//end|AsrorZakirov|2020-10-25\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'address' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Постоянный адрес проживания');\r\n $column->tooltip = Az::l('Постоянный адрес проживания стипендианта');\r\n $column->dbType = dbTypeString;\r\n $column->hiddenFromExport = true;\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'phone' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Сотовый телефон');\r\n $column->tooltip = Az::l('Сотовый телефон стипендианта');\r\n $column->dbType = dbTypeString;\r\n $column->rules = [\r\n [\r\n 'zetsoft\\\\system\\\\validate\\\\ZRequiredValidator',\r\n ],\r\n [\r\n validatorUnique,\r\n ],\r\n ];\r\n $column->widget = ZInputMaskWidget::class;\r\n $column->options = [\r\n 'config' => [\r\n 'ready' => '99-999-99-99',\r\n ],\r\n ];\r\n $column->hiddenFromExport = true;\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'home_phone' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Домашний Телефон');\r\n $column->tooltip = Az::l('Домашний Телефон Стипендианта');\r\n $column->dbType = dbTypeString;\r\n $column->widget = ZInputMaskWidget::class;\r\n $column->options = [\r\n 'config' => [\r\n 'ready' => '99-999-99-99',\r\n ],\r\n ];\r\n $column->hiddenFromExport = true;\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'position' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Должность');\r\n $column->tooltip = Az::l('Должность стипендианта');\r\n $column->dbType = dbTypeString;\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'experience' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Стаж работы (месяц)');\r\n $column->tooltip = Az::l('Стаж работы стипендианта (месяц)');\r\n $column->dbType = dbTypeString;\r\n $column->rules = [\r\n [\r\n 'zetsoft\\\\system\\\\validate\\\\ZRequiredValidator',\r\n ],\r\n [\r\n validatorInteger,\r\n ],\r\n ];\r\n $column->widget = ZKTouchSpinWidget::class;\r\n\r\n return $column;\r\n },\r\n\r\n\r\n 'completed' => function (FormDb $column) {\r\n\r\n $column->title = Az::l('Обучение завершено?');\r\n $column->tooltip = Az::l('Завершено ли обучение стипендианта?');\r\n $column->dbType = dbTypeBoolean;\r\n $column->widget = ZKSwitchInputWidget::class;\r\n\r\n return $column;\r\n },\r\n\r\n\r\n ], $this->configs->replace);\r\n }",
"function my_custom_admin_product_columns( $columns ) {\n $columns['author'] = __( 'Author', 'dokan' );\n\n return $columns;\n}",
"function custom_columns( $columns ) {\n\t$columns = array(\n\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t'title' => 'Title',\n\t\t'featured_image' => 'Photo',\n\t\t'date' => 'Date'\n\t);\n\treturn $columns;\n}",
"function heateor_ss_add_custom_column($columns){\r\n\t$columns['heateor_ss_delete_profile_data'] = 'Delete Social Profile';\r\n\treturn $columns;\r\n}",
"public function previewColumns();",
"function get_columns(){\n $columns = array(\n 'cb' \t\t=> '<input type=\"checkbox\" />', //Render a checkbox instead of text\n 'img' => __( 'Image', 'wp-lister-for-amazon' ),\n 'sku' => __( 'SKU', 'wp-lister-for-amazon' ),\n 'listing_title' \t=> __( 'Title', 'wp-lister-for-amazon' ),\n 'quantity'\t\t\t=> __( 'Stock', 'wp-lister-for-amazon' ),\n // 'quantity_sold'\t\t=> __( 'Sold', 'wp-lister-for-amazon' ),\n 'price' => __( 'Price', 'wp-lister-for-amazon' ),\n 'lowest_price' => str_replace(' ', ' ', __( 'Buy Box', 'wp-lister-for-amazon' ) ),\n 'loffer_price'\t\t=> __( 'Lowest Offer', 'wp-lister-for-amazon' ),\n // 'fees'\t\t\t\t=> __( 'Fees', 'wp-lister-for-amazon' ),\n 'date_published' => str_replace(' ', ' ', __( 'Created at', 'wp-lister-for-amazon' ) ),\n 'profile' => __( 'Profile', 'wp-lister-for-amazon' ),\n 'account' => __( 'Account', 'wp-lister-for-amazon' ),\n 'status'\t\t \t=> __( 'Status', 'wp-lister-for-amazon' )\n );\n\n // if ( ! get_option( 'wpla_enable_thumbs_column' ) )\n // unset( $columns['img'] );\n\n return $columns;\n }",
"function getColumns(){\r\n return array(\r\n 'log_id'=>array('label'=>'日志id','class'=>'span-3','readonly'=>true), \r\n 'member_id'=>array('label'=>'用户','class'=>'span-3','type'=>'memberinfo'), \r\n 'mtime'=>array('label'=>'交易时间','class'=>'span-2','type'=>'time'), \r\n 'memo'=>array('label'=>'业务摘要','class'=>'span-3'), \r\n 'import_money'=>array('label'=>'存入金额','class'=>'span-3','type'=>'import_money'), \r\n 'explode_money'=>array('label'=>'支出金额','class'=>'span-3','type'=>'explode_money'), \r\n 'member_advance'=>array('label'=>'当前余额','class'=>'span-3'), \r\n 'paymethod'=>array('label'=>'支付方式','class'=>'span-3'), \r\n 'payment_id'=>array('label'=>'支付单号','class'=>'span-3'), \r\n 'order_id'=>array('label'=>'订单号','class'=>'span-3'), \r\n 'message'=>array('label'=>'管理备注','class'=>'span-3'), \r\n 'money'=>array('label'=>'出入金额','class'=>'span-3','readonly'=>true), \r\n 'shop_advance'=>array('label'=>'商店余额','class'=>'span-3','readonly'=>true), \r\n );\r\n }",
"static function getColumns()\n {\n }",
"function oda_ordenanza_columns_content($column_name, $post_ID){\n\n if ( $_GET['post_type'] == 'ordenanza' ){\n\n if ( $column_name == 'ciudad'){\n $ciudad_ID = get_post_meta( $post_ID, ODA_PREFIX . 'ciudad_owner', true);\n $ciudad_color = get_post_meta( $ciudad_ID, ODA_PREFIX . 'ciudad_color', true);\n if ( empty( $ciudad_ID ) ){\n echo '<span class=\"label-status no-relation\">Sin ciudad</span>';\n }else{\n echo '<span class=\"label-status\" style=\"border-color:'. $ciudad_color .';\">' . get_the_title($ciudad_ID) . '</span>';\n }\n }\n\n if ( $column_name == 'tramite'){\n $nro_tramite = get_post_meta( $post_ID, ODA_PREFIX . 'resolucion_nro_tramite', true);\n if ($nro_tramite != '') {\n echo $nro_tramite;\n } else {\n _e('Sin número', 'oda');\n }\n }\n\n if ( $column_name == 'presentacion'){\n $fecha_presentacion = get_post_meta( $post_ID, ODA_PREFIX . 'resolucion_fecha', true);\n if ($fecha_presentacion != '') {\n echo $fecha_presentacion;\n } else {\n _e('Sin Fecha', 'oda');\n }\n }\n\n if ( $column_name == 'iniciativa'){\n $iniciativa_value = get_post_meta( $post_ID, ODA_PREFIX . 'ordenanza_iniciativa', true);\n\n $iniciativa_array = array(\n 'alcalde' => __( 'Alcalde', 'oda' ),\n 'concejal' => __( 'Concejal', 'oda' ),\n 'comisiones' => __( 'Comisiones', 'oda' ),\n 'ciudadania' => __( 'Ciudadanía', 'oda' ),\n );\n\n $ciudad_color = get_post_meta( $ciudad_ID, ODA_PREFIX . 'ciudad_color', true);\n if ( empty( $iniciativa_value ) ){\n echo '<span class=\"label-status no-relation\">Sin Iniciativa</span>';\n }else{\n echo '<span class=\"label-status\" style=\"border-color:'. $ciudad_color .';\">' . $iniciativa_array[$iniciativa_value] . '</span>';\n }\n }\n }\n\n}",
"function populate_custom_column ( $column, $post_id ) {\n switch ( $column ) {\n case 'prezzo':\n echo get_post_meta ( $post_id, 'prezzo', true ) . ' €';\n break;\n case 'ingredienti':\n echo get_post_meta ( $post_id, 'ingredienti', true );\n break;\n }\n }",
"function custom_columns_content( $column_name, $post_id ) {\r\n\r\n\t\tif ( 'event_date' == $column_name ) {\r\n\t\t\t$date = get_post_meta( $post_id, 'event-date', true );\r\n\t\t\t$time = get_post_meta( $post_id, 'event-time', true );\r\n\t\t\techo $date . '<br/>' . $time;\r\n\r\n\t\t}\r\n\r\n\t\tif ( 'event_location' == $column_name ) {\r\n\t\t\t$location = get_post_meta( $post_id, 'event-address', true );\r\n\t\t\techo $location;\r\n\t\t}\r\n\t}",
"abstract protected function columns();",
"function get_customizer_columns_user ()\t\r\n\t{\r\n\t\t\r\n\t\tglobal $xoouserultra;\r\n\t\t\r\n\t\t$cols = $this->get_amount_of_cols_by_template();\r\n\t\t\r\n\t\t$html = '';\r\n\t\t\r\n\t\t\r\n\t\t $dimension_style = $xoouserultra->userpanel->get_width_of_column($cols);\r\n\t\t\t\t\r\n\t\tif($cols==1 || $cols==2 || $cols==3)\r\n\t\t{\r\n\t\t\r\n\t\t\t$html .= ' <div class=\"col1\" '. $dimension_style.'> \r\n\t\t\t\t\t\t<h3 class=\"colname_widget\">'.__('Column 1','xoousers').'</h3> \r\n\t\t\t\t\t\t <ul class=\"droptrue\" id=\"uultra-prof-customizar-1\">\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t '.$this->get_profile_column_widgets(1).'\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t</ul> \r\n\t\t\t\t\t </div>';\r\n\t\t}\r\n\t\t\t\t \r\n\t\tif($cols==2 || $cols==3)\r\n\t\t{\r\n\t\t\r\n\t\t\t$html .=' <div class=\"col2\" '. $dimension_style.'> \r\n\t\t\t\t\t\t<h3 class=\"colname_widget\">'. __('Column 2','xoousers').'</h3> \r\n\t\t\t\t\t\t <ul class=\"droptrue\" id=\"uultra-prof-customizar-2\">\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t '.$this->get_profile_column_widgets(2).'\r\n\t\t\t\t\t\t </ul>\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t</div>';\r\n\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\tif($cols==3)\r\n\t\t{\r\n\t\t\r\n\t\t\t$html .='<div class=\"col3\" '. $dimension_style.'> \r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t <h3 class=\"colname_widget\">'.__('Column 3','xoousers').'</h3> \r\n\t\t\t\t\t\t <ul class=\"droptrue\" id=\"uultra-prof-customizar-3\">\r\n\t\t\t\t\t\t\t\t '.$this->get_profile_column_widgets(3).'\r\n\t\t\t\t\t\t\t </ul>\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t </div>';\r\n\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t$html .= $this->uultra_plugin_editor_form();\t\t \r\n\t\t\r\n\t\treturn $html;\r\n\t\r\n\t\r\n\t}",
"function testimonials_columns( $column, $post_id ) {\n\t$testimonial_data = get_post_meta( $post_id, '_testimonial', true );\n\tswitch ( $column ) {\n\t\tcase 'testimonial':\n\t\t\tthe_excerpt();\n\t\t\tbreak;\n\t\tcase 'testimonial-client-name':\n\t\t\tif ( ! empty( $testimonial_data['client_name'] ) )\n\t\t\t\techo $testimonial_data['client_name'];\n\t\t\tbreak;\n\t\tcase 'testimonial-client-job':\n\t\t\tif ( ! empty( $testimonial_data['client_job'] ) )\n\t\t\t\techo $testimonial_data['client_job'];\n\t\t\tbreak;\n\t\tcase 'testimonial-source':\n\t\t\tif ( ! empty( $testimonial_data['source'] ) )\n\t\t\t\techo $testimonial_data['source'];\n\t\t\tbreak;\n\t\tcase 'testimonial-link':\n\t\t\tif ( ! empty( $testimonial_data['link'] ) )\n\t\t\t\techo $testimonial_data['link'];\n\t\t\tbreak;\n\t}\n}",
"function register_columns() {\n\n\t\t$this->columns = array(\n\t 'cb' => '<input type=\"checkbox\" />',\n\t 'title' => __( 'Name', 'sudoh' ),\n\t 'example-column' => __( 'Example Column', 'sudoh' ),\n\t 'thumbnail' => __( 'Thumbnail', 'sudoh' )\n\t );\n\n\t return $this->columns;\n\n\t}",
"function get_columns() {\r\r\n $columns = array(\r\r\n 'cb' \t=> '<input type=\"checkbox\" />',\r\r\n 'title' \t=> __( 'Visitor' , 'sc_chat' ),\r\r\n 'email'\t\t\t=> __( 'E-mail', 'sc_chat' ),\r\r\n 'total_logs'\t=> __( 'Total Logs', 'sc_chat' ),\r\r\n\t\t\t'last_date'\t\t=> __( 'Last Chat Date', 'sc_chat' )\r\r\n );\r\r\n return $columns;\r\r\n }",
"function products_column_data( $column, $post_id ) {\r\n $output = '';\r\n\r\n switch( $column ) {\r\n case 'title':\r\n // Get the product Name\r\n $product_name = get_post_meta( $post_id, 'products_title', true );\r\n $output .= $product_name;\r\n break;\r\n case 'Background Color':\r\n // Get the product Background Color\r\n $bgcolor = get_post_meta( $post_id, 'background_color', true );\r\n $output .= $bgcolor;\r\n break;\r\n }\r\n\r\n // Echo the output\r\n echo $output;\r\n\r\n}",
"function sideReportColumns() {\n\t\treturn array(\n\t\t\t\"Title\" => array(\n\t\t\t\t\"title\" => \"Title\",\n\t\t\t\t\"link\" => true,\n\t\t\t),\n\t\t\t\"WFApproverTitle\" => array(\n\t\t\t\t\"title\" => \"Approver\",\n\t\t\t\t\"formatting\" => 'Approved by $value',\n\t\t\t),\n\t\t\t\"WFApprovedWhen\" => array(\n\t\t\t\t\"title\" => \"When\",\n\t\t\t\t\"formatting\" => ' on $value',\n\t\t\t\t'casting' => 'SS_Datetime->Full'\n\t\t\t),\n\t\t);\n\t}",
"function get_columns(){\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />', //Render a checkbox instead of text\n 'name' => 'Name',\n 'job' => 'Job',\n 'text' => 'Description',\n\t\t\t'job_en' => 'Job in english',\n 'text_en' => 'Description in english',\n\t\t\t'facebook' => 'Facebook Link',\n\t\t\t'linkedin' => 'Linkedin Link',\n\t\t\t'image' => 'Photo'\n\t\t\t\n );\n return $columns;\n }",
"function get_columns() {\r\n return $columns= array(\r\n 'col_created_on'=>__('Date'),\r\n 'col_type'=>__('Type'),\r\n 'col_ip'=>__('IP'),\r\n 'col_os'=>__('Operating System'),\r\n 'col_browser'=>__('Browser'),\r\n 'col_location'=>__('Location'),\r\n 'col_actions'=>__('Actions')\r\n );\r\n }",
"public function custom_column( $column_name, $post_id ){\r\n if ($column_name == 'template') {\r\n $settings = $this->data->get_slider_settings($post_id);\r\n echo ucwords($settings['template']);\r\n }\r\n if ($column_name == 'images') {\r\n echo '<div style=\"text-align:center; max-width:40px;\">' . $this->data->get_slide_count( $post_id ) . '</div>';\r\n }\r\n if ($column_name == 'id') {\r\n $post = get_post($post_id);\r\n echo $post->post_name;\r\n }\r\n if ($column_name == 'shortcode') { \r\n $post = get_post($post_id);\r\n echo '[cycloneslider id=\"'.$post->post_name.'\"]';\r\n } \r\n }",
"function get_columns(){\n\n\t\t$columns = array(\n\t\t\t\t\t\t\t'code'\t\t\t=>\t__( 'Voucher Code', 'woovoucher' ),\n\t\t\t\t\t\t\t'product_info'\t=>\t__(\t'Product Information', 'woovoucher' ),\n\t\t\t\t\t\t\t'buyers_info'\t=>\t__(\t'Buyer\\'s Information', 'woovoucher' ),\n\t\t\t\t\t\t\t'order_info'\t=>\t__(\t'Order Information', 'woovoucher' ),\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t'redeem_by'\t\t=>\t__(\t'Redeem Information', 'woovoucher' ),\n\t\t\t\t\t);\n\n\t\treturn apply_filters( 'woo_vou_used_add_column', $columns );\n\t}",
"function ysg_posts_columns( $column, $post_id ) {\n switch ( $column ) {\n \tcase 'ysg_image':\n\t\t\t$ysgGetId = get_post_meta($post_id, 'valor_url', true );\n\t\t\t$ysgPrintId = ysg_youtubeEmbedFromUrl($ysgGetId);\n\t\t\techo sprintf( '<a href=\"%1$s\" title=\"%2$s\">', admin_url( 'post.php?post=' . $post_id . '&action=edit' ), get_the_title() );\n\t\t\tif ( has_post_thumbnail()) { \n\t\t\t\tthe_post_thumbnail(array(150,90)); \n\t\t\t}else{\n\t\t\t\techo '<img title=\"'. get_the_title().'\" alt=\"'. get_the_title().'\" src=\"http://img.youtube.com/vi/' . $ysgPrintId .'/mqdefault.jpg\" width=\"150\" height=\"90\" />';\t\n\t\t\t}\n\t\t\techo '</a>';\n break;\n\n case 'ysg_title':\n echo sprintf( '<a href=\"%1$s\" title=\"%2$s\">%2$s</a>', admin_url( 'post.php?post=' . $post_id . '&action=edit' ), get_the_title() );\n break;\n \n case \"ysg_categories\":\n\t\t$ysgTerms = get_the_terms($post_id, 'youtube-videos');\n\t\tif ( !empty( $ysgTerms ) )\n\t\t{\n\t\t\t$ysgOut = array();\n\t\t\tforeach ( $ysgTerms as $ysgTerm )\n\t\t\t\t$ysgOut[] = '<a href=\"edit.php?post_type=youtube-gallery&youtube-videos=' . $ysgTerm->slug . '\">' . esc_html(sanitize_term_field('name', $ysgTerm->name, $ysgTerm->term_id, 'youtube-videos', 'display')) . '</a>';\n\t\t\techo join( ', ', $ysgOut );\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo __( 'Sem Categoria', 'youtube-simple-gallery' );\n\t\t}\n\t\tbreak;\n\t\t\t\n case 'ysg_url':\n $idvideo = get_post_meta($post_id, 'valor_url', true ); \n echo ! empty( $idvideo ) ? sprintf( '<a href=\"%1$s\" target=\"_blank\">%1$s</a>', esc_url( $idvideo ) ) : '';\n break;\n }\n}",
"function dunkdog_player_edit_columns($cols) { \n\t$cols = array('cb' => '<input type=\"checkbox\" />',\n\t\t'headshot' => 'Headshot',\n\t\t'title' => 'Title', \n\t\t'taxonomy-dd-class' => 'Class',\n \t\t'taxonomy-dd-height' => 'Height',\n \t\t'taxonomy-dd-weight' => 'Weight',\n \t\t'taxonomy-dd-position' => 'Player Position',\n \t\t'high_school' => 'High School',\n \t\t'travel_team' => 'Travel',\n \t\t'college_team' => 'College',\n \t\t'news' => 'News'\n \t\t);\n return $cols;\n}",
"public function customColumns($book_id);",
"function add_custom_fields_columns ( $columns ) {\n return array_merge ( $columns, array (\n 'ingredienti' => __ ( 'Ingredienti' ),\n 'prezzo' => __ ( 'Prezzo' )\n ) );\n}",
"function add_staff_fa_column($columns) {\r\n\t$columns =\tarray_slice($columns, 0, 1, true) +\r\n\t\t\t\t\t\t\tarray('cws_dept_thumb' => __('Pics', THEME_SLUG)) +\r\n\t\t\t\t\t\t\tarray_slice($columns, 1, NULL, true);\r\n\t$columns['procedures'] = __('Procedures', THEME_SLUG);\r\n\t$columns['slug'] = $columns['procedures'];\r\n\t$columns['events'] = __('Events', THEME_SLUG);\r\n\tunset($columns['slug']);\r\n\t$columns['cws_dept_decription'] = __('Description', THEME_SLUG);\r\n\t$columns['description'] = $columns['cws_dept_decription'];\r\n\tunset($columns['description']);\r\n\treturn $columns;\r\n}",
"function ysg_edit_columns( $columns ) {\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />',\n 'ysg_image' => __( 'Imagem do Vídeo', 'youtube-simple-gallery' ),\n 'ysg_title' => __( 'Título', 'youtube-simple-gallery' ),\n 'ysg_categories' => __(\"Categoria\", 'youtube-simple-gallery' ),\n 'ysg_url' => __( 'Link do Vídeo', 'youtube-simple-gallery' )\n );\n\n return $columns;\n}",
"protected function get_column_info()\n {\n }",
"protected function get_column_info()\n {\n }",
"function gttn_tpps_parse_file_column_helper($row, &$options) {\n $options['content'][] = $row[current($options['columns'])];\n}",
"function theme_add_user_learner_column( $columns ) {\n\n $columns['learner'] = __( 'Learner', 'bones' );\n return $columns;\n\n}",
"function cpotheme_metadata_plugin()\n{\n $cpotheme_data = array();\n\n $cpotheme_data[] = array(\n 'name' => 'plugin_title',\n 'std' => '',\n 'label' => 'Título del Producto',\n 'type' => 'text',\n 'desc' => 'Indica la etiqueta de título (H1) del tema.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'plugin_demo_url',\n 'std' => '',\n 'label' => 'URL de la Demo',\n 'type' => 'text',\n 'desc' => 'Especifica la URL de la demo del tema.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'plugin_url',\n 'std' => '',\n 'label' => 'External URL',\n 'type' => 'text',\n 'desc' => 'Especifica la URL del tema si es un archivo externo.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'plugin_product',\n 'std' => '',\n 'label' => 'ID de Producto',\n 'type' => 'select',\n 'option' => cpotheme_metadata_productlist_optional(),\n 'desc' => 'Indica la ID del producto para enlazarlo.'\n );\n\n $cpotheme_data[] = array(\n 'name' => 'plugin_changelog',\n 'std' => '',\n 'label' => 'Changelog',\n 'type' => 'textarea',\n 'desc' => 'Muestra el registro de cambios de la descarga.'\n );\n\n return $cpotheme_data;\n}",
"public function addColumns()\n {\n add_filter( 'manage_edit-' . $this->post_type . '_columns', array($this, 'editColumns') ) ; // Add or Remove a Column\n add_action( 'manage_' . $this->post_type . '_posts_custom_column', array($this, 'manageColumns') ); //Show and Modify Column Data\n add_filter( 'manage_edit-' . $this->post_type . '_sortable_columns', array($this, 'sortableColumns') ); // Flags sortable Columns\n add_action( 'load-edit.php', array($this, 'loadSortColumns') );\n }",
"function addCommentsCustomColumn($cols) {\n \t$cols['lepress-grade'] = __('Grade', lepress_textdomain);\n \treturn $cols;\n }",
"function yourprefix_display_text_small_column( $field_args, $field ) {\n\t?>\n\t<div class=\"custom-column-display <?php echo $field->row_classes(); ?>\">\n\t\t<p><?php echo $field->escaped_value(); ?></p>\n\t\t<p class=\"description\"><?php echo $field->args( 'description' ); ?></p>\n\t</div>\n\t<?php\n}",
"function jeg_post_columns($columns)\n{\n\t$columns['posttype'] = 'Blog Post Type';\n\treturn $columns;\n}",
"function get_columns(){\n $columns = array(\n 'title' => 'Contact Name',\n 'date_created' => 'Date Created',\n 'contact_name' => 'Created By'\n );\n return $columns;\n\t}",
"public function getColumnsList(){\n return $this->_get(3);\n }",
"function custom_columns( $column, $post_id ) {\n\tswitch ( $column ) {\n\t\tcase 'type':\n\t\t\t$terms = get_post_meta( $post_id, 'freeproductid', true );\n\t\t\tif ( $terms != '' ) {\n\t\t\t\t$freeproducter = wc_get_product( $terms );\n\t\t\t\techo $freeproducter->get_formatted_name( );\n\t\t\t\techo '<br />';\n\t\t\t} else {\n\t\t\t\t_e( 'No free product', 'woocommerce-freeproduct' );\n\t\t\t\techo '<br />';\n\t\t\t}\n\t\t\tbreak;\n\t}\n}",
"function add_futurninews_columns($cols){\n\treturn array(\n\t\t'cb' \t\t=> '<input type=\"checkbox\" />;',\n\t\t'title' \t=> 'Title',\n\t\t'heading'\t=> 'Heading',\n\t\t'date'\t\t=> 'Date'\n\t);\n}",
"function wppb_add_extra_column_for_rf( $columns ){\r\n\t$columns['rf-shortcode'] = __( 'Shortcode', 'profile-builder' );\r\n\t\r\n\treturn $columns;\r\n}",
"function wpc_client_my_show_columns( $column_name ) {\r\n global $post, $wpc_client;\r\n if ( $column_name == 'clients' ) {\r\n $users = get_post_meta( $post->ID, 'user_ids', true );\r\n\r\n if( is_array( $users ) && 0 < count( $users ) ) {\r\n echo '<div class=\"scroll_data\">';\r\n //show all clients\r\n foreach ( $users as $key => $value ) {\r\n $data = get_user_meta( $value, 'wpc_cl_business_name' );\r\n if ( isset( $data[0] ) )\r\n echo $data[0] . '<br/>';\r\n }\r\n echo '</div>';\r\n }\r\n }\r\n\r\n if ( $column_name == 'groups' ) {\r\n $groups_id = get_post_meta( $post->ID, 'groups_id', true );\r\n if( is_array( $groups_id ) && 0 < count( $groups_id ) ) {\r\n echo '<div class=\"scroll_data\">';\r\n foreach ( $groups_id as $group_id ) {\r\n $group = $wpc_client->get_group( $group_id );\r\n echo $group['group_name'] . '<br/>';\r\n }\r\n echo '</div>';\r\n }\r\n }\r\n\r\n }",
"function manage_posts_columns($columns) {\n\t$columns['recommend_post'] = __('Recommend post', 'tcd-w');\n\treturn $columns;\n}",
"function pgm_subscriber_column_data($column,$post_id){\n $output = '';\n\n switch($column){\n\n case 'title':\n $fname = get_field('pgm_fname', $post_id);\n $lname = get_field('pgm_lname', $post_id);\n $output .= $fname.' '.$lname;\n break;\n case 'email':\n $email = get_field('pgm_email', $post_id);\n $output .= $email;\n break;\n }\n\n echo $output;\n}",
"function get_display_columns() {\n return $columns = array('id' => __('id', 'kkl-ligatool'), 'name' => __('name', 'kkl-ligatool'), 'club_id' => __('club', 'kkl-ligatool'), 'season_id' => __('season', 'kkl-ligatool'), 'short_name' => __('url_code', 'kkl-ligatool'),);\n }",
"function itstar_add_user_column_data( $val, $column_name, $user_id ) {\n \n\n switch ($column_name) {\n case 'viraclub' :\n return 'V'.get_user_meta($user_id,'viraclub',true);\n break;\n case 'phone' :\n return get_user_meta($user_id,'phone',true);\n break;\n case 'email' :\n return get_user_meta($user_id,'uemail',true);\n break;\n default:\n }\n return;\n}",
"function get_columns()\n {\n $columns = array(\n\n 'cb' => '<input type=\"checkbox\" />', //Render a checkbox instead of text\n 'id' => __('# ID'),\n 'user' => __('Requested From'),\n //'requested_url' => __('Requested URI'),\n 'Ip' => __('From IP'),\n 'connected_at' => __('Requested At'),\n // 'msg' => __('Message'),\n 'on_status' => __('On'), \n 'action_trig' => __('Details')\n );\n\n return $columns;\n }",
"function get_video_fields( $extra = null ) {\r\n global $cb_columns;\r\n return $cb_columns->set_object( 'videos' )->get_columns( $extra );\r\n}",
"public function tableColumns($table,$column);",
"function wp_plugin_update_row($file, $plugin_data)\n {\n }",
"function get_columns() {\n\n\t\treturn $columns = array(\n\t\t\t'cb'\t\t=> '<input type=\"checkbox\" />', //Render a checkbox instead of text\n\t\t\t'title'\t\t=> 'Title',\n\t\t\t'rating'\t=> 'Rating',\n\t\t\t'director'\t=> 'Director'\n\t\t);\n\t}",
"function my_portfolio_columns($columns) {\r\n\t$columns = array(\r\n\t\t\"cb\" => \"<input type=\\\"checkbox\\\" />\",\r\n\t\t\"title\" => theme_locals(\"title\"),\r\n\t\t\"portfolio_categories\" => theme_locals(\"categories\"),\r\n\t\t\"portfolio_tags\" => theme_locals(\"tags\"),\r\n\t\t\"comments\" => \"<span><span class=\\\"vers\\\"><img src=\\\"\".get_admin_url().\"images/comment-grey-bubble.png\\\" alt=\\\"Comments\\\"></span></span>\",\r\n\t\t\"date\" => theme_locals(\"date\"),\r\n\t\t\"thumbnail\" => theme_locals(\"thumbnail\")\r\n\t);\r\n\treturn $columns;\r\n}",
"public function getColumnMeta($column)\n {\n }",
"public function getColumns();",
"public function getColumns();",
"public function getColumns();",
"public function getColumns();",
"public function getColumns();",
"public function getColumns();",
"public function getColumns();",
"function es_managing_custom_product_columns( $columns, $post_type ) {\n if ( $post_type == 'product' )\n $columns[ 'member_price' ] = 'Member Price';\n return $columns;\n}",
"function columns_output( $column_name, $post_id ) {\n\n\t\tswitch ( $column_name ) {\n\n\t\t\tcase 'example-column':\n\n\t\t\t\techo '<p>' . __('Display custom content here.', 'sudoh') . '</p>';\n\t\t\t\tbreak;\n\n\t\t\tcase 'thumbnail':\n\n\t\t\t\tif ( has_post_thumbnail($post_id) )\n\t\t\t\t\techo get_the_post_thumbnail($post_id, 'thumbnail');\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}",
"function et_add_application_column( $columns ) {\n\t$first\t\t\t\t= array_slice($columns, 0, 2);\n\t$temp \t\t\t\t= array_slice($columns, 2);\n\t$first['job_id']\t= __( 'Job', ET_DOMAIN );\n\n $columns\t= array_merge( $first , $temp );\n return $columns;\n}",
"public function add_column( $cols ) {\n\t\t$cols['wp_capabilities'] = __( 'Role', 'wp-custom-user-list-table' );\n\t\t$cols[ 'blogname' ] = __( 'Site Name', 'wp-custom-user-list-table' );\n\t\t$cols[ 'primary_blog' ] = __( 'Site ID', 'wp-custom-user-list-table' );\n\t\treturn $cols;\n\t}",
"private function getColumnValues()\n {\n return array_slice($this->_args, 2);\n }",
"function foool_partner_admin_partner_init(){\n add_filter( 'manage_edit-partner_columns', 'foool_partner_add_column' ) ;\n add_action( 'manage_partner_posts_custom_column', 'foool_partner_custom_columns_render', 10, 2);\n add_action( 'admin_head', 'foool_partner_admin_styles');\n \n // Custom Metabox : Infos\n add_meta_box( 'foool_partner_infos_meta_box', 'Informations complémentaires', 'foool_partner_infos_metabox_render', 'partner', 'normal', 'high');\n add_action( 'save_post', 'foool_partner_infos_save_postdata');\n}",
"public function get_columns() {\n\n\t\t\treturn array(\n\n\t\t\t\t'cb' \t\t\t\t\t=> '<input type=\"checkbox\" />',\n\n\t\t\t\t'topic_name' \t\t\t\t=> __( 'Topic Name' ),\n\n\t\t\t\t'bright_cove_video_tag'\t=> __( 'BrightCove Video Tag' ),\n\n\t\t\t\t'description' \t\t\t\t=> __( 'Description' )\n\n\t\t\t);\n\n\t\t}",
"function get_columns() {\n\t\t$columns = array(\n\t\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t\t'id' => __( 'ID', 'mylisttable' ),\n\t\t\t'date' => __( 'Date', 'mylisttable' ),\n\t\t\t'uploader' => __( 'Uploader (#ID)', 'mylisttable' ),\n\t\t\t'uploader_group' => __( 'Uploader Group\t (#ID)', 'mylisttable' ),\n\t\t\t'site' => __( 'Site #ID', 'mylisttable' ),\n\t\t\t'assessment' => __( 'Assessment #ID', 'mylisttable' ),\n\t\t\t'assessment_result' => __( 'View', 'mylisttable' ),\n\t\t);\n\t\tif ( current_user_can( 'manage_options' ) ) {\n\t\t\t$columns['assessment_result_evaluation'] = __( 'Evaluate', 'mylisttable' );\n\t\t}\n\t\treturn $columns;\n\t}",
"public function get_columns() {\n \t\t$columns = array(\n \t\t\t'blogname' => __( 'Site Name' ),\n \t\t\t'blog_path' => __( 'Path' ),\n \t\t\t'connected' => __( 'Jetpack Connected' ),\n 'jetpackemail' => __('Jetpack Master User E-mail'),\n 'lastpost' => __( 'Last Post Date' ),\n \t\t);\n\n \t\treturn $columns;\n \t}",
"function postasevent_display_text_small_column( $field_args, $field ) {\n\t?>\n\t<div class=\"custom-column-display <?php echo $field->row_classes(); ?>\">\n\t\t<p><?php echo $field->escaped_value(); ?></p>\n\t\t<p class=\"description\"><?php echo $field->args( 'description' ); ?></p>\n\t</div>\n\t<?php\n}",
"function add_column_data( $column, $post_id ) {\n\tswitch ( $column ) {\n\t\tcase 'layout':\n\t\t\t$field = get_field_object( 'field_5d9239967f3ed' ); // section_layout key\n\t\t\t$layout = get_field( 'section_layout', $post_id ) ?: 'default';\n\t\t\t// For whatever reason the layout value is sometimes\n\t\t\t// an array; handle that here:\n\t\t\tif ( is_array( $layout ) ) {\n\t\t\t\t$layout = $layout[0];\n\t\t\t}\n\t\t\techo $field['choices'][$layout];\n\t\t\tbreak;\n\t}\n}",
"public function display_admin_columns() {\n add_filter('manage_edit-comments_columns', array(&$this, 'add_comments_columns'));\n add_action('manage_comments_custom_column', array(&$this, 'add_comment_columns_content'), 10, 2);\n }",
"function adleex_resource_list_column_row( $column_name, $id ) {\nglobal $current_screen;\n\n\tif ($current_screen->post_type!='resource') return;\n\n\tswitch ($column_name) {\n\t\tcase 'post_title':\n\t\tcase 'title' : \n\t\tcase 'date':\n\t\tbreak;\n\t\tcase 'post_author':\n\t\t\techo get_post($id)->post_author;\n\t\tbreak;\n\t\tcase 'post_status':\n\t\t\techo get_post($id)->post_status;\n\t\tbreak;\n\t\tdefault:\n\t\t\t//@TODO va completato quello che ritorno perchè potrebbe essere anche una select e quindi devo restituire il valore associato, \t\n\t\t\techo get_post_meta($id,$column_name,true);\t\t\t\n\t\tbreak;\n\t}\n\n}",
"abstract protected function html_column_param();",
"public function getColumnConfig();",
"function pw_sample_plugin_create_table() {\n\tglobal $wpdb;\n$charset_collate = $wpdb->get_charset_collate();\n\n$sql = \"CREATE TABLE `book_meta_dataa` (\n\t\tID INTEGER NOT NULL AUTO_INCREMENT,\n\t\tauthor_name TEXT NOT NULL,\n\t\tprice bigint(64),\n\t\tpublisher text DEFAULT '',\n\t\tisbn text DEFAULT '',\n\t\tyr text DEFAULT '',\n\t\tedi text DEFAULT '',\n\t\tur text DEFAULT '',\n\tPRIMARY KEY (ID)\n) $charset_collate;\";\n\nrequire_once(ABSPATH . 'wp-admin/includes/upgrade.php');\ndbDelta($sql);\n\t\n }",
"function getColumnNames()\n{\n\tglobal $log, $current_user;\n\t$log->debug(\"Entering getColumnNames() method ...\");\n\trequire('user_privileges/user_privileges_'.$current_user->id.'.php');\n\tif($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0)\n\t{\n\t $sql1 = \"select fieldlabel from vtiger_field where tabid=4 and block <> 75 and vtiger_field.presence in (0,2)\";\n\t $params1 = array();\n\t}else\n\t{\n\t $profileList = getCurrentUserProfileList();\n\t $sql1 = \"select vtiger_field.fieldid,fieldlabel from vtiger_field inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid=4 and vtiger_field.block <> 75 and vtiger_field.displaytype in (1,2,4,3) and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_field.presence in (0,2)\";\n\t $params1 = array();\n\t if (count($profileList) > 0) {\n\t \t$sql1 .= \" and vtiger_profile2field.profileid in (\". generateQuestionMarks($profileList) .\") group by fieldid\";\n \t \tarray_push($params1, $profileList);\n\t }\n }\n\t$result = $this->db->pquery($sql1, $params1);\n\t$numRows = $this->db->num_rows($result);\n\tfor($i=0; $i < $numRows;$i++)\n\t{\n\t$custom_fields[$i] = $this->db->query_result($result,$i,\"fieldlabel\");\n\t$custom_fields[$i] = preg_replace(\"/\\s+/\",\"\",$custom_fields[$i]);\n\t$custom_fields[$i] = strtoupper($custom_fields[$i]);\n\t}\n\t$mergeflds = $custom_fields;\n\t$log->debug(\"Exiting getColumnNames method ...\");\n\treturn $mergeflds;\n}",
"function manage_wp_posts_using_bulk_quick_edit_manage_posts_columns( $columns, $post_type ) {\n\t/*if ( $post_type == 'movies' ) {\n\t\t$columns[ 'release_date' ] = 'Release Date';\n\t\t$columns[ 'coming_soon' ] = 'Coming Soon';\n\t\t$columns[ 'film_rating' ] = 'Film Rating';\n\t}\n\t\t\n\treturn $columns;*/\n\t\n\t/**\n\t * The second example adds our new column after the “Title” column.\n\t * Notice that we're specifying a post type because our function covers ALL post types.\n\t */\n\tswitch ( $post_type ) {\n\t\n\t\tcase 'movies':\n\t\t\n\t\t\t// building a new array of column data\n\t\t\t$new_columns = array();\n\t\t\t\n\t\t\tforeach( $columns as $key => $value ) {\n\t\t\t\n\t\t\t\t// default-ly add every original column\n\t\t\t\t$new_columns[ $key ] = $value;\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * If currently adding the title column,\n\t\t\t\t * follow immediately with our custom columns.\n\t\t\t\t */\n\t\t\t\tif ( $key == 'title' ) {\n\t\t\t\t\t$new_columns[ 'release_date' ] = 'Release Date';\n\t\t\t\t\t$new_columns[ 'coming_soon' ] = 'Coming Soon';\n\t\t\t\t\t$new_columns[ 'film_rating' ] = 'Film Rating';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $new_columns;\n\t\t\t\n\t}\n\t\n\treturn $columns;\n\t\n}",
"function sb_slideshow_custom_columns( $column, $post_id ) {\n\tswitch( $column ) {\n\t\tcase 'id':\n\t\t\techo $post_id;\n\t\tbreak;\n\t\tcase 'shortcode':\n\t\t\techo sb_slideshow_embed_input( $post_id );\n\t\tbreak;\n\t}\n}",
"function oxy_fetch_custom_columns($column)\n{\n global $post,$oxy_theme;\n switch($column) {\n case 'menu_order':\n echo $post->menu_order;\n echo '<input id=\"qe_slide_order_\"' . $post->ID . '\" type=\"hidden\" value=\"' . $post->menu_order . '\" />';\n break;\n\n case 'activate':\n $site_stack_id = $oxy_theme->get_option('site_stack');\n $output = ($site_stack_id == $post->ID) ? '<span class=\"oxy_activated\"></span>' : '';\n echo $output;\n break;\n\n case 'featured-image':\n $editlink = get_edit_post_link($post->ID);\n echo '<a href=\"' . $editlink . '\">' . get_the_post_thumbnail($post->ID, 'thumbnail') . '</a>';\n break;\n\n case 'slideshows-category':\n echo get_the_term_list($post->ID, 'oxy_slideshow_categories', '', ', ');\n break;\n\n case 'service-category':\n echo get_the_term_list($post->ID, 'oxy_service_category', '', ', ');\n break;\n\n case 'departments-category':\n echo get_the_term_list($post->ID, 'oxy_staff_department', '', ', ');\n break;\n\n case 'job-title':\n echo get_post_meta($post->ID, THEME_SHORT . '_position', true);\n break;\n\n case 'portfolio-category':\n echo get_the_term_list($post->ID, 'oxy_portfolio_categories', '', ', ');\n break;\n\n case 'testimonial-group':\n echo get_the_term_list($post->ID, 'oxy_testimonial_group', '', ', ');\n break;\n case 'testimonial-citation':\n echo get_post_meta($post->ID, THEME_SHORT . '_citation', true);\n break;\n\n default:\n // do nothing\n break;\n }\n}",
"function get_columns() {\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />',\n 'template_name' => __('Name', 'mylisttable'),\n 'template_description' => __('Description', 'mylisttable'),\n 'create_by' => __('Created By', 'mylisttable'),\n 'create_date' => __('Create Date', 'mylisttable')\n );\n return $columns;\n }",
"function wtr_events_locations_custom_columns($column){\r\n\r\n\tglobal $post;\r\n\r\n\tswitch ($column) {\r\n\t\tcase \"event_locatio_address\":\r\n\t\t\techo get_post_meta( $post->ID, '_wtr_events_locations_address', true );\r\n\t\tbreak;\r\n\t}\r\n}",
"public function takesTwoColumns() {\n return false;\n }",
"function ganesh_set_ganesh_contact_columns($columns){\r\n\t$newColumns = array();\r\n\t$newColumns['title'] = 'Full Name';\r\n\t$newColumns['message'] = 'Message';\r\n\t$newColumns['email'] = 'Email';\r\n\t$newColumns['date'] = 'Date';\r\n\treturn $newColumns;\r\n}"
] | [
"0.6446717",
"0.62450165",
"0.6241489",
"0.62296987",
"0.6212806",
"0.6179277",
"0.6159527",
"0.61465925",
"0.6109037",
"0.5951515",
"0.5929214",
"0.5921391",
"0.5886481",
"0.5868205",
"0.5851188",
"0.5846177",
"0.5844301",
"0.5817031",
"0.58082753",
"0.580405",
"0.5749247",
"0.5746133",
"0.57217914",
"0.5714322",
"0.5705391",
"0.57029176",
"0.56982917",
"0.56948966",
"0.56743276",
"0.56702244",
"0.5649828",
"0.56487924",
"0.5645116",
"0.56437254",
"0.5631388",
"0.562955",
"0.5621895",
"0.5621201",
"0.56108004",
"0.5610239",
"0.560721",
"0.5606651",
"0.5605805",
"0.5596049",
"0.5595732",
"0.5595661",
"0.55912817",
"0.5589974",
"0.5588997",
"0.5578967",
"0.5578808",
"0.5572529",
"0.5571775",
"0.5571551",
"0.55687547",
"0.5559848",
"0.5557882",
"0.5544336",
"0.5536525",
"0.55362266",
"0.55347216",
"0.55324095",
"0.5532014",
"0.55292886",
"0.5525998",
"0.5521056",
"0.5516478",
"0.55088377",
"0.5501232",
"0.5498396",
"0.54970425",
"0.54970425",
"0.54970425",
"0.54970425",
"0.54970425",
"0.54970425",
"0.54970425",
"0.54968107",
"0.5495645",
"0.5494319",
"0.54937035",
"0.54929423",
"0.549215",
"0.5489434",
"0.5488838",
"0.54836905",
"0.54772455",
"0.547638",
"0.54754484",
"0.5469249",
"0.54639715",
"0.5463016",
"0.54581416",
"0.5456705",
"0.5456391",
"0.5456374",
"0.5453737",
"0.54498273",
"0.5449296",
"0.5448242",
"0.54428935"
] | 0.0 | -1 |
Who is sending the IM | function bbsCoinSendPM($subject, $message, $to) {
$pmfrom = array(
'id' => 1,
'name' => 'admin',
'username' => 'admin'
);
// Who is receiving the IM
$pmto = array(
'to' => array($to),
'bcc' => array()
);
// Send the PM
return sendpm($pmto, $subject, $message, 0, $pmfrom);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSender();",
"public function identifySender()\n\t{\n\t\treturn true;\n\t}",
"function getSender(){\n $return = \"\";\n if( $this->FromName != \"\" ) $return .= $this->FromName.\" (\";\n $return .= $this->From;\n if( $this->FromName != \"\" ) $return .= \")\";\n return $return;\n }",
"public function getSender() {\n\t\treturn $this -> data['sender'];\n\t}",
"private function _whereAreYou()\n {\n $channels = '';\n foreach($this->_currentChannels AS $channel)\n {\n $channels .= $channel .\", \";\n }\n\n $this->_message($this->_data->nick .\": I am in \". $channels);\n }",
"public function getWho(){\n return $this->who;\n }",
"public function getSender()\n {\n if (count($this->sender()->first()) > 0)\n return $this->sender()->first()->name;\n else\n return 'Anonymous';\n }",
"public function getMySender()\n\t{\n\t\treturn $this->senders[$this->sender_index];\n\t}",
"public function getSender(){\n return $this->sender;\n }",
"public function whoAmI()\n {\n return $this->username;\n }",
"public function getSender()\n {\n return $this->sender;\n }",
"public function getSender()\n {\n return $this->sender;\n }",
"public function getSender()\n {\n return $this->sender;\n }",
"public function getSender()\n {\n return $this->sender;\n }",
"public function getSender()\n {\n return $this->sender;\n }",
"public function getSender()\n {\n return $this->sender;\n }",
"private function retrieveSender() : string {\n\n // Get min & max length of the whole sender information\n $senderInformationLength = $this->getSenderInformationLength();\n\n // Retrieve the sender information from email with regex\n $sender = $this->retrieveInformation($this->currentEmail, [\n self::REGEX_NEEDLE_START_SENDER,\n \".{\" . $senderInformationLength[\"min\"] . \",\" . $senderInformationLength[\"max\"] . \"}\"\n ], true,\"Sender information\",\n self::ATTRIBUTE_RETRIEVAL_SOURCE_NAME, true, 0);\n\n // Return sender information without whitespaces at end and beginning\n return trim($sender);\n }",
"public function getSender() {\n return $this->sender;\n }",
"public function getSender() {\n return $this->_sender;\n }",
"public function hasSendername(){\n return $this->_has(5);\n }",
"function iu_mentionusername($string, $from, $posturl){\n\tinclude 'dbparams.php';\n\tpreg_match_all('/@[a-zA-Z0-9_]+/', $string, $matches);\n\t// print_r($matches[1]);\n\tforeach ($matches as $match) {\n\t\tif(in_array($match, $matches)){\n\t\t\tforeach ($match as $name) {\n\t\t\t\t$matchedname = str_replace(\"@\", \"\", $name);//remove '@' from username match\n\t\t\t\t$mentionQuery = @mysqli_query($dblink, \"SELECT user_id FROM users WHERE username = '$matchedname'\");\n\t\t\t\t$mentionRow = mysqli_fetch_assoc($mentionQuery);\n\t\t\t\t$mentionuserid = $mentionRow['user_id'];\n\n\t\t\t\tiu_send_notification($from, $mentionuserid, 'mentionpost', $posturl);\n\t\t\t}\n\t\t}\n\t}\n}",
"public function broadcastOn()\n {\n return ['new-message'.$this->for_user_id];\n }",
"private function _identifyYourself()\n {\n // If there is a nickserv password and it's us joining\n if ($this->_identifyPassword AND ($this->_data->nick == $this->_irc->_nick))\n {\n $this->_privMessage('identify '. $this->_identifyPassword, 'NickServ');\n }\n }",
"public function getIncomingMailServerUsername() {\n\t\treturn $this->ic_mail_server_username;\n\t}",
"public function getGiftcardSenderName();",
"public function getSentBy(): ?string\n {\n return $this->sentBy;\n }",
"public function message()\n {\n return 'BOT と判断された';\n }",
"public function message()\n {\n if ($this->subject) {\n return \"Facebook {$this->subject->content()}\";\n }\n return false;\n }",
"public function getMessFromName ()\n {\n return $this->mess_from_name;\n }",
"public function getPhotoSender(){\n return $this->photoSender;\n }",
"public function getSenderName()\n {\n return $this->get(self::_SENDER_NAME);\n }",
"public function get_mention(){retrun($id_local_mention); }",
"public function getSender()\n {\n return strtolower($this->getFrom()->getEmail());\n }",
"public function getReceivedBy()\n {\n return $this->get(self::RECEIVEDBY);\n }",
"function api_chat_me_info() {\n\tif (session_check()) {\n\t\t$db = new db;\n\t\t$info = $db->getRow(\"SELECT CONCAT(fname, ' ', lname) as fio, avatar,id FROM users WHERE id = ?i\", $_SESSION[\"user_id\"]);\n\t\taok($info);\n\t} else {\n\t\taerr(array(\"Пожалуйста войдите.\"));\n\t}\n\t\n}",
"public function broadcastOn()\n {\n return [\"user.{$this->user->id}\"];\n }",
"public function message(): string\n {\n return sprintf('%s在评论中@了你', $this->sender->name);\n }",
"public function getIDsender(){\n return $this->IDsender;\n }",
"public function fromName()\n\t{\n\t\treturn get_option('social_curator_notification_from');\n\t}",
"public function broadcastOn()\n {\n return ['whatcanido-channel'];\n }",
"public function getSenderUrl()\n {\n if (count($this->sender()->first()) > 0)\n return URL::to('/profile/'.$this->sender()->first()->username);\n else\n return URL::to('#');\n }",
"public function hasIlinewho(){\n return $this->_has(1);\n }",
"public function getIdSender()\n {\n return $this->idSender;\n }",
"public function person() {\n $personId = $_REQUEST['id'];\n $person = $this->tmdb->getPerson($personId);\n $imageUrl = $this->tmdb->getImageUrl($person['profile_path'], TMDb::IMAGE_PROFILE, 'w185');\n //$images = $this->tmdb->getPersonImages($personId);\n $credits = $this->tmdb->getPersonCredits($personId);\n $map = array('person' => $person, 'imageUrl' => $imageUrl, 'credits' => $credits);\n $this->reply($map);\n }",
"public function broadcastAs()\n {\n return 'game.won_by_robot';\n }",
"public function getInReplyTo() {}",
"function getSenderSession() {\n $sender = 'ilyes';\n $_SESSION['sender'] = $sender;\n\n return $_SESSION['sender'];\n }",
"private function _seen()\n {\n $nick = str_replace(array(\"!seen \", \"!seen\"), \"\", $this->_data->message);\n \n if (trim($nick) == '')\n return;\n \n $dbh = $this->_connectToDb();\n \n $stmt = $dbh->query(\"SELECT * FROM log_table WHERE channel = '\". $this->_data->channel .\"' AND LOWER(nick) = '\". strtolower(trim($nick)) .\"' ORDER BY id DESC LIMIT 1\");\n \n $row = $stmt->fetch(PDO::FETCH_OBJ);\n\n if (isset($row->when)) {\n $this->_message($this->_data->nick.': I last saw '. trim($nick) .' at '. $row->when .' saying \"'. trim($row->said) .'\"'); \n }\n else {\n $this->_message($this->_data->nick.': I\\'ve never seen '. trim($nick));\n }\n \n \n }",
"public function sentAt();",
"public function getNickname() //geter leo la informacion\n\n {\n return $this->nickname;\n }",
"function get_chtrm_name($chatid){\r\n\r\n}",
"public function getIncomingMailServerDisplayName() {\n\t\treturn $this->ic_mail_server_displayname;\n\t}",
"public static function getSender() \n { \n return emailSettings::$sender; \n }",
"public function get_matches_subject_id(){\r\n\t\treturn elgg_get_logged_in_user_guid();\r\n\t}",
"public function sent_by()\n {\n // UTILIZAR $post->kpost->sent_by\n $kpost = Kpost\n ::where('user_id','=',auth()->id()) \n ->where('post_id','=',$this->id)\n ->first();\n if ($kpost)\n return $kpost->sent_by;\n return null; \n }",
"public function getSenderPicUrl()\n {\n if (count($this->sender()->first()) > 0)\n return URL::to($this->sender->user_pic);\n else\n return URL::to('/img/profiles/default.png');\n }",
"public function getViaMedico() {\n return ucwords($this->_via);\n }",
"public function getMe()\r\n {\r\n return $this->telegram(\"getMe\");\r\n }",
"public function hasSenderid(){\n return $this->_has(2);\n }",
"function get_the_author_nickname()\n {\n }",
"public function getOutgoingMailServerUsername() {\n\t\treturn $this->og_mail_server_username;\n\t}",
"public function getSentFrom(): ?string\n {\n return $this->sentFrom;\n }",
"public function getSender()\n {\n return $this->hasOne(Login::className(), ['id' => 'sender_id']);\n }",
"public function getUsernameMedico() {\n return parent::getUsernameUser();\n }",
"public function getOriginator()\n {\n return $this->getMessage()['originator'];\n }",
"public function broadcastVoiceMessage()\n {\n //return following message\n\n return 'voice message is sent';\n }",
"protected function getSenderEmailName() {}",
"protected function getSenderEmailName() {}",
"public function getSenderAttribute()\n {\n return User::where('id', $this->sender_id)->first();\n }",
"protected function _getContactOwner()\n {\n return $this->params['name'];\n }",
"public function getSender(): array\n {\n return $this->sender;\n }",
"protected function sendEmail()\n {\n // Don't send to themself\n if ($this->userFrom->id == $this->userTo->id)\n {\n return false;\n }\n \n // Ensure they hae enabled emails\n if (! $this->userTo->options->enableEmails)\n {\n return false;\n }\n \n // Ensure they are not online\n if ($this->userTo->isOnline())\n {\n return false;\n }\n \n // Send email\n switch ($this->type)\n {\n case LOG_LIKED:\n if ($this->userTo->options->sendLikes)\n {\n $emailer = new Email('Liked');\n $emailer->user = $this->userTo;\n $emailer->sendImage($this->image->id, $this->userFrom);\n }\n break;\n \n case LOG_ACCEPTED:\n if ($this->userTo->options->sendProcessing)\n {\n $emailer = new Email('Image Accepted');\n $emailer->user = $this->userTo;\n $emailer->sendImage($this->image->id);\n }\n break;\n \n case LOG_REJECTED:\n if ($this->userTo->options->sendProcessing)\n {\n $emailer = new Email('Image Rejected');\n $emailer->user = $this->userTo;\n $emailer->sendImage($this->image->id);\n }\n break;\n }\n }",
"public function getReplyTo();",
"public function getReplyTo();",
"public function getNickname()\n {\n return $this->_nickname;\n }",
"function reply_author() {\n\tglobal $reply;\n\treturn $reply['author'];\n}",
"public function isSent() {}",
"public function getReceiver()\n {\n return $this->user;\n }",
"public function getNickname(): string {\n return $this->nickname;\n }",
"public function getSendFrom()\n {\n return $this->NameFrom ? sprintf('%s <%s>', $this->NameFrom, $this->EmailFrom) : $this->EmailFrom;\n }",
"public function approved_sender()\n\t{\n\t\t//pe($this->that);\n\t\tif (is_null($this->approved_sender))\n\t\t{\n\t\t\t$add = strtolower($this->get_address_from());\n\t\t\t$approved_arr = $this->get_approved();\n\t\t\tforeach($approved_arr as $check_add)\n\t\t\t{\n\t\t\t\tif ($add == strtolower($check_add))\n\t\t\t\t{\n\t\t\t\t\t$this->approved_sender = TRUE;\n\t\t\t\t\tbreak;\n\t\t\t\t};\n\t\t\t}\n\t\t\t$this->that->log_state('Sender '. $add .' approved? : ' . var_export($this->approved_sender,TRUE));\n\t\t}\n\t\treturn $this->approved_sender;\n\t}",
"public function sendPersonal() {\n return $this->_gtmHelper->sendPersonal();\n }",
"public function broadcastOn()\n {\n return [$this->reciever_id];\n }",
"public function getInReplyToUserId() : string\n {\n return $this->inReplyToUserId;\n }",
"public function getNickname()\n {\n return $this->nickname;\n }",
"public function getNickname()\n {\n return $this->nickname;\n }",
"public function getNickname()\n {\n return $this->nickname;\n }",
"public function getNickname()\n {\n return $this->nickname;\n }",
"public function getNickname()\n {\n return $this->nickname;\n }",
"public function messagefrom($usercheck)\n {\n \t\n\n }",
"public function getFrom() {\n return $this->user_from;\n }",
"public function getSenderHost()\n\t{\n\t\treturn $this->senderHost;\n\t}",
"public function getInvitedOn()\n\t{\n\t\treturn $this->invited_on;\n\t}",
"public function broadcastOn()\n {\n return ['user.'.\\Authorizer::getResourceOwnerId()];\n }",
"public function getReplyTo()\n {\n }",
"public function getIlinewhoList(){\n return $this->_get(1);\n }",
"public function mentions(){\n\t\t$title = \"mentioning user: @\";\n\t\t$where = \"select m.post_id from mentions m, users u2 where m.user_id = u2.user_id and u2.user_name\";\n\n\t\t#call generic routine for showing a specific list of posts:\n\t\t$this->view_specific($where, $title);\n\t}",
"public function broadcastOn()\n {\n return ['channel-name-'.$this->inputBy, 'channel-name-'.$this->kodeOrganisasi, 'channel-name-main-admin'];\n }",
"private function _messageFor()\n {\n // First, get the message\n //$message_for = preg_match('^!messagefor-[$1]', $this->_data->message)\n //preg_match('/^!messagefor-(.*):/', '!messagefor-Mike I missed you', $matches); var_dump($matches);\n try {\n // Connect\n $dbh = $this->_connectToDb();\n\n // Insert\n $stmt = $dbh->prepare(\"INSERT INTO message(`nick`, `message`, `when`, `from`) VALUES (:nick, :message, NOW(), :from)\");\n\n $stmt->bindParam(':nick', $message_for, PDO::PARAM_STR);\n $stmt->bindParam(':message', $message_payload, PDO::PARAM_STR);\n $stmt->bindParam(':from', $this->_data->nick, PDO::PARAM_STR);\n\n $stmt->execute();\n\n $dbh = null;\n\n }\n catch(PDOException $e)\n {\n echo $e->getMessage();\n }\n }",
"function send_message( $id_reciever, $title, $message, $reply_to = null ) {\n\t\tglobal $bbdb;\n\n\t\t$pm = array(\n\t\t\t'pm_title' => attribute_escape( $title ),\n\t\t\t'pm_from' => (int)bb_get_current_user_info( 'ID' ),\n\t\t\t'pm_to' => (int)$id_reciever,\n\t\t\t'pm_text' => apply_filters( 'pre_post', $message ),\n\t\t\t'sent_on' => time(),\n\t\t);\n\n\t\tif ( $reply_to && $this->can_read_message( $reply_to ) && $this->can_read_message( $reply_to, (int)$id_reciever ) ) {\n\t\t\t$pm['reply_to'] = (int)$reply_to;\n\t\t\t$reply_to = new bbPM_Message( $reply_to );\n\t\t\t$pm['thread_depth'] = $reply_to->thread_depth + 1;\n\t\t}\n\n\t\tif ( $this->count_pm( $pm['pm_from'], true ) > $this->max_inbox || $this->count_pm( $pm['pm_to'] ) > $this->max_inbox )\n\t\t\treturn false;\n\n\t\t$bbdb->insert( $bbdb->bbpm, $pm );\n\n\t\t$msg = new bbPM_Message( $bbdb->insert_id );\n\n\t\treturn $msg->read_link;\n\t}",
"public function getUsername(): string\n {\n return (string) $this->mail;\n }"
] | [
"0.67249125",
"0.6467835",
"0.6296772",
"0.6290687",
"0.6250177",
"0.6246795",
"0.61469513",
"0.60712355",
"0.60402834",
"0.59893316",
"0.5966568",
"0.5966568",
"0.5966568",
"0.5966568",
"0.5966568",
"0.5966568",
"0.5932666",
"0.5899848",
"0.5838252",
"0.57737416",
"0.57529235",
"0.5750472",
"0.5716463",
"0.56836843",
"0.56697243",
"0.5647124",
"0.5644807",
"0.56100476",
"0.5609755",
"0.5590788",
"0.557892",
"0.5571222",
"0.55559975",
"0.5535037",
"0.5475086",
"0.5469748",
"0.5465723",
"0.546187",
"0.54524386",
"0.54410154",
"0.5431195",
"0.542529",
"0.54219943",
"0.5421597",
"0.54199",
"0.5403891",
"0.5371365",
"0.5352097",
"0.534089",
"0.5336977",
"0.5329345",
"0.5325945",
"0.5325394",
"0.53198403",
"0.5311468",
"0.5284087",
"0.5279988",
"0.5274025",
"0.5256798",
"0.52466625",
"0.5239439",
"0.52381504",
"0.5236791",
"0.5232825",
"0.52277714",
"0.5218032",
"0.520763",
"0.520763",
"0.5205433",
"0.5202459",
"0.51989305",
"0.5181653",
"0.5173759",
"0.5173759",
"0.5169756",
"0.51684445",
"0.516616",
"0.516497",
"0.51636237",
"0.51548964",
"0.51492965",
"0.5148044",
"0.5145837",
"0.5142848",
"0.513537",
"0.513537",
"0.513537",
"0.513537",
"0.513537",
"0.5130616",
"0.5124659",
"0.51171666",
"0.5110193",
"0.51089555",
"0.5108313",
"0.5106492",
"0.51058275",
"0.5102486",
"0.509382",
"0.5090629",
"0.5089806"
] | 0.0 | -1 |
Do not modify under this line // | function connect_to_mysqli($mysqlserverhost, $username_mysql, $password_mysql, $database_name){
$connect = mysqli_connect($mysqlserverhost, $username_mysql, $password_mysql, $database_name);
if (!$connect) {
die("Connection failed mysql: " . mysqli_connect_error());
}
return $connect;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function __() {\n }",
"private function _i() {\n }",
"public function helper()\n\t{\n\t\n\t}",
"private function __construct()\t{}",
"final private function __construct(){\r\r\n\t}",
"private function j() {\n }",
"public function custom()\n\t{\n\t}",
"private function __construct( )\n {\n\t}",
"private function __construct() {\r\n\t\t\r\n\t}",
"private function init()\n\t{\n\t\treturn;\n\t}",
"protected function __init__() { }",
"final private function __construct() { }",
"final private function __construct() { }",
"final private function __construct() { }",
"public function oops () {\n }",
"final private function __construct() {}",
"final private function __construct() {}",
"protected function fixSelf() {}",
"protected function fixSelf() {}",
"final function velcom(){\n }",
"final function __construct() { \n\t}",
"private function __construct () \n\t{\n\t}",
"private function __construct()\n\t{\n\t\t\n\t}",
"private function __construct() {\r\n\t\r\n\t}",
"private function __construct () {}",
"function __construct()\r\n\t{\t\t//Yeah bro! Freaking PhP yo..\r\n\t}",
"public function init()\n {\n \treturn;\n }",
"final private function __construct()\n\t{\n\t}",
"private function __construct()\r\n\t{\r\n\t\r\n\t}",
"private function method2()\n\t{\n\t}",
"public function init() {\t\t\n\n }",
"private function __construct()\r\r\n\t{\r\r\n\t}",
"public function ex4()\n {\n }",
"private function __construct()\r\n {}",
"private function static_things()\n\t{\n\n\t\t# code...\n\t}",
"public function serch()\n {\n }",
"function fix() ;",
"private final function __construct() {}",
"private function __construct() { \n\t\t\n\n\t}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct()\r\n\t{\r\n\t}",
"private function __construct() {}",
"private function __construct() {}",
"protected function _refine() {\n\n\t}",
"public function nadar()\n {\n }"
] | [
"0.6620608",
"0.6597447",
"0.6063831",
"0.60162807",
"0.59471637",
"0.59245753",
"0.5836533",
"0.57862455",
"0.57821083",
"0.5759166",
"0.57536453",
"0.5750008",
"0.5750008",
"0.5750008",
"0.5748788",
"0.574545",
"0.574545",
"0.5737018",
"0.5737018",
"0.57203645",
"0.57167244",
"0.5696956",
"0.5689147",
"0.56856304",
"0.56826764",
"0.566239",
"0.5662134",
"0.56378525",
"0.56361383",
"0.56322414",
"0.5618442",
"0.5601244",
"0.5598816",
"0.55969167",
"0.5588491",
"0.55858696",
"0.55830187",
"0.55803514",
"0.5578007",
"0.5573785",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.55725294",
"0.5571738",
"0.55697966",
"0.55697966",
"0.5566842",
"0.55628777"
] | 0.0 | -1 |
get pass in params | public function getClientParamAction()
{
$data = $this->bodyParams();
if(isset($data['account'])){
// service
$service = $this->sm->get('Lib\Openvpn\Service\ClientConfig');
$model = $service->getParam($data['account']);
// view
return new ViewModel(
$model->toArray()
);
}
//return new ApiProblem(422, 'Missing require field [account]');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getParams();",
"public function getParams();",
"public function getParams();",
"public function getParams();",
"public function getParams();",
"public function getParams();",
"public function getParams();",
"public function getParams();",
"public function getParams();",
"public function getParams();",
"function getParams()\n {\n }",
"function getParams()\n {\n }",
"public function getParams() {}",
"public function get_params()\n {\n }",
"public function get_params()\n {\n }",
"function url_get_parameters() {\n $this->init_full();\n return array('id' => $this->modulerecord->id, 'pageid' => $this->lessonpageid);;\n }",
"public function getRequestParams();",
"function getParameters()\r\n {\r\n }",
"function getParams($passAry,$base){\r\n\t\t$getName=$passAry['param_1'];\r\n\t\t$workAry=$base->utlObj->retrieveValue($getName,&$base);\r\n\t\tif ($workAry != null){\r\n\t\t\tforeach ($workAry as $paramName=>$paramValue){\r\n\t\t\t\t$base->paramsAry[$paramName]=$paramValue;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function getParameters();",
"function getParameters();",
"public function getParameters();",
"public function getParameters();",
"public function getParameters();",
"public function getParameters();",
"public function getParameters();",
"public function getParameters();",
"public function getParameters();",
"public function getParameters();",
"public function getParameters() {}",
"public function getParams()\n {\n // TODO: Implement getParams() method.\n }",
"public function getParams(): array;",
"private static function getGetParams()\n\t{\n\t\treturn $_GET;\n\t}",
"function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }",
"public function getParameter();",
"public function getParameter();",
"function getParams()\n {\n global $id;\n global $mode;\n global $data_source;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($data_source)) {\n $this->data_source = $data_source;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }",
"abstract public function getParameters();",
"public function get_params() {\n\t\treturn $this->params;\n\t}",
"public function getParams(){\n\t\treturn $this->params;\n\t}",
"public static function getParam() {\n\n\t}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"public function get_params() {\n return $this->param;\n }",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}",
"public static function getParams()\n {\n return self::$params;\n }",
"function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $data_source;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($data_source)) {\r\n $this->data_source=$data_source;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}",
"public function getParams(){\n return $this->params;\n }",
"public function getParams() :array;",
"function getParams() {\n\t\treturn $this->params;\n\t}",
"function getParameters() {\n $ar = split(\";\", $GLOBALS[\"pagedata\"][\"module\"]);\n for ($c = 0; $c < sizeof($ar); $c++) {\n $a = split(\"=\", $ar[$c]);\n $this->module_param[$a[0]] = $a[1];\n }\n }",
"function getParameters() {\n $ar = split(\";\", $GLOBALS[\"pagedata\"][\"module\"]);\n for ($c = 0; $c < sizeof($ar); $c++) {\n $a = split(\"=\", $ar[$c]);\n $this->module_param[$a[0]] = $a[1];\n }\n }",
"function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}",
"function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}",
"public static function params()\n\t{\n\t\treturn self::$router->getParams();\n\t}",
"static function getParams(){\n\t\t\tif (count(self::$query)>0){\n\t\t\t\t//comprovar si és parell\n\t\t\t\tif((count(self::$query)%2)==0){\n\t\t\t\t\tCoder::codear(self::$query);\n\t\t\t\t\treturn self::$query;\n\n\t\t\t\t}else{\n\t\t\t\t\techo 'ERROR in params array';\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}",
"public function get_url_params()\n {\n }",
"public static function getRequiredParams();",
"public function getParams()\r\n\t{\r\n\t\treturn $this->params;\r\n\t}",
"public function getParameters()\n\t{\n\n\t}",
"public function getParameters()\n\t{\n\n\t}",
"public function getParams()\n\t{\n\t\treturn $this->params;\n\t}",
"public function getArgs(){\n\t\t\treturn $this->matchingRoute->getParam($this->url->getLastPartOfUrl());\n\t\t}",
"public function getRouteParams();",
"function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n\n\n\n}",
"function getRouteParameters();",
"public function getParams(){\n if( !empty($this->uri['query']) ):\n parse_str($this->uri['query'], $this->params);\n return $this->params;\n endif;\n }",
"public function paramsGet()\r\n {\r\n return $this->params_get;\r\n }",
"function getParams() {\n global $id;\n global $file;\n global $teg;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n\n\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n\n}",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParameters(/* ... */)\n {\n return $this->_params;\n }",
"public function params()\n\t{\n\t\t$r = array();\n\t\tforeach (func_get_args() as $name)\n\t\t\t$r[] = @$this->params[$name];\n\t\treturn $r;\n\t}",
"function getParams() {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }",
"private function getParameters()\n {\n $inputParametersStr = \"\";\n\n foreach ($_GET as $key => $input) {\n\n if(empty($input)){\n continue ; //ignore empty field \n }\n $inputParametersStr .= \"$key=\" . urlencode($input) . \"&\"; // convert string into url syntax.\n\n }\n $inputParametersStr = trim($inputParametersStr, '&'); // separate parameters by \"&\" .\n\n return $inputParametersStr ;\n }",
"function _load_get_params(&$app, &$c) {\n\t\t$params =& $c->param('app.view_http.request.params');\n\t\tif (is_array($params)) {\n\t\t\tforeach($params as $p_name => $p_value) {\n\t\t\t\t$this->_http->addQueryString($p_name, $p_value);\n\t\t\t}\n\t\t}\n\t}",
"public function getParams($name = '') {\n if($name) {\n return isset($this->params[$name]) ? $this->params[$name] : '';\n }\n else{\n return $this->params;\n }\n }",
"public function getParams() {\n\t\treturn $this->params;\n\t}",
"public function getParams()\n\t{\n\t\treturn $this->_params;\n\t}",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }",
"public function getParams()\n {\n return $this->params;\n }"
] | [
"0.82746786",
"0.82746786",
"0.82746786",
"0.82746786",
"0.82746786",
"0.82746786",
"0.82746786",
"0.82746786",
"0.82746786",
"0.82746786",
"0.8227993",
"0.8204518",
"0.81418544",
"0.7990457",
"0.7990457",
"0.77693474",
"0.7595113",
"0.7540298",
"0.75054413",
"0.7490322",
"0.7490322",
"0.7453477",
"0.7453477",
"0.7453477",
"0.7453477",
"0.7453477",
"0.7453477",
"0.7453477",
"0.7453477",
"0.7427664",
"0.74232",
"0.74077386",
"0.7373382",
"0.73587567",
"0.7358679",
"0.7358679",
"0.73402435",
"0.7317556",
"0.7299812",
"0.7288704",
"0.7271894",
"0.7269349",
"0.7269349",
"0.7269349",
"0.7269349",
"0.72556615",
"0.7250116",
"0.7250116",
"0.7250116",
"0.72248787",
"0.72070396",
"0.7203242",
"0.72030944",
"0.71943593",
"0.7186439",
"0.7186439",
"0.7179717",
"0.7179717",
"0.7170496",
"0.7163584",
"0.71592385",
"0.71525204",
"0.714634",
"0.71358746",
"0.71358746",
"0.71233976",
"0.7113071",
"0.7103113",
"0.7090551",
"0.7079229",
"0.7054384",
"0.70497",
"0.70404065",
"0.70385635",
"0.70385635",
"0.70274603",
"0.70079166",
"0.70009595",
"0.70009524",
"0.69949436",
"0.69901276",
"0.6980141",
"0.6962975",
"0.6960584",
"0.69517297",
"0.69517297",
"0.69517297",
"0.69517297",
"0.69517297",
"0.69517297",
"0.69517297",
"0.69517297",
"0.69517297",
"0.69517297",
"0.69517297",
"0.69517297",
"0.69517297",
"0.69517297",
"0.69517297",
"0.69517297",
"0.69517297"
] | 0.0 | -1 |
change logged in user password | public function changePassword(Request $request)
{
try {
$validator = Validator::make($request->all(), [
'old_password' => 'required',
'password' => ['required', 'min:6'],
]);
if ($validator->fails()) {
return response()->jsend_error(new \Exception($validator->errors()->first()), $message = null);
}
$user = $this->userService->user->find($request->user()->id);
if (!Hash::check($request->old_password, $user->password)) {
return response()->jsend_error(new \Exception("Old password does not match"), $message = null, $code = 422);
}
$user->password = Hash::make($request->password);
if ($user->save())
return response()->jsend($data = $user, $presenter = null, $status = "success", $message = null, $code = 200);
} catch (\Exception $exception) {
$error['statusCode'] = $exception->getCode();
$error['message'] = $exception->getMessage();
Log::error('Password change error: ', $error);
return response()->jsend_error(new \Exception($exception->getMessage()), $message = null, $code = $error['statusCode'] ?? 200);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function changePassword() {}",
"public function changeUserPassword($uid,$newPassword);",
"function regiomino_user_change_password($account, $password) {\r\n\t//watchdog('pwdaction', '@password', array('@password' => $password));\r\n $edit['pass'] = $password;\r\n user_save($account, $edit);\r\n}",
"public function changePassword()\n {\n if( ! Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $user = User::find(Session::getCurrentUserID());\n\n View::make('templates/front/change-password.php',array());\n }",
"public function setPassword($userid, $password);",
"public function setPassword($newPassword);",
"public function change_password() {\n $flash = null;\n // if the user has tried logging in\n if(isset($_POST['login'])){\n // try verifying the user\n if($this->User->login($_POST['username'], $_POST['old_pass'])) {\n if($_POST['new_pass']==$_POST['new_pass_verify']){\n $this->User->setPassword($User->getId(), $_POST['new_pass']);\n session_write_close();\n header(\"Location: \".app::site_url(''));\n exit(0);\n } else {\n $flash = \"I'm sorry, but the new passwords did not match.\";\n }\n } else {\n $flash = \"That username and/or password is not valid.\";\n }\n }\n return array('flash' => $flash);\n }",
"public function modifpassword($user,$passwd){\n \n }",
"public function changePassword($username, $password);",
"public function changePassword(User $user, string $newPassword): void;",
"function changePass() {\n\t\t$id = $this->AuthExt->User('id');\n\t\tif (!$id && empty($this->data)) {\n\t\t\t$this->Session->setFlash(__('Invalid user', true));\n\t\t\t$this->redirect(array('action' => 'index'));\n\t\t}\n\t\t\n\t\tif (!empty($this->data)) {\n\t\t\t//don't allow hidden variables tweaking get the group and username \n\t\t\t//form the system in case an override occured from the hidden fields\n\t\t\t$this->data['User']['role_id'] = $this->AuthExt->User('role_id');\n\t\t\t$this->data['User']['username'] = $this->AuthExt->User('username');\n\t\t\tif ($this->User->save($this->data)) {\n\t\t\t\t$this->Session->setFlash('The password change has been saved', 'flash_success');\n\t\t\t\t$this->redirect(array('action' => 'index', 'controller' => ''));\n\t\t\t} else {\n\t\t\t\tprint_r($this->data);\n\t\t\t\t$this->data = $this->User->read(null, $id);\n\t\t\t\t$this->data['User']['password'] = null;\n\t\t\t\t$this->data['User']['confirm_passwd'] = null;\n\t\t\t\t$this->Session->setFlash('The password could not be saved. Please, try again.', 'flash_failure');\n\t\t\t}\n\t\t}\n\t\tif (empty($this->data)) {\n\t\t\t$this->data = $this->User->read(null, $id);\n\t\t\t$this->data['User']['password'] = null;\n\t\t}\n\t\t$roles = $this->User->Role->find('list');\n\t\t$this->set(compact('roles'));\n\t}",
"public function updatePassword()\n {\n $user = User::find(Database::connection(), $_SESSION['id']);\n\n // Update password\n return $user->updatePassword(Database::connection(), $_POST['password']);\n }",
"public function change_password() {\n\t\tif (!empty($this->request->data)) {\n\t\t\t$this->request->data['User']['id'] = $this->Auth->user('id');\n\t\t\tif ($this->User->changePassword($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('Password changed.', true));\n\t\t\t\t$this->redirect('/');\n\t\t\t}\n\t\t}\n\t}",
"public function changeAdminUserPassword() {\n\t\t$data = $this->request->data['User'];\n\n\t\t$this->User->id = $userId = $data['id'];\n\t\tif ($this->User->saveField('password', $data['new_password'])) {\n\t\t\t$isPasswordChanged = ($data['current_password'] !== $data['new_password']) ? true : false;\n\t\t\tif ($isPasswordChanged && ($userId !== $this->Auth->User('id'))) {\n\t\t\t\t$this->__sendPasswordChangedEmail($data);\n\t\t\t}\n\t\t\t$this->Session->setFlash(__('Password changed successfully.'), 'success');\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('Could not change the password due a server problem, try again later.'), 'error');\n\t\t}\n\n\t\t$this->redirect('/admin/users/editAdmin/' . $userId);\n\t}",
"public function Change_user_password() {\n\t\t$this->load->helper('pass');\n\t\t$user = $this->administration->getMyUser($this->user_id);\n\t\t//password\n\t\t$old_pass = $this->input->post('oldPassword');\n\t\t$newPass = $this->input->post('newPassword');\n\t\t$confirmNewPass = $this->input->post('confirmNewPassword');\n\t\tif($newPass == $confirmNewPass) {\n\t\t\t//check if old password is corrent\n\t\t\t$verify = $this->members->validateUser($user->Username,$old_pass);\n\t\t\tif($verify) {\n\t\t\t\t//validate if the password is in the correct format\n\t\t\t\t$valid_new_pass = checkPasswordCharacters($newPass);\n\t\t\t\tif($valid_new_pass) {\n\t\t\t\t\t$change_pass = $this->members->simple_pass_change($user->ID,$newPass);\n\t\t\t\t\tif($change_pass) {\n\t\t\t\t\t\techo '1';\n\t\t\t\t\t}else {\n\t\t\t\t\t\techo '6';\t\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\techo '7';\t\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\techo '8';\t\n\t\t\t}\n\t\t}else {\n\t\t\techo '9';\t\n\t\t}\n\t}",
"private function setEncryptPassword(){\n // Encode the new users password\n $encrpyt = $this->get('security.password_encoder');\n $password = $encrpyt->encodePassword($this->user, $this->user->getPassword());\n $this->user->setPassword($password);\n }",
"public function setpassword(){\n\t\t$args = $this->getArgs();\n\t\t$out = $this->getModel()->getUserDataByRenewToken(UserController::getRenewTokenHash($args[\"GET\"][\"token\"]));\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}",
"public function setPassword($newPassword){\n\t}",
"private function __changePassword() {\n\t\t$data = $this->request->data['User'];\n\t\t$this->User->id = $this->Auth->user('id');\n\t\tif ($this->User->saveField('password', $data['new_password'])) {\n\t\t\t$this->Session->setFlash(__('Your password changed successfully.'), 'success');\n\t\t\t$this->redirect($this->referer());\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('Could not change your password due to a server problem, try again later.'), 'error');\n\t\t}\n\t}",
"function update_password()\n {\n }",
"public function changePasswordAction()\n {\n $errors = [];\n if(!empty($_POST)){\n $user = Auth::getUser();\n\n $userValidation = new UserValidation($_POST, ['password']);\n $errors = $userValidation->getNamedErrors();\n\n if(empty($errors)){\n if(password_verify($_POST['oldpass'], $user->password)){\n $user->changePassword($_POST['password']);\n Extra::setMessageCookie(\"Password changed successfully.\");\n $this->redirect(\"/manage-account/\");\n }\n $errors['oldpass'] = \"Password you entered is incorrect.\";\n }\n }\n View::renderTemplate(\"LoggedUser/change-password.html\", [\n 'errors' => $errors\n ]);\n }",
"function changepass_firsttime()\n {\n $userId = $this->userInfo('user_id');\n \n $result = $this->update('user', array('password' => $this->value('password'), 'modified' => date('Y-m-d H:i:s')), \" user_id = \".$userId);\n \n if($result === TRUE)\n {\n //this will prevent user from being logged out automatically. (as it happens in old implementation)\n $_SESSION['password'] = $this->value('password');\n \n //update the patient_history table with \"password change\" action to 'complete'\n $data = array(\n 'patient_id' => $userId,\n 'action_type' => 'first time login',\n 'action' => 'password change', \n 'action_status' => 'complete',\n 'action_time' => date('Y-m-d H:i:s')\n );\n $this->insert('patient_history', $data);\n \n echo \"{success:true, message:'Password updated successfully'}\";\n }\n else\n {\n echo \"{success:false, message:'Password update failure'}\";\n }\n }",
"public function account_change_password()\n\t{\n\t\t$data = array('password' => $this->input->post('new_password'));\n\t\tif ($this->ion_auth->update($this->mUser->id, $data))\n\t\t{\n\t\t\t$messages = $this->ion_auth->messages();\n\t\t\t$this->system_message->set_success($messages);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$errors = $this->ion_auth->errors();\n\t\t\t$this->system_message->set_error($errors);\n\t\t}\n\n\t\tredirect('admin/panel/account');\n\t}",
"function changePassword($password, $userid){\n $query = \"UPDATE users_account SET password = ? WHERE userid = ?\";\n $paramType = \"si\";\n $paramValue = array(\n $password,\n $userid\n );\n $this->db_handle->update($query, $paramType, $paramValue);\n }",
"public function setPassword(){\n\t}",
"public function changePasswordAction(){\n $data = $this->getRequestData();\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n if(isset($data['password']) && isset($data['repeat_password'])){\n if($data['password'] === $data['repeat_password']){\n $user->setPassword($data['password']);\n } else {\n $this->setErrorResponse('password and repeat_password should match!');\n }\n } else {\n $this->setErrorResponse('password and repeat_password is mandatory fields!');\n }\n $this->_helper->json(array('updated' => true));\n }",
"function change_passwd($Username, $old_Password, $new_Password){\n $new_Password = encrypt_pwd($new_Password);\n $SQL = \"UPDATE User SET Password = '$new_Password' WHERE Username='$Username'\";\n mysqli_query($this->db_link, $SQL);\n }",
"function user_changed_password($user_id, $new_password) {\n \n }",
"public function setPassword() {\n if ($this->Password) {\n $this->Password = \\app\\components\\Utilities::setHashedValue($this->Password);\n }\n }",
"function changepassword() \n\t{\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n $this->viewData['hash'] =User::userid();\n // Render the action with template\n $this->renderWithTemplate('users/changepassword', 'AdminPageBaseTemplate');\n }",
"public function account_change_password()\n\t{\n\t\t$user_session = $this->session->all_userdata();\n\t\t$user_id = $user_session['user_id'];\n\t\t\n\t\t// print_r($user_id);\n\t\t// die;\n\n\t\t$new_password = $this->input->post('new_password');\n\t\t$retype_password = $this->input->post('retype_password');\n\n\t\tif ($new_password != $retype_password)\n\t\t{\n\t\t\t$this->system_message->set_error(\"Password Miss Match\");\n\n\t\t}\n\t\telse{\n\t\t\t$data = array('password' => $this->input->post('new_password'));\n\t\t\tif (!empty($new_password) && !empty($retype_password))\n\t\t\t{\n\t\t\t\tif ($this->ion_auth->update($this->mUser->id, $data))\n\t\t\t\t{\n\t\t\t\t\t$this->custom_model->my_update(array('password_show'=>$new_password),array('id' => $user_id),'admin_users');\n\t\t\t\t\techo \"success\"; die;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo \"error\"; die;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"error\"; die;\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"function User_Changepass(){\r\n\t\tif( ($token = Str_filter($_POST['token'])) && ($old_password = Str_filter($_POST['old_password'])) && ($new_password = Str_filter($_POST['new_password'])) ){\r\n\t\t\tif($username = AccessToken_Getter($token)){\r\n\t\t\t\tif($user = Mongodb_Reader(\"todo_users\",array(\"username\" => $username),1)){\t\t\t\t\r\n\t\t\t\t\tif(md5($old_password) == $user['password']){\r\n\t\t\t\t\t\tMongodb_Updater(\"todo_users\",array(\"username\" => $username),array(\"password\" => md5($new_password)));\r\n\t\t\t\t\t\t$res = Return_Error(false,0,\"修改成功\",array(\"username\" => $username));\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$res = Return_Error(true,6,\"密码不正确\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$res = Return_Error(true,5,\"该用户不存在\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$res = Return_Error(true,7,\"token无效或登录超时\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$res = Return_Error(true,4,\"提交的数据为空\");\r\n\t\t}\r\n\t\techo $res;\r\n\t}",
"function mysql_auth_change_password($username,$password)\n{\n $encrypted = crypt($password,'$1$' . strgen(8).'$');\n return dbUpdate(array('password' => $encrypted), 'users', '`username` = ?', array($username));\n}",
"function change_password($password){\n\t\tif( isset($_POST[$password]) ){\n\t\t\t$new_password = $_POST[$password];\n\n\t\t\t$result = user::change_password($new_password);\n\t\t}\n\t}",
"private function changePassword()\n {\n try\n {\n global $userquery; \n\n $request = $_REQUEST;\n\n if(!userid())\n throw_error_msg(\"Please login to perform this action\");\n\n if(!isset($request['old_pass']) || $request['old_pass']==\"\")\n throw_error_msg(\"provide old_pass\");\n\n //new_pass\n if(!isset($request['new_pass']) || $request['new_pass']==\"\")\n throw_error_msg(\"provide new_pass\");\n\n //c_new_pass\n if(!isset($request['c_new_pass']) || $request['c_new_pass']==\"\")\n throw_error_msg(\"provide c_new_pass\");\n\n if($request['c_new_pass']!=$request['c_new_pass'])\n throw_error_msg(\"new password and confirm password do not match\");\n\n $request['userid'] = userid();\n $userquery->change_password($request);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n else\n {\n $data = array('code' => \"204\", 'status' => \"success\", \"msg\" => \"success\", \"data\" => \"password has been changed successfully\");\n $this->response($this->json($data)); \n } \n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }",
"function change_password()\n {\n if ($user = $this->authorized(USER))\n {\n $descriptive_names = array(\n 'current_password' => 'Current Password',\n 'new_password' => 'New Password',\n 'new_password_confirm' => 'Confirm Password'\n );\n\n $rules = array(\n 'current_password' => ($user['group_id']==0)?'clean':'required|clean',\n 'new_password' => 'required|clean',\n 'new_password_confirm' => 'required|clean'\n );\n\n $this->loadLibrary('form.class');\n $form = new Form();\n\n $form->dependencies['title'] = \"Change Password\";\n $form->dependencies['form'] = 'application/views/change-password.php';\n $form->dependencies['admin_reset'] = false;\n $form->dependencies['client_id'] = $user['id'];\n $form->form_fields = $_POST;\n $form->descriptive_names = $descriptive_names;\n $form->view_to_load = 'form';\n $form->rules = $rules;\n\n if ($fields = $form->process_form())\n {\n\n $this->loadModel('UserAuthentication');\n\n\n if ($this->UserAuthentication->change_password($user['id'], $fields['current_password'], $fields['new_password'], $fields['new_password_confirm']))\n {\n $this->alert(\"Password Updated\", \"success\");\n $this->redirect(\"portal/home\");\n }\n else\n {\n $this->alert(\"Error: Password Not Updated\", \"error\");\n $this->redirect(\"portal/home\");\n }\n }\n }\n }",
"public function changePassword(){\n $user=User::find(auth()->id());\n $user->password=bcrypt(request('new_password'));\n $user->save();\n return response()->json('Password Updated Successfully');\n }",
"Public Function changePassword($NewPassword)\n\t{\n\t\t$this->_db->exec(\"UPDATE bevomedia_user SET Password = md5('$NewPassword') WHERE ID = $this->id\");\n\t}",
"public function actionChangepassword()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\n\t\t\n\t\t$this->checkUser();\n\t\t\n\t\t$record = SiteUser::model()->findByAttributes(array('id'=> Yii::app()->user->id));\n\t\n\t\tif(isset($_POST['SiteUser']))\n\t\t{\t\n\t\t\tif(trim($_POST['SiteUser']['password']) != '') {\n\t\t\t\t$record->password = $_POST['SiteUser']['password'];\n\t\t\t\t\n\t\t\t} \t\t\n\t\t\tif(trim($_POST['SiteUser']['password']) == trim($_POST['SiteUser']['repeat_password'])) {\n\t\t\t\t$record->repeat_password = $record->password;\n\t\t\t}\t\n\t\t\t\n\t\t\tif($record->validate()) {\n\t\t\t\t$record->repeat_password = $record->password = crypt($record->password);\n\t\t\t\tif($record->save())\n\t\t\t\t\t$this->redirect(array('personal'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$record->repeat_password = $record->password = '';\n\t\t\t}\n\n\t\t}\t\n\n\t\t$this->render('changepassword',array('record'=>$record));\n\t}",
"public function change_password()\n {\n $currentPassword = $this->input->post('currentPassword');\n $newPassword = $this->input->post('newPassword');\n\n $isPasswordChanged = $this->CustomModel->changePassword(\n $_SESSION['u_id'], $currentPassword, $newPassword\n );\n\n if ($isPasswordChanged) {\n echo 'success';\n }\n }",
"public function changePassword(PasswordChangeForm $form, User $user);",
"protected function changePassword()\n {\n if (empty($this->password)) {\n return;\n }\n $this->validateOnly('password', ['password' => 'min:8|confirmed']);\n $this->user->update([\n 'password' => Hash::make($this->password),\n ]);\n $this->password = null;\n $this->password_confirmation = null;\n }",
"function changePassword($userid, $password, $mode = null)\n\t{\n\t\trequire_once $_SERVER['DOCUMENT_ROOT'] . '/Connections/MyDBConnector.php';\n\t\t$pdo = (new MyDBConnector())->getPDO();\n\t\t$sql = \"UPDATE staff_directory SET `pswd` = '\" . password_hash($password, PASSWORD_BCRYPT) . \"' WHERE staffId = \" . $userid;\n\t\t$stmt = $pdo->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));\n\t\t$chk = $stmt->execute();\n\t\tif ($chk) {\n\t\t\treturn 'success';\n\t\t} else {\n\t\t\treturn 'error';\n\t\t}\n\t}",
"public function setPassword($value);",
"function change_password($user_id, $password)\n{\n\n $query = \"select salt, username from tblUser where user_id='$user_id' limit 1\";\n $result = mysql_query($query);\n $user = mysql_fetch_array($result);\n\n $encrypted_pass = md5(md5($password).$user['salt']);\n\n // And lastly, store the information in the database\n $query = \"UPDATE tblUser SET password='$encrypted_pass' WHERE user_id='$user_id'\";\n mysql_query ($query) or die ('Could not create user.');\n\n\t//login user\n\t$username = $user['username'];\n\t$result = user_login($username, $password);\n\n}",
"public function changePassword()\n {\n $breadCrumb = $this->userEngine->breadcrumbGenerate('change-password');\n\n return $this->loadPublicView('user.change-password', $breadCrumb['data']);\n }",
"public function updatePassword(UserInterface $user);",
"public function change_password()\n\t{\n\t\t$this->load->model('admin_user_model', 'admin_users');\n\t\t$updated = $this->admin_users->change_password($this->mUser->id, $this->input->post('new_password'));\n\n\t\tif ($updated)\n\t\t{\n\t\t\tset_alert('success', 'Successfully changed password.');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tset_alert('danger', 'Failed to changed password.');\n\t\t}\n\n\t\tredirect('admin/account');\n\t}",
"public function change_user_credential() {\n\t\t$result = $this->user_model->update_user_password($this->session->userdata('user_id'), $_POST);\n\n\t\tif ($result['success']) {\n\t\t\t$this->session->set_flashdata('credential_change_successful', \"Password changed successfully.\");\n\t\t} else {\n\t\t\t$this->session->set_flashdata('credential_change_failed', $result['message']);\n\t\t}\n\n\t\tredirect(site_url('user/profile/credential'), 'refresh');\n\t}",
"public function changePassword()\n {\n $this->validateOnly('password', [\n 'password' => 'bail|nullable|required_with:password_confirmation|string|confirmed',\n 'current_password' => 'bail|required',\n ]);\n\n if (!Hash::check($this->current_password, $this->user->password)) {\n $this->addError('current_password', 'Your current password is incorrect.');\n return;\n }\n\n $this->user->password = bcrypt($this->password);\n $this->user->save();\n $this->toast('Password has been changed!', 'success');\n $this->emit('password-updated');\n $this->reset(['password', 'password_confirmation', 'current_password']);\n }",
"function SetPassword ( $p )\n {\n $this->username = isset( $_SESSION [ \"username\" ] ) ? sanitize_string( $_SESSION [ \"username\" ] ) : null;\n if ( !$this->username ) {\n $this->username = isset( $_COOKIE [ \"username\" ] ) ? sanitize_string( $_COOKIE [ \"username\" ] ) : null;\n }\n $this->mongo->setCollection( COLLECTION_ADMINS );\n $this->mongo->dataUpdate( array( \"username\" => $this->username ), array( '$set' => array( \"password\" => sha1( $p ) ) ) );\n }",
"public function actionchangePassword() {\n if (isset($_POST['password'])) {\n\n $userid = Yii::app()->user->getState('userid');\n $model = HhUsers::model()->findByPk($userid);\n if ($model->password == md5($_POST['password'])) {\n\n $model->password = md5($_POST['newpassword']);\n if ($model->save()) {\n $this->redirect('index');\n }\n }\n }\n $this->render('changePassword');\n }",
"public function change_password() {\n\t\treturn view( 'provider.profile.change_password' );\n\t}",
"public function password()\n {\n $this->isUser();\n\n $this->data['noCabinetOrAdmin'] = true;\n\n if ($_POST) {\n\n if (!$_POST['old-password'] && !$_POST['new-password']) {\n\n $userModel = new UserModel();\n\n $validateResult = $userModel->validate($_POST);\n\n if ($validateResult === true) {\n\n $checkPassword = $userModel->checkOldPassword($_POST['old-password']);\n\n if ($checkPassword) {\n\n if ($userModel->refreshPassword($_POST)) {\n\n $this->data['success'] = 'Пароль успешно изменен';\n\n } else {\n\n $this->data['warning'] = 'Произошла ошибка';\n }\n\n } else {\n\n $this->data['warning'] = 'Старый пароль введен не правильно';\n }\n\n } else {\n\n $this->data['warning'] = $validateResult;\n }\n\n } else {\n\n $this->data['warning'] = 'Все поля должны быть заполнены';\n }\n }\n\n $this->render('password');\n }",
"function changepass()\r\n{\r\n\t$session = $_SESSION[\"username\"];\t\r\n $Password = $_POST['txtPassword'];\r\n $Password2 = $_POST['txtPassword2'];\r\n\t\r\n\tif ($Password != $Password2)\r\n\t{\r\n\theader('Location: index.php?view=changepassword&alert=' . urlencode('PassWord Do not Match'));\r\n\t}\r\n\telse\r\n\t{\r\n\t\r\n\t$sql = \"UPDATE tbl_user \r\n\t SET user_password = PASSWORD('$Password')\r\n\t\t\t WHERE user_name = '$session'\";\r\n\r\n\tdbQuery($sql);\r\n\theader('Location: index.php?view=changepassword&alert=' . urlencode('You have Successfully Modified this User'));\r\n}\r\n}",
"public function setPassword($password);",
"public function setPassword($password);",
"public function setPassword($password);",
"function user_changed_password($user_id, $new_password)\n\t{\n\t}",
"function wp_set_password($password, $user_id)\n {\n }",
"public function updatepassword()\n\t\t{\n\t\t\t$user = Session::get('loggedinuser');\n\t\t\t$userid = DB::table('users')->where('username', $user)->pluck('id');\n\t\t\t$updateduser = User::find($userid);\n\t\t\t$newpassword = Input::get('password');\n\t\t\tif($newpassword == Input::get('confirm')) {\n\t\t\t\t$updateduser->password = Hash::make($newpassword);\n\t\t\t\t$updateduser->save();\n\t\t\t\tSession::flash('successMessage', 'Password successfully updated');\n\t\t\t\treturn Redirect::action('UsersController@index');\n\t\t\t} else {\n\t\t\t\tSession::flash('errorMessage', 'Your passwords do not match!');\n\t\t\t\treturn Redirect::back();\n\t\t\t}\n\t\t}",
"public function userPasswordUpdate() {\n $password = Hash::make($this->request->input(\"new_password\"));\n $updateArray = [\n \"password\" => $password\n ];\n $whereArray = [\n [\"user_id\", '=', $this->request->input(\"user_id\")]\n ];\n $this->usersModel->setTableName(\"cvd_users\");\n $this->usersModel->setInsertUpdateData($updateArray);\n $this->usersModel->setWhere($whereArray);\n $this->usersModel->updateData();\n }",
"function wp_set_password( $password, $user_id ) {\n\t\tglobal $wpdb;\n\n\t\t$hash = wp_hash_password( $password );\n\n\t\t$wpdb->update(\n\t\t\t$wpdb->users,\n\t\t\t[\n\t\t\t\t'user_pass' => $hash,\n\t\t\t\t'user_activation_key' => '',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'ID' => $user_id,\n\t\t\t]\n\t\t);\n\n\t\twp_cache_delete( $user_id, 'users' );\n\n\t\treturn $hash;\n\t}",
"public function change_password($id,$pass)\n\t{\n\t\t$sql=\"UPDATE waf_users SET pass='\".md5($pass).\"' WHERE id=\".$this->db->Q($id);\n\t\t$this->db->QUERY($sql);\n\t}",
"function changePassword($newpass) {\n\t\tif ($this->id == null || $this->id == 0) return false;\n\n\t\t$db = getDb();\n\n\t\t$update_query = \"UPDATE user_table SET\n\t\tuser_password = $newpass\n\t\tWHERE user_id = '$this->id';\";\n\n\t\t$result = mysqli_query($db, $update_query);\n\n\t\tmysqli_close($db);\n\n\t\tif (!$result) return false;\n\n\t\treturn true;\n\n\t}",
"public function testUserPassword() {\n\t\t// make new User and save it to the database\n\t\t$newPassword = Generate::hash();\n\n\t\t// change the User password\n\t\t$this->visit('/home')\n\t\t\t->click('#user-update-button')\n\t\t\t->seePageIs('/user/update')\n\t\t\t->click('Change Password')\n\t\t\t->seePageIs('/user/password')\n\t\t\t->type($this->password, 'old_password')\n\t\t\t->type($newPassword, 'password')\n\t\t\t->type($newPassword, 'password_confirmation')\n\t\t\t->press('Change Password')\n\t\t\t->seePageIs('/home')\n\t\t\t->see('Your password was changed successfully!')\n\t\t\t->click('Logout')\n\t\t\t->seePageIs('/');\n\n\t\t// test a regular User's login with the new password\n\t\t// TODO: check the database instead of testing the login process\n\t\t$this->visit('/')\n\t\t\t->click('#login-button')\n\t\t\t->seePageIs('/login')\n\t\t\t->type($this->User->email, 'email')\n\t\t\t->type($newPassword, 'password')\n\t\t\t->press('Login')\n\t\t\t->seePageIs('/home')\n\t\t\t->within('#nav', function() {\n\t\t\t\t$this->see('Logout')\n\t\t\t\t\t->dontSee('Login')\n\t\t\t\t\t->dontSee('Admin');\n\t\t\t});\n\t}",
"public function changePassword(User $user){\n //username+emp-id+current-year\n $password = $user->username.$user->profile->emp_id.\\Carbon\\Carbon::now()->year;\n $user->update(['password' => $password]);\n return redirect()\n ->back()\n ->with('status','Password reseted');\n }",
"function changeUserPassword($user_id, $password){\n $md5_password = md5($password);\n sqlQuery(\"UPDATE users SET user_password='$md5_password' WHERE user_id='$user_id'\");\n}",
"public function user_password_change($id){\n\t\tif($this->facebook_password_completed($this->session->userdata('id'))){\n\t\t\t$data = $this->array_from_post(array('password', 'facebook_signup' ));\n\t\t}\n\t\telse{\n\t\t\t$data = $this->array_from_post(array('password'));\n\t\t}\n\t\t$data['password'] = $this->hash($data['password']);\n\t\t//Saving data and redirecting\n\t\t$this->save($data, $id);\n\t}",
"public function change_user_password($storeid,$password)\r\n\t{\r\n\t\t$this->db->where('storeid', $storeid);\r\n\t\t$pass=$this->encrypt_decrypt('encrypt', $password);\r\n\t\t$data=array('password'=>$pass);\r\n\t\t$result=$this->db->update('user', $data);\r\n\t\treturn $result;\r\n\t}",
"function dbUpdatePassword($pass)\n {\n $this->password = $pass;\n /* Standard replace does not replace passwords */\n $args = [\n 'password%sql' => array('MD5(%s)', $this->password)\n ];\n dibi::query('UPDATE user SET ', $args, 'WHERE `id`=%i', $this->id);\n }",
"function setPassword($user,$password) {\r\n\t\t$wpuser=get_userdatabylogin($user->mName);\r\n\t\tif(!$wpuser)\r\n\t\t\treturn false;\r\n\t\twp_set_password($password,$wpuser->user_id);\r\n\t\treturn true;\r\n\t}",
"public function action_password() {\n\tif (Session::get(\"username\", null) != null) {\n\t $this->template->title = \"Already authenticated!\";\n\t $this->template->content = 'You have already loggend in! You are ' .\n\t\t Session::get(\"username\") . ' your role is ' .\n\t\t Session::get(\"role\");\n\t return;\n\t}\n\n\tif (Input::post(\"username\", null) == null) {\n\t //there was no user input\n\t $this->template->title = \"Please, authenticate\";\n\t $this->template->content = View::forge(\"account/password\");\n\t} else {\n\t //user is trying to authenticate\n\n\t $user = Model_Orm_Passworduser::password_login(Input::post(\"username\"), Input::post(\"password\"));\n\n\t if ($user == null) {\n\t\tSession::set_flash(\"error\", \"User name or password incorrect\");\n\t\t//and returning the same login form\n\t\t$this->template->title = \"Please, authenticate\";\n\t\t$this->template->content = View::forge(\"account/password\");\n\t } else {\n\t\t//tried to authenticate and succeeded\n\t\t$this->template->title = 'Authentication successful';\n\t\t$this->template->content = 'Authentication was successful, you are ' .\n\t\t\t$user->user_name . ' your role is ' .\n\t\t\t$user->user_role;\n\t\tSession::set(\"username\", $user->user_name);\n\t\tSession::set(\"role\", $user->user_role);\n\t }\n\t}\n }",
"public function actionChangePassword()\n {\n $username = $this->prompt(Console::convertEncoding(Yii::t('app', 'Username')) . ':', ['required' => true]);\n $model = $this->findModel($username);\n $model->setPassword($this->prompt(Console::convertEncoding(Yii::t('app', 'New password')) . ':', [\n 'required' => true,\n 'pattern' => '#^.{4,255}$#i',\n 'error' => Console::convertEncoding(Yii::t('app', 'More than {:number} symbols', [':number' => 4])),\n ]));\n $this->log($model->save());\n }",
"public function savePasswordToUser($user, $password);",
"public function changePassword(string $login, string $password){\n global $con;\n $gtwUser= new UserGateway($con);\n $gtwUser->ChangePassword($login, $password);\n }",
"function changePassword( $name, $pw ) {\n $d = loadDB();\n \n $found = false;\n foreach ($d['users'] as &$user) {\n if ($name == $user['name'] || $name == $user['email']) {\n $user[\"password\"] = $pw;\n saveDB( $d );\n $found = true;\n break;\n }\n }\n if (!$found)\n return FALSE;\n audit( \"changePassword done\", $name );\n return TRUE;\n }",
"function setPassword( $user, $password ) {\n global $shib_pretend;\n\n return $shib_pretend;\n }",
"public function change_password()\n\t{\n\t \n\t \n \t\t/* Breadcrumb Setup Start */\n\t\t\n\t\t$link = breadcrumb();\n\t\t\n\t\t$data['breadcrumb'] = $link;\n\t\t\n\t\t/* Breadcrumb Setup End */\n\t\n\t\t$data['page_content']\t=\t$this->load->view('changepwd',$data,true);\n\t\t$this->load->view('page_layout',$data);\n\t}",
"function password_update($password) {\n\t\t$hash = hash_password($password);\n\t\tlgi_mysql_query(\"UPDATE %t(users) SET `passwd_hash`='%%' WHERE `name`='%%'\",$hash, $this->userid);\n\t}",
"public function update_password($id, $password);",
"function changePassword($userData)\n\t\t{\n\t\t\t$old_password = $this->manageContent->getValue_where('user_credentials', '*', 'user_id', $_SESSION['user_id']);\n\t\t\t\n\t\t\tif($old_password[0]['password'] == md5($userData['old_pass']))\n\t\t\t{\n\t\t\t\tif(!empty($userData['new_pass']) && $userData['new_pass'] == $userData['re_pass'])\n\t\t\t\t{\n\t\t\t\t\t$change_password = $this->manageContent->updateValueWhere('user_credentials', 'password', md5($userData['new_pass']), 'user_id', $_SESSION['user_id']);\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $change_password;\n\t\t}",
"public function password(){\r\n\r\n\t\t\t$user_info = Helper_User::get_user_by_id($this->user_id);\r\n\r\n\t\t\tif($_POST){\r\n\r\n\t\t\t\t$formdata = form_post_data(array(\"old_password\", \"new_password\", \"repeat_new_password\"));\r\n\t\t\t\t\r\n\t\t\t\t$old_password = trim($formdata[\"old_password\"]);\r\n\t\t\t\t$new_password = trim($formdata[\"new_password\"]);\r\n\t\t\t\t$repeat_new_password = trim($formdata[\"repeat_new_password\"]);\r\n\r\n\t\t\t\t$error_flag = false;\r\n\r\n\t\t\t\tif(strlen($old_password) <= 0){\r\n\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\tTemplate::notify(\"error\", \"Please enter the old password\");\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tif(strlen($new_password) > 0 && strlen($repeat_new_password) > 0){\r\n\t\t\t\t\t\t// if both fields are not empty\r\n\r\n\t\t\t\t\t\tif(strlen($new_password) < 6){\r\n\t\t\t\t\t\t\t// the password cannot be less than 6 characters\r\n\t\t\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\t\t\tTemplate::notify(\"error\", \"Too short password. Password must be at least 6 characters long.\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// now compare the two new passwords\r\n\t\t\t\t\t\t\tif(strcmp($new_password, $repeat_new_password) !== 0){\r\n\t\t\t\t\t\t\t\t// both passwords are not same\r\n\t\t\t\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\t\t\t\tTemplate::notify(\"error\", \"New Passwords do not match. Please try again.\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tTemplate::notify(\"error\", \"Please enter the new password\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!$error_flag){\r\n\t\t\t\t\t// means there are no any errors\r\n\t\t\t\t\t// get the current user account from the database\r\n\t\t\t\t\t// if the old password matches with the one that the user entered\r\n\t\t\t\t\t// change the password, else throw an error\r\n\r\n\t\t\t\t\t$old_password_hash = Config::hash($old_password);\r\n\r\n\t\t\t\t\tif(strcmp($old_password_hash, trim($user_info->password)) === 0){\r\n\r\n\t\t\t\t\t\t\tif($this->change_password($new_password, $user_info)){\r\n\t\t\t\t\t\t\t\tTemplate::notify(\"success\", \"Password changed successfully\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tredirect(Config::url(\"account\"));\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tTemplate::notify(\"error\", \"Wrong Old Password. Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tConfig::set(\"active_link\", \"password\");\r\n\t\t\tConfig::set(\"page_title\", \"Change Account Password\");\r\n\r\n\t\t\t$view_data[\"user_info\"] = $user_info;\r\n\r\n\t\t\tTemplate::setvar(\"page\", \"account/password\");\r\n\t\t\tTemplate::set(\"account/template\", $view_data);\r\n\t\t}",
"public function changePassword(string $newpass): void\n {\n $enc = new Encryption();\n list($privKey, $pubKey) = $enc->genNewKeys();\n\n // Loop through all credentials for this user and reencrypt them with the new private key\n $this->updateEncryptedCredentials(session()->get('password'), $pubKey, $enc);\n\n // Encrypt private key with new password\n $encryptedprivkey = $enc->enc($privKey, $newpass);\n\n // Update users-table with the new password (hashed) and the private key (encrypted)\n $this->password = Hash::make($newpass);\n $this->pubkey = $pubKey;\n $this->privkey = $encryptedprivkey;\n $this->save();\n\n session()->put('password', $newpass);\n }",
"function ajax_changePass(){\n $pass = md5($this->input->post('password'));\n if(strtoupper($this->session->password) != strtoupper($pass))\n {\n $this->session->sess_destroy();\n echo $this->Conexion->modificar('usuarios', array('password' => $pass), array('vencimiento_password' => 'CURRENT_TIMESTAMP() + INTERVAL 30 day'), array('id' => $this->session->id));\n }\n }",
"function changepassword()\n {\n $data['action'] = $this->lang->line('changepassword');\n $data['title'] = $this->lang->line('changepassword');\n\t $data['user'] = $this->db_session->userdata('user_name');\n $data['fal'] = $this->fal_front->changepassword();\n\t $this->load->view('user/changepassword_view', $data); \n }",
"public function change_password()\n {\n $view_data = [\n 'form_errors' => []\n ];\n // Check input data\n if ($this->input->is_post()) {\n\n // Call API to register for parent\n $res = $this->_api('user')->change_password($this->input->post());\n\n if ($res['success'] && !isset($res['invalid_fields'])) {\n $this->_flash_message('パスワードを変更しました');\n redirect('setting');\n return;\n }\n // Show error if form is incorrect\n $view_data['form_errors'] = $res['invalid_fields'];\n $view_data['post'] = $this->input->post();\n }\n\n $this->_render($view_data);\n }",
"public function changepassAction()\n {\n $user_service = $this->getServiceLocator()->get('user');\n\n $token = $this->params()->fromRoute('token');\n $em = EntityManagerSingleton::getInstance();\n $user = null;\n\n if ($this->getRequest()->isPost())\n {\n $data = $this->getRequest()->getPost()->toArray();\n $user = $em->getRepository('Library\\Model\\User\\User')->findOneByToken($token);\n\n if (!($user instanceof User))\n {\n throw new \\Exception(\"The user cannot be found by the incoming token\");\n }\n\n $user_service->changePassword($data, $user);\n $em->flush();\n }\n\n return ['user' => $user];\n }",
"public function changePwd(){\n $uesr_id=$_SESSION['admin_id'];\n\t\t$sql=\"select * from users where id='$uesr_id'\";\n\t\t$query = mysqli_query($this->connrps, $sql);\n\t\twhile ($row = mysqli_fetch_array($query)) {\n\t\t\t$username = $row['username'];\n\t\t\t$password = $row['password'];\n\t\t}\n\t\t$cur_password=base64_encode($_POST['currentPassword']);\n\t\t$new_pwd=base64_encode($_POST['newPassword']);\n\t\t$confirm_pwd=base64_encode($_POST['confirmPassword']);\n\t\tif ($cur_password != $password) {\n\t\t\t$message= \"Current password does not matched.\";\n\t\t\t$_SESSION['error_msg'] = $message;\n\t\t\treturn 0;\n\t\t}else if ($new_pwd != $confirm_pwd) {\n\t\t\t$message= \"Confirm password does not matched\";\n\t\t\t$_SESSION['error_msg'] = $message;\n\t\t\treturn 0;\n\t\t}else {\n\t\t\t$query_updt = \"UPDATE users SET password = '$new_pwd' WHERE id='$uesr_id'\";\n\t\t\t$query_updt = mysqli_query($this->connrps, $query_updt);\n\t\t\t$message= \"New password has been updated successfully\";\n\t\t\t$_SESSION['succ_msg'] = $message;\n\t\t\treturn 1;\n\t\t}\n\t}",
"public function updatepwd($new_pass,$user_id)\n {\n $data = array(\n 'password' => $new_pass\n );\n return $this->db->where('id', $user_id)\n ->update('user', $data);\n }",
"public function changePassword($newPWD){\r\n\t\tif($this::isLoggedIn()){\r\n\r\n\t\t\tdefined(\"INCLUDING\") or\r\n\t\t\t\tdefine(\"INCLUDING\", 'TRUE');\r\n\t\t\trequire_once \"./database.php\";\r\n\t\t\t\r\n\t\t\t$db = Database::getInstance();\r\n\t\t\t$mysqli = $db->getConnection();+\r\n\t\t\t\r\n\t\t\t$new_password = password_hash($newPWD, PASSWORD_DEFAULT);\r\n\t\t\t\r\n\t\t\t$sql = \"UPDATE UTENTI SET PWD=? WHERE ID=?\";\r\n\t\t\t$q = $mysqli->prepare($sql);\r\n\t\t\t$q->bind_param('si', $new_password,$this->id);\r\n\t\t\tif($q->execute()){\r\n\t\t\t\tif($q->get_result()){\r\n\t\t\t\t\treturn true;}\r\n\t\t\t\telse return false;\r\n\t\t\t}\r\n\t\t\telse throw new Exception(\"Impossibile cambiare password\");\r\n\t\r\n\t\t}\t\r\n\r\n\t}",
"public function changePassword()\n {\n $user = Auth::user();\n return view('member.change_password');\n }",
"public function changePassword($user_id,$password)\r\n\t{\r\n\t\t$data=array('password'=>$password);\r\n\t\t$where=$this->getAdapter()->quoteInto('user_id=?',$user_id);\r\n\t\t$this->update($data,$where);\r\n\t}",
"public function changePasswordAction()\n {\n $form = new Form\\Password();\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n $userModel = new Model\\Users();\n $identity = $this->_auth ->getIdentity();\n $userId = $identity->getId();\n $user = $userModel->getUser($userId);\n $result = $userModel->savePassword($user, $form->getValue('new_password'), $form->getValue('password'));\n\n if ($result) {\n $this->_helper->getHelper('FlashMessenger')->addMessage('Your password was changed.'); \n } else {\n $this->_helper->getHelper('FlashMessenger')->addMessage('Your password was NOT changed.');\n }\n $this->_redirect($this->getRequest()->getRequestUri());\n }\n $this->view->passwordForm = $form;\n }",
"public function changePassword(Sh4bangUserInterface $user, string $newPassword): void\r\n {\r\n $password = $this->passwordEncoder->encodePassword($user, $newPassword);\r\n $user->setPassword($password);\r\n }",
"function admin_password($id = null) {\n\n\t\t/**\n\t\t * If $id is not set and $this->data is empty, an error message is displayed.\n\t\t * $this->data = Datas from the form\n\t\t * $id = The user ID\n\t\t */\n\t\tif (!$id && empty($this->data)) {\n\t\t\t$this->Session->setFlash(__d('core', 'Invalid user.', true), 'default', array('class' => 'error'));\n\t\t\t$this->redirect(array('action' => 'password'));\n\t\t}\n\n\t\tif (!empty($this->data)) {\n\n\t\t\t/**\n\t\t\t * Save the user password after edit.\n\t\t\t */\n\t\t\tif ($this->User->save($this->data)) {\n\n\t\t\t\t/**\n\t\t\t\t * Select the subdomain name with the ID.\n\t\t\t\t * It's necessary for the insert in the \"robot\" table.\n\t\t\t\t * @var string\n\t\t\t\t */\n\t\t\t\t$data = $this->Robot->search($id, 'User');\n\n\t\t\t\t/**\n\t\t\t\t * Insert the edit action in the \"logs\" table.\n\t\t\t\t */\n\t\t\t\t$this->Logs->insert($this->Auth->user('id'), '<strong>[ ' . $data['User']['name'] . ' ]</strong> ' . __d('core', 'User password changed by (' . $this->Auth->user('name') . ').', true) , 'CORE', $_SERVER[\"REMOTE_ADDR\"]);\n\n\t\t\t\t/**\n\t\t\t\t * If the new user password is edited, a success message is displayed.\n\t\t\t\t * Redirect to the index page.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user password has been changed.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * If the user password is not edited, an error message is displayed.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user password has not been changed.', true), 'default', array('class' => 'error'));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Display datas.\n\t\t */\n\t\tif (empty($this->data)) {\n\t\t\t$this->data = $this->User->read(null, $id);\n\t\t}\n\n\t}",
"function passwd($pass,$newpass){\n\t\tif($this->ctrl == SESSION_CTRL_CUSTOMER){\n\t\t\t$pass = call_user_func(esnc_passwd_encode,$pass);\n\t\t\t$newpass = call_user_func(esnc_passwd_encode,$newpass);\n\t\t\t$sql = \"UPDATE `\".DB_TABLE_PREFIX.\"customer` SET `password` = '{$newpass}' WHERE `id`={$this->id} AND `email`='{$this->email}' AND `password`='{$pass}'\";\n\t\t\tmysql_query($sql);\n\t\t\treturn (bool)(mysql_affected_rows());\n\t\t}\n\t}",
"public function setPassword($password)\n {\n $this->new_password = $password;\n $this->pass = Yii::$app->security->generatePasswordHash($password);\n }",
"function reset_password($user, $new_pass)\n {\n }",
"public function actionPassword()\n {\n if (is_null($this->password)) {\n self::log('Password required ! (Hint -p=)');\n return ExitCode::NOUSER;\n }\n\n if (is_null($this->email) && is_null($this->id)) {\n self::log('User ID or Email required ! (Hint -e= or -i=)');\n return ExitCode::DATAERR;\n }\n\n $model = User::find()->where([\n 'OR',\n [\n 'email' => $this->email\n ],\n [\n 'id' => $this->id\n ]\n ])->one();\n\n if (is_null($model)) {\n\n self::log('User not found');\n\n return ExitCode::NOUSER;\n }\n\n $validator = new TPasswordValidator();\n\n $model->password = $this->password;\n\n $validator->validateAttribute($model, \"password\");\n\n if ($model->errors) {\n\n self::log($model->errorsString);\n\n return ExitCode::DATAERR;\n }\n\n $model->setPassword($this->password);\n\n if (! $model->save()) {\n\n self::log('Password not changed ');\n\n return ExitCode::DATAERR;\n }\n\n self::log($this->email . ' = Password successfully changed !');\n\n return ExitCode::OK;\n }",
"function password($id = null) {\n\n\t\t/**\n\t\t * Check if maintenance is on.\n\t\t * Call the \"Maintenance\" component to check.\n\t\t */\n\t\t$this->Maintenance->check();\t\t\n\n\t\t/**\n\t\t * If $id is not set and $this->data is empty, an error message is displayed.\n\t\t * $this->data = Datas from the form\n\t\t * $id = The user ID\n\t\t */\n\t\tif (!$id && empty($this->data)) {\n\t\t\t$this->Session->setFlash(__d('core', 'Invalid user password.', true), 'default', array('class' => 'error'));\n\t\t\t$this->redirect(array('action' => 'password', $id));\n\t\t}\n\t\t/**\n\t\t * Check if the user try to edit an another user password.\n\t\t * If yes, the user is redirect to the index page.\n\t\t */\n\t\telseif ($id != $this->Auth->user('id')) {\n\t\t\t$this->Session->setFlash(__d('core', 'Invalid user password', true), 'default', array('class' => 'error'));\n\t\t\t$this->redirect(array('action' => 'index'));\n\t\t}\n\n\t\tif (!empty($this->data)) {\n\n\t\t\t/**\n\t\t\t * Save the user password after edit.\n\t\t\t */\n\t\t\tif ($this->User->save($this->data)) {\n\n\t\t\t\t/**\n\t\t\t\t * Insert the change password action in the \"logs\" table.\n\t\t\t\t */\n\t\t\t\t$this->Logs->insert($this->Auth->user('id'), '<strong>[ Password ]</strong> ' . __d('core', 'Access panel password has been changed.', true), 'CORE', $_SERVER[\"REMOTE_ADDR\"]);\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * If the user password is edited, a success message is displayed.\n\t\t\t\t * Redirect to the index page.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user password has been changed.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * If the user password is not edited, an error message is displayed.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user password has not been changed.', true), 'default', array('class' => 'error'));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Display datas.\n\t\t */\n\t\tif (empty($this->data)) {\n\t\t\t$this->data = $this->User->read(null, $id);\n\t\t}\n\n\t}"
] | [
"0.81949955",
"0.81889075",
"0.8090457",
"0.8007909",
"0.78384143",
"0.78288716",
"0.7764926",
"0.77606595",
"0.7746948",
"0.7691158",
"0.7684436",
"0.7645042",
"0.762154",
"0.7615261",
"0.7614543",
"0.7596261",
"0.75845605",
"0.7548509",
"0.75083905",
"0.74964046",
"0.7485345",
"0.7485293",
"0.74851334",
"0.7484839",
"0.74803746",
"0.74579763",
"0.7454016",
"0.74489135",
"0.74362",
"0.74147356",
"0.74082386",
"0.73971736",
"0.7395413",
"0.73937756",
"0.7378013",
"0.737072",
"0.73640525",
"0.73543006",
"0.7352967",
"0.73458076",
"0.7344729",
"0.7333824",
"0.73319906",
"0.73240644",
"0.7307486",
"0.730349",
"0.729009",
"0.72800446",
"0.7278606",
"0.7277308",
"0.72772443",
"0.7265081",
"0.72575617",
"0.7216185",
"0.7206869",
"0.72062415",
"0.72062415",
"0.72062415",
"0.7197781",
"0.719768",
"0.719711",
"0.7192264",
"0.719187",
"0.7191186",
"0.7185611",
"0.7180096",
"0.7177801",
"0.71728045",
"0.71714973",
"0.71596736",
"0.7153271",
"0.7142564",
"0.7137471",
"0.71341556",
"0.7132528",
"0.71301186",
"0.712661",
"0.71240425",
"0.7113202",
"0.71110666",
"0.710715",
"0.7097886",
"0.7095333",
"0.70933163",
"0.7080289",
"0.7075531",
"0.7073822",
"0.7073564",
"0.7066867",
"0.7061466",
"0.705965",
"0.70482695",
"0.7046102",
"0.7043833",
"0.7038616",
"0.70350134",
"0.70349896",
"0.70301795",
"0.70295465",
"0.7018106",
"0.7015606"
] | 0.0 | -1 |
Determine if the user is authorized to make this request. | public function authorize()
{
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() != null;\n }",
"public function authorize(): bool\n {\n return $this->user() !== null;\n }",
"public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }",
"public function authorize()\n {\n return !is_null($this->user());\n }",
"public function authorize()\n {\n return request()->user() != null;\n }",
"public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }",
"public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }",
"public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }",
"public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }",
"public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }",
"public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }",
"public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }",
"public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }",
"public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }",
"public function isAuthorized() {}",
"public function authorize()\n {\n return request()->loggedin_role === 1;\n }",
"public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }",
"public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }",
"public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }",
"public function authorize()\n {\n return auth()->check() ? true : false;\n }",
"public function authorize()\n {\n return auth()->check() ? true : false;\n }",
"public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }",
"public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }",
"public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }",
"public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }",
"function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }",
"public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }",
"public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }",
"public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }",
"public function authorize()\n {\n return is_client_or_staff();\n }",
"public function isAuthorized() {\n\t\treturn true;\n\t}",
"public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }",
"public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }",
"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}",
"public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }",
"public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }",
"public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }",
"public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }",
"public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }",
"public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }",
"public function hasAuthorized() {\n return $this->_has(1);\n }",
"public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }",
"public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }",
"public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }",
"public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }",
"public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }",
"public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }",
"public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n return \\Auth::check() ? true : false;\n }",
"public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize()\n {\n return !empty(Auth::user());\n }",
"public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function isAuthorized() {\n\t\t\n\t}",
"public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }",
"public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }",
"public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }",
"public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }",
"public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}",
"public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }",
"public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }",
"public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }",
"public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }",
"public function authorize()\n {\n return $this->auth->check();\n }",
"public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->container['auth']->check();\n }",
"function isAuthorized($request) {\n return true;\n }",
"public function authorize()\n {\n return Auth::guest() || isMember();\n }",
"public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }",
"public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }",
"public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }",
"public function authorize()\n {\n return TRUE;\n }",
"public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }",
"public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }",
"public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }",
"public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }",
"public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}",
"public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }",
"public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }",
"public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}",
"public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }",
"public function authorize()\n {\n // User system not implemented\n return true;\n }",
"public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }",
"public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }",
"public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }",
"public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }",
"public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }",
"public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }"
] | [
"0.8401071",
"0.8377486",
"0.8377486",
"0.8344406",
"0.8253731",
"0.824795",
"0.8213121",
"0.8146598",
"0.81115526",
"0.8083369",
"0.7991986",
"0.79907674",
"0.79836637",
"0.79604936",
"0.79516214",
"0.79494005",
"0.79265946",
"0.7915068",
"0.79001635",
"0.7894822",
"0.7891453",
"0.7890965",
"0.7862504",
"0.78414804",
"0.78414804",
"0.7837965",
"0.78248763",
"0.7812292",
"0.7809632",
"0.77928597",
"0.7788316",
"0.7781619",
"0.77815884",
"0.7763308",
"0.7754035",
"0.7717961",
"0.7717961",
"0.77171147",
"0.77138597",
"0.7705001",
"0.7693082",
"0.7692783",
"0.76915383",
"0.76909506",
"0.76733255",
"0.7667128",
"0.7665592",
"0.7656238",
"0.7650853",
"0.764326",
"0.76431626",
"0.76431614",
"0.7635147",
"0.76311624",
"0.76294273",
"0.7627076",
"0.76207024",
"0.76207024",
"0.76139116",
"0.76036394",
"0.76035625",
"0.76035625",
"0.76032084",
"0.7602515",
"0.76007926",
"0.75971127",
"0.7588128",
"0.7586303",
"0.7581912",
"0.7563037",
"0.7554785",
"0.75526226",
"0.755171",
"0.75436753",
"0.75432944",
"0.7540682",
"0.7538806",
"0.75280696",
"0.751548",
"0.75149626",
"0.7501161",
"0.74959517",
"0.74956346",
"0.74911124",
"0.7489147",
"0.74858016",
"0.748033",
"0.7478443",
"0.7472642",
"0.7472576",
"0.7465409",
"0.7464371",
"0.74630046",
"0.7462218",
"0.7461453",
"0.7449168",
"0.74399257",
"0.74358094",
"0.7433247",
"0.7432659",
"0.74248093"
] | 0.0 | -1 |
Get the validation rules that apply to the request. | public function rules()
{
return [
'name' => 'required|string|max:200',
'email' => 'required|email|max:200',
'message' => 'required|string|max:1000',
'g-recaptcha-response' => 'required|string|max:1000',
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }",
"public function getRules()\n {\n return $this->validator->getRules();\n }",
"public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }",
"public function rules()\n {\n return $this->validationRules;\n }",
"public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }",
"public static function getRules()\n {\n return (new static)->getValidationRules();\n }",
"public function getRules()\n {\n return $this->validation_rules;\n }",
"public function getValidationRules()\n {\n return [];\n }",
"public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }",
"public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }",
"public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }",
"protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }",
"public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }",
"public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }",
"public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }",
"public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }",
"public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }",
"protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }",
"public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }",
"protected function getValidRules()\n {\n return $this->validRules;\n }",
"public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }",
"public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }",
"public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }",
"public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n { \n return $this->rules;\n }",
"public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }",
"public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }",
"public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }",
"public function validationRules()\n {\n return [];\n }",
"public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }",
"public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }",
"public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }",
"public function rules()\n {\n return static::$rules;\n }",
"function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}",
"public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }",
"public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }",
"public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }",
"protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }",
"public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }",
"public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }",
"public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }",
"public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }",
"public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }",
"public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }",
"abstract protected function getValidationRules();",
"public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }",
"public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }",
"public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }",
"public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }",
"public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }",
"public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }",
"public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }",
"public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }",
"public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }",
"public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }",
"public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }",
"public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }",
"public function getValidationRules() : array;",
"public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }",
"public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }",
"public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }",
"public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }",
"public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}",
"public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}",
"public function rules()\n {\n $rules = array();\n return $rules;\n }",
"public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }",
"public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }",
"public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }",
"protected function get_validation_rules()\n {\n }",
"public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }",
"public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }",
"public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }",
"public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }",
"public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }",
"public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }",
"public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }",
"public function rules(Request $request)\n {\n return Qc::$rules;\n }",
"public function defineValidationRules()\n {\n return [];\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }",
"public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }"
] | [
"0.83426684",
"0.8012867",
"0.79357",
"0.7925642",
"0.7922824",
"0.79036003",
"0.785905",
"0.77895427",
"0.77832615",
"0.7762324",
"0.77367616",
"0.7732319",
"0.7709478",
"0.7691477",
"0.76847756",
"0.7682022",
"0.7682022",
"0.7682022",
"0.7682022",
"0.7682022",
"0.7682022",
"0.7675238",
"0.76745033",
"0.7665319",
"0.76570827",
"0.764131",
"0.7629555",
"0.7629431",
"0.7617311",
"0.7609077",
"0.76070553",
"0.7602018",
"0.759865",
"0.7597791",
"0.75919396",
"0.7590118",
"0.75871897",
"0.75797164",
"0.7555521",
"0.755503",
"0.75503516",
"0.75458753",
"0.75403965",
"0.75360876",
"0.7535538",
"0.75300974",
"0.7518105",
"0.75145686",
"0.75076634",
"0.7506042",
"0.75051844",
"0.7498838",
"0.7495001",
"0.7494829",
"0.74931705",
"0.7490103",
"0.7489394",
"0.7489037",
"0.7485875",
"0.74857",
"0.7478841",
"0.74781114",
"0.74692464",
"0.74632394",
"0.7461548",
"0.74611425",
"0.74590236",
"0.74544203",
"0.7453257",
"0.7452147",
"0.74498093",
"0.7447976",
"0.7441319",
"0.7440709",
"0.7435135",
"0.7434774",
"0.74325204",
"0.74295586",
"0.74287397",
"0.74233043",
"0.7418827",
"0.74155605",
"0.7413598",
"0.7413494",
"0.74120796",
"0.740962",
"0.74052715",
"0.74039626",
"0.7403312",
"0.7400803",
"0.7390036",
"0.7383104",
"0.73728377",
"0.73704565",
"0.73687065",
"0.73608035",
"0.7355335",
"0.73462147",
"0.7344126",
"0.73427063",
"0.7334932"
] | 0.0 | -1 |
Create a new command instance. | public function __construct()
{
parent::__construct();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }",
"public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}",
"public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}",
"protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }",
"static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }",
"public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;",
"public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }",
"public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }",
"public function command(Command $command);",
"public function __construct($command)\n {\n $this->command = $command;\n }",
"public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }",
"protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }",
"public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }",
"public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }",
"public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }",
"public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;",
"private function _getCommandByClassName($className)\n {\n return new $className;\n }",
"public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }",
"public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }",
"private function __construct($command = null)\n {\n $this->command = $command;\n }",
"public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }",
"public function getCommand() {}",
"protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }",
"public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }",
"public function getCommand();",
"protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }",
"public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }",
"public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }",
"public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }",
"public function getCommand()\n {\n }",
"public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }",
"protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }",
"public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}",
"public function addCommand($command);",
"public function add(Command $command);",
"abstract protected function getCommand();",
"public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}",
"protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }",
"public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }",
"protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }",
"private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }",
"public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }",
"public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }",
"public function create() {}",
"protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }",
"public function create(){}",
"protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }",
"public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }",
"protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}",
"public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }",
"public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }",
"public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }",
"public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }",
"public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }",
"public function createCommand(?string $sql = null, array $params = []): Command;",
"public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }",
"public function generateCommands();",
"protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }",
"protected function buildCommand()\n {\n return $this->command;\n }",
"public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }",
"public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }",
"public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }",
"protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }",
"protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }",
"public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }",
"protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}",
"public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }",
"public function buildCommand()\n {\n return parent::buildCommand();\n }",
"private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }",
"public function getCommand(string $command);",
"protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}",
"public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }",
"public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }",
"protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }",
"private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }",
"public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }",
"public function generateCommand($singleCommandDefinition);",
"public function create() {\n }",
"public function create() {\n }",
"public function create() {\r\n }",
"public function create() {\n\n\t}",
"private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }",
"public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }",
"public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }",
"public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }",
"public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();"
] | [
"0.8010746",
"0.7333379",
"0.72606754",
"0.7164165",
"0.716004",
"0.7137585",
"0.6748632",
"0.67234164",
"0.67178184",
"0.6697025",
"0.6677973",
"0.66454077",
"0.65622073",
"0.65437883",
"0.64838654",
"0.64696646",
"0.64292693",
"0.6382209",
"0.6378306",
"0.63773245",
"0.6315901",
"0.6248427",
"0.6241929",
"0.6194334",
"0.6081284",
"0.6075819",
"0.6069913",
"0.60685146",
"0.6055616",
"0.6027874",
"0.60132784",
"0.60118896",
"0.6011778",
"0.5969603",
"0.59618074",
"0.5954538",
"0.59404427",
"0.59388787",
"0.5929363",
"0.5910562",
"0.590651",
"0.589658",
"0.589658",
"0.589658",
"0.58692765",
"0.58665586",
"0.5866528",
"0.58663124",
"0.5852474",
"0.5852405",
"0.58442044",
"0.58391577",
"0.58154446",
"0.58055794",
"0.5795853",
"0.5780188",
"0.57653266",
"0.57640004",
"0.57584697",
"0.575748",
"0.5742612",
"0.5739361",
"0.5732979",
"0.572247",
"0.5701043",
"0.5686879",
"0.5685233",
"0.56819254",
"0.5675983",
"0.56670785",
"0.56606543",
"0.5659307",
"0.56567776",
"0.56534046",
"0.56343585",
"0.56290466",
"0.5626615",
"0.56255764",
"0.5608852",
"0.5608026",
"0.56063116",
"0.56026554",
"0.5599553",
"0.5599351",
"0.55640906",
"0.55640906",
"0.5561977",
"0.5559745",
"0.5555084",
"0.5551485",
"0.5544597",
"0.55397296",
"0.5529626",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908"
] | 0.0 | -1 |
Execute the console command. | public function handle()
{
$date = Carbon::now()->subMonth();
$trash_images = TreshImage::whereDate('created_at', '<', $date)
->limit(20)
->get();
foreach ($trash_images as $image){
if(file_exists (public_path($image->image_path) )){
unlink(public_path($image->image_path));
}
$image->delete();
}
info('Мусорные изображения успешно удалены! Дата и время: '.Carbon::now());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }",
"public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }",
"public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }",
"public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }",
"public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }",
"public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }",
"public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }",
"public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }",
"public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }",
"public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }",
"public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }",
"public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }",
"public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }",
"public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}",
"public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}",
"public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }",
"public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }",
"public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }",
"public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }",
"public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }",
"public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }",
"public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}",
"public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }",
"public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }",
"public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }",
"public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }",
"public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }",
"public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }",
"public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }",
"public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }",
"public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }",
"public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }",
"public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }",
"public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }",
"public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }",
"public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }",
"public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }",
"public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }",
"public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }",
"public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }",
"public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }",
"public function handle()\n {\n $this->revisions->updateListFiles();\n }",
"public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }",
"public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }",
"public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }",
"public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }",
"public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }",
"public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }",
"public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }",
"public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }",
"public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }",
"public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }",
"public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }",
"public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }",
"public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }",
"public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }",
"public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }",
"public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }",
"public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }",
"public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }",
"public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }",
"public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }",
"public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }",
"public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }",
"public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }",
"public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }",
"public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }",
"public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }",
"public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }",
"public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }",
"public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }",
"public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }",
"public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }",
"public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }",
"public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }",
"public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}",
"public function handle(Command $command);",
"public function handle(Command $command);",
"public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }",
"public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }",
"public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }",
"public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }",
"public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }",
"public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }",
"public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }",
"public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }",
"public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }",
"public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }",
"public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }",
"public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }",
"public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }",
"public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }",
"public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }",
"public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }",
"public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }",
"public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }",
"public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }",
"public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }",
"public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }",
"public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }",
"public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }"
] | [
"0.6469962",
"0.6463639",
"0.64271367",
"0.635053",
"0.63190264",
"0.62747604",
"0.6261977",
"0.6261908",
"0.6235821",
"0.62248456",
"0.62217945",
"0.6214421",
"0.6193356",
"0.61916095",
"0.6183878",
"0.6177804",
"0.61763877",
"0.6172579",
"0.61497146",
"0.6148907",
"0.61484164",
"0.6146793",
"0.6139144",
"0.61347336",
"0.6131662",
"0.61164206",
"0.61144686",
"0.61109483",
"0.61082935",
"0.6105106",
"0.6103338",
"0.6102162",
"0.61020017",
"0.60962653",
"0.6095482",
"0.6091584",
"0.60885274",
"0.6083864",
"0.6082142",
"0.6077832",
"0.60766655",
"0.607472",
"0.60739267",
"0.607275",
"0.60699606",
"0.6069931",
"0.6068753",
"0.6067665",
"0.6061175",
"0.60599935",
"0.6059836",
"0.605693",
"0.60499364",
"0.60418284",
"0.6039709",
"0.6031963",
"0.6031549",
"0.6027515",
"0.60255647",
"0.60208166",
"0.6018581",
"0.60179937",
"0.6014668",
"0.60145515",
"0.60141796",
"0.6011772",
"0.6008498",
"0.6007883",
"0.60072047",
"0.6006732",
"0.60039204",
"0.6001778",
"0.6000803",
"0.59996396",
"0.5999325",
"0.5992452",
"0.5987503",
"0.5987503",
"0.5987477",
"0.5986996",
"0.59853584",
"0.5983282",
"0.59804505",
"0.5976757",
"0.5976542",
"0.5973796",
"0.5969228",
"0.5968169",
"0.59655035",
"0.59642595",
"0.59635514",
"0.59619296",
"0.5960217",
"0.5955025",
"0.5954439",
"0.59528315",
"0.59513766",
"0.5947869",
"0.59456027",
"0.5945575",
"0.5945031"
] | 0.0 | -1 |
Set phone number (example: "0888123456", "+35932261020" etc.). Max size is 20 symbols. | public function setNumber($number) {
$this->_number = $number;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setPhone($newPhone){\n //check if the phone number is numeric\n if(is_numeric($newPhone)) {\n $this->phone = $newPhone;\n }\n //if not set to default, 0000000000\n $this->phone = \"0000000000\";\n }",
"public function setPhone($phone = \"\");",
"private function setTelephone()\n {\n \tif ( empty($_POST['telephone'] ) ) {\n $this->data['error']['telephone'] = 'Please provide a valid phone number.';\n $this->error = true;\n return;\n }\n\t\n $t = trim( $_POST['telephone'] );\n \n\t\t// Remove non-digits.\n\t\t$t = preg_replace('/[^0-9]/', '', $t);\n\t\n\t\t// Make sure it's 10 digits.\n\t\tif ( strlen($t) != 10 ) {\n\t\t\t$this->data['error']['telephone'] = 'Please provide a valid phone number.';\n $this->error = true;\n return;\n\t\t}\n\t\n $this->data['telephone'] = $t;\n }",
"public function setPhoneAttribute($value)\n {\n if (!empty($value)) {\n $this->attributes['phone'] = $this->mayaEncrypt($value);\n }\n }",
"public function setPhone(string $phone):void\n {\n $this->phone = $phone;\n }",
"public function setPhone(string $phone): void\n {\n $this->_phone = $phone;\n }",
"public function setPhoneNumber($phoneNumber)\n {\n $phoneNumber = str_replace(' ', '', $phoneNumber); // perhaps using a regular expression would be easier?\n\n if(!ctype_digit($phoneNumber))\n throw new \\InvalidArgumentException('Only digits may be used within phone numbers.');\n\n $this->phoneNumber = $phoneNumber;\n }",
"public function setPhone($var)\n {\n GPBUtil::checkString($var, True);\n $this->phone = $var;\n }",
"public function setPhone($newNumber)\n\t{\n\t\t//If there are more or less than 10 digits, break.\n\t\t//Else, format as follows: \"(ABC) DEF-GHIJ\"\n\t\t$newNumber = buildPhoneNum($newNumber);\n\t\tif ($newNumber == null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (updateContact($id, 'phone', $newNumber))\n\t\t{\n\t\t\t$this->phone = $newNumber;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function phone($phone = null);",
"public function setphoneNumber($number)\n {\n $this->_param['phone_number'] = Util::cleanNumber($number);\n return $this;\n }",
"function changeNumber() {\r\n\t\r\n\t\t//set phone number as is, with () and - in it.\r\n\t\t$phoneNumber = $this->phone_number;\r\n\r\n\t\t//seperate phone number into 3 parts\r\n\t\t$phoneNum1 = substr($phoneNumber, -13, 3);\r\n\t\t$phoneNum2 = substr($phoneNumber, -8, 3);\r\n\t\t$phoneNum3 = substr($phoneNumber, -4, 4);\r\n\t\t\r\n\t\t//combine three parts of phone number into one.\r\n\t\t$phoneNumberFull = $phoneNum1 . $phoneNum2 . $phoneNum3;\r\n\r\n\t\t//change phoneNumber data for specific carrier\r\n\t\t$phoneCarrier = $this->carrier;\r\n\t\t\r\n\t\tswitch($phoneCarrier) {\r\n\t\t\t//Verizon\r\n\t\t\tcase \"verizon\":\r\n\t\t\t\t$phoneNumberFull .= \"@vtext.com\";\r\n\t\t\t\tbreak;\r\n\t\t\t//AT & T\r\n\t\t\tcase \"at&t\":\r\n\t\t\t\t$phoneNumberFull .= \"@txt.att.net\";\r\n\t\t\t\tbreak;\r\n\t\t\t//Sprint\r\n\t\t\tcase \"sprint\":\r\n\t\t\t\t$phoneNumberFull .= \"@messaging.sprintpcs.com\";\r\n\t\t\t\tbreak;\r\n\t\t\t//T-Mobile\r\n\t\t\tcase \"tmobile\":\r\n\t\t\t\t$phoneNumberFull .= \"@tmomail.net\";\r\n\t\t\t\tbreak;\r\n\t\t\t//Default case where error occurred.\r\n\t\t\tdefault:\r\n\t\t\t\tdie(\"Converting phoneNumber failed.<br />\");\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t//assigns phone number to event class\r\n\t\t$this->phone_number = $phoneNumberFull;\r\n\t\r\n\t}",
"function phone($number = 'primary')\n {\n // Determine the characters that can make up a phone number\n $characters = ['(', ')', '+', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.'];\n\n // Check for configuration reference\n if(strlen($number) < 10 || strlen(str_replace($characters, '', $number)) == 0) {\n\n // Determine the phone configuration\n $number = config('branding.contacts.phones.' . $number);\n\n }\n\n // Return the phone number\n return $number;\n }",
"function phone($string) {\n\n\n\t\t}",
"public function setPhone($value)\n {\n return $this->set('Phone', $value);\n }",
"public function setPhone($value)\n {\n $this->phone = $value;\n return $this;\n }",
"public function setPhone($phone) {\n\t\t$this->phone = $phone;\n\t}",
"public function setPhone($value)\n {\n return $this->set(self::PHONE, $value);\n }",
"public function setPhone($value)\n {\n return $this->set(self::PHONE, $value);\n }",
"public static function Phone($phone)\n {\n $phone = Regex::OnlyInteger($phone);\n if(strlen($phone) == 10){\n $phone = '(' . substr($phone, 0, 2) . ') ' . substr($phone, 2, 4) . '-' . substr($phone, 6, 4);\n } else {\n $phone = '(' . substr($phone, 0, 2) . ') ' . substr($phone, 2, 5) . '-' . substr($phone, 7, 4);\n }\n return $phone;\n }",
"public function setPhone($phone)\r\n {\r\n $this->_phone = $phone;\r\n }",
"public function setPhone($phone)\r\n {\r\n $this->_phone = $phone;\r\n }",
"public function setPhoneNumber(String $phoneNumber)\n {\n $this->phoneNumber = $phoneNumber;\n }",
"public function setPhoneNumber($phone_number): void\n {\n $this->_phoneNumber = $phone_number;\n }",
"function editPhoneNumber($data){\n\t\t\t$conn = $this->connect();\n\t\t\t$uid = $_SESSION['userid'];\n\t\t\t$pid = $_SESSION['pid'];\n\t\t\t$ephone = $this->modify(mysqli_real_escape_string($conn, $data['ephone']));\n\t\t\tif(empty($ephone)) {\n\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Empty\");\n\t\t\t} else {\n\t\t\t\tif(preg_match(\"/^[0][1](8|9|5|7|6)[0-9]+$/\", $ephone)) {\n\t\t\t\t\tif($this->length($ephone, 11, 11)) {\n\t\t\t\t\t\t$result = $this->changepost(\"newpost\", \"post_phone_number\", $ephone , $uid , $pid);\n\t\t\t\t\t\tif($result == false) {\n\t\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Failed!\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&Successfully_Changed\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&length=tooBigOrSmall\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->re_direct(\"mypost_details\", \"post_id=\".$pid.\"&invalid=number\");\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function setPhoneNumber($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->phone_number !== $v) {\n\t\t\t$this->phone_number = $v;\n\t\t\t$this->modifiedColumns[] = UserPeer::PHONE_NUMBER;\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function testPhone() {\n $this->assertEquals('666-1337', Format::phone(6661337));\n $this->assertEquals('(888) 666-1337', Format::phone('8886661337'));\n $this->assertEquals('1 (888) 666-1337', Format::phone('+1 8886661337'));\n }",
"public function setPhone($phone) {\n $this->phone = $phone;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n }",
"public static function formatPhone($number){\n \t$phone_numbers = substr($number, -9);\n\n \t\n\n \t//add 254 at the front\n \t$phone_number = '254'.''.$phone_numbers;\n\n \n\n \treturn $phone_number;\n }",
"function do_phone() {\n global $phone;\n global $clean_phone;\n $phone = get_field('phone', 'options');\n $clean_phone = preg_replace('/[^0-9]/','',$phone); // Strip out any non-numeric characters to use in the phone link\n}",
"function change_mobile_number() {\n\n\t\t$this->authentication->is_user_logged_in(TRUE, 'user/login');\n\n\t\tloadTemplate('user/add_mobile_number');\n\t}",
"public function testCanSetAndGetPhoneNumber()\n {\n $mockPhoneNumber = '12345678990';\n\n $this->dataCenter->setPhoneNumber($mockPhoneNumber);\n\n $this->assertEquals($mockPhoneNumber, $this->dataCenter->getPhoneNumber());\n }",
"public function set_telephone_number( $number ) {\n\t\treturn $this->set_field( 'OWNERTELNO', $number );\n\t}",
"public function setPhoneNumber($var)\n {\n GPBUtil::checkString($var, True);\n $this->phoneNumber = $var;\n\n return $this;\n }",
"public function setCustomerPhone($val)\n {\n $this->_propDict[\"customerPhone\"] = $val;\n return $this;\n }",
"public function setNumber($number) {\n\t\tif (!preg_match('/\\+[0-9]{3,16}$/', $number)) return false;\n\t\t$this->number = $number;\r\n\t\treturn true;\r\n\t}",
"public function setPhone($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->phone !== $v) {\n $this->phone = $v;\n $this->modifiedColumns[OrdrhedTableMap::COL_PHONE] = true;\n }\n\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"public function testPhone()\n {\n $this->assertTrue(RuValidation::phone('+7 (342) 1234567'));\n $this->assertTrue(RuValidation::phone('+7 (41144) 1234'));\n }",
"public static function phone()\n {\n return new TextNode('phone');\n }",
"function setNum_teleco($snum_teleco = '')\n {\n $this->snum_teleco = $snum_teleco;\n }",
"function makePhone( $phone, $column = '' )\n{\n\tglobal $locale;\n\n\t$phone = trim( $phone );\n\n\tif ( $phone === '' )\n\t{\n\t\treturn '';\n\t}\n\n\t// Keep numbers and extension.\n\t$unformatted_phone = preg_replace( \"/[^0-9\\+x]/\", \"\", $phone );\n\n\t$fphone = $phone;\n\n\tif ( $unformatted_phone !== $phone )\n\t{\n\t\t// Phone already contains formatting chars, keep them.\n\t}\n\telseif ( mb_strlen( $phone ) === 9 )\n\t{\n\t\t// Spain: 012 345 678.\n\t\t$fphone = mb_substr( $phone, 0, 3 ) . ' ' .\n\t\t\tmb_substr( $phone, 3, 3 ) . ' ' . mb_substr( $phone, 6 );\n\t}\n\telseif ( mb_strlen( $phone ) === 10 )\n\t{\n\t\tif ( mb_strpos( $locale, 'fr' ) === 0 )\n\t\t{\n\t\t\t// France: 01 23 45 67 89.\n\t\t\t$fphone = mb_substr( $phone, 0, 2 ) . ' ' .\n\t\t\t\tmb_substr( $phone, 2, 2 ) . ' ' . mb_substr( $phone, 4, 2 ) . ' ' .\n\t\t\t\tmb_substr( $phone, 6, 2 ) . ' ' . mb_substr( $phone, 8 );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// US: (012) 345-6789.\n\t\t\t$fphone = '(' . mb_substr( $phone, 0, 3 ) . ') ' .\n\t\t\t\tmb_substr( $phone, 3, 3 ) . '-' . mb_substr( $phone, 6 );\n\t\t}\n\t}\n\telseif ( mb_strlen( $phone ) === 7 )\n\t{\n\t\t// US: 345-6789.\n\t\t$fphone = mb_substr( $phone, 0, 3 ) . '-' . mb_substr( $phone, 3 );\n\t}\n\n\t$dial_phone = $unformatted_phone;\n\n\t$extension_pos = mb_strpos( $dial_phone, 'x' );\n\n\tif ( $extension_pos !== false )\n\t{\n\t\t// Remove extension.\n\t\t$dial_phone = mb_substr( $dial_phone, 0, $extension_pos );\n\t}\n\n\treturn '<a href=\"tel:' . $dial_phone . '\" title=\"' . _( 'Call' ) . '\" class=\"phone-link\">' . $fphone . '</a>';\n}",
"public function setPhoneNumber($value)\n {\n return $this->setParameter('phoneNumber', $value);\n }",
"public function setPosterPhone($newPosterPhone) {\n\n\t\t// Verify that posterPhone is secure\n\t\t$newPosterPhone = trim($newPosterPhone);\n\t\t$newPosterPhone = filter_var($newPosterPhone, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);\n\t\tif(empty($newPosterPhone) === true) {\n\t\t\tthrow(new \\InvalidArgumentException(\"posterPhone is empty or insecure\"));\n\t\t}\n\n\t\t// Verify that posterPhone will fit in the database\n\t\tif(strlen($newPosterPhone) > 32) {\n\t\t\tthrow(new \\RangeException(\"posterPhone has too many characters in it\"));\n\t\t}\n\n\t\t// Store the posterPhone\n\t\t$this->posterPhone = $newPosterPhone;\n\n\t}",
"function setNumAnz($wert) {$this->PhoneNumAnz = trim($wert);}",
"function minorite_phone($variables) {\n $element = $variables['element'];\n $element['#attributes']['type'] = 'tel';\n element_set_attributes($element, array('id', 'name', 'value', 'size', 'maxlength'));\n _form_set_class($element, array('form-tel'));\n\n // Adds attributes required and readonly.\n if (!empty($element['#required'])) {\n $element['#attributes']['required'] = '';\n }\n if (!empty($element['#readonly'])) {\n $element['#attributes']['readonly'] = 'readonly';\n }\n\n return '<input' . drupal_attributes($element['#attributes']) . ' />';\n}",
"public function setPhone($phone)\r\n {\r\n $this->phone = $phone;\r\n return $this;\r\n }",
"public static function phone($number)\n\t{\n\t\t// Remove o que não for número\n\t\t$number = preg_replace('/\\D/', '', $number);\n\n\t\t// Nenhum formato conhecido\n\t\tif (strlen($number) < 8) {\n\t\t\treturn $number;\n\t\t}\n\n\t\t// Até 9 dígitos\n\t\tif (strlen($number) <= 9) {\n\t\t\treturn preg_replace('/(\\d{4})(\\d*)/', '$1-$2', $number);\n\t\t}\n\n\t\t// Demais formatos\n\t\treturn preg_replace('/(\\d{2})(\\d{4})(\\d*)/', '($1) $2-$3', $number);\n\t}",
"public function setPhoneNumber($phoneNumber)\n {\n $this->phoneNumber = $this->purify($phoneNumber);\n\n return $this;\n }",
"public function setPhone(string $phone = null) : CNabuDataObject\n {\n $this->setValue('nb_icontact_prospect_phone', $phone);\n \n return $this;\n }",
"public function setPhone($value)\n {\n $this->setParameter('billingPhone', $value);\n $this->setParameter('shippingPhone', $value);\n\n return $this;\n }",
"public function setTelephone($telephone) {\n\t\t$this->telephone = $telephone;\n\t}",
"public static function convert_phone_field() {\n\n\t\t// Create a new Phone field.\n\t\tself::$field = new GF_Field_Phone();\n\n\t\t// Add standard properties.\n\t\tself::add_standard_properties();\n\n\t\t// Add Phone specific properties.\n\t\tself::$field->phoneFormat = 'standard';\n\n\t}",
"public function setNewPhone($value)\n {\n return $this->set('NewPhone', $value);\n }",
"function nrua_sanitize_phone_number( $phone_mobile )\n{\n\t// = Remove all non int chars\n\t$phone_mobile = filter_var( $phone_mobile, FILTER_SANITIZE_NUMBER_INT );\n\t$phone_mobile = str_replace(\"+\", \"\", $phone_mobile);\n\t$phone_mobile = str_replace(\"-\", \"\", $phone_mobile);\n\t\n\t// = Add the international char\n\t$phone_mobile = '+' .$phone_mobile;\n\t\n\t// = Check lenght\n\tif ( ( strlen( $phone_mobile ) < 10 ) || ( strlen( $phone_mobile ) > 14 ) ) \n\t{\n\t\t$phone_mobile = null;\n\t}\n\t\n\treturn $phone_mobile;\n}",
"public function setPhone( $phone ) {\n\t\t$this->container['phones'] = isset( $phone ) ? array( $phone ) : null;\n\n\t\treturn $this;\n\t}",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n return $this;\n }",
"public function phone_number( $digits ) {\n if( is_array( $digits ) ) {\n # squash it. this is an array coming in from a form.\n return $this->PhoneNumber->implode( $digits );\n }\n else {\n return $this->PhoneNumber->explode( $digits );\n }\n }",
"public function format_phone($phone)\r\n {\r\n $phone = preg_replace(\"/[^0-9]/\", \"\", $phone);\r\n if(strlen($phone) == 10){\r\n return preg_replace(\"/([0-9]{3})([0-9]{3})([0-9]{4})/\",\"$1$2$3\",$phone);\r\n }\r\n }",
"function smarty_modifier_phone($string)\n{\n $numbers = preg_replace('/\\D/','',$string);\n \n if(strlen($numbers) == 10) {\n \n // format as US phone\n $zip = substr($numbers,0,3);\n $part1 = substr($numbers,3,3);\n $part2 = substr($numbers,6,4);\n \n return '('.$zip.')'.$part1.'-'.$part2;\n \n } else {\n \n return $string;\n \n }\n \n}",
"public function setPhoneNo(string $phoneNo) : self\n {\n $this->phoneNo = $phoneNo;\n return $this;\n }",
"public function getPhoneNumber()\n {\n return $this->country_code.$this->phone;\n }",
"public function setSmsNumber($number)\n {\n $currentNumber = $this->getSmsNumber();\n if ($number === $currentNumber) {\n return;\n }\n $this->unsetSmsNumber();\n $updated = false;\n if ($this->data->contact_info->phone) {\n foreach ($this->data->contact_info->phone as $phone) {\n if ($phone->phone_number === $number) {\n $phone->preferred_sms = true;\n }\n }\n }\n if (!$updated) {\n $this->addSmsNumber($number);\n }\n }",
"function telto($phone) {\n\treturn str_replace(['+', '(', ')', '-', ' '], '', $phone);\n}",
"public function askPhoneNumber()\n {\n $this->ask('Ваш номер телефона', function (Answer $answer) {\n\n try {\n $contact = $answer->getMessage()->getContact()->getPhoneNumber();\n $this->getBot()->userStorage()->save([\n 'phone_number' => $contact\n ]);\n }catch (\\Exception $e){\n $contact = $answer->getMessage()->getText();\n $this->getBot()->userStorage()->save([\n 'phone_number' => $contact\n ]);\n }\n\n $this->askLocation();\n }, [\n 'reply_markup' => json_encode([\n 'keyboard' => [\n [\n ['text' => 'Отправить контакт', 'request_contact' => true]\n ]\n ],\n 'one_time_keyboard' => true,\n 'resize_keyboard' => true\n ])\n ]);\n }",
"private function fixPhoneNumber(Admin &$admin)\n {\n // TODO: implement fixPhoneNumber method.\n $admin->phone = self::DEFAULT_PHONE;\n }",
"public function setTelephone($telephone)\n {\n $this->telephone = $telephone;\n }",
"public function setPhone(?CustomerTextFilter $phone): void\n {\n $this->phone = $phone;\n }",
"public function setPhone($phone) {\n $this->phone = $phone;\n\n return $this;\n }",
"function US_phone_number($sPhone)\n {\n $sPhone = ereg_replace(\"[^0-9]\", '', $sPhone);\n if (strlen($sPhone) != 10) return (False);\n $sArea = substr($sPhone, 0, 3);\n $sPrefix = substr($sPhone, 3, 3);\n $sNumber = substr($sPhone, 6, 4);\n $sPhone = \"(\" . $sArea . \")\" . $sPrefix . \"-\" . $sNumber;\n return ($sPhone);\n }",
"public function _set($number) {\n\t\t$this->number = $number;\n\t\t$this->id = $this->id_base . '-' . $number;\n\t}",
"private function intlPhone($phone)\n\t{ \n\t\t$norm = preg_replace('~[^0-9]~', '', $phone);\n\n\t\tif (10 === strlen($norm)) {\n\t\t\treturn '1' . $norm; // US\n\t\t}\n\n\t\treturn $norm;\n\t}",
"function formatPhone($num)\n{\n$num = preg_replace('/[^0-9]/', '', $num);\n$len = strlen($num);\n\n\tif($len<=6)\n\t{\n\t\t$num = preg_replace('/([0-9]{3})([0-9]{3})/', ' $1 $2', $num);\t\n\t}\n\telse if(($len>6)&&($len<=9))\n\t{\n\t\t$num = preg_replace('/([0-9]{3})([0-9]{3})([0-9]{1})/', ' $1 $2 $3', $num);\t\n\t}\n\telse if($len == 10)\n\t{\n\t\t$num = preg_replace('/([0-9]{3})([0-9]{3})([0-9]{4})/', ' $1 $2 $3', $num);\n\t}\n\telse if($len>10)\n\t{\n\t\t$num = preg_replace('/([0-9]{3})([0-9]{3})([0-9]{4})([0-9]{1})/', ' $1 $2 $3 $4', $num);\t\n\t}\nreturn $num;\n}",
"public function setTelefone($value,$options=array('required'=>true)){ \n $this->_data['telefone'] = new ZendT_Type_String($value,array('mask'=>array (\n 0 => '99 9.9999-9999',\n 1 => '99 9999-9999',\n 2 => '9999-9999',\n 3 => '9.9999-9999',\n)\n ,'charMask'=>'9'\n ,'filterDb'=>array (\n 0 => '',\n)\n ,'filter'=>array('trim', 'strtoupper', 'removeAccent', )));\n if ($options['db'])\n $this->_data['telefone']->setValueFromDb($value);\n \n if (!$options['db']){\n \n $valid = new Zend_Validate_StringLength(array ( 'max' => 45, ) );\n $valueValid = $this->_data['telefone']->getValueToDb();\n if ($valueValid && !$valid->isValid($valueValid)){\n throw new ZendT_Exception_Business(implode(\"\\n\",$valid->getMessages()));\n }\n \n }\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }",
"function normalize_phone($phone)\n {\n $phone = preg_replace('/\\D/', '', $phone);\n return (strlen($phone) > 10) ? $phone : (getenv('PHONE_DEFAULT_COUNTRY_CODE') ?: '91') . $phone;\n }",
"function format_phone($number)\n{\n\t$no = preg_replace('/[^0-9+]/', '', $number);\n\n\tif(strlen($no) == 11 && substr($no, 0, 1) == \"1\")\n\t\t$no = substr($no, 1);\n\telseif(strlen($no) == 12 && substr($no, 0, 2) == \"+1\")\n\t\t$no = substr($no, 2);\n\n\tif(strlen($no) == 10)\n\t\treturn \"(\".substr($no, 0, 3).\") \".substr($no, 3, 3).\"-\".substr($no, 6);\n\telseif(strlen($no) == 7)\n\t\treturn substr($no, 0, 3).\"-\".substr($no, 3);\n\telse\n\t\treturn $no;\n\n}",
"public function setContactPhone($contactPhone = null)\n {\n // validation for constraint: string\n if (!is_null($contactPhone) && !is_string($contactPhone)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($contactPhone, true), gettype($contactPhone)), __LINE__);\n }\n if (is_null($contactPhone) || (is_array($contactPhone) && empty($contactPhone))) {\n unset($this->contactPhone);\n } else {\n $this->contactPhone = $contactPhone;\n }\n return $this;\n }",
"public function get_phone() {\r\n return $this->phone;\r\n }",
"function set_random_us_phone($state='*')\r\n{\r\n\t// get random state\r\n\tif ( $state == '*' )\r\n\t{\r\n\t\t$_ZIP_DATA = $this->_get_random_zip_data();\r\n\t\t$state = $_ZIP_DATA[1];\r\n\t}\r\n\t\r\n\t// get random phone\r\n\t$phone = $this->_get_random_us_phone($state, 1);\r\n\t\r\n\t// set prop\r\n\t$this->phone = $phone;\r\n\treturn;\r\n}",
"public function getPhoneNumber()\n\t{\n\t\treturn $this->getIfSet('number', $this->data->phone);\n\t}",
"public function getPhone();",
"protected function format_phone( $p_value ) {\n\t\t$value = '';\n\t\t$i_len = strlen($p_value);\n\t\tfor ( $i=0; $i < $i_len; $i++ ) {\n\t\t\tif ( is_numeric(substr($p_value,$i,1)) ) {\n\t\t\t\t$value .= substr($p_value,$i,1);\n\t\t\t}\n\t\t}\n\n\t\t// if there are not 10 numbers, return empty\n\t\tif ( strlen($value) != 10 ) {\n\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" Invalid phone '\" . $p_value . \"'\",null);\n\t\t}\n\n\t\treturn $this->return_handler->results(200,\"\",$value);\n\t}",
"public function setTelephone(string $telephone)\n {\n $this->telephone = $telephone;\n\n return $this;\n }",
"function testFormatPhone() {\n\n\t\t$ff = new Cgn_ActiveFormatter('888.123.4567');\n\t\t$phone = $ff->printAs('phone');\n\n\t\t$this->assertEquals('(888) 123-4567', $phone);\n\n setlocale(LC_ALL, 'en_US.UTF-8');\n\t\t$clean = $ff->cleanVar(utf8_encode('abc ABC 999 '.chr(0xF6) .'()()') );\n\t\t$this->assertEquals($clean, 'abc ABC 999 ');\n\n\t}",
"private static function validate_number(&$phone)\n\t{\n\t\tif (substr($phone, 0, 1) == '+') {\n\t\t\t$phone = substr($phone, 1);\n\t\t}\n\n\n\t\tif (is_numeric($phone)) {\n\n\t\t\t// test if there's a 1 prepended.\n\t\t\tif (strlen($phone) === 11 && $phone[0] == 1) {\n\t\t\t\t//pop 1 off. \n\t\t\t\t$phone = substr($phone, 1);\n\t\t\t\treturn true;\n\n\t\t\t} elseif (strlen($phone) === 10) {\n\t\t\t\t// it's a 10 digit number... I guess that works.\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// is invalid if no return by here. \n\t\treturn false;\n\t}",
"public function phoneClean():string\n {\n $phone = '';\n if (!empty($this->phone)) {\n $phone = preg_replace('#[^\\d\\+]#si', '', $this->phone);\n }\n return $phone;\n }",
"public function setPhone_number($phone_number)\n {\n $this->phone_number = $phone_number;\n \n return $this;\n }",
"public static function e123_phone_regex() {\r\n\t\treturn '^\\+[1-9][0-9 ]+$';\r\n\t}",
"private function formatPhone($number)\n {\n $ret = \"\";\n if( $number !== \"\" )\n {\n $ret = str_replace(\"-\", \"\", $number);\n if( strlen($ret) > 7 )\n {\n $acode = substr($ret, 0, 3);\n $prefix = substr($ret, 3, 3);\n $lineNum = substr($ret, 6, 4);\n $extra = substr($ret, 10, strlen($ret) - 10);\n $ret = \"$acode-$prefix-$lineNum\". ( trim($extra)==\"\"?\"\": (substr($extra, 0, 1)==\" \"?\",\".$extra: $extra));\n }\n else if( strlen($ret) == 7 )\n {\n $prefix = substr($ret, 3, 3);\n $lineNum = substr($ret, 6, 4);\n $ret = \"$acode-$prefix\";\n }\n } // If the number is less than 7, return nothing\n return $ret;\n }",
"public function getPhoneNumber()\n\t{\n\t\treturn $this->phone_number;\n\t}"
] | [
"0.75193363",
"0.70277536",
"0.70124793",
"0.69556785",
"0.6869411",
"0.68268085",
"0.6703002",
"0.669782",
"0.66754377",
"0.6580026",
"0.6519557",
"0.6505692",
"0.64666194",
"0.64656746",
"0.64401096",
"0.64122146",
"0.6396462",
"0.63931906",
"0.63931906",
"0.6376278",
"0.6357334",
"0.6357334",
"0.63066965",
"0.6298632",
"0.62799275",
"0.62784153",
"0.62659353",
"0.62640387",
"0.62481153",
"0.62481153",
"0.6239177",
"0.6210894",
"0.62008244",
"0.6191608",
"0.61640984",
"0.61276776",
"0.60940737",
"0.60915077",
"0.60875934",
"0.6075833",
"0.6075599",
"0.6069889",
"0.6054525",
"0.60429835",
"0.60416365",
"0.60202307",
"0.6002448",
"0.59859633",
"0.598335",
"0.5978714",
"0.5967019",
"0.5966859",
"0.59375805",
"0.59294343",
"0.59257376",
"0.5906426",
"0.5884872",
"0.58772975",
"0.5874275",
"0.5874275",
"0.5873267",
"0.5871744",
"0.58669806",
"0.5857082",
"0.5855566",
"0.58506507",
"0.58491296",
"0.5840175",
"0.5803473",
"0.58022237",
"0.58012813",
"0.5799018",
"0.57844085",
"0.5772393",
"0.5768422",
"0.5743726",
"0.573994",
"0.5731142",
"0.5731142",
"0.5731142",
"0.5731142",
"0.5731142",
"0.5731142",
"0.5731142",
"0.5731142",
"0.57275707",
"0.5717263",
"0.56865525",
"0.5683263",
"0.5678459",
"0.56709516",
"0.56633055",
"0.5661241",
"0.5659365",
"0.56572056",
"0.56402254",
"0.563838",
"0.56320655",
"0.56319803",
"0.56309915",
"0.5628202"
] | 0.0 | -1 |
Set extension number. Max size is 10 symbols. | public function setInternal($internal) {
$this->_internal = $internal;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setExtensionLength($value)\n {\n $this->_fields['ExtensionLength']['FieldValue'] = $value;\n return $this;\n }",
"public function setExtension(?string $value): void {\n $this->getBackingStore()->set('extension', $value);\n }",
"public function setExtension($extension)\n\t{\n\t\t$this->extension = ltrim($extension, '.');\n\t}",
"public function setExtension($ext)\n {\n if (!empty($ext)){\n $this->extension = $ext;\n }\n }",
"public function setExtension($ext);",
"public function setExtension($extension)\n {\n $this->_extension = $extension;\n }",
"public function setExtension($extension)\n {\n $this->_extension = $extension;\n }",
"public function withExtensionLength($value)\n {\n $this->setExtensionLength($value);\n return $this;\n }",
"public function setExtension($extension) {\n $this->_extension = $extension;\n }",
"function setFilenameExtension()\n\t{\n\t\t$sOldFilenameExtension = substr($this->filename, strlen($this->filename) - 4, 4);\n\t\tif (($sOldFilenameExtension != '.gif') &&\n\t\t\t\t($sOldFilenameExtension != '.jpg') &&\n\t\t\t\t($sOldFilenameExtension != '.png')) {\n\t\t\t$this->printError('invalid filename extension');\n\t\t}\n\n\t\tswitch ($this->type) {\n\t\t\tcase 1:\n\t\t\t\t$this->filename = substr($this->filename, 0, strlen($this->filename) - 4) . '.gif';\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->filename = substr($this->filename, 0, strlen($this->filename) - 4) . '.jpg';\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->filename = substr($this->filename, 0, strlen($this->filename) - 4) . '.png';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->printError('invalid imagetype');\n\t\t}\n\t}",
"public function setExtension(Extension $extension)\n {\n $this->extension = $extension;\n }",
"public function update_extension(){}",
"public function setExtension($name, $baseVersion, $extensionLevel) {}",
"public function setExtension( $extension ) {\n \n if( ! is_string( $extension ) ) {\n throw new \\InvalidArgumentException('Expected a string');\n }\n \n $this->extension = $extension;\n\n }",
"public function setExtension(?IExtension $extension): void\n {\n $this->extension = $extension;\n }",
"public function setExtensionKey($extensionKey) {\n\t\t$this->extensionKey = $extensionKey;\n\t\t$this->upperCasedExtensionKey = $this->upperCaseExtensionKey($extensionKey);\n\t}",
"public function setNUMEROEXT($NUMERO_EXT)\r\n {\r\n $this->NUMERO_EXT = $NUMERO_EXT;\r\n\r\n return $this;\r\n }",
"public function setExtension(string $extension = '.serial') : self\n\t\t{\n\t\t$this->extension = $extension;\n\n\t\treturn $this;\n\t\t}",
"public function addExtension(string $extension);",
"public function setExtension($extension, $attributes = array()) {\n\t\t$this->connections [$this->active]->setExtension ( $extension, $attributes );\n\t}",
"public function set_file_extension ( $fileExtension ) {\r\n\t\t$this->_file_extension = $fileExtension;\r\n\t}",
"public function setNUMERO_EXT($NUMERO_EXT)\r\n {\r\n $this->NUMERO_EXT = $NUMERO_EXT;\r\n\r\n return $this;\r\n }",
"public function setExtension($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->extension !== $v) {\n $this->extension = $v;\n $this->modifiedColumns[OrdrhedTableMap::COL_EXTENSION] = true;\n }\n\n return $this;\n }",
"public function setExtension($name, $list=array());",
"function changeExtension() {\n if (isset($this->params['file_id']) && $this->params['file_id'] != '' &&\n isset($this->params['extension']) && $this->params['extension'] != '' &&\n isset($this->currentFile) && is_array($this->currentFile) &&\n isset($this->currentFile['file_name'])) {\n $extensions = $this->mimeObj->getMimeTypesExtensions($this->currentFile['mimetype_id']);\n if (isset($extensions[$this->params['extension']])) {\n if ($pos = papaya_strings::strrpos($this->currentFile['file_name'], '.')) {\n $newFileName = substr($this->currentFile['file_name'], 0, $pos + 1);\n $newFileName .= $this->params['extension'];\n } else {\n $newFileName = $this->currentFile['file_name'].'.'.$this->params['extension'];\n }\n $data = array(\n 'file_name' => $newFileName,\n );\n $condition = array(\n 'file_id' => $this->params['file_id'],\n );\n if ($this->databaseUpdateRecord($this->tableFiles, $data, $condition)) {\n $this->addMsg(\n MSG_INFO, $this->_gt('File extension corrected.')\n );\n $this->loadFileData();\n }\n } else {\n $this->addMsg(\n MSG_ERROR,\n sprintf(\n $this->_gt('Invalid extension \"%s\" for filetype \"%s\".'),\n $this->params['extension'],\n $this->currentFile['mimetype']\n )\n );\n }\n }\n }",
"public function getNUMERO_EXT()\r\n {\r\n return $this->NUMERO_EXT;\r\n }",
"public function getNUMEROEXT()\r\n {\r\n return $this->NUMERO_EXT;\r\n }",
"function set_template_ext($ext = NULL)\n\t{\n\t\t//make sure the extension starts with a .\n\t\tif (strpos( $ext, '.' ) !== 0)\n\t\t\t$ext = '.'.$ext;\n\t\t\n\t\t$this->template_ext = $ext;\n\t}",
"public function setPhoneExtension($value)\n {\n $this->setParameter('billingPhoneExtension', $value);\n $this->setParameter('shippingPhoneExtension', $value);\n\n return $this;\n }",
"public static function setFileExt($fileExt)\n {\n static::$fileExt = $fileExt;\n }",
"public function setNumGlyphs($value) {}",
"function setExtensionsPath($value)\r\n\t\t{\r\n\t\t\t$this->_extensionsPath = $value;\r\n\t\t}",
"public function getExtensionLength()\n {\n return $this->_fields['ExtensionLength']['FieldValue'];\n }",
"public function guessExtension();",
"public function getExtensionCount() {}",
"public function setLeaderLineExtension($length) {}",
"protected function getNumberOfCurrentExtensions() {}",
"protected function assignExtensionSettings() {}",
"public function Extension($extension){\r\n $fullpath=YEXTENTIONDIR.ucwords($extension).EXT;\r\n $this->Load($fullpath);\r\n }",
"public function getPhoneExtension()\n {\n return $this->getParameter('billingPhoneExtension');\n }",
"protected function setAvailableExtensions() {}",
"public function extension() : string {\n return $this->file->extension;\n }",
"public function setFileExtension($fileExtension)\n {\n $this->_fileExtension = $fileExtension;\n }",
"private function detectExtension()\n {\n $arr = explode('.', $this->file['name']);\n $this->file['extension'] = end($arr);\n }",
"public function setBillingPhoneExtension($value)\n {\n return $this->setParameter('billingPhoneExtension', $value);\n }",
"public function setExtensionAttributes(\n \\Magento\\CompanyCredit\\Api\\Data\\CreditLimitExtensionInterface $extensionAttributes\n );",
"public function setextension()\n {\n return view('settings.setextention');\n }",
"public function set_post_extension(string $extension) {\n\t\t$this->post_extension = $extension;\n\t}",
"function setNum($num)\n {\n $this->num = $num;\n }",
"public function setShippingPhoneExtension($value)\n {\n return $this->setParameter('shippingPhoneExtension', $value);\n }",
"public function setNumber(?string $value): void {\n $this->getBackingStore()->set('number', $value);\n }",
"public function setAllowedExtensions(array $extensions) {\n \t $this->allowedExtensions = $extensions;\n\t }",
"function SetValidExtensions($Ext) {\n\t\t\t$V = array();\n\t\t\t// Reinicializamos el vector\n\t\t\t$this->ExtenValidas = array();\n\t\t\tif (gettype($Ext) == \"array\") {\n\t\t\t\t$this->ExtenValidas = $Ext;\n\t\t\t} else {\n\t\t\t\t$V = explode(',', $Ext);\n\t\t\t\t// Recorremo el archivo para no permitir \n\t\t\t\t// files sin extension\n\t\t\t\tforeach ($V as $Val) {\n\t\t\t\t\tif ($Val != '') {\n\t\t\t\t\t\tarray_push($this->ExtenValidas, $Val);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->ToLowerArrayExtensions();\n\t\t}",
"public function setBigIntegerMath($extension = null)\n {\n $this->_math = new Crypt_DiffieHellman_Math($extension);\n }",
"public function setValidExtensions($extensions) {\n\t\t$this->valid_extensions = $extensions;\n\t}",
"function addExtension($mode, $ext) {\r\n\t\t$this->_file_extensions[$ext] = $mode;\r\n\t\treturn $this;\r\n\t}",
"public function getExtension(): string\n {\n return $this->extension;\n }",
"public function getExtension(): string\n {\n return $this->extension;\n }",
"private function _extension()\n\t{\n\t\tif ($this->getView() instanceof View)\n\t\t{\n\t\t\treturn 'plg_' . $this->getView()->getFolder() . '_' . $this->getView()->getElement();\n\t\t}\n\n\t\treturn $this->getView()->get('option', Request::getCmd('option'));\n\t}",
"function addExtension($version_id, $file){\n\t\t// check for last vesion\n\t\tif($this->file->last_version < $version_id){\n\t\t\t$this->file->last_version = $this->file->last_version + 1;\n\t\t\t$this->file->save();\n\n\t\t\t$version_id = $this->file->last_version;\n\t\t}\n\n\t\t$version = $this->getVersion($version_id);\n\t\t$version->updateExtensionFile(null, $file);\n\n\t\treturn $version_id;\n\t}",
"function add_extension() {\n\n require_once( dirname( __FILE__ ) . '/LFAPPS_Comments_Extension.php' );\n $this->ext = new LFAPPS_Comments_Extension();\n }",
"public function Extension();",
"public function get_extension()\n {\n }",
"public function setFileExtension($fileExtension)\n {\n $this->fileExtension = $fileExtension;\n }",
"public function setFileExtension($fileExtension)\n {\n $this->fileExtension = $fileExtension;\n }",
"public function setExtension(array $extension)\n {\n $this->extension = $extension;\n return $this;\n }",
"public function setExtension(array $extension)\n {\n $this->extension = $extension;\n return $this;\n }",
"public function setExtension(array $extension)\n {\n $this->extension = $extension;\n return $this;\n }",
"private function addExtension($extension = \".txt\")\n\t{\n\t\t$fileName = $this->fileName;\n\t\tif(substr($fileName, -4) !== $extension) {\n\t\t\t$fileName .= $extension;\n\t\t\t$this->fileName = $fileName;\n\t\t}\n\t\treturn $fileName;\n\t}",
"public function extension(string $extension): static\n {\n return $this->setAssetProperty('extension', $extension);\n }",
"private function addExtension($extension) {\n $extension = trim(strtolower($extension));\n $extension = preg_quote($extension, \"#\");\n\n if ($extension === \"jpg\" || $extension === \"jpeg\")\n $extension = \"jpe?g\";\n\n // don't add duplicates!\n if (!in_array($extension, $this->extensions)) {\n $this->extensions[] = $extension;\n }\n }",
"public function setNumber($number);",
"public function setNumBits($numBits) {}",
"public function getExtensionIdentifier();",
"function setExt($inExt) {\n\t\tif ( $inExt !== $this->_Ext ) {\n\t\t\t$this->_Ext = $inExt;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}",
"public function setExtensions(array $extensions)\n {\n foreach ($extensions as $extension) {\n $this->addExtension($extension);\n }\n }",
"public function setExtensions(array $extensions)\n {\n $this->extensions = array();\n\n foreach ($extensions as $extension) {\n $this->addExtension($extension);\n }\n }",
"public function getExtension() : string;",
"function getExtension() ;",
"abstract public function getExtensionVersion();",
"public function setExtension(\\ProcessMaker\\Bpmn\\Diagram\\DiagramElementType\\ExtensionAType $extension)\n {\n $this->extension = $extension;\n return $this;\n }",
"public function setOperationNumber($value) {\n if(strlen($value) > 50 ){\n throw new ValueException(\"Value \".$value.\" is higher than 8\");\n }\n $this->Num_operacion = $value;\n }",
"public function setExt($ext)\n {\n if ($ext) {\n $this->env['EXT'] = '.' . ltrim($ext, '.');\n } else {\n $this->env['EXT'] = '';\n }\n\n return $this;\n }",
"public function extension()\n {\n return '';\n }",
"public function set_min_font_size($val) \n {\n $this->min_font_size = $val;\n }",
"public function getExtensionKey() {}",
"public function getExtensionKey() {}",
"public function get_file_extension () {\r\n\t\treturn $this->_file_extension;\r\n\t}",
"public function _set($number)\n {\n }",
"public function getExtensionName() {}",
"public function setSizeInGB(?int $value): void {\n $this->getBackingStore()->set('sizeInGB', $value);\n }",
"public function get_extension()\n {\n return $this->m_extension;\n }",
"public function getExtension() {}",
"public function setSize(int $size)\n {\n $this->size = $size;\n }",
"public function getExtension()\n {\n return $this->extension;\n }",
"public function getExtension()\n {\n return $this->extension;\n }",
"public function getExtension()\n {\n return $this->extension;\n }",
"public function getExtension()\n {\n return $this->extension;\n }",
"public function getExtension()\n {\n return $this->extension;\n }",
"public function getExtension()\n {\n return $this->extension;\n }",
"public function getExtension()\n {\n return $this->extension;\n }"
] | [
"0.6676072",
"0.65358794",
"0.6426525",
"0.63958955",
"0.63930357",
"0.62402344",
"0.62402344",
"0.6236095",
"0.62102383",
"0.6130696",
"0.6064763",
"0.60187507",
"0.596195",
"0.5917399",
"0.58940536",
"0.5830838",
"0.5786979",
"0.5767769",
"0.57254",
"0.5700874",
"0.5699998",
"0.56739116",
"0.56694496",
"0.56652844",
"0.5664045",
"0.5628802",
"0.5625646",
"0.5600368",
"0.5569637",
"0.5556813",
"0.55561626",
"0.5551941",
"0.5538377",
"0.5523485",
"0.551046",
"0.54957443",
"0.54919785",
"0.54729754",
"0.54048395",
"0.5368915",
"0.5348729",
"0.53457606",
"0.53375757",
"0.5333027",
"0.53233683",
"0.531988",
"0.529465",
"0.52934813",
"0.5293412",
"0.5259683",
"0.52439725",
"0.5235715",
"0.5228695",
"0.52119416",
"0.5210817",
"0.51984954",
"0.5196496",
"0.5196496",
"0.51671326",
"0.51588714",
"0.5150771",
"0.5138819",
"0.51353544",
"0.51338816",
"0.51338816",
"0.51096135",
"0.51096135",
"0.51096135",
"0.5089598",
"0.50834656",
"0.5077448",
"0.50730056",
"0.50611776",
"0.5055273",
"0.50487334",
"0.5041264",
"0.5036495",
"0.5024612",
"0.5016923",
"0.500041",
"0.49963677",
"0.4982261",
"0.49774083",
"0.4974999",
"0.4964905",
"0.49637237",
"0.49637237",
"0.49544242",
"0.49536934",
"0.49424595",
"0.49346748",
"0.49308053",
"0.49305224",
"0.49300718",
"0.49298856",
"0.49298856",
"0.49298856",
"0.49298856",
"0.49298856",
"0.49298856",
"0.49298856"
] | 0.0 | -1 |
Return standard class from this class | public function toStdClass() {
$stdClass = new stdClass();
$stdClass->number = $this->_number;
$stdClass->internal = $this->_internal;
return $stdClass;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function get_class(){\n return self::class;}",
"abstract protected function getDefaultClass();",
"public function get_class()\n {\n return $this->class;\n }",
"public function baseclass()\n {\n \n return new StringWrapper(substr_count($this->_public_class()->get(), '\\\\') > 0\n ? substr(strrchr($this->_public_class()->get(), '\\\\'), 1)\n : $this->_public_class()->get()\n );\n \n }",
"public function getClass() {\n \treturn $this->_class;\n }",
"function getClass(){\n\t\treturn $this->_class;\n\t}",
"public static function getClass()\n {\n return get_class(new static);\n }",
"private function _public_class()\n {\n \n return new StringWrapper(get_class($this->object));\n \n }",
"public function getClass()\n {\n return $this->class;\n }",
"protected function getClass()\n {\n return __CLASS__;\n }",
"public function getClass() {}",
"public function getClass() {}",
"public function getClass() {}",
"public function getClass()\n {\n \treturn $this->class;\n }",
"public function getClass() {\r\n\t\treturn $this->class;\r\n\t}",
"public function getClass() {\n return $this->class;\n }",
"public function getClass()\n {\n return $this->class;\n }",
"public function getClass()\n {\n return $this->class;\n }",
"public function getClass()\n {\n return $this->class;\n }",
"public function getClass()\n {\n return $this->class;\n }",
"public function getClass()\n {\n return $this->class;\n }",
"public function getClass()\n {\n return $this->class;\n }",
"public function getClass()\n {\n return $this->class;\n }",
"public function getClass()\n {\n return $this->class;\n }",
"public function getClass()\n {\n return $this->class;\n }",
"public function getClass()\n {\n return $this->class;\n }",
"public function getClass()\n {\n return $this->class;\n }",
"public function getClass()\n {\n return $this->class;\n }",
"public function getClass()\n {\n return $this->class;\n }",
"public function getClass()\t{\n\t\treturn $this->class;\n\t}",
"public static function factory()\r\n {\r\n return parent::factory(__CLASS__);\r\n }",
"public function getClass()\n {\n return get_class($this);\n }",
"public static function __getClass()\n {\n return __CLASS__;\n }",
"public function class()\n {\n // @codingStandardsIgnoreLine\n return $this->class ?? \"\";\n }",
"public function getClass()\n\t{\n\t\treturn $this->_class;\n\t}",
"public function getClass()\n\t{\n\t\treturn $this->_class;\n\t}",
"public function getCls() {}",
"abstract protected function getClass();",
"abstract public function getClass();",
"abstract public function getClass();",
"public static function getInstance()\n {\n return GeneralUtility::makeInstance(__CLASS__);\n }",
"public function getClass()\n {\n return $this->_className;\n }",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"public function getClass();",
"final public static function getClass(){\n return get_called_class();\n }",
"public static function inst()\n {\n return static::get_one(__CLASS__);\n }",
"public function getClass(): string;",
"public function getClass(): string;",
"public function getClass(): string;",
"public function getClass(): string;",
"public function getClass(): string;",
"public function getClass(): string;",
"public function getCustomClass()\n {\n return $this->custom_class;\n }",
"function getActualClass(){\n\t\treturn $this->nmclass;\n\t}",
"public function getClassName() { return __CLASS__; }",
"public static function __getClass()\r\n\t{\r\n\t\treturn __CLASS__;\r\n\t}",
"public function getClass()\n\t{\n\t\treturn $this->class;\n\t}",
"public function getClass()\n\t{\n\t\treturn $this->class;\n\t}",
"static public function getClass();",
"function getClass();",
"public static function getInternalClass();",
"static function self()\n {\n self::$org = null;\n self::$role = null;\n\n return __CLASS__;\n }",
"public function getClass(): string\n {\n return $this->class;\n }",
"public function get_class() {\n\t\tif ( ! $this->is_class_set ) {\n\t\t\t$this->set_class( $this->derive_class() );\n\t\t}\n\t\treturn $this->class;\n\t}",
"public function createClass()\n {\n return $this->addExcludesNameEntry($this->classes);\n }",
"public static function getInstance() {\n\t\treturn parent::getInstance(__CLASS__); \n\t}",
"public static function getInstance() {\n\t\treturn parent::getInstance(__CLASS__);\n\t}",
"public function fetchClass()\n {\n return $this->class;\n }",
"function __toString()\n {\n return __CLASS__;\n }",
"public function getObjectClass() \n {\n return get_class($this);\n }",
"public function getClass(): ?string\r\n {\r\n return $this->class;\r\n }",
"static public function fromStdClass(StandardClass $aStdClass) {\n\t\t//Strings::debugLog('costume stdcls: '.Strings::debugStr($aStdClass));\n\t\t$o = self::cnvStdClassToXClass($aStdClass, get_called_class());\n\t\t//Strings::debugLog('costume cls: '.Strings::debugStr($o));\n\t\treturn $o;\n\t}",
"protected function return_as_stdclass(){\n\n\t\t$res = new stdClass();\n\n\t\tforeach($this as $key => $value) {\n \n if(!stristr($key, 'full_table_')){\n\n $res->{$key} = $value;\n }\n\n unset($key, $value);\n }\n\n\t\treturn $res;\n\t}",
"public function getMorphClass();",
"public function getMorphClass();",
"public function getMorphClass();",
"public function GetToolClass ();",
"public function __toString()\r\n {\r\n return __CLASS__;\r\n }",
"public function __toString()\r\n {\r\n return __CLASS__;\r\n }",
"public function __toString()\n {\n return __CLASS__;\n }",
"public function __toString()\n {\n return __CLASS__;\n }",
"public function __toString()\n {\n return __CLASS__;\n }",
"public function __toString()\n {\n return __CLASS__;\n }"
] | [
"0.75609267",
"0.71174175",
"0.6988961",
"0.69630486",
"0.6944109",
"0.6913078",
"0.6904024",
"0.6879485",
"0.6759572",
"0.675955",
"0.67299354",
"0.6729222",
"0.6729222",
"0.67282176",
"0.6697327",
"0.6671992",
"0.6648799",
"0.6648799",
"0.6648799",
"0.6648799",
"0.6648799",
"0.6648799",
"0.6648799",
"0.6648799",
"0.6648799",
"0.6648799",
"0.6648799",
"0.6648799",
"0.6648799",
"0.66444236",
"0.66443855",
"0.66414076",
"0.6628514",
"0.66201425",
"0.6618677",
"0.6618677",
"0.6608918",
"0.66037303",
"0.6599315",
"0.6599315",
"0.658103",
"0.6574345",
"0.6561681",
"0.6561681",
"0.6561681",
"0.6561681",
"0.6561681",
"0.6561681",
"0.6561681",
"0.6561681",
"0.6561681",
"0.6561681",
"0.6561681",
"0.6561681",
"0.6561681",
"0.6561681",
"0.6561681",
"0.6561681",
"0.6561681",
"0.6561681",
"0.6561681",
"0.6561681",
"0.65566677",
"0.6554543",
"0.65449697",
"0.65449697",
"0.65449697",
"0.65449697",
"0.65449697",
"0.65449697",
"0.6535842",
"0.6532134",
"0.65176606",
"0.65074223",
"0.6506154",
"0.6506154",
"0.650551",
"0.64744294",
"0.64700496",
"0.64632887",
"0.641471",
"0.63967437",
"0.6392828",
"0.6366902",
"0.6361484",
"0.63040495",
"0.6281938",
"0.6269963",
"0.62582624",
"0.62254435",
"0.62208766",
"0.6211605",
"0.6211605",
"0.6211605",
"0.62106216",
"0.6192281",
"0.6192281",
"0.618409",
"0.618409",
"0.618409",
"0.618409"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72855324",
"0.71447515",
"0.7132799",
"0.6641042",
"0.66208744",
"0.6566955",
"0.65249777",
"0.6509032",
"0.6447701",
"0.63756555",
"0.6373163",
"0.63650846",
"0.63650846",
"0.63650846",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
if(request()->has('page') && request('page') > 0)
{
$page = request('page');
} else {
$page = 1;
}
$data['categoryName'] = request('category_name');
$data['couponsData'] =
json_decode(file_get_contents("https://www.coupomated.com/apiv3/6c2a-d0b8-bbaf-b9e6/getBatchCoupons/1000/". $page . "/json"));
$data['coupons'] = [];
foreach ($data['couponsData'] as $key => $coupon) {
$cats = explode(',', $coupon->FINAL_CAT_LIST);
if(array_search($id, $cats)){
$data['coupons'][] = $coupon;
}
}
$data['page'] = $page;
$data['totalCoupons'] = json_decode(file_get_contents("https://www.coupomated.com/apiv3/6c2a-d0b8-bbaf-b9e6/getCouponCount"));
$data['pages'] = $data['totalCoupons'] / 50;
return view('categories.show', $data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"public function remove($id);",
"public function remove($id);",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6671365",
"0.6660839",
"0.66361386",
"0.6632988",
"0.6624729",
"0.6542195",
"0.6541645",
"0.6466739",
"0.6288393",
"0.61767083",
"0.6129533",
"0.608954",
"0.6054169",
"0.60443425",
"0.60073143",
"0.59338665",
"0.59317696",
"0.592145",
"0.5920155",
"0.59065086",
"0.5897853",
"0.58968836",
"0.58958197",
"0.58958197",
"0.58958197",
"0.58958197",
"0.58800334",
"0.5869308",
"0.5861188",
"0.5811069",
"0.5774596",
"0.5763277",
"0.5755447",
"0.5747713",
"0.5742094",
"0.573578",
"0.5727048",
"0.57164854",
"0.5712422",
"0.57092893",
"0.57080173",
"0.5707143",
"0.5704078",
"0.5696418",
"0.5684556",
"0.5684556",
"0.56790006",
"0.5678463",
"0.5658492",
"0.564975",
"0.5648406",
"0.56480885",
"0.5641393",
"0.5638992",
"0.56302536",
"0.56228197",
"0.5616424",
"0.5607389",
"0.56033397",
"0.5602035",
"0.55991143",
"0.55988586",
"0.5590501",
"0.5581284",
"0.55681103",
"0.5566215",
"0.55644745",
"0.5563726",
"0.55593926",
"0.55583876",
"0.5548547",
"0.5542015",
"0.5541403",
"0.5541403",
"0.55397224",
"0.55390894",
"0.55376494",
"0.5531044",
"0.5529739",
"0.55279493",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527671",
"0.5527155",
"0.5526666",
"0.55245256",
"0.552101",
"0.55183184"
] | 0.0 | -1 |
echo "Adding " . $file>getName() . " to " . $this>name . ""; | public function addFile($file) {
$this->files[$file->getName()] = $file;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function toString() {\n return $this->getClassName().'['.$this->file->toString().']';\n }",
"public function name() : string {\n return $this->file->name;\n }",
"function writeName($fname)\n{\n echo $fname . \" Refsnes.<br>\";\n}",
"function writeName($fname){\n echo $fname.\" Refsnes.<br>\";\n}",
"public function get_file_name(){\n return $this->file_name;\n }",
"public function getFileName(){\n return $this->finalFileName;\n }",
"function AddPrefixToFileName() {\n\t\t\t$this->NewFileName = time().'_'.$this->GetFileName();\n\t\t\t//echo $this->NewFileName; exit();\n\t\t\treturn $this->NewFileName;\n\t\t}",
"public function __toString() {\n\t\treturn (string) $this->basename; \n\t}",
"function link_origin_file($fname, $title=\"\"){\n if (!$title==\"\") $title.=\"<br>\";\n $title.=basename($fname);\n $ageString=file_age_string($fname);\n $ageStyle=file_age_style($fname);\n\n echo \"<div style='font-family: monospace; line-height: 100%;'>\";\n echo html_button_copy($fname, True, \"copy\");\n echo \"<span style='$ageStyle; padding-left: 4px; padding-right: 4px;'>\";\n echo basename($fname);\n echo \" <span style='font-size: 70%'>$ageString</span></span>\";\n echo \"</div>\";\n}",
"function printName()\n {\n echo $this->name;\n }",
"public function filename() : string {\n return $this->name;\n }",
"public function getName()\n {\n return $this->file['name'];\n }",
"public function getFullname(){\n\t \treturn $this->filename.'.'.$this->extension;\n\t }",
"function getFileName()\n {\n return $this->fileName;\n }",
"function filename($title,$name){\n return $name;\n}",
"abstract protected function _getFileName();",
"function thrive_buddydrive_set_name() {\n\treturn __('Files', 'thrive-nouveau');\n}",
"public function getName(){\n if ($this->file)\n return $this->file->getName();\n }",
"public function getName()\n {\n return $this->file->getName();\n }",
"public function get_file_name() {\n\t\treturn $this->file;\n\t}",
"public function getFileName(){\n return $this->_fileName;\n }",
"function set_file_name($new_name = '') {\r\n\t\tif ($this->rename_file) {\r\n\t\t\tif ($this->the_file == '') return;\r\n\t\t\t$name = ($new_name == '') ? strtotime('now') : $new_name;\r\n\t\t\tsleep(3);\r\n\t\t\t$name = $name.$this->get_extension($this->the_file);\r\n\t\t} else {\r\n\t\t\t$name = str_replace(' ', '_', $this->the_file); // space will result in problems on linux systems\r\n\t\t}\r\n\t\treturn $name;\r\n\t}",
"public function getFileName() {\n\t \t return $this->fileName;\n\t }",
"public function filename(): string;",
"protected function fileName() {}",
"public function getName()\n {\n return $this->_path['filename'];\n }",
"public function __toString(): string\n {\n return $this->getAbsolutePath();\n }",
"function addFile($filename){\n\t\t$this->_Items[] = new StringBufferFileItem($filename);\n\t}",
"function getTargetFileName() ;",
"public function getFileName() {\n\n return $this->_fileName;\n }",
"public function __toString()\n {\n return $this->getFileLocation();\n }",
"private function setFileName() {\n $FileName = Uteis::Name($this->Name) . strrchr($this->File->name, '.');\n if (file_exists(self::$BaseDir . $this->Send . $FileName)):\n $FileName = Uteis::Name($this->Name) . '-' . time() . strrchr($this->File->name, '.');\n endif;\n $this->Name = $FileName;\n }",
"function completePath(){\n \treturn $this->path . $this->name;\n }",
"private function fileName()\n\t{\n\t\treturn $this->files[count($this->files) - 1];\n\t}",
"public function get_filename()\n {\n }",
"function getName() {\n\t\treturn $this->data_array['filename'];\n\t}",
"protected function ___filename() {\n\t\treturn $this->pagefiles->path . $this->basename;\n\t}",
"abstract protected function getFileName();",
"public function getFileName(): string;",
"public function getFileName() {\n return $this->name;\n }",
"function getFname() {\n return $this->fname;\n }",
"private function nameReportFile(){\n $name= str_replace(' ','_',$this->nombrereporte).'_'.\n $this->id.'_'.h::userId().'_'.uniqid().'.'.$this->type;\n }",
"public function __toString() {\n return basename(__FILE__).' v'.$this->classVersion.' by Camilo Sperberg - http://unreal4u.com/';\n }",
"function getFilename()\n {\n return $this->filename;\n }",
"private function formatFilename() {\n return $this->prefix . $this->name . \".\" . $this->extension;\n }",
"public function __toString()\n {\n return basename(__FILE__) . ' v' . $this->classVersion . ' by Camilo Sperberg - http://unreal4u.com/';\n }",
"function getFilename();",
"public abstract function catCommand($file);",
"private function _filename()\n\t{\n\t\t$ret = $this->_parent->{$this->_name.'_file_name'};\n\n\t\treturn empty($ret) ? false : $ret;\n\t}",
"function getName() ;",
"function getName() ;",
"function getName() ;",
"function getName() ;",
"public function add(){\n\t\t\n\t\t// Open or create file\n\t\t$f = fopen($this->file, 'wb');\n\t\tfclose($f);\n\t}",
"protected function destinationFile(): string\n {\n return $this->destinationDir() . '/' . ucfirst($this->arg('name')) . '.php';\n }",
"public function setFull_Filename(){\n \t $this->filename = $this->setDestination().'/'.$this->id.'.'.$this->ext;; \n\t}",
"public function getMyfile1()\n {\n return $this->myfile1;\n }",
"function fname($fname){\n echo \"$fname Refsnes.<br>\";\n }",
"function incrementFile() {\n \treturn $this->adjustPosition(1);\n }",
"public function copyOtherFiles(): void;",
"public function __toString() : string\n {\n return $this->getPathname();\n }",
"public function preUpload()\n {\n $this->name = str_replace(' ', '-', $this->alt) . uniqid() . \".\" . $this->fichier->guessExtension();\n }",
"public function filename()\n\t{\n\t\treturn $this->_filename();\n\t}",
"public static function getName()\n\t{\n\t\treturn self::$filename;\n\t}",
"public function getFileName()\n\t{\n\t\treturn $this->fileName;\n\t}",
"public function getFileName()\n\t{\n\t\treturn $this->fileName;\n\t}",
"public function fileStart(): void;",
"public function getName()\n {\n return 'File Exists Check';\n }",
"public function get_name(){ return $this->_name;}",
"function eat()\r\n {\r\n echo \"$this->_name is eating <br>\";\r\n }",
"public function getFileName();",
"public function getFileName();",
"public function getFileName();",
"public function showName()\n {\n echo $this->name;\n }",
"protected function onMove(){\n\t\tif (empty($this->post['directory']) || empty($this->post['file'])) return;\n\t\t\n\t\t$rename = empty($this->post['newDirectory']) && !empty($this->post['name']);\n\t\t$dir = $this->getDir($this->post['directory']);\n\t\t$file = realpath($dir . '/' . $this->post['file']);\n\t\t\n\t\t$is_dir = is_dir($file);\n\t\tif (!$this->checkFile($file) || (!$rename && $is_dir))\n\t\t\treturn;\n\t\t\n\t\tif ($rename || $is_dir){\n\t\t\tif (empty($this->post['name'])) return;\n\t\t\t$newname = $this->getName($this->post['name'], $dir);\n\t\t\t$fn = 'rename';\n\t\t}else{\n\t\t\t$newname = $this->getName(pathinfo($file, PATHINFO_FILENAME), $this->getDir($this->post['newDirectory']));\n\t\t\t$fn = !empty($this->post['copy']) ? 'copy' : 'rename';\n\t\t}\n\t\t\n\t\tif (!$newname) return;\n\t\t\n\t\t$ext = pathinfo($file, PATHINFO_EXTENSION);\n\t\tif ($ext) $newname .= '.' . $ext;\n\t\t$fn($file, $newname);\n\t\t\n\t\techo json_encode(array(\n\t\t\t'name' => pathinfo($this->normalize($newname), PATHINFO_BASENAME),\n\t\t));\n\t}",
"public function getFileName()\n {\n return $this->fileName;\n }",
"public function getFileName()\n {\n return $this->fileName;\n }",
"public function getFileName()\n {\n return $this->fileName;\n }",
"public function getFileName()\n {\n return $this->fileName;\n }",
"public function getFileName()\n {\n return $this->fileName;\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->file_name = now()->format('Y-m-d-Hi').'.sql.gz';\n\n }",
"public function __toString()\n\t\t{\n\t\t\treturn $this->basePath . $this->archiveFilename;\n\t\t}",
"public function getFileName()\n {\n return $this->filename;\n }",
"public function getFileName()\n {\n return $this->filename;\n }",
"function GetFileName() {\n \treturn $this->FilePost[$this->ObjClientSide]['name'];\n }",
"protected function filename()\n {\n return 'SpecialMembers_' . date('YmdHis');\n }",
"public function getFilename() {\n return $this->filename;\n }",
"public function getFileName(){\n\t\t$filename = sprintf($this->format, $this->classname) . '.php';\n\t\t\n\t\treturn $filename;\n\t}",
"public function getFilename() {}",
"public function name() {\n\t}",
"public function __toString() {\n return get_class($this).spl_object_hash($this).\"=( \".\n \"file=\".$this->file.\", \".\n \"class=\".$this->class.\", \".\n \"conf=\".preg_replace(\"/( |\\r|\\n|\\t)+/\", \n \" \", var_export($this->conf,true)).\" )\";\n }",
"public function sayHello(){\n echo \"Woof woof, my name is $this->name.\".PHP_EOL;\n }",
"public function setNewName(): ParseFile\n {\n $slugName = $this->slug($this->getFilename());\n $hashName = bin2hex(random_bytes(8));\n $this->newName = \"{$slugName}_{$hashName}.{$this->getExtension()}\";\n return $this;\n }",
"protected function readFileName() { return $this->_filename; }",
"function get_stored_file_name()\n\t{\n\t\tglobal $log;\n\t\t$log->debug(\"Entering get_stored_file_name() method ...\");\n\t\t$log->debug(\"Exiting get_stored_file_name method ...\");\n\t\treturn $this->stored_file_name;\n\t}",
"public function getUploadName(){\n\t\treturn $this->uploadName;\n\t}",
"function onInsertFile(&$man, &$file) {\r\n\t\treturn true;\r\n\t}",
"protected function filename(): string\n {\n return 'Floors_' . date('YmdHis');\n }",
"public function print_js() {\n\t\tglobal $BASE_SCRIPT_ADDED;\n\t\t$this->form->js_files []= 'file.js';\n\t\t$script = '<script type=\"text/javascript\">var file_uploader_'.$this->name().' = new file_uploader(\"'.$this->name().'\", '.$this->maxFiles.', \"'.$this->rel.'\", \"'.$this->target.'\");';\n\t\tforeach ($this->previousFiles as $id => $IN) {\n\t\t\t$script .= \"\\n\".'file_uploader_'.$this->name().'.add_existing_file(\"'.$IN->filename.'\", \"'.$this->uploadDir.$IN->filename.'\", \"'.$IN->id.'\");';\n\t\t}\n\t\t$script .= '</script>';\n\t\treturn $script;\n\t}",
"public function getName()\n\t{\n\t\tglobal $langs;\n\n\t\treturn $langs->trans('File');\n\t}",
"public function getFilename(){\n \n return $this->filename;\n \n }"
] | [
"0.6283218",
"0.61540234",
"0.61254364",
"0.6090518",
"0.60007083",
"0.59761584",
"0.5885602",
"0.582456",
"0.5819445",
"0.575687",
"0.56869316",
"0.5676661",
"0.56359476",
"0.5634324",
"0.5629599",
"0.562736",
"0.56097925",
"0.56003636",
"0.5586386",
"0.558201",
"0.55738556",
"0.55572337",
"0.5547327",
"0.5531106",
"0.55232525",
"0.55209607",
"0.55179685",
"0.55061024",
"0.54969364",
"0.5496142",
"0.5475727",
"0.54685694",
"0.54678357",
"0.54639834",
"0.54612803",
"0.5461244",
"0.5457619",
"0.54421526",
"0.5434383",
"0.5423944",
"0.54198325",
"0.540385",
"0.53745896",
"0.537382",
"0.53623366",
"0.5360574",
"0.534401",
"0.5335437",
"0.5335195",
"0.53345466",
"0.53345466",
"0.53345466",
"0.53345466",
"0.5329719",
"0.53272176",
"0.5325116",
"0.53150856",
"0.53071314",
"0.5300879",
"0.52978414",
"0.52963066",
"0.528753",
"0.52822715",
"0.5281822",
"0.5276038",
"0.5276038",
"0.527493",
"0.5265172",
"0.5256439",
"0.5253129",
"0.52531075",
"0.52531075",
"0.52531075",
"0.5245283",
"0.5241688",
"0.52385056",
"0.52385056",
"0.52385056",
"0.52385056",
"0.52385056",
"0.5233544",
"0.5231804",
"0.5228994",
"0.5228994",
"0.5214489",
"0.52025217",
"0.5196254",
"0.5187339",
"0.51867294",
"0.5186468",
"0.51853234",
"0.5182305",
"0.51755786",
"0.51713383",
"0.5166132",
"0.51623195",
"0.51562744",
"0.5153845",
"0.5153384",
"0.5137133",
"0.5133311"
] | 0.0 | -1 |
echo "Adding " . $folder>getName() ." to " . $this>name . ""; | public function addFolder($folder) {
$this->folders[$folder->getName()] = $folder;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function writeName($fname){\n echo $fname.\" Refsnes.<br>\";\n}",
"function writeName($fname)\n{\n echo $fname . \" Refsnes.<br>\";\n}",
"public function getName()\n {\n return 'oo_folder';\n }",
"public function create_folder_name(){\n // create folder name\n return $this->config['prefix'].$this->user['code'];\n }",
"function printName()\n {\n echo $this->name;\n }",
"function thrive_buddydrive_set_name() {\n\treturn __('Files', 'thrive-nouveau');\n}",
"function completePath(){\n \treturn $this->path . $this->name;\n }",
"function dir_name() {\n\t\treturn $this->_dir_name;\n\t}",
"public function __toString() {\n\t\treturn (string) $this->basename; \n\t}",
"public function showName()\n {\n echo $this->name;\n }",
"public function getName()\n\t{\n\t\treturn Blocks::t('Local Folder');\n\t}",
"public function __toString() : string\n {\n return $this->getPathname();\n }",
"public function sayHello(){\n echo \"Woof woof, my name is $this->name.\".PHP_EOL;\n }",
"public static function editFolderTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/edit_folder.tpl.php\"); ?>\n<?php\n }",
"public function __toString() {\n\t\treturn $this->getPath();\n\t}",
"function __toString()\n {\n return $this->getPath();\n }",
"abstract public function subfolder($manipulation_name = '');",
"function newName($name)\n{\nreturn ' My name is' .$name;\n}",
"public function __toString()\n\t{\n\t\treturn $this->getPath();\n\t}",
"public function get_name(){ return $this->_name;}",
"public function name() {\n\t}",
"public function toString() {\n return $this->getClassName().'['.$this->file->toString().']';\n }",
"function AddPrefixToFileName() {\n\t\t\t$this->NewFileName = time().'_'.$this->GetFileName();\n\t\t\t//echo $this->NewFileName; exit();\n\t\t\treturn $this->NewFileName;\n\t\t}",
"public function __toString()\n {\n return $this->getPath();\n }",
"function readNamePath()\r\n {\r\n $result='';\r\n\r\n if ($this->Name!='')\r\n {\r\n $result=$this->Name;\r\n\r\n if ($this->readOwner()!=null)\r\n {\r\n $s=$this->readOwner()->readNamePath();\r\n if ($s!=\"\")\r\n {\r\n $result = $s . \".\" . $result;\r\n }\r\n\r\n }\r\n }\r\n else\r\n {\r\n $result=$this->className();\r\n\r\n if ($this->readOwner()!=null)\r\n {\r\n $s=$this->readOwner()->readNamePath();\r\n if ($s!=\"\")\r\n {\r\n $result = $s . \".\" . $result;\r\n }\r\n\r\n }\r\n }\r\n\r\n return($result);\r\n\r\n //return($this->_name);\r\n }",
"public function __toString() {\r\n return $this->getPath();\r\n }",
"public function addfriend(){\n /**\n * one can acces properties in the class \n * for example the username and email\n * this means this instance of a class \n */\n \n return \" $this->username\";\n \n }",
"private function dirName()\n {\n return str_plural(strtolower($this->itemClass()));\n }",
"public function name()\n\t{\n\t\treturn $this->something;\n\t}",
"public function __toString()\n {\n return $this->getFullName();\n }",
"public function __toString(): string\n {\n return $this->getAbsolutePath();\n }",
"public function name() : string {\n return $this->file->name;\n }",
"public function __toString()\n\t\t{\n\t\t\treturn $this->basePath . $this->archiveFilename;\n\t\t}",
"protected function onMove(){\n\t\tif (empty($this->post['directory']) || empty($this->post['file'])) return;\n\t\t\n\t\t$rename = empty($this->post['newDirectory']) && !empty($this->post['name']);\n\t\t$dir = $this->getDir($this->post['directory']);\n\t\t$file = realpath($dir . '/' . $this->post['file']);\n\t\t\n\t\t$is_dir = is_dir($file);\n\t\tif (!$this->checkFile($file) || (!$rename && $is_dir))\n\t\t\treturn;\n\t\t\n\t\tif ($rename || $is_dir){\n\t\t\tif (empty($this->post['name'])) return;\n\t\t\t$newname = $this->getName($this->post['name'], $dir);\n\t\t\t$fn = 'rename';\n\t\t}else{\n\t\t\t$newname = $this->getName(pathinfo($file, PATHINFO_FILENAME), $this->getDir($this->post['newDirectory']));\n\t\t\t$fn = !empty($this->post['copy']) ? 'copy' : 'rename';\n\t\t}\n\t\t\n\t\tif (!$newname) return;\n\t\t\n\t\t$ext = pathinfo($file, PATHINFO_EXTENSION);\n\t\tif ($ext) $newname .= '.' . $ext;\n\t\t$fn($file, $newname);\n\t\t\n\t\techo json_encode(array(\n\t\t\t'name' => pathinfo($this->normalize($newname), PATHINFO_BASENAME),\n\t\t));\n\t}",
"public function getFullName(){\n\t\treturn $this->nombre.' '.$this->apellido;\n\t}",
"public function __toString()\n\t{\n\t\t$parts = $this->parts;\n\t\tif(count($parts) == 0) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$name = '';\n\t\tif($this->absolute) {\n\t\t\t$name = $parts[0];\n\t\t\t$parts = array_slice($parts, 1);\n\t\t}\n\t\t$path = '';\n\t\tif(count($parts)) {\n\t\t\t$path = sprintf('[%s]', implode('][', $parts));\n\t\t}\n\n\t\treturn $name . $path;\n\t}",
"function link_origin_file($fname, $title=\"\"){\n if (!$title==\"\") $title.=\"<br>\";\n $title.=basename($fname);\n $ageString=file_age_string($fname);\n $ageStyle=file_age_style($fname);\n\n echo \"<div style='font-family: monospace; line-height: 100%;'>\";\n echo html_button_copy($fname, True, \"copy\");\n echo \"<span style='$ageStyle; padding-left: 4px; padding-right: 4px;'>\";\n echo basename($fname);\n echo \" <span style='font-size: 70%'>$ageString</span></span>\";\n echo \"</div>\";\n}",
"function getName() ;",
"function getName() ;",
"function getName() ;",
"function getName() ;",
"function title(){\r\n echo $this->academy;\r\n }",
"public function enterName()\n {\n }",
"public function GetFullName ();",
"public function show(Folder $folder)\n {\n\n }",
"function printAcademyName(){\r\n echo \"<p class='username' id='username'>$this->academy </p>\";\r\n }",
"public function sing() {\n\t\techo $this->name . \" sings 'Bow wow, wooow, woooooooow' </br>\";\n\t}",
"public function add_friend()\n {\n return \"$this->username added a new friend\";\n }",
"public function __toString(){\n // para ver el nombre de subdireccion en un select\n return $this->nombreSubd;\n }",
"public function getFullname(){\n\t \treturn $this->filename.'.'.$this->extension;\n\t }",
"public function __toString()\n {\n return $this->getFileLocation();\n }",
"public function getFileName(){\n return $this->finalFileName;\n }",
"function theusername($name,$permissions) {\nif ($permissions == 1) echo $name . \"♦\";\nelse echo $name;\n}",
"public function name()\n {\n return $this->first_name .' ' .$this->last_name;\n }",
"public function name() {\r\n $name = $this->first_name . ' ' . $this->last_name;\r\n return $name;\r\n }",
"public function print_path()\n\t{\n\t\t\n\t}",
"function displayName(){\n echo \"My name is displayed\";\n }",
"function eat()\r\n {\r\n echo \"$this->_name is eating <br>\";\r\n }",
"public function getFullName(){\n\t\treturn $this->templateSet->getFullName() . '/' . $this->name . $this->suffix;\n\t}",
"public function __toString(){\n return $this->name;\n \n }",
"public function name()\n {\n }",
"function newFolder() {\n return Form::quick(false, __('Create'),\n new Formsection(__('New folder'),\n new Input(__('Folder name'), 'fname')\n )\n );\n }",
"public function directoryName() \r\n {\r\n return $this->directory->fullName();\r\n }",
"function renameFolder($oldName,$newName){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\r\n\r\n\t\t\t}",
"private static function getCurrentFolder() : string {\n return self::getPath() . '/' . date('Y-M');\n }",
"function get_name() {\n return $this->name;\n }",
"function readNamePath()\r\n {\r\n $result=$this->className();\r\n\r\n if ($this->readOwner()!=null)\r\n {\r\n $s=$this->readOwner()->readNamePath();\r\n\r\n if ($s!=\"\") $result = $s . \".\" . $result;\r\n\r\n }\r\n\r\n return($result);\r\n }",
"public function getDirname();",
"private function get_name()\n\t{\n\t\treturn $this->m_name;\n\t}",
"private function get_name()\n\t{\n\t\treturn $this->m_name;\n\t}",
"public function get_name(){\n return $this->name;\n }",
"public function mover()\n {\n return \"Voa e \" . parent::mover();\n }",
"function fname($fname){\n echo \"$fname Refsnes.<br>\";\n }",
"public function toString() {\n return $this->getClassName().'<'.$this->name.'>';\n }",
"public function getName()\n {\n echo \"Name: \" . $this->name;\n }",
"function get_name () {\n return $this -> name;\n }",
"public function __toString(): string\n {\n return sprintf('%s:%s', $this->getChannel(), $this->getPath());\n }",
"function LoadMyFile($folderId = null, $showDirectory, $showAddButton=\"\", $action=\"\")\n {\n $html = \"<div class='content-panel'>\";\n\n //Recuperation des dossiers et fichiers\n $folders = FolderHelper::GetByUser($this->Core, $folderId);\n $files = FileHelper::GetByUser($this->Core, $folderId);\n\n if(count($folders) > 0 || count($files) > 0 )\n {\n //Entete\n /* $html .= \"<div class='headFolder titleBlue' >\";\n $html .= \"<b class='blueTree'> </b>\" ;\n $html .= \"<span class='blueTree name' ><b>\".$this->Core->GetCode(\"Name\").\"</b></span>\" ;\n $html .= \"<span class='blueTree'><b>\".$this->Core->GetCode(\"DateCreated\").\"</b></span>\" ;\n $html .= \"<span class='blueTree'><b>\".$this->Core->GetCode(\"DateModified\").\"</b></span>\" ;\n $html .= \"<span class='blueTree'><b>\".$this->Core->GetCode(\"Users\").\"</b></span>\" ;\n $html .= \"</span>\"; \n $html .= \"</div>\" ;*/\n }\n\n //Retour répertoire parent\n if($folderId != null)\n {\n //Recuperation du dossier\n $folder = new FileFolder($this->Core);\n $folder->GetById($folderId);\n\n //Si je suis le propriétaire du dossier \n if( ($folder->ParentId->Value == \"\" && $folder->UserId->Value == $this->Core->User->IdEntite )\n || $folder->Parent->Value->UserId->Value == $this->Core->User->IdEntite \n || FolderHelper::IsAutorized($this->Core, $folder->ParentId->Value) \n )\n {\n //On affiche le repertoire parent\n if($showDirectory)\n {\n $html .= \"<div class='folder' >\";\n $html .= \"<i class='icon-folder-close blueOne'> </i>\" ;\n $html .= \"<span class='blueOne name' id='\".$folder->ParentId->Value.\"' >...</span>\" ;\n }\n }\n else\n { \n if($showDirectory)\n {\n //Retour à la racine des dossier partage\n $html .= \"<div class='folder' >\";\n $html .= \"<i class='icon-folder-close blueOne'> </i>\" ;\n $html .= \"<span class='blueOne' onclick= 'FileAction.LoadSharedFile()' >...</span>\" ;\n }\n }\n }\n\n\n //Ajout des dossier\n if(count($folders) > 0 && $showDirectory)\n {\n $i=0;\n\n foreach($folders as $folder)\n {\n $html .= \"<div class='folder' >\";\n $html .= \"<i class='icon-folder-close blueOne'> </i>\" ;\n $html .= \"<span class='blueOne name' id='\".$folder->IdEntite.\"' >\".$folder->Name->Value.\"</span>\" ;\n\n //Dossier d'application\n if($folder->AppName->Value != \"\")\n {\n $img = new Image(\"../Apps/\".$folder->AppName->Value.\"/Images/logo.png\");\n $img->Title->Value = $img;\n $html .= \"<span >\".$img->Show().\"</span>\" ;\n }\n else\n {\n $html .= \"<span ></span>\" ;\n }\n\n $html .= \"<span class='date'>\".$folder->DateCreated->Value.\"</span>\" ;\n $html .= \"<span class='date'>\".$folder->DateModified->Value.\"</span>\" ;\n\n //Partagé avec\n $html .= \"<span class='date'>\".FolderHelper::GetConcatUser($this->Core, $folder->IdEntite) .\"</span>\" ;\n\n //Bouton d'action\n if($folder->UserId->Value == $this->Core->User->IdEntite)\n {\n $html .= \"<span class='action'>\";\n $html .= \"<i class='icon-share' id='\".$folder->IdEntite.\"' title='\".$this->Core->GetCode('File.Share').\"' onClick='FileAction.ShareFolder(this)' > </i>\" ;\n $html .= \"<i class='icon-remove' id='\".$folder->IdEntite.\"' title='\".$this->Core->GetCode('File.Remove').\"' onClick='FileAction.RemoveFolder(this)' > </i></span>\" ;\n }\n\n $html .= \"</div>\" ;\n }\n }\n\n //Ajout de fichier\n if($showAddButton)\n {\n $btnAdd = new Button(BUTTON);\n $btnAdd->Value = $this->Core->GetCode(\"AddFile\");\n $btnAdd->OnClick = $action;\n $html .= \"<div>\".$btnAdd->Show().\"</div>\";\n }\n\n //Ajout des fichier\n if(count($files) > 0)\n {\n foreach($files as $file)\n {\n if($i==1)\n {\n $i=0;\n $class='lineClair';\n }\n else\n {\n $i=1;\n $class='lineFonce';\n }\n $html .= \"<div class='file $class' >\";\n $html .= \"<i class='icon-file blueTree'> </i>\" ;\n $html .= \"<span class='blueOne name' id='\".$file->IdEntite.\"' >\".$file->Name->Value.\"</span>\" ;\n\n //Fichier d'application\n if($file->AppName->Value != \"\")\n {\n $img = new Image(\"../Apps/\".$file->AppName->Value.\"/Images/logo.png\");\n $img->Title->Value = $img;\n $html .= \"<span >\".$img->Show().\"</span>\" ;\n }\n else\n {\n $html .= \"<span ></span>\" ;\n }\n\n $html .= \"<span class='date'>\".$file->DateCreated->Value.\"</span>\" ;\n $html .= \"<span class='date'>\".$file->DateModified->Value.\"</span>\" ;\n\n //Partagé avec\n $html .= \"<span class='date'>\".FileHelper::GetConcatUser($this->Core, $file->IdEntite) .\"</span>\" ;\n\n if($file->UserId->Value == $this->Core->User->IdEntite)\n {\n $html .= \"<span class='action'><i class='icon-share' id='\".$file->IdEntite.\"' title='\".$this->Core->GetCode('File.Share').\"' onClick='FileAction.ShareFile(this)' > </i>\" ;\n $html .= \"<i class='icon-remove' id='\".$file->IdEntite.\"' title='\".$this->Core->GetCode('File.Remove').\"' onClick='FileAction.RemoveFile(this)' > </i></span>\" ;\n }\n\n $html .= \"</div>\" ;\n }\n }\n\n $html .= \"</div>\";\n\n if($html != \"<div class='content-panel'>\")\n {\n return $html;\n }\n else\n {\n return \"File.NoFolder\";\n }\n }",
"function run() {\n\t\techo $this->name . \" runs like crazy </br>\";\n\t}",
"public function name():string;",
"public function __toString()\n {\n return $this->fqn;\n }",
"function showFileViewerContent() {\r\n global $currentPath;\r\n global $root;\r\n global $directory;\r\n global $parentPath;\r\n\r\n echo \"Path: \" . $currentPath . \"<br>\";\r\n\r\n addExitButton(); // Exit button directs the user to the home page.\r\n\r\n /* If parent path is the root path, we don't show the \"Back\" button, because if we do so, the user will see\r\n other users' folders and have access to them. */\r\n if ($parentPath != $root) {\r\n addBackButton($parentPath);\r\n }\r\n\r\n echo \"<hr>\";\r\n\r\n listFilesAndFolders($directory);\r\n}",
"public function __toString()\n {\n return $this->path;\n }",
"function getFullName()\r\n\t{\r\n\t\treturn $this->getFirstName() . \" \" . $this->getLastName();\r\n\t}",
"function printUsername(){\r\n echo $this->username;\r\n }",
"public function toString()\n {\n $path = '';\n if (!empty($this->dirs)) {\n foreach ($this->dirs as $dir) {\n $path .= $dir . DIRECTORY_SEPARATOR;\n }\n }\n $path .= $this->file;\n return $path;\n }",
"function __toString()\n\t{\n\t\treturn Craft::t($this->name);\n\t}",
"public function __toString()\n {\n return sprintf('[Directory Error] %s', $this->getMessage());\n }",
"public function __toString()\n {\n return $this->name;\n }",
"private function _listFolder($val) {\n\t\t$path = g($val, 'path');\n\t\t$name = g($val, 'name');\n\t\t\t\n\t\t$mypath = $this->_sanitize($path . '/' . $name);\n\t\t\n\t\treturn '\n\t\t\t\t<li class=\"cfind-item-folder\">\n\t\t\t\t\t<a href=\"'.$this->_url(['path' => $mypath]).'\" title=\"'.htmlspecialchars($name).'\">\n\t\t\t\t\t\t<figure></figure>\n\t\t\t\t\t\t<span>'.htmlspecialchars($name).'</span>\n\t\t\t\t\t</a>\n\t\t\t\t</li>';\n\t}",
"public function __toString() {\n\t\treturn $this->getName();\n\t}",
"public function __toString() {\n\t\treturn $this->getName();\n\t}",
"public function appendToCurrent(string $name): void\n {\n if ($this->current !== '') {\n $this->current .= '\\\\';\n }\n $this->current .= $this->lastPart = $name;\n }",
"public function getPathname(): string\n {\n return $this->directory->getPath().'/'.$this->filename;\n }",
"public function __toString()\n {\n return $this->getName();\n }",
"public function getFullName2()\n {\n return \"Silvi Lila\";\n }",
"public function getFullName()\n {\n return \"Enrisa Hasanaj\";\n }",
"public function fullName(){\n $fullName=parent::fullName();\n return $fullName.\", Policier \".$this->grade.\" <br/>\"; \n }",
"function getFullName()\n\t\t{\n\t\t\treturn $this->firstname.\" \".$this->lastname;\n\t\t}",
"function filename($title,$name){\n return $name;\n}",
"function __toString() {\n return $this->name;\n }"
] | [
"0.5904917",
"0.58798707",
"0.5858815",
"0.58223593",
"0.58068657",
"0.5766334",
"0.567674",
"0.56352705",
"0.5592654",
"0.5517643",
"0.5515271",
"0.5489503",
"0.54653746",
"0.54372555",
"0.53264",
"0.5321125",
"0.5315991",
"0.53019756",
"0.5293061",
"0.527446",
"0.5240092",
"0.5237824",
"0.52343494",
"0.52309275",
"0.5220827",
"0.5209369",
"0.5206733",
"0.52015483",
"0.52014124",
"0.5198596",
"0.5194191",
"0.5192764",
"0.5185247",
"0.51841253",
"0.5181249",
"0.5178181",
"0.51563734",
"0.5143503",
"0.5143503",
"0.5143503",
"0.5143503",
"0.51344216",
"0.51339114",
"0.5132073",
"0.5131065",
"0.5124758",
"0.51244426",
"0.51115644",
"0.5092653",
"0.50916576",
"0.5082585",
"0.5082042",
"0.507491",
"0.5073527",
"0.5072992",
"0.50693727",
"0.5065484",
"0.50589275",
"0.50520533",
"0.5043542",
"0.50433844",
"0.504287",
"0.5042074",
"0.5018483",
"0.50173426",
"0.5015573",
"0.50153327",
"0.5012018",
"0.5010936",
"0.5010936",
"0.50082904",
"0.500728",
"0.5006196",
"0.50049603",
"0.5003343",
"0.49960503",
"0.49888355",
"0.49880806",
"0.4987973",
"0.4987547",
"0.4984452",
"0.49836242",
"0.49802184",
"0.49717677",
"0.4965305",
"0.49638325",
"0.4960922",
"0.49593768",
"0.49569902",
"0.4949848",
"0.49402976",
"0.49402976",
"0.49387416",
"0.49377286",
"0.49376523",
"0.49370816",
"0.4932227",
"0.49290326",
"0.4928575",
"0.49274722",
"0.49255812"
] | 0.0 | -1 |
$folder is a Folder object | public function getFolder($folder) {
$foldername = $folder->getName();
if ($this->hasFolder($folder)) {
$ret = $this->folders[$foldername];
return $ret;
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function folder($folder)\n {\n // @todo\n }",
"public function getFolder();",
"public function find_folder($folder)\n {\n }",
"public function getFolderInfo() {}",
"public function folder()\n {\n return Folder::find($this->folder_id);\n }",
"public function getFolder()\n {\n return $this->_folder;\n }",
"public function get_folder() {\n return $this->folder;\n }",
"public function folder()\n {\n return $this->Folder;\n }",
"public function folder_data($folder) {\n // TO DO!!!!!!\n }",
"public function show(Folder $folder)\n {\n\n }",
"public function setFolder($folder)\n\t{\n\t\t$this->folder = $folder;\n\t}",
"public function setFolder($folder)\n {\n $this->folder = $folder;\n }",
"public function folder()\n {\n return $this->belongsTo(File::class, 'folder_id', 'id');\n }",
"public function folder() {\n return $this->belongsTo('App\\Models\\Folder');\n }",
"public function isFolder();",
"public function getProcessedFilesFolderObject();",
"public function set_folder($folder) {\n if ($this->folder === $folder) {\n return;\n }\n\n $this->folder = $folder;\n }",
"public function folder($folder)\n {\n return $this->mailbox($folder);\n }",
"function loadFolderData() {\n if (isset($this->params['folder_id'])) {\n $folder = $this->getFolder($this->params['folder_id']);\n if (isset($folder[$this->lngSelect->currentLanguageId])) {\n $this->currentFolder = $folder[$this->lngSelect->currentLanguageId];\n } else {\n $this->currentFolder = current($folder);\n }\n }\n }",
"public function show(Folder $folder)\n {\n //\n }",
"function email_get_folder($folderid) {\n\n\t$folder = new object();\n\n\tif ( $folder = get_record('email_folder', 'id', $folderid) ) {\n\n\t\tif ( isset($folder->isparenttype) ) {\n\t\t\t// Only change in parent folders\n\t\t\tif ( ! is_null($folder->isparenttype) ) {\n\t\t\t\t// If is parent ... return language name\n\t\t\t\tif ( ( email_isfolder_type($folder, EMAIL_INBOX) ) ) {\n\t\t\t\t\t$folder->name = get_string('inbox', 'block_email_list');\n\t\t\t\t}\n\n\t\t\t\tif ( ( email_isfolder_type($folder, EMAIL_SENDBOX) ) ) {\n\t\t\t\t\t$folder->name = get_string('sendbox', 'block_email_list');\n\t\t\t\t}\n\n\t\t\t\tif ( ( email_isfolder_type($folder, EMAIL_TRASH) ) ) {\n\t\t\t\t\t$folder->name = get_string('trash', 'block_email_list');\n\t\t\t\t}\n\n\t\t\t\tif ( ( email_isfolder_type($folder, EMAIL_DRAFT) ) ) {\n\t\t\t\t\t$folder->name = get_string('draft', 'block_email_list');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $folder;\n}",
"public function index(Folder $folder)\n {\n\n $users = User::all()\n ->where('id','<>' , auth()->id());\n\n\n $folders = Folder::all()\n ->where('user_id' , auth()->id())\n ->where('parent_folder_id',$folder->id);\n\n $departmentFolders = DepartmentFolder::all()\n ->where('department_id' , Auth::user()->department->id);\n\n $files = FileSystem::all()\n ->where('user_id' , auth()->id())\n ->where('folder_id',$folder->id)\n ->where('isDepartmentFile',0);\n\n\n return view('FileSystem.index', [\n 'folders' => $folders,\n 'parent_id' => $folder->id,\n 'parent' => $folder,\n 'departmentFolders' => $departmentFolders,\n 'users' => $users,\n 'files' => $files\n ]);\n }",
"public function edit(Folder $folder)\n {\n\n }",
"function updateFolder() {\n if (isset($this->params['folder_id']) && $this->params['folder_id'] > 0) {\n $folderData = $this->getFolder($this->params['folder_id']);\n $data = array(\n 'permission_mode' => $this->params['permission_mode'],\n );\n $params = array(\n 'folder_id' => $this->params['folder_id'],\n );\n if ($this->params['permission_mode'] == 'inherited') {\n $this->databaseDeleteRecord(\n $this->tableFoldersPermissions,\n 'folder_id',\n $this->params['folder_id']\n );\n }\n if ($this->databaseUpdateRecord($this->tableFolders, $data, $params)) {\n $this->addMsg(MSG_INFO, $this->_gt('Folder updated.'));\n }\n if (isset($folderData[$this->lngSelect->currentLanguageId])) {\n $dataTrans = array(\n 'folder_name' => $this->params['folder_name'],\n );\n $paramsTrans = array(\n 'folder_id' => $this->params['folder_id'],\n 'lng_id' => $this->lngSelect->currentLanguageId,\n );\n if ($this->databaseUpdateRecord($this->tableFoldersTrans, $dataTrans, $paramsTrans)) {\n $this->addMsg(MSG_INFO, $this->_gt('Folder translation updated.'));\n }\n } else {\n $dataTrans = array(\n 'folder_id' => $this->params['folder_id'],\n 'lng_id' => $this->lngSelect->currentLanguageId,\n 'folder_name' => $this->params['folder_name'],\n );\n if ($this->databaseInsertRecord($this->tableFoldersTrans, NULL, $dataTrans)) {\n $this->addMsg(MSG_INFO, $this->_gt('Folder translation added.'));\n }\n }\n } else {\n $this->addMsg(MSG_INFO, $this->_gt('No folder selected.'));\n }\n }",
"public function getFolderId()\n {\n return $this->_FolderId;\n }",
"public function getFolderId()\n {\n return $this->folderId;\n }",
"function getFolder($id) { /* {{{ */\n\t\t$hits = $this->index->find('F'.$id);\n\t\treturn $hits['hits'] ? $hits['hits'][0] : false;\n\t}",
"public function saveFolder(Folder $folder): void\n {\n $acceptorsFolder = new Folder($this->userId);\n\n $acceptorsFolder->sync([\n 'id' => $folder->id,\n 'ownerId' => $folder->ownerId,\n 'isShared' => true,\n 'title' => $folder->title,\n 'dtCreate' => $folder->dtCreate,\n 'dtModify' => $folder->dtModify,\n 'isRemoved' => $folder->isRemoved,\n ]);\n }",
"protected function saveFolder($property) {\r\n\r\n\t\t$arrRes\t\t= array();\r\n\t\t$bool\t\t= false;\r\n\r\n\t\t$this->property['id']\t\t= isset($property['id']) ? intval($property['id']) : 0;\r\n\t\t$this->property['user_id']\t= isset($property['user_id']) ? intval($property['user_id']) : 0;\r\n\r\n\r\n\t\tif ($this->property['id'] && $this->property['user_id']) {\r\n\r\n\t\t\t// 保存 tag 映射\r\n\t\t\tif (isset($property['tags'])) {\r\n\r\n\t\t\t\t// data_tag\r\n\t\t\t\t$modelDataTag\t\t= new Model_Map_Base('Sofav_Data_Tag',\r\n\t\t\t\t\t\t\t\t\t$this->property['id'], 'user_id', 'id');\r\n\r\n\t\t\t\t$arrValidUserTagIds\t= $modelDataTag->getMatchedRecord($this->property['user_id'],\r\n\t\t\t\t\t\t\t\t\t$property['tags'], false);\r\n\r\n\t\t\t#\tDebug::pre($arrValidUserTagIds);\r\n\r\n\t\t\t\t// map_folder_tag\r\n\t\t\t\t$modelMapFolderTag\t\t\t= new Model_Map_Base('Sofav_Map_Folder_Tag',\r\n\t\t\t\t\t\t\t\t\t\t$this->property['id'], 'folder_id', 'tag_id');\r\n\t\t\t\t$arrRes['map_folder_tag']['res']\t= $modelMapFolderTag->update($arrValidUserTagIds, false);\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\t// 保存 item 映射\r\n\t\t\tif (isset($property['item_added']) && isset($property['item_removed'])) {\r\n\r\n\t\t\t\t$modelMapFolderItem\t\t\t= new Model_Map_Base('Sofav_Map_Folder_Item',\r\n\t\t\t\t\t\t\t\t\t\t$this->property['id'], 'folder_id', 'item_id');\r\n\t\t\t\t$arrRes['map_folder_item']['removed']\t= $modelMapFolderItem->remove($property['item_removed'], false);\r\n\t\t\t\t$arrRes['map_folder_item']['added']\t= $modelMapFolderItem->add($property['item_added'], false);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t#\tDebug::pre($arrRes);\r\n\r\n\t\treturn\t$arrRes;\r\n\t}",
"public function getFolder($folder)\n {\n $this->_init();\n return $this->_list->getFolder($folder);\n }",
"public function getIsFolder()\n {\n return $this->isFolder;\n }",
"protected function setFolder($folder)\n {\n if (is_integer($folder)) {\n $this->folderId = $folder;\n } elseif ($folder instanceof CommonFolderInterface) {\n $this->folderId = $folder->id;\n }\n }",
"public function show(Folder $folder)\n {\n $files = File::query()->where('folder_id', $folder->id)->get();\n $categories = Category::query()->where('status', 1)->get();\n $types = Type::query()->get();\n $languages = Language::query()->get();\n\n $title = null;\n $author = null;\n $category_selected = null;\n $type_selected = null;\n $document_number = null;\n $language_selected = null;\n\n return view('folders.show', [\n 'folder' => $folder,\n 'files' => $files,\n 'categories' => $categories,\n 'types' => $types,\n 'languages' => $languages,\n 'title' => $title,\n 'author' => $author,\n 'category_selected' => $category_selected,\n 'type_selected' => $type_selected,\n 'document_number' => $document_number,\n 'language_selected' => $language_selected\n ]);\n }",
"public function hasFolder($name) { }",
"function set_cache_folder($folder) {\n $this->_cache_folder = $folder; \n }",
"public function rechercherCreatedFolder() \n {\n $auth = AuthenticationManager::getInstance();\n $username = $auth->getMatricule();\n //sécurité\n $action = 'listCreatedFolder';\n $error = AccessControll::checkRight($action);\n if ( empty($error) ){ //ok\n $search = $this->request->getPostAttribute('search');\n $dossier = DossierManager::rechercherIdOrNameCreatedFolder($search, $username);\n $prez = DossierHtml::listCreatedFolderHtml($dossier);\n } else{ //pas ok\n $prez = HomeHtml::toHtml($error);\n }\n $this->response->setPart('contenu', $prez);\n }",
"public function getFolderPath(){}",
"public function selectFolder($folder) {\n $result = imap_reopen($this->imap, $this->mailbox . $folder);\n if ($result === true) {\n $this->folder = $folder;\n }\n return $result;\n }",
"function listFolder($sessionKey,$group_id,$item_id) {\n $params = array('id' => $item_id, 'report' => 'List');\n return _makeDocmanRequest($sessionKey, $group_id, 'show', $params);\n}",
"public function folder_info($folder) {\n\n /*\n * folder name could be too long to be used as cache key, so we hash it \n * to prevent \"Data too long for column 'cache_key'\" issues\n */\n $cache_key = \"FOLDER_\" . md5($folder);\n\n $folder_cached = $this->get_cache($cache_key);\n if (is_object($folder_cached)) {\n return $folder_cached;\n }\n\n $folderAttributes = $this->folder_attributes($folder);\n $folderRights = $this->_get_acl($folder);\n\n $options = array(\n 'is_root' => FALSE,\n 'name' => $folder,\n 'attributes' => $folderAttributes,\n 'namespace' => $this->folder_namespace($folder),\n 'special' => (in_array($folder, self::$folder_types) ? TRUE : FALSE),\n 'noselect' => (array_key_exists('no_select', $folderAttributes) ? $folderAttributes['no_select'] : FALSE),\n 'rights' => $folderRights,\n 'norename' => (in_array(self::ACL_DELETE_FLAG, $folderRights) ? FALSE : TRUE)\n );\n\n $this->update_cache($cache_key, $options);\n\n return $options;\n }",
"public function addFolder(string $folder): void\n {\n $this->folder($folder);\n }",
"public function edit(Folder $folder)\n {\n //\n }",
"public function edit(Folder $folder)\n {\n //\n }",
"private function manageFolderContent($folder, $bool)\n {\n $folder->setIsDeleted($bool);\n $files = $folder->getFiles();\n $children = $folder->getChildren();\n if (!is_null($files) && sizeof($files)>0) {\n foreach($files as $file) {\n $file->setIsDeleted($bool);\n }\n }\n if (!is_null($children) && sizeof($children)>0) {\n foreach($children as $child) {\n $child->setIsDeleted($bool);\n $this->manageFolderContent($child, $bool);\n }\n }\n }",
"public function addFolder($folder)\n {\n array_push($this->folders, rtrim($folder, \"/\"));\n }",
"function get_folder_by_id($folder_id) {\n\t\t// Obtain a connection\n\t\t$con = $this->connection->get_pdo_connection();\n\n\t\t// Prepare insert statement\n\t\t$sql = \"SELECT * FROM folders WHERE folder_id=:folder_id\";\n\t\t$statement = $con->prepare($sql);\n\n\t\t// Bind folder id\n\t\t$statement->bindValue(\"folder_id\", $folder_id, PDO::PARAM_INT);\n\n\t\t// Execute the statement\n\t\t$statement->execute();\n\n\t\t$results = array();\n\n\t\t// Check if row exists\n\t\tif ( $row = $statement->fetch(PDO::FETCH_ASSOC) ) {\n\t \t\t// Create folder object\n\t \t\t$folder = new Folder($row);\n\t \t\treturn $folder;\n\t \t}\n\n\t \treturn false;\n\t}",
"public function addFolder(BaseFolder $folder) {\n $this->folders[] = $folder;\n }",
"function folderGet($args)\n {\n if(!array_key_exists('id', $args))\n {\n throw new Exception('Parameter id is not defined', MIDAS_INVALID_PARAMETER);\n }\n $userDao = $this->_getUser($args);\n\n $id = $args['id'];\n $folder = $this->Folder->load($id);\n\n if($folder === false || !$this->Folder->policyCheck($folder, $userDao, MIDAS_POLICY_READ))\n {\n throw new Exception(\"This folder doesn't exist or you don't have the permissions.\", MIDAS_INVALID_POLICY);\n }\n\n return $folder->toArray();\n }",
"public function show(Folder $folder)\n {\n //\n return new FolderResource($folder);\n }",
"public function setFolder()\n\t{\n\t\t$fullPath = str_replace($this->get('localPath'), '', $this->get('fullPath'));\n\n\t\t// Folder metadata\n\t\t$this->set('type', 'folder');\n\t\t$this->set('name', basename($this->get('dirname')));\n\t\t$this->set('localPath', $this->get('dirname'));\n\n\t\t$this->set('fullPath', $fullPath . $this->get('localPath'));\n\n\t\t$dirname = dirname($this->get('dirname')) == '.'\n\t\t\t\t? null : dirname($this->get('dirname'));\n\t\t$this->set('dirname', $dirname);\n\t\t$this->setParents();\n\n\t\t$this->clear('ext');\n\t\t$this->setIcon('folder');\n\t}",
"public function testGetFoldersFromFolderId()\n {\n\n }",
"private function compareCacheFolders(){\n //$this->info('List of folders');\n $headers = ['Name', 'Parent', 'full_path', 'children'];\n $this->table($headers, $this->folders);\n\n foreach ($this->folders as $key => $value) {\n $this->info('Folder '.$value['name'].' found => '.$this->isFolderSaved($value));\n if(!$this->isFolderSaved($value)){\n //Create object on mysql table\n $folder = new Folder;\n $folder->name = str_replace(\"'\",\"\\'\",$value['name']);\n $folder->parent = str_replace(\"'\",\"\\'\",$value['parent']);\n $folder->full_path = str_replace(\"'\",\"\\'\",$value['full_path']);\n $folder->children = $value['children'];\n $folder->found = 1;\n\n // save the folder to the database\n $folder_db = $folder->save();\n\n $params = [\n 'index' => 'docsearch',\n 'type' => 'folders',\n 'id' => $folder->id,\n 'body' => $value\n ];\n //$this->info('Mysql ID for folder '.$value['name'].' -> '.$folder->id);\n $hosts = [$this->es_host];// IP + Port\n // Instantiate a new ClientBuilder\n $client = \\Elasticsearch\\ClientBuilder::create()\n ->setHosts($hosts) // Set the hosts\n ->build();\n $results = $client->index($params); //$client->search($params);\n //Log::info('ES Response', array('results'=> $results));\n //Log::info('############');\n }\n }\n }",
"public function folderInfo($folderPath)\n\t{\n\t\t$folderName = explode('/', $folderPath);\n\t\treturn [\n\t\t\t'origin' => $folderPath,\n\t\t\t'name' => end($folderName),\n\t\t\t'type' => 'folder',\n\t\t\t'url' => Storage::url($folderPath),\n \t\t];\n\t}",
"function readFolderXML(){\n\t\t\t// confirm it exists first!\n\t\t\tif (file_exists($_SERVER['DOCUMENT_ROOT'].\"/\".$this -> rootFolder.\"/folderList.xml\")){\n\t\t\t\t\n\t\t\t\t$xml = simplexml_load_file(\t$_SERVER['DOCUMENT_ROOT'].\"/\".$this -> rootFolder.\"/folderList.xml\");\n\t\t\t\tforeach($xml->children() as $child){\n\t\t\t\t\t\n\t\t\t\t\t$this -> folderMap[ (string) $child['id']] = (string) $child['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"function open_folder($json_path,$folder){\n\tif($folder == ''){\n\t\t$dir = $json_path;\n\t} else {\n\t\t$dir = $json_path.$folder.'/';\n\t}\n\tif(!file_exists($dir)){\n\t\treturn 'no exist';\n\t} else {\n\t\t$files = scandir($dir);\n\t\tarray_splice($files,0,2);\n\t\t$result = new stdClass();\n\t\tfor($i = 0; $i < count($files); $i++){\n\t\t\tif(is_dir($dir.$files[$i])){\n\t\t\t\t$subdir = scandir($dir.$files[$i]);\n\t\t\t\tarray_splice($subdir,0,2);\n\t\t\t\t$subdir_res = new stdClass();\n\t\t\t\tfor($j = 0; $j < count($subdir); $j++){\n\t\t\t\t\t$json = file_get_contents($dir.$files[$i].'/'.$subdir[$j]);\n\t\t\t\t\t$array_json = json_decode($json);\n\t\t\t\t\t$name = explode('.',$subdir[$j]);\n\t\t\t\t\t$subdir_res->$name[0] = $array_json;\n\t\t\t\t}\n\t\t\t\t$result->$files[$i] = $subdir_res;\n\t\t\t} else {\n\t\t\t\t$json = file_get_contents($dir.$files[$i]);\n\t\t\t\t$array_json = json_decode($json);\n\t\t\t\t$name = explode('.',$files[$i]);\n\t\t\t\t$result->$name[0] = $array_json;\n\t\t\t}\n\t\t}\n\t\treturn json_encode($result);\n\t}\n}",
"public function addFolder($folder) {\n $this->folders[$folder->getName()] = $folder;\n }",
"public function search_for_folder($folder, $base = '.', $loop = \\false)\n {\n }",
"public function mount(Folder $folder)\n {\n $this->folder = $folder;\n }",
"function deleteFolder();",
"public function getFolder()\n\t{\n\t\treturn $this->router->getFolder();\n\t}",
"function email_newfolder($folder, $parentfolder) {\n\n\t// Add actual time\n\t$folder->timecreated = time();\n\n\t// Make sure course field is not null\t\t\tThanks Ann.\n\tif ( ! isset( $folder->course) ) {\n\t\t$folder->course = 0;\n\t}\n\n\t// Insert record\n\tif (! $folder->id = insert_record('email_folder', $folder)) {\n\t\treturn false;\n\t}\n\n\t// Prepare subfolder\n\t$subfolder = new stdClass();\n\t$subfolder->folderparentid = $parentfolder;\n\t$subfolder->folderchildid = $folder->id;\n\n\t// Insert record reference\n\tif (! insert_record('email_subfolder', $subfolder)) {\n\t\treturn false;\n\t}\n\n\tadd_to_log($folder->userid, \"email\", \"add subfolder\", \"$folder->name\");\n\n\treturn true;\n}",
"function getFolder($name)\n{\n $fileManagerFolderMapper = systemToolkit::getInstance()->getMapper('fileManager', 'folder');\n $folder = $fileManagerFolderMapper->searchByPath($name);\n if (!$folder) {\n $folder = $fileManagerFolderMapper->create();\n $folder->setName($name);\n $folder->setTitle($name);\n $fileManagerFolderMapper->save($folder);\n }\n return $folder;\n}",
"public function folderInfo($folder = '/')\n {\n $folder = $this->cleanFolder($folder);\n $breadCrumbs = $this->breadcrumbs($folder);\n\n $files = [];\n $subFolders = $this->disk->directories($folder);\n foreach ($subFolders as $subFolder) {\n if ($this->isItemHidden($subFolder)) {\n continue;\n }\n $fileLists = $this->disk->files($subFolder);\n foreach ($fileLists as $file) {\n if (!$this->isItemHidden($file)) {\n $files[] = $this->fileDetails($folder . $file);\n }\n }\n }\n $fileLists = $this->disk->files($folder);\n foreach ($fileLists as $file) {\n if (!$this->isItemHidden($file)) {\n $files[] = $this->fileDetails($folder . $file);\n }\n }\n return compact('folder', 'breadCrumbs', 'subFolders', 'files', 'itemsCount');\n }",
"private function checkCacheFolder(){\n if (file_exists($this->folder_path)) {\n $this->cacheCreated = true;\n }else{\n $this->cacheCreated = false;\n }\n }",
"public function getRootLevelFolderObject();",
"public function getFolderPath()\n {\n return $this->_folderPath;\n }",
"public function update()\n\t{\n\t\t$container = AssetService::getContainer($this->request->get('container'), 'local', 'Assets');\n\t\t$folder = $container->folder($this->request->get('path'));\n\t\t$folder->editFolder($this->request->get('basename'));\n\n\t\treturn [\n\t\t\t'success'\t=>\ttrue,\n\t\t\t'message'\t=> 'Folder was successfully updated',\n\t\t\t'folder'\t=> $folder->toArray()\n\t\t];\n\n\t}",
"public function create_folder($folder, $subscribe = false) {\n\n if (strlen($folder) == 0) {\n // empty folder name!\n return FALSE;\n }\n\n // get parent folder (if any) to perform ACLs checks\n $exploded = explode($this->delimiter, $folder);\n if (is_array($exploded) && count($exploded) > 1) {\n\n // folder is not whithin root level, check parent grants\n $parentFolder = implode($this->delimiter, array_slice($exploded, 0, -1));\n\n // ACLs check ('create' grant required )\n $ACLs = $this->_get_acl($parentFolder);\n if (!is_array($ACLs) || !in_array(self::ACL_CREATE_FLAG, $ACLs)) {\n // Unauthorized!\n return FALSE;\n }\n }\n\n // start transaction\n if (!$this->dbmail->startTransaction()) {\n return FALSE;\n }\n\n // prepare query\n $mailboxSQL = \" INSERT INTO dbmail_mailboxes \"\n . \" (\"\n . \" owner_idnr, \"\n . \" name, \"\n . \" seen_flag, \"\n . \" answered_flag, \"\n . \" deleted_flag, \"\n . \" flagged_flag, \"\n . \" recent_flag, \"\n . \" draft_flag, \"\n . \" no_inferiors, \"\n . \" no_select, \"\n . \" permission, \"\n . \" seq\"\n . \" ) \"\n . \" VALUES \"\n . \" (\"\n . \" {$this->user_idnr}, \"\n . \" '{$this->dbmail->escape($folder)}', \"\n . \" 0, \"\n . \" 0, \"\n . \" 0, \"\n . \" 0, \"\n . \" 0, \"\n . \" 0, \"\n . \" 0, \"\n . \" 0, \"\n . \" 2, \"\n . \" 0 \"\n . \" ) \";\n\n // insert new folder record\n if (!$this->dbmail->query($mailboxSQL)) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // retreive last insert id\n $mailbox_idnr = $this->dbmail->insert_id('dbmail_mailboxes');\n\n // subscription management (if needed)\n if ($subscribe) {\n\n /*\n * Insert / Update dbmail_subscription entry\n */\n $subscriptionSQL = \"INSERT INTO dbmail_subscription \"\n . \"(user_id, mailbox_id) \"\n . \"VALUES \"\n . \"('{$this->dbmail->escape($this->user_idnr)}', '{$this->dbmail->escape($mailbox_idnr)}' ) \"\n . \"ON DUPLICATE KEY UPDATE \"\n . \"user_id = '{$this->dbmail->escape($this->user_idnr)}', \"\n . \"mailbox_id = '{$this->dbmail->escape($mailbox_idnr)}' \";\n\n if (!$this->dbmail->query($subscriptionSQL)) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n }\n\n // return status\n return ($this->dbmail->endTransaction() ? TRUE : FALSE);\n }",
"private static function folders_path(){\n\t\treturn dirname(__DIR__) . '/content/folders.json';\n\t}",
"public function get_folder_properties($folderid) {\n\n\t\t$arraytoreturn = Array();\n\n\t\tif ($folderid === null) {\n\n\t\t\t$response = $this->curl_get(skydrive_base_url.\"/me/skydrive?access_token=\".$this->access_token);\n\n\t\t} else {\n\n\t\t\t$response = $this->curl_get(skydrive_base_url.$folderid.\"?access_token=\".$this->access_token);\n\n\t\t}\n\n\t\t\n\n\t\tif (@array_key_exists('error', $response)) {\n\n\t\t\tthrow new Exception($response['error'].\" - \".$response['description']);\n\n\t\t\texit;\n\n\t\t} else {\t\t\t\n\n\t\t\t@$arraytoreturn = Array('id' => $response['id'], 'name' => $response['name'], 'parent_id' => $response['parent_id'], 'size' => $response['size'], 'source' => $response['source'], 'created_time' => $response['created_time'], 'updated_time' => $response['updated_time'], 'link' => $response['link'], 'upload_location' => $response['upload_location'], 'is_embeddable' => $response['is_embeddable'], 'count' => $response['count']);\n\n\t\t\treturn $arraytoreturn;\n\n\t\t}\n\n\t}",
"public function select(EmailFolder $folder, OroEntityManager $em);",
"public function show(Folder $folder)\n { \n if($this->authorize('viewOrCollab',$folder)) {\n $storage = session('storage');\n $chart_data = session('chart_data');\n return view('folders.show',compact('folder','storage','chart_data'));\n } \n }",
"public function getChunkFolder (){\n\t\treturn $this->chunkFolder;\n\t}",
"public function setFolder($folder): xml\n {\n self::$folder = $folder;\n return $this;\n }",
"public function set_mailbox($folder) {\n $this->set_folder($folder);\n }",
"public function createFolder()\r\n\t{\r\n //Check if we have all variables that we need\r\n $public_key = $this->input->post('parent_public_key');\r\n $folder_name = $this->input->post('folder_name');\r\n\t\t$user_id = $this->authentication->uid;\r\n\r\n //TODO !!!!! Validate the path here !!!!!\r\n if($folder_name == '' || $public_key == ''){\r\n\t\t\t$this->errorMessage('Please enter a folder name');\r\n redirect('/dashboard');\r\n }\r\n\r\n\t\t//Variable to check if the folder exists\r\n\t\t$folder_exists = false;\r\n\r\n\t\t//Make sure that the parent exists\r\n\t\tif($public_key == '0'){\r\n\t\t\t//We're in the main directory\r\n\t\t\t$parent_id = 0;\r\n\t\t\t$folder_exists = true;\r\n\t\t}\r\n\r\n\t\tif($this->DataModel->folderExists(array('public_key' => $public_key), $this->authentication->uid)){\r\n\t\t\t//We found the parent folder\r\n\t\t\t$folder_exists = true;\r\n\t\t\t$parent_id = $this->DataModel->getFolderInfo(array('public_key' => $public_key), $this->authentication->uid)['id'];\r\n\t\t}\r\n\r\n\t\t//Check if the folder is shared with the user\r\n\t\tif($this->DataModel->folderExists(array('public_key' => $public_key))){\r\n\t\t\t$folder = $this->DataModel->getFolderInfo(array('public_key' => $public_key));\r\n\t\t\tif($this->DataModel->hasSharedAccessFolder($public_key, $this->authentication->uid)){\r\n\t\t\t\tif($this->DataModel->sharedPermission == 1){\r\n\t\t\t\t\t$folder_exists = true;\r\n\t\t\t\t\t//Set the user id of the user who owns the shared folder\r\n\t\t\t\t\t$user_id = $folder['user_id'];\r\n\t\t\t\t\t$parent_id = $folder['id'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Final check if the folder exists\r\n\t\tif($folder_exists == false){\r\n\t\t\tredirect(\"/dashboard\");\r\n\t\t}\r\n\r\n\t\t//Check if the user is allowed to create new folders (limit)\r\n\t\t$stats = $this->usagestatistics->getUser($user_id);\r\n\t\tif($stats['usage']['foldercount'] < $stats['max']['foldercount'] || $stats['max']['foldercount'] == 0){\r\n\t\t\t//Create the folder\r\n\t $this->DataModel->createFolder($parent_id, $folder_name, $user_id);\r\n\t\t\t$this->successMessage($this->lang->line('success_folder_created'));\r\n\t\t}else{\r\n\t\t\t//The folder could not be created.\r\n\t\t\t$this->errorMessage($this->lang->line('error_folder_usageLimit'));\r\n\t\t}\r\n\r\n\t\t//Redirect the user to the dasbhoard if the parent folder was the \"main\" folder\r\n\t\tif($parent_id == 0){\r\n\t\t\tredirect('/dashboard');\r\n\t\t}\r\n\r\n\t\t//If the owner of the folder is the current user\r\n\t\tif($this->authentication->uid == $user_id){\r\n\t\t\tredirect('folders/'.$public_key);\r\n\t\t}else{\r\n\t\t\t//If it's a shared folder\r\n\t\t\tredirect('sharedFolder/'.$public_key);\r\n\t\t}\r\n\r\n\t}",
"public function setIsFolder($isFolder)\n {\n $this->isFolder = VT::toBool($isFolder);\n }",
"function folder_exist($folder){\n $path = realpath($folder);\n\n // If it exist, check if it's a directory\n return ($path !== false AND is_dir($path)) ? $path : false;\n }",
"public function edit(Folder $folder)\n {\n $storage = session('storage');\n $chart_data = session('chart_data');\n if(isset($storage) && isset($chart_data)) {\n return view('folders.edit',compact('folder','storage','chart_data'));\n } else {\n return redirect()->route('storages.index');\n }\n\n }",
"function getFolderPlaylist($dir)\r\n{\r\n\t$files = getFiles($dir);\r\n\t$playlist = formatJsPlaylist($files);\r\n\treturn $playlist;\r\n}",
"function folder_exist($folder)\n {\n $path = realpath($folder);\n\n // If it exist, check if it's a directory\n return ($path !== false AND is_dir($path)) ? $path : false;\n}",
"public function update(Request $request, Folder $folder)\n {\n $attributes = $request->validate([\n 'name' => ['required','string'],\n 'privacy' => ['required']\n ]);\n $folder->name = $attributes['name'];\n $folder->privacy = $attributes['privacy'];\n $folder->save();\n return \\redirect()->route('folders.index')->with('success','Folder created successfully.');\n }",
"function get_folder_view_tree($folder_id, $include_pages, $include_files, $excluded_page_id)\r\n{\r\n $output = '';\r\n\r\n // If this folder is not archived, then continue to get folder contents.\r\n if (db_value(\"SELECT folder_archived FROM folder WHERE folder_id = '$folder_id'\") == 0) {\r\n // Get folders in this folder.\r\n $folders = db_items(\r\n \"SELECT\r\n folder_id AS id,\r\n folder_name AS name\r\n FROM folder\r\n WHERE folder_parent = '$folder_id'\r\n ORDER BY\r\n folder_order ASC,\r\n folder_name ASC\");\r\n\r\n // Loop through folders in order to get their contents.\r\n foreach ($folders as $folder) {\r\n $folder_output = get_folder_view_tree($folder['id'], $include_pages, $include_files, $current_page_id);\r\n\r\n // If this folder has content to display, then output folder name and contents.\r\n // We output a folder even if a visitor does not have view access to it, assuming it has content,\r\n // because the visitor has view access to something inside of it and we need to preserve\r\n // the heirarchy/indentation.\r\n if ($folder_output != '') {\r\n $output .=\r\n '<li class=\"folder ' . get_access_control_type($folder['id']) . '\">\r\n <div class=\"name\">' . h($folder['name']) . '</div>\r\n ' . $folder_output . '\r\n </li>';\r\n }\r\n }\r\n\r\n // If the visitor has view access to this folder, then continue to get pages and files.\r\n if (check_view_access($folder_id, $always_grant_access_for_registration_and_guest = true) == true) {\r\n // If pages are selected to be included, then get them.\r\n if ($include_pages == 1) {\r\n $pages = db_items(\r\n \"SELECT\r\n page_id AS id,\r\n page_name AS name,\r\n page_title AS title,\r\n page_meta_description AS meta_description\r\n FROM page\r\n WHERE\r\n (page_folder = '$folder_id')\r\n AND (page_search = '1')\r\n AND (page_type != 'registration confirmation')\r\n AND (page_type != 'membership confirmation')\r\n AND (page_type != 'view order')\r\n AND (page_type != 'custom form confirmation')\r\n AND (page_type != 'form item view')\r\n AND (page_type != 'calendar event view')\r\n AND (page_type != 'catalog detail')\r\n AND (page_type != 'shipping address and arrival')\r\n AND (page_type != 'shipping method')\r\n AND (page_type != 'billing information')\r\n AND (page_type != 'order preview')\r\n AND (page_type != 'order receipt')\r\n AND (page_type != 'affiliate sign up confirmation')\r\n AND (page_type != 'affiliate welcome')\r\n ORDER BY name ASC\");\r\n\r\n // Loop through pages in order to output them.\r\n foreach ($pages as $page) {\r\n // If this is not the excluded page, then output it.\r\n if ($page['id'] != $excluded_page_id) {\r\n // If there is a title, then prepare link with title.\r\n if ($page['title'] != '') {\r\n $output_name = '<div class=\"name\"><a href=\"' . OUTPUT_PATH . h(encode_url_path($page['name'])) . '\">' . h($page['title']) . '</a></div>';\r\n \r\n // Otherwise there is not a title, so prepare link with page name.\r\n } else {\r\n $output_name = '<div class=\"name\"><a href=\"' . OUTPUT_PATH . h(encode_url_path($page['name'])) . '\">' . h($page['name']) . '</a></div>';\r\n }\r\n\r\n $output_description = '';\r\n \r\n // If there is a meta description for this page, then output it.\r\n if ($page['meta_description'] != '') {\r\n $output_description = '<div class=\"description\">' . h($page['meta_description']) . '</div>';\r\n }\r\n\r\n $output .=\r\n '<li class=\"page\">\r\n ' . $output_name . '\r\n ' . $output_description . '\r\n </li>';\r\n }\r\n }\r\n }\r\n\r\n // If files are selected to be included, then get them.\r\n if ($include_files == 1) {\r\n $files = db_items(\r\n \"SELECT\r\n name,\r\n description,\r\n design\r\n FROM files\r\n WHERE folder = '$folder_id'\r\n ORDER BY name ASC\");\r\n\r\n // Loop through files in order to output them.\r\n foreach ($files as $file) {\r\n $output_design_class = '';\r\n\r\n // If this file is a design file, then output design class.\r\n if ($file['design'] == 1) {\r\n $output_design_class = ' design';\r\n }\r\n\r\n $output_description = '';\r\n \r\n // If there is a description for this file, then output it.\r\n if ($file['description'] != '') {\r\n $output_description = '<div class=\"description\">' . h($file['description']) . '</div>';\r\n }\r\n\r\n $output .=\r\n '<li class=\"file' . $output_design_class . '\">\r\n <div class=\"name\"><a href=\"' . OUTPUT_PATH . h(encode_url_path($file['name'])) . '\">' . h($file['name']) . '</a></div>\r\n ' . $output_description . '\r\n </li>';\r\n }\r\n }\r\n }\r\n\r\n // If content was found for this folder, then wrap content in ul tags.\r\n if ($output != '') {\r\n $output = '<ul>' . $output . '</ul>';\r\n }\r\n }\r\n\r\n return $output;\r\n}",
"public function getMediaFolder($id){\n return MediaFolder::find($id);\n\t\t\n }",
"private function __countFilesInFolder($folder) {\n\t\t$iter = new FilesystemIterator($folder, FilesystemIterator::SKIP_DOTS);\n\t\treturn iterator_count($iter);\n\t}",
"public function ajax_get_folder_contents() {\n\n\t\t$path = '#' === rgget( 'path' ) ? '/' : rgget( 'path' );\n\n\t\techo wp_json_encode( $this->get_folder_tree( $path, rgget( 'first_load' ) ) );\n\t\tdie();\n\n\t}",
"function createFolder($folder_name, $parent_id){\n $url = $this->url.\"files\";\n $post['data'] = array(\n 'attributes' => array( \n \"name\" => $folder_name,\n \"parent_id\" => $parent_id,\n ),\n \"type\" => \"files\" \n );\n $post = json_encode($post);\n $result = $this->post_to_zoho($url, $post);\n return $result;\n }",
"public static function is_user_folder($user_id){\n\n\t}",
"public function setRootFolder( string $folder ): IVfsHandler;",
"public function folder_namespace($folder) {\n\n if ($folder == 'INBOX') {\n return 'personal';\n }\n\n foreach ($this->namespace as $type => $namespace) {\n if (is_array($namespace)) {\n foreach ($namespace as $ns) {\n if ($len = strlen($ns[0])) {\n if (($len > 1 && $folder == substr($ns[0], 0, -1)) || strpos($folder, $ns[0]) === 0\n ) {\n return $type;\n }\n }\n }\n }\n }\n\n return 'personal';\n }",
"private function mustCreateFolder(){\n }",
"public static function create_all_folder($a_folder){\n\n\t\t$request = self::_get_connection()->select(\"SELECT ID from `apine_images` where folder=$a_folder ORDER BY `ID`\");\n\t\t$liste = new Liste();\n\t\tif($request != null && count($request) > 0){\n\t\t\tforeach($request as $item){\n\t\t\t\t$liste->add_item(new ApineImage($item['ID']));\n\t\t\t}\n\t\t}\n\t\treturn $liste;\n\t\n\t}",
"function addSubfolder(Folder $newSubfolder)\r\n\t{\r\n\t\tif( substr_count( $newSubfolder->getPath( ), $this->getPath( ) ) > 0 )\r\n\t\t{\r\n\t\t\t$this->subfoldersCollection->add( $newSubfolder );\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttrigger_error( \"pasta não existente! não foi possível adicionar\" );\r\n\t\t}\r\n\t}",
"function email_get_parent_folder($folder) {\n\n\tif (! $folder ) {\n\t\treturn false;\n\t}\n\n\tif ( is_int($folder) ) {\n\t\tif ( ! $subfolder = get_record('email_subfolder', 'folderchildid', $folder) ) {\n\t return false;\n\t }\n\t} else {\n\t\tif ( ! $subfolder = get_record('email_subfolder', 'folderchildid', $folder->id) ) {\n \treturn false;\n\t\t}\n }\n\n return get_record('email_folder', 'id', $subfolder->folderparentid);\n\n}",
"public function delete_folder($folder) {\n\n // mailbox esists?\n $mailbox_idnr = $this->get_mail_box_id($folder);\n if (!$mailbox_idnr) {\n // mailbox not found\n return FALSE;\n }\n\n // ACLs check ('delete' grant required )\n $ACLs = $this->_get_acl(NULL, $mailbox_idnr);\n if (!is_array($ACLs) || !in_array(self::ACL_DELETE_FLAG, $ACLs)) {\n // Unauthorized!\n return FALSE;\n }\n\n // init folders container\n $folders_list = array(\n $mailbox_idnr => $folder\n );\n\n // get mailbox sub folders\n $sub_folders_list = $this->get_sub_folders($folder);\n\n // merge sub folders with target folder\n if (is_array($sub_folders_list)) {\n\n // loop sub folders\n foreach ($sub_folders_list as $sub_folder_idnr => $sub_folder_name) {\n\n // ACLs check ('delete' grant required )\n $ACLs = $this->_get_acl(NULL, $sub_folder_idnr);\n\n if (!is_array($ACLs) || !in_array(self::ACL_DELETE_FLAG, $ACLs)) {\n // Unauthorized!\n return FALSE;\n }\n\n // add sub folder to folders list\n $folders_list[$sub_folder_idnr] = $sub_folder_name;\n }\n }\n\n // start transaction\n if (!$this->dbmail->startTransaction()) {\n return FALSE;\n }\n\n // delete folders \n foreach ($folders_list as $folder_idnr => $folder_name) {\n\n // delete messages\n if (!$this->clear_folder($folder_name)) {\n // rollbalk transaction\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // delete folder\n $query = \"DELETE FROM dbmail_mailboxes \"\n . \" WHERE mailbox_idnr = {$this->dbmail->escape($folder_idnr)} \";\n\n if (!$this->dbmail->query($query)) {\n // rollbalk transaction\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // unset temporary stored mailbox_id (if present)\n if (!$this->unset_temp_value(\"MBOX_ID_{$folder_name}_{$this->user_idnr}\")) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n }\n\n return ($this->dbmail->endTransaction() ? TRUE : FALSE);\n }",
"public function &getFolders($folder)\n\t{\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$breakflag_before_process = $registry->get('volatile.breakflag', false);\n\n\t\t// Reset break flag before continuing\n\t\t$breakflag = false;\n\n\t\t// Initialize variables\n\t\t$arr = array();\n\t\t$false = false;\n\n\t\tif(!is_dir($folder) && !is_dir($folder.'/')) return $false;\n\n\t\t$counter = 0;\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$maxCounter = $registry->get('engine.scan.smart.large_dir_threshold',100);\n\n\t\t$allowBreakflag = ($registry->get('volatile.operation_counter', 0) != 0) && !$breakflag_before_process;\n\n\t\t$handle = @opendir($folder);\n\t\t/* If opening the directory doesn't work, try adding a trailing slash. This is useful in cases\n\t\t * like this: open_basedir=/home/user/www/ and the root is /home/user/www. Trying to scan\n\t\t * /home/user/www results in error, trying to scan /home/user/www/ succeeds. Duh!\n\t\t */\n\t\tif ($handle === FALSE) {\n\t\t\t$handle = @opendir($folder.'/');\n\t\t}\n\t\t// If directory is not accessible, just return FALSE\n\t\tif ($handle === FALSE) {\n\t\t\t$this->setWarning('Unreadable directory '.$folder);\n\t\t\treturn $false;\n\t\t}\n\n\t\twhile ( (($file = @readdir($handle)) !== false) && (!$breakflag) )\n\t\t{\n\t\t\tif (($file != '.') && ($file != '..'))\n\t\t\t{\n\t\t\t\t// # Fix 2.4: Do not add DS if we are on the site's root and it's an empty string\n\t\t\t\t$ds = ($folder == '') || ($folder == '/') || (@substr($folder, -1) == '/') || (@substr($folder, -1) == DIRECTORY_SEPARATOR) ? '' : DIRECTORY_SEPARATOR;\n\t\t\t\t$dir = $folder . $ds . $file;\n\t\t\t\t$isDir = is_dir($dir);\n\t\t\t\tif ($isDir) {\n\t\t\t\t\t$data = _AKEEBA_IS_WINDOWS ? AEUtilFilesystem::TranslateWinPath($dir) : $dir;\n\t\t\t\t\tif($data) $arr[] = $data;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$counter++;\n\t\t\tif($counter >= $maxCounter) $breakflag = $allowBreakflag;\n\t\t}\n\t\t@closedir($handle);\n\n\t\t// Save break flag status\n\t\t$registry->set('volatile.breakflag', $breakflag);\n\n\t\treturn $arr;\n\t}",
"private function createFolderIndex(){\n //Just testing the command\n //$this->info('Starting to search the folder: '.$this->file_storage);\n $this->folders = array();\n $this->invalid_files = array();\n $this->count = 0;\n\n //Tagging all files to be able to find removed files at the end\n $SQL = \"UPDATE files SET found = '0'\";\n DB::connection('mysql')->update($SQL);\n $SQL = \"UPDATE folders SET found = '0'\";\n DB::connection('mysql')->update($SQL);\n\n //Checking if cache file exist, if not just create all the index on ES\n $this->checkCacheFolder();\n //Loop through the directories to get files ad folders\n $this->listFolderFiles($this->file_storage);//$_ENV['EBT_FILE_STORAGE']);\n //Check if any folder is missing from cache and try to create on ES\n $this->compareCacheFolders();\n\n //Remove files/folders that hasn't been found\n //if ($this->confirm('Do you wish to remove missing files? [y|N]')) {\n $this->removeMissingFiles();\n //}\n }",
"public function setFolder($value)\n {\n return $this->set('Folder', $value);\n }",
"public static function userHasFolderReadAccess($user, $folder, $arguments = null)\n {\n $rootFolder = $arguments['folderRoot'] ? $arguments['folderRoot'] : null;\n if (!$folder instanceof \\Ameos\\AmeosFilemanager\\Domain\\Model\\Folder || !$folder->isChildOf($rootFolder)){\n return false;\n }\n // Hooks to forbid read permission to a file if necessary\n $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][AccessUtility::class]['userHasFolderReadAccess'] = array_merge( // retro-compatibility\n (array)$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][AccessUtility::class]['userHasFolderReadAccess'],\n (array)$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['Tx_AmeosFilemanager_Tools_Tools']['userHasFolderReadAccess']\n );\n if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][AccessUtility::class]['userHasFolderReadAccess'])) {\n foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][AccessUtility::class]['userHasFolderReadAccess'] as $classData) {\n $hookObject = GeneralUtility::getUserObj($classData);\n if(method_exists($hookObject, 'userHasNotFolderReadAccess') && $hookObject->userHasNotFolderReadAccess($user, folder, $arguments)) {\n return false;\n }\n }\n }\n if($folder->getNoReadAccess() && // read only for owner\n (\n !isset($user['uid']) // no user authenficated\n || !is_object($folder->getFeUser()) // no owner\n || $folder->getFeUser()->getUid() != $user['uid'] // user is not the owner\n )\n ) {\n return false;\n }\n if($user && $user['uid'] > 0\n && $folder->getOwnerHasReadAccess()\n && is_object($folder->getFeUser())\n && $folder->getFeUser()->getUid() == $user['uid']\n ) {\n return true;\n }\n $folderRepository = GeneralUtility::makeInstance(\\Ameos\\AmeosFilemanager\\Domain\\Repository\\FolderRepository::class);\n if ($exist = $folderRepository->findByUid($folder->getUid())) {\n return true;\n }\n return false;\n }",
"function getSubfolders() ;",
"public function folder_size($folder) {\n\n $mailbox_idnr = $this->get_mail_box_id($folder);\n\n $query = \" SELECT SUM(dbmail_physmessage.messagesize) as folder_size \"\n . \" FROM dbmail_messages \"\n . \" INNER JOIN dbmail_physmessage on dbmail_messages.physmessage_id = dbmail_physmessage.id \"\n . \" WHERE dbmail_messages.mailbox_idnr = {$this->dbmail->escape($mailbox_idnr)} \"\n . \" AND dbmail_messages.deleted_flag = 0 \";\n\n $res = $this->dbmail->query($query);\n $row = $this->dbmail->fetch_assoc($res);\n\n return (is_array($row) && array_key_exists('folder_size', $row) ? $row['folder_size'] : 0);\n }"
] | [
"0.7837446",
"0.7499997",
"0.7340194",
"0.72807676",
"0.7261641",
"0.7247935",
"0.7224383",
"0.72073805",
"0.7102556",
"0.7040515",
"0.693084",
"0.68993604",
"0.6889393",
"0.68673515",
"0.6845534",
"0.67534584",
"0.6737748",
"0.67144734",
"0.6713727",
"0.67104447",
"0.67098427",
"0.655749",
"0.6524282",
"0.65196806",
"0.6420335",
"0.64148736",
"0.6412871",
"0.63944745",
"0.63933253",
"0.6384404",
"0.6376392",
"0.6349762",
"0.6290084",
"0.62676316",
"0.62554735",
"0.625031",
"0.6226242",
"0.6219887",
"0.61887956",
"0.61885107",
"0.61824757",
"0.617824",
"0.617824",
"0.61756426",
"0.6172822",
"0.6169122",
"0.61654",
"0.6151491",
"0.6143647",
"0.61429954",
"0.61354303",
"0.61301345",
"0.6122519",
"0.61061734",
"0.60955477",
"0.60947734",
"0.60943425",
"0.6092243",
"0.60918814",
"0.6080905",
"0.60808617",
"0.6073188",
"0.60719115",
"0.60700333",
"0.6023817",
"0.60149366",
"0.6006262",
"0.59989387",
"0.5997429",
"0.5965528",
"0.5961468",
"0.5937861",
"0.59344137",
"0.5924222",
"0.59148234",
"0.5911587",
"0.59047145",
"0.5904264",
"0.59037375",
"0.5897468",
"0.5889663",
"0.5886299",
"0.58837616",
"0.5882134",
"0.5870456",
"0.5869107",
"0.5867908",
"0.5866498",
"0.5851185",
"0.5849543",
"0.5844696",
"0.5837665",
"0.58376205",
"0.5830234",
"0.5827032",
"0.5824883",
"0.58162785",
"0.5812357",
"0.5811339",
"0.58069074",
"0.5803513"
] | 0.0 | -1 |
$folder is a Folder object | public function hasFolder($folder) {
$ret = array_key_exists($folder->getName(), $this->folders);
return $ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function folder($folder)\n {\n // @todo\n }",
"public function getFolder();",
"public function find_folder($folder)\n {\n }",
"public function getFolderInfo() {}",
"public function folder()\n {\n return Folder::find($this->folder_id);\n }",
"public function getFolder()\n {\n return $this->_folder;\n }",
"public function get_folder() {\n return $this->folder;\n }",
"public function folder()\n {\n return $this->Folder;\n }",
"public function folder_data($folder) {\n // TO DO!!!!!!\n }",
"public function show(Folder $folder)\n {\n\n }",
"public function setFolder($folder)\n\t{\n\t\t$this->folder = $folder;\n\t}",
"public function setFolder($folder)\n {\n $this->folder = $folder;\n }",
"public function folder()\n {\n return $this->belongsTo(File::class, 'folder_id', 'id');\n }",
"public function folder() {\n return $this->belongsTo('App\\Models\\Folder');\n }",
"public function isFolder();",
"public function getProcessedFilesFolderObject();",
"public function set_folder($folder) {\n if ($this->folder === $folder) {\n return;\n }\n\n $this->folder = $folder;\n }",
"function loadFolderData() {\n if (isset($this->params['folder_id'])) {\n $folder = $this->getFolder($this->params['folder_id']);\n if (isset($folder[$this->lngSelect->currentLanguageId])) {\n $this->currentFolder = $folder[$this->lngSelect->currentLanguageId];\n } else {\n $this->currentFolder = current($folder);\n }\n }\n }",
"public function folder($folder)\n {\n return $this->mailbox($folder);\n }",
"public function show(Folder $folder)\n {\n //\n }",
"function email_get_folder($folderid) {\n\n\t$folder = new object();\n\n\tif ( $folder = get_record('email_folder', 'id', $folderid) ) {\n\n\t\tif ( isset($folder->isparenttype) ) {\n\t\t\t// Only change in parent folders\n\t\t\tif ( ! is_null($folder->isparenttype) ) {\n\t\t\t\t// If is parent ... return language name\n\t\t\t\tif ( ( email_isfolder_type($folder, EMAIL_INBOX) ) ) {\n\t\t\t\t\t$folder->name = get_string('inbox', 'block_email_list');\n\t\t\t\t}\n\n\t\t\t\tif ( ( email_isfolder_type($folder, EMAIL_SENDBOX) ) ) {\n\t\t\t\t\t$folder->name = get_string('sendbox', 'block_email_list');\n\t\t\t\t}\n\n\t\t\t\tif ( ( email_isfolder_type($folder, EMAIL_TRASH) ) ) {\n\t\t\t\t\t$folder->name = get_string('trash', 'block_email_list');\n\t\t\t\t}\n\n\t\t\t\tif ( ( email_isfolder_type($folder, EMAIL_DRAFT) ) ) {\n\t\t\t\t\t$folder->name = get_string('draft', 'block_email_list');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $folder;\n}",
"public function index(Folder $folder)\n {\n\n $users = User::all()\n ->where('id','<>' , auth()->id());\n\n\n $folders = Folder::all()\n ->where('user_id' , auth()->id())\n ->where('parent_folder_id',$folder->id);\n\n $departmentFolders = DepartmentFolder::all()\n ->where('department_id' , Auth::user()->department->id);\n\n $files = FileSystem::all()\n ->where('user_id' , auth()->id())\n ->where('folder_id',$folder->id)\n ->where('isDepartmentFile',0);\n\n\n return view('FileSystem.index', [\n 'folders' => $folders,\n 'parent_id' => $folder->id,\n 'parent' => $folder,\n 'departmentFolders' => $departmentFolders,\n 'users' => $users,\n 'files' => $files\n ]);\n }",
"public function edit(Folder $folder)\n {\n\n }",
"function updateFolder() {\n if (isset($this->params['folder_id']) && $this->params['folder_id'] > 0) {\n $folderData = $this->getFolder($this->params['folder_id']);\n $data = array(\n 'permission_mode' => $this->params['permission_mode'],\n );\n $params = array(\n 'folder_id' => $this->params['folder_id'],\n );\n if ($this->params['permission_mode'] == 'inherited') {\n $this->databaseDeleteRecord(\n $this->tableFoldersPermissions,\n 'folder_id',\n $this->params['folder_id']\n );\n }\n if ($this->databaseUpdateRecord($this->tableFolders, $data, $params)) {\n $this->addMsg(MSG_INFO, $this->_gt('Folder updated.'));\n }\n if (isset($folderData[$this->lngSelect->currentLanguageId])) {\n $dataTrans = array(\n 'folder_name' => $this->params['folder_name'],\n );\n $paramsTrans = array(\n 'folder_id' => $this->params['folder_id'],\n 'lng_id' => $this->lngSelect->currentLanguageId,\n );\n if ($this->databaseUpdateRecord($this->tableFoldersTrans, $dataTrans, $paramsTrans)) {\n $this->addMsg(MSG_INFO, $this->_gt('Folder translation updated.'));\n }\n } else {\n $dataTrans = array(\n 'folder_id' => $this->params['folder_id'],\n 'lng_id' => $this->lngSelect->currentLanguageId,\n 'folder_name' => $this->params['folder_name'],\n );\n if ($this->databaseInsertRecord($this->tableFoldersTrans, NULL, $dataTrans)) {\n $this->addMsg(MSG_INFO, $this->_gt('Folder translation added.'));\n }\n }\n } else {\n $this->addMsg(MSG_INFO, $this->_gt('No folder selected.'));\n }\n }",
"public function getFolderId()\n {\n return $this->_FolderId;\n }",
"public function getFolderId()\n {\n return $this->folderId;\n }",
"function getFolder($id) { /* {{{ */\n\t\t$hits = $this->index->find('F'.$id);\n\t\treturn $hits['hits'] ? $hits['hits'][0] : false;\n\t}",
"public function saveFolder(Folder $folder): void\n {\n $acceptorsFolder = new Folder($this->userId);\n\n $acceptorsFolder->sync([\n 'id' => $folder->id,\n 'ownerId' => $folder->ownerId,\n 'isShared' => true,\n 'title' => $folder->title,\n 'dtCreate' => $folder->dtCreate,\n 'dtModify' => $folder->dtModify,\n 'isRemoved' => $folder->isRemoved,\n ]);\n }",
"protected function saveFolder($property) {\r\n\r\n\t\t$arrRes\t\t= array();\r\n\t\t$bool\t\t= false;\r\n\r\n\t\t$this->property['id']\t\t= isset($property['id']) ? intval($property['id']) : 0;\r\n\t\t$this->property['user_id']\t= isset($property['user_id']) ? intval($property['user_id']) : 0;\r\n\r\n\r\n\t\tif ($this->property['id'] && $this->property['user_id']) {\r\n\r\n\t\t\t// 保存 tag 映射\r\n\t\t\tif (isset($property['tags'])) {\r\n\r\n\t\t\t\t// data_tag\r\n\t\t\t\t$modelDataTag\t\t= new Model_Map_Base('Sofav_Data_Tag',\r\n\t\t\t\t\t\t\t\t\t$this->property['id'], 'user_id', 'id');\r\n\r\n\t\t\t\t$arrValidUserTagIds\t= $modelDataTag->getMatchedRecord($this->property['user_id'],\r\n\t\t\t\t\t\t\t\t\t$property['tags'], false);\r\n\r\n\t\t\t#\tDebug::pre($arrValidUserTagIds);\r\n\r\n\t\t\t\t// map_folder_tag\r\n\t\t\t\t$modelMapFolderTag\t\t\t= new Model_Map_Base('Sofav_Map_Folder_Tag',\r\n\t\t\t\t\t\t\t\t\t\t$this->property['id'], 'folder_id', 'tag_id');\r\n\t\t\t\t$arrRes['map_folder_tag']['res']\t= $modelMapFolderTag->update($arrValidUserTagIds, false);\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\t// 保存 item 映射\r\n\t\t\tif (isset($property['item_added']) && isset($property['item_removed'])) {\r\n\r\n\t\t\t\t$modelMapFolderItem\t\t\t= new Model_Map_Base('Sofav_Map_Folder_Item',\r\n\t\t\t\t\t\t\t\t\t\t$this->property['id'], 'folder_id', 'item_id');\r\n\t\t\t\t$arrRes['map_folder_item']['removed']\t= $modelMapFolderItem->remove($property['item_removed'], false);\r\n\t\t\t\t$arrRes['map_folder_item']['added']\t= $modelMapFolderItem->add($property['item_added'], false);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t#\tDebug::pre($arrRes);\r\n\r\n\t\treturn\t$arrRes;\r\n\t}",
"public function getFolder($folder)\n {\n $this->_init();\n return $this->_list->getFolder($folder);\n }",
"public function getIsFolder()\n {\n return $this->isFolder;\n }",
"protected function setFolder($folder)\n {\n if (is_integer($folder)) {\n $this->folderId = $folder;\n } elseif ($folder instanceof CommonFolderInterface) {\n $this->folderId = $folder->id;\n }\n }",
"public function show(Folder $folder)\n {\n $files = File::query()->where('folder_id', $folder->id)->get();\n $categories = Category::query()->where('status', 1)->get();\n $types = Type::query()->get();\n $languages = Language::query()->get();\n\n $title = null;\n $author = null;\n $category_selected = null;\n $type_selected = null;\n $document_number = null;\n $language_selected = null;\n\n return view('folders.show', [\n 'folder' => $folder,\n 'files' => $files,\n 'categories' => $categories,\n 'types' => $types,\n 'languages' => $languages,\n 'title' => $title,\n 'author' => $author,\n 'category_selected' => $category_selected,\n 'type_selected' => $type_selected,\n 'document_number' => $document_number,\n 'language_selected' => $language_selected\n ]);\n }",
"public function hasFolder($name) { }",
"function set_cache_folder($folder) {\n $this->_cache_folder = $folder; \n }",
"public function rechercherCreatedFolder() \n {\n $auth = AuthenticationManager::getInstance();\n $username = $auth->getMatricule();\n //sécurité\n $action = 'listCreatedFolder';\n $error = AccessControll::checkRight($action);\n if ( empty($error) ){ //ok\n $search = $this->request->getPostAttribute('search');\n $dossier = DossierManager::rechercherIdOrNameCreatedFolder($search, $username);\n $prez = DossierHtml::listCreatedFolderHtml($dossier);\n } else{ //pas ok\n $prez = HomeHtml::toHtml($error);\n }\n $this->response->setPart('contenu', $prez);\n }",
"public function getFolderPath(){}",
"public function selectFolder($folder) {\n $result = imap_reopen($this->imap, $this->mailbox . $folder);\n if ($result === true) {\n $this->folder = $folder;\n }\n return $result;\n }",
"function listFolder($sessionKey,$group_id,$item_id) {\n $params = array('id' => $item_id, 'report' => 'List');\n return _makeDocmanRequest($sessionKey, $group_id, 'show', $params);\n}",
"public function folder_info($folder) {\n\n /*\n * folder name could be too long to be used as cache key, so we hash it \n * to prevent \"Data too long for column 'cache_key'\" issues\n */\n $cache_key = \"FOLDER_\" . md5($folder);\n\n $folder_cached = $this->get_cache($cache_key);\n if (is_object($folder_cached)) {\n return $folder_cached;\n }\n\n $folderAttributes = $this->folder_attributes($folder);\n $folderRights = $this->_get_acl($folder);\n\n $options = array(\n 'is_root' => FALSE,\n 'name' => $folder,\n 'attributes' => $folderAttributes,\n 'namespace' => $this->folder_namespace($folder),\n 'special' => (in_array($folder, self::$folder_types) ? TRUE : FALSE),\n 'noselect' => (array_key_exists('no_select', $folderAttributes) ? $folderAttributes['no_select'] : FALSE),\n 'rights' => $folderRights,\n 'norename' => (in_array(self::ACL_DELETE_FLAG, $folderRights) ? FALSE : TRUE)\n );\n\n $this->update_cache($cache_key, $options);\n\n return $options;\n }",
"public function addFolder(string $folder): void\n {\n $this->folder($folder);\n }",
"public function edit(Folder $folder)\n {\n //\n }",
"public function edit(Folder $folder)\n {\n //\n }",
"private function manageFolderContent($folder, $bool)\n {\n $folder->setIsDeleted($bool);\n $files = $folder->getFiles();\n $children = $folder->getChildren();\n if (!is_null($files) && sizeof($files)>0) {\n foreach($files as $file) {\n $file->setIsDeleted($bool);\n }\n }\n if (!is_null($children) && sizeof($children)>0) {\n foreach($children as $child) {\n $child->setIsDeleted($bool);\n $this->manageFolderContent($child, $bool);\n }\n }\n }",
"public function addFolder($folder)\n {\n array_push($this->folders, rtrim($folder, \"/\"));\n }",
"function get_folder_by_id($folder_id) {\n\t\t// Obtain a connection\n\t\t$con = $this->connection->get_pdo_connection();\n\n\t\t// Prepare insert statement\n\t\t$sql = \"SELECT * FROM folders WHERE folder_id=:folder_id\";\n\t\t$statement = $con->prepare($sql);\n\n\t\t// Bind folder id\n\t\t$statement->bindValue(\"folder_id\", $folder_id, PDO::PARAM_INT);\n\n\t\t// Execute the statement\n\t\t$statement->execute();\n\n\t\t$results = array();\n\n\t\t// Check if row exists\n\t\tif ( $row = $statement->fetch(PDO::FETCH_ASSOC) ) {\n\t \t\t// Create folder object\n\t \t\t$folder = new Folder($row);\n\t \t\treturn $folder;\n\t \t}\n\n\t \treturn false;\n\t}",
"public function addFolder(BaseFolder $folder) {\n $this->folders[] = $folder;\n }",
"function folderGet($args)\n {\n if(!array_key_exists('id', $args))\n {\n throw new Exception('Parameter id is not defined', MIDAS_INVALID_PARAMETER);\n }\n $userDao = $this->_getUser($args);\n\n $id = $args['id'];\n $folder = $this->Folder->load($id);\n\n if($folder === false || !$this->Folder->policyCheck($folder, $userDao, MIDAS_POLICY_READ))\n {\n throw new Exception(\"This folder doesn't exist or you don't have the permissions.\", MIDAS_INVALID_POLICY);\n }\n\n return $folder->toArray();\n }",
"public function setFolder()\n\t{\n\t\t$fullPath = str_replace($this->get('localPath'), '', $this->get('fullPath'));\n\n\t\t// Folder metadata\n\t\t$this->set('type', 'folder');\n\t\t$this->set('name', basename($this->get('dirname')));\n\t\t$this->set('localPath', $this->get('dirname'));\n\n\t\t$this->set('fullPath', $fullPath . $this->get('localPath'));\n\n\t\t$dirname = dirname($this->get('dirname')) == '.'\n\t\t\t\t? null : dirname($this->get('dirname'));\n\t\t$this->set('dirname', $dirname);\n\t\t$this->setParents();\n\n\t\t$this->clear('ext');\n\t\t$this->setIcon('folder');\n\t}",
"public function show(Folder $folder)\n {\n //\n return new FolderResource($folder);\n }",
"public function testGetFoldersFromFolderId()\n {\n\n }",
"private function compareCacheFolders(){\n //$this->info('List of folders');\n $headers = ['Name', 'Parent', 'full_path', 'children'];\n $this->table($headers, $this->folders);\n\n foreach ($this->folders as $key => $value) {\n $this->info('Folder '.$value['name'].' found => '.$this->isFolderSaved($value));\n if(!$this->isFolderSaved($value)){\n //Create object on mysql table\n $folder = new Folder;\n $folder->name = str_replace(\"'\",\"\\'\",$value['name']);\n $folder->parent = str_replace(\"'\",\"\\'\",$value['parent']);\n $folder->full_path = str_replace(\"'\",\"\\'\",$value['full_path']);\n $folder->children = $value['children'];\n $folder->found = 1;\n\n // save the folder to the database\n $folder_db = $folder->save();\n\n $params = [\n 'index' => 'docsearch',\n 'type' => 'folders',\n 'id' => $folder->id,\n 'body' => $value\n ];\n //$this->info('Mysql ID for folder '.$value['name'].' -> '.$folder->id);\n $hosts = [$this->es_host];// IP + Port\n // Instantiate a new ClientBuilder\n $client = \\Elasticsearch\\ClientBuilder::create()\n ->setHosts($hosts) // Set the hosts\n ->build();\n $results = $client->index($params); //$client->search($params);\n //Log::info('ES Response', array('results'=> $results));\n //Log::info('############');\n }\n }\n }",
"public function folderInfo($folderPath)\n\t{\n\t\t$folderName = explode('/', $folderPath);\n\t\treturn [\n\t\t\t'origin' => $folderPath,\n\t\t\t'name' => end($folderName),\n\t\t\t'type' => 'folder',\n\t\t\t'url' => Storage::url($folderPath),\n \t\t];\n\t}",
"function readFolderXML(){\n\t\t\t// confirm it exists first!\n\t\t\tif (file_exists($_SERVER['DOCUMENT_ROOT'].\"/\".$this -> rootFolder.\"/folderList.xml\")){\n\t\t\t\t\n\t\t\t\t$xml = simplexml_load_file(\t$_SERVER['DOCUMENT_ROOT'].\"/\".$this -> rootFolder.\"/folderList.xml\");\n\t\t\t\tforeach($xml->children() as $child){\n\t\t\t\t\t\n\t\t\t\t\t$this -> folderMap[ (string) $child['id']] = (string) $child['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"function open_folder($json_path,$folder){\n\tif($folder == ''){\n\t\t$dir = $json_path;\n\t} else {\n\t\t$dir = $json_path.$folder.'/';\n\t}\n\tif(!file_exists($dir)){\n\t\treturn 'no exist';\n\t} else {\n\t\t$files = scandir($dir);\n\t\tarray_splice($files,0,2);\n\t\t$result = new stdClass();\n\t\tfor($i = 0; $i < count($files); $i++){\n\t\t\tif(is_dir($dir.$files[$i])){\n\t\t\t\t$subdir = scandir($dir.$files[$i]);\n\t\t\t\tarray_splice($subdir,0,2);\n\t\t\t\t$subdir_res = new stdClass();\n\t\t\t\tfor($j = 0; $j < count($subdir); $j++){\n\t\t\t\t\t$json = file_get_contents($dir.$files[$i].'/'.$subdir[$j]);\n\t\t\t\t\t$array_json = json_decode($json);\n\t\t\t\t\t$name = explode('.',$subdir[$j]);\n\t\t\t\t\t$subdir_res->$name[0] = $array_json;\n\t\t\t\t}\n\t\t\t\t$result->$files[$i] = $subdir_res;\n\t\t\t} else {\n\t\t\t\t$json = file_get_contents($dir.$files[$i]);\n\t\t\t\t$array_json = json_decode($json);\n\t\t\t\t$name = explode('.',$files[$i]);\n\t\t\t\t$result->$name[0] = $array_json;\n\t\t\t}\n\t\t}\n\t\treturn json_encode($result);\n\t}\n}",
"public function search_for_folder($folder, $base = '.', $loop = \\false)\n {\n }",
"public function addFolder($folder) {\n $this->folders[$folder->getName()] = $folder;\n }",
"function deleteFolder();",
"public function mount(Folder $folder)\n {\n $this->folder = $folder;\n }",
"public function getFolder()\n\t{\n\t\treturn $this->router->getFolder();\n\t}",
"function email_newfolder($folder, $parentfolder) {\n\n\t// Add actual time\n\t$folder->timecreated = time();\n\n\t// Make sure course field is not null\t\t\tThanks Ann.\n\tif ( ! isset( $folder->course) ) {\n\t\t$folder->course = 0;\n\t}\n\n\t// Insert record\n\tif (! $folder->id = insert_record('email_folder', $folder)) {\n\t\treturn false;\n\t}\n\n\t// Prepare subfolder\n\t$subfolder = new stdClass();\n\t$subfolder->folderparentid = $parentfolder;\n\t$subfolder->folderchildid = $folder->id;\n\n\t// Insert record reference\n\tif (! insert_record('email_subfolder', $subfolder)) {\n\t\treturn false;\n\t}\n\n\tadd_to_log($folder->userid, \"email\", \"add subfolder\", \"$folder->name\");\n\n\treturn true;\n}",
"function getFolder($name)\n{\n $fileManagerFolderMapper = systemToolkit::getInstance()->getMapper('fileManager', 'folder');\n $folder = $fileManagerFolderMapper->searchByPath($name);\n if (!$folder) {\n $folder = $fileManagerFolderMapper->create();\n $folder->setName($name);\n $folder->setTitle($name);\n $fileManagerFolderMapper->save($folder);\n }\n return $folder;\n}",
"public function folderInfo($folder = '/')\n {\n $folder = $this->cleanFolder($folder);\n $breadCrumbs = $this->breadcrumbs($folder);\n\n $files = [];\n $subFolders = $this->disk->directories($folder);\n foreach ($subFolders as $subFolder) {\n if ($this->isItemHidden($subFolder)) {\n continue;\n }\n $fileLists = $this->disk->files($subFolder);\n foreach ($fileLists as $file) {\n if (!$this->isItemHidden($file)) {\n $files[] = $this->fileDetails($folder . $file);\n }\n }\n }\n $fileLists = $this->disk->files($folder);\n foreach ($fileLists as $file) {\n if (!$this->isItemHidden($file)) {\n $files[] = $this->fileDetails($folder . $file);\n }\n }\n return compact('folder', 'breadCrumbs', 'subFolders', 'files', 'itemsCount');\n }",
"private function checkCacheFolder(){\n if (file_exists($this->folder_path)) {\n $this->cacheCreated = true;\n }else{\n $this->cacheCreated = false;\n }\n }",
"public function getRootLevelFolderObject();",
"public function getFolderPath()\n {\n return $this->_folderPath;\n }",
"public function update()\n\t{\n\t\t$container = AssetService::getContainer($this->request->get('container'), 'local', 'Assets');\n\t\t$folder = $container->folder($this->request->get('path'));\n\t\t$folder->editFolder($this->request->get('basename'));\n\n\t\treturn [\n\t\t\t'success'\t=>\ttrue,\n\t\t\t'message'\t=> 'Folder was successfully updated',\n\t\t\t'folder'\t=> $folder->toArray()\n\t\t];\n\n\t}",
"public function create_folder($folder, $subscribe = false) {\n\n if (strlen($folder) == 0) {\n // empty folder name!\n return FALSE;\n }\n\n // get parent folder (if any) to perform ACLs checks\n $exploded = explode($this->delimiter, $folder);\n if (is_array($exploded) && count($exploded) > 1) {\n\n // folder is not whithin root level, check parent grants\n $parentFolder = implode($this->delimiter, array_slice($exploded, 0, -1));\n\n // ACLs check ('create' grant required )\n $ACLs = $this->_get_acl($parentFolder);\n if (!is_array($ACLs) || !in_array(self::ACL_CREATE_FLAG, $ACLs)) {\n // Unauthorized!\n return FALSE;\n }\n }\n\n // start transaction\n if (!$this->dbmail->startTransaction()) {\n return FALSE;\n }\n\n // prepare query\n $mailboxSQL = \" INSERT INTO dbmail_mailboxes \"\n . \" (\"\n . \" owner_idnr, \"\n . \" name, \"\n . \" seen_flag, \"\n . \" answered_flag, \"\n . \" deleted_flag, \"\n . \" flagged_flag, \"\n . \" recent_flag, \"\n . \" draft_flag, \"\n . \" no_inferiors, \"\n . \" no_select, \"\n . \" permission, \"\n . \" seq\"\n . \" ) \"\n . \" VALUES \"\n . \" (\"\n . \" {$this->user_idnr}, \"\n . \" '{$this->dbmail->escape($folder)}', \"\n . \" 0, \"\n . \" 0, \"\n . \" 0, \"\n . \" 0, \"\n . \" 0, \"\n . \" 0, \"\n . \" 0, \"\n . \" 0, \"\n . \" 2, \"\n . \" 0 \"\n . \" ) \";\n\n // insert new folder record\n if (!$this->dbmail->query($mailboxSQL)) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // retreive last insert id\n $mailbox_idnr = $this->dbmail->insert_id('dbmail_mailboxes');\n\n // subscription management (if needed)\n if ($subscribe) {\n\n /*\n * Insert / Update dbmail_subscription entry\n */\n $subscriptionSQL = \"INSERT INTO dbmail_subscription \"\n . \"(user_id, mailbox_id) \"\n . \"VALUES \"\n . \"('{$this->dbmail->escape($this->user_idnr)}', '{$this->dbmail->escape($mailbox_idnr)}' ) \"\n . \"ON DUPLICATE KEY UPDATE \"\n . \"user_id = '{$this->dbmail->escape($this->user_idnr)}', \"\n . \"mailbox_id = '{$this->dbmail->escape($mailbox_idnr)}' \";\n\n if (!$this->dbmail->query($subscriptionSQL)) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n }\n\n // return status\n return ($this->dbmail->endTransaction() ? TRUE : FALSE);\n }",
"private static function folders_path(){\n\t\treturn dirname(__DIR__) . '/content/folders.json';\n\t}",
"public function get_folder_properties($folderid) {\n\n\t\t$arraytoreturn = Array();\n\n\t\tif ($folderid === null) {\n\n\t\t\t$response = $this->curl_get(skydrive_base_url.\"/me/skydrive?access_token=\".$this->access_token);\n\n\t\t} else {\n\n\t\t\t$response = $this->curl_get(skydrive_base_url.$folderid.\"?access_token=\".$this->access_token);\n\n\t\t}\n\n\t\t\n\n\t\tif (@array_key_exists('error', $response)) {\n\n\t\t\tthrow new Exception($response['error'].\" - \".$response['description']);\n\n\t\t\texit;\n\n\t\t} else {\t\t\t\n\n\t\t\t@$arraytoreturn = Array('id' => $response['id'], 'name' => $response['name'], 'parent_id' => $response['parent_id'], 'size' => $response['size'], 'source' => $response['source'], 'created_time' => $response['created_time'], 'updated_time' => $response['updated_time'], 'link' => $response['link'], 'upload_location' => $response['upload_location'], 'is_embeddable' => $response['is_embeddable'], 'count' => $response['count']);\n\n\t\t\treturn $arraytoreturn;\n\n\t\t}\n\n\t}",
"public function select(EmailFolder $folder, OroEntityManager $em);",
"public function show(Folder $folder)\n { \n if($this->authorize('viewOrCollab',$folder)) {\n $storage = session('storage');\n $chart_data = session('chart_data');\n return view('folders.show',compact('folder','storage','chart_data'));\n } \n }",
"public function getChunkFolder (){\n\t\treturn $this->chunkFolder;\n\t}",
"public function setFolder($folder): xml\n {\n self::$folder = $folder;\n return $this;\n }",
"public function set_mailbox($folder) {\n $this->set_folder($folder);\n }",
"public function createFolder()\r\n\t{\r\n //Check if we have all variables that we need\r\n $public_key = $this->input->post('parent_public_key');\r\n $folder_name = $this->input->post('folder_name');\r\n\t\t$user_id = $this->authentication->uid;\r\n\r\n //TODO !!!!! Validate the path here !!!!!\r\n if($folder_name == '' || $public_key == ''){\r\n\t\t\t$this->errorMessage('Please enter a folder name');\r\n redirect('/dashboard');\r\n }\r\n\r\n\t\t//Variable to check if the folder exists\r\n\t\t$folder_exists = false;\r\n\r\n\t\t//Make sure that the parent exists\r\n\t\tif($public_key == '0'){\r\n\t\t\t//We're in the main directory\r\n\t\t\t$parent_id = 0;\r\n\t\t\t$folder_exists = true;\r\n\t\t}\r\n\r\n\t\tif($this->DataModel->folderExists(array('public_key' => $public_key), $this->authentication->uid)){\r\n\t\t\t//We found the parent folder\r\n\t\t\t$folder_exists = true;\r\n\t\t\t$parent_id = $this->DataModel->getFolderInfo(array('public_key' => $public_key), $this->authentication->uid)['id'];\r\n\t\t}\r\n\r\n\t\t//Check if the folder is shared with the user\r\n\t\tif($this->DataModel->folderExists(array('public_key' => $public_key))){\r\n\t\t\t$folder = $this->DataModel->getFolderInfo(array('public_key' => $public_key));\r\n\t\t\tif($this->DataModel->hasSharedAccessFolder($public_key, $this->authentication->uid)){\r\n\t\t\t\tif($this->DataModel->sharedPermission == 1){\r\n\t\t\t\t\t$folder_exists = true;\r\n\t\t\t\t\t//Set the user id of the user who owns the shared folder\r\n\t\t\t\t\t$user_id = $folder['user_id'];\r\n\t\t\t\t\t$parent_id = $folder['id'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Final check if the folder exists\r\n\t\tif($folder_exists == false){\r\n\t\t\tredirect(\"/dashboard\");\r\n\t\t}\r\n\r\n\t\t//Check if the user is allowed to create new folders (limit)\r\n\t\t$stats = $this->usagestatistics->getUser($user_id);\r\n\t\tif($stats['usage']['foldercount'] < $stats['max']['foldercount'] || $stats['max']['foldercount'] == 0){\r\n\t\t\t//Create the folder\r\n\t $this->DataModel->createFolder($parent_id, $folder_name, $user_id);\r\n\t\t\t$this->successMessage($this->lang->line('success_folder_created'));\r\n\t\t}else{\r\n\t\t\t//The folder could not be created.\r\n\t\t\t$this->errorMessage($this->lang->line('error_folder_usageLimit'));\r\n\t\t}\r\n\r\n\t\t//Redirect the user to the dasbhoard if the parent folder was the \"main\" folder\r\n\t\tif($parent_id == 0){\r\n\t\t\tredirect('/dashboard');\r\n\t\t}\r\n\r\n\t\t//If the owner of the folder is the current user\r\n\t\tif($this->authentication->uid == $user_id){\r\n\t\t\tredirect('folders/'.$public_key);\r\n\t\t}else{\r\n\t\t\t//If it's a shared folder\r\n\t\t\tredirect('sharedFolder/'.$public_key);\r\n\t\t}\r\n\r\n\t}",
"public function setIsFolder($isFolder)\n {\n $this->isFolder = VT::toBool($isFolder);\n }",
"function folder_exist($folder){\n $path = realpath($folder);\n\n // If it exist, check if it's a directory\n return ($path !== false AND is_dir($path)) ? $path : false;\n }",
"public function edit(Folder $folder)\n {\n $storage = session('storage');\n $chart_data = session('chart_data');\n if(isset($storage) && isset($chart_data)) {\n return view('folders.edit',compact('folder','storage','chart_data'));\n } else {\n return redirect()->route('storages.index');\n }\n\n }",
"function getFolderPlaylist($dir)\r\n{\r\n\t$files = getFiles($dir);\r\n\t$playlist = formatJsPlaylist($files);\r\n\treturn $playlist;\r\n}",
"function folder_exist($folder)\n {\n $path = realpath($folder);\n\n // If it exist, check if it's a directory\n return ($path !== false AND is_dir($path)) ? $path : false;\n}",
"public function update(Request $request, Folder $folder)\n {\n $attributes = $request->validate([\n 'name' => ['required','string'],\n 'privacy' => ['required']\n ]);\n $folder->name = $attributes['name'];\n $folder->privacy = $attributes['privacy'];\n $folder->save();\n return \\redirect()->route('folders.index')->with('success','Folder created successfully.');\n }",
"function get_folder_view_tree($folder_id, $include_pages, $include_files, $excluded_page_id)\r\n{\r\n $output = '';\r\n\r\n // If this folder is not archived, then continue to get folder contents.\r\n if (db_value(\"SELECT folder_archived FROM folder WHERE folder_id = '$folder_id'\") == 0) {\r\n // Get folders in this folder.\r\n $folders = db_items(\r\n \"SELECT\r\n folder_id AS id,\r\n folder_name AS name\r\n FROM folder\r\n WHERE folder_parent = '$folder_id'\r\n ORDER BY\r\n folder_order ASC,\r\n folder_name ASC\");\r\n\r\n // Loop through folders in order to get their contents.\r\n foreach ($folders as $folder) {\r\n $folder_output = get_folder_view_tree($folder['id'], $include_pages, $include_files, $current_page_id);\r\n\r\n // If this folder has content to display, then output folder name and contents.\r\n // We output a folder even if a visitor does not have view access to it, assuming it has content,\r\n // because the visitor has view access to something inside of it and we need to preserve\r\n // the heirarchy/indentation.\r\n if ($folder_output != '') {\r\n $output .=\r\n '<li class=\"folder ' . get_access_control_type($folder['id']) . '\">\r\n <div class=\"name\">' . h($folder['name']) . '</div>\r\n ' . $folder_output . '\r\n </li>';\r\n }\r\n }\r\n\r\n // If the visitor has view access to this folder, then continue to get pages and files.\r\n if (check_view_access($folder_id, $always_grant_access_for_registration_and_guest = true) == true) {\r\n // If pages are selected to be included, then get them.\r\n if ($include_pages == 1) {\r\n $pages = db_items(\r\n \"SELECT\r\n page_id AS id,\r\n page_name AS name,\r\n page_title AS title,\r\n page_meta_description AS meta_description\r\n FROM page\r\n WHERE\r\n (page_folder = '$folder_id')\r\n AND (page_search = '1')\r\n AND (page_type != 'registration confirmation')\r\n AND (page_type != 'membership confirmation')\r\n AND (page_type != 'view order')\r\n AND (page_type != 'custom form confirmation')\r\n AND (page_type != 'form item view')\r\n AND (page_type != 'calendar event view')\r\n AND (page_type != 'catalog detail')\r\n AND (page_type != 'shipping address and arrival')\r\n AND (page_type != 'shipping method')\r\n AND (page_type != 'billing information')\r\n AND (page_type != 'order preview')\r\n AND (page_type != 'order receipt')\r\n AND (page_type != 'affiliate sign up confirmation')\r\n AND (page_type != 'affiliate welcome')\r\n ORDER BY name ASC\");\r\n\r\n // Loop through pages in order to output them.\r\n foreach ($pages as $page) {\r\n // If this is not the excluded page, then output it.\r\n if ($page['id'] != $excluded_page_id) {\r\n // If there is a title, then prepare link with title.\r\n if ($page['title'] != '') {\r\n $output_name = '<div class=\"name\"><a href=\"' . OUTPUT_PATH . h(encode_url_path($page['name'])) . '\">' . h($page['title']) . '</a></div>';\r\n \r\n // Otherwise there is not a title, so prepare link with page name.\r\n } else {\r\n $output_name = '<div class=\"name\"><a href=\"' . OUTPUT_PATH . h(encode_url_path($page['name'])) . '\">' . h($page['name']) . '</a></div>';\r\n }\r\n\r\n $output_description = '';\r\n \r\n // If there is a meta description for this page, then output it.\r\n if ($page['meta_description'] != '') {\r\n $output_description = '<div class=\"description\">' . h($page['meta_description']) . '</div>';\r\n }\r\n\r\n $output .=\r\n '<li class=\"page\">\r\n ' . $output_name . '\r\n ' . $output_description . '\r\n </li>';\r\n }\r\n }\r\n }\r\n\r\n // If files are selected to be included, then get them.\r\n if ($include_files == 1) {\r\n $files = db_items(\r\n \"SELECT\r\n name,\r\n description,\r\n design\r\n FROM files\r\n WHERE folder = '$folder_id'\r\n ORDER BY name ASC\");\r\n\r\n // Loop through files in order to output them.\r\n foreach ($files as $file) {\r\n $output_design_class = '';\r\n\r\n // If this file is a design file, then output design class.\r\n if ($file['design'] == 1) {\r\n $output_design_class = ' design';\r\n }\r\n\r\n $output_description = '';\r\n \r\n // If there is a description for this file, then output it.\r\n if ($file['description'] != '') {\r\n $output_description = '<div class=\"description\">' . h($file['description']) . '</div>';\r\n }\r\n\r\n $output .=\r\n '<li class=\"file' . $output_design_class . '\">\r\n <div class=\"name\"><a href=\"' . OUTPUT_PATH . h(encode_url_path($file['name'])) . '\">' . h($file['name']) . '</a></div>\r\n ' . $output_description . '\r\n </li>';\r\n }\r\n }\r\n }\r\n\r\n // If content was found for this folder, then wrap content in ul tags.\r\n if ($output != '') {\r\n $output = '<ul>' . $output . '</ul>';\r\n }\r\n }\r\n\r\n return $output;\r\n}",
"public function getMediaFolder($id){\n return MediaFolder::find($id);\n\t\t\n }",
"private function __countFilesInFolder($folder) {\n\t\t$iter = new FilesystemIterator($folder, FilesystemIterator::SKIP_DOTS);\n\t\treturn iterator_count($iter);\n\t}",
"public function ajax_get_folder_contents() {\n\n\t\t$path = '#' === rgget( 'path' ) ? '/' : rgget( 'path' );\n\n\t\techo wp_json_encode( $this->get_folder_tree( $path, rgget( 'first_load' ) ) );\n\t\tdie();\n\n\t}",
"function createFolder($folder_name, $parent_id){\n $url = $this->url.\"files\";\n $post['data'] = array(\n 'attributes' => array( \n \"name\" => $folder_name,\n \"parent_id\" => $parent_id,\n ),\n \"type\" => \"files\" \n );\n $post = json_encode($post);\n $result = $this->post_to_zoho($url, $post);\n return $result;\n }",
"public static function is_user_folder($user_id){\n\n\t}",
"public function setRootFolder( string $folder ): IVfsHandler;",
"public function folder_namespace($folder) {\n\n if ($folder == 'INBOX') {\n return 'personal';\n }\n\n foreach ($this->namespace as $type => $namespace) {\n if (is_array($namespace)) {\n foreach ($namespace as $ns) {\n if ($len = strlen($ns[0])) {\n if (($len > 1 && $folder == substr($ns[0], 0, -1)) || strpos($folder, $ns[0]) === 0\n ) {\n return $type;\n }\n }\n }\n }\n }\n\n return 'personal';\n }",
"private function mustCreateFolder(){\n }",
"function addSubfolder(Folder $newSubfolder)\r\n\t{\r\n\t\tif( substr_count( $newSubfolder->getPath( ), $this->getPath( ) ) > 0 )\r\n\t\t{\r\n\t\t\t$this->subfoldersCollection->add( $newSubfolder );\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttrigger_error( \"pasta não existente! não foi possível adicionar\" );\r\n\t\t}\r\n\t}",
"public static function create_all_folder($a_folder){\n\n\t\t$request = self::_get_connection()->select(\"SELECT ID from `apine_images` where folder=$a_folder ORDER BY `ID`\");\n\t\t$liste = new Liste();\n\t\tif($request != null && count($request) > 0){\n\t\t\tforeach($request as $item){\n\t\t\t\t$liste->add_item(new ApineImage($item['ID']));\n\t\t\t}\n\t\t}\n\t\treturn $liste;\n\t\n\t}",
"function email_get_parent_folder($folder) {\n\n\tif (! $folder ) {\n\t\treturn false;\n\t}\n\n\tif ( is_int($folder) ) {\n\t\tif ( ! $subfolder = get_record('email_subfolder', 'folderchildid', $folder) ) {\n\t return false;\n\t }\n\t} else {\n\t\tif ( ! $subfolder = get_record('email_subfolder', 'folderchildid', $folder->id) ) {\n \treturn false;\n\t\t}\n }\n\n return get_record('email_folder', 'id', $subfolder->folderparentid);\n\n}",
"public function delete_folder($folder) {\n\n // mailbox esists?\n $mailbox_idnr = $this->get_mail_box_id($folder);\n if (!$mailbox_idnr) {\n // mailbox not found\n return FALSE;\n }\n\n // ACLs check ('delete' grant required )\n $ACLs = $this->_get_acl(NULL, $mailbox_idnr);\n if (!is_array($ACLs) || !in_array(self::ACL_DELETE_FLAG, $ACLs)) {\n // Unauthorized!\n return FALSE;\n }\n\n // init folders container\n $folders_list = array(\n $mailbox_idnr => $folder\n );\n\n // get mailbox sub folders\n $sub_folders_list = $this->get_sub_folders($folder);\n\n // merge sub folders with target folder\n if (is_array($sub_folders_list)) {\n\n // loop sub folders\n foreach ($sub_folders_list as $sub_folder_idnr => $sub_folder_name) {\n\n // ACLs check ('delete' grant required )\n $ACLs = $this->_get_acl(NULL, $sub_folder_idnr);\n\n if (!is_array($ACLs) || !in_array(self::ACL_DELETE_FLAG, $ACLs)) {\n // Unauthorized!\n return FALSE;\n }\n\n // add sub folder to folders list\n $folders_list[$sub_folder_idnr] = $sub_folder_name;\n }\n }\n\n // start transaction\n if (!$this->dbmail->startTransaction()) {\n return FALSE;\n }\n\n // delete folders \n foreach ($folders_list as $folder_idnr => $folder_name) {\n\n // delete messages\n if (!$this->clear_folder($folder_name)) {\n // rollbalk transaction\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // delete folder\n $query = \"DELETE FROM dbmail_mailboxes \"\n . \" WHERE mailbox_idnr = {$this->dbmail->escape($folder_idnr)} \";\n\n if (!$this->dbmail->query($query)) {\n // rollbalk transaction\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // unset temporary stored mailbox_id (if present)\n if (!$this->unset_temp_value(\"MBOX_ID_{$folder_name}_{$this->user_idnr}\")) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n }\n\n return ($this->dbmail->endTransaction() ? TRUE : FALSE);\n }",
"public function &getFolders($folder)\n\t{\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$breakflag_before_process = $registry->get('volatile.breakflag', false);\n\n\t\t// Reset break flag before continuing\n\t\t$breakflag = false;\n\n\t\t// Initialize variables\n\t\t$arr = array();\n\t\t$false = false;\n\n\t\tif(!is_dir($folder) && !is_dir($folder.'/')) return $false;\n\n\t\t$counter = 0;\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$maxCounter = $registry->get('engine.scan.smart.large_dir_threshold',100);\n\n\t\t$allowBreakflag = ($registry->get('volatile.operation_counter', 0) != 0) && !$breakflag_before_process;\n\n\t\t$handle = @opendir($folder);\n\t\t/* If opening the directory doesn't work, try adding a trailing slash. This is useful in cases\n\t\t * like this: open_basedir=/home/user/www/ and the root is /home/user/www. Trying to scan\n\t\t * /home/user/www results in error, trying to scan /home/user/www/ succeeds. Duh!\n\t\t */\n\t\tif ($handle === FALSE) {\n\t\t\t$handle = @opendir($folder.'/');\n\t\t}\n\t\t// If directory is not accessible, just return FALSE\n\t\tif ($handle === FALSE) {\n\t\t\t$this->setWarning('Unreadable directory '.$folder);\n\t\t\treturn $false;\n\t\t}\n\n\t\twhile ( (($file = @readdir($handle)) !== false) && (!$breakflag) )\n\t\t{\n\t\t\tif (($file != '.') && ($file != '..'))\n\t\t\t{\n\t\t\t\t// # Fix 2.4: Do not add DS if we are on the site's root and it's an empty string\n\t\t\t\t$ds = ($folder == '') || ($folder == '/') || (@substr($folder, -1) == '/') || (@substr($folder, -1) == DIRECTORY_SEPARATOR) ? '' : DIRECTORY_SEPARATOR;\n\t\t\t\t$dir = $folder . $ds . $file;\n\t\t\t\t$isDir = is_dir($dir);\n\t\t\t\tif ($isDir) {\n\t\t\t\t\t$data = _AKEEBA_IS_WINDOWS ? AEUtilFilesystem::TranslateWinPath($dir) : $dir;\n\t\t\t\t\tif($data) $arr[] = $data;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$counter++;\n\t\t\tif($counter >= $maxCounter) $breakflag = $allowBreakflag;\n\t\t}\n\t\t@closedir($handle);\n\n\t\t// Save break flag status\n\t\t$registry->set('volatile.breakflag', $breakflag);\n\n\t\treturn $arr;\n\t}",
"private function createFolderIndex(){\n //Just testing the command\n //$this->info('Starting to search the folder: '.$this->file_storage);\n $this->folders = array();\n $this->invalid_files = array();\n $this->count = 0;\n\n //Tagging all files to be able to find removed files at the end\n $SQL = \"UPDATE files SET found = '0'\";\n DB::connection('mysql')->update($SQL);\n $SQL = \"UPDATE folders SET found = '0'\";\n DB::connection('mysql')->update($SQL);\n\n //Checking if cache file exist, if not just create all the index on ES\n $this->checkCacheFolder();\n //Loop through the directories to get files ad folders\n $this->listFolderFiles($this->file_storage);//$_ENV['EBT_FILE_STORAGE']);\n //Check if any folder is missing from cache and try to create on ES\n $this->compareCacheFolders();\n\n //Remove files/folders that hasn't been found\n //if ($this->confirm('Do you wish to remove missing files? [y|N]')) {\n $this->removeMissingFiles();\n //}\n }",
"public function setFolder($value)\n {\n return $this->set('Folder', $value);\n }",
"public static function userHasFolderReadAccess($user, $folder, $arguments = null)\n {\n $rootFolder = $arguments['folderRoot'] ? $arguments['folderRoot'] : null;\n if (!$folder instanceof \\Ameos\\AmeosFilemanager\\Domain\\Model\\Folder || !$folder->isChildOf($rootFolder)){\n return false;\n }\n // Hooks to forbid read permission to a file if necessary\n $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][AccessUtility::class]['userHasFolderReadAccess'] = array_merge( // retro-compatibility\n (array)$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][AccessUtility::class]['userHasFolderReadAccess'],\n (array)$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['Tx_AmeosFilemanager_Tools_Tools']['userHasFolderReadAccess']\n );\n if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][AccessUtility::class]['userHasFolderReadAccess'])) {\n foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][AccessUtility::class]['userHasFolderReadAccess'] as $classData) {\n $hookObject = GeneralUtility::getUserObj($classData);\n if(method_exists($hookObject, 'userHasNotFolderReadAccess') && $hookObject->userHasNotFolderReadAccess($user, folder, $arguments)) {\n return false;\n }\n }\n }\n if($folder->getNoReadAccess() && // read only for owner\n (\n !isset($user['uid']) // no user authenficated\n || !is_object($folder->getFeUser()) // no owner\n || $folder->getFeUser()->getUid() != $user['uid'] // user is not the owner\n )\n ) {\n return false;\n }\n if($user && $user['uid'] > 0\n && $folder->getOwnerHasReadAccess()\n && is_object($folder->getFeUser())\n && $folder->getFeUser()->getUid() == $user['uid']\n ) {\n return true;\n }\n $folderRepository = GeneralUtility::makeInstance(\\Ameos\\AmeosFilemanager\\Domain\\Repository\\FolderRepository::class);\n if ($exist = $folderRepository->findByUid($folder->getUid())) {\n return true;\n }\n return false;\n }",
"function getSubfolders() ;",
"public function folder_size($folder) {\n\n $mailbox_idnr = $this->get_mail_box_id($folder);\n\n $query = \" SELECT SUM(dbmail_physmessage.messagesize) as folder_size \"\n . \" FROM dbmail_messages \"\n . \" INNER JOIN dbmail_physmessage on dbmail_messages.physmessage_id = dbmail_physmessage.id \"\n . \" WHERE dbmail_messages.mailbox_idnr = {$this->dbmail->escape($mailbox_idnr)} \"\n . \" AND dbmail_messages.deleted_flag = 0 \";\n\n $res = $this->dbmail->query($query);\n $row = $this->dbmail->fetch_assoc($res);\n\n return (is_array($row) && array_key_exists('folder_size', $row) ? $row['folder_size'] : 0);\n }"
] | [
"0.78366333",
"0.75003713",
"0.7339303",
"0.7281221",
"0.7261594",
"0.72478884",
"0.7224264",
"0.72074234",
"0.7101713",
"0.70400846",
"0.6929706",
"0.6898206",
"0.6889333",
"0.68675405",
"0.6845774",
"0.6753704",
"0.6736642",
"0.6713922",
"0.6713693",
"0.6709805",
"0.67095584",
"0.655697",
"0.6523706",
"0.65193224",
"0.64199036",
"0.64143175",
"0.641265",
"0.6393596",
"0.63929355",
"0.638348",
"0.6376496",
"0.6348487",
"0.62894493",
"0.62681293",
"0.6254791",
"0.62509173",
"0.62267417",
"0.6219276",
"0.6188845",
"0.61877173",
"0.6181648",
"0.6177488",
"0.6177488",
"0.6174886",
"0.6171993",
"0.6168691",
"0.61647886",
"0.615171",
"0.61432374",
"0.6142964",
"0.6135495",
"0.61306065",
"0.612181",
"0.610625",
"0.60952777",
"0.60938984",
"0.6093865",
"0.60919267",
"0.6091171",
"0.60810006",
"0.608049",
"0.60733896",
"0.60711807",
"0.6070002",
"0.6024415",
"0.60147816",
"0.6006382",
"0.5998342",
"0.599758",
"0.59649",
"0.59611535",
"0.5937595",
"0.59339887",
"0.5923464",
"0.591385",
"0.59117293",
"0.59041333",
"0.5903444",
"0.59033006",
"0.5897112",
"0.58889467",
"0.58858323",
"0.588339",
"0.58820176",
"0.5869527",
"0.58693206",
"0.58673716",
"0.5866532",
"0.58502704",
"0.5848563",
"0.5845417",
"0.58375216",
"0.5837388",
"0.5829605",
"0.58261627",
"0.58243257",
"0.58164066",
"0.5812286",
"0.5810999",
"0.58073616",
"0.5802452"
] | 0.0 | -1 |
$file is a File object | public function hasFile($file) {
$ret = array_key_exists($filer->getName(), $this->file);
return $ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getFile(): object {\n return $this->file;\n }",
"function get_file()\n\t{\n\t\treturn $this->file;\n\t}",
"public function getFile() {}",
"public function getFile() {}",
"protected static function file()\n {\n }",
"public function getFile ();",
"public function setFile($file) {}",
"final function getFile();",
"public function file() { return $this->input_file; }",
"public function get_file()\n {\n return $this->file;\n }",
"public function getFile();",
"public function getFile();",
"public static function getFile() {}",
"public function file()\n {\n return $this->file;\n }",
"public function getf() {\n return $this->file;\n }",
"public function file() {\n return $this->file;\n }",
"protected function isFile() {}",
"abstract protected function getFile(): File;",
"public function getFile()\n\t{\n\t\treturn $this->file; \n\n\t}",
"public function get_file() {\n\t\treturn $this->file;\n\t}",
"public function getFile(): string;",
"public function getFile(): string;",
"public function getFile(): string;",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public function getFile()\n {\n return $this->file;\n }",
"public static function setFile($file) {}",
"protected function openFile() {}",
"public function is_file($file)\n {\n }",
"public function is_file($file)\n {\n }",
"public function is_file($file)\n {\n }",
"public function is_file($file)\n {\n }",
"public function is_file($file)\n {\n }",
"public function setFile($file){\n $this->file = $file;\n }",
"public function read($file);",
"public function setFile($file)\r\n {\r\n $this->file = $file;\r\n }",
"public function getFile()\n\t{\n\t\treturn $this->file;\n\t}",
"public function getFile()\n\t{\n\t\treturn $this->file;\n\t}",
"public function read($file) {\n\t}",
"public function getFile()\n {\n return $this->_File;\n }",
"public function getFile() {\n return $this->file;\n }",
"public function getFile() {\n return $this->file;\n }",
"public function setFile($file)\n {\n $this->file = $file;\n }",
"public function openFile() {\n $this->file = fopen($this->_dir . $this->_filename,\"r\");\n }",
"public function __construct(File $file)\n {\n $this->file = $file;\n }",
"public function __construct(File $file)\n {\n $this->file = $file;\n }",
"public function __construct(File $file)\n {\n $this->file = $file;\n }",
"public function __construct(File $file)\n {\n $this->file = $file;\n }",
"public function is_file($file);",
"public function setFile(File $file)\n {\n $this->file = $file;\n }",
"public function isFile();",
"function file($file)\n\t{\n\t return $this->set('', $file, TRUE);\n\t}",
"public function __construct(File $file)\n\t{\n\t\t$this->file = $file;\n\t}",
"abstract protected function validateFile() : object;",
"public function __construct($file)\n {\n $this->file = $file;\n }",
"public function setFile($v)\r\n\t{\r\n\t\t$this->_file = $v;\r\n\t}",
"public function setFile(HttpFile $file)\r\n {\r\n $this->file = $file;\r\n $this->mime = $file->getMimeType();\r\n $this->date = new \\DateTime('NOW');\r\n }",
"public function getFileInstance()\n {\n return $this->file;\n }",
"public function getFile(): string\n {\n return $this->file;\n }",
"abstract public function store(File $file);",
"public function get_contents($file)\n {\n }",
"public function get_contents($file)\n {\n }",
"public function get_contents($file)\n {\n }",
"public function get_contents($file)\n {\n }",
"public function get_contents($file)\n {\n }",
"public function __construct($file) {\n $this->file = $file;\n }",
"protected function _openFile($filename) {}",
"public function getFile() {\n\t\treturn $this->data['file'];\n\t}",
"public function getFile() {\n\n return $this->file;\n }",
"public function __construct($file);",
"public function set_file($file){\n //error checking\n if(empty($file) || !$file || !is_array($file)){\n $this->errors[] =\"There was no file uploaded here\";\n return false; \n // Check if the file is uploaded \n }elseif($file['error'] !==0){\n \n $this->error[] = $this->upload_errors_array[$file['error']];\n return false;\n \n }else {\n //Submit data \n $this->user_image = basename($file['name']); //basename is function\n $this->tmp_path = $file['tmp_name'];\n $this->type = $file ['type'];\n $this->size = $file ['size'];\n }\n }",
"public function setFile(File $file)\n\t{\n\t\t$this->file=$file; \n\t\t$this->keyModified['file'] = 1; \n\n\t}",
"public function __construct($file)\n\t{\n\t\t$this->file = $file;\n\t}",
"public function isFile() {\n return $this->_is_file;\n }",
"public function isFile() : bool;",
"public function prepareFile($file)\r\n {\r\n $this->file = $file;\r\n\r\n return !!$this->file;\r\n }",
"protected function check($file)\n {\n }",
"abstract public function getContent($file);",
"function OnGetFileObject($file){\n\tGetFileFromDatabase($file);\t\n\tif ($file->scanned != 1){\n\t\tScanFileOnVirusTotal($file);\n\t}\n\tif ($file->ck_scanned == -1){\t\t//Waiting for a result\n\t\tGetFileResultsOnCuckoo($file);\n\t}\n}",
"public function fileInfo() {\n $this->file = file_load($this->fid);\n\n // Creating an array of stream wrappers that will be removed.\n $streams = array();\n foreach (stream_get_wrappers() as $stream) {\n $streams[] = $stream . '://';\n }\n\n // Generate the folder name by the unique URI of the file.\n $file_name = str_replace($streams, '', $this->file->uri);\n $folder_name = str_replace(array('.', '_'), '-', $file_name);\n\n $files_folder = variable_get('file_public_path', conf_path() . '/files');\n\n $this->filePath = $files_folder . '/' . $file_name;\n $this->extractPath = $files_folder . '/' . $folder_name;\n }",
"public function visitFile(vfsStreamFile $file): self;",
"public function __construct($file)\n {\n }",
"public function __construct($file)\n {\n }",
"public function testRetrieveFilePath()\n {\n $this->file = 'test';\n\n self::assertEquals('test', $this->getFile());\n }",
"public function isFile(): bool;",
"public function loadFromFile($file)\n {\n \n }",
"public function create_from_file($file);",
"public function set_file($file) {\n if (empty($file) || !$file || !is_array($file)) {\n $this->custom_errors[] = \"This was no file uploaded here\";\n return false;\n } else if ($file['error'] != 0) {\n $this->custom_errors[] = $this->upload_errors[$file['error']]; # save official errors in your error array\n return false;\n } else {\n $this->user_image = basename($file['name']);\n $this->tmp_path = $file['tmp_name']; # this is the temporary path that store the file\n $this->type = $file['type'];\n $this->size = $file['size'];\n }\n }",
"function get_real_file_to_edit($file)\n {\n }",
"public function support($file);",
"public function __construct($file = \"\")\n {\n $this->file = $file;\n }",
"public function isFile()\n {\n return ( $this->fileStructure->type == self::IS_FILE );\n }",
"public function isFile()\n {\n return $this->isFile;\n }"
] | [
"0.71076196",
"0.70726573",
"0.7048535",
"0.7047975",
"0.70232457",
"0.7016773",
"0.7002165",
"0.6966359",
"0.696136",
"0.6944857",
"0.69071",
"0.69071",
"0.6881196",
"0.688092",
"0.68482625",
"0.68479294",
"0.68291104",
"0.6814526",
"0.67629206",
"0.6743429",
"0.6723617",
"0.6723617",
"0.6723617",
"0.670389",
"0.670389",
"0.670389",
"0.670389",
"0.670389",
"0.670389",
"0.670389",
"0.670389",
"0.670389",
"0.670389",
"0.670389",
"0.66962355",
"0.66890216",
"0.66754013",
"0.66754013",
"0.6674343",
"0.6674343",
"0.6674343",
"0.66622066",
"0.6646287",
"0.6637412",
"0.6634852",
"0.6634852",
"0.6633646",
"0.66043264",
"0.66015494",
"0.66015494",
"0.6597857",
"0.6516839",
"0.65025693",
"0.65025693",
"0.65025693",
"0.65025693",
"0.64983755",
"0.64946836",
"0.64416766",
"0.64384305",
"0.64367074",
"0.64003646",
"0.63805073",
"0.63783634",
"0.6357861",
"0.63502026",
"0.6348912",
"0.63447183",
"0.6344502",
"0.6344502",
"0.63441277",
"0.6343275",
"0.6343275",
"0.63301814",
"0.6323118",
"0.63200897",
"0.63165337",
"0.6305244",
"0.62996393",
"0.62984884",
"0.62891686",
"0.628378",
"0.62798357",
"0.62786555",
"0.6278228",
"0.6260685",
"0.6255461",
"0.6241932",
"0.62413603",
"0.6237785",
"0.6236988",
"0.62330985",
"0.62248605",
"0.62059945",
"0.61773586",
"0.61754733",
"0.61568224",
"0.6128085",
"0.61182076",
"0.6116783",
"0.6111311"
] | 0.0 | -1 |
Create an InfobloxWapiQuery object. | public function __construct($address, $user, $password, $version) {
$this->setAddress($address);
$this->setUser($user);
$this->setPassword($password);
$this->setVersion($version);
$this->setURL("https://$address/wapi/v$version/");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createQueryApi(): QueryApi;",
"public function createQuery(): QueryInterface;",
"public function createQuery() {}",
"public function createQuery() {}",
"public function createQuery() {}",
"public function createQuery() {}",
"public function createQuery() {\n\t\treturn $this->queryFactory->create($this->objectType);\n\t}",
"function __construct($query, $api) {\r\n $this->query = $query;\r\n $this->api = $api;\r\n }",
"public function query(): Query\n {\n return new Query($this->getWebservice(), $this);\n }",
"function createQuery() ;",
"public function createQuery(): QueryInterface\n {\n /** @var QueryInterface $query */\n $query = $this->objectManager->get(QueryInterface::class);\n $query->setConfiguration($this->getConfiguration());\n\n return $query;\n }",
"public static function query()\n {\n return (new static)->newQuery();\n }",
"public static function query()\n {\n return (new static)->newQuery();\n }",
"public function createQuery()\n {\n $query = &atknew(\"atk.db.atk{$this->m_current_clusternode->m_type}query\");\n $query->m_db = $this;\n return $query;\n }",
"public function query(): QueryInterface;",
"public function newQuery();",
"abstract public function newQuery();",
"public static function createQuery()\n\t{\n\t\treturn new ActiveQuery(['modelClass' => get_called_class()]);\n\t}",
"public function getQuery(): Builder;",
"public static function query()\n {\n // Create a new model instance for the query to ensure\n // that the model's initialize() method gets called.\n // Otherwise, the property definitions will be incomplete.\n $model = new static();\n\n return new Query($model);\n }",
"protected function query() {\n\t\treturn new Query($this);\n\t}",
"public function newQuery()\n {\n return new Builder($this->connection, $this->grammar, $this->processor);\n }",
"public function createQuery() {\n\t\treturn $this->luceneQueryFactory->create($this);\n\t}",
"public function newQuery()\n {\n return new Builder($this->connection, $this->processor);\n }",
"public static function NewQuery()\r\n\t{\r\n\t\treturn new QSqlQuery();\r\n\t}",
"function createQueryObject($ifc, $con){\r\n\t\tdie('Not implemented');\r\n\t}",
"public function newQuery()\n {\n return new self($this->connection, $this->processor);\n }",
"public static function query();",
"public static function create()\n {\n return new QueryConfigurationBuilder();\n }",
"public function createQuery($data);",
"public function createQuery()\n {\n $query = $this->persistenceManager->createQueryForType($this->objectType);\n if ($this->defaultOrderings !== []) {\n $query->setOrderings($this->defaultOrderings);\n }\n if ($this->defaultQuerySettings !== null) {\n $query->setQuerySettings(clone $this->defaultQuerySettings);\n }\n return $query;\n }",
"public function query(QueryObject $query);",
"public function query()\n\t{\n\t\treturn new Builder(\n\t\t\t$this, $this->getQueryGrammar(), $this->getPostProcessor()\n\t\t);\n\t}",
"public function newQuery()\n {\n return new self($this->connection, $this->grammar, $this->getProcessor());\n }",
"public function createSearchQuery()\n {\n $query = new SearchQuery($this->elastic);\n $query->listeners = $this->listeners;\n return $query;\n }",
"public static function db_request( $params )\n {\n // Make Query\n $query = new WP_Query( $params );\n\n return $query;\n }",
"public abstract function get_query();",
"public function query();",
"public function query();",
"public function query();",
"public function newModelQuery();",
"public function newQuery(): Builder\n {\n return new static($this->connection);\n }",
"public function createQuery() {\n return new XML\\DOM();\n }",
"public static function query()\n {\n }",
"abstract protected function initQuery(): void;",
"public function query(): QueryBuilder;",
"protected function retrieveOrCreateQueryInstance()\n {\n return $this->queryBuilder ?? $this->queryBuilder = new $this->model();\n }",
"function query() {}",
"protected function createQueryRequest($body = null, $fields = null)\n {\n\n $resourcePath = '/queries';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($fields !== null) {\n $queryParams['fields'] = ObjectSerializer::toQueryValue($fields);\n }\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function get($apiQuery, $options = array());",
"public function newQuery() {\n return new Builder($this->connection);\n }",
"public static function Q($db = null)\n {\n $qo = __CLASS__.\"_QueryObject\";\n return new $qo(__CLASS__, $db);\n }",
"private function api_query() {\n if ($this->trackId == null) {\n return false;\n }\n $class[] = 'includes/checkout-php-library/autoload';\n $class[] = 'includes/checkout-php-library/com/checkout/Apiclient';\n $class[] = 'includes/checkout-php-library/com/checkout/Apiservices/Reporting/Reportingservice';\n $class[] = 'includes/checkout-php-library/com/checkout/Apiservices/Reporting/Requestmodels/Transactionfilter';\n\n foreach ($class as $path) {\n module_load_include('php', 'uc_checkoutpayment', $path);\n }\n\n $apiClient = new com\\checkout\\Apiclient(variable_get('cko_private_key'),variable_get('cko_mode'));\n $service = $apiClient->Reportingservice();\n\n $request = new com\\checkout\\Apiservices\\Reporting\\Requestmodels\\Transactionfilter();\n $request->setPageSize('100');\n $request->setSortColumn('date');\n $request->setFilters(\n array(\n \"action\" => \"include\",\n \"field\" => \"TrackID\",\n \"operator\" => \"EQUALS\",\n \"value\" => $this->trackId,\n )\n );\n\n $response = $service->queryTransaction($request);\n\n if (!empty($response)) {\n foreach ($response as $value) {\n $this->id = $value->id;\n $this->created = $value->created;\n $this->trackId = $value->track_id;\n $this->currency = $value->currency;\n $this->responseMessage = $value->responseMessage;\n $this->responseCode = $value->responseCode;\n $this->status = $value->status;\n $this->value = $data->value;\n $this->email = $data->email;\n\n $this->db_add();\n }\n\n return $this->db_get();\n }\n\n return FALSE;\n }",
"function query() {\n }",
"protected function createQueryBuilder()\n {\n $builder = new QueryBuilder();\n return $builder;\n }",
"public function newQuery()\n {\n $datasource = $this->getDatasource();\n\n $query = new Builder($datasource, $datasource->getPostProcessor());\n\n return $query->setModel($this);\n }",
"protected function buildSearchQuery(SearchApiQueryInterface $query) {\n // Query options.\n $query_options = $this->getSearchQueryOptions($query);\n\n // Main query.\n $params = $query->getOption('ElasticParams');\n $body = &$params['body'];\n\n // Set the size and from parameters.\n $body['from'] = $query_options['query_offset'];\n $body['size'] = $query_options['query_limit'];\n\n // Sort\n if (!empty($query_options['sort'])) {\n $body['sort'] = $query_options['sort'];\n }\n\n $body['fields'] = array();\n $fields = &$body['fields'];\n\n // Handle spellcheck if enabled\n $this->buildSpellcheckQuery($query, $params);\n\n /**\n * $query_options['spatials']:\n * - field: The Search API field identifier of the location field. Must be indexed\n * as type \"location\".\n * - lat: The latitude of the point on which this location parameter is centered.\n * - lon: The longitude of that point.\n * - radius: (optional) If results should be filtered according to their distance\n * to the point, the maximum distance at which a point should be included (in\n * kilometers).\n * - method: (optional) The method to use for filtering. This is backend-specific\n * and not guaranteed to have an effect. Service classes should ignore values of\n * this option which they don't recognize.\n */\n // Search API Location support.\n if (!empty($query_options['spatials'])) {\n foreach ($query_options['spatials'] as $i => $spatial) {\n if (empty($spatial['field']) || empty($spatial['lat']) || empty($spatial['lon'])) {\n continue;\n }\n\n // Shortcut to easily reuse the field and point.\n $field = $spatial['field'];\n $point = array(\n 'lat' => (float) $spatial['lat'],\n 'lon' => (float) $spatial['lon'],\n );\n\n // Prepare the filter settings.\n if (isset($spatial['radius'])) {\n $radius = (float) $spatial['radius'];\n }\n\n // TODO: Implement the other geo filter types.\n // TODO: Implement the functionality to have multiple filters together\n // with the geo filters.\n\n // // Geo bounding box filter.\n // $query_options['query_search_filter'] = array(\n // 'geo_bounding_box' => array(\n // $spatial['field'] => array(\n // 'top_left' => array(\n // 'lat' => '',\n // 'lon' => '',\n // ),\n // 'bottom_right' => array(\n // 'lat' => '',\n // 'lon' => '',\n // ),\n // ),\n // ),\n // );\n\n // Geo Distance filter.\n $geo_distance_filter = array(\n 'geo_distance' => array(\n 'distance' => $radius . 'km',\n $spatial['field'] => $point,\n ),\n );\n\n if (!empty($query_options['query_search_filter'])) {\n $query_options['query_search_filter'] = array(\n 'and' => array(\n $query_options['query_search_filter'],\n $geo_distance_filter\n ),\n );\n } else {\n $query_options['query_search_filter'] = $geo_distance_filter;\n }\n\n // // Geo distance range filter.\n // $query_options['query_search_filter'] = array(\n // 'geo_distance_range' => array(\n // 'from' => '',\n // 'to' => '',\n // $spatial['field'] => $point,\n // ),\n // );\n\n // // Geo polygon filter.\n // $query_options['query_search_filter'] = array(\n // 'geo_polygon' => array(\n // $spatial['field'] => array(\n // 'points' => array(),\n // ),\n // ),\n // );\n\n // // Geoshape filter.\n // $query_options['query_search_filter'] = array(\n // 'geo_shape' => array(\n // $spatial['field'] => array(\n // 'shape' => array(\n // 'type' => 'envelope',\n // 'coordinates' => array(),\n // ),\n // ),\n // ),\n // );\n\n // // Geohash cell filter.\n // $query_options['query_search_filter'] = array(\n // 'geohash_cell' => array(\n // $spatial['field'] => $point,\n // 'precision' => '',\n // 'neighbors' => '',\n // ),\n // );\n }\n }\n\n // Build the query.\n if (!empty($query_options['query_search']) && !empty($query_options['query_search_filter'])) {\n $body['query']['filtered']['query'] = $query_options['query_search'];\n $body['query']['filtered']['filter'] = $query_options['query_search_filter'];\n }\n elseif (!empty($query_options['query_search'])) {\n if (empty($body['query'])) {\n $body['query'] = array();\n }\n $body['query'] += $query_options['query_search'];\n }\n elseif (!empty($query_options['query_search_filter'])) {\n $body['filter'] = $query_options['query_search_filter'];\n }\n\n // TODO: Handle fields on filter query.\n if (empty($fields)) {\n unset($body['fields']);\n }\n\n if (empty($body['filter'])) {\n unset($body['filter']);\n }\n\n if (empty($query_body)) {\n $query_body['match_all'] = array();\n }\n\n // Preserve the options for futher manipulation if necessary.\n $query->setOption('ElasticParams', $params);\n return $params;\n }",
"public function query(IQuery $query);",
"public function query($name)\n\t{\n\t\t$obj = new PacoQuery($this, $name);\n\n\t\t// key always sent\n\t\t$obj->add('api_key', \t$this->api_key);\n\t\t$obj->add('method', \t'bucket.query');\n\n\t\t// return instance of the data object\n\t\treturn $obj;\n\t}",
"public function getInstanceQuery()\n {\n return $this->get(self::_INSTANCE_QUERY);\n }",
"public function testGetQuery()\r\n {\r\n $ay = $this->getTestObject();\r\n $query = $ay->getQuery();\r\n $this->assertInstanceOf('\\\\AboutYou\\\\SDK\\\\Query', $query);\r\n }",
"public function query()\n {\n if ($model = $this->model) {\n return new $model();\n }\n }",
"function addQuery() {}",
"public function createQueryBuilder()\n {\n return new Query\\QueryBuilder($this);\n }",
"public function testGetQuery()\r\n {\r\n $shopApi = $this->getTestObject();\r\n $query = $shopApi->getQuery();\r\n $this->assertInstanceOf('Collins\\\\ShopApi\\\\Query', $query);\r\n }",
"abstract protected function initQuery(Query $query): Query;",
"public function queryBuilder();",
"public function queryBuilder();",
"protected function queryInfoById() {\n\t\tglobal $query, $lang, $wtcDB;\n\t\t\n\t\t$getWord = new Query($query['lang_words']['get'], Array(1 => $this->wordid));\n\t\n\t\t$this->info = parent::queryInfoById($getWord);\n\t}",
"public function newQuery()\n {\n $builder = $this->newAlfrescoBuilder($this->getConnection());\n $builder->setModel($this);\n return $builder;\n }",
"public function newQuery($action,$name=null){\n $name = isset($name) ? $name : count($this->querys);\n $this->querys[$name] = new ECP_DatabaseQuery($action,$this->_conf);\n return $this->querys[$name];\n }",
"public function createQuery()\n\t{\n\t\treturn $this->pp->createQuery('modules_blog/post');\n\t}",
"protected function createQuery()\n {\n return \\PropelQuery::from($this->class);\n }",
"public function query($query);",
"public function query($query);",
"public function query($query);",
"public function build(): ExecuteSQLRequest\n\t{\n\t\t$instance = new ExecuteSQLRequest();\n\t\tif ($this->databaseId === null) {\n\t\t\tthrow new BuilderException('Property [databaseId] is required.');\n\t\t}\n\t\t$instance->databaseId = $this->databaseId;\n\t\tif ($this->query === null) {\n\t\t\tthrow new BuilderException('Property [query] is required.');\n\t\t}\n\t\t$instance->query = $this->query;\n\t\treturn $instance;\n\t}",
"public function createQueryWithHttpInfo($body = null, $fields = null)\n {\n $returnType = '\\Looker\\Model\\Query';\n $request = $this->createQueryRequest($body, $fields);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Looker\\Model\\Query',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Looker\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Looker\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 409:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Looker\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 422:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Looker\\Model\\ValidationError',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function createquery(\\Google\\Service\\DoubleClickBidManager\\Query $postBody, $optParams = array())\n {\n $params = array('postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('createquery', array($params), 'Google\\Service\\DoubleClickBidManager\\Query');\n }",
"public function createQuery()\n {\n $query = parent::createQuery();\n $query->getQuerySettings()->setRespectStoragePage(false);\n return $query;\n }",
"public function _query()\n {\n }",
"public function post($apiQuery, $options = array());",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"protected function _make_history_item_query ()\n {\n include_once ('webcore/db/history_item_query.php');\n return new ENTRY_HISTORY_ITEM_QUERY ($this->app);\n }",
"function query() {\n $this->query = new DrupalConnectAppsQuery($this);\n\n return $this->query;\n }",
"private function _handle_query()\n\t{\t\n\t\t$this->_http_query = $this->_request;\n\t\t\n\t\t$response_object = $this->payments->gateway_request($this->_api_endpoint, $this->_http_query, \"Content-Type: application/x-qbmsxml\");\t\n\t\t$response = $this->_parse_response($response_object);\n\t\t\n\t\treturn $response;\n\t}",
"public function query()\n {\n return new QueryBuilder(\n $this, $this->getQueryGrammar(), $this->getPostProcessor()\n );\n }",
"public function query()\n {\n return new QueryBuilder(\n $this, $this->getQueryGrammar(), $this->getPostProcessor()\n );\n }",
"public function build()\n {\n return new QueryConfiguration(\n $this->drawCall,\n $this->start,\n $this->length,\n $this->searchValue,\n $this->searchRegex,\n $this->columSearches,\n $this->columnOrders\n );\n }",
"public function createQuery(Collection $collection, QueryCreateStruct $queryCreateStruct): Query;",
"public function query(): ?Builder;",
"public function query() {\n\n }",
"public function createQuery()\n\t{\n\t\t$this->tab[] = $this->action;\n\t\t$this->tab[] = !is_array($this->field) ? $this->field : join(', ',$this->field);\n\t\t$this->tab[] = ' FROM '.$this->from;\n\t\tif(!empty($this->where)){$this->tab[] = 'WHERE '.$this->where;}\n\t\tif(!empty($this->and)){$this->tab[] = 'AND '.$this->and;}\n\t\tif(!empty($this->or)){$this->tab[] = 'OR '.$this->or;}\n\t\tif(!empty($this->in)){$this->tab[] = 'IN '.$this->in;}\n\t\tif(!empty($this->beetween)){$this->tab[] = 'BEETWEEN '.$this->beetween;}\n\t\tif(!empty($this->not)){$this->tab[] = 'NOT '.$this->not;}\n\t\tif(!empty($this->like)){$this->tab[] = 'LIKE '.$this->like;}\n\t\tif(!empty($this->order)){$this->tab[] = 'ORDER BY '.$this->order;}\n\t\treturn join(\" \",$this->tab);\n\t}"
] | [
"0.72192085",
"0.65358967",
"0.640208",
"0.6401989",
"0.6401989",
"0.6401989",
"0.6296883",
"0.6136078",
"0.60938644",
"0.6064766",
"0.60281855",
"0.592733",
"0.592733",
"0.58809245",
"0.58377916",
"0.58302915",
"0.5771945",
"0.57294166",
"0.5620584",
"0.55976236",
"0.55974036",
"0.5591965",
"0.5548032",
"0.55426055",
"0.5539922",
"0.5531161",
"0.5511849",
"0.5488664",
"0.5483238",
"0.5467523",
"0.5454233",
"0.53992885",
"0.5386306",
"0.53543884",
"0.5349061",
"0.5338606",
"0.5312547",
"0.5309335",
"0.5309335",
"0.5309335",
"0.53063506",
"0.52963144",
"0.5285835",
"0.52781546",
"0.52693415",
"0.5265797",
"0.5262501",
"0.5248704",
"0.5221474",
"0.5206179",
"0.52008796",
"0.519482",
"0.516727",
"0.5159056",
"0.5142209",
"0.5137472",
"0.51256114",
"0.5115446",
"0.51009035",
"0.5100527",
"0.5088084",
"0.50865275",
"0.50791925",
"0.5078648",
"0.5075513",
"0.5075336",
"0.50588053",
"0.50588053",
"0.50567853",
"0.5054481",
"0.5053455",
"0.5050452",
"0.50485593",
"0.50405806",
"0.50405806",
"0.50405806",
"0.50369704",
"0.5027602",
"0.5026189",
"0.502026",
"0.5010425",
"0.5008605",
"0.5008047",
"0.5008047",
"0.5008047",
"0.5008047",
"0.5008047",
"0.5008047",
"0.5008047",
"0.5008047",
"0.5008047",
"0.5006889",
"0.5005467",
"0.5004555",
"0.50000185",
"0.50000185",
"0.4999316",
"0.49975294",
"0.49974892",
"0.49920753",
"0.49905613"
] | 0.0 | -1 |
Query to web service. | public function query($object, $fields = array(), $function = null, $method = "GET") {
// sets previous send query
$this->setObject($object);
$this->setFields($fields);
$this->setFuction($function);
$this->setMethod($method);
// send query to infoblox server
$this->sendQueryByCurl();
// return the results
return $this->getResult();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function query();",
"public function query();",
"public function query();",
"public function query();",
"function query() {}",
"private function _handle_query()\n\t{\t\n\t\t$this->_http_query = $this->_request;\n\t\t\n\t\t$response_object = $this->payments->gateway_request($this->_api_endpoint, $this->_http_query, \"Content-Type: application/x-qbmsxml\");\t\n\t\t$response = $this->_parse_response($response_object);\n\t\t\n\t\treturn $response;\n\t}",
"public function queryAction()\n {\n $this->logger = Zend_Registry::get('logger');\n $this->getHelper('ViewRenderer')->setNoRender('false');\n $this->_helper->layout()->disableLayout();\n try {\n if ($this->getRequest()->isPost()) {\n $this->logger->log('Post Parameters Received', Zend_Log::INFO,\n 'PASS');\n $data = $this->getRequest()->getPost();\n if (! $data['complain_type'] || ! $data['district_id'] || ! $data['date']) {\n throw new Exception('Bad Parameters', '400');\n }\n $model = new Model_DbTable_Complain();\n $response = $model->getComplainsByCondition($data);\n if ($response) {\n $this->getResponse()->setHttpResponseCode(200);\n $this->logger->log('Succesful QueryPerformed', Zend_Log::INFO,\n 'SUCCESS');\n $xml = $model->xmlConverter($response);\n print $xml;\n } else {\n throw new Exception('Service Unavailable', '503');\n }\n } else {\n throw new Exception('Bad Parameters', '400');\n }\n } catch (Exception $e) {\n $this->getResponse()->setHttpResponseCode($e->getCode());\n if ($e->getCode() == 503) {\n $this->logger->log($e->getMessage(), Zend_Log::WARN,\n 'SYSTEM ERROR');\n } else {\n $this->logger->log($e->getMessage(), Zend_Log::ERR, 'QUERY: ERROR');\n }\n $this->_response->setHttpResponseCode($e->getCode()); \n print 0;\n }\n }",
"function ODQuery_QueryService() {\n\t\t$this->client = new SoapClient(__DIR__.'/../wsdl/QueryService2.wsdl',array(\n 'exceptions'=>true,\n 'encoding'=>'utf-8')\n );\n\t\t$this->soapException = new ODSubmission_SoapException();\n\t}",
"public static function query()\n {\n }",
"function query() {\n }",
"public function queryWeb($query){\n\t\t\treturn $this->query('Web',$query);\n\t\t}",
"abstract public function query();",
"public function query()\n {\n }",
"public function query()\n {\n }",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"abstract protected function getQuery();",
"public abstract function get_query();",
"public function getQuery();",
"public function getQuery();",
"public function getQuery();",
"public function getQuery();",
"public function getQuery();",
"public function getQuery();",
"public function getQuery();",
"public function getQuery();",
"public function getQuery();",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public abstract function getQuery();",
"public function Query() {\n \n }",
"function getQuery() ;",
"public function search()\n {\n return $this->call('GET', $this->endpoint);\n }",
"public function query()\n\t{\n\t\t\n\t}",
"public function getQuery() {}",
"public function getQuery() {}",
"public function _query()\n {\n }",
"function query($param) {\n $curl = curl_init();\n $userName = $param;\n curl_setopt_array($curl, array(\n CURLOPT_URL => \"https://develop.datacrm.la/datacrm/pruebatecnica/webservice.php?operation=query&sessionName=\" . $userName . \"&query=select%20%2A%20from%20Contacts;\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => array(\n \"Accept: */*\",\n \"Accept-Encoding: gzip, deflate\",\n \"Cache-Control: no-cache\",\n \"Connection: keep-alive\",\n \"Host: develop.datacrm.la\",\n \"Postman-Token: 438973a9-ec4c-4c01-bc55-71ad624b746d,206316aa-adaa-4963-b5c6-bdacd9e13eb0\",\n \"User-Agent: PostmanRuntime/7.19.0\",\n \"cache-control: no-cache\"\n ),\n ));\n\n $response = curl_exec($curl);\n $err = curl_error($curl);\n\n curl_close($curl);\n\n if ($err) {\n echo \"cURL Error #:\" . $err;\n } else {\n echo $response;\n }\n }",
"public function adv_data_search_get()\n {\n $sutil = new CILServiceUtil();\n $from = 0;\n $size = 10;\n\n $temp = $this->input->get('from', TRUE);\n if(!is_null($temp))\n {\n $from = intval($temp);\n }\n $temp = $this->input->get('size', TRUE);\n if(!is_null($temp))\n {\n $size = intval($temp);\n }\n $data = file_get_contents('php://input', 'r');\n \n $json = $sutil->adv_data_search($data, $from, $size);\n $this->response($json);\n }",
"public function Query(){\n\t}",
"public function Query(){\n\t}",
"public function Query(){\n\t}",
"public function query() {\n\n }",
"public function GetSearch(){\n if($this->get_request_method()!= \"POST\"){\n $this->response('',406);\n }\n $user_id = $_POST['user_id'];\n $keyword = $_POST['keyword'];\n $type = $_POST['type'];\n $user_auth_key = $_POST['user_auth_key'];\n $latitude = $_POST['latitude'];\n $longitude = $_POST['longitude'];\n $page_no = $_POST['page_no'];\n $format = $_POST['format'];\n $db_access = $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n if(!empty($keyword) && !empty($type) && !empty($user_auth_key) && !empty($page_no)){\n $result = $res->CheckAuthentication($user_id, $user_auth_key, $conn);\n if($result != false){\n $res->get_search($user_id, $keyword, $type, $latitude, $longitude, $page_no, $conn);\n $this->dbClose();\n }\n else{\n $this->dbclose();\n $error = array('status' => \"0\", \"msg\" => \"Not Authorised To get detail\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($res->json($error), 200);\n }\n }\n else{\n $error = array('status' => \"0\", \"msg\" => \"Fill All Fields\");\n ($_REQUEST['format']=='xml')?$this->response($this->xml($error), 200):$this->response($res->json($error), 200);\n }\n }",
"public function search() {\r\n\t\t$mintURL = $this->Configuration->findByName('Mint URL');\r\n\t\t$queryURL = $mintURL['Configuration']['value'];\r\n\t\t$query = '';\r\n\t\tif (isset($this->params['url']['query'])) {\r\n\t\t\t$query = $this->params['url']['query'];\r\n\t\t}\r\n\r\n\t\t$queryURL = $queryURL.\"/Parties_People/opensearch/lookup?searchTerms=\".$query;\r\n\t\t$queryResponse = \"error\";\r\n\n\t\t$ch = curl_init();\r\n\t\t$timeout = 5;\r\n\t\tcurl_setopt($ch,CURLOPT_URL,$queryURL);\r\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,1);\r\n\t\tcurl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);\r\n\t\t$queryResponse = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\t$this->autoRender = false;\r\n\t\t$this->response->type('json');\r\n\r\n\t\t$this->response->body($queryResponse);\r\n\t}",
"public function query($params)\n { \n return $this->request(Resource::RESOURCE_QUERY, $params);\n }",
"public function query(): Query\n {\n return new Query($this->getWebservice(), $this);\n }",
"public function Query(){\r\n\t\treturn self::get_query();\r\n\t}",
"public function execute()\n\t{\n\t\t$filterstr = implode(\".\\n\", $this->getFilters());\n\t\t$sparqlQuery = $this->constructQuery( $filterstr );\n\t\t\n\t\t@header('Content-type: text/plain');\n\t\t\n\t\t$engine = new SPARQL_Engine;\n\t\t$engine->useSparql($sparqlQuery);\n\t\t$engine->setResultHandler(new Single_Value_Extractor);\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$engine->runQuery();\n\t\t} catch(Single_Value_Extractor $e)\n\t\t{\n\t\t\techo array_shift($e->getFoundValue());\n\t\t\techo \"\\n\".preg_replace('/\\t\\t\\t/', '', $sparqlQuery).\"\\n\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tthrow new Exception('There was no result from the given SPARQL');\n\t}",
"public function getUrlWebService() {\r\n\r\n if(strstr($_SERVER['HTTP_HOST'], 'hom1')) {\r\n $valregoid = 6;\r\n $valtpvoid = 3;\r\n }\r\n elseif(strstr($_SERVER['HTTP_HOST'], 'intranet')) {\r\n $valregoid = 7;\r\n $valtpvoid = 3;\r\n }\r\n else {\r\n $valregoid = 6;\r\n $valtpvoid = 3;\r\n }\r\n\r\n $sql = \"\r\n SELECT \r\n valvalor\r\n FROM\r\n valor\r\n WHERE\r\n valregoid = $valregoid\r\n AND \r\n valtpvoid = $valtpvoid\";\r\n\r\n $result = $this->_fetchAssoc(pg_query($this->_adapter, $sql));\r\n\r\n return $result['valvalor']; \r\n }",
"public function searchuserAction(){\n\n $data = [ 'search' => 'search' , 'id' => 1 ];\n $client = new Client();\n $ServerPort =\"\";\n if($_SERVER['SERVER_PORT']){\n $ServerPort = ':'.$_SERVER['SERVER_PORT'];\n }\n $client->setUri('http://'.$_SERVER['SERVER_NAME'].$ServerPort.'/order-rest');\n $client->setOptions(array(\n 'maxredirects' => 5,\n 'timeout' => 30\n ));\n $client->setParameterPost(\n $data\n );\n $client->setMethod( Request::METHOD_POST );\n $response = $client->send();\n if ($response->isSuccess()) {\n $result = json_decode( $response->getContent() , true);\n }\n return $this->redirect()->toRoute('ordermanagement', array('action' => 'index') );\n }",
"public function showAllFlights($query){\n $result=request($query) or die(\"request ne pas valid tester request\");\n return $result;\n }",
"protected function _handle_query()\n\t{\t\n\t\t$this->_http_query = $this->_request;\n\t\t$response_object = $this->payments->gateway_request($this->_api_endpoint, $this->_http_query, 'application/x-www-form-urlencoded');\n\t\treturn $this->_parse_response($response_object);\n\t}",
"public function getWSResponse()\r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\t// Check if _HTTPRequest variable is correctly instancied.\r\n\t\t\t\tif (!isset($this->_HTTPRequest[\"auth\"], $this->_HTTPRequest[\"name\"]))\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception(\"Requête incorrecte, variables non définies\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Check if the queries dictionnary has been correctly loaded.\r\n\t\t\t\tif ($this->_WSData == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception(\"Impossible d'accéder aux données. Merci de réessayer.\");\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Check if the authentification key is correct.\r\n\t\t\t\tif ($this->_auth != $this->_HTTPRequest[\"auth\"])\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception(\"Echec de l'authentification.\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Check if the query requested (by name) is in the dictionnary.\r\n\t\t\t\t$QueryName = null;\r\n\t\t\t\tforeach($this->_WSData as $WSname => $WSdata)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($WSname == $this->_HTTPRequest[\"name\"])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$QueryName = $WSname;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Throw new exception if the query requested isn't in the dictionnary\r\n\t\t\t\tif (is_null($QueryName))\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception(\"Impossible de trouver la requête demandée.\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Check if the param's list sent is the same as param's list relative to the query in the dictionnary.\r\n\t\t\t\t$allParamExist = false;\r\n\t\t\t\tif (count($this->_WSData[$QueryName][\"param\"]) < 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t$allParamExist = true;\r\n\t\t\t\t} \r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\tforeach($this->_HTTPRequest[\"param\"] as $HRp => $HRv)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$paramExist = false;\r\n\t\t\t\t\t\tforeach($this->_WSData[$QueryName][\"param\"] as $WSp)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif ($HRp == $WSp)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$paramExist = true;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!$paramExist)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$allParamExist = false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$allParamExist = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\r\n\r\n\t\t\t\t// Throw new exception if the param's list sent doesn't match.\r\n\t\t\t\tif (is_null($allParamExist))\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception(\"Erreur : les paramètres passés sont incorrects.\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Prepare the query and execute it. Here we are using our own db class (simplification of PDO object, you can adapt this part with your own database class).\r\n\t\t\t\t$bdd = new Bdd();\r\n\t\t\t\t$bdd = $bdd->bddConnection();\r\n\t\t\t\t\r\n\t\t\t\t$query = $bdd->prepare($this->_WSData[$QueryName][\"sql\"]);\r\n\t\t\t\tforeach($this->_WSData[$QueryName][\"param\"] as $p)\r\n\t\t\t\t{\r\n\t\t\t\t\t$query->bindValue($p, $this->_HTTPRequest[\"param\"][$p]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$query->execute();\r\n\t\t\t\r\n\t\t\t\t// Get the result of the query and prepare the response.\r\n\t\t\t\tif ($this->_WSData[$QueryName][\"type\"] == \"select\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->_response[\"data\"] = $query->fetchAll();\r\n\t\t\t\t}\r\n\t\t\t\telse if ($this->_WSData[$QueryName][\"type\"] == \"insert\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->_response[\"lastId\"] = $bdd->lastInsertId();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->_response[\"error\"] = false;\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// In case of any other exception (mostly for PDO/SQL error).\r\n\t\t\tcatch (Exception $e) \r\n\t\t\t{\r\n\t\t\t\t$this->_response[\"msg\"] = $e->getMessage();\r\n\t\t\t}\r\n\t\t}",
"public function searchService_get($query=\"\")\n {\n $em = $this->doctrine->em;\n $serviceRepo = $em->getRepository('Entities\\Service');\n $criteria = new \\Doctrine\\Common\\Collections\\Criteria();\n //AQUI TODAS LAS EXPRESIONES POR LAS QUE SE PUEDE BUSCAR CON TEXTO\n $expresion = new \\Doctrine\\Common\\Collections\\Expr\\Comparison(\"title\", \\Doctrine\\Common\\Collections\\Expr\\Comparison::CONTAINS, $query);\n $expresion2 = new \\Doctrine\\Common\\Collections\\Expr\\Comparison(\"subtitle\", \\Doctrine\\Common\\Collections\\Expr\\Comparison::CONTAINS, $query);\n// $expresion3 = new \\Doctrine\\Common\\Collections\\Expr\\Comparison(\"title\", 'ENDS_WITH', $query);\n\n $criteria->where($expresion);\n $criteria->orWhere($expresion2);\n// $criteria->orWhere($expresion3);\n\n $respuesta = $serviceRepo->matching($criteria);\n foreach ($respuesta as $service) {\n $service->loadRelatedData(null, null, site_url());\n }\n $response[\"desc\"] = \"Resultados de la busqueda\";\n $response[\"query\"] = $query;\n $response[\"count\"] = 0;\n $response[\"data\"] = $respuesta->toArray();\n $response[\"count\"] = count($response[\"data\"]);\n $this->set_response($response, REST_Controller::HTTP_OK);\n }",
"public function query(): QueryInterface;",
"private function rest_search() {\n\t\t// return json elements here\n\t}",
"abstract function query( $p_filter_input );",
"public function query(): string;",
"public function query( $query )\n\t {\n\t\t try {\n\t\t\t $response = $this->_sf_connection->query( $query );\n\t\t\t if ( $this->_debug ) $this->_response($response);\n\t\t\t if ( $response )\n\t\t\t \treturn $response;\n\t\t\t else\n\t\t\t\tthrow new Exception(ERROR_NO_RESPONSE);\n\t\t } catch( Exception $e ) {\n\t\t\t $this->_error( $e );\n\t\t\t return false;\n\t\t }\n\t }",
"public function query($query);",
"public function query($query);",
"public function query($query);",
"public function query($verb, $url, array $data = array())\n\t{\n\t\treturn $this->get_resource_contents($this->call_webservice($verb, $url, $data));\n\t}",
"public function call(){\n \n $service = (string)$this->_service;\n \n if(!$this->_params){\n $this->setParams();\n }\n \n $response = $this->_soapClient->$service($this->_params); \n \n $serviceResult = $service.'Result';\n \n $xml = $response->$serviceResult; \n \n return $xml;\n\n }",
"public function query($method, $args = Array()) {\n \n $terms = \"\";\n \n if(!empty($args)) {\n\t\t\t\t\n\t\t\tforeach($args as $n => $v) {\n\t\t\t\t\n\t\t\t\t$terms .= '&' . $n . '=' . $v;\n\t\t\t\t \n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->iface = _APISERVER_ . \"/\" . $method . \"?key=\" . _KEY_ . \"&o=\" . _OUTPUT_ . $terms;\n\t\t\n if (!$this->xml = file_get_contents($this->iface)) {\n \t\techo '<!-- Request [ '.$this->iface.' ] -->';\n\n return false;\n \t\t\n } else {\n\n // Let's use the SimpleXML to drop the whole XML\n // output into an object we can later interact with easilly\n $this->xmlObj = new SimpleXMLElement($this->xml, LIBXML_NOCDATA);\n \n return $this->xmlObj;\n \t\t\n }\n \n }",
"function queryService($uid) {\n\t\t// VERSIONING:\n\t\t// we need the hidden records as well!\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t\t\t'tx_civserv_service.uid,\n\t\t\t\t\t\t tx_civserv_service.pid,\n\t\t\t\t\t\t tx_civserv_service.sv_name,\n\t\t\t\t\t\t tx_civserv_service.sv_descr_short,\n\t\t\t\t\t\t tx_civserv_service.sv_descr_long,\n\t\t\t\t\t\t tx_civserv_service.sv_image,\n\t\t\t\t\t\t tx_civserv_service.sv_image_text,\n\t\t\t\t\t\t tx_civserv_service.sv_fees,\n\t\t\t\t\t\t tx_civserv_service.sv_documents,\n\t\t\t\t\t\t tx_civserv_service.sv_legal_local,\n\t\t\t\t\t\t tx_civserv_service.sv_legal_global,\n\t\t\t\t\t\t tx_civserv_service.sv_3rdparty_checkbox,\n\t\t\t\t\t\t tx_civserv_service.sv_3rdparty_link,\n\t\t\t\t\t\t tx_civserv_service.sv_3rdparty_name,\n\t\t\t\t\t\t tx_civserv_service.sv_model_service,\n\t\t\t\t\t\t tx_civserv_service.fe_group',\n\t\t\t\t\t\t'tx_civserv_service',\n\t\t\t\t\t\t'1 '.\n\t\t\t\t\t\t$this->cObj->enableFields('tx_civserv_service').\n\t\t\t\t\t\t' AND uid = ' . intval($uid),\n\t\t\t\t\t\t'',\n\t\t\t\t\t\t'',\n\t\t\t\t\t\t'');\n\t\treturn $res;\n\t}",
"public function indexAction()\n {\n\ttry {\n \t// print_r($this->getRequest()->getQuery());\n\t\t\n $sE = new \\CL\\Service\\Entity\\CLServiceEntity($this->getRequest()->getQuery());\n\n $s = new \\CL\\Service\\CLService($sE);\n\t\t$startdate = strtotime(\"-2 day\") * 1000;\n\t\t$enddate = strtotime(\"+30 day\") * 1000;\n\t\t// print_r($startdate);\n\t\t// print_r(\"\\n\");\n\t\t// print_r($enddate);\n $wasSuccessful = $s->queryEventsAPI($startdate, $enddate);\n \t\n \n if ($wasSuccessful) {\n\t $result = new JsonModel(array(\n \t\t\t'success'=>true,\n \t\t));\n } else {\n\t $result = new JsonModel(array(\n \t\t\t'success'=>false,\n \t\t));\n }\n \n return $result;\n \n } catch(\\Exception $e)\n\t {\n\t throw new ControllerException('Error Submitting Events API Request', $e);\n\t }\n }",
"public function queryService($request)\n {\n $runtime = new RuntimeOptions([]);\n $headers = [];\n\n return $this->queryServiceEx($request, $headers, $runtime);\n }",
"public function query() {\n if (!$this->servicesHealthStatus->getFetcherState()) {\n $this->messenger->addError(t('The fetcher services does not responding'));\n return [];\n }\n\n $query = <<<'GRAPHQL'\n query {\n systemField {\n Id\n Label\n }\n reportsType {\n Id\n Label\n }\n fromYearRange {\n Years\n Quarters {\n Id\n Label\n }\n }\n toYearRange {\n Years\n Quarters {\n Id\n Label\n }\n }\n }\n GRAPHQL;\n\n $response = $this->sendQuery($query);\n return json_decode($response, true)['data'];\n }",
"abstract public function\r\n\t\tget_query_for_something();"
] | [
"0.67486423",
"0.666413",
"0.666413",
"0.666413",
"0.6575142",
"0.64744765",
"0.6472993",
"0.64403135",
"0.6426635",
"0.62756807",
"0.62615514",
"0.6232975",
"0.61950934",
"0.61950934",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.61426985",
"0.61271334",
"0.6125445",
"0.6125445",
"0.6125445",
"0.6125445",
"0.6125445",
"0.6125445",
"0.6125445",
"0.6125445",
"0.6125445",
"0.6106601",
"0.6106601",
"0.6106601",
"0.6106601",
"0.6106601",
"0.6106601",
"0.6106601",
"0.6106601",
"0.6106601",
"0.6090757",
"0.6090552",
"0.6080091",
"0.60623056",
"0.605936",
"0.6051527",
"0.6051527",
"0.6038475",
"0.59977275",
"0.59838426",
"0.5956452",
"0.5956452",
"0.5956452",
"0.5927183",
"0.59243125",
"0.58926845",
"0.5865256",
"0.58058745",
"0.58018744",
"0.5796284",
"0.5759965",
"0.5759164",
"0.57308215",
"0.5723291",
"0.5717317",
"0.56824154",
"0.56749207",
"0.56734085",
"0.56525224",
"0.56484693",
"0.56471795",
"0.5642415",
"0.5642415",
"0.5642415",
"0.56394196",
"0.56388944",
"0.562184",
"0.56004024",
"0.5572808",
"0.5546017",
"0.55456996",
"0.5541256"
] | 0.0 | -1 |
Set the object to request. Example: "record:a", "record:ptr", "network"... | private function setObject($object) {
$this->object = $object;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setObject($object);",
"public function setObject(string $object): void\n {\n $this->_object = $object;\n }",
"public function setObject(string $object): void\n {\n $this->_object = $object;\n }",
"function record($request) {\n\t\t$type = $request->getVar('type');\n\t\t$value = $request->getVar('value');\n\t\tif ($type && $value) {\n\t\t\t$record = DataObject::get_one($this->dataObject->class, \"\\\"$type\\\" = '$value'\");\n\t\t\theader(\"Content-Type: text/plain\");\n\t\t\techo json_encode(array(\"record\"=>$record->toMap()));\n\t\t}\n\t}",
"public function setRecord($record){\n $this->record = $record;\n }",
"public function __construct($record, $request)\n {\n $this->record = $record;\n $this->request = $request->all();\n }",
"function setRequest($request) {\n\t\t$this->m_request = $request;\n\t}",
"protected function loadRequest($obj=null)\r\n {\r\n if (!$obj)\r\n $target = &$this;\r\n else\r\n $target = &$obj;\r\n\r\n foreach ($_REQUEST as $key => $value) { // load query values\r\n $target->$key = $value;\r\n }\r\n }",
"public function setObject(?string $object): self\n {\n $this->object = $object;\n\n return $this;\n }",
"public function setObject(?string $object): self\n {\n $this->object = $object;\n\n return $this;\n }",
"public function setObject(?string $object): self\n {\n $this->object = $object;\n\n return $this;\n }",
"public function setObject($object) {\n $this->object = $object;\n }",
"public function setRequest($request);",
"function setRequest($value) {\n $this->request = $value;\n }",
"public static function set_request($request){\n\t\t\tself::$request = $request;\n\t\t}",
"public function setObject($obj)\n {\n $this->service = $obj;\n }",
"private function __construct($record) {\n $this->record = $record;\n }",
"function __construct()\n\t{\n\t\t$this->obj = \"Send\";\n\t}",
"function fill($request) {\n foreach($request->getParams() as $field=>$value) {\n $this->$field = $value;\n }\n }",
"function setRequest($request) {\n $this->request = $request;\n }",
"public function setObject(object $object): self;",
"public function __construct($obj)\r\n\t\t{\r\n\t\t\t$this->_auth = \"Any authentification key you would like to use\";\r\n\t\t\t$this->_WSDataPath = \"WSDictionnary.json\";\r\n\t\t\t$this->_WSData = $this->getWSData();\r\n\t\t\t\r\n\t\t\t$this->_HTTPRequest = $obj;\r\n\r\n\t\t\t$this->_response[\"error\"] = true;\r\n\t\t\t$this->_response[\"msg\"] = \"\";\r\n\t\t\t$this->_response[\"data\"] = null;\r\n\t\t\t$this->_response[\"lastId\"] = null;\r\n\t\t}",
"public function set(string $serviceName, $object);",
"public function __construct($record)\n {\n $this->record = $record;\n }",
"public function setObject(object $object): void;",
"function _Parser($object)\n\t{\n\t\t$this->object = $object;\n\t}",
"abstract public function setRecordEntity();",
"function set_obj(&$obj)\n{\n\t$this->_obj = $obj;\n}",
"public final function set_request($request = array()) {\n\t \t\n\t \t/* set vars from the server request */\n\t\t$this->request = $request;\n\t\t\n\t\t/* extracts the method, but this is not really importand to do at this point, as it will be set later too */\n\t\t/* $this method is also set when the corresponding action ($this-read, create, ...) is called */\n\t\tif( isset($request['method']))\n\t\t\t$this->request_method = $request['method'];\n\t\t\n\t\t/* extract query vars */\n\t\tif( isset($request['queryvars']))\n\t\t\t$this->request_query_vars = (array) $request['queryvars']; // array is expected\n\n\t\t/* looking for model ids in the request */\n\t\t$this->id = $this->_find_in_request($this->properties->id_attribute);\n\t\t$this->parent_id = $this->_find_in_request($this->properties->parent_id_attribute);\t\n\t\t\n\n\t\t/* USER HANDLING */\n\n\t \t/* is the user allowed to make this request */\n\t \tif ( ( $this->properties->access == \"loggedin\" ) && ( ! is_user_logged_in() ) ) {\n\t\t\t$this->set_error( 56, 'user must be logged in for this request' );\t\t\t\t \t\n\t \t}\n\t\t\n\t \t/* some extra authentication */\n\t \t/* is the uer allowed to make this request */\n \t\t$allowed = $this->is_authenticated($request, $this->request_method);\n \t\tif(! $allowed)\n\t\t\t$this->set_error( 56, 'user is not authenticated' );\t\t\t\t \t\n\t \t\t\n\t\t\n\t}",
"abstract protected function map_object_to_record($object, $record);",
"private function setRedis_set($gid, $object){\n $client = new Predis\\Client([\n 'scheme' => 'tcp',\n 'host' => '127.0.0.1',\n 'port' => 6379,\n ]);\n\t\t$object = json_encode($object);\n $client->set($gid, $object);\n }",
"public function setResource($type, $name, $object, ?\\SetaPDF_Core_Document $document = null) {}",
"public function for(stdClass $record);",
"public function set($object, $mapping);",
"public function setRequest($request)\n {\n $this->request = $request;\n }",
"public function setResponseObject($obj)\n {\n $this->responseObject = $obj;\n }",
"public function setResponseObject($obj)\n {\n $this->responseObject = $obj;\n }",
"public function setResponseObject($obj)\n {\n $this->responseObject = $obj;\n }",
"public function create($obj, $request)\n {\n }",
"public abstract function appendToRequest(&$requestBase, $requestObject);",
"protected function setUp()\n {\n $this->object = new Request('','','');\n }",
"protected function setUp()\n {\n \n\t$this->object = new Request(array(),array());\n }",
"private function fillObj($obj) {\n\t\t\n\t\t$obj->publisher = $_POST['publisher'];\n\t\t\n\t\t$obj->theme = $_POST['theme'];\n\t\t$obj->other = $_POST['other'];\n\n\t\t$obj->end \t= $_POST['date'];\n\n\t\t$obj->title = $_POST['title'];\n\t\t$obj->text \t= $_POST['text'];\r\n\t}",
"public function __construct($request,$idAgainstRequest)\n {\n $this->requestData = $request;\n $this->idAgainstRequest = $idAgainstRequest;\n }",
"public function __construct($request) {\n\t\t\n\t\t\t$this->_request = $request;\n\t\t\t\n\t\t}",
"public static function aliases(&$object) {\n\t\t\t$object->protocol = &$object->scheme;\n\t\t\t$object->username = &$object->user;\n\t\t\t$object->password = &$object->pass;\n\t\t\t$object->domain = &$object->host;\n\t\t\t$object->fqdn = &$object->host;\n\t\t}",
"private function PREPARE_OBJECT_VARIABLE_METHOD()\r\r {\r\r if($this->_type === 'POST')\r\r {\r\r foreach($this->_fields as $key=>$field)\r\r {\r\r $this->_object[$key]['VALUE'] = isset($_POST[$key])?$_POST[$key]:false;\r\r } \r\r } \r\r else if($this->_type === 'GET')\r\r {\r\r foreach($this->_fields as $key=>$field)\r\r {\r\r $this->_object[$key]['VALUE'] = isset($_GET[$key])?$_GET[$key]:false;\r\r } \r\r } \r\r }",
"protected function makeRequest($request)\n {\n foreach ($request as $key => $value) {\n\n if (is_object($value) || is_array($value)) {\n $this->$key = $this->makeRequest($value);\n } else {\n $this->$key = $value;\n }\n\n }\n }",
"function __set($name,$value) {\n\t\t$this->object[$name]=$value;\n\t}",
"public function setCurrentRequest(array $parsedRequest){\n\t\t\t$this->currentRequest = CurrentRequest::set($parsedRequest); \n\t\t}",
"function set_queried_object( $object, WP_Query &$query = null )\n {\n global $wp_query;\n\n if ( ! isset( $query ) ) {\n $query = &$wp_query;\n }\n\n $query->queried_object = $object;\n $query->queried_object_id = ( isset( $object->ID ) ? (int) $object->ID : 0 );\n }",
"function setObject(mofilmTrack $inObject) {\n\t\treturn $this->_setValue($inObject);\n\t}",
"function setParam($var, $val) {\n\t\t\t$this->obj[$var] = $val;\n\t\t}",
"function setPerson($input) {\n // NOTE: $input is of type setPerson\n // NOTE: should return an object of type setPersonResponse\n\n $x =new setPersonResponse();\n $x->return = 5;\n return $x;\n}",
"public function __construct($object) {\n foreach ($object as $key => $value) :\n $k = \"_$key\";\n $this->$k = $value;\n endforeach;\n }",
"protected function setUp()\n {\n $this->object = new Request;\n }",
"private function setStartRecord($start){\n\t\t$this->startRecord = $start;\n\t}",
"public function setMetaFrom($object);",
"public function __construct($wrequest)\n {\n //\n $this->wrequest = $wrequest;\n }",
"public function setRequest( $request ){\n \n $this->request = $request;\n \n }",
"function setArticle($object) { \n /* you can itentify the item with $object->Item->ShopId */ \n}",
"public function setRequestorName(?string $value): void {\n $this->getBackingStore()->set('requestorName', $value);\n }",
"public function __construct( ) {\n foreach( $_REQUEST as $property=>$value){\n $this->$property = $value;\n }\n \n }",
"public function __construct(Cpf_Core_Request $request)\n\t{\n\t\tparent::__construct();\n\t\tforeach ($request as $key=>$value)\n\t\t{\n\t\t\t$this->$key = $value;\n\t\t}\n\t}",
"public static function setHttp(\\stdClass $request)\n : self\n {\n static::$_request = $request;\n return static::$_instance;\n }",
"abstract protected function map_reford_to_object( $record );",
"public function load_from_object ($obj)\n {\n parent::load_from_object ($obj);\n $this->set_value ('name', $obj->title);\n $this->set_value ('orig_email', $obj->email);\n $this->set_value ('email', $obj->email);\n $this->set_value ('real_first_name', $obj->real_first_name);\n $this->set_value ('real_last_name', $obj->real_last_name);\n $this->set_value ('home_page_url', $obj->home_page_url);\n $this->set_value ('picture_url', $obj->picture_url);\n $this->set_value ('icon_url', $obj->icon_url);\n $this->set_value ('signature', $obj->signature);\n $this->set_value ('publication_state', History_item_silent);\n $this->set_value ('email_visibility', $obj->email_visibility);\n \n $this->set_visible ('title', $this->app->user_options->users_can_change_name);\n $this->set_visible ('password1', false);\n $this->set_visible ('password2', false);\n\n $icon_url = read_var ('icon_url');\n if ($icon_url)\n {\n $this->set_value ('icon_url', $icon_url);\n }\n else\n {\n $this->set_value ('icon_url', $obj->icon_url);\n }\n }",
"public function setObject($object): self\n {\n $this->setName($object['name']);\n $this->setEmail($object['email']);\n\n return $this;\n }",
"public function setRequest($request)\n {\n $this->request = str_split(preg_replace(\"/[^a-zA-Z0-9]+/\", \"\", strtoupper($request)));\n\n return $this;\n }",
"public function __construct($object)\n {\n $this->object = $object;\n }",
"public function __construct($object)\n {\n $this->object = $object;\n }",
"function setRequestUser($value)\n {\n $this->_props['RequestUser'] = $value;\n }",
"public function setRequest(namespace\\Request $request)\n {\n $this->request = $request;\n }",
"function __construct($obj){\n parent::__construct($obj->ID);\n $this->that = $obj;\n }",
"function set_object( $objname, &$obj, $scope='', $tagname=null ){\n\n if( $scope=='global' ){\n $this->ctx[0]['_obj_'][$objname] = &$obj;\n return 1;\n }\n\n for( $x=count($this->ctx)-1; $x>=0; $x-- ){\n if( !is_null($tagname) ){\n if( isset($this->ctx[$x]['_obj_']) && ($this->ctx[$x]['name']==$tagname) ){\n $this->ctx[$x]['_obj_'][$objname] = &$obj;\n return 1;\n }\n }\n else{\n if( isset($this->ctx[$x]['_obj_']) ){\n $this->ctx[$x]['_obj_'][$objname] = &$obj;\n return 1;\n }\n }\n }\n\n }",
"protected function set($obj, $name) {\r\n\t\tif (isset($obj->{$name})) {\r\n\t\t\t$this->$name = $obj->{$name};\r\n\t\t}\r\n\t}",
"public function __construct($request = NULL) {\n global $inputs;\n if (is_string($request)) {\n $request = json_decode($request, TRUE);\n }\n if (!empty($request)) {\n array_push($inputs, $request);\n }\n $this->inputs = $inputs;\n }",
"public function __construct($request) {\n\n\t\t$this->_response_array = $request;\n\n\t\tforeach($request as $key => $value) {\n\t\t\t$this->{strtolower($key)} = $value;\n\t\t}\n\n\t}",
"function populate_from_request();",
"public function __construct($request,$user)\n {\n $this->data = $request;\n $this->user = $user;\n $this->subject = $this->data['subject'];\n }",
"public function createRecord($request){\n\t}",
"protected function setFromCache($object)\r\n {\r\n // TODO: Implement setFromCache() method.\r\n }",
"function mapRequestVars($request) {\n\t$callstatus=$request->get('callstatus');\n\t$uuid=$request->get('uuid');\n\t$request->set(\"callUUID\",$uuid);\n\t$date = new DateTime();\n\t$date->setTimestamp($request->get('timestamp'));\n\t$request->set(\"StartTime\",$date->format('Y-m-d H:i:s'));\n\tif ($request->get('callstate')) \n\t $request->set('callstatus',$request->get('callstate'));\n\tswitch ($callstatus) {\n\t case \"call_start\" :\n\t\t$request->set(\"callstatus\",'CallStart');\n\t\t$src=$request->get('src');\n\t\t$request->set(\"callerIdNumber\",$src['number']);\n\t\t$request->set(\"callerIdName\",$src['name']); \n\t break;\n\t case \"call_ringing\" :\t \n\t\t$request->set(\"callstatus\",'StartApp');\t\t\t\n \t break;\n\t case \"call_answered\" :\t \n\t\t$request->set(\"callstatus\",'DialAnswer');\t\t\t\n \t break;\n\t case \"call_end\" :\n\t\tif ($request->get('src')) {\n\t\t $src=$request->get('src');\n\t\t $request->set(\"callerIdNumber\",$src['number']);\n\t\t $request->set(\"callerIdName\",$src['name']); \n\t\t}\t \n\t\t$request->set(\"callstatus\",'EndCall');\t\t\t\n \t break;\n\n\t}\n\t\n\treturn $request;\n }",
"function setOrderSend($object) { \n /* you can itentify the item with $object->Item->ShopId */ \n}",
"function setObjectCookie($CookieName, $obj) {\n\t$_SESSION[$CookieName] = Encode(serialize($obj));\n}",
"public function setRequestorId(?string $value): void {\n $this->getBackingStore()->set('requestorId', $value);\n }",
"public function __set($param, $value)\n\t{\n\t\tswitch($param)\n\t\t{\n\t\t\tcase 'type':\n\t\t\t\tif(in_array($type, array('data', 'xref') ) )\n\t\t\t\t\t$this->type = $type;\n\t\t\t\tbreak;\n\t\t\tcase 'caption':\n\t\t\tcase 'class':\n\t\t\tcase 'id':\n\t\t\tcase 'xref_x':\n\t\t\t\tif(is_string($value))\n\t\t\t\t\t$this->$param = $value;\n\t\t\t\tbreak;\n\t\t}\n\t}",
"function set_request_p($key, $value=false)\n{\n return Request::SetValueP($key, $value);\n}",
"public static function setRequestInfo($request)\n {\n if ($request instanceof ServerRequest) {\n static::pushRequest($request);\n } else {\n $requestData = $request;\n $requestData += [[], []];\n $requestData[0] += [\n 'controller' => false,\n 'action' => false,\n 'plugin' => null\n ];\n $request = new ServerRequest();\n $request->addParams($requestData[0])->addPaths($requestData[1]);\n static::pushRequest($request);\n }\n }",
"function qa_set_request($request, $relativeroot, $usedformat = null)\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\tglobal $qa_request, $qa_root_url_relative, $qa_used_url_format;\n\n\t$qa_request = $request;\n\t$qa_root_url_relative = $relativeroot;\n\t$qa_used_url_format = $usedformat;\n}",
"public function __construct($obj)\n {\n parent::__construct($obj->post_id, RESOURCE_FORUMPOST);\n $this->obj = $obj;\n }",
"private function setUserObject($object)\n\t{\n\t\t# Check if the passed value is empty and an object.\n\t\tif(empty($object) OR !is_object($object))\n\t\t{\n\t\t\t# Explicitly set the value to NULL.\n\t\t\t$object=NULL;\n\t\t}\n\t\t# Set the data member.\n\t\t$this->user_object=$object;\n\t}",
"public function update_object ($obj)\n {\n parent::update_object ($obj);\n $this->access_id = $obj->id;\n }",
"public function update_object ($obj)\n {\n parent::update_object ($obj);\n $this->access_id = $obj->id;\n }",
"function constructURL($object);",
"function __construct($obj)\r\n\t{\r\n\t\t$this->obj = $obj;\r\n\t}",
"abstract public function populateRequest(PHPFrame_Request $request);",
"public function __construct($obj)\n\t{\n\t\t$this->obj = $obj;\n\t}",
"public function set(string $name, $object)\n {\n $this->instances[$name] = $object;\n }",
"public function setObject($object, $key = null) {\r\n if($key) {\r\n $this->objects[$key] = $object;\r\n }\r\n else {\r\n $this->objects[] = $object;\r\n }\r\n }"
] | [
"0.6079203",
"0.6002442",
"0.6002442",
"0.57710844",
"0.57703066",
"0.5766617",
"0.57486117",
"0.56963575",
"0.568274",
"0.568274",
"0.568274",
"0.5678885",
"0.5675828",
"0.55973375",
"0.5568034",
"0.5543874",
"0.5481038",
"0.5476452",
"0.54431397",
"0.54321927",
"0.54271495",
"0.5418455",
"0.53964084",
"0.5394741",
"0.53675985",
"0.5343697",
"0.53362167",
"0.5294705",
"0.5288508",
"0.5280258",
"0.5276026",
"0.52686924",
"0.5225464",
"0.5217753",
"0.519942",
"0.5196896",
"0.5196896",
"0.5196896",
"0.5190464",
"0.5176852",
"0.5150508",
"0.5127358",
"0.51175886",
"0.50907046",
"0.5066035",
"0.50497335",
"0.50267935",
"0.50221777",
"0.5017764",
"0.5015227",
"0.49984887",
"0.49820745",
"0.49753296",
"0.4974118",
"0.49733314",
"0.49717784",
"0.49695325",
"0.49673876",
"0.49604186",
"0.49579462",
"0.4953829",
"0.4951511",
"0.49508443",
"0.49479717",
"0.4932304",
"0.49321684",
"0.4930735",
"0.4929472",
"0.4920775",
"0.4918659",
"0.4918659",
"0.49024543",
"0.48992875",
"0.48989025",
"0.488695",
"0.48864236",
"0.4886325",
"0.48854142",
"0.48823538",
"0.4871544",
"0.48713255",
"0.48684838",
"0.48673838",
"0.4865769",
"0.48632276",
"0.48584524",
"0.48488143",
"0.4847489",
"0.4845865",
"0.48287654",
"0.48286715",
"0.4827081",
"0.4825123",
"0.4825123",
"0.48223966",
"0.48209822",
"0.48189402",
"0.4818365",
"0.4816418",
"0.481358"
] | 0.5605844 | 13 |
Get the object to request. | private function getObject() {
return $this->object;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getObject() {}",
"public function getObject() {}",
"public function getObject();",
"public function getObject();",
"public function getObject() {\n return $this->object;\n }",
"public function getObject(): object;",
"public function getObject()\n {\n return $this->object;\n }",
"public function getObject()\n {\n return $this->object;\n }",
"public function getObject()\n {\n return $this->_object;\n }",
"public function getObject()\n {\n return $this->forgeObject();\n }",
"public function get_object()\n {\n return $this->object;\n }",
"public function get()\n {\n $object = $this->_object;\n $this->_object = $this->_form;\n return $object;\n }",
"public function getObject()\n {\n return $this;\n }",
"protected function getObject()\n {\n return $this;\n }",
"public function GetObj()\n {\n try\n {\n return $this->oRequestObj;\n }\n catch( Exception $oException )\n {\n throw cAnomaly::BubbleException( $oException );\n }\n }",
"public function getObj();",
"public function getObject() {\n return $this->form->getObject();\n }",
"public static function getHttp()\n : \\stdClass\n {\n return static::$_request;\n }",
"public function GetObject()\n\t{\n\t\tif (!$this->dataRead)\n\t\t\t$this->ReadData();\n\n\t\tif (!$this->object)\n\t\t\t$this->object = $this->project->GetObject($this->objectHash);\n\n\t\treturn $this->object;\n\t}",
"function getObject();",
"function getObject();",
"function request()\n {\n return Request::get();\n }",
"public function get_object()\n {\n return $this->_object;\n }",
"protected function getObject()\n {\n return $this->parentContext->getObject();\n }",
"public function object()\n {\n return $this->object;\n }",
"public function get()\n {\n return $this->object = get_post($this->id);\n }",
"function _wp_http_get_object()\n {\n }",
"public function get()\n {\n return $this->setMethod(__FUNCTION__)\n ->makeRequest();\n }",
"protected function _getRequest() {\n\t\treturn new Request;\n\t}",
"public function getObject(){\n return $this->getCourier();\n }",
"public function lookup() { return $this->doRequest(); }",
"public function & GetRequest ();",
"final protected function getObject($type){\n\t\t\treturn $this->getFactory()->getObject( $this->getRes(), $type );\n\t\t}",
"function getRequest()\n {\n if ( !$this->_request )\n {\n if ( method_exists( $this, '_getRequest' ) )\n {\n $object = $this->_getRequest();\n if ( $object instanceof \\Hotlink\\Framework\\Model\\Api\\Request )\n {\n $this->setRequest( $object );\n }\n }\n if ( !$this->_request )\n {\n //$request = Mage::getModel('hotlink_framework/api_request');\n $request = $this->interactionApiRequestFactory->create();\n $this->setRequest( $request );\n }\n }\n return $this->_request;\n }",
"protected function getRequest(){\n $client = $this->client;\n if(!$client instanceof Client){\n $client = new Client();\n }\n return $client;\n }",
"public function getObj() {\n return $this->obj;\n }",
"protected function getObject()\n\t{\n\t\tif( !isset( $this->object ) ) {\n\t\t\t$this->object = \\Aimeos\\MAdmin\\Cache\\Manager\\Factory::createManager( $this->context )->getCache();\n\t\t}\n\n\t\treturn $this->object;\n\t}",
"public static function request() {\n\t\tif (!isset(self::$_request)) {\n\t\t\tself::$_request=new \\GO\\Base\\Request();\n\t\t}\n\t\treturn self::$_request;\n\t}",
"public function get_response_object()\n {\n }",
"protected function obtainRequest() {\n return Request::createFromGlobals();\n }",
"public function getRequest()\n {\n if (is_null($this->_request)) {\n $this->_request = new Request();\n }\n return $this->_request;\n }",
"public function getObject()\n {\n $object = Doctrine::getTable($this->getModel())->findOneById($this->getModelId());\n\n return $object;\n }",
"public static function getObject(){\n\t\treturn self::$object_class;\n\t}",
"public static function get_object() {\n\t\treturn self::$object;\n\t}",
"public function getResponseObject()\n {\n return $this->response_object;\n }",
"protected function getObject()\n\t{\n\t\tif( $this->object !== null ) {\n\t\t\treturn $this->object;\n\t\t}\n\n\t\treturn $this;\n\t}",
"function getRequest() {\n\t\treturn $this->m_request;\n\t}",
"protected function _request() {\n\t\treturn $this->_container->request;\n\t}",
"public function request_object()\n {\n return $this->hasOne(Request::class, 'request_type_id', 'id');\n }",
"function getRequest() {\n\t\treturn $this->Request;\n\t}",
"public function request()\n\t{\n\t\treturn $this->request;\n\t}",
"public abstract function FetchObject();",
"public function getRequest(): RequestInterface;",
"public function getIndirectObject() {}",
"public function getIndirectObject() {}",
"public function request()\r\n {\r\n return $this->request;\r\n }",
"public function getResponseObject()\n {\n return $this->responseObject;\n }",
"public function getResponseObject()\n {\n return $this->responseObject;\n }",
"public function getResponseObject()\n {\n return $this->responseObject;\n }",
"public function request()\n {\n return new GuzzleHttp\\Psr7\\Request('GET', 'Persons/'.$this->id);\n }",
"protected function getRequest() {\n\t\treturn $this->request;\n\t}",
"public function getObject() {\n\n // If there isn't any title, then return null to skip the call.\n if (!$this->title) {\n return false;\n }\n\n // Return the object.\n return array(\n 'title' => $this->title\n );\n }",
"public function getRequestInstance(){\n\t\treturn ControllerRequest::getInstance();\n\t}",
"function getRequest() {\n return $this->request;\n }",
"public function get_request()\n\t{\n\t\treturn $this->request;\n\t}",
"public function get_request()\n\t{\n\t\treturn $this->request;\n\t}",
"public function request()\n {\n return $this->request;\n }",
"public function request()\n {\n return $this->request;\n }",
"public function getRequest(): Request\n {\n return Model::getRequest();\n }",
"public function getRequest()\n {\n return $this->get('request');\n }",
"public function getRequest()\n {\n return $this->get('request');\n }",
"public function getRequest()\n {\n return $this->get('request');\n }",
"public function getRequest()\n {\n return $this->get('request');\n }",
"protected function getRequest() {\n return $this->request;\n }",
"public static function getObj($object){\n\t\t\treturn self::get($object, static::factory(), static::factory());\n\t\t}",
"public function get()\n\t{\n\t\tif ( $this->check() ){\n\t\t\treturn $this->obj;\n\t\t}\n\t\treturn false;\n\t}",
"public function getRequest()\n {\n return $this->_request;\n }",
"public function getRequest()\n {\n return $this->_request;\n }",
"public function getRequest() {\n return $this->_request;\n }",
"public function getRequest() {}",
"public function getRequest() {}",
"function get_obj()\n {\n $object = new ApiRest;\n return $object;\n }",
"private function getRequest() {\n return json_decode(request()->getContent(), true);\n }",
"public function getResponseObject()\n {\n return $this->aRepsonse;\n }",
"protected function get()\n {\n return $this->getById($this->id);\n }",
"protected function getRequest()\n {\n return $this->req;\n }",
"public function get_instance() {\r\n\t\treturn $this->obj;\r\n\t}",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"function request() {\n return new Request;\n }",
"public function getRequest() {\n return $this->request;\n }",
"protected function getRequest() {}",
"protected function getRequest()\n {\n return $this->request;\n }",
"protected function getRequest()\n {\n return $this->request;\n }",
"protected function getRequest()\n {\n return $this->request;\n }",
"public function getRequest() {\n return $this->Request;\n }",
"public function getRequest();",
"public function getRequest();",
"public function getRequest();",
"public function getRequest();"
] | [
"0.73799545",
"0.73799545",
"0.73257434",
"0.73257434",
"0.719861",
"0.7152944",
"0.71492344",
"0.71492344",
"0.7092992",
"0.6953768",
"0.6926222",
"0.69201267",
"0.68532425",
"0.68305796",
"0.67796487",
"0.6763178",
"0.6754883",
"0.67487836",
"0.674861",
"0.6742828",
"0.6742828",
"0.6717234",
"0.66613805",
"0.66314906",
"0.66273564",
"0.6575826",
"0.6542146",
"0.6532556",
"0.64691406",
"0.64267653",
"0.64029807",
"0.63753617",
"0.63697225",
"0.6364533",
"0.6356468",
"0.6351358",
"0.6339944",
"0.630731",
"0.62998164",
"0.6297431",
"0.6297201",
"0.6284625",
"0.62760675",
"0.62532467",
"0.62488854",
"0.6247575",
"0.6245994",
"0.6230921",
"0.62180173",
"0.6214854",
"0.6203813",
"0.6200873",
"0.6199732",
"0.61959714",
"0.61959714",
"0.61810875",
"0.6176503",
"0.6176503",
"0.6176503",
"0.61582917",
"0.61301833",
"0.612982",
"0.6128198",
"0.61196387",
"0.6118503",
"0.6118503",
"0.6098461",
"0.6098461",
"0.6096082",
"0.60955477",
"0.60955477",
"0.60955477",
"0.60955477",
"0.60877115",
"0.6080488",
"0.60745907",
"0.60744745",
"0.60744745",
"0.60689265",
"0.6054371",
"0.6054371",
"0.6039749",
"0.60368496",
"0.602805",
"0.6023195",
"0.60220826",
"0.6021459",
"0.6018238",
"0.6018238",
"0.6017185",
"0.6010593",
"0.60059434",
"0.60020906",
"0.60020906",
"0.60020906",
"0.59924644",
"0.59919584",
"0.59919584",
"0.59919584",
"0.59919584"
] | 0.7435714 | 0 |
Set the fields of the object. | private function setFields($fields) {
$this->fields = $fields;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract function setFields();",
"public function set_fields() {\n\n\t\t$this->fields = Pngx__Meta__Fields::get_fields();\n\t}",
"function set_fields($fields) {\n\t\t$this->fields = $fields;\n\t}",
"private function setFields(): void\n {\n $fields = acf_get_block_fields(array('name' => 'acf/' . strtolower(str_replace('-', '', $this->getId()))));\n if (!empty($fields)) {\n if ('data' === $fields[0]['name']) {\n $parsedFields = $this->parseField($fields[0]);\n if (!empty($parsedFields['data'])) {\n $this->fields = $parsedFields['data'];\n }\n }\n }\n }",
"public function setFields($fields)\n\t{\n\t\t$this->_fields = $fields;\n\t}",
"public function setFields($fields) {\n\t\t$this->fields = $fields;\n\t}",
"public function setFields($fields) {\n\t\t$this->fields = $fields;\n\t}",
"public function setFields($fields)\n {\n # Set the variable.\n $this->fields = $fields;\n }",
"public function setFields($fields = []);",
"private function _set_fields()\n {\n @$this->form_data->survey_id = 0;\n $this->form_data->survey_title = '';\n $this->form_data->survey_description = '';\n $this->form_data->survey_status = 'open';\n $this->form_data->survey_anms = 'yes';\n $this->form_data->survey_expiry_date = '';\n $this->form_data->question_ids = array();\n\n $this->form_data->filter_survey_title = '';\n $this->form_data->filter_status = '';\n }",
"public function _set_model_fields(){\n // set fields only when they have not been set for this object\n if($this->_fields_loaded===FALSE){\n\n foreach ($this->_meta() as $meta) {\n\n $this->{$meta->name} = '';\n }\n }\n }",
"public function setFields($fields)\n\t{\n\t\t$array = (array)$fields;\n\t\tforeach ($array as $key => $value) {\n\t\t\t$this->setField($key, $value);\n\t\t}\n\t}",
"public function setFields($arFields)\n {\n $this->_fields = $arFields;\n }",
"private function _set_fields()\n {\n @$this->form_data->question_id = 0;\n\n $this->form_data->category_id = 0;\n $this->form_data->sub_category_id = 0;\n $this->form_data->sub_two_category_id = 0;\n $this->form_data->sub_three_category_id = 0;\n $this->form_data->sub_four_category_id = 0;\n\n $this->form_data->ques_text = '';\n $this->form_data->survey_weight = '';\n $this->form_data->ques_type = '';\n $this->form_data->qus_fixed = 0;\n $this->form_data->ques_expiry_date = '';\n\n\n $this->form_data->filter_question = '';\n $this->form_data->filter_category = 0;\n $this->form_data->filter_type = '';\n $this->form_data->filter_expired = '';\n }",
"protected function setProperties()\n {\n foreach ($this->data as $key => $value) {\n $this->$key = $value;\n }\n }",
"public function setFields(array $fields)\n {\n $this->_fields = $fields;\n }",
"public function setFields(array $fields) {\n\t\t$this->fields = $fields;\n\t}",
"public function setFields($arrFields);",
"public function setFields($f){\n\t\t$this->fields = $f;\n\t}",
"public function set_fields($fields = array())\n\t{\n\t\tif(!is_array($fields))\n\t\t{\n\t\t\t$fields = func_get_args();\n\t\t}\n\n\t\t$this->_fields = $fields;\n\t}",
"public function setFields(array $fields)\n {\n $this->fields = $fields;\n }",
"public function setFields($fields)\n\t{\n\t\tforeach ($fields as $name => $value)\n\t\t{\n\t\t\tif (array_key_exists($name, $this->map))\n\t\t\t{\n\t\t\t\t$check = $this->map[$name]['SET_CHECK'];\n\t\t\t\t$checkResult = $check($value);\n\n\t\t\t\tif ($checkResult !== null)\n\t\t\t\t{\n\t\t\t\t\t$set = $this->convertToCamelCase('set_' . $name);\n\t\t\t\t\t$this->$set($checkResult);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected function _updatefields() {}",
"public function setFields(array $fields = [])\r\n {\r\n $this->fields = Transform::fields($fields);\r\n }",
"public function setFields( array $fields = array() ) {\n $this->fields = $fields;\n return $this;\n }",
"private function _setFieldNames() {\n $this->id = \"id\";\n $this->name = \"name\";\n $this->surveyId = \"survey_id\";\n $this->languageId = \"language_id\";\n $this->deleted = \"deleted\"; \n }",
"function setFields($array)\r\n\t{\r\n\t\t$db = new \\Fmw\\Core\\Db();\r\n\t\t$fields = $db->getColumns($this->getTabName($this->defTab));\r\n\t\tif ($fields) {\r\n\t\t\t$colName = false;\r\n\r\n\t\t\tforeach ($fields as $field) {\r\n\t\t\t\t$colName = $field['Field'];\r\n\r\n\t\t\t\tif (isset($array[$field['Field']])) {\r\n\r\n\t\t\t\t\tif ($field['Type'] == 'text') {\r\n\t\t\t\t\t\tif (isFormatedText($field['Field'])) {\r\n\t\t\t\t\t\t\t$array[$colName] = $array[$colName];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->$colName = $array[$colName];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"protected function setupFields()\n {\n }",
"private function setValues($values)\n {\n //echo \"<pre>\";\n //print_r($values);\n //echo \"</pre>\";\n foreach ($values as $field => $value) {\n $this->$field = $value;\n }\n\n //echo \"<pre>\";\n //print_r($this);\n //echo \"</pre>\";\n //die();\n\n }",
"public function setFields($fields) {\n\t\t$this->fields = (is_array($fields)) ? $fields : explode(',', $fields);\n\t\t$this->values = array();\n\t\treturn $this;\n\t}",
"public function set_fields(array $fields) {\n $this->fields = $fields;\n $this->fields = array_change_key_case($this->fields, CASE_LOWER);\n }",
"public function set_fields() {\n $this->fields = apply_filters('wpucommentmetas_fields', $this->fields);\n foreach ($this->fields as $id => $field) {\n if (!is_array($field)) {\n $this->fields[$id] = array();\n }\n if (!isset($field['label'])) {\n $this->fields[$id]['label'] = ucfirst($id);\n }\n if (!isset($field['admin_label'])) {\n $this->fields[$id]['admin_label'] = $this->fields[$id]['label'];\n }\n if (!isset($field['type'])) {\n $this->fields[$id]['type'] = 'text';\n }\n if (!isset($field['help'])) {\n $this->fields[$id]['help'] = '';\n }\n if (!isset($field['required'])) {\n $this->fields[$id]['required'] = false;\n }\n if (!isset($field['admin_visible'])) {\n $this->fields[$id]['admin_visible'] = true;\n }\n if (!isset($field['admin_column'])) {\n $this->fields[$id]['admin_column'] = false;\n }\n if (!isset($field['admin_list_visible'])) {\n $this->fields[$id]['admin_list_visible'] = false;\n }\n if (!isset($field['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array(\n 'comment_form_logged_in_after',\n 'comment_form_after_fields'\n );\n }\n if (!is_array($this->fields[$id]['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array($this->fields[$id]['display_hooks']);\n }\n }\n }",
"public function setFields($val)\n {\n $this->_propDict[\"fields\"] = $val;\n return $this;\n }",
"public function setFields(?array $fields = null, $encoding = 'UTF-8') {}",
"public function setFields(?array $fields = null, $encoding = 'UTF-8') {}",
"private function setAutofillFields() {\n foreach (static::getFields() as $field_name => $field) {\n if ($field instanceof AutofillField) {\n $this->values[$field_name] = $field->fill();\n }\n }\n }",
"public function setFields($fields)\n {\n $this->fields = $fields;\n\n return $this;\n }",
"public function setFields($fields)\n {\n $this->fields = $fields;\n\n return $this;\n }",
"public function set_attributes()\n {\n $this->id = 0;\n $this->set_process();\n $this->set_decomposition();\n $this->set_technique();\n $this->set_applicability();\n $this->set_input();\n $this->set_output();\n $this->set_validation();\n $this->set_quality();\n $this->score = 0;\n $this->matchScore = 0;\n $this->misMatch = \"\";\n }",
"function dbSetVars() {\n\n foreach ($this->fields() as $f) {\n if ($this->$f === false) continue;\n $this->db->set($f,$this->$f);\n }\n\n }",
"function _set_editable_fields()\n\t{\n\t\tif (empty($this->fields))\n\t\t{\n\t\t\t// pull the fields dynamically from the database\n\t\t\t$this->db->cache_on();\n\t\t\t$this->fields = $this->db->list_fields($this->primary_table);\n\t\t\t$this->db->cache_off();\n\t\t}\n\t}",
"private function set_metafile_fields(){\n\n\t\t\t// add more fields for your requierements\n $custom_fields = array( \n\t\t\t\t'field_name1'\t=> __( 'field name 1', self::$plugin_obj->class_name ),\n\t\t\t\t'field_name2'\t=> __( 'field name 2', self::$plugin_obj->class_name ),\n\t\t\t\t'field_name3'\t=> __( 'field name 3', self::$plugin_obj->class_name ),\n\t\t\t );\n\n\n foreach( $custom_fields as $custom_attrname => $custom_value){\n self::$metafile_fields->$custom_attrname = $custom_value;\n } \n\n }",
"protected function setRequiredFields()\n {\n $requiredFields = [\n 'transaction_id',\n 'remote_ip',\n 'return_success_url',\n 'return_failure_url',\n 'amount',\n 'currency',\n 'bank_code'\n ];\n\n $this->requiredFields = \\Genesis\\Utils\\Common::createArrayObject($requiredFields);\n\n $requiredFieldValues = [\n 'currency' => [\n 'CNY', 'THB', 'IDR', 'MYR', 'INR'\n ]\n ];\n\n $this->requiredFieldValues = \\Genesis\\Utils\\Common::createArrayObject($requiredFieldValues);\n\n $this->setRequiredFieldsConditional();\n }",
"function fill($request) {\n foreach($request->getParams() as $field=>$value) {\n $this->$field = $value;\n }\n }",
"public function setFields(array $fields)\n {\n $this->fields = $fields;\n return $this;\n }",
"public function setFields($fields)\r\n {\r\n $this->clearFields();\r\n $this->addFields($fields);\r\n\r\n return $this;\r\n }",
"function setField($field) {\r\r\n\t\t$this->field = $field;\r\r\n\t}",
"public function setValues($values)\n {\n foreach ($values as $field => $value)\n {\n if (isset($this->properties[$field])) {\n /** @var Property $this->$field */\n $this->$field->set($value);\n }\n }\n }",
"public function fields($fields) {\n\t\t$this->_body['fields'] = $fields;\n\t\treturn $this ;\n\t}",
"public static function setters();",
"public function setFields(array $fields): self\n {\n $this->fields = $fields;\n return $this;\n }",
"public function setPaymentFields($fields)\n\t{\n\t\t$array = (array)$fields;\n\t\tforeach ($array as $key => $value) {\n\t\t\t$this->setPaymentField($key, $value);\n\t\t}\n\t}",
"protected function setUp()\n {\n $this->object = new FieldSet('test', $this->fieldList);\n }",
"protected function setAvailableFields() {\r\n\t\t$this->availableFieldsArray = array(\r\n\t\t\t'uid',\r\n\t\t\t'pid',\r\n\t\t\t'tstamp',\r\n\t\t\t'crdate',\r\n\t\t\t'cruser_id',\r\n\t\t\t'deleted',\r\n\t\t\t'hidden',\r\n\t\t\t'name',\r\n\t\t\t'hint',\r\n\t\t\t'image',\r\n\t\t\t'use_arcticle_stock_info'\r\n\t\t);\r\n\t}",
"private function _setFields($oObject, $aFields)\n {\n $aFields = is_array($aFields) ? $aFields : array();\n foreach ($aFields as $sKey => $sValue) {\n $oObject->$sKey = oxNew('oxField', $sValue);\n }\n\n return $oObject;\n }",
"public function set_parsed_fields($fields)\n\t{\n\t\t$this->_parsed_fields = $fields;\n\t}",
"public function _setProps() {\n $dataController = get_called_class();\n $dataController::_getMapper();\n $dataController::_getModel();\n }",
"protected function setSubmittedValues()\n {\n if ( $this->setFundraiserId() ) {\n $this->setFundraiserProfile(); \n }\n\n $this->setAmount();\n \n $this->setFirstName();\n $this->setLastName();\n $this->setEmail();\n $this->setTelephone();\n \n $this->setAddress();\n $this->setCity();\n $this->setCountry();\n $this->setRegion();\n $this->setPostalCode();\n \n $this->setAnonymity();\n $this->setHideAmount();\n }",
"public function setField($value) {\n\t\t$this->_field = $value;\n\t}",
"public function setValues($data)\n {\n $this->name = $data['name'];\n $this->author_name = $data['author_name'];\n $this->author_surname = $data['author_surname'];\n $this->release_year = $data['release_year'];\n $this->request_date = $data['request_date'];\n $this->reserve_day = $data['reserve_day'];\n $this->return_day = $data['return_day'];\n $this->picture = $data['picture'];\n }",
"public function setFields(array $fields)\n {\n return $this->setAdditionalParam('fields', implode(':', $fields));\n }",
"public function set_field_attributes( $attributes = array() ) {\n\t\n\t\t$this->field_attributes = $attributes;\n\t\n\t}",
"public function setProperties() {\n\t\t$this->public_prop = 'public';\n\t\t$this->protected_prop = 100;\n\t\t$this->private_prop = true;\n\n\t\t// Set a non-predefined property.\n\t\t$this->dynamic = new self();\n\t}",
"function setRefFields($val) {\n $this->_refFields = $val;\n }",
"public function set_fields($data)\n\t{\n\t\tforeach ($data as $key => $value)\n\t\t{\n\t\t\tif (isset($this->aliases[$key]))\n\t\t\t\t$key = $this->aliases[$key];\n\n\t\t\tif (array_key_exists($key, $this->data))\n\t\t\t\t$this->data[$key] = $value;\n\t\t}\n\t}",
"protected function prepare_fields()\n {\n }",
"public function __set($field, $value) {\r\n $this->$field = $value;\r\n }",
"public function __set($field, $value) {\r\n $this->$field = $value;\r\n }",
"public function setField($field) {\n\t\t$this->_field = $field;\n\t}",
"public function setField($field)\n {\n $this->_field = $field;\n }",
"public function setDispFields() {}",
"public function setPostFields($data){\n\t\t$this->post = array();\n\t\t$this->addPostFields($data);\n\t}",
"public function setFields(array $fields)\n {\n $this->fields = $fields;\n\n return $this;\n }",
"public function setFields(array $fields)\n {\n $this->fields = $fields;\n\n return $this;\n }",
"public function setField($field);",
"public function setField($field);",
"private function setFields($fields)\n\t{\n\n\t\tforeach ($fields as $field) {\n\t\t\tif (!\\vtlib\\Functions::getModuleId($field[28]) || $this->checkFieldExists($field[28], $field[2], $field[3])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$moduleInstance = \\vtlib\\Module::getInstance($field[28]);\n\t\t\t$blockInstance = \\vtlib\\Block::getInstance($field[25], $moduleInstance);\n\t\t\tif (!$blockInstance) {\n\t\t\t\tApp\\Log::error(\"No block found to create a field, you will need to create a field manually. Module: {$field[28]}, field name: {$field[6]}, field label: {$field[7]}\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$fieldInstance = new \\vtlib\\Field();\n\t\t\t$fieldInstance->column = $field[2];\n\t\t\t$fieldInstance->name = $field[6];\n\t\t\t$fieldInstance->label = $field[7];\n\t\t\t$fieldInstance->table = $field[3];\n\t\t\t$fieldInstance->uitype = $field[5];\n\t\t\t$fieldInstance->typeofdata = $field[15];\n\t\t\t$fieldInstance->readonly = $field[8];\n\t\t\t$fieldInstance->displaytype = $field[14];\n\t\t\t$fieldInstance->masseditable = $field[19];\n\t\t\t$fieldInstance->quickcreate = $field[16];\n\t\t\t$fieldInstance->columntype = $field[24];\n\t\t\t$fieldInstance->presence = $field[9];\n\t\t\t$fieldInstance->maximumlength = $field[11];\n\t\t\t$fieldInstance->quicksequence = $field[17];\n\t\t\t$fieldInstance->info_type = $field[18];\n\t\t\t$fieldInstance->helpinfo = $field[20];\n\t\t\t$fieldInstance->summaryfield = $field[21];\n\t\t\t$fieldInstance->generatedtype = $field[4];\n\t\t\t$fieldInstance->defaultvalue = $field[10];\n\t\t\t$fieldInstance->fieldparams = $field[22];\n\t\t\t$blockInstance->addField($fieldInstance);\n\t\t\tif ($field[26] && ($field[5] == 15 || $field[5] == 16 || $field[5] == 33 )) {\n\t\t\t\t$fieldInstance->setPicklistValues($field[26]);\n\t\t\t}\n\t\t\tif ($field[27] && $field[5] == 10) {\n\t\t\t\t$fieldInstance->setRelatedModules($field[27]);\n\t\t\t}\n\t\t}\n\t}",
"public function loadFields()\n\t{\n\t\t// Get only the fields from the class instance, not its descendants\n\t\t$getFields = create_function('$obj', 'return get_object_vars($obj);');\n\t\t$fields = $getFields($this);\n\n\t\t// Field defaults\n\t\t$defaults = array(\n\t\t\t'primary' => false,\n\t\t\t'relation' => false\n\t\t);\n\n\t\t// Go through and set up each field\n\t\tforeach ($fields as $name => $options)\n\t\t{\n\t\t\t// Merge the defaults\n\t\t\t$options = array_merge($defaults, $options);\n\n\t\t\t// Is this the primary field?\n\t\t\tif ($options['primary'] === true)\n\t\t\t{\n\t\t\t\t$this->primaryKeyField = $name;\n\t\t\t}\n\n\t\t\t// Is this a relation?\n\t\t\tif ($options['relation'] !== false)\n\t\t\t{\n\t\t\t\t$this->relations[$name] = $options;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$this->fields[$name] = array();\n\t\t}\n\t}",
"public function setAttributes();",
"protected function setFieldValue ($field) {\n if ($this->$field instanceof Newforms_File)\n $this->$field->setValue('');\n if (!$this->__bound) return;\n if (is_array($this->__Data)) {\n if (isset($this->__Data[$field])) {\n $this->$field->setValue ($this->__Data[$field]);\n return;\n }\n return;\n }\n if (is_object ($this->__Data)) {\n if (isset($this->__Data->$field)) {\n $this->$field->setValue ($this->__Data->$field);\n return;\n }\n return;\n }\n }",
"public function fields($fields)\n {\n $this->fields = $fields;\n\n return $this;\n }",
"function setObject($object);",
"public function setField(Field $field) {\n\t\t$this->field = $field; \n\t}",
"function setField($Field){\n\t\t$this->Field = $Field;\n\t}",
"private function fillObj($obj) {\n\t\t\n\t\t$obj->publisher = $_POST['publisher'];\n\t\t\n\t\t$obj->theme = $_POST['theme'];\n\t\t$obj->other = $_POST['other'];\n\n\t\t$obj->end \t= $_POST['date'];\n\n\t\t$obj->title = $_POST['title'];\n\t\t$obj->text \t= $_POST['text'];\r\n\t}",
"public function setFields(array $fields)\n {\n $this->fields = array();\n\n $this->addFields($fields);\n\n return $this;\n }",
"private function setAttributeFieldValue()\n {\n // Get all our attribute objects\n $proxiedAttrs = $this->getAttributes();\n \n $data = [];\n foreach ($proxiedAttrs as $attrObjArr) {\n foreach ($attrObjArr as $attrObj) {\n $dataKey = $attrObj->getFieldName();\n $dataVal = $this->getRequest()->postVar($dataKey);\n $data[$dataKey] = $dataVal;\n }\n }\n \n $json = $this->dbObject('AttributeData')->toJson($data);\n $this->setField('AttributeData', $json);\n }",
"public function __construct($fields)\n {\n $this->fields = $fields;\n }",
"public function __construct($fields)\n {\n $this->fields = $fields;\n }",
"public function __set($name, $value) {\n if($value instanceof Field){\n if(!isset($value->name)){\n $value->name = $name;\n }\n if(!isset($value->id)){\n $value->id = $name;\n }\n $this->{$name} = $value;\n }\n }",
"function set($data) {\n\tif (! is_object($data)) throw new Exception('Supplied argument is not an object.');\n\t\n\tforeach (get_object_vars($data) as $prop=>$val) {\n\t if (property_exists($this,$prop)) {\n\t\t$this->$prop = $val;\n\t }\n\t}\n\t\n }",
"public function setProperties($properties)\n {\n\n }",
"public function useAllFields() {\n $this->__onlyFields = array();\n }",
"public function setPostFields(array $post_data) {}",
"public function setAttributes()\n\t{\n\t\t$this->title \t\t= Input::get( 'title' );\n\t\t$this->description \t= Input::get( 'description' );\n\t\t$this->color \t\t= Input::get( 'color' );\n\t\t$this->type \t\t= Input::get( 'type' );\n\t\t$this->canvas_id\t= Input::get( 'canvas_id', Input::get( 'canvasId' ) );\n\t}",
"protected function setPutData()\n\t{\n\t\t$this->request->addPostFields($this->query->getParams());\n\t}",
"public function setFields($fields)\n {\n $fields->setForm($this);\n $this->fields = $fields;\n\n return $this;\n }",
"public function bindFields()\n {\n // TODO: Implement bindFields() method.\n }",
"public function setField($name, $value);",
"function callbackSetValue($object,$field) {\n \n\n //echo get_class($object);\n switch ($field) {\n case 'name':\n // name does not set dirty flag - its a simple rename..\n $value = $object->get_text();\n if (@$this->$field == $value) {\n return;\n }\n $this->$field = $value;\n //print_r($this->data['TABLES'][$table]['FIELDS']);\n $this->table->database->dirty=true;\n break;\n case 'length':\n case 'default':\n $value = $object->get_text();\n if (@$this->$field == $value) {\n return;\n }\n // echo \"CHANGE?\";\n $this->$field = $value;\n //print_r($this->data['TABLES'][$table]['FIELDS']);\n $this->table->database->dirty=true;\n $this->dirty = true;\n break;\n case 'notnull':\n case 'isIndex':\n case 'sequence':\n case 'unique': \n $value = (int) $object->get_active();\n if (@$this->$field == $value) {\n return;\n }\n //echo \"CHANGE?\";\n $this->$field = $value;\n //print_r($this->data['TABLES'][$table]['FIELDS']);\n $this->table->database->dirty=true;\n $this->table->database->save();\n $this->setVisable();\n $this->dirty = true;\n break;\n default: \n echo \"opps forgot :$field\\n\";\n \n \n }\n //print_r(func_get_args());\n }"
] | [
"0.82745093",
"0.7875061",
"0.735328",
"0.71872056",
"0.71687704",
"0.71158344",
"0.71158344",
"0.70748204",
"0.70271134",
"0.6961778",
"0.6843715",
"0.6838409",
"0.67680806",
"0.6755868",
"0.6723553",
"0.6698234",
"0.6644564",
"0.6610585",
"0.6592066",
"0.6580707",
"0.65425885",
"0.6524489",
"0.64984214",
"0.64867634",
"0.62575465",
"0.623428",
"0.62303823",
"0.6229656",
"0.6224754",
"0.6199447",
"0.61855316",
"0.61591184",
"0.61199445",
"0.60856503",
"0.60856503",
"0.608185",
"0.6041093",
"0.6041093",
"0.60406154",
"0.60283643",
"0.60268116",
"0.6020886",
"0.60194314",
"0.59870917",
"0.59495306",
"0.59199286",
"0.5915663",
"0.5912794",
"0.5902061",
"0.58973825",
"0.58825",
"0.5878248",
"0.58670014",
"0.58593637",
"0.5847325",
"0.58462256",
"0.5841608",
"0.5833317",
"0.58283085",
"0.58249396",
"0.5823643",
"0.58235073",
"0.58193076",
"0.5805408",
"0.5795508",
"0.5793734",
"0.5792944",
"0.5792944",
"0.5787708",
"0.5785372",
"0.5783882",
"0.5779613",
"0.57750237",
"0.57750237",
"0.5774745",
"0.5774745",
"0.57707864",
"0.57629085",
"0.5754545",
"0.57512826",
"0.57428867",
"0.5732985",
"0.57187545",
"0.57105875",
"0.5710027",
"0.5709672",
"0.5703033",
"0.5702213",
"0.5702213",
"0.5699525",
"0.56971395",
"0.56833076",
"0.5679032",
"0.565058",
"0.5648595",
"0.56481856",
"0.56337416",
"0.5633654",
"0.5632803",
"0.56318283"
] | 0.720332 | 3 |
Get _function variable. This is to set the function to call. | private function getFuction() {
return $this->_function;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFunction()\n {\n return $this->function;\n }",
"public function get_function() {\n\t\tif ( ! $this->is_function_set ) {\n\t\t\t$this->set_function( $this->derive_function() );\n\t\t}\n\t\treturn $this->function;\n\t}",
"private function setFuction($function) {\n $this->_function = $function;\n }",
"protected function set_function( $function ) {\n\t\t$this->function = $function;\n\t\t$this->is_function_set = true;\n\t}",
"function setFunction(string $function)\n {\n $this->function = $function;\n return $this;\n }",
"public function getFunction ()\n\t{\n\t\treturn $this->_strFunction;\n\t}",
"public function setFunction($function)\n {\n $this->function = (string)$function;\n return $this;\n }",
"public function getFunction(): string;",
"public function getFunction()\n {\n return $this->metaRefreshValues['function'];\n }",
"protected function derive_function() {\n\t\t$callable_reference = $this->get_callable_reference();\n\t\treturn is_string( $callable_reference ) && function_exists( $callable_reference ) ? $callable_reference : null;\n\t}",
"public function setFunction($function)\n {\n $this->function = $function;\n\n return $this;\n }",
"protected function func() { return $this->f; }",
"public function getFunctionName()\n {\n return $this->function;\n }",
"public function getUseFuncID() \n \t{\n \t\treturn $this->use_funcid;\n \t}",
"public function getFunctionCode()\n {\n return $this->functionCode;\n }",
"public static function set(\\Closure $func): void\n {\n self::$func = $func;\n }",
"public function getUseFuncName() \n \t{\n \t\treturn $this->use_funcname;\n \t}",
"function GetRJSfp( $function ) {\r\n $name = $this->_params['id'];\r\n $type = $this->_type;\r\n $needfkl = $this->_needfkl;\r\n\t\t$function = $this->_prefix . '_' . $this->_type . '_' .$function;\r\n return \"xajax_ZariliaControlHandler('$name','$type','$function',$needfkl\";\r\n }",
"public function getFunctionName()\n {\n return $this->functionName;\n }",
"public function getFunction() {\n $functions = [ 'require', 'include', 'require_once', 'include_once' ];\n $func = $this->getHooks()->filter( 'cortex.template_include_function', $this->function );\n return ( in_array( $func, $functions, TRUE ) ) ? $func : 'require_once';\n }",
"final public function get_idle_function(/* ... */)\n {\n return $this->_idle_function;\n }",
"function setHook($hookPoint, $function) {\n\t\t\t$this->hooks[$hookPoint] = $function;\n\t\t}",
"public function __construct($fun) {\n $this->f = $fun;\n }",
"public static function set($route,$function) {\n self::$validRoute[] = $route;\n \n if ($_GET['url'] == $route) {\n $function->__invoke();\n } \n }",
"public function getter_event_callback()\n\t{\n\t\treturn $this->event_callback = \"on\".$this->qualified_name;\n\t}",
"public function setUseFuncID($use_funcid) \n \t{\n \t\t$this->use_funcid = $use_funcid;\n \t}",
"public function getIdFunction()\n {\n return $this->idFunction;\n }",
"public function getCallable()\n {\n return function () {\n return $this->value;\n };\n }",
"public function setUseFuncName($use_funcname) \n \t{\n \t\t$this->use_funcname = $use_funcname;\n \t}",
"public function get_callback()\n\t{\n\t\treturn $this->callback;\n\t}",
"public function getFunctionToken() \n\t{\n\t\treturn $this->function_token;\n\t}",
"public function getFunctionName() \n\t{\n\t\treturn $this->function_name;\n\t}",
"public function getFuncao()\n\t{\n\t\treturn $this->funcao;\n\t}",
"public function setFunction(string $function)\n {\n $function = 'pub\\\\Classes\\\\' . $function;\n return $this->probFunction = new $function($this->inputs);\n }",
"public function setFunctionName($func_name) \n\t{\n\t\t$this->function_name = $func_name;\n\t}",
"public function callableMethod()\n {\n return 'value';\n }",
"public function setFunction( $func ) {\n $funcs = [ 'require', 'include', 'require_once', 'include_once' ];\n if ( in_array( $func, $funcs, TRUE ) ) {\n $this->function = $func;\n } else {\n throw new \\InvalidArgumentException;\n }\n }",
"public function __construct($fun=null) {\n $this->f = $fun;\n }",
"public function func()\n {\n if ($this->lookahead->type == ControlFunctionLexer::NAME) {\n if (array_key_exists($this->lookahead->text, FunctionDispatcher::$functionNames)) {\n $this->function_name = $this->lookahead->text;\n //$this->function_index = FunctionDispatcher::$functionNames[$this->lookahead->text];\n $this->function_index = FunctionDispatcher::functionIndex($this->lookahead->text);\n } else {\n throw new \\Exception(\"Функция <$this->function_name> не существует\");\n }\n $this->root = new ControlFunctionParseTree($this->lookahead->type, $this->function_name);\n //$this->root = $this->currentNode;\n $this->match(ControlFunctionLexer::NAME);\n $this->cargs();\n } else {\n throw new \\Exception(\n \"Ожидалось объявление функции контроля (сравнение, зависимость ...). Получено \" .\n ControlFunctionLexer::$tokenNames[$this->lookahead->type]\n );\n }\n }",
"public function __call($func, $arguments) {\n\t\t$parts = Tx_FormhandlerGui_Func::explodeCamelCase($func, 1);\n\t\t\n\t\tif ($parts[0] == 'get') {\n\t\t\t$var = Tx_FormhandlerGui_Func::implodeCamelCase(array_slice($parts,1));\n\t\t\treturn $this->$var;\n\t\t}\n\t\tif ($parts[0] == 'set') {\n\t\t\t$var = Tx_FormhandlerGui_Func::implodeCamelCase(array_slice($parts,1));\n\t\t\t$this->$var = $arguments[0];\n\t\t}\n\t}",
"public function setFunctionToken($func_token) \n\t{\n\t\t$this->function_token = $func_token;\n\t}",
"final public function set_idle_function($function)\n {\n $this->_idle_function = $function;\n }",
"public function get_function_reflector() {\n\t\tif ( ! $this->is_function_reflector_set ) {\n\t\t\t$this->set_function_reflector( $this->derive_function_reflector() );\n\t\t}\n\t\treturn $this->function_reflector;\n\t}",
"public function setHandler(callable $func): self{\n $this->_handler = $func;\n\n return $this;\n }",
"public function setFunctionCode($functionCode)\n {\n $this->functionCode = $functionCode;\n return $this;\n }",
"public function getOrElseFn($function) {\n return $this->isJust() ? $this->getJust() : $function();\n }",
"public function test_add_action_create_function() {\n $hook = rand_str();\n $this->assertFalse( yourls_has_action( $hook ) );\n yourls_add_action( $hook, function() {\n $var_name = $GLOBALS[\"test_var\"]; $GLOBALS[ $var_name ] = rand_str();\n } );\n $this->assertTrue( yourls_has_action( $hook ) );\n\n return $hook;\n\t}",
"public function get_callable_reference() {\n\t\tif ( ! $this->is_callable_reference_prepared ) {\n\t\t\t$prepared_callable_reference = $this->prepare_callable_reference( $this->callable_reference );\n\t\t\t$this->set_callable_reference( $prepared_callable_reference, true );\n\t\t}\n\t\treturn $this->callable_reference;\n\t}",
"public function getFunction($obj);",
"function callFunction(Callable $func )\r\n{\r\n\t$func();\r\n}",
"function get_handler() {\r\n }",
"private function get_cached_function($function_name)\n {\n //if the function exists in our function cache, use it\n if(array_key_exists($function_name, $this->function_cache))\n return (object)$this->function_cache[$function_name];\n\n //also accept a funciton whose name is prefixed with '_'; this allows us to override PHP's built-ins when writing extensions\n elseif(array_key_exists('_'.$function_name, $this->function_cache))\n return (object)$this->function_cache['_'.$function_name];\n\n //otherwise, we find the function to call; return null\n else\n return null;\n }",
"function handlerFunction($module, $obj, $URI_function){\n //debugECHO($URI_function);\n $functions = simplexml_load_file(MODULES_PATH . $module . \"/resources/functions.xml\");\n $exist=false;\n\n foreach($functions->function as $function){\n if(($URI_function === (String)$function->uri)){\n $exist=true;\n $event=(String)$function->name;\n //debugECHO($event);\n break;\n }//enf if\n\n }//End foreach\n\n if(!$exist){\n //debugECHO(\"entra al exists false\");\n showErrorPage(4,\"\",'HTTP/1.0 400 Bad Request', 400);\n }else{\n //debugECHO($event);\n call_user_func(array($obj,$event));\n }\n}",
"protected function derive_function_reflector() {\n\t\ttry {\n\t\t\t$function_reflector = $this->is_function_reference() ? new ReflectionFunction( $this->get_function() ) : null;\n\t\t} catch ( ReflectionException $exception ) {\n\t\t\t$function_reflector = null;\n\t\t}\n\t\treturn $function_reflector;\n\t}",
"public function getFunctionPrimary() \n\t{\n\t\treturn $this->function_primary;\n\t}",
"public function setLoopCallbackFunction(callable $function);",
"public function getCallback(): callable\n {\n return $this->callback;\n }",
"public function setLinkFun(ModuleFunction $linkFun) {}",
"public function setFunctionPrimary($func_primary) \n\t{\n\t\t$this->function_primary = $func_primary;\n\t}",
"function setUrlGenerator(\\Closure $func)\n {\n $this->urlFunc = $func;\n }",
"public function getInitializationFunction() {\n return NULL;\n }",
"public function get_method();",
"private function call_function_ref($function, $params)\n\t{\tif('$this->' == substr($function, 0, 7))\n\t\t{\treturn call_user_func_array(array($this, substr($function, 7)), $params);\n\t\t}else if('self::' == substr($function, 0, 6))\n\t\t{\treturn call_user_func_array(get_class().\"::\".substr($function, 6), $params);\n\t\t}else\n\t\t{\treturn call_user_func_array($function, $params);\n\t\t}\n\t}",
"public static function make($callFunctionName): self;",
"public function getFunction()\n {\n $fct_name = $this->getFunctionName();\n if (empty($this->function_reflection) && !empty($fct_name)) {\n $cls_name = $this->getClassName();\n if (\n !empty($cls_name) &&\n method_exists($cls_name, $fct_name)\n ) {\n $this->function_reflection = new \\ReflectionMethod($cls_name, $fct_name);\n } elseif (\n function_exists($fct_name)\n ) {\n $this->function_reflection = new \\ReflectionFunction($fct_name);\n }\n }\n return $this->function_reflection;\n }",
"public function getFuncionario()\n {\n return $this->funcionario;\n }",
"public function changeFunc() {}",
"public function addFunction($function)\n {\n $this->functions[] = $function;\n }",
"public function getLinkFun() {}",
"public static function _function($self, $code)\n {\n return $self->evaluate_script($code, false, true);\n }",
"public function getFunFact() {\n return $this->funFact;\n }",
"public function closure()\n {\n return $this->closure;\n }",
"public function getCalled()\n {\n if (empty($this->called)) {\n $class_name = $this->getClassName();\n $function_name = $this->getFunctionName();\n $type = $this->getType();\n if (!empty($class_name)) {\n $this->called = $class_name . $type . $function_name;\n } else {\n $this->called = isset($function_name) ? $function_name : '-';\n }\n }\n return $this->called;\n }",
"public function get_callable() {\n\t\t$callable = null;\n\n\t\t// Handles the type of reference.\n\t\tif ( $this->is_class_reference() ) { // Class reference.\n\n\t\t\t// Handles whether the reference has a method.\n\t\t\tif ( $this->has_class_method() ) { // Has a method.\n\t\t\t\t$class_method_reflector = $this->get_class_method_reflector();\n\n\t\t\t\t// Handle the types of method.\n\t\t\t\tif ( $class_method_reflector->isStatic() ) { // Static method.\n\t\t\t\t\t$callable = array( $this->get_class(), $this->get_class_method() );\n\t\t\t\t} else { // Non-static method.\n\t\t\t\t\t$callable = array( $this->get_class_instance(), $this->get_class_method() );\n\t\t\t\t}\n\t\t\t} else { // Doesn't have a method.\n\t\t\t\t$callable = $this->get_class_instance();\n\t\t\t}\n\t\t} elseif ( $this->is_function_reference() ) { // Function reference.\n\t\t\t$callable = $this->get_function();\n\t\t}\n\t\treturn $callable;\n\t}",
"abstract protected function getFunctionName(): string;",
"function getCallback()\n {\n return $this->callback;\n }",
"protected function set_function_reflector( $function_reflector ) {\n\t\t$this->function_reflector = $function_reflector;\n\t\t$this->is_function_reflector_set = true;\n\t}",
"public function getF() {}",
"private function setApiEndpoint(string $function)\n {\n $this->protocol = in_array($this->config->getPort(), $this->securePorts) ? \"https\" : \"http\";\n $this->function = $function;\n\n //inital URI parameter that can be apply to either UAPI or API2\n $server = $this->config->getServerName();\n $port = $this->config->getPort();\n $this->setAction();\n $uri = \"$this->protocol://$server:$port/$this->action\";\n\n //adjust the URI based on the UAPI or API2\n if ($this->useUAPI) {\n $uri.=$this->module.\"/\".$this->function;\n } else {\n $user = $this->config->getUsername();\n $uri.='?cpanel_jsonapi_user=' . $user . '&cpanel_jsonapi_apiversion='.self::API2_VERSION.'\n &cpanel_jsonapi_module=' .$this->module . '&cpanel_jsonapi_func=' . $this->function . '&';\n }\n\n return $uri;\n }",
"function call_plugin_function($function)\n\t{\n\t\tif (is_callable($function))\n\t\t{\n\t\t\t$argstring='';\n\t\t\t\n\t\t\t$numargs = func_num_args(); \n\t\t\t\n\t\t\tif ($numargs > 1) {\n\t\t\t\t$arg_list = func_get_args();\n\n\t\t\t\tfor ($x=1; $x<$numargs; $x++) {\n\t\t\t\t\t$argstring .= '$arg_list['.$x.']';\n\t\t\t\t\tif ($x != $numargs-1) $argstring .= ',';\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t} \n\t\t\t\n\t\t\treturn eval(\"return $function($argstring);\");\n\t\t}\n\t\telse\n\t\t\tthrow new FunctionNotFoundException(sprintf(_echo('plugins:exception:functionnotcallable'), $function)); \n\t\t\n\t\treturn false;\n\t}",
"public function GetMethod ();",
"function GetRJS( $function ) {\r\n if ( !isset( $this->_functions[$function] ) ) return null;\r\n $name = $this->_params['id'];\r\n $type = $this->_type;\r\n $needfkl = $this->_needfkl;\r\n $temp = \"xajax_ZariliaControlHandler('$name','$type','$function',$needfkl\";\r\n foreach ( $this->_functions[$function] as $value ) {\r\n\t\t\tif (strstr($value,'(')) {\r\n\t\t\t\t$temp .= ',' . $value;\r\n\t\t\t} else {\r\n\t\t\t\t$temp .= ',' . $this->_params['id'] . \"_\" . $value;\r\n\t\t\t}\r\n\t\t}\r\n return $temp . ');';\r\n }",
"public function updatefuncname() {\n \t\ttry {\n\t\t\t// select mongoDB collection\n \t\t\t$func_collection = $this->mongo_db->db->used;\n\t\t\t// preparing data\n \t\t\t$prepare_data \t = array(\n \t\t\t\t'$set' \t\t=> \t\tarray(\n \t\t\t\t\t'use_funcname' => $this->use_funcname\n \t\t\t\t\t)\n \t\t\t\t);\n\t\t\t// update to database\n \t\t\t$func_collection->update(array(\n \t\t\t\t'use_funcid' \t=> \t$this->use_funcid\n \t\t\t\t),\n \t\t\t$prepare_data, array(\n \t\t\t\t'multiple' \t=> \ttrue\n \t\t\t\t)\n \t\t\t);\n \t\t\treturn true;\n \t\t} \n \t\tcatch (Exception $e) \n \t\t{\n \t\t\treturn false;\n \t\t}\n \t}",
"public function __call(String $function, Array $arguments)\r\n {\r\n\r\n $call;\r\n $name;\r\n for($i = 2; $i < strlen($function); $i++)\r\n {\r\n $char = ord($function[$i]);\r\n //Check is uppercase A-Z, or number, or '_'\r\n if( ($char >= 65 && $char <= 90) // A-Z\r\n || ($char >= 48 && $char <= 57) // 0-9\r\n || $char == 95 ) { // _\r\n $call = substr($function, 0, $i);\r\n $name = lcfirst( substr($function, $i) );\r\n break;\r\n }\r\n }\r\n \r\n if(empty($call) || empty($name))\r\n throw new Exception(\"Invalid call\", 1);\r\n\r\n if(!property_exists($this, $name)){\r\n switch ( $call ) {\r\n case 'get':\r\n return null;\r\n break;\r\n case 'has':\r\n case 'is':\r\n return false;\r\n break;\r\n default:\r\n throw new Exception(\"Undefined $name on \" . get_called_class());\r\n break;\r\n }\r\n }\r\n\r\n switch ( $call ) {\r\n case 'get':\r\n return $this->$name;\r\n break;\r\n\r\n case 'has':\r\n return is_array($this->$name) ? count($this->$name) > 0 : isset($this->$name);\r\n break;\r\n \r\n case 'is':\r\n return $this->$name == true;\r\n break;\r\n\r\n case 'add':\r\n if(empty($arguments))\r\n throw new Exception(\"Missing value when calling $function\");\r\n if(!isset($this->$name))\r\n $this->__setDefaultValue($name);\r\n\r\n if(is_array($this->$name))\r\n $this->$name[] = $arguments[0];\r\n else{\r\n if(is_string($this->$name))\r\n $this->$name .= $arguments[0];\r\n elseif(is_numeric($this->$name))\r\n $this->$name += $arguments[0];\r\n else\r\n throw new Exception(\"Not addable $name\");\r\n }\r\n break;\r\n\r\n case 'set':\r\n if(empty($arguments))\r\n throw new Exception(\"Missing value when calling $function\");\r\n $field = $this->getProtofield($name);\r\n $value = $arguments[0];\r\n if($field[self::PROTO_RULE] == self::RULE_REPEATED)\r\n {\r\n if(!is_array($value))\r\n throw new Exception(\"set value of $name must be array\");\r\n foreach ($value as &$val){\r\n if($this->__isValidType($field, $val))\r\n {\r\n $this->$name[] = $val;\r\n }else{ \r\n throw new Exception(\"value of $name must have type '\" . $field[self::PROTO_CLASS] . \r\n \"' but found '\" . (is_object($val) ? get_class($val) : gettype($val) ) . \"'\");\r\n } \r\n }\r\n \r\n }else{\r\n if($this->__isValidType($field, $value))\r\n {\r\n $this->$name = $value;\r\n }else{ \r\n throw new Exception(\"value of $name must have type '\" . $field[self::PROTO_CLASS] . \r\n \"' but found '\" . (is_object($value) ? get_class($value) : gettype($value) ) . \"'\");\r\n }\r\n }\r\n \r\n break;\r\n\r\n case 'clear':\r\n $this->$name = is_array($this->$name) ? [] : null;\r\n break;\r\n \r\n default:\r\n throw new Exception(\"Invalid call\", 1);\r\n break;\r\n }\r\n\r\n }",
"public function getCombiningFunction()\n {\n return $this->combining_function;\n }",
"public function get_caller()\n {\n }",
"public function getCallable()\n {\n if ($this->callable === null) {\n throw new NativeFunctionNotInstalledException($this->libraryName, $this->functionName);\n }\n\n return $this->callable;\n }",
"function abc(){\n return __FUNCTION__;\n}",
"function set_updatedcallback($functionname) {\n $this->updatedcallback = $functionname;\n }",
"public function __call($fn, $args){\n\t\t$whitelist = array(\"baseUrl\", \"service_dir\", \"debugLevel\", \"rpcDebugLevel\");\n\t\tif(is_null($fn) || !in_array($fn, $whitelist)){ return null; }\n\t\tif(count($args)){\n\t\t\t// setter\n\t\t\t$this->$fn = $args[0];\n\t\t}\n\t\t// getter\n\t\treturn $this->$fn;\n\t}",
"public function doFunctionLookup($functionName)\n {\n return $this->db->fetchAssoc('SELECT * FROM function f WHERE name = ?', array($functionName));\n }",
"public function __call( $function, $params )\n\t{\n\t\tif( NULL !== $this->current_context['template'] )\n\t\t{\n\t\t\treturn call_user_func_array( array( $this->current_context['template'], $function ), $params );\n\t\t}\n\n\t\treturn NULL;\n\t}",
"function setFunction($name, $code)\n {\n $head = $this->getFunctionHead($name);\n\n if (!$head) { \n return PEAR::raiseError(\"'$name' is not a valid handler function\");\n }\n\n if (isset($this->functions[$name])) {\n return PEAR::raiseError(\"'$name' function declared twice\");\n }\n \n $this->functions[$name] = array(\"head\" => $head, \"body\" => $code);\n\n return true; \n }",
"public function testRouteSetsCallableAsFunction()\n {\n $callable = function () { echo \"Foo!\"; };\n $route = new \\Slim\\Route('/foo/bar', $callable);\n $this->assertSame($callable, $route->getCallable());\n }",
"public function getCallback()\n\t{\n\t\treturn $this->callback;\n\t}",
"public function getCallback()\n\t{\n\t\treturn $this->callback;\n\t}",
"abstract public function getFunctions();",
"public function get_method()\n {\n }",
"public function getFunctionPosition();",
"function value($value)\n {\n\t\treturn $value instanceof Closure ? $value() : $value;\n }"
] | [
"0.7382957",
"0.72181535",
"0.7177902",
"0.6936956",
"0.6734655",
"0.6726698",
"0.6678767",
"0.6674748",
"0.6649321",
"0.6415708",
"0.64097846",
"0.60925364",
"0.6068881",
"0.6007994",
"0.5961791",
"0.5899766",
"0.580004",
"0.57506675",
"0.5744072",
"0.5679977",
"0.5663876",
"0.5602455",
"0.5601727",
"0.55913615",
"0.5536665",
"0.5535361",
"0.55244666",
"0.55241466",
"0.55234826",
"0.5516216",
"0.5514329",
"0.5489072",
"0.5475381",
"0.5463497",
"0.5457568",
"0.54507333",
"0.544877",
"0.54261076",
"0.54206324",
"0.54137766",
"0.5395659",
"0.5374382",
"0.53711337",
"0.5369697",
"0.5336733",
"0.52900577",
"0.5275719",
"0.52709407",
"0.5263088",
"0.52449775",
"0.5244155",
"0.5243789",
"0.5240485",
"0.5221361",
"0.5209363",
"0.5205869",
"0.5204568",
"0.51999676",
"0.51722246",
"0.5168903",
"0.51639956",
"0.51614827",
"0.51457274",
"0.5142358",
"0.51359224",
"0.5134198",
"0.51334924",
"0.5132692",
"0.5131473",
"0.5120393",
"0.51201874",
"0.51127684",
"0.5109675",
"0.5108952",
"0.5108457",
"0.50858676",
"0.5080336",
"0.5063061",
"0.5034548",
"0.50112206",
"0.5005086",
"0.49942717",
"0.4988495",
"0.49884537",
"0.49876416",
"0.49829748",
"0.4982474",
"0.4966661",
"0.49653026",
"0.49639833",
"0.49581358",
"0.49560168",
"0.4952094",
"0.49517292",
"0.4945685",
"0.4945685",
"0.49029455",
"0.4902434",
"0.49002665",
"0.48928523"
] | 0.7324036 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.