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 |
---|---|---|---|---|---|---|
return boolean as string 'true' / 'false' | function bool2str($bool) {
if($bool ===false)
return 'false';
else
return 'true';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function bool_s($boolean) {\n\treturn ($boolean ? 'true' : 'false');\n}",
"public static function strbool($bool){\r\n return ($bool) ? \"true\" : \"false\";\r\n }",
"function format_bool(mixed $input): string\n{\n return $input ? 'true' : 'false';\n}",
"function bool_to_string($value) {\n return $value ? 'true' : 'false';\n }",
"private function boolean(bool $value): string\n {\n return $value ? 'true' : 'false';\n }",
"public function getBooleanString($tf);",
"function b2s($b) {\n return ($b) ? 'TRUE' : 'FALSE';\n}",
"function stage_bool_to_string($bool)\n{\n if (! is_bool($bool)) {\n $bool = wc_string_to_bool($bool);\n }\n return true === $bool ? 'yes' : 'no';\n}",
"public function boolToStr($boolean)\n {\n return ($boolean === true) ? 'true' : 'false';\n }",
"public function toBoolean()\n {\n $key = $this->toLowerCase()->str;\n $map = array(\n 'true' => true,\n '1' => true,\n 'on' => true,\n 'yes' => true,\n 'false' => false,\n '0' => false,\n 'off' => false,\n 'no' => false,\n );\n\n if (array_key_exists($key, $map)) {\n return $map[$key];\n } elseif (is_numeric($this->str)) {\n return ((int) $this->str > 0);\n } else {\n return (bool) $this->regexReplace('[[:space:]]', '')->str;\n }\n }",
"protected function bool2str($bool) {\n return ($bool) ? 'TRUE' : 'FALSE';\n }",
"private function boolToString ($value)\n\t{\n\t\tif (true === $value)\n\t\t{\n\t\t\treturn 'true';\n\t\t}\n\t\telseif (false === $value)\n\t\t{\n\t\t\treturn 'false';\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn $value;\n\t\t}\n\t}",
"function toBoolean(){\n\t\tif(in_array($this->lower(),array('','false','off','no','n','f'))){\n\t\t\treturn false;\n\t\t}\n\t\treturn (bool)$this->toString();\n\t}",
"public static function booleanToString($obj)\n {\n return $obj ? 'true' : 'false';\n }",
"private static function bool2str($v)\n {\n //convert boolean to text value.\n $v = $v === true ? 'true' : $v;\n $v = $v === false ? 'false' : $v;\n return $v;\n }",
"function bool_str($value) {\r\n if ($value) {\r\n return 'yes'; \r\n } else {\r\n return 'no';\r\n }\r\n}",
"function bool2str($data)\n {\n TRUE === $data && $data = 'true';\n FALSE === $data && $data = 'false';\n return $data;\n }",
"public static function boolToString($value)\n {\n $value = $value === true ? 'true' : $value;\n $value = $value === false ? 'false' : $value;\n return $value;\n }",
"public function booleanString($var)\n {\n return is_bool($var)\n ? ($var ? 'True' : 'False')\n : $var;\n }",
"public static function bool2str(bool $boolean = true): string\n {\n if ($boolean === false) {\n return 'FALSE';\n } else {\n return 'TRUE';\n }\n }",
"public static function boolean()\n {\n return self::builtinType('bool');\n }",
"private function dbFeedBack($bool){\n if($bool == FALSE){\n //display '0' as false\n return \"{0}\"; \n }\n else{\n //display 1 as true\n return \"{1}\";\n } \n }",
"public function testToStringWithBooleanValueTrue()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean(true);\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}",
"public function getBooleanFormatForQueryString(): string\n {\n return $this->booleanFormatForQueryString;\n }",
"function message($boolValue) {\n\tif($boolValue) {\n\t\techo \"TRUE: \";\n\t} else {\n\t\techo \"FALSE: \";\n\t}\n\techo \"GOT value as \", (int)$boolValue, \"\\n\";\n}",
"public static function boolean() {}",
"abstract public function escapeBoolean($bool);",
"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 testToStringWithBooleanValueFalse()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean(false);\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}",
"public static function plainBoolean($value)\n {\n if ($value === true) {\n return 'Yes';\n } elseif ($value === false) {\n return 'No';\n }\n\n return '---';\n }",
"protected function toBool($value)\n\t{\n\t\tif ($value === true) {\n\t\t\treturn 'yes';\n\t\t}\n\t\treturn 'no';\n\t}",
"protected function escapeBoolean($value)\n {\n return ($value) ? $this->booleanTrue : $this->booleanFalse;\n }",
"protected function get_type() {\n\t\treturn 'boolean';\n\t}",
"protected function get_type() {\n\t\treturn 'boolean';\n\t}",
"function str_bool($string) {\n if (strtolower($string) === 'true') {\n return true;\n } elseif (strtolower($string) === 'false') {\n return false;\n }\n\n return $string;\n}",
"public function getBool(): bool;",
"function to_boolean($val);",
"function bool($val,$str=false){\n if(is_string($val)) {\n $val=strtolower($val);\n $val=$val && $val!=\"false\" && $val !=\"no\" && $val !=\"n\" && $val !=\"f\" && $val !=\"off\";\n }else $val=(bool)$val;\n return $str?($val?\"true\":\"false\"):$val;\n}",
"public function bool()\n {\n return filter_var($this->value, FILTER_VALIDATE_BOOLEAN);\n }",
"public static function boolean()\n {\n return Type::boolean();\n }",
"public function bool_to_bit( $value ) {\n\t\treturn ( ! empty( $value ) && 'false' !== $value ) ? '1' : '';\n\t}",
"public function testToStringWithStringValueTrue()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('true');\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}",
"public function toBool(): bool\n\t{\n\t\treturn false;\n\t}",
"function booltostr(bool $bool, int $mode = BOOL_TO_STR_OPTION_LOWERCASE): string\n {\n return BOOL_TO_STR_OPTIONS_MAP[$mode][$bool];\n }",
"private static function renderBoolean($value)\n {\n return Yii::$app->formatter->asBoolean($value == 1);\n }",
"function rt_nice_boolean($boolean_value = false, $yes = 'yes', $no = 'no')\n{\n return sprintf('<span class=\"ui-icon ui-icon-%s\">%s</span>', $boolean_value ? 'check' : 'close', $boolean_value ? $yes : $no);\n}",
"function boolval($val){\n return $val === 'true' ? true : false;\n}",
"function stage_string_to_bool($string)\n{\n return is_bool($string) ? $string : ( 'yes' === $string || 1 === $string || 'true' === $string || '1' === $string );\n}",
"public function isTrue()\n {\n \n return !!$this->value;\n \n }",
"public function isBoolean();",
"public function boolberry(): bool\n\t{\n\t\treturn false;\n\t}",
"static function toBoolean($data)\r\n {\r\n if(!is_string($data))\r\n return (bool) $data;\r\n switch(strtolower($data)) {\r\n case '1':\r\n case 'TRUE':\r\n case 'on':\r\n case 'yes':\r\n case 'y':\r\n return TRUE;\r\n default:\r\n return FALSE;\r\n }\r\n }",
"public function isTrue();",
"public function testToStringWithStringValueOn()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('on');\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}",
"protected function renderBoolean($value)\n {\n $result = 'No';\n if ($value) {\n $result = 'Yes';\n }\n\n return $result;\n }",
"public function toBool() : bool\n {\n return boolval($this->value);\n }",
"public static function bool2text($valBool)\n\t{\n\t\t$salida = \"\";\n\n\t\tif($valBool) {\n\n\t\t\t$salida = \"Si\";\n\n\t\t} else {\n\n\t\t\t$salida = \"No\";\n\n\t\t}\n\n\t\treturn $salida;\n\t}",
"public function boolValue()\n {\n return $this->value;\n }",
"public function testToStringWithStringValueFalse()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('false');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}",
"public function toBoolean(): bool\n {\n return $this->boolean;\n }",
"abstract public function unescapeBoolean($bool);",
"function isOnPageAsString(){\n\t\treturn $this->on_page ? 'true' : 'false';\n\t}",
"function sqlBool($b, $db){\n\t$b = $db->real_escape_string($b);\n\tif ($b) return '1';\n\telse return '0';\n}",
"public static function strval($value)\n\t{\n\t\treturn is_bool($value)\n\t\t\t? ($value ? 'true' : 'false')\n\t\t\t: strval($value);\n\t}",
"public function testToStringWithStringValueOff()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('off');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}",
"public function getBoolField()\n {\n $value = $this->get(self::BOOL_FIELD);\n return $value === null ? (boolean)$value : $value;\n }",
"public function formatBool($value)\n {\n if ($value) {\n return 1;\n } else {\n return 0;\n }\n }",
"function get_boolean($str)\n{\n $str = strtolower($str);\n if (in_array($str, array('false', '0', 'no', 'nein', ''), TRUE))\n return FALSE;\n else\n return TRUE;\n}",
"private function strToBoolean($value) {\r\n\t\tif ($value && strtolower($value) === \"true\") {\r\n\t\t return true;\r\n\t\t} else {\r\n\t\t return false;\r\n\t\t}\r\n\t}",
"function readBoolean();",
"function output_logical($x,$format=10){\n\t//-NO or -N or -0 that format only when value=false, nothing for true\n\t//-YES or -yes or -Y or -1 would only show that format when value=true\n\t$x=read_logical($x);\n\tif(is_null($x))return NULL;\n\tswitch(true){\n\t\tcase $format==10:\n\t\t\treturn ($x?1:0);\n\t\tcase $format=='yn':\n\t\t\treturn ($x?'y':'n');\n\t\tcase $format=='YN':\n\t\t\treturn ($x?'Y':'N');\n\t\tcase $format=='yesno':\n\t\t\treturn ($x?'yes':'no');\n\t\tcase $format=='YESNO':\n\t\t\treturn ($x?'YES':'NO');\n\t\tcase $format=='tf':\n\t\t\treturn ($x?'t':'f');\n\t\tcase $format=='TF':\n\t\t\treturn ($x?'T':'F');\n\t\tcase $format=='truefalse':\n\t\t\treturn ($x?'true':'false');\n\t\tcase $format=='TRUEFALSE':\n\t\t\treturn ($x?'TRUE':'FALSE');\n\t\tcase preg_match('/^-(0|n|f)/i',$format):\n\t\t\treturn ($x?'':ltrim($format,'-')); \n\t\tcase preg_match('/^-(1|y|t)/i',$format):\n\t\t\treturn ($x?ltrim($format,'-'):''); \n\t\tdefault:\n\t\t\treturn ($x?$format:'');\n\t}\n}",
"function bool ($value)\r\n{\r\n\tif ($value === true || $value === false)\r\n\t\treturn $value;\r\n\r\n\treturn $value === 'true' || ($value !== 'false' && !!$value);\r\n}",
"private function toBoolean($string)\n\t{\n\t\tif ($string === 'true') {\n\t\t\treturn true;\n\t\t}\n\t\tif ($string === 'false') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn null;\n\t}",
"private function generateBooleanData()\n {\n return $this->faker->boolean() ? \"1\" : \"0\";\n }",
"public static function true(): bool\n {\n return true;\n }",
"private function formatBoolean($answer)\n {\n if (!$answer) {\n return 'No';\n }\n\n return 'Yes';\n }",
"public function stringToBoolean($val) {\n return ($val === \"true\");\n }",
"function rest_sanitize_boolean($value)\n {\n }",
"function printyn ($val) {\n\treturn ($val ? 'yes':'no');\n}",
"static function toBoolean ($v)\n {\n return is_string ($v) ? get (self::$BOOLEAN_VALUES, $v, false) : boolval ($v);\n }",
"public function testToStringWithStringValueYes()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('yes');\n\t\t// check that the two booleans are equal\n\t\t$this->assertEquals('true', $boolean->__toString());\n\t}",
"function toBool($var) {\n\tif (true === $var || 1 === $var) {\n\t\treturn true;\n\t}\n\tswitch (strtolower($var)) {\n\t\tcase \"yes\":\n\t\tcase \"on\":\n\t\tcase \"1\":\n\t\tcase \"y\":\n\t\tcase \"true\":\n\t\tcase \"t\":\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn false;\n\t}\n}",
"function post_bool($boolean_name) {\n\t$boolean = $_POST[$boolean_name];\n\tif ($boolean == \"true\")\n\t\treturn true;\n\n\treturn false;\n}",
"function isTrue($value) {\r\n\treturn is_bool($value) ? $value : (bool)preg_match('/^(1|y|yes|true|on)$/i',(string)$value);\r\n}",
"function convert_string_to_boolean($string)\n{\n return filter_var($string, FILTER_VALIDATE_BOOLEAN);\n}",
"public function getIsTest()\n {\n $value = $this->get(self::ISTEST);\n return $value === null ? (boolean)$value : $value;\n }",
"function booleanValuefromString($s) {\r\n\t\treturn ((strcmp($s, '0') != 0) && (strcasecmp($s, 'false') != 0));\r\n\t}",
"public function toString()\n {\n return sprintf('is equal to %s', $this->exporter->export($this->value));\n }",
"function rest_is_boolean($maybe_bool)\n {\n }",
"public function toBoolean(): bool\n {\n return !!$this->getValue();\n }",
"public function value(): bool\n {\n if (($val = $this->raw()) === null) {\n return false;\n }\n\n return (new Boolean)->decode($val);\n }",
"public static function true(): self\n {\n return self::fromValue(Value::true());\n }",
"protected function _toBoolean($value)\n\t{\n\t\tif (is_bool($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\tif (is_int($value) || is_float($value)) {\n\t\t\treturn ($value !== 0);\n\t\t}\n\t\tif (is_string($value)) {\n\t\t\treturn ($value === 't' || $value === 'T' || $value === 'true');\n\t\t}\n\t\treturn (boolean)$value;\n\t}",
"public function __tostring() {\n $str = '';\n foreach($this as $value) {\n if($value) {\n $str .= '1';\n }\n else {\n $str .= '0';\n }\n }\n \n return $str;\n }",
"private function xs_true($xs_bool) {\n return ($xs_bool == '1' || strtoupper($xs_bool) == 'TRUE');\n }",
"public function getPBool()\n {\n return isset($this->p_bool) ? $this->p_bool : false;\n }",
"private function prepareBoolParam($value)\n {\n if (is_bool( $value )) {\n return true === $value ? 'true' : 'false';\n }\n\n return $value;\n }",
"public static function GetTrueBoolTemplate( $bool = false, $hint, $translate = true, $status = '' ) {\n if ( $bool ) {\n if ( $translate ) {\n $hint = T( $hint );\n }\n\n return sprintf( '<span class=\"status %s\" title=\"%s\">%s</span>', $status, $hint, $hint );\n }\n }",
"function isBoolType($a = 0)\n{\n $b = (boolean)$a;\n\n echo \"число $a при переводе в булев тип изменится на '$b ' <br/>\n так как при переводе значение boolean будет = false(по правилам приведения типов)\";\n echo \"<br>\";\n var_dump($a, $b);\n}",
"public function testToStringWithStringValueN()\n\t{\n\t // initialize a new Boolean instance\n\t $boolean = new TechDivision_Lang_Boolean('n');\n\t\t// check that the two boolean are equal\n\t\t$this->assertEquals('false', $boolean->__toString());\n\t}"
] | [
"0.80348504",
"0.80206877",
"0.78751075",
"0.7846424",
"0.76890635",
"0.7611359",
"0.7559533",
"0.7543506",
"0.7523593",
"0.75164706",
"0.74617386",
"0.7412224",
"0.7410573",
"0.7393141",
"0.73901856",
"0.7379897",
"0.73708546",
"0.7250726",
"0.7164452",
"0.71530366",
"0.7104408",
"0.7081321",
"0.7046958",
"0.7023631",
"0.6972632",
"0.69654894",
"0.6918694",
"0.68982095",
"0.68366355",
"0.68304795",
"0.6828735",
"0.68249273",
"0.67816496",
"0.67816496",
"0.6772769",
"0.670888",
"0.67034304",
"0.6674927",
"0.6654775",
"0.6654304",
"0.6620642",
"0.66157305",
"0.6612906",
"0.65779567",
"0.6541965",
"0.65233016",
"0.6500552",
"0.64729714",
"0.646876",
"0.6456407",
"0.6447053",
"0.6435384",
"0.64336985",
"0.6428699",
"0.6421228",
"0.6418972",
"0.637356",
"0.63689226",
"0.6338687",
"0.63378423",
"0.63262165",
"0.6319881",
"0.6312015",
"0.63067955",
"0.6303697",
"0.6301654",
"0.62984157",
"0.62950397",
"0.62887293",
"0.6271498",
"0.62436163",
"0.6209653",
"0.6205097",
"0.6204741",
"0.6189002",
"0.61831874",
"0.6175829",
"0.6172276",
"0.61622244",
"0.6144383",
"0.613756",
"0.6126742",
"0.6122707",
"0.61133313",
"0.61009413",
"0.60739785",
"0.6072295",
"0.6072178",
"0.60576993",
"0.60480016",
"0.6037721",
"0.6036832",
"0.6023208",
"0.60217667",
"0.602122",
"0.60141385",
"0.60120493",
"0.5998216",
"0.59975874",
"0.5981358"
] | 0.8142804 | 0 |
compare two objects. Arguments are passed byreference test: equals, not equal, equal identity, not equal identity | function compareObjects(&$ob1, &$ob2) {
print_pre('o1 == o2 : ' . bool2str($ob1 == $ob2));
print_pre('o1 != o2 : ' . bool2str($ob1 != $ob2));
print_pre('o1 === o2 : ' . bool2str($ob1 === $ob2));
print_pre('o1 !== o2 : ' . bool2str($ob1 !== $ob2));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function equals($other);",
"public function equals( $A, $B );",
"public function equals($other) { return $this->obj==Sandbox::unwrap($other); }",
"protected function compareObjects(object $a, object $b): int\n {\n // see https://github.com/php/php-src/issues/10513\n return strcmp(spl_object_hash($a), spl_object_hash($b));\n }",
"public function equals($obj): bool;",
"public function testEquality()\n {\n $m1 = new BigMoney(Decimal::fromInteger(100), new Currency('EUR'));\n $m2 = new BigMoney(Decimal::fromInteger(100), new Currency('EUR'));\n $m3 = new BigMoney(Decimal::fromInteger(100), new Currency('USD'));\n $m4 = new BigMoney(Decimal::fromInteger(50), new Currency('EUR'));\n\n $this->assertTrue($m1->equals($m2));\n $this->assertFalse($m1->equals($m3));\n $this->assertFalse($m1->equals($m4));\n }",
"function o_eq($a, $b) {\n\t\t\treturn Obj::singleton()->equal($a, $b);\n\t\t}",
"public static function compare($a,$b);",
"public function testCmpart()\n {\n $oA = new stdClass();\n $oA->cnt = 10;\n\n $oB = new stdClass();\n $oB->cnt = 10;\n\n $this->assertTrue(cmpart($oA, $oB) == 0);\n\n $oA->cnt = 10;\n $oB->cnt = 20;\n\n $this->assertTrue(cmpart($oA, $oB) == -1);\n }",
"abstract protected function compare($idA, $idB);",
"public function equals()\n {\n $this->assertTrue($this->stubRefProperty->equals($this->stubRefProperty));\n $stubRefProperty1 = new stubReflectionProperty('stubTestProperty1', 'property');\n $stubRefProperty2 = new stubReflectionProperty('stubTestProperty1', 'anotherProperty');\n $this->assertTrue($this->stubRefProperty->equals($stubRefProperty1));\n $this->assertTrue($stubRefProperty1->equals($this->stubRefProperty));\n $this->assertFalse($this->stubRefProperty->equals($stubRefProperty2));\n $this->assertFalse($this->stubRefProperty->equals('foo'));\n $this->assertFalse($stubRefProperty2->equals($this->stubRefProperty));\n }",
"public function equals(Object $obj = null);",
"protected abstract function _equals( N $other );",
"function equals($x, $y);",
"public function compare();",
"public function equals(Object $object);",
"function isEqual ( &$anObject ) {\n \t\treturn $this->isEqualTo($anObject);\n \t}",
"public function scompare($o = null) {}",
"function equals($a, $b){\n\tif (method_exists($a, 'equals'))\n\t\treturn $a->equals($b);\n\telse\n\t\treturn $a===$b;\n}",
"abstract protected function _compare($val1, $val2);",
"public function Equals___T($other);",
"function test_equals($a, $b) {\n\treturn $a == $b;\n}",
"public function isEqualProvider()\n {\n // Declare attributes\n $objA = new stdClass();\n $objA->foo = 'bar';\n \n $objB = new stdClass();\n \n $objC = new stdClass;\n $objC->foo = 'bar';\n $objC->int = 1;\n $objC->array = array(0, array(1), array(2), 3);\n $objC->related = new stdClass;\n $objC->self = $objC;\n $objC->c = $objC;\n \n $objD = new stdClass;\n $objD->foo = 'bar';\n $objD->int = 2;\n $objD->array = array(0, array(4), array(2), 3);\n $objD->related = new stdClass;\n $objD->self = $objD;\n $objD->c = $objC;\n \n return array(\n // Integers\n array(1, 0, <<<EOF\nFailed asserting that 0 matches expected 1.\nEOF\n ),\n \n // Integer and Double\n array(1.1, 0, <<<EOF\nFailed asserting that 0 matches expected 1.1.\nEOF\n ),\n \n // Chars\n array('a', 'b', <<<EOF\nFailed asserting that two strings are equal.\n\n- Expected \n+ Actual \n\n-'a'\n+'b'\nEOF\n ), \n \n // Integer and Array\n array(1, array(0), <<<EOF\nArray (...) does not match expected type \"integer\".\nEOF\n ),\n \n // Array and Integer\n array(array(0), 1, <<<EOF\n1 does not match expected type \"array\".\nEOF\n ),\n \n // Array and Array\n array(array(0), array(1), <<<EOF\nFailed asserting that two arrays are equal.\n\n- Expected \n+ Actual \n\n Array (\n- 0 => 0\n+ 0 => 1\n )\nEOF\n ),\n \n // Boolean and boolean as string\n array(array(TRUE), array('true'), <<<EOF\nFailed asserting that two arrays are equal.\n\n- Expected \n+ Actual \n\n Array (\n- 0 => true\n+ 0 => 'true'\n )\nEOF\n ),\n \n // Nested arrays\n array(array(0, array(1), array(2), 3), array(0, array(4), array(2), 3), <<<EOF\nFailed asserting that two arrays are equal.\n\n- Expected \n+ Actual \n\n Array (\n 0 => 0\n 1 => Array (\n- 0 => 1\n+ 0 => 4\n )\n 2 => Array (\n 0 => 2\n )\n 3 => 3\n )\nEOF\n ),\n \n \n // Object and Array\n array($objA, array(23), <<<EOF\nArray (...) does not match expected type \"object\".\nEOF\n ), \n\n // Array and Object\n array(array(23), $objA, <<<EOF\nstdClass Object (...) does not match expected type \"array\".\nEOF\n ), \n \n // Object and Object\n array($objA, $objB, <<<EOF\nFailed asserting that two objects are equal.\n\n- Expected \n+ Actual \n\n stdClass Object (\n- 'foo' => 'bar'\n )\nEOF\n ),\n \n // Complex objects\n array($objC, $objD, <<<EOF\nFailed asserting that two objects are equal.\n\n- Expected \n+ Actual \n\n stdClass Object (\n 'foo' => 'bar'\n- 'int' => 1\n+ 'int' => 2\n 'array' => Array (\n 0 => 0\n 1 => Array (\n- 0 => 1\n+ 0 => 4\n )\n 2 => Array (\n 0 => 2\n )\n 3 => 3\n )\n 'related' => stdClass Object ()\n 'self' => stdClass Object (\n 'foo' => 'bar'\n- 'int' => 1\n+ 'int' => 2\n 'array' => Array (\n 0 => 0\n 1 => Array (\n- 0 => 1\n+ 0 => 4\n )\n 2 => Array (\n 0 => 2\n )\n 3 => 3\n )\n 'related' => stdClass Object ()\n 'self' => stdClass Object (*RECURSION*)\n- 'c' => stdClass Object (*RECURSION*)\n+ 'c' => stdClass Object (\n+ 'foo' => 'bar'\n+ 'int' => 1\n+ 'array' => Array (\n+ 0 => 0\n+ 1 => Array (\n+ 0 => 1\n+ )\n+ 2 => Array (\n+ 0 => 2\n+ )\n+ 3 => 3\n+ )\n+ 'related' => stdClass Object ()\n+ 'self' => stdClass Object (*RECURSION*)\n+ 'c' => stdClass Object (*RECURSION*)\n+ )\n )\n 'c' => stdClass Object (\n 'foo' => 'bar'\n 'int' => 1\n 'array' => Array (\n 0 => 0\n 1 => Array (\n 0 => 1\n )\n 2 => Array (\n 0 => 2\n )\n 3 => 3\n )\n 'related' => stdClass Object ()\n 'self' => stdClass Object (*RECURSION*)\n 'c' => stdClass Object (*RECURSION*)\n )\n )\nEOF\n \n ),\n );\n }",
"function cmp_obj($a, $b)\r\n {\r\n $al = $a->Top;\r\n $bl = $b->Top;\r\n if ($al == $bl) {\r\n return 0;\r\n }\r\n return ($al > $bl) ? +1 : -1;\r\n }",
"function comparator($object1, $object2) {\n\t\t\treturn $object1->amount < $object2->amount; \n\t\t}",
"public function testInvokeReturnsTrueIfIntegersAreEqual()\n\t{\n $this->assertTrue((new AlmostEquals())(1, 1));\n \n return;\n\t}",
"function isEqualTo ( &$anObject ) {\n \t\treturn ($this === $anObject);\n \t}",
"public function compareTo($other);",
"public function equals($arg);",
"public function shouldEqual($expected) {}",
"public function testAssertObjectPropertiesEqual()\n {\n $object = new stdClass;\n $object->first = 'first value';\n $object->second = 'second value';\n $this->assertObjectPropertiesEqual(['first', 'second'], $object);\n $this->assertObjectPropertiesEqual(['second', 'first'], $object);\n\n $this->expectException(AssertionFailedError::class);\n $this->assertObjectPropertiesEqual(['first'], $object);\n }",
"public function equals($x);",
"abstract public function equals(ValueObject $valueObject);",
"public function compare($o = null, $attrs = array()) {}",
"public static function equal($objA, $objB)\n {\n if ($objA === $objB) {\n return true;\n }\n if ($objA instanceof ObjectInterface && $objB instanceof ObjectInterface) {\n return $objA->equals($objB);\n }\n return $objA == $objB;\n }",
"function is_equal(log_op_move $other): bool {\n return $this == $other;\n }",
"function o_ne($a, $b) {\n\t\t\treturn Obj::singleton()->notEqual($a, $b);\n\t\t}",
"public function testPrimitiveCompare()\n {\n foreach ($this->primitiveTypes() as $t) {\n if ($t == $this->primitiveTypeTested()) {\n $this->assertSameType($this->primitiveTypeTested(), $t);\n $this->assertSameType($t, $this->primitiveTypeTested());\n } else {\n $this->assertIncomparable($t, $this->primitiveTypeTested());\n }\n }\n }",
"function is_equal(state $other): bool {\n return $this->log_op_list == $other->log_op_list &&\n $this->tree->is_equal($other->tree);\n }",
"function isNotEqualTo ( &$anObject ) {\n \t\treturn !($this->isEqualTo($anObject));\n \t}",
"function test_object_refs() {\n\t\t$key = rand_str();\n\t\t$object_a = new stdClass;\n\t\t$object_a->foo = 'alpha';\n\t\t$this->cache->set( $key, $object_a );\n\t\t$object_a->foo = 'bravo';\n\t\t$object_b = $this->cache->get( $key );\n\t\t$this->assertEquals( 'alpha', $object_b->foo );\n\t\t$object_b->foo = 'charlie';\n\t\t$this->assertEquals( 'bravo', $object_a->foo );\n\n\t\t$key = rand_str();\n\t\t$object_a = new stdClass;\n\t\t$object_a->foo = 'alpha';\n\t\t$this->cache->add( $key, $object_a );\n\t\t$object_a->foo = 'bravo';\n\t\t$object_b = $this->cache->get( $key );\n\t\t$this->assertEquals( 'alpha', $object_b->foo );\n\t\t$object_b->foo = 'charlie';\n\t\t$this->assertEquals( 'bravo', $object_a->foo );\n\t}",
"public function compareTo($object) : int;",
"function compare($a, $b) {\n if ($this->access($a) == $this->access($b)) {\n return 0;\n }\n return ($this->access($a) < $this->access($b)) ? -1 : 1;\n }",
"function cmp($a, $b) {\n $valueA = getCompareValue($a);\n $valueB = getCompareValue($b);\n return $valueA - $valueB;\n }",
"public function compare(\\morph\\Object $objectA, \\morph\\Object $objectB)\n {\n $compare = null;\n $propertyA = (float)$objectA->{$this->propertyName};\n $propertyB = (float)$objectB->{$this->propertyName};\n if ($propertyA == $propertyB){\n $compare = 0;\n }else{\n $compare = ($propertyA < $propertyB) ? -1 : 1;\n }\n return $compare;\n }",
"abstract protected function isEntityEqual($sProperty, JobEntityInterface $oJobEntityA, JobEntityInterface $oJobEntityB);",
"function is_equal(tree $other): bool {\n // We must treat the triples array as an unordered set\n // (where the two sets are equal even if values are present\n // in a different order).\n // Therefore, we cannot simply check if array_values()\n // for each set is equal.\n foreach($this->triples as $k => $t) {\n $o = @$other->triples[$k];\n if(!$o || !$t->is_equal($o)){\n return false;\n }\n }\n foreach($other->triples as $k => $t) {\n $o = @$this->triples[$k];\n if(!$o || !$t->is_equal($o)){\n return false;\n }\n }\n return true;\n }",
"protected function isReference(&$var1, &$var2)\n {\n //If a reference exists, the type IS the same\n if (gettype($var1) !== gettype($var2)) {\n return false;\n }\n\n $same = false;\n\n //We now only need to ask for var1 to be an array ;-)\n if (is_array($var1)) {\n //Look for an unused index in $var1\n do {\n $key = uniqid(\"is_ref_\", true);\n } while (array_key_exists($key, $var1));\n\n //The two variables differ in content ... They can't be the same\n if (array_key_exists($key, $var2)) {\n return false;\n }\n\n //The arrays point to the same data if changes are reflected in $var2\n $data = uniqid(\"is_ref_data_\", true);\n $var1[$key] =& $data;\n //There seems to be a modification ...\n if (array_key_exists($key, $var2)) {\n if ($var2[$key] === $data) {\n $same = true;\n }\n }\n\n //Undo our changes ...\n unset($var1[$key]);\n } elseif (is_object($var1)) {\n //The same objects are required to have equal class names ;-)\n if (get_class($var1) !== get_class($var2)) {\n return false;\n }\n\n $obj1 = array_keys(get_object_vars($var1));\n $obj2 = array_keys(get_object_vars($var2));\n\n //Look for an unused index in $var1\n do {\n $key = uniqid(\"is_ref_\", true);\n } while (in_array($key, $obj1));\n\n //The two variables differ in content ... They can't be the same\n if (in_array($key, $obj2)) {\n return false;\n }\n\n //The arrays point to the same data if changes are reflected in $var2\n $data = uniqid(\"is_ref_data_\", true);\n $var1->$key =& $data;\n //There seems to be a modification ...\n if (isset($var2->$key)) {\n if ($var2->$key === $data) {\n $same = true;\n }\n }\n\n //Undo our changes ...\n unset($var1->$key);\n } elseif (is_resource($var1)) {\n if (get_resource_type($var1) !== get_resource_type($var2)) {\n return false;\n }\n\n return ((string)$var1) === ((string)$var2);\n } else {\n //Simple variables ...\n if ($var1 !== $var2) {\n //Data mismatch ... They can't be the same ...\n return false;\n }\n\n //To check for a reference of a variable with simple type\n //simply store its old value and check against modifications of the second variable ;-)\n\n do {\n $key = uniqid(\"is_ref_\", true);\n } while ($key === $var1);\n\n $tmp = $var1; //WE NEED A COPY HERE!!!\n $var1 = $key; //Set var1 to the value of $key (copy)\n $same = $var1 === $var2; //Check if $var2 was modified too ...\n $var1 = $tmp; //Undo our changes ...\n }\n\n return $same;\n }",
"protected function isReference(&$var1, &$var2)\n {\n //If a reference exists, the type IS the same\n if (gettype($var1) !== gettype($var2)) {\n return false;\n }\n\n $same = false;\n\n //We now only need to ask for var1 to be an array ;-)\n if (is_array($var1)) {\n //Look for an unused index in $var1\n do {\n $key = uniqid(\"is_ref_\", true);\n } while (array_key_exists($key, $var1));\n\n //The two variables differ in content ... They can't be the same\n if (array_key_exists($key, $var2)) {\n return false;\n }\n\n //The arrays point to the same data if changes are reflected in $var2\n $data = uniqid(\"is_ref_data_\", true);\n $var1[$key] =& $data;\n //There seems to be a modification ...\n if (array_key_exists($key, $var2)) {\n if ($var2[$key] === $data) {\n $same = true;\n }\n }\n\n //Undo our changes ...\n unset($var1[$key]);\n } elseif (is_object($var1)) {\n //The same objects are required to have equal class names ;-)\n if (get_class($var1) !== get_class($var2)) {\n return false;\n }\n\n $obj1 = array_keys(get_object_vars($var1));\n $obj2 = array_keys(get_object_vars($var2));\n\n //Look for an unused index in $var1\n do {\n $key = uniqid(\"is_ref_\", true);\n } while (in_array($key, $obj1));\n\n //The two variables differ in content ... They can't be the same\n if (in_array($key, $obj2)) {\n return false;\n }\n\n //The arrays point to the same data if changes are reflected in $var2\n $data = uniqid(\"is_ref_data_\", true);\n $var1->$key =& $data;\n //There seems to be a modification ...\n if (isset($var2->$key)) {\n if ($var2->$key === $data) {\n $same = true;\n }\n }\n\n //Undo our changes ...\n unset($var1->$key);\n } elseif (is_resource($var1)) {\n if (get_resource_type($var1) !== get_resource_type($var2)) {\n return false;\n }\n\n return ((string)$var1) === ((string)$var2);\n } else {\n //Simple variables ...\n if ($var1 !== $var2) {\n //Data mismatch ... They can't be the same ...\n return false;\n }\n\n //To check for a reference of a variable with simple type\n //simply store its old value and check against modifications of the second variable ;-)\n\n do {\n $key = uniqid(\"is_ref_\", true);\n } while ($key === $var1);\n\n $tmp = $var1; //WE NEED A COPY HERE!!!\n $var1 = $key; //Set var1 to the value of $key (copy)\n $same = $var1 === $var2; //Check if $var2 was modified too ...\n $var1 = $tmp; //Undo our changes ...\n }\n\n return $same;\n }",
"public function isEqual($_record, array $_toOmit = array());",
"public function testEquals(){\n $result = 5 + 5;\n $this->assertEquals($result, 10); // verificar con ==\n }",
"public static function static_compare($a = null, $b = null)\n {\n throw new NotImplementedException(__METHOD__);\n }",
"public static function static_compare($a = null, $b = null)\n {\n throw new NotImplementedException(__METHOD__);\n }",
"static public function equal ($left, $right) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:386: lines 386-388\n\t\tif ((is_int($left) || is_float($left)) && (is_int($right) || is_float($right))) {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:387: characters 4-36\n\t\t\treturn ($left == $right);\n\t\t}\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:389: lines 389-391\n\t\tif (($left instanceof HxClosure) && ($right instanceof HxClosure)) {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:390: characters 4-41\n\t\t\treturn $left->equals($right);\n\t\t}\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:392: characters 3-41\n\t\treturn ($left === $right);\n\t}",
"public function testCompareReturnValues()\n\t{\n\t\t/** @var AbstractCollectorCommand $mock */\n\t\t$mock = $this->getAbstractCollectorMock();\n\n\t\t$this->assertEquals( -1, $mock->compare( 1, 2 ) );\n\t\t$this->assertEquals( 0, $mock->compare( 2, 2 ) );\n\t\t$this->assertEquals( 1, $mock->compare( 2, 1 ) );\n\t}",
"public function testInvokeReturnsFalseIfIntegersAreNotEqual()\n\t{\n $this->assertFalse((new AlmostEquals())(1, 2));\n \n return;\n\t}",
"function cmp($a, $b)\n {\n if ($a->points == $b->points) {\n return 0;\n }\n return ($a->points > $b->points) ? -1 : 1;\n }",
"public function equals($a = null, $b = null)\n {\n throw new NotImplementedException(__METHOD__);\n }",
"public function equals(Enumerable $object): bool;",
"static function compare(Transfer $a, Transfer $b) {\n\t\treturn $a->value - $b->value;\n\t}",
"function equal_variables($left, $right, & $context) {\r\n\t\t$left = $this->string_value($context->get($left));\r\n\t\t$right = $this->string_value($context->get($right));\r\n\r\n\t\treturn ($left == $right);\t\r\n\t\t\r\n\t}",
"function isReferenceTo ( &$anObject ) {\n \t\t// Store the value of $anObject\n \t\t$temp = $anObject;\n \t\t\n \t\t// Set the value of $anObject to something unique and see if $this\n \t\t// has changed as well.\n\t\t$anObject = uniqid(\"test_ref\");\n\t\t$is_ref = ($anObject === $this);\n\t\t\n\t\t// Put back the original value.\n\t\t$anObject = $temp;\n \t\treturn $is_ref;\n \t}",
"function abc($a,$b){return strnatcasecmp($a->getInfo(\"name\"),$b->getInfo(\"name\"));}",
"function variant_cmp($left, $right, $lcid = null, $flags = null) {}",
"public function shouldBeEqualTo($expected) {}",
"public function equal() {\r\n throw new Exception(\"Not implemented\");\r\n }",
"protected function doCompare($left, $right)\n {\n if (is_object($left) && is_object($right)) {\n $leftClass = $this->doctrineHelper->getEntityClass($left);\n $rightClass = $this->doctrineHelper->getEntityClass($right);\n\n if ($leftClass == $rightClass\n && $this->doctrineHelper->isManageableEntity($left)\n && $this->doctrineHelper->isManageableEntity($right)\n ) {\n $leftIdentifier = $this->doctrineHelper->getEntityIdentifier($left);\n $rightIdentifier = $this->doctrineHelper->getEntityIdentifier($right);\n\n return $leftIdentifier == $rightIdentifier;\n }\n }\n\n return $left == $right;\n }",
"public static function diff($origin1, $origin2) : bool\n {\n if ((! \\is_object($origin1)) || (! \\is_object($origin2))) {\n return true;\n }\n if (\\get_class($origin1) !== \\get_class($origin2)) {\n return true;\n }\n\n if (($origin1 instanceof Entity) && ($origin2 instanceof Entity)) {\n return $origin1->getPk() !== $origin2->getPk();\n }\n\n if (($origin1 instanceof Model) && ($origin2 instanceof Model)) {\n // Diff All Properties of origins\n return Model::diff($origin1, $origin2, []) ? true : false;\n }\n\n return $origin1 != $origin2;\n }",
"public static function isEqual($expected, $actual, int $level = 0, ?SplObjectStorage $objects = null): bool\n {\n switch (true) {\n case $level > 10:\n throw new Exception('Nesting level too deep or recursive dependency.');\n case $expected instanceof Expect:\n $expected($actual);\n\n return true;\n case is_float($expected) && is_float($actual) && is_finite($expected) && is_finite($actual):\n $diff = abs($expected - $actual);\n\n return ($diff < self::EPSILON) || ($diff / max(abs($expected), abs($actual)) < self::EPSILON);\n case is_object($expected) && is_object($actual) && get_class($expected) === get_class($actual):\n /* start */\n if ($expected instanceof Equalable && $actual instanceof Equalable) {\n return $expected->equals($actual);\n }\n /* end */\n $objects = $objects ? clone $objects : new SplObjectStorage(); // @phpstan-ignore-line only boolean...\n if (isset($objects[$expected])) {\n return $objects[$expected] === $actual;\n } elseif ($expected === $actual) {\n return true;\n }\n\n $objects[$expected] = $actual;\n $objects[$actual] = $expected;\n $expected = (array) $expected;\n $actual = (array) $actual;\n // break omitted\n\n case is_array($expected) && is_array($actual):\n ksort($expected, SORT_STRING);\n ksort($actual, SORT_STRING);\n if (array_keys($expected) !== array_keys($actual)) {\n return false;\n }\n\n foreach ($expected as $value) {\n if (!self::isEqual($value, current($actual), $level + 1, $objects)) {\n return false;\n }\n\n next($actual);\n }\n\n return true;\n default:\n return $expected === $actual;\n }\n }",
"public static function eq($a, $b)\n {\n if (self::nx(@$a) && self::nx(@$b)) {\n return false;\n }\n if (self::nx(@$a) && self::x(@$b)) {\n return false;\n }\n if (self::x(@$a) && self::nx(@$b)) {\n return false;\n }\n if ($a == $b) {\n return true;\n }\n return false;\n }",
"function variant_eqv($left, $right) {}",
"private function nodesEqual($a, $b)\n {\n if (!$a instanceof Node &&\n !$b instanceof Node\n ) {\n return $a === $b;\n }\n\n if (!$a instanceof Node ||\n !$b instanceof Node\n ) {\n return false;\n }\n\n if ($a->kind !== $b->kind) {\n return false;\n }\n\n if ($a->flags !== $b->flags) {\n return false;\n }\n\n foreach ($a->children as $key => $child) {\n if (!isset($b->children[$key])) {\n return false;\n }\n\n if (!$this->nodesEqual($child, $b->children[$key])) {\n return false;\n }\n }\n\n return true;\n }",
"function compare_citations($x, $y)\n{\n\n if( !$x->sources[0]->citation->uuid){// && !$y->sources[0]->citation->uuid){\n $res = -1;\n //var_dump($y->sources[0]->citation->uuid);\n }elseif(!$y->sources[0]->citation->uuid){\n $res = 1;\n //var_dump($x->sources[0]->citation->uuid);\n }\n else{\n\n\n $author_team_x = cdm_ws_get(CDM_WS_REFERENCE_AUTHORTEAM, $x->sources[0]->citation->uuid);\n $author_team_y = cdm_ws_get(CDM_WS_REFERENCE_AUTHORTEAM, $y->sources[0]->citation->uuid);\n\n //same author, and different year\n if($author_team_x->titleCache == $author_team_y->titleCache){\n $x_year = substr(\n $x->sources[0]->citation->datePublished->start,\n 0,\n strpos($x->sources[0]->citation->datePublished->start,'-'));\n $y_year = substr(\n $y->sources[0]->citation->datePublished->start,\n 0,\n strpos($y->sources[0]->citation->datePublished->start,'-'));\n if ($x_year < $y_year){//the year of the first publication is smaller\n $res = -1;\n }\n else if($x_year == $y_year){ //if same year check the page\n $x_page = $x->sources[0]->citationMicroReference;\n $y_page = $y->sources[0]->citationMicroReference;\n if($x_page < $y_page){\n $res = -1;\n }\n else{\n $res = 1;\n }\n }else\n $res = 1;\n }\n //different author and the first one is alphabetically smaller\n //else if($x->sources[0]->citation->authorship->teamMembers[0]->lastname <\n //$y->sources[0]->citation->authorship->teamMembers[0]->lastname){\n else if ($author_team_x->titleCache < $author_team_y->titleCache)\t{\n $res = -1;\n }\n //different author and the second one is alphabetically smaller\n else{\n $res = 1;\n }\n\n }\n //var_dump($res);\n //var_dump(' ============ ');\n return $res;\n}",
"static function revCompare(Transfer $a, Transfer $b) {\n\t\treturn static::compare($b, $a);\n\t}",
"private static function compare($a, $b) {\n $ordera = $a->get_order();\n $orderb = $b->get_order();\n if ($ordera > $orderb) {\n return 1;\n }\n if ($ordera < $orderb) {\n return -1;\n }\n $classa = get_class($a);\n $classb = get_class($b);\n if ($classa > $classb) {\n return 1;\n }\n if ($classb < $classa) {\n return -1;\n }\n return 0;\n }",
"protected function assertObjectsStructuresEquals(\\stdClass $expected, \\stdClass $actual)\n {\n foreach ($expected as $key => $value) {\n $this->assertObjectHasAttribute($key, $actual, json_encode($actual));\n\n if (is_object($value)) {\n $this->assertObjectsStructuresEquals($value, $actual->{$key});\n }\n }\n }",
"public function assertSame($arg1, $arg2, $message = '')\n {\n return $this->recordTest($arg1 === $arg2, $message);\n }",
"public function equals($object){\n if($object === $this->current()){\n return true;\n }\n return false;\n }",
"static function card_cmp( $a, $b ) {\n return $a->number - $b->number;\n }",
"public function cmp($a, $b)\n {\n if((int)$a->cardsValue < (int)$b->cardsValue){\n return true;\n }else{\n return false;\n }\n }",
"public function equals(MoveInterface $otherMove);",
"public function isEqualTo(IDocument $other);",
"public function equals($obj)\r\n {\r\n return $this == $obj;\r\n }",
"abstract public function is_correct( $a, $comparison_operator, $b );",
"public function equals(Constrainer $constrainer);",
"static function cmp_serie($a, $b)\r\n\t{\r\n\t\t\r\n\t\t$cmp_return = strcasecmp($a->duree, $b->duree);\r\n\t\tif ($cmp_return == 0) {\r\n\t\t\t$cmp_return = strcasecmp($a->user, $b->user);\r\n\t\t}\r\n\t\treturn $cmp_return;\r\n\t\t\r\n\t}",
"function compareUsers($user1, $user2)\n{\n\tif ($user1->id > $user2->id) return 1;\n\telseif ($user1->id == $user2->id) return 0;\n\telse return -1;\n}",
"function compareReports(CountyMarriage $r1, \n CountyMarriage $r2)\n{\n return $r1->compare($r2);\n}",
"public function equals(Setoid $that): bool;",
"public function isSameFood($foodA, $foodB);",
"public function equals($value);",
"function compararUsuarios($a, $b)\n{\n if ($a->value == $b->value) {\n return 0;\n }\n return ($a->value < $b->value) ? 1 : -1;\n}",
"public function equals(ValueObject $other)\n {\n return $this->toString() == $other->toString();\n }",
"protected final function AssertNeq( $a, $b, $strict = true )\n {\n $this->observer->OnAssert();\n\n if( $strict )\n {\n $result = ( $a !== $b );\n }\n else\n {\n $result = ( $a != $b );\n }\n\n Core::Assert( $result, var_export( $a, true ) . ' is same as ' . var_export( $b, true ) );\n }",
"public function test_assert_behaviour() {\n // Arrays.\n $a = array('a', 'b', 'c');\n $b = array('a', 'c', 'b');\n $c = array('a', 'b', 'c');\n $d = array('a', 'b', 'C');\n $this->assertNotEquals($a, $b);\n $this->assertNotEquals($a, $d);\n $this->assertEquals($a, $c);\n $this->assertEquals($a, $b, '', 0, 10, true);\n\n // Objects.\n $a = new stdClass();\n $a->x = 'x';\n $a->y = 'y';\n $b = new stdClass(); // Switched order.\n $b->y = 'y';\n $b->x = 'x';\n $c = $a;\n $d = new stdClass();\n $d->x = 'x';\n $d->y = 'y';\n $d->z = 'z';\n $this->assertEquals($a, $b);\n $this->assertNotSame($a, $b);\n $this->assertEquals($a, $c);\n $this->assertSame($a, $c);\n $this->assertNotEquals($a, $d);\n\n // String comparison.\n $this->assertEquals(1, '1');\n $this->assertEquals(null, '');\n\n $this->assertNotEquals(1, '1 ');\n $this->assertNotEquals(0, '');\n $this->assertNotEquals(null, '0');\n $this->assertNotEquals(array(), '');\n\n // Other comparison.\n $this->assertEquals(null, null);\n $this->assertEquals(false, null);\n $this->assertEquals(0, null);\n\n // Emptiness.\n $this->assertEmpty(0);\n $this->assertEmpty(0.0);\n $this->assertEmpty('');\n $this->assertEmpty('0');\n $this->assertEmpty(false);\n $this->assertEmpty(null);\n $this->assertEmpty(array());\n\n $this->assertNotEmpty(1);\n $this->assertNotEmpty(0.1);\n $this->assertNotEmpty(-1);\n $this->assertNotEmpty(' ');\n $this->assertNotEmpty('0 ');\n $this->assertNotEmpty(true);\n $this->assertNotEmpty(array(null));\n $this->assertNotEmpty(new stdClass());\n }",
"public function testSame()\n {\n $result = \"texto\";\n $this->assertSame($result, \"texto\"); //verifica con ===\n }",
"function isSameStream( IStreamProperties $_comparison ): bool;",
"public function getValueCompare();",
"public function getByReference(): bool;",
"function compareDeepValue($val1, $val2) {\n return strcmp($val1['post_author'], $val2['post_author']);\n\n}"
] | [
"0.6673335",
"0.65883684",
"0.6582047",
"0.6493526",
"0.6361353",
"0.6307741",
"0.62992543",
"0.6271147",
"0.6259657",
"0.62595",
"0.62512934",
"0.6212965",
"0.62024915",
"0.614383",
"0.61387986",
"0.60835725",
"0.6081624",
"0.60350287",
"0.6030523",
"0.60098636",
"0.6003072",
"0.5957396",
"0.59422326",
"0.5878123",
"0.5871505",
"0.58714783",
"0.58631766",
"0.58579063",
"0.5837966",
"0.58190906",
"0.57228935",
"0.566884",
"0.5662211",
"0.56544447",
"0.562413",
"0.5623943",
"0.561211",
"0.5598109",
"0.55870193",
"0.557407",
"0.55639195",
"0.5556195",
"0.5555719",
"0.55521345",
"0.55508333",
"0.5486345",
"0.5478863",
"0.54779804",
"0.54779804",
"0.5468358",
"0.5463015",
"0.54589707",
"0.54589707",
"0.5444014",
"0.5430899",
"0.5422864",
"0.5420662",
"0.541791",
"0.5409014",
"0.5406602",
"0.5401679",
"0.53949445",
"0.53869736",
"0.53749955",
"0.5370879",
"0.53593004",
"0.53569126",
"0.533318",
"0.5290321",
"0.52720606",
"0.524563",
"0.5242945",
"0.52385384",
"0.52317905",
"0.5231143",
"0.5229287",
"0.52113724",
"0.5205704",
"0.52041745",
"0.5195412",
"0.51910734",
"0.51907766",
"0.5184796",
"0.51829666",
"0.51545113",
"0.51469123",
"0.5143293",
"0.51215416",
"0.51091236",
"0.510643",
"0.5102959",
"0.50975823",
"0.50967586",
"0.5092956",
"0.50915074",
"0.50826305",
"0.50788915",
"0.50704587",
"0.50688666",
"0.50632226"
] | 0.7712369 | 0 |
Private function used to create flash messages. | private function create($message, $type, $icon)
{
session()->flash('flash_message', [
'type' => $type,
'message' => $message,
'icon' => $icon
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function addFlashMessages() {}",
"protected function renderFlashMessages() {}",
"public function renderFlashMessages() {}",
"public function prepareFlashMessages()\n {\n global $session;\n\n $messages = [];\n foreach ($session->getFlashBag()->all() as $msgType => $msg) {\n $messages[$msgType] = $msg;\n }\n //print_r($messages);\n //exit;\n\n $this->addTwigVar('messages', $messages);\n }",
"function flashMessage() {\n\t$message = Template::getFlashMessage();\n\tif ( ! empty($message) ) {\n\t\t$messageHtml .= \"<div class='collection'>\";\n\t\t$messageHtml .= \"<a href='#' class='collection-item \" . $message[\"type\"] . \"'>\" . $message[\"body\"] . \"</a>\";\n\t\t$messageHtml .= \"</div>\";\n\n\t\techo $messageHtml;\n\t}\n\treturn NULL;\n}",
"function flash_message()\n\t{\n\t\t$ci =& get_instance();\n\t\t$flashmsg = $ci->session->flashdata('falshmsg');\n\t\t$html = '';\n\t\tif (is_array($flashmsg)){\n\t\t\t$html = '<div id=\"flashmessage\" class=\"'.$flashmsg['type'].'\">\n\t\t\t\t\t<img style=\"float: right; cursor: pointer\" id=\"closemessage\" src=\"'.base_url().'img/close.png\" />\n\t\t\t\t\t\t\t<p>'.$flashmsg['content'].'</p>\n\t\t\t\t\t\t\t\t\t</div>';\n\t\t}\n\t\treturn $html;\n\t}",
"function flash_message($type, $message) {\n $_SESSION['message'] = array('type' => $type, 'message' => $message);\n if (isset($_SESSION['message'])) {\n\t\tprint_r( $_SESSION['message']);\n\t}\n}",
"static function flashMessage ()\n {\n if (Session::has ('message')) {\n list ($flashType, $message, $title) = explode ('|', Session::get ('message')) + [''] + [''];\n $title = $title ? \"<h4>$title</h4>\" : '';\n return <<<HTML\n<div class=\"alert alert-$flashType\">\n $title$message\n</div>\n</script>\nHTML;\n }\n }",
"function flash( $name = '', $message = '', $class = 'success fadeout-message', $url = '' )\n{\n if( !empty( $name ) )\n {\n //No message, create it\n if( !empty( $message ) && empty( $_SESSION[$name] ) )\n {\n if( !empty( $_SESSION[$name] ) )\n {\n unset( $_SESSION[$name] );\n }\n if( !empty( $_SESSION[$name.'_class'] ) )\n {\n unset( $_SESSION[$name.'_class'] );\n }\n \n $_SESSION[$name] = $message;\n $_SESSION[$name.'_class'] = $class;\n }\n //Message exists, display it\n elseif( !empty( $_SESSION[$name] ) && empty( $message ) )\n {\n $class = !empty( $_SESSION[$name.'_class'] ) ? $_SESSION[$name.'_class'] : 'success';\n echo '<div class=\"'.$class.'\" id=\"msg-flash\">'.$_SESSION[$name].'</div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name.'_class']);\n }\n }\n\tif( !empty( $url ) || $url != '' )\n {\n\t\theader('Location: '.$url);\n\t\texit();\n\t}\n}",
"function flash( $name = '', $message = '', $class = 'success fadeout-message' )\n{\n if( !empty( $name ) )\n {\n //No message, create it\n if( !empty( $message ) && empty( $_SESSION[$name] ) )\n {\n if( !empty( $_SESSION[$name] ) )\n {\n unset( $_SESSION[$name] );\n }\n if( !empty( $_SESSION[$name.'_class'] ) )\n {\n unset( $_SESSION[$name.'_class'] );\n }\n \n $_SESSION[$name] = $message;\n $_SESSION[$name.'_class'] = $class;\n }\n //Message exists, display it\n elseif( !empty( $_SESSION[$name] ) && empty( $message ) )\n {\n $class = !empty( $_SESSION[$name.'_class'] ) ? $_SESSION[$name.'_class'] : 'success';\n echo '<div class=\"'.$class.'\" id=\"msg-flash\">'.$_SESSION[$name].'</div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name.'_class']);\n }\n }\n}",
"function flash( $name = '', $message = '', $class = 'success fadeout-message' )\n{\n //We can only do something if the name isn't empty\n if( !empty( $name ) )\n {\n //No message, create it\n if( !empty( $message ) && empty( $_SESSION[$name]))\n {\n if( !empty( $_SESSION[$name] ) )\n {\n unset( $_SESSION[$name] );\n }\n if( !empty( $_SESSION[$name.'_class'] ) )\n {\n unset( $_SESSION[$name.'_class'] );\n }\n\n $_SESSION[$name] = $message;\n $_SESSION[$name.'_class'] = $class;\n }\n //Message exists, display it\n elseif( !empty( $_SESSION[$name] ) && empty( $message ))\n {\n $class = !empty( $_SESSION[$name.'_class'] ) ? $_SESSION[$name.'_class'] : 'success';\n echo '<div id =\"message\" class=\"alert alert-'.$class.' alert-dismissible fade show\" role=\"alert\">'\n .$_SESSION[$name]\n .'<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name.'_class']);\n }\n }\n}",
"function flash($type, $message) {\n // creates the flash holder, if not defined yet\n if(!isset($_SESSION['flash'])) {\n $_SESSION['flash'] = array();\n $_SESSION['flash']['uri'] = $_SERVER['REQUEST_URI'];\n }\n // sets the message\n $_SESSION['flash'][$type] .= $message;\n}",
"public function pushErrorMessagesToFlashMessageQueue() {}",
"function flash($name = '', $message = '', $class = 'uk-alert-success')\n{\n //We can only do something if the name isn't empty\n if (!empty($name)) {\n //No message, create it\n if (!empty($message) && empty($_SESSION[$name])) {\n if (!empty($_SESSION[$name])) {\n unset($_SESSION[$name]);\n }\n if (!empty($_SESSION[$name . '_class'])) {\n unset($_SESSION[$name . '_class']);\n }\n\n $_SESSION[$name] = $message;\n $_SESSION[$name . '_class'] = $class;\n }\n //Message exists, display it\n elseif (!empty($_SESSION[$name]) && empty($message)) {\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : 'uk-alert-success';\n echo '<div class=\"' . $class . '\" uk-alert> <a class=\"uk-alert-close\" uk-close></a> <p>' . $_SESSION[$name] . '</p></div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name . '_class']);\n }\n }\n}",
"protected function addErrorFlashMessage() {}",
"protected function getErrorFlashMessage() {}",
"public function flash_create($text, $type){\n $_SESSION[\"flash\"]= array(\"text\"=>$text, \"type\"=>$type);\n }",
"public function renderFlash()\n {\n // get the feedback (they are arrays, to make multiple positive/negative messages possible)\n $feedback_positive = Session::get('feedback_positive');\n $feedback_negative = Session::get('feedback_negative');\n\n // echo out positive messages\n if (isset($feedback_positive)) {\n foreach ($feedback_positive as $feedback) {\n echo '<div class=\"flash success\">'.$feedback.'</div>';\n }\n }\n\n // echo out negative messages\n if (isset($feedback_negative)) {\n foreach ($feedback_negative as $feedback) {\n echo '<div class=\"flash error\">'.$feedback.'</div>';\n }\n }\n\n // delete these messages (as they are not needed anymore and we want to avoid to show them twice\n Session::set('feedback_positive', null);\n Session::set('feedback_negative', null);\n }",
"private function create($title, $message, $type, $key = 'flash_message')\n\t{\n\t\t// Jeff says ok to do it like this vs $this->session() since it's always in the Http context\n\t\tsession()->flash($key, [\n\t\t\t'title' => $title,\n\t\t\t'message' => $message,\n\t\t\t'type' => $type\n\t\t]);\n\t}",
"protected function showFlashMessages()\n{\n //set the flash messages to all types of laravel session\n session()->flash('error', $this->errorMessages);\n session()->flash('info', $this->infoMessages);\n session()->flash('success', $this->successMessages);\n session()->flash('warning', $this->warningMessages);\n}",
"protected function getFlashMessagesFromSession() {}",
"function setFlash($type, $message)\n{\n $_SESSION['message'] = [$type, $message];\n}",
"function setFlash($msg,$class=\"info\"){\n if($msg!=\"\")\n \t{\n $this->flashMsg = \"<div class='flash'><div class='message $class'><p>\".$msg.\"</p></div></div>\";\n }\n else\n {\n $this->flashMsg = '';\n }\n }",
"function get_flash($type)\n{\n $ci = &get_instance();\n $message = $ci->session->flashdata($type);\n\n if ($message) {\n return htmlentities($message);\n }\n\n return '';\n}",
"function flashMessage()\n{\n if (isset($_SESSION['flash']))\n {\n $flash = $_SESSION['flash'];\n unset($_SESSION['flash']);\n foreach ($flash as $key => $value)\n {\n switch ($key)\n {\n case 'fail':\n echo '<p class=\"flash\" style=\"background:#f9ccca\">';\n break;\n case 'success':\n echo '<p class=\"flash\" style=\"background:#b6e5af\">';\n break;\n default:\n echo '<p class=\"flash\" style=\"background:#f9ccca\">';\n }\n echo $value . '</p>';\n }\n }\n}",
"function flash() {\n return new Flash;\n }",
"function set_flash_msg($msg, $type = \"success\", $dismissable = true, $showduration = 5000) {\n $class = null;\n $closeBtn = null;\n if ($type != 'custom') {\n $class = \"alert alert-$type\";\n if ($dismissable == true) {\n $class .= \" alert-dismissable\";\n $closeBtn = '<button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>';\n }\n }\n $msg = '<div data-show-duration=\"' . $showduration . '\" id=\"flashmsgholder\" class=\"' . $class . ' animated bounce\">\n\t\t\t\t\t' . $closeBtn . '\n\t\t\t\t\t' . $msg . '\n\t\t\t</div>';\n set_session(\"MsgFlash\", $msg);\n}",
"protected function getHeaderFlashMessagesForCurrentPid() {}",
"private function getFlashMessageFromSession() {\n $error = \\Tools\\Session::get('error');\n \\Tools\\Session::clear('error');\n $warning = \\Tools\\Session::get('warning');\n \\Tools\\Session::clear('warning');\n $success = \\Tools\\Session::get('success');\n \\Tools\\Session::clear('success');\n\n if(isset($error))\n \\Tools\\FlashMessage::addErrorSet($error);\n if(isset($warning))\n \\Tools\\FlashMessage::addWarningSet($warning);\n if(isset($success))\n \\Tools\\FlashMessage::addSuccessSet($success);\n }",
"public static function createFlashMessage(string $message, string $title = '', int $mode = FlashMessage::OK): void\n {\n // Don't store flash messages in CLI context\n // Note: the getUserByContext check is only required for TYPO3 v10 and is fixed in v11 (94418).\n $storeInSession = !Environment::isCli() && null !== self::getUserByContext();\n $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $message, $title, $mode, $storeInSession);\n $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);\n $messageQueue = $flashMessageService->getMessageQueueByIdentifier();\n $messageQueue->enqueue($flashMessage);\n }",
"function flash($name = '', $message = '', $class = 'alert alert-success')\n{\n // Check that a name is passed in \n // We are storimg the session $name as the KEY\n if (!empty($name)) {\n if (!empty($message) && empty($_SESSION[$name])) {\n if (!empty($_SESSION[$name])) {\n unset($_SESSION[$name]);\n }\n\n if (!empty($_SESSION[$name . '_class'])) {\n unset($_SESSION[$name . '_class']);\n }\n\n // And we are storing the $message as the VALUE\n $_SESSION[$name] = $message;\n\n // setting the class inside of the session variable\n $_SESSION[$name . '_class'] = $class;\n } elseif (empty($message) && !empty($_SESSION[$name])) {\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : '';\n // display it here, the div with the class\n echo '<div class=\"' . $class . '\" id=\"msg-flash\">' . $_SESSION[$name] . '</div>';\n // unsetting it\n unset($_SESSION[$name]);\n unset($_SESSION[$name . '_class']);\n }\n }\n}",
"static private function CreateHeaderMessage() {\n\t\tif (isset($_SESSION['message'])) {\n\t\t\t$type = (string)$_SESSION['message-type'];\n\t\t\tif ($type == 'note' || $type == 'error' || $type == 'info') {\n\t\t\t\tMessages::add((string)$_SESSION['message'], $type);\n\t\t\t}\n unset($_SESSION['message']);\n unset($_SESSION['message-type']);\n\t\t}\n\t}",
"function tflash($message, $type = 'info', $id = null, $visibility = null, $removed_ids = null) {\n switch ($type) {\n case 'info':\n $type = TFLASH::INFO;\n break;\n case 'success':\n $type = TFLASH::SUCCESS;\n break;\n case 'error':\n $type = TFLASH::ERROR;\n break;\n default:\n trigger_error('Invalid TFLASH message type \"'. $type .'\" (allowed: info, success, error)', E_USER_WARNING);\n $type = 'info';\n }\n\n TFLASH::add($message, $type, $id, $visibility, $removed_ids);\n}",
"protected function initFlash()\n {\n $this->di->setShared('flash', function () {\n return new Flash(\n [\n 'error' => 'col-md-5 center-block alert alert-danger fade in',\n 'success' => 'col-md-5 center-block alert alert-success fade in',\n 'notice' => 'col-md-5 center-block alert alert-info fade in',\n 'warning' => 'col-md-5 center-block alert alert-warning fade in',\n ]\n );\n });\n\n $this->di->setShared('flashSession', function () {\n return new FlashSession([\n 'error' => 'col-md-5 center-block alert alert-danger fade in',\n 'success' => 'col-md-5 center-block alert alert-success fade in',\n 'notice' => 'col-md-5 center-block alert alert-info fade in',\n 'warning' => 'col-md-5 center-block alert alert-warning fade in',\n ]);\n });\n }",
"public function getFlashBag();",
"public function showFlashMessage()\n {\n \tif (isset($_SESSION['flashMessage'])) {\n \t\techo '<div class=\"alert alert-' . $_SESSION['flashMessage']['type'] . '\" role=\"alert\">';\n \t\techo '<strong>'. $_SESSION['flashMessage']['message'] . '</strong>';\n \t\techo '</div>';\n\n \t\tunset($_SESSION['flashMessage']);\n \t}\n }",
"public function renderFlash() {\n $this->sanitizeObsoleteFlashSession('flash');\n $this->sanitizeObsoleteFlashSession('info');\n\n $render = [];\n $render[] = $this->Flash->render();\n\n $render[] = $this->Flash->render('info', [\n 'params' => [\n 'timeout' => self::$infoFlashTimeout,\n 'renderTimeout' => 1500\n ]\n ]);\n\n return implode('', array_filter($render));\n }",
"public function flashMessage($message, $type = 'info')\n\t{\n\t\t$flash = parent::flashMessage($message, $type);\n\t\t$flash->count = NULL;\n\t\t$flash->parameters = [];\n\t\treturn $flash;\n\t}",
"public static function getFlash() {\r\n if (Yii::app()->user->hasFlash('success')) {\r\n return '<div class=\"alert alert-success alert-dismissable\"><button aria-hidden=\"true\" data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button>'. Yii::app()->user->getFlash('success') .'</div>';\r\n } elseif (Yii::app()->user->hasFlash('error')) {\r\n return '<div class=\"alert alert-danger alert-dismissable\"><button aria-hidden=\"true\" data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button>'. Yii::app()->user->getFlash('error') .'</div>';\r\n } else {\r\n return '';\r\n }\r\n }",
"protected function _prep_flashdata()\n\t{\n\t\tif ($this->flashdata = ee('Cookie')->getSignedCookie('flash'))\n\t\t{\n\t\t\t$this->_age_flashdata();\n\t\t\treturn;\n\t\t}\n\n\t\t$this->flashdata = array();\n\t}",
"public function handleFlashNotifications(){\n\t\tif($this->input->get('form_success') !== false){\n\t\t\t$o = \"\" ;\n\t\t\t$function_name = $this->input->get('form_success') ;\n\t\t\t\n\t\t\t$o .= \"<div id='form-success' class='flash_message pad_all'>\" ; \n\t\t\t\t$o .= \"<p>\" ;\n\t\t\t\t\t$o .= $this->getFlashFunctionSuccessMessage($function_name) ;\n\t\t\t\t$o .= \"</p>\" ;\n\t\t\t$o .= \"</div>\" ;\n\t\t\t\n\t\t\t$o .= \"<script>\" ;\n\t\t\t\t$o .= \"$('.flash_message').fadeOut(7000) ;\" ;\n\t\t\t$o .= \"</script>\" ;\n\t\t\t\n\t\t\treturn $o ;\n\t\t}\n\t\tif($this->input->get('form_error') !== false){\n\t\t\t$o = \"\" ;\n\t\t\t$function_name = $this->input->get('form_error') ;\n\t\t\t\n\t\t\t$o .= \"<div id='form-error' class='flash_message pad_all'>\" ; \n\t\t\t\t$o .= \"<p>\" ;\n\t\t\t\t\t$o .= $this->getFlashFunctionErrorMessage($function_name) ;\n\t\t\t\t$o .= \"</p>\" ;\n\t\t\t$o .= \"</div>\" ;\n\t\t\t\n\t\t\t$o .= \"<script>\" ;\n\t\t\t\t$o .= \"$('.flash_message').fadeOut(7000) ;\" ;\n\t\t\t$o .= \"</script>\" ;\n\t\t\t\n\t\t\treturn $o ;\n\t\t}\n\t}",
"protected function _processFlashMessage(Redirect_Flash $flash)\n\t{\n\t\t$session = $this->_application->getServiceLocator()->get('web.Session');\n\t\t$ns = $session->getNamespace('flash');\n\t\t$ns->message = $flash->getMessage();\n\t\t$ns->type = $flash->getType();\n\t\t$ns->setLifetime('message', 1);\n\t\t$ns->setLifetime('type', 1);\n\t}",
"function osc_show_flash_message($section = 'pubMessages', $class = \"flashmessage\", $id = \"flashmessage\") {\n $messages = Session::newInstance()->_getMessage($section);\n if (is_array($messages)) {\n\n foreach ($messages as $message) {\n\n echo '<div id=\"flash_js\"></div>';\n \n if (isset($message['msg']) && $message['msg'] != '') {\n echo '<div id=\"' . $id . '\" class=\"' . strtolower($class) . ' ' . strtolower($class) . '-' .$message['type'] . '\"><a class=\"btn ico btn-mini ico-close\">x</a>';\n echo osc_apply_filter('flash_message_text', $message['msg']);\n echo '</div>';\n } else if($message!='') {\n echo '<div id=\"' . $id . '\" class=\"' . $class . '\">';\n echo osc_apply_filter('flash_message_text', $message);\n echo '</div>';\n } else {\n echo '<div id=\"' . $id . '\" class=\"' . $class . '\" style=\"display:none;\">';\n echo osc_apply_filter('flash_message_text', '');\n echo '</div>';\n }\n }\n } \n Session::newInstance()->_dropMessage($section);\n }",
"function flash($title = null, $message = null)\n{\n $flash = app('App\\Http\\Flash');\n\n\n if(func_num_args() == 0){\n\n return $flash;\n }\n\n return $flash->message($title, $message);\n\n}",
"public function flash($name, $data);",
"public function flash($name, $data);",
"public function flash($name, $data);",
"public function getFlashMessage() {\n if($message = Session::get('Site.Message')){\n Session::clear('Site.Message');\n $array = new ArrayData($message);\n return $array->renderWith('FlashMessage');\n }\n }",
"function smarty_function_flash_box( $params, &$smarty ) {\n\n\tif( $message = flash_get( 'success' ) ) {\n\t\t$type = 'success';\n\t} elseif( $message = flash_get( 'error' ) ) {\n\t\t$type = 'error';\n\t} else {\n\t\treturn '';\n\t} // if\n\t\n\treturn '<div id=\"' . $type . '\" class=\"flash flash-' . $type . '\"><span>' . $message . '</span></div>';\n\n}",
"function tn_prepare_messages() {\n\n\t$_messages = TN_Messages::get_instance();\n\n\t$messages = $_messages->get_messages();\n\n\tif( $messages ) :\n\n\t\tadd_action( 'tn_messages', function() use ( $messages ) { \n\n\t\t\tforeach( $messages as $key => $message ) {\n\t\t\t\t// we add data-message - useful if element is eg cloned to pull it downscreen\n\t\t\t\tif( isset( $message['success'] ) ) : ?>\n\t\t\t\t\t<div data-message=\"<?php echo ++$key; ?>\" class=\"tn_message success\"><?php echo $message['success']; ?></div>\n\t\t\t\t<?php elseif ( isset( $message['error'] ) ) : ?>\n\t\t\t\t\t<div data-message=\"<?php echo ++$key; ?>\" class=\"tn_message error\"><?php echo $message['error']; ?></div>\t\n\t\t\t\t<?php endif; \n\t\t\t}\n\n\t\t});\n\n\tendif;\n}",
"protected function flash()\n\t{\n\t\t$this->session->flash($this->sessionKey, $this->bag->toJson());\n\t}",
"public static function initFlash() {\r\n\t\tif (self::$flash)\r\n\t\t\treturn;\r\n\r\n\t\tself::$flash = self::getInstance(array(\r\n\t\t\t'prefix'=>'flash',\r\n\t\t\t'nameSpace'=>'flash',\r\n\t\t));\r\n\r\n\t\tself::$flashVars = self::$flash->getAll();\r\n\t\tself::$flash->clear();\r\n\t}",
"function flash($message = null, $level = 'info')\n{\n $session = app('session');\n if (!is_null($message)) {\n $session->flash('flash_notification.message', $message);\n $session->flash('flash_notification.level', $level);\n }\n}",
"function casano_show_product_loop_new_flash() {\r\n\t\twc_get_template( 'loop/new-flash.php' );\r\n\t}",
"public function show()\n {\n if (!is_null($_SESSION['flash_message']['type'])) {\n\n $type = $_SESSION['flash_message']['type'];\n\n $message = $_SESSION['flash_message']['message'];\n\n unset($_SESSION['flash_message']); // unset flash_message key\n\n return '<div id=\"flash\" class=\"alert alert-' . $type . '\" role=\"alert\">\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\">\n <span aria-hidden=\"true\">×</span>\n <span class=\"sr-only\">Close</span></button>' . $message . '</div>';\n }\n }",
"public static function flash($type, $message = null) {\n if(func_num_args() == 1) {\n $message = $type;\n $type = null;\n }\n $msg = new stdClass;\n $msg->message = $message;\n $msg->type = $type;\n self::addMessage($msg);\n }",
"function flash($message, $level = 'info')\n{\n session()->put('flash_message', $message);\n session()->put('flash_message_level', $level);\n}",
"public static function createFlashMessage($message, $title = '', $mode = FlashMessage::OK)\n {\n $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $message, $title, $mode, true);\n $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);\n $messageQueue = $flashMessageService->getMessageQueueByIdentifier();\n $messageQueue->enqueue($flashMessage);\n }",
"protected function setFlashMessage()\n {\n if ($message = $this->session()->getFlash('flash-message')) {\n if ($this->session()->getFlash('flash-error')) {\n $this->pageView()->setError($message);\n } else {\n $this->pageView()->setMessage($message);\n }\n }\n }",
"public function flashes(): FlashBag;",
"function flash($message = null, $type = null)\n {\n $flashMessage = app(\\FlashMessages\\FlashMessageContract::class);\n\n if (!is_null($message)) {\n return $flashMessage->flashMessage($message, $type);\n }\n\n return $flashMessage;\n }",
"function flashMessage() {\n if (isset($_SESSION['add'])){\n echo('<p style=\"color: red;\">'.htmlentities($_SESSION['add']).\"</p>\");\n unset($_SESSION['add']);\n }\n if (isset($_SESSION['success'])) {\n echo('<p style=\"color: green;\">'.htmlentities($_SESSION['success']).\"</p>\\n\");\n unset($_SESSION['success']);\n }\n if (isset($_SESSION['error'])) {\n echo('<p style=\"color:red;\">'.htmlentities($_SESSION['error']).\"</p>\\n\");\n unset($_SESSION['error']);\n }\n}",
"function setFlash($message = null)\n{\n $flash = $message;\n if ($message === null && isset($_SESSION['flash.message'])) {\n $flash = $_SESSION['flash.message'];\n unset($_SESSION['flash.message']);\n } else {\n $_SESSION['flash.message'] = $message;\n }\n\n return $flash;\n}",
"public function multiFlash()\n {\n $output = '';\n for ($i = 1; $i <= self::MF_MAX; $i++) {\n $key = self::MF_KEY_PREFIX . (string)$i;\n if (!$this->hasFlash($key)) continue;\n list($msg, $class) = $this->getFlash($key);\n Yii::trace(\"Echoing multiFlash: $key\", 'application.webuser.multiFlash()');\n $output .= \"<div class=\\\"alert alert-$class\\\">$msg</div>\\n\";\n }\n return $output;\n }",
"public function testAddWithMultipleMessages()\n {\n Phlash::add(\"info\", \"Please log in to continue\");\n Phlash::add(\"error\", \"There was a problem processing your request\");\n\n $flashMessages = Phlash::get();\n\n $this->assertNotEmpty($flashMessages);\n $this->assertEquals(count($flashMessages), 2);\n $this->assertEquals($flashMessages[0]->id, 0);\n $this->assertEquals($flashMessages[0]->type, \"info\");\n $this->assertEquals($flashMessages[0]->message, \"Please log in to continue\");\n $this->assertEquals($flashMessages[1]->id, 1);\n $this->assertEquals($flashMessages[1]->type, \"error\");\n $this->assertEquals($flashMessages[1]->message, \"There was a problem processing your request\");\n\n Phlash::clear();\n }",
"function FlashMessage($code) {\n\t$messages = config('flash_messages');\n\t$return = [];\n\tif (is_array($code)) {\n\t\tforeach ($code as $value) {\n\t\t\t$return[$value] = $messages[$value];\n\t\t}\n\t} else {\n\t\t$return = $messages[$code];\n\t}\n\n\treturn $return;\n}",
"function flash_msg(){ ?>\r\n <?php if(isset($_SESSION['success'])): ?>\r\n <p style=\"color: green\"><?= htmlentities($_SESSION['success']) ?></p>\r\n <?php unset($_SESSION['success']); ?>\r\n <?php elseif(isset($_SESSION['failure'])): ?>\r\n <p style=\"color: red\"><?= htmlentities($_SESSION['failure']) ?></p>\r\n <?php unset($_SESSION['failure']); ?>\r\n <?php endif; ?>\r\n<?php }",
"function getFlash() {\n return isset($_SESSION['flash.message']) ? $_SESSION['flash.message'] : false;\n}",
"function osc_add_flash_warning_message($msg, $section = 'pubMessages') {\n Session::newInstance()->_setMessage($section, $msg, 'warning');\n }",
"protected function _set_flash_cookie()\n\t{\n\t\tif (count($this->flashdata) > 0)\n\t\t{\n\t\t\tee('Cookie')->setSignedCookie('flash', $this->flashdata, 86500);\n\t\t}\n\t}",
"public function getFlashMessage($request)\n {\n $session = $request->session();\n\n $flash_message['type'] = $session->get(\"{$this->flash_name}.type\");\n $flash_message['message'] = $session->get(\"{$this->flash_name}.message\");\n return $flash_message;\n }",
"public function _age_flashdata()\n\t{\n\t\tforeach($this->flashdata as $key => $val)\n\t\t{\n\t\t\tif (strpos($key, ':old:') !== 0)\n\t\t\t{\n\t\t\t\tif (strpos($key, ':new:') === 0)\n\t\t\t\t{\n\t\t\t\t\t$this->flashdata[substr($key, 5)] = $val;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->flashdata[':old:'.$key] = $val;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tunset($this->flashdata[$key]);\n\t\t}\n\n\t\t$this->_set_flash_cookie();\n\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}",
"public function testShowMessages() \r\n {\r\n // Adding Stuff to Array\r\n $this->flash->message(\"testMessage\");\r\n $this->flash->error(\"testError\");\r\n $this->flash->warning(\"testWarning\");\r\n $this->flash->success(\"testSuccess\");\r\n\r\n $message = \"Rendering Error, Check your HTML Output\";\r\n\r\n $matcher = [\r\n \"tag\" => \"section\",\r\n 'attributes' => array('class' => 'flash-messages'),\r\n 'child' => ['tag' => 'div', 'class' => 'inner', \r\n 'child' => array('tag' => 'div', 'class' => 'flash')\r\n ],\r\n ];\r\n\r\n $render = $this->flash->show();\r\n $this->assertTag($matcher, $render, $message);\r\n $this->assertEquals(null, $_SESSION[\"flash\"], \"Didn't clean flash array after render.\");\r\n\r\n }",
"public function preExecute(){\r\n\t\t$this->flashMessage = array();\r\n\t}",
"public function flash( $msg, $type = 'info', $params = null ) {\n\t\tklein_start_session();\n\t\tif ( is_array( $type ) ) {\n\t\t\t$params = $type;\n\t\t\t$type = 'info';\n\t\t}\n\t\tif ( ! isset( $_SESSION['__flashes'] ) ) {\n\t\t\t$_SESSION['__flashes'] = array( $type => array() );\n\t\t} elseif ( ! isset( $_SESSION['__flashes'][ $type ] ) ) {\n\t\t\t$_SESSION['__flashes'][ $type ] = array();\n\t\t}\n\t\t$_SESSION['__flashes'][ $type ][] = $this->markdown( $msg, $params );\n\t}",
"function flash($message){\n\t$flash = app('App\\Http\\Flash');\n\n\treturn $flash->message($message);\n}",
"function ajan_core_setup_message() {\n\n\t// Get ActivityNotifications\n\t$ajan = activitynotifications();\n\n\tif ( empty( $ajan->template_message ) && isset( $_COOKIE['ajan-message'] ) ) {\n\t\t$ajan->template_message = stripslashes( $_COOKIE['ajan-message'] );\n\t}\n\n\tif ( empty( $ajan->template_message_type ) && isset( $_COOKIE['ajan-message-type'] ) ) {\n\t\t$ajan->template_message_type = stripslashes( $_COOKIE['ajan-message-type'] );\n\t}\n\n\tadd_action( 'template_notices', 'ajan_core_render_message' );\n\n\tif ( isset( $_COOKIE['ajan-message'] ) ) {\n\t\t@setcookie( 'ajan-message', false, time() - 1000, COOKIEPATH );\n\t}\n\n\tif ( isset( $_COOKIE['ajan-message-type'] ) ) {\n\t\t@setcookie( 'ajan-message-type', false, time() - 1000, COOKIEPATH );\n\t}\n}",
"public function add(Message $flash);",
"public static function getMessage(){\n $flashMessages = array();\n if(isset($_SESSION['flashMessages'])){\n $flashMessages = $_SESSION['flashMessages'];\n unset($_SESSION['flashMessages']);\n }\n return $flashMessages;\n }",
"public function setFlash($_type, $_message) {\n return $this->_container->get('session')->getFlashBag()->add($_type, $_message);\n }",
"public function setFlash($_type, $_message) {\n return $this->_container->get('session')->getFlashBag()->add($_type, $_message);\n }",
"public function setFlash($_type, $_message) {\n return $this->_container->get('session')->getFlashBag()->add($_type, $_message);\n }",
"public function setFlash($_type, $_message) {\n return $this->_container->get('session')->getFlashBag()->add($_type, $_message);\n }",
"public function setFlash($_type, $_message) {\n return $this->_container->get('session')->getFlashBag()->add($_type, $_message);\n }",
"function saveNew($user_id, $rendered, $title, $type, $introduction, $detail, $path, $picpath=\"\", $notice_id=100000) \n {\n $flash = new self();\n $flash->user_id = $user_id;\n $flash->rendered = $rendered;\n $flash->title = $title;\n $flash->type = $type;\n $flash->introduction = $introduction;\n $flash->detail = $detail;\n $flash->path = $path;\n $flash->picpath = $picpath;\n $flash->notice_id = $notice_id;\n $flash_id = $flash->insert();\n\n return $flash;\n }",
"function messages(){\n\t\t$return = \"\\n\";\n\t\tif ($this->CI->session->flashdata('error_message')) {\n\t\t\t$return .= '<div class=\"alert alert-danger alert-dismissable\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>';\n\t\t\t$return .= $this->CI->session->flashdata('error_message');\n\t\t\t$return .= '</div>';\n\t\t} else if ($this->CI->session->flashdata('success_message')) {\n\t\t\t$return .= '<div class=\"alert alert-success alert-dismissable\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>';\n\t\t\t$return .= $this->CI->session->flashdata('success_message');\n\t\t\t$return .= '</div>';\n\t\t}\n\n\t\treturn $return;\n\n\t}",
"function setFlash($message, $type = 'success') {\n $this->session->set_flashdata($type, $message);\n }",
"function set_flashdata( $index,$message ){\n\t\t$_SESSION[$index] = $message ;\n\t}",
"private function _flashdata_mark() {\n\t\tforeach ($_SESSION as $name => $value) {\n\t\t\t$parts = explode(':new:', $name);\n\t\t\tif (is_array($parts) && count($parts) == 2) {\n\t\t\t\t$new_name = $this->flash_key.':old:'.$parts[1];\n\t\t\t\t$this->set_userdata($new_name, $value);\n\t\t\t\t$this->unset_userdata($name);\n\t\t\t}\n\t\t}\n\t}",
"function show_flash_msg() {\n $f = get_session(\"MsgFlash\");\n if (!empty($f)) {\n echo $f;\n clear_session(\"MsgFlash\");\n }\n}",
"protected function getErrorFlashMessage() {\n\t\treturn FALSE;\n\t}",
"function printFlashMessage() {\n if (!isset($_SESSION['flashMessage'])) {\n return;\n }\n\n echo '<div class=\"alert alert-success mb-4\" id=\"FlashMessage\">'.$_SESSION['flashMessage']\n .'<button type=\"button\" class=\"close\" onclick=\"location.reload(true); return false;\">'\n .'<span aria-hidden=\"true\">×</span>'\n .'</button>'\n .'</div>';\n $_SESSION['flashMessage'] = null;\n}",
"public function flash($sessionName, $className){\r\n\r\n if(!empty($sessionName) && !empty($className) && isset($_SESSION[$sessionName])){\r\n\r\n $msg = $_SESSION[$sessionName];\r\n\r\n echo \"<div class='\". $className .\"'>\".$msg.\"</div>\";\r\n unset($_SESSION[$sessionName]);\r\n }\r\n\r\n }",
"protected function renderMessage() {}",
"protected function _flash($message, $type = Coda_Helper_Flash::SUCCESS)\n {\n $this->_helper->flash($message, $type);\n }",
"public function flashdata($name , $msg){\n \treturn $this->session->set_flashdata($name,$msg);\n }",
"private static function renderFlash($name) {\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : '';\n\n echo '\n <div class=\"'. $class .'\" id=\"msg-flash\">\n '. $_SESSION[$name] .'\n </div>\n ';\n }",
"public function output()\n {\n $out = '<div class=\"flash_messages\">';\n $stored_messages = isset($_SESSION['flash_messages']) ? $_SESSION['flash_messages'] : array();\n foreach ($stored_messages as $key => $val){\n $out .= '<div class=\"flash_message ' . htmlspecialchars($val['class']) . '\">';\n $out .= $this->useFA ? '<i class=\"' . htmlspecialchars($val['fa']) . '\"></i>' : null;\n $out .= htmlspecialchars($val['message']);\n $out .= '</div>';\n }\n $out .= '</div>';\n $this->deleteAll();\n return $out;\n }",
"public function init()\n {\n $this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');\n $this->view->message = $this->_flashMessenger->getMessages();\n }",
"function set_flash($k, $v) {\n Session::flash($k, $v, false);\n}"
] | [
"0.7982978",
"0.7585968",
"0.7531636",
"0.7033895",
"0.6959473",
"0.6919559",
"0.6755891",
"0.67464936",
"0.6726649",
"0.6724016",
"0.66906536",
"0.6656272",
"0.66116333",
"0.6606081",
"0.6582779",
"0.65679413",
"0.65459204",
"0.6528431",
"0.6479382",
"0.6456712",
"0.6441896",
"0.6440313",
"0.64309996",
"0.6415875",
"0.6414888",
"0.63385266",
"0.63379186",
"0.6314973",
"0.6304692",
"0.6303153",
"0.6292977",
"0.6290012",
"0.6281544",
"0.6259579",
"0.6252312",
"0.6250704",
"0.6191323",
"0.61685085",
"0.6131166",
"0.612738",
"0.6109767",
"0.6075416",
"0.60704243",
"0.60428554",
"0.6036326",
"0.6036326",
"0.6036326",
"0.6030957",
"0.6013165",
"0.5988817",
"0.59883374",
"0.5984932",
"0.59803784",
"0.5965869",
"0.59650576",
"0.59546214",
"0.59505594",
"0.5948341",
"0.59258974",
"0.59142655",
"0.5913197",
"0.59114546",
"0.58852947",
"0.5861234",
"0.5842089",
"0.5834644",
"0.5823237",
"0.5822988",
"0.58209085",
"0.5797014",
"0.5792756",
"0.5790415",
"0.57858014",
"0.57650894",
"0.5754779",
"0.5752842",
"0.57522637",
"0.5747292",
"0.57457304",
"0.574131",
"0.57328063",
"0.57328063",
"0.57328063",
"0.57328063",
"0.57328063",
"0.5731515",
"0.5724265",
"0.5712045",
"0.570456",
"0.57003105",
"0.56896156",
"0.56847805",
"0.56817734",
"0.5678618",
"0.56662583",
"0.5659951",
"0.56374717",
"0.5630836",
"0.562093",
"0.5613584",
"0.56068945"
] | 0.0 | -1 |
Returns a rules checker object that will be used for validating application integrity. | public function buildRules(RulesChecker $rules)
{
$rules->add($rules->existsIn(['community_id'], 'Communities'));
return $rules;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function buildRules(RulesChecker $rules): RulesChecker\n {\n return $rules;\n }",
"private static function rules() : mixed\n {\n return AppContainer::get(Constants::validatorRules);\n }",
"protected function getValidatorInstance()\n {\n return app(ValidationFactory::class);\n }",
"public function createValidator()\n {\n $validator = Validation::createValidatorBuilder()\n ->setMetadataFactory(new ClassMetadataFactory(new StaticMethodLoader()))\n ->setConstraintValidatorFactory(new ConstraintValidatorFactory($this->app))\n ->setTranslator($this->getTranslator())\n ->setApiVersion(Validation::API_VERSION_2_5)\n ->getValidator();\n\n return $validator;\n }",
"public static function getRules()\n {\n return (new static)->getValidationRules();\n }",
"protected function getValidationFactory()\n {\n return app('validator');\n }",
"public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn('bucket_category_id', 'BucketCategories'), ['errorField' => 'bucket_category_id']);\n $rules->add($rules->existsIn('tab_id', 'Tabs'), ['errorField' => 'tab_id']);\n $rules->add($rules->existsIn('plugin_id', 'Plugins'), ['errorField' => 'plugin_id']);\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn('system_id', 'Systems'), ['errorField' => 'system_id']);\n $rules->add($rules->existsIn('item_id', 'GroupItems'), ['errorField' => 'item_id']);\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['school_id'], 'School'), ['errorField' => 'school_id']);\n $rules->add($rules->existsIn(['lehrberuf_id'], 'Lehrberuf'), ['errorField' => 'lehrberuf_id']);\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['loja_id'], 'Lojas'), ['errorField' => 'loja_id']);\n $rules->add($rules->existsIn(['usuario_id'], 'Usuarios'), ['errorField' => 'usuario_id']);\n $rules->add($rules->existsIn(['estado_id'], 'Estados'), ['errorField' => 'estado_id']);\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules): RulesChecker {\n $rules->add($rules->existsIn(['user_account_id'], 'UserAccounts'));\n $rules->add($rules->existsIn(['form_status_id'], 'FormStatuses'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->isUnique(['title']));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n return $rules;\n }",
"public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['sport_id'], 'Sports'), ['errorField' => 'sport_id']);\n $rules->add($rules->existsIn(['country_id'], 'Countries'), ['errorField' => 'country_id']);\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn('specification_group_id', 'SpecificationGroups'), ['errorField' => 'specification_group_id']);\n $rules->add($rules->existsIn('specification_unit_group_id', 'SpecificationUnitGroups'), ['errorField' => 'specification_unit_group_id']);\n\n return $rules;\n }",
"public function getValidator(){\n \treturn $this->model->rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['item_sku']));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['external_product_id'], 'ExternalProducts'));\n $rules->add($rules->existsIn(['fulfillment_center_id'], 'FulfillmentCenters'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules) {\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['reseller_id'], 'Resellers'));\n $rules->add($rules->existsIn(['reseller_program_type_id'], 'ResellerProgramTypes'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['product_id'], 'Products'));\n $rules->add($rules->existsIn(['voucher_id'], 'Vouchers'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['fluxoconta_id'], 'Fluxocontas'), ['errorField' => 'fluxoconta_id']);\n $rules->add($rules->existsIn(['fornecedor_id'], 'Fornecedores'), ['errorField' => 'fornecedor_id']);\n $rules->add($rules->existsIn(['cliente_id'], 'Clientes'), ['errorField' => 'cliente_id']);\n $rules->add($rules->existsIn(['lancamento_id'], 'Lancamentos'), ['errorField' => 'lancamento_id']);\n $rules->add($rules->existsIn(['dreconta_id'], 'Drecontas'), ['errorField' => 'dreconta_id']);\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['item_id'], 'Items'));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['borrowed_status_id'], 'BorrowedStatus'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['product_code']));\n $rules->add($rules->existsIn(['category_id'], 'Categories'));\n $rules->add($rules->existsIn(['brand_id'], 'Brands'));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n // $rules->add($rules->existsIn(['image_id'], 'Images'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['unit_id'], 'Units'), ['errorField' => 'unit_id']);\n $rules->add($rules->existsIn(['user_id'], 'Users'), ['errorField' => 'user_id']);\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['usuario_id'], 'Usuarios'), ['errorField' => 'usuario_id']);\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['session_year_id'], 'SessionYears'));\n $rules->add($rules->existsIn(['student_class_id'], 'StudentClasses'));\n $rules->add($rules->existsIn(['stream_id'], 'Streams'));\n $rules->add($rules->existsIn(['parent_id'], 'ParentExamMasters'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->isUnique(['username']));\n $rules->add($rules->isUnique(['email']));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['loja_id'], 'Lojas'), ['errorField' => 'loja_id']);\n $rules->add($rules->existsIn(['transportadora_id'], 'Transportadoras'), ['errorField' => 'transportadora_id']);\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['email']));\n $rules->add($rules->existsIn(['student_id'], 'Students'));\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['equipment_type_id'], 'EquipmentTypes'));\n $rules->add($rules->existsIn(['department_id'], 'Departments'));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->isUnique(['block', 'unit_number']), ['errorField' => 'unit_number']);\n $rules->add($rules->existsIn(['unit_type_id'], 'UnitTypes'), ['errorField' => 'unit_type_id']);\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['openid']));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['test_run_id'], 'TestRuns'));\n $rules->add($rules->existsIn(['stream_id'], 'Streams'));\n $rules->add($rules->existsIn(['parameter_id'], 'Parameters'));\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\r\n {\r\n $rules->add($rules->existsIn(['committee_id'], 'Committees'));\r\n $rules->add($rules->existsIn(['user_id'], 'Users'));\r\n $rules->add($rules->existsIn(['item_category_id'], 'ItemCategories'));\r\n return $rules;\r\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['module_id'], 'Modules'));\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['material_type_id'], 'MaterialTypes'));\n $rules->add($rules->existsIn(['professor_id'], 'Professors'));\n $rules->add($rules->existsIn(['course_id'], 'Courses'));\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['categoria_id'], 'Categorias'));\n $rules->add($rules->existsIn(['usuario_id'], 'Usuarios'));\n// $rules->add($rules->existsIn(['empresa_id'], 'Empresas'));\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['asset_number']));\n $rules->add($rules->existsIn(['warehouse_id'], 'Warehouses'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->isUnique(['email']), ['errorField' => 'email']);\n $rules->add($rules->isUnique(['name']), ['errorField' => 'name']);\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules) {\n $rules->add($rules->existsIn(['module_id'], 'Modules'));\n $rules->add($rules->existsIn(['module_action_group_id'], 'ModuleActionGroups'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\r\n {\r\n $rules->add($rules->isUnique(['email']));\r\n $rules->add($rules->existsIn(['parent_id'], 'ParentOffices'));\r\n $rules->add($rules->existsIn(['office_level_id'], 'OfficeLevels'));\r\n $rules->add($rules->existsIn(['area_division_id'], 'AreaDivisions'));\r\n $rules->add($rules->existsIn(['area_district_id'], 'AreaDistricts'));\r\n return $rules;\r\n }",
"private function getValidator()\n {\n $v = new Validator();\n $v->addRules([\n ['label', 'Label', 'required'],\n ['num_value', 'Number', 'exists type=number'],\n ['comment', 'Comment', 'exists'],\n ]);\n return $v;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['traysize_id'], 'Traysizes'));\n $rules->add($rules->isUnique(['shelf_barcode']));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['student_id'], 'Students'));\n $rules->add($rules->existsIn(['meeting_id'], 'Meetings'));\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['country_id'], 'Countries'));\n $rules->add($rules->existsIn(['price_master_id'], 'PriceMasters'));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['name']));\n $rules->add($rules->existsIn(['expense_type_id'], 'ExpensesTypes'));\n $rules->add($rules->existsIn(['vendor_id'], 'Vendors'));\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['email']));\n $rules->add($rules->existsIn(['contact_types_id'], 'ContactTypes'));\n $rules->add($rules->existsIn(['clients_id'], 'Clients'));\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n //$rules->add($rules->isUnique(['email']));\n //$rules->add($rules->existsIn(['state_id'], 'States'));\n\n return $rules;\n }",
"public function getValidator();",
"public function getValidator();",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['email']));\n $rules->add($rules->existsIn(['empresa_id'], 'Empresas'));\n\n return $rules;\n }",
"protected function createValidator() {\n return $this->validator;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['course_id'], 'Courses'));\n $rules->add($rules->existsIn(['professor_id'], 'Professors'));\n $rules->add($rules->existsIn(['semester_id'], 'Semesters'));\n return $rules;\n }",
"public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['zone_id'], 'Zones'), ['errorField' => 'zone_id']);\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['category_id'], 'Categories'));\n $rules->add($rules->existsIn(['series_id'], 'EventSeries'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['budget_item_id'], 'BudgetItems'));\n $rules->add($rules->existsIn(['schedule_id'], 'Schedules'));\n $rules->add($rules->existsIn(['payment_statement_id'], 'PaymentStatements'));\n $rules->add($rules->existsIn(['user_created_id'], 'Users'));\n return $rules;\n }",
"protected function getValidationFactory()\n {\n return app('Illuminate\\Contracts\\Validation\\Factory');\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['item_id'], 'Items'));\n $rules->add($rules->existsIn(['unit_id'], 'Units'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['cidade_id'], 'Cidades'));\n $rules->add($rules->existsIn(['cliente_id'], 'Clientes'));\n $rules->add($rules->existsIn(['funcionario_id'], 'Funcionarios'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['username']));\n $rules->add($rules->isUnique(['email']));\n $rules->add($rules->existsIn(['role_id'], 'Roles'));\n $rules->add($rules->existsIn(['auth_role_id'], 'AuthRoles'));\n $rules->add($rules->existsIn(['section_id'], 'Sections'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['listing_id'], 'Listings'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['formula_id'], 'Formulas'));\n $rules->add($rules->isUnique(['hash']));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['brand_id'], 'Brands'));\n $rules->add($rules->existsIn(['mobile_model_id'], 'MobileModels'));\n $rules->add($rules->existsIn(['network_id'], 'Networks'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['designation_id'], 'Designations'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n // $rules->add($rules->existsIn(['recipient_id'], 'Recipients'));\n // $rules->add($rules->existsIn(['collector_id'], 'Collectors'));\n // $rules->add($rules->existsIn(['origin_id'], 'Origins'));\n // $rules->add($rules->existsIn(['origin_survey_id'], 'OriginSurveys'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n\t{\n\t\t$rules->add($rules->existsIn(['category_id'], 'Categories'));\n\t\t$rules->add($rules->existsIn(['user_id'], 'Users'));\n\n\t\treturn $rules;\n\t}",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['project_id'], 'Projects'));\n $rules->add($rules->existsIn(['category_id'], 'Categories'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['employee_id'], 'Employees'));\n\n return $rules;\n }",
"public static function getRules() \n {\n return self::$rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['usuario_id'], 'Usuarios'));\n $rules->add($rules->existsIn(['cidade_id'], 'Cidades'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['yearly_sample_id'], 'YearlySamples'));\n $rules->add($rules->existsIn(['monthly_sample_id'], 'MonthlySamples'));\n $rules->add($rules->existsIn(['state_id'], 'States'));\n $rules->add($rules->existsIn(['district_id'], 'Districts'));\n $rules->add($rules->existsIn(['dispatch_id'], 'Dispatches'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['domain_id'], 'Domains'));\n $rules->add($rules->existsIn(['theme_id'], 'Themes'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['company_id'], 'Companies'));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->existsIn(['business_id'], 'Businesses'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n\t{\n\t\t$rules->add($rules->isUnique(['svid']));\n\t\t$rules->add($rules->existsIn(['user_id'], 'Users'));\n\t\t$rules->add($rules->existsIn(['server_id'], 'Servers'));\n\n\t\treturn $rules;\n\t}",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['correo']));\n $rules->add($rules->isUnique(['nombre_usuario']));\n $rules->add($rules->isUnique(['identificacion']));\n $rules->add($rules->existsIn(['roles_id'], 'Roles'));\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['company_id'], 'Companies'));\n $rules->add($rules->existsIn(['company_member_type_id'], 'CompanyMemberTypes'));\n $rules->add($rules->existsIn(['master_financial_year_id'], 'MasterFinancialYears'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['route_id'], 'Routes'));\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n //$rules->add($rules->existsIn(['softland_id'], 'Softlands'));\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['id']));\n $rules->add($rules->existsIn(['category_id'], 'Categories'));\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['email']));\n $rules->add($rules->existsIn(['role_id'], 'Roles'));\n $rules->add($rules->existsIn(['member_type_id'], 'MemberTypes'));\n $rules->add($rules->existsIn(['turn_over_id'], 'TurnOvers'));\n $rules->add($rules->existsIn(['social_id'], 'Socials'));\n $rules->add($rules->existsIn(['fb_user_id'], 'FbUsers'));\n\n return $rules;\n }",
"public function getValidator()\n\t{\n\t\tif (!is_object($this->_validator)) {\n\t\t\t$validatorClass = $this->xpdo->loadClass('validation.xPDOValidator', XPDO_CORE_PATH, true, true);\n\t\t\tif ($derivedClass = $this->getOption(xPDO::OPT_VALIDATOR_CLASS, null, '')) {\n\t\t\t\tif ($derivedClass = $this->xpdo->loadClass($derivedClass, '', false, true)) {\n\t\t\t\t\t$validatorClass = $derivedClass;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($profitClass = $this->getOption('mlmsystem_handler_class_profit_validator', null, '')) {\n\t\t\t\tif ($profitClass = $this->xpdo->loadClass($profitClass, $this->getOption('mlmsystem_core_path', null, MODX_CORE_PATH . 'components/mlmsystem/') . 'handlers/validations/', false, true)) {\n\t\t\t\t\t$validatorClass = $profitClass;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($validatorClass) {\n\t\t\t\t$this->_validator = new $validatorClass($this);\n\t\t\t}\n\t\t}\n\t\treturn $this->_validator;\n\t}",
"private function createValidator()\n {\n // add custom validation rules\n \\Validator::extend('contains_caps',\n function($field, $value, $params)\n {\n return preg_match('#[A-Z]#', $value);\n }\n );\n\n \\Validator::extend('contains_digit',\n function($field, $value, $params)\n {\n return preg_match('#[0-9]#', $value);\n }\n );\n\n // set array of messages for custom rules\n $messages = array(\n 'contains_caps' => ':attribute must contain at least one capital letter.',\n 'contains_digit' => ':attribute must contain at least one numeric digit.'\n );\n\n // set array of rules to use for validation (many are Laravel's built-ins)\n $rules = array(\n 'email' => 'required|email|max:255',\n 'password' => 'required|between:8,50|contains_caps|contains_digit', // password has some \"strength\" requirements\n 'first_name' => 'required|max:50',\n 'last_name' => 'required|max:50',\n 'city' => 'required|max:100',\n 'state' => 'required|max:2',\n 'zip' => 'required|max:20',\n 'biography' => 'required',\n );\n\n $validator = \\Validator::make(\\Input::all(), $rules, $messages);\n\n return $validator;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['exam_master_id'], 'ExamMasters'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['book_email']));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['tel']));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['public_post_id'], 'PublicPosts'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules) {\n $rules->add($rules->existsIn(['bank_account_id'], 'BankAccounts'));\n $rules->add($rules->existsIn(['org_id'], 'Orgs'));\n $rules->add($rules->existsIn(['branch_id'], 'Branches'));\n $rules->add($rules->existsIn(['bpartner_id'], 'Bpartners'));\n $rules->add($rules->existsIn(['warehouse_id'], 'Warehouses'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['request_id'], 'Requests'));\n $rules->add($rules->existsIn(['resource_id'], 'Resources'));\n $rules->add($rules->existsIn(['service_id'], 'Services'));\n $rules->add($rules->isUnique(['request_id', 'resource_id', 'service_id']));\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['decret_id'], 'Decrets'));\n $rules->add($rules->existsIn(['team_id'], 'Teams'));\n $rules->add($rules->existsIn(['expert_id'], 'Experts'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['student_id'], 'Students'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['trip_id'], 'Trips'));\n $rules->add($rules->existsIn(['stop_id'], 'Stops'));\n\n return $rules;\n }",
"public function getRule();",
"public function buildRules(RulesChecker $rules) {\n $rules->add($rules->existsIn(['post_id'], 'Posts'));\n $rules->add($rules->existsIn(['group_id'], 'Groups'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['uuid']));\n $rules->add($rules->isUnique(['hash']));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules) {\n\t\t$rules->add($rules->isUnique(['token'], 'This token is already in use.'));\n\t\treturn $rules;\n\t}",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['username']));\n //$rules->add($rules->isUnique(['email']));\n $rules->add($rules->existsIn(['role_id'], 'Roles'));\n $rules->add($rules->existsIn(['shop_id'], 'Shops'));\n\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['local_id'], 'Locals'));\n $rules->add($rules->existsIn(['visitor_id'], 'Visitors'));\n $rules->add($rules->existsIn(['football_day_id'], 'FootballDays'));\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['driver_id'], 'Drivers'));\n return $rules;\n }",
"public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['patient_id'], 'Patients'));\n $rules->add($rules->existsIn(['visit_speciality_id'], 'VisitSpecialities'));\n $rules->add($rules->existsIn(['manager_operator_id'], 'ManagerOperators'));\n return $rules;\n }"
] | [
"0.64002764",
"0.6388235",
"0.6269912",
"0.62365985",
"0.61949646",
"0.60835993",
"0.6026187",
"0.6018978",
"0.60069567",
"0.59928614",
"0.5965456",
"0.59599984",
"0.59508055",
"0.59508055",
"0.58873993",
"0.58730704",
"0.5868297",
"0.58623487",
"0.5858684",
"0.58502865",
"0.5810342",
"0.5809366",
"0.5797499",
"0.5792037",
"0.5783656",
"0.5779494",
"0.5776198",
"0.57746404",
"0.5773084",
"0.57657844",
"0.5763785",
"0.5761163",
"0.5751151",
"0.57505834",
"0.57488847",
"0.57459265",
"0.5731485",
"0.5731064",
"0.57310516",
"0.57264614",
"0.57244927",
"0.5723145",
"0.5718952",
"0.57188976",
"0.57159203",
"0.5715783",
"0.5708539",
"0.5699573",
"0.56962603",
"0.5695155",
"0.5695155",
"0.5689127",
"0.5684784",
"0.5679629",
"0.5676285",
"0.56696796",
"0.5666589",
"0.56657934",
"0.5665589",
"0.5660157",
"0.56527734",
"0.5652209",
"0.56509465",
"0.5644195",
"0.56439644",
"0.56436497",
"0.56422406",
"0.56414634",
"0.5638746",
"0.56370264",
"0.5636753",
"0.5636015",
"0.56354463",
"0.5632657",
"0.5629755",
"0.5629399",
"0.5627876",
"0.562752",
"0.5627027",
"0.5625028",
"0.56245077",
"0.5622462",
"0.561911",
"0.5617463",
"0.5616741",
"0.56135494",
"0.56100655",
"0.56057346",
"0.56027967",
"0.5601096",
"0.55962527",
"0.5595297",
"0.559408",
"0.5593285",
"0.55892044",
"0.55884105",
"0.5576925",
"0.5573097",
"0.5570614",
"0.55704814",
"0.5570315"
] | 0.0 | -1 |
Determine whether the user can view any dictations. | public function viewAny(User $user)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function canView(): bool\n {\n return true;\n }",
"public function isViewAllowed()\n {\n return $this->isAllowedAction('view');\n }",
"public function canViewSuggestions(){\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n if(!empty($viewer_id)){\n return true;\n } \n }",
"public function isRestricted()\n {\n if ($this->_isRestricted !== null) {\n return $this->_isRestricted;\n }\n if ($this->private) {\n $this->_isRestricted = true;\n return true;\n }\n $tabs = array(\n 'source_access_rights',\n 'issues_access_rights',\n 'downloads_access_rights',\n 'wiki_access_rights',\n 'review_access_rights'\n );\n $conf = $this->getConf();\n foreach ($tabs as $tab) {\n if (!in_array($conf->getVal($tab, 'all'),\n array('all', 'none'))) {\n $this->_isRestricted = true;\n return true;\n }\n }\n $this->_isRestricted = false;\n return false;\n }",
"public static function canDisplayAttorneysMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_ATTORNEY);\n\t}",
"public function canView()\n {\n return true;\n }",
"public function canView()\n {\n return !$this->is_private ||\n ( Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() ) );\n }",
"public function canBeViewed() {}",
"public function authorize()\n {\n return $this->user()->can('view', Assignment::class);\n }",
"public function isViewable()\n\t{\n\t\treturn true;\n\t}",
"public static function canDisplayAttorneyTypesMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_ATTORNEY_TYPE);\n\t}",
"private static function requireViewPermission() {\n\t\t$filter = [];\n\t\tif(Session::isAuthor())\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_REGISTERED.','.ACCESS_ADMIN.')';\n\t\telseif(Session::isRegistered())\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_REGISTERED.')';\n\t\telse\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_GUEST.')';\n\t\t$filter[] = \"`status`=\".STATUS_PUBLISHED;\n\t\treturn implode(' AND ',$filter) ?? '1';\n\t}",
"public function authorize()\n {\n return $this->route('address')->userCanView($this->user());\n }",
"private function hasAccess() {\n\t\tif ($GLOBALS['BE_USER']->isAdmin()) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn $this->userHasAccessToPages() && $this->userHasAccessToTables();\n\t}",
"public function isViewable(): bool\n\t{\n\t\treturn self::STATUS_ACTIVE === $this->get('status') && self::USER_VISIBLE === $this->get('visible');\n\t}",
"function user_has_permission() {\r\n\tglobal $wp_query;\r\n\r\n\tif ( is_posttype( 'itinerary', POSTTYPE_ARCHIVEORSINGLE ) ) {\r\n\t\treturn current_user_can( 'ind_read_itinerary' );\r\n\t}\r\n\r\n\tif ( is_posttype( 'magazine', POSTTYPE_SINGLEONLY ) ) {\r\n\t\t// Check if this is the most recent post somehow\r\n\t}\r\n\r\n\tif ( is_posttype( 'magazine', POSTTYPE_ARCHIVEONLY ) ) {\r\n\t\treturn true;\r\n\t\t$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;\r\n\t\t$current = ( $paged == 1 && $wp_query->current_post == 0 );\r\n\t\treturn ( current_user_can( 'ind_read_magazine_archive' ) ||\r\n\t\t\t( $current /* && current_user_can( 'ind_read_magazine' ) */ ) );\r\n\t}\r\n\t\r\n\tif ( is_posttype( 'restaurant', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'shop', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'activity', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'article', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'insidertrip' ) ) {\r\n\t\tif ( current_user_can( 'ind_read_itinerary' ) ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t$counter_show = \\indagare\\cookies\\Counters::getPageCountGroup( 'restricted' );\r\n\t\tif ( $counter_show > INDG_PREVIEW_COUNT_MAX ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n\treturn true;\r\n}",
"public static function allowed_in_view(View $view) {\r\n return $view->get('owner') != null;\r\n }",
"public static function allowed_in_view(View $view) {\r\n return $view->get('owner') != null;\r\n }",
"public static function allowed_in_view(View $view) {\r\n return $view->get('owner') != null;\r\n }",
"function userCanViewInterim( $sessionID ) {\r\n\t\treturn ($this->getAccessLevel() > 7 || $this->getAccessLevel() == 5);\r\n\t}",
"public function isViewable() {\n\t\tif ($this->isVariable()) {\n\t\t\t$editables = $this->parent->editables();\n\t\t\tif (!empty($editables)) {\n\t\t\t\treturn in_array($this->parsedVarName, $this->parent->viewables());\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }",
"function canSeePrivate() {\n \treturn $this->isProjectManager() || (boolean) $this->getSystemPermission('can_see_private_objects');\n }",
"public static function canDisplayDocumentTypesMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_DOCUMENT_TYPE);\n\t}",
"public function authorize()\n {\n $user = Auth::user();\n $lecture = Lecture::findOrFail($this->route('lecture'));\n return $user->can('lecture-update') || $user->id == $lecture->user_id;\n }",
"public function isAccess();",
"public function isAccessible()\n {\n return $this->isPublished();\n }",
"public function IsViewable() {\r\n return false;\r\n }",
"function can_view_report() {\n //make sure context libraries are loaded\n $this->require_dependencies();\n\n //make sure the current user can view reports in at least one course context\n $contexts = get_contexts_by_capability_for_user('cluster', $this->access_capability, $this->userid);\n return !$contexts->is_empty();\n }",
"private function canDisplay()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }",
"public function hasView()\n {\n return false;\n }",
"protected function _isAllowed()\n {\n return $this->_authorization->isAllowed(\\Eadesigndev\\Pdfgenerator\\Controller\\Adminhtml\\Templates::ADMIN_RESOURCE_VIEW);\n }",
"public function viewAny(User $user)\n {\n return $user->hasPermissionTo('view interview');\n }",
"public static function canDisplayPermissionsMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_PERMISSION);\n\t}",
"public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}",
"public function canSeeAllPeople()\n {\n if ($this->person['id']) {\n return $this->person['can_see_all_people'];\n } else {\n return false;\n }\n }",
"public function hasAccess(): bool;",
"public function view(User $user, Dictation $dictation)\n {\n return $user->id === $dictation->user_id;\n }",
"function visible () {\n\t\treturn isadmin();\n\t}",
"function can_view_report() {\n\n //no default restrictions, implement restrictions in report instance class\n return true;\n }",
"function canViewUsers( $sessionID ){\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}",
"function allow_view_results() {\n\t\treturn $this->attribute_bool('allow view results');\n\t}",
"public function hasAccessRestrictions() {\n\t\tif (!is_array($this->accessRoles) || empty($this->accessRoles)) {\n\t\t\treturn FALSE;\n\t\t}\n\t\tif (count($this->accessRoles) === 1 && in_array('TYPO3.Flow:Everybody', $this->accessRoles)) {\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}",
"public function hasAccess()\n {\n return $this->access !== null;\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 isViewable()\n {\n return ($this->isPublished() && $this->isActive());\n }",
"public function authorizeToViewAny(Request $request)\n {\n return $this->inContract($request) || parent::authorizedToView($request);\n }",
"abstract protected function canAccess();",
"public function canShowAnything()\n {\n if ($this->getCanShowDataFields() or $this->getCanShowAdditionalBooks()\n ) {\n $books = $this->getAdditionalBooksToShow();\n $fields = $this->getDataFieldsToShow();\n if (!empty($books) or !empty($fields)) {\n return true;\n }\n }\n\n return false;\n }",
"public function canShowAnything()\n {\n if ($this->getCanShowDataFields() or $this->getCanShowAdditionalBooks()\n ) {\n $books = $this->getAdditionalBooksToShow();\n $fields = $this->getDataFieldsToShow();\n if (!empty($books) or !empty($fields)) {\n return true;\n }\n }\n\n return false;\n }",
"public function authorize()\n {\n return access()->hasPermissions(['view-backend', 'view-referral', 'manage-referral'], true);\n }",
"private function userHasAccessToPages() {\n\t\t$configurationProxy = tx_oelib_configurationProxy::getInstance('realty');\n\n\t\t$objectsPid = $configurationProxy->getAsInteger(\n\t\t\t'pidForRealtyObjectsAndImages'\n\t\t);\n\t\t$canWriteObjectsPage = $GLOBALS['BE_USER']->doesUserHaveAccess(\n\t\t\tt3lib_BEfunc::getRecord('pages', $objectsPid), 16\n\t\t);\n\n\t\t$auxiliaryPid = $configurationProxy->getAsInteger(\n\t\t\t'pidForAuxiliaryRecords'\n\t\t);\n\t\t$canWriteAuxiliaryPage = $GLOBALS['BE_USER']->doesUserHaveAccess(\n\t\t\tt3lib_BEfunc::getRecord('pages', $auxiliaryPid), 16\n\t\t);\n\n\t\tif (!$canWriteObjectsPage) {\n\t\t\t$this->storeErrorMessage('objects_pid', $objectsPid);\n\t\t}\n\t\tif (!$canWriteAuxiliaryPage) {\n\t\t\t$this->storeErrorMessage('auxiliary_pid', $auxiliaryPid);\n\t\t}\n\n\t\treturn $canWriteObjectsPage && $canWriteAuxiliaryPage;\n\t}",
"private function isViewed() {\n $viewKey = $this->getViewKey();\n\n if ( Auth::check() ) {\n $viewed = Cache::get($viewKey.':user:'.Auth::user()->id);\n return !empty($viewed);\n } else {\n $time = session($viewKey);\n if ( !empty($time) ) {\n $viewed = (time() - $time) < config('counter.viewCountDuration') * 60;\n } else {\n $viewed = false;\n }\n return $viewed;\n }\n }",
"public function authorize()\n {\n return \\Auth::user()->canDo('ADD_PORTFOLIOS');\n }",
"public function viewableByOwnerOnly();",
"public static function canDisplayContractorsMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_CONTRACTOR);\n\t}",
"public function authorizedToView(Request $request)\n {\n return parent::authorizedToView($request) || $this->inContract($request);\n }",
"public function hasAuthorized() {\n return $this->_has(1);\n }",
"public function isAccessible() {\n\t\tif ($this->hasAccessRestrictions() === FALSE) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tif ($this->securityContext->canBeInitialized() === FALSE) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tforeach ($this->accessRoles as $roleName) {\n\t\t\tif ($this->securityContext->hasRole($roleName)) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}",
"public function view(User $user)\n {\n if ($user->can('point-list')) {\n return true;\n }\n\n return false;\n }",
"public static function canDisplayUsersMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_USER);\n\t}",
"public function canViewProfile() {\n\t\treturn (!$this->protectedProfile || WCF::getUser()->userID == $this->userID || UserProfile::isBuddy($this->userID) || WCF::getUser()->getPermission('admin.general.canViewPrivateUserOptions'));\n\t}",
"static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }",
"public function canShow()\r\n {\r\n return count($this->getTermAndConditions());\r\n }",
"public function hasAccessions(){\n return $this->_has(2);\n }",
"public function hasAccessions(){\n return $this->_has(2);\n }",
"public function authorize()\n {\n if ( ! $this->getRelease()->belongsToYou()) {\n return false;\n }\n return true;\n }",
"public function hasAccess(){\n \treturn $this->hasAccess;\n }",
"public function canView()\n\t{\n\t\treturn \\IPS\\Member::loggedIn()->hasAcpRestriction( 'nexus' , 'transactions', 'transactions_manage' );\n\t}",
"function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Accept an OAuth callback?\n $p['callback'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing SalesforceSource?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing SalesforceSource?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View all existing SalesforceSources?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View API limits?\n $p['limits'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing SalesforceSource?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }",
"public function checkOnAccess() : bool\r\n {\r\n if (empty($this->gates)){\r\n return true;\r\n }\r\n\r\n foreach ($this->gates as $gate) {\r\n\r\n if(Gate::allows($gate)){\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }",
"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 $member = auth()->user()->member;\n return auth()->user()->can('pdg', $member) || auth()->user()->can('manager', $member);\n }",
"public function authorize()\n {\n return $this->user() != null;\n }",
"abstract public function userCanVisualize();",
"public function authorize()\n {\n if(session('contact_key'))\n return true;\n\n if (! $this->user()->hasFeature(FEATURE_DOCUMENTS))\n return false;\n\n \n if ($this->invoice && $this->user()->cannot('edit', $this->invoice))\n return false;\n\n\n if ($this->expense && $this->user()->cannot('edit', $this->expense))\n return false;\n\n\n if($this->ticket && $this->user()->cannot('edit', $this->ticket))\n return false;\n\n\n return true;\n //return $this->user()->can('create');\n }",
"function userCanViewPage()\n\t{\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->pageView(Yawp::authUsername(), $this->area, \n\t\t\t$this->page);\n\t}",
"function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }",
"function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }",
"public function isPrivate()\n\t{\n\t\t//return ($this->get('private') == self::PRIVACY_PRIVATE);\n\t\treturn ($this->get('access') == 5);\n\t}",
"public function authorize()\n {\n return !Cache::has('announcement');\n }",
"public function authorize()\n {\n $tag = $this->route()->parameter('tag');\n return Auth::user()->can('view', [Tag::class, $tag]);\n }",
"public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }",
"public function viewAny()\n {\n return true;\n }",
"public function is_accessible_controller() {\r\n\t\tinclude_once 'menu_aksi.php';\r\n\t\t$menu_aksi = new menu_aksi($this->Command);\r\n\t\tif($menu_aksi->getByController(true) != 0) {\r\n\t\t\tinclude_once 'menu_function_aksi.php';\r\n\t\t\t$menu_function_aksi = new menu_function_aksi($this->Command);\r\n\t\t\tif($menu_function_aksi->getByName(true) != 0) {\r\n\t\t\t\t$this->model = new permission();\r\n\t\t\t\t$this->model->set_select_full_prefix('select * from permission p,user u');\r\n\t\t\t\t$this->model->set_select_full_suffix('p.ROLE = u.ROLE and p.MENU = (select id_menu from menu where controller=\\'' . $this->Command->getControllerName() . '\\') and u.USERNAME=\\'' . $this->Command->getUserLogged()->get_username() . '\\' and menu_function=(select id_menu_function from menu_function where nama_menu_function=\"' . $this->Command->getFunction() . '\" limit 1)');\r\n\t\t\t\treturn ($this->svc->select_count($this->model) > 0) ? true : false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"public static function hasRights($request){\r\n \r\n //pages\r\n if(!isset($_SESSION) && empty($_SESSION)){\r\n if (array_key_exists($request, Tools::getPagesNoLogged())) {\r\n return true;\r\n } else {\r\n \r\n return false; \r\n }\r\n } elseif (isset($_SESSION) && @$_SESSION['statut'] == 0){\r\n if (array_key_exists($request, Tools::getPagesLogged())) {\r\n return true;\r\n } else {\r\n \r\n return false; \r\n }\r\n } elseif (isset($_SESSION) && $_SESSION['statut'] == 1){\r\n if (array_key_exists($request, Tools::getPagesAdmin())) {\r\n return true;\r\n } else {\r\n \r\n return false; \r\n }\r\n }\r\n \r\n \r\n }",
"protected function hasAccessOnPublished()\n\t{\n\t\treturn $this->User->hasAccess($GLOBALS['TL_DCA'][$this->strTable]['config']['ptable'] . '::published', 'alexf');\t\t\n\t}",
"function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Add a new Match Server Attribute?\n $p['add'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing Match Server Attribute?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing Match Server Attribute?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n\n // View all existing Match Server Attributes?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing Match Server Attribute?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n\n $this->set('permissions', $p);\n return $p[$this->action];\n }",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function isViewed() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->viewDate) ? false: true;\r\n\t}",
"public static function canDisplayLeadTypesMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_LEAD_TYPE);\n\t}",
"private function hasRequestedScopeAccess()\n {\n // allow specific store view scope\n $storeCode = $this->_request->getParam('store');\n if ($storeCode) {\n $store = $this->_storeManager->getStore($storeCode);\n if ($store) {\n if ($this->_role->hasStoreAccess($store->getId())) {\n return true;\n }\n }\n } elseif ($websiteCode = $this->_request->getParam('website')) {\n try {\n $website = $this->_storeManager->getWebsite($websiteCode);\n if ($website) {\n if ($this->_role->hasWebsiteAccess($website->getId(), true)) {\n return true;\n }\n }\n // phpcs:ignore Magento2.CodeAnalysis.EmptyBlock\n } catch (\\Magento\\Framework\\Exception\\LocalizedException $e) {\n // redirect later from non-existing website\n }\n }\n return false;\n }",
"public function authorize()\n {\n $user = auth()->user()->first();\n $department = Department::findOrFail($this->input('department_id'));\n $semester_type = SemesterType::findOrFail($this->input('semester_type_id'));\n $level = Level::findOrFail($this->input('level_id'));\n return (\n $user->can('view', $department) && \n $user->can('view', $level) &&\n $user->can('view', $semester_type)\n ) &&\n (\n $user->hasRole(Role::ADMIN) || \n ($user->id == $department->hod->first()->user()->first()->id) || // department hod\n ($user->staff()->where('id', $department->faculty()->first()->dean()->first()->id)->exists()) || // faculty dean\n ($user->id == $department->faculty()->first()->school()->first()->owner_id) // school owner\n );\n }",
"function userCanViewStudent( $sessionID ){\r\n\t\treturn $this->getAccessLevel() > 3;\r\n\t}",
"function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }",
"public function authorize()\n {\n return request()->user() != null;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public static function canDisplayAreasMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_AREA);\n\t}",
"public static function authorizedToViewAny(Request $request)\n {\n return $_SERVER['nova.authorize.forbidden-users'] ?? false;\n }",
"protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Dilmah_TeaFaq::dilmah_tfaq');\n }"
] | [
"0.7072534",
"0.7014345",
"0.6995714",
"0.6938637",
"0.6833039",
"0.67313796",
"0.6724647",
"0.6687632",
"0.6654833",
"0.6518234",
"0.6486282",
"0.6467284",
"0.64662343",
"0.6464162",
"0.64623916",
"0.644497",
"0.6425268",
"0.6425268",
"0.6425268",
"0.6418657",
"0.6400825",
"0.6391211",
"0.6360452",
"0.6316505",
"0.6313043",
"0.63024664",
"0.62991166",
"0.6288646",
"0.6287418",
"0.6284462",
"0.62672734",
"0.62659895",
"0.62571913",
"0.62554395",
"0.6254637",
"0.62509507",
"0.6228695",
"0.6225641",
"0.6218116",
"0.62159514",
"0.621408",
"0.6198588",
"0.6192155",
"0.61785495",
"0.61764127",
"0.6175679",
"0.6172976",
"0.6172111",
"0.6168231",
"0.6162877",
"0.61608577",
"0.6154969",
"0.6146717",
"0.6146276",
"0.6141182",
"0.61355823",
"0.61307424",
"0.61268723",
"0.61259",
"0.6122105",
"0.61188686",
"0.6115357",
"0.61116695",
"0.6109934",
"0.6093431",
"0.6093431",
"0.60929966",
"0.6091059",
"0.60903496",
"0.608879",
"0.60846955",
"0.6083987",
"0.6081869",
"0.60744184",
"0.6069601",
"0.60680103",
"0.60679096",
"0.6067726",
"0.6067726",
"0.606442",
"0.605837",
"0.6058105",
"0.60533255",
"0.60505974",
"0.6044379",
"0.60284084",
"0.6028022",
"0.60239094",
"0.6022158",
"0.6017265",
"0.6016755",
"0.60152626",
"0.60139215",
"0.60135573",
"0.6008038",
"0.60068357",
"0.6005402",
"0.6005402",
"0.6004365",
"0.6003722",
"0.6003072"
] | 0.0 | -1 |
Determine whether the user can view the dictation. | public function view(User $user, Dictation $dictation)
{
return $user->id === $dictation->user_id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function canView(): bool\n {\n return true;\n }",
"public function canView()\n {\n return !$this->is_private ||\n ( Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() ) );\n }",
"public function isViewAllowed()\n {\n return $this->isAllowedAction('view');\n }",
"public function canView()\n {\n return true;\n }",
"public function authorize()\n {\n return $this->user()->can('view', Assignment::class);\n }",
"public function canBeViewed() {}",
"public function authorize()\n {\n if ( ! $this->getRelease()->belongsToYou()) {\n return false;\n }\n return true;\n }",
"public function canViewSuggestions(){\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n if(!empty($viewer_id)){\n return true;\n } \n }",
"public function authorize()\n {\n return $this->route('address')->userCanView($this->user());\n }",
"public function isViewable(): bool\n\t{\n\t\treturn self::STATUS_ACTIVE === $this->get('status') && self::USER_VISIBLE === $this->get('visible');\n\t}",
"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::user();\n $lecture = Lecture::findOrFail($this->route('lecture'));\n return $user->can('lecture-update') || $user->id == $lecture->user_id;\n }",
"public static function canDisplayAttorneysMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_ATTORNEY);\n\t}",
"function userCanViewPage()\n\t{\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->pageView(Yawp::authUsername(), $this->area, \n\t\t\t$this->page);\n\t}",
"protected function _isAllowed()\n {\n return $this->_authorization->isAllowed(\\Eadesigndev\\Pdfgenerator\\Controller\\Adminhtml\\Templates::ADMIN_RESOURCE_VIEW);\n }",
"public function isViewable()\n\t{\n\t\treturn true;\n\t}",
"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 }",
"function userCanViewInterim( $sessionID ) {\r\n\t\treturn ($this->getAccessLevel() > 7 || $this->getAccessLevel() == 5);\r\n\t}",
"public function authorize()\n {\n // todo: dominion selected, selected dominion in active round?\n return Auth::check();\n }",
"public function authorize()\n {\n return is_client_or_staff();\n }",
"public function authorize()\n {\n $person = $this->findFromUrl('person');\n\n return $this->user()->can('update', $person);\n }",
"public function authorize()\n {\n if(session('contact_key'))\n return true;\n\n if (! $this->user()->hasFeature(FEATURE_DOCUMENTS))\n return false;\n\n \n if ($this->invoice && $this->user()->cannot('edit', $this->invoice))\n return false;\n\n\n if ($this->expense && $this->user()->cannot('edit', $this->expense))\n return false;\n\n\n if($this->ticket && $this->user()->cannot('edit', $this->ticket))\n return false;\n\n\n return true;\n //return $this->user()->can('create');\n }",
"public function authorize()\n {\n return (Auth::user()->type === User::VENDEDOR);\n }",
"public function authorize()\n {\n $tag = $this->route()->parameter('tag');\n return Auth::user()->can('view', [Tag::class, $tag]);\n }",
"public function authorize()\n {\n $member = auth()->user()->member;\n return auth()->user()->can('pdg', $member) || auth()->user()->can('manager', $member);\n }",
"public function authorize()\n {\n //Get the 'mark' id\n switch ((int) request()->segment(6)) {\n case 0:\n return access()->allow('deactivate-users');\n break;\n\n case 1:\n return access()->allow('reactivate-users');\n break;\n }\n\n return false;\n }",
"public function authorize()\n {\n return access()->hasPermissions(['view-backend', 'view-referral', 'manage-referral'], true);\n }",
"public function isRestricted()\n {\n if ($this->_isRestricted !== null) {\n return $this->_isRestricted;\n }\n if ($this->private) {\n $this->_isRestricted = true;\n return true;\n }\n $tabs = array(\n 'source_access_rights',\n 'issues_access_rights',\n 'downloads_access_rights',\n 'wiki_access_rights',\n 'review_access_rights'\n );\n $conf = $this->getConf();\n foreach ($tabs as $tab) {\n if (!in_array($conf->getVal($tab, 'all'),\n array('all', 'none'))) {\n $this->_isRestricted = true;\n return true;\n }\n }\n $this->_isRestricted = false;\n return false;\n }",
"public function canViewProfile() {\n\t\treturn (!$this->protectedProfile || WCF::getUser()->userID == $this->userID || UserProfile::isBuddy($this->userID) || WCF::getUser()->getPermission('admin.general.canViewPrivateUserOptions'));\n\t}",
"public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }",
"private function canDisplay()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\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 return $this->user() != null;\n }",
"public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }",
"public function isViewable()\n {\n return ($this->isPublished() && $this->isActive());\n }",
"public function isAccess();",
"public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }",
"public function authorize() {\n\t\t$this->competitor = $this->route('competitor');\n\t\treturn $this->user()->can('update', $this->competitor);\n\t}",
"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 \\Auth::user()->canDo('ADD_PORTFOLIOS');\n }",
"public function isViewer()\n\t{\n\t\treturn ($this->role == self::ROLE_VIEWER);\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 check_access() {\n\n\t\tif (isset($this->current_entity_allowed)) {\n\t\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t\t}\n\n\t\t$this->current_entity_allowed = MKB_Options::option('restrict_on') ?\n\t\t\t(bool) $this->check_entity_access($this->get_current_entity()) :\n\t\t\ttrue; // always allowed if restriction is off\n\n\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t}",
"public function authorize() {\n\t\t$this->workplace = $this->route('workplace');\n\t\t$this->workFunction = $this->route('workFunction');\n\t\treturn $this->user()->can('update', $this->workplace) && $this->user()->can('update', $this->workFunction);\n\t}",
"public function authorize()\n {\n return request()->user() != null;\n }",
"function user_has_permission() {\r\n\tglobal $wp_query;\r\n\r\n\tif ( is_posttype( 'itinerary', POSTTYPE_ARCHIVEORSINGLE ) ) {\r\n\t\treturn current_user_can( 'ind_read_itinerary' );\r\n\t}\r\n\r\n\tif ( is_posttype( 'magazine', POSTTYPE_SINGLEONLY ) ) {\r\n\t\t// Check if this is the most recent post somehow\r\n\t}\r\n\r\n\tif ( is_posttype( 'magazine', POSTTYPE_ARCHIVEONLY ) ) {\r\n\t\treturn true;\r\n\t\t$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;\r\n\t\t$current = ( $paged == 1 && $wp_query->current_post == 0 );\r\n\t\treturn ( current_user_can( 'ind_read_magazine_archive' ) ||\r\n\t\t\t( $current /* && current_user_can( 'ind_read_magazine' ) */ ) );\r\n\t}\r\n\t\r\n\tif ( is_posttype( 'restaurant', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'shop', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'activity', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'article', POSTTYPE_SINGLEONLY )\r\n\t\t|| is_posttype( 'insidertrip' ) ) {\r\n\t\tif ( current_user_can( 'ind_read_itinerary' ) ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t$counter_show = \\indagare\\cookies\\Counters::getPageCountGroup( 'restricted' );\r\n\t\tif ( $counter_show > INDG_PREVIEW_COUNT_MAX ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\t\r\n\r\n\treturn true;\r\n}",
"private static function requireViewPermission() {\n\t\t$filter = [];\n\t\tif(Session::isAuthor())\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_REGISTERED.','.ACCESS_ADMIN.')';\n\t\telseif(Session::isRegistered())\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_REGISTERED.')';\n\t\telse\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_GUEST.')';\n\t\t$filter[] = \"`status`=\".STATUS_PUBLISHED;\n\t\treturn implode(' AND ',$filter) ?? '1';\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 authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function authorize(): bool\n {\n return Auth::check() && Auth::user()->can('web.user.transcripts.update');\n }",
"public function authorize()\n {\n $id = $this->route('id');\n if ($id) {\n $giftList = GiftList::find($id);\n if (!$giftList || $giftList->user->id != Auth::user()->id) {\n return false;\n }\n }\n return true;\n }",
"function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }",
"public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}",
"public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }",
"function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Add a new Match Server Attribute?\n $p['add'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing Match Server Attribute?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing Match Server Attribute?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n\n // View all existing Match Server Attributes?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing Match Server Attribute?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n\n $this->set('permissions', $p);\n return $p[$this->action];\n }",
"function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Accept an OAuth callback?\n $p['callback'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing SalesforceSource?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing SalesforceSource?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View all existing SalesforceSources?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View API limits?\n $p['limits'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing SalesforceSource?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }",
"public function authorize(): bool\n {\n return Gate::allows('seo.translation.edit');\n }",
"public function authorize()\n {\n return Gate::allows('add_to_dos') ? true : false;\n }",
"public function authorize()\n {\n $id = Auth::id();\n $livro = $this->route('livro');\n if ($livro!=NULL) {\n $author = $livro->user_id;\n return $author == $id ? true : false;\n }\n else\n return true;\n }",
"public function authorize()\n {\n if (Auth::user()->can('update-assignment')) return true;\n if (Auth::user()->hasRole('student'))\n if ($this->owns('assignment')) return true;\n return false;\n }",
"public function authorize()\n {\n return !is_null($this->user());\n }",
"abstract protected function canAccess();",
"public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }",
"public function authorize()\n {\n $article = Article::find($this->route('article'));\n return $article && $this->user()->can('update', $article);\n }",
"protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Dilmah_TeaFaq::dilmah_tfaq');\n }",
"public function canView(ConclusionInterface $conclusion);",
"public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }",
"abstract public function userCanVisualize();",
"public function isAuthorized() {}",
"public static function isAllowed() {\r\n\t\treturn TodoyuAuth::isAdmin();\r\n\t}",
"public function authorize()\n {\n return (\\Auth::user()->hasRole('admin')) || (\\Auth::user()->hasRole('editor')) || \\Auth::user()->canDo('UPDATE_POLLS');\n }",
"public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }",
"public function authorize()\n {\n return Auth()->user()->isAbleTo('school_sections-create');\n }",
"public function canViewAssociate()\n {\n return $this->settings->MODULES['REW_ISA_MODULE']\n && ($this->auth->isSuperAdmin()\n || $this->auth->isAgent()\n || $this->isSelf());\n }",
"public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }",
"public function isAuthorized() {\n\t\t\n\t}",
"public function hasAccess(): bool;",
"public function authorizedToView(Request $request)\n {\n return parent::authorizedToView($request) || $this->inContract($request);\n }",
"public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Add a new Vetting Step?\n $p['add'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing Vetting Step?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing Vetting Step?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View all existing Vetting Steps?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing Vetting Step's order?\n $p['order'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Modify ordering for display via AJAX\n $p['reorder'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing Vetting Step?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return $p[$this->action];\n }",
"public function authorize()\n {\n $user = auth()->user()->first();\n $department = Department::findOrFail($this->input('department_id'));\n $semester_type = SemesterType::findOrFail($this->input('semester_type_id'));\n $level = Level::findOrFail($this->input('level_id'));\n return (\n $user->can('view', $department) && \n $user->can('view', $level) &&\n $user->can('view', $semester_type)\n ) &&\n (\n $user->hasRole(Role::ADMIN) || \n ($user->id == $department->hod->first()->user()->first()->id) || // department hod\n ($user->staff()->where('id', $department->faculty()->first()->dean()->first()->id)->exists()) || // faculty dean\n ($user->id == $department->faculty()->first()->school()->first()->owner_id) // school owner\n );\n }",
"public function canView()\n\t{\n\t\treturn \\IPS\\Member::loggedIn()->hasAcpRestriction( 'nexus' , 'transactions', 'transactions_manage' );\n\t}",
"public static function allowed_in_view(View $view) {\r\n return $view->get('owner') != null;\r\n }",
"public static function allowed_in_view(View $view) {\r\n return $view->get('owner') != null;\r\n }",
"public static function allowed_in_view(View $view) {\r\n return $view->get('owner') != null;\r\n }",
"public function authorize()\n {\n if ($this->user()->parent_id == NULL) { //Solo si es Cacique puede agregar indios. Sino, 403!\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n if ($this->user && ($this->user->hasPermission('manage_pages_contents') ) ) {\n return true;\n }\n\n return false;\n }",
"public function isAuthorized() {\n\t\treturn true;\n\t}",
"function allowed() {\n $this->model('invitation');\n \n if ($_SESSION['user']->guest) {\n $sql = \"SELECT * FROM invitations WHERE id = {$_SESSION['user']->id}\";\n $invite = $this->invitation->one($sql);\n if (!$invite) {\n $this->message('Ungültige Einladung');\n unset($_SESSION['user']);\n $this->redirect('/');\n }\n \n if ($_SESSION['user']->object_type == 'topic') { \n if (count($this->path) < 3) {\n $this->message('FALSCHE URL');\n return FALSE;\n }\n $photo_id = $this->path[2];\n \n $sql = \"SELECT * FROM photos WHERE id = {$photo_id} LIMIT 1\";\n $photo = $this->photo->one($sql);\n if (!$photo) {\n $this->message('FALSCHE URL');\n return FALSE;\n }\n \n if ($photo->topic_id != $_SESSION['user']->object_id) {\n $this->message('Sie haben kein Zugriff auf diese Inhalte');\n return FALSE;\n }\n \n return TRUE;\n }\n }\n return parent::allowed();\n }",
"public function authorize()\n {\n return $this->user()->can('manage-drafts');\n }",
"public function IsViewable() {\r\n return false;\r\n }",
"public function authorize()\n {\n return $this->user('office')->isActive();\n }",
"public function canView($member = null) \n {\n return true;\n }",
"public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }",
"protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Codilar_Image360::image360_settings_edit');\n }",
"public function canEdit()\n {\n if(!Auth::check())\n {\n return false;\n }\n //If the user is active/logged in, return true so that we can display user's specific objects\n if(Auth::user()->id===$this->user_id)\n {\n return true;\n }\n //By default\n return false;\n }",
"public function isAuthorized($user)\n {\n if (isset($user['V_ROL']) and $user['V_ROL']==='Viewer')\n {\n if (in_array($this->request->action,['home','view','logout']))\n {\n return true;\n }\n }\n return parent::isAuthorized($user);\n }"
] | [
"0.74905837",
"0.7298032",
"0.7290971",
"0.72378844",
"0.7138538",
"0.70307034",
"0.6966617",
"0.6963488",
"0.69623107",
"0.69537485",
"0.6918316",
"0.69056845",
"0.6903895",
"0.6873843",
"0.6839047",
"0.68114954",
"0.6795878",
"0.67919475",
"0.67753685",
"0.6734841",
"0.6711827",
"0.67053",
"0.67031616",
"0.6683816",
"0.6675061",
"0.6668162",
"0.666609",
"0.6660383",
"0.6653695",
"0.66514117",
"0.6649707",
"0.663129",
"0.66276944",
"0.66061836",
"0.65978473",
"0.6596915",
"0.6572362",
"0.6572208",
"0.65670735",
"0.65670735",
"0.6558869",
"0.6543308",
"0.6535539",
"0.6535539",
"0.65343857",
"0.65298176",
"0.6529067",
"0.65278745",
"0.6526523",
"0.6525454",
"0.6525454",
"0.6525112",
"0.65214664",
"0.6519208",
"0.65191454",
"0.6512464",
"0.65084",
"0.650681",
"0.6505674",
"0.6505073",
"0.64995265",
"0.649502",
"0.6489102",
"0.64890474",
"0.6488781",
"0.64877105",
"0.64869404",
"0.6482991",
"0.6473306",
"0.6470225",
"0.64651036",
"0.6460133",
"0.6449766",
"0.644969",
"0.644914",
"0.64445806",
"0.64427096",
"0.6441376",
"0.6441158",
"0.6438008",
"0.64371896",
"0.643706",
"0.6436958",
"0.64369184",
"0.6435825",
"0.6431735",
"0.6431735",
"0.6431735",
"0.6430565",
"0.64264625",
"0.6426193",
"0.642251",
"0.64186424",
"0.64165515",
"0.6416443",
"0.6414971",
"0.64111215",
"0.64076257",
"0.6406656",
"0.6404703"
] | 0.6753222 | 19 |
Determine whether the user can create dictations. | public function create(User $user)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function canCreate();",
"public function canCreate();",
"public function create(): bool\n {\n return $this->isAllowed(self::CREATE);\n }",
"protected function canCreate() {}",
"function canCreatePage() {\n return ($this->isAdmin() || ($this->userType == 'author'));\n }",
"public function create_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"function canCreate() {\r\n\t\treturn !DataObject::get_one($this->class);\r\n\t}",
"public function canSetCreatable();",
"protected function CanCreate()\n {\n return self::Guard()->Allow(BackendAction::Create(), new Container())\n && self::Guard()->Allow(BackendAction::UseIt(), new ContainerForm());\n }",
"private function canCreate()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }",
"public function authorize() {\n\t\treturn $this->user()->can('create', Pdf::class);\n\t}",
"public function create()\n {\n return isAdmin();\n }",
"public function authorize()\n {\n return Gate::allows('add_to_dos') ? true : false;\n }",
"public function authorize()\n {\n $user = Auth::user();\n\n $foodAddition = new FoodAddition();\n\n if((!$user->can('create', $foodAddition)) || (!$user->can('create-food-addition'))) {\n return false;\n }\n\n return true;\n }",
"public function authorize()\n {\n\t\treturn $this->user()->can('create', Collection::class);\n }",
"public function canSetCreatable()\n {\n return $this->canSetCreatable;\n }",
"public function authorize()\n {\n return $this->user()->can('create', MarEntry::class);\n }",
"function canCreatePost() {\n return ($this->isAdmin() || ($this->userType == 'author'));\n }",
"public static function userCreationAllowed(): bool\n {\n return self::isConfigured(self::ACTION_ADD_USER);\n }",
"public function authorize()\n {\n return $this->user()->can('user.create');\n }",
"public function authorize(): bool\n {\n return auth()->user()->can('create academic year unit levels');\n }",
"public function authorize()\n {\n return $this->permissionGuard()->allowsCreate($this->newModelInstance());\n }",
"public function canCreate(string $name) : bool;",
"function canCreate(){\n\t\t\tif(!isset($_POST['action'])) return false;\n\t\t\tif($_POST['action'] !== 'create_profile') return false;\n\t\t\tif($_POST['profile_folder'] === '') return false;\n\t\t\tif($_POST['profile_name'] === '') return false;\n\t\t\treturn true;\n\t\t}",
"protected function CanCreate()\n {\n return self::Guard()->Allow(BackendAction::Create(), new Site());\n }",
"public function authorize()\n {\n return auth()->user()->can('create-buildings');\n }",
"public function authorize()\n {\n return auth()->user()->can('create', Pizza::class);\n }",
"public function userHasCreatePermission(){\n//\t\tif(\\GO\\Base\\Model\\Acl::hasPermission($this->getPermissionLevel(),\\GO\\Base\\Model\\Acl::CREATE_PERMISSION)){\n//\t\t\treturn true;\n//\t\t}else \n\t\tif(\\GO::modules()->isInstalled('freebusypermissions')){\n\t\t\treturn \\GO\\Freebusypermissions\\FreebusypermissionsModule::hasFreebusyAccess(\\GO::user()->id, $this->user_id);\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"function userCanCreateUser( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}",
"public function create(User $user)\n {\n // return true;\n return $user->hasPermissionTo('create interview');\n }",
"function get_can_create_user ()\r\n {\r\n return $_SESSION[\"can_create_user\"];\r\n }",
"public function authorize()\n {\n return $this->user()->can(\"Crear Nómina\");\n }",
"public function authorize()\n {\n return Auth()->user()->isAbleTo('school_sections-create');\n }",
"public function authorize()\n {\n return $this->user()->can('Crear Departamentos');\n\n }",
"public function authorizePost()\n {\n return $this->user()->can('acme.create');\n }",
"public function authorize()\n {\n return auth()->user()->can('create', Task::class);\n }",
"private function canListAndCreate()\n {\n return true;\n }",
"public function authorize()\n {\n return \\Auth::user()->canDo('ADD_PORTFOLIOS');\n }",
"public function can_auto_create_users() {\n return (bool)$this->config['weautocreateusers'];\n }",
"public function isCreatable();",
"public function canCreatePlaces()\n\t{\n\t\t$viewer = Engine_Api::_()->user()->getViewer();\n\t\tif( !$viewer || !$viewer->getIdentity() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Must be able to create blogs\n\t\t/*\n\t\tif( !Engine_Api::_()->authorization()->isAllowed('blog', $viewer, 'create') ) {\n\t\t\treturn false;\n\t\t}\n\t\t*/\n\t\treturn true;\n\t}",
"public function authorize()\n {\n return Auth::user() && Auth::user()->hasPermissionTo('create-users');\n }",
"public function create(User $user)\n {\n if ($user->can('create_permission') || $user->can('manage_permissions')) {\n return true;\n }\n\n return false;\n }",
"public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }",
"public function authorize()\n {\n return $this->user()->can('create mindoro transaction');\n }",
"public function isCreate(){\n\t\treturn isset($this->{$this->getPrimaryKey()}) ? false : true;\n\t}",
"function userCanCreateInterim( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 8;\r\n\t}",
"public function test_canCreate_Returns_True_If_Personnel_Have_No_Access() {\n\n\t\t$check_returns_false = $this->authorization_service4->canCreate(2,2);\n\n\t\t$this->assertFalse($check_returns_false);\n\t}",
"public function authorize()\n {\n if ($this->method() === 'POST') {\n return $this->user()->can('create', Template::class);\n }\n\n return $this->user()->can('update', Template::class);\n }",
"public function test_canCreate_Returns_True_If_Personnel_Have_Access() {\n\n\t\t$check_returns_true = $this->authorization_service3->canCreate(1,1);\n\n\t\t$this->assertTrue($check_returns_true);\n\t}",
"public function canCreate(): bool\n {\n if (!$this->hasData('can_create')) {\n $this->setData('can_create', $this->eraseCustomerChecker->canCreate((int) $this->session->getCustomerId()));\n }\n\n return (bool) $this->_getData('can_create');\n }",
"public function authorize() : bool\n {\n return auth()->user()->can('create', GroupSetting::class);\n }",
"public function create($user)\n {\n return $user->hasPermissionTo('create ' . static::$key);\n }",
"function canCreateAccounts() {\r\n\t\treturn true;\r\n\t}",
"public function create(User $user)\n {\n return $user->can('create user');\n }",
"public function authorize()\n {\n if ( ! $this->getRelease()->belongsToYou()) {\n return false;\n }\n return true;\n }",
"public function canCreateAccounts()\n {\n return false;\n }",
"public static function authorizedToCreate(Request $request)\n {\n return false;\n }",
"public function create(User $user)\n {\n return $user->hasRole('editor') || $user->hasRole('admin') ||\n $user->canDo('UPDATE_POLLS');\n }",
"public function authorize(): bool\n {\n return $this->user()->can('create_contact');\n }",
"public function create(User $user)\n {\n return $user->hasAccess('create-conference-permission');\n }",
"public function testAllowCreate()\n {\n $createFalse = LogEntry::create()->canCreate(null);\n $this->assertFalse($createFalse);\n $this->logInWithPermission('ADMIN');\n $createFalse = LogEntry::create()->canCreate();\n $this->assertFalse($createFalse);\n }",
"public function create(User $user)\n {\n return Auth()->user()->hasRole('Admin') || Auth()->user()->hasPermissionTo('Create roles');\n }",
"public function create(): bool\n {\n return true;\n }",
"public function authorize(): bool\n {\n return $this->user()->can('create', Role::class);\n }",
"function CanCreateSegment()\n\t{\n\t\tif ($this->SegmentAdmin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->HasAccess('Segments', 'Create')) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function authorize()\n {\n if(session('contact_key'))\n return true;\n\n if (! $this->user()->hasFeature(FEATURE_DOCUMENTS))\n return false;\n\n \n if ($this->invoice && $this->user()->cannot('edit', $this->invoice))\n return false;\n\n\n if ($this->expense && $this->user()->cannot('edit', $this->expense))\n return false;\n\n\n if($this->ticket && $this->user()->cannot('edit', $this->ticket))\n return false;\n\n\n return true;\n //return $this->user()->can('create');\n }",
"public function authorize() {\n\t\t$this->sport = $this->route('sport');\n\t\tif ($this->competitionDay = $this->route('competitionDay')) {\n\t\t\treturn $this->user()->can('update', $this->competitionDay);\n\t\t}\n\n\t\t$this->competitionDay = new CompetitionDay();\n\t\treturn $this->user()->can('create', CompetitionDay::class);\n\t}",
"public function create(User $user) : bool\n {\n return $user->isAdmin() || $user->hasPermission('create_user') || $user->hasPermission('create_all');\n }",
"function canAdd($user) {\n return $user->isPeopleManager();\n }",
"public function create(User $user)\n {\n return $user->can('create-application-forms');\n }",
"public function canCreateNewPages() {}",
"public function create(User $user)\n {\n $permission = strpos($user->group->permission, \"rappers_create\");\n return !is_int($permission);\n }",
"public function create(User $user)\n {\n return $user->hasPermissionTo('create meetingrooms');\n }",
"public function create(User $user)\n {\n return $user->hasPermission('create-organization-formation');\n }",
"protected function canCreate(){\n return $this->canUserModify() &&\n $this->isQuestionActive() &&\n $this->socialQuestion->SocialPermissions->isUnlockedOrUserCanChangeLockStatus() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_CREATE, $this->getEmptyComment());\n }",
"function CanCreateList()\n\t{\n\t\tif (!verify($this->userid)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tif ($this->Admin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->ListAdmin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$maxlists = $this->GetMaxLists();\n\n\t\t// if there is no maximum set, double check they have permission to create a list.\n\t\tif ($maxlists == 0) {\n\t\t\tif ($this->HasAccess('Lists', 'Create')) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t$mylists = count(array_keys($this->GetLists()));\n\t\tif ($mylists < $maxlists) {\n\t\t\tif ($this->HasAccess('Lists', 'Create')) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t\treturn false;\n\t}",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function authorize()\n {\n return $this->user()->can('manage-drafts');\n }",
"public function authorize()\n {\n return request()->user()->tokenCan('user_create');\n }",
"public function create(User $logged_user)\n {\n return $logged_user->is_root || $logged_user->can('users.create');\n }",
"protected function canCreatePointInDb()\n {\n // create point\n $optionNotNull = function ($option) {\n return $option !== null;\n };\n\n $dbOptions = Arr::only($this->options(), ['name', 'points']);\n\n $canCreatePointInDb = array_filter(array_map($optionNotNull, $dbOptions), function ($option) {\n return $option === true;\n });\n\n return $canCreatePointInDb;\n }",
"public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }",
"public function authorize()\n {\n // return auth()->user()->can('create user');\n return true;\n }",
"public function create(Authenticatable $user)\n {\n return $user->canDo('setting.setting.create');\n }",
"function canAdd() {\r\n\t\t$user\t=& JFactory::getUser();\r\n\t\t$permission = FlexicontentHelperPerm::getPerm();\r\n\t\tif(!$permission->CanAdd) return false;\r\n\t\treturn true;\r\n\t}",
"public function create(User $user)\n {\n return true; // TODO: Change as needed, but leave it true if no policy\n }",
"public function create(User $user)\n {\n return $user->hasRole('Admin') || $user->hasPermissionTo('create_sectors');\n }",
"public function create(): bool;",
"public function authorize()\n {\n if ($this->user()->parent_id == NULL) { //Solo si es Cacique puede agregar indios. Sino, 403!\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n // TODO: Check if is authorized to create user\n return true;\n }",
"public static function isAllowed() {\r\n\t\treturn TodoyuAuth::isAdmin();\r\n\t}",
"function canCreateAccounts() {\n return false;\n }",
"public function create(User $user)\n {\n return $user->canDo('settings.setting.create');\n }",
"protected function creatingNewUser() {\n return ($this->request_exists('user_choice') && $this->request('user_choice') == 'new' );\n }",
"protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Pronko_TaskManagement::TaskManagement_save');\n }",
"public function authorize(): bool\n {\n return Gate::allows('admin.genero.delete', $this->genero);\n }",
"public function authorize()\n {\n if($this->path() == 'profile/create')\n {\n return true;\n } else {\n return false;\n }\n }",
"protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Formax_FormCrud::formcrud_create') ||\n $this->_authorization->isAllowed('Formax_FormCrud::formcrud_update');\n }",
"public function canCreate($member = null) {\n\t\treturn false;\n\t}",
"public function authorizable(): bool\n {\n return false;\n }"
] | [
"0.7158591",
"0.7158591",
"0.7004075",
"0.69176805",
"0.68762827",
"0.6832613",
"0.67593026",
"0.6733605",
"0.6602696",
"0.65521336",
"0.65363324",
"0.6513328",
"0.64837",
"0.64715225",
"0.6460786",
"0.6424019",
"0.6411944",
"0.64056706",
"0.63699055",
"0.6365257",
"0.63646054",
"0.63641644",
"0.6356027",
"0.6355919",
"0.63440174",
"0.63281643",
"0.63146436",
"0.62936133",
"0.6291574",
"0.6288972",
"0.6279959",
"0.6271596",
"0.6251942",
"0.6224913",
"0.6222155",
"0.61954534",
"0.6188579",
"0.6173006",
"0.6171356",
"0.6122654",
"0.611039",
"0.6107274",
"0.6106139",
"0.6095947",
"0.60901654",
"0.6072998",
"0.60428447",
"0.6038281",
"0.6036656",
"0.6035142",
"0.60350186",
"0.6027467",
"0.6022806",
"0.60206896",
"0.6016612",
"0.6004122",
"0.599003",
"0.59746873",
"0.59558785",
"0.5945257",
"0.5941582",
"0.592673",
"0.5923557",
"0.59235334",
"0.590939",
"0.5908132",
"0.5904104",
"0.59031224",
"0.58915216",
"0.58896506",
"0.5871028",
"0.5854053",
"0.58424705",
"0.5839552",
"0.5833567",
"0.58315754",
"0.5831098",
"0.583044",
"0.5824232",
"0.58239675",
"0.581798",
"0.5815452",
"0.5814349",
"0.58085185",
"0.5802438",
"0.5796324",
"0.5785697",
"0.57714206",
"0.5768592",
"0.5754028",
"0.575323",
"0.57501197",
"0.574616",
"0.574387",
"0.57433903",
"0.5743312",
"0.5742029",
"0.57397693",
"0.57367057",
"0.5723892",
"0.5712838"
] | 0.0 | -1 |
Determine whether the user can update the dictation. | public function update(User $user, Dictation $dictation)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | ["public function update(): bool\n {\n return $this->isAllowed(self::UPDATE);\n }","sta(...TRUNCATED) | ["0.78191936","0.7513647","0.7455891","0.7445574","0.73001844","0.7274134","0.72438014","0.7217646",(...TRUNCATED) | 0.0 | -1 |
Determine whether the user can delete the dictation. | public function delete(User $user, Dictation $dictation)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | ["public function can_delete () {\r\n\r\n return $this->permissions[\"D\"] ? true : f(...TRUNCATED) | ["0.79159534","0.78139716","0.76370144","0.74723876","0.74192196","0.7407923","0.73950195","0.738611(...TRUNCATED) | 0.0 | -1 |
Determine whether the user can restore the dictation. | public function restore(User $user, Dictation $dictation)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | ["private function can_restore() {\n return isset( $_POST[ self::NAME ] ) &&\n $_P(...TRUNCATED) | ["0.76101106","0.68357676","0.6747794","0.6736294","0.6730892","0.6663075","0.6510922","0.63686544",(...TRUNCATED) | 0.58742285 | 15 |
End of preview. Expand
in Dataset Viewer.
No dataset card yet
- Downloads last month
- 26