query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
195ab50bb3e734bc2b5d7c0e8498a100
return all student's courses
[ { "docid": "2e96127625df74b74eb5bf7e8cd4019c", "score": "0.7349257", "text": "public function courses( $id ){\r\n $select = \"SELECT `courses`.`id`, `courses`.`name` \r\n FROM `courses`\r\n LEFT JOIN `enrollment`\r\n ON `enrollment`.`course_id` = `courses`.`id`\r\n WHERE `enrollment`.`student_id`=:id\";\r\n $sth = $this->db->pdo->prepare($select );\r\n $sth->bindParam( ':id', $id );\r\n $sth->execute();\r\n $result = $sth->fetchAll( PDO::FETCH_ASSOC );\r\n return $result;\r\n }", "title": "" } ]
[ { "docid": "d10bcb8cc2d405222f1b0f95608a9f74", "score": "0.83187175", "text": "public function GetCourses()\n\t\t{\n $course_students = CourseStudent::GetAll(['student_id' => $this->GetAttribute(static::$primary_key)]);\n $courses = array();\n\n foreach ($course_students as $course_student) {\n $courses[] = Course::GetFromPrimaryKey($course_student->GetAttribute('course_id'));\n }\n\n return $courses;\n\t\t}", "title": "" }, { "docid": "b65d40c2695f91b253daa039533b4e16", "score": "0.8087112", "text": "public function get_courses(){\n\t\t$query = $this->db->get('course');\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "cb9c77018473a7ad978f7348f70deb34", "score": "0.80823886", "text": "public static function courses()\n {\n return Course::all()->toArray();\n }", "title": "" }, { "docid": "7f9d5120d2d709119927d3021728e98d", "score": "0.79675823", "text": "public function getAllCourses()\n {\n $courses = TableRegistry::getTableLocator()->get('Courses');\n $courses = $courses->find('all')->distinct('id')->toArray();\n return $courses;\n }", "title": "" }, { "docid": "a0b69e1c592d06c422584d447b335903", "score": "0.79666686", "text": "function get_all_courses()\n\t{\n\t\t// fetch all data\n\t\treturn $this->db->query('SELECT * FROM courses')->result_array();\n\t}", "title": "" }, { "docid": "f7f6fe1dc7a25fdc3bd515ff16d1db0b", "score": "0.77996075", "text": "function i4_get_all_courses() {\n global $wpcwdb, $wpdb;\n\n $course_table_name = $wpdb->prefix . 'wpcw_courses';\n\n $wpdb->show_errors();\n\n $SQL = \"SELECT course_id, course_title FROM $course_table_name ORDER BY course_title\";\n $results = $wpdb->get_results($SQL, OBJECT_K);\n return $this->results_to_course_array($results);\n }", "title": "" }, { "docid": "bd2cb5ed0fd3b91f85c18e49d21397d3", "score": "0.77467805", "text": "public function getCourses()\n {\n return $this->courses;\n }", "title": "" }, { "docid": "c7a4630a8baedcf03897167edc19d296", "score": "0.77447945", "text": "public static function courses(){\n return Catalog::where('active',1)\n ->where('for_sale', 1)\n ->where('litmos_deleted', 0)\n ->orderBy('name')\n ->lists( 'name', 'id');\n }", "title": "" }, { "docid": "109129900d9887eb1b259c110d40d7f6", "score": "0.7731633", "text": "public function get_courses(){\n return $this->courses;\n }", "title": "" }, { "docid": "ce0afc11488cb03a41504a866aa65cf1", "score": "0.7710771", "text": "function i4_lms_get_courses() {\n global $wpdb, $wpcwdb;\n\n $SQL = \"SELECT course_id, course_title\n\t\t\tFROM $wpcwdb->courses\n\t\t\tORDER BY course_title ASC\n\t\t\t\";\n\n $courses = $wpdb->get_results($SQL);\n\n return $courses;\n }", "title": "" }, { "docid": "56a15257c91f27ef1552ac4af90fddce", "score": "0.7677757", "text": "public static function get_all_courses() {\n\n $context = get_context_instance(CONTEXT_SYSTEM);\n self::validate_context($context);\n require_capability('moodle/course:view', $context); \n $courses = glueserver_course_db::glueserver_get_all_courses();\n $returns = array();\n foreach ($courses as $course) {\n $course = new glueserver_course($course);\n $returns[] = $course->get_data();\n }\n return $returns;\n }", "title": "" }, { "docid": "535cb4f60c018f4cec9a4d89717e4184", "score": "0.7571415", "text": "public function getCourseList()\n {\n $course_list = [];\n\n foreach($this->sections as $section)\n {\n $course_list[$section->getCourseId()] = $section->course_subject.' '.$section->course_number.' '.$section->course_name;\n }\n\n return $course_list;\n }", "title": "" }, { "docid": "263102f49dbfeafdbabb3a4bee1f1af9", "score": "0.754154", "text": "function cicleinscription_get_courses_all(){\n\tglobal $DB;\n\t$sort = 'fullname ASC';\n\t$courses = $DB->get_records_sql(\"\n\t\t\tSELECT\n\t\t\t\tid,\n\t\t\t\tfullname,\n\t\t\t\tshortname \n\t\t\tFROM {course}\n\t\t\tWHERE\n\t\t\t\tcategory <> 0\n\t\t\tORDER BY {$sort}\");\n\n\treturn $courses;\n}", "title": "" }, { "docid": "e83758df442f865d83a871801cde6a08", "score": "0.7449136", "text": "public function getAllCourses()\n {\n $courses = $this->courseRepository->getAllCourses();\n if (isset($courses['errorMsg'])) {\n $courses = $this->makeEmptyCollection();\n }\n\n return view('front-end.courses.list', ['courses' => $courses]);\n }", "title": "" }, { "docid": "69f0c5fb0084c9ce0994cc7fac8ca5e5", "score": "0.74392873", "text": "public function get_all_courses() {\n\t\t$sql = \"SELECT course_id FROM peducator_courses \n\t\tWHERE peducator_id='$this->peducator_id'\";\n\t\t$result = mysqli_query($this->connect_to_db, $sql);\n\n\t\t$arr = [];\n\t\twhile ($row = mysqli_fetch_array($result)) {\n\t\t\tarray_push($arr, get_course($row['course_id']));\n\t\t}\n\n\t\treturn $arr;\n\n\t}", "title": "" }, { "docid": "e298a7a77860f00190002adcfbc5258e", "score": "0.7380352", "text": "public function meCourses()\n {\n return Course::where('user_id', Auth::user()->id)->simplePaginate(10);\n }", "title": "" }, { "docid": "d3bbf1de0b0c00be9291c3bca0efdce7", "score": "0.7378657", "text": "public function getCourses()\n {\n return $this->hasMany(Course::className(), ['language' => 'ISO']);\n }", "title": "" }, { "docid": "e20835d0df99f64af432290592bc73a0", "score": "0.7346015", "text": "public static function getCourses()\n {\n global $cont;\n $courses = $cont->prepare(\"SELECT courses.id AS courseId , courses.title AS title , courses.price AS price , courses.body AS body , courses.image AS `image` , categories.name AS catName FROM courses INNER JOIN categories ON courses.catagory_id = categories.id\");\n $courses->execute();\n return $courses;\n }", "title": "" }, { "docid": "0fab9c68281b93a73d746c2394a5d643", "score": "0.732083", "text": "public function getCourses()\n {\n return array(\n 1 => \"Kids Stage I (Pre School)\",\n 2 => \"Kids Stage II (Grade 01)\",\n 3 => \"Kids Stage III (Grade 02 - 05)\",\n 4 => \"School IT Syllabus (Grade 06 - 09)\",\n 5 => \"O/L ICT (Grade 09 - 11)\",\n 6 => \"A/L IT\",\n 7 => \"A/L GIT\",\n 8 => \"MS Office\",\n 9 => \"Graphic Designer\",\n 10 => \"Hardware & Networking\",\n 11 => \"Software Engineering\",\n 12 => \"Web Designing\",\n 13 => \"Type Setting\"\n );\n }", "title": "" }, { "docid": "0f74859b9652a15b89c0b3a4b45f45a0", "score": "0.73046905", "text": "public function courses()\n {\n return $this->morphedByMany(Course::class, 'subjectables');\n }", "title": "" }, { "docid": "9d6cbd6d36932706e03d403c544bc4f8", "score": "0.72326887", "text": "function get_all_courses()\n {\n $this->db->select('cs.*,cat.name as category');\n $this->db->from('courses as cs');\n $this->db->join('courses_categories_gp as cc', 'cc.course_id=cs.id');\n $this->db->join('categories as cat', 'cat.id=cc.category_id');\n $this->db->where('cat.status', 1);\n $this->db->where('cs.status', 1);\n $this->db->order_by('cs.sort_order', 'asc');\n $query = $this->db->get();\n if ($query->num_rows() > 0) {\n $courses = $query->result();\n return $courses;\n }\n return false;\n }", "title": "" }, { "docid": "994d0535961e25a85dbcc72233def23e", "score": "0.7211605", "text": "public function courseStudents()\n {\n $courseClasses=CourseClasses::where('courses_id',$this->id)->get();\n $students = new Collection();\n foreach ($courseClasses as $class){\n $classStudents=Students::where(['classes_id'=>$class->classes_id,'sections_id'=>$class->sections_id])->get();\n $students = $students->merge($classStudents);\n }\n return $students;\n }", "title": "" }, { "docid": "5e2139619715a7d878a1eeed48a27644", "score": "0.70732445", "text": "public function courses()\n {\n return $this->hasMany('\\T4KModels\\Course')->orderBy('title');\n }", "title": "" }, { "docid": "e900af7e2f383b36438981ca4d21bbd8", "score": "0.706251", "text": "public function courses() {\n return $this->hasMany('App\\Course', 'schoolYearID', 'schoolYearID');\n }", "title": "" }, { "docid": "60e11f9776d92db222342043d0b2e7c9", "score": "0.70593953", "text": "public function getCourses($conn){\n $courses = [];\n $courses = CourseModel::getCourses($conn);\n return $courses;\n \n }", "title": "" }, { "docid": "d123aa1179e15a712f7fb8d147f981c6", "score": "0.7035732", "text": "public function getCourseList() {\n $course = \\DB::table('courses')->where(\"name\",\"!=\",\"\")->orderBy(\"name\")->pluck(\"name\",\"code\");\n return $course;\n \n \n }", "title": "" }, { "docid": "8df9f09d2429d70e3de5f9db91062aaf", "score": "0.7034974", "text": "public function getCourses()\n {\n return $this->hasMany(Section::className(), ['course_id' => 'course_id', 'sec_id' => 'sec_id', 'semester' => 'semester', 'year' => 'year'])->viaTable('teaches', ['ID' => 'ID']);\n }", "title": "" }, { "docid": "11da33704ba2f63323d5698a80ada47b", "score": "0.6965946", "text": "public function index()\n {\n return course::all();\n }", "title": "" }, { "docid": "7101e878a715265a36bc9c8ff3f471fe", "score": "0.6955509", "text": "static function getInstructor_Courses() {\n $sql = \"SELECT Distinct Instructor.FirstName,Instructor.LastName,Course.CourseShortName,Course.CourseLongName,\n Instructor_Course.InstructorID,Instructor_Course.CourseID\n FROM Instructor join Course \n join Instructor_Course\n on Instructor.InstructorID=Instructor_Course.InstructorID\n and Instructor_Course.CourseID = Course.CourseID;\";\n\n //Prepare the Query\n self::$_db->query($sql);\n self::$_db->execute();\n //Return the results\n return self::$_db->resultset();\n //Return row\n }", "title": "" }, { "docid": "19ef0a5dbc3341112a6ae17421e51553", "score": "0.693875", "text": "public function courses()\t{\n\t\treturn $this->hasMany('Course');\n\t}", "title": "" }, { "docid": "fe7735a7f8d26c6ff07d9419e8b1ee41", "score": "0.6937068", "text": "public function getCourses ($username) {\t\t\t\n\t\t\t$user = mysql_real_escape_string($username);\n $query = \"SELECT DISTINCT Enrollments.course_id FROM Courses, Enrollments WHERE Enrollments.user_id = '\" . $user . \"';\"; \n if (($result = $this->dbm->query($query)) == null) { \n return null;\n }\n else { \n if (mysql_num_rows($result) == 0) { \n $courses = null;\n }\n // Iterate as long as we have rows in the result set \n $courses = array();\n while ($row = mysql_fetch_assoc($result)) { \n array_push($courses, $row['course_id']);\n } \n return $courses;\n }\n }", "title": "" }, { "docid": "cd4d09afdf12e2ca4ab58f8a98c7233e", "score": "0.69274193", "text": "public function coursesCategoryList()\n { \n return CourseCategories::all();\n }", "title": "" }, { "docid": "7dd30b9e72660c59df7f04b28bb4fd34", "score": "0.6921195", "text": "public function get_all_courses_record() {\n $slct_query =\"SELECT * FROM courses WHERE course_deleted='0'\";\n $slct_exe =mysqli_query($GLOBALS['con'],$slct_query) or die(mysqli_error($GLOBALS['con']));\n return $slct_exe; //returning all the courses records\n }", "title": "" }, { "docid": "48b058baefe57870e15a6fbe7a5b0385", "score": "0.6884678", "text": "public function courses() {\n\t\treturn $this->belongsToMany('Course')->withPivot('course_role')->orderBy('id');\n\t}", "title": "" }, { "docid": "1deec175f5187c14484a50a7a0d37e4d", "score": "0.68838596", "text": "public function getCoursesAttribute(){\n $semesters = $this->program_semesters;\n $courses = new Collection();\n foreach($semesters as $semester){\n $sem = ProgramSemester::with('courses')->findOrFail($semester->id);\n foreach($sem->courses as $course){\n $courses->push($course);\n }\n }\n return $courses;\n }", "title": "" }, { "docid": "577a6d4cef1a934bc7695db33948210a", "score": "0.6879925", "text": "public function courses(){\n $courses = Course::all();\n return View('admin.courses',compact('courses'));\n }", "title": "" }, { "docid": "070aad6d1c16b200160f07dc7584d4af", "score": "0.68640333", "text": "public function courses() {\n $courses = Course::all();\n $data['courses'] = $courses;\n //dd($courses);\n return view('admin.courses', $data);\n }", "title": "" }, { "docid": "99dc9c369d227a409955f29b952692e8", "score": "0.683336", "text": "public static function find_courses($search) {\n global $DB;\n\n // Validate parameters passed from web service.\n $params = self::validate_parameters(self::find_courses_parameters(), array('search' => $search));\n\n // Capability check.\n if (!has_capability('moodle/course:viewhiddencourses', context_system::instance())) {\n return false;\n }\n\n // Build query.\n $searchsql = '';\n $searchparams = array();\n $searchlikes = array();\n $searchfields = array('c.shortname', 'c.fullname', 'c.idnumber');\n for ($i = 0; $i < count($searchfields); $i++) {\n $searchlikes[$i] = $DB->sql_like($searchfields[$i], \":s{$i}\", false, false);\n $searchparams[\"s{$i}\"] = '%' . $search . '%';\n }\n // We exclude the front page.\n $searchsql = '(' . implode(' OR ', $searchlikes) . ') AND c.id != 1';\n\n // Run query.\n $fields = 'c.id,c.idnumber,c.shortname,c.fullname';\n $sql = \"SELECT $fields FROM {course} c WHERE $searchsql ORDER BY c.shortname ASC\";\n $courses = $DB->get_records_sql($sql, $searchparams, 0);\n return $courses;\n }", "title": "" }, { "docid": "2a2400b0e5ba3c25aa23fd2856517982", "score": "0.6818418", "text": "function get_courses()\n {\n $this ->db-> select('course_id,course_name,course_language');\n $this ->db-> from('tbl_course');\n $this->db->where('course_delete_status',0);\n $this->db->order_by('course_id', 'desc');\n $query = $this->db->get();\n \n return $query->result() ;\n }", "title": "" }, { "docid": "aa5e3312a05225ae5d3f3a0cb49a4789", "score": "0.6787179", "text": "public function returnArray() {\n return $this->courses;\n }", "title": "" }, { "docid": "7f33465d76f7d5b73caf94379dddd843", "score": "0.67854846", "text": "public function getCourseStudents ($id) {\n return $this->makeCall($id, $this->base . 'api/public/courses/' . $id . '/students', true);\n }", "title": "" }, { "docid": "d67aa2c355a0b608429e960b8ef54776", "score": "0.677417", "text": "public function all_course_list(){\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/course_list';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'Lodnontec course List',\n\t\t\t'course_list'=> $this->setting_model->Get_All('course'),\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}", "title": "" }, { "docid": "ef6a0ea22d4a93bc53312203903988fe", "score": "0.67014694", "text": "public function testGetStudentTakesCourseList()\n {\n $response = $this->loginAsRole(Role::ADMIN)\n ->get($this->url('student-courses'));\n\n $response->assertStatus(200);\n\n $response->assertJsonStructure([\n 'data' => [\n [\n 'student_id',\n 'staff_teach_course_id'\n ]\n ]\n ]);\n }", "title": "" }, { "docid": "9a7a1a04654206570f1c0d7446cff2f8", "score": "0.66760385", "text": "public function courses()\n {\n return $this->hasMany('App\\Course');\n }", "title": "" }, { "docid": "ddda325d9ed9d0dfa93eb217c8608987", "score": "0.66588724", "text": "public function category_wise_course_get() {\n $category_id = $_GET['category_id'];\n $courses = $this->api_model->category_wise_course_get($category_id);\n $this->set_response($courses, REST_Controller::HTTP_OK);\n }", "title": "" }, { "docid": "7f6eae99d492f0d95fdf9499d2d5e814", "score": "0.6622568", "text": "public function courses()\n {\n \t// hasMany(RelatedModel, foreignKeyOnRelatedModel = business_id, localKey = id)\n \treturn $this->hasMany(Course::class);\n }", "title": "" }, { "docid": "a49edf81d1e1d538154cad5c3c7725a6", "score": "0.66175586", "text": "public function getCourses($online_only = false)\n {\n $query = '';\n if ($this->parent_target_group instanceof self) {\n // If object IS a child\n $query = 'SELECT courses.course_id FROM '. rex::getTablePrefix() .'d2u_courses_2_target_groups AS c2t '\n .'LEFT JOIN '. rex::getTablePrefix() .'d2u_courses_courses AS courses ON c2t.course_id = courses.course_id '\n .'LEFT JOIN '. rex::getTablePrefix() .'d2u_courses_2_categories AS c2c ON c2c.course_id = courses.course_id '\n .'WHERE c2t.target_group_id = '. $this->parent_target_group->target_group_id .' '\n .'AND c2c.category_id = '. $this->target_group_id .' ';\n } else {\n // If object is NOT a child\n $query = 'SELECT courses.course_id FROM '. rex::getTablePrefix() .'d2u_courses_2_target_groups AS c2t '\n .'LEFT JOIN '. rex::getTablePrefix() .'d2u_courses_courses AS courses ON c2t.course_id = courses.course_id '\n .'WHERE c2t.target_group_id = '. $this->target_group_id .' ';\n }\n if ($online_only) {\n $query .= \"AND online_status = 'online' \"\n .'AND ('. d2u_courses_frontend_helper::getShowTimeWhere() .') ';\n }\n $query .= 'GROUP BY course_id '\n .'ORDER BY date_start, name';\n $result = rex_sql::factory();\n $result->setQuery($query);\n\n $courses = [];\n for ($i = 0; $i < $result->getRows(); ++$i) {\n $courses[] = new Course((int) $result->getValue('course_id'));\n $result->next();\n }\n return $courses;\n }", "title": "" }, { "docid": "aee45c9d1e8c7a4323c2e39838c961ea", "score": "0.6593635", "text": "protected function generateCourses()\n {\n /**\n * Let's go through the archane paths that lead us to the actual\n * table of grades.\n */\n $mainTable = $this->__transcriptDOM\n ->getElementsByTagName('table')->item(0);\n\n $rowOfGrades = $mainTable->childNodes->item(4);\n $gradesTable = $rowOfGrades->firstChild->firstChild;\n\n $this->courses = [];\n\n foreach ($gradesTable->childNodes as $row) {\n // The rows containing the grades have 13 columns.\n if ($row->childNodes->length == 13) {\n $data = $row->childNodes;\n $course = new Course;\n\n $course->code = strtoupper($data->item(0)->nodeValue.$data->item(1)->nodeValue);\n $course->semester = $data->item(2)->nodeValue;\n $course->section = $data->item(3)->nodeValue;\n $course->description = $data->item(4)->nodeValue;\n $course->creditsWorth = $data->item(5)->nodeValue;\n $course->grade = $data->item(6)->nodeValue;\n $course->gpaEarned = $data->item(7)->nodeValue;\n $course->classAvg = $data->item(8)->nodeValue;\n $course->classSize = $data->item(9)->nodeValue;\n $course->creditsEarned = $data->item(10)->nodeValue;\n\n $this->courses[$course->code] = $course;\n }\n }\n }", "title": "" }, { "docid": "4d3aa2e1f38e8a43b73bf1f5e6300ded", "score": "0.6573674", "text": "public function index()\n {\n //\n $courses = Course::where('active',true)\n ->orderBy('title','asc')\n ->get();\n return $courses;\n }", "title": "" }, { "docid": "5d9501d53dbfd171501b5e0d1d35d35f", "score": "0.65577126", "text": "function get_courses($courses)\n{\n foreach( $courses as $course )\n {\n echo get_course($course), PHP_EOL;\n echo get_description($course), PHP_EOL, PHP_EOL;\n }\n}", "title": "" }, { "docid": "bdf15314bb152c5c73d93d20ab1bea16", "score": "0.6517978", "text": "public function getStudentsByCourse($id)\n {\n $subjects = TableRegistry::getTableLocator()->get('Reports');\n $subjects = $subjects->find('all')->where(['course_id' => $id])->distinct('student_id')->groupBy('student_id')->toArray();\n return $subjects;\n }", "title": "" }, { "docid": "d7dc409ad0d02ea10a7217bd51a8f18e", "score": "0.6476183", "text": "public function courses()\n {\n return $this->hasMany('App\\Models\\Course');\n }", "title": "" }, { "docid": "bcd852fb201b3621a30ad025853e7336", "score": "0.64721525", "text": "public function actionCourses()\n\t{\n\t\t//echo \"In Courses\";\n\t\tif (!isset($_REQUEST['username'])){\n\t\t\t$_REQUEST['username'] = Yii::app()->user->name;\n\t\t}\n\t\t//if (!Yii::app()->user->checkAccess('admin')){\n\t\t//\t$this->model=User::model()->findByPk(Yii::app()->user->name);\n\t\t//} else {\n\t\t\t$this->model = DrcUser::loadModel();\n\t\t\t//}\n\t\t//$title = \"Title\";\n\t\t//$contentTitle = \"Courses: title\";\n\t\t$title = \"({$this->model->username}) {$this->model->first_name} {$this->model->last_name}\";\n\t\t$contentTitle = \"Courses: {$this->model->term->description}\";\n\t\tif (!Yii::app()->user->checkAccess('admin') && !Yii::app()->user->checkAccess('staff')){\n\t\t\t$title = $this->model->term->description;\n\t\t\t$contentTitle = \"Courses\";\n\t\t}\n\t\t$this->renderView(array(\n\t\t\t'title' => $title,\n\t\t\t'contentView' => '../course/_list',\n\t\t\t'contentTitle' => $contentTitle,\n\t\t\t'menuView' => 'base.views.layouts._termMenu',\n\t\t\t'menuRoute' => 'drcUser/courses',\n\t\t\t'titleNavRight' => '<a href=\"' . $this->createUrl('drcUser/update', array('term_code'=> $this->model->term_code, 'username'=>$this->model->username)) . '\"><i class=\"icon-plus\"></i> User Profile</a>',\n\t\t));\n\t}", "title": "" }, { "docid": "174147b1a3486af239a33058ddd52415", "score": "0.64693564", "text": "public function my_courses_get() {\n $response = array();\n $auth_token = $_GET['auth_token'];\n $logged_in_user_details = json_decode($this->token_data_get($auth_token), true);\n\n if ($logged_in_user_details['user_id'] > 0) {\n $response = $this->api_model->my_courses_get($logged_in_user_details['user_id']);\n }else{\n\n }\n return $this->set_response($response, REST_Controller::HTTP_OK);\n }", "title": "" }, { "docid": "bf9de487a37daf55566ccb697ed75fcb", "score": "0.6464581", "text": "public function get_course_students($params) {\n global $DB, $PAGE;\n\n if(isset($params['report_params'])) {\n $reportparams = json_decode($params['report_params'], true);\n } else {\n $reportparams = [];\n }\n\n $limit = 0;\n $offset = 0;\n\n /** Limit and offset */\n if(isset($reportparams['limit'])) {\n $limit = $reportparams['limit'];\n }\n\n if(isset($reportparams['offset'])) {\n $offset = $reportparams['offset'];\n }\n\n $where = \"cx.contextlevel = :courselvl AND cx.instanceid > 1\";\n $sqlparams = ['courselvl' => CONTEXT_COURSE];\n\n if (!empty($reportparams['courses'])) {\n $coursesfilter = new in_filter($reportparams['courses'], \"crsc\");\n $where .= ' AND cx.instanceid ' . $coursesfilter->get_sql();\n $sqlparams = array_merge($coursesfilter->get_params(), $sqlparams);\n }\n\n if ($reportparams['inactive_users'] == 0) {\n $enroljoin = 'JOIN {enrol} e ON e.courseid = c.id\n JOIN {user_enrolments} ue ON ue.userid = u.id AND ue.enrolid = e.id';\n $sqlenrolfilter = 'AND ue.status = 0';\n } else {\n $enroljoin = $sqlenrolfilter = '';\n }\n\n $rolefilter = new in_filter($this->get_student_roles(), \"srole\");\n list($sql, $sqlparams) = $this->buildSqlRequest(\n \"SELECT CONCAT(u.id, '_', c.id) AS unique_f, u.*, c.id AS course_id,\n c.shortname AS course_short_name, c.fullname AS course_full_name, gg.finalgrade AS grade, gi.grademax AS grademax\n FROM {context} cx\n JOIN {role_assignments} ra ON ra.contextid = cx.id AND\n ra.roleid \" . $rolefilter->get_sql() . \"\n JOIN {user} u ON u.id = ra.userid\n JOIN {course} c ON c.id = cx.instanceid\n {$enroljoin}\n LEFT JOIN {grade_items} gi ON gi.courseid = c.id AND gi.itemtype = 'course'\n LEFT JOIN {grade_grades} gg ON gg.itemid = gi.id AND gg.userid = u.id\n WHERE {$where} {$sqlenrolfilter}\n GROUP BY u.id, c.id, gg.finalgrade, gi.grademax\",\n array_merge($sqlparams, $rolefilter->get_params()),\n $reportparams\n );\n\n $students = $DB->get_records_sql($sql, $sqlparams, $offset, $limit);\n\n foreach($students as &$student) {\n $user_picture = new user_picture($student);\n $user_picture->size = 100;\n $student->picture = $user_picture->get_url($PAGE)->out();\n }\n\n return $students;\n }", "title": "" }, { "docid": "bb8716d8317ac8fd12eaf11c841b7f08", "score": "0.64513016", "text": "function get_ta_courses($username){\n $result = srch_by_sam($username);\n if(is_null($result)){\n return NULL;\n } \n\n $sql_conn = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASSWD, DATABASE);\n if(!$sql_conn){\n return NULL;\n }\n \n $groups = $result[\"memberof\"];\n unset($groups[\"count\"]);\n\n $courses = array();\n foreach($groups as $group) { //Iterate groups the user is a member of\n $group_sam = dn_to_sam($group);\n if(is_null($group_sam)){\n continue; //In theory, this is not possible, but we'll check\n }\n\n #group_sam is returned from LDAP, so we won't worry about SQL injection here\n $query = \"SELECT course_name FROM courses WHERE ldap_group ='\".$group_sam.\"'\";\n $result = mysqli_query($sql_conn, $query);\n if(!mysqli_num_rows($result)){\n continue; //No class in the database with this ldap group\n }\n \n //possible multiple courses use the same ldap_group\n while($entry = mysqli_fetch_assoc($result)){\n $courses[] = $entry[\"course_name\"]; \n }\n }\n \n mysqli_close($sql_conn);\n return $courses;\n}", "title": "" }, { "docid": "2ad0de061ec6e7addc9b2d78cf92b204", "score": "0.6450295", "text": "public function courses() {\n return $this->belongsToMany('C2Y\\Course', 'classes_courses', 'class_id', 'course_id');\n }", "title": "" }, { "docid": "9c7ff6e0588ac392e5e25462c1d7ce4c", "score": "0.644578", "text": "public static function getCourses($idUser)\r\n { \r\n $app = \\Slim\\Slim::getInstance();\r\n if (!User::find($idUser)) {\r\n $app->response->setStatus(400);\r\n return \"User does not exist\";\r\n }\r\n $courses = Course::where('isPublished',1)->get();\r\n foreach ($courses as &$value) {\r\n unset($value->isPublished);\r\n $enrollment = User::find($idUser)->enrollment()->where('course_id',$value->id)->first();\r\n unset($enrollment->user_id);\r\n unset($enrollment->course_id);\r\n $value->enrollment = $enrollment;\r\n $value->saved = MyCourses::where('user_id',$idUser)->where('course_id',$value->id)->count();\r\n //$value->info = Course::find($value->idCourse);\r\n }\r\n return json_encode($courses);\r\n }", "title": "" }, { "docid": "d75544843891627d89879c7554802533", "score": "0.64326406", "text": "public function courseCompltedStudentsList()\n {\n $data['active_class'] = 'academic';\n $data['title'] = getPhrase('course_completed_student_list');\n\n $data['academic_years'] = addSelectToList(getAcademicYears());\n $list = App\\Course::getCourses(0);\n\n if (!getSetting('transfer_students', 'module')) {\n pageNotFound();\n return back();\n }\n\n $data['layout'] = getLayout();\n $data['module_helper'] = getModuleHelper('course-completed-student-list');\n\n return view('student.completed-list', $data);\n }", "title": "" }, { "docid": "e533d20f6e70b9805f63ff338f7e8471", "score": "0.64235854", "text": "public static function get_all_courses_returns() {\n return new external_multiple_structure(\n glueserver_course::get_class_structure()\n );\n }", "title": "" }, { "docid": "b5f362952a8d77a832a5858c76a5ba71", "score": "0.6415258", "text": "public function allStudents()\n {\n\n $students = Student::all();\n return $students;\n\n\n\n }", "title": "" }, { "docid": "5e36b1292dbac236119a7c6d7804cea8", "score": "0.64045405", "text": "public function getCourses(){\n\n $query = \"SELECT FA.Availability as FAV, FA.TimeStart,FA.TimeEnd, FA.Id, FAA.Availability, FA.CourseID, C.CourseName,C.OfficeHourDay,C.OfficeHourTime, F.AshesiEmail,concat(F.FName,' ',F.LName) as Faculty FROM Registered_Courses R INNER JOIN Courses C on R.CourseID = C.CourseID INNER JOIN Faculty F on R.FacultyID = F.FacultyID INNER JOIN Faculty_Course_Availability FA ON FA.CourseID = R.CourseID\n INNER JOIN Faculty_Arrival FAA ON FAA.FacultyID = R.FacultyID WHERE R.StudentID =:id GROUP BY C.CourseID \";\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(':id', $this->id);\n $stmt->execute();\n return $stmt;\n }", "title": "" }, { "docid": "d4e82c78f2b0a29a5b09c5f6e3c7b2a6", "score": "0.6399983", "text": "function local_mediacore_fetch_courses() {\n global $DB;\n $query = \"SELECT *\n FROM {course}\n WHERE format != :format\n AND visible = :visible\n ORDER BY shortname ASC\";\n return $DB->get_records_sql($query, array(\n 'format' => 'site',\n 'visible' => '1',\n ));\n}", "title": "" }, { "docid": "4e2eb1514d91dfe3d8b8f00ec205ba6f", "score": "0.63983566", "text": "public function index()\n {\n return view('courses.all_courses')->with('course',course::all());\n\n }", "title": "" }, { "docid": "7c33f8b5786d2f0e1581b5a241827707", "score": "0.63948065", "text": "function get_stud_courses($username){\n $sql_conn = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASSWD, DATABASE);\n if(!$sql_conn){\n return NULL;\n }\n\n $query = \"SELECT course_name FROM courses NATURAL JOIN enrolled WHERE username=?\";\n $stmt = mysqli_prepare($sql_conn, $query);\n if(!$stmt){\n mysqli_close($sql_conn);\n return NULL;\n }\n mysqli_stmt_bind_param($stmt, \"s\", $username);\n if(!mysqli_stmt_execute($stmt)){\n mysqli_stmt_close($stmt);\n mysqli_close($sql_conn); \n return NULL;\n } \n mysqli_stmt_bind_result($stmt, $course_name);\n \n $courses = array();\n while(mysqli_stmt_fetch($stmt)){\n $courses[] = $course_name;\n }\n\n mysqli_stmt_close($stmt);\n mysqli_close($sql_conn);\n return $courses;\n}", "title": "" }, { "docid": "b09805c45527309f089c872e3eaae0f4", "score": "0.63761187", "text": "public static function get_courses_list( $max = '-1' ) {\n\t\t$courses = self::get_courses( $max );\n\t\t$options = array(\n\t\t\t'' => __( 'All Courses', 'ibx-wpfomo' ),\n\t\t);\n\n\t\tforeach ( $courses as $course ) {\n\t\t\t$options[ $course->ID ] = $course->post_title;\n\t\t}\n\n\t\treturn $options;\n\t}", "title": "" }, { "docid": "7aec2889291941704adaa89e3592ee10", "score": "0.63665026", "text": "public function getPopularCourses()\n {\n\n // SAME HERE ---- TRYING TO GET ANYTHING TEACHER-RELATED BECAUSE THERE ARE VERY FEW INSTRUCTORS BUT LOOKS BETTER IF SHOWING MORE ON DASHBOARD\n\n $instructors = Role::where('shortname', 'coursecreator')->first()->users()->take(4)->get();\n $editTeachers = Role::where('shortname', 'editingteacher')->first()->users()->take(4)->get();\n $courseCreators = Role::where('shortname', 'coursecreator')->first()->users()->take(4)->get();\n\n $t = $this->coursesForRecents($instructors);\n $et = $this->coursesForRecents($editTeachers);\n $cr = $this->coursesForRecents($courseCreators);\n\n return collect(array_merge($t->toArray(), $et->toArray(), $cr->toArray()))->sortBy('timecreated')->take(5);\n }", "title": "" }, { "docid": "1781c5bddb15d8fb2139e464d78c81e6", "score": "0.6361977", "text": "public function index()\n {\n $courses = Course::all();\n return view('auth.course.courses', compact('courses'));\n }", "title": "" }, { "docid": "c2cb17f0ef4d6a12471361d8c1b5f88b", "score": "0.6356038", "text": "function determine_courses($semester) {\n//IN: Parameter has the current semester code (e.g. \"f16\" for Fall 2016)\n//OUT: Array of courses used in Submitty. Determined from data file structure.\n//PURPOSE: A list of active courses is needed so that user lists can be read\n// from current class databases.\n\n\t$path = \"/var/local/submitty/courses/{$semester}/\";\n\t$courses = scandir($path);\n\n\tif ($courses === false) {\n\t\tlog_it(\"Submitty Auto Account Creation: Cannot parse {$path}, CANNOT MAKE ACCOUNTS\");\n\t\texit(1);\n\t}\n\n\t//remove \".\" and \"..\" entries\n\tforeach ($courses as $index => $course) {\n\t\tif ($course[0] === '.') {\n\t\t\tunset($courses[$index]);\n\t\t}\n\t}\n\n\treturn $courses;\n}", "title": "" }, { "docid": "97b7bb344196a8f42c92f7305457eb8d", "score": "0.6328075", "text": "public function courseList()\n {\n return $this->belongTo(CourseList::class);\n }", "title": "" }, { "docid": "a9a06c08eee25fd78ad257b0fc5fdc3c", "score": "0.632388", "text": "public function frontpage_my_courses() {\n\n global $USER, $CFG, $DB;\n $content = html_writer::start_tag('div', array('class' => 'frontpage-enrolled-courses') );\n $content .= html_writer::start_tag('div', array('class' => 'container'));\n $content .= html_writer::tag('h2', get_string('mycourses'));\n $coursehtml = parent::frontpage_my_courses();\n if ($coursehtml == '') {\n\n $coursehtml = \"<div id='mycourses'><style> #frontpage-course-list.frontpage-mycourse-list { display:none;}\";\n $coursehtml .= \"</style></div>\";\n }\n $content .= $coursehtml;\n $content .= html_writer::end_tag('div');\n $content .= html_writer::end_tag('div');\n\n return $content;\n }", "title": "" }, { "docid": "56dc7581aa1e060a81f0894429ca75e8", "score": "0.6314589", "text": "public function frontpage_available_courses() {\r\n global $CFG;\r\n require_once($CFG->libdir. '/coursecatlib.php');\r\n\r\n $chelper = new coursecat_helper();\r\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->\r\n set_courses_display_options(array(\r\n 'recursive' => true,\r\n 'limit' => $CFG->frontpagecourselimit,\r\n 'viewmoreurl' => new moodle_url('/course/index.php'),\r\n 'viewmoretext' => new lang_string('fulllistofcourses')));\r\n\r\n $chelper->set_attributes(array('class' => 'frontpage-course-list-all'));\r\n $courses = coursecat::get(0)->get_courses($chelper->get_courses_display_options());\r\n $totalcount = coursecat::get(0)->get_courses_count($chelper->get_courses_display_options());\r\n if (!$totalcount && !$this->page->user_is_editing() && has_capability('moodle/course:create', context_system::instance())) {\r\n // Print link to create a new course, for the 1st available category.\r\n return $this->add_new_course_button();\r\n }\r\n return $this->frontpage_courseboxes($chelper, $courses);\r\n }", "title": "" }, { "docid": "28bd557890b36131d2e39ba138c39177", "score": "0.63137", "text": "public function certificatecourses()\n {\n \n $certificateCourses = Course::select('course_name','course_number','educationlevel_id')->where('educationlevel_id', '1')->get();\n \n return view(\n 'staff.course.certificate',\n compact('certificateCourses'), \n );\n\n }", "title": "" }, { "docid": "de6910888679a89d28779806842e8a60", "score": "0.6313074", "text": "public function index()\n\t{\n\t\t$this->authorize('index', Course::class);\n\n\t return Course::with([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'user'=>function($query){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$query->select(['id','firstname','lastname']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'updatedByUser'=>function($query){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$query->select(['id','firstname','lastname']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'category'=>function($query){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$query->select(['id','name']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t])->get(['id','code','name','price','state','created_by','updated_by','category_id']);\n\n\t}", "title": "" }, { "docid": "9361d29ddd08e12a545aa07ec1cc0a93", "score": "0.63071877", "text": "private function getCoursesWithLogs()\n {\n return $this->entityManager->createQueryBuilder()\n ->select('course')\n ->from(Course::class, 'course')\n ->innerJoin(ActionLog::class, 'log', Expr\\Join::WITH, 'course.id = log.course')\n ->andWhere('course.sandbox = :false')\n ->andWhere('course.id in (:ids)')\n ->setParameter('false', false)\n ->setParameter('ids', $this->getAvailableCoursesIds())\n ->orderBy('course.info.title', 'ASC')\n ->getQuery()\n ->getResult();\n }", "title": "" }, { "docid": "7945b10e0039f64031d99fb28c381ab8", "score": "0.630277", "text": "function i4_get_assigned_courses($user_id) {\n global $wpcwdb, $wpdb;\n\n $wpdb->show_errors();\n //SELECT `course_title` FROM `wp_wpcw_user_courses` LEFT JOIN wp_wpcw_courses ON wp_wpcw_user_courses.course_id=wp_wpcw_courses.course_id WHERE `user_id`= 3\n\n $SQL = $wpdb->prepare(\"SELECT $wpcwdb->courses.course_id, $wpcwdb->courses.course_title FROM $wpcwdb->user_courses LEFT JOIN $wpcwdb->courses ON $wpcwdb->user_courses.course_id=$wpcwdb->courses.course_id WHERE user_id = %d ORDER BY LOWER($wpcwdb->courses.course_title)\", $user_id);\n $results = $wpdb->get_results($SQL, OBJECT_K);\n return $this->results_to_course_array($results);\n }", "title": "" }, { "docid": "2f8071b892333a6233b595c397b9d555", "score": "0.62936485", "text": "public function getAllcourseRegister(): array\n {\n }", "title": "" }, { "docid": "fda989ce55a0437fcb43060634b7d4f0", "score": "0.6288509", "text": "public function courses(){\n return $this->belongsToMany(Course::class,'students_courses');\n }", "title": "" }, { "docid": "ff2bbf447a735210e61b8ba646a9cfbf", "score": "0.62877554", "text": "public function getCategories()\n {\n return $this->request(\"core_course_get_categories\");\n }", "title": "" }, { "docid": "a7459bcc4ca42b4db8de41f4ba4a4f35", "score": "0.62873226", "text": "function getSplittableCourses($refresh = false) {\n\n if (!$refresh && $this->courses_splittable) {\n return $this->courses_splittable;\n }\n\n $filters = array('crosslist', 'teamteach');\n $this->courses_splittable = $this->getValidSections($filters, true, true, 1);\n return $this->courses_splittable;\n }", "title": "" }, { "docid": "c9034d781df12064fe96af99442e2228", "score": "0.6285443", "text": "public function all_course_request(){\n\t\t\t$load = new Load();\n\t\t\t$request_model = $load->model('course_request_model');\n\t\t\t$all_course_request = $request_model->get_all_course_request('course_request');\n \n\t\t\treturn $all_course_request;\n\t\t}", "title": "" }, { "docid": "7133c474f0d211118dbb3a8abee192e9", "score": "0.6282319", "text": "public function fetchCourses()\n {\n $courses = Course::get();\n\n return DataTables::of($courses)\n ->addColumn('name', function ($course) {\n return $course->name;\n })\n ->addColumn('description', function ($course) {\n return $course->description;\n })\n ->addColumn('duration', function ($course) {\n return $course->duration;\n })\n ->addColumn('level', function ($course) {\n return $course->level;\n })\n ->addColumn('language', function ($course) {\n return $course->language;\n })\n ->addColumn('doctor', function ($course) {\n return $course->doctor->name;\n })\n ->addColumn('doc1', function ($course) {\n return '<a href=\"/courses/courseEvaluations/'.$course->id.'/doc1\" class=\"btn btn-sm btn-info\">Evaluation 1</a>';\n })\n ->addColumn('doc2', function ($course) {\n return '<a href=\"/courses/courseEvaluations/'.$course->id.'/doc2\" class=\"btn btn-sm btn-info\">Evaluation 2</a>';\n })\n ->addColumn('doc3', function ($course) {\n return '<a href=\"/courses/courseEvaluations/'.$course->id.'/doc3\" class=\"btn btn-sm btn-info\">Evaluation 3</a>';\n })\n ->addColumn('lectures_count', function ($course) {\n return $course->lectures_count;\n })\n ->addColumn('students_count', function ($course) {\n return $course->students_count;\n })\n ->addColumn('image', function ($course) {\n return '<img src=\"'.$course->image.'\" style=\"width:60px;\">';\n })\n ->addColumn('action', function ($course) {\n if(Auth::user()->role == \"subAdmin\"){\n return '';\n }\n return '<a class=\"btn action-btn\" href=\\'/courses/edit/'.$course->id.'\\'><span class=\"fa fa-pencil\"></span></a>\n <a class=\"btn action-btn\" onclick=\\'deleteCourse('.$course->id.')\\'><span class=\"fa fa-trash-o\"></span></a>';\n })\n ->rawColumns(['action', 'image', 'doc1', 'doc2', 'doc3'])\n ->make(true);\n }", "title": "" }, { "docid": "366a93c807f456742ba0a4b984492fde", "score": "0.62753737", "text": "public function get_course_categories($instructor_id){\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->TABLENAME);\n\t\t$this->db->where('instructor_id', $instructor_id);\n\t\t$this->db->join('course_category', \"course_category.category_id = $this->TABLENAME.category_id\");\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "5c4603091591e90300dfa4d5ff29f1fa", "score": "0.6267127", "text": "public static function getMyCourses($id,$needCourseDetail=True)\r\n { \r\n $courses = MyCourses::where('user_id', '=', $id)->get();\r\n foreach ($courses as &$value) {\r\n unset($value->updated_at);\r\n unset($value->created_at);\r\n $enrollment = Enrollment::where('user_id',$id)->where('course_id',$value->course_id)->first();\r\n if($needCourseDetail) {\r\n $course = Course::find($value->course_id);\r\n $value->name = $course->name;\r\n $value->shortDescription = $course->shortDescription;\r\n $value->price = $course->price;\r\n }\r\n if($enrollment) {\r\n $value->enrollment_status = $enrollment->status;\r\n $value->enrollment_status_updated_at = $enrollment->updated_at;\r\n $value->enrollment_at = $enrollment->created_at;\r\n }\r\n }\r\n return json_encode($courses);\r\n }", "title": "" }, { "docid": "ddee4b16ae8f8d31e058323c6e1e9283", "score": "0.62627673", "text": "public function courses()\n {\n return $this->belongsToMany(Course::class, 'course_users', 'user_id', 'course_id')->withTimestamps();\n }", "title": "" }, { "docid": "5203fd2d3e1f5b4a54328dc5c1696889", "score": "0.6251055", "text": "public function getCoursesByInstructor($id)\n {\n $courses = $this->coursesService->getCoursesByInstructor($id);\n $statuscode = ($courses) ? 200 : 404;\n $allData = [];\n $allData['status'] = ($courses) ? true : false;\n $allData['message'] = ($courses) ? 'All Courses' : 'No courses Found';\n $allData['errors'] = [];\n $allData['data'] = $courses;\n\n return response()->json($allData,$statuscode);\n }", "title": "" }, { "docid": "61c6b7237b0cf7f6e97fba74239bff40", "score": "0.623902", "text": "function getAllCourse(){\r\n // Get a reference to the controller object\r\n $CI =& get_instance();\r\n\r\n // You may need to load the model if it hasn't been pre-loaded\r\n $CI->load->model('news');\r\n \r\n $res = $CI->news->getAllCourse();\r\n return $res;\r\n}", "title": "" }, { "docid": "b3e1b6f57a64ad95e78d753b44fb3d21", "score": "0.6236744", "text": "public static function get_courses($category) {\n global $DB, $CFG;\n\n\n $params = self::validate_parameters(self::get_courses_parameters(), array(\n 'categoryid' => $category,\n ));\n if (!$category) {\n return array(array('id' => 0, 'fullname' => get_string('all')));\n }\n $category = $DB->get_record('course_categories', array('id' => $category), '*', MUST_EXIST);\n $courses = get_courses($category->id);\n foreach ($courses as $c) {\n if (!$c->visible) {\n unset($courses[$c->id]);\n }\n }\n return $courses;\n }", "title": "" }, { "docid": "d28a34ee0280388d394426d10e8e4fea", "score": "0.6229005", "text": "public function course(){\n $user=Auth::user();\n $customer=Customer::find('1');\n $courses=Customer::find('1')->course()->paginate(6);\n return view('client.modules.user.course',compact('customer','courses'));\n }", "title": "" }, { "docid": "3144ed3c4069e07aa7bd24d48df24d0b", "score": "0.62286687", "text": "public function course() {\n\t\treturn $this->belongsToMany('Course')->where(\"course_role\", 1)->first();\n\t}", "title": "" }, { "docid": "0daed95f0449af5cb9b0f51463a643be", "score": "0.62240094", "text": "public function course_data($courses = array()) {\n\t\tforeach ($courses as $key => $course) {\n\t\t\t$courses[$key]['requirements'] = json_decode($course['requirements']);\n\t\t\t$courses[$key]['outcomes'] = json_decode($course['outcomes']);\n\t\t\t$courses[$key]['thumbnail'] = $this->get_image('course_thumbnail', $course['id']);\n\t\t\tif ($course['is_free_course'] == 1) {\n\t\t\t\t$courses[$key]['price'] = get_phrase('free');\n\t\t\t}else{\n\t\t\t\tif ($course['discount_flag'] == 1){\n\t\t\t\t\t$courses[$key]['price'] = currency($course['discounted_price']);\n\t\t\t\t}else{\n\t\t\t\t\t$courses[$key]['price'] = currency($course['price']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$total_rating = $this->crud_model->get_ratings('course', $course['id'], true)->row()->rating;\n\t\t\t$number_of_ratings = $this->crud_model->get_ratings('course', $course['id'])->num_rows();\n\t\t\tif ($number_of_ratings > 0) {\n\t\t\t\t$courses[$key]['rating'] = ceil($total_rating / $number_of_ratings);\n\t\t\t}else {\n\t\t\t\t$courses[$key]['rating'] = 0;\n\t\t\t}\n\t\t\t$courses[$key]['number_of_ratings'] = $number_of_ratings;\n\t\t\t$instructor_details = $this->user_model->get_all_user($course['user_id'])->row_array();\n\t\t\t$courses[$key]['instructor_name'] = $instructor_details['first_name'].' '.$instructor_details['last_name'];\n\t\t\t$courses[$key]['total_enrollment'] = $this->crud_model->enrol_history($course['id'])->num_rows();\n\t\t\t$courses[$key]['shareable_link'] = site_url('home/course/'.slugify($course['title']).'/'.$course['id']);\n\t\t}\n\n\t\treturn $courses;\n\t}", "title": "" }, { "docid": "993bbf5b759b8d725a8010b54b8525f6", "score": "0.62226117", "text": "public function getAll(): array\r\n {\r\n $data = $this->loadData(DATA_DIR . '/courses.json');\r\n\r\n //next stage, get most popular and most favourite\r\n $popular_column = array_column($data['corses'], 3);\r\n $recommended_column = array_column($data['courses'], 2);\r\n $extra = $data['courses'];\r\n\r\n array_multisort($recommended_column, SORT_DESC, $data['courses']);\r\n $recommended = array_slice($data['courses'], 0, 8);\r\n \r\n array_multisort($popular_column, SORT_DESC, $extra);\r\n $popular = array_slice($extra, 0, 8);\r\n\r\n return ['popular'=>$popular, 'recommended'=>$recommended];\r\n }", "title": "" }, { "docid": "2441bd3edfe39d17c3237fa31b271aa1", "score": "0.62128216", "text": "function listDescendantCourses() {\n $courses = courselist_roftools::get_courses_from_parent_rofpath($this->getRofPathId());\n return array_keys($courses);\n }", "title": "" }, { "docid": "911df46ebb4b00b9d220be2cbf214433", "score": "0.620782", "text": "function student_listCourses(){\n\tinclude 'db.php';\n\t$username = filter_var($_GET['val']);\n\n\t$sql = 'SELECT id ,name ,description , image \n \t\t\tFROM courses JOIN idinfo\n \t\tON courses.id = idinfo.coursesID\n \t\tWHERE idinfo.studentID =' . $username . '' ;\n\t\n\t$result = mysqli_query($conn, $sql);\n\n\tif (mysqli_num_rows($result) > 0) {\n\t\t\tforeach($result as $row) {\t\t\t\t\n\t\t\t\techo \"<a href='courses-info.php?val=\". $row['id'] . \"'>\" . \"<div class='wrapp-img-link'>\" .'<img class=\"img-main\" src=\"data:image/jpeg;base64,'.base64_encode( $row['image'] ).'\" alt=\"' . $row['name'] . '\"/>' . \"</div>\". \"course\" . \" \" . $row['name'] . \"</a>\";\n\t\t\t}\n\t} else {\n\t\t\t\techo \"This student is currently not enrolled in any courses\";\n\t\t\t}\n\t\t\t\t\n\n\t}", "title": "" }, { "docid": "4c83d7449aa2e9556df3843e4569455e", "score": "0.62020004", "text": "public function Get_All_Course($dept_id)\n {\n $sql = \"SELECT `course_id`as id,`course_name_en` as name_en,`course_name_th`as name_th,`credit` FROM `course`\";\n if($dept_id != 'all')\n {\n $sql .=\" WHERE `department_id` = '\".$dept_id.\"'\";\n }\n $sql.=\" ORDER BY `course_id` ASC\";\n $result = $this->DB->Query($sql);\n if($result)\n {\n $data = array();\n for($i=0;$i<count($result);$i++)\n {\n $course['id'] = $result[$i]['id'];\n $course['name']['en'] = $result[$i]['name_en'];\n $course['name']['th'] = $result[$i]['name_th'];\n $course['credit'] = $result[$i]['credit'];\n array_push($data,$course);\n }\n return $data;\n }\n else\n {\n $this->LOG->Write(\"Error course : search all course failed\");\n return false;\n }\n }", "title": "" }, { "docid": "d0eeb4184f2026485384831300170739", "score": "0.6195018", "text": "public function student_course_allocated($student_id)\n {\n $sql=\"SELECT DISTINCT c1.course_title,c1.course_code,c1.course_id\n FROM students AS s1\n JOIN students_classes_courses as scc1 ON s1.student_id=scc1.student_id AND s1.student_current_session=scc1.session_id\n JOIN courses AS c1 ON c1.course_id=scc1.course_id\n WHERE s1.student_id=$student_id\";\n $obj=new Db_Query();\n $result_data=$obj->execute($sql);\n\n return $result_data;\n }", "title": "" }, { "docid": "c7781649cf472a17568c396546ac7b12", "score": "0.6191191", "text": "function languagelesson_get_students($courseid)\n{\n\tglobal $DB;\n\t\n\t// Pull the context value for input courseid.\n\t$context = context_course::instance($courseid);\n $allusers = get_enrolled_users($context, 'mod/languagelesson:submit', 0, 'u.id, u.firstname, u.lastname, u.email, u.picture');\n \n $getteachers = get_enrolled_users($context, 'mod/languagelesson:manage', 0, 'u.id');\n $getgraders = get_enrolled_users($context, 'mod/languagelesson:grade', 0, 'u.id');\n \n \n $teachers = array();\n \n foreach ($getteachers as $thisteacher) {\n $teachers[] = $thisteacher->id;\n }\n foreach ($getgraders as $thisgrader) {\n $teachers[] = $thisgrader->id;\n }\n sort($teachers);\n \n // Remove all of the teachers those with manage or grade capabilities from the list.\n foreach ($allusers as $oneuser) {\n foreach ($teachers as $teacherid) {\n if ($oneuser->id == $teacherid) {\n unset($allusers[$oneuser->id]);\n }\n }\n } \n\treturn $allusers;\n}", "title": "" }, { "docid": "e3aa1fe6e467382c3a3c7d6d210fa6ba", "score": "0.619107", "text": "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "title": "" }, { "docid": "2d6009170cf6fdc252014177e2e5fe6c", "score": "0.61906064", "text": "function generateCourses(){\n\tglobal $dao; \n\t\n\t$courses = $dao->getAllInfoDepotCourses();\n\n\tforeach($courses as $course){\n\t\techo '<option value=\"' . $course->getId() . '\">';\n\t\techo $course->getCode() . ': ' . $course->getName();\n\t\techo '</option>';\n\t}\n\t\n}", "title": "" }, { "docid": "2ec7e7630544bcf2e49ed5b7f3a98c48", "score": "0.6182794", "text": "public function courses()\n {\n return $this->belongsToMany(Course::class, 'results', 'idRegistrationF', 'idCourseF');\n }", "title": "" } ]
a407185734bf80965328b7bb098ba005
Query the database using prepared statments
[ { "docid": "072a916835e6e2a4aebc38af3a37f7f1", "score": "0.0", "text": "function query($query, $bindings, $conn)\n{\n\t$stmt = $conn->prepare($query);\n\n\t$stmt->execute($bindings);\n\n\t$affected_rows = $stmt->rowCount();\n\n\treturn ($affected_rows > 0) ? $stmt : false;\n}", "title": "" } ]
[ { "docid": "f6b7210b89155a626205ce86e90511d6", "score": "0.696912", "text": "function query($sql, $vars=array()){\n \tglobal $db;\n \t$result = $db->prepare($sql);\n \t$result->execute($vars);\n \treturn $result->fetchAll();\n }", "title": "" }, { "docid": "f8a60d3b9a825f9ed31042aaca9063a5", "score": "0.69130635", "text": "public function query($rawQuery,$params = array()){\n\t\t\n\t\t$stmt = $this->conn->prepare($rawQuery);\n\t\t\n\t\t$this->setParams($stmt,$params);\n\t\t\n\t\t$stmt->execute();\n\t\t\n\t\treturn $stmt;\t\t\t\t\t////$rawQuery = query bruta\n\t\t\n\t}", "title": "" }, { "docid": "e1eb453ee1ad15b823cb8e8f4a320436", "score": "0.68618023", "text": "public function query($sql){\n $this->stmt = $this->getPDO()->prepare($sql);\n \n }", "title": "" }, { "docid": "d0005cd671fc01230f10684fb924130d", "score": "0.68399924", "text": "function query(/* $sql [, ... ] */) {\n $servername = \"localhost\";\n\t$username = \"root\";\n\t$password = \"19810925\";\n\t$myDB = \"bart\";\n \n try {\n\t\t//connect to server and the chosen database\n\t\t$conn = new PDO(\"mysql:host=$servername;dbname=$myDB\", $username, $password);\n\t\t// set the PDO error mode to exception\n\t\t$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n\t\t//echo \"Connected successfully\"; \n\t}\n\tcatch(PDOException $e) {\n\t\techo \"Connection failed: \" . $e->getMessage();\n\t}\n \n // SQL statement\n $sql = func_get_arg(0);\n\n // parameters, if any\n $parameters = array_slice(func_get_args(), 1);\n\n // prepare SQL statement\n $statement = $conn->prepare($sql);\n if ($statement === false) {\n // trigger (big, orange) error\n trigger_error($conn->errorInfo()[2], E_USER_ERROR);\n exit;\n }\n\n // execute SQL statement\n $results = $statement->execute($parameters);\n\n // return result set's rows, if any\n if ($results !== false) {\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }\n else {\n return false;\n }\n }", "title": "" }, { "docid": "1ec9659049cab4d4deef4cff10782769", "score": "0.6828965", "text": "public function query($sql, $params);", "title": "" }, { "docid": "d92ef19e88c219e1aa1706f0aa82eada", "score": "0.68258816", "text": "private function executeQuery()\r\n {\r\n \r\n $this->sql = \"SELECT \";\r\n $this->sql .= $this->getColumns();\r\n $this->sql .= \" FROM \".$this->from; \r\n $this->sql .= $this->getJoins();\r\n $this->sql .= $this->getWhere();\r\n $this->sql .= $this->getGroupBy();\r\n $this->sql .= $this->getOrderBy();\r\n $this->sql .= $this->getLimit();\r\n $result = $this->getResults($this->sql);\r\n return $result;\r\n \r\n }", "title": "" }, { "docid": "add925ab85f131e1961f7a6edd40d741", "score": "0.6801647", "text": "abstract protected function query();", "title": "" }, { "docid": "0992e9064cf94f479e835af7b192999d", "score": "0.6774166", "text": "public function query($sql){\n $this->stmt = $this->dbh->prepare($sql);\n }", "title": "" }, { "docid": "17325328804302763d3c2c4ac61e3300", "score": "0.676554", "text": "public function query($sql){\n\t\t\t$this->stmt = $this->dbh->prepare($sql);\n\t\t}", "title": "" }, { "docid": "5e85c3c4000f387f67afbbbc461655dd", "score": "0.6762683", "text": "function query($sql, $input_parameters = array()) {\n\t\ttry {\n\t\t\t$stmt = $this->_database->prepare ( $sql );\n\t\t\t// var_dump($input_parameters);\n\t\t\tif (! empty ( $input_parameters )) {\n\t\t\t\tif (! $stmt->execute ( $input_parameters )) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// echo $stmt->queryString;\n\t\t\t} else {\n\t\t\t\tif (! $stmt->execute ()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $stmt;\n\t\t} catch ( PDOException $e ) {\n\t\t\techo $e->getMessage ();\n\t\t}\n\t}", "title": "" }, { "docid": "d9102fdc1eb19c27188f8fc7b5a26e81", "score": "0.67609197", "text": "abstract public function query();", "title": "" }, { "docid": "c475c45dd964e6b0fea2b1d4aea57047", "score": "0.6744711", "text": "public function query($sql){\n if($this->dbh){\n $this->stmt = $this->dbh->prepare($sql);\n }\n }", "title": "" }, { "docid": "47a02d167f5546c99b3b9ab7973d5f71", "score": "0.6723959", "text": "function query(/* $sql [, ... ] */)\n {\n // SQL statement\n $sql = func_get_arg(0);\n\n // parameters (if any)\n $parameters = array_slice(func_get_args(), 1);\n\n // try to connect to database\n static $handle;\n if (!isset($handle))\n {\n try\n {\n // connect to database\n $handle = new PDO(\"mysql:dbname=\" . DATABASE . \";host=\" . SERVER, USERNAME, PASSWORD);\n\n // ensure that PDO::prepare returns false when passed invalid SQL\n $handle->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); \n }\n catch (Exception $e)\n {\n // trigger (big, orange) error\n trigger_error($e->getMessage(), E_USER_ERROR);\n exit;\n }\n }\n\n\n // prepare SQL statement\n // PDO:prepare() and PDOStatement::execute() handles escaping for us\n $statement = $handle->prepare($sql);\n if ($statement === false)\n {\n // trigger (big, orange) error\n trigger_error($handle->errorInfo()[2], E_USER_ERROR);\n exit;\n }\n\n // execute SQL statement\n $results = $statement->execute($parameters);\n\n // return result set's rows, if any\n if ($results !== false)\n {\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "c56bdc476a2d749e89bb3602100be86d", "score": "0.6680602", "text": "abstract public function preparedForDb();", "title": "" }, { "docid": "c014ef217c966350dc3e5c7f7a8effcc", "score": "0.66601694", "text": "public function query($sql) {\n $this->_stmt = $this->_db->prepare($sql);\n }", "title": "" }, { "docid": "9a5efbe62dd87352646f2a421969fce4", "score": "0.6647278", "text": "function query($query){\n echo \" called query \";\n $this->statement = $this->connection -> prepare($query);\n echo \"test\" . $this->statement;\n }", "title": "" }, { "docid": "13d7158379e86e64c1bf9a25f0278889", "score": "0.66235334", "text": "function query(/*. string .*/ $statement /*., args .*/)\n\t\t/*. throws PDOException .*/{}", "title": "" }, { "docid": "f9eb33f0db0a2d0160b180047049a697", "score": "0.66170657", "text": "public function execQuery();", "title": "" }, { "docid": "bda5c7ab3afc7fb324d3eb5a9056b4d1", "score": "0.6579505", "text": "public static function doExecuteQuery() {\n\n\t\techo '<style type=\"text/css\">';\n\t\tHtml::doLoadCSS('styles');\n\t\techo '</style>';\n\n\t\t$query = Util::removeComments(self::getParameter('query'));\n\t\t$delimiter = self::getParameter('delimiter');\n\n\t\tif ($delimiter && strpos($query, $delimiter) !== false) {\n\t\t\t$queries = explode($delimiter, $query);\n\t\t}\n\t\telse {\n\t\t\t$queries = array($query);\n\t\t}\n\n\t\tif (!empty($queries)) {\n\n\t\t\t$db = self::getAdapter();\n\n\t\t\tif ($db === null) {\n\t\t\t die('Id da conexão não foi passado');\n\t\t\t}\n\n\t\t\tforeach ($queries as $sql) {\n\n\t\t\t\t$sql = trim($sql);\n\n\t\t\t\tif ($sql) {\n\n\t\t\t\t\t$aux = new PString(strtoupper(substr($sql, 0, 9)));\n\n\t\t\t\t\tif ($aux->startsWith('SELECT ', 'SHOW ', 'DESCRIBE ', 'DESC ')) {\n\n\t\t\t\t\t\t$fetch = $db->getPDO()->query($sql);\n\n\t\t\t\t\t\tif ($fetch !== false) {\n\n\t\t\t\t\t\t // TODO: implementar paginacao & Database.fetchPages\n\n\t\t\t\t\t\t\t$all = $fetch->fetchAll(PDO::FETCH_OBJ);\n\t\t\t\t\t\t\t$cols = !empty($all) ? array_keys(get_object_vars($all[0])) : [];\n\n\t\t\t\t\t\t\techo '<p>', Html::datagrid($all, $cols, $db), '</p>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tself::showError($db);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telse if ($aux->startsWith('INSERT ', 'UPDATE ', 'DELETE ')) {\n\n\t\t\t\t\t\tif ($db->allowed()) {\n\n\t\t\t\t\t\t $rows = $db->getPDO()->exec($sql);\n\n\t\t\t\t\t\t if ($rows !== false) {\n printf('<p>%s rows affected.</p>', $rows);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t else {\n\t\t\t\t\t\t self::showError($db);\n\t\t\t\t\t\t }\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\techo '<p>cannot execute DML commands in reserved schemas.</p>';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\n\t\t\t\t\t\tif ($db->allowed()) {\n\n\t\t\t\t\t\t\t$rows = $db->getPDO()->exec($sql);\n\n\t\t\t\t\t\t\tif ($rows !== false) {\n\t\t\t\t\t\t\t echo \"<p>{$rows} rows affected.</p>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tself::showError($db);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\techo '<p>cannot execute commands in reserved schemas.</p>';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "a1491c1ad36e0443ba3d1cabc86c8c70", "score": "0.65698624", "text": "public function prepare ($query) {}", "title": "" }, { "docid": "01d252e974e8aed08d841889ec88f49f", "score": "0.65671605", "text": "public function query($query, $params = array()) {\n if ($this->filter_exists(\"query\")) { $query = $this->apply_filter(\"query\", array($query)); }\n $this->stmt = $this->connection->prepare($query);\n $this->query_count_all++;\n if ($this->stmt) {\n $this->query_count_success++;\n if (count($params)) {\n foreach ($params as $key => $param) {\n if (is_int($param) || is_bool($param)) {\n $markers .= \"i\";\n $param_trueval = intval($param);\n $params_bindable[] = $param_trueval;\n } else if (is_double($param)) {\n $markers .= \"d\";\n $param_trueval = doubleval($param);\n $params_bindable[] = $param_trueval;\n } else {\n $markers .= \"s\";\n $param_trueval = strval($param);\n $params_bindable[] = $param_trueval;\n }\n }\n // For some reason, creating references within the first loop breaks some queries\n foreach ($params_bindable as $key => &$param) {\n $params_bindable_withref[$key] = &$param;\n }\n array_unshift($params_bindable_withref, $markers);\n call_user_func_array(array($this->stmt, \"bind_param\"), $params_bindable_withref);\n }\n $execute = $this->stmt->execute();\n // An extra check to see if the query executed without errors (first check is when we first prepare the query)\n if (!$execute) {\n\t$debug_backtrace = debug_backtrace();\n\terror_log(\"MySQL database error: \".$this->stmt->error.\" for query \".$query.\" in \".$debug_backtrace[1][\"file\"].\" on line \".$debug_backtrace[1][\"line\"]);\n if ($this->debug) {\n echo \"MySQL database error: \".$this->stmt->error.\" for query <pre><code>\".$query.\"</code></pre> in \".$debug_backtrace[1][\"file\"].\" on line \".$debug_backtrace[1][\"line\"];\n exit();\n\t}\n\treturn false;\n }\n if ($this->stmt->field_count) {\n $fields = $this->stmt->result_metadata()->fetch_fields();\n foreach ($fields as $key => $field) {\n $fields_names[$field->name] = &$field->name;\n }\n call_user_func_array(array($this->stmt, \"bind_result\"), $fields_names);\n return $fields_names;\n } else {\n // Set or update info relating to the latest query\n $this->insert_id = $this->connection->insert_id;\n $this->affected_rows = $this->connection->affected_rows;\n // Close statement\n $this->stmt->close();\n // Return affected rows if any, otherwise return true (because 0 is considered false)\n if ($this->affected_rows) { return $this->affected_rows; } else { return true; }\n }\n } else {\n $this->query_count_error++;\n $debug_backtrace = debug_backtrace();\n error_log(\"MySQL database error: \".$this->connection->error.\" for query \".$query.\" in \".$debug_backtrace[1][\"file\"].\" on line \".$debug_backtrace[1][\"line\"]);\n if ($this->debug) {\n echo \"Database error: \".$this->connection->error.\" for query <pre><code>\".$query.\"</code></pre> in \".$debug_backtrace[1][\"file\"].\" on line \".$debug_backtrace[1][\"line\"];\n exit();\n }\n return false;\n }\n }", "title": "" }, { "docid": "868bb3dea5b7912f7cb3efdd078cecd0", "score": "0.65600955", "text": "function execQuery($sql, $data)\r\n{\r\n global $conn;\r\n $fetcher = $conn->prepare($sql);\r\n $values = array_values($data);\r\n $types = str_repeat(\"s\", count($values));\r\n $fetcher->bind_param($types, ...$values);\r\n $fetcher->execute();\r\n return $fetcher;\r\n}", "title": "" }, { "docid": "c78ff4cafbb2641facb3d06ea0ad9416", "score": "0.6555576", "text": "function Prepare($query,$bindings,$conn){\n\t$stmt= $conn->prepare($query);\n\t$stmt->execute($bindings);\n\treturn $stmt;\n}", "title": "" }, { "docid": "75b9748bc6da11cd630e30da8b0faee5", "score": "0.65510374", "text": "public function query($sql);", "title": "" }, { "docid": "75b9748bc6da11cd630e30da8b0faee5", "score": "0.65510374", "text": "public function query($sql);", "title": "" }, { "docid": "75b9748bc6da11cd630e30da8b0faee5", "score": "0.65510374", "text": "public function query($sql);", "title": "" }, { "docid": "75b9748bc6da11cd630e30da8b0faee5", "score": "0.65510374", "text": "public function query($sql);", "title": "" }, { "docid": "75b9748bc6da11cd630e30da8b0faee5", "score": "0.65510374", "text": "public function query($sql);", "title": "" }, { "docid": "c1bc041dbb62748ddd8ac0acbc63a10b", "score": "0.6546913", "text": "abstract public function query($sql);", "title": "" }, { "docid": "c0542426d8c783b9f80e1a2beec285ca", "score": "0.6541616", "text": "public function prepare()\n\t{\n\t\t$tmp1=\"\";\n\t\t$tmp3=\"\";\n\t\t$this->logger->info(\"Calling prepare function in Query\");\n\t\t$this->logger->debug(\"Your table is set to :\".$this->data[\"table\"]);\n\t\tif(isset($this->data[\"table\"]))\n\t\t{\n\t\t\tforeach($this->data as $key=>$val)\n\t\t\t{\n\t\t\t\t if(substr($key,0,5) == \"field\"){\n \t$dbfl=explode(\" \", $val);\n \t\n\t\t if(count($dbfl)==1)\n\t\t \t$tmp1.=\"`\".$val.\"`,\";\n\t\t else \n\t\t \t$tmp1.=\"`\".$dbfl[0].\"` `\".$dbfl[1].\"`,\";\n }\n\t\t\t}\n\n\t\t\tif(isset($tmp1))\n\t\t\t\t$tmp1=substr($tmp1,0,-1);\n\n\t\t\tif(isset($this->data[\"filter\"]))\n\t\t\t{\n\t\t\t\tforeach($this->data[\"filter\"] as $key=>$val)\n\t\t\t\t{\n\t\t\t\t\t$tmp3.=\"`\".$key.\"`='\".$val.\"' and \";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$tmp3=substr($tmp3,0,-4);\n\t\t\tif($this->data[\"filter\"]!=null)\n\t\t\t\t$this->sql=\"SELECT \".$tmp1.\" FROM `\".$this->data[\"table\"].\"` WHERE \".$tmp3;\n\t\t\telse\n\t\t\t\t$this->sql=\"SELECT \".$tmp1.\" FROM `\".$this->data[\"table\"].\"`\";\n\n\t\t\tif(isset($this->data[\"order\"]))\n\t\t\t{\n\t\t\t\t$this->sql=$this->sql.\" order by \".$this->data[\"order\"];\n\t\t\t}\n\n\t\t\tif(isset($this->data[\"group\"]))\n\t\t\t{\n\t\t\t\t$this->sql=$this->sql.\" group by \".$this->data[\"group\"];\n\t\t\t}\n\n\t\t\tif(isset($this->data[\"start\"]))\n\t\t\t{\n\t\t\t\t$this->sql=$this->sql.\" limit \".$this->data[\"start\"].\",\".$this->data[\"limit\"];\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(isset($this->data[\"limit\"]))\n\t\t\t\t{\n\t\t\t\t\t$this->sql=$this->sql.\" limit \".$this->data[\"limit\"];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->logger->info(\"End of Calling prepare function in Query\");\n\t}", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.65258974", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.65258974", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.65258974", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.65258974", "text": "public function query();", "title": "" }, { "docid": "7f12ccf836b59d783a51545df8021b79", "score": "0.651364", "text": "protected function sinple_query() {\n $this->abrir_conexion();\n $this->conn->query($this->query);\n $this->cerrar_conexion();\n }", "title": "" }, { "docid": "c7752f2e09fb7cb814213e1032611203", "score": "0.65087765", "text": "function runQuery($query) {\n\tglobal $conn;\n try {\n\t\t$q = $conn->prepare($query);\n\t\t$q->execute();\n\t\t$results = $q->fetchAll();\n\t\t$q->closeCursor();\n\t\treturn $results;\t\n\t} catch (PDOException $e) {\n\t\thttp_error(\"500 Internal Server Error\\n\\n\".\"There was a SQL error:\\n\\n\" . $e->getMessage());\n\t}\t \n}", "title": "" }, { "docid": "f283fe33e3b424c4e34e7cbdeb3eea51", "score": "0.649877", "text": "public function prepare( $query );", "title": "" }, { "docid": "9051688f6d2ad23d999bc7569256fa4e", "score": "0.6488579", "text": "protected function _query($sql){}", "title": "" }, { "docid": "93d956f069885ac536190a0f30f229bf", "score": "0.6469197", "text": "public function runQuery($query)\n {\n \t$this->_query = $query;\n \t$this->_stmt = $this->_conn->prepare($this->_query);\n \t$this->_stmt->execute();\n\t\t$this->_stmt->setFetchMode(PDO::FETCH_ASSOC);\n\t\t$this->error = $this->_stmt->errorInfo();\n\n\t\tif ($this->error[0] == 0 && !empty($this->error[2])) {\n\t\t\t$this->_res = $this->error[2];\n\t\t}else{\n\t\t\t$this->_res = $this->_stmt->fetchAll();\n\t\t}\n\t\t$this->reset();\n\t\treturn $this->_res;\n }", "title": "" }, { "docid": "9335968ab8dda36587a15ef2ee73a920", "score": "0.64683855", "text": "public function query($sql){\n $this->stmt = $this->pdo->prepare($sql);\n }", "title": "" }, { "docid": "b1fb4dd61eeb4a64e30ec81a54db2b19", "score": "0.64683366", "text": "function sqlQuery($query, $bindParams = null) {\n\t\t$stmt = mysqli_prepare($this->dbConnect, $query);\n\t\t\n\t\tif (is_array($bindParams) === true) {\n $params = array(''); // Create the empty 0 index\n foreach ($bindParams as $prop => $val) {\n $params[0] .= $this->_determineType($val);\n array_push($params, $bindParams[$prop]);\n }\n\n call_user_func_array(array($stmt, 'bind_param'), $this->refValues($params));\n\n }\n\t\t\n\t\tmysqli_stmt_execute($stmt) \n\t\t\t or $this->fatal_error(\"Query - \".$query, \n\t\t\t\t\t\t\t\t\t mysqli_errno($this->dbConnect), \n\t\t\t\t\t\t\t\t\t mysqli_error($this->dbConnect));\n\t\t$result = $stmt->get_result();\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "9be16194ed5f65dcb4ece1dd118eeef0", "score": "0.6468207", "text": "private function stmtPrepare(){\n\t\t$this->stmt = $this->dbConn->prepare($this->query);\n\t}", "title": "" }, { "docid": "1c994bec47ec72358dbad67c078608c3", "score": "0.6451537", "text": "function execute($params = array()){\n $result = false;\n if (!$this->posql->hasError()) {\n if (!empty($params) && is_array($params)) {\n $increment = 0;\n reset($params);\n if (key($params) === 0) {\n $increment++;\n }\n foreach ($params as $param => $value) {\n if (is_int($param)) {\n $param += $increment;\n }\n $this->bindValue($param, $value);\n }\n }\n if (!empty($this->queryString) && is_string($this->queryString)) {\n $args = array();\n $query = $this->queryString;\n $is_manip = $this->posql->isManip($query);\n if (!empty($this->bindParams) && is_array($this->bindParams)) {\n $identifier = ' %a ';\n $index = 1;\n $tokens = $this->posql->splitSyntax($query);\n foreach ($tokens as $i => $token) {\n $j = $i + 1;\n $next = $this->posql->getValue($tokens, $j);\n switch ($token) {\n case '?':\n if (array_key_exists($index, $this->bindParams)) {\n $args[] = $this->bindParams[$index++];\n $tokens[$i] = $identifier;\n }\n break;\n case ':':\n if ($next != null\n && array_key_exists($next, $this->bindParams)) {\n $args[] = $this->bindParams[$next];\n $tokens[$i] = '';\n $tokens[$j] = $identifier;\n }\n break;\n case '%':\n $tokens[$i] = '%%';\n break;\n default:\n break;\n }\n }\n $query = $this->posql->joinWords($tokens);\n }\n $rows = array();\n $this->posql->_fromStatement = true;\n if (empty($args)) {\n if ($is_manip) {\n $rows = $this->posql->exec($query);\n } else {\n $rows = $this->posql->query($query);\n }\n } else {\n array_unshift($args, $query);\n $rows = call_user_func_array(array(&$this->posql,\n 'queryf'), $args);\n }\n $this->posql->_fromStatement = null;\n $this->_setResultRows($rows);\n if (!$this->posql->hasError()) {\n $result = true;\n }\n }\n }\n return $result;\n }", "title": "" }, { "docid": "8970b3260168c57d63f48dd6d9d2fbbd", "score": "0.6438509", "text": "public static function query();", "title": "" }, { "docid": "5d21f18b3ecd5b7e84445f203883295d", "score": "0.6433154", "text": "function runQuery(string $sql, array $params)\n {\n $this->__construct();\n\n $trace = $this->connect->prepare($sql);\n // checks if prepare function didnt return a boolean false\n if ($trace != false) {\n if ($trace->execute($params)) {\n $this->results = $trace;\n return true;\n } else {\n $this->Errors = $trace->errorInfo();\n return false;\n };\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "282fdca821f508b644f5b3032e5e55d7", "score": "0.6419187", "text": "public function query( $sql, $context );", "title": "" }, { "docid": "c888febac970f51354386467eb2f4518", "score": "0.64183265", "text": "public static function runQuery($sql, $params = null) {\n try {\n if ($params == null) {\n $stmt = self::$_db->query($sql);\n }\n else {\n $stmt = self::$_db->prepare($sql);\n foreach ($params as $key => &$value) {\n $stmt->bindParam(\":\".$key, $value);\n }\n $stmt->execute();\n }\n return $stmt;\n }\n catch (Exception $e) {\n print \"Erreur : \" . $e->getMessage() . \"<br />\";\n die();\n }\n }", "title": "" }, { "docid": "bf87ad1403cf6023f5d8c5c2dbafccf6", "score": "0.6415969", "text": "public function query($sql, $bind = array())\n\t{\n\t\tif(is_string($sql))\n\t\t{\n\t\t\tlist($sql,$bind)=_mysql2sqlite_convert($sql,$bind);\n\t\t}\n\n\t\tif(_mysql2sqlite_semaphore_acquire())\n\t\t{\n\t\t\t$timeout=10000000;\n\t\t\twhile(1) {\n\t\t\t\ttry {\n\t\t\t\t\tif(is_array($sql)) {\n\t\t\t\t\t\tforeach($sql as $query) $stmt=$this->_connection->query($query);\n\t\t\t\t\t} elseif(isset($this->cachePreparedStatement[$sql])) {\n\t\t\t\t\t\t$stmt = $this->cachePreparedStatement[$sql];\n\t\t\t\t\t\t$stmt->execute($bind);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$stmt=$this->_connection->prepare($sql);\n\t\t\t\t\t\t$this->cachePreparedStatement[$sql] = $stmt;\n\t\t\t\t\t\t$stmt->execute($bind);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (PDOException $e) {\n\t\t\t\t\tif($timeout<=0) {\n\t\t\t\t\t\t_mysql2sqlite_log(\"throw: \".$e->getMessage());\n\t\t\t\t\t\tthrow new Exception($e->getMessage());\n\t\t\t\t\t} elseif($this->isErrNo($e,5)) {\n\t\t\t\t\t\t$timeout-=_mysql2sqlite_usleep(rand(0,1000));\n\t\t\t\t\t} elseif($this->isErrNo($e,17)) {\n\t\t\t\t\t\tunset($this->cachePreparedStatement[$sql]);\n\t\t\t\t\t\t$timeout-=_mysql2sqlite_usleep(rand(0,1000));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_mysql2sqlite_log(\"throw: \".$e->getMessage());\n\t\t\t\t\t\tthrow new Exception($e->getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t_mysql2sqlite_semaphore_release();\n\t\t\treturn $stmt;\n\t\t}\n\t\tthrow new Exception(\"Can not acquire semaphore\");\n\t}", "title": "" }, { "docid": "b2190b010bb6b796d23274a3dde668f8", "score": "0.64147806", "text": "protected function prepareSelectStatement() {}", "title": "" }, { "docid": "acac3ea534937e5063a0783db84e2d1f", "score": "0.6405832", "text": "public function query($query){\n\t\t\t$this->query = $query;\n\t\t\t$this->rs = $this->DB->Execute($this->query);\n\t\t\tif ($this->DB->ErrorMsg())\n\t\t\t\t$this->error(\"Valio mae\".$this->DB->ErrorMsg());\n\n\t\t}", "title": "" }, { "docid": "3a9f73756df1b71dcac630c02b0da82a", "score": "0.63996345", "text": "function sql($db, $q, $params = [], $return = null) {\n\n// Prepare statement\n $stmt = $db->prepare($q);\n \n // Execute statement\n $res = $stmt->execute($params);\n // Decide whether to return the rows themselves, or query status\n if ($return == \"rows\") {\n return $stmt->fetchAll();\n }\n else {\n return $res;\n }\n}", "title": "" }, { "docid": "ed0a606ebdd50bb0d0a2708ddc923716", "score": "0.6398129", "text": "abstract function executeQuery($cons);", "title": "" }, { "docid": "a4c8e5161c7a65ac585a4649429e0bd4", "score": "0.63750017", "text": "private function executeStmt($sql,$params){\n\t\t//on prepare le statement a executer avec la connexion courante et le sql passe en parametre a la fonction\n\t\ttry{\n\t\t\t//on recupere la connexion et on initialise une requete preparee avec la chaine sql\n\t\t\t$stmt = $this->getLink()->prepare($sql);\n\t\t\t//on execute la requete preparee en passant le tableau parametre/valeurs \n\t\t\t$stmt->execute($params);\n\t\t\t//on parcours le resultat pour avoir le resultat dans un tableau associatif\n\t\t\t$resultat = $stmt->fetchAll();\n\t\t\t//on detruit la requete preparee\n\t\t\t$stmt->closeCursor();\n\t\t\treturn $resultat;\n\t\t} catch(PDOException $e){\n\t\t\t//enlever cela en production\n echo 'Erreur requete:';\n } \n\t}", "title": "" }, { "docid": "e8a3dc7e411fda533946bfb15df82c72", "score": "0.63716245", "text": "function runQuery($query) {\n global $conn;\n try {\n $q = $conn->prepare($query);\n $q->execute();\n $results = $q->fetchAll();\n $q->closeCursor();\n return $results;\n } catch (PDOException $e) {\n http_error(\"500 Internal Server Error\\n\\n\".\"There was a SQL error:\\n\\n\" . $e->getMessage());\n }\n }", "title": "" }, { "docid": "642eec225e1a7d55857e5dd4857fb948", "score": "0.6364274", "text": "function runQuery($pdo, $sql, $parameters=array()) {\n $statement = $pdo->prepare($sql); //Prepared statement is used to protect against SQL injection attacks as disscussed in class.\n if (sizeof($parameters) != 0) {\n $statement->bindValue(1, $parameters[0]);\n }\n $statement->execute();\n return $statement;\n}", "title": "" }, { "docid": "37e7717c6d30650a26951efc8fc3d788", "score": "0.63498896", "text": "public function query($sql)\n\t{\n\t}", "title": "" }, { "docid": "196f583f8210882484df37164688618f", "score": "0.63418114", "text": "public function getQuery($query) {\r\n $result = $this->_conn->prepare($query);\r\n $ret_result = $result->execute();\r\n if (!$ret_result) {\r\n echo 'PDO::errorInfo():';\r\n echo '<br />';\r\n echo 'error SQL review your query: '.$query;\r\n die();\r\n } \r\n $result->setFetchMode(PDO::FETCH_ASSOC);\r\n $results = $result->fetchAll();\r\n return $results;\r\n }", "title": "" }, { "docid": "0f14b3ed85bbee7a7840c4fa4c3095a4", "score": "0.63274384", "text": "public function query($query) {\n $this->stmt = $this->dbh->prepare($query);\n }", "title": "" }, { "docid": "2b2bdebbf8112f6d1675fc10de193cfa", "score": "0.63098156", "text": "protected function query($query) {\n\t\tif ($this->adsfoiuwer())\n\t\t\t$this->weroisdfo();\n\t\t\n\t\tif ($this->adsfoiuwer()) {\n\t\t\techo '{ \"error\" : \"null - boo.\" }';\n\t\t\texit;\n\t\t}\n\t\t\n\t\t$this->query = $query;\n\t\t$this->stmt = $this->dbh->prepare($query);\n\t}", "title": "" }, { "docid": "bdd8d9f794570afb84eff21a843b0368", "score": "0.6291349", "text": "public function query($statement);", "title": "" }, { "docid": "1bb80b3174a4271702d169de82b0c819", "score": "0.6290021", "text": "public function execute(){\n\t\t\t$desarrollo = unserialize (DEVELOPMENT);\n\t\t\ttry{\n\t\t\t\t//querys\n\t\t\t\tif($desarrollo['enabled'] && $desarrollo['query_params']){\n\t\t\t\t\tshow_query_params($this->bindParams);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//reinicio los parametros de la query\n\t\t\t\t$this->bindParams = array();\n\t\t\t\treturn $this->stmt->execute();\n\t\t\t}catch(PDOException $e){// Catch any errors\n\t die($e->getMessage());\n\t }\n\t\t}", "title": "" }, { "docid": "595e88e95849e156efbb79b7d65fd848", "score": "0.62881476", "text": "protected function query($prepareSql) {\n\t\t$args = func_get_args();\n\t\t$args[0] = $this->fixQueryNameQuotes($args[0]);\n\t\treturn call_user_func_array(array($this->db, 'query'), $args);\n\t}", "title": "" }, { "docid": "58cf178af54cabf4b0b21179438310a1", "score": "0.6287724", "text": "abstract protected function prepare($query, array $params = NULL);", "title": "" }, { "docid": "c45e3f74927fb0fac76379cf57edf8b7", "score": "0.62864053", "text": "abstract public function prepare($sql);", "title": "" }, { "docid": "c45e3f74927fb0fac76379cf57edf8b7", "score": "0.62864053", "text": "abstract public function prepare($sql);", "title": "" }, { "docid": "6cd3c984af1b446fd9cb76e0963e14a3", "score": "0.6277602", "text": "public function query($q, $params = []) {\n\t\t$Timer = (new Timer('mysql:query'))\n\t\t\t->addData(['sql' => $q, 'type' => 'stmt', 'params' => $params])\n\t\t\t->start();\n\n\t\tLog::v(self::TAG, 'query_stmt: [' . ((string)$q) . '] values [' . json_encode($params) . ']');\n\n\t\t//support pdo-like :name expressions in sql\n\t\tif (preg_match_all('#:(([a-z]+)[\\d_a-z]*)#i', $q, $matches)) {\n\t\t\t//sort params array to match replaced sql\n\t\t\t$p = [];\n\t\t\tforeach ($matches[1] as $key) {\n\t\t\t\tif (!array_key_exists($key, $params)) {\n\t\t\t\t\t$Timer->stopWithFail();\n\t\t\t\t\tthrow new DBException('value for \":' . $key . '\" not found');\n\t\t\t\t}\n\t\t\t\tif (is_array($params[$key])) {//to make statements LIKE (:name) work we need to replace :name to number of ? equal to number of values\n\t\t\t\t\t$p = array_merge($p, $params[$key]);\n\t\t\t\t\t$q = preg_replace(\"#:{$key}([^a-z\\d])#\", implode(', ', array_fill(0, count($params[$key]), '?')) . '\\1', $q);\n\t\t\t\t} else {\n\t\t\t\t\t$p[] = $params[$key];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$params = $p;\n\n\t\t\t//replace :name to ? in sql\n\t\t\t$q = preg_replace('#(:([a-z]+)[\\d_a-z]*)#i', '?', $q);\n\t\t}\n\n\t\t$params_types = '';\n\t\tarray_walk($params, function ($val) use (&$params_types) {\n\t\t\tif (is_string($val)) {\n\t\t\t\t$params_types .= 's';\n\t\t\t} elseif (is_int($val)) {\n\t\t\t\t$params_types .= 'i';\n\t\t\t} elseif (is_double($val) || is_float($val)) {\n\t\t\t\t$params_types .= 'd';\n\t\t\t} else {\n\t\t\t\t//@todo: throw exception, invalid param. What abt boolean?\n\t\t\t\t$params_types .= 'b'; //blob\n\t\t\t}\n\t\t});\n\n\t\ttry {\n\t\t\t$stmt = $this->createStatement((string)$q);\n\t\t\tif (!empty($params)) {\n\t\t\t\t$refValues = function ($arr) { //Reference is required for PHP 5.3+\n\t\t\t\t\t$refs = [];\n\t\t\t\t\tforeach ($arr as $key => $value)\n\t\t\t\t\t\t$refs[$key] = &$arr[$key];\n\t\t\t\t\treturn $refs;\n\t\t\t\t};\n\t\t\t\tcall_user_func_array([$stmt, 'bind_param'], $refValues(array_merge([$params_types], $params)));\n\t\t\t\tif ($stmt->errno) {\n\t\t\t\t\tthrow new mysqli_sql_exception($stmt->error, $stmt->errno);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$stmt->execute();\n\t\t\t//$stmt->store_result(); //буферизирием все кортежи\n\n\t\t\t$result = $stmt->get_result();\n\t\t\tif ($result instanceof \\mysqli_result) {\n\t\t\t\t// SELECT QUERIES\n\t\t\t\t$result = new MySQLDBResult($result, $stmt->insert_id);\n\t\t\t\tLog::v(self::TAG, 'result: success. rows: ' . $result->getRowsCount());\n\t\t\t} else {\n\t\t\t\t// INSERT, UPDATE, or DELETE QUERIES\n\t\t\t\t$result = new RawDBResult($result, $stmt->insert_id, $stmt->affected_rows);\n\t\t\t\tLog::v(self::TAG, 'result: success. rows: ' . $stmt->affected_rows) ;\n\t\t\t}\n\n\t\t\t$Timer->stopWithSuccess();\n\t\t\treturn $result;\n\t\t} catch (mysqli_sql_exception $e) {\n\t\t\tLog::v(self::TAG, 'result: error ' . $e->getMessage() .', code: '.$e->getCode());\n\n\t\t\t$Timer->stopWithFail();\n\t\t\tthrow (new DBException($e->getMessage(), DBException::CODE_QUERY_ERROR, $e))\n\t\t\t\t->setDBCode($e->getCode())->setSql($q)->setSqlParams($params);\n\t\t}\n\t}", "title": "" }, { "docid": "0f7020ff0b053d20e82e10b506332e0f", "score": "0.6274901", "text": "function executeQuery($conn, $cause, $location) {\n\t\t$stmt = $conn->prepare(\"SELECT * FROM DEATHS \n\t\t\t\t\t\t\t\tWHERE cause LIKE :cause AND location LIKE :location\");\n\t\t$stmt->bindParam(':cause', $cause);\n\t\t$stmt->bindParam(':location', $location);\n\t\t$stmt->execute();\n\t\t$result = $stmt->fetchAll();\n\t\treturn $result; // returns the row as array\n\t}", "title": "" }, { "docid": "5eefcfd02ca8ae48e4fb41777ee9c8f0", "score": "0.62664366", "text": "private function _execute()\r\n {\r\n //echo $this->_query;\r\n if (!($res = $this->_conn->query($this->_query))) {\r\n trigger_error(\r\n \"Error: (\".$this->_conn->errno.\")\"\r\n .$this->_conn->erroron.\" the query:\".$this->_query,\r\n E_USER_WARNING\r\n );\r\n }\r\n return $res;\r\n }", "title": "" }, { "docid": "dd739b891b49bf0738f8c5600307fa50", "score": "0.62621284", "text": "function query() {\n\tglobal $request_no_row_data;\n\n\tif (! dbConnect()) {\n\t\theader(\"HTTP/1.0 400 Bad Request\");\n\t\texit;\n\t}\n\n\t$sql = sql();\n\techo \"DEBUG: SQL: \" . $sql . \"\\n\";\n\techo \"VERSION: \" . VERSION . \"\\n\";\n\t$result = mysql_query($sql);\n\tif (! $result) {\n\t\techo \"ERROR: \" . mysql_error() . \"\\n\";\n\t\texit;\n\t}\n\n\tsendHeadings($result);\n\tif (!empty($request_no_row_data) && $request_no_row_data == \"yes\") {\n\t\t// data not needed\n\t\treturn;\n\t}\n\twhile ($row = mysql_fetch_row($result)) {\n\t\tsendData($row);\n\t}\n}", "title": "" }, { "docid": "22534b748a9d6bf5480ae237af5c8224", "score": "0.6256097", "text": "public abstract function prepareQuery($query);", "title": "" }, { "docid": "7fb65887438fc935d0a7be002ac0925c", "score": "0.6252016", "text": "function runQuery($query){\n\t\tglobal $conn;\n\t\treturn $conn->query($query);\n\t}", "title": "" }, { "docid": "475fc144c6deda06cc19b319fddf1a75", "score": "0.6245206", "text": "public function query($sqlStatement);", "title": "" }, { "docid": "b3f2ca7fd72e6eb223a4d0ecea74741b", "score": "0.6243972", "text": "function prepare($statement){}", "title": "" }, { "docid": "ba80fedacbf3effcbb5915b4a8eafa16", "score": "0.6235031", "text": "protected function query ( $sql )\n\t{\n\t\t$sql = $this->sql_printf(func_get_args());\n\t\ttry\n\t\t{\n\t\t\t$this->lastaffectedrows = $this->conn->exec($sql);\n\t\t\tif ($this->lastaffectedrows === FALSE) {\n\t\t\t\t$this->sql_errcheck($sql);\n\t\t\t}\n\t\t}\n\t\tcatch (PDOException $e) \n\t\t{\n\t\t\t$this->sql_errcheck($sql);\n\t\t}\n\t}", "title": "" }, { "docid": "706f31142e04172e62da4b9d6a94a41d", "score": "0.6226731", "text": "function db_query($sql, $parameterBinding = '', $parameters = array())\n{\n global $CONNECTION;\n\n if (strlen($parameterBinding) != count($parameters)) {\n return false;\n }\n\n if ($parameterBinding == '') {\n $statement = $CONNECTION->prepare($sql);\n $statement->execute();\n\n return $statement;\n }\n\n $parametersRefs = array();\n foreach ($parameters as $key => $value) {\n $parametersRefs[$key] = &$parameters[$key];\n }\n\n $statement = $CONNECTION->prepare($sql);\n if (!$statement) {\n return false;\n }\n call_user_func_array(array($statement, 'bind_param'), array_merge(array($parameterBinding), $parametersRefs));\n $statement->execute();\n\n return $statement;\n}", "title": "" }, { "docid": "dd07901aff86308f33e2cd9f7fe09b1f", "score": "0.62238616", "text": "function query_db($query, $params)\n {\n global $config;\n $errorMsg = \"\";\n $conn = new mysqli($config['servername'], $config['username'], $config['password'], $config['dbname']);\n\n // Check connection\n if ($conn->connect_error)\n {\n $errorMsg = \"Connection failed: \" . $conn->connect_error;\n $conn->close(); \n return array(1, null, $errorMsg);\n }\n\n // Prepare the statement:\n $stmt = $conn->prepare($query);\n \n if ($params != null)\n {\n // Construct the types string argument for bind_param()\n $types_str = \"\";\n foreach ($params as $item)\n {\n if (is_integer($item)) \n {\n $type = \"i\"; \n }\n else if (is_double($item))\n { \n $type = \"d\"; \n }\n else if (is_string($item)) \n {\n $type = \"s\"; \n }\n else \n {\n $errorMsg = \"Binding failed: Invalid parameter type.\";\n return array(3, null, $errorMsg);\n }\n $types_str .= $type;\n }\n // Unpack $params array and bind individual parameters\n $stmt->bind_param($types_str, ...$params);\n }\n\n // Execute the query statement: \n if (!$stmt->execute())\n {\n $errorMsg = \"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\n $stmt->close();\n return array(2, null, $errorMsg);\n }\n else\n {\n $result = $stmt->get_result();\n\n $stmt->close();\n $conn->close(); \n\n return array(0, $result, null);\n }\n }", "title": "" }, { "docid": "453021003eadcf8165db0d164ac234f8", "score": "0.6216527", "text": "function database_execute_query_and_fetch($query, $params=array()) {\n global $conn;\n // Open database connection\n database_open_connection();\n\n // Execute database query\n try {\n $sql_query = $conn -> prepare($query);\n for ($i = 1; $i <= count($params); $i++) {\n $sql_query -> bindValue($i, $params[$i-1][0], $params[$i-1][1]);\n }\n $sql_query -> execute();\n } catch(PDOException $e) {\n echo \"Connection failed: \" . $e->getMessage();\n die();\n }\n $data = $sql_query -> fetchAll();\n $query_num_rows = count($data);\n\n // Manipulate returned data\n if ($query_num_rows == 0) {\n $result = null;\n } else if ($query_num_rows == 1) {\n $result = $data[0];\n } else {\n $result = $data;\n }\n\n // Close database connection\n database_close_connection();\n return $result;\n}", "title": "" }, { "docid": "6f5ea6942295a70b48400bc29074e7be", "score": "0.62122124", "text": "public function query($sql = null);", "title": "" }, { "docid": "9a1feb544d4bd63de68bb086c6d1839f", "score": "0.62085384", "text": "function database_execute_query($query, $params=array()) {\n global $conn;\n // Open database connection\n database_open_connection();\n\n // Execute database query\n try {\n $sql_query = $conn -> prepare($query);\n for ($i = 1; $i <= count($params); $i++) {\n $sql_query -> bindValue($i, $params[$i-1][0], $params[$i-1][1]);\n }\n $sql_query -> execute();\n } catch(PDOException $e) {\n echo \"Connection failed: \" . $e->getMessage();\n die();\n }\n // Save the number of rows affected\n $result = $sql_query -> rowCount();\n // Close database connection\n database_close_connection();\n return $result;\n}", "title": "" }, { "docid": "c0648782e8cc3dce3838d04802397fd2", "score": "0.6206835", "text": "function query($sql) {\n // preg_replace non [\\s\\d] with % ? seems good enough to allow only alphanumerics\n // apply mysql_real_escape_string($sql) on conditions values ?\n // Connects to database\n $m = $this->parse($this->dsn);\n $db = @mysql_connect($m['host'], $m['user'], $m['passwd']);\n if (!$db) throw new Exception(\"Failed to connect to database server\"); //header(\"HTTP/1.0 500 Internal Server Error\");\n @mysql_select_db($m['db']);\n // Executes query\n $qr = mysql_query($sql);\n mysql_close();\n if (!$qr) throw new Exception(\"Invalid query: {$sql} ###\" . mysql_error($db));\n // Creates an array of results\n if (is_resource($qr)) {\n $result = array();\n while ($row = mysql_fetch_assoc($qr)) {\n $result[] = $row;\n }\n } else {\n $result = array(\n insertid => mysql_insert_id($db),\n affectedrows => mysql_affected_rows($db),\n raw => $qr\n );\n }\n // Debug information\n if (isset($_REQUEST['debug'])) Util::debug(\n 'DbController debug',\n 'Query:', $sql,\n 'Result:', $result);\n return $result;\n }", "title": "" }, { "docid": "7c6d83f11493fe1192a9939d0e3372eb", "score": "0.62041014", "text": "public function query($sql)\n {\n }", "title": "" }, { "docid": "96eb64e105692cd3f773382473d16e6d", "score": "0.6198247", "text": "function perform_sql_query($query, $parameters){\n\t\t// Get the sql connector object\n\t\t$pdo = get_sql_connector();\n\n\t\ttry {\n\t\t\t// prepare the query\n\t\t\t$result = $pdo->prepare($query);\n\n\t\t\t// check if the parameters is not null\n\t\t\tif(!is_null($parameters)){\n\t\t\t\t// Loop over each parameter and bind to query\n\t\t\t\twhile($value = current($parameters)){\n\t\t\t\t\t$result->bindValue(':'.key($parameters), $value);\n\t\t\t\t\tnext($parameters);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Execute the query\n\t\t\t$result->execute();\n\n\t\t\t// Return the result\n\t\t\treturn $result;\n\t\t} catch (PDOException $e) {\n\t\t\t// Set a useful error message\n\t\t\t//$_SESSION['errorMessage'] = $result->queryString.\"<br><br>\".json_encode($parameters).\"<br><br>\".$e->getMessage();\n\t\t\t$_SESSION['errorMessage'] = $e->getMessage();\n\n\t\t\t// Redirect to error page\n\t\t\theader(\"Location: \".get_base_url().\"/error.php\");\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "9cada429ba632b0cc89c75d29eab9236", "score": "0.6197186", "text": "public function execute()\n\t{\n\t\t//A FROM string must be set, either here or from an earlier function call\n\t\tif(!isset($this->from_string))\n\t\t\tthrow new Exception(\"From string not set\");\n\n\t\t$sql = $this->construct_sql();\n\n\t\t$query = $this->db->prepare($sql);\n\t\t$query->execute($this->value_array);\n\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "2ae6e8766c627756d7523864a3f3f606", "score": "0.6183674", "text": "function queryPreparedPdoOld(PDOStatement $stringPrepared, $arrayElementi = null, $chrTipoRitorno = 'p')\n{\n if (!is_null($arrayElementi) and !is_array($arrayElementi)) {\n $arrayElementi = array($arrayElementi);\n }\n //echo $stringPrepared->queryString,'<br/>';\n $stringPrepared->execute($arrayElementi);\n switch (strtolower($chrTipoRitorno)) {\n case 'p':\n return $stringPrepared;\n case 'b':\n $ritorno = $stringPrepared->fetchAll(PDO::FETCH_ASSOC);\n break;\n case 'f':\n $ritorno = $stringPrepared->fetch(PDO::FETCH_ASSOC);\n break;\n case 'v':\n $ritorno = $stringPrepared->fetchColumn();\n break;\n }\n $stringPrepared->closeCursor();\n\n return $ritorno;\n}", "title": "" }, { "docid": "96e89627504589e7f9e1060f4dea86e6", "score": "0.6179814", "text": "function getPreparedStatement();", "title": "" }, { "docid": "d6ddde370c4e90e90c90b67645af46c2", "score": "0.61721814", "text": "public function Query($query)\n\t{\n\t\t$this->statement = $this->dbh->prepare($query);\n\t}", "title": "" }, { "docid": "7f9fb038e0ed1620ab434ab4b0e63eba", "score": "0.6156197", "text": "public function query (string $query, array $params = array()) {\r\n if($this->queryLog) {\r\n app::getLog($this->queryLog)->debug($query);\r\n }\r\n\r\n // NOTE: disabled firing hooks for now.\r\n // app::getHook()->fire(\\codename\\core\\hook::EVENT_DATABASE_QUERY_QUERY_BEFORE, array('query' => $query, 'params' => $params));\r\n\r\n $this->statement = null;\r\n foreach($this->statements as $statement) {\r\n if($statement->queryString == $query) {\r\n $this->statement = $statement;\r\n\r\n // DEBUG Statement preparation performance\r\n // $this->statementReusageCount++;\r\n // $this->statementUsageStatistics[$query]++;\r\n break;\r\n }\r\n }\r\n if($this->statement === null) {\r\n $this->statement = $this->connection->prepare($query);\r\n\r\n // DEBUG Statement preparation performance\r\n // $this->statementPreparedCount++;\r\n\r\n //\r\n // Clear cached prepared PDO statements, if there're more than N of them\r\n //\r\n if($this->statementsCount > $this->maximumCachedStatements) {\r\n if($this->maximumCachedOptimizedStatements) {\r\n uasort($this->statements, function(extendedPdoStatement $a, extendedPdoStatement $b) {\r\n return $a->getExecutionCount() <=> $b->getExecutionCount();\r\n });\r\n $this->statements = array_slice($this->statements, 0, $this->maximumCachedOptimizedStatements);\r\n $this->statementsCount = count($this->statements);\r\n } else {\r\n $this->statements = [];\r\n $this->statementsCount = 0;\r\n }\r\n\r\n // DEBUG Statement preparation performance\r\n // $this->statementsClearCount++;\r\n }\r\n\r\n $this->statements[] = $this->statement;\r\n $this->statementsCount++;\r\n }\r\n\r\n foreach($params as $key => $param) {\r\n // use parameters set in getParametrizedValue\r\n // 0 => value, 1 => \\PDO::PARAM_...\r\n $this->statement->bindValue($key, $param[0], $param[1]);\r\n }\r\n\r\n $res = $this->statement->execute();\r\n\r\n // explicitly check for falseness identity, not only == (equality), which may evaluate a 0 to a false.\r\n if ($res === false) {\r\n throw new \\codename\\core\\exception(self::EXCEPTION_QUERY_QUERYERROR, \\codename\\core\\exception::$ERRORLEVEL_FATAL, array('errors' => $this->statement->errorInfo(), 'query' => $query, 'params' => $params));\r\n }\r\n\r\n // NOTE: disabled firing hooks for now.\r\n // app::getHook()->fire(\\codename\\core\\hook::EVENT_DATABASE_QUERY_QUERY_AFTER);\r\n // NOTE: disabled calling notify() (observer)\r\n // $this->notify();\r\n return;\r\n }", "title": "" }, { "docid": "367df72a63294c5f850b25a5196656f5", "score": "0.61541617", "text": "protected function ExecuteSQL()\n {\n try {\n // GET Query variables\n $query = $this->db->prepare($this->sql);\n if (!$query){\n return $this->EQ($this->db->errorInfo()[2]);\n };\n if (!$query->execute()){\n return $this->EQ($query->errorInfo()[2]);\n };\n // Here Query executed successfully => get results\n if ($this->fetch_mode === self::FETCH_ALL) {\n $this->sql_result = $query->fetchAll(PDO::FETCH_ASSOC);\n }\n else if ($this->fetch_mode === self::FETCH_ONE) {\n $this->sql_result = $query->fetch(PDO::FETCH_ASSOC);\n }\n else if ($this->fetch_mode === self::INSERT){\n // Get count of affected rows as sql_result\n $this->sql_result = Array(\n \"row_count\"=> $query->rowCount()\n );\n }\n else if ($this->fetch_mode === self::DELETE){\n // Get count of affected rows as sql_result\n $this->sql_result = Array(\n \"row_count\"=> $query->rowCount()\n );\n }\n } catch (PDOException $e) {\n $this->EQ($e->getMessage() );\n }\n }", "title": "" }, { "docid": "760462cb36c91e87ee7ced065dda0298", "score": "0.6148395", "text": "public function execute(PreparedRequestInterface $request)\n {\n\t\t$driver = $this->getDriver();\n\t\t$stmt = new Stmt($driver->stmt_init());\n\t \n\t\tif (! $stmt->prepare($request->getSql())) {\n return $this->createResponse($stmt->getError());\n }\n\n /* normalize and bind parameters */\n if ($request->isValues()) {\n if (! $stmt->organizeParams($request->getValues())) {\n return $this->createResponse($stmt->getError());\n }\n }\n\n if (! $stmt->execute()) {\n return $this->createResponse($stmt->getError());\n }\n\n $isOrganized = $stmt->organizeResults();\n if (! $stmt->organizeResults()) {\n return $this->createResponse($stmt->getError());\n }\n\n /* database executed the query successfully and \n * no results are needed\n */\n if ($isOrganized && ! $stmt->isResultset()) {\n return $this->createResponse();\n }\n\n $stmt->storeResults();\n\n $data = $stmt->fetch($request->getCallback());\n\t\treturn $this->createResponse($data);;\n }", "title": "" }, { "docid": "996383431b6dd43d198dd67359b626bc", "score": "0.61442614", "text": "function executeSelectStatement($db, $query, $parameters) {\n $stmt = $db->prepare($query);\n $stmt->execute($parameters);\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "4ebbc19f43615182419996da344289df", "score": "0.61411065", "text": "static function query($sql, $data = []) {\n $q = self::takeDB()->prepare($sql); \n $q->execute($data);\n return $q;\n // return self::takeDB()->prepare($sql)->execute($data);\n }", "title": "" }, { "docid": "c61426f8f1891a5318c842256c88eadd", "score": "0.61388516", "text": "public function query()\n\t\t{\n\n\t\t\t$this->prep = $this->pdo->prepare($this->query);\n\n\t\t\tif($this->prep){\n\t\t\t\t$this->prep->execute();\n\n\t\t\t\treturn $this->prep->fetchall(PDO::FETCH_ASSOC);\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "a3466c6a9c6c8e60c72f02a4ab82125c", "score": "0.6136341", "text": "function select($db,$fild,$table_name,$champ,$data)\r\n\t{\r\n\t\t$req=$db->prepare('SELECT '.$fild.' FROM '.$table_name.' WHERE '.$champ.' = ? ');\r\n\t\t$req->execute(array($data));\r\n\t\t$result =$req->fetchAll();\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "981955d1e459c6060937d225acc52dd1", "score": "0.6134298", "text": "private function _query($sql, $params = array())\n {\n if($this->_pdoObject == null) {\n $this->_connect();\n }\n\n $statement = $this->_pdoObject->prepare($sql, $this->_driverOptions);\n\n if (! $statement) {\n $errorInfo = $this->_pdoObject->errorInfo();\n error_log($this->interpolateQuery($sql, $params));\n throw new PDOException(\"Database error [{$errorInfo[0]}]: {$errorInfo[2]}, driver error code is $errorInfo[1]\");\n }\n\n $paramsConverted = (is_array($params) ? ($params) : (array ($params )));\n\n if ((! $statement->execute($paramsConverted)) || ($statement->errorCode() != '00000')) {\n $errorInfo = $statement->errorInfo();\n error_log($this->interpolateQuery($sql, $params));\n throw new PDOException(\"Database error [{$errorInfo[0]}]: {$errorInfo[2]}, driver error code is $errorInfo[1]\");\n }\n\n return $statement;\n }", "title": "" }, { "docid": "1375819ba3f021b4e723275be1750972", "score": "0.613132", "text": "function runQuery($sql){\n try{\n $this->stmt = $this->conn->prepare($sql);\n echo $this->stmt->execute();\n return true;\n }catch(PDOException $e){\n error_log(Date(\"M d, Y h:i:s a\").':(Run query dm):'.$e->getMessage(), 3, ERROR_PATH. 'error.log');\n return false;\n }\n }", "title": "" }, { "docid": "b44b5707b8a9a22ad8ba232d34dd4d66", "score": "0.6126972", "text": "public function fetch($sql, $parameters = []);", "title": "" }, { "docid": "bfa7b4812cc2c8d0096d459962dc6ca1", "score": "0.6124818", "text": "function prepare($query){\n $result = new Posql_Statement($this, null, $query);\n return $result;\n }", "title": "" }, { "docid": "bfa7b4812cc2c8d0096d459962dc6ca1", "score": "0.6124818", "text": "function prepare($query){\n $result = new Posql_Statement($this, null, $query);\n return $result;\n }", "title": "" }, { "docid": "a0ce40918852398ca6082c07fbbb546f", "score": "0.6115291", "text": "public function query($query,$params = null, $fetchmode = PDO::FETCH_ASSOC)\r\n {\r\n $query = trim($query);\r\n $this->Init($query,$params);\r\n $rawSqlCommand = explode(\" \", preg_replace(\"/\\s+|\\t+|\\n+/\", \" \", $query));\r\n $sqlCommand = strtolower($rawSqlCommand[0]);\r\n if ($sqlCommand === 'select') {\r\n return $this->statement->fetchAll($fetchmode);\r\n }\r\n elseif ( $sqlCommand === 'insert' || $sqlCommand === 'update' || $sqlCommand === 'delete' ) {\r\n return $this->statement->rowCount();\r\n }\r\n else {\r\n return NULL;\r\n }\r\n }", "title": "" }, { "docid": "1d3f3cc4382f0e5a5a7ae92c9b3fd774", "score": "0.6115251", "text": "public function prepare_query($query) {\n\t\t//echo \"\\n<br>\".$query;\n\t\t$this->stmt = $this->db->connection->prepare($query);\n\t}", "title": "" }, { "docid": "4de29d5f183c64bbd7fb58f21991f678", "score": "0.611401", "text": "public function query($sql, $bind = array())\n {\n if (empty($bind) && $sql instanceof Select) {\n $bind = $sql->getBind();\n }\n\n if (is_array($bind)) {\n foreach ($bind as $name => $value) {\n if (!is_int($name) && !preg_match('/^:/', $name)) {\n $newName = \":$name\";\n unset($bind[$name]);\n $bind[$newName] = $value;\n }\n }\n }\n\n //try {省略throw-catch-rethrow块,直接抛出PDOException\n // connect to the database if needed\n\t $this->_connect();\n\t\n\t // is the $sql a Select object?\n\t if ($sql instanceof Select) {\n\t if (empty($bind)) {\n\t $bind = $sql->getBind();\n\t }\n\t\n\t $sql = $sql->assemble();\n\t }\n\t\n\t // make sure $bind to an array;\n\t // don't use (array) typecasting because\n\t // because $bind may be a Expr object\n\t if (!is_array($bind)) {\n\t $bind = array($bind);\n\t }\n\t \n\t //将结果缓冲当中的结果集读出来\n\t Statement::flush();\n\t\n\t // prepare and execute the statement with profiling\n\t $stmt = $this->prepare($sql);\n\t \n\t // 由于取消了Statement,因此将Profiler的控制代码移动到这里\n\t // 由于所处的程序位置,省略了$qp->start(),简化了$qp->bindParams()的相关代码\n\t \tif ($this->_profiler === false) {\n\t $stmt->execute($bind);\n\t }\n\t else{\n\t \t$q = $this->_profiler->queryStart($sql);\n\t \t\n\t\t $qp = $this->_profiler->getQueryProfile($q);\n\t\t if ($qp->hasEnded()) {\n\t\t $q = $this->_profiler->queryClone($qp);\n\t\t $qp = $this->_profiler->getQueryProfile($q);\n\t\t }\n\t\t $qp->bindParams($bind);\n\t\t\n\t\t $stmt->execute($bind);\n\t\t\n\t\t $this->_profiler->queryEnd($q);\n\t }\n\t \n\t // return the results embedded in the prepared statement object\n\t $stmt->setFetchMode($this->_fetchMode);\n\t return $stmt;\n //} catch (PDOException $e) {\n /**\n * @see StatementException\n */\n //require_once 'Zend/Db/Statement/Exception.php';\n \n \t//throw new StatementException($e->getMessage(), $e->getCode(), $e);\n //}\n }", "title": "" } ]
5b0b7761e1a713400a7bdbc5ce1634d5
Set up test environment.
[ { "docid": "485b8e459e52e99f9a3c17d47cc98af5", "score": "0.0", "text": "public function setUp()\n {\n parent::setUp();\n\n $this->connection = new Connection\\MysqliConnection($this->link);\n\n if ($this->connection->tableExists('writers')) {\n $this->connection->dropTable('writers');\n }\n\n $create_table = $this->connection->execute(\"CREATE TABLE `writers` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',\n `birthday` date NOT NULL,\n PRIMARY KEY (`id`)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\"\n );\n\n $this->assertTrue($create_table);\n\n $this->connection->execute('INSERT INTO `writers` (`name`, `birthday`) VALUES (?, ?), (?, ?), (?, ?)', 'Leo Tolstoy', new DateTime('1828-09-09'), 'Alexander Pushkin', new DateTime('1799-06-06'), 'Fyodor Dostoyevsky', new DateTime('1821-11-11'));\n\n $this->container = new Container([\n 'dependency' => 'it works!'\n ]);\n }", "title": "" } ]
[ { "docid": "db0325cb0750d5c6a21fccb74d4137cd", "score": "0.7853385", "text": "protected function setUp() {\n\t\tparent::setUp();\n\n\t\t$this->object = Titon::env();\n\t\t$this->object->setup('dev', Environment::DEVELOPMENT, ['dev', '123.0.0.0']);\n\t\t$this->object->setup('prod', Environment::PRODUCTION, ['prod', '123.456.0.0']);\n\t\t$this->object->setup('staging', Environment::STAGING, ['staging', '123.456.789.0']);\n\t}", "title": "" }, { "docid": "ce6163f7fdf2da18e2d07da1528e02d6", "score": "0.77839065", "text": "public function setUp()\n {\n $this->paths = new Paths([]);\n $this->environment = new Environment(Environment::TESTING);\n $this->registry = new BootstrapperRegistry($this->paths, $this->environment);\n }", "title": "" }, { "docid": "d7d372f56a70fc1d33d53cf008df4bc0", "score": "0.77536565", "text": "public function setUp(): void\n {\n parent::setUp();\n // make sure, our .env file is loaded\n $this->app->useEnvironmentPath(__DIR__.'/..');\n $this->app->bootstrapWith([LoadEnvironmentVariables::class]);\n parent::getEnvironmentSetUp($this->app);\n // setup database migrations, factories and migrate\n $this->loadLaravelMigrations(['--database' => 'square_test']);\n $this->artisan('migrate', ['--database' => 'square_test'])->run();\n $this->withFactories(__DIR__.'/../src/database/factories');\n $this->faker = Faker::create();\n }", "title": "" }, { "docid": "a4dbbb2e5e6054ac18cef0edef4688dd", "score": "0.75751793", "text": "protected function setUp()\n {\n parent::setUp();\n $this->environment = new Environment();\n }", "title": "" }, { "docid": "7503be8a2da067167e05b7eb116b5b6d", "score": "0.75490797", "text": "protected function setUp()\n {\n $this->object = new Environment('Environment test', 'TYPE_ENV');\n }", "title": "" }, { "docid": "fcb52f5d863d83220b488e023fc680eb", "score": "0.75133765", "text": "public static function setUpBeforeClass():void {\n\n # Setup env\n Env::set([\n \"phpunit_test\" => true,\n \"crazyphp_root\" => getcwd(),\n \"app_root\" => getcwd(),\n \"trash_path\" => self::TRASH_PATH,\n ]);\n\n }", "title": "" }, { "docid": "31fd785e8698cd8000bc3a0765edeec2", "score": "0.74402106", "text": "protected function setUp()\n {\n if (getenv('BUILD_ENV') !== 'TRAVIS') {\n $dotenv = new Dotenv\\Dotenv(__DIR__ . '/../');\n $dotenv->load();\n }\n parent::setUp();\n }", "title": "" }, { "docid": "8ae3155e217bc7f318311e2ea6a98082", "score": "0.7395418", "text": "protected function setUp()\n {\n $this->app = Test\\createApp();\n }", "title": "" }, { "docid": "fc980d97f2fde0988d5cba862bee6e26", "score": "0.7371996", "text": "protected function setUp() : void\n {\n parent::setUp();\n $this->initialize();\n $this->getEnvironmentSetUp($this->app);\n\n\n // Set connection\n $migrator = app('migrator');\n $migrator->setConnection('mysql_testing');\n\n // Create database\n $this->createMysqlTestDatabase($this->app);\n\n // Load migration files\n $migrator->path(__DIR__.'/database/migrations');\n\n\n // $this->loadMigrationsFrom([\n // '--database' => env('DB_CONNECTION'),\n // '--path' => static::$dir . '/tests/database/migrations',\n // ]);\n // $this->withFactories(static::$dir . '/tests/database/factories');\n // $this->artisan('db:seed', ['--class' => DatabaseSeeder::class]);\n }", "title": "" }, { "docid": "ae6e4c7f5744da6224d18ee03c66699b", "score": "0.7364727", "text": "protected function setUp(): void\n\t{\n\t\t$env = new Environment(\n\t\t\t['hosts' => [ELASTICSEARCH_HOST]]\n\t\t);\n\t\t$this->elasticSearcher = new ElasticSearcher($env);\n\t}", "title": "" }, { "docid": "b4dbe1231ef1cb015124a3de4aa119e7", "score": "0.7361422", "text": "public function setUp()\n {\n if (! $this->app) {\n $this->refreshApplication();\n }\n config(['database.default'=> 'sqlite_testing']);\n\n parent::setUp();\n $this->prepareForTests();\n }", "title": "" }, { "docid": "712e80956154cd8cadb4d37eaa10b0b7", "score": "0.7352595", "text": "public function setup()\n {\n date_default_timezone_set('Europe/London');\n\n $envPath = __DIR__ . '/../';\n\n if (file_exists($envPath . '.env')) {\n $dotenv = new \\Dotenv\\Dotenv($envPath);\n $dotenv->load();\n }\n }", "title": "" }, { "docid": "68fd60b0dbf60bb7eb3466ee39121d86", "score": "0.73508024", "text": "public function setUp() {\n $this->setUpSiteAuditTestEnvironment();\n }", "title": "" }, { "docid": "c872a449b7e62c571901caab8fd524e9", "score": "0.7349202", "text": "public function setUp(): void\n {\n parent::setUp();\n $this->startUp();\n }", "title": "" }, { "docid": "db36423407b378ac8eb55641657286c2", "score": "0.7340604", "text": "protected function setUp()\n {\n if( !defined('PHPUNIT_RUN')) {\n define( 'PHPUNIT_RUN', 1 );\n }\n $this->homeDir = realpath( dirname(__FILE__) ) ;\n if( !defined('HOME_DIR')) {\n define( 'HOME_DIR', $this->homeDir );\n }\n if( !defined('API_DIR')) {\n define( 'API_DIR' , HOME_DIR . '' );\n }\n if( !defined('APP_DIR')) {\n define( 'APP_DIR' , API_DIR . '/Stub' );\n }\n }", "title": "" }, { "docid": "01d30a9f5ab9b499ea41e0a2dd278097", "score": "0.7324782", "text": "public function setUp() : void\n {\n // You can override configuration here with test case specific values,\n // such as sample view templates, path stacks, module_listener_options,\n // etc.\n $configOverrides = [];\n\n $sAppFile = __DIR__.'/../../../../../config/application.config.php';\n $sTravisBase = '/home/travis/build/OnePlc/PLC_X_User';\n if (file_exists($sTravisBase.'/vendor/oneplace/oneplace-core/config/application.config.php')) {\n $sAppFile = $sTravisBase.'/vendor/oneplace/oneplace-core/config/application.config.php';\n }\n\n $this->setApplicationConfig(ArrayUtils::merge(\n include $sAppFile,\n $configOverrides\n ));\n\n parent::setUp();\n }", "title": "" }, { "docid": "fdd759a3f99ae0cf0f2c277b7241b394", "score": "0.7320555", "text": "public function setUp()\n {\n self::bootKernel();\n\n $this->factory = static::$kernel->getContainer()->get('EnvironmentContainerFactory');\n }", "title": "" }, { "docid": "d5be25c1ef7aba97e39e1f53f2a6c192", "score": "0.73186034", "text": "public function setUp(): void\n {\n if (!defined('RUNNING_TEST')) {\n define('RUNNING_TEST', true);\n }\n\n parent::setUp();\n }", "title": "" }, { "docid": "ba8c03c2d8b69794cfb039e535f8b6f4", "score": "0.73005944", "text": "public function setUp()\n\t{\n\t\tparent::setUp();\n\n\t\t// Create an artisan object for calling migrations\n\t\t$artisan = $this->app->make('artisan');\n\n\t\t// Call migrations specific to our tests, e.g. to seed the db\n\t\t$artisan->call('migrate', array(\n\t\t\t'--database' => 'testbench',\n\t\t\t'--path' => '../tests/database/migrations',\n\t\t));\n\n\t}", "title": "" }, { "docid": "76023c3bba0813707a93bb8da39115d7", "score": "0.7273805", "text": "public function setUp()\n {\n if (defined('HHVM_VERSION')) {\n $this->markTestSkipped('Test not working with hhvm as backend server');\n }\n\n parent::setUp();\n }", "title": "" }, { "docid": "f31d0fbae5db9a8850034f424cc5fc25", "score": "0.7254313", "text": "public function setUp()\n {\n // @todo[m]: all o this code should be in it's own bootstrap file\n $_SERVER[\"REQUEST_URI\"] = '/'; // horrible hack to get tests running with this quick project\n define('BASE_PATH', '/def/web/');\n\n $config = dirname(__FILE__) . '/../protected/config.php';\n $framework = dirname(__FILE__) . '/../framework/app.php';\n require_once($config);\n require_once($framework);\n\n $app = new App($config);\n $app->createWebApp($config);\n include(dirname(__FILE__) . '/../protected/controllers/basketController.php');\n\n $this->config = $config;\n }", "title": "" }, { "docid": "711050b3d09c1eac92cdb5a66cfc6b98", "score": "0.725085", "text": "protected function setUp()\n {\n parent::setUp();\n\n $this->setUpTheBrowserEnvironment();\n }", "title": "" }, { "docid": "66b92261ff02d14a52c5cf6b3ebb916e", "score": "0.7232338", "text": "public function setUp()\n {\n $this->dbname = 'taurus_test';\n $this->dbuser = 'taurus';\n $this->dbpw= 'taurus';\n $this->dbhost = 'localhost';\n\n $this->fixturesDbState = '/fixtures/db/';\n\n $this->fixturesJsonResults = '/fixtures/jsonResults/';\n\n $config = (new TaurusContainerConfig())\n ->merge(new TestContainerConfig());\n Container::getInstance()->setContainerConfig($config);\n\n $this->authenticationService = Container::getInstance()->getService(TaurusContainerConfig::SERVICE_STANDARD_AUTHENTICATION_SERVICE);\n\n parent::setUp();\n }", "title": "" }, { "docid": "141046f253ce75fceb0fce637bc15827", "score": "0.72161", "text": "public function setUp()\n {\n parent::setUp();\n\n $this->app = $this->createApplication();\n }", "title": "" }, { "docid": "bd42e53e23116c73e2f524b2a138c006", "score": "0.7204397", "text": "public function setUp()\n {\n parent::setUp();\n $this->helper = Helper::create();\n $this->app = array(\n 'path.base' => vfsStream::setup('workbench')->url(),\n 'config' => ConfigStub::create()->config()\n );\n $this->meta = array(\n 'vendor' => 'Vendor',\n 'name' => 'Package',\n 'package' => 'vendor/package',\n );\n $this->meta['namespace'] = $this->meta['vendor'].'\\\\\\\\'.$this->meta['name']; \n }", "title": "" }, { "docid": "5145be25d1a783916b481318f65e4f0b", "score": "0.7196781", "text": "protected function setUp() {\n\t\tparent::setUp();\n\t\tMonkey\\setUp();\n\t}", "title": "" }, { "docid": "e34aaa85ad852d8256854ee67fb4d2ad", "score": "0.71943164", "text": "protected function setUp()\n\t{\n\t\t// Create a blank sqlite db\n\t\t// Laravel complains if the actual file does not exist.\n\t\ttouch('/tmp/gears-session-test.db');\n\n\t\t// Grab a laravel db connection\n\t\t$capsule = new LaravelDb;\n\t\t$capsule->addConnection\n\t\t([\n\t\t\t'driver' => 'sqlite',\n\t\t\t'database' => '/tmp/gears-session-test.db',\n\t\t\t'prefix' => ''\n\t\t]);\n\t\t$this->db = $capsule->getConnection('default');\n\n\t\t// Get a new guzzle client\n\t\t$this->http = GuzzleTester();\n\t}", "title": "" }, { "docid": "8be027580350a867fd5ddf2811002674", "score": "0.71903425", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n $this->setUpToolsAliases(true);\n $this->setUpToolsModels();\n $this->setUpToolsDB();\n }", "title": "" }, { "docid": "0387bf03fe5cc7245ba6bd969c89d9f9", "score": "0.7186926", "text": "protected function setUp(): void\n {\n $this->setupContainer();\n $this->setupDatabase(new Manager($this->getContainer()));\n $this->migrate();\n $this->seed();\n }", "title": "" }, { "docid": "831107c198a3a819d15c945b4396d4bc", "score": "0.7182512", "text": "private static function setUpLocalTestbench()\n {\n if (!file_exists(self::TEST_APP_TEMPLATE)) {\n fwrite(STDOUT, 'Setting up test environment for first use.'.PHP_EOL);\n $files = new Filesystem();\n $files->makeDirectory(self::TEST_APP_TEMPLATE, 0755, true);\n $original = __DIR__.'/../vendor/orchestra/testbench-core/laravel/';\n $files->copyDirectory($original, self::TEST_APP_TEMPLATE);\n\n // Modify the composer.json file\n $composer = json_decode($files->get(self::TEST_APP_TEMPLATE.'/composer.json'), true);\n\n // Remove \"tests/TestCase.php\" from autoload (it doesn't exist)\n unset($composer['autoload']['classmap'][1]);\n\n // Pre-install illuminate/support\n $composer['require'] = [\n 'laravel/framework' => '^7.0|^8.0',\n 'laravel/sanctum' => '^7.0|^8.0',\n ];\n $composer['require-dev'] = new \\stdClass();\n\n // Install stable version\n $composer['minimum-stability'] = 'dev';\n $composer['prefer-stable'] = true;\n $files->put(self::TEST_APP_TEMPLATE.'/composer.json', json_encode($composer, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));\n\n // Install dependencies\n fwrite(STDOUT, \"Installing test environment dependencies\\n\");\n (new Process(['composer', 'install', '-q'], self::TEST_APP_TEMPLATE))->run(function ($type, $buffer) {\n fwrite(STDOUT, $buffer);\n });\n }\n\n (new Filesystem())->copyDirectory(self::TEST_APP_TEMPLATE, self::TEST_APP);\n }", "title": "" }, { "docid": "064f7b64af30cb41e67eb32df2db07de", "score": "0.7177073", "text": "public function setUp()\n {\n parent::setUp();\n\n /*\n * create an artisan object\n */\n $artisan = $this->app->make('artisan');\n\n /*\n * Run migrations for test database\n */\n $artisan->call('migrate', [\n '--database' => 'testing',\n '--path' => '../tests/migrations',\n ]);\n }", "title": "" }, { "docid": "9d60653aa6af2c676f408fc8a25fc173", "score": "0.7166755", "text": "public function setUp() : void\n {\n // http://www.slimframework.com/docs/cookbook/environment.html\n $this->env = Environment::mock([\n 'REQUEST_METHOD' => 'GET',\n 'REQUEST_URI' => '/foo/bar',\n 'QUERY_STRING' => 'abc=123&foo=bar',\n 'SERVER_NAME' => 'example.com',\n 'CONTENT_TYPE' => 'application/json;charset=utf8',\n 'CONTENT_LENGTH' => 15\n ]);\n }", "title": "" }, { "docid": "285a749c3b8f406c08921bb89bef307f", "score": "0.7165621", "text": "protected function setUp() : void\n {\n parent::setUp();\n\n $this->development = create(Development::class);\n }", "title": "" }, { "docid": "7a44fc2e4ef85216dd7fc98487c56989", "score": "0.71318156", "text": "public function setUp()\n\t{\n\t\t// $bs = new Zend_Application(\n\t\t// 'development',\n\t\t// APPLICATION_PATH . '/configs/config.xml'\n\t\t// );\n\t\t// $this->bootstrap = $bs;\n\t\t$this->bootstrap = new Zend_Application(\n\t\t APPLICATION_ENV,\n\t\t APPLICATION_PATH . '/configs/config.xml'\n\t\t);\n\t\tparent::setUp();\n\t}", "title": "" }, { "docid": "6e4930630212311ca195f0cd2ba19830", "score": "0.71283734", "text": "public function setUp()\n\t{\n\t\tparent::setUp();\n\n\t\t$this->runner = new PhpScriptRunner();\n\t}", "title": "" }, { "docid": "acba09abb36c389a3a4e43111eb41c99", "score": "0.7117828", "text": "public function setUp()\n {\n $this->bootstrap = new Zend_Application(\n 'testing',\n APPLICATION_PATH . '/configs/application.ini'\n );\n parent::setUp();\n }", "title": "" }, { "docid": "fa3503f3ab2c2be444e1d54ae2a32d72", "score": "0.7098264", "text": "protected function setUp(): void\n {\n //====================================================================//\n // Boot Dolibarr in PHP\n Helper::dol()->boot();\n CoreActions::setupEntity();\n CoreActions::setupMySoc();\n CoreActions::setupUser();\n //====================================================================//\n // Start Mink Browser Session & Connect to Dolibarr\n $this->setupSession();\n }", "title": "" }, { "docid": "0f0ac525fb017862810e49ba7417fc48", "score": "0.70837617", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n $this->registerMigrations();\n $this->migrateUnitTestTables();\n $this->registerPackageFactories();\n $this->registerTestMorphMaps();\n $this->setDefaultUserModel();\n }", "title": "" }, { "docid": "edd58ebd6836dc6b39d8167029c077a5", "score": "0.7076963", "text": "protected function setUp()\n {\n if (! getenv('TESTS_ZEND_DB_ADAPTER_DRIVER_MYSQL')) {\n $this->markTestSkipped('Mysqli integration test disabled');\n }\n\n if (! extension_loaded('mysqli')) {\n $this->fail('The phpunit group integration-mysqli was enabled, but the extension is not loaded.');\n }\n\n foreach ($this->variables as $name => $value) {\n if (! getenv($value)) {\n $this->markTestSkipped(sprintf(\n 'Missing required variable %s from phpunit.xml for this integration test',\n $value\n ));\n }\n $this->variables[$name] = getenv($value);\n }\n }", "title": "" }, { "docid": "18f16f0d294345a6ba5d7334f1e223ba", "score": "0.7072177", "text": "public function setUp() {\n\t\t$this->copyTestFiles();\n\t\tparent::setUp();\n\t}", "title": "" }, { "docid": "65d386f1eb2f00a7c20638dc2689bcab", "score": "0.7069838", "text": "protected function setUp(): void\n {\n static::$latestResponse = null;\n\n $this->setUpTheTestEnvironment();\n }", "title": "" }, { "docid": "081e5b44c7025b6746575be09b4a7a7b", "score": "0.70636886", "text": "public function setUp()\n {\n $this->cfg = $this->createConfig();\n }", "title": "" }, { "docid": "5a9f2fc32b6282de06fa7e66bc1e8d0c", "score": "0.70549667", "text": "public function setUp(): void\n {\n parent::setUp();\n\n $this->agent = $this->app->make(\\Arcanedev\\Agent\\Contracts\\Agent::class);\n }", "title": "" }, { "docid": "11aa01cb86544c3fe01a7905c58c1732", "score": "0.70506567", "text": "public final function setUp() {\n\t\tparent::setUp();\n\t}", "title": "" }, { "docid": "2b45a861e1b6cff850e10a8aea3e7144", "score": "0.7047464", "text": "protected function setUp()\n {\n global $di;\n\n // Setup di\n $this->di = new DIFactoryConfig();\n $this->di->loadServices(ANAX_INSTALL_PATH . \"/config/di\");\n $this->di->loadServices(ANAX_INSTALL_PATH . \"/test/config/di\");\n\n // View helpers uses the global $di so it needs its value\n $di = $this->di;\n\n // Init the modules needed\n $cache = new CacheMock;\n $curl = new CurlMock();\n\n $cfg = $di->get(\"configuration\");\n $locationProvider = new Ipstack($curl, $cfg);\n\n // Setup the DarkSky\n $this->darkSky = new DarkSky($locationProvider, $curl, $cfg);\n }", "title": "" }, { "docid": "733a3d5f1b2037bad0451fb2f61b9718", "score": "0.7043834", "text": "public function setUp()\n\t{\n\t\tparent::setUp();\n\t\t$this->prepareForTests();\n\t}", "title": "" }, { "docid": "8814949b3d5d557314989b9cdb2e61d6", "score": "0.7038005", "text": "protected function setUp(): void\n {\n if (!self::TEST_ENABLE) {\n $this->markTestSkipped('Test disabled.');\n }\n $this->init();\n }", "title": "" }, { "docid": "dc584232ec2bbc459af59d029dab217d", "score": "0.7033137", "text": "public function setUp()\n {\n $application = require $this->bootstrap;\n $this->application = $application;\n $this->sm = $application->getServiceManager();\n }", "title": "" }, { "docid": "cb29ffaaf02b41452d4b75324bd2f3ba", "score": "0.70328075", "text": "public function setup() {\n parent::setUp();\n }", "title": "" }, { "docid": "0705702e9bd755a0ee8a0209c72d3df4", "score": "0.7031449", "text": "protected function setUp()\n {\n $this->setUpTemporaryDirectory();\n\n if (!defined('WORKING_DIRECTORY')) {\n define('WORKING_DIRECTORY', $this->temporaryDirectory);\n }\n\n if (!defined('HOME_DIRECTORY')) {\n define('HOME_DIRECTORY', $this->temporaryDirectory);\n }\n\n if (!defined('STORAGE_FILE')) {\n define(\n 'STORAGE_FILE',\n HOME_DIRECTORY . DIRECTORY_SEPARATOR . Storage::FILE_NAME\n );\n }\n\n $this->application = $this->getApplication();\n }", "title": "" }, { "docid": "d6c4113b17159133b022607b2795cfce", "score": "0.70270705", "text": "public function setUp(): void\n {\n parent::setUp();\n\n // register model factories\n App::singleton(Factory::class, function ($app) {\n $faker = $app->make(Generator::class);\n\n return Factory::construct($faker, plugins_path('bedard/rainlabuserapi/factories'));\n });\n\n // set up plugins\n $pluginManager = PluginManager::instance();\n $pluginManager->registerAll(true);\n $pluginManager->bootAll(true);\n\n // disable mailer\n Mail::pretend();\n }", "title": "" }, { "docid": "2c9a7c07f4d66db1d4e413bd999b5f59", "score": "0.70247376", "text": "public function setUp(): void\n\t{\n\t\tif (!extension_loaded('openssl')) {\n\t\t\t$this->markTestSkipped('The OpenSSL extension is not available.');\n\t\t}\n\n\t\t$this->set_config([\n\t\t\t'type' => 'openssl',\n\t\t\t'key' => EncryptTestBase::KEY32,\n\t\t\t'cipher' => Encrypt_Engine_Openssl::AES_256_CBC\n\t\t]);\n\n\t\tparent::setUp();\n\t}", "title": "" }, { "docid": "245699b8ff34935f9bcdb95149f33cf4", "score": "0.70184946", "text": "protected function setUp(): void\n {\n global $di;\n\n // Init service container $di to contain $app as a service\n $di = new DIFactoryConfig();\n $di->loadServices(ANAX_INSTALL_PATH . \"/config/di\");\n $di->loadServices(ANAX_INSTALL_PATH . \"/test/config_/di\");\n\n //set a test-cache for tests\n $di->get(\"cache\")->setPath(ANAX_INSTALL_PATH . \"/test/cache\");\n\n\n // Create and initiate the controller\n $this->controller = new IpTestControllerMock();\n\n $this->controller->setDi($di);\n }", "title": "" }, { "docid": "011d0693041c60c534d45c930d1d708d", "score": "0.7015037", "text": "public static function setUpBeforeClass(): void\n {\n $names = [\n 'TRAVIS',\n 'TRAVIS_BRANCH',\n 'TRAVIS_REPO_SLUG',\n 'TRAVIS_PULL_REQUEST',\n BadgeLogger::ENV_INFECTION_BADGE_API_KEY,\n BadgeLogger::ENV_STRYKER_DASHBOARD_API_KEY,\n ];\n\n foreach ($names as $name) {\n self::$env[$name] = getenv($name);\n }\n }", "title": "" }, { "docid": "be5c14500090342e2d48326bc27ee06e", "score": "0.70106715", "text": "public function setUp()\n {\n parent::setUp();\n\n $this->artisan('vendor:publish', [\n '--provider' => \\CleaniqueCoders\\LaravelSingleSession\\LaravelSingleSessionServiceProvider::class,\n ]);\n\n $this->loadLaravelMigrations(['--database' => 'testbench']);\n\n $this->seedUsers();\n }", "title": "" }, { "docid": "5268088b9bc9565f83503f6bbb492332", "score": "0.7005689", "text": "protected function setUp(): void\n {\n $this->kernel = new TestKernel();\n $this->kernel->DL->connect();\n $this->kernel->DL->begin();\n }", "title": "" }, { "docid": "7ce03dbcb8f763878a9c03ee5ecb36b0", "score": "0.7004912", "text": "protected function setUp()\n {\n global $di;\n\n // View helpers uses the global $di so it needs its value\n $di = $this->di;\n\n // Setup di\n $di = new DIFactoryConfig();\n $di->loadServices(ANAX_INSTALL_PATH . \"/config/di\");\n $di->loadServices(ANAX_INSTALL_PATH . \"/test/config_/di\");\n\n //set a test-cache for tests\n $di->get(\"cache\")->setPath(ANAX_INSTALL_PATH . \"/test/cache\");\n\n // Setup the controller\n $this->controller = new WeatherJSONControllerMock();\n $this->controller->setDI($di);\n }", "title": "" }, { "docid": "0dab4c5e10d9c6097446ff853922b20a", "score": "0.7003534", "text": "public function setUp(){\n parent::setUp();\n\n $this->createVirtualAPI();\n if(!defined('RUNING_TEST')) define('RUNING_TEST',true);\n\n $this->runner = new Runner();\n $this->runner->addReporter(new BasicConsole(80, true));\n\n $this->client = new \\GuzzleHttp\\Client();\n\n if(!defined('RUNING_TEST')) define('RUNING_TEST',true);\n $this->_loadInitialData();\n\n }", "title": "" }, { "docid": "bb7053da35dc755dcf0535ae784e4744", "score": "0.6999615", "text": "public function setUp()\n\t{\n\t\t$this->app = new Application;\n\t\t$this->composers = [];\n\t}", "title": "" }, { "docid": "8a61c78311f55f58fd458b346848bc4d", "score": "0.6998906", "text": "protected function setUp(): void\n {\n if (!self::TEST_ENABLE) {\n $this->markTestSkipped('Test disabled.');\n }\n $this->config = new Config(\n Config::ENV_CLI,\n __DIR__ . self::CONFIG_PATH\n );\n $this->container = new Container(\n $this->config->getSettings(Config::_SERVICES)\n );\n $this->instance = new ApiTestControler($this->container);\n }", "title": "" }, { "docid": "e3f7462cfb94e46264b9cc429553225a", "score": "0.6989063", "text": "public function setUp() {}", "title": "" }, { "docid": "c6f1a80e7ef7d0d1b4d5b04d84ee8939", "score": "0.69839853", "text": "protected function setUp(): void {\n parent::setUp();\n $this->client = new GTMetrixClient();\n $this->client->setUsername(getenv('GTMETRIX_USERNAME'));\n $this->client->setAPIKey(getenv('GTMETRIX_APIKEY'));\n }", "title": "" }, { "docid": "2ef714955383f2237d64121ccb41a430", "score": "0.6983903", "text": "public function setUp()\n {\n $this->client = new ApiClient(getenv('XMLSOCCER_API_KEY'), true);\n }", "title": "" }, { "docid": "65fa47067c229158ae2f353682897f24", "score": "0.69708824", "text": "public function setUp()\n\t{\n\t\t\\Session::$instance = null;\n\t\t\\Session::load();\n\n\t\t$_SERVER['test.orchestra.started'] = null;\n\t\t$_SERVER['test.orchestra.done'] = null;\n\t}", "title": "" }, { "docid": "a9a68f90bf4ea95798d135cfaaf9cc57", "score": "0.69669986", "text": "public function setUp() : void\n {\n // You can override configuration here with test case specific values,\n // such as sample view templates, path stacks, module_listener_options,\n // etc.\n $configOverrides = [];\n\n $this->setApplicationConfig(ArrayUtils::merge(\n include __DIR__ . '/../../../../config/application.config.php',\n $configOverrides\n ));\n\n parent::setUp();\n }", "title": "" }, { "docid": "f41390a34208609bb842b33af3589379", "score": "0.69613135", "text": "public function setUp()\n {\n // request\n $this->request = new Yaf_Request_Http();\n $this->router = new Yaf_Router();\n $app = Yaf_Application::app();\n if ($app == null) {\n //Lets create the Application\n $app = new Yaf_Application(\"framework/Yaf/_files/application.ini\");\n }\n }", "title": "" }, { "docid": "5d876868e92d4adebfeaa20c4ae15a6f", "score": "0.696012", "text": "protected function setUp()\n {}", "title": "" }, { "docid": "5d876868e92d4adebfeaa20c4ae15a6f", "score": "0.696012", "text": "protected function setUp()\n {}", "title": "" }, { "docid": "71edd97898f683e355d23892a8eee9c4", "score": "0.695783", "text": "public static function setUpBeforeClass(): void\n {\n EasyPost::setApiKey(getenv('EASYPOST_PROD_API_KEY'));\n\n VCR::turnOn();\n }", "title": "" }, { "docid": "71edd97898f683e355d23892a8eee9c4", "score": "0.695783", "text": "public static function setUpBeforeClass(): void\n {\n EasyPost::setApiKey(getenv('EASYPOST_PROD_API_KEY'));\n\n VCR::turnOn();\n }", "title": "" }, { "docid": "1516c1ad6a7f6d6ee87c59b6c02cb4bd", "score": "0.6956853", "text": "public function setUp()\n {\n $this->fixture = new Application('test');\n }", "title": "" }, { "docid": "ea176b62340fa21ff502a3d7f5558eaf", "score": "0.6955681", "text": "public function setUp()\n {\n //$this->setApplicationConfig(\n //include '/Users/ekoray/Sites/istesene/config/application.config.php'\n //);\n }", "title": "" }, { "docid": "44cdf3831254606144516f5c308c2f6d", "score": "0.69542146", "text": "public function setUp()\n {\n $configuration = new Configuration('example-api-key');\n $configuration->setEnabled(false);\n\n $this->apm = new Inspector($configuration);\n $this->apm->startTransaction('testcase');\n }", "title": "" }, { "docid": "16e8f7157eda25ffa805778547863c0e", "score": "0.69485354", "text": "public function setUp()\n\t{\n\t\t$this->_helpers = new Kohana_Unittest_Helpers;\n\n\t\t$this->setEnvironment($this->environmentDefault);\n\n\t\treturn parent::setUp();\n\t}", "title": "" }, { "docid": "9bfd1ce9c59db4fc3d9921f9d640288e", "score": "0.6947038", "text": "public function setUp ()\n {\n parent::setUp();\n\n $this->clearEnvironment();\n }", "title": "" }, { "docid": "9cbd2c1414522c2d7d80231b663641b8", "score": "0.69448996", "text": "public function setUp()\n {\n $this->configLoader->load();\n $this->sysConfig = $this->configLoader->getSystemConfig();\n }", "title": "" }, { "docid": "ef18b957ab470311eed0319db89f01b1", "score": "0.6943622", "text": "public function setUp()\n {\n $_SERVER['HTTP_HOST'] = 'beta.gac.edu';\n Config::$stagingDir = self::$testFileDir . '/staging/';\n Config::$draftDir = self::$testFileDir . '/drafts/';\n Config::$editableDraftDir = self::$testFileDir . '/editableDrafts/';\n Config::$tmpDir = self::$testFileDir . '/tmp/';\n\n Config::$allowableDraftTypes = [\n Config::PUBLIC_DRAFT,\n Config::PRIVATE_DRAFT,\n Config::PENDING_PUBLISH_DRAFT,\n ];\n\n $dbal = DBAL::getDBAL('testDB', $this->getDBH());\n $this->set('PermissionsManager', 'dbal', $dbal);\n $this->set('FileManager', 'cachedDrafts', []);\n $this->set('FileManager', 'cachedDraftsByName', []);\n $this->set('Utility', 'dbal', $dbal);\n $this->setUpCaches();\n $this->origGet = $_GET;\n $this->mockMailer = new MockMailer();\n }", "title": "" }, { "docid": "b9251c75e576f2f8486b7e1e90204606", "score": "0.69345915", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n $this->setupRoutes($this->app['router']);\n }", "title": "" }, { "docid": "80e4676bdac50b3b2ac2888775a78c06", "score": "0.69312453", "text": "protected function setUp()\n {\n $this->testConstruct();\n }", "title": "" }, { "docid": "55ecd77f908a12721d07c21df7ef88a7", "score": "0.69275004", "text": "protected function setUp() {\r\n\r\n\t}", "title": "" }, { "docid": "160400603edb61361df19dadae6b991d", "score": "0.6923247", "text": "public function setUp() {\n\t\t$this->createDatabase();\n\t\t$this->useTestDatabase();\n\n\t\t$this->testExtensionsName = uniqid('testextension');\n\t\t$this->testLoadedExtensions = array(\n\t\t\t$this->testExtensionsName = array(\n\t\t\t\t'type' => 'L',\n\t\t\t\t'ext_tables.sql' => PATH_tx_t3deploy . 'tests/fixtures/testextension/ext_tables.sql',\n\t\t\t),\n\t\t);\n\n\t\t$this->controller = new tx_t3deploy_databaseController();\n\t}", "title": "" }, { "docid": "724ea437bfd221d1845acd7ff99f2a06", "score": "0.69228995", "text": "protected function setUp(): void\n {\n $this->pwd = sys_get_temp_dir() . '/private-composer-installer';\n\n // Create working directory\n @mkdir($this->pwd);\n }", "title": "" }, { "docid": "63467b632aaa0b95f2cde7865feed2cd", "score": "0.69227225", "text": "protected function setUp(): void\n {\n global $di;\n // Init service container $di\n $di = new DIMagic();\n $di->loadServices(ANAX_INSTALL_PATH . \"/config/di\");\n $di->loadServices(ANAX_INSTALL_PATH . \"/test/config/di\");\n\n $this->di = $di;\n\n // Create and initiate the controller\n $this->controller = new WeatherControllerMock();\n $this->controller->setDi($di);\n $this->controller->initialize();\n }", "title": "" }, { "docid": "28573952596e0aad9f99dd3c26a68733", "score": "0.69204706", "text": "protected function setUp(): void\n {\n Helper::removeDirectory(TESTS_TMP_PATH);\n Helper::createDirectory(TESTS_TMP_PATH);\n Helper::createDirectory(TESTS_REPO_PATH_1);\n Helper::createDirectory(TESTS_REPO_PATH_2);\n\n Helper::initEmptyGitRepository(TESTS_REPO_PATH_1);\n\n clearstatcache();\n }", "title": "" }, { "docid": "cde9f86e8723fe70d355dfa8c3fd1a1b", "score": "0.6920135", "text": "public function setUp(): void\n {\n $this->carrinho = new Carrinho();\n $this->produto = new Produto();\n }", "title": "" }, { "docid": "21e102a2b8d1f5c53506aa181a8aa6d2", "score": "0.69158745", "text": "public function setUp()\n {\n $this->testClass = new Client([\n 'dev_reference' => 'sahara',\n 'dev_secret' => 'fcVGPrRapgRyT83CJb9kg8wBpgIV7tdKikdKA/7SmvY=',\n 'app_reference' => 'parcelforce',\n ]);\n\n parent::setup();\n }", "title": "" }, { "docid": "3cdb7b3af9807925122d2ff6dee432fa", "score": "0.6910845", "text": "public function setUp()\n {\n parent::setUp();\n\n $this->app['config']->set('database.default', 'sqlite');\n $this->app['config']->set('database.connections.sqlite.database', ':memory:');\n\n $this->migrate();\n }", "title": "" }, { "docid": "9324836ee339905183b2b9eed8813345", "score": "0.690727", "text": "public function setUp()\n {\n $this->app = new Application();\n $this->app->register(new ServiceProvider(), [\n 'sanity.client.options' => [\n 'projectId' => $this->projectId,\n 'dataset' => $this->dataset,\n ],\n ]);\n }", "title": "" }, { "docid": "917fcaff81539095d0e2aa87e7788c18", "score": "0.6903039", "text": "public function setUp()\n {\n $this->application = new Zend_Application(\n APPLICATION_ENV,\n APPLICATION_PATH . '/configs/application.ini'\n );\n\n $this->bootstrap = array($this, 'appBootstrap');\n parent::setUp();\n }", "title": "" }, { "docid": "4e814d528faf3bbf38015c4cd64325cf", "score": "0.6900137", "text": "public function setUp()\n {\n parent::setup();\n\n $migrationsPath = realpath('test/database/migrations');\n $this->artisan('migrate', [\n '--database' => 'testbench',\n '--realpath' => $migrationsPath,\n ]);\n\n $this->testData = [\n 'email' => 'test@testing.com',\n 'password' => '$2y$10$tDy/6LDmIyIdCwdhlMWOR.a5.QWSxugr5eIBQqX23UGrJ7MrAx5j.'\n ];\n\n $model = new Model;\n $this->repository = new ModelRepository($model);\n }", "title": "" }, { "docid": "e2e288aee4626930396c77cb70f267f6", "score": "0.6898288", "text": "protected function setUp(): void\n {\n parent::setUp();\n $this->tinyUrlGenerator = GeneralUtility::makeInstance(TinyUrlGenerator::class);\n }", "title": "" }, { "docid": "b82d9f48bbcbc176e06f293738d19cf9", "score": "0.689626", "text": "public function setUp()\n {\n parent::setUp();\n\n $this->prepareForTests();\n }", "title": "" }, { "docid": "b82d9f48bbcbc176e06f293738d19cf9", "score": "0.689626", "text": "public function setUp()\n {\n parent::setUp();\n\n $this->prepareForTests();\n }", "title": "" }, { "docid": "5bb92623f8afa0994e414376c704511a", "score": "0.68959963", "text": "protected function setUp(): void\n {\n }", "title": "" }, { "docid": "f169945faff48a3dd60341456f310bf2", "score": "0.68955386", "text": "protected function setUp() {\n\t}", "title": "" }, { "docid": "234d302286e8d71b49dad294ab798a41", "score": "0.68939835", "text": "protected function setUp()\n {\n global $di;\n\n // Setup di\n $this->di = new DIFactoryConfig();\n $this->di->loadServices(ANAX_INSTALL_PATH . \"/config/di\");\n\n // Use a different cache dir for unit test\n $this->di->get(\"cache\")->setPath(ANAX_INSTALL_PATH . \"/test/cache\");\n\n // View helpers uses the global $di so it needs its value\n $di = $this->di;\n\n // Setup the controller\n $this->controller = new \\Hab\\MeModule\\ValidateIPController();\n $this->controller->setDI($this->di);\n $this->controller->initialize();\n }", "title": "" }, { "docid": "12e682fd6af338fbb5a2c0cdedd9e038", "score": "0.68938744", "text": "protected function setUp(): void\n\t{\n\t}", "title": "" }, { "docid": "244d213b290b9899a7a70182cf2c5f44", "score": "0.6888066", "text": "public function setUp(): void\n {\n $this->objectManager = Bootstrap::getObjectManager();\n $this->subject = $this->objectManager->create(Subject::class);\n $this->webhookEvent = $this->objectManager->create(WebhookEvent::class);\n $this->createProductsFixture = $this->objectManager->create(CreateProductsWithCategories::class);\n $this->customerSession = $this->objectManager->create(CustomerSession::class);\n $this->checkoutSession = $this->objectManager->create(CheckoutSession::class);\n $this->productRepository = $this->objectManager->create(ProductRepository::class);\n $this->jsonSerializer = $this->objectManager->create(JsonSerializer::class);\n }", "title": "" }, { "docid": "8cf60e3bdf078a13c3b60241d74d267f", "score": "0.68866193", "text": "protected function setUp()\n {\n require_once 'Zend/Session.php';\n Zend_Session::$_unitTestEnabled = true;\n // emulate shibdaemon + apache setting up environment variables\n $_SERVER['Shib-SwissEP-UniqueID'] = 'demouser@unibe.ch';\n $_SERVER['Shib-InetOrgPerson-mail'] = 'demouser@test.unibe.ch';\n $_SERVER['Shib-InetOrgPerson-givenName'] = 'demo';\n $_SERVER['Shib-Person-surname'] = 'User';\n $_SERVER['Shib-EP-Affiliation'] = 'staff';\n \n // the identity field name to use for the tests\n $this->_identityField = 'Shib-SwissEP-UniqueID';\n \n // a key map to use for the tests\n $this->_keyMap = array(\n 'Shib-SwissEP-UniqueID' => 'id',\n 'Shib-InetOrgPerson-mail' => 'email',\n 'Shib-InetOrgPerson-givenName' => 'firstname',\n 'Shib-Person-surname' => 'name',\n );\n \n }", "title": "" }, { "docid": "1e697858e787177ce1fc8d9899a7bd51", "score": "0.6883373", "text": "protected function setUp()\n {\n global $di;\n\n // Setup di\n $this->di = new DIFactoryConfig();\n $this->di->loadServices(ANAX_INSTALL_PATH . \"/config/di\");\n\n // Use a different cache dir for unit test\n $this->di->get(\"cache\")->setPath(ANAX_INSTALL_PATH . \"/test/cache\");\n\n // View helpers uses the global $di so it needs its value\n $di = $this->di;\n\n // Setup the controller\n $this->controller = new \\Hab\\MeModule\\GeoJSONController();\n $this->controller->setDI($this->di);\n $this->controller->initialize();\n }", "title": "" }, { "docid": "557a9b9ba449e83d73f592ef0c547996", "score": "0.68810654", "text": "protected function setUp()\r\n {\r\n //if need to test indv unittests using testmanager, uncomment code below\r\n //$_SERVER['KERNEL_DIR'] = './app';\r\n\r\n //Step 2:\r\n\r\n self::bootKernel();\r\n\r\n //Apply the primer\r\n DatabasePrimer::prime(self::$kernel);\r\n\r\n //Set entity manager\r\n $this->em = DatabasePrimer::$entityManager;\r\n\r\n //$fixture = new ViewWPFixtures();\r\n //$fixture->load($this->em);\r\n //$fixture->loadWP($this->em);\r\n\r\n $this->fixture = new ViewAggregateStatsFixtures();\r\n $this->fixture->load($this->em);\r\n\r\n\r\n $this->driver = new ChromeDriver('http://localhost:9222', null, 'http://127.0.0.1:80');\r\n $this->mink = new Mink(array('browser' => new Session(new ChromeDriver('http://127.0.0.1:9222', null, 'http://127.0.0.1:80'))));\r\n\r\n $this->mink->setDefaultSessionName('browser');\r\n }", "title": "" } ]
5289d4eb90e8be1946cecf369208f413
get class instance for the specified form ("Filter" or "Edit")
[ { "docid": "33d3199798850edd809dfa32eb95a070", "score": "0.0", "text": "public static function Form( $name ) { $strClass = self::getClassName().'_Form_'.$name; return new $strClass; }", "title": "" } ]
[ { "docid": "5215503362680f4edaaecfd7af376855", "score": "0.71069634", "text": "public function getFilterFormClass()\n {\n return 'Seguridad_IngresoFormFilter';\n }", "title": "" }, { "docid": "a64fd1ac9ccd014b5c96823d4169b0ca", "score": "0.6901508", "text": "public function getFilterForm()\n\t{\n\t\tif (preg_match(\"/MonitorModel([a-zA-Z]*)/\", get_called_class(), $matches) === 1)\n\t\t{\n\t\t\t$name = $matches[1];\n\n\t\t\tJForm::addFormPath(__DIR__ . '/forms');\n\t\t\tJForm::addFieldPath(__DIR__ . '/fields');\n\t\t\t$filterForm = JForm::getInstance('com_monitor.filter.' . $name, 'filter_' . $name);\n\t\t\t$filterForm->bind(\n\t\t\t\tarray(\n\t\t\t\t\t\"filter\" => $this->filters,\n\t\t\t\t\t\"list\" => $this->list\n\t\t\t\t)\n\t\t\t);\n\n\t\t\treturn $filterForm;\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "9050c81c8bc5147adcedad0b68ee412e", "score": "0.6633724", "text": "private function getSearchForm() {\n \n $urlHelper = $this->_helper->getHelper('url');\n\t$this->_searchform = new Application_Form_Public_Search_Searchofferta();\n $this->_searchform->setAction($urlHelper->url(array(\n\t\t\t\t'controller' => 'public',\n\t\t\t\t'action' => 'ricerca'),\n\t\t\t\t'default'\n\t\t\t\t));\n\treturn $this->_searchform;\n }", "title": "" }, { "docid": "37f65cc2cd36d45479e0a2a7d9996849", "score": "0.66137797", "text": "public function getFilterForm()\n {\n $this->buildPager();\n\n return $this->filterForm;\n }", "title": "" }, { "docid": "10a539c330293a41da22b56fcb5fe282", "score": "0.65986687", "text": "public function getSearchForm() : SearchForm;", "title": "" }, { "docid": "c4ebacf12aabfd81281d13982c3a6a1c", "score": "0.6583516", "text": "private function getFiltraTipologiaFormS() {\n \n $urlHelper = $this->_helper->getHelper('url');\n\t$this->_filtratipologiaformS = new Application_Form_Public_Filtro_FiltroTipologia();\n $this->_filtratipologiaformS ->setAction($urlHelper->url(array(\n\t\t\t\t'controller' => 'public',\n\t\t\t\t'action' => 'filtrotipologia',\n 'form'=>'filtrotipologia'),\n\t\t\t\t'default'\n\t\t\t\t));\n\treturn $this->_filtratipologiaformS;\n }", "title": "" }, { "docid": "4d0d7dece19ddff2f862f46fc5c82942", "score": "0.6554936", "text": "public function getFormClass();", "title": "" }, { "docid": "23095d9f2c9096f715d8292cbe21b145", "score": "0.6422091", "text": "abstract public function getApiResourceFilterFormClass(): string;", "title": "" }, { "docid": "b40344cb8bb06ecd8e1c33355b079160", "score": "0.6385783", "text": "abstract function getForm();", "title": "" }, { "docid": "7827fd0f522a5e2d4a6d72d178cdb88a", "score": "0.6355558", "text": "private function getFiltraAziendaFormS() {\n \n $urlHelper = $this->_helper->getHelper('url');\n\t$this->_filtraAziendaFormS = new Application_Form_Public_Filtro_FiltroAzienda();\n $this->_filtraAziendaFormS->setAction($urlHelper->url(array(\n\t\t\t\t'controller' => 'public',\n\t\t\t\t'action' => 'filtroazienda',\n 'form'=>'filtroazienda'),\n\t\t\t\t'default'\n\t\t\t\t));\n\treturn $this->_filtraAziendaFormS;\n }", "title": "" }, { "docid": "aeda061134e4b1b99faca7b937b736cf", "score": "0.6255369", "text": "protected function getFormInstance() {\n $class = $this->formClass;\n return $class::create($this->container);\n }", "title": "" }, { "docid": "e94a585ebde70789a0717aa1e07835fc", "score": "0.6238484", "text": "public function editForm(): Form;", "title": "" }, { "docid": "15776b0a8c7864874ac42021a78bcedb", "score": "0.6220629", "text": "protected function form()\n {\n $form = new Form(new OP\\Retention);\n\n return $form;\n }", "title": "" }, { "docid": "c6fb580743677fd6abbdfe0abdacdba0", "score": "0.6155795", "text": "protected function createForm()\n {\n $this->form = new HTML_QuickForm(\n 'filterForm', 'get',\n $this->frontend->getScriptUrl(),\n '', null, true\n );\n\n /*\n * Add all the current request-variables as hidden fields to the grid\n * to preserve the state it is in now.\n * However, since this filter is using get-request, remeber to remove\n * the state of the two submits in this form.\n * If not, you could end up with both remove filter and set filter\n * being on at the same time. (In which case the Remove Filter-action is\n * the one to be invoked.\n */\n $remove = array_keys($this->getFields());\n $remove = array_merge(\n $remove,\n array(\n $this->options['filterName'],\n $this->options['removeFilterName'],\n )\n );\n $params = $this->frontend->getQueryParamsArray(\n array(),\n false,\n $remove\n );\n\n foreach ($params as $name => $value) {\n $this->form->addElement('hidden', $name, $value);\n }\n\n if ($this->defaultOptions['isXhtml']) {\n $this->form->removeAttribute('name');\n }\n\n $this->addFilterFields();\n\n $filter = $this->form->createElement(\n 'submit',\n $this->options['filterName'],\n $this->options['filterLabel']\n );\n $removeFilter = $this->form->createElement(\n 'submit',\n $this->options['removeFilterName'],\n $this->options['removeFilterLabel']\n );\n $this->form->addGroup(array($removeFilter, $filter));\n\n return $this;\n }", "title": "" }, { "docid": "b585b70ae7ed48716eb1c799c034423c", "score": "0.6062274", "text": "protected function getter_form()\n\t{\n\t\t$class = $this->namespace.\"\\\\Form\";\n\t\t\n\t\tif(!class_exists($class))\n\t\t\treturn null;\n\t\t\n\t\t$form = new $class();\n\t\t\n\t\tif($this->content)\n\t\t\t$form->content = $this->content;\n\t\t\n\t\treturn $this->form = $form;\n\t}", "title": "" }, { "docid": "42699930625e1940aab3c9aacf0db633", "score": "0.60442364", "text": "protected function getFilter()\n {\n $class = $this->filter_class;\n return new $class($this->filter_option);\n }", "title": "" }, { "docid": "b007b2db593ee274c5538035fdf762c1", "score": "0.6043937", "text": "function _init_form() {\n\t\tif (!isset($this->_form)) {\n\t\t\t$this->_form = clone _class('form2');\n\t\t\t$this->_form->_chained_mode = false;\n\t\t}\n\t\treturn $this->_form;\n\t}", "title": "" }, { "docid": "24dd452fa2b73532babede06d16d47f5", "score": "0.6041862", "text": "public function SearchForm()\n {\n $form = parent::SearchForm();\n $query = $this->request->getVar('q');\n if ($query && isset($query['Status'])) {\n $form->loadDataFrom(\n array(\n 'q' => array(\n 'Status' => implode(',', $query['Status']),\n ),\n )\n );\n }\n\n return $form;\n }", "title": "" }, { "docid": "d2a8d5bc7338f150486f5ff9c6a99a2e", "score": "0.60385555", "text": "public function createFilterForm()\n {\n $formName = 'filter';\n $defaultData = [];\n $options = [\n 'action' => $this->generateUrl('admin_hermano_index'),\n 'method' => 'GET',\n 'csrf_protection' => false,\n 'validation_groups' => ['filtering'],\n 'required' => false,\n ];\n\n $formBuilder = $this->get('form.factory')\n ->createNamedBuilder($formName, FormType::class, $defaultData, $options)\n ->add('id', null, [\n 'label' => 'ID'\n ])\n ;\n return $formBuilder\n ->add('id', NumberType::class)\n ->add('created', DatePickerType::class, [])\n ->add('updated', DatePickerType::class, [])\n ->getForm()\n ;\n }", "title": "" }, { "docid": "18bef50f9e5bdcdf46bac32134e606a1", "score": "0.5963515", "text": "private function getFiltraAziendaFormTipologia() {\n \n\n $urlHelper = $this->_helper->getHelper('url');\n\t$this->_filtraformaziendaform = new Application_Form_Public_Filtro_FiltroAzienda();\n\n $this->_filtraformaziendaform->setAction($urlHelper->url(array(\n\t\t\t\t'controller' => 'public',\n\t\t\t\t'action' => 'categoriefiltrate'),\n\t\t\t\t'default'\n\t\t\t\t));\n \n\treturn $this->_filtraformaziendaform;\n\n }", "title": "" }, { "docid": "3bf83c3f0be2cf9fa98b57d512347fb1", "score": "0.59464407", "text": "function getForm($name=null, $type=null, $defval=null, $delete=false) {}", "title": "" }, { "docid": "b0370dd91b477ba18068a20557ac0f18", "score": "0.5932489", "text": "function on_Form(){\n $form_name=$GLOBALS['req_form_name'];\n $GLOBALS['catviz_info']->current_form=$form_name;\n $form_action=$GLOBALS['req_form_action'];\n /*if ($this->forms[$form_name]==false) {\n $this->content=\"Error! Form $form_name is not defined\"; \n } else { \n return $this->forms[$form_name]->Action($form_action); \n }*/\n if (is_object($this->form($form_name))){\n $form=&$this->form($form_name);\n return $form->action($form_action);\n } else {\n $this->content=\"Error! Form $form_name is not defined\";\n } \n }", "title": "" }, { "docid": "6541e69800fe1ea836ad1d2d64d88530", "score": "0.5890992", "text": "protected function getFormInstance()\n {\n return new ExportForm($this->translationFileTable->fetchAll(), $this->localeTable->fetchAll());\n }", "title": "" }, { "docid": "20535184bc28dca8b370e9fd113f3d75", "score": "0.58759713", "text": "protected function form()\n {\n $form = new Form(new RefundOrder);\n\n return $form;\n }", "title": "" }, { "docid": "8fa244acfe3bac871fd2bf5a3fd0be8d", "score": "0.584171", "text": "public function getFormClass()\n {\n return 'Seguridad_IngresoForm';\n }", "title": "" }, { "docid": "ce7b8fdad56a847ab41eb7e291c64ea3", "score": "0.5822146", "text": "public static function form() : object\r\n {\r\n if(\r\n !isset(Base::$objects['formbuilder'])\r\n || !is_object(Base::$objects['formbuilder'])\r\n || !Base::$objects['formbuilder'] instanceof \\wblib\\wbForms\\Form\r\n ) {\r\n //\\wblib\\wbForms\\Form::$wblang = self::lang();\r\n Base::$objects['formbuilder'] = new \\wblib\\wbForms\\Form();\r\n $init = Directory::sanitizePath(\r\n CAT_ENGINE_PATH.'/templates/'.Registry::get(\r\n (Backend::isBackend() ? 'DEFAULT_THEME' : 'DEFAULT_TEMPLATE')\r\n ).'/forms.init.php'\r\n );\r\n if(file_exists($init))\r\n require $init;\r\n Base::$objects['formbuilder']->setAttribute('lang_path',CAT_ENGINE_PATH.'/languages');\r\n if(Backend::isBackend())\r\n {\r\n Base::$objects['formbuilder']->setAttribute('lang_path',CAT_ENGINE_PATH.'/'.CAT_BACKEND_PATH.'/languages');\r\n }\r\n }\r\n return Base::$objects['formbuilder'];\r\n }", "title": "" }, { "docid": "96486f69c141077106e598818c102dd7", "score": "0.58175325", "text": "function create_search_form(){\n\t\t$processed = $this->getProcessed();\n\t\t$cur = 0;\n\t\tforeach ($this->FG_FILTER_SEARCH_FORM_SELECT as $select){\n\n\t\t\t// \tIf is a sql_type\n\t\t\tif ($select[1]){\n\t\t\t\t$instance_table = new Table($select[1][0], $select[1][1]);\n\t\t\t\t$list = $instance_table -> Get_list ($this -> DBHandle, $select[1][2], $select[1][3], $select[1][4],\n\t\t\t\t\t\t\t\t\t\t\t\tnull, null, null, null);\n\t\t\t\t$this->FG_FILTER_SEARCH_FORM_SELECT[$cur][1] = $list;\n\t\t\t}else{\n\t\t\t\t$this->FG_FILTER_SEARCH_FORM_SELECT[$cur][1] = $select[3];\n\t\t\t}\n\t\t\t$cur++;\n\t\t}\n\n\t\tinclude (\"Class.SearchHandler.inc.php\");\n\t}", "title": "" }, { "docid": "e895bf638dde58a0475c31bbd2c063c3", "score": "0.57988536", "text": "protected function compileForm($filter)\n {\n $outputFile = $this->getTargetFile(AbstractDefinition::FORM);\n if (!$this->handle = fopen($outputFile, 'wt')) {\n throw new RuntimeException(\"Cannot open '$outputFile' for writing. Use \"\n . 'setTarget() in the definition to configure or set permissions.'\n );\n }\n\n $v = array();\n foreach ($this->definition->getProperties() as $name => $property) {\n $v[$name] = get_class($property->getType());\n }\n\n $this->append('Form/open', array(\n 'namespace' => $this->getTargetNamespace(AbstractDefinition::FORM),\n 'name' => $this->definition->getName(),\n 'filter' => $filter,\n ));\n\n foreach ($this->definition->getProperties() as $name => $property) {\n if (!$property->getOption('formType') && $property->getType() instanceof Type\\ListType) {\n continue;\n }\n\n $attributes = $property->getOption('attributes') ?: array();\n $options = $property->getOption('options') ?: array();\n $type = $property->getOption('formType') ?: $property->getOption('type');\n\n if (!$type) {\n if ($property->getType() instanceof Type\\EnumType) {\n $type = 'Zend\\Form\\Element\\Radio';\n } else {\n $type = 'Zend\\Form\\Element\\Text';\n }\n }\n\n $this->append('Form/property', array(\n 'name' => $name,\n 'type' => $type,\n 'options' => $options,\n 'attributes' => $attributes,\n ));\n }\n\n $this->append('Form/close');\n\n fclose($this->handle);\n\n return $this;\n }", "title": "" }, { "docid": "6577ca8e8d148f83462941b37e6db405", "score": "0.57439244", "text": "public function form( $instance ) {\n\n }", "title": "" }, { "docid": "af5bca0de5cdc72b015bf28d3c08e1c6", "score": "0.5741416", "text": "public function getForm(): Form\n {\n return Form::findById($this->formId);\n }", "title": "" }, { "docid": "f9481faea8979639efe64981c69e497c", "score": "0.5730001", "text": "function form($instance) {\n }", "title": "" }, { "docid": "581d0a65f7aab77ba17d70ba624ae63c", "score": "0.57293904", "text": "public function show(form $form)\n {\n //\n }", "title": "" }, { "docid": "22bbc868bd05e7c0cf2676784c318fb8", "score": "0.5727438", "text": "function form( $instance ) {\n }", "title": "" }, { "docid": "a75b45164136e1a81b009ab0a1f4de52", "score": "0.5723529", "text": "function form($instance) {\n \n }", "title": "" }, { "docid": "60ef12040991838102e3d49f0b16f934", "score": "0.5719596", "text": "function form( $instance ) {\n\t}", "title": "" }, { "docid": "6b5a8784c254e40415e723143f7074b5", "score": "0.571921", "text": "public function getFormFilter( $arDados = array(), $obGrid = null ) {\n\t\t$form = new VincCursistaTurma_FormFilter();\n\t\t$form->setAction($this->view->baseUrl() . '/index.php/secretaria/vinccursistaturma/list')->setMethod('post');\n\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "b59d9a5643e282f7ddb329c354f25910", "score": "0.5712929", "text": "function form($instance) {\n \n }", "title": "" }, { "docid": "5433b36df26123f9689a27d61848b595", "score": "0.5710864", "text": "private function build_form()\r\n {\r\n $this->renderer->setFormTemplate('<form {attributes}><div class=\"filter_form\">{content}</div><div class=\"clear\">&nbsp;</div></form>');\r\n $this->renderer->setElementTemplate('<div class=\"row\"><div class=\"formw\">{label}&nbsp;{element}</div></div>');\r\n\r\n $select = $this->addElement('select', self :: FILTER_TYPE, null, array(), array(\r\n 'class' => 'postback'));\r\n\r\n $rdm = RepositoryDataManager :: get_instance();\r\n\r\n $disabled_counter = 0;\r\n\r\n $select->addOption(Translation :: get('AllContentObjects'), 'disabled_' . $disabled_counter);\r\n $disabled_counter++;\r\n\r\n $condition = new EqualityCondition(UserView :: PROPERTY_USER_ID, $this->manager->get_user_id());\r\n $userviews = $rdm->retrieve_user_views($condition);\r\n\r\n if ($userviews->size() > 0)\r\n {\r\n $select->addOption('--------------------------', 'disabled_' . $disabled_counter, array(\r\n 'disabled'));\r\n $disabled_counter++;\r\n\r\n while ($userview = $userviews->next_result())\r\n {\r\n $select->addOption(Translation :: get('View', null, Utilities :: COMMON_LIBRARIES) . ': ' . $userview->get_name(), $userview->get_id());\r\n }\r\n }\r\n\r\n $select->addOption('--------------------------', 'disabled_' . $disabled_counter, array(\r\n 'disabled'));\r\n $disabled_counter++;\r\n\r\n $type_selector = new ContentObjectTypeSelector($this->manager, $this->get_allowed_content_object_types());\r\n $types = $type_selector->as_tree();\r\n\r\n unset($types[0]);\r\n\r\n foreach ($types as $key => $type)\r\n {\r\n if (is_integer($key))\r\n {\r\n $select->addOption($type, 'disabled_' . $disabled_counter, array(\r\n 'disabled'));\r\n $key = 'disabled_' . $disabled_counter;\r\n $disabled_counter++;\r\n }\r\n else\r\n {\r\n\r\n $select->addOption($type, $key);\r\n }\r\n }\r\n\r\n $this->addElement('style_submit_button', 'submit', Translation :: get('Filter', null, Utilities :: COMMON_LIBRARIES), array(\r\n 'class' => 'normal filter'));\r\n\r\n $session_filter = Session :: retrieve('filter');\r\n $this->setDefaults(array(\r\n self :: FILTER_TYPE => $session_filter,\r\n 'published' => 1));\r\n\r\n $this->addElement('html', ResourceManager :: get_instance()->get_resource_html(Path :: get_web_common_libraries_path() . 'resources/javascript/postback.js'));\r\n }", "title": "" }, { "docid": "41d3cce6e8bbbebbc7d47991342fa5a9", "score": "0.56998116", "text": "protected function form()\n {\n $form = new Form(new ProductCategory());\n\n $form->select('map_id', __('map_id'))->options(ProductCategory::$productMap)->rules('required');\n $form->text('name', __('name'))->rules('required|max:80');\n $form->switch('is_show', __('is_show'));\n $form->number('sort', __('sort'))->default(ProductCategory::count() + 1)->rules('required');\n return $form;\n }", "title": "" }, { "docid": "0fa847f257ccb1757a557949c2b507f0", "score": "0.5690918", "text": "function form($instance) {\n\t}", "title": "" }, { "docid": "0fa847f257ccb1757a557949c2b507f0", "score": "0.5690918", "text": "function form($instance) {\n\t}", "title": "" }, { "docid": "60f364806d659aaa38b46f142ba2cb5f", "score": "0.5688885", "text": "function lingotek_filters_popup_form($form = array(), $form_state = array()) {\n $form['filter_fieldset']['filters'] = array(\n '#type' => 'container',\n );\n\n // Container to create styleable div class\n $form['filter_fieldset']['filter_buttons'] = array(\n '#type' => 'container',\n );\n\n // Filter submit button\n $form['filter_fieldset']['filter_buttons']['filter_submit'] = array(\n '#type' => 'submit',\n '#value' => t('Submit Filters'),\n '#submit' => array('lingotek_grid_filter_submit'),\n );\n\n // Reset filter defaults button\n $form['filter_fieldset']['filter_buttons']['filter_reset'] = array(\n '#type' => 'submit',\n '#value' => t('Clear Filters'),\n '#submit' => array('lingotek_grid_clear_filters'),\n );\n\n $form_state['values']['filters'] = lingotek_grid_get_filters(TRUE);\n\n $form['filter_fieldset']['filters'] += $form_state['entity_type'] == 'config' ? lingotek_config_build_filters($form_state) : lingotek_grid_build_filters($form_state);\n\n return $form;\n}", "title": "" }, { "docid": "43dc6bfcec3b28a0d81a324750216309", "score": "0.5687611", "text": "protected function makeForm()\n {\n $form = new \\Foundation\\Form;\n $form->setAction($this->_controller->getActionPath());\n $field = $form->newField();\n $field->setLegend($this->_applicationPage->getTitle());\n $field->setInstructions($this->_applicationPage->getInstructions());\n $element = $field->newElement('TextInput', 'schoolSearch');\n $element->setLabel('Search for School');\n $element->addValidator(new \\Foundation\\Form\\Validator\\NotEmpty($element));\n $form->newButton('submit', 'Search');\n \n $form->newHiddenElement('level', 'search');\n $form->getElementByName('submit')->setValue('Search');\n return $form;\n }", "title": "" }, { "docid": "f6df47a3abd2b9b0720544aed6d531c7", "score": "0.5680392", "text": "public function form()\n {\n if (!$this->form) {\n $this->form = new \\Managesend\\Rest\\Form($this);\n }\n return $this->form;\n }", "title": "" }, { "docid": "e51d4140ea4ef9c8d9c1a13df4d93c51", "score": "0.56699723", "text": "protected function form()\n {\n $form = new Form(new Category());\n\n $form->text('name', __('分类名称'));\n $form->text('icon',__('Icon'));\n $form->text('description', __('描述'));\n $form->switch('status', __('状态'))->default(1);\n\n return $form;\n }", "title": "" }, { "docid": "47be51e6d8f4daebc4981c178a6ddca2", "score": "0.566339", "text": "protected function form()\n {\n $form = new Form(new Invite);\n\n return $form;\n }", "title": "" }, { "docid": "d7643f99b24c2e070c398c347fd6a1df", "score": "0.5657992", "text": "public function getForm(){\n $fields = $this->entityMapperFields;\n array_shift ( $fields);\n //return new AdminFormBuilder($this->entity->getReflectionProperties());\n return new AdminFormBuilder($fields);\n \n }", "title": "" }, { "docid": "6ff19e186ebe61cba4fa7bf9d46d391a", "score": "0.5649898", "text": "static function newForm(){\n\t\t$temp = new EForm();\n\t\t$forms[] = $temp;\n\t\treturn $temp;\n\t}", "title": "" }, { "docid": "27d157e0d0344e70f152bd20a4889dcd", "score": "0.56424046", "text": "protected function form()\n {\n $form = new Form(new TopSearchOrders);\n\n $form->text('title', __('Title'));\n $form->number('post_id', __('Post id'));\n $form->text('nickname', __('Nickname'));\n $form->number('member_id', __('Member id'));\n $form->text('price', __('Price'));\n $form->number('expense', __('Expense'));\n $form->time('top_time_limit', __('Top time limit'))->default(date('H:i:s'));\n $form->datetime('top_end_time', __('Top end time'))->default(date('Y-m-d H:i:s'));\n $form->text('transfer_type', __('Transfer type'));\n\n return $form;\n }", "title": "" }, { "docid": "1e557f4936b77d6b90fdf176a0066606", "score": "0.56388164", "text": "public function getForm()\n {\n $entity = $this->getEntity();\n if (!$this->_form) {\n $class = $this->_entityClass;\n $this->_form = $class::getForm($entity);\n }\n $this->_form->setWarnings($this->warnings);\n return $this->_form;\n }", "title": "" }, { "docid": "85d6a1ed90fb23c62a90b5e41eaff3ed", "score": "0.5622188", "text": "protected function _getForm()\n {\n \tif (null == $this->_form) {\n \t\t$entity = new $this->_entityClass;\n \t\t$this->_form = $entity->getForm();\n \t}\n \t\n \treturn $this->_form;\n }", "title": "" }, { "docid": "68085379412d268ae8abbd39693435db", "score": "0.56220883", "text": "public function getForm()\n {\n \tforeach($this->getSessionNamespace() as $key => $data)\n\t\t{\n\t\t\tif($key == 'form1')\n\t\t\t{\n\t\t\t\t$this->_noOfParts = $data['form1']['noOfParts'];\n\t\t\t}\n\t\t}\n\t\t//$this->_noOfParts = 0;\n\t\t$rummyForm = new Admin_RummyConfigMainForm();\n\t\t//Check if there is any form exists in session\n\t\tif((null === $this->_form) && (!$this->_noOfParts))\n\t\t{\n\t\t\t$this->_form = new Admin_MainForm($rummyForm);\n\t\t}\n\t\t//Add as many subforms as many no of parts\n \tif(($this->_temp) && ($this->_noOfParts))\n \t{\n \t\t$configForm = new Admin_RummyConfigForm();\n\t\t\t$this->_form = new Admin_MainForm($rummyForm, $configForm, 1);\n\t\t\t$this->_temp = 0;\t\n \t}\n \treturn $this->_form;\n }", "title": "" }, { "docid": "e5f1b5ca9a984674d4ef0197a34a713f", "score": "0.56208813", "text": "protected function form()\n {\n $form = new Form(new CollagesUserList);\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableView();\n $tools->disableDelete();\n });\n// $form->number('u_id', 'U id');\n// $form->number('g_id', 'G id');\n// $form->number('num', 'Num');\n// $form->mobile('mobile', 'Mobile');\n// $form->number('status', 'Status')->default(1);\n $form->select('status','状态')->options([\n 1 => '拼单进行中',\n 5 => '拼单成功',\n 10 => '拼单失败',\n ]);\n return $form;\n }", "title": "" }, { "docid": "7d25cef5c6156df1067e9f9e8a1f8a60", "score": "0.5613843", "text": "protected function form()\n {\n $form = new Form(new NpcCate);\n\n $form->text('cate_name', '分类名称');\n $form->text('sort', '排序');\n $form->hidden('cid')->value(17);\n $form->hidden('time')->value(time());\n\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n\n $form->footer(function ($footer) {\n $footer->disableReset();\n $footer->disableViewCheck();\n $footer->disableEditingCheck();\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }", "title": "" }, { "docid": "e2ee856c9ef0a2a8cd74093530144974", "score": "0.5609025", "text": "protected function getOroFilter_Form_Type_FilterService()\n {\n return $this->services['oro_filter.form.type.filter'] = new \\Oro\\Bundle\\FilterBundle\\Form\\Type\\Filter\\FilterType($this->get('translator.default'));\n }", "title": "" }, { "docid": "af4ca32cf5c0edb0128293b3adeee982", "score": "0.5608957", "text": "protected function form()\n {\n $form = new Form(new Withdrawal());\n\n\n return $form;\n }", "title": "" }, { "docid": "355967adc9c27f8f218ff059bd98743b", "score": "0.5602743", "text": "protected function form()\n {\n $form = new Form(new FindGoods);\n\n $form->text('code', '单号');\n\n return $form;\n }", "title": "" }, { "docid": "a8c4b7cbe1e5c58b6058ff4a6e3c2946", "score": "0.55968857", "text": "public static function formView();", "title": "" }, { "docid": "ff234302a5552d209b5325853c0bd347", "score": "0.55894375", "text": "function &form($formname){\n if (is_object($this->forms[$formname])==FALSE){\n $this->initializeForm($formname);\n }\n if ($this->forms[$formname]->name==\"\"){\n \t $this->initializeForm($formname);\n }\n if (is_object($this->forms[$formname])==FALSE){\n trigger_error(\"Failed to create form object for form $formname\");\n return NULL;\n }\n return ($this->forms[$formname]);\n }", "title": "" }, { "docid": "0e18fff411a2331e55b646ef6929f22e", "score": "0.5587207", "text": "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create(\n [\n 'data' => [\n 'id' => 'edit_form',\n 'action' => $this->getUrl('adminhtml/*/getFilter'),\n 'method' => 'post',\n ],\n ]\n );\n\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Export Settings')]);\n $fieldset->addField(\n 'entity',\n 'select',\n [\n 'name' => 'entity',\n 'title' => __('Entity Type'),\n 'label' => __('Entity Type'),\n 'required' => false,\n 'onchange' => 'varienExport.getFilter();',\n 'values' => $this->_entityFactory->create()->toOptionArray()\n ]\n );\n $fieldset->addField(\n 'file_format',\n 'select',\n [\n 'name' => 'file_format',\n 'title' => __('Export File Format'),\n 'label' => __('Export File Format'),\n 'required' => false,\n 'values' => $this->_formatFactory->create()->toOptionArray()\n ]\n );\n $fieldset->addField(\n \\Magento\\ImportExport\\Model\\Export::FIELDS_ENCLOSURE,\n 'checkbox',\n [\n 'name' => \\Magento\\ImportExport\\Model\\Export::FIELDS_ENCLOSURE,\n 'label' => __('Fields Enclosure'),\n 'title' => __('Fields Enclosure'),\n 'value' => 1,\n ]\n );\n\n $form->setUseContainer(true);\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "aeb064e17646e5cb5daa94cfbbc8a6a7", "score": "0.5584041", "text": "public function formAction($entity=null);", "title": "" }, { "docid": "380763694facdf8792a96e2982e6fe6e", "score": "0.55830616", "text": "public function get_form() {\n return $this->form;\n }", "title": "" }, { "docid": "b29bb1133bfe55073503f56622a27721", "score": "0.5573283", "text": "protected function form()\n {\n $form = new Form(new CompanyCategory);\n\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n// $footer->disableReset();\n\n // 去掉`提交`按钮\n// $footer->disableSubmit();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n $form->tools(function (Form\\Tools $tools) {\n\n // 去掉`列表`按钮\n// $tools->disableList();\n\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n $form->text('name', __('名称'));\n// $form->number('parent_id', __('Parent id'));\n// $form->number('level', __('Level'));\n// $form->switch('is_directory', __('Is directory'));\n $form->text('desc', __('描述'));\n// $form->number('post_count', __('Post count'));\n\n return $form;\n }", "title": "" }, { "docid": "5cec6233c98b23228814e29226e6fbcf", "score": "0.55731934", "text": "protected function form()\n {\n $form = new Form(new TravelBill);\n $data1 = DirectionLog::getIllustration();\n $data1[0] = 0;\n $form->select('direction_id', 'Direction id')->options($data1)->default(key($data1));\n $form->select('hhx_travel_id', 'Hhx travel id')->options(HhxTravel::getName());\n $form->saving(function ($form) {\n $form->flag = 0;\n if ($form->model()->id) {\n $form->flag = 1;\n }\n });\n return $form;\n }", "title": "" }, { "docid": "40f8050f6aa13a75b869990ceea5ca5e", "score": "0.5568296", "text": "public function EditForm($request = null) {\n\t\t$form = parent::EditForm($request);\n\t\t$fields = $form->Fields();\n\n\t\t/** @var \\GridField $gridField */\n\t\tif ($gridField = $fields->dataFieldByName('Modular-Models-GridListFilters')) {\n\t\t\tif ($config = $gridField->getConfig()) {\n\t\t\t\t$config->addComponent(new GridFieldOrderableRows('Sort'));\n\t\t\t}\n\t\t}\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "cb39ec230b78eebb375ff4fb45e3702e", "score": "0.5563624", "text": "public function getFilterFormId()\n {\n return $this->getId() . '-' . 'filter';\n }", "title": "" }, { "docid": "0e1b72a4d357a6afd9ad6c704d373a83", "score": "0.5559826", "text": "public function getForm ()\n {\n return $this->form;\n }", "title": "" }, { "docid": "2857fc48b8e85e90019fe1d91ff41c57", "score": "0.5556134", "text": "protected function form()\n {\n\n $form = new Form(new News);\n //隐藏右上角查看 删除按钮\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n\n $form->select('comid','所属项目')->options(\n Company::orderBy('id','desc')->pluck('combrand', 'id')\n );\n\n $form->text('title', __('标题'))->required();\n\n $form->text('keyword', __('关键字'));\n\n $form->text('description', __('描述'));\n\n $form->switch('status', __('状态'))->default('1');\n //单图上传\n $form->image('thumb', __('缩略图'))->uniqueName()->removable();\n\n $form->ueditor('content', __('项目内容'));\n\n $form->number('hits', __('点击率'))->value(rand(100,500));\n //隐藏\n $form->hidden('author_id', __('添加人'))->value(Auth::guard('admin')->user()->id);\n\n return $form;\n }", "title": "" }, { "docid": "3e6a11f71dc7dee56a6b0858a478fbbc", "score": "0.55558306", "text": "protected function form()\n {\n $form = new Form(new News);\n\n $form->text('title', '标题');\n $form->text('keywords', 'SEO关键字');\n $form->text('description', 'SEO描述');\n $form->select('type', '分类')->options([\n 1 => '公司新闻',\n 2 => '行业新闻',\n 3 => '常见问题',\n 4 => '文件柜资讯',\n 5 => '档案密集架',\n 6 => '更衣柜',\n 7 => '保险柜',\n 8 => '校用家具',\n 9 => '保密文件柜',\n 10 => '智能密集柜',\n 11 => '铁皮档案柜',\n ])->default(1);\n $form->text('ly', '来源');\n $form->image('thumb', '缩略图')->uniqueName();\n $form->text('desc', '副标题');\n $form->text('tag', '标签');\n $form->radio('is_hot', '热门搜索')->options([0 => '否', 1 => '是']);\n $form->editor('data', '详情');\n\n return $form;\n }", "title": "" }, { "docid": "40749db22332af58f8571e965da0a5b4", "score": "0.55468535", "text": "private function createSearchForm()\n {\n\t$formBuilder = $this->get('form.factory')->createNamedBuilder('pobox_type', 'form', array())\n \n\t ->add('number', 'number', array('label' => 'Número de casillero', 'attr' => array('style' => 'width: 10em')))\n\t ->add('namecustomer', 'text', array('label' => 'Nombre del cliente'))\n\t ->add('lastnamecustomer', 'text', array('label' => 'Apellido del cliente'))\n\t ->add('email','text', array('label' => 'Email del cliente'))\n\t ->add('search', 'button', array('label' => 'Buscar'))\n ->getForm()\n ;\n\treturn $formBuilder;\n }", "title": "" }, { "docid": "0144336eac9c24eb596775f691ed5acd", "score": "0.55464375", "text": "public function getForm($data = array(), $loadData = true)\n\t{\n\t\t// Get the form.\n\t\t$form = $this->loadForm('com_finder.filter', 'filter', array('control' => 'jform', 'load_data' => $loadData));\n\n\t\tif (empty($form))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "eaaf20df0ba565214e6e2718a8017440", "score": "0.55430126", "text": "protected function form()\n {\n $form = new Form(new Nav);\n\n $form->text('name', '导航名称');\n $form->number('sort', '排序');\n $form->number('status', '状态');\n\n\n return $form;\n }", "title": "" }, { "docid": "d64ebb0e483f86c77257dbdd3c02ad96", "score": "0.5542065", "text": "public function get_form()\n\t{\n\t\treturn $this->_form;\n\t}", "title": "" }, { "docid": "20a72b94988bd51be02fc998fddd4ef5", "score": "0.55391526", "text": "public function getFilterBean() : Filter {\n\t\tif($_SERVER[\"REQUEST_METHOD\"] == \"FILTER\"){\n\t\t\t$_POST = HTTPUtils::parsePost();\n\t\t}\n\t\t\n\t\t$filter = new Filter();\n\t\t$filter->addFilterField(\"mandt\",\"integer\",$_POST[\"filter\"][\"mandt\"]);\n\t\t$filter->addFilterField(\"server\",\"string\",$_POST[\"filter\"][\"server\"]);\n\t\t$filter->addFilterField(\"smtp_host\",\"string\",$_POST[\"filter\"][\"smtp_host\"]);\n\t\t$filter->addFilterField(\"smtp_port\",\"integer\",$_POST[\"filter\"][\"smtp_port\"]);\n\t\t$filter->addFilterField(\"smtp_auth\",\"boolean\",$_POST[\"filter\"][\"smtp_auth\"]);\n\t\t$filter->addFilterField(\"smtp_secure\",\"string\",$_POST[\"filter\"][\"smtp_secure\"]);\n\t\t$filter->addFilterField(\"pop_host\",\"string\",$_POST[\"filter\"][\"pop_host\"]);\n\t\t$filter->addFilterField(\"pop_port\",\"integer\",$_POST[\"filter\"][\"pop_port\"]);\n\t\t$filter->addFilterField(\"pop_secure\",\"string\",$_POST[\"filter\"][\"pop_secure\"]);\n\t\t$filter->addFilterField(\"status\",\"string\",$_POST[\"filter\"][\"status\"]);\n\t\t\n\t\t// ordenação\n\t\t$filter->addSort($_POST[\"order\"][\"field\"],$_POST[\"order\"][\"type\"]);\n\t\t\n\t\t// limite\n\t\t$filter->setLimit(intval($_POST[\"limit\"]));\n\t\t\n\t\t// offset\n\t\t$filter->setOffset(intval($_POST[\"offset\"]));\n\t\t\n\t\treturn $filter;\n\t}", "title": "" }, { "docid": "a9cc2120077d4886de2b164676feb0a1", "score": "0.55369174", "text": "public function show(Form $form)\n {\n //\n }", "title": "" }, { "docid": "f5ea60832888511969058aae333e728a", "score": "0.55220354", "text": "public function form(): Form\n {\n return $this->form;\n }", "title": "" }, { "docid": "a9e3fa7e67373730053a573d565a183a", "score": "0.55141824", "text": "protected function form()\n {\n $form = new Form(new Category());\n\n $form->text('name', '分类名称')->rules('required');\n $form->text('icon', 'Iconfont 图标')->rules('required');\n $form->textarea('description', '分类描述');\n\n $form->footer(function ($footer) {\n $footer->disableViewCheck();\n $footer->disableEditingCheck();\n });\n\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableView();\n });\n\n return $form;\n }", "title": "" }, { "docid": "218fa799c790ebfafd820342c9dcbf5f", "score": "0.55138755", "text": "public function SearchForm()\n {\n // If we have setup objects to search\n if (count(Searchable::config()->objects)) {\n $searchText = \"\";\n\n if ($this->owner->request && $this->owner->request->getVar('Search')) {\n $searchText = $this->owner->request->getVar('Search');\n }\n\n $fields = FieldList::create(\n TextField::create('Search', false, $searchText)\n ->setAttribute(\"placeholder\", _t('Searchable.Search', 'Search'))\n );\n\n $actions = FieldList::create(\n FormAction::create('results', _t('Searchable.Go', 'Go'))\n );\n\n $template_class = Searchable::config()->template_class;\n $results_page = Injector::inst()->create($template_class);\n\n $form = Form::create(\n $this->owner,\n 'SearchForm',\n $fields,\n $actions\n )->setFormMethod('get')\n ->setFormAction($results_page->Link())\n ->setTemplate('ilateral\\SilverStripe\\Searchable\\Includes\\SearchForm')\n ->disableSecurityToken();\n\n $this->owner->extend(\"updateSearchForm\", $form);\n\n return $form;\n }\n }", "title": "" }, { "docid": "cb7f6afc8922e23695ffa484a631b89f", "score": "0.55103755", "text": "protected function form()\n {\n $form = new Form(new Project());\n\n $form->switch('is_active', __('Is active'));\n $form->text('project_name', __('Project name'))->required();\n $form->text('project_bundle', __('Project bundle'))->required();\n $form->datetime('accessible_from', __('Accessible from'))->default(date('Y-m-d H:i:s'));\n $form->datetime('accessible_to', __('Accessible to'))->default(date('Y-m-d H:i:s'));\n $form->keyValue('stands', __('Stands'));\n\n return $form;\n }", "title": "" }, { "docid": "eebe2d6c751e2fd41319c380ac3fb2e1", "score": "0.5508762", "text": "public function form( $instance ) {\n\t}", "title": "" }, { "docid": "eebe2d6c751e2fd41319c380ac3fb2e1", "score": "0.5508762", "text": "public function form( $instance ) {\n\t}", "title": "" }, { "docid": "6c67803e7faac2e452129cc8cfc9e1e3", "score": "0.55057865", "text": "protected function form()\n {\n $form = new Form(new Projet());\n\n\n $form->display('id', __('ID'));\n $form->text('titre', __('Titre'));\n $form->textarea('description', __('Description'));\n $form->image('img_path', __('Image'))->uniqueName();\n $form->text('img_alt', __('Alt'));\n $form->switch('display', __('Affiché'));\n $form->switch('accueil', __('Affiché sur l\\'accueil'));\n $form->multipleSelect('technos', 'Technos')->options(Techno::all()->pluck('nom', 'id'));\n $form->hasMany('lienExts','Liens extérieurs', function (Form\\NestedForm $form) {\n $form->url('url', 'url');\n $form->text('texte', 'Texte')->default('');\n $form->text('fa_class', 'Font Awesome Class');\n $form->switch('in_footer', 'Dans le footer')->default(0);\n $form->switch ('git', 'Lien git ?')->default(0);\n });\n\n return $form;\n }", "title": "" }, { "docid": "85490c84ca117a54916d221b5c330107", "score": "0.5505747", "text": "public function createForm(): Form;", "title": "" }, { "docid": "0cc773111785bc25f074d8c727d37896", "score": "0.55018735", "text": "public function setForm($form);", "title": "" }, { "docid": "7dbbff2fa7e56fb288996990e7bb3686", "score": "0.5497495", "text": "protected function form()\n {\n $form = new Form(new Professional);\n\n $form->text('Institution_Name', '服务机构名称');\n $form->select('category_id', '服务机构类型')->options(BaseCategory::selectOptions(null,'',1316));\n $form->text('Contact', '联系人');\n $form->text('Telephone', '联系电话');\n $form->textarea('Introduce', '机构介绍');\n $form->image('Qrcode_URL', '二维码')->uniqueName()->removable();\n $form->switch('is_hidden', '是否显示')->states(ProfessionalEnum::getSwitchIsHiddenStatus())->default(ProfessionalEnum::IS_HIDDEN_TRUE);\n return $form;\n }", "title": "" }, { "docid": "47442eb5e11091e4f27da7840877cd55", "score": "0.5482805", "text": "public function form( $instance ) {\n\t\t/* ... */\n\t}", "title": "" }, { "docid": "ae43e584a8caaf852b6c0d7d1c89420d", "score": "0.54787326", "text": "public function getForm()\n {\n return $this->hasOne(Form::className(), ['id' => 'formid']);\n }", "title": "" }, { "docid": "0185ac9966c2c0e0a155ff7649c2aa6d", "score": "0.5477276", "text": "public function form( $instance ) {\n $this->get_form($instance);\n }", "title": "" }, { "docid": "68197c9aa2103488a0d55f5b5566205b", "score": "0.5475695", "text": "protected function form()\n {\n $form = new Form(new Industry);\n $form->disableViewCheck();\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableView();\n });\n $form->hidden('site_id')->default(site()->get());\n $form->select('parent_id', __('所属行业'))->options(Industry::selectOptions());\n $form->text('name', __('名称'));\n $form->number('sort', __('排序'))->default(0);\n \n return $form;\n }", "title": "" }, { "docid": "ce328870daf6161917aa495463a0ad27", "score": "0.5471778", "text": "public function form($instance) {\n\n\t}", "title": "" }, { "docid": "433e7d3e205b24ccdc883ab06de433d0", "score": "0.5470878", "text": "protected function form()\n {\n $form = new Form(new Service());\n\n $form->text('service_name', __('Service name'))->rules('required|max:250');\n $form->image('service_img', __('Service img'))->move('service_images')->uniqueName()->rules('required');\n $form->text('service_price', __('Service price'))->rules('required|numeric');\n\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete(); \n $tools->disableView();\n });\n $form->footer(function ($footer) {\n $footer->disableViewCheck();\n $footer->disableEditingCheck();\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }", "title": "" }, { "docid": "d0883f0b61d0077df5174a8878d79342", "score": "0.5470268", "text": "public function getForm($name)\n\t{\n\t\t$form = 'forms_'.$name;\n\t\t$this->forms[$name] = new $form();\n\t\treturn $this->forms[$name];\n\n\t}", "title": "" }, { "docid": "5cb73658a82408ce61840beebb83d1c9", "score": "0.54609084", "text": "public function getForm($prefix = null, $type = null);", "title": "" }, { "docid": "19bb5842287ed0af86d9f8eb9eda6cda", "score": "0.545799", "text": "protected function form()\n {\n $form = new Form(new Classes());\n\n $form->text('name', __('名称'));\n $form->text('title', __('标题'));\n $form->image('img', __('封面图'))->required()->name(function($file) {\n //为用户用户文件名添加前缀\n return md5(microtime()).'.' . $file->extension();\n });\n\n $states = [\n 'on' => ['value' => 1, 'text' => '是', 'color' => 'success'],\n 'off' => ['value' => 2, 'text' => '否', 'color' => 'danger'],\n ];\n $form->switch('show',__('是否首页展示'))->states($states);\n $form->number('sort', __('排序'));\n $states = [\n 'on' => ['value' => 2, 'text' => '审核通过', 'color' => 'success'],\n 'off' => ['value' => 3, 'text' => '审核不通过', 'color' => 'danger'],\n ];\n $form->switch('status',__('状态'))->states($states);\n\n return $form;\n }", "title": "" }, { "docid": "bf41269e6a64660fc67d28e5344e5131", "score": "0.54520243", "text": "protected function form()\n {\n $form = new Form(new Category);\n\n $form->text('name', '分类名称');\n $form->image('icon', '分类图标')->move('categories');\n /*$colors = Color::all()->mapWithKeys(function ($item) {\n $color = '<span style=\"display: inline-block; width: 22px;height: 22px;background-color:' . $item['rgb'] . '\"></span> ';\n return [$item['id'] => $color . $item['name']];\n });*/\n $form->checkbox('colors', '颜色值')->options(Color::all()->pluck('name', 'id'));\n $form->number('sort', '排序值');\n\n return $form;\n }", "title": "" }, { "docid": "9cc2fe282796d29918bd4756e375ba0e", "score": "0.54514444", "text": "protected function form()\n {\n $form = new Form(new Category);\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`查看`按钮\n $tools->disableView();\n $tools->disableDelete();\n });\n\n $id= 0;\n $param = request()->route()->parameters();\n if($param) $id = $param['category'];\n\n $form->text('title', '分类名称')->rules('required',['required'=>'必填内容不能为空']);\n $form->image('image', '分类图片')->uniqueName();\n\n $form->select('pid', '上级分类')->options(function () use ($id){\n return Category::getAll($id);\n }\n )->default(0);\n// $form->number('sort', '排序')->default(100);\n// $form->switch('status', '状态')->states($this->is_top)->default(1);\n// $form->switch('is_top', '置顶(nav是否展示在首页)')->states($this->is_top)->default(2);\n// $form->switch('is_right', '侧栏(是否展示在首页侧栏)')->states($this->is_right)->default(2);\n//\n// $form->radio('type','类型')->options(['1' => '列表', '2'=> '单页','3'=>'图片'])->default(1);\n\n return $form;\n }", "title": "" }, { "docid": "98b8aa3ef673fbbefef8f68edaea0088", "score": "0.5450542", "text": "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('log_name', __('Log name'));\n $form->text('description', __('Description'));\n $form->number('subject_id', __('Subject id'));\n $form->text('subject_type', __('Subject type'));\n $form->number('causer_id', __('Causer id'));\n $form->text('causer_type', __('Causer type'));\n $form->textarea('properties', __('Properties'));\n\n return $form;\n }", "title": "" }, { "docid": "758a0dfa2985b7c5a8d309a5a1657f32", "score": "0.544541", "text": "public function form()\n {\n // --------------------------------------\n // Initiate data arrays for form creation\n // --------------------------------------\n\n $data = $params = $form_params = array();\n\n // --------------------------------------\n // Collect form params\n // --------------------------------------\n\n foreach (array_keys(pro_array_get_prefixed(ee()->TMPL->tagparams, 'form_', true)) as $key) {\n $form_params[$key] = $this->_extract_tagparam('form_' . $key);\n }\n\n // --------------------------------------\n // Read parameters\n // --------------------------------------\n\n $this->params->set();\n\n // --------------------------------------\n // Set parameters to shortcut?\n // --------------------------------------\n\n if (\n ($shortcut = $this->_get_shortcut()) &&\n ($this->_extract_tagparam('remember_shortcut') == 'yes')\n ) {\n $params = array_merge($params, $shortcut['parameters']);\n }\n\n // --------------------------------------\n // Are we remembering parameters?\n // --------------------------------------\n\n if ($remember = ee()->TMPL->fetch_param('remember')) {\n foreach (explode('|', $remember) as $key) {\n $params[$key] = $this->params->get($key);\n }\n }\n\n // --------------------------------------\n // Overwrite-able params\n // --------------------------------------\n\n foreach (array('result_page') as $key) {\n $params[$key] = ee()->TMPL->fetch_param($key);\n }\n\n // --------------------------------------\n // One-off params\n // --------------------------------------\n\n foreach (array('required', 'force_protocol') as $key) {\n $params[$key] = $this->_extract_tagparam($key);\n }\n\n // --------------------------------------\n // Encode and put parameters in hidden form field\n // --------------------------------------\n\n if ($params = array_filter($params, 'pro_not_empty')) {\n $data['hidden_fields']['params'] = pro_search_encode($params);\n }\n\n // --------------------------------------\n // Define the action ID\n // --------------------------------------\n\n $data['hidden_fields']['ACT'] = ee()->functions->fetch_action_id($this->class_name, 'catch_search');\n\n // --------------------------------------\n // Get opening form tag\n // --------------------------------------\n\n $form = ee()->functions->form_declaration($data);\n\n // --------------------------------------\n // Add form params to it\n // --------------------------------------\n\n if ($form_params) {\n $form = str_replace('<form ', '<form ' . pro_param_string($form_params) . ' ', $form);\n }\n\n // --------------------------------------\n // Return output\n // --------------------------------------\n\n return $form . $this->filters() . '</form>';\n }", "title": "" }, { "docid": "e539866822be3dc543786de7dce1be46", "score": "0.54405266", "text": "private function PageForm() {\n\n\tif (empty($this->oForm)) {\n\t $oForm = new fcForm_DB($this);\n\n\t $oField = new fcFormField_Num($oForm,'ID_Item');\n\n\t $oField = new fcFormField_Num($oForm,'ID_Bin');\n\t\t$oCtrl = new fcFormControl_HTML_DropDown($oField,array());\n\t\t$oCtrl->Records($this->BinTable()->GetActive());\n\t \n\t $oField = new fcFormField_Num($oForm,'Qty');\n\t\t$oCtrl = new fcFormControl_HTML($oField,array('size'=>2));\n\t \n\t $oField = new fcFormField_Time($oForm,'WhenAdded');\n\t \n\t $oField = new fcFormField_Time($oForm,'WhenChanged');\n\n\t $oField = new fcFormField_Time($oForm,'WhenCounted');\n\t \n\t $oField = new fcFormField_Time($oForm,'WhenCleared');\n\t \n\t $oField = new fcFormField_Num($oForm,'Cost');\n\t\t$oCtrl = new fcFormControl_HTML($oField,array('size'=>5));\n\n\t $oField = new fcFormField_Text($oForm,'CatNum');\n\t\t$oCtrl = new fcFormControl_HTML($oField,array('size'=>20));\n\n\t $oField = new fcFormField_Text($oForm,'Notes');\n\t\t$oCtrl = new fcFormControl_HTML_TextArea($oField,array('rows'=>3,'cols'=>60));\n\n\t $this->oForm = $oForm;\n\t}\n\treturn $this->oForm;\n }", "title": "" }, { "docid": "e1d664d251cacda0c47efac9cd38603e", "score": "0.5428984", "text": "public function forms();", "title": "" }, { "docid": "06d274741917ae34c687ca7d1d8cef2f", "score": "0.54273856", "text": "protected function form()\n {\n $form = new Form(new Plug());\n\n $form->image('img', __('图片'))->required();\n $form->switch('is_show', __('是否显示'))->states([\n 'on'=>['value' => 1, 'text' => '打开', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => '关闭', 'color' => 'danger']\n ]);\n\n return $form;\n }", "title": "" } ]
7798f29b8a0eb3db03772ee54abb33b8
add a color color are unique color are in hexadecimal with the "" (i.e: aaafff)
[ { "docid": "779c002363fa57c4cf757c296b3cea12", "score": "0.0", "text": "public function add($code);", "title": "" } ]
[ { "docid": "ca86316b74a37a46bfcc99a74a0a63f7", "score": "0.70907956", "text": "function addColor($image, $color) {\r\n\tif ((strlen($color) != 6) && (strlen($color) != 3)) {\r\n\t\t$color = \"FFF\";\r\n\t}\r\n\t## 3 or 6 character HEX?\r\n\tif (strlen($color) == 6) {\r\n\t\t$bg\t= imagecolorallocate($image, hexdec($color[0].$color[1]), hexdec($color[2].$color[3]), hexdec($color[4].$color[5]));\r\n\t} else if (strlen($color) == 3) {\r\n\t\t$bg\t= imagecolorallocate($image, hexdec($color[0].$color[0]), hexdec($color[1].$color[1]), hexdec($color[2].$color[2]));\r\n\t}\r\n\t## Add the color\r\n\timagefill($image, 0, 0, $bg);\r\n\t## Return the imae\r\n\treturn $image;\r\n}", "title": "" }, { "docid": "84ded50bc49c7bc9f1bea0044bcfae22", "score": "0.6714405", "text": "function ColorShader($color, $dif=20){\n \n $color = str_replace('#', '', $color);\n if (strlen($color) != 6){ return '000000'; }\n $rgb = '';\n \n for ($x=0;$x<3;$x++){\n $c = hexdec(substr($color,(2*$x),2)) - $dif;\n $c = ($c < 0) ? 0 : dechex($c);\n $rgb .= (strlen($c) < 2) ? '0'.$c : $c;\n }\n \n return '#'.$rgb;\n}", "title": "" }, { "docid": "ed0c1498c3be754abcc3759638d200ee", "score": "0.6698743", "text": "function livicons_evolution_sanitize_hex_color( $color ) {\n\tif ( '' === $color )\n\t\treturn '#000000'; //black by default\n\t// 3 or 6 hex digits, or the empty string.\n\tif ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) )\n\t\treturn $color;\n\treturn '#000000'; //black by default\n}", "title": "" }, { "docid": "802a03cf5802b868401d56760a178ba3", "score": "0.66358644", "text": "function stag_maybe_hash_hex_color( $color ) {\n\tif ( $unhashed = stag_sanitize_hex_color_no_hash( $color ) )\n\t\treturn '#' . $unhashed;\n\n\treturn $color;\n}", "title": "" }, { "docid": "9b9b4ccc159914b5764aa37d3f4ab099", "score": "0.65785134", "text": "function smush_sanitize_hex_color( $color ) {\n\t\tif ( '' === $color ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t// 3 or 6 hex digits, or the empty string.\n\t\tif ( preg_match( '|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) ) {\n\t\t\treturn $color;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "8e7de1542eafdc09293868b356caa878", "score": "0.64868623", "text": "function DtCSS__makecolor($a) {\n\treturn '#' . DtCSS__hexcolor($a[0]) . DtCSS__hexcolor($a[1]) . DtCSS__hexcolor($a[2]);\n}", "title": "" }, { "docid": "7efed463d1bb74571681ccca4de2fbf9", "score": "0.64799285", "text": "function personal_sanitize_hex_color( $color ) {\n\tif ( '#FF0000' === $color ) \n\t\treturn '';\n\n\t// 3 or 6 hex digits, or the empty string.\n\tif ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) )\n\t\treturn $color;\n\n\treturn null;\n}", "title": "" }, { "docid": "3d5fd4f1a3791168e46e10aed8129fcf", "score": "0.6475216", "text": "function stag_sanitize_hex_color( $color ) {\n\tif ( '' === $color )\n\t\treturn '';\n\n\t// 3 or 6 hex digits, or the empty string.\n\tif ( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color ) )\n\t\treturn $color;\n\n\treturn null;\n}", "title": "" }, { "docid": "03121f6ac94ab628a60f862c25dd2ffb", "score": "0.63928163", "text": "protected function color($name) {\n\t\t$color = substr(md5($name), 6, 6);\n\t\treturn sprintf('rgba(%s, %s, %s, 0.5)', hexdec(substr($color, 0, 2)), hexdec(substr($color, 2, 2)), hexdec(substr($color, 4, 2)));\n\t}", "title": "" }, { "docid": "246a4f96aced7abdcb4bb5865d6eebb8", "score": "0.638544", "text": "public function hex_clean($color)\n\t{\n\t\t$color = str_replace('#', '', $color);\n\t\t$length = strlen($color);\n\t\tif ($length == 6)\n\t\t\treturn $color;\n\t\n\t\t$append = '';\n\t\tswitch ($length)\n\t\t{\n\t\t\tcase '3':\n\t\t\t\t$prepend = '';\n\t\t\tbreak;\n\t\t\tcase '4':\n\t\t\t\t$prepend = substr($color, 0, 2);\n\t\t\t\t$color = substr($color, 2, 2);\n\t\t\tbreak;\n\t\t\tcase '5':\n\t\t\t\t$prepend = $color.substr($color, 4, 1);\n\t\t\t\t$color = '';\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->raise_error('invalid_hex');\n\t\t}\n\t\t\n\t\t// iterate over color and construct append\n\t\t$iterate = strlen($color);\n\t\tfor($a=0; $a<$iterate; $a++)\n\t\t\t$append .= $color[$a].$color[$a];\n\t\n\t\treturn $prepend.$append;\n\t}", "title": "" }, { "docid": "6dbe5c60e5b417c243291d65ec989f53", "score": "0.6295536", "text": "function color_checker($hex_color_string) {\r\n if (strlen($hex_color_string)==7) {\r\n $hex_color_string=str_replace(\"#\",\"\",$hex_color_string);\r\n }\r\n if (strlen($hex_color_string)==4) {\r\n $hex_color_string=str_replace(\"#\",\"\",$hex_color_string);\r\n }\r\n \r\n if (strlen($hex_color_string)==3) {\r\n \r\n return;\r\n }\r\n \r\n if (strlen($hex_color_string)==6) {\r\n \r\n return;\r\n }\r\n \r\n $this->error(\"Farbe konnte nicht erkannt werden!\");\r\n }", "title": "" }, { "docid": "357f00105592a7859c0e4e78b01de0fb", "score": "0.62767303", "text": "function ConvertColor2RGB($col,$add=0)\n{\n \t$r=hexdec(substr($col,0,2));\n \t$r=($r+$add>255) ? 255 : $r+$add;\n \t$g=hexdec(substr($col,2,2));\n \t$g=($g+$add>255) ? 255 : $g+$add;\n \t$b=hexdec(substr($col,4,2));\n \t$b=($b+$add>255) ? 255 : $b+$add;\n \treturn \"rgb($r, $g, $b)\";\n}", "title": "" }, { "docid": "80ffe64f55a673166e74b65c07aec3c5", "score": "0.6217543", "text": "function colour_str($num) { /*\n\tGLOBAL $COLOUR;\n\tif ($COLOUR === false) {\n\t\treturn \"\";\n\t} else {\n\t\tswitch($num) {\n\t\t\tcase COLOR_BLACK:\treturn \"\\x1b\\x5b\\x33\\x30\\x6d\";\n\t\t\tcase COLOR_RED:\t\treturn \"\\x1b\\x5b\\x33\\x31\\x6d\";\n\t\t\tcase COLOR_GREEN:\treturn \"\\x1b\\x5b\\x33\\x32\\x6d\";\n\t\t\tcase COLOR_YELLOW:\treturn \"\\x1b\\x5b\\x33\\x33\\x6d\";\n\t\t\tcase COLOR_BLUE:\treturn \"\\x1b\\x5b\\x33\\x34\\x6d\";\n\t\t\tcase COLOR_MAGENTA:\treturn \"\\x1b\\x5b\\x33\\x35\\x6d\";\n\t\t\tcase COLOR_CYAN:\treturn \"\\x1b\\x5b\\x33\\x36\\x6d\";\n\t\t\tcase COLOR_WHITE:\treturn \"\\x1b\\x5b\\x33\\x37\\x6d\";\n\t\t\tcase COLOR_NORMAL:\treturn \"\\x1b\\x5b\\x33\\x39\\x6d\";\n\t\t}\n\t}\n\treturn \"\";\n*/\n}", "title": "" }, { "docid": "d162c346ade17ee0621a4a926454c956", "score": "0.62011033", "text": "function stag_sanitize_hex_color_no_hash( $color ) {\n\t$color = ltrim( $color, '#' );\n\n\tif ( '' === $color )\n\t\treturn '';\n\n\treturn stag_sanitize_hex_color( '#' . $color ) ? $color : null;\n}", "title": "" }, { "docid": "565836d58ca2fb608adb3075f28d8e9e", "score": "0.6200137", "text": "public function getIconColorRgbString()\n {\n $rgb = sprintf(\"%06X\", $this->icon_color);\n return '#'.$rgb;\n }", "title": "" }, { "docid": "115dd174c420578c447f5d8023a419fa", "score": "0.6190542", "text": "private function aristath_sanitize_hex( $color = '#FF5500', $hash = true ) {\n\t\t$color = trim( $color );\n\t\t// Remove any trailing '#' symbols from the color value\n\t\t$color = str_replace( '#', '', $color );\n\t\t// If the string is 6 characters long then use it in pairs.\n\t\tif ( 3 == strlen( $color ) ) {\n\t\t\t$color = substr( $color, 0, 1 ) . substr( $color, 0, 1 ) . substr( $color, 1, 1 ) . substr( $color, 1, 1 ) . substr( $color, 2, 1 ) . substr( $color, 2, 1 );\n\t\t}\n\t\t$substr = array();\n\t\tfor ( $i = 0; $i <= 5; $i++ ) {\n\t\t\t$default = ( 0 == $i ) ? 'F' : ( $substr[$i-1] );\n\t\t\t$substr[$i] = substr( $color, $i, 1 );\n\t\t\t$substr[$i] = ( false === $substr[$i] || ! ctype_xdigit( $substr[$i] ) ) ? $default : $substr[$i];\n\t\t}\n\t\t$hex = implode( '', $substr );\n\t\treturn ( ! $hash ) ? $hex : '#' . $hex;\n\t}", "title": "" }, { "docid": "76ca86b1dc546c550511344ce43eb1a0", "score": "0.6188391", "text": "function getColor($colorChaine){\r\n\t\t$tab = split(\",\",str_replace(\")\",\"\",str_replace(\"rgb(\",\"\",$colorChaine)));\r\n $r=mysql_query(sprintf(\"select ID_COULEUR from HistoriqueCouleur where ROUGE = %s AND VERT = %s AND BLEU = %s\",$tab[0],$tab[1],$tab[2]));\r\n if(mysql_num_rows($r)==0){\r\n // On l'insere\r\n mysql_query(sprintf(\"insert into HistoriqueCouleur (ROUGE,VERT,BLEU) values(%d,%d,%d)\",$tab[0],$tab[1],$tab[2]));\r\n return mysql_insert_id();\r\n }\r\n return mysql_result($r,0,0);\r\n\t}", "title": "" }, { "docid": "11f5454b9b4ac8eb4587c0c3de5f67cd", "score": "0.61525595", "text": "private function createColorIndexString()\n\t{\n\t\t$initialIndex = \"01234567\";\n\n\t\treturn $initialIndex;\n\t}", "title": "" }, { "docid": "76ffa7d96c5e3f2e7a472a7d380b680e", "score": "0.6146405", "text": "function mts_check_hex_color($hex) {\n\n $color = str_replace(\"#\", \"\", $hex);\n\n // Make sure it's 6 digits\n\n if (strlen($color) == 3) {\n $color = $color[0] . $color[0] . $color[1] . $color[1] . $color[2] . $color[2];\n }\n\n return $color;\n}", "title": "" }, { "docid": "b75756b6f47de94595f898d1253ac65f", "score": "0.6126141", "text": "public function hex($orig_color, $mod_color, $mod)\n\t{\n\t\t$orig_color = $this->hex_clean($orig_color);\n\t\t$mod_color = $this->hex_clean($mod_color);\n\t\n\t\tpreg_match(\"/([0-9]|[A-F]){6}/i\",$orig_color,$orig_arr);\n\t\tpreg_match(\"/([0-9]|[A-F]){6}/i\",$mod_color,$mod_arr);\n\t\t$ret = '';\n\t\tif ($orig_arr[0] AND $mod_arr[0]) \n\t\t{\n\t\t for ($i=0; $i<6; $i=$i+2) \n\t\t {\n\t\t $orig_x = substr($orig_arr[0],$i,2);\n\t\t $mod_x = substr($mod_arr[0],$i,2);\n\t\t if ($mod == '+') \n\t\t { \n\t\t \t$new_x = hexdec($orig_x) + hexdec($mod_x); \n\t\t }\n\t\t else \n\t\t { \n\t\t \t$new_x = hexdec($orig_x) - hexdec($mod_x); \n\t\t }\n\t\t \n\t\t if ($new_x < 0) \n\t\t { \n\t\t \t$new_x = 0; \n\t\t }\n\t\t else if ($new_x > 255) \n\t\t { \n\t\t \t$new_x = 255; \n\t\t }\n\t\t $new_x = dechex($new_x);\n\t\t $ret .= $new_x;\n\t\t }\n\t\t \n\t\t if ( ! $ret) $ret = 'ffffff';\n\t\t \n\t\t return '#'.$ret;\n\t\t}\n\t}", "title": "" }, { "docid": "df56f731920d738f7c8b1e93d0fd5431", "score": "0.6116015", "text": "public function toHex()\n\t{\n\t\treturn '#'.$this->rgb;\n\t}", "title": "" }, { "docid": "8ff348b353d67ba6970f5c343ea905f2", "score": "0.6114478", "text": "private function addColor( $s, $r=1 ){\n\t\t\t\n\t\t\t$c = \"white\";\n\t\t\tif ( $s != 0 )\n\t\t\t\t$c = ($r*$s>0) ? \"green\" : \"red\";\n\t\t\t\n\t\t\treturn \"<span style=\\\"color:$c;\\\">$s</span>\";\n\t\t\t\n\t\t}", "title": "" }, { "docid": "dbff9448d151300a103c44364f6baa93", "score": "0.60718393", "text": "function addColour($hexcode) {\n\t\t$this->hex2rgb($hexcode);\n\t\t\n\t\t// Register in the colour table array\n\t\t$this->colour_table[] = array(\n\t\t\t\"red\"\t=>\t$this->colour_rgb[\"red\"],\n\t\t\t\"green\"\t=>\t$this->colour_rgb[\"green\"],\n\t\t\t\"blue\"\t=>\t$this->colour_rgb[\"blue\"]\n\t\t);\n\t}", "title": "" }, { "docid": "982c4cefb05b24ff21d52dedf443ac49", "score": "0.6071233", "text": "static public function get_color() {\n\t\t$r = rand( 40, 140 );\n\t\t$g = rand( 40, 140 );\n\t\t$b = rand( 40, 140 );\n\t\treturn '#' . dechex( $r ) . dechex( $g ) . dechex( $b );\n\t}", "title": "" }, { "docid": "8e83fb0efeb840b3dd675a140ad468ae", "score": "0.60696274", "text": "function DtCSS__hexcolor($x) {\n\t$v = dechex(floor($x * 255));\n\tif (strlen($v) < 2) return '0' . $v;\n\treturn $v;\n}", "title": "" }, { "docid": "f40f500e84b3d6455f1bcac6db3dee77", "score": "0.6069046", "text": "private function hextorgb_color($color) {\r\n\r\n\t\tif (!preg_match(\"/^\\#[a-f0-9]{6}$/\", $color)) {\r\n\t\t\tthrow new Exception('Color not valid');\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t$arrtmp = explode(' ', chunk_split($color, 2, \" \"));\r\n\t\t$arrtmp = array_map(\"hexdec\", $arrtmp);\r\n\t\treturn array('red' => $arrtmp[0]/255, 'green' => \r\n\t\t*/\r\n\r\n\t\treturn array('red' => hexdec('0x' . $color{1} . $color{2}), 'green' => hexdec('0x' . $color{3} . $color{4}), 'blue' => hexdec('0x' . $color{5} . $color{6}));\r\n\r\n\t}", "title": "" }, { "docid": "7bb0f1b09180c241cff67994b59267ef", "score": "0.6053216", "text": "public function getColor();", "title": "" }, { "docid": "7bb0f1b09180c241cff67994b59267ef", "score": "0.6053216", "text": "public function getColor();", "title": "" }, { "docid": "1a18c1c768cb43095dc807e0b0acd779", "score": "0.6051497", "text": "public function convertColor($color) {\n\t\t$color = trim($color);\n\t\tif(strpos($color, ' ') !== false) {\n\t\t\t$colors = explode(' ', $color);\n\t\t\tforeach($colors as $background_part) {\n\t\t\t\tif(substr(trim($background_part), 0, 1) == '#' ||\n\t\t\t\t\tin_array(trim($background_part), array_keys($this->color_names)) ||\n\t\t\t\t\tstrtolower(substr(trim($background_part), 0, 3)) == 'rgb') {\n\t\t\t\t\t\t$color = $background_part;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Normal hex color\n\t\tif(substr($color, 0, 1) == '#') {\n\t\t\tif(strlen($color) == 7) {\n\t\t\t\treturn str_replace('#', '', $color);\n\t\t\t}\n\t\t\telseif (strlen($color) == 4) {\n\t\t\t\treturn substr($color, 1, 1).substr($color, 1, 1).\n\t\t\t\t\t substr($color, 2, 1).substr($color, 2, 1).\n\t\t\t\t\t substr($color, 3, 1).substr($color, 3, 1);\n\t\t\t} else {\n\t\t\t\treturn \"000000\";\n\t\t\t}\n\t\t}\n\t\t//Named Color\n\t\tif(in_array($color, array_keys($this->color_names))) {\n\t\t\treturn $this->color_names[$color];\n\t\t}\n\t\t//rgb values\n\t\tif(strtolower(substr($color, 0, 3)) == 'rgb') {\n\t\t\t$colors = explode(',', trim(str_replace('rgb(', '', $color), '()'));\n\t\t\tif(!count($colors) != 3) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$r = intval($colors[0]);\n\t\t\t$g = intval($colors[1]);\n\t\t $b = intval($colors[2]);\n\n\t\t $r = dechex($r<0?0:($r>255?255:$r));\n\t\t $g = dechex($g<0?0:($g>255?255:$g));\n\t\t $b = dechex($b<0?0:($b>255?255:$b));\n\n\t\t $color = (strlen($r) < 2?'0':'').$r;\n\t\t $color .= (strlen($g) < 2?'0':'').$g;\n\t\t $color .= (strlen($b) < 2?'0':'').$b;\n\t\t return $color;\n\t\t}\n }", "title": "" }, { "docid": "5e8be8cd17a94b38e831440b9900894b", "score": "0.6048036", "text": "function smush_sanitize_hex_color_no_hash( $color ) {\n\t\t$color = ltrim( $color, '#' );\n\n\t\tif ( '' === $color ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn smush_sanitize_hex_color( '#' . $color ) ? $color : null;\n\t}", "title": "" }, { "docid": "49248104938acd71024e7e9b0c77bb86", "score": "0.60471773", "text": "public function addUserColor($conn,$username, $color){\n $query = \"UPDATE userr set color ='\".$color.\"' WHERE username='\".$username.\"' ;\";\n $result = pg_exec($conn, $query);\n return $result;\n }", "title": "" }, { "docid": "10c9a4a095bc6b648ad6fec93bcdf400", "score": "0.6042397", "text": "public function provideColor()\n {\n $template = 'Length of hexadecimal value of color \\'%s\\' is incorrect. It\\'s %d, but it should be 3 or 6. Is there everything ok?';\n\n yield [\n '',\n sprintf($template, '', strlen('')),\n ];\n\n yield [\n 'aa-bb-cc',\n sprintf($template, 'aa-bb-cc', strlen('aa-bb-cc')),\n ];\n }", "title": "" }, { "docid": "1e3921e9a4cdc74a0e8a39e832e533f4", "score": "0.60347486", "text": "public function toHex()\n {\n return str_pad(dechex($this->color),6,\"0\",STR_PAD_LEFT);\n }", "title": "" }, { "docid": "de60eac338716b5b107edb08dbe150f8", "score": "0.602229", "text": "function mts_check_hex_color( $hex ) {\n // Strip # sign is present\n $color = str_replace(\"#\", \"\", $hex);\n\n // Make sure it's 6 digits\n if( strlen($color) == 3 ) {\n $color = $color[0].$color[0].$color[1].$color[1].$color[2].$color[2];\n }\n\n return $color;\n}", "title": "" }, { "docid": "0b3a59021ef6a085ad7beb51d89a8377", "score": "0.60173243", "text": "function _color_shader($color, $percent) {\n\n\t\t$R = hexdec(substr($color,0,2));\n\t\t$G = hexdec(substr($color,2,2));\n\t\t$B = hexdec(substr($color,4,2));\n\n\t\t$R = round($R * (100 + $percent) / 100);\n\t\t$G = round($G * (100 + $percent) / 100);\n\t\t$B = round($B * (100 + $percent) / 100);\n\n\t\t$R = ($R<255)?$R:255;\n\t\t$G = ($G<255)?$G:255;\n\t\t$B = ($B<255)?$B:255;\n\n\t\t$RR = (strlen(dechex($R))==1?\"0\".dechex($R):dechex($R));\n\t\t$GG = (strlen(dechex($G))==1?\"0\".dechex($G):dechex($G));\n\t\t$BB = (strlen(dechex($B))==1?\"0\".dechex($B):dechex($B));\n\n\t\treturn '#'.$RR.$GG.$BB;\n\t}", "title": "" }, { "docid": "c835341d3a65d8988ef0e854ee017f63", "score": "0.60153913", "text": "function ncurses_color_set($pair) {}", "title": "" }, { "docid": "a8e3c75d8829960c2e91add0778c9b02", "score": "0.60143566", "text": "function sbx_hex_lighter( $color, $factor = 30 ) {\n\t\t$base = sbx_rgb_from_hex( $color );\n\t\t$color = '#';\n\n\t\tforeach ( $base as $k => $v ) {\n\t\t\t$amount = 255 - $v;\n\t\t\t$amount = $amount / 100;\n\t\t\t$amount = round( $amount * $factor );\n\t\t\t$new_decimal = $v + $amount;\n\n\t\t\t$new_hex_component = dechex( $new_decimal );\n\t\t\tif ( strlen( $new_hex_component ) < 2 ) {\n\t\t\t\t$new_hex_component = '0' . $new_hex_component;\n\t\t\t}\n\t\t\t$color .= $new_hex_component;\n\t\t}\n\n\t\treturn $color;\n\t}", "title": "" }, { "docid": "14a53c8592438361234e2e5004b255a3", "score": "0.59981996", "text": "function bearded_color_mod($color, $shade, $amount) {\n\t\t$newcolor = \"\";\n\t\t$prepend = \"\";\n\t\tif(strpos($color,'#') !== false) \n\t\t{ \n\t\t\t$prepend = \"#\";\n\t\t\t$color = substr($color, 1, strlen($color)); \n\t\t}\n\t\t\n\t\t//iterate over each character and increment or decrement it based on the passed settings\n\t\t$nr = 0;\n\twhile (isset($color[$nr])) \n\t{\n\t\t$char = strtolower($color[$nr]);\n\t\t\n\t\tfor($i = $amount; $i > 0; $i--)\n\t\t{\n\t\t\tif($shade == 'lighter')\n\t\t\t{\n\t\t\t\tswitch($char)\n\t\t\t\t{\n\t\t\t\t\tcase 9: $char = 'a'; break;\n\t\t\t\t\tcase 'f': $char = 'f'; break;\n\t\t\t\t\tdefault: $char++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($shade == 'darker')\n\t\t\t{\n\t\t\t\tswitch($char)\n\t\t\t\t{\n\t\t\t\t\tcase 'a': $char = '9'; break;\n\t\t\t\t\tcase '0': $char = '0'; break;\n\t\t\t\t\tdefault: $char = chr(ord($char) - 1 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$nr ++;\n\t\t$newcolor.= $char;\n\t}\n\t\t\n\t$newcolor = $prepend.$newcolor;\n\treturn $newcolor;\n}", "title": "" }, { "docid": "21aeb3a0c4c4a5f2e2967ccdca7f3965", "score": "0.59839183", "text": "function get_color($str, $img) {\n $b = ord($str[0]);\n $g = ord($str[1]);\n $r = ord($str[2]);\n if (strlen($str) > 3) {\n $a = 127 - (ord($str[3]) / 2);\n if ($a != 0 && $a != 127)\n $this->had_alpha = 1;\n } else {\n $a = 0;\n }\n if ($a != 127)\n $this->all_transaprent = 0;\n return imagecolorallocatealpha($img, $r, $g, $b, $a);\n }", "title": "" }, { "docid": "73a599ad20ff934d067c546257a9a953", "score": "0.59825706", "text": "public function getColorName();", "title": "" }, { "docid": "c524e444947b72e90ee957167a2b64ad", "score": "0.5981913", "text": "function hex_piecewise($color, $numeric, $modifier)\n\t{\n\t\t$color = $this->hex_clean($color);\n\n\t\tlist($r, $g, $b) = array($color[0].$color[1],\n\t\t $color[2].$color[3],\n\t\t $color[4].$color[5]);\n\n\t\t$r = eval(\"return hexdec($r) $modifier $numeric;\");\n\t\t$g = eval(\"return hexdec($g) $modifier $numeric;\");\n\t\t$b = eval(\"return hexdec($b) $modifier $numeric;\");\n\t\t\n\t\t\n\t\t/* Convert rgb back to hex */\t\n\t\t\n\t\tif (is_array($r) && sizeof($r) == 3)\n\t\t{\n\t\t list($r, $g, $b) = $r;\n\t\t}\n\n\t\t$r = intval($r);\n\t\t$g = intval($g);\n\t\t$b = intval($b);\n\n\t\t$r = dechex($r<0?0:($r>255?255:$r));\n\t\t$g = dechex($g<0?0:($g>255?255:$g));\n\t\t$b = dechex($b<0?0:($b>255?255:$b));\n\n\t\t$color = (strlen($r) < 2?'0':'').$r;\n\t\t$color .= (strlen($g) < 2?'0':'').$g;\n\t\t$color .= (strlen($b) < 2?'0':'').$b;\n\t\t\n\t\treturn '#'.$color;\n\t}", "title": "" }, { "docid": "783f0b35502fc2105a7f900f43578fcb", "score": "0.5980678", "text": "private static function sanitize_hex_color( $hex_color )\n {\n if( preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $hex_color ))\n {\n return $hex_color;\n }\n\n return '';\n }", "title": "" }, { "docid": "82713e7a0a246bb52bc576e63e5a7c73", "score": "0.59689623", "text": "public function __toString()\n {\n return sprintf( '#%02x%02x%02x%s',\n $this->value['red'] * 255,\n $this->value['green'] * 255,\n $this->value['blue'] * 255,\n $this->value['alpha'] > 0 ? sprintf( '%02x', $this->value['alpha'] * 255 ) : ''\n );\n }", "title": "" }, { "docid": "9de5dbbadaca810f0693189b0f292ca5", "score": "0.5965943", "text": "function checkhexcolor($color) {\n\n return preg_match('/^#[a-f0-9]{6}$/i', $color);\n\n}", "title": "" }, { "docid": "613c05a47bd6847d77510ae80604a3f4", "score": "0.5960597", "text": "public function getColor(): string;", "title": "" }, { "docid": "94905e73e5ffc9c25e587218d7383516", "score": "0.5935257", "text": "public function colour();", "title": "" }, { "docid": "b6d7023b406d518b8403a492bf5b872b", "score": "0.59231144", "text": "function imageistruecolor ($image) {}", "title": "" }, { "docid": "c3fde1a83aa270686d1b85acab0cde6d", "score": "0.59206766", "text": "private function validate_colorpicker( $input ) {\n\t\treturn ( preg_match( '|^#([A-Fa-f0-9]{3}){1,2}$|', $input ) ) ? $input : '';\n\t}", "title": "" }, { "docid": "df25c13f5711b5f6277bb7a35e99d90d", "score": "0.5902849", "text": "public function asHex() {\r\r\n\t\tif (empty($this->color))\r\r\n\t\t\treturn null;\r\r\n\t\treturn sprintf(\"%02x%02x%02x\", $this->color[0], $this->color[1], $this->color[2]);\r\r\n\t}", "title": "" }, { "docid": "22cef256a8b55700a385e1a02bd34e7b", "score": "0.5887935", "text": "function ipColor($ip)\n{\n $hash = sha1($ip);\n $hash = substr($hash, 0, strlen($hash) % 34);\n\n // test just in case, but this condition should ALWAYS be met!\n if (ctype_xdigit($hash) && strlen($hash) == 6)\n return $hash;\n\n return sprintf('%02X%02X%02X', mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));\n}", "title": "" }, { "docid": "6a78a3742128b6a9b7325fdd9ac3fbd3", "score": "0.58848834", "text": "protected function allocateColorFromHex($color) {\r\n\t\t\tpreg_match('/#(.{2})(.{2})(.{2})(.{2})?/',$color,$hex);\r\n\t\t\tif(!array_key_exists(4,$hex)) $hex[4] = 'FF';\r\n\r\n\t\t\t$color = imagecolorallocatealpha(\r\n\t\t\t\t$this->img,\r\n\t\t\t\thexdec($hex[1]),hexdec($hex[2]),hexdec($hex[3]),\r\n\t\t\t\t127 - floor((127 * hexdec($hex[4])) / 255)\r\n\t\t\t);\r\n\r\n\t\t\treturn $color;\r\n\t\t}", "title": "" }, { "docid": "7072baaab0c0962e8acf784f380fd079", "score": "0.58807796", "text": "public static function check_colour($value) { \n if ( preg_match( '/^#[a-f0-9]{6}$/i', $value ) ) { // if user insert a HEX color with # \n return true;\n }\n \n return false;\n }", "title": "" }, { "docid": "be2d90fe6feafc08f7a35b26b895f1f0", "score": "0.5872734", "text": "function ColorCode2Color($color)\n {\n if (!empty($color) && !preg_match('/^#/',$color))\n {\n if (!empty($this->Layout[ $color ]))\n {\n $color=$this->Layout[ $color ];\n }\n elseif (!empty($this->ApplicationObj) && !empty($this->ApplicationObj->Layout[ $color ]))\n {\n $color=$this->ApplicationObj->Layout[ $color ];\n }\n }\n\n $color=preg_replace('/#/',\"\",$color);\n $r=hexdec(substr($color,0,2));\n $g=hexdec(substr($color,2,2));\n $b=hexdec(substr($color,4,2));\n return array($r,$g,$b);\n }", "title": "" }, { "docid": "d50f4f306f2481e7210707a8d9ad248b", "score": "0.5852566", "text": "public function addColor( $color, $code )\n {\n \t$this->colors[ $color ] = $code;\n\n $this->buildTags();\n }", "title": "" }, { "docid": "ed2097699369329bfd65eb4432201785", "score": "0.58458924", "text": "public function getColorValue() {\n if (isset($this->color)) {\n return '#' . $this->color;\n }\n return '';\n }", "title": "" }, { "docid": "0591a79969f4bc8cf087c6563f67568b", "score": "0.58298236", "text": "public static function rgbToHex($input) {\n // Remove named array keys if input comes from Color::hex2rgb().\n if (is_array($input)) {\n $rgb = array_values($input);\n }\n // Parse string input in CSS notation ('10, 20, 30').\n elseif (is_string($input)) {\n preg_match('/(\\d+), ?(\\d+), ?(\\d+)/', $input, $rgb);\n array_shift($rgb);\n }\n\n $out = 0;\n foreach ($rgb as $k => $v) {\n $out |= $v << (16 - $k * 8);\n }\n\n return '#' . str_pad(dechex($out), 6, 0, STR_PAD_LEFT);\n }", "title": "" }, { "docid": "5960858614e6230f73d407a370b3a91f", "score": "0.58201", "text": "function ircColor($c)\n{\n\treturn \"\";\n}", "title": "" }, { "docid": "902ee0495a6c87167f6a92fd6b6a9268", "score": "0.58178604", "text": "function color_calc($arg)\n {\n if (is_array($arg)) {\n $return = sprintf('%02x%02x%02x', $arg[0], $arg[1], $arg[2]);\n } elseif (preg_match('/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i', $arg, $matches)) {\n $return = array(hexdec($matches[1] . $matches[1]), hexdec($matches[2] . $matches[2]), hexdec($matches[3] . $matches[3]));\n } elseif (preg_match('/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i', $arg, $matches)) {\n $return = array(hexdec($matches[1]), hexdec($matches[2]), hexdec($matches[3]));\n } elseif (preg_match('/^rgb\\([\\s]*([0-9]{1,3})[\\s]*,[\\s]*([0-9]{1,3})[\\s]*,[\\s]*([0-9]{1,3})[\\s]*\\)$/i', $arg, $matches)) {\n $return = array((int) $matches[1], (int) $matches[2], (int) $matches[3]);\n if ($return[0] > 255) $return[0] = 255;\n if ($return[1] > 255) $return[1] = 255;\n if ($return[2] > 255) $return[2] = 255;\n } elseif (preg_match('/^rgb\\([\\s]*([0-9]{1,3})%[\\s]*,[\\s]*([0-9]{1,3})%[\\s]*,[\\s]*([0-9]{1,3})%[\\s]*\\)$/i', $arg, $matches)) {\n $return = array((int) (255 * ($matches[1] / 100)), (int) (255 * ($matches[3] / 100)), (int) (255 * ($matches[3] / 100)));\n if ($return[0] > 255) $return[0] = 255;\n if ($return[1] > 255) $return[1] = 255;\n if ($return[2] > 255) $return[2] = 255;\n } else {\n $return = null;\n }\n return $return;\n }", "title": "" }, { "docid": "5214cbfb7a90edd0ee01247861fa4f3f", "score": "0.580442", "text": "function _get_color($i = FALSE) {\n $out = array(\n '#0000dd',\n '#dd0000',\n '#21B6A8',\n '#87907D',\n '#ec6d66',\n '#177F75',\n '#B6212D',\n '#B67721',\n '#da2d8b',\n '#7F5417',\n '#FF8000',\n '#61e94c',\n '#FFAABF',\n '#91C3DC',\n '#FFCC00',\n '#E5E0C1',\n '#68BD66',\n '#179CE8',\n '#BBFF20',\n '#30769E',\n '#FFE500',\n '#C8E9FC',\n '#758a09',\n '#00CCFF',\n '#FFC080',\n '#4086AA',\n '#FFAABF',\n '#0000AA',\n '#AA6363',\n '#AA9900',\n '#1A8BC0',\n '#ECF8FF',\n '#758a09',\n '#dd3100',\n '#dea04a',\n '#af2a30',\n '#EECC99',\n '#179999',\n '#BBFF20',\n '#a92e03',\n '#dd9cc9',\n '#f30320',\n '#579108',\n '#ce9135',\n '#acd622',\n '#e46e46',\n '#53747d',\n '#36a62a',\n '#83877e',\n '#e82385',\n '#73f2f2',\n '#cb9fa4',\n '#12c639',\n '#f51b2b',\n '#985d27',\n '#3595d5',\n '#cb9987',\n '#d52192',\n '#695faf',\n '#de2426',\n '#295d5a',\n '#824b2d',\n '#08ccf6',\n '#e82a3c',\n '#fcd11a',\n '#2b4c04',\n '#3011fd',\n '#1df37b',\n '#af2a30',\n '#c456d1',\n '#dcf174',\n '#025df6',\n '#0ab24f',\n '#c0d962',\n '#62369f',\n '#73faa9',\n '#fb453c',\n '#0487a4',\n '#ce9e07',\n '#2b407e',\n '#c28551',\n\n );\n\n if ($i !== FALSE AND $i < count($out)) {\n $out = $out[$i];\n }else{\n $out = rgb2html(rand(0,255), rand(0,255), rand(0,255));\n }\n\n\n return $out;\n}", "title": "" }, { "docid": "4a5b39ec2a0f9e1d6fa4085ea698783f", "score": "0.57982385", "text": "function idaho_webmaster_shift_hsl_to( $color, $original ) {\n\t$color_hsl = Color::hexToHsl( $color );\n\t$original_hsl = Color::hexToHsl( $original );\n\t$color_hsl['S'] = $original_hsl['S'];\n\t$color_hsl['L'] = $original_hsl['L'];\n\n\treturn '#' . Color::hslToHex( $color_hsl );\n}", "title": "" }, { "docid": "6f0738d0feb2144f408b5708fbcfa386", "score": "0.57932436", "text": "public function getColorValue();", "title": "" }, { "docid": "b59344c06fc4f6745dd2e40d650afc00", "score": "0.57905936", "text": "function ncurses_init_color($color, $r, $g, $b) {}", "title": "" }, { "docid": "c5ad25b3ebe2d25861f0254a0eee9c34", "score": "0.5785943", "text": "function colorarray2colorhex($color)\n {\n if (!is_array($color)) {\n return false;\n }\n $color = sprintf('#%02X%02X%02X', @$color[0], @$color[1], @$color[2]);\n return (strlen($color) != 7) ? false : $color;\n }", "title": "" }, { "docid": "f933a0968007e59a2f927f3a1c161a89", "score": "0.57747066", "text": "public function testFromHex()\n {\n $color = Color::fromHex('#FFFFFF');\n $this->assertEquals(new Color(255, 255, 255), $color);\n\n // Test with 8 chars\n $color = Color::fromHex('#FFFFFFFF');\n $this->assertEquals(new Color(255, 255, 255, 255), $color);\n }", "title": "" }, { "docid": "984701525041166f6bb40e3e324623ca", "score": "0.57610714", "text": "function nuts_color ( $name ) {\n\n\techo nuts_get_color ( $name );\n\t\n}", "title": "" }, { "docid": "7384de253a844f6a8678f1e0036dd55c", "score": "0.57255894", "text": "public function getRgbHexColor()\n {\n $rgba = $this->toRgbArray();\n return '#'\n .$this->getHexValue($rgba['red'], 255)\n .$this->getHexValue($rgba['green'], 255)\n .$this->getHexValue($rgba['blue'], 255);\n }", "title": "" }, { "docid": "540110d28355f0eb094faf294d1859d8", "score": "0.5719796", "text": "function wordstrap_options_valid_hex_color($hex) {\n return preg_match('/^#[a-f0-9]{6}$/i', $hex);\n}", "title": "" }, { "docid": "f507886a0a454f861a355cd9c13841e3", "score": "0.5703493", "text": "function cms_chart_color($init) {\n $defa = array('d9534f', 'f0ad4e', '5bc0de', '5cb85c', '337ab7', 'f26522', '754c24', 'd9ce00', '0e2e42', 'ce1797','672d8b');\n // add colors at front\n if (isset($init['color']) && !is_array($init['color'])) {\n $col = explode(',', $init['color']);\n if (is_array($col)) {\n foreach ($col as $c) {\n $c = trim(substr(trim($c), 0, 6));\n if (strlen($c) > 2) $color[] = $c;\n }\n }\n }\n // del colors\n if (isset($init['colorDel'])) {\n $col = explode(',', $init['colorDel']);\n if (is_array($col)) {\n foreach ($col as $c) {\n unset($defa[ceil($c)]);\n }\n }\n }\n foreach ($defa as $c) $color[] = $c;\n // add colors at end\n if (isset($init['colorAdd'])) {\n $col = explode(',', $init['colorAdd']);\n if (is_array($col)) {\n foreach ($col as $c) {\n $c = trim(substr(trim($c), 0, 6));\n if (strlen($c) > 2) $color[] = $c;\n }\n }\n }\n return $color;\n}", "title": "" }, { "docid": "f67bafe139e4137f6cd89c992cc021d6", "score": "0.5687464", "text": "function HTMLColorFingerprint($value)\n{\n // We want to generate a color that is suitable to use as a background color on a light (white)\n // background for black text, so we want a to pick color with both a minimum and maximum brightness\n // so there is enough contrast between the back text and the background color, and the coloring is\n // still visible.\n // Pick a random color in the Hue, Saturation and Lightness (HSL) color space\n // with a Lightness value between minL and maxL\n $minL = 50.0 / 100.0; // 0 .. 1\n $maxL = 80.0 / 100.0; // 0 .. 1\n // Since the md5 mixes the bits of $value into the fingerprint that it returns, we arbitrarily cut\n // three 4 digit hex numbers (0..65535) from the md5 fingerprint and scale them to appropriate values\n // for H, S and L\n $hexFingerprint=md5($value); // 32 character hex string\n $h = (1.0 / 65535.0) * intval(substr($hexFingerprint, 0, 4), 16); // 0 .. 1\n $s = (1.0 / 65535.0) * intval(substr($hexFingerprint, 4, 4), 16); // 0 .. 1\n $l = $minL + $maxL * (1.0-$minL) * (1.0 / 65535.0) * intval(substr($hexFingerprint, 8, 4), 16); // $minLightness .. 100 (%)\n // Convert from HSL to Red, Green and Blue (RGB) color space\n // Source: https://stackoverflow.com/questions/20423641/php-function-to-convert-hsl-to-rgb-or-hex\n $r=$l; $g=$l; $b=$l;\n $v = ($l <= 0.5) ? ($l * (1.0 + $s)) : ($l + $s - $l * $s);\n if ($v > 0){\n $m = $l + $l - $v;\n $sv = ($v - $m ) / $v;\n $h *= 6.0;\n $sextant = floor($h);\n $fract = $h - $sextant;\n $vsf = $v * $sv * $fract;\n $mid1 = $m + $vsf;\n $mid2 = $v - $vsf;\n switch ($sextant) {\n case 0:\n $r = $v; $g = $mid1; $b = $m;\n break;\n case 1:\n $r = $mid2; $g = $v; $b = $m;\n break;\n case 2:\n $r = $m; $g = $v; $b = $mid1;\n break;\n case 3:\n $r = $m; $g = $mid2; $b = $v;\n break;\n case 4:\n $r = $mid1; $g = $m; $b = $v;\n break;\n case 5:\n $r = $v; $g = $m; $b = $mid2;\n break;\n }\n }\n // Convert from RGB values (0 .. 1) to hex (00 .. FF)\n $color='#' .str_pad(dechex($r*256),2,'0',STR_PAD_LEFT)\n .str_pad(dechex($g*256),2,'0',STR_PAD_LEFT)\n .str_pad(dechex($b*256),2,'0',STR_PAD_LEFT);\n return $color;\n}", "title": "" }, { "docid": "460f9fb0b3d013ddb8877cc7976cd236", "score": "0.5686499", "text": "public function getRgbaHexColor()\n {\n $rgba = $this->toRgbArray();\n return '#'\n .$this->getHexValue($rgba['red'], 255)\n .$this->getHexValue($rgba['green'], 255)\n .$this->getHexValue($rgba['blue'], 255)\n .$this->getHexValue($rgba['alpha'], 255);\n }", "title": "" }, { "docid": "ccdac63397930694de7df236040bae2c", "score": "0.568618", "text": "function woobizz_productlist_hextorgb($hex){\n\t$hex = str_replace(\"#\", \"\", $hex);\nif(strlen($hex) == 3){\n\t$r = hexdec(substr($hex,0,1).substr($hex,0,1));\n\t$g = hexdec(substr($hex,1,1).substr($hex,1,1));\n\t$b = hexdec(substr($hex,2,1).substr($hex,2,1));\n}else{\n\t$r = hexdec(substr($hex,0,2));\n\t$g = hexdec(substr($hex,2,2));\n\t$b = hexdec(substr($hex,4,2));\n}\n$rgb = array($r, $g, $b);\nreturn implode(\",\", $rgb); \n}", "title": "" }, { "docid": "d86c4f0ef76b1806368e3c6bf2624f80", "score": "0.5678053", "text": "public function hex($color) {\r\r\n\t\t$this->color = $this->toRgb($color);\r\r\n\t\treturn $this;\r\r\n\t}", "title": "" }, { "docid": "44940dfb4e42a93c39d87002283fd784", "score": "0.5677569", "text": "public function addRGBIncrement($increment) {\n $incremented = new Color($this->r, $this->g, $this->b);\n\n $incremented->r = $this->truncateColorComponentRange($incremented->r + $increment);\n $incremented->g = $this->truncateColorComponentRange($incremented->g + $increment);\n $incremented->b = $this->truncateColorComponentRange($incremented->b + $increment);\n\n return $incremented;\n }", "title": "" }, { "docid": "6607f523a1fd69708e0c4ed75abbdf8a", "score": "0.5677209", "text": "function rgb2hex($rgb) {\n $hex = \"#\";\n $hex .= str_pad(dechex($rgb[0]), 2, \"0\", STR_PAD_LEFT);\n $hex .= str_pad(dechex($rgb[1]), 2, \"0\", STR_PAD_LEFT);\n $hex .= str_pad(dechex($rgb[2]), 2, \"0\", STR_PAD_LEFT);\n\n return $hex; // returns the hex value including the number sign (#)\n}", "title": "" }, { "docid": "09b2f7b0f0b61b5802dc4477dbf993ab", "score": "0.5671449", "text": "function alphaFromColorString($colorString) {\n if (strlen($colorString) == 8) {\n $alphaHex = substr($colorString, 0, 2);\n $alpha = hexdec($alphaHex) / 256;\n return round($alpha, 2);\n }\n return 1;\n}", "title": "" }, { "docid": "e2de9fef958c162e4b5a50a2367eaf1c", "score": "0.5665588", "text": "function ncurses_color_content($color, &$r, &$g, &$b) {}", "title": "" }, { "docid": "80ee766d15ecc797683912b8e4ec4097", "score": "0.56636584", "text": "function loor_hex_color_adjusting($hex, $steps) {\n $steps = max(-255, min(255, $steps));\n\n // Normalize into a six character long hex string\n $hex = str_replace('#', '', $hex);\n if (strlen($hex) == 3) {\n $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);\n }\n\n // Split into three parts: R, G and B\n $color_parts = str_split($hex, 2);\n $return = '#';\n\n foreach ($color_parts as $color) {\n $color = hexdec($color); // Convert to decimal\n $color = max(0,min(255,$color + $steps)); // Adjust color\n $return .= str_pad(dechex($color), 2, '0', STR_PAD_LEFT); // Make two char hex code\n }\n\n return $return;\n}", "title": "" }, { "docid": "4f22713328998302ce83729ac394a77f", "score": "0.56605846", "text": "function hb_color($color, $alpha) {\n\tif (!empty($color)) {\n\t\tif ($alpha >= 0.95) {\n\t\t\treturn $color;\n\t\t} else {\n\t\t\tif ($color[0] == '#') {\n\t\t\t\t$color = substr($color, 1);\n\t\t\t}\n\t\t\tif (strlen($color) == 6) {\n\t\t\t\tlist($r, $g, $b) = array(\n\t\t\t\t\t$color[0] . $color[1],\n\t\t\t\t\t$color[2] . $color[3],\n\t\t\t\t\t$color[4] . $color[5]\n\t\t\t\t);\n\t\t\t} elseif (strlen($color) == 3) {\n\t\t\t\tlist($r, $g, $b) = array(\n\t\t\t\t\t$color[0] . $color[0],\n\t\t\t\t\t$color[1] . $color[1],\n\t\t\t\t\t$color[2] . $color[2]\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$r = hexdec($r);\n\t\t\t$g = hexdec($g);\n\t\t\t$b = hexdec($b);\n\t\t\t$output = array(\n\t\t\t\t'red' => $r,\n\t\t\t\t'green' => $g,\n\t\t\t\t'blue' => $b\n\t\t\t);\n\t\t\treturn 'rgba(' . implode($output, ',') . ',' . $alpha . ')';\n\t\t}\n\t}\n}", "title": "" }, { "docid": "e1daf601eb6ff9489672ea49a897920b", "score": "0.56431365", "text": "public function add(Color $color_to_add) {\n\t\t/*\n\t\t * ?? TBD??\n\t\t * throw or catch the exceptio\n\t\tif(is_empty($color)) {\n\t\t}\n\t\t */\n\n\t\t// Le resultat doit etre une nouvelle instance\n\t\t$new_color = new Color( \n\t\t\tarray(\n\t\t\t\t'red' => $this->getRed() + $color_to_add->getRed(),\n\t\t\t\t'green' => $this->getGreen() + $color_to_add->getGreen(),\n\t\t\t\t'blue' => $this->getBlue() + $color_to_add->getBlue()\n\t\t\t)\n\t\t);\n\t\treturn $new_color;\n\t}", "title": "" }, { "docid": "0615b11ee20576f76e989b8bc1728405", "score": "0.563251", "text": "function colorFill($string)\n{\n\tfor ($ii=0; $ii<=strlen($string); $ii++)\n\t{\n\t\n\t\tif (($ii % 2) != 0)\n\t\t{\n\t\t\techo \"<span style=color:red;>\" . substr($string, $ii, 1). \"</span>\";\n\t\t}\n\t\telse if (($ii % 2) == 0)\n\t\t{\n\t\t\techo \"<span style=color:blue;>\" . substr($string, $ii, 1). \"</span>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"<span style=color:red;>\" . substr($string, $ii, 1). \"</span>\";\n\t\t}\n\t}\t\n}", "title": "" }, { "docid": "cf6598ca97826eb4e745d29385a5e8af", "score": "0.5630841", "text": "function imagecolorset ($image, $index, $red, $green, $blue) {}", "title": "" }, { "docid": "647a51d593d2aab68d58521a7b487a34", "score": "0.563064", "text": "public function rgb($red, $green, $blue);", "title": "" }, { "docid": "efd8eb031fa3526a0e972af9c935de60", "score": "0.5627448", "text": "function _makeWebSafe(&$color)\n{\n if ($color < 0x1a) {\n $color = 0x00;\n } else if ($color < 0x4d) {\n $color = 0x33;\n } else if ($color < 0x80) {\n $color = 0x66;\n } else if ($color < 0xB3) {\n $color = 0x99;\n } else if ($color < 0xE6) {\n $color = 0xCC;\n } else {\n $color = 0xFF;\n }\n return $color;\n}", "title": "" }, { "docid": "34988862723b7dff424ace6a906df923", "score": "0.56223166", "text": "#[@arg]\n public function setColor($color= '#ffffff') {\n $this->color= new Color($color);\n }", "title": "" }, { "docid": "02caac3a441ad448fc0802f0cfd1e2e3", "score": "0.5619097", "text": "public function set_color($value)\r\n\t{\r\n\t\treturn $this->set_attr('color', $value);\r\n\t}", "title": "" }, { "docid": "1f36c6d91c9b9b4f3a6c36091c45353d", "score": "0.56131", "text": "public function color()\n {\n }", "title": "" }, { "docid": "ad9852528a434faf38ee75c5158bf7bf", "score": "0.5611855", "text": "public function toHex()\n {\n return str_pad(dechex($this->red), 2, '0', STR_PAD_LEFT)\n . str_pad(dechex($this->green), 2, '0', STR_PAD_LEFT)\n . str_pad(dechex($this->blue), 2, '0', STR_PAD_LEFT);\n }", "title": "" }, { "docid": "809732470e07fcccb68510ad8b45448f", "score": "0.5609575", "text": "private static function get_color( $event_type ) {\n\t\t$type_hash = md5( $event_type );\n\n\t\t$r = hexdec( substr( $type_hash, 0, 2 ) );\n\t\t$g = hexdec( substr( $type_hash, 2, 2 ) );\n\t\t$b = hexdec( substr( $type_hash, 4, 2 ) );\n\n\t\t$color = $r . ',' . $g . ',' . $b;\n\n\t\treturn $color;\n\t}", "title": "" }, { "docid": "4bbd29c92031864952b9d698ff4368ea", "score": "0.56049585", "text": "private function get_course_color($id) {\n $color = substr(md5($id), 0, 6);\n return $color;\n }", "title": "" }, { "docid": "829cd24968dbd1f350860ef51668feed", "score": "0.5602251", "text": "function ncurses_slk_color($intarg) {}", "title": "" }, { "docid": "25011688e46dbdc617661cec32978126", "score": "0.5601792", "text": "public function validarColor($color){\n\t\t#CCC\n\t\t#CCCCC\n\t\t#FFFFF\n\t\treturn preg_match('/^#(?:(?:[a-f0-9]{3}){1,2})$/i', $color);\n\t}", "title": "" }, { "docid": "3d0db6968cfce53a99d650a28ce3ec07", "score": "0.5601679", "text": "function sbx_hex_darker( $color, $factor = 30 ) {\n\t\t$base = sbx_rgb_from_hex( $color );\n\t\t$color = '#';\n\n\t\tforeach ( $base as $k => $v ) {\n\t\t\t$amount = $v / 100;\n\t\t\t$amount = round( $amount * $factor );\n\t\t\t$new_decimal = $v - $amount;\n\n\t\t\t$new_hex_component = dechex( $new_decimal );\n\t\t\tif ( strlen( $new_hex_component ) < 2 ) {\n\t\t\t\t$new_hex_component = '0' . $new_hex_component;\n\t\t\t}\n\t\t\t$color .= $new_hex_component;\n\t\t}\n\n\t\treturn $color;\n\t}", "title": "" }, { "docid": "668b40a7423da132df752c839ea51d8d", "score": "0.5601483", "text": "function _hex2rgb($color, $default_on_error = '#FFF')\n {\n\n // if color is not formatted correctly\n if (preg_match('/^#?([a-f]|[0-9]){3}(([a-f]|[0-9]){3})?$/i', $color) == 0) {\n\n // use the default color\n $color = $default_on_error;\n\n }\n\n // trim off the \"#\" prefix from $background_color\n $color = ltrim($color, '#');\n\n // if color is given using the shorthand (i.e. \"FFF\" instead of \"FFFFFF\")\n if (strlen($color) == 3) {\n\n $tmp = '';\n\n // take each value\n for ($i = 0; $i < 3; $i++) {\n\n // and duplicate it\n $tmp .= str_repeat($color[$i], 2);\n\n }\n\n // the color in it's full, 6 characters length notation\n $color = $tmp;\n\n }\n\n // decimal representation of the color\n $int = hexdec($color);\n\n // extract and return the RGB values\n return array(\n\n 'r' => 0xFF & ($int >> 0x10),\n 'g' => 0xFF & ($int >> 0x8),\n 'b' => 0xFF & $int\n\n );\n\n }", "title": "" }, { "docid": "ee5a37a7c094182b01054cec036990e9", "score": "0.5599882", "text": "protected function generateReferenceColors()\n {\n //Pink Colors\n $majorCat = 'Pink Colors';\n $colors[] = $this->createColorObject($majorCat, 'ffc0cb', 'Pink');\n $colors[] = $this->createColorObject($majorCat, 'ffb6c1', 'LightPink');\n $colors[] = $this->createColorObject($majorCat, 'ff69b4', 'HotPink');\n $colors[] = $this->createColorObject($majorCat, 'ff1493', 'DeepPink');\n $colors[] = $this->createColorObject($majorCat, 'db7093', 'PaleVioletRed');\n $colors[] = $this->createColorObject($majorCat, 'c71585', 'MediumVioletRed');\n //Red Colors\n $majorCat = 'Red Colors';\n $colors[] = $this->createColorObject($majorCat, 'ffa07a', 'LightSalmon');\n $colors[] = $this->createColorObject($majorCat, 'fa8072', 'Salmon');\n $colors[] = $this->createColorObject($majorCat, 'e9967a', 'DarkSalmon');\n $colors[] = $this->createColorObject($majorCat, 'f08080', 'LightCoral');\n $colors[] = $this->createColorObject($majorCat, 'cd5c5c', 'IndianRed');\n $colors[] = $this->createColorObject($majorCat, 'dc143c', 'Crimson');\n $colors[] = $this->createColorObject($majorCat, 'b22222', 'FireBrick');\n $colors[] = $this->createColorObject($majorCat, '8b0000', 'DarkRed');\n $colors[] = $this->createColorObject($majorCat, 'ff0000', 'Red');\n //Orange Colors\n $majorCat = 'Orange Colors';\n $colors[] = $this->createColorObject($majorCat, 'ff4500', 'OrangeRed');\n $colors[] = $this->createColorObject($majorCat, 'ff6348', 'Tomato');\n $colors[] = $this->createColorObject($majorCat, 'ff7f50', 'Coral');\n $colors[] = $this->createColorObject($majorCat, 'ff8c00', 'DarkOrange');\n $colors[] = $this->createColorObject($majorCat, 'ffa500', 'Orange');\n //Yellow Colors\n $majorCat = 'Yellow Colors';\n $colors[] = $this->createColorObject($majorCat, 'ffff00', 'Yellow');\n $colors[] = $this->createColorObject($majorCat, 'ffffe0', 'LightYellow');\n $colors[] = $this->createColorObject($majorCat, 'fffacd', 'LemonChiffon');\n $colors[] = $this->createColorObject($majorCat, 'fafad2', 'LightGoldenrodYellow');\n $colors[] = $this->createColorObject($majorCat, 'ffefd5', 'PapayWhip');\n $colors[] = $this->createColorObject($majorCat, 'ffe4b5', 'Moccasin');\n $colors[] = $this->createColorObject($majorCat, 'ffdab9', 'PeachPuff');\n $colors[] = $this->createColorObject($majorCat, 'eee8aa', 'PaleGoldenrod');\n $colors[] = $this->createColorObject($majorCat, 'f0e68c', 'Khaki');\n $colors[] = $this->createColorObject($majorCat, 'bdb76b', 'DarkKhaki');\n $colors[] = $this->createColorObject($majorCat, 'ffd700', 'Gold');\n //Brown Colors\n $majorCat = 'Brown Colors';\n $colors[] = $this->createColorObject($majorCat, 'fff8dc', 'Cornsilk');\n $colors[] = $this->createColorObject($majorCat, 'ffebcd', 'BlanchedAlmond');\n $colors[] = $this->createColorObject($majorCat, 'ffe4c4', 'Bisque');\n $colors[] = $this->createColorObject($majorCat, 'ffdead', 'NavajoWhite');\n $colors[] = $this->createColorObject($majorCat, 'f5deb3', 'Wheat');\n $colors[] = $this->createColorObject($majorCat, 'deb887', 'Tan');\n $colors[] = $this->createColorObject($majorCat, 'bc8f8f', 'RosyBrown');\n $colors[] = $this->createColorObject($majorCat, 'f4a460', 'SandyBrown');\n $colors[] = $this->createColorObject($majorCat, 'b8860b', 'DarkGoldenrod');\n $colors[] = $this->createColorObject($majorCat, 'cd853f', 'Peru');\n $colors[] = $this->createColorObject($majorCat, 'd2691e', 'Chocolate');\n $colors[] = $this->createColorObject($majorCat, '8b4513', 'SaddleBrown');\n $colors[] = $this->createColorObject($majorCat, 'a0522d', 'Sienna');\n $colors[] = $this->createColorObject($majorCat, 'a52a2a', 'Brown');\n $colors[] = $this->createColorObject($majorCat, '800000', 'Maroon');\n //Green Colors\n $majorCat = 'Green Colors';\n $colors[] = $this->createColorObject($majorCat, '556b2f', 'DarkOliveGreen');\n $colors[] = $this->createColorObject($majorCat, '808000', 'Olive');\n $colors[] = $this->createColorObject($majorCat, '6b8e23', 'OliveDrab');\n $colors[] = $this->createColorObject($majorCat, '9acd32', 'YellowGreen');\n $colors[] = $this->createColorObject($majorCat, '32cd32', 'LimeGreen');\n $colors[] = $this->createColorObject($majorCat, '00ff00', 'Lime');\n $colors[] = $this->createColorObject($majorCat, '7cfc00', 'LawnGreen');\n $colors[] = $this->createColorObject($majorCat, '7fff00', 'Chartreuse');\n $colors[] = $this->createColorObject($majorCat, 'adff2f', 'GreenYellow');\n $colors[] = $this->createColorObject($majorCat, '00ff7f', 'SpringGreen');\n $colors[] = $this->createColorObject($majorCat, '00fa9a', 'MediumSpringGreen');\n $colors[] = $this->createColorObject($majorCat, '90ee90', 'LightGreen');\n $colors[] = $this->createColorObject($majorCat, '98fb98', 'PaleGreen');\n $colors[] = $this->createColorObject($majorCat, '8fbc8f', 'DarkSeaGreen');\n $colors[] = $this->createColorObject($majorCat, '66cdaa', 'MediumAquamarine');\n $colors[] = $this->createColorObject($majorCat, '3cb371', 'MediumSeaGreen');\n $colors[] = $this->createColorObject($majorCat, '2e8b57', 'SeaGreen');\n $colors[] = $this->createColorObject($majorCat, '228b22', 'ForestGreen');\n $colors[] = $this->createColorObject($majorCat, '008000', 'Green');\n $colors[] = $this->createColorObject($majorCat, '006400', 'Dark Green');\n //Cyan Colors\n $majorCat = 'Cyan Colors';\n $colors[] = $this->createColorObject($majorCat, '00ffff', 'Aqua');\n $colors[] = $this->createColorObject($majorCat, 'e0ffff', 'LightCyan');\n $colors[] = $this->createColorObject($majorCat, 'afeeee', 'PaleTurquoise');\n $colors[] = $this->createColorObject($majorCat, '7fffd4', 'Aquamarine');\n $colors[] = $this->createColorObject($majorCat, '40e0d0', 'Turquoise');\n $colors[] = $this->createColorObject($majorCat, '48d1cc', 'MediumTurquoise');\n $colors[] = $this->createColorObject($majorCat, '00ced1', 'DarkTurquoise');\n $colors[] = $this->createColorObject($majorCat, '20b2aa', 'LightSeaGreen');\n $colors[] = $this->createColorObject($majorCat, '5f9ea0', 'CadetBlue');\n $colors[] = $this->createColorObject($majorCat, '008b8b', 'DarkCyan');\n $colors[] = $this->createColorObject($majorCat, '008080', 'Teal');\n //Blue Colors\n $majorCat = 'Blue Colors';\n $colors[] = $this->createColorObject($majorCat, 'b0c4de', 'LightSteelBlue');\n $colors[] = $this->createColorObject($majorCat, 'b0e0e6', 'PowderBlue');\n $colors[] = $this->createColorObject($majorCat, 'add8e6', 'LightBlue');\n $colors[] = $this->createColorObject($majorCat, '87ceeb', 'SkyBlue');\n $colors[] = $this->createColorObject($majorCat, '87cefa', 'LightSkyBlue');\n $colors[] = $this->createColorObject($majorCat, '00bfff', 'DeepSkyBlue');\n $colors[] = $this->createColorObject($majorCat, '1e90ff', 'DodgerBlue');\n $colors[] = $this->createColorObject($majorCat, '6495ed', 'CornflowerBlue');\n $colors[] = $this->createColorObject($majorCat, '4682b4', 'Steelblue');\n $colors[] = $this->createColorObject($majorCat, '4169e1', 'RoyalBlue');\n $colors[] = $this->createColorObject($majorCat, '0000ff', 'Blue');\n $colors[] = $this->createColorObject($majorCat, '0000cd', 'MediumBlue');\n $colors[] = $this->createColorObject($majorCat, '00008b', 'DarkBlue');\n $colors[] = $this->createColorObject($majorCat, '000080', 'Navy');\n $colors[] = $this->createColorObject($majorCat, '191970', 'MidnightBlue');\n //Purple, Violet, Magenta colors\n $majorCat = 'Purple Colors';\n $colors[] = $this->createColorObject($majorCat, 'e6e6fa', 'Lavender');\n $colors[] = $this->createColorObject($majorCat, 'd8bfd8', 'Thistle');\n $colors[] = $this->createColorObject($majorCat, 'dda0dd', 'Plum');\n $colors[] = $this->createColorObject($majorCat, 'ee82ee', 'Violet');\n $colors[] = $this->createColorObject($majorCat, 'da70d6', 'Orchid');\n $colors[] = $this->createColorObject($majorCat, 'ff00ff', 'Fuchsia');\n $colors[] = $this->createColorObject($majorCat, 'ba55d3', 'MediumOrchid');\n $colors[] = $this->createColorObject($majorCat, '9370db', 'MediumPurple');\n $colors[] = $this->createColorObject($majorCat, '8a2be2', 'BlueViolet');\n $colors[] = $this->createColorObject($majorCat, '9400d3', 'DarkViolet');\n $colors[] = $this->createColorObject($majorCat, '9932cc', 'DarkOrchid');\n $colors[] = $this->createColorObject($majorCat, '8b008b', 'DarkMagenta');\n $colors[] = $this->createColorObject($majorCat, '800080', 'Purple');\n $colors[] = $this->createColorObject($majorCat, '4b0082', 'Indigo');\n $colors[] = $this->createColorObject($majorCat, '483d8b', 'DarkSlateBlue');\n $colors[] = $this->createColorObject($majorCat, '6a5acd', 'SlateBlue');\n $colors[] = $this->createColorObject($majorCat, '7b68ee', 'MediumSlateBlue');\n //White Colors\n $majorCat = 'White Colors';\n $colors[] = $this->createColorObject($majorCat, 'ffffff', 'White');\n $colors[] = $this->createColorObject($majorCat, 'fffafa', 'Snow');\n $colors[] = $this->createColorObject($majorCat, 'f0fff0', 'Honeydew');\n $colors[] = $this->createColorObject($majorCat, 'f5fffa', 'MintCream');\n $colors[] = $this->createColorObject($majorCat, 'f0ffff', 'Azure');\n $colors[] = $this->createColorObject($majorCat, 'f0f8ff', 'AliceBlue');\n $colors[] = $this->createColorObject($majorCat, 'f8f8ff', 'GhostWhite');\n $colors[] = $this->createColorObject($majorCat, 'f5f5f5', 'WhiteSmoke');\n $colors[] = $this->createColorObject($majorCat, 'fff5ee', 'Seashell');\n $colors[] = $this->createColorObject($majorCat, 'f5f5dc', 'Beige');\n $colors[] = $this->createColorObject($majorCat, 'fdf5e6', 'OldLace');\n $colors[] = $this->createColorObject($majorCat, 'fffaf0', 'FloralWhite');\n $colors[] = $this->createColorObject($majorCat, 'fffff0', 'Ivory');\n $colors[] = $this->createColorObject($majorCat, 'faebd7', 'AntiqueWhite');\n $colors[] = $this->createColorObject($majorCat, 'faf0e6', 'Linen');\n $colors[] = $this->createColorObject($majorCat, 'fff0f5', 'LavenderBlush');\n $colors[] = $this->createColorObject($majorCat, 'ffe4e1', 'MistyRose');\n //Gray and Black Colors\n $majorCat = 'Gray and Black Colors';\n $colors[] = $this->createColorObject($majorCat, 'dcdcdc', 'Gainsboro');\n $colors[] = $this->createColorObject($majorCat, 'd3d3d3', 'LightGray');\n $colors[] = $this->createColorObject($majorCat, 'c0c0c0', 'Silver');\n $colors[] = $this->createColorObject($majorCat, 'a9a9a9', 'DarkGray');\n $colors[] = $this->createColorObject($majorCat, '808080', 'Gray');\n $colors[] = $this->createColorObject($majorCat, '696969', 'DimGray');\n $colors[] = $this->createColorObject($majorCat, '778899', 'LightSlateGray');\n $colors[] = $this->createColorObject($majorCat, '708090', 'SlateGray');\n $colors[] = $this->createColorObject($majorCat, '2f4f4f', 'DarkSlateGray');\n $colors[] = $this->createColorObject($majorCat, '000000', 'Black');\n \n $this->referenceColors = $colors;\n }", "title": "" }, { "docid": "842683d27c904d7517ce6cd3bd7c713e", "score": "0.5590668", "text": "private function _rgb2hex($rgb) {\n\n\n\t\t$red = ( isset($rgb[0]) ) ? $rgb[0] : 0;\n\t\t$green = ( isset($rgb[1]) ) ? $rgb[1] : 0;\n\t\t$blue = ( isset($rgb[2]) ) ? $rgb[2] : 0;\n\n\t\t$red = dechex($red);\n\t\t$green = dechex($green);\n\t\t$blue = dechex($blue);\n\n\t\t$red = (strlen($red) == 1) ? \"0{$red}\" : $red;\n\t\t$green = (strlen($green)== 1) ? \"0{$green}\" : $green;\n\t\t$blue = (strlen($blue) == 1) ? \"0{$blue}\" : $blue;\n\n\t\treturn \"#{$red}{$green}{$blue}\";\n\n\n\t}", "title": "" }, { "docid": "4b82d57e5799577021ea877708d4a715", "score": "0.558139", "text": "abstract function asTrueColor();", "title": "" }, { "docid": "e4b448864dc8909820123e55060adb97", "score": "0.5576344", "text": "public function color(string $value): self\n {\n if (!in_array($value, self::COLOR_ALL, true)) {\n $values = implode('\", \"', self::COLOR_ALL);\n throw new InvalidArgumentException(\"Invalid color. Valid values are: \\\"$values\\\".\");\n }\n\n $new = clone $this;\n $new->color = $value;\n return $new;\n }", "title": "" }, { "docid": "88d5955be75c79b31a53435c76a7ec7b", "score": "0.55660933", "text": "public function convert_hex_color($color_str)\n\t{\n\t\tif (empty($color_str)) return false;\n\t\t$color_str = str_replace('#', '', $color_str);\n\t\t$c1 = substr($color_str, 0, 2);\n\t\t$c2 = substr($color_str, 2, 2);\n\t\t$c3 = substr($color_str, 4, 2);\n\t\treturn array(hexdec($c1), hexdec($c2), hexdec($c3) );\n\t}", "title": "" }, { "docid": "89152a4c261d54a7e7d915628c26b01a", "score": "0.55570996", "text": "public function color(): string\n {\n return '红色';\n }", "title": "" }, { "docid": "5d61570ff9011e1896d6663427648649", "score": "0.5535958", "text": "private function rgb_to_hex($matches)\r\n {\r\n if ($this->index_of($matches[1], '%') >= 0){\r\n $rgbcolors = explode(',', str_replace('%', '', $matches[1]));\r\n for ($i = 0; $i < count($rgbcolors); $i++) {\r\n $rgbcolors[$i] = $this->round_number(floatval($rgbcolors[$i]) * 2.55);\r\n }\r\n } else {\r\n $rgbcolors = explode(',', $matches[1]);\r\n }\r\n // Values outside the sRGB color space should be clipped (0-255)\r\n for ($i = 0; $i < count($rgbcolors); $i++) {\r\n $rgbcolors[$i] = $this->clamp_number(intval($rgbcolors[$i], 10), 0, 255);\r\n $rgbcolors[$i] = sprintf(\"%02x\", $rgbcolors[$i]);\r\n }\r\n // Fix for issue #2528093\r\n if (!preg_match('/[\\s\\,\\);\\}]/', $matches[2])){\r\n $matches[2] = ' ' . $matches[2];\r\n }\r\n return '#' . implode('', $rgbcolors) . $matches[2];\r\n }", "title": "" }, { "docid": "275934fcbaf07b5810b937fbff2adc17", "score": "0.5530785", "text": "public static function xtermBgColor($colorCode) {\n return '48;5;' . $colorCode;\n }", "title": "" } ]
c14fb013a7a5d1ae866d1593006695c7
Forces initialization of the proxy
[ { "docid": "edd237e21121571a9acba5ccf0148efa", "score": "0.0", "text": "public function __load()\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" } ]
[ { "docid": "cb49393616c02c62935d549c3ed39024", "score": "0.6928823", "text": "public function __construct($proxy = false)\n {\n $this->proxy = $proxy;\n }", "title": "" }, { "docid": "fa32cc9291ed73dfc940db8f25552351", "score": "0.68803674", "text": "public function __construct(){\n\t\tif(getenv('http_proxy'))\n\t\t\t$this->set_proxy(getenv('http_proxy'));\n\t}", "title": "" }, { "docid": "9c3be389eb0c4e727511abe67a9c3627", "score": "0.6760697", "text": "public function initializeObject() {\n\t\t$this->proxyClassTemplate = file_get_contents(FLOW3_PATH_FLOW3 . 'Resources/Private/AOP/AOPProxyClassTemplate.php');\n\t}", "title": "" }, { "docid": "9dd6c3418e8b8a7590c3ceb1e8db2c45", "score": "0.65001553", "text": "protected function setUp()\n\t {\n\t\t$this->remotepath = $this->webserverURL();\n\t\t$this->object = new ProxyHTTPclient($this->remotepath . \"/HTTPclientResponder.php\");\n\t }", "title": "" }, { "docid": "c95a1d6f65c08f0f414c3a0efbc0dff6", "score": "0.64853334", "text": "protected function initDbgpProxy()\n {\n if ($this->cfg['dbgpProxy']['enabled'] === false) {\n return;\n }\n $this->logger->notice(__METHOD__);\n $connector = new SocketConnector($this->loop);\n $connector->connect($this->cfg['dbgpProxy']['uri'])->then(function (ConnectionInterface $connection) {\n $dbgpProxy = new DbgpBase(\n $connection,\n $this->logger\n );\n $dbgpProxy->send('proxyinit', array(\n 'p' => $this->cfg['dbgp']['port'],\n 'k' => $this->cfg['dbgp']['ideKey'],\n ));\n });\n }", "title": "" }, { "docid": "024ceae181d378c4dbcca41ba3564c16", "score": "0.6435075", "text": "protected function setUp()\n {\n $this->object = new ProxyList;\n }", "title": "" }, { "docid": "bf14095236a1885b30a3e95e0632dde9", "score": "0.6397888", "text": "protected function _init() {}", "title": "" }, { "docid": "10389e8f57321b635f844d87bf6347ec", "score": "0.6396716", "text": "protected function ensureProxy() {\n if (!isset($this->proxy)) {\n $class = mica_connector_get_connection_info($this->class);\n if ($class && class_exists($class['class'])) {\n if (empty($this->options)) {\n // We always have to provide the options.\n $this->options = array();\n }\n $this->proxy = new $class['class']($this);\n }\n if (!($this->proxy instanceof MicaDatasetConnectionInterface)) {\n throw new MicaException(t('Dataset connector with id !id specifies illegal service class !class.',\n array('!id' => $this->id, '!class' => $this->class)));\n }\n }\n }", "title": "" }, { "docid": "3e42f6600ec898473a66f8605046c4fe", "score": "0.63690853", "text": "abstract public function setProxy(Proxy $proxy);", "title": "" }, { "docid": "0f80fe2e0154c1710dc45fba84144fb7", "score": "0.6325101", "text": "protected function setUp() {\n\t\t$this->object = new Filter_Chain_And_Proxy;\n\t}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.6300076", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.62994456", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.62994456", "text": "protected function init() {}", "title": "" }, { "docid": "87478a429c66c2fda0aae29acc7769a9", "score": "0.6287153", "text": "private function initialize() : void {}", "title": "" }, { "docid": "1e670b1ea2e836b0db9d1554a202338d", "score": "0.6267832", "text": "public function _initialize() {}", "title": "" }, { "docid": "7e001e64d67016553bac017fb7584a60", "score": "0.6247082", "text": "protected function initialize()\n {\n if (!$this->initialized) {\n if ($this->object instanceof GhostObjectInterface) {\n $uow = $this->om->getUnitOfWork();\n if (!$this->object->isProxyInitialized()) {\n $persister = $uow->getDocumentPersister($this->meta->getName());\n $identifier = null;\n if ($uow->isInIdentityMap($this->object)) {\n $identifier = $this->getIdentifier();\n } else {\n // this may not happen but in case\n $getIdentifier = \\Closure::bind(function () {\n return $this->identifier;\n }, $this->object, get_class($this->object));\n\n $identifier = $getIdentifier();\n }\n $this->object->initializeProxy();\n $persister->load($identifier, $this->object);\n }\n }\n }\n }", "title": "" }, { "docid": "2babdb86d84180576499bdb27da1d274", "score": "0.6223052", "text": "protected abstract function init();", "title": "" }, { "docid": "7545a02c545471d3d46494deb6a3d54d", "score": "0.6202403", "text": "abstract protected function doInit();", "title": "" }, { "docid": "66d0394efb21b2bbe8416a2ade27a465", "score": "0.6189065", "text": "protected function initialize() {}", "title": "" }, { "docid": "66d0394efb21b2bbe8416a2ade27a465", "score": "0.61887115", "text": "protected function initialize() {}", "title": "" }, { "docid": "66d0394efb21b2bbe8416a2ade27a465", "score": "0.61887115", "text": "protected function initialize() {}", "title": "" }, { "docid": "66d0394efb21b2bbe8416a2ade27a465", "score": "0.61887115", "text": "protected function initialize() {}", "title": "" }, { "docid": "66d0394efb21b2bbe8416a2ade27a465", "score": "0.61887115", "text": "protected function initialize() {}", "title": "" }, { "docid": "66d0394efb21b2bbe8416a2ade27a465", "score": "0.61878926", "text": "protected function initialize() {}", "title": "" }, { "docid": "66d0394efb21b2bbe8416a2ade27a465", "score": "0.6187725", "text": "protected function initialize() {}", "title": "" }, { "docid": "ec9c3f89aeed607bddd462fab841f2c8", "score": "0.6166239", "text": "public abstract function init();", "title": "" }, { "docid": "ec9c3f89aeed607bddd462fab841f2c8", "score": "0.6166239", "text": "public abstract function init();", "title": "" }, { "docid": "ec9c3f89aeed607bddd462fab841f2c8", "score": "0.6166239", "text": "public abstract function init();", "title": "" }, { "docid": "ec9c3f89aeed607bddd462fab841f2c8", "score": "0.6166239", "text": "public abstract function init();", "title": "" }, { "docid": "3d18bdfc2f5f9d640c05ddd39a45b95f", "score": "0.61615926", "text": "private function init() {\n\t}", "title": "" }, { "docid": "80a281e06e8905abaff0ac3db7c09b8e", "score": "0.6141522", "text": "protected function init(){}", "title": "" }, { "docid": "80a281e06e8905abaff0ac3db7c09b8e", "score": "0.6141522", "text": "protected function init(){}", "title": "" }, { "docid": "015863bd8273ddf1c3335a82240a8da7", "score": "0.6108814", "text": "protected function beforeInit() {}", "title": "" }, { "docid": "a9bfc87063389e44429b718d0ee157d0", "score": "0.61061126", "text": "protected function _init() {\n\t}", "title": "" }, { "docid": "0e6e864e80a98aa08db362cf9785424f", "score": "0.6093935", "text": "protected function init()\n {}", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.60887957", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.60887957", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.60887957", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.60887957", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.60887957", "text": "abstract protected function init();", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.60791445", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.60783666", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.6078243", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.6078243", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.6078243", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.6078243", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.6078243", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.6078243", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.6078243", "text": "public function init() {}", "title": "" }, { "docid": "f0ac2a4a51ae9904078f2f36575db4be", "score": "0.6077465", "text": "public function init() {\n // abstract since it doesn't *have* to be, so it's left empty\n }", "title": "" }, { "docid": "429af46ee59bda8a2c8d2a6bd6c983a4", "score": "0.6053843", "text": "static public function init()\n {\n set_error_handler(array('ErrorExceptionProxy', 'handler')); \n }", "title": "" }, { "docid": "acc008c1d3d1939775fdfb69044aad2e", "score": "0.60490996", "text": "public function initialize() {}", "title": "" }, { "docid": "acc008c1d3d1939775fdfb69044aad2e", "score": "0.60482305", "text": "public function initialize() {}", "title": "" }, { "docid": "acc008c1d3d1939775fdfb69044aad2e", "score": "0.60482305", "text": "public function initialize() {}", "title": "" }, { "docid": "acc008c1d3d1939775fdfb69044aad2e", "score": "0.60482305", "text": "public function initialize() {}", "title": "" }, { "docid": "acc008c1d3d1939775fdfb69044aad2e", "score": "0.60481703", "text": "public function initialize() {}", "title": "" }, { "docid": "acc008c1d3d1939775fdfb69044aad2e", "score": "0.60481703", "text": "public function initialize() {}", "title": "" }, { "docid": "acc008c1d3d1939775fdfb69044aad2e", "score": "0.60481703", "text": "public function initialize() {}", "title": "" }, { "docid": "acc008c1d3d1939775fdfb69044aad2e", "score": "0.60481703", "text": "public function initialize() {}", "title": "" }, { "docid": "5e870d5bd0faf48f0944c2cdc0351bf8", "score": "0.6046727", "text": "protected function _init()\n {\n return true;\n }", "title": "" }, { "docid": "20a997f60f3086611e9b7f0b4088ff8f", "score": "0.60422856", "text": "abstract protected function initialize();", "title": "" }, { "docid": "f00ebff73e8f51c80a447f2f087d8800", "score": "0.60414547", "text": "private function init(): void\n {\n }", "title": "" }, { "docid": "4065c5bca1c56aa24931be51d99c42a4", "score": "0.6029234", "text": "protected function _setProxy() {\n\t\tif (empty ( $this->_proxy ) || ! isset ( $this->_proxy ['host'], $this->_proxy ['port'] )) {\n\t\t\treturn;\n\t\t}\n\t\t$this->config ['host'] = $this->_proxy ['host'];\n\t\t$this->config ['port'] = $this->_proxy ['port'];\n\t\t\n\t\tif (empty ( $this->_proxy ['method'] ) || ! isset ( $this->_proxy ['user'], $this->_proxy ['pass'] )) {\n\t\t\treturn;\n\t\t}\n\t\tlist ( $plugin, $authClass ) = pluginSplit ( $this->_proxy ['method'], true );\n\t\t$authClass = Inflector::camelize ( $authClass ) . 'Authentication';\n\t\tApp::uses ( $authClass, $plugin . 'Network/Http' );\n\t\t\n\t\tif (! class_exists ( $authClass )) {\n\t\t\tthrow new SocketException ( __d ( 'cake_dev', 'Unknown authentication method for proxy.' ) );\n\t\t}\n\t\tif (! method_exists ( $authClass, 'proxyAuthentication' )) {\n\t\t\tthrow new SocketException ( __d ( 'cake_dev', 'The %s does not support proxy authentication.', $authClass ) );\n\t\t}\n\t\tcall_user_func_array ( \"$authClass::proxyAuthentication\", array (\n\t\t\t\t$this,\n\t\t\t\t&$this->_proxy \n\t\t) );\n\t}", "title": "" }, { "docid": "b72f1a06dbae881d50ebff3d621da090", "score": "0.60237736", "text": "abstract protected function _init();", "title": "" }, { "docid": "4b273063f6e4d865e552b8f07a4623c8", "score": "0.60056794", "text": "protected function _init()\n {\n }", "title": "" }, { "docid": "a463f7ea2a8acc6bd3c6e66d6adb0cff", "score": "0.59969395", "text": "protected function init() {\n\t}", "title": "" }, { "docid": "a463f7ea2a8acc6bd3c6e66d6adb0cff", "score": "0.59969395", "text": "protected function init() {\n\t}", "title": "" }, { "docid": "60d7c260bd4aaf21e3cbcc9409a0e723", "score": "0.59902626", "text": "public function initialize () {\n if ($this->instance->config->cors['enabled'] !== true) return;\n\n // Run the Cors layer\n $this->run();\n }", "title": "" }, { "docid": "54c0b9b3811d8f173bb623dda7ea1a4a", "score": "0.5989555", "text": "public function MySQLProxy() {\n\t\tself::__connect();\n\t}", "title": "" }, { "docid": "e1529f259a39f2f94f997c5e87d61a0f", "score": "0.5981248", "text": "abstract public function initialize();", "title": "" }, { "docid": "4437a4a6146f0492fabeeefabca22bd5", "score": "0.59722406", "text": "abstract public function init();", "title": "" }, { "docid": "4437a4a6146f0492fabeeefabca22bd5", "score": "0.59722406", "text": "abstract public function init();", "title": "" }, { "docid": "4437a4a6146f0492fabeeefabca22bd5", "score": "0.59722406", "text": "abstract public function init();", "title": "" }, { "docid": "4437a4a6146f0492fabeeefabca22bd5", "score": "0.59722406", "text": "abstract public function init();", "title": "" }, { "docid": "4437a4a6146f0492fabeeefabca22bd5", "score": "0.59722406", "text": "abstract public function init();", "title": "" }, { "docid": "dbbd7e6e5e6e4b09aaadf1cc1b0d0a17", "score": "0.59659606", "text": "protected function setProxy()\r\n {\r\n $this->setCredentials();\r\n try {\r\n\r\n if ($this->authLogin != '' && $this->authKey != '') {\r\n $this->proxy = new SoapClient($this->soapURLv2, array(\r\n 'login' => $this->authLogin,\r\n 'password' => $this->authKey,\r\n 'trace' => 1\r\n ));\r\n } else {\r\n $this->proxy = new SoapClient($this->soapURLv2, ['trace' => 1]);\r\n }\r\n } catch (Exception $error) {\r\n Mage::log('----REQUEST-----', Zend_Log::INFO, 'emapi-soap-logger.log', true);\r\n Mage::log((string)$error, Zend_Log::INFO, 'emapi-soap-logger.log', true);\r\n Mage::log((string)$this->proxy->__getLastRequest(), Zend_Log::INFO, 'emapi-soap-logger.log', true);\r\n Mage::log((string)$this->proxy->__getLastResponse(), Zend_Log::INFO, 'emapi-soap-logger.log', true);\r\n }\r\n }", "title": "" }, { "docid": "8f369c81a3e1916893cff88d4ed959f9", "score": "0.5964039", "text": "protected function postInitialize()\n {\n\n }", "title": "" }, { "docid": "12a0181167b65974a77626de052b21ac", "score": "0.59589404", "text": "public function init() {\n // nothing to do here\n }", "title": "" }, { "docid": "12a0181167b65974a77626de052b21ac", "score": "0.59589404", "text": "public function init() {\n // nothing to do here\n }", "title": "" }, { "docid": "12a0181167b65974a77626de052b21ac", "score": "0.59589404", "text": "public function init() {\n // nothing to do here\n }", "title": "" }, { "docid": "12a0181167b65974a77626de052b21ac", "score": "0.59589404", "text": "public function init() {\n // nothing to do here\n }", "title": "" }, { "docid": "5349f4d857af6bfb055d7aabd6734f81", "score": "0.5949928", "text": "protected function _lazyInit()\n {\n if (!$this->_issue) {\n // @codeCoverageIgnoreStart\n $this->_setIssue(new Issue);\n // @codeCoverageIgnoreEnd\n }\n }", "title": "" }, { "docid": "c6456eb1b7e18bf0b3aab668698b8004", "score": "0.59308", "text": "protected function afterInit() {}", "title": "" }, { "docid": "e6edfc644597e0970ebb34ec3c414efe", "score": "0.5925004", "text": "private function init()\n\t{\n\t}", "title": "" }, { "docid": "631092ce2d03f630d30ba94e87ca02a2", "score": "0.5913108", "text": "public function _initialize() {\r\n }", "title": "" }, { "docid": "934f8e91642a592eabe930f01013ae30", "score": "0.5906744", "text": "public function __construct()\n {\n $this->services = $this->privates = [];\n $this->methodMapping = [\n 'lazy_context' => 'getdc1c499a0f494602672f377f9bb02214800d1660c4d5bf3fb7e1b79129e0c450',\n 'lazy_referenced' => 'getc08d12f61bf4e4314323551ae77da544be2af9b29cf9f10866e4797a464a76d1',\n ];\n }", "title": "" }, { "docid": "ab1079b9938ce6d67b10b0983acffc11", "score": "0.5905578", "text": "abstract function init();", "title": "" }, { "docid": "0ac4f674cdefdf0794ce45e17311fa16", "score": "0.59037995", "text": "public function init(){}", "title": "" }, { "docid": "0ac4f674cdefdf0794ce45e17311fa16", "score": "0.59037995", "text": "public function init(){}", "title": "" }, { "docid": "6157f91eec9921ec88565ff91ae4fc52", "score": "0.5903638", "text": "public function init()\n {\n parent::init();\n \n $this->serviceUrl = 'https://omnc.outboundsoftware.com/api45/Service1.asmx?WSDL';\n try {\n $this->outboundApi = new SoapClient($this->serviceUrl);\n } catch (Exception $e) {\n $this->displayExeceptionMessage($e->getMessage());\n }\n }", "title": "" }, { "docid": "ac4e07da3af27c98fecfed57a35b66fb", "score": "0.5902184", "text": "public static function initialize()\n {\n date_default_timezone_set('Asia/Shanghai');\n Coroutine::set(['hook_flags'=> SWOOLE_HOOK_ALL | SWOOLE_HOOK_CURL]);\n\n //注册Mysql连接池\n $dbData = Config::getInstance()->getConf('MYSQL');\n $dbConfig = new DbConfig($dbData);\n DbManager::getInstance()->addConnection(new Connection($dbConfig));\n\n //注册redis连接池\n $redisData = Config::getInstance()->getConf('REDIS');\n $redisConfig = new RedisConfig($redisData);\n Redis::getInstance()->register('redis',$redisConfig);\n }", "title": "" }, { "docid": "d86321cbe4a62a201bc3b7500287e0dc", "score": "0.5900314", "text": "public function __construct($proxyUrl)\n {\n $this->proxyUrl = $proxyUrl;\n }", "title": "" }, { "docid": "8698dc63d8eb14d625e766f36b00793a", "score": "0.5886706", "text": "protected function initialize(): void\n {\n $this->initialized = true;\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.58857244", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.58857244", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.58857244", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.58857244", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.58857244", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "4be2b3c5e83cf04039a094c113990582", "score": "0.5885378", "text": "protected function _init()\n {\n $this->server_addr = 'http://113.108.86.20/qzone';\n $this->v = self::DEFAULT_SERVICE_VERSION;\n }", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.5884069", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.5884069", "text": "public function init();", "title": "" } ]
a8f32ac32590884c1df543e8253b629e
Revert the changes to the database.
[ { "docid": "d356ff1eecd7fc6e546e265a1559be04", "score": "0.0", "text": "public function down()\n\t{\n\t\tSchema::drop('diskus_comments');\n\t}", "title": "" } ]
[ { "docid": "5882065253c8d08f6b2169b07d1e6695", "score": "0.7292081", "text": "public function revert();", "title": "" }, { "docid": "dee2127161dcf3a75f54208feaa7cc7e", "score": "0.71497995", "text": "function revert_table() {\r\n $this->_table = $this->_table_org;\r\n $this->_table_org = NULL;\r\n }", "title": "" }, { "docid": "18be415ad083d5e9a8475c39f05f3b5d", "score": "0.7059885", "text": "function rollback() {\n\t\t\tself::$db->rollback();\n\t\t}", "title": "" }, { "docid": "74284150fe7dd36b3dbd97ab4db246bb", "score": "0.6909689", "text": "protected function rollback()\n\t{\n\t\t$this->db->rollback();\n\t}", "title": "" }, { "docid": "8cf61aa8ebe11b97e73275df7d515b95", "score": "0.6856882", "text": "public function rollback() {\n if (!$this->changed())\n return;\n\n $this->tags = array('new' => array(), 'del' => array());\n $this->inited = false;\n }", "title": "" }, { "docid": "da9c51434c236ac5744980e30d102185", "score": "0.6805857", "text": "abstract public function revert();", "title": "" }, { "docid": "ce71439d3ec0a27a1be626c10b133c70", "score": "0.67922175", "text": "public function revert(){\n\t}", "title": "" }, { "docid": "b374eafc64ed32cadce55661f5f78ced", "score": "0.67557395", "text": "public function revert()\n {\n $model = $this->getModel();\n unset( $model->{$model->getCreatedAtColumn()} );\n unset( $model->{$model->getUpdatedAtColumn()} );\n if (method_exists($model, 'getDeletedAtColumn')) {\n unset( $model->{$model->getDeletedAtColumn()} );\n }\n $model->save();\n return $model;\n }", "title": "" }, { "docid": "b374eafc64ed32cadce55661f5f78ced", "score": "0.67557395", "text": "public function revert()\n {\n $model = $this->getModel();\n unset( $model->{$model->getCreatedAtColumn()} );\n unset( $model->{$model->getUpdatedAtColumn()} );\n if (method_exists($model, 'getDeletedAtColumn')) {\n unset( $model->{$model->getDeletedAtColumn()} );\n }\n $model->save();\n return $model;\n }", "title": "" }, { "docid": "61a395ffdbb1dd9bf096a9b5aebf276c", "score": "0.65832794", "text": "protected function rollback() {\n $this->objDbConn->rollBack();\n }", "title": "" }, { "docid": "60c8540555e855561f6693d55628390e", "score": "0.65734553", "text": "public function down()\n {\n $this->table('contents')->drop()->save();\n }", "title": "" }, { "docid": "f05f0e797605049ba4c53ef58985d351", "score": "0.6336209", "text": "public function revert()\n {\n return tap($this->apply(), function ($versionedModel) {\n $versionedModel->versions()->after($this)->each->delete();\n\n $this->update(['reverted_at' => $this->freshTimestamp()]);\n });\n }", "title": "" }, { "docid": "08cf34f0eddc4c30efba7bf503d6a4d0", "score": "0.62988555", "text": "public function restore()\n {\n //Query Builder\n DB::table('users')->delete();\n DB::table('respuestas')->delete();\n \n echo \"Realizado\";\n }", "title": "" }, { "docid": "8e6ce451f2fc85a70814eb64aa33c99a", "score": "0.6282911", "text": "public function down()\n {\n $this->table('articles')->drop()->save();\n $this->table('categories')->drop()->save();\n $this->table('football_ragistrations')->drop()->save();\n $this->table('friends')->drop()->save();\n $this->table('menus')->drop()->save();\n $this->table('picnic_ragistrations')->drop()->save();\n $this->table('products')->drop()->save();\n $this->table('profiles')->drop()->save();\n $this->table('skills')->drop()->save();\n $this->table('spouses')->drop()->save();\n $this->table('students')->drop()->save();\n $this->table('submenus')->drop()->save();\n $this->table('users')->drop()->save();\n }", "title": "" }, { "docid": "12c0810aac45a549c739d3037c0a7f2c", "score": "0.62360376", "text": "public function rollback()\n\t{\n\t\tforeach($this->subformArr as $key => $sf) $sf->rollback();\n\t}", "title": "" }, { "docid": "c68ae78ec41c63ceaa8d3e9f0db20550", "score": "0.6209886", "text": "public function down(): void\n {\n try {\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"DROP TABLE IF EXISTS prom2_pages\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "title": "" }, { "docid": "94c115ae317fec30215c2e9682a870e8", "score": "0.619224", "text": "public function testRevert(): void\n {\n $this->model->apply();\n $this->model->revert(new DataObject());\n $this->assertEquals('', getenv('sample_fixture_three'));\n }", "title": "" }, { "docid": "9d4088f08d55989537bdd3d84b7bcb1c", "score": "0.6180292", "text": "public function rollback()\n{\n\t$this->query('ROLLBACK');\n}", "title": "" }, { "docid": "8af60d25c01ddc437229e84dcb0af7e5", "score": "0.6160064", "text": "public function reset()\n {\n delete_option($this->dbVersionKey);\n }", "title": "" }, { "docid": "4b8313ae910705cd037c7f322a3ef1b0", "score": "0.6139101", "text": "protected function rollbackToSavePoint(): void\n {\n foreach ($this->getActiveConnections() as $connection) {\n try {\n while ($connection->isTransactionActive()) {\n $connection->rollBack();\n }\n } catch (\\Exception $e) {\n }\n }\n }", "title": "" }, { "docid": "f766074015a502a3473705c6f209d4ab", "score": "0.6118888", "text": "public function rollbackTransaction() {\r\n\t\t// TODO: Implement transaction stuff.\r\n\t\t//$this->query('ROLLBACK TRANSACTION');\r\n\t}", "title": "" }, { "docid": "250111d74836ca6eb0a66de51c76799a", "score": "0.6117792", "text": "public function rollback();", "title": "" }, { "docid": "250111d74836ca6eb0a66de51c76799a", "score": "0.6117792", "text": "public function rollback();", "title": "" }, { "docid": "250111d74836ca6eb0a66de51c76799a", "score": "0.6117792", "text": "public function rollback();", "title": "" }, { "docid": "250111d74836ca6eb0a66de51c76799a", "score": "0.6117792", "text": "public function rollback();", "title": "" }, { "docid": "4642133fd1746175518c8e0f50d3580d", "score": "0.61160964", "text": "public function rollbackTransaction()\n {\n mysqli_query($this->databaseLink,\"ROLLBACK;\");\n }", "title": "" }, { "docid": "bc2d9f6d923c69b80ac295132906bd5b", "score": "0.60941815", "text": "public function rollback()\n {\n // my code\n $by = 'id';\n $order = 'desc';\n $eventMessages = CEventMessage::GetList($by, $order, ['TYPE' => self::EVENT_TYPE]);\n $eventMessage = new CEventMessage;\n while ($template = $eventMessages->Fetch()) {\n $eventMessage->Delete((int)$template['ID']);\n }\n CEventType::Delete(self::EVENT_TYPE);\n }", "title": "" }, { "docid": "d399d411263a79b1a34d2de0371815ff", "score": "0.60928744", "text": "public function down()\n {\n //Schema::dropIfExists('c');//回滚时执行\n\n }", "title": "" }, { "docid": "47dba8575f083d49f69c766ad0a02cea", "score": "0.60890484", "text": "public function rollback(){\n return $this->forge->table('users')->ifExists()->drop();\n }", "title": "" }, { "docid": "cfab477e864a39e09df247b2142ade7b", "score": "0.6071932", "text": "public function rollback(){\n $this->db->exec('ROLLBACK TO xyz;');\n }", "title": "" }, { "docid": "e59bb3b4fbf9840c57a0ecc4c193b54f", "score": "0.6071104", "text": "protected function _rollback() {\n $this->dataSource->rollback($this);\n }", "title": "" }, { "docid": "40a80edfe6ffd96bc7e23739ddc9c4f1", "score": "0.6066129", "text": "public function rollback()\n {\n if (self::$_transactionLevel == 1) {\n $this->getConnection()->rollBack();\n }\n \n if (self::$_transactionLevel > 0) {\n self::$_transactionLevel--;\n }\n }", "title": "" }, { "docid": "3f6bbbf736bf69bbe451ef80e7adb8b8", "score": "0.6063862", "text": "public function rollback()\n\t{\n\t}", "title": "" }, { "docid": "3f6bbbf736bf69bbe451ef80e7adb8b8", "score": "0.6063862", "text": "public function rollback()\n\t{\n\t}", "title": "" }, { "docid": "567180f229968d09a6e1a19aa933acd7", "score": "0.6054491", "text": "public function revertTable(Source $source, AbstractTable $table);", "title": "" }, { "docid": "26ea69ba9f682435d33426462f4643db", "score": "0.6049777", "text": "function rollback(){\n\t\ttry {\n\t\t\t$this->dbconn->rollBack();\n\t\t}catch(Exception $e){\n\t\t\t$this->logger->error($e->getMessage());\n\t\t\tthrow $e;\n\t\t}\n\t}", "title": "" }, { "docid": "1acdc73beeb0906d04cd748b13918e30", "score": "0.60294557", "text": "public function safeDown()\n {\n //return false;\n $this->dropTable($this->tablePost);\n $this->dropTable($this->tableUser);\n }", "title": "" }, { "docid": "5cd52c988704632a1e89caa01f79ca02", "score": "0.6021788", "text": "public function down()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{rights}}\")){\n\t\t\t$this->dropTable(\"{{rights}}\");\n\t\t}\n\t}", "title": "" }, { "docid": "c2c04081de93d58fb534b910f25d6423", "score": "0.6019176", "text": "public function down()\n {\n $this->table('accounting_entries')\n ->dropForeignKey(\n 'accounting_entry_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('associations_events')\n ->dropForeignKey(\n 'event_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('events')\n ->dropForeignKey(\n 'event_type_id'\n )->save();\n\n $this->table('members')\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics')\n ->dropForeignKey(\n 'statistics_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics_event')\n ->dropForeignKey(\n 'statistics_id'\n )\n ->dropForeignKey(\n 'event_id'\n )->save();\n\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('accounting_entries')->drop()->save();\n $this->table('accounting_entry_type')->drop()->save();\n $this->table('associations')->drop()->save();\n $this->table('associations_events')->drop()->save();\n $this->table('event_type')->drop()->save();\n $this->table('events')->drop()->save();\n $this->table('members')->drop()->save();\n $this->table('roles')->drop()->save();\n $this->table('statistics')->drop()->save();\n $this->table('statistics_event')->drop()->save();\n $this->table('statistics_type')->drop()->save();\n $this->table('users')->drop()->save();\n }", "title": "" }, { "docid": "8a518803aa3f101d432dabc15a63efce", "score": "0.60183495", "text": "public function rollback()\n {\n }", "title": "" }, { "docid": "8a518803aa3f101d432dabc15a63efce", "score": "0.60183495", "text": "public function rollback()\n {\n }", "title": "" }, { "docid": "3477114ef4b99a4659b4ec8ae2e289c2", "score": "0.6015872", "text": "public function down()\n {\n $this->table('mail_contents')->drop()->save();\n }", "title": "" }, { "docid": "bc63858ca5b5f751c9a11c068bd5b494", "score": "0.6013526", "text": "public function rollBack(){\r\n $this->db->rollBack();\r\n }", "title": "" }, { "docid": "630692e195cc9986588426519faff7b8", "score": "0.6006622", "text": "protected function rollBackTransaction()\n {\n $this->container->make('db')->rollBack();\n }", "title": "" }, { "docid": "09e2cee9d21cd70bab983aeec716b0e3", "score": "0.60054153", "text": "function undo()\n {\n $this->document->eraseLast();\n }", "title": "" }, { "docid": "778a3bad60c7a3f975a2998e5b4d4a82", "score": "0.6005161", "text": "public function resetDatabase(): void\n {\n $this->exec('DELETE FROM fo_forms');\n $this->exec('ALTER TABLE fo_forms AUTO_INCREMENT=1000');\n }", "title": "" }, { "docid": "dd066c9ea8ca26264a987bc3b14f9712", "score": "0.6004645", "text": "public function rollback() {\n\t\t$this->execute(\"ROLLBACK; SET autocommit = 1;\");\n\t}", "title": "" }, { "docid": "327614d8d033570e6ea509b7d9e0a41a", "score": "0.6004373", "text": "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "title": "" }, { "docid": "327614d8d033570e6ea509b7d9e0a41a", "score": "0.6004373", "text": "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "title": "" }, { "docid": "327614d8d033570e6ea509b7d9e0a41a", "score": "0.6004373", "text": "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "title": "" }, { "docid": "b339770962f2d0b354a5e3696944a022", "score": "0.5984222", "text": "public function rollback() {\n parent::rollback();\n $this->activeTransaction = false;\n }", "title": "" }, { "docid": "7224d8a768a87cac7bc6972f8f661f5b", "score": "0.5943398", "text": "public function rollbackTransaction() {\n\t\t//noop\n\t}", "title": "" }, { "docid": "38ff1325b39186e52028c2bccd1ea176", "score": "0.5925681", "text": "public function safeDown()\n {\n $this->dropTable($this->tableName);\n }", "title": "" }, { "docid": "ea0627ed67e52fcd7dfe3af61a38b9c2", "score": "0.5919163", "text": "protected function resetDb()\n {\n if (is_readable(PHPUNIT_WEBROOT . '/app/database/bolt.db')) {\n unlink(PHPUNIT_WEBROOT . '/app/database/bolt.db');\n copy(PHPUNIT_ROOT . '/resources/db/bolt.db', PHPUNIT_WEBROOT . '/app/database/bolt.db');\n }\n }", "title": "" }, { "docid": "b2bbe5c4a85c5df7eae743e6fa7e0669", "score": "0.5918611", "text": "public function restored(Project $project)\n {\n //\n }", "title": "" }, { "docid": "46b8f6086b81907510d177932683eafc", "score": "0.5901923", "text": "public function rollBack()\n {\n $this->getActivePdo()->rollBack();\n }", "title": "" }, { "docid": "1e9e2d39b788ea22f77ebed3edbcaa57", "score": "0.5893965", "text": "protected function tearDown(): void {\n $migration = include __DIR__.'/../database/migrations/create_all_visitors_tables.php.stub';\n $migration->down();\n\n $migrationTest = include __DIR__.'/Support/migrations/2023_01_12_000000_create_test_models_table.php';\n $migrationTest->down();\n }", "title": "" }, { "docid": "5d8d2ffb7796c104e324d1abf01ea6fd", "score": "0.5889705", "text": "public function undoRestore ()\n {\n if (file_exists ( $this->_previewFilename ))\n {\n unlink($this->_previewFilename);\n }\n }", "title": "" }, { "docid": "2fcc7ed92a014927f3c0e41d9c284c7a", "score": "0.5887693", "text": "public function down()\n {\n \t\n \t$this->createTable('os', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n \t$this->insert('os', ['id' => 1, 'name' => 'Any']);\n \t$this->insert('os', ['id' => 2, 'name' => 'CentOS']);\n \t$this->insert('os', ['id' => 3, 'name' => 'RHEL']);\n \t$this->insert('os', ['id' => 4, 'name' => 'Fedora']);\n \t \n \t$this->createTable('os_bit', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n\n return false;\n }", "title": "" }, { "docid": "c07729046d6b78a575302e3ac0f68e4b", "score": "0.58827955", "text": "public function down()\n {\n $this->dbforge->drop_table('lecturer', true);\n }", "title": "" }, { "docid": "044a19cd381f5b97d02bb7b129798450", "score": "0.58764946", "text": "public function rollBack()\n {\n if ($this->transactions == 1) {\n $this->transactions = 0;\n\n $this->getPdo()->rollBack();\n } else {\n $this->transactions--;\n }\n }", "title": "" }, { "docid": "70123b3dd4e8c1446e0ed111ba1426df", "score": "0.5855949", "text": "public function down() {\n $this->dbforge->drop_column('timesheets_items', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'reason_desc', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'reason_desc', TRUE);\n\n // change reason to note\n $fields = array(\n 'reason' => array(\n 'name' => 'note',\n 'type' => \"VARCHAR\",\n 'constraint' => 200,\n 'null' => TRUE\n )\n );\n $this->dbforge->modify_column('timesheets_items', $fields);\n $this->dbforge->modify_column('timesheets_expenses', $fields);\n }", "title": "" }, { "docid": "7f69a21faed4f407bb657f62bae98397", "score": "0.585282", "text": "public function down()\n {\n Schema::dropIfExists('records');\n }", "title": "" }, { "docid": "1de274a1575abf893bf3c5f8a33b928c", "score": "0.5851152", "text": "public function down()\n {\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )->save();\n\n $this->table('users')\n ->removeIndexByName('FK_users_roles')\n ->update();\n\n $this->table('users')\n ->addColumn('can_edit', 'boolean', [\n 'after' => 'enabled',\n 'default' => '0',\n 'length' => null,\n 'null' => false,\n ])\n ->removeColumn('role_id')\n ->update();\n\n $this->table('stundenplan')\n ->changeColumn('note', 'string', [\n 'default' => null,\n 'length' => 255,\n 'null' => true,\n ])\n ->removeColumn('loggedInNote')\n ->update();\n\n $this->table('roles')->drop()->save();\n }", "title": "" }, { "docid": "055a3305449d035785f8bd22dd1f3a3c", "score": "0.58445597", "text": "public function rollbackTransaction();", "title": "" }, { "docid": "4f75532e16965ecbf073e14d1491602b", "score": "0.584357", "text": "public function down()\n\t{\n\t\techo $this->migration('down');\n\n\t\tci('o_role_model')->migration_remove($this->hash());\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "bb7c5a6a7d4239fd8ff6f92ae00f7c6e", "score": "0.58400315", "text": "public function reset()\n {\n $this->getDb()->exec('delete from media');\n //pictures and vignettes deletion\n $this->deleteMedias();\n //backup deletion\n $this->deleteBackup();\n }", "title": "" }, { "docid": "ba42bcd5145ab66936943836ebf7959f", "score": "0.58383965", "text": "private function resetDatabase()\n {\n $dumpFolder = APPLICATION_PATH . '/../data/dumps/';\n\n $directoryIterator = new DirectoryIterator($dumpFolder);\n /**\n * @var Zend_Db_Adapter_Abstract $db\n */\n $db = Zend_Registry::get('db');\n\n foreach ($directoryIterator as $file) {\n if (!$file->isDot()\n && $file->isFile()\n && $file->isReadable()\n ) {\n $sql = file_get_contents($file->getPathname());\n $db->query($sql);\n }\n }\n }", "title": "" }, { "docid": "648d40ab763c3940166182fe193e7e9d", "score": "0.5829649", "text": "public function down()\n\t{\nDB::query(\n\"drop table haal;\");\nDB::query(\n\"drop table kandidaat;\");\nDB::query(\n\"drop table haaletaja;\");\nDB::query(\n\"drop table partei;\");\nDB::query(\n\"drop table valimisringkond;\");\n\t}", "title": "" }, { "docid": "85628f651b3f971bf2aa88a0ce6c3059", "score": "0.5825304", "text": "public function down()\n\t{\n\t\t// Remove data from committee_members\n\t\tDB::table('committee_members')->where('id', '<', 3)->delete();\t\n\t}", "title": "" }, { "docid": "13c08e059637eba92addbca0847bbd95", "score": "0.5806368", "text": "public function down(): bool {\n\t\t// Remove & add logic to revert the migration here.\n\t\techo \"M230123030315BaseTables cannot be rolled back.\\n\";\n\t\treturn false;\n\t}", "title": "" }, { "docid": "ae5bd39a0c69eca883d04149bf87fc4f", "score": "0.5801185", "text": "public function transactionRollback()\n\t{\n\t\treturn;\n\t}", "title": "" }, { "docid": "4057dc58b3392f39922d1a7df2fa92e8", "score": "0.579873", "text": "function rollback(): void;", "title": "" }, { "docid": "ce8c73ec98c288389e321c37c2b1ba9f", "score": "0.57958454", "text": "public function down()\n {\n Schema::dropIfExists('reunion');\n }", "title": "" }, { "docid": "32b6c66201ecfe59e2e3359cdfc33815", "score": "0.5792813", "text": "public function down()\n\t{\n\t\t$transaction=$this->getDbConnection()->beginTransaction();\n\t\ttry\n\t\t{\n\t\t\t$this->dropTable('products');\n\t\t\t$transaction->commit();\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\techo \"Exception: \".$e->getMessage().\"\\n\";\n\t\t\t$transaction->rollBack();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "734dd649b94e70d03ad20519573b0037", "score": "0.5779404", "text": "public function restore(){\n $this->update(['deleted_by', NULL]);\n return $this->baseRestore();\n }", "title": "" }, { "docid": "2fb9cfa435c3150a0d053e5211950809", "score": "0.5772285", "text": "public function down()\n\t{\n\t\tDB::table('professor')->where('professor_id', '=', 1)->delete();\n\t\tDB::table('professor')->where('professor_id', '=', 2)->delete();\n\t\tDB::query('ALTER TABLE professor AUTO_INCREMENT = 1');\n\n\t\t//\n\t}", "title": "" }, { "docid": "8dae25621509de1bb5fd99af7714f2f9", "score": "0.57671595", "text": "protected function tearDown(): void\n {\n $this->dbClear();\n }", "title": "" }, { "docid": "ed988aef802d292afdb81f419a6549ed", "score": "0.5765607", "text": "public function safeDown()\n {\n $this->dropForeignKey(\n 'fk-production_prepare_order-order',\n 'production_prepare_order'\n );\n\n // drops index for column `order`\n $this->dropIndex(\n 'idx-production_prepare_order-order',\n 'production_prepare_order'\n );\n\n // drops foreign key for table `production_stage_prepare`\n $this->dropForeignKey(\n 'fk-production_prepare_order-stage',\n 'production_prepare_order'\n );\n\n // drops index for column `stage`\n $this->dropIndex(\n 'idx-production_prepare_order-stage',\n 'production_prepare_order'\n );\n\n $this->dropTable('production_prepare_order');\n }", "title": "" }, { "docid": "b76f75f5f3bbee82d09f47279e944fd1", "score": "0.57589066", "text": "public function restored(Edit $edit)\n {\n //\n }", "title": "" }, { "docid": "cf0b3a1acf51f9e86edd972c8a252dae", "score": "0.5757892", "text": "public function cleanupDatabase() {\n\t\t\tif ( !$this->getTableExists() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$sQuery = \"\n\t\t\t\tDELETE from `%s`\n\t\t\t\tWHERE\n\t\t\t\t\t`day_id`\t\t\t!= '0'\n\t\t\t\t\tAND `created_at`\t< '%s'\n\t\t\t\";\n\t\t\t$sQuery = sprintf( $sQuery,\n\t\t\t\t$this->getTableName(),\n\t\t\t\t( $this->loadDP()->time() - 31*DAY_IN_SECONDS )\n\t\t\t);\n\t\t\t$this->loadDbProcessor()->doSql( $sQuery );\n\t\t}", "title": "" }, { "docid": "6fae00dcff40b7addfef4b3630d067d9", "score": "0.5752394", "text": "public function down()\n\t{\n\t\tSchema::dropIfExists('ProjectInspection');\n\t}", "title": "" }, { "docid": "63253c2571b1782ddcccb5939f310e63", "score": "0.57495576", "text": "public function down()\n {\n Schema::dropIfExists('data');\n }", "title": "" }, { "docid": "784b7416be1997ad5a7ccc665f4b5c3b", "score": "0.5730796", "text": "public function undo(Diff $diff);", "title": "" }, { "docid": "eea3991c7f0e4ba7e4740e03e1bdba06", "score": "0.5728246", "text": "public function wipeAll() {\n\t\tforeach($this->getTables() as $t) {\n\t\t\tforeach($this->getKeys($t) as $k) {\n\t\t\t\t$this->adapter->exec(\"ALTER TABLE \\\"{$k['FKTABLE_NAME']}\\\" DROP FOREIGN KEY \\\"{$k['FK_NAME']}\\\"\");\n\t\t\t}\n\t\t\t$this->adapter->exec(\"DROP TABLE \\\"$t\\\"\");\n\t\t}\n\t\tforeach($this->getTables() as $t) {\n\t\t\t$this->adapter->exec(\"DROP TABLE \\\"$t\\\"\");\n\t\t}\n\t}", "title": "" }, { "docid": "2fda874aada8433529bc5b271e02e9e2", "score": "0.5727236", "text": "abstract public function unloadDatabase();", "title": "" }, { "docid": "68416e520808cfe831bc3aa9643ffd45", "score": "0.57261324", "text": "private function cleanDatabase()\n {\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n foreach($this->tables as $table)\n {\n\n DB::table($table)->truncate();\n\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n\n\n }", "title": "" }, { "docid": "e200af8c0e0d280de7f810363bae0226", "score": "0.57223666", "text": "public function afterTearDown()\n {\n $this->schema()->dropIfExists('users');\n $this->schema()->dropIfExists('friends');\n $this->schema()->dropIfExists('posts');\n $this->schema()->dropIfExists('comments');\n $this->schema()->dropIfExists('photos');\n $this->schema()->dropIfExists('invalid_kids');\n $this->schema()->dropIfExists('profiles');\n }", "title": "" }, { "docid": "b2186013217d7059cd6e6bc62e559f2a", "score": "0.5712839", "text": "public function rollbackTransaction(): void;", "title": "" }, { "docid": "93a71443de91d7944ab78731d46a0597", "score": "0.5710401", "text": "public function reverse(): void\n {\n $ranks = $this->ranks;\n\n $this->commit(array_values(collect($ranks)->reverse()->all()));\n }", "title": "" }, { "docid": "b6f2a13e0fabae0d932d3d49a167f06f", "score": "0.5710063", "text": "public function rollback()\n {\n $this->current = [];\n $this->remove = [];\n return $this;\n }", "title": "" }, { "docid": "c788903b74b07afb4c907ec8e8643751", "score": "0.5708738", "text": "public function down() {\n\n\t\t$query = 'DROP TABLE sites;';\n\n\t\ttry {\n\t\t\tself::$pdo->exec( $query );\n\t\t} catch ( PDOException $exception ) {\n\t\t\tEE::error( 'Encountered Error while dropping table: ' . $exception->getMessage(), false );\n\t\t}\n\t}", "title": "" }, { "docid": "c0b460cde17c1c3c6bc75a650974f83f", "score": "0.56999886", "text": "public function clearDb ()\n {\n // Empty tables and reset auto-increment values\n $this->_dbh->query('SET FOREIGN_KEY_CHECKS = 0');\n foreach (self::$dbTables as $table) {\n $stmt = $this->_dbh->prepare('TRUNCATE `' . $table . '`');\n $stmt->execute();\n $stmt = $this->_dbh->prepare('ALTER TABLE `' . $table . '` AUTO_INCREMENT = 1');\n $stmt->execute();\n }\n // Re-enable checks only if set as such in config\n $config = parse_ini_file('config/AcToBs.ini', true);\n if (isset($config['checks']['fk_constraints']) && $config['checks']['fk_constraints'] == 1) {\n $this->_dbh->query('SET FOREIGN_KEY_CHECKS = 1');\n }\n // Delete denormalized tables\n foreach (self::$dbDenormalizedTables as $table) {\n $stmt = $this->_dbh->prepare('DROP TABLE IF EXISTS `' . $table . '`');\n $stmt->execute();\n }\n // Delete non-standard taxonomic ranks\n $stmt = $this->_dbh->prepare(\n 'DELETE FROM `taxonomic_rank` WHERE `standard` = ?');\n $stmt->execute(array(\n 0\n ));\n unset($stmt);\n }", "title": "" }, { "docid": "ce7c3009eff0c77807ee33042f441a00", "score": "0.56975424", "text": "public function down()\n\t{\n\t\tDB::table('dispositions')->delete();\n\t}", "title": "" }, { "docid": "be792b0841f5265655ff9b6002a422cf", "score": "0.5692332", "text": "public function backUp()\n {\n $inventory = $this->inventory;\n $this->oldInventory = $inventory;\n return;\n }", "title": "" }, { "docid": "0971e15dece99495867949a291a9a341", "score": "0.56872416", "text": "public function down()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{user_block}}\")){\n\t\t\t$this->dropTable(\"{{user_block}}\");\n\t\t}\n\n\t}", "title": "" }, { "docid": "d02727f8d23f0861699c07edd53b33cf", "score": "0.56864744", "text": "public function down()\n {\n //add your migration here \n }", "title": "" }, { "docid": "4cac6486cd952e15040eef734a6b90ae", "score": "0.5683316", "text": "public function rollback(): void\n {\n $ret = $this->mysqli->rollback();\n if (!$ret) $this->mySqlError('mysqli::rollback');\n }", "title": "" }, { "docid": "4e6b983e28f3f90af2779885b0a68ed9", "score": "0.56705296", "text": "protected function tearDown() {\r\n\t\t$this->dropDatabase();\r\n\t\tunset ( $this->cacheDatabaseEntryRepository );\r\n\t\t\r\n\t}", "title": "" }, { "docid": "0817d19b5a54a88317ffc75f8a91c188", "score": "0.5669872", "text": "public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}", "title": "" }, { "docid": "94589eeabbbcc155389aa375afcd556c", "score": "0.56599957", "text": "public function down()\n {\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=0');\n\n $this->executeSQL('DROP TABLE link');\n $this->executeSQL('DROP TABLE link_category');\n\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=1');\n }", "title": "" } ]
bde49acb6252bddb4cb83b568a2ddea0
Saving Logic 1) upload image 2) save coupon 3) save image 4) check transaction status
[ { "docid": "34d7334df5f8affa8072491174cfcf62", "score": "0.0", "text": "function save( $group_id = false ) {\n\t\t// start the transaction\n\t\t$this->db->trans_start();\n\t\t/** \n\t\t * Insert coupon Records \n\t\t */\n\t\t$data = array();\n\n\t\t// prepare group name\n\t\tif ( $this->has_data( 'group_name' )) {\n\t\t\t$data['group_name'] = $this->get_data( 'group_name' );\n\t\t}\n\n\t\t// prepare group icon\n\t\tif ( $this->has_data( 'group_icon' )) {\n\t\t\t$data['group_icon'] = $this->get_data( 'group_icon' );\n\t\t}\n\n\t\t// prepare group_lang_key\n\t\tif ( $this->has_data( 'group_lang_key' )) {\n\t\t\t$data['group_lang_key'] = $this->get_data( 'group_lang_key' );\n\t\t}\n\n\t\t//save module group\n\t\tif ( ! $this->Module_group->save( $data, $group_id )) {\n\t\t// if there is an error in inserting user data,\t\n\n\t\t\t// rollback the transaction\n\t\t\t$this->db->trans_rollback();\n\n\t\t\t// set error message\n\t\t\t$this->data['error'] = get_msg( 'err_model' );\n\t\t\t\n\t\t\treturn;\n\t\t}\n\n\t\t/** \n\t\t * Check Transactions \n\t\t */\n\n\t\t// commit the transaction\n\t\tif ( ! $this->check_trans()) {\n \t\n\t\t\t// set flash error message\n\t\t\t$this->set_flash_msg( 'error', get_msg( 'err_model' ));\n\t\t} else {\n\n\t\t\tif ( $group_id ) {\n\t\t\t// if user id is not false, show success_add message\n\t\t\t\t\n\t\t\t\t$this->set_flash_msg( 'success', get_msg( 'success_group_edit' ));\n\t\t\t} else {\n\t\t\t// if user id is false, show success_edit message\n\n\t\t\t\t$this->set_flash_msg( 'success', get_msg( 'success_group_add' ));\n\t\t\t}\n\t\t}\n\n\t\tredirect( $this->module_site_url());\n\t}", "title": "" } ]
[ { "docid": "ad768cb6cc0fd110098f7c247e1f1a9d", "score": "0.69130063", "text": "public function uploadcoupon(){\n\t\t//From Validation\n\t\tif (empty($_FILES['fileCouponImage']['name']))\n\t\t{\n\t\t $this->form_validation->set_rules('fileCouponImage', 'Coupon Image', 'required');\n\t\t}\n\n\t\tif ($this->form_validation->run() == TRUE or FALSE) {\n\t\t\t$this->session->set_flashdata('error_log', validation_errors);\n\t\t\tredirect('admin/managecoupon','refresh');\n\t\t} else {\n\t\t\t$config['upload_path'] = './assets/coupons/';\n\t\t\t$config['allowed_types'] = 'gif|jpg|png';\n\t\t\t\n\t\t\t$this->load->library('upload', $config);\n\t\t\t\n\t\t\tif ( ! $this->upload->do_upload('fileCouponImage')){\n\t\t\t\t//$error = array('error' => $this->upload->display_errors());\n\t\t\t\t$this->session->set_flashdata('error_log', $this->upload->display_errors());\n\t\t\t\tredirect('admin/managecoupon','refresh');\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$fileData = $this->upload->data();\n\t\t\t\t$this->admin_model->SaveCouponImage($fileData['file_name']);\n\t\t\t\t$this->session->set_flashdata('success_log', 'Coupon Upload Successfully');\n\t\t\t\tredirect('admin/managecoupon','refresh');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7dcfe78eaabc4a0c5e5e8d769492ee3e", "score": "0.6851456", "text": "function saveImage(){\n $username = current_user();\n if ($username){\n //$imageUrl = \"http://d.tanios.ca/usnap/api/uploads/\";\n $imageUrl = \"http://52.24.195.247/~sleiman/api.usnap.com/uploads/\";\n $email = get_email($username);\n $app_id = get_app_id($username);\n $moderation = get_moderation_status($app_id);\n\n if ($email) {\n if ($_FILES){\n $db = db();\n $saved = ORM::for_table('U_saved')->create();\n // Set the properties of the object\n $image_name = mt_rand().\".png\";\n $saved->email = $email;\n $saved->username = $username;\n $saved->image_data = $image_name;\n $saved->filename = $_FILES['image_data']['name'];\n $url = $imageUrl.$image_name;\n $watermark_url = $imageUrl.\"watermark/\".$image_name;\n $saved->url = $url;\n $saved->watermark_url = $watermark_url;\n $saved->set_expr('created_at', 'NOW()');\n // $saved->meta = json_encode($_POST['meta']);\n\n if (isset($_POST['fb'])){\n $saved->fb = $_POST['fb'];\n }\n if (isset($_POST['tw_key']) && isset($_POST['tw_secret'])){\n $saved->tw_key = $_POST['tw_key'];\n $saved->tw_secret = $_POST['tw_secret'];\n }\n if (isset($_POST['gp'])) {\n $saved->gp = $_POST['gp'];\n }\n if (isset($_POST['campaign_id'])){\n $saved->campaign_id = $_POST['campaign_id'];\n } else {\n // Set to App Settings Default Campaign\n $saved->campaign_id = 23;\n }\n if (isset($_POST['text'])) {\n $saved->text = $_POST['text'];\n }\n \n $saved->app_id = $app_id;\n if($moderation){\n $saved->status = 0;\n } else {\n $saved->status = 1;\n }\n // Save the object to the database\n $response = uploadImage($_FILES['image_data'],$image_name);\n if ($response[0] == 1){\n \t$saved->fb_likes = 0;\n $saved->save();\n $data = array('image'=>$watermark_url,'email'=>$email);\n pushToAdmin('live-feed','new-image',$data);\n // pushToAdmin('live-feed','new-media');\n }\n \n echo '{\"response\": \"'.$response[1].'\"}';\n } else {\n header(\"HTTP/1.1 400\");\n echo '{\"response\": \"Please upload a file.\"}';\n }\n } else {\n header(\"HTTP/1.1 400\");\n echo '{\"response\": \"Must Be Logged In\"}';\n }\n } else {\n header(\"HTTP/1.1 400\");\n echo '{\"response\": \"No User Detected\"}';\n }\n \n}", "title": "" }, { "docid": "04d24fdc3e272c6d1056359408ce410c", "score": "0.6796582", "text": "public function processImages()\n \t{\n $this->save();\n if (! $this->errorMessage)\n \t\t parent::uploadImages('image', 'RecipeImage', \"recipeID\");\n \n \t}", "title": "" }, { "docid": "cef4d5fb88b2698df4261f1be5d602ff", "score": "0.67350996", "text": "public function save()\n {\n $this->validate();\n $this->validate(['image' => 'required|image']);\n\n // try to upload image and resize by ImageSaverController config\n try {\n $imageSaver = new ImageSaverController();\n $this->imagePath = $imageSaver->loadImage($this->image->getRealPath())->saveAllSizes();\n }catch (\\RuntimeException $exception){\n dd($exception);\n }\n\n $this->PostSaver();\n\n $this->resetAll();\n $this->ChangeCreatedMode();\n $this->swAlert([\n 'title' => 'Good job',\n 'text' => 'successfully added',\n 'icon' => 'success'\n ]);\n $this->render();\n }", "title": "" }, { "docid": "b67f4d3ecc7b1ed153127477b9613f9b", "score": "0.66354024", "text": "public function userimagesavevenue(Request $request)\n {\n \n \n \n //echo \"<pre>\"; print_r($_FILES);echo \"</pre>\";\n \n \n $id=0;\n $chkvalidimage=$this->fileisinvalid($request,$id);\n \n $err_resp_msg=''; $respflg=0; $uploadedsuccnames=array(); $user_master_img_db=array();\n $slider_contents=''; $default_image_name='';\n $venuecretaeOredit =0;\n $nicknmres =0;\n \n $errormsgs=$chkvalidimage['errormsgs'];\n $errfileAr=$chkvalidimage['errfileAr'];\n $totalfileposted=$chkvalidimage['totalfileposted'];\n \n if ( empty($errormsgs) || (!empty($errormsgs) && (count($errfileAr)<$totalfileposted)) )\n {\n \n //**** image code starts\n \n \n $allowedFileExtAr=array();\n $allowedFileExtAr[]=\"jpg\";\n $allowedFileExtAr[]=\"jpeg\";\n $allowedFileExtAr[]=\"png\";\n \n $filecontrolname=\"image_name\";\n \n \n $allowedFileExtSizeAr=array();\n $allowedFileExtSizeAr['jpg']=(5*1024*1024);\n $allowedFileExtSizeAr['jpeg']=(5*1024*1024);\n $allowedFileExtSizeAr['png']=(5*1024*1024);\n \n \n \n //max_width & max_height ,min_width & min_height,equal_width & equal_height \n $allowedFileResolAr=array();\n \n $allowedFileResolAr['jpeg']=array('min_width'=>537,'min_height'=>507);\n $allowedFileResolAr['jpg']=array('min_width'=>537,'min_height'=>507);\n $allowedFileResolAr['png']=array('min_width'=>537,'min_height'=>507);\n $func=\"uploadfile\";//validatefile/uploadfile\n \n \n $destinationsourcePath=public_path().\"/upload/venueimage/source-file/\"; \n \n $chkimgresp=Imageuploadlib::imageupload($request,$filecontrolname,$allowedFileExtAr,$allowedFileExtSizeAr,$allowedFileResolAr,$func,$addeditid=0,$destinationsourcePath,$errfileAr) ;\n \n \n //echo \"==Imcommonpath=>\".$Imcommonpath;\n //echo \"==chkimg1==><pre>\";\n //print_r($chkimgresp);\n //echo \"</pre>\"; //exit();\n \n if(!empty($chkimgresp))\n {\n $errormsgs=''; $fileuploadednames=array();\n \n if(array_key_exists('errormsgs',$chkimgresp))\n {\n $errormsgs=$chkimgresp['errormsgs'];\n }\n \n if(array_key_exists('fileuploadednames',$chkimgresp))\n {\n $fileuploadednames=$chkimgresp['fileuploadednames'];\n }\n \n \n $singleimagename='';$thumbfileName='';\n \n if(!empty($fileuploadednames))\n {\n $destinationcommonPath=public_path().\"/upload/venueimage/\";\n \n foreach($fileuploadednames as $fileuploadednameAr)\n {\n \n $thumbfileName=$fileuploadednameAr['filenamedata'];\n $sourcepathwithimage=$fileuploadednameAr['fileuploadedpath'].$thumbfileName;\n \n $uploadedsuccnames[]=$thumbfileName;\n \n \n $destinationfilewithPath1=$destinationcommonPath.\"thumb-big/\".$thumbfileName;\n // echo \"==destinationfilewithPath1==>\". $destinationfilewithPath1; exit();\n $width=537;$height=0;//$height=507;\n \n Imageuploadlib::createthumb($sourcepathwithimage,$destinationfilewithPath1,$width,$height);\n \n $destinationfilewithPath2=$destinationcommonPath.\"thumb-medium/\".$thumbfileName;\n $width=208;$height=0;//$height=201;\n \n Imageuploadlib::createthumb($sourcepathwithimage,$destinationfilewithPath2,$width,$height);\n \n $destinationfilewithPath3=$destinationcommonPath.\"thumb-small/\".$thumbfileName;\n $width=52;$height=52;\n \n Imageuploadlib::createthumb($sourcepathwithimage,$destinationfilewithPath3,$width,$height);\n \n \n \n }\n \n $singleimagename=$thumbfileName;\n \n }\n \n \n \n }\n \n //**** image code ends\n \n \n //***** insert into image table starts\n \n //$uploadedsuccnames\n \n if(!empty($uploadedsuccnames))\n {\n $user_id=1;\n if ($request->session()->has('front_id_sess'))\n {\n $user_id=$request->session()->get('front_id_sess'); // get session \n $Venueid = $this->getseo_name($user_id);\n }\n \n //**********check modifying date starts here\n $r = $this->check_modifying_date($Venueid,$user_id);\n //IF MODIFYING DATE IS 1 THEN THIS IS FIRST TIME EDIT //*** update user_master table ends\n \n foreach($uploadedsuccnames as $user_image_name)\n {\n $default_status=0;\n //*** check whether any prev image present then on insert default status will be 0 , else 1 starts\n $selectstr=\" umtb.* \";\n \n $user_master_img_db=DB::table('venue_master_img as umtb'); \n $user_master_img_db=$user_master_img_db->select(DB::raw($selectstr)); \n $user_master_img_db=$user_master_img_db->where('umtb.venue_id', $Venueid);\n $user_master_img_db=$user_master_img_db->where('umtb.v_creator_id', $user_id);\n $user_master_img_db=$user_master_img_db->orderBy(\"umtb.id\", \"asc\");\n $user_master_img_db = $user_master_img_db->skip(0)->take(3);\n $user_master_img_db=$user_master_img_db->get();\n \n if(!empty($user_master_img_db))\n {\n $default_status=0;\n }\n else\n {\n $default_status=1;\n }\n //*** check whether any prev image present then on insert default status will be 0 , else 1 ends\n \n \n $user_img_array=array();\n \n $user_img_array['default_status']=$default_status;\n $user_img_array['image_name']=addslashes($user_image_name);\n $user_img_array['venue_id']=$Venueid;\n $user_img_array['v_creator_id']=$user_id;\n $user_img_array['create_date']=date('Y-m-d H:i:s');\n $user_img_array['modified_date']=date('Y-m-d H:i:s'); \n $chkupd= DB::table('venue_master_img')->insert($user_img_array );\n $last_insert_id=DB::getPdo()->lastInsertId();\n \n //***** update other image of this user to 0 starts\n \n //$updtusrmstr= DB::table('user_master_img');\n //$updtusrmstr= $updtusrmstr->where('id',\"<>\",$last_insert_id) ;\n //$updtusrmstr= $updtusrmstr->where('user_id',$user_id) ;\n //$updtusrmstr=$updtusrmstr->update(\n //['default_status' =>0]\n //);\n \n //***** update other image of this user to 0 ends\n \n \n }\n DB::table('venue_master')\n ->where('id', $Venueid)\n ->update(['modified_date'=>date('Y-m-d H:i:s') ]);\n //*** fetch this user related images starts\n \n \n $selectstr=\" umtb.* \";\n \n $venue_master_img_db=DB::table('venue_master_img as umtb'); \n $venue_master_img_db=$venue_master_img_db->select(DB::raw($selectstr)); \n $venue_master_img_db=$venue_master_img_db->where('umtb.venue_id', $Venueid);\n $venue_master_img_db=$venue_master_img_db->where('umtb.v_creator_id', $user_id);\n $venue_master_img_db=$venue_master_img_db->orderBy(\"umtb.id\", \"asc\");\n $venue_master_img_db = $venue_master_img_db->skip(0)->take(3);\n $venue_master_img_db=$venue_master_img_db->get();\n \n if(!empty($venue_master_img_db))\n {\n \n $default_image_name= $venue_master_img_db[0]->image_name; \n }\n \n //*** fetch this user related images ends\n \n $dataresp=array();\n $view_obj = View::make('front.venue.venueeditprofilesilder', array(\"venue_master_img_db\"=>$venue_master_img_db));\n $slider_contents = $view_obj->render(); \n \n if($r == 1)\n {\n $request->session()->flash('front_successmsgdata_sess', 'Your venue has been created successfully .');\n //return redirect('/');\n $venuecretaeOredit=1;\n //**get nickname starts here\n $nicknmres = $this->getnicknm($Venueid,$user_id);\n //**get nickname ends here\n \n }\n \n }\n \n \n //***** insert into image table ends\n \n \n \n }\n else\n {\n if(!empty($id))\n {\n \n //return redirect(ADMINSEPARATOR.'/banneradd/'.$id)\n //->withErrors($chkvalid)\n //->withInput();\n \n $err_resp_msg= $errormsgs;\n \n }\n else\n {\n //return redirect(ADMINSEPARATOR.'/banneradd')\n //->withErrors($chkvalid)\n //->withInput();\n \n $err_resp_msg= $errormsgs;\n }\n }\n \n \n if ( empty($errormsgs) || (!empty($errormsgs) && (count($errfileAr)<$totalfileposted)) )\n {\n $respflg=1;\n }\n \n //if($r == 1)\n //{\n // $request->session()->flash('front_successmsgdata_sess', 'Your venue has been created successfully .');\n // //return redirect('/');\n // $venuecretaeOredit=1;\n // //**get nickname starts here\n // $nicknmres = $this->getnicknm($Venueid,$user_id);\n // //**get nickname ends here\n // \n //}\n \n \n $respAr=array();\n $respAr['venuecretaeedit']=$venuecretaeOredit;\n $respAr['nicknmdata']= $nicknmres;\n $respAr['flag']=$respflg;\n $respAr['errorespmsg']=$err_resp_msg;\n $respAr['errfileAr']=$errfileAr;\n $respAr['totalfileposted']=$totalfileposted;\n $respAr['uploadedsuccnames']=$uploadedsuccnames;\n $respAr['slider_contents']=$slider_contents;\n $respAr['default_image_name']=$default_image_name;\n //$respAr['user_master_img_db']=$user_master_img_db;\n // $respAr['chkimgresp']=$chkimgresp;\n echo json_encode($respAr);\n \n \n \n }", "title": "" }, { "docid": "30354fa278c3ac5b6bcb6089429dbe4a", "score": "0.648686", "text": "public function upload_coupon() {\n $response = new AjaxResponse( $this->verified() );\n\n // Get file uploader\n library('file-uploader');\n\n // Instantiate classes\n $file = new File();\n $uploader = new qqFileUploader( array( 'gif', 'jpg', 'jpeg', 'png' ), 6144000 );\n\n $name = $key = 'remarketing-coupon';\n $width = 405;\n $height = 450;\n\n // Upload file\n $result = $uploader->handleUpload( 'gsr_' );\n\n $response->check( $result['success'], _('Failed to upload image') );\n\n // If there is an error or now user id, return\n if ( $response->has_error() )\n return $response;\n\n // Create the different versions we need\n $image_dir = $this->user->account->id . \"/$key/\";\n $image_name = $file->upload_image( $result['file_path'], $name, $width, $height, 'websites', $image_dir );\n\n // Delete file\n if ( is_file( $result['file_path'] ) )\n unlink( $result['file_path'] );\n\n // Form image url\n $image_url = 'http://websites.retailcatalog.us/' . $image_dir . $image_name;\n\n $response->add_response( 'url', $image_url );\n\n return $response;\n\n }", "title": "" }, { "docid": "a1c27fb31c359e27e29f925b41b572d5", "score": "0.6402745", "text": "public function save_withImage()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tglobal $pdo;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// TODO: make method more efficient, remove image when new images is uploaded, allow image with the same filename to replace already loaded image\r\n\t\t\tif ( $this->id )\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tif ( ! empty( $this->errors ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ( empty( $this->filename || empty( $this->tmp_path ) ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->errors[] = \"The file was not available\";\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$users_dir = $this->picture_dir();\r\n\t\t\t\t\r\n\t\t\t\tif ( is_dir( $users_dir ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$target_path = $this->picture_path();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tmkdir( $users_dir , 0755 , true );\r\n\t\t\t\t\t$target_path = $this->picture_path();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif ( file_exists( $target_path ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->errors[] = \"The file {$this->filename} already exists\";\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ( move_uploaded_file( $this->tmp_path , $target_path ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( $this->update() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tunset( $this->tmp_path );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->errors[] = \"The file most likely does not have permission\";\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tif ( ! empty( $this->errors ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ( empty( $this->filename || empty( $this->tmp_path ) ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->errors[] = \"The file was not available\";\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif ( $this->create() )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$users_dir = $this->picture_dir();\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( file_exists( $users_dir ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$target_path = $this->picture_path();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tmkdir( $users_dir , 0755 , true );\r\n\t\t\t\t\t\t$target_path = $this->picture_path();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( file_exists( $target_path ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->errors[] = \"The file {$this->filename} already exists\";\r\n\t\t\t\t\t\t$this->id = $pdo->lastInsertedId();\r\n\t\t\t\t\t\t$this->delete();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( move_uploaded_file( $this->tmp_path , $target_path ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tunset( $this->tmp_path );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->errors[] = \"There was a problem transferring image to disk\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->errors[] = \"The file most likely does not have permission\";\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "0e778b2c6f1e45bc4aa375446621db3b", "score": "0.6382902", "text": "function saveUserPic($img,$action)\n\t\t{\n\t\t\t//checking that product with order id is present or not\n\t\t\tif($action == 'pro')\n\t\t\t{\n\t\t\t\t//update user profile pic\n\t\t\t\t$update = $this->manageContent->updateValueWhere('user_info', 'profile_image', 'files/pro-image/'.$img, 'user_id', $_SESSION['user_id']);\n\t\t\t}\n\t\t\telseif($action == 'cov')\n\t\t\t{\n\t\t\t\t//update user cover pic\n\t\t\t\t$update = $this->manageContent->updateValueWhere('user_info', 'cover_image', 'files/cov-image/'.$img, 'user_id', $_SESSION['user_id']);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b3cfa2e60e5200a1f16bfab21adc1460", "score": "0.6339606", "text": "function upload()\n {\n if(isset($_GET['task']) && $_GET['task'] == 'upload') {\n \n $app = factory::getApplication();\n $db = factory::getDatabase();\n $user = factory::getUser();\n $lang = factory::getLanguage();\n \n $path = 'assets/img/uploads/';\n \n if(strtolower($_SERVER['REQUEST_METHOD']) != 'post') {\n $this->exit_status($lang->get('CW_SETTINGS_UPLOAD_INVALID_ERROR')); \n }\n \n $data = $app->getVar('image-data', '');\n $logo = $app->getVar('logo', 0);\n \n\t\t\tif($data != \"\") {\n\t\t\t\n\t\t\t\t$data = str_replace('data:image/png;base64,', '', $data);\n\t\t\t\t$data = str_replace(' ', '+', $data);\n\t\t\t\t$data = base64_decode($data);\n\n\t\t\t\t//Set up the source and destination of the file\n\t\t\t\t$filename = uniqid() . '.png';\n\t\t\t\t$file = $path . $filename;\n\t\t\t\t$success = file_put_contents($file, $data);\n\t\t\t\t\n\t\t\t\tif($logo == 0) {\n\t\t\t\n\t\t\t\t\t$db->query('select image from #_users where id = '.$user->id);\n\t\t\t\t\t$old_image = $db->loadResult();\n\t\t\t\t\t\n\t\t\t\t\t//modify database...\n\t\t\t\t\t$db->updateField(\"#_users\", \"image\", $filename, 'id', $user->id);\n\t\t\t\t\t\n\t\t\t\t\t//delete old image...\n\t\t\t\t\tif($old_image != '' && $old_image != 'nouser.png') {\n\t\t\t\t\t\tunlink($path.$old_image);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\t$db->query('select empresa_logo from #_configuration');\n\t\t\t\t\t$old_image = $db->loadResult();\n\t\t\t\t\t\n\t\t\t\t\t//modify database...\n\t\t\t\t\t$db->query(\"UPDATE #_configuration SET empresa_logo = \".$db->quote($filename));\n\t\t\t\t\t\n\t\t\t\t\t//delete old image...\n\t\t\t\t\tif($old_image != '' && $old_image != 'nologo.png') {\n\t\t\t\t\t\tunlink($path.$old_image);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$source_img = imagecreatefromstring($data);\n\t\t\t\t//$rotated_img = imagerotate($source_img, 90, 0); // rotate with angle 90 here\n\t\t\t\t//$imageSave = imagejpeg($source_img, $file, 10);\n\t\t\t\timagedestroy($source_img);\n\t\t\t\t\n } else {\n $this->exit_status($lang->get('CW_SETTINGS_UPLOAD_ERROR_NOIMAGE'));\n }\n \n $app->redirect('index.php?view=config');\n }\n }", "title": "" }, { "docid": "326c853f0b22e1c4411117e3913ad8e6", "score": "0.63281274", "text": "protected function upload(){\n\t\t$due = trim(filter_input(INPUT_POST, 'due_date'));\n\t\t$client = trim(filter_input(INPUT_POST, 'client_name'));\n\t\t$email = trim(filter_input(INPUT_POST, 'client_email'));\n\t\t$phone = trim(filter_input(INPUT_POST, 'client_phone'));\n\t\t$company = trim(filter_input(INPUT_POST, 'company_name'));\n\t\t$instructions = trim(filter_input(INPUT_POST, 'job_description'));\n\n\t\t//Work on that fucking image now!\n\t\t#process data, to start with image handling\n\t $filename = stripslashes($_FILES['artwork_file']['name']);\n\t $uploadDir = 'uploads/';\n\t \n #This helps in creating a unique copy of each product uploaded\n $photoStore = 'imranma_client_artwork_'.time().'_'.$filename; \n \n #target name indication\n $targetPath = $uploadDir . $photoStore; \n\t \n\t //Instansiate image manager\n\t $imageManager = new ImageManager();\n\n\t //Read image from temporary file & Resize image\n\t $img = $imageManager->make($_FILES['artwork_file']['tmp_name']);//->resize(260, 260);\n\n\t //save image & Proceed\n\t if($img->save($targetPath)){\n // echo \"<pre>\"; print_r($_FILES); die;\n $url = Utils::generateRandomString('_'); \n $status = 'new';\n #insert the product at this point TODO: To create a Transaction that simultaneaously save client details in the client table\n $insert = $this->insertPrintingOrder($url, $due, $client, $email, $phone, $company, $instructions, $photoStore, $status);\n #echo'<pre>'; print_r($insert); die;\n if($insert > 0){\n \t#send a notification to the admin & the client too\n header('Location: /printing/thanks');\n }\n else die('Error inserting image into server');\n }\n else die('Error uploading image');\n\t}", "title": "" }, { "docid": "2aa721ab46e9f1061748e293cdbf7279", "score": "0.6313689", "text": "public function file_processing()\n {\n $dirName = getcwd() . \"/mediaupload/\" . session_id() . \"/finished/\";\n\n mkdir($dirName);\n\n mkdir($dirName . $_POST['size']);\n\n // Now we create a file opener so we can write to the file\n $fp = fopen($dirName . $_POST['size'] . \"/\" . $_POST['amount'] . \"x \" .$_POST['photoId'] . \".jpg\", 'w+b');\n\n // Now let's handle the imageData\n $imageData = $_POST['imageData'];\n $filteredData = substr($imageData, strpos($imageData, \",\")+1);\n $unencodedData=base64_decode($filteredData);\n\n // And write everything to the file and close the file handler\n fwrite($fp, $unencodedData);\n fclose($fp);\n }", "title": "" }, { "docid": "0fb6498eaa60e9b9835497c51eee1034", "score": "0.6281541", "text": "function alojamientos_imagenes_save()\n {\n\n $a = $this->session->userdata('logged_in');\n $id_cliente = $a['ID_Cliente'];\n $this->gf->comp_sesion($a, base_url());\n\n $id_alojamiento = $this->input->post('ID_Alojamiento');\n $tipo = $this->input->post('tipo');\n $nombre_imagen = $this->input->post('foto_numero');\n\n $cantidad_fotos = 0;\n\n\n if (isset($_FILES['filesToUpload']['tmp_name']))\n {\n if (count($_FILES['filesToUpload']['tmp_name']))\n {\n\n //Borrar las imagenes de la tabla imagenes_alojamientos ya que se agregaran varias mas\n if ($tipo == 'foto_comun')\n $this->alojamientos_imagenes_user_model->images_delete_nombre_imagen($id_alojamiento, $nombre_imagen);\n\n $i = 0;\n foreach ($_FILES['filesToUpload']['tmp_name'] as $file)\n {\n\n $i++;\n $cantidad_fotos = $this->alojamientos_imagenes_user_model->images_count($id_alojamiento);\n $cantidad_fotos = $cantidad_fotos + 1;\n\n if ($cantidad_fotos <= 20 || $tipo=='foto_comun')\n {\n\n if ($tipo == 'muchas_fotos')\n {\n $image_name = $this->config->item('upload_path') . $id_alojamiento . \"_\" . $i . \".jpg\";\n $thumb_grande = $this->config->item('upload_path_thumb') . $id_alojamiento . \"_\" . $i . \"_p\" . \".jpg\";\n $thumb_chica = $this->config->item('upload_path_thumb') . $id_alojamiento . \"_\" . $i . \".jpg\";\n }\n elseif ($tipo == 'foto_comun')\n {\n $image_name = $this->config->item('upload_path') . $id_alojamiento . \"_\" . $nombre_imagen . \".jpg\";\n $thumb_grande = $this->config->item('upload_path_thumb') . $id_alojamiento . \"_\" . $nombre_imagen . \"_p\" . \".jpg\";\n $thumb_chica = $this->config->item('upload_path_thumb') . $id_alojamiento . \"_\" . $nombre_imagen . \".jpg\";\n }\n elseif ($tipo == 'foto_mas')\n {\n $image_name = $this->config->item('upload_path') . $id_alojamiento . \"_\" . $cantidad_fotos . \".jpg\";\n $thumb_grande = $this->config->item('upload_path_thumb') . $id_alojamiento . \"_\" . $cantidad_fotos . \"_p\" . \".jpg\";\n $thumb_chica = $this->config->item('upload_path_thumb') . $id_alojamiento . \"_\" . $cantidad_fotos . \".jpg\";\n }\n\n\n $image = ImageCreateFromJPEG($file);\n //ancho\n $width = imagesx($image);\n //alto imagen\n $height = imagesy($image);\n //nuevo ancho imagen\n $new_width = 550;\n //calcular alto \n $new_height = ($new_width * $height) / $width;\n //crear imagen nueva\n $thumb = imagecreatetruecolor($new_width, $new_height);\n //redimensiono\n imagecopyresized($thumb, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n //Guardo imagen final \n ImageJPEG($thumb, $image_name);\n\n //Thumb\n //nuevo ancho imagen\n $new_width = 100;\n //calcular alto \n $new_height = ($new_width * $height) / $width;\n //crear imagen nueva\n $thumb = imagecreatetruecolor($new_width, $new_height);\n //redimensiono\n imagecopyresized($thumb, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n //Guardo imagen final \n ImageJPEG($thumb, $thumb_chica);\n\n if ($i == 1 or $cantidad_fotos == 1 or $nombre_imagen == '1')\n {\n //Thumprincipal\n //nuevo ancho imagen\n $new_height = 270;\n //calcular alto \n $new_width = ($new_height * $width) / $height;\n //crear imagen nueva\n $thumb = imagecreatetruecolor($new_width, $new_height);\n //redimensiono\n imagecopyresized($thumb, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n //Guardo imagen final \n ImageJPEG($thumb, $thumb_grande);\n }\n\n //Guardar imagenes en la table alojamientos_imagenes\n if ($tipo == 'foto_comun')\n $this->alojamientos_imagenes_user_model->images_save($id_alojamiento, $nombre_imagen);\n elseif ($tipo == 'muchas_fotos')\n $this->alojamientos_imagenes_user_model->images_save($id_alojamiento, $i);\n elseif ($tipo == 'foto_mas')\n $this->alojamientos_imagenes_user_model->images_save($id_alojamiento, $cantidad_fotos);\n }\n }\n }\n }\n redirect(base_url() . 'users/dash/editar/fotos/', 'refresh');\n }", "title": "" }, { "docid": "331dabf05cdef07442ce91c1aaf9f360", "score": "0.6280669", "text": "public function saveAction() {\n\t\n\t\t$_bannerData = $this->getRequest()->getPost(); // Getting post data\t\n\t\t$_bannerId=$this->getRequest()->getParam('id');\t\n\t\tif(!empty($_bannerData)){\n\t\t\t//File Uploading Code\n\t\t\tif(isset($_FILES['filepath']['name']) && $_FILES['filepath']['name'] != '') {\n\t\t\t\n\t\t\t\ttry {\t\t\t\t\t\n\t\t\t\t\t$_fileUploader = new Varien_File_Uploader('filepath');\t\t\t\n\t\t\t\t\t$_fileUploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));//acceptable file format\n\t\t\t\t\t$_fileUploader->setAllowRenameFiles(false);\n\t\t\t\t\t$_fileUploader->setFilesDispersion(false);\t\t\t\t\n\t\t\t\t\t$_filepath = Mage::getBaseDir('media') . DS ; //Banner folder path /media//i/file.jpg\n\t\t\t\t\t$_result = $_fileUploader->save($_filepath, $_FILES['filepath']['name'] );\n\t\t\t\t\t$_bannerData['filepath'] = $_result['file'];\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t$_bannerData['filepath'] = $_FILES['filepath']['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//End File Uploading Code\t\n\t\t\t\t\t\t\n\t\t\t$_banner = Mage::getModel('bannerextension/bannerextension');\n\t\t\t//Setting the banner values\t\t\n\t\t\t$_banner->setData($_bannerData); \n\t\t\t\n\t\t\tif($_bannerId)\n\t\t\t//Setting the id if banner is in edit mode\n\t\t\t$_banner->setId($_bannerId); \n\t\t\t\n\t\t\ttry {\n\t\t\t\t//save the banner\t\t\t\t\n\t\t\t\t$_banner->save();\n\t\t\t\t//add success msg for admin\n\t\t\t\tMage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('bannerextension')->__('Banner was successfully saved'));\n } catch (Exception $e) {\n // add error msg for admin user\n\t\t\t\tMage::getSingleton('adminhtml/session')->addError($e->getMessage());\n // clear form data\n\t\t\t\tMage::getSingleton('adminhtml/session')->setFormData($data);\n return;\n }\n\t\t\t\n\t\t\t$this->_redirect('*/*/');\n\t\t\treturn;\t\t\t\t\t\t\n\t\t}\t\n\n\t}", "title": "" }, { "docid": "a3b1d7c760db8c9cd51708b2ac804a0d", "score": "0.6254079", "text": "public function processUploadLogo()\n {\n $error = '';\n if (isset($_FILES['fileToUpload']['tmp_name']) && $_FILES['fileToUpload']['tmp_name']) {\n $file = $_FILES['fileToUpload'];\n $error = ImageManager::validateUpload($file, 300000);\n if (!strlen($error)) {\n $tmp_name = tempnam(_PS_TMP_IMG_DIR_, 'PS');\n if (!$tmp_name || !move_uploaded_file($file['tmp_name'], $tmp_name)) {\n return false;\n }\n\n list($width, $height, $type) = getimagesize($tmp_name);\n\n $newheight = ($height > 500) ? 500 : $height;\n $percent = $newheight / $height;\n $newwidth = $width * $percent;\n $newheight = $height * $percent;\n\n if (!is_writable(_PS_ROOT_DIR_.'/img/')) {\n $error = $this->translator->trans('Image folder %s is not writable', array(_PS_ROOT_DIR_.'/img/'), 'Install');\n }\n if (!$error) {\n list($src_width, $src_height, $type) = getimagesize($tmp_name);\n $src_image = ImageManager::create($type, $tmp_name);\n $dest_image = imagecreatetruecolor($src_width, $src_height);\n $white = imagecolorallocate($dest_image, 255, 255, 255);\n imagefilledrectangle($dest_image, 0, 0, $src_width, $src_height, $white);\n imagecopyresampled($dest_image, $src_image, 0, 0, 0, 0, $src_width, $src_height, $src_width, $src_height);\n if (!imagejpeg($dest_image, _PS_ROOT_DIR_.'/img/logo.jpg', 95)) {\n $error = $this->trans('An error occurred during logo copy.', array(), 'Install');\n } else {\n imagedestroy($dest_image);\n @chmod($filename, 0664);\n }\n }\n } else {\n $error = $this->translator->trans('An error occurred during logo upload.', array(), 'Install');\n }\n }\n\n $this->ajaxJsonAnswer(($error) ? false : true, $error);\n }", "title": "" }, { "docid": "106e8d58759c58b8b05938bcf6dd1107", "score": "0.6238563", "text": "public function saveUploaded($imgFile, $userId)\r\n\t{\r\n//FB::error(imgFile .'-'. $imgSize .'-'. $userId);\r\n\r\n if (!$imgFile || !$userId)\r\n \treturn false;\r\n\r\n\t\t$path = CHelperProfile::getUserImgDir($userId);\r\n\t\tif (!CHelperFile::createDir($path))//not dublicate, will use for import\r\n\t\t\treturn false;\t\t\t\r\n\t\t\r\n $filename = time(); \r\n $fileOriginal = $path.'/'.$filename;\r\n \r\n //needs for import...\r\n if (file_exists($fileOriginal))\r\n \twhile(file_exists($fileOriginal))\r\n \t{\r\n\t\t $filename++; \r\n\t\t $fileOriginal = $path.'/'.$filename;\r\n \t}\r\n \r\n\r\n\t\tif (!@rename($imgFile, $fileOriginal))\r\n\t\t\treturn false;\r\n \r\n \r\n @chmod($fileOriginal, 0777);\r\n \t\r\n $image = @getimagesize($fileOriginal);\r\n\t\t$width = $image[0];\r\n\t $height = $image[1];\r\n\t \r\n if ( !in_array($image['mime'], $this->imgAvailableTypes) )\r\n return false;\r\n\r\n\r\n if (stristr($image['mime'], 'png'))\r\n $toFormat = 3;//IMG_PNG;\r\n elseif(stristr($image['mime'], 'gif'))\r\n $toFormat = 1;//IMG_GIF;\r\n elseif(stristr($image['mime'], 'tiff'))\r\n $toFormat = 4;//tiff;\r\n elseif(stristr($image['mime'], 'bmp'))\r\n $toFormat = 5;//bmp;\r\n else\r\n $toFormat = 2;//IMG_JPEG;\r\n \r\n $fileSize = filesize($fileOriginal);\r\n \r\n if ($fileSize<IMG_SIZE_MIN || $fileSize>IMG_SIZE_MAX)\r\n return false; \r\n//FB::info($this->sizes);\r\n\r\n//FB::warn($toFormat, '$toFormat');\r\n\r\n\t\t\t\r\n\t\t$fileOriginalTMP = $path.'/tmp_'.$filename;\r\n\r\n\t\t\r\n\t\tswitch($toFormat)\r\n\t\t{\r\n\t\t\tcase 1: //needs for transparent gif\r\n\t\t\t\t\t$input = imagecreatefromgif($fileOriginal);\r\n\t //list($width, $height) = getimagesize($fileOriginal);\r\n\t $output = imagecreatetruecolor($width, $height);\r\n\t $white = imagecolorallocate($output, 255, 255, 255);\r\n\t imagefilledrectangle($output, 0, 0, $width, $height, $white);\r\n\t imagecopy($output, $input, 0, 0, 0, 0, $width, $height);\r\n\t imagejpeg($output, $fileOriginalTMP, 90);\r\n\t\t\t\t\tbreak;\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\tcase 2: copy ($fileOriginal, $fileOriginalTMP);\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\tcase 3: //needs for transparent png\r\n\t\t\t\t\t$input = imagecreatefrompng($fileOriginal);\r\n\t //list($width, $height) = getimagesize($fileOriginal);\r\n\t $output = imagecreatetruecolor($width, $height);\r\n\t $white = imagecolorallocate($output, 255, 255, 255);\r\n\t imagefilledrectangle($output, 0, 0, $width, $height, $white);\r\n\t imagecopy($output, $input, 0, 0, 0, 0, $width, $height);\r\n\t imagejpeg($output, $fileOriginalTMP, 90);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\tcase 4:\r\n\t\t\tcase 5: $fileOriginalTMP = $fileOriginalTMP.'.jpg';//!!! +.jpg\r\n\t\t \t\r\n\t\t \t$im = new Imagick($fileOriginal);\r\n\t\t\t\t\t$im->setImageColorspace(255); \r\n\t\t\t\t\t$im->setCompression(Imagick::COMPRESSION_JPEG);\r\n\t\t\t\t\t$im->setCompressionQuality(100);\r\n\t\t\t\t\t$im->setImageFormat('jpeg');\r\n\t\t\t\t\t//resize\r\n\t\t\t\t\t/////$im->resizeImage($this->sizes[$size][0], $this->sizes[$size][1], imagick::FILTER_LANCZOS, 1); \r\n\t\t\t\t\t//write image on server\r\n\t\t\t\t\t$im->writeImage($fileOriginalTMP);\r\n\t\t\t\t\t$im->clear();\r\n\t\t\t\t\t$im->destroy(); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault: return false; \r\n\t\t}\r\n\t\t\r\n\t\tif ( !file_exists($fileOriginalTMP) )\r\n\t\t\treturn false;\t\r\n\t\t\r\n\t\t//IMPORT IMAGE EXTENSION\r\n\t\t//Yii::import('application.extensions.image.Image');\r\n\t\t$ih = new CImageHandler();\r\n\t\t\t\r\n\t\t$toFormatTHUMB = 2;//(($toFormat>3) ? 2 : $toFormat);\r\n\t\t\t\r\n foreach ($this->sizes as $size=>$v)\r\n {\r\n\t\t\t/*if (!CHelperFile::createDir($path.'/'.$size))\r\n\t\t\t\treturn false;*/\r\n \r\n $thumb = $path.'/'. $filename . '_'.$size.'.jpg';\r\n\t\t\t\r\n $ih->load($fileOriginalTMP);\r\n \tswitch($this->sizes[$size][2])\r\n {\r\n \tcase 'adaptiveThumb':\r\n $ih->adaptiveThumb($this->sizes[$size][0],$this->sizes[$size][1]);\r\n break; \r\n \t\r\n\t\t\t\tcase 'thumb':\r\n\t\t\t\t\t\t$ih->thumb($this->sizes[$size][0],$this->sizes[$size][1]);\r\n break;\r\n \r\n \tcase 'resize':\r\n $ih->resize($this->sizes[$size][0],$this->sizes[$size][1]);\r\n break; \t\t\r\n\t\t\t}\r\n\t\t\t$ih->save($thumb, $toFormatTHUMB, $this->sizes[$size][3]);\r\n \r\n\t\t\tif (!file_exists($thumb))\r\n\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t@chmod($thumb, 0777); \r\n }\r\n \r\n\t\tif (file_exists($fileOriginalTMP)) \r\n\t\t\t@unlink($fileOriginalTMP);\r\n \r\n\r\n return $filename; \t\r\n\t}", "title": "" }, { "docid": "2383a1dd7b7fef7de0bb0909dd2543a6", "score": "0.6236927", "text": "public function store(Request $request)\n {\n $bradd = new Branch;\n $bradd->br_code = $request->input('br_code');\n $bradd->branchname = $request->input('branchname');\n $bradd->br_own = $request->input('br_own');\n $bradd->br_email = $request->input('br_email');\n \n $bradd->br_phone = $request->input('br_phone');\n $bradd->br_fax = $request->input('br_fax');\n $bradd->address = $request->input('br_address');\n $bradd->save();\n //return 'جاري تحميل الصورة' . $bradd->id;\n $brimgsave = Branch::find($bradd->id);\n if ($request->has('file')){\n \n $imgname = $bradd->id . '.' . $request->file('file')->getClientOriginalExtension();\n $brimgsave->br_img = $imgname;\n $request->file('file')->move('images/branch',$imgname);\n $brimgsave->save();\n }\n \n }", "title": "" }, { "docid": "bf70567ffda6f5a823f31b5ae2a37948", "score": "0.62335753", "text": "function handle_upload_statement(){\r\n\t\t$config = array();\r\n\t\t$config['upload_path'] = './assets/image_uploads/bank_statement';\r\n\t\t$config['allowed_types'] = 'gif|jpg|png|pdf';\r\n $new_name = time().'_'.$_FILES[\"bank_statement\"]['name'];\r\n\t\t$config['file_name'] = $new_name;\r\n\r\n\t\t$this->load->library('upload', $config);\r\n\t\t$this->upload->initialize($config);\r\n\r\n\t\tif (isset($_FILES['bank_statement']) && !empty($_FILES['bank_statement']['name'])){\r\n\r\n\t\t\tif ($this->upload->do_upload('bank_statement')){\r\n\t\t\t\t// set a $_POST value for 'image' that we can use later\r\n\t\t\t\t$upload_data = $this->upload->data();\r\n\t\t\t\t$_POST['old_bank_statement'] = $upload_data['file_name'];\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\t// possibly do some clean up ... then throw an error\r\n\t\t\t\t$this->form_validation->set_message('handle_upload_statement', $this->upload->display_errors());\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2d87dc2b32accecda30024943d494cdf", "score": "0.6202149", "text": "function onUpload($roo, $table = false, $file = false)\n {\n \n if ($table !== false) {\n $this->ontable = $table->tableName();\n $this->onid = $table->pid();\n }\n \n if ($file === false) {\n $file = isset($_FILES['imageUpload']) ? $_FILES['imageUpload'] : array();\n }\n \n //print_r($_FILES); echo $_FILES['imageUpload']['type'];exit;\n if (empty($file['tmp_name']) || \n empty($file['name']) || \n empty($file['type'])\n ) {\n \n $emap = array( \n 0=>\"There is no error, the file uploaded with success\", \n 1=>\"The uploaded file exceeds the upload_max_filesize directive in php.ini\", \n 2=>\"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form\" ,\n 3=>\"The uploaded file was only partially uploaded\",\n 4=>\"No file was uploaded\",\n 6=>\"Missing a temporary folder\" \n ); \n $estr = (empty($file['error']) ? '?': $emap[$file['error']]);\n $this->err = \"Missing file details : Error=\". $estr;\n return false;\n }\n \n if ($this->id) {\n HTML_FlexyFramework::get()->page->jerr(\"updating images is disabled\");\n exit;\n $this->beforeDelete();\n }\n if ( empty($this->ontable)) {\n $this->err = \"Missing ontable\";\n return false;\n }\n \n if (!empty($this->imgtype) && $this->imgtype[0] == '-' && !empty($this->onid)) {\n // then its an upload \n $img = DB_DataObject::factory('Images');\n $img->onid = $this->onid;\n $img->ontable = $this->ontable;\n $img->imgtype = $this->imgtype;\n \n $img->find();\n while ($img->fetch()) {\n HTML_FlexyFramework::get()->page->jerr(\"updating images is disabled\");\n exit;\n $img->beforeDelete();\n $img->delete();\n }\n \n }\n \n \n \n require_once 'File/MimeType.php';\n $y = new File_MimeType();\n $this->mimetype = $file['type'];\n if (in_array($this->mimetype, array(\n 'text/application',\n 'application/octet-stream',\n 'image/x-png', // WTF does this?\n 'image/pjpeg', // WTF does this?\n 'application/x-apple-msg-attachment', /// apple doing it's magic...\n 'application/vnd.ms-excel', /// sometimes windows reports csv as excel???\n 'application/csv-tab-delimited-table', // windows again!!?\n ))) { // weird tyeps..\n $inf = pathinfo($file['name']);\n $this->mimetype = $y->fromExt($inf['extension']);\n }\n \n \n $ext = $y->toExt(trim((string) $this->mimetype ));\n \n $this->filename = empty($this->filename) ? \n $file['name'] : ($this->filename .'.'. $ext); \n \n \n \n if (!$this->createFrom($file['tmp_name'])) {\n $this->err = isset($this->err) ? $this->err : \"createFrom Image failed\";\n return false;\n }\n return true;\n \n }", "title": "" }, { "docid": "0d281da6596368276f79419c88ebd2c5", "score": "0.61791676", "text": "function save_profile_image($user_id = 0) {\n $this->access_only_allowed_members();\n $intake_info = $this->Users_model->get_one($user_id);\n $this->can_access_this_intake($intake_info->bu_id);\n\n //process the the file which has uploaded by dropzone\n $profile_image = str_replace(\"~\", \":\", $this->request->getPost(\"profile_image\"));\n\n if ($profile_image) {\n $profile_image = serialize(move_temp_file(\"avatar.png\", get_setting(\"profile_image_path\"), \"\", $profile_image));\n\n //delete old file\n delete_app_files(get_setting(\"profile_image_path\"), array(@unserialize($intake_info->image)));\n\n $image_data = array(\"image\" => $profile_image);\n $this->Users_model->ci_save($image_data, $user_id);\n echo json_encode(array(\"success\" => true, 'message' => app_lang('profile_image_changed')));\n }\n\n //process the the file which has uploaded using manual file submit\n if ($_FILES) {\n $profile_image_file = get_array_value($_FILES, \"profile_image_file\");\n $image_file_name = get_array_value($profile_image_file, \"tmp_name\");\n if ($image_file_name) {\n if (!$this->check_profile_image_dimension($image_file_name)) {\n echo json_encode(array(\"success\" => false, 'message' => app_lang('profile_image_error_message')));\n exit();\n }\n\n $profile_image = serialize(move_temp_file(\"avatar.png\", get_setting(\"profile_image_path\"), \"\", $image_file_name));\n\n //delete old file\n delete_app_files(get_setting(\"profile_image_path\"), array(@unserialize($intake_info->image)));\n\n $image_data = array(\"image\" => $profile_image);\n $this->Users_model->ci_save($image_data, $user_id);\n echo json_encode(array(\"success\" => true, 'message' => app_lang('profile_image_changed'), \"reload_page\" => true));\n }\n }\n }", "title": "" }, { "docid": "68ac893ca2221cf80f1a52a2ab89abea", "score": "0.6170136", "text": "function save_file() {\n\n\n $this->validate_submitted_data(array(\n \"id\" => \"numeric\",\n \"bu_id\" => \"required|numeric\"\n ));\n\n $bu_id = $this->request->getPost('bu_id');\n $this->access_only_allowed_members();\n $this->can_access_this_intake($bu_id);\n\n\n $files = $this->request->getPost(\"files\");\n $success = false;\n $now = get_current_utc_time();\n\n $target_path = getcwd() . \"/\" . get_general_file_path(\"bu\", $bu_id);\n\n //process the files which has been uploaded by dropzone\n if ($files && get_array_value($files, 0)) {\n foreach ($files as $file) {\n $file_name = $this->request->getPost('file_name_' . $file);\n $file_info = move_temp_file($file_name, $target_path);\n if ($file_info) {\n $data = array(\n \"bu_id\" => $bu_id,\n \"file_name\" => get_array_value($file_info, 'file_name'),\n \"file_id\" => get_array_value($file_info, 'file_id'),\n \"service_type\" => get_array_value($file_info, 'service_type'),\n \"description\" => $this->request->getPost('description_' . $file),\n \"file_size\" => $this->request->getPost('file_size_' . $file),\n \"created_at\" => $now,\n \"uploaded_by\" => $this->login_user->id\n );\n $success = $this->General_files_model->ci_save($data);\n } else {\n $success = false;\n }\n }\n }\n\n\n if ($success) {\n echo json_encode(array(\"success\" => true, 'message' => app_lang('record_saved')));\n } else {\n echo json_encode(array(\"success\" => false, 'message' => app_lang('error_occurred')));\n }\n }", "title": "" }, { "docid": "f2bd93ebdcf780bfa9c9497abfb2c57c", "score": "0.61690503", "text": "public function store(Request $request)\n {\n\n $folderPath = \"images/\";\n// return strlen ( $_POST['image1']);\n// return $_POST['image1']=='null';\n// exit;\n if ($_POST['image1']=='' ||$_POST['image1']=='null'){\n $path1=\"\";\n }else{\n $image_parts = explode(\";base64,\", $_POST['image1']);\n $image_type_aux = explode(\"image/\", $image_parts[0]);\n $image_type = $image_type_aux[1];\n $image_base64 = base64_decode($image_parts[1]);\n $file = $folderPath . uniqid() . '.'.$image_type;\n file_put_contents($file, $image_base64);\n $path1=$file;\n }\n\n\n\n if ($_POST['image2']=='' ||$_POST['image2']=='null'){\n $path2=\"\";\n }else{\n\n $image_parts = explode(\";base64,\", $_POST['image2']);\n $image_type_aux = explode(\"image/\", $image_parts[0]);\n $image_type = $image_type_aux[1];\n $image_base64 = base64_decode($image_parts[1]);\n $file = $folderPath . uniqid() . '.'.$image_type;\n file_put_contents($file, $image_base64);\n $path2=$file;\n }\n\n if ($_POST['image3']=='' ||$_POST['image3']=='null'){\n $path3=\"\";\n }else{\n\n $image_parts = explode(\";base64,\", $_POST['image3']);\n $image_type_aux = explode(\"image/\", $image_parts[0]);\n $image_type = $image_type_aux[1];\n $image_base64 = base64_decode($image_parts[1]);\n $file = $folderPath . uniqid() . '.'.$image_type;\n file_put_contents($file, $image_base64);\n $path3=$file;\n }\n\n if ($_POST['image4']==''||$_POST['image4']=='null'){\n $path4=\"\";\n }else{\n $image_parts = explode(\";base64,\", $_POST['image4']);\n $image_type_aux = explode(\"image/\", $image_parts[0]);\n $image_type = $image_type_aux[1];\n $image_base64 = base64_decode($image_parts[1]);\n $file = $folderPath . uniqid() . '.'.$image_type;\n file_put_contents($file, $image_base64);\n $path4=$file;\n }\n\n// $request->hasFile('image1')?$path1 = $request->file('image1')->store('images'):$path1='';\n// $request->hasFile('image2')?$path2 = $request->file('image2')->store('images'):$path2='';\n// $request->hasFile('image3')?$path3 = $request->file('image3')->store('images'):$path3='';\n// $request->hasFile('image4')?$path4 = $request->file('image4')->store('images'):$path4='';\n// $path = $request->file('image2')->store('images');\n// $path = $request->file('image3')->store('images');\n// $path = $request->file('image4')->store('images');\n\n// return $path;\n//\n// exit;\n $d=New Asistencia();\n// $d->objetos=$request->objetos;\n isset($request->objetos)&&$request->objetos!='undefined'?$d->objetos=strtoupper($request->objetos):$d->objetos='';\n $d->recinto=Auth::user()->tipo;\n// $d->motivo=$request->motivo;\n isset($request->motivo)&&$request->motivo!='undefined'?$d->motivo=strtoupper($request->motivo):$d->motivo='';\n// $d->targeta=$request->targeta;\n isset($request->targeta)&&$request->targeta!='undefined'?$d->targeta=strtoupper($request->targeta):$d->targeta='';\n $d->image1=$path1;\n $d->image2=$path2;\n $d->image3=$path3;\n $d->image4=$path4;\n $d->persona_id=$request->persona_id;\n $d->destino_id=$request->destino_id;\n $d->user_id=Auth::user()->id;\n $d->save();\n// return $d;\n return Asistencia::with('persona')\n ->with('destino')\n ->with('user')\n ->where('recinto','=',Auth::user()->tipo)\n ->where('user_id','=',Auth::user()->id)\n ->where('id','=',$d->id)\n ->get();\n\n }", "title": "" }, { "docid": "796f40fb5f21c56c50d61a8e551d30e7", "score": "0.61679834", "text": "public function store()\n {\n \n //POST\n $nombres = Security::verificateName( $_POST['nombres']);\n $apellidos = Security::verificateName( $_POST['apellidos']);\n $correo = Security::verificateEmail( $_POST['correo']);\n $clave1 = Security::verificatePassword($_POST['clave']);\n $numero_documento = Security::verificateDocument( $_POST['numero_documento']);\n $fk_rol = Security::verificateInt( $_POST['rol']);\n $fk_cargo = Security::verificateInt( $_POST['cargo']);\n $fk_tipo_documento = Security::verificateInt( $_POST['tipo_documento']);\n $fk_tipo_contrato = Security::verificateInt( $_POST['fk_tipo_contrato']);\n $salario = Security::verificateInt( $_POST['salario']);\n\n\n\n //Nomina\n $fecha_de = $_POST['fecha_de'];\n $fecha_hasta = $_POST['fecha_hasta'];\n $arrayDatos = json_decode($_POST['arrayDatos']);\n\n if($nombres && $apellidos && $correo && $clave1 && $numero_documento && $fk_rol && $fk_cargo && $fk_tipo_documento && $fk_tipo_contrato && $salario && $fecha_de && $fecha_hasta && $arrayDatos)\n {\n\n if(!Login::verificarSiExisteEmail($correo))\n {\n //? img si no se pone una img tomara el valor por defecto empty(si esta undefined da false)\n if(empty($_POST['user_img']))\n {\n //? Update Img\n $fecha = new DateTime();\n // funcion img\n $directorio = \"assets/uploud/profile/\";\n $archivo= $directorio.basename($fecha->getTimeStamp().$_FILES[\"user_img\"][\"name\"]);\n //info de ext(jpg,png,etc)\n $tipoArchivo =strtolower(pathinfo($archivo,PATHINFO_EXTENSION));\n //verifica que el archivo tenga dimensiones(w,h) \n $DimensionesImg =getimagesize($_FILES['user_img']['tmp_name']);\n \n if($DimensionesImg == true)\n {\n $tamañoImg = $_FILES['user_img'][\"size\"];\n if($tamañoImg > 2000000)\n {\n // echo \"El archivo tiene que ser menor a 2mb\";\n echo json_encode(['error'=>\"El archivo tiene que ser menor a 2mb\"]);\n return;\n }\n else{\n if($tipoArchivo == \"jpg\" || $tipoArchivo == \"png\" || $tipoArchivo == \"jpeg\" )\n {\n move_uploaded_file($_FILES[\"user_img\"][\"tmp_name\"],$archivo);\n $img_usuario=$archivo;\n }\n else{\n // echo \"la extension del archivo no es valida\";\n echo json_encode(['error'=>'a extension del archivo no es valida']);\n return;\n }\n }\n }else\n {\n // echo \"el documento no es una img\";\n echo json_encode(['error'=> 'el documento no es una img']);\n return;\n \n }\n }else{\n $img_usuario = 'assets/uploud/profile/default.svg';\n }\n\n\n $token = $this->seguridad->encryptToken(str_replace(' ','',$nombres.$numero_documento.$apellidos));\n $clave = password_hash($clave1,PASSWORD_DEFAULT);\n parent::storeUser($nombres,$apellidos,$correo,$salario,$clave,$img_usuario,$numero_documento,$fk_rol,$fk_cargo,$fk_tipo_documento,$fk_tipo_contrato,$token);\n \n \n\n //?NOMINA\n $fk_usuario = parent::consultarUltimoUsuario();\n $nomina = new Nomina();\n if($fecha_de && $fecha_hasta && $arrayDatos){\n\n $nomina->createNomina($fk_usuario->id, $fecha_de, $fecha_hasta,2);\n \n $lastNomina =$nomina->consultarUltimaNomina();\n \n $total = 0;\n for ($i=0; $i < count($arrayDatos); $i++) { \n $data = $arrayDatos[$i];\n $nomina->createConcept($data->descripcion,2, $data->fk_asiento_contable, $data->valor, $data->fk_tipo_concepto, $lastNomina->id_nomina);\n \n if($data->fk_asiento_contable == 2)\n {\n $total -=$data->valor;\n \n }else{\n $total +=$data->valor;\n }\n }\n \n \n $nomina->updateNominaValor($total,$lastNomina->id_nomina);\n echo json_encode(['ok'=> 'Creado']);\n return;\n }else{\n return;\n }\n\n //? END-NOMINA\n\n echo json_encode(['ok' => 'usuarioCreado']);\n\n\n }else{\n echo json_encode(['error' => 'correoExistente']);\n }\n }\n else{\n echo json_encode(['error' => 'errorAgregarUsuario']);\n return;\n }\n }", "title": "" }, { "docid": "347f64b68c03f982f1f077b47491b2f9", "score": "0.6163479", "text": "public function save()\n {\n $dir = $this->pathTmpImage;\n\n $files = scandir($dir);\n\n foreach ($files as $file) {\n if ($file == $_POST['image']) { \n copy($this->pathTmpImage . $file, $this->pathResult . $file);\n }\n }\n\n //$this->dbInsert($_POST['image']);\n\n unlink($this->pathTmpImage . $_POST['image']);\n }", "title": "" }, { "docid": "20380fb4793d8ee90b728914ad4dc1fa", "score": "0.6162532", "text": "public function actionUpload_image_store_location()\n\t{\t\t\t\n\t\t$app = Yii::app();\n\t\t$current_datetime = date('Y-m-d H:i:s');\n\t\t\n\t\t// if id is not set\n\t\tif (!empty($_FILES)) {\n\t\t\t$tempFile = $_FILES['Filedata']['tmp_name'];\n\t\t\t$targetPath = $app->params['root_url'].'images/stores/';\n\t\t\t$targetFile = $_FILES['Filedata']['name'];\n\t\t\t$ext = strtolower(trim(pathinfo($targetFile, PATHINFO_EXTENSION)));\n\t\t\t$force_crop = 0;\n\t\t\t$allowed_ext = array(\n\t\t\t\t'gif',\n\t\t\t\t'jpeg',\n\t\t\t\t'jpg',\n\t\t\t\t'png',\n\t\t\t);\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tif (empty($ext) || !in_array($ext, $allowed_ext)) {\n\t\t\t\techo Yii::t('global','ERROR_ALLOWED_IMAGES');\t\t\t\t\n\t\t\t\texit;\n\t\t\t} else {\t\n\t\t\t\t// original file renamed\n\t\t\t\t$original = md5($targetFile.time()).'.'.$ext;\t\n\t\t\t\t$filename = md5($original).'.jpg';\t\t\t\t\n\t\t\t\n\t\t\t\t$image = new SimpleImage();\n\t\t\t\tif (!$image->load($tempFile)) {\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global','ERROR_LOAD_IMAGE_FAILED');\n\t\t\t\t\texit;\n\t\t\t\t}\t\t\t\n\t\t\t\t\n\t\t\t\t$width = $image->getWidth();\n\t\t\t\t$height = $image->getHeight();\n\t\t\t\t\n\t\t\t\tif (!$width || !$height) {\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global','ERROR_LOAD_IMAGE_FAILED');\n\t\t\t\t\texit;\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t// save image\n\t\t\t\tif (!$image->resizeToWidth($app->params['store_locations_logo_width'])) {\n\t\t\t\t\techo Yii::t('views/config/edit_store_locations_options', 'ERROR_UPLOAD_IMAGE_FAILED');\t\t\t\t\t\t\n\t\t\t\t\texit;\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!$image->save($targetPath.$filename)) {\n\t\t\t\t\techo Yii::t('views/config/edit_store_locations_options', 'ERROR_UPLOAD_IMAGE_FAILED');\t\t\t\t\t\t\n\t\t\t\t\texit;\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\techo 'file:'.$filename;\n\t\t\t\texit;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\techo Yii::t('global','ERROR_UPLOAD_IMAGE_FAILED');\n\t\t}\t\t\t\t\n\t}", "title": "" }, { "docid": "8861490e73923da72d3de4c9a8e2bd8b", "score": "0.6156414", "text": "function image_save($db, $product, $config)\n{\n error_reporting(E_ERROR | E_PARSE);\n\n $errors = 0;\n\n if ((strlen(trim($config['url_image_directory'])) == 0)) {\n $error_code['url_image_directory'] = 'Please enter a valid directory.<br>';\n $errors++;\n }\n if (is_dir('../' . $config['url_image_directory'])) {\n if (strlen($error_code['url_image_directory']) == 0) {\n $error_code['url_image_directory'] = '';\n }\n\n // Check file permissions\n if (!is_readable(\"../config.php\") && !is_writable(\"../config.php\")) {\n if (!@chmod(\"../config.php\", 0777)) {\n $error_code[\"file_perm\"] = \"Unable to set file permissions. Please change permissions on the\n images directory manually to 777 for Unix/Linux Servers or Read/Write/Execute for Windows Servers\n and then press skip below.\";\n $errors++;\n }\n }\n } else {\n // Reaches here if directory is not valid\n $error_code['url_image_directory'] = 'The filename you entered is not a valid directory. Please enter a valid\n directory.<br>';\n $error_code['url_image_directory_value'] = $config['url_image_directory'];\n $errors++;\n }\n\n if ((strlen(trim($config['abs_image_directory'])) == 0)) {\n $error_code['abs_image_directory'] = 'Please enter a valid directory.<br>';\n $errors++;\n }\n if (!is_dir($config['abs_image_directory'])) {\n // Reaches here if directory is not valid\n $error_code['abs_image_directory'] = 'The filename you entered is not a valid directory. Please enter a valid\n directory.<br>';\n $error_code['abs_image_directory_value'] = $config['abs_image_directory'];\n $errors++;\n }\n\n if ($config['maximum_upload_size'] <= 0) {\n // Gets here if negative or 0 max upload size\n $error_code['maximum_upload_size'] = '<br>The maximum upload size cannot be less than or equal to zero.';\n $error_code['maximum_upload_size_value'] = $config['maximum_upload_size'];\n $errors++;\n }\n\n if ($errors > 0) {\n return $error_code;\n }\n\n $sql_query = \"UPDATE `\" . $product['ad_config'] . \"` SET \" . $product['upload'] . \" = 2, \"\n . $product['url_image_directory'] . \" = \\\"\" . $config['url_image_directory'] . \"\\\", \"\n . $product['maximum_upload_size'] . \" = \" . $config['maximum_upload_size'] . \", \"\n . $product['abs_image_directory'] . \" = \\\"\" . $config['abs_image_directory'] . \"\\\"\";\n $result = $db->Execute($sql_query);\n //echo $sql_query.'<br>';\n if (!$result) {\n echo \"Error executing query: \" . $sql_query . '<br>';\n return 1;\n } else {\n return 0;\n }\n}", "title": "" }, { "docid": "e89cacd88c682332fb0c22af787eb97b", "score": "0.6154637", "text": "public function upload_image()\n {\n $this->do_upload($this->config->item('create_thump'), $this->config->item('create_watermark'));\n redirect('/');\n }", "title": "" }, { "docid": "189bdae2aed0355bb73143ddf8babdbd", "score": "0.61363685", "text": "function saveImage()\n\t{\n\n\t\tif (!$this->ImageStream) {\n\t\t\t$this->printError('image not loaded');\n\t\t}\n\n\t\tswitch ($this->type) {\n\t\t\tcase 1:\n\t\t\t\t/* store a interlaced gif image */\n\t\t\t\tif ($this->interlace === true) {\n\t\t\t\t\timageinterlace($this->ImageStream, 1);\n\t\t\t\t}\n\n\t\t\t\timagegif($this->ImageStream, $this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t/* store a progressive jpeg image (with default quality value)*/\n\t\t\t\tif ($this->interlace === true) {\n\t\t\t\t\timageinterlace($this->ImageStream, 1);\n\t\t\t\t}\n\n\t\t\t\timagejpeg($this->ImageStream, $this->sFileLocation, $this->jpegquality);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t/* store a png image */\n\t\t\t\timagepng($this->ImageStream, $this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->printError('invalid imagetype');\n\n\t\t\t\tif (!file_exists($this->sFileLocation)) {\n\t\t\t\t\t$this->printError('file not stored');\n\t\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5f65b456390cdd0fc3ed3487cc86ca52", "score": "0.61257076", "text": "public function insertImageToDb() \n {\n }", "title": "" }, { "docid": "ab8c608c5d36359dd7267d3e45b0bf95", "score": "0.6117002", "text": "function alojamientos_imagenes_save()\n {\n \n $a = $this->session->userdata('logged_user_in');\n $this->gf->comp_sesion($a, base_url());\n\n $id_alojamiento = $this->input->post('ID_Alojamiento');\n $tipo = $this->input->post('tipo');\n $nombre_imagen = $this->input->post('foto_numero');\n\n $cantidad_fotos = 0;\n\n if (isset($_FILES['filesToUpload']['tmp_name']))\n {\n if (count($_FILES['filesToUpload']['tmp_name']))\n {\n\n //Borrar las imagenes de la tabla imagenes_alojamientos ya que se agregaran varias mas\n if ($tipo == 'foto_comun')\n $this->alojamientos_imagenes_user_model->images_delete_nombre_imagen($id_alojamiento, $nombre_imagen);\n\n $i = 0;\n foreach ($_FILES['filesToUpload']['tmp_name'] as $file)\n {\n\n $i++;\n $cantidad_fotos = $this->alojamientos_imagenes_user_model->images_count($id_alojamiento);\n $cantidad_fotos = $cantidad_fotos + 1;\n\n if ($cantidad_fotos <= 12)\n {\n\n if ($tipo == 'muchas_fotos')\n {\n $image_name = $this->config->item('upload_path') . $id_alojamiento . \"_\" . $i . \".jpg\";\n $thumb_grande = $this->config->item('upload_path_thumb') . $id_alojamiento . \"_\" . $i . \"_p\" . \".jpg\";\n $thumb_chica = $this->config->item('upload_path_thumb') . $id_alojamiento . \"_\" . $i . \".jpg\";\n }\n elseif ($tipo == 'foto_comun')\n {\n $image_name = $this->config->item('upload_path') . $id_alojamiento . \"_\" . $nombre_imagen . \".jpg\";\n $thumb_grande = $this->config->item('upload_path_thumb') . $id_alojamiento . \"_\" . $nombre_imagen . \"_p\" . \".jpg\";\n $thumb_chica = $this->config->item('upload_path_thumb') . $id_alojamiento . \"_\" . $nombre_imagen . \".jpg\";\n }\n elseif ($tipo == 'foto_mas')\n {\n $image_name = $this->config->item('upload_path') . $id_alojamiento . \"_\" . $cantidad_fotos . \".jpg\";\n $thumb_grande = $this->config->item('upload_path_thumb') . $id_alojamiento . \"_\" . $cantidad_fotos . \"_p\" . \".jpg\";\n $thumb_chica = $this->config->item('upload_path_thumb') . $id_alojamiento . \"_\" . $cantidad_fotos . \".jpg\";\n }\n\n\n $image = ImageCreateFromJPEG($file);\n //ancho\n $width = imagesx($image);\n //alto imagen\n $height = imagesy($image);\n //nuevo ancho imagen\n $new_width = 550;\n //calcular alto \n $new_height = ($new_width * $height) / $width;\n //crear imagen nueva\n $thumb = imagecreatetruecolor($new_width, $new_height);\n //redimensiono\n imagecopyresized($thumb, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n //Guardo imagen final \n ImageJPEG($thumb, $image_name);\n\n //Thumb\n //nuevo ancho imagen\n $new_width = 100;\n //calcular alto \n $new_height = ($new_width * $height) / $width;\n //crear imagen nueva\n $thumb = imagecreatetruecolor($new_width, $new_height);\n //redimensiono\n imagecopyresized($thumb, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n //Guardo imagen final \n ImageJPEG($thumb, $thumb_chica);\n\n if ($i == 1 or $cantidad_fotos == 1 or $nombre_imagen == '1')\n {\n //Thumprincipal\n //nuevo ancho imagen\n $new_height = 270;\n //calcular alto \n $new_width = ($new_height * $width) / $height;\n //crear imagen nueva\n $thumb = imagecreatetruecolor($new_width, $new_height);\n //redimensiono\n imagecopyresized($thumb, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n //Guardo imagen final \n ImageJPEG($thumb, $thumb_grande);\n }\n\n //Guardar imagenes en la table alojamientos_imagenes\n if ($tipo == 'foto_comun')\n $this->alojamientos_imagenes_user_model->images_save($id_alojamiento, $nombre_imagen);\n elseif ($tipo == 'muchas_fotos')\n $this->alojamientos_imagenes_user_model->images_save($id_alojamiento, $i);\n elseif ($tipo == 'foto_mas')\n $this->alojamientos_imagenes_user_model->images_save($id_alojamiento, $cantidad_fotos);\n }\n }\n }\n }\n redirect(base_url() . 'user/alojamientos_user/form_view_user/' . $id_alojamiento . \"/?pestania=imagenes\", 'refresh');\n }", "title": "" }, { "docid": "08834215082130515f4eadeefa0b9f1a", "score": "0.6115748", "text": "public function upload_IMAGE_file()\n\t{\n\t\tif (!$this->is_allowed('store_add', false)) {\n\t\t\techo json_encode([\n\t\t\t\t'success' => false,\n\t\t\t\t'message' => cclang('sorry_you_do_not_have_permission_to_access')\n\t\t\t\t]);\n\t\t\texit;\n\t\t}\n\n\t\t$uuid = $this->input->post('qquuid');\n\n\t\techo $this->upload_file([\n\t\t\t'uuid' \t\t \t=> $uuid,\n\t\t\t'table_name' \t=> 'store',\n\t\t]);\n\t}", "title": "" }, { "docid": "322585929791e445da0158b1313c87f0", "score": "0.61143565", "text": "private function uploadPhoto($p){\t\t\t\t\n\t\tinclude_once('Zend/File/Transfer/Adapter/Http.php');\n\t\tinclude_once('default/views/filters/ImageFilter.php');\t\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/bike/db_selBikeAd.php');\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/default/db_insVPic.php');\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/default/db_selVPic.php');\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/default/db_delVPic.php');\n\t\t\n\t\t$return = array('r' => false);\t\n\t\t$imgCtrl = new Zend_File_Transfer_Adapter_Http();\n\t\t\n\t\t//This is the bike advertisement\n\t\t//$p = $this -> bikeNS -> bikeAds;\t\t\t\n\t\tif(isset($p['bikeID']) && ($imgCtrl->isUploaded() == true)){\n\t\t\tif (!isset($p['bikeDetail'])){\n\t\t\t\t$bikeDetail = db_selBikeAd(array('bikeID'=>$p['bikeID']));\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$bikeDetail = $p['bikeDetail'];\n\t\t\t}\n\t\t\t\n\t\t\t//Check if bike advertisement exists\n\t\t\tif (($bikeDetail != false) && (count($bikeDetail) == 1)){\n\t\t\t\t$bikeDetail = $bikeDetail[0];\n\t\t\t\t$bikeID = $bikeDetail['bikeID'];\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$vPicID = db_insVPic(array(\t'vType' => System_Properties::BIKE_ABRV\n\t\t\t\t\t\t\t\t\t \t\t, 'vID' => $bikeID\n\t\t\t\t\t\t\t\t\t\t\t, 'vPicTMP' => '1'\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\tif (($vPicID != false) && is_numeric($vPicID)){\t\t\n\t\t\t\t\t$imgCtrl -> setOptions(array('useByteString' => false));\n\t\t\t\t\t$imgCtrl -> addValidator('FilesSize', false, System_Properties::PIC_FILE_SIZE);\n\t\t\t\t\t$imgCtrl -> addValidator('Extension', false, System_Properties::$PIC_EXT);\n\t\t\t\t\t\n\t\t\t\t\t//$imgHash = session_id().'_'.$imgCtrl -> getHash();\n\t\t\t\t\t$destURI = System_Properties::PIC_PATH.'/'.System_Properties::BIKE_ABRV.'_'.$bikeID.'_'.$vPicID.'.jpeg';\t\t\t\t\n\t\t\t\t\t$imgCtrl -> addFilter('Rename', array('target' => '.'.$destURI, 'overwrite' => true));\n\t\t\t\t\t\n\t\t\t\t\t//$mimeTypeDetails = explode('/',$imgCtrl -> getMimeType());\n\t\t\t\t\t$mimeTypeDetails = explode('.', basename($imgCtrl -> getFileName()));\n\t\t\t\t\t$mimeTypeDetails = $mimeTypeDetails[1];\n\t\t\t\t\t$imgFilter = new ImageFilter(array(\t'imgTrgWidth' => System_Properties::PIC_SIZE_W,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'imgTrgHeight' => System_Properties::PIC_SIZE_H,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'imgSrcExtension' => $mimeTypeDetails));\n\t\t\t\t\t$imgCtrl -> addFilter($imgFilter);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Upload photo\n\t\t\t\t\t//if ($imgCtrl -> isUploaded() && $imgCtrl -> isValid()){\n\t\t\t\t\t//if (!isset($this -> bikeNS -> bikePhoto[$imgHash]) && $imgCtrl -> receive()){\t\n\t\t\t\t\tif (in_array(strtolower($mimeTypeDetails), System_Properties::$PIC_EXT) \n\t\t\t\t\t\t&& ($imgCtrl -> receive())){\n\t\t\t\t\t\t$bikePhoto = db_selVPic(array('vPicID' => $vPicID\n\t\t\t\t\t\t\t\t\t\t\t\t\t, 'vPicTMP' => '1'\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\tif($bikePhoto != false){\n\t\t\t\t\t\t\t$bikePhoto = $bikePhoto[0];\n\t\t\t\t\t\t\t$bikePhoto['destURI'] = $destURI;\n\t\t\t\t\t\t\t$bikePhoto['vPicNew'] = true;\n\t\t\t\t\t\t\t$return['r'] = true;\n\t\t\t\t\t\t\t$return['bikePhoto'] = $bikePhoto;\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tdb_delVPic(array('vPicID'=>$vPicID));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $return;\t\t\n\t}", "title": "" }, { "docid": "1c8e23ae23030c69122cd9b4211058a3", "score": "0.6097333", "text": "public function save_product(Request $request){\n $license_key = License::where('license',$request->header('Authorization'))->first();\n if($license_key){\n if($license_key->enable == 1){\n $user_id = $license_key->user->id;\n $image = $request->file('image');\n $array = explode('.', $image->getClientOriginalName());\n $imageName = $array[0].\"_\".rand().\".\".$array[1];\n //create submnails\n $img = Image::make($image->getRealPath());\n $img->resize(150, 150, function ($constraint) {\n $constraint->aspectRatio();\n })->save(public_path('images').'/'.\"sub_\".$imageName);\n //create image\n $image->move(public_path('images'),$imageName);\n\n $image_id = Images::create(array('name'=>$imageName))->id;\n\n //color\n $init_image = $request->file('init_image');\n $array2 = explode('.', $init_image->getClientOriginalName());\n $init_image_name =$array2[0].\"_\".rand().\".\".$array2[1];\n //create submnails\n $init = Image::make($init_image->getRealPath());\n $init->resize(150, 150, function ($constraint) {\n $constraint->aspectRatio();\n })->save(public_path('images').'/'.\"sub_\".$init_image_name);\n //create image\n $init_image->move(public_path('images'),$init_image_name);\n\n $init_image_id = Images::create(array('name'=>$init_image_name))->id;\n\n\n $data = array(\n 'name_en'=>$request->post_title,\n 'name_ar'=>$request->post_title_ar,\n 'image'=>$image_id,\n 'show'=>1,\n 'init_image'=>$init_image_id,\n 'wooCommerce_product_id'=>$request->wooCommerce_product_id,\n 'uuid'=>$request->uuid,\n 'is_wooCommerce_product'=>1,\n 'price'=>$request->price,\n 'user_id'=>$user_id,\n );\n\n $product = Product::create($data);\n $product_arr =[\n 'id'=>$product->id,\n 'image'=>$request->root().'/images/'.$product->product_image->name,\n 'init_image'=>$request->root().'/images/'.$product->product_init_image->name,\n 'name_ar'=>$product->name_ar,\n 'name_en'=>$product->name_en,\n 'show'=>1,\n 'wooCommerce_product_id'=>$product->wooCommerce_product_id,\n 'price'=>$product->price,\n ];\n\n return response()->json($product_arr);\n }else{\n return response()->json('license not activated');\n }\n }else{\n return response()->json('you not have license');\n }\n\n\n }", "title": "" }, { "docid": "5c66f50685dc574afc19e76a2147d005", "score": "0.6090362", "text": "private function saveImage($id,$path,$uploadForm,$model) {\n\t\t/**@Minhquyen20190603 - edit cover images upload - performance pages loading */\n\t\t$wout = 0;\n\t\t$hout = 0;\n\t\tlist($maxwth, $maxhig) = array('300','300');\n\t\tlist($wth, $hig, $tpe, $attr) = getimagesize(Yii::getAlias($path));\n\t\tif($wth > $maxwth || $hig > $maxhig){\n\t\t\tif($wth > $maxwth && $hig > $wth){\n\t\t\t\t$hout = 300;\n\t\t\t\t//$wout = 300 * ($hig / $wth);\n\t\t\t\t$wout = 300 * ($wth / $hig);\n\t\t\t}\n\t\t\telse if($wth > $maxwth && $hig < $wth){\n\t\t\t\t$wout = 300;\n\t\t\t\t$hout = 300 * ($hig / $wth);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$wout = $wth;\n\t\t\t$hout = $hig;\n\t\t}\n\n\t\t$imagine = new Imagine();\n\t\t$transaction = Attachments::getDb()->beginTransaction();\n try {\n\t\t\t$path70x50 = str_replace('.', '-70x50.', $path);\n\t\t\t$imagine->open(Yii::getAlias($path))\n\t\t\t\t\t->resize(new Box(70, 50))\n ->save(Yii::getAlias($path70x50), ['quanlity' => 50]);\n\t\t\t$path300x300 = str_replace('.', '-300x300.', $path);\n\t\t\t$imagine->open(Yii::getAlias($path))\n\t\t\t\t\t//->resize(new Box(300, 300))\n\t\t\t\t\t->resize(new Box($wout, $hout)) //@Minhquyen20190603 - edit cover images upload - performance pages loading\n ->save(Yii::getAlias($path300x300), ['quanlity' => 70]);\n\t\t\t$attachModel = new Attachments();\n\t\t\t$attachModel->name = $uploadForm->file->name;\n\t\t\t$attachModel->bytes = filesize(Yii::getAlias($path));\n\t\t\t$attachModel->mimeType = $uploadForm->file->type;\n\t\t\t$attachModel->isUploaded = true;\n\t\t\t$attachModel->uploadedDate = time();\n\t\t\t$attachModel->idCard = $id;\n\t\t\t$attachModel->idMember = userIdentity()->getId();\n\t\t\t$attachModel->url = str_replace('@frontend/web', '', $path);\n\t\t\t$attachModel->previews = Json::encode([\n\t\t\t\t[\n\t\t\t\t\t'width' => 70,\n\t\t\t\t\t'height' => 50,\n\t\t\t\t\t'typefile'=> $uploadForm->file->extension,\n\t\t\t\t\t'bytes' => filesize(Yii::getAlias($path70x50)),\n\t\t\t\t\t'url' => str_replace('@frontend/web', '', $path70x50)\n\t\t\t\t],[\n\t\t\t\t\t'width' => 300,\n\t\t\t\t\t'height' => 300,\n\t\t\t\t\t'typefile'=> $uploadForm->file->extension,\n\t\t\t\t\t'bytes' => filesize(Yii::getAlias($path300x300)),\n\t\t\t\t\t'url' => str_replace('@frontend/web', '', $path300x300)\n\t\t\t\t],\n\t\t\t]);\n\t\t\t$attachModel->save();\n\t\t\t$model->idAttachmentCover = $attachModel->id;\n\t\t\t$model->save();\n\t\t\t$transaction->commit();\n\t\t\t$response = Yii::$app->getResponse();\n\t\t\t$response->setStatusCode(201);\n\t\t\t$this->setLastUpdated($id);\n\t\t\t\n\t\t\t/*slack notification*/\n\t\t\t\n\t\t\t\n\t\t\treturn $attachModel;\n\t\t} catch (\\Exception $e) {\n\t\t\t$transaction->rollBack();\n\t\t\tthrow new ServerErrorHttpException('Failed to upload file to server.');\n\t\t} \n\t}", "title": "" }, { "docid": "a2cde601f9e79cfabea8bf52e7f1de0b", "score": "0.608689", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'passPic' => 'required|image|mimes:jpeg,png,jpg|max:600000',\n 'hindiSignature' => 'required|image|mimes:jpeg,png,jpg|max:600000',\n 'englishSignature' => 'required|image|mimes:jpeg,png,jpg|max:600000',\n 'leftThumbprint' => 'required|image|mimes:jpeg,png,jpg|max:600000',\n 'rightThumbprint' => 'required|image|mimes:jpeg,png,jpg|max:600000',\n 'aadharcardpic' => 'required|image|mimes:jpeg,png,jpg|max:600000'\n ]);\n\n if($request->hasfile('passPic')){\n if($request->file('passPic')->isValid()){\n //tenthmarksheet photograph\n $passPicloc = time() . '_' . uniqid() . '.' . request()->passPic->getClientOriginalExtension();\n request()->passPic->move(public_path('images/passPic'), $passPicloc);\n }\n }else{\n $passPicloc = 'NA';\n }\n\n if($request->hasfile('hindiSignature')){\n if($request->file('hindiSignature')->isValid()){\n //tenthmarksheet photograph\n $hindiSignatureloc = time() . '_' . uniqid() . '.' . request()->hindiSignature->getClientOriginalExtension();\n request()->hindiSignature->move(public_path('images/hindiSignature'), $hindiSignatureloc);\n }\n }else{\n $hindiSignatureloc = 'NA';\n }\n\n\n\n if($request->hasfile('englishSignature')){\n if($request->file('englishSignature')->isValid()){\n //tenthmarksheet photograph\n $englishSignatureloc = time() . '_' . uniqid() . '.' . request()->englishSignature->getClientOriginalExtension();\n request()->englishSignature->move(public_path('images/englishSignature'), $englishSignatureloc);\n }\n }else{\n $englishSignatureloc = 'NA';\n }\n\n\n if($request->hasfile('leftThumbprint')){\n if($request->file('leftThumbprint')->isValid()){\n //tenthmarksheet photograph\n $leftThumbprintloc = time() . '_' . uniqid() . '.' . request()->leftThumbprint->getClientOriginalExtension();\n request()->leftThumbprint->move(public_path('images/leftThumbprint'), $leftThumbprintloc);\n }\n }else{\n $leftThumbprintloc = 'NA';\n }\n\n if($request->hasfile('rightThumbprint')){\n if($request->file('rightThumbprint')->isValid()){\n //tenthmarksheet photograph\n $rightThumbprintloc = time() . '_' . uniqid() . '.' . request()->rightThumbprint->getClientOriginalExtension();\n request()->rightThumbprint->move(public_path('images/rightThumbprint'), $rightThumbprintloc);\n }\n }else{\n $rightThumbprintloc = 'NA';\n }\n\n if($request->hasfile('aadharcardpic')){\n if($request->file('aadharcardpic')->isValid()){\n //tenthmarksheet photograph\n $aadharcardpicloc = time() . '_' . uniqid() . '.' . request()->aadharcardpic->getClientOriginalExtension();\n request()->aadharcardpic->move(public_path('images/aadharcardpic'), $aadharcardpicloc);\n }\n }else{\n $aadharcardpicloc = 'NA';\n }\n\n $userDocumentsUpdate = new userDocumentsUpdateModel([\n 'userID' => \\Auth::user()->id,\n 'passPic' => $passPicloc,\n 'hindiSignature' => $hindiSignatureloc,\n 'englishSignature' => $englishSignatureloc,\n 'leftThumbprint' => $leftThumbprintloc,\n 'rightThumbprint' => $rightThumbprintloc,\n 'aadharcardpic' => $aadharcardpicloc\n ]);\n\n $userDocumentsUpdate->save();\n return redirect()->route('importantstepupdate', ['nextStep' => 3]);\n\n\n }", "title": "" }, { "docid": "545530b4e37dd8d16ee83c431dd8058e", "score": "0.608497", "text": "public function upload()\n {\n if(isset($_POST[\"submit\"]) && Csrf::isTokenValid() ){\n $table_name = Security::safe($_POST[\"table_name\"]);\n $photo_title = Security::safe($_POST['title_az']);\n if(!is_dir(Url::uploadPath().$table_name)) {\n File::makeDir(Url::uploadPath().$table_name);\n }\n $row_id = intval($_POST[\"row_id\"]);\n if($row_id>0 and $table_name!=\"\"){\n if(!empty($_FILES['image']['tmp_name']) and Security::filterFileMimeTypes($_FILES['image']['type'])) {\n $image_path = 'photos/'.$table_name.'/'.date(\"Y-m\").'/images/';\n $thumb_path = 'photos/'.$table_name.'/'.date(\"Y-m\").'/thumbs/';\n\n $new_dir = Url::uploadPath().$image_path;\n $new_thumb_dir = Url::uploadPath().$thumb_path;\n\n if(File::makeDir($new_dir) and File::makeDir($new_thumb_dir)){\n $file_arr = explode('.', $_FILES['image']['name']);\n $ext = end($file_arr);\n $file_name = $row_id.\"_\".time().rand(10,99);\n\n $destination_original = $new_dir. $file_name.\".\".$ext;\n $destination_thumb = $new_thumb_dir.$file_name.\".\".$ext;\n\n $img = new SimpleImage();\n $img->load($_FILES[\"image\"][\"tmp_name\"])->resize(571, 376)->save($destination_original);\n $img->load($_FILES[\"image\"][\"tmp_name\"])->resize(62, 62)->save($destination_thumb);\n\n $image_sql = $image_path.$file_name.\".\".$ext;\n $thumb_sql = $thumb_path.$file_name.\".\".$ext;\n\n $insert = Database::get()->insert('photos', ['title_az' => $photo_title, 'image' => $image_sql, 'thumb' => $thumb_sql,'table_name' => $table_name,'row_id'=>$row_id,'status' => 1]);\n $position = $this->operation->getPositionForNew($insert,'up',true);\n\n Session::setFlash('success','Şəkil əlavə olundu');\n\n }else{\n Session::setFlash('error','Qovluq yaranmadi');\n }\n\n }else{\n Session::setFlash('error','Xəta baş verdi');\n }\n Url::redirect(\"admin/\".$table_name.\"/view/\".$row_id.\"#gallery-block\");\n\n }else{\n Session::setFlash('error','Xəta baş verdi');\n }\n\n }else{\n Session::setFlash('error','Xəta baş verdi');\n }\n\n Url::redirect(\"admin/main\");\n }", "title": "" }, { "docid": "cde044ca80fee76c5ab3510e142e730b", "score": "0.60752624", "text": "public function updateMain($module, $item_id, $file, $post) {\n\n // if main $_POST['add-main-picture'] is empty, then empty main picture in bdd \n\n if($post == true) {\n\n $manager = $this->managers->getManagerOf('Pictures');\n $unique = $manager->getUnique($module, $item_id);\n\n if(!empty($unique->Src()) && $unique->Src() != NULL) {\n\n unlink($unique->Src());\n\n }\n\n $picture = new Pictures([\n\n 'alt' => NULL,\n 'src' => NULL,\n 'item_id' => $item_id\n\n ]);\n\n $manager->updateMainPicture($picture, $module);\n\n }\n else {\n\n // if $_POST['add-main-picture'] not empty the upload file and add in bdd \n\n if (isset($file) AND $file['error'] == 0 AND $file['size'] != 0)\n {\n // if there is already something in bdd then unlink file associated \n\n $manager = $this->managers->getManagerOf('Pictures');\n $remove = $manager->getUnique($module, $item_id);\n\n if(!empty($remove->Src()) && $remove->Src() != NULL) {\n\n unlink($remove->Src());\n\n }\n\n // then upload new file and update bdd \n\n // if ($_FILES['monfichier']['size'] <= 1000000)\n // {\n // Testons si l'extension est autorisée\n $infosfichier = pathinfo($file['name']);\n $extension_upload = $infosfichier['extension'];\n $extensions_autorisees = array('jpg', 'jpeg', 'gif', 'png', 'JPG', 'JPEG');\n if (in_array($extension_upload, $extensions_autorisees))\n {\n\n // rename file to avoid duplicated file names \n\n $temp = explode(\".\", $file['name']);\n $newfilename = mt_rand(10, 1000) . '-' . $item_id . '.' . end($temp);\n $path = \"img/uploads/\" . basename($newfilename);\n move_uploaded_file($file['tmp_name'], $path);\n\n // $img = imagecreatefromjpeg(\"img/uploads/\".$newfilename);\n\n // imagejpeg($img, \"img/uploads/\".$newfilename, 50);\n\n $picture = new Pictures([\n\n 'alt' => $module,\n 'src' => $path,\n 'item_id' => $item_id\n\n ]);\n\n $manager->updateMainPicture($picture, $module);\n \n }\n } \n }\n }", "title": "" }, { "docid": "3b0e7a5d518f8562a9454063580f7abc", "score": "0.6074334", "text": "public function invtZoneImgUplaod_post()\n {\n $data = $this->post();\n //print_r($data);\n //echo $data['kp_InventoryZoneID'];\n $inventoryZoneID = $data['kp_InventoryZoneID'];\n\n if(!empty($_FILES['file']['name']))\n {\n //echo \"not empty\";\n $msg = $this->inventoryzonemodel->doInvtZoneCustomUpload($inventoryZoneID);\n\n if($msg)\n {\n $this->response($msg, 200); // 200 being the HTTP response code\n }\n else\n {\n $this->response($msg, 404);\n }\n\n }\n\n\n\n }", "title": "" }, { "docid": "f140fdfa1480ab5208e0f4339ec67b87", "score": "0.6067426", "text": "public function postProcess()\n {\n if ($this->ebay_profile->getConfiguration('EBAY_PICTURE_SIZE_DEFAULT') != (int)Tools::getValue('sizedefault')\n || $this->ebay_profile->getConfiguration('EBAY_PICTURE_SIZE_SMALL') != (int)Tools::getValue('sizesmall')\n || $this->ebay_profile->getConfiguration('EBAY_PICTURE_SIZE_BIG') != (int)Tools::getValue('sizebig')\n ) {\n EbayProductImage::removeAllProductImage();\n }\n\n // Saving new configurations\n $picture_per_listing = (int) Tools::getValue('picture_per_listing');\n if ($picture_per_listing < 0) {\n $picture_per_listing = 0;\n }\n\n if ($this->ebay_profile->setConfiguration('EBAY_PICTURE_SIZE_DEFAULT', (int)Tools::getValue('sizedefault'))\n && $this->ebay_profile->setConfiguration('EBAY_PICTURE_SIZE_SMALL', (int)Tools::getValue('sizesmall'))\n && $this->ebay_profile->setConfiguration('EBAY_PICTURE_SIZE_BIG', (int)Tools::getValue('sizebig'))\n && $this->ebay_profile->setConfiguration('EBAY_PICTURE_PER_LISTING', $picture_per_listing)\n && $this->ebay_profile->setConfiguration('EBAY_PICTURE_CHARACT_VARIATIONS', (int)Tools::getValue('picture_charact_variations'))\n && $this->ebay_profile->setConfiguration('EBAY_PICTURE_SKIP_VARIATIONS', (bool)Tools::getValue('picture_skip_variations'))\n && $this->ebay->setConfiguration('EBAY_API_LOGS', Tools::getValue('api_logs') ? 1 : 0)\n && $this->ebay->setConfiguration('EBAY_ACTIVATE_LOGS', Tools::getValue('activate_logs') ? 1 : 0)\n && Configuration::updateValue('EBAY_SYNC_PRODUCTS_BY_CRON', ('cron' === Tools::getValue('sync_products_mode')))\n && Configuration::updateValue('EBAY_SYNC_ORDERS_BY_CRON', ('cron' === Tools::getValue('sync_orders_mode')))\n && Configuration::updateValue('EBAY_SEND_STATS', Tools::getValue('stats') ? 1 : 0, false, 0, 0)\n && Configuration::updateValue('EBAY_ORDERS_DAYS_BACKWARD', (int)Tools::getValue('orders_days_backward'), false, 0, 0)\n && Configuration::updateValue('EBAY_LOGS_DAYS', (int)Tools::getValue('logs_conservation_duration'), false, 0, 0)\n && $this->ebay_profile->setConfiguration('EBAY_RESYNCHBP', Tools::getValue('activate_resynchBP') ? 1 : 0)\n && Configuration::updateValue('EBAY_SYNC_ORDERS_RETURNS_BY_CRON', ('cron' === Tools::getValue('sync_orders_returns_mode')))\n ) {\n if (Tools::getValue('activate_logs') == 0) {\n if (file_exists(dirname(__FILE__).'/../../log/request.txt')) {\n unlink(dirname(__FILE__).'/../../log/request.txt');\n }\n }\n if (Tools::getValue('api_logs') == 0) {\n EbayApiLog::clear();\n }\n\n return $this->ebay->displayConfirmation($this->ebay->l('Settings updated'));\n } else {\n return $this->ebay->displayError($this->ebay->l('Settings failed'));\n }\n }", "title": "" }, { "docid": "75b9a109412f6497b4444b66436d0e93", "score": "0.60673803", "text": "public function recruiter_corporatelogpicupdate(){\n \n $msg =\"\";\n $target_dir = \"images/recruiter/logo/\";\n \n $FileName = $_FILES[\"fileToUpload\"][\"name\"];\n $FileTmpLoc = $_FILES[\"fileToUpload\"][\"tmp_name\"];\n $FileType = pathinfo($FileName ,PATHINFO_EXTENSION);\n $FileSize = $_FILES[\"fileToUpload\"][\"size\"];\n $FileErrorMsg = $_FILES[\"fileToUpload\"][\"error\"];\n $tmpFileExt = explode(\".\", $FileName);\n $FileExt = end($tmpFileExt);\n //$profilepichashName = hash('sha1',basename($FileName.\"QxLUF1bgIAdeQX\"));\n $profilepichashName = uniqid();\n $uploadOk = 1;\n \n $target_file = $target_dir . $profilepichashName . \".\" . $FileType;\n \n // Allow certain file formats\n if($FileType != \"jpg\" && $FileType != \"png\" && $FileType != \"jpeg\") {\n $msg .= \"<center><font size='2px' face='verdana,arial,sans-serif'>Only JPG, PNG & JPEG image formats are allowed.</font></center>\";\n $uploadOk = 0;\n }\n \n // Check file size\n if ($FileSize > 1048576) {\n $msg .= \"<center><font size='2px' face='verdana,arial,sans-serif'>Your picture is too large to be uploaded.</font></center>\";\n $uploadOk = 0;\n }\n \n // Check if $uploadOk is set to 0 by an error\n if ($uploadOk == 0) {\n $msg .= \"<center><font size='2px' face='verdana,arial,sans-serif'>Your picture was not uploaded.</font></center>\";\n // if everything is ok, try to upload file\n } else {\n if (move_uploaded_file($FileTmpLoc, $target_file)) {\n \n $resized_file = \"images/recruiter/logo/\".$profilepichashName. \".\" . $FileType;\n $wmax = 150;\n $hmax = 150;\n recruiter_img_resize($target_file, $resized_file, $wmax, $hmax, $FileExt);\n \n // To initially check if the email is registered in the system.\n $condition = \"employer_contact_email =\" . \"'\" . $this->input->post('employer-profile-email') . \"'\";\n $this->db->select('*')->from('employers')->where($condition);\n $query = $this->db->get();\n $result = $query->num_rows();\n \n if ($result > 0) {\n $data = array('employer_logo_url' => $profilepichashName. \".\" . $FileType);\n $this->db->where('employer_contact_email', $this->input->post('employer-profile-email'));\n $this->db->update('employers', $data);\n if($this->db->trans_status() != '1') {\n $msg .= \"<center><font size='2px' face='verdana,arial,sans-serif'>There was an error uploading your picture.</font></center>\";\n } else {\n // 2. Refresh session data\n $this->session->unset_userdata('user_data'); \n $sess_array = array('username' => $this->session->userdata('recruiter_login'));\n $candidateinfo = $this->login_database->read_user_information($sess_array,'candidate');\n $this->session->set_userdata('user_data', $candidateinfo);\n $msg .= \"<center><font size='2px' face='verdana,arial,sans-serif'>Your picture was successfully uploaded.<br />You may close this window.</font></center>\";\n }\n } else {\n return false;\n }\n \n } else {\n $msg .= \"<center><font size='2px' face='verdana,arial,sans-serif'>There was an error uploading your picture.</font></center>\";\n }\n }\n \n echo $msg;\n }", "title": "" }, { "docid": "1801abeb130807da79c04f0513dbd28e", "score": "0.6056019", "text": "public function details_post()\n{\n\n $pdata = file_get_contents(\"php://input\");\n $data = json_decode($pdata,true);\n $msg = \"\";\n if(isset($data['id']))\n {\n $id = $data['id'];\n }\n $company_name = $data['company_name'];\n $lat = $data['lat'];\n $long = $data['long'];\n $gst_no = $data['gst_no'];\n $punch_line = $data['punch_line'];\n //$company_id = $data['company_id'];\n\n $insert_data = array(\n 'company_name' => $company_name,\n 'lat' => $lat,\n 'long' => $long,\n 'gst_no' => $gst_no,\n 'punch_line' => $punch_line,\n //'company_id' => $company_id,\n 'created_at' => date('Y-m-d H:i:s')\n );\n\n\n define('UPLOAD_DIR', 'asset/uploads/');\n $img = $data['logo']; \n \n// $img = str_replace('data:image/jpeg;base64,', '', $img);\n //$img = str_replace(' ', '+', $img);\n \n if(!empty($img)){\n $image_parts = explode(\";base64,\", $img);\n $data1 = base64_decode($image_parts[1]);\n $file = UPLOAD_DIR . uniqid() . '.png';\n $success = file_put_contents($file, $data1);\n\n $image = substr($file,14);\n\n $insert_data['logo'] = $image;\n\n // $id = $this->model->getAllwhere('details','','id');\n if(!empty($id)){\n // $detail_id = $id[0]->id;\n $where = array(\n 'id' => $id\n );\n unset($data['created_at']);\n $result = $this->model->updateFields('details', $insert_data, $where);\n $msg = \"Detail update successfully\";\n }\n\n else{\n if(empty($img) || !empty($img)){\n $result = $this->model->insertData('details', $insert_data);\n $msg = \"Detail insert successfully\";\n }\n }\n }\n else{\n if(!empty($id)){\n // $detail_id = $id[0]->id;\n $where = array(\n 'id' => $id\n );\n unset($data['created_at']);\n $result = $this->model->updateFields('details', $insert_data, $where);\n $msg = \"Detail update successfully\";\n }\n }\n\n$resp = array('rccode' => 200,'message' =>$msg);\n$this->response($resp);\n}", "title": "" }, { "docid": "4fb603157687cb91056c6bd41fef36c9", "score": "0.6052553", "text": "public function uploadAvatarImage() {\n try{\n if($this->request->is('post')) {\n $message = '';\n $id = '';\n $status = FALSE;\n if(empty($this->request->data['uid'])) {\n $message = 'Please login.';\n }else{\n $id = $this->request->data['uid'];\n }\n if($message == '') {\n $img = $this->request->data['image'];\n $img = str_replace('data:image/png;base64,', '', $img);\n $imgData = base64_decode($img);\n $image = 'Avtar_'.$id.'.png';\n // Path where the image is going to be saved\n $filePath = WWW_ROOT .'/upload/Avtar/'.$image;\n // Delete previously uploaded image\n if (file_exists($filePath)) {\n unlink($filePath);\n }\n // Write $imgData into the image file\n $file = fopen($filePath, 'w');\n fwrite($file, $imgData);\n fclose($file);\n $user = TableRegistry::get('user_details');\n $stepCompleted = $user->find()->where(['user_id' => $id])->toArray();\n $query = $user->query();\n $result = $query->update()->set([\n 'profile_pic' => '/upload/Avtar/'.$image,\n 'step_completed' => '1',\n ])->where(['user_id' => $id ])->execute();\n $row_count = $result->rowCount();\n if ($row_count == '1') {\n $message = 'Avtar saved.';\n $status = TRUE;\n } else {\n throw new Exception('udable to update value in db');\n }\n }\n }\n }catch(Exception $e) {\n $this->log('Error in uploadAvtarImage function in Users Controller.'\n .$e->getMessage().'(' . __METHOD__ . ')');\n }\n $this->set([\n 'response' => '/Avtar/'.$image,\n 'message' => $message,\n 'status' => $status,\n '_serialize' => ['response','message','status']\n ]);\n }", "title": "" }, { "docid": "315c1dde3ea2c7b6612bb9f7f386f7bf", "score": "0.6051628", "text": "public function onCommit()\n {\n switch ($this->mode) {\n case 'new':\n if ($this->imageResource) {\n $realPath = Yii::getAlias('@app/web/profile-images') . '/' . $this->filename;\n FileHelper::createDirectory(dirname($realPath));\n imagepng($this->imageResource, $realPath, 9, PNG_ALL_FILTERS);\n imagedestroy($this->imageResource);\n $this->imageResource = null;\n }\n break;\n\n case 'delete':\n if ($this->filename) {\n $realPath = Yii::getAlias('@app/web/profile-images') . '/' . $this->filename;\n if (file_exists($realPath)) {\n @unlink($realPath);\n }\n }\n break;\n }\n }", "title": "" }, { "docid": "01c7596aae21d7f7e2a1cb1eb6fbcd96", "score": "0.6044751", "text": "public function menuuploadsavevenue(Request $request)\n {\n //press-kit\n \n //echo \"<pre>\"; print_r($_FILES);echo \"</pre>\";\n \n \n $id=0;\n $chkvalidimage=$this->menufileisinvalid($request,$id);\n \n $err_resp_msg=''; $respflg=0; $uploadedsuccnames=array(); $user_master_img_db=array();\n $slider_contents=''; $default_image_name='';\n $venuecretaeOredit=0;\n $nicknmres =0;\n $errormsgs=$chkvalidimage['errormsgs'];\n $errfileAr=$chkvalidimage['errfileAr'];\n $totalfileposted=$chkvalidimage['totalfileposted'];\n \n if ( empty($errormsgs) || (!empty($errormsgs) && (count($errfileAr)<$totalfileposted)) )\n {\n \n //**** file upload code starts\n \n \n $allowedFileExtAr=array();\n $allowedFileExtAr[]=\"pdf\";\n \n \n $filecontrolname=\"menu_name\";\n \n \n $allowedFileExtSizeAr=array();\n $allowedFileExtSizeAr['pdf']=(5*1024*1024); \n \n \n //max_width & max_height ,min_width & min_height,equal_width & equal_height \n $allowedFileResolAr=array();\n \n // $allowedFileResolAr['jpeg']=array('min_width'=>537,'min_height'=>507);\n \n $func=\"uploadfile\";//validatefile/uploadfile\n \n \n $destinationsourcePath=public_path().\"/upload/venue-menu/source-file/\"; \n \n $chkimgresp=Imageuploadlib::imageupload($request,$filecontrolname,$allowedFileExtAr,$allowedFileExtSizeAr,$allowedFileResolAr,$func,$addeditid=0,$destinationsourcePath,$errfileAr) ;\n \n \n //echo \"==Imcommonpath=>\".$Imcommonpath;\n //echo \"==chkimg1==><pre>\";\n //print_r($chkimgresp);\n //echo \"</pre>\"; //exit();\n \n if(!empty($chkimgresp))\n {\n $errormsgs=''; $fileuploadednames=array();\n \n if(array_key_exists('errormsgs',$chkimgresp))\n {\n $errormsgs=$chkimgresp['errormsgs'];\n }\n \n if(array_key_exists('fileuploadednames',$chkimgresp))\n {\n $fileuploadednames=$chkimgresp['fileuploadednames'];\n }\n \n if(!empty($fileuploadednames))\n {\n \n \n foreach($fileuploadednames as $fileuploadednameAr)\n {\n $presskitfileName=$fileuploadednameAr['filenamedata'];\n $uploadedsuccnames[]=$presskitfileName;\n } \n \n }\n \n }\n \n //**** file upload code ends\n \n \n //***** insert into user_presskit table starts\n \n //$uploadedsuccnames\n \n if(!empty($uploadedsuccnames))\n {\n $user_id=1;\n if ($request->session()->has('front_id_sess'))\n {\n $user_id=$request->session()->get('front_id_sess'); // get session \n $venueID = $this->getseo_name($user_id);\n }\n //**********check modifying date starts here\n $r = $this->check_modifying_date($venueID,$user_id);\n //IF MODIFYING DATE IS 1 THEN THIS IS FIRST TIME EDIT //*** update user_master table ends\n \n //*** check whether any prev presskit present starts\n $selectstr=\" upk.* \";\n \n $user_presskit_db=DB::table('venue_menu as upk'); \n $user_presskit_db=$user_presskit_db->select(DB::raw($selectstr)); \n $user_presskit_db=$user_presskit_db->where('upk.venue_id', $venueID); $user_presskit_db=$user_presskit_db->where('upk.v_creator_id', $user_id);\n \n $user_presskit_db = $user_presskit_db->skip(0)->take(1);\n $user_presskit_db=$user_presskit_db->first();\n $presskit_name='';\n if(!empty($user_presskit_db))\n {\n $presskit_name=stripslashes($user_presskit_db->menu_name);\n }\n \n //*** check whether any prev presskit present ends\n \n foreach($uploadedsuccnames as $user_presskit_name)\n {\n \n \n \n if(!empty($user_presskit_db))\n {\n //**** update qry\n \n $updtusrmstr= DB::table('venue_menu');\n $updtusrmstr= $updtusrmstr->where('venue_id',$venueID);\n $updtusrmstr= $updtusrmstr->where('v_creator_id',$user_id);\n $updtusrmstr=$updtusrmstr->update(\n ['menu_name' =>addslashes($user_presskit_name),\n 'create_date'=>date('Y-m-d H:i:s') \n ]\n );\n \n //*** unlink previous presslit file\n \n $srcpresskit=public_path().\"/upload/venue-menu/source-file/\".$presskit_name;\n \n @unlink($srcpresskit);\n \n \n }\n else\n {\n //**** insert qry\n \n $presskit_array=array(); \n \n $presskit_array['menu_name']=addslashes($user_presskit_name);\n $presskit_array['venue_id']=$venueID;\n $presskit_array['v_creator_id']=$user_id;\n $presskit_array['create_date']=date('Y-m-d H:i:s'); \n $chkupd= DB::table('venue_menu')->insert($presskit_array );\n $last_insert_id=DB::getPdo()->lastInsertId(); \n \n }\n \n \n \n \n \n }\n \n \n //if($r == 1)\n //{\n // $request->session()->flash('front_successmsgdata_sess', 'Your venue has been created successfully .');\n // //return redirect('/');\n // $venuecretaeOredit=1;\n // //**get nickname starts here\n // $nicknmres = $this->getnicknm($venueID,$user_id);\n // //**get nickname ends here\n // \n //}\n DB::table('venue_master')\n ->where('id', $venueID)\n ->update(['modified_date'=>date('Y-m-d H:i:s') ]); \n \n \n }\n \n \n //***** insert into user_presskit table ends\n \n \n \n }\n else\n {\n if(!empty($id))\n {\n \n //return redirect(ADMINSEPARATOR.'/banneradd/'.$id)\n //->withErrors($chkvalid)\n //->withInput();\n \n $err_resp_msg= $errormsgs;\n \n }\n else\n {\n //return redirect(ADMINSEPARATOR.'/banneradd')\n //->withErrors($chkvalid)\n //->withInput();\n \n $err_resp_msg= $errormsgs;\n }\n }\n \n \n if ( empty($errormsgs) || (!empty($errormsgs) && (count($errfileAr)<$totalfileposted)) )\n {\n $respflg=1;\n }\n if($r == 1)\n {\n $request->session()->flash('front_successmsgdata_sess', 'Your venue has been created successfully .');\n //return redirect('/');\n $venuecretaeOredit=1;\n //**get nickname starts here\n $nicknmres = $this->getnicknm($venueID,$user_id);\n //**get nickname ends here\n \n }\n \n \n \n $respAr=array();\n $respAr['venuecretaeedit']=$venuecretaeOredit;\n $respAr['nicknmdata']= $nicknmres;\n $respAr['flag']=$respflg;\n $respAr['errorespmsg']=$err_resp_msg;\n $respAr['errfileAr']=$errfileAr;\n $respAr['totalfileposted']=$totalfileposted;\n $respAr['uploadedsuccnames']=$uploadedsuccnames;\n \n //$respAr['user_master_img_db']=$user_master_img_db;\n // $respAr['chkimgresp']=$chkimgresp;\n echo json_encode($respAr);\n \n \n }", "title": "" }, { "docid": "981699b7813dc0d48efeb439ba1a7832", "score": "0.6044386", "text": "public function saveShopDetails(Request $request){\n $shopname = $request->shopname;\n $contactnumber = $request->contactnumber;\n $address = $request->address;\n\n $modifiedFilepath=\"\";\n\n if($request->hasFile('imageFile')){\n $uploadFile = $request->file('imageFile');\n $filename = time().$uploadFile->getClientOriginalName();\n $modifiedFilepath = 'shop-details/'.$filename;\n $currencyid = 1;\n\n Storage::disk('local')->putFileAs(\n 'public/shop-details',\n $uploadFile,\n $filename\n );\n }\n\n $data1 = ['shop_name'=>$shopname,'contact_number'=>$contactnumber,'address'=>$address,'logo'=>$modifiedFilepath];\n\n $data2 = ['shop_name'=>$shopname,'contact_number'=>$contactnumber,'address'=>$address];\n\n $modifiedFilepath==\"\" ? $data=$data2 : $data=$data1;\n\n $shopid = DB::table('shop_details')->update($data);\n\n return redirect('admin2/shopDetails');\n\n }", "title": "" }, { "docid": "09d27625b900d48e41982fc86475720a", "score": "0.60434794", "text": "public function store(Request $request)\n { \n $update = false;\n \n if(isset($request->id)){\n $update = true;\n }\n \n if($update){\n \n $rules = [\n 'title' => 'required',\n 'sub_title' => 'required',\n 'image' => 'mimes:jpeg,jpg,bmp,png',\n ]; \n \n }else{\n \n $rules = [\n 'title' => 'required',\n 'sub_title' => 'required',\n 'image' => 'required|mimes:jpeg,jpg,bmp,png',\n ]; \n }\n\n $this->validate($request, $rules); \n\n if($update){\n\n $model = $this->model->findOrFail($request->id);\n $image_before_update = $model->image;\n \n }else{\n $model = new $this->model;\n }\n\n $model->title = $request->title;\n $model->sub_title = $request->sub_title;\n \n if(strlen($request->image)>0){\n \n $model->image = $request->image;\n \n } \n $model->save();\n \n $response = 'Slider ';\n \n if($update){\n $response .= 'Atualizado(a) com Sucesso!';\n }else{\n $response .= 'Cadastrado(a) com Sucesso!';\n } \n \n if($file = $request->file('image')) {\n \n $image_name = time().time().'.'.$file->getClientOriginalExtension();\n\n $target_path = public_path('uploads/slider');\n $is_uploaded = $file->move($target_path, $image_name);\n \n if ($is_uploaded) {\n \n $update_model = $this->model->findOrFail($model->id);\n $update_model->image = $image_name;\n $update_model->save();\n \n if($update){\n $storage = Storage::disk('public');\n if(\\File::exists('uploads/slider/'.$image_before_update)) {\n \\File::delete('uploads/slider/'.$image_before_update);\n } \n }\n } else {\n $response .= ' (a imagem não foi salva)';\n }\n \n\n }else{\n if($update){\n if(strlen($image_before_update)>0){\n \n if(!\\File::exists('uploads/slider/'.$image_before_update)) {\n $response .= ' (a imagem não foi salva)';\n } \n }else{\n $response .= ' (a imagem não foi salva)';\n }\n }else{\n $response .= ' (a imagem não foi salva)';\n }\n } \n \n if (request()->wantsJson()) {\n return response()->json(['status'=>true,'msg'=>$response]);\n }else{\n return redirect('admin/slider')->with('successMsg',$response);\n } \n }", "title": "" }, { "docid": "85ec75df5d04203252899c2db5b6d0e7", "score": "0.60428727", "text": "public function store(Request $request)\n {\n $this->validate($request,[\n 'id_card'=>'required',\n 'passport'=> 'required',\n ]);\n $passport = $request->passport;\n if($passport){\n $imagename=$passport->getClientOriginalName();\n $passport->move('img/passport',$imagename);\n $passport = $imagename;\n\n }\n $id_card = $request->id_card;\n if($id_card){\n $imagename=$id_card->getClientOriginalName();\n $id_card->move('img/id',$imagename);\n $id_card = $imagename;\n\n }\n $guarantor = guarantor_image_file::where('guarantor_id',$request->input('guarantor_id'))->orderBy('id','desc')->first();\n if($guarantor){\n $guarantor = guarantor_image_file::find($guarantor->id);\n $guarantor->passport = $passport;\n $guarantor->id_card=$id_card;\n $guarantor->save();\n return back()->withMessage(\"Guarantor's Image Information Successfully Updated\");\n }else{\n //\n $guarantor = new guarantor_image_file;\n $guarantor->guarantor_id = $request->input('guarantor_id');\n $guarantor->passport = $passport;\n $guarantor->id_card=$id_card;\n $guarantor->save();\n return back()->withMessage(\"Guarantor's Image Information Added Successfully\");\n }\n \n \n }", "title": "" }, { "docid": "8a0dcac303ede29349b09d867b86f4bd", "score": "0.603023", "text": "function media_bynder_submit_mob(&$form, &$form_state) {\n $id = media_bynder_parameter($_POST, 'id');\n $idHash = media_bynder_parameter($_POST, 'idHash');\n\n $redirect = 'media_bynder_add';\n\n $result = media_bynder_save_image($id, $idHash, $form);\n if(!$result['success']){\n echo '{\"success\": 0, \"type\": \"error\", \"message\": \"' . $result['message'] . '\"}';\n }else{\n echo '{\"success\": 1, \"type\": \"success\", \"message\": \"' . t($result['message']) . '\"}';\n }\n exit;\n}", "title": "" }, { "docid": "48eb279e7470d2daba560542e7a0fddf", "score": "0.6027115", "text": "public function actionUpload_image_banner()\n\t{\t\t\t\n\t\t$app = Yii::app();\n\t\t$current_datetime = date('Y-m-d H:i:s');\n\t\t\n\t\t// if id is not set\n\t\tif (!empty($_FILES)) {\n\t\t\t$tempFile = $_FILES['Filedata']['tmp_name'];\n\t\t\t$targetPath = $app->params['root_url'].'_images/banner/';\n\t\t\t$targetFile = $_FILES['Filedata']['name'];\n\t\t\t$ext = strtolower(trim(pathinfo($targetFile, PATHINFO_EXTENSION)));\n\t\t\t$force_crop = 0;\n\t\t\t$allowed_ext = array(\n\t\t\t\t'gif',\n\t\t\t\t'jpeg',\n\t\t\t\t'jpg',\n\t\t\t\t'png',\n\t\t\t);\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tif (empty($ext) || !in_array($ext, $allowed_ext)) {\n\t\t\t\techo Yii::t('global','ERROR_ALLOWED_IMAGES');\t\t\t\t\n\t\t\t\texit;\n\t\t\t} else {\t\n\t\t\t\t// original file renamed\n\t\t\t\t$original = md5($targetFile.time()).'.'.$ext;\t\n\t\t\t\t$filename = md5($original).'.jpg';\t\t\t\t\n\t\t\t\n\t\t\t\t$image = new SimpleImage();\n\t\t\t\tif (!$image->load($tempFile)) {\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global','ERROR_LOAD_IMAGE_FAILED');\n\t\t\t\t\texit;\n\t\t\t\t}\t\t\t\n\t\t\t\t\n\t\t\t\t$width = $image->getWidth();\n\t\t\t\t$height = $image->getHeight();\n\t\t\t\t\n\t\t\t\tif (!$width || !$height) {\n\t\t\t\t\t\n\t\t\t\t\techo Yii::t('global','ERROR_LOAD_IMAGE_FAILED');\n\t\t\t\t\texit;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// if our image size is smaller than our min 800x600\n\t\t\t\tif ($width < $app->params['banner_width'] || $height < $app->params['banner_height']) { \n\t\t\t\t\techo Yii::t('global', 'ERROR_MIN_IMAGE_RESOLUTION', array('{width}'=>$app->params['banner_width'],'{height}'=>$app->params['banner_height']));\t\t\t\t\t\t\t\n\t\t\t\t\texit;\n\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t// save image\n\t\t\t\tif (!$image->resize($app->params['banner_width'],$app->params['banner_height'])) {\n\t\t\t\t\techo Yii::t('global', 'ERROR_RESIZE_BANNER_FAILED');\t\t\t\t\t\t\n\t\t\t\t\texit;\t\t\n\t\t\t\t} else if (!$image->save($targetPath.$filename)) {\n\t\t\t\t\techo Yii::t('global', 'ERROR_SAVE_BANNER_FAILED');\t\t\t\t\t\t\n\t\t\t\t\texit;\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\techo 'file:'.$filename;\n\t\t\t\texit;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\techo Yii::t('global','ERROR_UPLOAD_IMAGE_FAILED');\n\t\t}\t\t\t\t\n\t}", "title": "" }, { "docid": "80e12d77208f8e4552184be2b771f4b8", "score": "0.60196793", "text": "function sl_dal_storesave_cbf(){\n\tglobal $wpdb;\n\t$sl_gizmo_store = new Gizmo_Store();\n\t$sl_store_table = $sl_gizmo_store->sl_return_dbTable(\"SRO\");\n\tif(isSet($_POST[SL_PREFIX.'tbName'])){\n\t\t\t$iscustid \t= \t$_POST[SL_PREFIX.'tbiscustid'];\n\t\t\t$storeName \t= \t$_POST[SL_PREFIX.'tbName'];\n\t\t\t$Category\t= \ttrim($_POST[SL_PREFIX.'CatId']);\n\t\t\t$Address \t= \t$_POST[SL_PREFIX.'tbAddress'];\n\t\t\t$Lat\t\t=\t$_POST[SL_PREFIX.'tbLat'];\n\t\t\t$Lng \t\t=\t$_POST[SL_PREFIX.'tbLng'];\n\t\t\t$City\t\t=\t$_POST[SL_PREFIX.'tbCity'];\n\t\t\t$State \t\t=\t$_POST[SL_PREFIX.'tbState'];\n\t\t\t$Country\t=\t$_POST[SL_PREFIX.'tbCountry'];\n\t\t\t$Zip \t\t=\t$_POST[SL_PREFIX.'tbZip'];\n\t\t\t$Contact\t=\t$_POST[SL_PREFIX.'tbPhone'];\n\t\t\t$Fax \t\t=\t$_POST[SL_PREFIX.'tbFax'];\n\t\t\t$Email\t\t=\t$_POST[SL_PREFIX.'tbEmail'];\n\t\t\t$Web \t\t=\t$_POST[SL_PREFIX.'tbWeb'];\n\t\t\t$LabelId \t=\ttrim($_POST[SL_PREFIX.'hdfLabelId']);\n\t\t\t$LabelText \t=\t$_POST[SL_PREFIX.'tbLabelTxt'];\n\t\t\t$filename \t= \"\";\n\t\t\t$path_id\t= $sql_qry = \"\";\n\t\t\t$storeId\t= trim($_POST[SL_PREFIX.'storeId']);\n\t\t\tif($LabelId == \"0\" || $LabelId == \"\")\n\t\t\t\t$LabelId = \"1\";\n\t\t\tif(isset($_FILES[SL_PREFIX.\"fileLogo\"])){\n\t\t\t\t$filename = $_FILES[SL_PREFIX.\"fileLogo\"][\"name\"];\n\t\t\t\t$ext=findexts($filename);\n\t\t\t\t$newFileName = random_string( );\n\t\t\t\tmove_uploaded_file($_FILES[SL_PREFIX.\"fileLogo\"][\"tmp_name\"],SL_PLUGIN_PATH.\"Logo/\" . $newFileName .\".\". $ext);\n\t\t\t\t$path=\"Logo/\". $newFileName .\".\". $ext;\n\t\t\t}\n\t\t\t$path_id \t= trim($_POST[SL_PREFIX.'hdfLogoAdd']);\n\t\t\t$LogoType \t= trim($_POST[SL_PREFIX.'hdfLogoType']);\n\t\t\tif($LogoType == 'Default'){\n\t\t\t\t$LogoType ='D';\n\t\t\t}else{\n\t\t\t\t$LogoType ='S';\n\t\t\t}\n\t\t\tif($storeId == \"0\"){\n\t\t\t\t\t$sql_qry =\"INSERT INTO `$sl_store_table`(`iscustid`, `name`, `address`, `lat`, `lng`, `city`, `state`, `country`, `zip_code`, `phone`, `fax`, `email`, `website`, `type`, `logoid`, `logotype`, `labelid`, `labeltext`)\".\n\t\t\t\"VALUES ('$iscustid','$storeName', '$Address', '$Lat', '$Lng', '$City', '$State', '$Country', '$Zip', '$Contact', '$Fax', '$Email', '$Web', '$Category','$path_id', '$LogoType', '$LabelId', '$LabelText')\";\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$nPath = (!empty($path_id)) ? \" ,`LogoId` ='\". $path_id .\"'\" : \"''\";\n\t\t\t\t$sql_qry = \"UPDATE `$sl_store_table` SET `iscustid` = '$iscustid', `name`= '$storeName', `address`= '$Address', `lat`= '$Lat', `lng`= '$Lng', `city`= '$City', `state`= '$State', `country`= '$Country', `zip_code`= '$Zip', `phone`= '$Contact', `fax`= '$Fax', `email`= '$Email', `website`= '$Web', `type`= '$Category',`logoid` ='$path_id',`logotype`= '$LogoType', `labelid` = '$LabelId', `labeltext` = '$LabelText' WHERE `id` = $storeId\";\n\t\t\t}\n\t\t\t$sql_result = mysql_query($sql_qry) or die(mysql_error());\n\t\t\t$success_msg = __('Data has been saved successfully.', 'giz_store_locator');\n\t\t\t$error_msg = __('Error while saving data.', 'giz_store_locator');\n\t\t\tif($sql_result){\n\t\t\t\techo $success_msg.' - success';\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo $error_msg.' - error';\n\t\t\t}\n\t}\n\tdie();\n}", "title": "" }, { "docid": "7a7b4e071935144a0451fe517688a85b", "score": "0.60187536", "text": "function empresas_imagenes_save()\n {\n $a = $this->session->userdata('logged');\n $this->gf->comp_sesion_admin($a, base_url());\n\n $id_empresa = $this->input->post('ID_Empresa');\n $tipo = $this->input->post('tipo');\n $nombre_imagen = $this->input->post('foto_numero');\n \n\n\n $cantidad_fotos = 0;\n\n if (isset($_FILES['filesToUpload']['tmp_name']))\n {\n if (count($_FILES['filesToUpload']['tmp_name']))\n {\n \n $i = 0;\n foreach ($_FILES['filesToUpload']['tmp_name'] as $file)\n {\n\n $i++;\n\n $cantidad_fotos = $this->empresas_model->empresas_images_count($id_empresa);\n $cantidad_fotos = $cantidad_fotos + 1;\n\n if ($cantidad_fotos < 20)\n {\n\n if ($tipo == 'foto_comun')\n {\n $image_name = $this->config->item('upload_path_emp') . $id_empresa . \"_\" . $nombre_imagen . \".jpg\";\n $thumb_grande = $this->config->item('upload_path_emp_thumb') . $id_empresa . \"_\" . $nombre_imagen . \"_p\" . \".jpg\";\n $thumb_chica = $this->config->item('upload_path_emp_thumb') . $id_empresa . \"_\" . $nombre_imagen . \".jpg\";\n }\n elseif ($tipo == 'foto_mas')\n {\n $image_name = $this->config->item('upload_path_emp') . $id_empresa . \"_\" . $cantidad_fotos . \".jpg\";\n $thumb_grande = $this->config->item('upload_path_emp_thumb') . $id_empresa . \"_\" . $cantidad_fotos . \"_p\" . \".jpg\";\n $thumb_chica = $this->config->item('upload_path_emp_thumb') . $id_empresa . \"_\" . $cantidad_fotos . \".jpg\";\n }\n\n\n $image = ImageCreateFromJPEG($file);\n //ancho\n $width = imagesx($image);\n //alto imagen\n $height = imagesy($image);\n //nuevo ancho imagen\n $new_width = 550;\n //calcular alto \n $new_height = ($new_width * $height) / $width;\n //crear imagen nueva\n $thumb = imagecreatetruecolor($new_width, $new_height);\n //redimensiono\n imagecopyresized($thumb, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n //Guardo imagen final \n ImageJPEG($thumb, $image_name);\n\n //Thumb\n //nuevo ancho imagen\n $new_width = 100;\n //calcular alto \n $new_height = ($new_width * $height) / $width;\n //crear imagen nueva\n $thumb = imagecreatetruecolor($new_width, $new_height);\n //redimensiono\n imagecopyresized($thumb, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n //Guardo imagen final \n ImageJPEG($thumb, $thumb_chica);\n\n if ($i == 1 or $cantidad_fotos == 1 or $nombre_imagen == '1')\n {\n //Thumprincipal\n //nuevo ancho imagen\n $new_height = 270;\n //calcular alto \n $new_width = ($new_height * $width) / $height;\n //crear imagen nueva\n $thumb = imagecreatetruecolor($new_width, $new_height);\n //redimensiono\n imagecopyresized($thumb, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n //Guardo imagen final \n ImageJPEG($thumb, $thumb_grande);\n }\n\n if ($tipo == 'foto_mas')\n {\n $this->empresas_model->empresas_images_save($id_empresa, $cantidad_fotos); \n }\n \n }\n }\n }\n }\n redirect(base_url() . 'admin/empresas/empresas_imagenes_list/' . $id_empresa, 'refresh');\n }", "title": "" }, { "docid": "95ddd42efb609aed0b40fbbbc7bf6ec3", "score": "0.59834903", "text": "public function store(Request $request)\n {\n $imageName1 = null;\n $imageName2 = null;\n $imageName3 = null;\n $imageName4 = null;\n $imageName5 = null;\n $baner = null;\n $log = null;\n\n\n \n if ($request['image1']) {\n $imageName1 = time() . '1.' . $request->file('image1')->Extension();\n $request['image1']->move(\n base_path() . '/public/shop/images/', $imageName1\n );\n }\n if ($request['image2']) {\n $imageName2 = time() . '2.' . $request->file('image2')->Extension();\n $request['image2']->move(\n base_path() . '/public/shop/images/', $imageName2\n );\n }\n if ($request['image3']) {\n $imageName3 = time() . '3.' . $request->file('image3')->Extension();\n $request['image3']->move(\n base_path() . '/public/shop/images/', $imageName3\n );\n }\n if ($request['image4']) {\n $imageName4 = time() . '4.' . $request->file('image4')->Extension();\n $request['image4']->move(\n base_path() . '/public/shop/images/', $imageName4\n );\n }\n if ($request['image3']) {\n $imageName5 = time() . '5.' . $request->file('image5')->Extension();\n $request['image5']->move(\n base_path() . '/public/shop/images/', $imageName5\n );\n }\n if ($request['banner']) {\n $baner = time() . '6.' . $request->file('banner')->Extension();\n $request['banner']->move(\n base_path() . '/public/shop/images/', $baner\n );\n }\n if ($request['logo']) {\n $log = time() . '7.' . $request->file('logo')->Extension();\n $request['logo']->move(\n base_path() . '/public/shop/images/', $log\n );\n }\n $this->validate($request, [\n 'shop_name' => 'required',\n 'shop_cat_name' => 'required',\n 'open_time' => 'required',\n 'close_time' => 'required',\n 'user_id' => 'required',\n 'place_id' => 'required',\n 'shop_cat_name' => 'required',\n 'address' => 'required',\n 'mobile_number' => 'required'\n\n\n\n ]);\n\n $shop = new shop();\n $shop->city_id = $request->place_id;\n $shop->user_id = $request->user_id;\n $shop->shop_name = $request->shop_name;\n $shop->shop_cat_name = $request->shop_cat_name;\n $shop->address = $request->address;\n $shop->mobile_number = $request->mobile_number;\n $shop->mobile_number2 = $request->mobile_number2;\n $shop->open_time = $request->open_time;\n $shop->close_time = $request->close_time;\n $shop->website = $request->website;\n $shop->facebook = $request->facebook;\n $shop->twitter = $request->twitter;\n $shop->whatsapp = $request->whatsapp;\n $shop->instagram = $request->instagram;\n $shop->youtube = $request->youtube;\n // $shop->logo = $request->logo;\n // $shop->banner = $request->banner;\n // $shop->image1 = $request->image1;\n // $shop->image2 = $request->image2;\n // $shop->image3 = $request->image3;\n // $shop->image4 = $request->image4;\n // $shop->image5 = $request->image5;\n if($imageName1){\n $shop->image1 = $imageName1;\n }\n if($imageName2){\n $shop->image2 = $imageName2;\n }\n if($imageName3){\n $shop->image3 = $imageName3;\n }\n if($imageName4){\n $shop->image4 = $imageName4;\n }\n if($imageName5){\n $shop->image5 = $imageName5;\n }\n if($baner){\n $shop->banner = $baner;\n }\n if($log){\n $shop->logo = $log;\n }\n\n\n\n \n $shop->save();\n\n // return view('table');\n return redirect()->route('user.shop.index')->with('success','Registration Success');\n\n }", "title": "" }, { "docid": "2687f0a4c6ad01350f88ee5ffb7b3dfa", "score": "0.5980756", "text": "private function saveNewImg($type,$type_id){\n\n if (Yii::$app->request->post('Imgnew') && isset($_FILES['Imgnew'])){\n $imgs = Yii::$app->request->post('Imgnew');\n //ex($imgs);\n $files = (isset($_FILES['Imgnew']['name'])) ? $_FILES['Imgnew']['name'] : [];\n\n\n foreach ($files as $num => $file_name){\n\n //if ((int)$imgs[$num]['img_0']['valid'] == 1){\n\n $imgOrg = $this->saveOriginalNew($num,$type,$type_id);\n\n\n //mine list size Image\n // create&set model\n // resize img\n\n if ( $imgOrg != null ){\n\n $img = new Img();\n $img->alt = $imgs[$num]['alt'];\n $img->title = $imgs[$num]['title'];\n $img->width = (int)$imgs[$num]['width'];\n $img->height = (int)$imgs[$num]['height'];\n $img->size = $imgs[$num]['size'];\n $img->watermark = (isset($imgs[$num]['watermark'])) ? (int)$imgs[$num]['watermark'] : 0;\n $img->resize =(isset($imgs[$num]['resize'])) ? (int)$imgs[$num]['resize'] : 0;\n $img->harshness =(isset($imgs[$num]['harshness'])) ? (int)$imgs[$num]['harshness'] : 0;\n\n\n\n $img->crop_x = (int)$imgs[$num]['crop_x'];\n $img->crop_y = (int)$imgs[$num]['crop_y'];\n\n $img->crop_width = (int)$imgs[$num]['crop_width'];\n $img->crop_height = (int)$imgs[$num]['crop_height'];\n\n $img->wrap_width = (int)$imgs[$num]['wrap_width'];\n $img->wrap_height = (int)$imgs[$num]['wrap_height'];\n\n // $img->ord = (int) $imgs[$num]['ord'];\n\n\n if ($img->resize)\n if ( (! $img->width || ! $img->height) ){\n $size =explode('_', $img->size);\n if (count( $size )){\n $img->width = (int)$size[0];\n $img->height = (int)$size[1];\n }\n\n }\n\n $this->resizeImg($imgOrg,$img,$type,$type_id);\n }\n // }\n\n }\n }\n\n $this->saveImgLinks($type_id,$type);\n }", "title": "" }, { "docid": "adddfe8ff60c0884cfa6abf02b13aa49", "score": "0.59739053", "text": "private function saveOtherField($request, $id){\n\n \t$data_other_field = $request->input('casefieldextra');\n\n \t\n \t// For image file check\n \t$new_image_array = array();\n\n \tif ($request->hasFile('casefieldextra'))\n \t{\n\n \t\t$all_image = $request->file('casefieldextra');\n\n\n\n \t\t$destination = $this->uploadPath;\n\n \t\t\n\n \t\tforeach ($all_image as $key => $value) {\n\n\n \t\t\t$fileValidate = Validator::make($request->file(), \n \t\t\t\t[\n\t\t\t //$key => 'mimes:jpg,jpeg,bmp,png|max:10240',\n\t\t\t $key => 'max:10240',\n\t\t\t \t]\n \t\t\t);\n\n \t\t\t$file_valid_extensions = $this->checkFileMimeType($value);\n\n\n \t\t\tif( !$fileValidate->fails() && $file_valid_extensions){\n\n \t\t\t\t$file = $value->getClientOriginalName();\n\n \t\t\t\t$extension = $value->getClientOriginalExtension();\n\n \t\t\t\t$file_name_modified = str_replace(' ', '-', strtolower($file));;\n\n \t\t\t\t$file_name_modified = preg_replace('/[^A-Za-z0-9\\. -]/', '', $file_name_modified);\n\n \t\t\t\t$fileName = time().'_'.$file_name_modified;\n\n \t\t\t\t$file_path = \"/\" . date(\"Y\") . '/' . date(\"m\") . \"/\";\n\n \t\t\t\t\n \t\t\t\t$fileDatePath = $destination . $file_path;\n\n\n \t\t\t\tif (! File::exists($fileDatePath)) {\n \t\t\t\t File::makeDirectory($fileDatePath, 0777,true);\n \t\t\t\t}\n\n \t\t\t\t$successUploaded = $value->move($fileDatePath, $fileName);\n\n \t\t\t\tif($successUploaded){\n\n \t\t\t\t\t\n\n\t\t\t\t\t $width = config('cms.image.thumbnail.width');\n\t\t\t\t\t $height = config('cms.image.thumbnail.height');\n\t\t\t\t\t //$extension = $image->getClientOriginalExtension();\n\t\t\t\t\t $thumbnail = str_replace(\".{$extension}\", \"_thumb.{$extension}\", $fileName);\n\n\t\t\t\t\t Image::make($fileDatePath . $fileName)\n\t\t\t\t\t ->resize($width, $height)\n\t\t\t\t\t ->save($fileDatePath . '/' . $thumbnail);\n\n\t\t\t\t\t //$new_image_array[$key] = $file_path . $fileName;\n\n\t\t\t\t\t $new_image_array_single['case_id'] = $id;\n\t\t\t\t\t $new_image_array_single['user_id'] = $request->user()->id;\n\t\t\t\t\t $new_image_array_single['meta_key'] = $key;\n\t\t\t\t\t $new_image_array_single['meta_value'] = ( !empty($file_path . $fileName) ? $file_path . $fileName : null );\n\n\t\t\t\t\t array_push($new_image_array, $new_image_array_single );\n\n \t\t\t\t}\n\n \t\t\t}\n\n \t\t} // foreach\n\n\n \t}\n\n \t\n\n\n \tif(!empty($id) && !empty($data_other_field) ){\n\n \t\t$new_other_filed2 = array();\n\n \t\tforeach ($data_other_field as $key => $value) {\n\n \t\t\tif(isset($key) && !empty($key)){\n \t\t\t\t$new_other_filed['case_id'] = $id;\n \t\t\t\t$new_other_filed['user_id'] = $request->user()->id;\n \t\t\t\t$new_other_filed['meta_key'] = $key;\n \t\t\t\t$new_other_filed['meta_value'] = ( !empty($value) ? $value : null );\n\n \t\t\t\tarray_push($new_other_filed2, $new_other_filed );\n \t\t\t}\n\n \t\t}\n\n \t\t$last_new_other_fileds = array_merge($new_other_filed2, $new_image_array);\n\n \t\t//dd($last_new_other_fileds);\n\n \t\treturn $last_new_other_fileds;\n \t}\n \telse{\n \t\treturn false;\n \t}\n \t\n }", "title": "" }, { "docid": "154c8d2089b661c29eef771f50c6e36c", "score": "0.5973352", "text": "public function store(Request $request)\n {\n\n $this->validate($request,[\n\n 'amount' => 'required',\n 'id' => 'required'\n ]);\n $surrender_amount =0;\n $imprests = Imprest::where('id',$request->id)->first();\n\n $keys[] = [];\n foreach ($request->description as $key => $value) {\n \n $keys[$key]['description'] =$value[0];\n }\n\n foreach($request->amount as $key => $value){\n\n $keys[$key]['amount'] =$value[0];\n $surrender_amount +=$value[0];\n }\n\n\n if($request->file){\n\n foreach($request->file as $key => $file) {\n $file_name = str_random(10) .date('Y-m-d: H:is').'.' . $file[0]->getClientOriginalExtension();\n $destinationPath = 'images/imprest/';\n Image::make($file[0])->save(public_path($destinationPath.$file_name));\n $keys[$key]['avatar'] = $file_name;\n\n\n }\n }\n\n unset($keys[0]);\n if($this->checkSurrenderedAmount($keys,$imprests)){\n\n session()->flash(\"warning\",\"Amount Your are trying to surrender is less than the amount issued\");\n session()->flash(\"error\",\"Surrender Failed !!\");\n return redirect()->back();\n }\n\n foreach($keys as $key){\n\n $key['imprest_id'] = (int)$request->id;\n $key['avatar'] = isset($key['avatar']) ? $key['avatar'] :'null';\n $key['status'] = SurrenderAttachment::INITIATED;\n \n SurrenderAttachment::create($key); \n }\n\n $num = Imprest::count();\n\n $imprestnum = \"IMP\".''.$num;\n $imprestNumber= $this->getUniqueImprestNumber($imprestnum);\n $officer = Department::where('dep_code',Auth::user()->department_id)\n ->first();\n $hodDetails=User::where('id',$officer->user_id)->first();\n $data = $request->all();\n $imp=new Imprest();\n $imp->requester_id = Auth::user()->sage_id;\n $imp->applicant_id = Auth::user()->sage_id;\n $imp->process = 0;\n $imp->officer_id = $imprests->officer_id?:$imprests->user_id;\n $imp->imprest_number=$imprestNumber;\n $imp->currency =$imprests->currency;\n\n if($imprests->currency != 0){\n $currency_hist=CurrencyHistory::where('iCurrencyID',$imprests->currency)\n ->orderBy('idCurrencyHist','DESC')\n ->first();\n //$amount= $amount * $currency_hist->fSellRate;\n $imp->currency_link_id = $currency_hist->idCurrencyHist;\n }\n\n $imp->advance_amount = $surrender_amount-$imprests->advance_amount;\n $imp->status = Imprest::STATUS_UNPROCESSED;\n $imp->project_id=$imprests->project_id;\n $imp->nature_of_duty='An Oversurrender of '. $imprests->imprest_number;\n $imp->imprest_type=$imprests->imprest_type;\n $imp->is_oversurrender=1;\n\n $imp->save();\n $id = $imp->id;\n Imprest::where('id',$num)->update(['surrendered_amount' =>$surrender_amount-$imprests->advance_amount]);\n if(count($hodDetails)>0){\n Mail::to($hodDetails)->send(new HodNotification(Imprest::where('id',$id)->first(),'Admin'));\n }\n\n $imprests->update(['status' => Imprest::USER_INITIATED_SURRENDER]);\n\n $hod =Imprest::with(['officer'])->where('id',$request->id)->first();\n\n $hodmail = $hod->officer->email;\n\n Mail::to($hodmail)->send(new HodNotification($imprests ,'surrender'));\n\n flash('Imprest Surrendered initiated successfully','success');\n \n return redirect()->route('surrender.index');\n\n\n\n }", "title": "" }, { "docid": "427e1e1ee9998de7d688b9c7fffce386", "score": "0.59726846", "text": "function save($data, $form) {\n\t\tif($data['ImageSource'] != 'existing' && $data['Upload']['size'] == 0) {\n\t\t\t// No image has been uploaded\n\t\t\tDirector::redirectBack();\n\t\t\treturn;\n\t\t}\n\t\t$owner = DataObject::get_by_id($data['Class'], $data['ID']);\n\t\t$fieldName = $data['Field'] . 'ID';\n\t\t\n\t\tif($data['ImageSource'] == 'existing') {\n\t\t\tif(!$data['ExistingFile']) {\n\t\t\t\t// No image has been selected\n\t\t\t\tDirector::redirectBack();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$owner->$fieldName = $data['ExistingFile'];\n\n\t\t\t// Edit the class name, if applicable\n\t\t\t$existingFile = DataObject::get_by_id(\"File\", $data['ExistingFile']);\n\t\t\t$desiredClass = $owner->has_one($data['Field']);\n\t\t\t\n\t\t\t// Unless specifically asked, we don't want the user to be able\n\t\t\t// to select a folder\n\t\t\tif(is_a($existingFile, 'Folder') && $desiredClass != 'Folder') {\n\t\t\t\tDirector::redirectBack();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(!is_a($existingFile, $desiredClass)) {\n\t\t\t\t$existingFile->ClassName = $desiredClass;\n\t\t\t\t$existingFile->write();\n\t\t\t}\n\t\t} else {\n\t\t\t// TODO We need to replace this with a way to get the type of a field\n\t\t\t$imageClass = $owner->has_one($data['Field']);\n\t\t\n\t\t\t// If we can't find the relationship, assume its an Image.\n\t\t\tif( !$imageClass) $imageClass = 'Image';\t\n\t\t\t\n\t\t\t// Assuming its a decendant of File\n\t\t\t$image = new $imageClass();\n\t\t\t$image->loadUploaded($data['Upload']);\n\t\t\t$owner->$fieldName = $image->ID;\n\t\t\t\n\t\t // store the owner id with the uploaded image\n \t\t$member = Member::currentUser();\n\t\t\t$image->OwnerID = $member->ID;\n\t\t\t$image->write();\n\t\t}\n\n\t\t$owner->write();\n\t\tDirector::redirectBack();\n\t}", "title": "" }, { "docid": "fe3c8128f36a7b8dab2dfdce55055822", "score": "0.5965561", "text": "public function store(Request $request)\n {\n $request->validate([\n 'coupon'=>'required|unique:coupons',\n 'price'=>'required',\n 'expire_at'=>'required',\n\n\n ]);\n try {\n \n $category=new Vendorcoupon;\n \n $file=$request->file('file');\n \n if($file){\n // File::delete(__getAdmin()->profile_photo_path);\n $fname=rand().'Coupon.'.$file->getClientOriginalExtension();\n $category->image='upload/coupon/vendor/'.$fname;\n // $path=Image::make($file)->resize(200,300);\n $file->move('upload/coupon/vendor/',$fname);\n }\n $category->vendor_id=Auth::user()->id;\n $category->coupon=$request->coupon;\n $category->price=$request->price;\n $category->expire_at=$request->expire_at;\n $category->card_value=$request->coupon_type;\n\n if($category->save()){\n $notification=array(\n 'alert-type'=>'success',\n 'messege'=>'Coupon Added',\n \n );\n return redirect()->back()->with($notification);\n }else{\n $notification=array(\n 'alert-type'=>'info',\n 'messege'=>'Coupon not added',\n \n );\n return redirect()->back()->with($notification);\n }\n \n \n } catch (\\Throwable $th) {\n $notification=array(\n 'alert-type'=>'error',\n 'messege'=>'Something went wrong. Please try again later.',\n \n );\n return redirect()->back()->with($notification);\n \n }\n \n }", "title": "" }, { "docid": "05d2aa8f8d53076fce225fd93ac3fffb", "score": "0.5963542", "text": "public function save(){\n\n // Authenticate as admin\n $user = User::fetch_by_session();\n if($user === false) return $this->zajlib->json(['status'=>'error', 'message'=>'Your user session has expired!']);\n if($user->data->admin != 'admin') return $this->zajlib->json(['status'=>'error', 'message'=>'Your user account does not have rights to perform this action!']);\n\n // Fetch the photo\n $photo = Photo::fetch($_POST['id']);\n $photo->set_with_data($_POST, ['name', 'alttext', 'caption']);\n $photo->save();\n\n return $this->zajlib->json(['status'=>'ok']);\n }", "title": "" }, { "docid": "36a522512ae1f77aea45d91ed136b111", "score": "0.59568214", "text": "function insertUserImage($user_id,$userData,$userFile)\n\t\t{\n\t\t\t\n\t\t\t//uploading profile pic\n\t\t\tif(!empty($userFile['pro_pic']['name']))\n\t\t\t{\n\t\t\t\tif(empty($userFile['pro_pic']['size']))\n\t\t\t\t{\n\t\t\t\t\t$upload_error1 = 'Profile Image Size Exceeds Limit';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//image desired name\n\t\t\t\t\t$pro_desired_name = md5('pro'.$user_id);\n\t\t\t\t\t$pro_pic = $this->manageFileUploader->upload_file($pro_desired_name,$userFile['pro_pic'],'../files/pro-image/');\n\t\t\t\t\t$pro_pic_file = 'files/pro-image/'.$pro_pic;\n\t\t\t\t\t//updating the value in database\n\t\t\t\t\t$update_pro_image = $this->manageContent->updateValueWhere(\"user_info\",\"profile_image\",$pro_pic_file,\"user_id\",$user_id);\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//uploading cover pic\n\t\t\tif(!empty($userFile['cov_pic']['name']))\n\t\t\t{\n\t\t\t\tif(empty($userFile['cov_pic']['size']))\n\t\t\t\t{\n\t\t\t\t\t$upload_error2 = 'Cover Image Size Exceeds Limit';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//image desired name\n\t\t\t\t\t$cov_desired_name = md5('cov'.$user_id);\n\t\t\t\t\t$cov_pic = $this->manageFileUploader->upload_file($cov_desired_name,$userFile['cov_pic'],'../files/cov-image/');\n\t\t\t\t\t$cov_pic_file = 'files/cov-image/'.$cov_pic;\n\t\t\t\t\t//updating the value in database\n\t\t\t\t\t$update_cov_image = $this->manageContent->updateValueWhere(\"user_info\",\"cover_image\",$cov_pic_file,\"user_id\",$user_id);\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($upload_error1) && isset($upload_error2))\n\t\t\t{\n\t\t\t\treturn array(0,$upload_error1.\" & \".$upload_error2);\n\t\t\t}\n\t\t\telseif(isset($upload_error1) && !isset($upload_error2))\n\t\t\t{\n\t\t\t\treturn array(0,$upload_error1.\" & Cover image Uploaded\");\n\t\t\t}\n\t\t\telseif(!isset($upload_error1) && isset($upload_error2))\n\t\t\t{\n\t\t\t\treturn array(0,$upload_error2.\" & Profile image Uploaded\");\n\t\t\t}\n\t\t\telseif(!isset($upload_error1) && !isset($upload_error2))\n\t\t\t{\n\t\t\t\treturn array(1,\"Profile image & Cover image Uploaded\");\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "bbed86771fe6fea82ebf83aad74cbe8c", "score": "0.5956501", "text": "function handle_upload_ticket_suite_statement(){\r\n\t\t$config = array();\r\n\t\t$config['upload_path'] = './assets/image_uploads/bank_statement';\r\n\t\t$config['allowed_types'] = 'gif|jpg|png|pdf';\r\n $new_name = time().'_'.$_FILES[\"bank_attachment_for_ts\"]['name'];\r\n\t\t$config['file_name'] = $new_name;\r\n\t\t$this->load->library('upload', $config);\r\n\t\t$this->upload->initialize($config);\r\n\r\n\t\tif (isset($_FILES['bank_attachment_for_ts']) && !empty($_FILES['bank_attachment_for_ts']['name'])){\r\n\r\n\t\t\tif ($this->upload->do_upload('bank_attachment_for_ts')){\r\n\t\t\t\t// set a $_POST value for 'image' that we can use later\r\n\t\t\t\t$upload_data = $this->upload->data();\r\n\t\t\t\t$_POST['old_bank_ticket_suite_statement'] = $upload_data['file_name'];\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\t// possibly do some clean up ... then throw an error\r\n\t\t\t\t$this->form_validation->set_message('handle_upload_ticket_suite_statement', $this->upload->display_errors());\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c7b49279767f271b396189faa074f605", "score": "0.5956386", "text": "public function handleImage() {\n if ($this->imageData['error'] != 0) {\n return false;\n }\n\n // citanje ekstenzije\n $ext = pathinfo($this->imageData['name'], PATHINFO_EXTENSION);\n // kreiranje novog imena za fajl\n $filename = $this->id . '.' . $ext;\n // premestanje slike iz tmp foldera u ./img/products/\n\n // ToDo: provere slike\n\n move_uploaded_file(\n $this->imageData['tmp_name'],\n $this->productImgPath . $filename\n );\n // cuvanje putanje do slike u bazi\n $this->img = $this->productImgPath . $filename;\n $this->save();\n }", "title": "" }, { "docid": "6b06635d59701ececc8d91668f64effe", "score": "0.59482557", "text": "function save() {\n $conn = \\DB\\getConnection();\n\n // If this is a photo with an id update otherwise insert\n if (isset($this->id)) {\n $query = sprintf(\"UPDATE Photos\n SET lat = %f\n lng = %f\n title = '%s',\n filename = '%s',\n isPremium = %d\n WHERE uid = %u\",\n $this->lat,\n $this->lng,\n $conn->escape_string($this->title),\n $conn->escape_string($this->filename),\n $this->isPremium,\n $this->uid);\n } else {\n $query = sprintf(\"INSERT INTO Photos (uid, lat, lng, title, filename)\n VALUES (%u, %f, %f, '%s', '%s')\",\n $this->uid,\n $this->lat,\n $this->lng,\n $conn->escape_string($this->title),\n $conn->escape_string($this->filename));\n }\n\n $result = $conn->query($query);\n\n // If this is a newly created photo, then update the id with the\n // newly created one\n if (!isset($this->id)) {\n $this->id = $result->insert_id;\n }\n }", "title": "" }, { "docid": "1723ff117466468353a4f705ab032e5a", "score": "0.594373", "text": "public function processPhoto()\n\t{\n $filename = $this->createFilename();\n\n // resize image\tand save them\n $this->uploadImage(\\Input::file('photo'), 100, 50, 'uploads/photos/medium/' . $filename);\n $this->uploadImage(\\Input::file('photo'), 50, 25, 'uploads/photos/small/' . $filename);\n\n\t\t\\Input::file('photo')->move('uploads/photos/original/', $filename);\n\n\t\t// Save photo in the database\n\t\treturn $this->applicant->update(['photo' => $filename]);\n\t}", "title": "" }, { "docid": "a7cc577c0e119f297a4ad5792fea3978", "score": "0.59333044", "text": "public function guardaImagen()\n {\n $tempFile = $_FILES['Filedata']['tmp_name'];\n \n $prefijo = substr(md5(uniqid(rand())),0,2); \n $charNotValid = array (\"'\",\" \",\"Ñ\",\"ñ\");\n $file_name = $prefijo.\"_\".str_replace($charNotValid,\"\",stripslashes(utf8_decode($_FILES['Filedata']['name']))); \n $targetPath = $_SERVER['DOCUMENT_ROOT'] .'/'. $_REQUEST['folder'] . '/'; \n $targetFile = str_replace('//','/',$targetPath) . $file_name; \n \n if (copy($tempFile,$targetFile)){//copy a la carpeta del servidor\n \n ProductoImagen::where('idProducto', (int)$_POST['idProducto'])\n ->update(array('cnVisible' => 0));\n \n\n $ProductoImagen = new ProductoImagen;\n $ProductoImagen->dsRuta = $file_name;\n $ProductoImagen->idProducto = (int)$_POST['idProducto'];\n $ProductoImagen->save();\n }\n \n echo 1;\n }", "title": "" }, { "docid": "657b8019b7ebc02380abdb55cf2ee3e0", "score": "0.5930407", "text": "public function store(){\n $url_path = 'assets/imgs/' . $_FILES['file']['name'];\n move_uploaded_file($_FILES['file']['tmp_name'], $url_path);\n $_POST['url_image'] = $url_path;\n echo parent::register($_POST) ? header('location: ?controller=admin') : 'Error en el registro';\n }", "title": "" }, { "docid": "5bb17f7cb55fde519290319eae0a35bd", "score": "0.59289974", "text": "public function store()\n {\n //return request()->all();\n $data=request()->except('image','_token','_method');\n \n $check=Product::create($data)->id;\n $files=request()->file('image');\n if($check)\n {\n \n foreach($files as $file)\n {\n $myarray=['product_id'=>$check,'img'=>$file->getClientOriginalExtension()];\n $iCheck=ProductImage::create($myarray)->id;\n $filename=$iCheck.'.'.$file->getClientOriginalExtension();\n $file->move('productimage', $filename); \n }\n \n \n }\n \n \n }", "title": "" }, { "docid": "b36aae366b0732de1807a5bf06ee56d9", "score": "0.5916341", "text": "public function uploadify()\n {\n // Define a destination\n // $targetFolder = '/uploads'; // Relative to the root\n if (I('get.model_name')) {\n $model_name = I(\"get.model_name\");\n }else{\n $this->error(\"no upload model directory define\");\n }\n\n $verifyToken = md5('unique_salt' . $_POST['timestamp']);\n\n if (!empty($_FILES) && $_POST['token'] == $verifyToken) {\n $tempFile = $_FILES['Filedata']['tmp_name'];\n // $targetPath = $_SERVER['DOCUMENT_ROOT'] . $targetFolder;\n // $targetFile = rtrim($targetPath,'/') . '/' . $_FILES['Filedata']['name'];\n $targetFile= './Uploads/images/'.$model_name.'/'.$_FILES['Filedata']['name'];\n // file_put_contents(\"filename\", $targetFile);\n \n // Validate the file type\n $fileTypes = array('jpg','jpeg','gif','png'); // File extensions\n $fileParts = pathinfo($_FILES['Filedata']['name']);\n \n if (in_array($fileParts['extension'],$fileTypes)) {\n move_uploaded_file($tempFile,$targetFile);\n echo '1';\n } else {\n echo 'Invalid file type.';\n }\n }\n }", "title": "" }, { "docid": "6ae77bacf6eb070c9ca2f59fbdc3c6e5", "score": "0.591472", "text": "public function insertimg(Request $request)\n {\n\n\n $validator = Validator::make($request->all(), [\n 'id' => 'required',\n 'fileoffice' => 'required|image64:jpeg,jpg,png|img_min_size:100,100',\n ]);\n\n if($validator->fails()){\n\n return[\n 'messages' => $validator->errors()->messages()\n ];\n }else {\n\n $imageData = $request->get('fileoffice');\n $fileName = Carbon::now()->timestamp . '_' . uniqid() . '.' . explode('/', explode(':', substr($imageData, 0, strpos($imageData, ';')))[1])[1];\n \\Image::make($imageData)->resize(500, 800)->save(public_path('ProductCardetail/').$fileName);\n\n\n $time =Carbon::now('Asia/Bangkok');\n\n\n\n \\App\\product_sell::where('Prosell_ID',$request->id)\n ->update([\n 'Prosell_img' => $fileName,\n 'Prosell_send' => 'ชำระเงิน',\n 'Prosell_about' => 'กรุณารอเจ้าหน้าที่ตรวจสอบ',\n 'Prosell_orderdate'=> \"\" . $time->day. \"-\" . $time->month . \"-\" . $time->year . \" \" . $time->hour . \":\" . $time->minute. \":\" . $time->second . \"\"\n ]);\n\n\n foreach(Cart::content() as $carcon) {\n\n Cart::remove($carcon->rowId);\n }\n Session::forget('car');\n\n\n\n }\n }", "title": "" }, { "docid": "2d021edbd9172e746d912e746250ea64", "score": "0.591097", "text": "public function store(MarketplacesFormRequest $request)\n {\n \n try {\n \n \n \n $data = $request->getData();\n $data['created_by'] = Auth::Id();\n //marketplace::create($data);\n \n $id = DB::table('marketplaces')->insertGetId($data);\n \n if($request->hasFile('file')) {\n\t\t\t\t\t\t$image = $request->file('file');\n\t\t\t\t\t\t$file_info = $request->get('fileuploader-list-file');\n\t\t\t\t\t\t$file_array = json_decode($file_info, true);\n\t\t\t\t\t\t$width = $file_array[0][\"editor\"][\"crop\"][\"width\"];\n\t\t\t\t\t\t$height = $file_array[0][\"editor\"][\"crop\"][\"height\"];\n\t\t\t\t\t\t$left = $file_array[0][\"editor\"][\"crop\"][\"left\"];\n\t\t\t\t\t\t$top = $file_array[0][\"editor\"][\"crop\"][\"top\"];\n\t\t\t\t\t\t$cfWidth = $file_array[0][\"editor\"][\"crop\"][\"cfWidth\"];\n\t\t\t\t\t\t$cfHeight = $file_array[0][\"editor\"][\"crop\"][\"cfHeight\"];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!isset($file_array[0][\"editor\"][\"rotation\"])) {\n\t\t\t\t\t\t $rotate = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t $rotate = $file_array[0][\"editor\"][\"rotation\"];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n // and you are ready to go ...\n $new_image = Image::make($image)->crop((int)$width, (int)$height, (int)$left, (int)$top)->rotate(-(int)$rotate);\n \n\t\t\t\t\t\t\n\t\t\t\t\t\t$fileName = time() . ' ' . $image->getClientOriginalName();\n\t\t\t\t\t\t$fileName = str_replace(' ', '_', $fileName);\n\t\t\t\t\t\t$new_image->save('/home/bidhub/public_html/public/storage/marketplace/images/'.$fileName);\n\t\t\t\t\t\t$portfolio = marketplace::find($id);\n\t\t\t\t\t\t$portfolio ->update(['company_image'=> '/public/storage/marketplace/images/'.$fileName]);\n\t\t\t\t\t\t\n\t\t\t }\n\n return redirect()->route('market-place.marketplace.index')\n ->with('success_message', trans('marketplaces.model_was_added'));\n } catch (Exception $exception) {\n\n return back()->withInput()\n ->withErrors(['unexpected_error' => trans('marketplaces.unexpected_error')]);\n }\n }", "title": "" }, { "docid": "f4572eb81a66ef4b6ee57592c3219992", "score": "0.5909258", "text": "public function addItem($item_name,$item_description,$item_stocks,$item_price,$publish_date,$category_id,$file){\n\n // check the data \n $check_sql=\"SELECT * FROM items WHERE item_name='$item_name'\";\n $result_check=$this->conn->query($check_sql);\n\n if($result_check->num_rows>0){\n header('location:items.php?success=0$message=The item is already in the table');\n\n }else{\n if($_FILES['item_image']['tmp_name']==NULL){\n $sql_insertText=\"INSERT INTO `items`(`item_name`, `item_description`, `item_stocks`, `item_price`, `publish_date`, `category_id`,`item_image`) VALUES ('$item_name','$item_description','$item_stocks','$item_price','$publish_date','$category_id','no_image.jpg')\";\n $result_insertText=$this->conn->query($sql_insertText);\n\n if($result_insertText==true){\n header('location:items.php?success=1&message=The item was successfuly created');\n\n }else{\n header('location:items.php?success=0&message= Error Occourd.Try it again');\n }\n \n }else{\n //check the pic type /size...etc\n $error=0;\n $error_message=\"\";\n\n $fileType=strtolower(pathinfo($file['item_image']['name'],PATHINFO_EXTENSION));\n $fileName=date('m-d-y h:i:s a',time()).\".\".$fileType;\n $target_directory=\"uploads/item_pictures/\";\n $target_file=$target_directory.$fileName;\n \n //check if the file is an actual image\n $imageSize=getimagesize($file['item_image']['tmp_name']);\n\n if($imageSize==false){\n $error=1;\n $error_message=\"The File is not image\";\n\n }elseif($error==0){\n\n //check file size (e.g No images will accepted)\n if($file[\"item_image\"][\"size\"]>50000000){\n $error=1;\n $error_message=\"Image is too big\";\n\n }else{\n //upload and move to the our uploads/\n move_uploaded_file($file['item_image']['tmp_name'],$target_file);\n\n //update db pic and item info\n $sql=\"INSERT INTO `items`(`item_name`, `item_description`, `item_stocks`, `item_price`, `publish_date`,`category_id`,`item_image`) VALUES ('$item_name','$item_description','$item_stocks','$item_price','$publish_date','$category_id','$fileName')\";\n $result=$this->conn->query($sql);\n\n //display message success or error \n if($result==TRUE){\n header(\"location:items.php?success=1&message=The item was successfully created\");\n\n }else{\n header(\"location:items.php?success=0&message=Error occurd.Try it again.\");\n }\n }\n }else{\n header(\"location:items.php?success=0&message=$error_message\");\n }\n }\n }\n }", "title": "" }, { "docid": "12d65d86e7918454299be7b7d5c9e107", "score": "0.58995336", "text": "public function save()\n\t{ //print_r($_FILES);\n\t\t$data = $this->data;\n\t\t$data = array('success' => false, 'messages' =>array());\n\t\t$bUpdate = $this->input->post('bUpdate');\n\t\t\n\t\tif($bUpdate==0){\n\t\t\t$config = array(\n\t\t\t\t\t array(\n\t\t\t\t\t 'field' => 'department_Name',\n\t\t\t\t\t 'label' => 'department Name',\n\t\t\t\t\t 'rules' => 'required|callback_exists_in_database',\n\t\t\t\t\t 'errors' => array('required' => 'Department Name is required...',\n\t\t\t\t\t ) \n\t\t\t\t\t )\n\t\t\t\t\t );\n\t\t\t if (empty($_FILES))\n\t\t\t\t{\n\t\t\t\t$config[] =\tarray(\n\t\t\t\t\t 'field' => 'department_Icon',\n\t\t\t\t\t 'label' => 'department Icon',\n\t\t\t\t\t 'rules' => 'required',\n\t\t\t\t\t 'errors' => array(\n\t\t\t\t\t 'required' => 'Icon is required...',\n\t\t\t\t\t )\n\t\t\t\t\t );\n\t\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\t$config[] = array(\n\t 'field' => 'department_Name',\n\t 'label' => 'Department Name',\n\t 'rules' => 'required|callback_exists_in_database_ById',\n\t 'errors' => array('required' => 'Department Name is required...',\n\t ) \n\t );\n\t\t}\n\n\t\t$this->form_validation->set_rules($config);\n\t $this->form_validation->set_error_delimiters('<p class=\"text-danger\" style=\"color:white;\">', '</p>');\n\n\n\t if ($this->form_validation->run() == FALSE)\n\t\t{\n\t\t\tforeach ($_POST as $key => $value) {\n\t\t\t\t$data['messages'][$key] = form_error($key);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{ \n\t\t\tif($bUpdate==0)\n\t\t\t{\n\t\t\t\t/* insert */\n\n\t\t\t\t$config['upload_path'] = './assets/depart_img/';\n\t\t $config['allowed_types'] = 'gif|jpg|png|jpeg';\t \n\n\t\t $this->load->library('upload', $config); \n\n\t\t\t\t$this->upload->do_upload('department_Icon'); \n\t\t \t$file_info = $this->upload->data();\n\t\t \t/*$img =\"https://s3.ap-south-1.amazonaws.com/images-minmegamweb/minmegam/minkanaku/purchase_bill/\".$file_info['file_name'];*/\n\t\t \t$img = $filename = $file_info['file_name'];\n\t\t \t/*$path=\"upload_img/\".$filename;\n\n\t\t $this->load->library('someclass');\n\t\t $this->someclass->sendFile(\"minmegam/minkanaku/purchase_bill/\".$filename,$path);\n\n\t\t unlink($path);*/\n\n\t\t\t\t$fieldAr = array(\n\t\t\t\t\t'department_Name'\t\t=>$this->security->xss_clean($this->input->post('department_Name')),\n\t\t\t\t\t'department_created_by' => $this->data['LoginID'],\n\t\t\t\t\t'department_Manager' \t=> 0,\n\t\t\t\t\t'department_Icon'\t\t=> $img,\n\t\t\t\t\t'branch_ID' \t\t\t=> $this->security->xss_clean($this->input->post('branch_ID')),\n\t\t\t\t\t\n\t\t\t\t);\n\n\t\t\t\t$err_msg \t= \"Faill to insert record\";\n\t \t$succ_msg \t= \"Record inserted successfully\";\n\n\t \t$this->userM->simpleInsert($this->table,$fieldAr);\n\t \tif($this->db->affected_rows()>0){\t\t\n\t \t\t$data['success'] = true;\n\t \t\t\n\t\t\t\t}\n\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$err_msg \t= \"Faill to update record\";\n\t \t$succ_msg \t= \"Record updated successfully\";\n\t\t\t\t/* update */\n\t\t\t\t$fieldAr = array(\n\t\t\t\t\t'department_Name'\t\t=>$this->security->xss_clean($this->input->post('department_Name')),\n\t\t\t\t\t'branch_ID' \t\t\t=> $this->security->xss_clean($this->input->post('branch_ID')),\n\t\t\t\t\t'department_updated_by' => $this->data['LoginID'],\n\t\t\t\t\t'department_updated_at' => date('Y-m-d H:i:s')\t\t\t\t\t\n\t\t\t\t);\n\n\t\t\t\tif(!empty($_FILES)){\n\t\t\t\t\t$config['upload_path'] = './assets/depart_img/';\n\t\t\t $config['allowed_types'] = 'gif|jpg|png|jpeg';\t \n\n\t\t\t $this->load->library('upload', $config); \n\n\t\t\t\t\t$this->upload->do_upload('department_Icon'); \n\t\t\t \t$file_info = $this->upload->data();\n\t\t\t \t/*$img =\"https://s3.ap-south-1.amazonaws.com/images-minmegamweb/minmegam/minkanaku/purchase_bill/\".$file_info['file_name'];*/\n\t\t\t \t$img = $filename = $file_info['file_name'];\n\n\t\t\t \t$fieldAr['department_Icon'] = $img;\n\t\t\t \tunlink('./asserts/depart_img/'.$img);\n\t\t\t\t}\n\n\t\t\t\t$this->userM->updateDetails($this->table,$fieldAr,array('id'=>$this->input->post('bId')));\n\t \t\tif($this->db->affected_rows()>0)\t\t\n\t\t\t\t\t$data['success'] = true;\t\t\t\n\t\t\t}\n\n\t\t\tif($data['success'] == true){\n \t\t\n\t $this->setErrorMessage('success',$succ_msg);\n\t \n\t }else{\n\t \t\n\t $this->setErrorMessage('error_msg', $err_msg);\n\t \n \t}\n\t\t}\n\t\techo json_encode($data);\n\t}", "title": "" }, { "docid": "a3d6490a8650eede2dfae48306abc1ef", "score": "0.58990085", "text": "public function storeImage($image_template,$save_image_template) {\n\n $table_name = 'user_postcard_images';\n // store image path and date in database\n $inserted = DB::table($table_name)->insert(\n [\n 'user_id' => Auth::id(),\n 'template_image_path' => $image_template,\n\t\t\t\t'save_image_template' =>$save_image_template\n ]\n );\n\t\tif($inserted){\n\t\t\t$id = DB::getPdo()->lastInsertId();\n\t\t\treturn $id;\n\t\t}\n\t\treturn \"0\";\n }", "title": "" }, { "docid": "df8238eef2d6c9dc233b8802f82abeeb", "score": "0.5898209", "text": "public function upload_bukti_pembayaran($id_transaksi){\n if($this->session->userdata('id_level') =='1'){\n\n $config['upload_path'] = './assets/backend/images/member/bukti_pembayaran/';\n $config['allowed_types'] = 'gif|jpg|png|jpeg';\n $config['file_name'] = 'bukti_pembayaran-' . date('ymd') . '-' . substr(md5(rand()), 0, 10);\n\n $this->load->library('upload', $config);\n if (!empty($_FILES['berkas']['name'])) {\n if ($this->upload->do_upload('berkas')) {\n\n $uploadData = $this->upload->data();\n\n //Compres Foto\n $config['image_library'] = 'gd2';\n $config['source_image'] = './assets/backend/images/member/bukti_pembayaran/' . $uploadData['file_name'];\n $config['create_thumb'] = FALSE;\n $config['maintain_ratio'] = TRUE;\n $config['quality'] = '100%';\n // $config['width'] = 480;\n // $config['height'] = 640;\n\n $config['new_image'] = './assets/backend/images/member/bukti_pembayaran/' . $uploadData['file_name'];\n $this->load->library('image_lib', $config);\n $this->image_lib->resize();\n\n $item = $this->db->where('id_transaksi', $id_transaksi)->get('transaksi')->row();\n\n //replace foto lama \n if ($item->bukti_pembayaran != \"placeholder.png\") {\n $target_file = './assets/backend/images/member/bukti_pembayaran/' . $item->bukti_pembayaran;\n unlink($target_file);\n }\n\n $data['bukti_pembayaran'] = $uploadData['file_name'];\n\n $this->db->where('id_transaksi', $id_transaksi);\n $this->db->update('transaksi', $data);\n\n $url = $_SERVER['HTTP_REFERER'];\n $this->session->set_flashdata('success', 'Bukti Pembayaran Telah Diunggah');\n redirect($url);\n }\n }\n } else{\n\t\t\techo \"Anda tidak berhak mengakses halaman ini\";\n\t\t}\n }", "title": "" }, { "docid": "d261bd9fe5d6bcfff6c91fd343a96c26", "score": "0.5896578", "text": "function biller_registration() {\n\t\t$user_id = $_REQUEST['user_id'];\n\t\t$company_name = $_REQUEST['company_name'];\n\t\t$company_reg_no = $_REQUEST['company_reg_no'];\n\t\t$rc_no = $_REQUEST['rc_no'];\n\t\t$tin_no = $_REQUEST['tin_no'];\n\t\t$bussiness_phone = $_REQUEST['bussiness_phone'];\n\t\t$bussiness_address = $_REQUEST['bussiness_address'];\n\t\t$biller_name = $_REQUEST['biller_name'];\n\t\t$biller_email = $_REQUEST['biller_email'];\n\t\t$biller_category_id = $_REQUEST['biller_category_id'];\n\t\t$biller_reg_type = '2';\n\t\t$image = $_FILES['bussiness_logo']['name'];\n\t\t$current_date = date(\"Y-m-d h:i:sa\");\n\t\t$biller_status = '2';\n\t\t//--1 approved, 2- pending\n\t\tif (!empty($company_name) && ($company_reg_no) && !empty($rc_no) && !empty($tin_no) && !empty($bussiness_phone) && !empty($biller_name) && !empty($biller_name) && !empty($_FILES['bussiness_logo']['name']) && !empty($user_id)) {\n\t\t\t$biller_records = $this -> conn -> get_table_row_byidvalue('biller_details', 'biller_email', $biller_email);\n\t\t\tif (empty($biller_records)) {\n\n\t\t\t\t$user_image = '';\n\t\t\t\tif ($_FILES['bussiness_logo']['name']) {\n\t\t\t\t\t$user_image = $_FILES['bussiness_logo']['name'];\n\t\t\t\t}\n\t\t\t\t$attachment = $_FILES['bussiness_logo']['name'];\n\n\t\t\t\tif (!empty($attachment)) {\n\t\t\t\t\t$file_extension = explode(\".\", $_FILES[\"bussiness_logo\"][\"name\"]);\n\t\t\t\t\t$new_extension = strtolower(end($file_extension));\n\t\t\t\t\t$today = time();\n\t\t\t\t\t$custom_name = \"bussiness_logo\" . $today;\n\t\t\t\t\t$file_name = $custom_name . \".\" . $new_extension;\n\n\t\t\t\t\tif ($new_extension == 'png' || $new_extension == 'jpeg' || $new_extension == 'jpg' || $new_extension == 'bmp') {\n\t\t\t\t\t\tmove_uploaded_file($_FILES['bussiness_logo']['tmp_name'], \"../uploads/biller_company_logo/\" . $file_name);\n\t\t\t\t\t\t$biller_company_logo = $file_name;\n\t\t\t\t\t}\n\t\t\t\t\t$original_pass = rand('10000000', '99999999');\n\t\t\t\t\t$biller_pass = md5($original_pass);\n\t\t\t\t\t$biller_insert = $this -> conn -> insertnewrecords('biller_details', 'biller_category_id,biller_name,biller_email,company_reg_no,rc_no,tin_no,biller_address,biller_contact_no,biller_company_name,biller_company_logo,biller_created_date,biller_status,biller_reg_type,biller_password,biller_original_pass', '\"' . $biller_category_id . '\",\"' . $biller_name . '\",\"' . $biller_email . '\",\"' . $company_reg_no . '\",\"' . $rc_no . '\",\"' . $tin_no . '\",\"' . $bussiness_address . '\",\"' . $bussiness_phone . '\",\"' . $company_name . '\",\"' . $biller_company_logo . '\",\"' . $current_date . '\",\"' . $biller_status . '\",\"' . $biller_reg_type . '\",\"' . $biller_pass . '\",\"' . $original_pass . '\"');\n\n\t\t\t\t\tif (!empty($biller_insert)) {\n\t\t\t\t\t\t$data_admin['biller_id'] = $biller_insert;\n\t\t\t\t\t\t$data_admin['biller_status'] = 2;\n\t\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('user', 'user_id', $user_id, $data_admin);\n\t\t\t\t\t\t$post = array('status' => \"true\", \"message\" => \"Biller added successfully, please wait for admin approval.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"Technical server error\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$post = array('status' => \"false\", \"message\" => \"These Bussiness email already exist\");\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array('status' => \"false\", \"message\" => \"Missing parameter\", 'company_name' => $company_name, 'company_reg_no' => $company_reg_no, 'rc_no' => $rc_no, 'tin_no' => $tin_no, 'bussiness_phone' => $bussiness_phone, 'biller_name' => $biller_name, 'biller_email' => $biller_email, 'image' => $image, 'user_id' => $user_id, 'biller_category_id' => $biller_category_id);\n\t\t}\n\t\techo $this -> json($post);\n\t}", "title": "" }, { "docid": "9465e91df47e46697a74ec24bc88054a", "score": "0.5894031", "text": "public function add_image_post() {\n $itemId = $this->input->post('item_id');\n $uploadResult= $this->upload();\n if ($uploadResult['upload'] === 'ok') {\n $fileData = $uploadResult['fileData'];\n $updatePayload = array(\n 'photo' => $fileData['file_name']\n );\n $res = $this->model->update($itemId, $updatePayload);\n return $this->response(\n array(\n \"status\" => \"ok\",\n \"result\" => $res\n ),\n parent::HTTP_ACCEPTED\n );\n\n }else{\n return $this->response(\n array( 'status' => 'UPLOADING FAILED', \n 'code' => '200', \n 'message' => $uploadResult['err']), \n parent::HTTP_BAD_GATEWAY );\n }\n }", "title": "" }, { "docid": "81fb26e426a9a3f15b043844dbb96ddc", "score": "0.58888316", "text": "function sfiSave( $post_id ) {\n \n // Checks save status\n $is_autosave = wp_is_post_autosave( $post_id );\n $is_revision = wp_is_post_revision( $post_id );\n $is_valid_nonce = ( isset( $_POST[ 'sfi_nonce' ] ) && wp_verify_nonce( $_POST[ 'sfi_nonce' ], basename( __FILE__ ) ) ) ? 'true' : 'false';\n \n // Exits script depending on save status\n if ( $is_autosave || $is_revision || !$is_valid_nonce ) {\n return;\n }\n\n\t// Checks for input and saves if needed\n\tif( isset( $_POST[ 'sfi-image' ] ) ) {\n\t update_post_meta( $post_id, 'sfi-image', $_POST[ 'sfi-image' ] );\n\t}\n\n}", "title": "" }, { "docid": "2b76132b5dbca342723bbeb19963c7fa", "score": "0.58877444", "text": "public function image_import_save(ProductService $productService)\n {\n\n $supplier = Supplier::find(Auth::id()); // make sure we have a supplier object\n\n require base_path('app/Libraries/UploadHandler.php');\n $uploadHandler = new \\UploadHandler([\n 'script_url' => route('supplier_product.image_import_save'),\n 'isImageOkFunction' => function($filename) use($productService) {\n $product_id = $productService->getProductIdFromFileName($filename);\n if (!empty($product_id)) {\n return true;\n }\n return false;\n },\n 'upload_dir' => $this->getUploadDir($supplier->id),\n 'upload_url' => $this->getUploadUrl($supplier->id)\n ], true, null, function ($obj, $files) use ($supplier, $productService){\n /*\nArray\n(\n [0] => stdClass Object\n (\n [name] => rose_page2_blackbluewhite_full (8).jpg\n [size] => 33235\n [type] => image/jpeg\n [url] => http://local.buyersupplier.com/products/2/rose_page2_blackbluewhite_full%20%288%29.jpg\n [thumbnailUrl] => http://local.buyersupplier.com/products/2/thumbnail/rose_page2_blackbluewhite_full%20%288%29.jpg\n [deleteUrl] => http://local.buyersupplier.com/supplier_product_list/4/image_import_save?file=rose_page2_blackbluewhite_full%20%288%29.jpg\n [deleteType] => DELETE\n )\n\n)\n\n */\n\n $fh = fopen(\"/tmp/imageupload.log\", \"a\");\n //fwrite($fh, json_encode($files, true) . \"\\n\");\n\n\n if(is_array($files) && count($files)) {\n foreach ($files as $f) {\n $product_id = $productService->getProductIdFromFileName($f->name);\n if (!empty($product_id)) { // only create if the product is found.\n $item = MediaItem::create([\n 'filename' => $f->name,\n 'mime' => $f->type,\n 'original_filename' => $f->name,\n 'title' => '',\n 'url' => $f->url,\n 'thumbnail' => $f->thumbnailUrl,\n 'order_num' => 0,\n 'product_id' => $product_id,\n 'user_id' => $supplier->users()->first()->id,\n 'supplier_id' => $supplier->id\n ]);\n fwrite($fh, json_encode($item).\"\\n\"); // todo: remove this\n }\n else {\n if (file_exists($f->name)) {\n unlink($f->name);\n }\n }\n }\n }\n\n fclose($fh);\n\n });\n\n die;\n }", "title": "" }, { "docid": "0dfa4a6927ec897ccb95931b08f5c250", "score": "0.5886802", "text": "public function saveToDatabase() {\n foreach ($this->imageFiles as $file) {\n // save image data to database\n $this->name = strtolower($file->name);\n $this->thumbnailName = strtolower('thumbnail_' . $file->name);\n $this->size = $file->size;\n // make sure that the given record does not already exist in db\n if(!Image::find()->where(['name' => strtolower($this->name), 'size' => $this->size, 'path' => strtolower($this->path), 'type' => strtolower($this->type)])->one()) {\n $this->save();\n }\n }\n }", "title": "" }, { "docid": "8e6ce23e0ecb084c78b21eb05b535659", "score": "0.58860636", "text": "public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'Goods');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('code' , $ret['data']);\n\t\t$this->assign('msg' , $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n }", "title": "" }, { "docid": "a43d2a0039586d99130aab7e80a89560", "score": "0.58854395", "text": "public function saveItem($save,$imageName){\n // $imageName = time().\"_\".$img['image']['name'];\n $user_id = $_SESSION['user']['id'];\n $sql=\"insert into menu(user_id,restaurant_id,item_name,price,category, status, image)values($user_id,'\".$save['restaurant_id'].\"','\".$save['item_name'].\"','\".$save['price'].\"','\".$save['category'].\"', '\".$save['status'].\"', '\".$imageName .\"')\";\n //echo \"<pre>\"; print_r($target_file); die;\n $lastIndetId = null;\n if ($this->conn->query($sql) === TRUE) {\n $lastIndetId = mysqli_insert_id($this->conn);\n echo \"New record created successfully\";\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $this->conn->error;\n }\n\n return $lastIndetId;\n\n \n }", "title": "" }, { "docid": "b485f2d948817f09be6837131a7d0cfd", "score": "0.58697623", "text": "protected function uploadImage_bck()\n {\n $model = new $this->modelClass;\n\n if (Yii::$app->request->isPost) {\n $imageFile = UploadedFile::getInstance($model, 'image');\n // if no image was uploaded abort the upload\n if (empty($imageFile)) {\n return false;\n }\n // creation of file name\n $fileName = uniqid('blog_') . $imageFile->baseName . '.' . $imageFile->extension;\n // move file\n $image_up = $imageFile->saveAs('img/' . $fileName);\n\n if ($image_up) {\n return $fileName;\n }\n }\n return false;\n }", "title": "" }, { "docid": "7c3299b057e766719c03859b487faa8e", "score": "0.58686125", "text": "public function storeImage () \n {\n $model = new ProductModel;\n \n $result = FileService::storeFile($model);\n\n if($result['status'] == 0){\n return new JsonResponse($result, 422);\n }else{\n return new JsonResponse($result);\n }\n }", "title": "" }, { "docid": "153ccc1a2c9b72c5b64b0bdd0f18b861", "score": "0.58644485", "text": "public function upload_cover_image()\r\n\t{\r\n\t \t$mem_id = intval($this->uri->segment('4'));\r\n\t \t$this->data['seller'] = $this->general->get_member_names_by_member_id($mem_id);\r\n\t\tif($this->data['seller']->user_name){\r\n\t\t\t$uname = $this->data['seller']->user_name; \r\n\t\t}else{\r\n\t\t\t$uname = $this->data['seller']->name;\t\r\n\t\t}\r\n\t \r\n\t \t$this->data['jobs'] = 'Update';\r\n\t \t$this->data['error'] = FALSE;\r\n\t \r\n\t \t$this->data['image']=$this->user_model->get_image($mem_id);\r\n\t\r\n\t \t$upload_result = $this->user_model->upload_profile_images($this->data['jobs']);\r\n\t \r\n\t \tif( !empty($_FILES['cover_pic']['tmp_name']) && $upload_result == FALSE && $this->data['error'] == FALSE)\r\n {\r\n \t \t$this->user_model->update_cover_photo($mem_id);\r\n\t\t}\r\n\t\tredirect($this->general->lang_uri('/usr/'.$mem_id.\"/\".$uname),'refresh');\r\n\t\texit;\r\n\t}", "title": "" }, { "docid": "2fac8f747fa8a4edf778e6747b3c27e5", "score": "0.586434", "text": "function UploadImageFile(&$SavePath,$FileObject,$FileType)\n{\n $Message='';\n\t$Upldate=time();\n\t$savefile = 1;\n\t\n if($FileObject->name=='')\n\t{ \n\t return;\n\t}\t\n\t\n\t $FileObject->name = str_replace(\" \",\"\",$FileObject->name);\n\t $pos=strpos($FileObject->name,\".\");\n\t $SavePath=substr($FileObject->name,0,$pos);\n\t \n\t \n\tif($FileType == 'image')\n\t{\n\t\t$maxsize = IMAGESIZE;\n\t\t$extension = IMAGEEXT;\n\t}\n\telse\n\t{\n\t\t$maxsize = FILESIZE;\n\t\t$extension = FILEEXT;\n }\t\n\t\n\t//================================ Check file size ===================\n\t if($FileObject->size>$maxsize)\n\t { \n\t\t\t $savefile = 0;\n\t\t\t $Message = MAXSIZEMESSAGE;\n\t\t}\n\t\telseif($FileObject->size <= 0)\n\t\t{\n\t\t\t$savefile = 0;\n\t\t\t$Message = MINSIZEMESSAGE;\n\t\t\t\n\t\t}\n\t//================================ Check file type ===================\n\t $fileext = explode(\"/\",$FileObject->type); // Fetch the file type\n\t $extension1 = explode(\",\",$extension); // Change the string into array\n\t $filename = $FileObject->name; // Fetch the filename of posted file\n\t $pos=strrpos($FileObject->name,\".\"); \n\t $ext = strtolower(substr($FileObject->name,$pos+1)); // Acheive only file extionsion\n\t\n\n //##########################################################################\n\t $key = array_search($ext,$extension1); // Search the received extionsion in array \n \n\t if($extension1[$key] != $ext)\n\t\t {\n\t\t\t$Message = EXTMESSAGE.$extension.\" files.\";\n\t $savefile = 0;\n\t\t } \n \t\t\n\t//================================ copy file all validations are true ===================\n\t\tif($savefile == 1)\n\t\t{\n\t\t $SavePath.= time().\".\".$ext;\n\t\t $copypath = FILEPATH.$SavePath;\n\t\t \n\t\t\n\t\t\tif(is_uploaded_file($FileObject->tmp_name))\n\t\t \t{\n\t\t \t\tinclude_once(ROOT.'/lib/image.class.php');\n\t\t\t\t$img = new thumb_image;\n\t\t\t\t$img->GenerateThumbFile($FileObject->tmp_name, $copypath);\n\t\t \t\t\n\t\t\t\tif(!file_exists($copypath))\n\t\t\t\t{\n\t\t\t\t\t$Message=FAILEDCOPYMESSAGE;\n\t\t\t\t\t$SavePath = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$Message=\"File not uploaded.\";\n\t\t\t\t$SavePath = '';\n\t\t\t}\n\t\t}\n\t\t\n\treturn $Message;\n}", "title": "" }, { "docid": "f60b87edc4908b43e4dfba1693b23a9c", "score": "0.5863292", "text": "public function uploadphotoAction() {\n /**\n * Check the customer logged in\n */\n if (! Mage::getSingleton ( 'customer/session' )->isLoggedIn ()) {\n $this->_redirectUrl ( Mage::helper ( 'customer' )->getLoginUrl () );\n } else {\n $getImage = $this->getRequest ()->getParam ( 'crop' );\n $data = $getImage ['image'];\n $deleteImage = $this->getRequest ()->getParam ( 'deleteimage' );\n /**\n * Update profile image.\n */\n if (isset ( $data ) && $deleteImage != 1) {\n Mage::getModel ( 'airhotels/customerphoto' )->updateProfilePicture ( $data );\n Mage::getSingleton ( 'core/session' )->addSuccess ( $this->__ ( 'Your profile image is saved successfully' ) );\n $url = Mage::getBaseUrl () . \"property/property/uploadphoto\";\n return $this->_redirectUrl ( $url );\n }\n /**\n * Delete profile image.\n */\n if ($deleteImage == 1) {\n Mage::getModel ( 'airhotels/customerphoto' )->updateProfilePicture ();\n }\n /**\n * Load the layout and rendering the layout\n */\n $this->loadLayout ();\n /**\n * Set page title.\n */\n $this->getLayout ()->getBlock ( 'head' )->setTitle ( $this->__ ( 'Edit Profile image' ) );\n $this->renderLayout ();\n }\n }", "title": "" }, { "docid": "263b561890234767ff41fb29fa0e3ea8", "score": "0.58607274", "text": "private function uploadPhoto($p){\t\t\t\t\n\t\tinclude_once('Zend/File/Transfer/Adapter/Http.php');\n\t\tinclude_once('default/views/filters/ImageFilter.php');\t\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/car/db_selCarAd.php');\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/default/db_insVPic.php');\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/default/db_selVPic.php');\n\t\tinclude_once(System_Properties::ADMIN_MOD_PATH.'/models/default/db_delVPic.php');\n\t\t\n\t\t$return = array('r' => false);\t\n\t\t$imgCtrl = new Zend_File_Transfer_Adapter_Http();\n\t\t\n\t\t//This is the car advertisement\n\t\t//$p = $this -> carNS -> carAds;\t\t\t\n\t\tif(isset($p['carID']) && ($imgCtrl->isUploaded() == true)){\n\t\t\tif (!isset($p['carDetail'])){\n\t\t\t\t$carDetail = db_selCarAd(array('carID'=>$p['carID']));\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$carDetail = $p['carDetail'];\n\t\t\t}\n\t\t\t\n\t\t\t//Check if car advertisement exists\n\t\t\tif (($carDetail != false) && (count($carDetail) == 1)){\n\t\t\t\t$carDetail = $carDetail[0];\n\t\t\t\t$carID = $carDetail['carID'];\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$vPicID = db_insVPic(array(\t'vType' => System_Properties::CAR_ABRV\n\t\t\t\t\t\t\t\t\t \t\t, 'vID' => $carID\n\t\t\t\t\t\t\t\t\t\t\t, 'vPicTMP' => '1'\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\tif (($vPicID != false) && is_numeric($vPicID)){\t\t\n\t\t\t\t\t$imgCtrl -> setOptions(array('useByteString' => false));\n\t\t\t\t\t$imgCtrl -> addValidator('FilesSize', false, System_Properties::PIC_FILE_SIZE);\n\t\t\t\t\t$imgCtrl -> addValidator('Extension', false, System_Properties::$PIC_EXT);\n\t\t\t\t\t\n\t\t\t\t\t//$imgHash = session_id().'_'.$imgCtrl -> getHash();\n\t\t\t\t\t$destURI = System_Properties::PIC_PATH.'/'.System_Properties::CAR_ABRV.'_'.$carID.'_'.$vPicID.'.jpeg';\t\t\t\t\n\t\t\t\t\t$imgCtrl -> addFilter('Rename', array('target' => '.'.$destURI, 'overwrite' => true));\n\t\t\t\t\t\n\t\t\t\t\t//$mimeTypeDetails = explode('/',$imgCtrl -> getMimeType());\n\t\t\t\t\t$mimeTypeDetails = explode('.', basename($imgCtrl -> getFileName()));\n\t\t\t\t\t$mimeTypeDetails = $mimeTypeDetails[1];\n\t\t\t\t\t$imgFilter = new ImageFilter(array(\t'imgTrgWidth' => System_Properties::PIC_SIZE_W,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'imgTrgHeight' => System_Properties::PIC_SIZE_H,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'imgSrcExtension' => $mimeTypeDetails));\n\t\t\t\t\t$imgCtrl -> addFilter($imgFilter);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Upload photo\n\t\t\t\t\t//if ($imgCtrl -> isUploaded() && $imgCtrl -> isValid()){\n\t\t\t\t\t//if (!isset($this -> carNS -> carPhoto[$imgHash]) && $imgCtrl -> receive()){\t\n\t\t\t\t\tif (in_array(strtolower($mimeTypeDetails), System_Properties::$PIC_EXT) \n\t\t\t\t\t\t&& ($imgCtrl -> receive())){\n\t\t\t\t\t\t$carPhoto = db_selVPic(array('vPicID' => $vPicID\n\t\t\t\t\t\t\t\t\t\t\t\t\t, 'vPicTMP' => '1'\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\tif($carPhoto != false){\n\t\t\t\t\t\t\t$carPhoto = $carPhoto[0];\n\t\t\t\t\t\t\t$carPhoto['destURI'] = $destURI;\n\t\t\t\t\t\t\t$carPhoto['vPicNew'] = true;\n\t\t\t\t\t\t\t$return['r'] = true;\n\t\t\t\t\t\t\t$return['carPhoto'] = $carPhoto;\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tdb_delVPic(array('vPicID'=>$vPicID));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $return;\t\t\n\t}", "title": "" }, { "docid": "7d825c96fae07c763bbf83a9b613a18d", "score": "0.58587855", "text": "function save_provided_file($file_data) {\n global $wpdb;\n $accepted_file_types['mime'][] = 'image/jpeg';\n $accepted_file_types['mime'][] = 'image/gif';\n $accepted_file_types['mime'][] = 'image/png';\n\n $accepted_file_types['mime'][] = 'image/pjpeg'; // Added for IE compatibility\n $accepted_file_types['mime'][] = 'image/x-png'; // Added for IE compatibility\n\n\n $accepted_file_types['ext'][] = 'jpeg';\n $accepted_file_types['ext'][] = 'jpg';\n $accepted_file_types['ext'][] = 'gif';\n $accepted_file_types['ext'][] = 'png';\n\n\n $can_have_uploaded_image = get_product_meta($this->product_id,'product_metadata',true);\n $product = get_post($this->product_id);\n if(0 != $product->post_parent ){\n $product = get_post($product->post_parent);\n $can_have_uploaded_image = get_product_meta($product->ID,'product_metadata',true);\n }\n $can_have_uploaded_image = $can_have_uploaded_image['can_have_uploaded_image'];\n if ('on' == $can_have_uploaded_image || 1 == $can_have_uploaded_image) {\n $name_parts = explode('.',basename($file_data['name']));\n $extension = array_pop($name_parts);\n\n if(( (array_search($file_data['type'], $accepted_file_types['mime']) !== false) || (get_option('wpsc_check_mime_types') == 1) ) && (array_search($extension, $accepted_file_types['ext']) !== false) ) {\n\n if(is_file(WPSC_USER_UPLOADS_DIR.$file_data['name'])) {\n $name_parts = explode('.',basename($file_data['name']));\n $extension = array_pop($name_parts);\n $name_base = implode('.',$name_parts);\n $file_data['name'] = null;\n $num = 2;\n // loop till we find a free file name, first time I get to do a do loop in yonks\n do {\n $test_name = \"{$name_base}-{$num}.{$extension}\";\n if(!file_exists(WPSC_USER_UPLOADS_DIR.$test_name))\n $file_data['name'] = $test_name;\n $num++;\n } while ($file_data['name'] == null);\n }\n\n $unique_id = sha1(uniqid(rand(),true));\n if(move_uploaded_file($file_data['tmp_name'], WPSC_USER_UPLOADS_DIR.$file_data['name']) )\n $this->custom_file = array(\n 'file_name' => $file_data['name'],\n 'mime_type' => $file_data['type'],\n 'unique_id' => $unique_id\n );\n\n }\n }\n }", "title": "" }, { "docid": "ba5e86fc7cbef3184e739e07a69158d3", "score": "0.5857644", "text": "public function productimages() {\n\n $this->checkPlugin();\n\n if ( $_SERVER['REQUEST_METHOD'] === 'POST' ){\n //upload and save image\n if (!empty($this->request->get['other']) && $this->request->get['other'] == 1) {\n $this->addProductImage($this->request);\n } else {\n $this->updateProductImage($this->request);\n }\n }\n }", "title": "" }, { "docid": "242a9088243b04e72d88c16f02b68039", "score": "0.5857279", "text": "function uploadCoverImageForUser($userData)\n\t\t{\n\t\t\t//takes the image size\n\t\t\t$img = getimagesize('../temp/'.$userData['imagename']);\n\t\t\t//print_r($img);\n\t\t\t//gets the image extension\n\t\t\t$ext = pathinfo('../temp/'.$userData['imagename'], PATHINFO_EXTENSION);\n\t\t\n\t\t\t$responsiveWidth = $userData['width'];\n\t\t\t$responsiveHeight = $userData['height'];\n\t\t\t\n\t\t\t$actualWidth = $img[0];\n\t\t\t$actualHeight = $img[1];\n\t\t\t\n\t\t\t$xCoordinate = ($actualWidth/$responsiveWidth)*$userData['xcordinate'];\n\t\t\t$yCoordinate = ($actualHeight/$responsiveHeight)*$userData['ycordinate'];\n\t\t\t\n\t\t\t\n\t\t\t$targ_w = ($actualWidth/$responsiveWidth)*300;\n\t\t\t$targ_h = ($actualHeight/$responsiveHeight)*300;\n\t\t\t\n\t\t\t\n\t\t\t$jpeg_quality = 90;\n\t\t\t$png_quality = 9;\n\t\t\t\n\t\t\t$src = '../temp/'.$userData['imagename'];\n\t\t\t\n\t\t\t\n\t\t\tif($ext == 'png') {\n\t\t\t\t$img_r = imagecreatefrompng($src);\n\t\t\t\t$dst_r = ImageCreateTrueColor( $targ_w, $targ_h );\n\t\t\t\timagecopyresampled($dst_r,$img_r,0,0,$xCoordinate,$yCoordinate,$targ_w,$targ_h,$targ_w,$targ_h);\n\t\t\t\t//save image in admin panel\n\t\t\t\t//imagepng($dst_r,'../../img/product'.$GLOBALS['_POST']['imagename'], $png_quality);\n\t\t\t\t//save image in ui product folder\n\t\t\t\timagepng($dst_r,'../files/cov-image/'.$userData['imagename'], $png_quality);\n\t\t\t\t\n\t\t\t\t//save the product image into the database\n\t\t\t\t$this->saveUserPic($userData['imagename'],'cov');\n\t\t\t}\n\t\t\telse if($ext == 'jpeg' ) {\n\t\t\t\t$img_r = imagecreatefromjpeg($src);\n\t\t\t\t$dst_r = ImageCreateTrueColor( $targ_w, $targ_h );\n\t\t\t\timagecopyresampled($dst_r,$img_r,0,0,$xCoordinate,$yCoordinate,$targ_w,$targ_h,$targ_w,$targ_h);\n\t\t\t\t//save image in admin panel\n\t\t\t\t//imagejpeg($dst_r,'../../img/product'.$GLOBALS['_POST']['imagename'], $jpeg_quality);\n\t\t\t\t//save image in ui product folder\n\t\t\t\timagejpeg($dst_r,'../files/cov-image/'.$userData['imagename'], $jpeg_quality);\n\t\t\t\t\n\t\t\t\t//save the product image into the database\n\t\t\t\t$this->saveUserPic($userData['imagename'],'cov');\n\t\t\t}\n\t\t\telse if($ext == 'jpg') {\n\t\t\t\t$img_r = imagecreatefromjpeg($src);\n\t\t\t\t$dst_r = ImageCreateTrueColor( $targ_w, $targ_h );\n\t\t\t\timagecopyresampled($dst_r,$img_r,0,0,$xCoordinate,$yCoordinate,$targ_w,$targ_h,$targ_w,$targ_h);\n\t\t\t\t//save image in admin panel\n\t\t\t\t//imagejpeg($dst_r,'../../img/product'.$GLOBALS['_POST']['imagename'], $jpeg_quality);\n\t\t\t\t//save image in ui product folder\n\t\t\t\timagejpeg($dst_r,'../files/cov-image/'.$userData['imagename'], $jpeg_quality);\n\t\t\t\t\n\t\t\t\t//save the product image into the database\n\t\t\t\t$this->saveUserPic($userData['imagename'],'cov');\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "144e4043f1c92b5fe5d431c27416472f", "score": "0.5851698", "text": "public function actionUploadify() {\n\n// Define a destination\n\n $targetFolder = Yii::app()->baseUrl . '/assets/icon_system'; // Relative to the root\n\n $verifyToken = md5('unique_salt' . $_POST['timestamp']);\n\n if (!empty($_FILES) && $_POST['token'] == $verifyToken) {\n $tempFile = $_FILES['Filedata']['tmp_name'];\n $targetPath = $_SERVER['DOCUMENT_ROOT'] . $targetFolder;\n $targetFile = rtrim($targetPath, '/') . '/' . $_FILES['Filedata']['name'];\n\n // Validate the file type\n $fileTypes = array('jpg', 'jpeg', 'gif', 'png'); // File extensions\n $fileParts = pathinfo($_FILES['Filedata']['name']);\n\n if (in_array($fileParts['extension'], $fileTypes)) {\n $columns = array('icon' => $_FILES['Filedata']['name']);\n Yii::app()->db->createCommand()\n ->insert(\"sys_report_icon\", $columns);\n move_uploaded_file($tempFile, $targetFile);\n echo '1';\n } else {\n echo 'Invalid file type.';\n }\n }\n }", "title": "" }, { "docid": "367bcfba13e0a53e829d970c23631b3e", "score": "0.58488333", "text": "public function handler()\n {\n $this->resizeImage(64, 64, false)->saveImage($this->getPath())\n ->resizeImage(32, 32, false)->saveImage($this->getPath(true));\n\n $this->updateProfilePicture($this->createDatabaseRecord());\n\n return true;\n }", "title": "" }, { "docid": "8b84b75ac088d0bf54a56c3548c7268a", "score": "0.58470106", "text": "public function saveImage(Image $image);", "title": "" }, { "docid": "1c361d6685614874af0af07f6cd10f66", "score": "0.5840826", "text": "public function imageUpload(){\n\t\tif(Input::hasFile('file') ){\t\n\t\t\t$extension \t=\t Input::file('file')->getClientOriginalExtension();\n\t\t\t$fileName\t=\t Auth::user()->_id.rand().time().'markeplace_image.'.$extension;\n\t\t\tif(Input::file('file')->move(MARKET_PLACE_IMAGE_ROOT_PATH, $fileName)){\n\t\t\t\t$saveData\t\t\t\t\t=\tarray();\n\t\t\t\t$saveData[]\t\t\t\t\t=\t$fileName;\n\t\t\t\tif(Session::has('marketplace_image_array')){\n\t\t\t\t\t$sessionData\t\t\t=\tSession::get('marketplace_image_array');\n\t\t\t\t\t$saveData \t\t\t\t=\tarray_merge_recursive($saveData,$sessionData);\n\t\t\t\t}\n\t\t\t\tSession::put('marketplace_image_array',$saveData);\n\t\t\t\tif(Session::has('markeplace_count')){\n\t\t\t\t\t$count = Session::get('marketplace_count');\n\t\t\t\t\t$count++;\n\t\t\t\t}else{\n\t\t\t\t\t$count = 1;\n\t\t\t\t}\n\t\t\t\tSession::put('marketplace_count',$count);\n\t\t\t\t$responseData = array();\n\t\t\t\t$responseData['name'] \t= $fileName;\n\t\t\t\t$responseData['id'] \t= time()+rand();\n\t\t\t\treturn Response::json($responseData);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4781457d14f3d1dde7aecd9f1bc7f510", "score": "0.58359015", "text": "public function add_save()\n\t{\n\t\tif (!$this->is_allowed('store_add', false)) {\n\t\t\techo json_encode([\n\t\t\t\t'success' => false,\n\t\t\t\t'message' => cclang('sorry_you_do_not_have_permission_to_access')\n\t\t\t\t]);\n\t\t\texit;\n\t\t}\n\n\t\t$this->form_validation->set_rules('STATUT', 'STATUT', 'trim|required');\n\t\t$this->form_validation->set_rules('NAME', 'NAME', 'trim|required|max_length[50]');\n\t\t$this->form_validation->set_rules('DESCRIPTION', 'DESCRIPTION', 'trim|max_length[200]');\n\t\t\n\n\t\tif ($this->form_validation->run()) {\n\t\t\t$store_IMAGE_uuid = $this->input->post('store_IMAGE_uuid');\n\t\t\t$store_IMAGE_name = $this->input->post('store_IMAGE_name');\n\t\t\n\t\t\t$save_data = [\n\t\t\t\t'STATUT_STORE' => $this->input->post('STATUT'),\n\t\t\t\t'NAME_STORE' => $this->input->post('NAME'),\n\t\t\t\t'DESCRIPTION_STORE' => $this->input->post('DESCRIPTION'),\n\t\t\t\t'DATE_CREATION_STORE' => date('Y-m-d H:i:s'),\n\t\t\t\t'AUTHOR_STORE' => get_user_data('id'),\t\t\t];\n\n\t\t\tif (!is_dir(FCPATH . '/uploads/store/')) {\n\t\t\t\tmkdir(FCPATH . '/uploads/store/');\n\t\t\t}\n\n\t\t\tif (!empty($store_IMAGE_name)) {\n\t\t\t\t$store_IMAGE_name_copy = date('YmdHis') . '-' . $store_IMAGE_name;\n\n\t\t\t\trename(FCPATH . 'uploads/tmp/' . $store_IMAGE_uuid . '/' . $store_IMAGE_name, \n\t\t\t\t\t\tFCPATH . 'uploads/store/' . $store_IMAGE_name_copy);\n\n\t\t\t\tif (!is_file(FCPATH . '/uploads/store/' . $store_IMAGE_name_copy)) {\n\t\t\t\t\techo json_encode([\n\t\t\t\t\t\t'success' => false,\n\t\t\t\t\t\t'message' => 'Error uploading file'\n\t\t\t\t\t\t]);\n\t\t\t\t\texit;\n\t\t\t\t}\n\n\t\t\t\t$save_data['IMAGE_STORE'] = $store_IMAGE_name_copy;\n\t\t\t}\n\t\t\n\t\t\t\n\t\t\t$save_store = $this->model_store->store($save_data);\n\n\t\t\tif ($save_store) {\n\t\t\t\tif ($this->input->post('save_type') == 'stay') {\n\t\t\t\t\t$this->data['success'] = true;\n\t\t\t\t\t$this->data['id'] \t = $save_store;\n\t\t\t\t\t$this->data['message'] = cclang('success_save_data_stay', [\n\t\t\t\t\t\tanchor('administrator/store/edit/' . $save_store, 'Edit Pos Ibi Stores'),\n\t\t\t\t\t\tanchor('administrator/store', ' Go back to list')\n\t\t\t\t\t]);\n\t\t\t\t} else {\n\t\t\t\t\tset_message(\n\t\t\t\t\t\tcclang('success_save_data_redirect', [\n\t\t\t\t\t\tanchor('administrator/store/edit/' . $save_store, 'Edit Pos Ibi Stores')\n\t\t\t\t\t]), 'success');\n\n \t\t$this->data['success'] = true;\n\t\t\t\t\t$this->data['redirect'] = base_url('administrator/store');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($this->input->post('save_type') == 'stay') {\n\t\t\t\t\t$this->data['success'] = false;\n\t\t\t\t\t$this->data['message'] = cclang('data_not_change');\n\t\t\t\t} else {\n \t\t$this->data['success'] = false;\n \t\t$this->data['message'] = cclang('data_not_change');\n\t\t\t\t\t$this->data['redirect'] = base_url('administrator/store');\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t$this->data['success'] = false;\n\t\t\t$this->data['message'] = validation_errors();\n\t\t}\n\n\t\techo json_encode($this->data);\n\t}", "title": "" }, { "docid": "06ea60f1d85ff580b5f471110d1a67e9", "score": "0.5835212", "text": "public function save() {\n \n $checkError = $this->isError();\n if (!$checkError) {\n \n $ext = $this->getImageExt();\n $quality = $this->__imageQuality;\n $dirSavePath = dirname($this->__imageSavePath);\n \n if (empty($this->__imageSavePath) || !is_dir($dirSavePath)) {\n $this->setError(__d('cloggy','Image save path not configured or maybe not exists.'));\n } else { \n \n /*\n * create resized image\n */\n switch($ext) {\n \n case 'jpg':\n case 'jpeg':\n\n if (imagetypes() & IMG_JPG) {\n @imagejpeg($this->__imageResized,$this->__imageSavePath,$quality); \n }\n\n break;\n\n case 'gif':\n\n if (imagetypes() & IMG_GIF) {\n @imagegif($this->__imageResized,$this->__imageSavePath); \n }\n\n break;\n\n case 'png':\n\n $scaleQuality = round($this->__imageQuality/100) * 9;\n $invertScaleQuality = 9 - $scaleQuality;\n\n if (imagetypes() & IMG_PNG) {\n @imagepng($this->__imageResized,$this->__imageSavePath,$invertScaleQuality); \n }\n\n break;\n\n } \n \n } \n \n /*\n * destroy resized image\n */\n if ($this->__imageResized) {\n \n //destroy resized image\n imagedestroy($this->__imageResized);\n \n } \n \n }\n \n }", "title": "" }, { "docid": "b5c1e3612eb503068d7e198710f9d6d6", "score": "0.58318067", "text": "public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'gou_brand');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('code' , $ret['data']);\n\t\t$this->assign('msg' , $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}", "title": "" }, { "docid": "43e12715888945c80592529785b121b1", "score": "0.5826", "text": "public function store(Request $request) {\n\n $this->validate($request,[\n 'deposit_type'=>'required',\n 'bank_po_name'=>'required', \n 'fd_amount'=>'required', \n 'fd_no'=>'required', \n 'annual_interest_rate'=>'required', \n 'is_fd_mandatory'=>'required', \n 'open_date'=>'required', \n 'maturity_date'=>'required', \n 'file'=>'nullable|image|mimes:jpeg,png,jpg|max:4000', \n ]);\n\n $UnEncumberedDeposit = new UnEncumberedDeposit;\n \n $UnEncumberedDeposit->deposit_type = $request->deposit_type;\n $UnEncumberedDeposit->bank_po_name = $request->bank_po_name;\n $UnEncumberedDeposit->fd_amount = $request->fd_amount;\n $UnEncumberedDeposit->fd_no = $request->fd_no;\n $UnEncumberedDeposit->address = $request->address;\n $UnEncumberedDeposit->is_fd_mandatory = $request->is_fd_mandatory?1:0;\n $UnEncumberedDeposit->annual_interest_rate = $request->annual_interest_rate;\n $UnEncumberedDeposit->open_date = Carbon::parse($request->open_date)->format('Y-m-d');\n $UnEncumberedDeposit->maturity_date = Carbon::parse($request->maturity_date)->format('Y-m-d');\n\n if($request->hasFile('file')){\n $image_name = time().\".\".$request->file('file')->getClientOriginalExtension();\n $image = $request->file('file')->storeAs('UnEncumberedDeposit', $image_name);\n $UnEncumberedDeposit->file = 'storage/'.$image;\n } \n\n if($UnEncumberedDeposit->save()){ \n return redirect()->route('admin.'.request()->segment(2).'.index')->with(['class'=>'success','message'=>'UnEncumberedDeposit Created successfully.']);\n }\n\n return redirect()->back()->with(['class'=>'error','message'=>'Whoops, looks like something went wrong ! Try again ...']);\n }", "title": "" }, { "docid": "48fff0a172b3d63e99c6e65ff9f2a63a", "score": "0.5821068", "text": "function uploadCorpProfilePic($arrArgs = array()) {\r\n $_SESSION ['profilepic']=\"\";\r\n $valid_file = true;\r\n print_r($_FILES);\r\n if ($_FILES ['myfile'] ['name']) {\r\n $allowedExts = array (\r\n \"gif\",\r\n \"jpg\",\r\n \"png\",\r\n \"jpeg\"\r\n );\r\n $namess = \"name\";\r\n $extension = end ( explode ( \".\", @$_FILES [\"myfile\"] [\"name\"] ) );\r\n if (in_array ( $extension, $allowedExts )) {\r\n if (! $_FILES ['myfile'] ['error']) {\r\n $new_file_name = strtolower ( $_FILES ['myfile'] ['tmp_name'] ); // rename\r\n // file\r\n if ($_FILES ['myfile'] ['size'] > (1024000)) // can't be larger\r\n // than 1 MB\r\n {\r\n $valid_file = false;\r\n $_SESSION ['profilepic'] .= 'Oops! Your file\\'s size is to large.';\r\n }\r\n if ($valid_file) {\r\n \r\n $target_path = \"data/photo/profilepic/\";\r\n \r\n $target_path = $target_path . \"profile\" . $_SESSION ['id'] . basename ( $_FILES ['myfile'] ['name'] );\r\n \r\n if (move_uploaded_file ( $_FILES ['myfile'] ['tmp_name'], $target_path )) {\r\n $data = array (\r\n 'user_id' => strip_tags ( $_SESSION ['id'] ),\r\n 'photo_name' => \"profilePic\",\r\n 'path' => $target_path\r\n );\r\n $result = $this->db->insert ( \"photo\", $data );\r\n if ($result && $result->rowCount () > 0) {\r\n $lastId = $this->db->lastInsertId ();\r\n $data=array(\"profile_pic_id\"=>$lastId);\r\n $condition=array(\"user_id\"=>$_SESSION['id']);\r\n $result = $this->db->update ( \"personal_profile\", $data,$condition );\r\n $result = $this->db->update ( \"corporate_profile\", $data,$condition );\r\n echo \"Updated\";\r\n } else {\r\n return false;\r\n }\r\n $_SESSION ['profilepic'] .= \"Your Profile Pic is Changed Sucessfully\";\r\n } else {\r\n $_SESSION ['profilepic'] .= \"There was an error uploading the file, please try again!\";\r\n }\r\n }\r\n }\r\n \r\n else {\r\n // set that to be the returned message\r\n $message = 'Ooops! Your upload error';\r\n }\r\n } else {\r\n $_SESSION ['profilepic'] .= \"Please Put a valid Extension\";\r\n }\r\n }\r\n }", "title": "" }, { "docid": "4b04311da0177352802b2c203aea20ef", "score": "0.58205444", "text": "public function store(Request $request)\n {\n $data = $request->all();\n $data['id_partner'] = $this->id_partner;\n if(!empty($data['photo1'])){\n $from = $_SERVER['DOCUMENT_ROOT'] . '/temp/'.$data['photo1'];\n $to = $_SERVER['DOCUMENT_ROOT'] . '/uploads/tasks/'.$data['photo1'];\n $to_mini = $_SERVER['DOCUMENT_ROOT'] . '/uploads/tasks/small/'.$data['photo1'];\n\n // Вызываем класс\n $img = new SimpleImage();\n $img->load($from);\n $img->fit_to_width(900); // В аргумент ширину картинки, которая нужна(Она пропорц. уменьш.)\n $img->save($to);\n $img->adaptive_resize(227, 140);\n $img->save($to_mini);\n unlink($from);\n $data['image'] = $data['photo1'];\n unset($data['photo1']);\n }\n $title = $data['title'];\n $text = $data['text'];\n $id_type = $data['id_type'];\n $related_works = $data['related_works'];\n $image = $data['image'];\n $id_partner = $this->id_partner;\n $current_time = date(\"Y-m-d H:i:s\");\n $lastInsertId = DB::table('tasks')->insertGetId([\n 'title' => $title, 'text' => $text, 'id_partner' => $id_partner, 'image' => $image, 'created_at' => $current_time,\n 'related_works' => $related_works, 'id_type' => $id_type\n ]);\n $result = DB::select(\"SELECT * FROM task_details WHERE id_task=$lastInsertId\");\n if(isset($data['task_variant1'])){\n // деньги\n $count = $data['money'];\n if ($count < 1) {\n $count = 1;\n }\n\n for ($i = 1; $i <= $count; $i++) {\n $amount = $data['amount'.$i];\n $count_type = $data['count' . $i];\n if($result){\n DB::update(\"UPDATE task_details SET amount=$amount,count=$count_type WHERE id_task=$lastInsertId\");\n }else{\n DB::insert(\"INSERT INTO task_details (id_task,amount,count,created_at) VALUES('$lastInsertId','$amount','$count_type','$current_time')\");\n }\n }\n }\n if(isset($data['task_variant2'])){\n // подарками\n $count = $data['gift'];\n if ($count < 1) {\n $count = 1;\n }\n for ($i = 1; $i <= $count; $i++) {\n $gift_name = $data['gift_name'.$i];\n $gift_count = $data['gift_count' . $i];\n if($result){\n DB::update(\"UPDATE task_details SET gift_name=$gift_name,gift_count=$gift_count WHERE id_task=$lastInsertId\");\n }else{\n DB::insert(\"INSERT INTO task_details (id_task,gift_name,gift_count,created_at) VALUES('$lastInsertId','$gift_name','$gift_count','$current_time')\");\n }\n }\n }\n return redirect('partner/task')->with('message', 'Успешно добавлен');\n }", "title": "" }, { "docid": "3dbbd67fc1069272aef302e234f21e58", "score": "0.5819771", "text": "public function adminImageUploadSave(Request $request)\n {\n\n $file = $request->file('logo');\n $fileArray = array('image' => $file);\n\n // Tell the validator that this file should be an image\n $rules = array(\n 'image' => 'mimes:jpeg,jpg,png,gif|required|max:10000' // max 10000kb\n );\n // Now pass the input and rules into the validator\n $validator = Validator::make($fileArray, $rules);\n\n // Check to see if validation fails or passes\n if ($validator->fails())\n {\n // Redirect or return json to frontend with a helpful message to inform the user\n // that the provided file was not an adequate type\n //return response()->json(['error' => $validator->errors()->getMessages()], 400);\n Session::flash('error', $validator->messages()->first());\n return redirect()->back()->withInput();\n }\n\n /* $image_url = fileUpload($file,path_image(),allSetting()['COMPANY_LOGO']);\n return $image_url;*/\n\n try{\n if(isset($request->logo))\n {\n $id=Setting::where('slug','COMPANY_LOGO')->first();\n $old_image = \"\";\n if(isset($id))\n {\n $old_image = $id->value;\n }\n Setting::updateOrCreate(['slug'=>'COMPANY_LOGO'],['slug'=>'COMPANY_LOGO','value'=>fileUpload($request['logo'],path_image(),$old_image)]);\n }\n\n return redirect()->back()->with(['successImage'=>__('Updated Successfully.')]);\n\n }catch (\\Exception $e){\n return redirect()->back()->with(['dissmissImage'=>__('Nothing To Update')]);\n\n }\n\n }", "title": "" }, { "docid": "5634b423b9f4c1498c3a2feb74578055", "score": "0.5808421", "text": "public function update_avatar(){\n if($this->input->post('form_submit')){\n $image = $this->input->post('image');\n $user_id = (int) $this->session->userdata('id');\n\n $data = array(\n \t'image' => $image\n );\n\n $isUpdate = $this->User_model->save($data, $user_id);\n if ($isUpdate) {\n \techo json_encode(array('success' => TRUE));\n }else{\n \techo json_encode(array('success' => FALSE));\n }\n\n }else{\n echo json_encode(array('error' => 'post parameters missing'));\n }\n }", "title": "" }, { "docid": "a8044c21cb3fd82d0f54e28f88e33945", "score": "0.5805284", "text": "public function updatebanner(){\n\t\tif(isset($_POST['submit'])){\n\n\t\t\tif (isset($_FILES['file']['name'])){\n\t\t\t\t$type = $this->input->post('type');\n\t\t\t\t \t$file_name = $_FILES['file']['name'];\n\t\t\t $file_size = $_FILES['file']['size'];\n\t\t\t $tmp_file = $_FILES['file']['tmp_name'];\n\t\t\t $valid_file_formats = array(\"jpg\",\"jpeg\", \"JPEG\");\n\t\t\t $fileext = strtolower(pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION));\n\t\t\t if ($file_name) {\n\t\t\t \tif (in_array($fileext, $valid_file_formats)) {\n\t\t\t \t\t if ($file_size < (10024 * 10024)) {\n\t\t\t \t\t \t$new_image_name = time() . \".\" . $fileext;\n \t\t\t\t $imgpath = $type == 'cover' ? $_SERVER['DOCUMENT_ROOT'] . '/assets/ad_image/' :$_SERVER['DOCUMENT_ROOT'] . '/assets/ad_image/';\n \t\t\t\t move_uploaded_file($tmp_file,$imgpath.$new_image_name);\n \t\t\t\t // echo $imgpath.$new_image_name; die;\n \t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t \t\t }\n\t\t\t \t}\n\t\t\t }\n\t\t\t $img = '/assets/ad_image/'.$new_image_name;\n\t\t\t }\n\t\t\t else{\n\t\t\t \t\t$img = $this->input->post('imagefile');\n\t\t\t }\n\t \t$data=array(\n\t \t\t'id' => $this->input->post('id'),\n\t\t\t \t'banner_name' => $this->input->post('banner_name'),\n\t\t\t \t'main_heading' => $this->input->post('main_heading'),\n\t\t\t \t'sub_heading' => $this->input->post('sub_heading'),\n\t\t\t \t'status' => 1,\n\t\t\t \t'image_path' => $img,\n\t\t\t \t'is_deleted' => 0,\n\t\t\t \t'create_date' => date('Y-m-d'),\n\n\t\t\t );\n\t\t\t //echo \"<pre>\"; print_r($data);exit;\n\t\t\t $this->Banner_model->update_banner($data);\n\t\t\t redirect('admin/banner','refresh');\n\t\t\t\t exit();\n\n\t\t}\n\t}", "title": "" } ]
3cbe4b49120056fdc76b026c06cd0675
Create a new command instance.
[ { "docid": "beeda352e37e57573722143269c99118", "score": "0.0", "text": "public function __construct()\n {\n parent::__construct();\n }", "title": "" } ]
[ { "docid": "3ec578a34bc966775f076e19385d63c3", "score": "0.8010746", "text": "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "title": "" }, { "docid": "4033df56668f391431b94c9b9ade55db", "score": "0.7333379", "text": "public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}", "title": "" }, { "docid": "d1f8b9b9e7ebb28fc059803273a2baa8", "score": "0.72606754", "text": "public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}", "title": "" }, { "docid": "a831dbcfb32ecc0b0fab18e7ff4646aa", "score": "0.7164165", "text": "protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }", "title": "" }, { "docid": "ba67450bd5739e2367b72e9a507d2f22", "score": "0.716004", "text": "static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }", "title": "" }, { "docid": "c898cd2bc9edef6e65df6928e1265b4b", "score": "0.7137585", "text": "public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;", "title": "" }, { "docid": "25f7183b60c9d266d14d2f37c4dce883", "score": "0.6748632", "text": "public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }", "title": "" }, { "docid": "c46f83fa76b75873c0c52555789c2126", "score": "0.67234164", "text": "public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }", "title": "" }, { "docid": "b30e78609364661a23e2207708fd80e9", "score": "0.67178184", "text": "public function command(Command $command);", "title": "" }, { "docid": "dc9b75b262623b0130f821cc5ff6603b", "score": "0.6697025", "text": "public function __construct($command)\n {\n $this->command = $command;\n }", "title": "" }, { "docid": "5eccbd0a95ef6c192ea00ede70394a15", "score": "0.6677973", "text": "public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }", "title": "" }, { "docid": "ef4ff4185962db1dbddecd2045ac8716", "score": "0.66454077", "text": "protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }", "title": "" }, { "docid": "cf7e4e97afba13cc6befc673559c03b5", "score": "0.65622073", "text": "public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }", "title": "" }, { "docid": "02a8436ce1e58fb3fe1743a4bf43a67b", "score": "0.65437883", "text": "public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }", "title": "" }, { "docid": "db19771d5b486f5c99a4d179ecea8ae3", "score": "0.64838654", "text": "public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }", "title": "" }, { "docid": "c76dcca1e258ea526c29508d16d9d77f", "score": "0.64696646", "text": "public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;", "title": "" }, { "docid": "7af2f9e5587af14dd17b2a47b44cf1e4", "score": "0.64292693", "text": "private function _getCommandByClassName($className)\n {\n return new $className;\n }", "title": "" }, { "docid": "d98c7c16751338843cbccdf0349a663d", "score": "0.6382209", "text": "public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }", "title": "" }, { "docid": "770d5d95e4dc8c447f0e9d2fbbe64197", "score": "0.6378306", "text": "public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }", "title": "" }, { "docid": "b089b3eea70b11576d6f8938543dcbe0", "score": "0.63773245", "text": "private function __construct($command = null)\n {\n $this->command = $command;\n }", "title": "" }, { "docid": "46801fe1014ca2d42cadf17bd5169862", "score": "0.6315901", "text": "public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }", "title": "" }, { "docid": "4d80b05b6db91fd2e779bb1e4a852651", "score": "0.6248427", "text": "public function getCommand() {}", "title": "" }, { "docid": "cd0541a1d6ee043939b938491a8646a3", "score": "0.6241929", "text": "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }", "title": "" }, { "docid": "230678841befa6a3b64ba4d72cfd981e", "score": "0.6194334", "text": "public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }", "title": "" }, { "docid": "a9b2d0e11c1ccdd9b788af29e0254e54", "score": "0.6081284", "text": "public function getCommand();", "title": "" }, { "docid": "1ccf2ac6fc7285ccd1ccdc8a29d303b8", "score": "0.6075819", "text": "protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }", "title": "" }, { "docid": "8199f01b536824b699803bcde8dafdd2", "score": "0.6069913", "text": "public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }", "title": "" }, { "docid": "9d869e5104a5f09eb26011a9cf0ef325", "score": "0.60685146", "text": "public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }", "title": "" }, { "docid": "674fc54621aa8f564d6c7a092b4c7414", "score": "0.6055616", "text": "public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }", "title": "" }, { "docid": "cf65e19bb1196d9ed922c8f7c62e27cd", "score": "0.6027874", "text": "public function getCommand()\n {\n }", "title": "" }, { "docid": "c3a0b384ace93596fd7f35391a8fdad7", "score": "0.60132784", "text": "public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }", "title": "" }, { "docid": "90fa589511adfc11a20c9dbb5259c84e", "score": "0.60118896", "text": "protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }", "title": "" }, { "docid": "74b5449cbf7c26b75dd82d0fae69f6b9", "score": "0.6011778", "text": "public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}", "title": "" }, { "docid": "a423422220f9f9e6ffbc4d6e4b415342", "score": "0.5969603", "text": "public function addCommand($command);", "title": "" }, { "docid": "2fa3643df49cca62eca86c9c5d594714", "score": "0.59618074", "text": "public function add(Command $command);", "title": "" }, { "docid": "7ae7b42b7d3abae4ba734bc7f2e6362e", "score": "0.5954538", "text": "abstract protected function getCommand();", "title": "" }, { "docid": "95434544ce3d3f9c990e892ba546342b", "score": "0.59404427", "text": "public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}", "title": "" }, { "docid": "1adb9f5a40a3d953fe2df77ca56255af", "score": "0.59388787", "text": "protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }", "title": "" }, { "docid": "165295b975ab5b8d8c07b794e6b5b97a", "score": "0.5929363", "text": "public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }", "title": "" }, { "docid": "94186e98cf4debe7c0215fde07647c56", "score": "0.5910562", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }", "title": "" }, { "docid": "db713239e5b32322f40cf994578b5029", "score": "0.590651", "text": "protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }", "title": "" }, { "docid": "779c8e897c4b8463bb0027e0ccb89725", "score": "0.589658", "text": "public static function create() {}", "title": "" }, { "docid": "779c8e897c4b8463bb0027e0ccb89725", "score": "0.589658", "text": "public static function create() {}", "title": "" }, { "docid": "779c8e897c4b8463bb0027e0ccb89725", "score": "0.589658", "text": "public static function create() {}", "title": "" }, { "docid": "bbf5d68223937fb2aa3862d46444b994", "score": "0.58692765", "text": "public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }", "title": "" }, { "docid": "000cc06086458548140e5777538423d4", "score": "0.58665586", "text": "private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }", "title": "" }, { "docid": "50cabaa9a120d66c12fb2fa0df7b5fe7", "score": "0.5866528", "text": "public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }", "title": "" }, { "docid": "76db6b57584d5fda3d586494904ad98b", "score": "0.58663124", "text": "public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5852474", "text": "public function create() {}", "title": "" }, { "docid": "f3b1598a4984844357862066befff9cf", "score": "0.5852405", "text": "protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.58442044", "text": "public function create(){}", "title": "" }, { "docid": "2fda1f0fe0cb4ff65d8afa252c679d89", "score": "0.58391577", "text": "protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }", "title": "" }, { "docid": "463adf80d69bec1f82c736fb139f9ee2", "score": "0.58154446", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }", "title": "" }, { "docid": "63194376499c1aea9ec0eedd90a9aa51", "score": "0.58055794", "text": "public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }", "title": "" }, { "docid": "fc15aafe79acf061fd3dc93cf665e337", "score": "0.5795853", "text": "protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}", "title": "" }, { "docid": "bdb7fe8c72be613aa94f617216215c68", "score": "0.5780188", "text": "public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }", "title": "" }, { "docid": "aea0f72ab04cf5f6d7792bc4a67d5478", "score": "0.57653266", "text": "public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }", "title": "" }, { "docid": "65eb1561660788df8b31e82034d1f6ab", "score": "0.57640004", "text": "public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }", "title": "" }, { "docid": "e1cc08ae54ac06bdb44849387daecca7", "score": "0.57584697", "text": "public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }", "title": "" }, { "docid": "77bc1784f9d5dd81ded5590f02a1bbe0", "score": "0.575748", "text": "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "title": "" }, { "docid": "dbc5bc10cdebab6aaeea5a116f9a2bfe", "score": "0.5742612", "text": "public function createCommand(?string $sql = null, array $params = []): Command;", "title": "" }, { "docid": "03ae31dc6f1a14b54ae8df0caf6eaa82", "score": "0.5739361", "text": "public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }", "title": "" }, { "docid": "067952e4ff52bdd96e2587c098d9f7d0", "score": "0.5732979", "text": "public function generateCommands();", "title": "" }, { "docid": "c3ace8dae9f72a1f72fb8b6285fc883a", "score": "0.572247", "text": "protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }", "title": "" }, { "docid": "f6cdd0cd42a73a7c38fd008452e6682b", "score": "0.5701043", "text": "protected function buildCommand()\n {\n return $this->command;\n }", "title": "" }, { "docid": "8db8d6e84590c636d7273eb03d82a5c1", "score": "0.5686879", "text": "public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }", "title": "" }, { "docid": "783d722235f70d3b757548da73a3bf8c", "score": "0.5685233", "text": "public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }", "title": "" }, { "docid": "5d1d137f2c324b2ebb043f5d8030fed6", "score": "0.56819254", "text": "public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }", "title": "" }, { "docid": "b8d0bfdd7e14c58b31e0be78d118782b", "score": "0.5675983", "text": "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }", "title": "" }, { "docid": "cb66908f97cfd78aac5350f3bcda6d65", "score": "0.56670785", "text": "protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }", "title": "" }, { "docid": "45d2abc63372a7d367396556a7cfd5c8", "score": "0.56606543", "text": "public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }", "title": "" }, { "docid": "4ad9405c41c7bc1099ff1875c0b6ee38", "score": "0.5659307", "text": "protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "96aed3ba908ba901f0c6d9c807a2082a", "score": "0.56567776", "text": "public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }", "title": "" }, { "docid": "3136187ead1c82613925f8bca8c1a0a9", "score": "0.56534046", "text": "public function buildCommand()\n {\n return parent::buildCommand();\n }", "title": "" }, { "docid": "19f85c64362302fc767581cb4be0ac3c", "score": "0.56343585", "text": "private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }", "title": "" }, { "docid": "7ee691855ce63d292f38e3ec5b2095f5", "score": "0.56290466", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }", "title": "" }, { "docid": "138fe03154453693a2dabf0e96d3153f", "score": "0.5626615", "text": "public function getCommand(string $command);", "title": "" }, { "docid": "85c9dddd0bdba9c419415c2e9ca45023", "score": "0.56255764", "text": "protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}", "title": "" }, { "docid": "2b7eb51a3b2c96d6a1e7e50c747e739c", "score": "0.5608852", "text": "public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }", "title": "" }, { "docid": "ea7f5521120da982d144ee6d18a4aaab", "score": "0.5608026", "text": "public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }", "title": "" }, { "docid": "1d65e2f4118ed041594f73ed7605e79f", "score": "0.56063116", "text": "protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }", "title": "" }, { "docid": "ce24bde3454e5ba6db717731f2a528c6", "score": "0.56026554", "text": "private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }", "title": "" }, { "docid": "4bd3121811b430f087dcdaa17c9e5f61", "score": "0.5599553", "text": "public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }", "title": "" }, { "docid": "08630c12491fa0e8877da5f80e1b1c2e", "score": "0.5599351", "text": "public function generateCommand($singleCommandDefinition);", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.55640906", "text": "public function create() {\n }", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.55640906", "text": "public function create() {\n }", "title": "" }, { "docid": "7377758c959c218dc50e7c226e7ec123", "score": "0.5561977", "text": "public function create() {\r\n }", "title": "" }, { "docid": "652a1adeba97cfc87599ba0957349f1d", "score": "0.5559745", "text": "public function create() {\n\n\t}", "title": "" }, { "docid": "75f17ec2443027326e25d114846828d1", "score": "0.5555084", "text": "private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }", "title": "" }, { "docid": "6f8176d716bac417ee8c560306dfb68c", "score": "0.5551485", "text": "public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }", "title": "" }, { "docid": "fb02cb7b5c4ddb670985fff6df17fd94", "score": "0.5544597", "text": "public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }", "title": "" }, { "docid": "ae88d628a28c648012487ae4cea34a9c", "score": "0.55397296", "text": "public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }", "title": "" }, { "docid": "94d56d701691ef660b664a9314d48d53", "score": "0.5529626", "text": "public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.552908", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.552908", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.552908", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.552908", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.552908", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.552908", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.552908", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.552908", "text": "public function create();", "title": "" } ]
e9067daa2f84383cdc9e5b2488da2d4a
Get the [pilotmobilephone] column value.
[ { "docid": "7c88a77ca1089e26929c7ab442031110", "score": "0.7936241", "text": "public function getPilotmobilephone()\n\t{\n\t\treturn $this->pilotmobilephone;\n\t}", "title": "" } ]
[ { "docid": "e9fef6269122dcb8c51dba20c8c46382", "score": "0.76394117", "text": "public function getCopilotmobilephone()\n\t{\n\t\treturn $this->copilotmobilephone;\n\t}", "title": "" }, { "docid": "87b1a3e9d331b6f282884bc4daa42910", "score": "0.7387881", "text": "public function getAfapilotmobilephone()\n\t{\n\t\treturn $this->afapilotmobilephone;\n\t}", "title": "" }, { "docid": "d44d67746bc969b1929f6ae5ef8c755c", "score": "0.729959", "text": "public function getPhone()\n {\n $value = $this->get(self::phone);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "d44d67746bc969b1929f6ae5ef8c755c", "score": "0.729959", "text": "public function getPhone()\n {\n $value = $this->get(self::phone);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "d44d67746bc969b1929f6ae5ef8c755c", "score": "0.729959", "text": "public function getPhone()\n {\n $value = $this->get(self::phone);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "ecb2358490e855299dae3d06755ee020", "score": "0.7259954", "text": "public function getPhone()\n {\n $value = $this->get(self::PHONE);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "ecb2358490e855299dae3d06755ee020", "score": "0.7259954", "text": "public function getPhone()\n {\n $value = $this->get(self::PHONE);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "1dec5a9dd0c96507d4fb71cd39103fb5", "score": "0.7149289", "text": "public function getBupilotmobilephone()\n\t{\n\t\treturn $this->bupilotmobilephone;\n\t}", "title": "" }, { "docid": "01d32fbe9a2298a54624a5cff3723e06", "score": "0.70951325", "text": "public function getPhone()\n {\n return ($this->phone);\n }", "title": "" }, { "docid": "d1f53c6261ca298f350ccb8c90cb991c", "score": "0.7035143", "text": "public function getReqmobilephone()\n\t{\n\t\treturn $this->reqmobilephone;\n\t}", "title": "" }, { "docid": "59e880a2d62ca4832c3c595b0365f2b4", "score": "0.70163906", "text": "public function getPhone (){\n\t\treturn $this->phone;\n\t}", "title": "" }, { "docid": "063f048336ecf3ebd87d7345cca463bb", "score": "0.69932705", "text": "public function getPhone()\n\t{\n\t\treturn $this->phone;\n\t}", "title": "" }, { "docid": "063f048336ecf3ebd87d7345cca463bb", "score": "0.69932705", "text": "public function getPhone()\n\t{\n\t\treturn $this->phone;\n\t}", "title": "" }, { "docid": "063f048336ecf3ebd87d7345cca463bb", "score": "0.69932705", "text": "public function getPhone()\n\t{\n\t\treturn $this->phone;\n\t}", "title": "" }, { "docid": "b8a2eced199922a28714c676d74e3f63", "score": "0.69698226", "text": "public function getPhone()\n {\n return $this->phoneNumber;\n }", "title": "" }, { "docid": "220ce04cc70bc52108fa8d0b2dd44c8f", "score": "0.6943223", "text": "public function getPhone()\n\t{\n\t\treturn $this->phone; \n\n\t}", "title": "" }, { "docid": "fea82dfd33a56d758dbaec49b125a96f", "score": "0.6939311", "text": "public function getContactPhone()\n {\n $value = $this->get(self::contact_phone);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "cc0dd1eb647bea66b92f4ecb248c778f", "score": "0.6925073", "text": "function get_phone() {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "2e5ec68c38d9330cba7600ffb860d53b", "score": "0.6916674", "text": "public function getPhone()\n {\n return $this->phone;\n }", "title": "" }, { "docid": "cafa55e084bc68f3e0f1a08a54dc4326", "score": "0.69069546", "text": "public function getPhone() {\n\t\treturn $this->phone_area . $this->phone_prefix . $this->phone_line;\n\t}", "title": "" }, { "docid": "3cbca5c815043fd05b075c475fe570b8", "score": "0.68863666", "text": "public function getPhoneId()\n {\n return $this->phoneid;\n }", "title": "" }, { "docid": "f1e162ab94dba619b9a8c19d13d36916", "score": "0.6866608", "text": "public function getPhone()\n\t {\n\t return $this->phone;\n\t }", "title": "" }, { "docid": "2f74c6b9584604294179be0c708d70e5", "score": "0.6843805", "text": "public function getPhone()\n {\n if (isset($this->response['mobile_phone']) && !empty($this->response['mobile_phone'])) {\n $phone = $this->response['mobile_phone'];\n }\n\n elseif (isset($this->response['home_phone']) && !empty($this->response['home_phone'])) {\n $phone = $this->response['home_phone'];\n }\n\n if (isset($phone)) {\n $phone = explode('|', str_replace(array(',',';'), '|', $phone));\n\n if (preg_match('/^\\+?[0-9 ()-]{7,}$/', $phone[0])) {\n return trim($phone[0]);\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "4f4b1936bee92455335e961edc93e150", "score": "0.67998207", "text": "public function getMobileNumber(): string\n {\n return $this->mobileNumber;\n }", "title": "" }, { "docid": "9bb2cec22fcf0890d7dcc0c01ffbe3f1", "score": "0.67742926", "text": "public function getCamplodgingphone()\n\t{\n\t\treturn $this->camplodgingphone;\n\t}", "title": "" }, { "docid": "e0f5e3def531786dbc27f3270d685ed8", "score": "0.67696184", "text": "public function getPhone():string\n {\n return $this->phone;\n }", "title": "" }, { "docid": "6f1a4a689296d0f39fd4509ee1d27427", "score": "0.6767742", "text": "public function getPassmobilephone()\n\t{\n\t\treturn $this->passmobilephone;\n\t}", "title": "" }, { "docid": "49eaaed1fa931c9c4c85cb8918e51f75", "score": "0.6767544", "text": "public function getPhone()\n {\n return $this->_phone;\n }", "title": "" }, { "docid": "53e95c09ff436d2edf5686480d686288", "score": "0.6764778", "text": "function getTelephone()\n\t{\n\t\t$this->uid = $this->getUser();\n\t\t$ret = self::getAttribute($this->uid, 'telephonenumber');\n\t\treturn $ret[0];\n\t}", "title": "" }, { "docid": "88eef91bae5eac62f996cab1d4c73f2f", "score": "0.6744481", "text": "function getPhone()\n {\n return is_null($this->_sPhone) ? NULL : (string) $this->_sPhone;\n }", "title": "" }, { "docid": "31c1f52a0cc91394619743748d05c312", "score": "0.67321163", "text": "public function getPhoneNumber()\n {\n return isset($this->phone_number) ? $this->phone_number : '';\n }", "title": "" }, { "docid": "31c1f52a0cc91394619743748d05c312", "score": "0.67321163", "text": "public function getPhoneNumber()\n {\n return isset($this->phone_number) ? $this->phone_number : '';\n }", "title": "" }, { "docid": "a7882c1da705abe6d1a00053d622ca88", "score": "0.6725257", "text": "public function getCompanionphone()\n\t{\n\t\treturn $this->companionphone;\n\t}", "title": "" }, { "docid": "7bf26019abef7e379fd17a2d32e7209f", "score": "0.6700427", "text": "public function getPhoneNumber()\n {\n return $this->phone_number;\n }", "title": "" }, { "docid": "7bf26019abef7e379fd17a2d32e7209f", "score": "0.6700427", "text": "public function getPhoneNumber()\n {\n return $this->phone_number;\n }", "title": "" }, { "docid": "7bf26019abef7e379fd17a2d32e7209f", "score": "0.6700427", "text": "public function getPhoneNumber()\n {\n return $this->phone_number;\n }", "title": "" }, { "docid": "7bf26019abef7e379fd17a2d32e7209f", "score": "0.6700427", "text": "public function getPhoneNumber()\n {\n return $this->phone_number;\n }", "title": "" }, { "docid": "7bf26019abef7e379fd17a2d32e7209f", "score": "0.6700427", "text": "public function getPhoneNumber()\n {\n return $this->phone_number;\n }", "title": "" }, { "docid": "895d890e8ce31e657749a740b8f6154c", "score": "0.6684716", "text": "public function getPhone(){\n return $this->Phone;\n }", "title": "" }, { "docid": "dbc1a80b8f59526d2502ca44739ba647", "score": "0.66790754", "text": "public function getPhoneNumber()\n {\n if (array_key_exists(\"phoneNumber\", $this->_propDict)) {\n return $this->_propDict[\"phoneNumber\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "dbc1a80b8f59526d2502ca44739ba647", "score": "0.66790754", "text": "public function getPhoneNumber()\n {\n if (array_key_exists(\"phoneNumber\", $this->_propDict)) {\n return $this->_propDict[\"phoneNumber\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "5dd9c19a2403f158e2bf0ad9eb0aeaee", "score": "0.6675576", "text": "public function getMobileForVerification(): string\n {\n return $this->{$this->getMobileField()};\n }", "title": "" }, { "docid": "8d4b65dbc838ced6636027b841c7f368", "score": "0.6664399", "text": "public function telephone()\n {\n return $this->_telephone;\n }", "title": "" }, { "docid": "4479c812617fdd2eaaf85a7008a39c89", "score": "0.6663796", "text": "private function getMobileField(): string\n {\n return config('mobile_verifier.mobile_column', 'mobile');\n }", "title": "" }, { "docid": "0760cc1da57b5e4a377fa6346834995d", "score": "0.66370547", "text": "public function getCampphone()\n\t{\n\t\treturn $this->campphone;\n\t}", "title": "" }, { "docid": "162627b65dbabca80c8978fc8cd614d7", "score": "0.66352034", "text": "public function getCoordmobilephone()\n\t{\n\t\treturn $this->coordmobilephone;\n\t}", "title": "" }, { "docid": "fb00eec326d417c1b734abcd2d049ba1", "score": "0.6597805", "text": "public function getPilotmobilecomment()\n\t{\n\t\treturn $this->pilotmobilecomment;\n\t}", "title": "" }, { "docid": "7c90bc44d00edd87e5a471f9ebf295e4", "score": "0.65942496", "text": "public function getPhone(): string\n {\n return $this->phone;\n }", "title": "" }, { "docid": "7041e18c00beb2eac7460ad77c73ea02", "score": "0.6584729", "text": "public function getMobileDevice()\n {\n return $this->mobile['val'];\n }", "title": "" }, { "docid": "d46b428d1cbc8b18701b923b7ebddafb", "score": "0.6582297", "text": "public function getMobilePhone(): ?string {\n $val = $this->getBackingStore()->get('mobilePhone');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'mobilePhone'\");\n }", "title": "" }, { "docid": "86c652b338cea0d064195185ce83f5d3", "score": "0.65768284", "text": "public function getPhoneNumber()\n {\n return $this->phoneNumber;\n }", "title": "" }, { "docid": "86c652b338cea0d064195185ce83f5d3", "score": "0.65768284", "text": "public function getPhoneNumber()\n {\n return $this->phoneNumber;\n }", "title": "" }, { "docid": "a639c8855836493d371ff7882fe8bf0b", "score": "0.65748227", "text": "public function getClientMobilePhone() {\n\t\treturn $this->clientMobilePhone;\n\t}", "title": "" }, { "docid": "4517d038aa75842e691fa8b2decf0083", "score": "0.6568137", "text": "public function getPilotpagerphone()\n\t{\n\t\treturn $this->pilotpagerphone;\n\t}", "title": "" }, { "docid": "43688575c463f852013f172bcd460f21", "score": "0.654449", "text": "public function getPhone();", "title": "" }, { "docid": "976879f5f48ba049a709db955c7e778f", "score": "0.6541074", "text": "public function getCompanyPhone()\n {\n\n return $this->company_phone;\n }", "title": "" }, { "docid": "d42655b2b0adb444b2e05339d4ea7967", "score": "0.65354645", "text": "function getPhone()\r\n {\r\n return $this->phone;\r\n }", "title": "" }, { "docid": "fd62ead490f2f3e09ffd5f8bd78b3d6e", "score": "0.6530474", "text": "private function getPhoneColumn(): string\n {\n return config('phone_verifier.phone_column', 'phone');\n }", "title": "" }, { "docid": "f35efa0018dbaaea4dab188d364c0677", "score": "0.6515995", "text": "public function getTelephone() {\n return $this->get(self::TELEPHONE);\n }", "title": "" }, { "docid": "90927bf814e50114d64710cd451ef595", "score": "0.6513633", "text": "public function getPointMobphone()\n {\n return $this->point_mobphone;\n }", "title": "" }, { "docid": "4a019208ad9985437bdd0d67ec3577ef", "score": "0.6496719", "text": "public function getReqevephone()\n\t{\n\t\treturn $this->reqevephone;\n\t}", "title": "" }, { "docid": "09d1059b449ca748fe965d48d9ea9da5", "score": "0.6485591", "text": "public function getPhoneNumber() {\n return $this->phoneNumber;\n }", "title": "" }, { "docid": "a497e97c014231b52181605649ee4f9a", "score": "0.64831746", "text": "public function getPhoneNumberAttribute()\n {\n return \"+\".@$this->attributes['country_code'].@$this->attributes['mobile_number'];\n }", "title": "" }, { "docid": "1703b6850be136dc6efa06035a5dbe8c", "score": "0.6469949", "text": "public function getCellPhone()\n {\n return $this->per_cellphone;\n }", "title": "" }, { "docid": "fb1a480e19f0667b66fe9439122021f8", "score": "0.645472", "text": "public function getPilotdayphone()\n\t{\n\t\treturn $this->pilotdayphone;\n\t}", "title": "" }, { "docid": "ae56c90b5c50ba4af1c8604f14956952", "score": "0.64483654", "text": "public function getPhone(): ?string\n {\n return $this->phone;\n }", "title": "" }, { "docid": "bc566cee3451cb478d0b215a8b2a6359", "score": "0.6444153", "text": "public function getPhoneNumber()\n {\n return $this->phoneNumber;\n }", "title": "" }, { "docid": "4ba58e6818ff0df72d35d9a7ee01b07c", "score": "0.64315236", "text": "public function getPilotfaxphone()\n\t{\n\t\treturn $this->pilotfaxphone;\n\t}", "title": "" }, { "docid": "471ae44a23bcd4f9c0e98b256adba1e6", "score": "0.64152884", "text": "public function getPhoneNumber() {\n return $this->collection->getValue('PHONENUM');\n\t}", "title": "" }, { "docid": "892719cad875b7ba770761063eb1ed4a", "score": "0.6408665", "text": "public function getTelephone()\n {\n return $this->telephone;\n }", "title": "" }, { "docid": "892719cad875b7ba770761063eb1ed4a", "score": "0.6408665", "text": "public function getTelephone()\n {\n return $this->telephone;\n }", "title": "" }, { "docid": "892719cad875b7ba770761063eb1ed4a", "score": "0.6408665", "text": "public function getTelephone()\n {\n return $this->telephone;\n }", "title": "" }, { "docid": "892719cad875b7ba770761063eb1ed4a", "score": "0.6408665", "text": "public function getTelephone()\n {\n return $this->telephone;\n }", "title": "" }, { "docid": "892719cad875b7ba770761063eb1ed4a", "score": "0.6408665", "text": "public function getTelephone()\n {\n return $this->telephone;\n }", "title": "" }, { "docid": "892719cad875b7ba770761063eb1ed4a", "score": "0.6408665", "text": "public function getTelephone()\n {\n return $this->telephone;\n }", "title": "" }, { "docid": "3afc1e28dfa3ceed2466cf79a07b15e8", "score": "0.6396654", "text": "public function getMobile()\n {\n return $this->mobile;\n }", "title": "" }, { "docid": "3afc1e28dfa3ceed2466cf79a07b15e8", "score": "0.6396654", "text": "public function getMobile()\n {\n return $this->mobile;\n }", "title": "" }, { "docid": "3afc1e28dfa3ceed2466cf79a07b15e8", "score": "0.6396654", "text": "public function getMobile()\n {\n return $this->mobile;\n }", "title": "" }, { "docid": "4436f8e5b7df64fd2621068e97edef28", "score": "0.6374921", "text": "public function mobile()\n\t{\n\t\treturn $this->mobile;\n\t}", "title": "" }, { "docid": "b9f3acdd0fbb6f6434a44795d845e7ef", "score": "0.63748795", "text": "public function getAvailablePhoneNumber()\n {\n if ( !empty( $this->fatherRecord->sms_cell ) ) {\n $phone = $this->fatherRecord->sms_cell;\n } else if ( !empty( $this->fatherRecord->mobile ) ) {\n $phone = $this->fatherRecord->mobile;\n } else if ( !empty( $this->mother_phone ) ) {\n $phone = $this->mother_phone;\n } else {\n $phone = null;\n }\n\n return $phone;\n }", "title": "" }, { "docid": "5fd39f25179b35ae521b8219d355acc9", "score": "0.6360967", "text": "public function getPhoneNumber(): ?string\n {\n if (count($this->phoneNumber) == 0) {\n return null;\n }\n return $this->phoneNumber['value'];\n }", "title": "" }, { "docid": "5fd39f25179b35ae521b8219d355acc9", "score": "0.6360967", "text": "public function getPhoneNumber(): ?string\n {\n if (count($this->phoneNumber) == 0) {\n return null;\n }\n return $this->phoneNumber['value'];\n }", "title": "" }, { "docid": "5fd39f25179b35ae521b8219d355acc9", "score": "0.6360967", "text": "public function getPhoneNumber(): ?string\n {\n if (count($this->phoneNumber) == 0) {\n return null;\n }\n return $this->phoneNumber['value'];\n }", "title": "" } ]
02e47c48bdcdc465b58dc14430454fbf
Open/Close the comments for a blog post
[ { "docid": "f3ceabeb77c3004b192ddea464c8c441", "score": "0.66495687", "text": "function ToggleComments($closed, $post_id ){\n\t\tglobal $langmessage;\n\n\t\tif( $closed ){\n\t\t\tSimpleBlogCommon::AStrSet('comments_closed',$post_id,1);\n\t\t}else{\n\t\t\tSimpleBlogCommon::AStrRm('comments_closed',$post_id);\n\t\t}\n\n\n\t\tif( SimpleBlogCommon::SaveIndex() ){\n\t\t\t$this->comments_closed = $closed;\n\t\t\tmessage($langmessage['SAVED']);\n\t\t}else{\n\t\t\tmessage($langmessage['OOPS']);\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "38b3c89d712f3cff98b59bfc51df9fb3", "score": "0.68380606", "text": "public function close_comments( $open, $post_id ) {\n\n\t\t\t// if not open, than back\n\t\t\tif ( ! $open )\n\t\t\t\treturn $open;\n\n\t\t\t$post = get_post( $post_id );\n\t\t\tif ( $post->post_type ) // all post types\n\t\t\t\treturn FALSE; // 'closed' don`t work; @see http://codex.wordpress.org/Option_Reference#Discussion\n\n\t\t\treturn $open;\n\t\t}", "title": "" }, { "docid": "9de8274323d376001004bbb6940d8a9f", "score": "0.6289341", "text": "public function listcomment()\n {\n\n\n $comment = $this->admin->getComment();\n include 'view/postview.php';\n }", "title": "" }, { "docid": "1f45e94ddc73a6296b7bbcc8e22b09d3", "score": "0.623371", "text": "function base_post_comments(){\n $comments_num = get_comments_number(); // returns a numeric value\n if ( comments_open() ){\n if ( $comments_num == 0 ){\n $comments = __( 'No comments', 'base' );\n }\n elseif ( $comments_num > 1 ) {\n $comments = $comments_num . __( ' comments', 'base' );\n }\n else {\n $comments = __('1 comment', 'base');\n }\n printf( '<a href=\"%1$s\" title=\"%2$s\">%3$s</a>',\n get_comments_link(), \n sprintf( esc_attr__( 'See al comments', 'base') ),\n $comments\n );\n }\n}", "title": "" }, { "docid": "52d79ae30c786f94cb4d2b8d8586bb1f", "score": "0.62141657", "text": "function comment() {\n\t\tif(!$this->isLogged())\n\t\t\theader('Location: '.URL.'/member/login');\n\t\t\t\n\t\t$sess = $this->mapSession();\n\t\t$post\t= $this->mapPost();\n\t\t\n\t\t$res = $this->comment_model->comment($post->post_id, $post->content, $_SESSION);\n\t\t\n\t\tif($res) {\n\t\t\techo '<script>location.replace(\"'.URL.'/timeline/read/'.$post->post_id.'\");</script>';\n\t\t}\n\t\telse {\n\t\t\techo 'fail';\n\t\t}\n\t}", "title": "" }, { "docid": "131bda789a5dffcd2877b22c99e9d580", "score": "0.6202825", "text": "function power_do_comments() {\n\n\tglobal $wp_query;\n\n\t// Bail if comments are off for this post type.\n\tif ( ( is_page() && ! power_get_option( 'comments_pages' ) ) || ( is_single() && ! power_get_option( 'comments_posts' ) ) ) {\n\t\treturn;\n\t}\n\n\t$no_comments_text = apply_filters( 'power_no_comments_text', '' );\n\t$comments_closed_text = apply_filters( 'power_comments_closed_text', '' );\n\n\tif ( ! empty( $wp_query->comments_by_type['comment'] ) && have_comments() ) {\n\n\t\tpower_markup(\n\t\t\t[\n\t\t\t\t'open' => '<div %s>',\n\t\t\t\t'context' => 'entry-comments',\n\t\t\t]\n\t\t);\n\n\t\t$comments_title = sprintf( '<h3>%s</h3>', esc_html__( 'Comments', 'power' ) );\n\n\t\t/**\n\t\t * Comments title filter\n\t\t *\n\t\t * Allows the comments title to be filtered.\n\t\t *\n\t\t * @since ???\n\t\t *\n\t\t * @param string $comments_title The comments title.\n\t\t */\n\t\t$comments_title = apply_filters( 'power_title_comments', $comments_title );\n\n\t\techo $comments_title; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- sanitize done prior to filter application\n\t\tprintf( '<ol %s>', power_attr( 'comment-list' ) );\n\n\t\t\t/**\n\t\t\t * Fires inside comments list markup.\n\t\t\t *\n\t\t\t * @since 1.0.0\n\t\t\t */\n\t\t\tdo_action( 'power_list_comments' );\n\n\t\techo '</ol>';\n\n\t\t// Comment Navigation.\n\t\t$prev_link = get_previous_comments_link( apply_filters( 'power_prev_comments_link_text', '' ) );\n\t\t$next_link = get_next_comments_link( apply_filters( 'power_next_comments_link_text', '' ) );\n\n\t\tif ( $prev_link || $next_link ) {\n\n\t\t\t$pagination = sprintf( '<div class=\"pagination-previous alignleft\">%s</div>', $prev_link );\n\t\t\t$pagination .= sprintf( '<div class=\"pagination-next alignright\">%s</div>', $next_link );\n\n\t\t\tpower_markup(\n\t\t\t\t[\n\t\t\t\t\t'open' => '<div %s>',\n\t\t\t\t\t'close' => '</div>',\n\t\t\t\t\t'content' => $pagination,\n\t\t\t\t\t'context' => 'comments-pagination',\n\t\t\t\t]\n\t\t\t);\n\n\t\t}\n\n\t\tpower_markup(\n\t\t\t[\n\t\t\t\t'close' => '</div>',\n\t\t\t\t'context' => 'entry-comments',\n\t\t\t]\n\t\t);\n\n\t} elseif ( $no_comments_text && 'open' === get_post()->comment_status ) {\n\t\t// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Text Produced by a third party\n\t\techo sprintf( '<div %s>', power_attr( 'entry-comments' ) ) . $no_comments_text . '</div>';\n\t} elseif ( $comments_closed_text ) {\n\t\t// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Text Produced by a third party\n\t\techo sprintf( '<div %s>', power_attr( 'entry-comments' ) ) . $comments_closed_text . '</div>';\n\t}\n\n}", "title": "" }, { "docid": "c900374d3addf562e5f6971247fa1c77", "score": "0.6171298", "text": "function force_comments_open($post_id) {\n\n global $wpdb;\n $post = get_post($post_id);\n $post_score = strtotime($post->post_date_gmt);\n \n\t// Avoid an infinite loop by the following\n\tif ( ! wp_is_post_revision( $post_id ) ){\n\t\n\t\t// unhook this function so it doesn't loop infinitely\n\t\tremove_action('publish_gp_news', 'force_comments_open');\n\t\tremove_action('publish_gp_events', 'force_comments_open');\n\t\tremove_action('publish_gp_advertorial', 'force_comments_open');\n\t\tremove_action('publish_gp_projects', 'force_comments_open');\n \n\t\t// update the post, which calls publish_gp_news again\n\t\t$comment_status = 'open';\n\t\t$table = 'wp_posts';\n\t\t\n\t\t$data = array( 'comment_status' => $comment_status );\n\t\t$where = array( 'ID' => $post_id );\n\t\t$format = array( '%s' );\n\n $wpdb->update($table, $data, $where, $format);\n\t\t\n\t\t// re-hook this function\n\t\tadd_action('publish_gp_news', 'force_comments_open');\n\t\tadd_action('publish_gp_events', 'force_comments_open');\n\t\tadd_action('publish_gp_advertorial', 'force_comments_open');\n\t\tadd_action('publish_gp_projects', 'force_comments_open');\n\t}\n}", "title": "" }, { "docid": "f723818bf5aef48e56502ff0ee07f3f0", "score": "0.6156231", "text": "public function forceOpenComments($open, $postId)\n {\n if (!is_admin() && is_single() && get_post_type() == \"ticket\") {\n if (get_post_type($postId)) {\n return 1;\n }\n }\n return $open;\n }", "title": "" }, { "docid": "603e8005768ee16e170279f13cea9639", "score": "0.605412", "text": "function reactor_do_post_footer_comments_link() {\n\t\n\tif ( is_page_template('page-templates/front-page.php') ) {\n\t\t$comments_link = reactor_option('frontpage_comment_link', 1);\n\t}\n\telseif ( is_page_template('page-templates/news-page.php') ) {\n\t\t$comments_link = reactor_option('newspage_comment_link', 1);\n\t} else {\n\t\t$comments_link = reactor_option('comment_link', 1);\n\t}\n\t\n\tif ( comments_open() && $comments_link ) { ?>\n\t\t<div class=\"comments-link\">\n\t\t\t<i class=\"icon social foundicon-chat\" title=\"Comments\"></i>\n\t\t\t<?php comments_popup_link('<span class=\"leave-comment\">' . __('Leave a Comment', 'reactor') . '</span>', __('1 Comment', 'reactor'), __('% Comments', 'reactor') ); ?>\n\t\t</div><!-- .comments-link -->\n <?php }\n}", "title": "" }, { "docid": "9a1cc6c599231c2d0a195320095e9bf1", "score": "0.59190345", "text": "function printComments($post, $comments) {\n if ($post['comvisibility'] !== 'hidden') {\n?>\n <div id=\"comments-area\">\n <h3><?= _('comments') ?></h3>\n<?php\n\n echo \"\\n\";\n // New Comment form, if new comments allowed\n if ($post['comvisibility'] === 'visible') {\n $postUrl = sprintf('/%s/%s/%s',\n _('lang'), $post['postid'], $post['urltitle']);\n printFormNewComment($post['postid'], $postUrl);\n } else {\n echo '<!-- new comments disabled. -->';\n }\n\n\n // comments so far\n echo \" <h4>\" . _('com_so_far') . \"</h4>\\n\";\n\n if ($post['comcount'] === '0' or empty($comments)) {\n echo ' ' . _('com_no_comments') . \"\\n\";\n } else {\n // iterate through comments\n // keys are the commentIds, values are the comment's fields\n foreach ($comments as $commentId => $fields) {\n // comment approved?\n if ($fields['approved'] === 'true') {\n $content = $fields['content'];\n // make date clickable for persistent link\n $created = sprintf('<a href=\"#comment-%s\">%s</a>',\n $commentId, localeDate($fields['created']));\n // make name clickable, if url present\n if (!empty($fields['url'])) {\n $name = sprintf('<a href=\"%s\">%s</a>',\n $fields['url'], $fields['longname']);\n } else {\n $name = $fields['longname'];\n }\n } else {\n // not approved: no links, no content, just a notice\n $created = localeDate($fields['created']);\n $name = substr($fields['longname'], 0, 1) . '…' . substr($fields['longname'], -1); //first and last char\n $content = '<span style=\"color:#aaa\">' . _('com_not_approved') . '</span>';\n }\n\n?>\n <div id=\"comment-<?= $commentId ?>\">\n <span class=\"bracket\">&nbsp;</span>\n <div class=\"comment-fields\">\n <span class=\"comment-date\"><?= $created ?></span>\n <span><strong><?= $name ?></strong> <?= _('com_says') ?></span>\n <div><?= $content ?></div>\n </div>\n </div>\n<?php\n }\n }\n echo \" </div>\\n\\n\";\n }\n}", "title": "" }, { "docid": "744565135265379a1505071815aa68fc", "score": "0.58871347", "text": "function post($id)\n{\n $postManager = new Writer\\Blog\\Model\\PostManager();\n $commentManager = new \\Writer\\Blog\\Model\\CommentManager();\n $blog = new Writer\\Blog\\Model\\BlogManager();\n \n $post = $postManager->getPost($id);\n $comments = $commentManager->getCommentsByDate($id);\n $counter = $commentManager->matchComments($id);\n $infosBlog = $blog->getBlog();\n\n require('view/frontend/postView.php');\n}", "title": "" }, { "docid": "39482d66a55f70cfcbdca71e40a51452", "score": "0.58846414", "text": "public function newPostComment(){\n SiteController::loggedInCheck();\n\n\t\tinclude_once SYSTEM_PATH.'/view/newpostcomment.tpl'; //TODO make sure the tpl is correct\n\t}", "title": "" }, { "docid": "382c4d3395640a562519a3b6a079616c", "score": "0.58711666", "text": "public function showComments($post_id){\r\n\t\t$myModel = new CommentModel();\r\n\t\t$data = $myModel->getComments($post_id);\r\n\t\t$myView = new CommentView();\r\n\t\treturn $myView->showComments($data);\r\n\t}", "title": "" }, { "docid": "2d08751e0a93c4b7f014ea78076d6baf", "score": "0.5868001", "text": "function my_comments_open($post) {\n return $post->post_type === 'page' ? false : true;\n}", "title": "" }, { "docid": "e9387ba8054233096f736023a8dd10ae", "score": "0.58374214", "text": "public function addComment($post)\n\t{\n }", "title": "" }, { "docid": "98524234d2b48681c93276c863bf7006", "score": "0.5834771", "text": "function readcomments($id){\n\t\tglobal $redis, $tpl, $textile;\n\n\t\t$pid = process_url($id);\n\t\t$comments = $redis->keys('agon.'.$pid[2].'.c:*'); # We get all the keys that are comments to this post\n\t\tsort($comments);\n\t\t\n\t\t//if($redis->get('slight.config.comment-list') == 'true') # We allow the user to change the order\n\t\t//\t$comments = array_reverse($comments);\n\n\t\tfor($i = 0; $i < count($comments); $i++){\n\t\t\t$tpl->$i = (object) true; # We just need something to tell the object is an object, so we dont get errors below\n\t\t\t$tpl->$i->num = $i; # Comment number\n\n\t\t\t$u = $redis->hgetall($comments[$i]);\n\t\t\t$tpl->$i->name = $u['name'];\n\t\t\t$tpl->$i->date = $u['timestamp'];\n\t\t\t$tpl->$i->email = $u['email'];\n\t\t\t//TODO: Add website field\n\t\t\tif(s('markdown') == '1') {\n\t\t\t\tif(!class_exists($textile)) {\n\t\t\t\t\techo \"Textile not loaded. This is a bug...\";\n\t\t\t\t} else {\n\t\t\t\t\t$tpl->$i->body = $textile->TextileThis($u['content']);\t\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$tpl->$i->body = strip_tags($u['content']);\n\t\t\t}\n\t\t}\n\t\t$tpl->max = $i;\n\t\t$tpl->display(\"agon/templates/\".s('template').\"/comments.tpl.php\");\n\t}", "title": "" }, { "docid": "86bd5e2d107a48e20b9f6068103518ca", "score": "0.58308655", "text": "function responsive_comments() {\n\tif ( ! responsive_has_comment_support() ) {\n\t\treturn;\n\t}\n\n\tif ( comments_open() || get_comments_number() ) {\n\t\tcomments_template( '', true );\n\t}\n}", "title": "" }, { "docid": "8be162f4fe37002e7bd8fdda5e13847d", "score": "0.57686657", "text": "function getComments($post) {\n\t\tglobal $imSettings;\n\t\treturn $this->comments->getComments($imSettings['general']['dir'] . $imSettings['blog']['file_prefix'] . 'pc' . $post);\n\t}", "title": "" }, { "docid": "2f135ec43655eeb0ef2e93dca2c6c463", "score": "0.5763669", "text": "private function restrict_post_comments( WP_Post $post ) {\n\n\t\tif ( $post->comment_status !== 'closed' ) {\n\n\t\t\tif ( in_array( $post->post_type, array( 'product', 'product_variation' ), true ) ) {\n\t\t\t\t$comments_open = current_user_can( 'wc_memberships_view_restricted_product', $post->ID );\n\t\t\t} else {\n\t\t\t\t$comments_open = current_user_can( 'wc_memberships_view_restricted_post_content', $post->ID );\n\t\t\t}\n\n\t\t\tif ( ! $comments_open ) {\n\t\t\t\t$post->comment_status = 'closed';\n\t\t\t\t$post->comment_count = 0;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d0d5cbd0ad609eb07ee11ff9334e4791", "score": "0.5761916", "text": "public function preventComments( $open, $post_id ) {\n\t\t// If the current page has subpages, prevent comments from being displayed\n\t\tif ( is_page( $post_id ) && pixelgrade_multipage_has_children( $post_id ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $open;\n\t}", "title": "" }, { "docid": "ecee7b17d4ee83afe4f47772874b04b8", "score": "0.573408", "text": "function ForBlogs_comment( $comment, $args, $depth ) {\n\t\tglobal $post;\n\n\t\tswitch ( $comment->comment_type ) {\n\t\t\tcase 'pingback':\n\t\t\tcase 'trackback':\n\t\t\t\t// Display trackbacks differently than normal comments.\n\t\t\t\t?>\n\n\t\t\t\t<div <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\n\t\t\t\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"pingback\">\n\t\t\t\t\t\t<p><?php esc_html_e( 'Pingback:', 'ForBlogs' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( esc_html__( '(Edit)', 'ForBlogs' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t\t\t\t\t</article>\n\n\t\t\t\t</div>\n\n\t\t\t\t<?php\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// Proceed with normal comments.\n\t\t\t\t?>\n\n\t\t\t\t<div <?php comment_class( 'comment-wrapper' ); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t\t\t\t<div class=\"comment-avatar\">\n\t\t\t\t\t\t<?php echo get_avatar( $comment, 44 ); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"comment-container\"> \n\t\t\t\t\t\t<div class=\"comment-header\">\n\t\t\t\t\t\t\t<?php edit_comment_link( '<i class=\"fas fa-pencil-alt\"></i>', '<div class=\"comment-header-btn edit\">', '</div>' ); ?>\n\t\t\t\t\t\t\t<div class=\"comment-header-btn reply\">\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\tcomment_reply_link(\n\t\t\t\t\t\t\t\t\t\tarray_merge(\n\t\t\t\t\t\t\t\t\t\t\t$args,\n\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t'reply_text' => '<i class=\"fas fa-reply\"></i>',\n\t\t\t\t\t\t\t\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t\t\t\t\t\t\t\t'max_depth' => $args['max_depth'],\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\tif ( $comment->user_id === $post->post_author ) {\n\t\t\t\t\t\t\t\t$commenter_type_css = 'author';\n\n\t\t\t\t\t\t\t?>\n\n\t\t\t\t\t\t\t\t<div class=\"comment-label\">\n\t\t\t\t\t\t\t\t\t<?php esc_html_e( 'Author', 'ForBlogs' ); ?>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$commenter_type_css = 'reader';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t?>\n\n\t\t\t\t\t\t\t<div class=\"comment-header-text f-14\">\n\t\t\t\t\t\t\t\t<?php\n\n\t\t\t\t\t\t\t\tprintf( '<cite class=\"' . esc_attr( $commenter_type_css ) . '\">%1$s</cite>&nbsp;',\n\t\t\t\t\t\t\t\t\tget_comment_author_link()\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tprintf( '<a href=\"%1$s\" title=\"commented %2$s\" class=\"comment-link\"><time itemprop=\"datePublished\" datetime=\"%3$s\">%4$s</time></a>',\n\t\t\t\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\t\t\t\tsprintf( '%1$s @ %2$s', get_comment_date(), get_comment_time() ),\n\t\t\t\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: %s: days */\n\t\t\t\t\t\t\t\t\t\tesc_html__( 'commented %s ago', 'ForBlogs' ),\n\t\t\t\t\t\t\t\t\t\tesc_html( human_time_diff( get_comment_time( 'U' ), current_time( 'timestamp' ) ) )\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"comment-body\">\n\t\t\t\t\t\t\t<?php if ( '0' === $comment->comment_approved ) { ?>\n\t\t\t\t\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php esc_html_e( 'Your comment is awaiting moderation.', 'ForBlogs' ); ?></p>\n\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t<div class=\"comment-content comment\">\n\t\t\t\t\t\t\t\t<?php comment_text(); ?>\t\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<?php\n\t\t\t\tbreak;\n\t\t}\n\t\t// end - switch.\n\t}", "title": "" }, { "docid": "a81ea7400272778f82eb2b633ae3bcb9", "score": "0.5713791", "text": "public function comments()\n\t{\n\t\t$this->_crud->set_table('ent_jk_comments');\n\t\t$this->_crud->set_subject('Comment');\n\t\t$this->_crud->set_relation('ent_jk_jokes_id','ent_jk_jokes','title');\n\t\t$this->_crud->display_as('ent_jk_jokes_id', 'Joke');\n\t\t$this->_crud->required_fields('name', 'email', 'comments', 'ent_jk_jokes_id');\n\t\tstatic::$data['name'] = 'crud';\n\t\tstatic::$data['content_replace'] = $this->_crud->render();\n\n\t\t$this->_crud_output('main', static::$data);\n\t}", "title": "" }, { "docid": "9dfc952b536300d8fef23785cba07c9f", "score": "0.57129574", "text": "function comment($commentId, $postId){\n\n\t//Model\n\t$commentManager = new \\MVC_oc\\Blog\\Model\\CommentManager();\n\n $postManager = new \\MVC_oc\\Blog\\Model\\PostManager();\n\n \t$comment = $commentManager->getComment($commentId);\n \n $post = $postManager->getPost($postId);\n\n //Vue\n require('view/frontend/changeCommentView.php');\n}", "title": "" }, { "docid": "db8e7f9866bb016f61332685b735e78b", "score": "0.5710926", "text": "public function postView($slug)\n\t{\n\n $user = $this->user->currentUser();\n $canComment = $user->can('post_comment');\n\t\tif ( ! $canComment)\n\t\t{\n\t\t\treturn Redirect::to($slug . '#comments')->with('error', 'You need to be logged in to post comments!');\n\t\t}\n\n\t\t// Get this blog post data\n\t\t$post = $this->post->where('slug', '=', $slug)->first();\n\n\t\t// Declare the rules for the form validation\n\t\t$rules = array(\n\t\t\t'comment' => 'required|min:3'\n\t\t);\n\n\t\t// Validate the inputs\n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\t// Check if the form validates with success\n\t\tif ($validator->passes())\n\t\t{\n\t\t\t// Save the comment\n\t\t\t$comment = new Comment;\n\t\t\t$comment->user_id = Auth::user()->id;\n\t\t\t$comment->content = Input::get('comment');\n\n\t\t\t// Was the comment saved with success?\n\t\t\tif($post->comments()->save($comment))\n\t\t\t{\n\t\t\t\t// Redirect to this blog post page\n\t\t\t\treturn Redirect::to($slug . '#comments')->with('success', 'Your comment was added with success.');\n\t\t\t}\n\n\t\t\t// Redirect to this blog post page\n\t\t\treturn Redirect::to($slug . '#comments')->with('error', 'There was a problem adding your comment, please try again.');\n\t\t}\n\n\t\t// Redirect to this blog post page\n\t\treturn Redirect::to($slug)->withInput()->withErrors($validator);\n\t}", "title": "" }, { "docid": "b59da4b8b31bffb81e0325040069db8c", "score": "0.5709597", "text": "function bp_docs_list_comments() {\n\t$args = array();\n\n\tif ( function_exists( 'bp_dtheme_blog_comments' ) )\n\t\t$args['callback'] = 'bp_dtheme_blog_comments';\n\n\t$args = apply_filters( 'bp_docs_list_comments_args', $args );\n\n\twp_list_comments( $args );\n}", "title": "" }, { "docid": "056c42f02991579e45acac2bc6e2691e", "score": "0.5686911", "text": "function newsroom_elated_post_info_comments($config) {\n $default_config = array(\n 'comments' => ''\n );\n\n $params = (shortcode_atts($default_config, $config));\n\n if ($params['comments'] == 'yes') {\n newsroom_elated_get_module_template_part('templates/parts/post-info/post-info-comments', 'blog', '', $params);\n }\n }", "title": "" }, { "docid": "c2512644993fea8bc8d7be38c0d9c2fe", "score": "0.5663173", "text": "function get_post_comments($postid){\n\t\t$postobj = new stdClass();\n\t\t$postobj->ID = $postid;\n\t\t$postobj->permalink = $this->get_permalink($postid);\n\t\t$postobj->fb_endpoint = $this->format_endpoint($postobj->permalink);\n\t\t$this->save_comment($postobj, $postobj->fb_endpoint);\n\t}", "title": "" }, { "docid": "248c103005894014bacb1d59e5553f8f", "score": "0.56600606", "text": "function tj_tabs_comments( $posts = 5, $size = 35 ) {\n\tglobal $wpdb;\n\t$sql = \"SELECT DISTINCT ID, post_title, post_password, comment_ID,\n\tcomment_post_ID, comment_author, comment_author_email, comment_date_gmt, comment_approved,\n\tcomment_type,comment_author_url,\n\tSUBSTRING(comment_content,1,65) AS com_excerpt\n\tFROM $wpdb->comments\n\tLEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID =\n\t$wpdb->posts.ID)\n\tWHERE comment_approved = '1' AND comment_type = '' AND\n\tpost_password = ''\n\tORDER BY comment_date_gmt DESC LIMIT \".$posts;\n\t\n\t$comments = $wpdb->get_results($sql);\n\t\n\tforeach ($comments as $comment) {\n\t?>\n\t<li>\n\t\t<?php echo get_avatar( $comment, $size ); ?>\n\t\n\t\t<a href=\"<?php echo get_permalink($comment->ID); ?>#comment-<?php echo $comment->comment_ID; ?>\" title=\"<?php _e('on ', 'themejunkie'); ?> <?php echo $comment->post_title; ?>\">\n\t\t\t<?php echo strip_tags($comment->comment_author); ?>: <?php echo strip_tags($comment->com_excerpt); ?>...\n\t\t</a>\n\t\t<div class=\"clear\"></div>\n\t</li>\n\t<?php \n\t}\n}", "title": "" }, { "docid": "239e45ef24457bcf5b51883ecfe8c081", "score": "0.5633005", "text": "function newComment() {\r\n\t\t$postManager = new PostManager();\r\n\t\t$commentManager = new CommentManager();\r\n\t\t$post = $postManager->getPost($_GET['id']);\r\n\t\t$count = $commentManager->countComments($_GET['id']);\r\n\t\t\r\n\t\trequire('view/newComment.php');\r\n\t}", "title": "" }, { "docid": "d45ca59dcb92a86de037b2370292da4d", "score": "0.5623066", "text": "function getCommentPost($page_id = 1) \n{\n\t//Prerequisites\n\tif(userCheck())\n\t{\n\t\t$loggedin = 1;\n\t\t$username = userData('current', 'username');\n\t\t$location = userData('current', 'location');\n\t}\n\t$url = getUrl();\n\t$count = numComments($page_id);\n\t$public_comments_enable = $GLOBALS['public_comments_enable'];\n\t//\n\tif($loggedin = 1 or $public_comments_enable = 1)\n\t\t{\t\n\t\techo '\n\t\t<div class=\"comment\">\n\t\t<div id=\"'.$page_id.'_replyShow\">\n\t\t<form id=\"'.$page_id.'_mainForm\" name=\"form\" action=\"nc_comments/comments_process.php\" method=\"post\" enctype=\"multipart/form-data\">\n\t\t<input type=\"hidden\" name=\"page_id\" value=\"'.$page_id.'\" />\n\t\t<input type=\"hidden\" name=\"url\" value=\"'.$url.'\" />\n\t\t<textarea id=\"form_'.$page_id.'\" name=\"comments\" rows=\"2\" tabindex=\"1\" placeholder=\"Enter a comment...\" onfocus=\"ShowContent(\\''.$page_id.'_commentControls\\');\"></textarea>\n\t\t<span style=\"display:none;\" id=\"'.$page_id.'_commentControls\">';\n\t\tif(!isset($username))\n\t\t{\n\t\t\techo '<p align=\"right\"><span class=\"commentGuestForm\"><img id=\"captcha\" src=\"nc_core/securimage/securimage_show.php\" alt=\"CAPTCHA Image\" /><br />\n\t\t\t\t <a href=\"#\" onclick=\"document.getElementById(\\'captcha\\').src = \\'/securimage/securimage_show.php?\\' + Math.random(); return false\">[ Different Image ]</a><br />\n\t\t\t\t <input type=\"text\" name=\"captcha_code\" maxlength=\"6\" placeholder=\"Captcha...\"/><br />\n\t\t\t\t <input type=\"text\" name=\"name\" placeholder=\"Name...\" /><br />\n\t\t\t\t <input type=\"text\" name=\"location\" placeholder=\"Location...\" /><br />';\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo '<input type=\"hidden\" name=\"name\" value=\"'.$username.'\" />\n\t\t\t\t <input type=\"hidden\" name=\"location\" value=\"'.$location.'\" />\n\t\t\t\t <p align=\"right\"><span>';\n\t\t}\n\t\tif ($count == 0){\n\t\t\techo '<button type=\"button\" onclick=\"animateShowHide('.$page_id.');\" name=\"Cancel\" title=\"Cancel\">Cancel</button>';\n\t\t}\n\t\techo '<input type=\"submit\" value=\"Submit\" class=\"button\" />\n\t\t\t</span>\n\t\t\t</p>\n\t\t\t</span>\n\t\t\t</form>\n </div>';?>\n \t<script>\n\t\t\t/* attach a submit handler to the form */\n\t\t\t$(\"#<? echo $page_id; ?>_mainFrom\").submit(function(event) {\n\t\t\t\n\t\t\t/* stop form from submitting normally */\n\t\t\tevent.preventDefault(); \n\t\t\t\n\t\t\t/* get some values from elements on the page: */\n\t\t\tvar $form = $( this ),\n\t\t\tcode = $form.find( 'input[name=\"code\"]' ).val()\n\t\t\tname = $form.find( 'input[name=\"name\"]' ).val();\n\t\t\t\n\t\t\t/* Send the data using post and put the results in a div */\n\t\t\t$.post( 'nc_comments/comments_process.php', { name: name, code: code },\n\t\t\tfunction( data ) {\n\t\t\tvar content = $( data );\n\t\t\t$( \"#<? echo $page_id; ?>_replyShow\" ).empty().append( content );\n\t\t\t}\n\t\t\t);\n\t\t\t});\n\t\t\t</script>\n </div>\n <?\n\t\t}\n}", "title": "" }, { "docid": "357c0ed966f7a9f6406fa32ebc2a94dc", "score": "0.56176925", "text": "function addComment($postId, $author, $comment)\n{\n $postManager = new Writer\\Blog\\Model\\PostManager();\n $commentManager = new Writer\\Blog\\Model\\CommentManager();\n $blog = new Writer\\Blog\\Model\\BlogManager();\n \n $affectedLines = $commentManager->postComment($postId, $author, $comment);\n $post = $postManager->getPost($_GET['id']);\n $comments = $commentManager->getCommentsByDate($_GET['id']);\n $counter = $commentManager->matchComments($_GET['id']);\n $infosBlog = $blog->getBlog();\n \n if ($affectedLines === false) {\n \n throw new Exception ('Impossible d\\'ajouter le commentaire');\n }\n else {\n \n require('view/frontend/postView.php');\n } \n}", "title": "" }, { "docid": "2763824264b69469a6947d215ef9467f", "score": "0.5561827", "text": "function moderateComments () {\n\t// Set the number of lates comments to get\n\t$args_comments = array(\n\t\t'number' => '100'\n\t);\n\n\t// Get latest comments comments\n\t$comments = get_comments($args_comments);\n\n\t// Iterate results\n\tforeach($comments as $c) {\n\t\t// Get comments as na array\n\t\t$comment_array = get_comment( $c->comment_ID, ARRAY_A );\n\t\n\t\t// Iterate bad words file\n\t\t$lines = file('[BAD_WORDS_URL_HERE]', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);\n\t\tforeach ($lines as $line_num => $line) {\n\t\t\t// Replace bad words in a comment text with some stars\n\t\t\t$comment_array['comment_content'] = str_replace($line, \"****\", $comment_array['comment_content']);\n\t\t}\n\n\t\t// Update comment\n\t\twp_update_comment( $comment_array );\n\n\t}\n}", "title": "" }, { "docid": "7766d7584393f45267c2739cad495a6f", "score": "0.5560389", "text": "function kvell_edge_page_comments() {\n $comments = kvell_edge_show_comments();\n\n if ($comments) {\n comments_template('', true);\n }\n }", "title": "" }, { "docid": "51a17c140784395c85a5d4c67dd79139", "score": "0.5524764", "text": "public function a_user_can_see_comments_to_a_post()\n {\n $post = create('App\\Models\\Post');\n $comment = create('App\\Models\\Comment', ['post_id' => $post->id, 'parent_id' => null]);\n $this->get('/posts/' . $post->id)\n ->assertSee($comment->body);\n }", "title": "" }, { "docid": "e34dbe450902918befbf36e4656d8533", "score": "0.5523228", "text": "function edit($post)\n\t{\n\t\t$CI =& get_instance();\n\t\t$CI->load->model('user_model');\n\t\t\n\t\t$user_id = $CI->user_model->currentUser();\n\t\t\n\t\t$this->query->editComment($user_id, $post['media_id'], $post['comment'], $post['rating']);\n\t}", "title": "" }, { "docid": "41188c47c5337b4c804a99a5054519f9", "score": "0.55143565", "text": "function delComment()\n{ \n checkLogin();\n $post = new PostManager();\n \tif (isset($_GET['id']))\n {\n \t $post->deleteComment($_GET['id']);\n \t}\n \telse\n {\n $post->deleteComment();\n \t}\n \theader('Location:index.php?action=adminListPost');\n \n}", "title": "" }, { "docid": "4e37f63e3370a22317a6245ca2f3ebed", "score": "0.5511912", "text": "function yb_comments($disqus_shortname = '') {\n\tglobal $ybwp_data;\n\n\tif ( !empty($ybwp_data['opt-checkbox-disquscomments']) && !empty($disqus_shortname) ) {\n\t\tdisqus_embed($disqus_shortname);\n\t} else {\n\t\t\t// comments_template();\n\t\tyb_comments_old();\n\t}\n}", "title": "" }, { "docid": "75ea27d7dcbf92fbc5e62144a7b41fed", "score": "0.55063915", "text": "function close_comment() {?>\n\t</article>\n<?php\n}", "title": "" }, { "docid": "bc3926429c0724b5cfadba77e3e765f5", "score": "0.5493378", "text": "public function edit(blogComment $blogComment)\n {\n //\n }", "title": "" }, { "docid": "c3431b681f64c4fd41f3f43227b768cf", "score": "0.5484785", "text": "function &__openCommentsDB()\n{\n\tglobal $conf_comments_db;\n\treturn DBA::singleton($conf_comments_db);\n}", "title": "" }, { "docid": "0eed75e31cf158e057f15970b14260eb", "score": "0.54823065", "text": "function ideal_action_close_comments($node) {\r\n $node->comment = 1;\r\n return array('node' => $node);\r\n}", "title": "" }, { "docid": "76683415ef8c387c03b66a9b4b6c8a0a", "score": "0.5473924", "text": "public function getAllComments($post)\n {\n $posts = $post;\n foreach ($posts as $key => $list){\n echo \"<tr valign='top'>\\n\";\n echo \"<td>\".$list['user_id'] .\"</td>\\n\";\n echo \"<td>\".$list['tweet'] .\"<br/>\\n\";\n echo \"<span style='font-size: 9px;'>\".$list['date'] .\"</span></td>\\n\";\n echo \"</tr>\\n\";\n }\n }", "title": "" }, { "docid": "913dd6ea5f38554d0019e21a24197566", "score": "0.5462401", "text": "private function action_comments() {\n\t\tif (!$this->args['object_id']) \n\t\t\treturn false;\n\t\tglobal $wpdb;\n\t\t$sql = \"SELECT p.comment_count FROM \" . $wpdb->posts . \" p\n\t\t\tJOIN \" . $wpdb->comments . \" c ON c.comment_post_ID = p.ID\n\t\t\tWHERE p.comment_count = 1 AND c.comment_ID = %d\";\n\t\t$count = $wpdb->get_var( $wpdb->prepare($sql, $this->args['object_id']) );\n\t\tif ($count) {\n\t\t\t$this->gotbadge = 9;\n\t\t}\n\t}", "title": "" }, { "docid": "6bee420c4b7bb59dd4b914d6932a2360", "score": "0.5462289", "text": "public function comments_link( $post )\n\t{\n\t\tif ( !$post->info->comments_disabled || $post->comments->approved->count > 0 ) {\n\t\t\t$comment_count = $post->comments->approved->count;\n\t\t\techo \"<span class=\\\"commentslink\\\"><a href=\\\"{$post->permalink}#comments\\\" title=\\\"\" . _t('Comments on this post') . \"\\\">{$comment_count} \" . _n( 'Comment', 'Comments', $comment_count ) . \"</a></span>\";\n\t\t}\n\n\t}", "title": "" }, { "docid": "8a4f3edc9b5c4fb712fbea49222e0ae5", "score": "0.54578406", "text": "public function edit(){\n if (!empty($_POST)) {\n $result = $this->comment->update($_GET['comId'], [\n 'content' => $_POST['content'] \n ]);\n if($result){\n //redirection\n header('Location: ' . $this->getLocation());\n exit;\n }\n }\n\n $post = $this->comment->find($_GET['comId']);\n\n $title = 'Edition d\\'un commentaire';\n\n $form = new BootstrapForm($post);\n $this->render('Admin.Comments.edit', compact('form', 'title'));\n }", "title": "" }, { "docid": "b3d1cce3d6edcf4295a355e4fe93c26b", "score": "0.54542357", "text": "public function manageComment()\n {\n $all_cment = DB::table('comments')\n ->get();\n \n $manage_cmt_page = view('admin.pages.manage_comment')\n ->with('all_comments',$all_cment);\n return view('admin.admin_master')\n ->with('admin_main_content',$manage_cmt_page);\n }", "title": "" }, { "docid": "76eb5428b008e7b572c6701896cd91c1", "score": "0.54476297", "text": "function filter_media_comment_status( $open, $post_id ) {\n \t$post = get_post( $post_id );\n \tif( $post->post_type == 'attachment' ) {\n \t\treturn false;\n \t}\n \treturn $open;\n }", "title": "" }, { "docid": "3c59eaad870f80d142816ebb2b3d7ca2", "score": "0.5435918", "text": "public function newPostComment($postId){\n //User::loggedInCheck();\n\n\t\t//get post info\n\t\t$post = ForumPost::loadById($postId);\n\t\t$title = $post->get('title');\n\t\t$timestamp = $post->get('timestamp');\n\t\t$authorId = $post->get('userId');\n\t\t$description = $post->get('description');\n\t\t$tag = $post->get('tag');\n\n\t\t//convert SQL timestamp to readable date format\n\t\t$date = Event::convertToReadableDate($timestamp);\n\n\t\t//get username of author\n\t\t$author = User::loadById($authorId);\n\t\t$authorUsername = $author->get('username');\n\n\t\tinclude_once SYSTEM_PATH.'/view/createComment.html'; //TODO make sure the tpl is correct\n\t}", "title": "" }, { "docid": "863f1c0ff15bd264327889b9a177fd76", "score": "0.54271686", "text": "public static function fb_comment($title = \"Share your comment with us via Facebook\", $url = null, $post = 10, $width = 600, $colorscheme = 'light') {\n $siteurl = isset($url) ? $url : get_permalink();\n add_action('wp_footer', array('cwp_social', 'fb_comment_script'));\n\n ob_start();\n ?>\n <div class=\"fb-comment-box\">\n <h3><?php echo $title ?></h3>\n <div class=\"fb-comments\" data-href=\"<?php echo $siteurl ?>\" data-num-posts=\"<?php echo $post ?>\" data-colorscheme=\"<?php echo $colorscheme ?>\" data-width=\"<?php echo $width ?>\"></div>\n </div>\n\n <?php\n return $content = ob_get_clean();\n }", "title": "" }, { "docid": "51b2094143acef3d240367c4b889c2d7", "score": "0.5424201", "text": "function onetone_get_comments_popup_link( $zero = false, $one = false, $more = false, $css_class = '', $none = false ) {\n global $wpcommentspopupfile, $wpcommentsjavascript;\n \n $id = get_the_ID();\n \n if ( false === $zero ) $zero = __( 'No Comments', 'onetone');\n if ( false === $one ) $one = __( '1 Comment', 'onetone');\n if ( false === $more ) $more = __( '% Comments', 'onetone');\n if ( false === $none ) $none = __( 'Comments Off', 'onetone');\n \n $number = get_comments_number( $id );\n $str = '';\n \n if ( 0 == $number && !comments_open() && !pings_open() ) {\n $str = '<span' . ((!empty($css_class)) ? ' class=\"' . esc_attr( $css_class ) . '\"' : '') . '>' . $none . '</span>';\n return $str;\n }\n \n if ( post_password_required() ) {\n \n return '';\n }\n\t\n \n $str = '<a href=\"';\n if ( $wpcommentsjavascript ) {\n if ( empty( $wpcommentspopupfile ) )\n $home = home_url();\n else\n $home = get_option('siteurl');\n $str .= $home . '/' . $wpcommentspopupfile . '?comments_popup=' . $id;\n $str .= '\" onclick=\"wpopen(this.href); return false\"';\n } else { // if comments_popup_script() is not in the template, display simple comment link\n if ( 0 == $number )\n $str .= get_permalink() . '#respond';\n else\n $str .= get_comments_link();\n $str .= '\"';\n }\n \n if ( !empty( $css_class ) ) {\n $str .= ' class=\"'.$css_class.'\" ';\n }\n $title = the_title_attribute( array('echo' => 0 ) );\n \n $str .= apply_filters( 'comments_popup_link_attributes', '' );\n \n $str .= ' title=\"' . esc_attr( sprintf( __('Comment on %s', 'onetone'), $title ) ) . '\">';\n $str .= onetone_get_comments_number_str( $zero, $one, $more );\n $str .= '</a>';\n \n return $str;\n}", "title": "" }, { "docid": "aa77d8807d35c4a191f15f73c5d3dde2", "score": "0.54161423", "text": "public function postComment()\r\n\t{\r\n\t\t$name = strip_tags(Input::get(\"name\"));\r\n\t\t$text = strip_tags(Input::get('text'), '<b> <u> <i> <pre> ');\r\n\t\t$postID = strip_tags(Input::get('postID'));\r\n\t\t\r\n\t\t$text = Helper::strip_tag_attrs($text); //strip all attributes\r\n\t\t$text = Helper::url2link($text); //make links\r\n\t\t//pre tags to contain code:\r\n\t $text = str_replace(\"<pre>\", \"<pre><code>\", $text);\r\n\t\t$text = str_replace(\"</pre>\", \"</code></pre>\", $text);\r\n\t\t \r\n\t\t //Validation: \r\n\t\t if (!Input::has(\"g-recaptcha-response\") || Input::get(\"g-recaptcha-response\")==\"\" || Input::get(\"g-recaptcha-response\")==\" \" )\r\n\t\t\treturn Redirect::back()->withErrors( array (trans('public.captcha') ) ); \r\n\t\t \r\n\t\t$rules = array('name' => 'required|max:100', 'text' => 'required', 'postID' => 'numeric');\r\n\t\t$input = array('name' => $name, 'text' => $text, 'postID' =>$postID);\r\n\t\t$validator = Validator::make($input, $rules);\r\n\t\tif ($validator->fails()) //go back with errors...\r\n\t\t{\r\n\t\t\treturn Redirect::back()->withErrors($validator);\r\n\t\t}\r\n\t\r\n\t\t$cookieName = 'comsci-comment-'.sha1(time() . Request::getClientIp() );\r\n\t\t$now = date('Y-m-d h:i:s ', time());\r\n\t\tDB::table('comment')->insert( array('post_id' => $postID, 'writer' => $name, 'text' => $text, 'cookie_name' => $cookieName, 'created_at' => $now, 'updated_at' => $now ) );\r\n\t\t\r\n\t\tCookie::queue($cookieName, sha1($now), 2628000);\r\n\t\treturn Redirect::back()->withCookie( Cookie::forever($cookieName, sha1($now) ) );\r\n\t}", "title": "" }, { "docid": "45db326b2a9d0d059281f6ae8e49bbeb", "score": "0.54109937", "text": "function dogcompany_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t// Display trackbacks differently than normal comments.\n\t?>\n\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t<p><?php _e( 'Pingback:', 'dogcompany' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'dogcompany' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t\t// Proceed with normal comments.\n\t\tglobal $post;\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<div class=\"avatar-wrap\">\n\t\t\t\t<?php\techo get_avatar( $comment, 100 );?>\n\t\t\t</div>\n\t\t\t<div class=\"comment-wrap\">\n\t\t\t\t<div class=\"comment-meta comment-author vcard\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\tprintf( '<cite class=\"fn\">%1$s %2$s</cite>',\n\t\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span> ' . __( 'Post author', 'dogcompany' ) . '</span>' : ''\n\t\t\t\t\t\t);\n\t\t\t\t\t\tprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'dogcompany' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t\t);\n\t\t\t\t\t?>\n\t\t\t\t</div><!-- .comment-meta -->\n\n\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'dogcompany' ); ?></p>\n\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\n\t\t\t\t\t<section class=\"comment-content comment\">\n\t\t\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t\t</section><!-- .comment-content -->\n\n\t\t\t\t\t\t<?php edit_comment_link( __( 'Edit', 'dogcompany' ), '<div class=\"edit-wrap\"><a class=\"edit-link\">', '</a></div>' ); ?>\n\t\t\t\t\t<div class=\"reply\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tglobal $phpbbForum;\n\t\t\t\t\t\t\tif($phpbbForum->user_logged_in()) :\n\t\t\t\t\t\t\t\tcomment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'dogcompany' ), 'after' => '', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) );\n\t\t\t\t\t\t\telse: ?>\n\t\t\t\t\t\t\t<a onclick=\"openLog()\" class=\"reply-login\" href=\"#\">Log in</a>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div><!-- .reply -->\n\t\t\t</div>\n\t\t</article><!-- #comment-## -->\n\t<?php\n\t\tbreak;\n\tendswitch; // end comment_type check\n}", "title": "" }, { "docid": "5a67afb318ef82b5e4589483104a041c", "score": "0.54099554", "text": "function tfuse_action_comments() {\n global $post;\n if(TF_SEEK_HELPER::get_post_type() == get_post_type($post))\n {\n if(!tfuse_page_options('disable_comments', true))\n comments_template( '', true );\n }\n else\n {\n if (!tfuse_page_options('disable_comments'))\n comments_template( '', true );\n }\n\n }", "title": "" }, { "docid": "8e2c211c2c3a280b44586e836aff7204", "score": "0.5406913", "text": "function m9s_comment_control_links($id) {\r\n\tif (current_user_can('edit_post')) {\r\n\t\techo ' <a class=\"edit\" href=\"'.get_bloginfo('wpurl').'/wp-admin/comment.php?action=editcomment&c='.$id.'\">Edit</a>';\r\n\r\n\t\t// echo '<a class=\"feature-comments feature\" title=\"Feature\" data-comment_id=\"'.$id.'\" data-do=\"feature\">Feature</a>\r\n\t\t// <a class=\"feature-comments unfeature feature\" title=\"Unfeature\" data-comment_id=\"'.$id.'\" data-do=\"unfeature\">Unfeature</a>';\r\n\t\t// echo '<a class=\"feature-comments bury\" title=\"Bury\" data-comment_id=\"'.$id.'\" data-do=\"bury\">Bury</a>\r\n\t\t// <a class=\"feature-comments unbury bury\" title=\"Unbury\" data-comment_id=\"'.$id.'\" data-do=\"unbury\">Unbury</a>';\r\n\r\n\t\techo ' <a class=\"del\" href=\"'.get_bloginfo('wpurl').'/wp-admin/comment.php?action=cdc&c='.$id.'\">Delete</a> ';\r\n\t\techo ' <a class=\"spam\" href=\"'.get_bloginfo('wpurl').'/wp-admin/comment.php?action=cdc&dt=spam&c='.$id.'\">Spam</a>';\r\n\t}\r\n}", "title": "" }, { "docid": "4f1ad4a1e805b107323c8d7c64ff828c", "score": "0.54065984", "text": "function get_post_comments($post_id, $fullComments=false)\n\t{\n\t\tglobal $db;\n\t\t$user_id = isset($_COOKIE['user_id']) ? $_COOKIE['user_id'] : 0;\n\t\t$comment = '';\n\n\t\tif( $fullComments != false )\n\t\t{\n\t\t\t$query = $db->query(\"SELECT id, val_8, val_9, val_int, val_text, val_date FROM `gwp_post_meta` \n\t\t\t\t\t\t\t\tWHERE `post_id` = '$post_id' AND `status` = '1' AND `group` = 'comment' AND `key` = 'comment'\n\t\t\t\t\t\t\t\tORDER BY id ASC\");\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t$query = $db->query(\"SELECT id, val_8, val_9, val_int, val_text, val_date FROM (SELECT id, val_8, val_9, val_int, val_text, val_date FROM `gwp_post_meta` \n\t\t\t\t\t\t\t\tWHERE `post_id` = '$post_id' AND `status` = '1' AND `group` = 'comment' AND `key` = 'comment'\n\t\t\t\t\t\t\t\tORDER BY id DESC\n\t\t\t\t\t\t\t\tLIMIT 0, 5) As AliasName ORDER BY id ASC\");\n\t\t\t$count = get_post_comment_amount($post_id);\n\t\t\t\n\t\t\tif($count > 5) {\n\t\t\t\t$count -= 5;\n\t\t\t\t$comment .= '<a href=\"post.php?id='.$post_id.'\" class=\"link2oldComments\">Diğer <strong>'.$count.'</strong> yorumu görmek için tıklayın</a>';\n\t\t\t}\n\t\t}\n\t\twhile($obj = $query->fetch(PDO::FETCH_OBJ))\n\t\t{\n\t\t\t$comment_id \t\t= $obj->id;\n\t\t\t$commenter_img \t\t= get_an_user_image($obj->val_int);\n $commenter_title = select_query(\"userbranch\", \"gwp_users\", \"id = $obj->val_int\", \"title\").' '.select_query(\"usertitle\", \"gwp_users\", \"id = $obj->val_int\", \"title\");\n\t\t\t$commenter_name \t= get_an_user_fullname($obj->val_int, \"title\");\n\t\t\t$time_since_post \t= time_since_post($obj->val_date);\n\n\t\t\t$comment_delete = ($obj->val_int == $user_id ? '<a onClick=\"return confirm('.\"'Bu yorumu silmek istediğinizden emin misiniz?'\".')\" href=\"delete_comment.php?comment_delete='.$comment_id.'\" class=\"deleteComment\">X</a>' : '');\n\t\t\t$star_color \t= ($obj->val_8 == 1 ? 'yellow' : 'dark');\n\t\t\t$comment_star \t= ($obj->val_9 == $user_id ? '<a href=\"#\" role=\"button\" class=\"js-vote commentStar\" data-id=\"'.$comment_id.'\"><i class=\"fa fa-star '.$star_color.'\"></i></a>' : ($obj->val_8 == 1 ? '<a href=\"\" role=\"button\" class=\"commentStar\" data-id=\"'.$comment_id.'\"><i class=\"fa fa-star '.$star_color.'\"></i></a>' : '' ) );\n\n $like_count = $db->query(\"SELECT `id`, `val_int` FROM `gwp_post_meta` WHERE `group` = 'like' AND `key` = 'comment_like' AND `post_id` = '$comment_id'\")->rowCount();\n $like_status = $db->query(\"SELECT `id` FROM `gwp_post_meta` WHERE `group` = 'like' AND `key` = 'comment_like' AND `post_id` = '$comment_id' AND `val_int` = '$user_id'\")->rowCount();\n $like = ($like_status != 0 ? '<a href=\"#\" role=\"button\" class=\"like\" data-type=\"comment\" data-id=\"'.$comment_id.'\" data-post=\"'.$post_id.'\" data-object=\"'.$obj->val_int.'\"\"><i class=\"fa fa-thumbs-up\"></i>&nbsp;Beğendin <span>'.$like_count.' Kişi Beğendi</span></a>' : '<a href=\"#\" role=\"button\" class=\"like js-like\" data-type=\"comment\" data-id=\"'.$comment_id.'\" data-post=\"'.$post_id.'\" data-object=\"'.$obj->val_int.'\"\"><i class=\"fa fa-thumbs-up\"></i>&nbsp;Beğen <span>'.$like_count.' Kişi Beğendi</span></a>');\n\n\t\t\t$comment .= '<div class=\"row commentBox\">';\n\t\t\t$comment .= '<a href=\"profile.php?url=general&profile_id='.$obj->val_int.'\" class=\"col-md-2 col-xs-2\"><img src=\"'.$commenter_img.'\" class=\"img-responsive\" /></a>';\n\t\t\t$comment .= '<div class=\"col-md-10 col-xs-10\">';\n\t\t\t$comment .= '<a href=\"profile.php?url=general&profile_id='.$obj->val_int.'\" class=\"profile\">'.$commenter_title.' '.$commenter_name.'</a>';\n\t\t\t$comment .= $comment_delete;\n\t\t\t// Yorumu yıldızlayarak onaylama kaldırıldı fakat sistem çalışır durumda. Kulalncıya tekrar göstermek için yorumu kaldır\n //$comment .= $comment_star;\n\t\t\t$comment .= '<div class=\"commentContent\"><p>'.$obj->val_text.'</p></div>';\n\t\t\t$comment .= '<footer>';\n $comment .= $like;\n $comment .= '<span class=\"data pull-right\">'.$time_since_post.' Önce</span>';\n $comment .= '</footer>';\n\t\t\t$comment .= '</div>'; //end: /.col-md-10\n\t\t\t$comment .= '</div>'; //end: /.row (commentBox)\n\t\t}\n\t\treturn $comment;\n\t}", "title": "" }, { "docid": "5248d956466dd8653b68027ccddf322a", "score": "0.5405398", "text": "function cafemocha_comment($comment, $args, $depth) {\n\n $GLOBALS['comment'] = $comment;\n\n switch ($comment->comment_type) :\n\n case 'pingback' :\n\n case 'trackback' :\n\n // Display trackbacks differently than normal comments.\n\n ?>\n\n <li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\n <p><?php _e('Pingback:', 'cafemocha'); ?> <?php comment_author_link(); ?> <?php edit_comment_link(__('(Edit)', 'cafemocha'), '<span class=\"edit-link\">', '</span>'); ?></p>\n\n <?php\n\n break;\n\n default :\n\n // Proceed with normal comments.\n\n global $post;\n\n ?>\n\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\n <article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\n <header class=\"comment-meta comment-author vcard\">\n\n <?php\n\n echo get_avatar($comment, 44);\n\n printf('<cite><b class=\"fn\">%1$s</b> %2$s</cite>', get_comment_author_link(),\n\n // If current post author is also comment author, make it known visually.\n\n ( $comment->user_id === $post->post_author ) ? '<span>' . __('Post author', 'cafemocha') . '</span>' : ''\n\n );\n\n printf('<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>', esc_url(get_comment_link($comment->comment_ID)), get_comment_time('c'),\n\n /* translators: 1: date, 2: time */ sprintf(__('%1$s at %2$s', 'cafemocha'), get_comment_date(), get_comment_time())\n\n );\n\n ?>\n\n </header><!-- .comment-meta -->\n\n\n\n <?php if ('0' == $comment->comment_approved) : ?>\n\n <p class=\"comment-awaiting-moderation\"><?php _e('Your comment is awaiting moderation.', 'cafemocha'); ?></p>\n\n <?php endif; ?>\n\n\n\n <section class=\"comment-content comment\">\n\n <?php comment_text(); ?>\n\n <?php edit_comment_link(__('Edit', 'cafemocha'), '<p class=\"edit-link\">', '</p>'); ?>\n\n </section><!-- .comment-content -->\n\n\n\n <div class=\"reply\">\n\n <?php comment_reply_link(array_merge($args, array('reply_text' => __('Reply', 'cafemocha'), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?>\n\n </div><!-- .reply -->\n\n </article><!-- #comment-## -->\n\n <?php\n\n break;\n\n endswitch; // end comment_type check\n\n }", "title": "" }, { "docid": "c2c718a2e22673f3e4ff9c24ef338132", "score": "0.5401991", "text": "function filter_media_comment_status( $open, $post_id ) {\n\t\t$post = get_post( $post_id );\n\t\tif( $post->post_type == 'attachment' ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $open;\n\t}", "title": "" }, { "docid": "c2c718a2e22673f3e4ff9c24ef338132", "score": "0.5401991", "text": "function filter_media_comment_status( $open, $post_id ) {\n\t\t$post = get_post( $post_id );\n\t\tif( $post->post_type == 'attachment' ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $open;\n\t}", "title": "" }, { "docid": "6a78ac093eeeaaf69918277a4c828948", "score": "0.5398216", "text": "function tfuse_get_comments($return = TRUE, $post_ID) {\n $num_comments = get_comments_number($post_ID);\n\n if (comments_open($post_ID)) {\n if ($num_comments == 0) {\n $comments = __('No Comments','tfuse');\n } elseif ($num_comments > 1) {\n $comments = $num_comments . __(' Comments','tfuse');\n } else {\n $comments = __('1 Comment','tfuse');\n }\n $write_comments = '<a class=\"link-comments\" href=\"' . get_comments_link($post_ID) . '\">' . $comments . '</a>';\n } else {\n $write_comments = __('Comments are off','tfuse');\n }\n if ($return)\n return $write_comments;\n else\n echo $write_comments;\n }", "title": "" }, { "docid": "eea8064f54f856892799e732146e8c60", "score": "0.5394895", "text": "private function deleteComment() {\n\t\tif( !isset($_SESSION['id']) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure user owns comment\n\t\t\n\t\t$postID = $this->dbc->real_escape_string($_GET['postid']);\n\t\t$commentID = $this->dbc->real_escape_string($_GET['commentid']);\n\t\t$userID = $_SESSION['id'];\n\t\t$privilege = $_SESSION['privilege'];\n\n\t\t\n\n\n\t\t// Check to see if comment there and they are owner\n\t\t$sql = \"SELECT comment, post_id\n\t\t\t\tFROM comments\n\t\t\t\tWHERE id = $commentID\";\n\n\t\t// ** Privilege Check ** if the user is not an admin check user_id too\n\t\tif( $privilege != 'admin' ) {\n\t\t\t$sql .= \" AND user_id = $userID\";\n\t\t}\t\t\n\t\t\t\t\n\t\t// Run this image read query\n\t\t$result = $this->dbc->query($sql);\n\n\t\t// If the query failed - post doesn't exist OR user doesn't own it\n\t\t// Return will stop Delete function & let rest of page code run\n\t\tif ( !$result || $result->num_rows == 0 ) {\n\t\t\treturn;\n\t\t}\t\t\n\n\t\t$result = $result->fetch_assoc();\n\n\t\t// Prepare the sql\n\t\t$sql = \"DELETE FROM comments\n\t\t\t\tWHERE id = $commentID\";\n\n\t\t// Run the query\n\t\t$this->dbc->query($sql);\n\n\t\t// Redirect user back to blogPost page with the relvent post\n\n\t\theader('Location: index.php?page=blogPost&postid='.$postID);\n\n\t\t// Die below needed as otherwiese header redirect fails\n\t\tdie();\t\t\n\n\t}", "title": "" }, { "docid": "f05dcaf1fa05198364634b7c48be1ba8", "score": "0.5392789", "text": "public function inactivePostsWithComments() {\n \n $posts = Post::where('is_active', 0)->with('comments')->get();\n \n foreach($posts as $post){\n echo 'Inactive Post: '. $post->title .'<br> ';\n foreach($post->comments as $comment){\n echo 'Commetnts: '. $comment->comment. '<br> ';\n }\n echo '<br>';\n }\n }", "title": "" }, { "docid": "7f2a7119479a306df15e66ff43021d4b", "score": "0.5391505", "text": "public function deleteComment($postid){\r\n $mysql = new mysql();\r\n return $mysql->deleteComment($postid);\r\n \r\n }", "title": "" }, { "docid": "9e79c5a9a128ee2d02dc5510c794f8d1", "score": "0.5383559", "text": "public function run()\n {\n $posts = App\\Models\\BlogPost::all();\n\n if ($posts->count() === 0) {\n $this->command->info('There are no blog posts, so no comments will be added');\n return;\n }\n\n $commentsCount = (int)$this->command->ask('How many comments would you like?', 150);\n \n $comment = Comment::factory()->count($commentsCount)->make()->each(function ($comment) use ($posts) {\n $comment->blog_post_id = $posts->random()->id;\n $comment->save();\n });\n }", "title": "" }, { "docid": "c14d1cab208913c5141cc4f82b0f5145", "score": "0.537309", "text": "function yourfitness_comments_template() {\n\n\tglobal $post;\n\n\tif ( !( comments_open() || get_comments_number() ) || !post_type_supports( yourfitness_get( 'post_type', $post ), 'comments' ) )\n\t\treturn;\n\n\tcomments_template();\n\n}", "title": "" }, { "docid": "6624a9006e0984ecda69fe52cb6dca3a", "score": "0.5365354", "text": "function wpbootstrap_comments($comment, $args, $depth) {\r\n $GLOBALS['comment'] = $comment; ?>\r\n\t<li <?php comment_class(); ?>>\r\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\r\n\t\t\t<div class=\"comment-author vcard row clearfix\">\r\n\t\t\t\t<div class=\"avatar span1\">\r\n\t\t\t\t\t<?php echo get_avatar($comment,$size='75',$default='<path_to_url>' ); ?>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"span7\">\r\n\t\t\t\t\t<?php printf(__('<h4>%s</h4>'), get_comment_author_link()) ?>\r\n\t\t\t\t\t<?php edit_comment_link(__('Edit'),'<span class=\"edit-comment btn btn-small btn-info\">','</span>') ?>\r\n \r\n <?php if ($comment->comment_approved == '0') : ?>\r\n \t\t\t\t\t<div class=\"alert alert-success\">\r\n \t\t\t\t<p><?php _e('Your comment is awaiting moderation.') ?></p>\r\n \t\t\t\t</div>\r\n\t\t\t\t\t<?php endif; ?>\r\n \r\n <?php comment_text() ?>\r\n \r\n <time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time('F jS, Y'); ?> </a></time>\r\n \r\n </div>\r\n\t\t\t</div>\r\n\t\t</article>\r\n <!-- </li> is added by wordpress automatically -->\r\n<?php\r\n}", "title": "" }, { "docid": "6b6eb44c49f930fad1fbb31e02842770", "score": "0.5365159", "text": "function buggvibe_blog_comments( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\n\tif ( 'pingback' == $comment->comment_type )\n\t\treturn false;\n\n\tif ( 1 == $depth )\n\t\t$avatar_size = 50;\n\telse\n\t\t$avatar_size = 25;\n\t?>\n\n\t<li <?php comment_class() ?> id=\"comment-<?php comment_ID() ?>\">\n\t\t<div class=\"comment-avatar-box\">\n\t\t\t<div class=\"avb\">\n\t\t\t\t<a href=\"<?php echo get_comment_author_url() ?>\" rel=\"nofollow\">\n\t\t\t\t\t<?php if ( $comment->user_id ) : ?>\n\t\t\t\t\t\t<?php echo buggm_get_avatar($comment->user_id, $avatar_size) ?>\n\t\t\t\t\t<?php else : ?>\n\t\t\t\t\t\t<?php echo get_avatar( $comment, $avatar_size ) ?>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class=\"comment-content\">\n\t\t\t<div class=\"comment-meta\">\n\t\t\t\t<p>\n\t\t\t\t\t<?php\n\t\t\t\t\t\t/* translators: 1: comment author url, 2: comment author name, 3: comment permalink, 4: comment date/timestamp*/\n\t\t\t\t\t\tprintf( __( '<a href=\"%1$s\" rel=\"nofollow\">%2$s</a> said on <a href=\"%3$s\"><span class=\"time-since\">%4$s</span></a>', 'buggvibe' ), get_comment_author_url(), get_comment_author(), get_comment_link(), get_comment_date() );\n\t\t\t\t\t?>\n\t\t\t\t</p>\n\t\t\t</div>\n\n\t\t\t<div class=\"comment-entry\">\n\t\t\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t\t \t<em class=\"moderate\"><?php _e( 'Your comment is awaiting moderation.', 'buggvibe' ); ?></em>\n\t\t\t\t<?php endif; ?>\n\n\t\t\t\t<?php comment_text() ?>\n\t\t\t</div>\n\n\t\t\t<div class=\"comment-options\">\n\t\t\t\t\t<?php if ( comments_open() ) : ?>\n\t\t\t\t\t\t<?php comment_reply_link( array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ); ?>\n\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t<?php if ( current_user_can( 'edit_comment', $comment->comment_ID ) ) : ?>\n\t\t\t\t\t\t<?php printf( '<a class=\"button comment-edit-link bp-secondary-action\" href=\"%1$s\" title=\"%2$s\">%3$s</a> ', get_edit_comment_link( $comment->comment_ID ), esc_attr__( 'Edit comment', 'buggvibe' ), __( 'Edit', 'buggvibe' ) ) ?>\n\t\t\t\t\t<?php endif; ?>\n\n\t\t\t</div>\n\n\t\t</div>\n\n<?php\n}", "title": "" }, { "docid": "98416ec40ff12f2716e369aa70ae0ab8", "score": "0.5363952", "text": "function loadComments($comment_idnm, $post_idnum, $dbconn, $post_plang) {\n if ($comment_idnm == NULL) {\n $results = $dbconn->get_full('SELECT * FROM comment WHERE thread_Post_ID = ? AND parent_Comment_ID IS NULL',\n ValType::INT, $post_idnum);\n } else {\n $results = $dbconn->get_full('SELECT * FROM comment WHERE thread_Post_ID = ? AND parent_Comment_ID = ?',\n ValType::INT, $post_idnum, ValType::INT, $comment_idnm);\n }\n\n // Display each comment (Recursively loads each comment's comments as well)\n if ($results != NULL) {\n while ($comment = $results->fetch_assoc()) {\n $comment_idnm = $comment['ID_Comment'];\n $comment_text = $comment['contentText'];\n $comment_time = $comment['timeCreated'];\n $userid = $comment['creator_User_ID'];\n\n if ($userid != NULL) {\n $comment_auth = $dbconn->get_cell('SELECT username FROM user WHERE ID_User = ?', ValType::INT, $userid);\n } else {\n $comment_auth = '[deleted]';\n }\n\n include 'comment.php';\n }\n }\n }", "title": "" }, { "docid": "e1ca6208b3e1e9d6996ed0c2f7d9a998", "score": "0.5363576", "text": "function workscout_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n switch ( $comment->comment_type ) :\n case 'pingback' :\n case 'trackback' :\n ?>\n <li class=\"post pingback\">\n <p><?php esc_html_e( 'Pingback:', 'workscout' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( esc_html__( '(Edit)', 'workscout' ), ' ' ); ?></p>\n <?php\n break;\n default :\n $allowed_tags = wp_kses_allowed_html( 'post' );\n ?>\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <div id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n <?php echo get_avatar( $comment, 70 ); ?>\n <div class=\"comment-content\"><div class=\"arrow-comment\"></div>\n <div class=\"comment-by\"><?php printf( '<strong>%s</strong>', get_comment_author_link() ); ?> <span class=\"date\"> <?php printf( esc_html__( '%1$s at %2$s', 'workscout' ), get_comment_date(), get_comment_time() ); ?></span>\n <?php comment_reply_link( array_merge( $args, array( 'reply_text' => wp_kses(__('<i class=\"fa fa-reply\"></i> Reply','workscout'), $allowed_tags ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n </div>\n <?php comment_text(); ?>\n\n </div>\n </div>\n <?php\n break;\n endswitch;\n}", "title": "" }, { "docid": "18380d2d095a85388a30fee2fb173ed3", "score": "0.5350892", "text": "public function comment($id) {\n if (isLoggedIn()) {\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $data = [\n 'username' => getUsername(),\n 'postId' => $id,\n 'comment' => $_POST['comment'],\n 'comment_err' => '',\n ];\n if (empty($data['comment'])) {\n $data['comment_err'] = 'Comment can not be empty :(';\n }\n\n if (empty($data['comment_err'])) {\n $this->postModel->addComment($data);\n flash('post-message', 'Comment Seccessfully Added :)');\n redirect('posts/blog');\n } else {\n flash('post-message', $data['comment_err'], 'alert alert-danger');\n redirect('posts/blog');\n }\n\n } else {\n flash('error', 'you are not allowed to get here', 'alert alert-danger');\n redirect('pages/index');\n }\n } else {\n flash('error', 'you are not allowed you should sign in', 'alert alert-danger');\n redirect('pages/index');\n }\n }", "title": "" }, { "docid": "7367339c82832d6d373bc6a44f5e0976", "score": "0.5346594", "text": "function biz_vektor_fbComments() {\n\t$options = biz_vektor_get_sns_options();\n\tglobal $wp_query;\n\t$post = $wp_query->get_queried_object();\n\t$fbCommentHiddenFlag = false ;\n\t// is stored as an array to $snsHiddens to split with \",\" $snsBtnsHidden\n\t$fbCommentHiddens = explode(\",\",$options['fbCommentsHidden']);\n\tforeach( $fbCommentHiddens as $fbCommentHidden ){\n\t\tif (get_the_ID() == $fbCommentHidden) {\n\t\t\t$fbCommentHiddenFlag = true ;\n\t\t}\n\t}\n\twp_reset_query();\n\tif (!$fbCommentHiddenFlag) {\n\t\tif (\n\t\t\t( is_front_page() && $options['fbCommentsFront'] ) || \n\t\t\t( is_page() && $options['fbCommentsPage'] && !is_front_page() ) || \n\t\t\t( get_post_type() == 'info' && $options['fbCommentsInfo'] ) || \n\t\t\t( get_post_type() == 'post' && $options['fbCommentsPost'] )\n\t\t\t) \n\t\t{\n\t\t\t?>\n\t\t\t<div class=\"fb-comments\" data-href=\"<?php the_permalink(); ?>\" data-num-posts=\"2\" data-width=\"640\"></div>\n\t\t\t<style>\n\t\t\t.fb-comments,\n\t\t\t.fb-comments span,\n\t\t\t.fb-comments iframe[style] { width:100% !important; }\n\t\t\t</style>\n\t\t\t<?php\n\t\t}\n\t}\n}", "title": "" }, { "docid": "15cfb1d66cc896ba2662302561c64566", "score": "0.53453165", "text": "function _show_most_commented($params = array()) {\n\t\tif (!empty($_GET[\"id\"])) {\n\t\t\t$_GET[\"page\"] = intval($_GET[\"id\"]);\n\t\t\tunset($_GET[\"id\"]);\n\t\t}\n\t\t// Get most commented posts\n\t\t$sql = \"SELECT \n\t\t\t\tc.object_id AS post_id,\n\t\t\t\tb.user_id,\n\t\t\t\tb.add_date AS post_date,\n\t\t\t\tb.privacy,\n\t\t\t\tb.allow_comments,\n\t\t\t\tb.title AS post_title, \n\t\t\t\tb.num_reads, \n\t\t\t\tCOUNT(c.id) AS num_comments,\n\t\t\t\tSUBSTRING(b.text FROM 1 FOR \".intval(module('blog')->POST_TEXT_PREVIEW_LENGTH).\") AS post_text \n\t\t\tFROM \".db('comments').\" AS c,\n\t\t\t\t\".db('blog_posts').\" AS b \n\t\t\tWHERE c.object_name='\"._es('blog').\"' \n\t\t\t\tAND b.active=1 \n\t\t\t\tAND b.id=c.object_id \n\t\t\t\tAND b.privacy NOT IN(9)\n\t\t\t\tAND b.allow_comments NOT IN(9)\n\t\t\tGROUP BY c.object_id \n\t\t\t\";\n\t\t// Geo filter\n\t\tif (module('blog')->ALLOW_GEO_FILTERING && GEO_LIMIT_COUNTRY != \"GEO_LIMIT_COUNTRY\" && GEO_LIMIT_COUNTRY != \"\") {\n\t\t\t$sql .= \" HAVING b.user_id IN (SELECT id FROM \".db('user').\" WHERE country = '\"._es(GEO_LIMIT_COUNTRY).\"') \";\n\t\t}\n\t\t$order_by_sql = \" ORDER BY num_comments DESC\";\n\t\t// Prepare pager\n\t\t$path = \"./?object=\".'blog'.\"&action=\".$_GET[\"action\"];\n\t\t$GLOBALS['PROJECT_CONF'][\"divide_pages\"][\"SQL_COUNT_REWRITE\"] = false;\n\t\tlist($add_sql, $pages, $total, $counter) = common()->divide_pages($sql, $path, null, module('blog')->STATS_NUM_MOST_COMMENTED * module('blog')->FROM_DB_MULTIPLY);\n\t\t// Get from db\n\t\t$Q = db()->query($sql. $order_by_sql. $add_sql);\n\t\twhile ($A = db()->fetch_assoc($Q)) {\n\t\t\t$blog_comments_ids[$A[\"post_id\"]] = $A;\n\t\t\t$users_ids[$A[\"user_id\"]] = $A[\"user_id\"];\n\t\t}\n\t\tunset($users_ids[\"\"]);\n\t\t// Get users infos and settings\n\t\tif (!empty($users_ids))\t{\n\t\t\t$this->_users_infos = user($users_ids, array(\"id\",\"name\",\"nick\",\"profile_url\",\"photo_verified\"), array(\"WHERE\" => array(\"active\" => 1)));\n\t\t\t$this->_users_blog_settings = module('blog')->_get_blog_settings_for_user_ids($users_ids);\n\t\t}\n\t\t$posts_ids = array_keys($blog_comments_ids);\n\t\tif (!empty($posts_ids)) {\n\t\t\t$this->_num_comments = module('blog')->_get_num_comments(implode(\",\",$posts_ids));\n\t\t}\n\t\t// Process most commented posts\n\t\t$most_commented_posts\t= $this->_process_stats_item($blog_comments_ids, $counter, module('blog')->STATS_NUM_MOST_COMMENTED, $params);\n\n\t\t// For widgets\n\t\tif ($params[\"for_widgets\"]) {\n\t\t\t// Process main template\n\t\t\t$replace = array(\n\t\t\t\t\"most_commented_posts\"\t=> $most_commented_posts,\n\t\t\t);\n\t\t\treturn tpl()->parse('blog'.\"/widget_most_commented\", $replace);\n\t\t}\n\n\t\t// Process main template\n\t\t$replace = array(\n\t\t\t\"is_logged_in\"\t\t\t=> intval((bool) main()->USER_ID),\n\t\t\t\"show_own_posts_link\"\t=> main()->USER_ID ? \"./?object=\".'blog'.\"&action=show_posts\"._add_get(array(\"page\")) : \"\",\n\t\t\t\"change_settings_link\"\t=> main()->USER_ID ? \"./?object=\".'blog'.\"&action=settings\"._add_get(array(\"page\")) : \"\",\n\t\t\t\"all_blogs_link\"\t\t=> \"./?object=\".'blog'.\"&action=show_all_blogs\"._add_get(array(\"page\")),\n\t\t\t\"most_commented_posts\"\t=> $most_commented_posts,\n\t\t\t\"pages\"\t\t\t\t\t=> $pages,\n\t\t\t\"total\"\t\t\t\t\t=> intval($total),\n\t\t);\n\t\treturn tpl()->parse('blog'.\"/most_commented_main\", $replace);\n\t}", "title": "" }, { "docid": "1bf80b59e5ca32fd797dd2c1226bd574", "score": "0.53406507", "text": "function webtecker_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback media\">\n\t\t<p><?php _e( 'Pingback:', 'webtecker' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'webtecker' ), ' ' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t?>\n\t<li class=\"media\" id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<footer>\n <div class=\"pull-left\">\n <?php echo get_avatar( $comment, 40 ); ?>\n </div>\n\t\t\t\t\t<?php printf( __( '%s ', 'webtecker' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\t\t\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t\t\t<em><?php _e( 'Your comment is awaiting moderation.', 'webtecker' ); ?></em>\n\t\t\t\t\t<br />\n\t\t\t\t<?php endif; ?>\n\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\"><time pubdate datetime=\"<?php comment_time( 'c' ); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\tprintf( __( '<br /> %1$s at %2$s <span class=\"says\">says:</span>', 'webtecker' ), get_comment_date(), get_comment_time() ); ?>\n\t\t\t\t\t</time></a>\n\t\t\t\t\t<?php edit_comment_link( __( '(Edit)', 'webtecker' ), ' ' );\n\t\t\t\t\t?>\n \n\t\t\t</footer>\n\n\t\t\t<div class=\"comment-content\"><?php comment_text(); ?></div>\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\n\t<?php\n\t\t\tbreak;\n\tendswitch;\n}", "title": "" }, { "docid": "a2680f9db3e63db03c5056c3aed17730", "score": "0.5337425", "text": "public function showCommentsAdmin($post_id){\r\n\t\t$myModel = new CommentModel();\r\n\t\t$data = $myModel->getCommentsAdmin($post_id);\r\n\t\t$myView = new CommentView();\r\n\t\treturn $myView->showCommentsAdmin($data);\r\n\t}", "title": "" }, { "docid": "b5c81b63aaf3942fb7693e499daea229", "score": "0.53349465", "text": "public function newPostComment_submit(){\n //User::loggedInCheck();\n\n\t//\tinclude_once SYSTEM_PATH.'/view/forumcomment.html';\n\n\t\tif (isset($_POST['Cancel'])) {\n\t\t\theader('Location: '.BASE_URL.'/viewcomments/'.$_POST['postId']);\n\t\t\texit();\n\t\t}\n\n\t\t$timestamp = date(\"Y-m-d\", time());\n\t\t$text = $_POST['comment'];\n\t\t$postId = $_POST['postId'];\n\n\t\tif ($text == \"\")\n\t\t{\n\t\t\t$_SESSION['error'] = 'Please complete all fields.';\n\t\t\tself::newPostComment($postId);\n\t\t\texit();\n\t\t}\n\n\t\t//get author's id\n\t\t$authorId = $_SESSION['userId'];\n\n\t\t$comment = new Comment();\n\t\t$comment->set('timestamp', $timestamp);\n\t\t$comment->set('comment', $text);\n\t\t$comment->set('postId', $postId);\n\t\t$comment->set('userId', $authorId);\n\t\t$comment->save();\n\n\t\theader('Location: '.BASE_URL.'/viewcomments/'.$postId);\n\t}", "title": "" }, { "docid": "15ea008f402ce7a539e04726a3486e17", "score": "0.53314", "text": "function delete()\r\n {\r\n require_once('blog_comment.class.php');\r\n require_once('snippet.class.php');\r\n $tbl = new Blog_Comment;\r\n $tbl->delete_all('where blog_article_id=?', array($this->id()));\r\n $tbl = new Snippet;\r\n $tbl->delete_all('where snippet_key like \\'blog_article_%\\' and snippet_seq=? and is_internal', array($this->id()));\r\n parent::delete();\r\n }", "title": "" }, { "docid": "52b6c2dfed674cb01c91f9f17c5f7294", "score": "0.53302544", "text": "function post($ID)\n{\n\t$postManager = new PostManager();\n\t$post = $postManager->post($ID);\n\t\n\t$commentManager = new commentManager();\n\t$req = $commentManager->listComment($ID);\n\n\trequire('./view/postView.php');\n}", "title": "" }, { "docid": "cf9113970aebf5a54a10584117875f92", "score": "0.53271604", "text": "function post(){\n\n\t//Model\n $postManager = new \\MVC_oc\\Blog\\Model\\PostManager();\n\n $commentManager = new \\MVC_oc\\Blog\\Model\\CommentManager();\n\n\n $post = $postManager->getPost($_GET['id']);\n\n $comments = $commentManager->getComments($_GET['id']);\n\n //Vérification de l'existance du billet\n if ($post === false){\n\n \tthrow new Exception('Ce Billet n\\'existe pas');\n }\n\n //Vue\n require('view/frontend/postView.php');\n}", "title": "" }, { "docid": "3f8e2513c432a219871f211e4d1ea546", "score": "0.5324855", "text": "function getPost($post_id = 1, $showall = 1, $textLimit = 0, $comments = 1, $show_deleted = false)\n{\n\t//Prerequisites\n\t$admin = adminCheck();\n\t\n\tif($comments == 0)\n\t{\n\t\t$comments_enabled = $comments;\n\t}\n\telse\n\t{\n\t\t$comments_enabled = $GLOBALS['comments_enabled'];\n\t}\n\t//\n\tif($show_deleted == true)\n\t{\n\t\t$result = databaseArray(\"SELECT * FROM `nc_posts` WHERE `post_id` = '$post_id'\");\n\t}\n\telse\n\t{\n\t\tif($post_id == 'latest')\n\t\t{\n\t\t\t$result = databaseArray(\"SELECT * FROM nc_posts WHERE `status` = 'live' ORDER BY `date` DESC LIMIT 1\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result = databaseArray(\"SELECT * FROM `nc_posts` WHERE `post_id` = '$post_id' AND `status` = 'live'\");\n\t\t}\n\t}\n\tif($result)\n\t{\n\t\t$id = $result['id'];\n\t\t$name = stripslashes($result['name']);\n\t\t$post_id = $result['post_id'];\n\t\t$featuredImg = stripslashes($result['featuredImg']);\n\t\t$creator = stripslashes($result['creator']);\n\t\t$content = nl2br(regexFindCode(stripslashes($result['content'])));\n\t\t$date = $result['date'];\n\t\t$anchor = \"default\";\n\t\techo \"<div id='updateblock' class='mainDiv' \";\n\t\tif ($admin == 1){\n\t\t\techo \"onmouseover=\\\"ShowContent('editHere_\". $post_id.\"');\\\" onmouseout=\\\"HideContent('editHere_\". $post_id.\"');\\\">\";\n\t\t\timageHeader($name, $date, $post_id, $featuredImg, $creator, $showall, $anchor);\n\t\t\techo \"<div id='editHere_\". $post_id.\"' class='editHere noselect' ondblclick=\\\"openPopup('Edit Post','$post_id','getBlogForm');\\\">Double-click to edit</div><div id='blogContent_\". $post_id.\"' class='blogContent'></div>\";\n\t\t}\n\t\telse\n\t\t{\n\t\techo \">\";\n\t\timageHeader($name, $date, $post_id, $featuredImg, $creator, $showall, $anchor);\n\t\t}\n\t\tif($textLimit != 0)\n\t\t{\n\t\t\t$shortened = substr($content, 0, $textLimit);\n\t\t\techo \"$shortened\";\n\t\t\tif($content != $shortened){\n\t\t\t\techo '... <a href=\"blog-'.$post_id.'\">[Read more]</a>';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo $content;\n\t\t}\n\t\tif($comments_enabled == 1)\n\t\t{\n\t\t\tgetComments($post_id, $showall);\n\t\t}\n\t\techo '</div>';\n\t}\n}", "title": "" }, { "docid": "e3b401cb5859525e2399bc48698dc7a0", "score": "0.5323781", "text": "function twentyeleven_comment( $comment, $args, $depth ) {\r\n $GLOBALS['comment'] = $comment;\r\n switch ( $comment->comment_type ) :\r\n case 'pingback' :\r\n case 'trackback' :\r\n ?>\r\n <li class=\"post pingback\">\r\n <p><?php _e( 'Pingback:', 'twentyeleven' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\r\n <?php\r\n break;\r\n default :\r\n ?>\r\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\r\n <article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\r\n <div class=\"comment-meta\">\r\n <div class=\"comment-author vcard\">\r\n <?php\r\n $avatar_size = 68;\r\n if ( '0' != $comment->comment_parent )\r\n $avatar_size = 39;\r\n\r\n echo get_avatar( $comment, $avatar_size );\r\n\r\n /* translators: 1: comment author, 2: date and time */\r\n printf( __( '%1$s em %2$s <span class=\"says\">disse:</span>', 'twentyeleven' ),\r\n sprintf( '<span class=\"fn\">%s</span>', get_comment_author_link() ),\r\n sprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\r\n esc_url( get_comment_link( $comment->comment_ID ) ),\r\n get_comment_time( 'c' ),\r\n /* translators: 1: date, 2: time */\r\n sprintf( __( '%1$s as %2$s', 'twentyeleven' ), get_comment_date(), get_comment_time() )\r\n )\r\n );\r\n ?>\r\n\r\n <?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class=\"edit-link\">', '</span>' ); ?>\r\n </div><!-- .comment-author .vcard -->\r\n\r\n <?php if ( $comment->comment_approved == '0' ) : ?>\r\n <em class=\"comment-awaiting-moderation\"><?php _e( 'Seu comentário está aguardando moderação.', 'twentyeleven' ); ?></em>\r\n <br />\r\n <?php endif; ?>\r\n\r\n </div>\r\n\r\n <div class=\"comment-content\"><?php comment_text(); ?></div>\r\n\r\n <div class=\"reply\">\r\n <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Responder <span>&darr;</span>', 'twentyeleven' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\r\n </div><!-- .reply -->\r\n </article><!-- #comment-## -->\r\n\r\n <?php\r\n break;\r\n endswitch;\r\n }", "title": "" }, { "docid": "e7d92c9a10c1e5dd079fa5358d091619", "score": "0.5322287", "text": "public function remove_comments() {\n\n\t\t\t// int values\n\t\t\tforeach ( array( 'comments_notify', 'default_pingback_flag' ) as $option ) {\n\t\t\t\tadd_filter( 'pre_option_' . $option, '__return_zero' );\n\t\t\t\t//update_option( $option, 1 );\n\t\t\t}\n\t\t\t// string false\n\t\t\tforeach ( array( 'default_comment_status', 'default_ping_status' ) as $option ) {\n\t\t\t\tadd_filter( 'pre_option_' . $option, array( $this, '__return_closed' ) );\n\t\t\t\t//update_option( $option, 'closed' );\n\t\t\t}\n\t\t\t// all post types\n\t\t\t// alternative define an array( 'post', 'page' )\n\t\t\tforeach ( get_post_types() as $post_type ) {\n\t\t\t\t// comment status\n\t\t\t\tremove_meta_box( 'commentstatusdiv', $post_type, 'normal' );\n\t\t\t\t// remove trackbacks\n\t\t\t\tremove_meta_box( 'trackbacksdiv', $post_type, 'normal' );\n\t\t\t\t// remove all comments/trackbacks from tables\n\t\t\t\tif ( post_type_supports( $post_type, 'comments' ) ) {\n\t\t\t\t\tremove_post_type_support( $post_type, 'comments' );\n\t\t\t\t\tremove_post_type_support( $post_type, 'trackbacks' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// remove dashboard meta box for recents comments\n\t\t\tremove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n\t\t}", "title": "" }, { "docid": "e0b5cb0318473ebec8283a74cdb33bac", "score": "0.5320512", "text": "public function post_edit($id)\n\t{\n\t\t$validation = Validator::make(Input::all(), array(\n\t\t\t'user_id' => array('required', 'integer'),\n\t\t\t'blog_post_id' => array('required', 'integer'),\n\t\t\t'content' => array('required'),\n\t\t));\n\n\t\tif($validation->valid())\n\t\t{\n\t\t\t$comment = Blog_Comment::find($id);\n\n\t\t\tif(is_null($comment))\n\t\t\t{\n\t\t\t\treturn Redirect::to('blog/comments');\n\t\t\t}\n\n\t\t\t$comment->user_id = Input::get('user_id');\n\t\t\t$comment->blog_post_id = Input::get('blog_post_id');\n\t\t\t$comment->content = Input::get('content');\n\n\t\t\t$comment->save();\n\n\t\t\tSession::flash('message', 'Updated comment #'.$comment->id);\n\n\t\t\treturn Redirect::to('blog/comments');\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\treturn Redirect::to('blog/comments/edit/'.$id)\n\t\t\t\t\t->with_errors($validation->errors)\n\t\t\t\t\t->with_input();\n\t\t}\n\t}", "title": "" }, { "docid": "27dd550e1c1e720a23673a4131b3ebea", "score": "0.53199404", "text": "function displayCommentsCountByPost(){\n\t$idPost = isset($_GET['idPost']) ? $_GET['idPost'] : null;\n\t$commentsModel= new CommentsModel;\n\t$commentsNbByPost= $commentsModel->commentsCountByPost($idPost);\t\n}", "title": "" }, { "docid": "d9c70f936fe6ca8cbecbb18aa37bb159", "score": "0.5317897", "text": "public function edit(Comment $comments)\n {\n //\n }", "title": "" }, { "docid": "6f9c1186de611f232e910a00e883a2e7", "score": "0.531421", "text": "public function Comment_post(Post $post, $text) {\n \t$id = (int)$this->loggedInUser->getUserId();\n $feed_id = $post->getPostby()->getUserId();\n\n $sql = 'INSERT INTO `posts_comments`(`feed_id`,`comment`,`comm_by`) VALUES('. $feed_id .', \"'. $text .'\", '. $id .')';\n \n $this->dbCon->query($sql);\n \n if($this->dbCon->affected_rows > 0) {\n \n \t$sql = 'UPDATE `feeds` SET comments_no = comments_no+1 WHERE id = '. $feed_id;\n \t$this->dbCon->query($sql);\n \tif($this->dbCon->affected_rows > 0) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }\n \n return false;\n }", "title": "" }, { "docid": "e7ee2cd67979c1ae624635c147a461e3", "score": "0.5309892", "text": "function mw_recent_comments(\n\t$no_comments = 10,\n\t$show_pass_post = false,\n\t$title_length = 50, \t// shortens the title if it is longer than this number of chars\n\t$author_length = 30,\t// shortens the author if it is longer than this number of chars\n\t$wordwrap_length = 50, // adds a blank if word is longer than this number of chars\n\t$type = 'all', \t// Comments, trackbacks, or both?\n\t$format = '<li>%date%: <a href=\"%permalink%\" title=\"%title%\">%title%</a> (von %author_full%)</li>',\n\t$date_format = 'd.m.y, H:i',\n\t$none_found = '<li>Keine Kommentare vorhanden.</li>',\t// None found\n\t$type_text_pingback = 'Pingback von',\n\t$type_text_trackback = 'Trackback von',\n\t$type_text_comment = 'von'\n\n\t) {\n\n\t//Language...\n\t$mwlang_anonymous = 'Anonym'; // Anonymous\n\t$mwlang_authorurl_title_before = 'Webseite von &lsaquo;';\n\t$mwlang_authorurl_title_after = '&rsaquo; besuchen';\n\n\n global $wpdb;\n\n $request = \"SELECT ID, comment_ID, comment_content, comment_author, comment_author_url, comment_date, post_title, comment_type\n\t\t\t\tFROM $wpdb->comments LEFT JOIN $wpdb->posts ON $wpdb->posts.ID=$wpdb->comments.comment_post_ID\n\t\t\t\tWHERE post_status IN ('publish','static')\";\n\n\tswitch($type) {\n\t\tcase 'all':\n\t\t\t// add nothing\n\t\t\tbreak;\n\t\tcase 'comment_only':\n\t\t\t//\n\t\t\t$request .= \"AND $wpdb->comments.comment_type='' \";\n\t\t\tbreak;\n\t\tcase 'trackback_only':\n\t\t\t$request .= \"AND ( $wpdb->comments.comment_type='trackback' OR $wpdb->comments.comment_type='pingback' ) \";\n\t\t\tbreak;\n\t default:\n \t\t//\n\t\t\tbreak;\n\n\t}\n\n\tif (!$show_pass_post) $request .= \"AND post_password ='' \";\n\n\t$request .= \"AND comment_approved = '1' ORDER BY comment_ID DESC LIMIT $no_comments\";\n\n\t$comments = $wpdb->get_results($request);\n $output = '';\n\tif ($comments) {\n \tforeach ($comments as $comment) {\n\n\t\t\t// Permalink to post/comment\n\t\t\t$loop_res['permalink'] = get_permalink($comment->ID). '#comment-' . $comment->comment_ID;\n\n\t\t\t// Title of the post\n\t\t\t$loop_res['post_title'] = stripslashes($comment->post_title);\n\t\t\t$loop_res['post_title'] = wordwrap($loop_res['post_title'], $wordwrap_length, ' ' , 1);\n\n\t\t\tif (strlen($loop_res['post_title']) >= $title_length) {\n\t\t\t\t$loop_res['post_title'] = substr($loop_res['post_title'], 0, $title_length) . '&#8230;';\n\t\t\t}\n\n\t\t\t// Author's name only\n \t$loop_res['author_name'] = stripslashes($comment->comment_author);\n\t\t\t$loop_res['author_name'] = wordwrap($loop_res['author_name'], $wordwrap_length, ' ' , 1);\n\n\t\t\tif ($loop_res['author_name'] == '') $loop_res['author_name'] = $mwlang_anonymous;\n\t\t\tif (strlen($loop_res['author_name']) >= $author_length) {\n\t\t\t\t$loop_res['author_name'] = substr($loop_res['author_name'], 0, $author_length) . '&#8230;';\n\t\t\t}\n\n\t\t\t// Full author (link, name)\n\t\t\t$author_url = $comment->comment_author_url;\n\t\t\tif (empty($author_url)) {\n\t\t\t\t$loop_res['author_full'] = $loop_res['author_name'];\n\t\t\t} else {\n\t\t\t\t$loop_res['author_full'] = '<a href=\"' . $author_url . '\" title=\"' . $mwlang_authorurl_title_before . $loop_res['author_name'] . $mwlang_authorurl_title_after . '\">' . $loop_res['author_name'] . '</a>';\n\t\t\t}\n\n/*\n\t\t\t// Comment excerpt\n\t\t\t$comment_excerpt = strip_tags($comment->comment_content);\n\t\t\t$comment_excerpt = stripslashes($comment_excerpt);\n\t\t\tif (strlen($comment_excerpt) >= $comment_length) {\n\t\t\t\t$comment_excerpt = substr($comment_excerpt, 0, $comment_length) . '...';\n\t\t\t}\n\n*/\n\n\t\t\t// Comment type\n\t\t\tif ( $comment->comment_type == 'pingback' ) {\n\t\t\t\t$loop_res['comment_type'] = $type_text_pingback;\n\t\t\t} elseif ( $comment->comment_type == 'trackback' ) {\n\t\t\t\t$loop_res['comment_type'] = $type_text_trackback;\n\t\t\t} else {\n\t\t\t\t$loop_res['comment_type'] = $type_text_comment;\n\t\t\t}\n\n\t\t\t// Date of comment\n\t\t\t$loop_res['comment_date'] = mysql2date($date_format, $comment->comment_date);\n\n\t\t\t// Output element\n\t\t\t$element_loop = str_replace('%permalink%', $loop_res['permalink'], $format);\n\t\t\t$element_loop = str_replace('%title%', $loop_res['post_title'], $element_loop);\n\t\t\t$element_loop = str_replace('%author_name%', $loop_res['author_name'], $element_loop);\n\t\t\t$element_loop = str_replace('%author_full%', $loop_res['author_full'], $element_loop);\n\t\t\t$element_loop = str_replace('%date%', $loop_res['comment_date'], $element_loop);\n\t\t\t$element_loop = str_replace('%type%', $loop_res['comment_type'], $element_loop);\n\n\n\t\t\t$output .= $element_loop . \"\\n\";\n\n\n\t\t} //foreach\n\n\t\t$output = convert_smilies($output);\n\n\t} else {\n\t\t$output .= $none_found;\n }\n\n echo $output;\n}", "title": "" }, { "docid": "d57dd1bd89205ab33183c5370eada2b5", "score": "0.530221", "text": "function addCommentsAction()\n\t{\n\t\t$request = $this->_request->getParams();\n\t\tif($_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest' && $request['contract_id'])\n\t\t{\n\t\t\t$this->_view->request = $request;\n\t\t\t$log_obj=new Ep_Quote_QuotesLog();\n\t\t\t/* Fetching from Quoteslog table with status contract_closed_comments */\n\t\t\t$closed_comments = $log_obj->getLogs(array('contract_id'=>$request['contract_id'],'action'=>'contract_closed_comments'));\n\t\t\t$i=0;\n\t\t\tforeach($closed_comments as $row)\n\t\t\t{\n\t\t\t\t$closed_comments[$i++]['created_time'] = time_ago($row['action_at']);\n\t\t\t}\n\t\t\t$this->_view->closed_comments = $closed_comments;\n\t\t\t$this->render('closed-contract-comments');\n\t\t}\n\t}", "title": "" }, { "docid": "3c583727ae793af82fc8fe6dca9ac597", "score": "0.5288501", "text": "private function postComments(){\n\t $this->obj_usrinfo = unserialize ( $_SESSION ['userData'] );\t \n\t $this->_obj_user_discussion_controller = new UserDiscussionController ();\n\t if (preg_match(\"'<'\",$_POST['comment'])) {\n\t header('location: ../Home/userHomePage.php?error=\"script not allowed\"');\n\t die;\n\t }\n\t $_SESSION['displayComments'] = $this->_obj_user_discussion_controller->postComments(\n\t $this->obj_usrinfo,\n\t $_POST['discussionID'],\n\t addslashes($_POST['comment'])\n\t );\n $_SESSION ['userData'] = serialize ( $this->obj_usrinfo );\t \n\t}", "title": "" }, { "docid": "c083520c886e6e440fe03b8c607d467e", "score": "0.5280537", "text": "function hype_comment( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment;\n\n if ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) { ?>\n\n <li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\n <div class=\"comment-body\">\n <?php _e( 'Pingback:', 'hype' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit', 'hype' ), '<span class=\"edit-link\">', '</span>' ); ?>\n </div>\n\n <?php } else { ?>\n\n <li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>\n <article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body\">\n <div class=\"comment-meta\">\n <div class=\"comment-author vcard\">\n <?php if ( 0 != $args['avatar_size'] ) {\n echo get_avatar( $comment, $args['avatar_size'] );\n } ?>\n </div>\n <!-- .comment-author -->\n </div>\n <!-- .comment-meta -->\n\n <div class=\"comment-content\">\n <header class=\"comment-metadata\">\n <a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n <?php printf( __( '%s', 'hype' ), sprintf( '<span class=\"fn comment-author\">%s</span>', get_comment_author_link() ) ); ?>\n <time datetime=\"<?php comment_time( 'c' ); ?>\" class=\"comment-date\">\n <?php printf( _x( '%1$s at %2$s', '1: date, 2: time', 'hype' ), get_comment_date(), get_comment_time() ); ?>\n </time>\n </a>\n <?php edit_comment_link( __( 'Edit', 'hype' ), '<span class=\"edit-link\">', '</span>' ); ?>\n </header>\n <!-- .comment-metadata -->\n\n <?php if ( '0' == $comment->comment_approved ) { ?>\n <p\n class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'hype' ); ?></p>\n <?php } ?>\n\n <div class=\"comment-content\"><?php comment_text(); ?></div>\n\n <div class=\"reply\">\n <?php echo get_comment_reply_link( array_merge( $args, array( 'add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ), $comment->comment_ID ); ?>\n </div>\n <!-- .reply -->\n\n </div>\n <!-- .comment-content -->\n\n </article>\n <!-- .comment-body -->\n\n <?php\n }\n}", "title": "" }, { "docid": "2bae1aeb7828d5790a7dda1a0d6abee5", "score": "0.5278456", "text": "function eb_comments($comment, $args, $depth) {\n\t$GLOBALS['comment'] = $comment;\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<div id=\"comment-<?php comment_ID(); ?>\" class=\"comment-body\">\n\t\t\t<header class=\"comment__header\">\n\t\t\t\t<div class=\"comment__author\">\n\t\t\t\t\t<?php printf( __( '<cite class=\"fn\">%s</cite> <span class=\"says\">dit :</span>' ), get_comment_author_link() ); ?>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"comment__meta commentmetadata\">\n\t\t\t\t\t<a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ); ?>\"><?php printf( __('%1$s à %2$s'), get_comment_date(), get_comment_time() ); ?></a>\n\t\t\t\t\t<?php edit_comment_link( '(Modifier)', '', '' ); ?>\n\t\t\t\t</div>\n\t\t\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t\t<div class=\"comment__moderation\">Commentaire en attente de modération</div>\n\t\t\t\t<?php endif; ?>\n\t\t\t</header>\n\n\t\t\t<div class=\"comment__content\"><?php comment_text(); ?></div>\n\n\t\t\t<footer class=\"comment__footer\">\n\t\t\t\t<div class=\"reply\">\n\t\t\t\t\t<?php comment_reply_link( array_merge( $args, ['reply_text' => 'Répondre', 'depth' => $depth, 'max_depth' => $args['max_depth']] ) ); ?>\n\t\t\t\t</div>\n\t\t\t</footer>\n\t\t</div>\n<?php\n}", "title": "" }, { "docid": "774726f0d92e99ed65293cfba10dfd46", "score": "0.5278429", "text": "function pointfindert2dcomments($comment, $args, $depth){\n\t$GLOBALS['comment'] = $comment;\n\textract($args, EXTR_SKIP);\n\t\n\tif ( 'div' == $args['style'] ) {\n\t\t$tag = 'div';\n\t\t$add_below = 'comment';\n\t} else {\n\t\t$tag = 'li';\n\t\t$add_below = 'div-comment';\n\t}\n?>\n\t<?php echo '<'; echo $tag ?> <?php comment_class(empty( $args['has_children'] ) ? '' : 'parent') ?> id=\"comment-<?php comment_ID() ?>\">\n\t<?php if ( 'div' != $args['style'] ){ ?>\n\t<div id=\"div-comment-<?php comment_ID() ?>\" class=\"comment-body\">\n\t<?php }; ?>\n\n\t<div class=\"comment-author-image\">\n\t <?php if ($args['avatar_size'] != 0){echo get_avatar( $comment,128 );} ?>\n\t</div>\n \n <div class=\"comments-detail-container\">\n \n <div class=\"comment-author-vcard\">\n <?php printf(esc_html__('%s says:', 'pointfindert2d'), get_comment_author_link()) ?>\n </div>\n \n <?php if ($comment->comment_approved == '0') { ?>\n \t<em class=\"comment-awaiting-moderation\"><?php esc_html_e('Your comment is awaiting moderation.', 'pointfindert2d') ?></em>\n \t<br />\n <?php }; ?>\n\n \t<div class=\"comment-meta commentmetadata\">\n <a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\">\n \t\t<?php\n \t\t\tprintf( esc_html__('%1$s at %2$s', 'pointfindert2d'), get_comment_date(), get_comment_time()) ?></a>\n <?php edit_comment_link(esc_html__('Edit', 'pointfindert2d'),' ','' );\n \t\t?>\n \t</div>\n \n <div class=\"comment-textarea\">\n\t <?php comment_text() ?>\n </div>\n\n\t <div class=\"reply\"> <i class=\"pfadmicon-glyph-362\"></i>\n\t <?php comment_reply_link(array_merge( $args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t </div>\n </div>\n\n\t<?php if ( 'div' != $args['style'] ){ ?>\n\t</div>\n\t<?php }; ?>\n<?php }", "title": "" }, { "docid": "5cefc1a520bfcff84aabde6ac3f04f34", "score": "0.5273794", "text": "public static function comment_post( $id ) {\n\t\t$comment = get_comment( $id );\n\n\t\t// check parent comment\n\t\tif ( $comment->comment_parent ) {\n\t\t\t// get parent comment...\n\t\t\t$parent = get_comment( $comment->comment_parent );\n\t\t\t// ...and gernerate target url\n\t\t\t$target = $parent->comment_author_url;\n\n\t\t\tif ( $target ) {\n\t\t\t\t$source = add_query_arg( 'replytocom', $comment->comment_ID, get_permalink( $comment->comment_post_ID ) );\n\n\t\t\t\tdo_action( 'send_webmention', $source, $target );\n\t\t\t\t//send_webmention($source, $target);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f2cc5d9cb0507ec69eed8e031d8a5787", "score": "0.52701277", "text": "function pew_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n <div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('listado-comentarios'); ?>>\n <article class=\"cf\">\n <header class=\"comment-author vcard\">\n <?php\n /*\n this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n echo get_avatar($comment,$size='32',$default='<path_to_url>' );\n */\n ?>\n <?php // custom gravatar call ?>\n <?php\n // create variable\n $bgauthemail = get_comment_author_email();\n\n ?>\n <?php // end custom gravatar call ?>\n <?php printf(__( '<div class=\"name-date\"><div><h5 class=\"fn\">%1$s</h5> %2$s', 'arqtecas' ), get_comment_author_link(), edit_comment_link(__( 'Editar', 'arqtecas' ),' ','') ) ?>\n <time datetime=\"<?php echo comment_time('j-m-Y'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php echo comment_time('j-m-Y'); ?></a></time></div></div>\n </header>\n <?php if ($comment->comment_approved == '0') : ?>\n <div class=\"alert alert-info\">\n <p><?php _e( 'Your comment is awaiting moderation.', 'arqtecas' ) ?></p>\n </div>\n <?php endif; ?>\n <footer class=\"comment-content\">\n <?php comment_text() ?>\n </footer>\n <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </article>\n <?php // </li> is added by WordPress automatically ?>\n<?php\n}", "title": "" }, { "docid": "e8bb19121df5a28f71b2492b708f2ac1", "score": "0.5269933", "text": "function collections_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment; ?>\n\t<li <?php comment_class(); ?>>\n\t\t<div id=\"comment-<?php comment_ID(); ?>\">\n\t\t\t<div class=\"collections-avatar-wrapper\">\n\t\t\t\t<?php echo get_avatar( $comment, $size = '90' ); ?>\n\t\t\t</div>\n\t\t\t<article class=\"respond-body\">\n\t\t\t\t<header class=\"comment-author vcard\">\n\t\t\t\t\t<span class=\"fn comment-name\"><?php comment_author_link(); ?></span>\n\t\t\t\t</header>\n\n\t\t\t\t<?php if ( '0' === $comment->comment_approved ) : ?>\n\t\t\t\t\t<p><?php _e( 'Your comment is awaiting moderation.', 'collections' ); ?></p>\n\t\t\t\t<?php endif ?>\n\n\t\t\t\t<section class=\"comment-text entry-content\">\n\t\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t</section>\n\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\n\t\t\t\t<?php\n\t\t\t\t\tprintf(\n\t\t\t\t\t\t'<a title=\"%1$s\" href=\"%2$s\"><time class=\"comment-date post-detail\" datetime=\"%3$s\">%4$s</time></a>',\n\t\t\t\t\t\tesc_attr( __( 'Permalink', 'collections' ) ),\n\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\tget_comment_date()\n\t\t\t\t\t);\n\t\t\t\t?>\n\n\t\t\t</article>\n\t\t</div>\n\t<?php\n}", "title": "" }, { "docid": "592bf9e2f97035813180bfaf2947c7c6", "score": "0.5264949", "text": "public function getCommentToEdit()\n {\n $id = $this->di->get(\"request\")->getGet(\"id\");\n // Get the comment from Model.\n $comment = $this->di->get(\"com\")->getComment($id);\n // Add views to a specific region\n $this->di->get(\"view\")->add(\"comment/edit\", [\"comment\"=>$comment], \"main\");\n // Render a standard page using layout\n $this->di->get(\"pageRender\")->renderPage([\n \"title\" => \"Redigera kommentar\",\n ]);\n }", "title": "" }, { "docid": "b7c017e1b4a891328bf3973aa0f4ee1d", "score": "0.52586627", "text": "function nmd_comment_form_field_comment() {\n\n\tif (!is_single()) return $field; //only on single post pages.\n\tglobal $post;\n\n\tob_start();\n\n\twp_editor( '', 'comment', array(\n\t\t'textarea_rows' => 12,\n\t\t'media_buttons' => false,\n\t) );\n\n\t$editor = ob_get_contents();\n\n\tob_end_clean();\n\n\treturn $editor;\n}", "title": "" }, { "docid": "613770d713c85083fcc7e19de288f885", "score": "0.5256924", "text": "function render_comments($c_data, $c_info){\n\tglobal $locale, $settings;\n\topentable($locale['c100']);\n\tif (!empty($c_data)){\n\t\techo \"<div class='comments floatfix'>\\n\";\n\t\t\t$c_makepagenav = '';\n\t\t\tif ($c_info['c_makepagenav'] !== FALSE) { \n\t\t\techo $c_makepagenav = \"<div style='text-align:center;margin-bottom:5px;'>\".$c_info['c_makepagenav'].\"</div>\\n\"; \n\t\t}\n\t\t\tforeach($c_data as $data) {\n\t $comm_count = \"<a href='\".FUSION_REQUEST.\"#c\".$data['comment_id'].\"' id='c\".$data['comment_id'].\"' name='c\".$data['comment_id'].\"'>#\".$data['i'].\"</a>\";\n\t\t\techo \"<div class='tbl2 clearfix floatfix'>\\n\";\n\t\t\tif ($settings['comments_avatar'] == \"1\") { echo \"<span class='comment-avatar'>\".$data['user_avatar'].\"</span>\\n\"; }\n\t echo \"<span style='float:right' class='comment_actions'>\".$comm_count.\"\\n</span>\\n\";\n\t\t\techo \"<span class='comment-name'>\".$data['comment_name'].\"</span>\\n<br />\\n\";\n\t\t\techo \"<span class='small'>\".$data['comment_datestamp'].\"</span>\\n\";\n\tif ($data['edit_dell'] !== false) { echo \"<br />\\n<span class='comment_actions'>\".$data['edit_dell'].\"\\n</span>\\n\"; }\n\t\t\techo \"</div>\\n<div class='tbl1 comment_message'>\".$data['comment_message'].\"</div>\\n\";\n\t\t}\n\t\techo $c_makepagenav;\n\t\tif ($c_info['admin_link'] !== FALSE) {\n\t\t\techo \"<div style='float:right' class='comment_admin'>\".$c_info['admin_link'].\"</div>\\n\";\n\t\t}\n\t\techo \"</div>\\n\";\n\t} else {\n\t\techo $locale['c101'].\"\\n\";\n\t}\n\tclosetable(); \n}", "title": "" }, { "docid": "0ade40395cb07bd772c8badd99ba1547", "score": "0.52560633", "text": "public function getComments()\n {\n $key = \"comPage\";\n // Get comments from model\n $comments = $this->di->get(\"com\")->getComments($key);\n // Add views to a specific region, add comments\n $this->di->get(\"view\")->add(\"comment/index\", [\"comments\"=>$comments], \"main\");\n // Render a standard page using layout\n $this->di->get(\"pageRender\")->renderPage([\"title\" => \"Kommentarssystem\"]);\n }", "title": "" }, { "docid": "077898c96b2bb83200100fcd2ef2d793", "score": "0.52547514", "text": "public function add_comment_support() {\n\t\tadd_post_type_support( bbp_get_reply_post_type(), 'comments' ) ;\n\t}", "title": "" }, { "docid": "bd4f8e31d53af7e27c65e35f1f6a1735", "score": "0.5248921", "text": "function write_comment ( $y, $m, $entry, $comment_name, $comment_email, $comment_url, $comment_text, $user_ip, $hold_flag='', $comment_date=null ) {\n global $blog_config, $sb_info;\n \n sb_delete_file( CONFIG_DIR.'~blog_comment_listing.tmp' ); // Delete comment array cache\n\n // We're going to assume that the y and m directories exist...\n $basedir = CONTENT_DIR;\n $dir = $basedir.$y.'/'.$m.'/'.$entry;\n\n if (!file_exists($dir)) {\n $oldumask = umask(0);\n $ok = mkdir($dir, BLOG_MASK );\n umask($oldumask);\n if (!$ok) {\n // There is a bug in some versions of PHP that will\n // cause mkdir to fail if there is a trailing \"/\".\n //\n // Thanks to Matt - http://agent.chaosnet.org\n return ( $dir );\n }\n }\n\n $dir .= '/comments';\n\n if (!file_exists($dir)) {\n $oldumask = umask(0);\n $ok = mkdir($dir, BLOG_MASK );\n umask($oldumask);\n if (!$ok) {\n // There was a problem creating the directory\n return ( $dir );\n }\n }\n\n $dir .= '/';\n\n if (!isset($comment_date)) {\n $comment_date = time();\n }\n\n $stamp = date('ymd-His');\n $entryFile = $dir.'comment'.$stamp.'.txt';\n\n // Save the file\n $save_data = array();\n $save_data[ 'VERSION' ] = $sb_info[ 'version' ];\n $save_data[ 'NAME' ] = clean_post_text( $comment_name );\n $save_data[ 'DATE' ] = $comment_date;\n $save_data[ 'CONTENT' ] = sb_parse_url( clean_post_text( $comment_text ) );\n if ( $comment_email != '' ) {\n $save_data[ 'EMAIL' ] = clean_post_text( $comment_email );\n }\n if ( $comment_url != '' ) {\n $save_data[ 'URL' ] = clean_post_text( $comment_url );\n }\n $save_data[ 'IP-ADDRESS' ] = $user_ip; // New 0.4.8\n $save_data[ 'MODERATIONFLAG' ] = $hold_flag;\n\n // Implode the array\n $str = implode_with_keys( $save_data );\n\n // Save the file\n $result = sb_write_file( $entryFile, $str );\n\n if ( $result ) {\n\n if ( $blog_config->getTag('BLOG_EMAIL_NOTIFICATION') ) {\n // Send Email Notification:\n\n $client_ip_local = getIP();\n\n $subject= _sb('commentposted') . ' ' . $blog_config->getTag('BLOG_TITLE');\n $body='<b>' . _sb('name') . '</b> ' . $save_data[ 'NAME' ] . '<br />';\n $body .= '<b>' . _sb('IPAddress') . '</b> ' . $client_ip_local . ' (' . @gethostbyaddr($client_ip_local) .')<br />';\n $body .= '<b>' . _sb('useragent') . '</b> ' . $_SERVER[ 'HTTP_USER_AGENT' ] . '<br />';\n if ( array_key_exists( 'EMAIL', $save_data ) ) {\n $body .= \"<b>\" . _sb('email') . \"</b> <a href=\\\"mailto:\" . $save_data[ \"EMAIL\" ] . \"\\\">\" . $save_data[ \"EMAIL\" ] . \"</a><br />\\n\";\n }\n if ( array_key_exists( 'URL', $save_data ) ) {\n $body .= \"<b>\" . _sb('homepage') . \"</b> <a href=\\\"\" . $save_data[ \"URL\" ] . \"\\\">\" . $save_data[ \"URL\" ] . \"</a><br />\\n\";\n }\n $body .= \"<br />\\n\";\n $body .= \"<b>\" . _sb('comment') . \"</b><br />\\n\";\n\n $port = ':' . $_SERVER[ 'SERVER_PORT'];\n if ($port == ':80') {\n $port = '';\n } \n if ( ( dirname($_SERVER[ 'PHP_SELF' ]) == '\\\\' || dirname($_SERVER[ 'PHP_SELF' ]) == '/' ) ) {\n // Hosted at root.\n $base_url = 'http://'.$_SERVER[ 'HTTP_HOST' ].$port.'/';\n } else {\n // Hosted in sub-directory.\n $base_url = 'http://'.$_SERVER[ 'HTTP_HOST' ].$port.dirname($_SERVER[ 'PHP_SELF' ]).'/';\n }\n\n $body .= '<a href=\"' . $base_url . 'comments.php?y=' . $y . '&amp;m=' . $m . '&amp;entry=' . $entry . '\">' . $base_url . 'comments.php?y=' . $y . '&amp;m=' . $m . '&amp;entry=' . $entry . \"</a><br />\\n<br />\\n\";\n $body .= sprintf( _sb('wrote'), format_date( $comment_date ), $comment_name, blog_to_html( $comment_text, true, false ) );\n $body .= '<br /><br />';\n\n if ( $blog_config->getTag('BLOG_COMMENTS_MODERATION') ) {\n if ( $logged_in == false ) {\n $body .= _sb('email_moderator') . \"\\n\";\n }\n }\n\n // Send the Email\n if ( array_key_exists( 'EMAIL', $save_data ) ) {\n sb_mail( $save_data[ 'EMAIL' ], $blog_config->getTag('BLOG_EMAIL'), $subject, $body, false );\n } else {\n sb_mail( $blog_config->getTag('BLOG_EMAIL'), $blog_config->getTag('BLOG_EMAIL'), $subject, $body, false );\n }\n }\n\n return ( true );\n } else {\n // Error:\n // Probably couldn't create file...\n return ( $entryFile );\n }\n }", "title": "" }, { "docid": "f82797d643885aecafcd1009b258c662", "score": "0.5247282", "text": "public function do_comment()\n\t{\n\t\t$formdata = new stdClass(); // form data object\n\t\t$data = new stdClass(); // view objects\n\t\t$formdata->user_id = $_SESSION['user_id']; // get user_id from session\n\t\t$formdata->comment = $this->input->post('comment'); // get status message comment from <textarea name=\"comment\">\n\t\t$formdata->post_id = $this->input->post('post_id');\n\t\t$comment = $this->comments_model->create($formdata); // save the data\n\n\t\tif( $comment ){\n\t\t\t$data->message = 'Status commented!';\n\t\t\t$_SESSION['comment_status_message'] = array('success', $data);\n\t\t}else{\n\t\t\t$data->message = $this->db->error_message;\n\t\t\t$_SESSION['comment_status_message'] = array('error', $data);\n\t\t}\n\t\t\n\t\t/**\n\t\t * comment_status_message is an array with two values:\n\t\t *\t[0] -> status (success or error)\n\t\t * [1] -> status message\n\t\t **/\n\t\t$this->session->mark_as_flash('comment_status_message'); // mark the comment_status_message session as temporary\n\n\t\tredirect(site_url('home'));\n\n\t}", "title": "" }, { "docid": "87659bbd457f0200a4eefcca4db7f227", "score": "0.52469426", "text": "function addComment($post,$name,$email,$url,$body) {\n\t\tglobal $imSettings;\n\t\tif (!file_exists($imSettings['general']['dir']) && $imSettings['general']['dir'] != \"\" && $imSettings['general']['dir'] != \"./.\")\n\t\t\t@mkdir($imSettings['general']['dir'], 0777, TRUE);\n\t\treturn $this->comments->addComment($imSettings['general']['dir'] . $imSettings['blog']['file_prefix'] . 'pc' . $post,$name,$email,$url,$body, \"0\", ($imSettings['blog']['approve_comments'] == 1) ? 0 : 1);\n\t}", "title": "" } ]
70507c9206506c15e0fc853dd102543f
Method responsible for removing observers from event manager
[ { "docid": "ce9bd8e4c0d2c242ea2f7d8655bcdc5d", "score": "0.59864306", "text": "public function detach(ObserverInterface $observer)\n {\n $observers = $this->getObservers();\n\n foreach ($observer->getEvents() as $event) {\n $count = count($observers[$event]);\n\n for ($i = 0; $i < $count; $i++) {\n if ($observers[$event][$i] == $observer) {\n unset($observers[$event][$i]);\n }\n }\n }\n\n $this->setObservers($observers);\n }", "title": "" } ]
[ { "docid": "1f39bb02772195735185d1532e28c339", "score": "0.83381486", "text": "public function removeObserver() {\n //$this->__observers = array();\n foreach($this->__observers as $obj) {\n unset($obj);\n }\n }", "title": "" }, { "docid": "3f2a1572716376af44b5c73f44eefe32", "score": "0.72648436", "text": "protected function _unsubscribeFromEngineEvents()\n {\n $controller = $this->getController();\n $controller->removeEventListener(\n Streamwide_Engine_Events_Event::ENDOFFAX,\n array( 'callback' => array( $this, 'onEndOfFax' ) )\n );\n $controller->removeEventListener(\n Streamwide_Engine_Events_Event::FAXPAGE,\n array( 'callback' => array( $this, 'onFaxPage' ) )\n );\n }", "title": "" }, { "docid": "abaa296fba68f968646cbd26828a0bb8", "score": "0.7192957", "text": "public function detach(\\SplObserver $observer) {}", "title": "" }, { "docid": "a151959f769e687cfbe8660e0626fe9e", "score": "0.7066026", "text": "protected function _unsubscribeFromEngineEvents()\n {\n $events = array(\n Streamwide_Engine_Events_Event::SDP,\n Streamwide_Engine_Events_Event::CHILD,\n Streamwide_Engine_Events_Event::OKMOVED,\n Streamwide_Engine_Events_Event::MOVED,\n Streamwide_Engine_Events_Event::FAILMOVED\n );\n \n $controller = $this->getController();\n foreach ( $events as $event ) {\n $controller->removeEventListener( $event, array( 'callback' => array( $this, 'onSignalReceived' ) ) );\n }\n }", "title": "" }, { "docid": "94ff10a611ae5fb3c00a75041c25f5b6", "score": "0.6739793", "text": "function detach(Observer $observer_in) {\n //or\n //$this->observers = array_diff($this->observers, array($observer_in));\n //or\n foreach($this->observers as $okey => $oval) {\n if ($oval == $observer_in) {\n unset($this->observers[$okey]);\n }\n }\n }", "title": "" }, { "docid": "604216999e020d6e95c0ed1d047ec51c", "score": "0.67108124", "text": "public function unsetEventDispatcher()\n {\n $this->events = null;\n }", "title": "" }, { "docid": "dbda17e2d76a368fe29a08e4c296f720", "score": "0.6666634", "text": "function detach(AbstractObserver $observer)\n {\n foreach($this->observers as $okey => $oval) {\n if ($oval == $observer) {\n unset($this->observers[$okey]);\n }\n }\n }", "title": "" }, { "docid": "287b3525a53abba958a57cdc5386ad26", "score": "0.66441005", "text": "function detach($observer, $eventIDArray)\n {\n foreach ($eventIDArray as $eventID) {\n $nameHash = md5(get_class($observer) . $eventID);\n base::unsetStaticObserver($nameHash);\n }\n }", "title": "" }, { "docid": "5a975670314adac821f00be6036ef148", "score": "0.6615167", "text": "public function detach($observer)\n\t{\n // Not implemented here\n }", "title": "" }, { "docid": "3f2e681cfc1b6c1c4ee1a5cb9d1fa0f2", "score": "0.6605797", "text": "public function detach(SplObserver $observer){\n $id = spl_object_hash($observer);\n unset($this->observers[$id]);\n }", "title": "" }, { "docid": "de5ff7d3dbfe13a8d50c59a1233a2aad", "score": "0.65916306", "text": "public function removeEventSubscriber(IEventSubscriber $subscriber);", "title": "" }, { "docid": "eecc3782f97ece290464c19934b0776f", "score": "0.6532078", "text": "public static function flushEventListeners()\n {\n if (!isset(static::$dispatcher)) {\n return;\n }\n\n $instance = new static;\n\n foreach ($instance->getObservableEvents() as $event) {\n static::$dispatcher->forget(\"halcyon.{$event}: \".get_called_class());\n }\n\n static::$eventsBooted = [];\n }", "title": "" }, { "docid": "7fd07eb50b026c4555913a3b99cf29ad", "score": "0.64982915", "text": "public function detach($observer)\n {\n $observerKey = spl_object_hash($observer);\n unset($this->observers[$observerKey]);\n }", "title": "" }, { "docid": "2491040fe3eac84fbfb586d37036a069", "score": "0.6478509", "text": "public function removeObserver($observer)\n {\n if (in_array($observer, $this->observers)) {\n $key = array_search($observer, $this->observers);\n if (!empty($this->observers[$key])) {\n unset($this->observers[$key]);\n }\n }\n }", "title": "" }, { "docid": "1572bd1b074501c85128a0021598063c", "score": "0.6448932", "text": "public function detach(Observer $observer)\n\t{\n\t\tunset($this->_observers[array_search($observer, $this->_observers)]);\n\t}", "title": "" }, { "docid": "06dc21e6aad33d434e9097e4303888cb", "score": "0.6435375", "text": "public function removeAllListeners($eventName);", "title": "" }, { "docid": "5e0014eaf8119d8bd181a2c11f663db1", "score": "0.6397209", "text": "public function clearListeners()\n {\n $this->listeners = array();\n }", "title": "" }, { "docid": "f5a4eca918e0ba13009e841448a9a258", "score": "0.6395501", "text": "public function detach(Observer $observer)\n {\n if (($key = array_search($observer, $this->observers, true)) !== false) {\n unset($this->observers[$key]);\n }\n }", "title": "" }, { "docid": "6377c81283b5fa7d3cb08bfd5c653652", "score": "0.6391482", "text": "public function onRemove();", "title": "" }, { "docid": "6a90575f235c89f6178b2e475dc486c3", "score": "0.6384508", "text": "public function detach( $observer )\r\n {\r\n $this->observers []= $observer; // an an observer to the observer subject.\r\n }", "title": "" }, { "docid": "64a5e8e714b7a177daeab41f818b4949", "score": "0.6383729", "text": "public function detach(Observer $observer) {\n foreach ($this->observers as $key => $obs) {\n if ($observer == $obs) {\n unset($this->observers[$key]);\n break;\n }\n }\n }", "title": "" }, { "docid": "0ffdd34a588b320e5ea174c1c228b5e7", "score": "0.6374169", "text": "public function clearListeners(string $event): void;", "title": "" }, { "docid": "e43af4fd9c28f3d0be92bd0403ab7015", "score": "0.63730294", "text": "public function detach($event, Event_ObserverInterface $observer) {\r\n\t\tif (isset($this->_eventObservers[$event])) {\r\n\t\t\t$key = array_search($observer, $this->_eventObservers[$event], true);\r\n\t\t\tif ($key !== false) {\r\n\t\t\t\tarray_splice($this->_eventObservers[$event], $key, 1);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b45753d288d860656d1b8ee8f082f597", "score": "0.6364698", "text": "public function releaseEvents();", "title": "" }, { "docid": "b45753d288d860656d1b8ee8f082f597", "score": "0.6364698", "text": "public function releaseEvents();", "title": "" }, { "docid": "1a6196f90def1dc91aaf96d5879cc292", "score": "0.6362312", "text": "public function unsubscribe(): void;", "title": "" }, { "docid": "c293eb218d7d2400c5bbcef1f828bb56", "score": "0.6359518", "text": "public function detach(EventManagerInterface $events)\r\n {\r\n foreach ($this->listeners as $index => $listener) {\r\n if ($events->detach($listener)) {\r\n unset($this->listeners[$index]);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "1e48d7ba05cb7b1512d0fa1210a1d865", "score": "0.6291713", "text": "public function __destruct()\n\t{\n\t\tif (static::$instance != NULL)\n\t\t\tstatic::$instance = NULL;\n\t\tforeach (static::$events as $event => $events)\n\t\t\tstatic::$events[$event] = [];\n\t}", "title": "" }, { "docid": "6b54c6ab2a23179e05e0479cf8f7dae7", "score": "0.6264709", "text": "public function remove($listener);", "title": "" }, { "docid": "25802ed8c9760e8acc8edb56a0d661fc", "score": "0.6221178", "text": "public function detach(EventManagerInterface $events)\n {\n array_walk($this->listeners, array($events,'detach'));\n $this->listeners = array();\n }", "title": "" }, { "docid": "995148ca94550fa34ecb38ab541f84b6", "score": "0.6220091", "text": "public function clear(): void\n {\n $this->eventRegistry->dequeueEvents();\n }", "title": "" }, { "docid": "10dee13d13f488379daf7bead6a4186c", "score": "0.61968875", "text": "public function detach(\\SplObserver $observer)\n {\n $this->storage->detach($observer);\n }", "title": "" }, { "docid": "324154f0a593147a5de620e33e1cb9df", "score": "0.618468", "text": "public function detach(EventManagerInterface $events)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($events->detach($listener)) {\n unset($listener[$index]);\n }\n }\n }", "title": "" }, { "docid": "5de1edc37af15647775aa46d8b8ba05a", "score": "0.6150725", "text": "public function detach(EventManagerInterface $eventManager)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($eventManager->detach($listener)) {\n unset($this->listeners[$index]);\n }\n }\n }", "title": "" }, { "docid": "60836f96df018e5259a79ceb2c0df735", "score": "0.61415297", "text": "public function clearEvents()\n {\n $this->recorded = [];\n }", "title": "" }, { "docid": "ef09080820fc8e4e98260326b75a95c9", "score": "0.6104358", "text": "public function detach(EventManagerInterface $events)\n {\n foreach ($this->listeners as $i => $listener) {\n if ($events->getSharedManager()->detach(MainProcessor::EVENT_MANAGER_ID, $listener)) {\n unset($this->listeners[$i]);\n }\n }\n }", "title": "" }, { "docid": "fc67a2565da9a063101bd08295787bff", "score": "0.6082302", "text": "public function detach(EventManagerInterface $events)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($events->detach($listener)) {\n unset($this->listeners[$index]);\n }\n }\n }", "title": "" }, { "docid": "fc67a2565da9a063101bd08295787bff", "score": "0.6082302", "text": "public function detach(EventManagerInterface $events)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($events->detach($listener)) {\n unset($this->listeners[$index]);\n }\n }\n }", "title": "" }, { "docid": "fc67a2565da9a063101bd08295787bff", "score": "0.6082302", "text": "public function detach(EventManagerInterface $events)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($events->detach($listener)) {\n unset($this->listeners[$index]);\n }\n }\n }", "title": "" }, { "docid": "fc67a2565da9a063101bd08295787bff", "score": "0.6082302", "text": "public function detach(EventManagerInterface $events)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($events->detach($listener)) {\n unset($this->listeners[$index]);\n }\n }\n }", "title": "" }, { "docid": "16f457d20a9f9afb8502553f80f12b72", "score": "0.6081933", "text": "public function clearSubscribers();", "title": "" }, { "docid": "b681146a53f6ac7a43ab98c7ad67f024", "score": "0.60779595", "text": "public function detach(SplObserver $observer)\n {\n $this->_observers->detach($observer);\n }", "title": "" }, { "docid": "337f2068038df429c7d4699b6e182046", "score": "0.6047214", "text": "private function uninstallEvents()\n {\n $this->load->model('setting/event');\n $this->model_setting_event->deleteEvent('payment_mundipagg');\n }", "title": "" }, { "docid": "8f57b2a99170cafce9c06718012881a7", "score": "0.60418445", "text": "public function detach(): void\n\t{\n\t\t$this->events->detach($this->type, $this->hook);\n\t}", "title": "" }, { "docid": "31ffcec404f1c3aba766088d2d365ec7", "score": "0.604098", "text": "public function detachObserver(Delegate_1 $d)\n\t{\n\t\t// detach this observer\n\t\t$hash = spl_object_hash($d);\n\t\tunset($this->observers[$hash]);\n\t}", "title": "" }, { "docid": "cb02db2086727cace77038fc09966f80", "score": "0.6032711", "text": "function destroy($event) {\n $timers =& Timer::timers();\n unset($timers[$event]);\n }", "title": "" }, { "docid": "5cc280d9d8690be888971f35a68cf350", "score": "0.6018101", "text": "public function detachShared(SharedEventManagerInterface $events)\n\t\t{\n\t\t\tforeach ($this->listeners as $index => $listener) {\n\t\t\t if ($events->detach($index, $listener)) {\n\t\t\t\t unset($this->listeners[$index]);\n\t\t\t }\n\t\t }\n\t\t}", "title": "" }, { "docid": "716c30e53a70cf240e16ca92128b04cd", "score": "0.60106355", "text": "function eventUnRegister($eventName, $id);", "title": "" }, { "docid": "d5ac8060f5356a6becdc2525c08778ac", "score": "0.6003415", "text": "public function detach( \\SplObserver $observer )\n {\n $this->_storage->detach( $observer );\n }", "title": "" }, { "docid": "625a5c40be4252e746bd5f7fb46582c9", "score": "0.5958302", "text": "public function unregister(): void;", "title": "" }, { "docid": "625a5c40be4252e746bd5f7fb46582c9", "score": "0.5958302", "text": "public function unregister(): void;", "title": "" }, { "docid": "70566d997e41d51214d81f690eeba9f6", "score": "0.595781", "text": "public function detach(EventObserver $observer):bool{\r\n $name=$observer->eventName();\r\n if (is_string($name))$name=[$name];\r\n $deatch=0;\r\n foreach ($name as $v){\r\n foreach ($this->storage[$v]??[] as $k=>$ob){\r\n if($ob[0]===$observer){\r\n unset($this->storage[$v][$k]);\r\n $deatch++;\r\n }\r\n }\r\n }\r\n return $deatch;\r\n }", "title": "" }, { "docid": "4ce449e07189372e184b709948caf092", "score": "0.5956411", "text": "public function destroy()\n {\n $this->stop();\n $this->setupListeners();\n }", "title": "" }, { "docid": "57ef127c98fff73154f2b9914a517d88", "score": "0.5951236", "text": "public function _delete()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }", "title": "" }, { "docid": "955e237e6f5898c48332300d2dd723ea", "score": "0.59509367", "text": "public function removeEvent($event);", "title": "" }, { "docid": "5f7656f8d12754f3753c460894d3cad7", "score": "0.5948432", "text": "public static function unsetEventDispatcher()\n {\n static::$dispatcher = null;\n }", "title": "" }, { "docid": "0af5461d235d23d8ae610b59fab503e4", "score": "0.5948298", "text": "public function afterRemove()\n\t{}", "title": "" }, { "docid": "1da5a34a2d204f193cd5920dd2820f08", "score": "0.59436464", "text": "protected function afterRemoving()\n {\n }", "title": "" }, { "docid": "076725f571bff7ab9394bba26db6ba0e", "score": "0.5903692", "text": "public function detach(EventManagerInterface $em)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($em->detach($listener)) {\n unset($this->listeners[$index]);\n }\n }\n }", "title": "" }, { "docid": "336299685e7dd4ca708e533a0f471838", "score": "0.588182", "text": "public function detach(ObservesProxyLoading $observer) : void;", "title": "" }, { "docid": "30c9955d6c2a81392e95306e6f8e019b", "score": "0.5868535", "text": "function UnInstallEvents()\n\t{\n\t}", "title": "" }, { "docid": "de9d67515ae579e2827b2d8edd3be445", "score": "0.5859639", "text": "public function detachShared(SharedEventManagerInterface $events)\n {\n foreach ($this->listeners as $index => $callback) {\n if ($events->detach('', $callback)) {\n unset($this->listeners[$index]);\n }\n }\n }", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.58484274", "text": "public function remove() {}", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.58481026", "text": "public function remove() {}", "title": "" }, { "docid": "777f4f27a67c4a8bf18b9aedee7bcd37", "score": "0.5847074", "text": "public function remove($event, $listener);", "title": "" }, { "docid": "fc2a43288f53a3d117c624815e29f7ea", "score": "0.5838789", "text": "protected function removeInstance() {}", "title": "" }, { "docid": "8f9bdb9c2d8d8f2b89fa1302719b9c25", "score": "0.58321136", "text": "public function clearEvents()\n\t{\n\t\t$this->collEvents = null; // important to set this to NULL since that means it is uninitialized\n\t}", "title": "" }, { "docid": "18130463d0fd193da09d59ff01a738d5", "score": "0.5822584", "text": "public static function ReconfigureObservers()\r\n\t\t{\r\n\t\t\tif (!self::$observersSetuped)\r\n\t\t\t\tself::setupObservers();\r\n\t\t\t\r\n\t\t\tforeach (self::$EventObservers as &$observer)\r\n\t\t\t{\r\n\t\t\t\tif (method_exists($observer, \"__construct\"))\r\n\t\t\t\t\t$observer->__construct();\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "e7dbb3bed8822a790c1661246e49076b", "score": "0.5810345", "text": "public function forget($event)\n {\n unset($this->listeners[$event]);\n }", "title": "" }, { "docid": "d9d3bbf1c83fa571e93073d4576eb32d", "score": "0.5808041", "text": "public function forget($event)\n {\n unset($this->listeners[$event], $this->sorted[$event]);\n }", "title": "" }, { "docid": "3b13ec87319ed3b4164cc5151764cd8e", "score": "0.5806072", "text": "public function unregister()\n {\n $previousHandlers = $this->previousHandlers;\n\n foreach ($previousHandlers as $signal => $handler) {\n if (is_null($handler)) {\n pcntl_signal($signal, SIG_DFL);\n\n unset($previousHandlers[$signal]);\n }\n }\n\n $this->setHandlers($previousHandlers);\n }", "title": "" }, { "docid": "f53edf1efd47abc0b59b89e7244b5dac", "score": "0.5775639", "text": "public function stopListeningForEvents()\n\t\t{\n\n\t\t\t// Initialize the crontab manager if this has not been done before\n\t\t\tif(is_null($this->CronManager)) $this->CronManager = new ssh2_crontab_manager();\n\n\t\t\t// Stop cronjob to call $this-->captureSongHistory()\n\t\t\t$this->CronManager->remove_cronjob(\"checkTimeEventExecutionNeeds\");\n\n\t\t\t// Write status to the config\n\t\t\t$this->data['config']['mod_time__checkTimeEventExecutionNeedsCron'] = \"disabled\";\n\t\t\t$this->writeConfFile($this->data['config'], true);\n\n\t\t}", "title": "" }, { "docid": "e15744cdeda3d19925b53f30aefae9e4", "score": "0.5764163", "text": "public function __destruct()\n {\n $this->configuration->eventDispatcher()->dispatch(new Destruct($this));\n }", "title": "" }, { "docid": "c5a094b55a5cd0d69c5aa8ee89c1a828", "score": "0.57608473", "text": "public function postEventDel();", "title": "" }, { "docid": "b9e08552b5b5fa31e1b9b1b8f4dab227", "score": "0.5755496", "text": "public function removeListeners($event = NULL)\n\t{\n\t\tif (!empty($event) && array_key_exists($event, static::$events)) {\n\t\t\tstatic::$events[$event] = [];\n\t\t} else {\n\t\t\tforeach (static::$events as $evt => $events)\n\t\t\t\tstatic::$events[$evt] = [];\n\t\t}\n\t}", "title": "" }, { "docid": "92f88a7c46a31b4a01bd5613eae85bff", "score": "0.57503086", "text": "protected function __del__() { }", "title": "" }, { "docid": "e95c64ff2dc5b32103e377a51c5110b9", "score": "0.57359457", "text": "public function removeSubscribes();", "title": "" }, { "docid": "9c386f8c1d30248c4f42f0d2f1df48fa", "score": "0.5727217", "text": "public function removeObserver(Component $observer) {\n $observer->attributes()->remove('data-equalizer-watch');\n return $this;\n }", "title": "" }, { "docid": "e44ad62b9e18842c1a7b3fe7adfc4cbe", "score": "0.57238793", "text": "public function __destruct() {\n\t\tif($this->_listeningenabled)\n\t\t\t$this->unlisten();\n\t}", "title": "" }, { "docid": "5a75a1b3d978b8bd22217edf9b3b81fe", "score": "0.5694027", "text": "static public function deleteHandlers()\n\t{\n\t\tself::$handlers = array();\n\t}", "title": "" }, { "docid": "19ca4bb2d0f5f771ebec2ea6de1bd4e5", "score": "0.5668766", "text": "public static function clearCache()\n {\n static::$eventMap = [];\n \\Cache::forget(static::EVENT_CACHE_KEY);\n }", "title": "" }, { "docid": "19ca4bb2d0f5f771ebec2ea6de1bd4e5", "score": "0.5668766", "text": "public static function clearCache()\n {\n static::$eventMap = [];\n \\Cache::forget(static::EVENT_CACHE_KEY);\n }", "title": "" }, { "docid": "c286d45f05f9eb1939abe2ad31d55a21", "score": "0.5661336", "text": "public function removeNotifications()\n {\n foreach ($this->notifications as $notification) {\n $notification->delete();\n }\n }", "title": "" }, { "docid": "b4e12414efa6f5cc20f1845ece842f60", "score": "0.5643641", "text": "public function onQuit()\n {\n $nick = trim($this->event->getNick());\n\n foreach ($this->store as $chan => $store) {\n if (isset($store[$nick])) {\n unset($this->store[$chan][$nick]);\n }\n }\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5641923", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5641923", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5641923", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5641923", "text": "public function remove();", "title": "" }, { "docid": "78f1a0e717bd0c8e855680a7fa560daa", "score": "0.5616769", "text": "public function testRemoveListener()\n {\n // Arrange\n $listenerCalled = false;\n $communicator = new Communicator();\n\n $callback = function () use (&$listenerCalled) {\n $listenerCalled = true;\n };\n\n // Act\n $communicator->addListener($callback);\n $communicator->removeListener($callback);\n $communicator->broadcast([], 'channel', [], []);\n\n // Assert\n static::assertFalse($listenerCalled);\n }", "title": "" }, { "docid": "3da70cb3856ef5af28d3d6d227243aeb", "score": "0.5615554", "text": "public function remSubscriber(IEventSubscriber $Subscriber)\n {\n // Loop through each subscriver event\n foreach ($Subscriber->getSubscribedEvents() as $EventName => $Params) {\n\n // Params is array[]|Traversable[]\n if (is_array($Params) && is_array($Params[0]) ?: $Params[0] instanceof Traversable) {\n\n // Deregister each method\n foreach ($Params as $NewParams) {\n $this->deregister(\n $EventName,\n array(\n $Subscriber,\n $NewParams[0]\n )\n );\n }\n\n // Otherwise, Deregester method\n } else {\n $this->deregister(\n $EventName,\n array(\n $Subscriber,\n is_string($Params) ? $Params : $Params[0]\n )\n );\n }\n }\n }", "title": "" }, { "docid": "b42cfd530394ce6130cd4eac18fcd71a", "score": "0.5609083", "text": "public function remove() {\n\t\t$this->setRemoved(TRUE);\n\t}", "title": "" }, { "docid": "60ce8a4086e30896e82e995d08a046cf", "score": "0.5605242", "text": "public function detach(EventCollection $events)\n {\n foreach ($this->listeners as $index => $listener) {\n if ($events->detach($listener)) {\n unset($this->listeners[$index]);\n }\n }\n }", "title": "" }, { "docid": "658a28d06ae27c5040995a3fa2f92c37", "score": "0.559373", "text": "public function detach(\\SplObserver $observer) {\n\t\treturn $this->storage->delete($observer);\n\t}", "title": "" }, { "docid": "50e1d661d58b2b3572d98b07e3468fe4", "score": "0.558334", "text": "public function truncateEventClosures(): void\n {\n $this->listeners = [];\n }", "title": "" }, { "docid": "5b6ecd830a28880382d515a1ad8572c3", "score": "0.5582717", "text": "public static function unobserve(prototype\\Prototype $prototype, callable $callback) :void\n {\n if ( isset(self::$observers) && isset(self::$observers[$prototype]) ) {\n unset(self::$observers[$prototype][$callback]);\n }\n }", "title": "" }, { "docid": "515945c00996e3039c235efad412322e", "score": "0.55797374", "text": "function unextend() {\n if ($this->observation) {\n $this->observation->cancel();\n $this->observation = NULL;\n }\n }", "title": "" }, { "docid": "dea60611b15f870cafc78a5e9a43fac8", "score": "0.55658066", "text": "protected function emitNotificationRemoved(Notification $notification) {}", "title": "" }, { "docid": "8732378ebb5c9e02e4b177a3f49d58f6", "score": "0.55609524", "text": "public function __destruct() {\n unset($this->components);\n }", "title": "" }, { "docid": "eb34d491f45f23cdee19aaaeb22aebba", "score": "0.5555423", "text": "public static function deregister_event() {\n\t\twp_clear_scheduled_hook( 'learn_press_schedule_cleanup_temp_users' );\n\t}", "title": "" }, { "docid": "f01aefffe61cce12732612f70f425cd0", "score": "0.5541165", "text": "function detach(ftpClientObserver $observer) {\r\n\t\tif ( !isset($this->_listeners[$observer->getId()]) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tunset($this->_listeners[$observer->getId()]);\r\n\t\treturn true;\r\n\t}", "title": "" } ]
13d11c226eefbc3af962b1fee70bad09
Short description for function Long description for function (if any)...
[ { "docid": "33977e4dc86b00523481b47f9a2b34f7", "score": "0.0", "text": "public function sayHello(string $name);", "title": "" } ]
[ { "docid": "a7bfeb59d480d09b9b32044cbd80a5f0", "score": "0.737623", "text": "public function description();", "title": "" }, { "docid": "a7bfeb59d480d09b9b32044cbd80a5f0", "score": "0.737623", "text": "public function description();", "title": "" }, { "docid": "a7bfeb59d480d09b9b32044cbd80a5f0", "score": "0.737623", "text": "public function description();", "title": "" }, { "docid": "3d616c524f88406f39466c3d0f9f9564", "score": "0.7337912", "text": "public function getFunctionDescription()\r\n {\r\n return $this->functionDescription;\r\n }", "title": "" }, { "docid": "29b40fcd801357d1f3b8ece0dd7a0374", "score": "0.7328449", "text": "public function description() : string;", "title": "" }, { "docid": "16e3a7f7ddaf7649a9c9ecf5f4bd4433", "score": "0.72877705", "text": "abstract public function description();", "title": "" }, { "docid": "937750a0bbd312e3f0965e6de971e7b4", "score": "0.71370894", "text": "public function description(): string;", "title": "" }, { "docid": "937750a0bbd312e3f0965e6de971e7b4", "score": "0.71370894", "text": "public function description(): string;", "title": "" }, { "docid": "937750a0bbd312e3f0965e6de971e7b4", "score": "0.71370894", "text": "public function description(): string;", "title": "" }, { "docid": "e08a14e465598f5dd31266d17b67826b", "score": "0.7100607", "text": "function getDescription();", "title": "" }, { "docid": "e08a14e465598f5dd31266d17b67826b", "score": "0.7100607", "text": "function getDescription();", "title": "" }, { "docid": "e08a14e465598f5dd31266d17b67826b", "score": "0.7100607", "text": "function getDescription();", "title": "" }, { "docid": "9b2db19ab030615da8e714895e390744", "score": "0.6914583", "text": "public static function getDescription();", "title": "" }, { "docid": "9b2db19ab030615da8e714895e390744", "score": "0.6914583", "text": "public static function getDescription();", "title": "" }, { "docid": "9b2db19ab030615da8e714895e390744", "score": "0.6914583", "text": "public static function getDescription();", "title": "" }, { "docid": "69303d12d4e1f325fc261ba778703bf9", "score": "0.6857678", "text": "abstract public function description(): string;", "title": "" }, { "docid": "c31b24a258ffebdd47723463d5e7d0a9", "score": "0.6843004", "text": "abstract public function descriptions();", "title": "" }, { "docid": "44aa7c67e8fe86c8d5a989ebc0293f0f", "score": "0.6834471", "text": "function description($description)\r\n{\r\n global $Cbucket;\r\n //Getting List of comment functions\r\n $func_list = $Cbucket->getFunctionList('description');\r\n //Applying Function\r\n if(count($func_list)>0) {\r\n foreach($func_list as $func) {\r\n $description = $func($description);\r\n }\r\n }\r\n return nl2br($description);\r\n}", "title": "" }, { "docid": "9d66759d8721666b16703b1441816bf4", "score": "0.67951626", "text": "public function getDescription(): string;", "title": "" }, { "docid": "9d66759d8721666b16703b1441816bf4", "score": "0.67951626", "text": "public function getDescription(): string;", "title": "" }, { "docid": "9d66759d8721666b16703b1441816bf4", "score": "0.67951626", "text": "public function getDescription(): string;", "title": "" }, { "docid": "9d66759d8721666b16703b1441816bf4", "score": "0.67951626", "text": "public function getDescription(): string;", "title": "" }, { "docid": "9d66759d8721666b16703b1441816bf4", "score": "0.67951626", "text": "public function getDescription(): string;", "title": "" }, { "docid": "9d66759d8721666b16703b1441816bf4", "score": "0.67951626", "text": "public function getDescription(): string;", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.67685074", "text": "public function getDescription();", "title": "" }, { "docid": "36562485f63ab8248b50702e2c090d37", "score": "0.6757668", "text": "abstract function getDescription();", "title": "" }, { "docid": "9cd7f6658f4b4ff839f55b8999b93ff5", "score": "0.6704125", "text": "public abstract function getDescription();", "title": "" }, { "docid": "4647a3086f9d2c58d805c3fade46c519", "score": "0.6672694", "text": "abstract public function getDescription();", "title": "" }, { "docid": "3b3441b5ab3bd2da97f618d6eecaebbe", "score": "0.66358685", "text": "function display_help() {\n\techo <<<EOT\nSyntax:\nfusionforge-soap-api [options] [module name] [function] [parameters]\n* Options:\n -h or --help Display this screen\n -v Verbose\n\nAvailable modules:\n * document\n * frs\n * project\n * scm\n * task\n * tracker\n * wiki\n\nAvailable functions for the default module:\n * login: Begin a session with the server.\n * logout: Terminate a session\n\nEOT;\n}", "title": "" }, { "docid": "1052527c7130476226655caace1510d7", "score": "0.6591393", "text": "public function get_description();", "title": "" }, { "docid": "a6089aafe0455b9c922ff30f568616d7", "score": "0.6584388", "text": "public function description() {\n\t\treturn '';\n\t}", "title": "" }, { "docid": "ea550aec29aa5c22bd475da78205326e", "score": "0.6553245", "text": "public function getBriefDescription()\n {\n return substr($this->description,0,40).'...';\n }", "title": "" }, { "docid": "baf3e92ca97220c8f08163cb3c55aec7", "score": "0.6551193", "text": "public function getShortDescription(): string\n {\n return $this->short_description;\n }", "title": "" }, { "docid": "f41989a906ff791f1a695a13dc23f281", "score": "0.65330094", "text": "public function ogDescription();", "title": "" }, { "docid": "4a4ca661f2bd86be4b657d5b53952640", "score": "0.65239286", "text": "static function get_description()\n {\n return \"Take the product of the scores.\";\n }", "title": "" }, { "docid": "6706379ddb2769cdcaa2e8ada4664bec", "score": "0.6503063", "text": "function Help()\n\t{\n\t\t//Return a text description explaining the command's syntax and purpose.\n\t\t\n\t\treturn \"$this->name: $this->desc\\n(Syntax: \" .$this->bot->GetNick() .\", $this->name [CommandName])\";\n\t}", "title": "" }, { "docid": "2203a46569742202a58e07a4b0939046", "score": "0.6490668", "text": "public function description(): string\n {\n return \"maybe maybe not\";\n }", "title": "" }, { "docid": "30b49bd280204902d6fa79e04a28f22e", "score": "0.64823055", "text": "abstract public function get_description();", "title": "" }, { "docid": "1022d3ba54c4692a5f930ef384e63825", "score": "0.648196", "text": "public function getDescription() {\n\t\treturn 'There should be exactly one blank line before function start and after function end';\n\t}", "title": "" }, { "docid": "b08ed67fe8c160cf5479c5baf815b0d0", "score": "0.63774854", "text": "public function section_general_desc() {\t\t\n\t}", "title": "" }, { "docid": "f13b84c3e1d194fdac883b69ce87183f", "score": "0.63683236", "text": "public function getStrLongDescription()\n {\n return \"\";\n }", "title": "" }, { "docid": "a7996e754892c08a18b49f9841465ee4", "score": "0.63554937", "text": "public function get_description() {\r\n\t\treturn '';\t\r\n\t}", "title": "" }, { "docid": "45ccc56f2f7cc888d11e8ad14e8bc56b", "score": "0.6346933", "text": "function showDescription( ) {\n\t\t\t\n\t$chrDescription = \"\n*****************************************************************\nName: Nagios Portal\nAuthor: Paul Maddox <paul.maddox@gmail.com>\n\t\nThis application provides a single dashboard for multiple nagios\nservers. It has a RESTful API (JSON) that can be used by external\nservices to obtain information about environments and the state\nof nagios checks\n*****************************************************************\n\t\nURL: /json\nType: GET\nDesc: This information page\n\nURL: /json/environments\nType: GET\nDesc: Returns a JSON output of the various nagios environments/servers\n\nURL: /json/criticals \nType: GET\nDesc: Returns a JSON output all services currently in CRITICAL state\n\nURL: /json/warnings\nType: GET\nDesc: Returns a JSON output of all services currently in WARNING state\n\n\";\n\n\tdisplay($chrDescription);\n\t\t\n\treturn true;\n\t\t\n}", "title": "" }, { "docid": "726e1d0c22df20d2e0f48b0db83c9c4e", "score": "0.6340687", "text": "public function getDescription() {\n\t\treturn 'Use a cObj to generate content';\n\t}", "title": "" }, { "docid": "49595d5c16b413fa2fd5b993c7d125a3", "score": "0.633477", "text": "abstract public function commandDescription();", "title": "" }, { "docid": "c940a5bf26da65cdcd87b5038f6fab26", "score": "0.6334552", "text": "public function summary()\n {\n // @todo: Display summary\n }", "title": "" }, { "docid": "9f3978495c5b7297b88dd288f2f7c760", "score": "0.6300659", "text": "function Help()\n\t{\n\t\t//Return a text description explaining the command's syntax and purpose.\n\t\treturn \"$this->name: $this->desc\\n(This should only be invoked by the server.)\";\n\t}", "title": "" }, { "docid": "c46104cb4f19d07c31905dcd4bb9df63", "score": "0.62953424", "text": "public abstract function summary();", "title": "" }, { "docid": "78ac115529d687620340149d5ae6143b", "score": "0.6294892", "text": "public function getDescription() {\n // TODO: Implement getDescription() method.\n }", "title": "" }, { "docid": "04050f582811b99b1157b397d41f70a9", "score": "0.6292943", "text": "public function getShortMessage();", "title": "" }, { "docid": "de689b052e5695876df70325007e1eed", "score": "0.62925607", "text": "public static function description(): string\n {\n return 'Upload a novel genome annotation';\n }", "title": "" }, { "docid": "f34359f0f5a57c7951ca82b46fc6b567", "score": "0.6285046", "text": "public function getEventDescription()\n {\n }", "title": "" }, { "docid": "ae57b499b6268314c04c033da1032f9d", "score": "0.62418395", "text": "public function description(): string\r\n {\r\n return \"\";\r\n }", "title": "" }, { "docid": "251258486867e83db2a541ee8dbae174", "score": "0.6238887", "text": "public static function getDescription()\n\t{\n\t\treturn 'zugspitze client framework integration i.e. scaffoldgenarators, service proxy ant builds, ...';\n\t}", "title": "" }, { "docid": "2b6baccaddc60af14c010e39314a1b6d", "score": "0.62385935", "text": "public static function getDescription()\n {\n return '';\n }", "title": "" }, { "docid": "115b56e253ddb6e900a8f478e9a73c64", "score": "0.6231855", "text": "public function description($description);", "title": "" }, { "docid": "489412a37bf1ab2679b3129cffd21e78", "score": "0.62204844", "text": "public function getSummaryForDisplay(): string\n {\n if (\\is_string($this->description)) {\n return $this->description;\n }\n\n return \\is_string($this->callback) ? $this->callback : 'Closure';\n }", "title": "" }, { "docid": "4ef1cdda8feb8c6ec3f1fc52e4d7956c", "score": "0.62190783", "text": "public function getShortDescription()\n\t{\n\t\treturn WgTextTools::truncate($this->description, 40);\n\t}", "title": "" }, { "docid": "0ac53d9e1267f99ba3a8db61400ed021", "score": "0.6217857", "text": "public function getShortName(): string;", "title": "" }, { "docid": "03848c332948ddcc2c4b29156b53b984", "score": "0.6195369", "text": "function formidable_section_description() {\n _e( 'Use the field(s) below to enter Formidable shortcodes.', 'inter' );\n }", "title": "" }, { "docid": "c57f6efc137d25582f26a4d24601700e", "score": "0.6187774", "text": "public function getLong_Description() {\n return $this->long_description;\n }", "title": "" }, { "docid": "832a78d8d98dec3db0efc2bfbdc2491f", "score": "0.61856437", "text": "public function getShortDescription()\n {\n return $this->shortDescription;\n }", "title": "" }, { "docid": "224d54afce49ab19cc714e9eed15576e", "score": "0.6185166", "text": "public function shortDescription() {\n if(strlen($this->current()->details) < 510) {\n return strip_tags($this->current()->details);\n }\n return strip_tags(substr($this->current()->details, 0, strpos($this->current()->details, ' ', 500))) . '...';\n }", "title": "" }, { "docid": "2c62f467dab689c38f8ef8e1ba625a97", "score": "0.6183406", "text": "public function getEventDescription(): string;", "title": "" }, { "docid": "b6ee52ba6c78548612ca2ec382ba738e", "score": "0.6177947", "text": "abstract public function help();", "title": "" }, { "docid": "6f3a3603f68b22f41a5d7e46a18b6cba", "score": "0.6173926", "text": "public function get_description() {\n\t\treturn $this->args['description'];\n\t}", "title": "" }, { "docid": "30fa7f5667f36a3d7d7059b650e0a2b7", "score": "0.6169761", "text": "public function getHelp();", "title": "" }, { "docid": "30fa7f5667f36a3d7d7059b650e0a2b7", "score": "0.6169761", "text": "public function getHelp();", "title": "" }, { "docid": "5207a884ac7f504042ff5eaf88e7aecc", "score": "0.6156471", "text": "public function getDescription()\n {\n return '';\n }", "title": "" }, { "docid": "5207a884ac7f504042ff5eaf88e7aecc", "score": "0.6156471", "text": "public function getDescription()\n {\n return '';\n }", "title": "" }, { "docid": "5207a884ac7f504042ff5eaf88e7aecc", "score": "0.6156471", "text": "public function getDescription()\n {\n return '';\n }", "title": "" }, { "docid": "4411e18476a3f25418898286c36ba740", "score": "0.61522144", "text": "protected function help()\n {\n }", "title": "" } ]
5ca2ca81d9d47e6a08f7144fcf160715
Determine if the row is empty or void of any values. This is handy for scenarios of CSV files that may have additional lines for no reason
[ { "docid": "909f01eb727c4197f1e873ead867d7d1", "score": "0.73594165", "text": "public function isEmpty() {\n return empty($this->rowData);\n }", "title": "" } ]
[ { "docid": "698efa4f5aa86cd5d8d0709b5d463dbe", "score": "0.7466529", "text": "function is_empty_row($row){\n\tforeach($row AS $item) if(!empty($item)) return FALSE;\n\t\n\t# if you get here all items in the array are empty\n\treturn TRUE;\n}", "title": "" }, { "docid": "8d9040aa8e87ed36f5d6211bb07a7869", "score": "0.70148027", "text": "function EmptyRow() {\r\n\t\tglobal $filesystem;\r\n\t\tif ($filesystem->mount->CurrentValue <> $filesystem->mount->OldValue)\r\n\t\t\treturn FALSE;\r\n\t\tif ($filesystem->path->CurrentValue <> $filesystem->path->OldValue)\r\n\t\t\treturn FALSE;\r\n\t\tif ($filesystem->parent->CurrentValue <> $filesystem->parent->OldValue)\r\n\t\t\treturn FALSE;\r\n\t\tif ($filesystem->deprecated->CurrentValue <> $filesystem->deprecated->OldValue)\r\n\t\t\treturn FALSE;\r\n\t\tif ($filesystem->gid->CurrentValue <> $filesystem->gid->OldValue)\r\n\t\t\treturn FALSE;\r\n\t\tif ($filesystem->snapshot->CurrentValue <> $filesystem->snapshot->OldValue)\r\n\t\t\treturn FALSE;\r\n\t\tif ($filesystem->tapebackup->CurrentValue <> $filesystem->tapebackup->OldValue)\r\n\t\t\treturn FALSE;\r\n\t\tif ($filesystem->diskbackup->CurrentValue <> $filesystem->diskbackup->OldValue)\r\n\t\t\treturn FALSE;\r\n\t\tif ($filesystem->type->CurrentValue <> $filesystem->type->OldValue)\r\n\t\t\treturn FALSE;\r\n\t\tif ($filesystem->contact->CurrentValue <> $filesystem->contact->OldValue)\r\n\t\t\treturn FALSE;\r\n\t\tif ($filesystem->contact2->CurrentValue <> $filesystem->contact2->OldValue)\r\n\t\t\treturn FALSE;\r\n\t\tif ($filesystem->rescomp->CurrentValue <> $filesystem->rescomp->OldValue)\r\n\t\t\treturn FALSE;\r\n\t\tif ($filesystem->maxdepth->CurrentValue <> $filesystem->maxdepth->OldValue)\r\n\t\t\treturn FALSE;\r\n\t\treturn TRUE;\r\n\t}", "title": "" }, { "docid": "43f6fb493ea61d8584ada3b26cc4e0b4", "score": "0.653789", "text": "public function testGetRows_WithoutData() {\n\t\t$this->assertEmpty($this->csv->getRows());\n\t}", "title": "" }, { "docid": "e291018000b7991950b4bb815737c0f0", "score": "0.64820147", "text": "public function isEmpty()\n {\n return count( $this->values ) === 0;\n }", "title": "" }, { "docid": "e291018000b7991950b4bb815737c0f0", "score": "0.64820147", "text": "public function isEmpty()\n {\n return count( $this->values ) === 0;\n }", "title": "" }, { "docid": "246c2c4b90536309c94f272768c0eae7", "score": "0.64753723", "text": "public function empty()\r\n {\r\n return $this->numRows() == 0;\r\n }", "title": "" }, { "docid": "2e258d239b36f9607963ef676efd12c3", "score": "0.6356352", "text": "public function isEmpty()\n {\n return empty($this->rawData);\n }", "title": "" }, { "docid": "b881ec37be9fca7cd10eb6e816045d2b", "score": "0.6350503", "text": "public function isEmpty()\n {\n return ! count($this->getValue());\n }", "title": "" }, { "docid": "6722ab57a283f2d762becea55f5deb81", "score": "0.63340914", "text": "private function is_empty_cell($data){\n\n\t\t$data = $this->rip_tags($data);\n\n\t\tif($data === \"\"){\n\n\t\t\treturn 'Y';\n\n\t\t}else{\n\n\t\t\treturn 'N';\n\t\t}\n\n\t}", "title": "" }, { "docid": "730d726d91021ee40f3af60a498449e3", "score": "0.6312566", "text": "public function isEmpty()\n {\n foreach ($this->columns as &$column) {\n if (!empty($column)) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "f41c2eab104b0e89468224eca0f7f590", "score": "0.6311644", "text": "public function is_empty ()\n {\n return ! isset ($this->_value) || ! $this->_value->size ();\n }", "title": "" }, { "docid": "dbd651d4675397d76edc88f8753fe305", "score": "0.6303274", "text": "public function testRowsAttribute_DefaultValue() {\n\t\t$this->assertEmpty($this->csv->getRows());\n\t}", "title": "" }, { "docid": "e85ea9832fcf8f7b9e2ea9684f3a7c0a", "score": "0.6248596", "text": "function isEmpty() {\n return count($this->entries) < 1;\n }", "title": "" }, { "docid": "6e5b98d4ec2b0413562dc878d233675a", "score": "0.6231742", "text": "public function valid() {\n return $this->_row !== false && $this->_row !== null;\n }", "title": "" }, { "docid": "a674c5fc32f69ab6fef00f9d646ce3ad", "score": "0.6220982", "text": "public function isEmpty() {\n\t\treturn $this->getValue() == null || $this->getValue() == '';\n\t}", "title": "" }, { "docid": "b8b84eafd4289961b78d9756a60b5aae", "score": "0.6192528", "text": "public function isEmpty ()\n {\n return count($this->data) == 0;\n }", "title": "" }, { "docid": "17820a6dd8ea40fdcc39903e46ee50a8", "score": "0.61794794", "text": "public function emptyRow()\n\t{\n\t\tglobal $CurrentForm;\n\t\tif ($CurrentForm->hasValue(\"x_PropertyNo\") && $CurrentForm->hasValue(\"o_PropertyNo\") && $this->PropertyNo->CurrentValue != $this->PropertyNo->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_ClientSerNo\") && $CurrentForm->hasValue(\"o_ClientSerNo\") && $this->ClientSerNo->CurrentValue != $this->ClientSerNo->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_ClientID\") && $CurrentForm->hasValue(\"o_ClientID\") && $this->ClientID->CurrentValue != $this->ClientID->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_PropertyGroup\") && $CurrentForm->hasValue(\"o_PropertyGroup\") && $this->PropertyGroup->CurrentValue != $this->PropertyGroup->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_PropertyType\") && $CurrentForm->hasValue(\"o_PropertyType\") && $this->PropertyType->CurrentValue != $this->PropertyType->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_Location\") && $CurrentForm->hasValue(\"o_Location\") && $this->Location->CurrentValue != $this->Location->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_PropertyStatus\") && $CurrentForm->hasValue(\"o_PropertyStatus\") && $this->PropertyStatus->CurrentValue != $this->PropertyStatus->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_PropertyUse\") && $CurrentForm->hasValue(\"o_PropertyUse\") && $this->PropertyUse->CurrentValue != $this->PropertyUse->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_LandExtentInHA\") && $CurrentForm->hasValue(\"o_LandExtentInHA\") && $this->LandExtentInHA->CurrentValue != $this->LandExtentInHA->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_RateableValue\") && $CurrentForm->hasValue(\"o_RateableValue\") && $this->RateableValue->CurrentValue != $this->RateableValue->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_SupplementaryValue\") && $CurrentForm->hasValue(\"o_SupplementaryValue\") && $this->SupplementaryValue->CurrentValue != $this->SupplementaryValue->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_ExemptCode\") && $CurrentForm->hasValue(\"o_ExemptCode\") && $this->ExemptCode->CurrentValue != $this->ExemptCode->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_Improvements\") && $CurrentForm->hasValue(\"o_Improvements\") && $this->Improvements->CurrentValue != $this->Improvements->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_StreetAddress\") && $CurrentForm->hasValue(\"o_StreetAddress\") && $this->StreetAddress->CurrentValue != $this->StreetAddress->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_Longitude\") && $CurrentForm->hasValue(\"o_Longitude\") && $this->Longitude->CurrentValue != $this->Longitude->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_Latitude\") && $CurrentForm->hasValue(\"o_Latitude\") && $this->Latitude->CurrentValue != $this->Latitude->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_Incumberance\") && $CurrentForm->hasValue(\"o_Incumberance\") && $this->Incumberance->CurrentValue != $this->Incumberance->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_SubDivisionOf\") && $CurrentForm->hasValue(\"o_SubDivisionOf\") && $this->SubDivisionOf->CurrentValue != $this->SubDivisionOf->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_LastUpdatedBy\") && $CurrentForm->hasValue(\"o_LastUpdatedBy\") && $this->LastUpdatedBy->CurrentValue != $this->LastUpdatedBy->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_LastUpdateDate\") && $CurrentForm->hasValue(\"o_LastUpdateDate\") && $this->LastUpdateDate->CurrentValue != $this->LastUpdateDate->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_LandValue\") && $CurrentForm->hasValue(\"o_LandValue\") && $this->LandValue->CurrentValue != $this->LandValue->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_ImprovementsValue\") && $CurrentForm->hasValue(\"o_ImprovementsValue\") && $this->ImprovementsValue->CurrentValue != $this->ImprovementsValue->OldValue)\n\t\t\treturn FALSE;\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "80fa60644d56c9b815f7ff4c86f284ea", "score": "0.6174759", "text": "public function emptyRow()\n\t{\n\t\tglobal $CurrentForm;\n\t\tif ($CurrentForm->hasValue(\"x_ProvinceCode\") && $CurrentForm->hasValue(\"o_ProvinceCode\") && $this->ProvinceCode->CurrentValue != $this->ProvinceCode->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_LACode\") && $CurrentForm->hasValue(\"o_LACode\") && $this->LACode->CurrentValue != $this->LACode->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_DepartmentCode\") && $CurrentForm->hasValue(\"o_DepartmentCode\") && $this->DepartmentCode->CurrentValue != $this->DepartmentCode->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_SectionCode\") && $CurrentForm->hasValue(\"o_SectionCode\") && $this->SectionCode->CurrentValue != $this->SectionCode->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_SubstantivePosition\") && $CurrentForm->hasValue(\"o_SubstantivePosition\") && $this->SubstantivePosition->CurrentValue != $this->SubstantivePosition->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_DateOfCurrentAppointment\") && $CurrentForm->hasValue(\"o_DateOfCurrentAppointment\") && $this->DateOfCurrentAppointment->CurrentValue != $this->DateOfCurrentAppointment->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_LastAppraisalDate\") && $CurrentForm->hasValue(\"o_LastAppraisalDate\") && $this->LastAppraisalDate->CurrentValue != $this->LastAppraisalDate->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_AppraisalStatus\") && $CurrentForm->hasValue(\"o_AppraisalStatus\") && $this->AppraisalStatus->CurrentValue != $this->AppraisalStatus->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_DateOfExit\") && $CurrentForm->hasValue(\"o_DateOfExit\") && $this->DateOfExit->CurrentValue != $this->DateOfExit->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_EmploymentType\") && $CurrentForm->hasValue(\"o_EmploymentType\") && $this->EmploymentType->CurrentValue != $this->EmploymentType->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_EmploymentStatus\") && $CurrentForm->hasValue(\"o_EmploymentStatus\") && $this->EmploymentStatus->CurrentValue != $this->EmploymentStatus->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_EmployeeNumber\") && $CurrentForm->hasValue(\"o_EmployeeNumber\") && $this->EmployeeNumber->CurrentValue != $this->EmployeeNumber->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_SalaryNotch\") && $CurrentForm->hasValue(\"o_SalaryNotch\") && $this->SalaryNotch->CurrentValue != $this->SalaryNotch->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_BasicMonthlySalary\") && $CurrentForm->hasValue(\"o_BasicMonthlySalary\") && $this->BasicMonthlySalary->CurrentValue != $this->BasicMonthlySalary->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_ThirdParties\") && $CurrentForm->hasValue(\"o_ThirdParties\") && $this->ThirdParties->CurrentValue != $this->ThirdParties->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_PayrollCode\") && $CurrentForm->hasValue(\"o_PayrollCode\") && $this->PayrollCode->CurrentValue != $this->PayrollCode->OldValue)\n\t\t\treturn FALSE;\n\t\tif ($CurrentForm->hasValue(\"x_DateOfConfirmation\") && $CurrentForm->hasValue(\"o_DateOfConfirmation\") && $this->DateOfConfirmation->CurrentValue != $this->DateOfConfirmation->OldValue)\n\t\t\treturn FALSE;\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "f329f066458e1e26a6b9a8e52f7cff34", "score": "0.61545235", "text": "public function isEmpty()\n\t{\n\t\treturn (!$this->hasData());\n\t}", "title": "" }, { "docid": "24455cb544ff73628e5b055b5aa0e881", "score": "0.6140234", "text": "private function checkEmptyFields($data){\n foreach ($data as $value) {\n if (empty($value)) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "0c0d64a29d71a4252890f43369de8cf7", "score": "0.61207867", "text": "public function isEmpty()\n {\n return empty($this->getValue());\n }", "title": "" }, { "docid": "e470c3afa44bedfc88e730edf9b0cd80", "score": "0.6098789", "text": "public function isEmpty()\n\t{\n\t\treturn $this->data->isEmpty();\n\t}", "title": "" }, { "docid": "e470c3afa44bedfc88e730edf9b0cd80", "score": "0.6098789", "text": "public function isEmpty()\n\t{\n\t\treturn $this->data->isEmpty();\n\t}", "title": "" }, { "docid": "ccc53f33b2c7e2ff871b7607440f96ca", "score": "0.6092044", "text": "public function isEmpty(): bool\n {\n return empty($this->getValue());\n }", "title": "" }, { "docid": "5589f5e1526885e915f31cda7afadd75", "score": "0.60613865", "text": "public function is_empty()\n\t{\n\t\treturn (empty($this->data)) ? true : false;\n\t}", "title": "" }, { "docid": "3f6e0e210f71faa153d5f5105e2d6e05", "score": "0.6051259", "text": "public function IsRow()\n\t{\n\t\treturn !$this->IsQuery();\n\t}", "title": "" }, { "docid": "c419077f48ed18ccef53a53e4f9c619f", "score": "0.60409844", "text": "function is_empty(){\n if( strlen($this->data) ){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "6d8a3d88ce83fd78d8657c1975123818", "score": "0.60326666", "text": "function isEmpty(&$record)\n {\n \tif ($this->hasFlag(AF_OBLIGATORY))\n \t{\n\t \t$loaded = $this->load(null,$record);\n\t \treturn empty($loaded);\n \t}\n\t else\n\t {\n\t \treturn parent::isEmpty($record);\n\t }\n }", "title": "" }, { "docid": "072f71a0a7f3c6c88d63a4c9d2e18a6d", "score": "0.60238355", "text": "public function isEmpty(): bool\n {\n return $this\n ->columns()\n ->filter(function ($column) {\n return $column->isNotEmpty();\n })\n ->count() === 0;\n }", "title": "" }, { "docid": "214a6c46f892b2e2e5ff5e5e8c7c6a79", "score": "0.6017479", "text": "public function isEmpty() {\n\t\treturn empty( $this->data );\n\t}", "title": "" }, { "docid": "67c38778d29bb05274404a5aec9c1365", "score": "0.6016073", "text": "public function isEmpty() {\n return empty($this->value);\n }", "title": "" }, { "docid": "3269396e777ca1665e65c63453d5ad4e", "score": "0.5985179", "text": "public function hasData() {\n return $this->getStatus() && $this->getNumRows() > 0;\n }", "title": "" }, { "docid": "d0d155fba65816354afd18ea6e0f8440", "score": "0.59840304", "text": "function isEmpty()\n {\n return $this->result == null || $this->result['name'] == '';\n }", "title": "" }, { "docid": "bdd9b0bb9b4eb0aa25afcb78ed9f61f7", "score": "0.59802264", "text": "public function isEmpty()\n {\n return $this->data->isEmpty();\n }", "title": "" }, { "docid": "288d55fc757cd12e98e7c676ea466ad1", "score": "0.5973317", "text": "public function testFailBlankFirstRow()\n {\n $this->markTestIncomplete();\n }", "title": "" }, { "docid": "c4c4945ea3e6e2c8f396672c9448f460", "score": "0.5972152", "text": "private function areFieldsEmpty($data)\n {\n foreach ($data as $key => $value) {\n if (empty($value))\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "1f58242287c507511a340d68b245bb27", "score": "0.59628373", "text": "public function isEmpty()\n {\n return empty($this->data);\n }", "title": "" }, { "docid": "1f58242287c507511a340d68b245bb27", "score": "0.59628373", "text": "public function isEmpty()\n {\n return empty($this->data);\n }", "title": "" }, { "docid": "3b54b2b9872de68ad2e17dd254b97051", "score": "0.5954602", "text": "public function isEmpty()\n {\n $v = $this->getValue();\n\n if (is_array($v) && isset($v['hour'], $v['minute']) && is_numeric($v['hour']) && is_numeric($v['minute'])) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "c9c4e5c44b37800dda24bc9f77d43c45", "score": "0.5930993", "text": "public function isNonEmpty(): bool;", "title": "" }, { "docid": "7555b51c2aa4d65a064e4648a87afc0b", "score": "0.5928995", "text": "function isFilled() {\r\n return !is_null($this->getValue());\r\n }", "title": "" }, { "docid": "8cc3667babd13f989b03ff742df9181b", "score": "0.5925157", "text": "public function is_empty() {\n\t\treturn ($this->count() == 0);\n\t}", "title": "" }, { "docid": "47ac29b64079b8b46735ecb136291eb0", "score": "0.5922264", "text": "public function valid()\n {\n return $this->row !== false;\n }", "title": "" }, { "docid": "d56354b7e78a9d455e5f8c0b8d61d6d6", "score": "0.5917908", "text": "public function getReadEmptyCells();", "title": "" }, { "docid": "851c6e03c1048e16e7b3c2f3a8d9d423", "score": "0.5904977", "text": "public function isEmpty(): bool\n {\n $hasResults = count($this->rows) > 0;\n $hasFilters = count($this->getFilters()) > 0;\n $hasSearch = !is_blank($this->getSearch() ?? \"\");\n return !$hasResults && !$hasFilters && !$hasSearch;\n }", "title": "" }, { "docid": "d56b3c4c36eec22b71ec336d8ca0510f", "score": "0.59005076", "text": "public function isEmpty() {\n\t\treturn $this->rawString === '';\n\t}", "title": "" }, { "docid": "8c6a8d9e4795348fffcf2d8041d8a381", "score": "0.5896133", "text": "private static function is_empty_value( $value )\n {\n $blank = true;\n if ( count( $value ) > 1 ) {\n foreach( $value as $v ) {\n if ( $v ) {\n $blank = false;\n break;\n }\n }\n } else {\n $value = array_shift( $value );\n if ( $value )\n $blank = false;\n }\n return $blank;\n }", "title": "" }, { "docid": "979fdaa6be3bd194afbc45cc28135ce9", "score": "0.58925956", "text": "protected function cutIfEmpty(): bool\n {\n $cutIfNull = $this->fieldConfiguration['cutIfNull'] ?? false;\n $cutIfEmpty = $this->fieldConfiguration['cutIfEmpty'] ?? false;\n if ($cutIfNull || $cutIfEmpty) {\n $value = $this->getValue();\n return empty($value);\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "1d6e0862d2342204c9d0ab7e131a8cf4", "score": "0.58829916", "text": "public function testGetData_WithoutData() {\n\t\t$this->assertEmpty($this->csv->getData());\n\t}", "title": "" }, { "docid": "c23d8fc8cfa2d92e34227a4e8fc30768", "score": "0.5878561", "text": "public function fillAllRow(): bool\n {\n return false;\n }", "title": "" }, { "docid": "7c5b40c6b6aef53a7faa268cc3101aa4", "score": "0.58775765", "text": "public function hasRows()\n {\n return !empty($this->rows);\n }", "title": "" }, { "docid": "cfd6671a0cc6c4e713c0c9a52e3e54a5", "score": "0.5875585", "text": "public function is_empty ()\n {\n return ! isset ($this->_text_value) || ($this->_text_value === '');\n }", "title": "" }, { "docid": "2234e4dccbe27d874e1455c19e01fedd", "score": "0.5864587", "text": "function isEmpty($record)\n\t{\n\t\tif ($this->createDestination() && isset($record[$this->fieldName()][$this->m_destInstance->primaryKeyField()]))\n\t\t{\n\t\t\treturn empty($record[$this->fieldName()][$this->m_destInstance->primaryKeyField()]);\n\t\t}\n\t\telse if ($this->createDestination() && isset($record[$this->fieldName()]))\n\t\t{\n\t\t\treturn empty($record[$this->fieldName()]);\n\t\t}\n\t\treturn true; // always empty if error.\n\t}", "title": "" }, { "docid": "7b5ac243a6d24e380ce7f7a2ec946c8c", "score": "0.585754", "text": "function ws_blank($value)\n {\n if (is_null($value)) {\n return true;\n }\n\n if (is_string($value)) {\n return trim($value) === '';\n }\n\n if (is_numeric($value) || is_bool($value)) {\n return false;\n }\n\n if ($value instanceof Countable) {\n return count($value) === 0;\n }\n\n return empty($value);\n }", "title": "" }, { "docid": "2ea0570504553de972f3957052af1c29", "score": "0.5857169", "text": "public function valid()\n {\n return key($this->rows) !== null;\n }", "title": "" }, { "docid": "cb857c3411f323686de1627bd455ad51", "score": "0.58558357", "text": "function blank($value){\n\t\tif(is_null($value)){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(is_string($value)){\n\t\t\treturn trim($value) === '';\n\t\t}\n\t\t\n\t\tif(is_numeric($value) || is_bool($value)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif($value instanceof Countable){\n\t\t\treturn count($value) === 0;\n\t\t}\n\t\t\n\t\treturn empty($value);\n\t}", "title": "" }, { "docid": "78cae84ccbe56ef0645d3a170de62359", "score": "0.5854021", "text": "public function isEmpty() {\n\t\t$value = $this->attr('value'); \n\t\tif(is_array($value)) return count($value) == 0;\n\t\tif(!strlen(\"$value\")) return true; \n\t\t// if($value === 0) return true; \n\t\treturn false; \n\t}", "title": "" }, { "docid": "10bfebb991501202a2a80e8afc86210a", "score": "0.584779", "text": "public function isEmpty() {\n return !(\n ($this->dict['phone_desc'] && $this->dict['phone_desc'] != '')\n || ($this->dict['contact_number']\n && $this->dict['contact_number'] != '')\n );\n }", "title": "" }, { "docid": "8041f49f5311ef0b9157eb66658c5931", "score": "0.5847288", "text": "public function is_empty ()\n {\n return ! isset ($this->_value) || ($this->_value === '');\n }", "title": "" }, { "docid": "07faec16a257d61bd00db6f666b41d0c", "score": "0.5813039", "text": "public function isEmpty() {\n\t\treturn $this->_end < 0;\n\t}", "title": "" }, { "docid": "bc7819fe9da2a911020bcd9ebc95c25e", "score": "0.58114386", "text": "public function isEmpty()\n {\n return !$this->any();\n }", "title": "" }, { "docid": "44a60b3c4fc039e410bdbf986197b92e", "score": "0.5811198", "text": "public function emptyRow()\n {\n global $CurrentForm;\n if (\n $CurrentForm->hasValue(\"x_masterSchoolId\") &&\n $CurrentForm->hasValue(\"o_masterSchoolId\") &&\n $this->masterSchoolId->CurrentValue != $this->masterSchoolId->DefaultValue &&\n !($this->masterSchoolId->IsForeignKey && $this->getCurrentMasterTable() != \"\" &&\n $this->masterSchoolId->CurrentValue == $this->masterSchoolId->getSessionValue())\n ) {\n return false;\n }\n if (\n $CurrentForm->hasValue(\"x_school\") &&\n $CurrentForm->hasValue(\"o_school\") &&\n $this->school->CurrentValue != $this->school->DefaultValue &&\n !($this->school->IsForeignKey && $this->getCurrentMasterTable() != \"\" &&\n $this->school->CurrentValue == $this->school->getSessionValue())\n ) {\n return false;\n }\n if (\n $CurrentForm->hasValue(\"x_countryId\") &&\n $CurrentForm->hasValue(\"o_countryId\") &&\n $this->countryId->CurrentValue != $this->countryId->DefaultValue &&\n !($this->countryId->IsForeignKey && $this->getCurrentMasterTable() != \"\" &&\n $this->countryId->CurrentValue == $this->countryId->getSessionValue())\n ) {\n return false;\n }\n if (\n $CurrentForm->hasValue(\"x_cityId\") &&\n $CurrentForm->hasValue(\"o_cityId\") &&\n $this->cityId->CurrentValue != $this->cityId->DefaultValue &&\n !($this->cityId->IsForeignKey && $this->getCurrentMasterTable() != \"\" &&\n $this->cityId->CurrentValue == $this->cityId->getSessionValue())\n ) {\n return false;\n }\n if (\n $CurrentForm->hasValue(\"x_owner\") &&\n $CurrentForm->hasValue(\"o_owner\") &&\n $this->owner->CurrentValue != $this->owner->DefaultValue &&\n !($this->owner->IsForeignKey && $this->getCurrentMasterTable() != \"\" &&\n $this->owner->CurrentValue == $this->owner->getSessionValue())\n ) {\n return false;\n }\n if (\n $CurrentForm->hasValue(\"x_applicationId\") &&\n $CurrentForm->hasValue(\"o_applicationId\") &&\n $this->applicationId->CurrentValue != $this->applicationId->DefaultValue &&\n !($this->applicationId->IsForeignKey && $this->getCurrentMasterTable() != \"\" &&\n $this->applicationId->CurrentValue == $this->applicationId->getSessionValue())\n ) {\n return false;\n }\n if (\n $CurrentForm->hasValue(\"x_isheadquarter\") &&\n $CurrentForm->hasValue(\"o_isheadquarter\") &&\n ConvertToBool($this->isheadquarter->CurrentValue) != ConvertToBool($this->isheadquarter->DefaultValue) &&\n !($this->isheadquarter->IsForeignKey && $this->getCurrentMasterTable() != \"\" &&\n ConvertToBool($this->isheadquarter->CurrentValue) == ConvertToBool($this->isheadquarter->getSessionValue()))\n ) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "a81e9604c9de26951fd58dbd44e8adfd", "score": "0.58019257", "text": "public function IsEOF()\n\t{\n\t\treturn(($this->RowIndex == -1)||($this->RowIndex>($this->RowCount)));\n\t}", "title": "" }, { "docid": "ed2cd4d2a60c486e6b9513c77cc1a856", "score": "0.57998127", "text": "public function isNullWhenEmpty();", "title": "" }, { "docid": "c865f9114d00540acf2e9606caf560e4", "score": "0.579678", "text": "function isEmpty($data)\n{\n return !isset($data) || trim($data) === '';\n}", "title": "" }, { "docid": "69a415cdfb74ac255151daa13ed3cb09", "score": "0.5778919", "text": "public function isEmpty(): bool\n {\n return sizeof($this->contents) == 0;\n }", "title": "" }, { "docid": "556209d65b1965739d11d2ecc6997f88", "score": "0.57781523", "text": "public function isEmpty()\r\n\t{\r\n\t\treturn strlen(trim($this->contents)) === 0;\r\n\t}", "title": "" }, { "docid": "eba72d7e1c6ecdad7c1ec7be625bf92f", "score": "0.5776185", "text": "public function isEmpty() {\n\t\treturn $this->count() === 0;\n\t}", "title": "" }, { "docid": "cf69f6d04b3a54607c875057d652f29f", "score": "0.57735646", "text": "public function isEmpty() {\n return $this->count() <= 0;\n }", "title": "" }, { "docid": "a3d834095f9198ae21af21606716761e", "score": "0.57609904", "text": "public function testGetColumns_WithoutData() {\n\t\t$this->assertEmpty($this->csv->getColumns());\n\t}", "title": "" }, { "docid": "6ebe07a24ac372abc19f2b87d006947a", "score": "0.575677", "text": "public function isEmpty()\n {\n return empty($this->widths);\n }", "title": "" }, { "docid": "62dd56f83466d49af4ba17ff09a388b1", "score": "0.5751337", "text": "public function isEmpty()\n {\n return $this->count() <= 0;\n }", "title": "" }, { "docid": "9a742324883643081236ec2eaac0c505", "score": "0.57375467", "text": "public function isEmpty()\n {\n if (empty($this->data)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "22d5e67ce9862760464222f66d325fe3", "score": "0.57368183", "text": "function is_array_empty($arr){\n if(is_array($arr)){ \n foreach($arr as $key => $value){\n if(!empty($value) || $value != NULL || $value != \"\"){\n return true;\n break;//stop the process we have seen that at least 1 of the array has value so its not empty\n }\n }\n return false;\n }\n}", "title": "" }, { "docid": "62526e57486e83e4a31df83bdbeffc40", "score": "0.5730651", "text": "public function isEmpty()\n {\n if (empty($this->_data)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "7ec441a7a29ab1843b4ccc3d79dd7295", "score": "0.5730115", "text": "function isFieldsEmpty(array $fields): bool\n{\n return in_array('', $fields);\n}", "title": "" }, { "docid": "429b0d3aa76d4212105c69cff5761c12", "score": "0.5711009", "text": "function blank($value)\n {\n if (is_null($value)) {\n return true;\n }\n\n if (is_string($value)) {\n return trim($value) === '';\n }\n\n if (is_numeric($value) || is_bool($value)) {\n return false;\n }\n\n if ($value instanceof Countable) {\n return count($value) === 0;\n }\n\n return empty($value);\n }", "title": "" }, { "docid": "73d17e4e402a6d4b0dffd2711909891f", "score": "0.57066524", "text": "public function isEmptyLine($line) {\n if ($line == \"\\n\" || $line == \"\\r\" || $line == \"\\r\\n\" || empty($line)) {\n return TRUE;\n }\n return FALSE;\n }", "title": "" }, { "docid": "5c925cdca9742988ce63759f62aaabba", "score": "0.5702079", "text": "public function isEmpty() {\n if (count($this->dict['telecommunication_number']) > 0) {\n foreach ($this->dict['telecommunication_number'] as $row) {\n if (!$row->isEmpty()) {\n return FALSE;\n }\n }\n }\n return !($this->dict['postal_address']\n && !$this->dict['postal_address']->isEmpty()\n );\n }", "title": "" }, { "docid": "b9bdb8d57fc82778823165cfad75eaed", "score": "0.56988615", "text": "public function isEmpty()\n\t{\n \treturn empty($this->arrContent);\n\t}", "title": "" }, { "docid": "5140677e64561bf1afcc346c45f1eb92", "score": "0.56961983", "text": "function isEmpty() /*Boolean*/\r\n {\r\n $size = $this->size() ;\r\n return ( $size < 1 || $size == null ) ;\r\n }", "title": "" }, { "docid": "8214e5d7818a36dc61c7bb12cbf5b0d1", "score": "0.5692075", "text": "public function isEmpty()\n {\n return $this->count() === 0;\n }", "title": "" }, { "docid": "8214e5d7818a36dc61c7bb12cbf5b0d1", "score": "0.5692075", "text": "public function isEmpty()\n {\n return $this->count() === 0;\n }", "title": "" }, { "docid": "7a3147537529325076c80a1dad78ea16", "score": "0.5689284", "text": "public function isEmpty(): bool\n {\n return $this->value === null;\n }", "title": "" }, { "docid": "6acea01dd5bcdf01203427fd0677c219", "score": "0.5688978", "text": "private function hasExactlyOneColumn()\n {\n if (count($this->columns) != 1 || strpos($this->columns[0], '*') !== false) {\n return false;\n }\n\n if (strpos($this->columns[0], ',') === false) {\n return true;\n }\n\n // The column expression includes a comma. Is this a separator for columns or for function arguments?\n $column = $this->columns[0];\n $n = strlen($column);\n $braces = 0;\n for ($i = 0; $i < $n; $i++) {\n $ch = $column[$i];\n if ($braces == 0 && $ch == ',') {\n return false; // comma separator found!\n }\n else if ($ch == '(') {\n $braces++;\n }\n else if ($ch == ')') {\n $braces--;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "7f6d90884f8a3edbc0830035ca63aa77", "score": "0.5683769", "text": "public function isEmpty(): bool\n {\n $lines = array_filter(array_map(function (Line $line) {\n return !$line->isEmpty();\n }, $this->lines));\n\n return empty($lines) && empty($this->subSections);\n }", "title": "" }, { "docid": "38363f8bc024f008b9dcabdb4dc032d2", "score": "0.5683093", "text": "public function isEmpty()\n {\n return $this->count() == 0;\n }", "title": "" }, { "docid": "13e27c1db9cd5a401a5459efc2d5c7a9", "score": "0.5680729", "text": "public function isEmpty(){\n\t\treturn count($this->strs) === 0;\n\t}", "title": "" }, { "docid": "7cc400518a45413143045e55e1158ea2", "score": "0.567867", "text": "public function isEmpty()\n {\n return 0 === $this->count();\n }", "title": "" }, { "docid": "219a752a6617590ce333f7109155e55b", "score": "0.56738216", "text": "public function isEmpty()\n {\n return !$this->hasDescription() && !$this->hasLongDescription() &&\n empty($this->annotations) && null === $this->returnAnnotation;\n }", "title": "" }, { "docid": "1c0f1ef8534e37f84b04a8f56c8569d8", "score": "0.5673731", "text": "public function isEmpty();", "title": "" }, { "docid": "1c0f1ef8534e37f84b04a8f56c8569d8", "score": "0.5673731", "text": "public function isEmpty();", "title": "" }, { "docid": "1c0f1ef8534e37f84b04a8f56c8569d8", "score": "0.5673731", "text": "public function isEmpty();", "title": "" }, { "docid": "1c0f1ef8534e37f84b04a8f56c8569d8", "score": "0.5673731", "text": "public function isEmpty();", "title": "" }, { "docid": "1c0f1ef8534e37f84b04a8f56c8569d8", "score": "0.5673731", "text": "public function isEmpty();", "title": "" }, { "docid": "1c0f1ef8534e37f84b04a8f56c8569d8", "score": "0.5673731", "text": "public function isEmpty();", "title": "" }, { "docid": "1c0f1ef8534e37f84b04a8f56c8569d8", "score": "0.5673731", "text": "public function isEmpty();", "title": "" }, { "docid": "1c0f1ef8534e37f84b04a8f56c8569d8", "score": "0.5673731", "text": "public function isEmpty();", "title": "" }, { "docid": "1c0f1ef8534e37f84b04a8f56c8569d8", "score": "0.5673731", "text": "public function isEmpty();", "title": "" }, { "docid": "1c0f1ef8534e37f84b04a8f56c8569d8", "score": "0.5673731", "text": "public function isEmpty();", "title": "" } ]
a4c96aa16c7e57195285613ea7046d87
Builds a new variable node.
[ { "docid": "2b103d5fbc3df841b759d3b9d7022fae", "score": "0.6509052", "text": "public function buildASTVariable($image)\n {\n include_once 'PHP/Depend/Code/ASTVariable.php';\n\n PHP_Depend_Util_Log::debug(\n 'Creating: PHP_Depend_Code_ASTVariable(' . $image . ')'\n );\n\n return new PHP_Depend_Code_ASTVariable($image);\n }", "title": "" } ]
[ { "docid": "e8f5c5affbc33fa1a22e775edd81b8ed", "score": "0.69092387", "text": "public function buildASTVariableVariable($image)\n {\n include_once 'PHP/Depend/Code/ASTVariableVariable.php';\n\n PHP_Depend_Util_Log::debug(\n 'Creating: PHP_Depend_Code_ASTVariableVariable(' . $image . ')'\n );\n\n return new PHP_Depend_Code_ASTVariableVariable($image);\n }", "title": "" }, { "docid": "4662392e4e90123b849b1f165a3b6ccd", "score": "0.6035867", "text": "function create_variable($name, $value)\n\t{\n\t\t$this->variables[] = new \\phpbb\\search\\sphinx\\config_variable($name, $value, '');\n\t\treturn $this->variables[count($this->variables) - 1];\n\t}", "title": "" }, { "docid": "9537ba21b663100f2eb6283075de6d8c", "score": "0.579844", "text": "public function buildASTVariableDeclarator($image)\n {\n include_once 'PHP/Depend/Code/ASTVariableDeclarator.php';\n\n PHP_Depend_Util_Log::debug(\n 'Creating: PHP_Depend_Code_ASTVariableDeclarator(' . $image . ')'\n );\n\n return new PHP_Depend_Code_ASTVariableDeclarator($image);\n }", "title": "" }, { "docid": "0ce16615440016193e24701b92aef69e", "score": "0.57440627", "text": "private function compileVariableNode(AstNode $astNode): RouteVariable\n {\n $constraints = [];\n\n foreach ($astNode->children as $childAstNode) {\n if ($childAstNode->type !== AstNodeType::VariableConstraint) {\n throw new InvalidUriTemplateException(\"Unexpected node type {$childAstNode->type->name}\");\n }\n\n /** @var list<mixed> $constraintParams */\n $constraintParams = $childAstNode->hasChildren() ? $childAstNode->children[0]->value : [];\n $constraints[] = $this->constraintFactory->createConstraint(\n (string)$childAstNode->value,\n (array)$constraintParams\n );\n }\n\n return new RouteVariable((string)$astNode->value, $constraints);\n }", "title": "" }, { "docid": "71ff1b54ba449738a57694eb73158c20", "score": "0.5719081", "text": "function variable() {\n return Seq(Value('$'), opt(is('$')), raw_variable());\n}", "title": "" }, { "docid": "31c04cf84803608c550d34a021694398", "score": "0.5602893", "text": "public function variable($name, $var);", "title": "" }, { "docid": "52b3808bb50c54787b7b08876077b8ee", "score": "0.5499829", "text": "function addVariable($v){\r\n\t}", "title": "" }, { "docid": "b37e359a16c94c384293961927f49b76", "score": "0.54947233", "text": "public function buildASTCompoundVariable($image)\n {\n include_once 'PHP/Depend/Code/ASTCompoundVariable.php';\n\n PHP_Depend_Util_Log::debug(\n 'Creating: PHP_Depend_Code_ASTCompoundVariable(' . $image . ')'\n );\n\n return new PHP_Depend_Code_ASTCompoundVariable($image);\n }", "title": "" }, { "docid": "6494bbda20cc8ab6ef886bfe8de55272", "score": "0.53579825", "text": "public function testAllocationExpressionGraphForVariableVariableIdentifier()\n {\n $function = $this->getFirstFunctionForTestCase();\n $allocation = $function->getFirstChildOfType('PDepend\\\\Source\\\\AST\\\\ASTAllocationExpression');\n $vvariable = $allocation->getChild(0);\n\n $this->assertInstanceOf('PDepend\\\\Source\\\\AST\\\\ASTVariableVariable', $vvariable);\n $this->assertEquals('$', $vvariable->getImage());\n\n $variable = $vvariable->getChild(0);\n $this->assertInstanceOf('PDepend\\\\Source\\\\AST\\\\ASTVariable', $variable);\n $this->assertEquals('$foo', $variable->getImage());\n }", "title": "" }, { "docid": "7ed6f621abb396144206a6b13df118c7", "score": "0.5296461", "text": "public function variable($variable, string $name = null): string {}", "title": "" }, { "docid": "9f3078638afb466d74a3b45af7619129", "score": "0.5260261", "text": "abstract public function setVariable(string $variable, ValueExpression $expression): ValueExpression;", "title": "" }, { "docid": "122853a6e98ed6f922d2904f387a78fa", "score": "0.5214052", "text": "function purdyvars_inject_variables(&$node, $variables) {\n foreach($variables as $name => $data) {\n $node[$name] = $data;\n }\n }", "title": "" }, { "docid": "bef51a7a164ca9691de664bcde352e9c", "score": "0.5194738", "text": "abstract public function newInstance($value, Node $datatype = null, $lang = null);", "title": "" }, { "docid": "bb078bc35f3f3df0133e73e341f9965c", "score": "0.51936305", "text": "private\n function __createCustomVar()\n {\n $url = \"\";\n $name = \"\";\n $val = \"\";\n $scope = \"\";\n $emptyFlg = false; // not set slot flag\n $scopeFlg = false; // scope 3 flag\n foreach($this->CustomVars as $index => $CustomVar) {\n if(is_null($CustomVar)) {\n $emptyFlg = true;\n $scopeFlg = true;\n continue;\n }\n if(1 === $index) {\n $name .= $CustomVar['name'];\n $val .= $CustomVar['value'];\n if(3 !== $CustomVar['scope']) $scope .= $CustomVar['scope'];\n } else {\n $name .= ($emptyFlg) ? \"*{$index}!\" . urlencode($CustomVar['name']) : \"*\" . urlencode($CustomVar['name']);\n $val .= ($emptyFlg) ? \"*{$index}!\" . urlencode($CustomVar['value']) : \"*\" . urlencode($CustomVar['value']);\n if(3 === $CustomVar['scope']) {\n $scopeFlg = true;\n } else {\n $scope .= ($scopeFlg) ? \"*{$index}!{$CustomVar['scope']}\" : \"*{$CustomVar['scope']}\";\n }\n }\n }\n\n if(!empty($name)) $url .= \"8({$name})\";\n if(!empty($val)) $url .= \"9({$val})\";\n if(!empty($scope)) $url .= \"11({$scope})\";\n return $url;\n }", "title": "" }, { "docid": "0a53c6e84d7b97cdefca12705cc6fb2e", "score": "0.5176135", "text": "public function __construct($varstr, $info = null)\n\t{\n\t\t$this->info = new \\stdClass();\n\n\t\tif ($info !== null) {\n\t\t\tforeach ($info as $k => $v)\n\t\t\t\t$this->info->$k = $v;\n\t\t}\n\t\t\n\t\t$varstr = trim($varstr);\n\t\t\n\t\tif (preg_match('/^(const)?\\s*(&)?\\s*(?:(.*?)(?<!:):)?\\s*((?:[a-z@_][a-z0-9@_\\.\\:]*)|\\.\\.\\.)(?:\\s*(\\[\\s*.*\\s*?\\]))?(?:\\s*(\\<\\s*.*\\s*?\\>))?(?:\\s*=\\s*(.+)\\s*?)?$/i', $varstr, $matches)) {\n\t\t\t@list(, $const, $ref, $tags, $varname, $dim, $special, $default) = $matches;\n\t\t\t\n\t\t\t$this->const = !empty($const);\n\t\t\t$this->ref = !empty($ref);\n\t\t\t$this->tags = new VariableTagList($tags);\n\t\t\t$this->varname = $varname;\n\t\t\t\n\t\t\tif (empty($dim))\n\t\t\t\t$this->dim = null;\n\t\t\telse {\n\t\t\t\t$dim = trim($dim, \"[] \\t\\n\\r\\0\\x0B\");\n\t\t\t\t\n\t\t\t\tif (empty($dim))\n\t\t\t\t\t$this->dim = true;\n\t\t\t\telse\n\t\t\t\t\t$this->dim = $dim;\n\t\t\t}\n\t\t\t\n\t\t\tif (empty($special)) {\n\t\t\t\t$this->special = null;\n\t\t\t\t$this->special_info = null;\n\t\t\t} else {\n\t\t\t\t$special = trim($special, \"<> \\t\\n\\r\\0\\x0B\");\n\t\t\t\t\n\t\t\t\t$this->special = self::SPECIAL_UNKNOWN;\n\t\t\t\t$this->special_info = $special;\n\t\t\t\t\n\t\t\t\tif ($this->varname == 'va_args') {\n\t\t\t\t\t$this->special = self::SPECIAL_VA_ARGS;\n\t\t\t\t} else if ($this->tags->count == 1) {\n\t\t\t\t\t$tag = $this->tags->tags[0];\n\t\t\t\t\t\n\t\t\t\t\tif (isset(self::$SPECIAL_TAGS[$tag]))\n\t\t\t\t\t\t$this->special = self::$SPECIAL_TAGS[$tag];\n\t\t\t\t\telse\n\t\t\t\t\t\ttrigger_error(\"Unknown special: \\\"$tag\\\".\", E_USER_NOTICE);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->tags = new VariableTagList($tags);\n\t\t\t$this->default = $default;\n\t\t} else {\n\t\t\ttrigger_error(\"Invalid argstr: \\\"$varstr\\\".\", E_USER_NOTICE);\n\t\t}\n\t}", "title": "" }, { "docid": "420aa832a33ce47c2ecf31a816858090", "score": "0.51515776", "text": "function generate_block_varref($namespace, $varname)\r\n {\r\n // Strip the trailing period.\r\n $namespace = substr($namespace, 0, strlen($namespace) - 1);\r\n\r\n // Get a reference to the data block for this namespace.\r\n $varref = $this->generate_block_data_ref($namespace, true);\r\n // Prepend the necessary code to stick this in an echo line.\r\n\r\n // Append the variable reference.\r\n $varref .= '[\\'' . $varname . '\\']';\r\n\r\n $varref = '\\' . ( ( isset(' . $varref . ') ) ? ' . $varref . ' : \\'\\' ) . \\'';\r\n\r\n return $varref;\r\n\r\n }", "title": "" }, { "docid": "a851848587a97408555c97da2e58a160", "score": "0.51179415", "text": "public static function buildNodeFromName($name)\n {\n if ($name instanceof Name) {\n return $name;\n } else {\n return new Name($name);\n }\n }", "title": "" }, { "docid": "58a0c5e9c0d437df920e6743c4c7d9cc", "score": "0.5111972", "text": "public function testAccessVar(): void\n {\n $x = AST::var('x');\n $ast = AST::Access($x, \"\\0property1\");\n $this->assertEquals('$x->property1', $ast->toCode());\n }", "title": "" }, { "docid": "33bab62363988ea5eb268d26c2f6b652", "score": "0.5106557", "text": "function generate_block_varref($namespace, $varname, $use_isset = true)\n\t{\n\t\t// Strip the trailing period.\n\t\t$namespace = substr($namespace, 0, strlen($namespace) - 1);\n\n\t\t// Get a reference to the data block for this namespace.\n\t\t$varref = $this->generate_block_data_ref($namespace, true);\n\t\t// Prepend the necessary code to stick this in an echo line.\n\n\t\t// Append the variable reference.\n\t\t$varref .= '[\\'' . $varname . '\\']';\n\n\t\tif($use_isset)\n\t\t{\n\t\t\t$varref = '<'.'?php echo isset(' . $varref . ') ? ' . $varref . ' : \\'\\'; ?'.'>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$varref = '<'.'?php echo ' . $varref . '; ?'.'>';\n\t\t}\n\n\t\treturn $varref;\n\n\t}", "title": "" }, { "docid": "d04489ea3e4f9117120bcb427249e195", "score": "0.50876105", "text": "public function newvar($key,$value=null)\n\t\t\t\t\t\t\t\t\t{ $this->set($key,$value); }", "title": "" }, { "docid": "e32a800ab117ed57e0ebdf0040e7b936", "score": "0.50728595", "text": "public static function v($var, $data = null)\n {\n if (!isset($data)) {\n $data = 'Default Variable label';\n }\n self::put('variable', $var, $data);\n }", "title": "" }, { "docid": "1f0d069171414b72a2650652ee4635f3", "score": "0.5066434", "text": "public function _var($action, $attributes = '', $input = '')\n\t{\n\t\treturn $this->newTag('var', $action, $attributes, $input);\n\t}", "title": "" }, { "docid": "77d890abfecf01f7c68ba82fd9e7861a", "score": "0.5066143", "text": "public function __toString()\n\t{\n\t\t$varstr = '';\n\t\t\n\t\tif ($this->const)\n\t\t\t$varstr .= 'const ';\n\t\t\n\t\tif ($this->ref)\n\t\t\t$varstr .= '&';\n\t\t\n\t\tif ($this->tags && $this->tags->count)\n\t\t\t$varstr .= $this->tags . ':';\n\t\t\n\t\t$varstr .= $this->varname;\n\t\t\n\t\tif ($this->dim === true)\n\t\t\t$varstr .= '[]';\n\t\telse if ($this->dim !== null)\n\t\t\t$varstr .= \"[$this->dim]\";\n\t\t\n\t\tif ($this->special_info !== null)\n\t\t\t$varstr .= \"<$this->special_info>\";\n\t\t\n\t\tif ($this->default !== null)\n\t\t\t$varstr .= ' = ' . $this->default;\n\t\t\n\t\treturn $varstr;\n\t}", "title": "" }, { "docid": "58a19d70b9601250b12301149232d307", "score": "0.50614834", "text": "function new_node(){\r\n\t\t\r\n\t\t$class = get_class($this);\r\n\t\t$node=new $class();\r\n\t\treturn $node;\r\n\t}", "title": "" }, { "docid": "32c37a4d651e5a68338a24d2c918b17d", "score": "0.5033535", "text": "function FC_Variables($id, $name, $type, $profile = \"\", $fctime)\n{\n global $IPS_SELF;\n $vid = @IPS_GetObjectIDByIdent($name, $id);\n if($vid === false)\n {\n $vid = IPS_CreateVariable($type);\n IPS_SetParent($vid, $id);\n IPS_SetIdent($vid, $name);\n IPS_SetName($vid, $name);\n if($profile !== \"\") { IPS_SetVariableCustomProfile($vid, $profile); }\n }\n IPS_SetName($vid, $name.$fctime);\n return $vid;\n}", "title": "" }, { "docid": "339c138f89bb9f98730f582424580933", "score": "0.50139105", "text": "public function variable($key, $value)\n {\n $this->variables[$key] = $value;\n\n return $this;\n }", "title": "" }, { "docid": "2202c80415c8452732e430576c50fc22", "score": "0.49466905", "text": "protected function createNode()\n {\n return new SpecialNode($this->name);\n }", "title": "" }, { "docid": "0947be0625904cbeb85893b777811209", "score": "0.49377587", "text": "public function Create()\n {\n parent::Create();\n \n $this->RegisterPropertyInteger(\"StateVariable\", 0);\n $this->RegisterPropertyInteger(\"Duration\", 10);\n $this->RegisterPropertyInteger(\"MotionVariable1\", 0);\n $this->RegisterPropertyInteger(\"MotionVariable2\", 0);\n $this->RegisterPropertyInteger(\"PermanentVariable\", 0);\n $this->RegisterPropertyBoolean(\"ExecScript\", false);\n $this->RegisterPropertyInteger(\"ScriptVariable\", 0);\n $this->RegisterPropertyBoolean(\"OnlyBool\", false);\n $this->RegisterPropertyBoolean(\"OnlyScript\", false);\n $this->RegisterTimer(\"TriggerTimer\",0,\"TLA_Trigger(\\$_IPS['TARGET']);\");\n }", "title": "" }, { "docid": "d11f12796a3698d5e86c2b30945ffa16", "score": "0.48774984", "text": "public function testAllocationExpressionGraphForVariableIdentifier()\n {\n $function = $this->getFirstFunctionForTestCase();\n $allocation = $function->getFirstChildOfType('PDepend\\\\Source\\\\AST\\\\ASTAllocationExpression');\n $variable = $allocation->getChild(0);\n\n $this->assertInstanceOf('PDepend\\\\Source\\\\AST\\\\ASTVariable', $variable);\n $this->assertEquals('$foo', $variable->getImage());\n }", "title": "" }, { "docid": "8159b3545aa6744a07c1eb853b9291eb", "score": "0.48633188", "text": "public function __construct(Expr $var, array $attributes = array()) {\n parent::__construct(\n array(\n 'var' => $var\n ),\n $attributes\n );\n }", "title": "" }, { "docid": "de7291d62710284a719f4c7edfd3fe44", "score": "0.48421744", "text": "public function buildASTStaticVariableDeclaration($image)\n {\n include_once 'PHP/Depend/Code/ASTStaticVariableDeclaration.php';\n\n PHP_Depend_Util_Log::debug(\n 'Creating: PHP_Depend_Code_ASTStaticVariableDeclaration(' . $image . ')'\n );\n\n return new PHP_Depend_Code_ASTStaticVariableDeclaration($image);\n }", "title": "" }, { "docid": "ae3e93723563192813fa663b3d2d86d7", "score": "0.4840493", "text": "function addVariable(string $token, string $variable_name) {\n $this->variables[$token] = $variable_name;\n }", "title": "" }, { "docid": "b2e1ad9167ef20764ec1ff56674444d8", "score": "0.48293", "text": "public function mVAR(){\n $TAGS = $this->DOM->findEComma(\"m.var\");\n foreach($TAGS as $TAG){\n $ret = $this->getMVar($TAG['value']);\n $this->DOM->replaceEComma($TAG, $ret);\n }\n }", "title": "" }, { "docid": "da7e13658cd666b27b298f213a89cdc4", "score": "0.48278528", "text": "public function uVar($variableName)\n {\n return $this->setRightOperand(UVar::uVar($variableName));\n }", "title": "" }, { "docid": "05ea722757094b3d85a3f58a018d14e1", "score": "0.48084587", "text": "protected function getPropertiesNode()\n {\n $builder = new TreeBuilder();\n $node = $builder->root('properties');\n\n $node\n ->useAttributeAsKey('name')\n ->prototype('variable')\n ->treatNullLike(array());\n\n return $node;\n }", "title": "" }, { "docid": "9e86b97f6582df3713cb81d7d5763261", "score": "0.4795019", "text": "function build_image_display_node($values) {\r\n $node = new stdClass();\r\n $node->nid = $values->{$this->aliases['image_node_nid']};\r\n $node->title = $values->{$this->aliases['image_node_title']};\r\n return $node;\r\n }", "title": "" }, { "docid": "3905e79bdd35cd4b0236b7a3a33582e2", "score": "0.47608727", "text": "public function create($accountId, $containerId, Google_Service_TagManager_Variable $postBody, $optParams = array())\n {\n $params = array('accountId' => $accountId, 'containerId' => $containerId, 'postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('create', array($params), \"Google_Service_TagManager_Variable\");\n }", "title": "" }, { "docid": "b1f13994a379bffc5c3e404cce6dc8a1", "score": "0.47497383", "text": "public function getNode() {\n $Node= parent::getNode(); \n if (isset($this->name))\n $Node->setAttribute('name', $this->name);\n if (isset($this->visibility))\n $Node->setAttribute('visible', $this->visibility ? 'true' : 'false');\n return $Node;\n }", "title": "" }, { "docid": "4a435b3e6740dfbc92d890cdaeef4977", "score": "0.47484943", "text": "public function generate_block_varref($namespace, $varname)\n {\n // Strip the trailing period.\n $namespace = substr($namespace, 0, -1);\n\n // Get a reference to the data block for this namespace.\n $varref = $this->generate_block_data_ref($namespace, true);\n // Prepend the necessary code to stick this in an echo line.\n\n // Append the variable reference.\n $varref .= \"['$varname']\";\n\n $varref = \"<?php echo isset($varref) ? $varref : ''; ?>\";\n\n return $varref;\n }", "title": "" }, { "docid": "fa2bf3c7065327de314614809204da58", "score": "0.47380954", "text": "function add_variable($variable)\n\t{\n\t\t$this->variables[] = $variable;\n\t}", "title": "" }, { "docid": "38e8f8ff375dd500a15d33f17d4ad238", "score": "0.47268802", "text": "public function add($varname, $value)\n {\n $node = $this->{$varname};\n\n if (empty($node)) {\n $this->{$varname} = array();\n $node = array();\n }\n\n array_push($node, $value);\n\n $this->{$varname} = $node;\n\n return $this;\n }", "title": "" }, { "docid": "a4d14f1704599bce8738674988a60a72", "score": "0.4724749", "text": "public function buildASTFormalParameter()\n {\n include_once 'PHP/Depend/Code/ASTFormalParameter.php';\n\n PHP_Depend_Util_Log::debug(\n 'Creating: PHP_Depend_Code_ASTFormalParameter()'\n );\n\n return new PHP_Depend_Code_ASTFormalParameter();\n }", "title": "" }, { "docid": "541e86789e9a1040b0d11120f725ceb4", "score": "0.47204566", "text": "public function create()\n {\n $tipos = TipoVariable::pluck('tipo','id')->prepend('Select Tipo','');\n $tipos_bonos = TipoBono::pluck('tipo','id')->prepend('Select Tipo Bono','');\n return view('admin.pages.create-variable', [\n 'tipos' => $tipos,\n 'tipos_bonos' => $tipos_bonos\n ]);\n }", "title": "" }, { "docid": "3da055771d0c45bb31e14f8cc4a6c3b8", "score": "0.471407", "text": "public function addVar($key, $value)\n {\n $this->vars[$key] = $value;\n\n return $this;\n }", "title": "" }, { "docid": "5f020a40af138f29840fdb0ede829a48", "score": "0.47125655", "text": "static public function FVar ($t, $e = null) {\n\t\treturn new FieldType('FVar', 0, [$t, $e]);\n\t}", "title": "" }, { "docid": "9fa79ee71e0cc806fd654caba27fb7c6", "score": "0.47000432", "text": "public function setVariable($key = null, $value = null)\n {\n if ( strlen($key) ) {\n $this -> vars['<var ' . $key . ' />'] = $value;\n }\n }", "title": "" }, { "docid": "5fba17d5f7e02e3a78f489c492ebefec", "score": "0.46935302", "text": "public function variable($name, $value, $context = null, $visibility = null)\n {\n if (strpos($name, '$') !== 0) {\n throw new Exception('Variable name must start with $ sign');\n }\n\n if (isset($this->block[$this->current]) && $this->block[$this->current]->getType() == 'class')\n {\n if (null === $visibility) {\n $visibility = self::VISIBILITY_PUBLIC;\n }\n if (null !== $visibility && in_array($visibility, array(self::VISIBILITY_PUBLIC, self::VISIBILITY_PROTECTED, self::VISIBILITY_PRIVATE))) {\n $name = \"{$visibility} {$name}\";\n }\n }\n\n if (null !== $context) {\n $name = preg_replace('/(\\$)/', \"{$context}->\", $name);\n }\n\n if (null === $value || is_bool($value)) {\n $value = preg_replace('/(NULL)/', 'null', var_export($value, true));\n }\n\n // Trying to improve indentation on arrays returned by var_export()\n if (is_array($value)) {\n $value = preg_replace('/(NULL)/', 'null', var_export($value, true));\n $value = preg_replace('/(array \\()/', 'array(', $value); // Remove space in \"array ()\"\n $value = preg_replace('/(\\.*)\\s=>\\s\\n(.*)\\n/', \"$1 => array(\\n\", $value); // Remove line feed in the array declaration\n $value = preg_replace('/(\\s)\\1/', str_repeat(' ', 4), $value); // Transform from 2 to 4 spaces\n if ($this->depth > 0) {\n $value = preg_replace('/(\\s)(\\1{2,}+)/', str_repeat(' ', 4 * $this->depth) . ' ' . '$2', $value); // Adjust spaces to the depth level\n $value = preg_replace('/(\\))$/', str_pad(')', (4 * $this->depth) + 1, ' ', STR_PAD_LEFT), $value); // Adjust the final \")\"\n }\n }\n\n $code = \"{$name} = {$value}\";\n $this->write($code);\n\n return $this;\n }", "title": "" }, { "docid": "44ed44a2b97ec3cd69ae90dd82db17fc", "score": "0.4689649", "text": "public function SetVariable($key, $value) {\n $this->data[$key] = $value;\n return $this;\n }", "title": "" }, { "docid": "8d3180eec635004c24d09d4a5e6442a1", "score": "0.46653178", "text": "public function clickInsertVariable()\n {\n $this->_rootElement->find($this->addVariableButton)->click();\n }", "title": "" }, { "docid": "933dde0ff7b2c55d63d6789e31650049", "score": "0.46471214", "text": "function &ponerVariable ($nombre, $valor) {\n\t\tif ($this->prefijoVariables == substr($nombre, 0, strlen($this->prefijoVariables)))\n\t\t\t$nombre = substr($nombre, strlen($this->prefijoVariables));\n\t\t$this->variablesCSS[$nombre] = $valor;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a7209f2ca9f71a59ddb63a811375778d", "score": "0.46466163", "text": "public function build()\n {\n $reflector = new \\ReflectionClass($this->getObjectFqcn());\n return $reflector->newInstanceArgs(array_values($this->_builder_placeholder_data_87cd3fb3_4fde_49d1_a91f_6411e0862c32));\n }", "title": "" }, { "docid": "2b40f5967c76fcc3ce55967017ce880b", "score": "0.4639679", "text": "public function myVar(){\n\t\treturn View::make('my_template.myVar')\n\t\t\t-> with('var','Tao test method.' ) \n\t\t\t-> with('var1','This is my var');\n\t}", "title": "" }, { "docid": "99eff59eafee3f037ef32416c37f8e1e", "score": "0.46375737", "text": "public function setVar ($nume, $var);", "title": "" }, { "docid": "65fcc1aeaa8ce8afb57703936cae9003", "score": "0.46147788", "text": "function _var($ret) {\n $v = $this->getVar(trim($ret['var'])); \n if(!$v) return '';\n \n //List type \n if(is_array($v)) return $this->_list($ret);\n \n $tag = isset($ret['tag']) ? $ret['tag'] : 'span';\n $ret = $this->clearData($ret);\n \n //Var span (with class, id, etc);\n if(count($ret) > 0) {\n $d = '<'.$tag;\n foreach ($ret as $k=>$val){\n $d .= ' '.trim($k).'=\"'.trim($val).'\"';\n }\n $v = $d.'>'.$v.'</'.$tag.'>';\n }\n return $v;\n }", "title": "" }, { "docid": "bfa4b7436fe7363cdc2813f81a14323f", "score": "0.46103424", "text": "public function setVar($key, $value){\n $this->vars[$key] = $value;\n return $this;\n }", "title": "" }, { "docid": "d42e0a4a57bec7ed9769472cc535937e", "score": "0.4609068", "text": "public function addVarAttr($name, $value)\n {\n if (!in_array($name, $this->varAttr)) {\n $this->varAttr[$name] = $value;\n }\n return $this;\n }", "title": "" }, { "docid": "335d33ae323aa146b41b27a364125393", "score": "0.46077207", "text": "public function addVar(string $name, $value) : void\r\n{\r\n\t//Check to see if a valid variable name was provided, if i was no, throw an error\r\n\tif(preg_match('/^[a-zA-Z_\\x80-\\xff][a-zA-Z0-9_\\x80-\\xff]*$/', $name) == 0){\r\n\t\ttrigger_error('Invalid Variable Name Used', E_USER_ERROR);\r\n\t}\r\n\t//Assign the name and value to the array\r\n\t$this->variable_data[$name] = $value;\r\n}", "title": "" }, { "docid": "a7b9f477267f48c2f17992cd265f755f", "score": "0.45950407", "text": "public function buildASTFieldDeclaration()\n {\n include_once 'PHP/Depend/Code/ASTFieldDeclaration.php';\n\n PHP_Depend_Util_Log::debug(\n 'Creating: PHP_Depend_Code_ASTFieldDeclaration()'\n );\n\n return new PHP_Depend_Code_ASTFieldDeclaration();\n }", "title": "" }, { "docid": "07b1a55640b414c1d771b275277636fd", "score": "0.45932314", "text": "function __construct($var_from_construct) {\t\t\n\t\t\t$this->var_name = $var_from_construct;\t\t\n\t\t}", "title": "" }, { "docid": "daf974e73c2b49be1f6485804eb5b1a7", "score": "0.45857686", "text": "function addVar( $template, $name, $value )\r\n\t{\r\n\t\t$this->_templates[$template]->_vars[$name] = $value;\r\n\t}", "title": "" }, { "docid": "e7de95aeadcbdb3ae503fcb8b2912b4d", "score": "0.45793346", "text": "protected function createTaskVariableRequest($task_id)\n {\n // verify the required parameter 'task_id' is set\n if ($task_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $task_id when calling createTaskVariable'\n );\n }\n\n $resourcePath = '/runtime/tasks/{taskId}/variables';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($task_id !== null) {\n $resourcePath = str_replace(\n '{' . 'taskId' . '}',\n ObjectSerializer::toPathValue($task_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "bd5636d7b911d1b6cfea323c24d0e429", "score": "0.45644712", "text": "function create_node($stamp=null,$pos=null){\n\necho 'booh';\n //echo '<b>' . $this->cur_node() . '</b> ';\n //echo $stamp . \"=\";\n if(!is_null($stamp))$this->go_to_stamp($stamp);\n //echo $stamp . \"<br>\";\n// echo 'get in <b>' . $this->cur_node() . '</b> mit Stamp ';\n// echo $stamp . ' nach ';\n if(is_null($pos)){\n\n $var = $this->getInstance(\"\",null);\n $var->setRefprev($this->pointer[$this->idx]);\n $this->pointer[$this->idx]->setRefnext($var);\n \n\n $this->child_node($help = ($this->index_child()-1));\n //$this->pos_stamp_func(0,$help,\"create_node\");\n }\n else\n {\n //echo 'hallo#dddd';\n\n $reduce = 0;\n $temp = &$this->pointer[$this->idx]->next_el;\n unset($this->pointer[$this->idx]->next_el);\n //if(is_Array($temp))echo 'array';\n for($i=0;count($temp)>($i+$reduce);$i++){\n\n if($i==$pos){\n\n $var = $this->getInstance();\n $var->setRefprev($this->pointer[$this->idx]);\n $this->pointer[$this->idx]->setRefnext($var);\n $reduce++;\n\n }\n\n else{\n \n $this->pointer[$this->idx]->setRefnext($temp[$i-$reduce]);\n }\n\n }\n $this->child_node($pos);\n }\n \n \n\n\n }", "title": "" }, { "docid": "bc018799cb88c1baed79a929ed607f2e", "score": "0.45643842", "text": "public function store(StoreVariableRequest $request)\n {\n return $this->repository->create($request->only(\n 'name',\n 'value',\n 'project_id'\n ));\n }", "title": "" }, { "docid": "d0b6189120e875b70800eb306ca24c19", "score": "0.45575932", "text": "private function initVars()\n {\n // fetch the current id_node. If no node the script assums that\n // we are at the top level with id_parent 0\n if( !isset($_REQUEST['id_node']) || preg_match(\"/[^0-9]+/\",$_REQUEST['id_node']) ) \n {\n $this->tplVar['id_node'] = 0;\n $this->current_id_node = 0; \n }\n else\n {\n $this->tplVar['id_node'] = (int)$_REQUEST['id_node'];\n $this->current_id_node = (int)$_REQUEST['id_node']; \n } \n \n // template variables\n //\n // data of the current node\n $this->tplVar['node'] = array();\n // data of the child nodes\n $this->tplVar['nodes'] = array();\n // data of the branch nodes\n $this->tplVar['branch'] = array(); \n // errors\n $this->tplVar['error'] = FALSE; \n }", "title": "" }, { "docid": "43cffee06f7820e4dbf0707ecd22748e", "score": "0.45564267", "text": "public function setVariable(string $name, $value)\n {\n $this->variables[$name] = $value;\n return $this;\n }", "title": "" }, { "docid": "21ae014ddd4397743a9cc8e50c1327fe", "score": "0.45482296", "text": "public function addVar($key, $value)\n\t{\n $this->context->getView()->addVariable($key, $value);\n\t}", "title": "" }, { "docid": "f7a0e78b3f486aabee2bde157c64239f", "score": "0.45472032", "text": "function add_system_var(&$datatree, $index, $last, $key)\n\t{\n\t\t$datatree->_key = $key;\n\t\t$datatree->_index = $index;\n\t\t$datatree->_rank = $index + 1;\n\t\t$datatree->_odd = $datatree->_not_even = (1 == $datatree->_rank % 2);\n\t\t$datatree->_even = $datatree->_not_odd = (0 == $datatree->_rank % 2);\n\t\t$datatree->_first = (0 == $index);\n\t\t$datatree->_middle = !$datatree->_first && !$last;\n\t\t$datatree->_last = $last;\n\t\t$datatree->_not_first = !$datatree->_first;\n\t\t$datatree->_not_last = !$last;\n\t\t$datatree->_not_middle = !$datatree->_middle;\n\t}", "title": "" }, { "docid": "4ade7e2a946211ca7cb04edbcd2919b7", "score": "0.4538983", "text": "public function setVariable($name, $value)\n {\n $this->variables[$name] = $value;\n return $this;\n }", "title": "" }, { "docid": "98b0d8ca637232989af5bc8dcd567333", "score": "0.45354688", "text": "public function buildValue()\n {\n $actions = [\n 'add' => [],\n 'replace' => [],\n 'remove' => [],\n ];\n\n foreach ($this->actions as $action) {\n switch ($action->getName()) {\n case 'add':\n $actions['add'][] = [$action->getArgument(0)];\n break;\n case 'replace':\n $actions['replace'][] = [$action->getArgument(0), $action->getArgument(1)];\n break;\n case 'remove':\n $actions['remove'][] = [$action->getArgument(0)];\n break;\n }\n }\n\n $builder = $this->getBuilder();\n\n foreach ($actions as $action => $calls) {\n foreach ($calls as $arguments) {\n call_user_func_array([$builder, $action], $arguments);\n }\n }\n\n return $builder->get();\n }", "title": "" }, { "docid": "a61bbb472d4ab6b50de005dff419fa39", "score": "0.4534209", "text": "function yy_r140 ()\r\n {\r\n if ($this->yystack[$this->yyidx + - 1]->minor['var'] == '\\'smarty\\'') {\r\n $this->_retvalue = $this->compiler->compileTag(\r\n 'private_special_variable', array(), \r\n $this->yystack[$this->yyidx + - 1]->minor['smarty_internal_index']) .\r\n $this->yystack[$this->yyidx + 0]->minor;\r\n } else {\r\n $this->_retvalue = '$_smarty_tpl->getVariable(' .\r\n $this->yystack[$this->yyidx + - 1]->minor['var'] . ')->value' .\r\n $this->yystack[$this->yyidx + - 1]->minor['smarty_internal_index'] .\r\n $this->yystack[$this->yyidx + 0]->minor;\r\n $this->compiler->tag_nocache = $this->compiler->tag_nocache |\r\n $this->template->getVariable(\r\n trim($this->yystack[$this->yyidx + - 1]->minor['var'], \"'\"), null, \r\n true, false)->nocache;\r\n }\r\n }", "title": "" }, { "docid": "adb9ae5341bf07107154459a3c4013b2", "score": "0.45327103", "text": "public function variableName(?string $variableName): VariableInstanceQueryInterface;", "title": "" }, { "docid": "be372f1248548f26a4698a972dc28461", "score": "0.45310462", "text": "public function getVariable(){\n\t\treturn $this->variable;\n\t}", "title": "" }, { "docid": "811d25421041f479064de4514f2a5d07", "score": "0.4509581", "text": "abstract public function build();", "title": "" }, { "docid": "811d25421041f479064de4514f2a5d07", "score": "0.4509581", "text": "abstract public function build();", "title": "" }, { "docid": "811d25421041f479064de4514f2a5d07", "score": "0.4509581", "text": "abstract public function build();", "title": "" }, { "docid": "36f395e4829edcb8016a630a13706114", "score": "0.45046625", "text": "public static function create_database_var()\r\n {\r\n $m_query_string = \"INSERT INTO information_table \";\r\n $m_query_string .= \"SET database_id = :database_id, \";\r\n $m_query_string .= \"database_label = :database_label, \";\r\n $m_query_string .= \"database_value = :database_value \";\r\n return $m_query_string;\r\n }", "title": "" }, { "docid": "d0c1c3ed568d5d5e9b14cd3937362ac8", "score": "0.4497333", "text": "public function variableCreate(CloudApi $cloudapi, Variables $variablesAdapter, $uuid, $environment, $name, $value)\n {\n $environment = $cloudapi->getEnvironment($uuid, $environment);\n\n $this->say(sprintf('Adding variable %s:%s to %s environment', $name, $value, $environment->label));\n $response = $variablesAdapter->create($environment->uuid, $name, $value);\n $this->waitForNotification($response);\n }", "title": "" }, { "docid": "fbf927f592d628999fb65aec6f4a0b4d", "score": "0.44879484", "text": "public static function setvar($name,$variable) {\n\n self::$variable[$name] = $variable;\n return self::$instance;\n }", "title": "" }, { "docid": "0f7624752c83a3cff085304b3b550ac9", "score": "0.44807792", "text": "public function getVariable($type, $name, $nullable)\n {\n return new Variable($type, $name, $nullable);\n }", "title": "" }, { "docid": "878c9998818dea1c13272cce29589c6a", "score": "0.44702333", "text": "protected function with($name, $value) {\n $this->vvars[strval($name)] = $value;\n return $this;\n }", "title": "" }, { "docid": "8a7e9ec6d4a2256267ef2e510d671083", "score": "0.4459612", "text": "public function add($key, $var)\r\n {\r\n $this->_vars[$key] = $var;\r\n return $this;\r\n }", "title": "" }, { "docid": "8a5b67a64ea805aeb34e25ee54b971b1", "score": "0.44532257", "text": "function osc_get_serialized_variable(&$serialization_data, $variable_name, $variable_type = 'string') {\n\t$serialized_variable = '';\n\n\tswitch($variable_type){\n\t\tcase 'string':\n\t\t\t$start_position = strpos($serialization_data, $variable_name . '|s');\n\n\t\t\t$serialized_variable = substr(\n\t\t\t\t$serialization_data,\n\t\t\t\tstrpos($serialization_data, '|', $start_position) + 1,\n\t\t\t\tstrpos($serialization_data, '|', $start_position) - 1\n\t\t\t);\n\t\t\tbreak;\n\t\tcase 'array':\n\t\tcase 'object':\n\t\t\tif ($variable_type == 'array'){\n\t\t\t\t$start_position = strpos($serialization_data, $variable_name . '|a');\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$start_position = strpos($serialization_data, $variable_name . '|');\n\t\t\t}\n\n\t\t\t$tag = 0;\n\t\t\tfor($i = $start_position, $n = sizeof($serialization_data); $i < $n; $i++){\n\t\t\t\tif ($serialization_data[$i] == '{'){\n\t\t\t\t\t$tag++;\n\t\t\t\t}\n\t\t\t\telseif ($serialization_data[$i] == '}') {\n\t\t\t\t\t$tag--;\n\t\t\t\t}\n\t\t\t\telseif ($tag < 1) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$serialized_variable = substr(\n\t\t\t\t$serialization_data,\n\t\t\t\tstrpos($serialization_data, '|', $start_position) + 1,\n\t\t\t\t$i - strpos($serialization_data, '|', $start_position) - 1\n\t\t\t);\n\t\t\tbreak;\n\t}\n\treturn $serialized_variable;\n}", "title": "" }, { "docid": "786e82595e9b218659258f052cd8530a", "score": "0.44465128", "text": "function purdyvars_init_variables($fields, $prefix='field_', $suffix='') {\n \n $variables = array();\n \n foreach($fields as $name => $data) {\n $field_name = $prefix.str_replace(PURDYVARS_TARGET, '', $name).$suffix;\n $variables[$field_name] = new purdyvars_variable($fields[$name]['data']);\n $variables[$field_name]->label = $fields[$field_name]['settings']['label'];\n $variables[$field_name]->render = $fields[$field_name]['settings']['render'];\n \n }\n\n return $variables; \n }", "title": "" }, { "docid": "16777c7fa374fd4bca5ed2783e790490", "score": "0.44432884", "text": "public function buildASTLiteral($image)\n {\n include_once 'PHP/Depend/Code/ASTLiteral.php';\n\n PHP_Depend_Util_Log::debug(\n 'Creating: PHP_Depend_Code_ASTLiteral(' . $image . ')'\n );\n\n return new PHP_Depend_Code_ASTLiteral($image);\n }", "title": "" }, { "docid": "a22e37935a015aa7c6c79e87bc281d4e", "score": "0.44357184", "text": "function yy_r123(){ $this->_retvalue = '['.$this->compiler->compileTag('private_special_variable','[\\'section\\'][\\''.$this->yystack[$this->yyidx + -1]->minor.'\\'][\\'index\\']').']'; }", "title": "" }, { "docid": "fa9f8c265c131466916ea4823502d224", "score": "0.44339216", "text": "public function getNodeForValue()\n {\n return $this->defining_node;\n }", "title": "" }, { "docid": "6bd9c82ef91b6e7982994bac70bc8156", "score": "0.4431235", "text": "public function build(){\n $type = $this->field->arg( 'type' );\n return $this->{$type}( $type );\n }", "title": "" }, { "docid": "cd5e5100784b22b94f00212216e526d9", "score": "0.4419032", "text": "public function testVariable()\n {\n $variables = new SG_Rule_Variables(array('false' => 0, 'true' => 1));\n $var = new SG_Rule_Param_Variable('false');\n $rule = new SG_Rule($var);\n $this->assertTrue(false === $rule->isValid($variables));\n \n $var = new SG_Rule_Param_Variable('true');\n $rule = new SG_Rule($var);\n $this->assertTrue(true === $rule->isValid($variables));\n }", "title": "" }, { "docid": "f277027fbf9f08f31fb21a9a30726110", "score": "0.44163436", "text": "function _js_parse_variable()\n{\n// Choice{\"IDENTIFIER\" | \"IDENTIFIER\" \"OBJECT_OPERATOR\" \"IDENTIFIER\" | \"IDENTIFIER\" \"EXTRACT_OPEN\" expression \"EXTRACT_CLOSE\"}\n\n\t$variable=parser_next(true);\n\tif ($variable[0]!='IDENTIFIER')\n\t{\n\t\tjs_parser_error('Expected IDENTIFIER but got '.$variable[0]);\n\t\treturn NULL;\n\t}\n\n\t$variable_actual=_js_parse_variable_actual();\n\tif (is_null($variable_actual)) return NULL;\n\n\treturn array('VARIABLE',$variable[1],$variable_actual,$GLOBALS['JS_PARSE_POSITION']);\n}", "title": "" }, { "docid": "727c64a3f05a7904000920d021841451", "score": "0.44059575", "text": "protected function makeNode(array $item)\n\t{\n\t\treturn new Node($this->makeNodeValue($item));\n\t}", "title": "" }, { "docid": "0899b616c893e6f709cee49240ca1e1a", "score": "0.43986723", "text": "function yy_r33 ()\r\n {\r\n $this->_retvalue = $this->compiler->compileTag('assign', \r\n array_merge(\r\n array(array('value' => $this->yystack[$this->yyidx + - 2]->minor), \r\n array('var' => \"'\" . $this->yystack[$this->yyidx + - 4]->minor . \"'\")), \r\n $this->yystack[$this->yyidx + - 1]->minor));\r\n }", "title": "" }, { "docid": "bd5af62bb5f0e69da5922eed02e367f7", "score": "0.4398598", "text": "private function _makeUniqueJsVar(ParameterInterface $xParameter): ParameterInterface\n {\n if($xParameter instanceof DomSelector)\n {\n $sParameterStr = $xParameter->getScript();\n if(!isset($this->aVariables[$sParameterStr]))\n {\n // The value is not yet defined. A new variable is created.\n $sVarName = 'jxnVar' . $this->nVarId;\n $this->aVariables[$sParameterStr] = $sVarName;\n $this->sVars .= \"$sVarName=$xParameter;\";\n $this->nVarId++;\n }\n else\n {\n // The value is already defined. The corresponding variable is assigned.\n $sVarName = $this->aVariables[$sParameterStr];\n }\n $xParameter = new Parameter(Parameter::JS_VALUE, $sVarName);\n }\n return $xParameter;\n }", "title": "" }, { "docid": "c53c1f15ee127165c2453925b237f87e", "score": "0.43955764", "text": "function get_predefine_variables_value($node, $variable) {\n global $base_url;\n $value = 'Not Found';\n switch ($variable) {\n case 'node_published_date':\n $value = date('r', $node->created);\n break;\n case 'node_author':\n $user_profile_data = user_load($node->uid);\n $value = $user_profile_data->mail . '(' . $user_profile_data->name . ')';\n break;\n case 'node_permalink':\n $node_alise_url = $base_url . '/' . drupal_get_path_alias(\"node/$node->nid\");\n $value = $node_alise_url;\n break;\n case 'node_title':\n $value = $node->title;\n break;\n }\n return $value;\n}", "title": "" }, { "docid": "02764d0b3ce86a263d5a110d5303a757", "score": "0.43770713", "text": "protected static function buildNodeFromValue($value)\n {\n if ($value instanceof Node) {\n return $value;\n } elseif (is_null($value)) {\n return new ConstFetch(\n new Name('null')\n );\n } elseif (is_bool($value)) {\n return new ConstFetch(\n new Name($value ? 'true' : 'false')\n );\n } elseif (is_int($value)) {\n return new LNumber($value);\n } elseif (is_float($value)) {\n return new DNumber($value);\n } elseif (is_string($value)) {\n return new String_($value);\n } elseif (is_array($value)) {\n $items = [];\n $lastKey = -1;\n foreach ($value as $itemKey => $itemValue) {\n // for consecutive, numeric keys don't generate keys\n if (null !== $lastKey && ++$lastKey === $itemKey) {\n $items[] = new ArrayItem(\n self::buildNodeFromValue($itemValue)\n );\n } else {\n $lastKey = null;\n $items[] = new ArrayItem(\n self::buildNodeFromValue($itemValue),\n self::buildNodeFromValue($itemKey)\n );\n }\n }\n\n return new Array_($items);\n } else {\n throw new \\LogicException('Invalid value');\n }\n }", "title": "" }, { "docid": "620bf063fc242a816998075a388c30b1", "score": "0.43764487", "text": "public function evalBindVariable($var)\n {\n return '$'.$var;\n }", "title": "" }, { "docid": "e6314261190ea04c03af6da6f56e235a", "score": "0.4374953", "text": "static public function local_get_custom_var_string($index, $name, $value) {\n return <<<EOD\n_paq.push([\"setCustomVariable\", {$index}, \"{$name}\", \"{$value}\", \"page\"]);\n\nEOD;\n }", "title": "" }, { "docid": "bce8be29c0d158358c19609210c3607e", "score": "0.43738103", "text": "public function build(): View\n {\n return view($this->onlyInner ? $this->innerView : $this->outerView)->with($this->viewVars());\n }", "title": "" }, { "docid": "43f2e381a14bfe91324076dce514bde6", "score": "0.4372698", "text": "function md_set_component_variable($name, $value) {\n\n // Call the properties class\n $properties = (new MidrubBase\\Classes\\Properties);\n\n // Set the variable name and value\n $properties->set_the_single_property($name, $value);\n \n }", "title": "" }, { "docid": "a7a2223e536eb3e1f6f264f12c01d99b", "score": "0.43695864", "text": "private function setVar()\n\t{\n\t\t$len = count((array)self::$var);\n\t\t$twig = self::$twig;\n\n\t\tif ($len > 0)\n\t\t{\n\t\t\tforeach (self::$var as $key => $value)\n\t\t\t{\n\t\t\t\t$twig->addGlobal($key, $value);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1ab46816e6df7520b484ce3d91813109", "score": "0.43661252", "text": "function assign_var($varname, $varval)\r\n {\r\n $this->_tpldata['.'][0][$varname] = $varval;\r\n\r\n return true;\r\n }", "title": "" } ]
b2f6792fd432085d129fa740e4a698d9
Get current user model
[ { "docid": "02549b6eddd14e8947a22d1afe8e724f", "score": "0.6871484", "text": "function user()\n{\n\tif(RuntimeCaches::has('currentUserInstance'))\n\t\treturn RuntimeCaches::get('currentUserInstance');\n\n\t$user = orm('user/user')->find(session::get('userID')); \n\n\tRuntimeCaches::set('currentUserInstance', $user);\n\n\treturn $user;\n}", "title": "" } ]
[ { "docid": "ca680f130cb844d65e351f158dfd9fc9", "score": "0.8329189", "text": "public static function userModel()\n {\n return static::$userModel;\n }", "title": "" }, { "docid": "ca680f130cb844d65e351f158dfd9fc9", "score": "0.8329189", "text": "public static function userModel()\n {\n return static::$userModel;\n }", "title": "" }, { "docid": "8f36de16087b880667e9a78795dbaa53", "score": "0.80433285", "text": "protected function getUserModel()\n {\n $model = Config::get('auth.providers.users.model');\n if (class_exists($model)) {\n return $model;\n }\n return null;\n }", "title": "" }, { "docid": "abdcbc3259af664367be3984e1af10ed", "score": "0.7995934", "text": "public function getUser() {\n return $this->getIdentity()->getUserModel();\n }", "title": "" }, { "docid": "3b388a1aa7c0c322c0a5f2a239e42328", "score": "0.7989863", "text": "protected function getUserModel()\n {\n return config('auth.providers.users.model');\n }", "title": "" }, { "docid": "235891388836da87d87476ee1475dc23", "score": "0.77256703", "text": "public function getModel()\n {\n return $this->nextUser->getModel();\n }", "title": "" }, { "docid": "0042d862b342e55758797d0dfb2d37c3", "score": "0.7655356", "text": "private function _getUserModel() {\n if ($this->_userModel == NULL) {\n $this->_userModel = new User();\n }\n return $this->_userModel;\n }", "title": "" }, { "docid": "1b81ce9a84d9c4d84c79701bb95e9198", "score": "0.761905", "text": "public function getUser()\n\t{\n\t\treturn $this->tran->user ?: new UserModel;\n\t}", "title": "" }, { "docid": "1be3ba3c351ba5b01525de0ee1909446", "score": "0.761381", "text": "function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "4c4a2e70af93fe47a2174459b61d80d0", "score": "0.7605749", "text": "protected function getUserModel(): string\n {\n return config('auth.providers.users.model');\n }", "title": "" }, { "docid": "f767ce74cfda3c1aeb8e48fbe3001f0e", "score": "0.7582728", "text": "public function model()\n {\n\n return User::class;\n }", "title": "" }, { "docid": "dd0484a50e106179c32cfa4b546099af", "score": "0.7555145", "text": "public static function getUser()\n\t{\n\t\t$userModel = self::getModel('user');\n\t\treturn $userModel->getCurrentUser();\n\t}", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "833996aa1701be1f8b358201ea3c9251", "score": "0.75423497", "text": "public function model()\n {\n return User::class;\n }", "title": "" }, { "docid": "47d4ccad8cccd71830eb6960b4a4d2a5", "score": "0.74806124", "text": "public static function user()\n {\n return new static::$userModel;\n }", "title": "" }, { "docid": "47d4ccad8cccd71830eb6960b4a4d2a5", "score": "0.74806124", "text": "public static function user()\n {\n return new static::$userModel;\n }", "title": "" }, { "docid": "306a60ad2f4c12e83948ec87c9b288c3", "score": "0.7434082", "text": "function model()\n\t\t{\n\t\t\treturn 'App\\Models\\User';\n\t\t}", "title": "" }, { "docid": "5c038e2c52e991f021f753cddc72afdb", "score": "0.74147904", "text": "public function user()\n {\n return $this->belongsTo(\\Config::get('auth.model'));\n }", "title": "" }, { "docid": "1227bc57c4fb371d2cf527f076e93e53", "score": "0.72855854", "text": "public function model(): string\n {\n return User::class;\n }", "title": "" }, { "docid": "148f9b3b9dc02334c7f96b2d01f01c71", "score": "0.7247611", "text": "protected function getCurrentUser()\n {\n /** @var User $user */\n $user = \\Yii::$app->getUser()->getIdentity();\n return $user;\n }", "title": "" }, { "docid": "04c16a6c3020422b0d61f2399d9ad518", "score": "0.7159985", "text": "public function getModel()\n {\n return TUserLogin::class;\n }", "title": "" }, { "docid": "3e0c1e7650a7ec4e88d63034e062557a", "score": "0.7143148", "text": "public function getCurrentUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "07ea2b5a7aab2711700cdfff5d91b6cc", "score": "0.71408445", "text": "public function getCurrentUser() {\n return $this->user;\n }", "title": "" }, { "docid": "0c4a23164f6abed854085589f8cebce8", "score": "0.7089015", "text": "public function model()\n {\n // TODO: Implement model() method.\n return PlatUserProfile::class;\n }", "title": "" }, { "docid": "a0c2f6531adbf1984bb48219b47203cf", "score": "0.70632446", "text": "public function getModel()\n {\n return new User;\n }", "title": "" }, { "docid": "b43c2cf63f8a2acd7fc4bf0694adf10d", "score": "0.70629305", "text": "public function getCurrentUser();", "title": "" }, { "docid": "540deafa3b630c33af8510d73386e59d", "score": "0.7038604", "text": "public function getUser()\n {\n return UserModel::findByID($this->user_account_id);\n }", "title": "" }, { "docid": "1d28054846652f01f1214e2784079a89", "score": "0.7011093", "text": "public function user()\n {\n return $this->belongsTo(config(\"auth.providers.users.model\"));\n }", "title": "" }, { "docid": "48d2d268a878877748b1c1e14d9e7da6", "score": "0.6993457", "text": "public function user()\n {\n return $this->belongsTo(config('auth.providers.users.model'));\n }", "title": "" }, { "docid": "9b95d1738df86607665d9f75acae8539", "score": "0.69893193", "text": "public function user() {\n //this matches the Eloquent model\n\t\treturn $this->hasOne('User'); \n\t}", "title": "" }, { "docid": "11afefa628ba0c8d93101f8febbfdef0", "score": "0.69832224", "text": "public function getCurrentUser() {\n\n return $this->currentUser;\n\n }", "title": "" }, { "docid": "43c3cb48b0f7f684b006815556ac0dff", "score": "0.69733906", "text": "public function getCurrentUser() {\n return $this->currentUser;\n }", "title": "" }, { "docid": "3662beed37df690699a687011aefa6e6", "score": "0.6973254", "text": "public function user()\n {\n if ($this->user && !($this->user instanceof User)) {\n $this->user = $this->castTo($this->user, static::USER_MODEL);\n }\n\n return $this->user;\n }", "title": "" }, { "docid": "3662beed37df690699a687011aefa6e6", "score": "0.6973254", "text": "public function user()\n {\n if ($this->user && !($this->user instanceof User)) {\n $this->user = $this->castTo($this->user, static::USER_MODEL);\n }\n\n return $this->user;\n }", "title": "" }, { "docid": "65800e122fa9e335ed7ac595a13e6241", "score": "0.69720507", "text": "public function getCurrentUser()\n {\n return $this->currentUser;\n }", "title": "" }, { "docid": "1a43fc2b2587ee46febf256c2a0326f7", "score": "0.69533163", "text": "public static function get_current_user()\n {\n $mvc = midgardmvc_core::get_instance();\n return $mvc->authentication->get_user();\n }", "title": "" }, { "docid": "68d266f05d1437cd66b44f84b1563059", "score": "0.69438714", "text": "public static function model()\n {\n return static::$model;\n }", "title": "" }, { "docid": "30eb89430aca2b0c39d5901a667f6c89", "score": "0.69278145", "text": "public function getCurrentUser(){\n\t\t$curUserId = Yii::app()->user->id;\n\t\t$curUser = $this->findByPk($curUserId);\n\t\treturn $curUser;\n\t}", "title": "" }, { "docid": "453a26ab5b36e3373c412d0dd2fb54f7", "score": "0.6917422", "text": "function getUser(){\n\t \treturn mofilmUserManager::getInstanceByID($this->getUserID());\n\t}", "title": "" }, { "docid": "e5842d3f47e59fa21bb5c21dd4e02047", "score": "0.69011235", "text": "static function getCurrentUser() {\n\t\t\t$ret = self::getById( self::$user_id );\n\t\t\treturn $ret;\n\t\t}", "title": "" }, { "docid": "b7a1a953a67f50336db2e21a46ba63b6", "score": "0.6897547", "text": "public function user(): User\n {\n return \\App\\Users\\Model::get($this->getUserId());\n }", "title": "" }, { "docid": "c4a6231fd993be822a4c24e63a2818c1", "score": "0.686536", "text": "public function user()\n\t{\n\t\treturn $this->belongsTo(config('auth.providers.users.model'), 'user_id');\n\t}", "title": "" }, { "docid": "04d87c7d8cd8fda1adbc2d2439fa9722", "score": "0.6855463", "text": "public function userModel() {\n //var_dump($user->select());\n $user = M('sys_user');\n var_dump($user->select());\n }", "title": "" }, { "docid": "ff932d0e784415becf578e2596930a4c", "score": "0.6849371", "text": "public static function get_user(){\n return self::get_instance();\n }", "title": "" }, { "docid": "18f8e7c5a249f390fbf5f3d7042f1e8a", "score": "0.68367463", "text": "public static function getUser()\n {\n return \\MPF\\User::bySession();\n }", "title": "" }, { "docid": "d807fd507decdc3be9872ba4502d32c1", "score": "0.6826158", "text": "public function getUser()\n {\n return User::model()->findByPk($this->created_by);\n }", "title": "" }, { "docid": "085a2f85c51c9ed8a03db6426eb68cd8", "score": "0.6818202", "text": "public function loadUser()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(Yii::app()->user->id)\n\t\t\t\t$this->_model=Yii::app()->controller->module->user();\n\t\t\tif($this->_model===null)\n\t\t\t\t$this->redirect(Yii::app()->controller->module->loginUrl);\n\t\t}\n\t\treturn $this->_model;\n\t}", "title": "" }, { "docid": "34a80354c6e27fbe92081753088b039f", "score": "0.680623", "text": "function get_user() {\n\n\t\t$r = $this->findOne ();\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "f9e097e58480f38f225da0c359f80a33", "score": "0.6800242", "text": "public function getUser()\n {\n return $this->module->get('user');\n }", "title": "" }, { "docid": "4d2d655a0a5e01f3501140d4fea1ba85", "score": "0.6797876", "text": "public function get_current_user_object() {\n\n\t\t\tif ( ! $this->current_user ) {\n\t\t\t\t$this->current_user = wp_get_current_user();\n\t\t\t}\n\n\t\t\treturn $this->current_user;\n\n\t\t}", "title": "" }, { "docid": "1b38aad7b5629e4c1de2032c28b0fbc7", "score": "0.6792486", "text": "function getUser(){\n\t\tif( $this->isGuest )\n\t\t\treturn;\n\t\tif( $this->_user === null ){\n\t\t\t$this->_user = User::model()->findByPk( $this->id );\n\t\t}\n\t\treturn $this->_user;\n\t}", "title": "" }, { "docid": "7ff753c137e1d07e82ebbbc9b93e02ad", "score": "0.67889047", "text": "public static function getModelName() {\n\t\treturn 'User';\n\t}", "title": "" }, { "docid": "4e74ea33a6fb5818524ba3b5340411ca", "score": "0.67879087", "text": "public function getUser()\n {\n return $this->user();\n }", "title": "" }, { "docid": "cfb083c0c7d5a6a74718f940e9040360", "score": "0.6786129", "text": "public function getCurrentUser()\n {\n return $this->get($this->getCurrentUserId(), $this->currentUserBundle);\n }", "title": "" }, { "docid": "e72d931f0bacddb6d75230a0edce3935", "score": "0.6781951", "text": "public function model()\n {\n return Auth::class;\n }", "title": "" }, { "docid": "2edcc3a0330443fd7e4a2a4da3bc4865", "score": "0.67817277", "text": "public function getCurrentUser() : Authenticatable|User\n {\n return $this->guard->user();\n }", "title": "" }, { "docid": "bad9eb0f16af6dc288f4dab0f0d1c3a9", "score": "0.6774764", "text": "public function getCurrentUser()\n {\n return $this->getInvokeArg('bootstrap')->getResource('Currentuser');\n }", "title": "" }, { "docid": "3ebbe5702bab6533696ff99a15b65fdd", "score": "0.67746764", "text": "protected function user() { \n\n $this->checkUser();\n \n return $this->user;\n }", "title": "" }, { "docid": "21847d75bb169346634ef9f597c80e8b", "score": "0.6763675", "text": "public function currentUser() {\n return $this->user;\n }", "title": "" }, { "docid": "3b1a41302013a9a4b1f768af9f46974c", "score": "0.6761727", "text": "public function user() {\n return $this->auth->user($this->table);\n }", "title": "" }, { "docid": "1de37febdbc9c96154585f67f60d3306", "score": "0.67462915", "text": "public function model()\n {\n return Users::class;\n }", "title": "" }, { "docid": "82e386147cabf06aa5eb1be25e2c649b", "score": "0.673618", "text": "public function getCurrentUser(): User\n {\n return $this->componentController->getUser();\n }", "title": "" }, { "docid": "8cab95aa7a16128f47d6ca78e3cd6f2a", "score": "0.6733808", "text": "public static function roleModel()\n {\n return static::$roleModel;\n }", "title": "" }, { "docid": "c3136f3765ed45dbf04f6fa7ad231d36", "score": "0.67320895", "text": "function user()\r\n\t {\r\n\t $ci =& get_instance();\r\n\t $user = $ci->auth_model->get_logged_user();\r\n\t if (empty($user)) \r\n\t\t\t{\r\n\t $ci->auth_model->logout();\r\n\t } else {\r\n\t return $user;\r\n\t }\r\n\r\n\t }", "title": "" }, { "docid": "7472346607d10ecb44ecd68a347a2bb1", "score": "0.6730264", "text": "public function user()\n {\n return $this->get(\"user\");\n }", "title": "" }, { "docid": "7f31807f621d464f1714d45476fe8bd6", "score": "0.6707607", "text": "public function getUser() {\n\t\treturn User::getUser($this->user_id);\n\t}", "title": "" }, { "docid": "93fd83b5bcb92b6dff6ade7068fc19f5", "score": "0.67074084", "text": "public function model()\n {\n return \"App\\Models\\User\";\n }", "title": "" }, { "docid": "d2badca115a83c2a904a7e908d4a538e", "score": "0.6703294", "text": "public function getUser($userId)\n {\n $model = KandyUsers::where(\"main_user_id\", $userId)->first();\n return $model;\n }", "title": "" }, { "docid": "0ce05e6e6e244375867e6e0954e1095c", "score": "0.66969144", "text": "function get_current_user(){}", "title": "" }, { "docid": "46f8ed1c38b7b665f991f83de9b05998", "score": "0.66918564", "text": "function getCurrentUser(){\n\tglobal $USER;\n\tif($USER !== null){\n\t\treturn $USER;\n\t}\n\telse{\n\t\tlogWarning('Require.php generating new CurrentUser. This shouldn\\'t happen usually.');\n\t\treturn new CurrentUser();\n\t}\n}", "title": "" }, { "docid": "9b23b1a6bc9067890fc85864f9012aff", "score": "0.6670014", "text": "public function getUser() \n {\n $user = $this->securityContext->getToken()->getUser();\n\n return ($user instanceof CurrentUser ? $user : null);\n }", "title": "" }, { "docid": "a76a7d2321d0f55382850a091a503528", "score": "0.6667103", "text": "protected function getCurrentUser()\n {\n global $current_user;\n return $current_user;\n }", "title": "" }, { "docid": "986519e6d2daa03cee116312b633899a", "score": "0.6661777", "text": "public function user()\n {\n return $this->auth->user();\n }", "title": "" }, { "docid": "e1994b15a95606dced41c35076ffda75", "score": "0.6659682", "text": "public function user()\n {\n return $this->user;\n }", "title": "" }, { "docid": "e1994b15a95606dced41c35076ffda75", "score": "0.6659682", "text": "public function user()\n {\n return $this->user;\n }", "title": "" }, { "docid": "e1994b15a95606dced41c35076ffda75", "score": "0.6659682", "text": "public function user()\n {\n return $this->user;\n }", "title": "" }, { "docid": "e1994b15a95606dced41c35076ffda75", "score": "0.6659682", "text": "public function user()\n {\n return $this->user;\n }", "title": "" }, { "docid": "5f175e2bf78150dcc2e91b6db9ba16e0", "score": "0.66556454", "text": "function model()\n {\n return AuthModels\\Social_User::class;\n\n }", "title": "" }, { "docid": "1d57a79323bbc45f3932664c6596c871", "score": "0.66531825", "text": "public function user()\n {\n return $this->owner();\n }", "title": "" }, { "docid": "87146daf8c90daab2a4e427b67851cab", "score": "0.6651423", "text": "public function user()\n {\n return User::find($this->user_id);\n }", "title": "" }, { "docid": "898d0ac806fe64f8dbfc69d482167085", "score": "0.66506827", "text": "public function user()\r\n {\r\n return $this->morphTo();\r\n }", "title": "" }, { "docid": "11bb9e3d5388087394db9adffa88f7ef", "score": "0.66482764", "text": "function User() {\n return app('auth')->user() ? : new \\App\\Models\\Auth\\User();\n }", "title": "" }, { "docid": "32a0292514300df9073c8342f7a17546", "score": "0.664682", "text": "public function user()\n {\n return $this->belongsTo(\n LaravelAuth::userModel(),\n 'user_id',\n LaravelAuth::user()->getKeyName()\n );\n }", "title": "" } ]
582d8b0a9a7cfb7eee611cf01ad63532
Returns control's HTML element template.
[ { "docid": "af9d165e23af9f5d43e17f345b3c03f0", "score": "0.66653764", "text": "public function getControlPrototype(): Html\n\t{\n\t\treturn $this->control;\n\t}", "title": "" } ]
[ { "docid": "2fc8096be6ece56fff4bb5973eb769fe", "score": "0.72299856", "text": "public function getControl()\n\t{\n\t\t$this->setOption('rendered', true);\n\t\t$el = clone $this->control;\n\t\treturn $el->addAttributes([\n\t\t\t'name' => $this->getHtmlName(),\n\t\t\t'id' => $this->getHtmlId(),\n\t\t\t'required' => $this->isRequired(),\n\t\t\t'disabled' => $this->isDisabled(),\n\t\t\t'data-nette-rules' => Nette\\Forms\\Helpers::exportRules($this->rules) ?: null,\n\t\t]);\n\t}", "title": "" }, { "docid": "24c5ebea3e79477aac4d875d7cfa096d", "score": "0.69950974", "text": "public function getControl()\n {\n $control = parent::getControl();\n\n $wrapper = Html::el('div', ['data-foo' => 'foo']);\n $wrapper->addClass('control-class1');\n $wrapper->addClass('control-class2');\n $wrapper->addHtml($control);\n $wrapper->addHtml('<span>foo</span>');\n\n return $wrapper;\n }", "title": "" }, { "docid": "6cd09b65494eb2789e6e5fdd9c12bd60", "score": "0.69601744", "text": "public function getControl(): Html\n {\n $c = new Html();\n $c->addHtml($this->getControlPart());\n $c->addHtml($this->getLabelPart());\n return $c;\n }", "title": "" }, { "docid": "544fd5b7f8bfd82344fcb4a8729116a4", "score": "0.679509", "text": "public function getFormTemplate();", "title": "" }, { "docid": "264e8e1cdf008649fc25c1c1333a3e0d", "score": "0.6739504", "text": "public function getControl(): Html\n\t{\n\t\t$control = parent::getControl();\n\t\t$control->type = $this->htmlType;\n\t\t$control->addClass($this->htmlType);\n\n\t\tlist($min, $max) = $this->extractRangeRule($this->getRules());\n\t\tif ($min instanceof DateTimeInterface) {\n\t\t\t$control->min = $min->format($this->htmlFormat);\n\t\t}\n\t\tif ($max instanceof DateTimeInterface) {\n\t\t\t$control->max = $max->format($this->htmlFormat);\n\t\t}\n\t\t$value = $this->getValue();\n\t\tif ($value instanceof DateTimeInterface) {\n\t\t\t$control->value = $value->format($this->htmlFormat);\n\t\t}\n\n\t\treturn $control;\n\t}", "title": "" }, { "docid": "37753b91d8efd60ca216b83f063c3fed", "score": "0.6666747", "text": "public function template(): Html\n {\n return Html::div(\n Statement::if($this->label,\n fn() => Html::label($this->label),\n ),\n\n Html::input()\n ->merge($this),\n\n Statement::if($this->error,\n fn() => Html::p($this->error)\n ->class('text-red-600 text-sm'),\n ),\n )->class('space-y-1 mb-5');\n }", "title": "" }, { "docid": "384b10a2326dd09cdbeba1cc37ef9a80", "score": "0.661706", "text": "public function getTemplate() {\n\t\treturn dirname(__FILE__).'/jqueryui.phtml';\n\t}", "title": "" }, { "docid": "8ac5bbc4d5f36e003892652e32620f2d", "score": "0.6605687", "text": "public function GetControlHtml() {\n\t\t\t// Pull any Attributes\n\t\t\t$strAttributes = $this->GetAttributes(true, false);\n\t\t\t$strActions = $this->GetActionAttributes();\n\n\t\t\t// Pull any styles\n\t\t\tif ($strStyle = $this->GetStyleAttributes())\n\t\t\t\t$strStyle = 'style=\"' . $strStyle . '\"';\n\n\t\t\t$strToReturn = sprintf('<div %s id=\"%s\"><a href=\"%s\" %s %s>%s</a></div>',\n\t\t\t\t$strAttributes,\n\t\t\t\t$this->strControlId,\n\t\t\t\t$this->strLinkUrl,\n\t\t\t\t$strActions,\n\t\t\t\t$strStyle,\n\t\t\t\t($this->blnHtmlEntities) ? \n\t\t\t\t\tQApplication::HtmlEntities($this->strText) :\n\t\t\t\t\t$this->strText);\n\n\t\t\t// Return the HTML.\n\t\t\treturn $strToReturn;\n\t\t}", "title": "" }, { "docid": "c2bdc12c47860d6712fe0f6362517ea6", "score": "0.6564312", "text": "public function forTemplate(){\n return $this->getHTML();\n }", "title": "" }, { "docid": "2d7bdc3085d016b576415d974969e2ea", "score": "0.653478", "text": "public function getTemplate() {\n $class = $this->annotations->getType();\n $object = new $class();\n $namespace = '_template.' . $this->getIdentifier() . '.000';\n $parentSection = clone $this;\n $containerSection = $parentSection->createElement('container.' . $namespace, 'TYPO3.Form:Section');\n $section = $this->formBuilder->createFormForSingleObject($containerSection, $object, $namespace);\n# $containerSection->setDataType($class);\n return $containerSection;\n }", "title": "" }, { "docid": "c2a223fa4f90ef8fe50356875524d10a", "score": "0.65317875", "text": "public function getControl()\n {\n $control = parent::getControl();\n $control->class = 'redactor';\n\n $render = Html::el('div')->class('redactor_control')\n ->add($control);\n\n return $render;\n }", "title": "" }, { "docid": "d8f95851241c0d886f195cc9567b64d5", "score": "0.65310603", "text": "public function getControlHtml()\n {\n \n if ( $this->get('readonly')) {\n $this->tag1->set( 'readonly', 'readonly' );\n $this->tag2->set( 'readonly', 'readonly' );\n }\n \n if ( $this->get('disabled')) {\n $this->tag1->set( 'disabled', 'disabled' );\n $this->tag2->set( 'disabled', 'disabled' );\n }\n \n if ( $this->get('id') ) {\n \n $this->tag1->set( 'id', $this->get('id').'_first');\n $this->tag2->set( 'id', $this->get('id').'_last');\n \n if ( $this->get('id') != '' && $this->get('sync') ) {\n $this->tag1->set( 'id', 'trans_'.$this->tag1->get('id') );\n $this->tag2->set( 'id', 'trans_'.$this->tag2->get('id') );\n }\n\n }\n if ( $this->get('name') ) {\n \n $this->tag1->set( 'name', $this->get('name').'_first');\n $this->tag2->set( 'name', $this->get('name').'_last');\n \n if ( $this->get('name') != '' && $this->get('sync') ) {\n $this->tag1->set( 'name', 'trans_'.$this->tag1->get('name') );\n $this->tag2->set( 'name', 'trans_'.$this->tag2->get('name') );\n }\n\n }\n $this->tag1->set( 'value', $this->tag1->getDefaultValue() );\n $this->tag2->set( 'value', $this->tag2->getDefaultValue() );\n \n return $this->tag1->getTagHtml('input', '', $this->get('css'))\n . ' '\n . $this->tag2->getTagHtml('input', '', $this->get('css'));\n }", "title": "" }, { "docid": "726e5cc46fc4fcaafaa9926e2f9b22b3", "score": "0.65049183", "text": "public function getControl($caption = null): Nette\\Utils\\Html\n\t{\n\t\t$this->setOption('rendered', true);\n\t\t$el = clone $this->control;\n\t\treturn $el->addAttributes([\n\t\t\t'name' => $this->getHtmlName(),\n\t\t\t'disabled' => $this->isDisabled(),\n\t\t\t'value' => $this->translate($caption === null ? $this->getCaption() : $caption),\n\t\t]);\n\t}", "title": "" }, { "docid": "3071ff8f8ca67046f06a63ad9c1bbb1a", "score": "0.6468905", "text": "public static function getFormTemplate()\n {\n return static::getAutomaticTemplatePath('.html.twig', 'ElementAdmin', null);\n }", "title": "" }, { "docid": "ff4b642985d66ee5478aa28243af00bf", "score": "0.6446589", "text": "public function forTemplate()\n {\n return $this->renderWith([self::class]);\n }", "title": "" }, { "docid": "d00592412c2c3b64a2567d67c1590468", "score": "0.64245075", "text": "protected function getControlHtml()\n {\n /* Deprecated. Use Margin and Padding on the ItemStyle attribute.\n if ($this->intCellPadding >= 0)\n $strCellPadding = sprintf('cellpadding=\"%s\" ', $this->intCellPadding);\n else\n $strCellPadding = \"\";\n\n if ($this->intCellSpacing >= 0)\n $strCellSpacing = sprintf('cellspacing=\"%s\" ', $this->intCellSpacing);\n else\n $strCellSpacing = \"\";\n */\n\n if ($this->intButtonMode == self::BUTTON_MODE_SET || $this->intButtonMode == self::BUTTON_MODE_LIST) {\n return $this->renderButtonSet();\n } else {\n $strToReturn = $this->renderButtonTable();\n }\n\n return $strToReturn;\n }", "title": "" }, { "docid": "69c552f12f3a41fe6a7869e79cb31f1b", "score": "0.6407349", "text": "public function getTemplate() {\n return $this->tpl;\n }", "title": "" }, { "docid": "701dec84a4022e6c8a34007df5fe4e8f", "score": "0.63956976", "text": "public function getControl()\n\t{\t\t\t\t \n\t\t$c = parent::getControl();\t\t\t\t \n\t\t$config = $this->getConfig();\n\t\t$s = 'if(CKEDITOR.instances[\\''.$this->getHtmlName().'\\']) delete CKEDITOR.instances[\\''.$this->getHtmlName().'\\'];';\n\t\t$s .= 'CKEDITOR.replace(\\''.$this->getHtmlName().'\\', '.$config.');';\n\t\treturn $c.Html::el('script')->type('text/javascript')->add($s);\n\t}", "title": "" }, { "docid": "cc630e2c4b36937b1cd78eaf886544e9", "score": "0.63520837", "text": "function getInputHtml()\n {\n $reflect = new \\ReflectionClass($this);\n $template = strtolower($reflect->getShortName());\n return Craft::$app->view->renderTemplate('igloo/blocks/'.$template, ['block' => $this]);\n }", "title": "" }, { "docid": "b6de00379eb151b6100725a0ea80b4e1", "score": "0.6312436", "text": "protected function getTemplate()\n {\n return 'cms-package::forms.fields.audiofile';\n }", "title": "" }, { "docid": "5dc2902fd185d45a5a7b53e31c796e95", "score": "0.627543", "text": "public function getTemplate()\n {\n return 'SuluContactExtensionBundle:Widgets:contact.main.account.html.twig';\n }", "title": "" }, { "docid": "5c31d8fc4e931e49c3fa6a6166171dde", "score": "0.62710935", "text": "public function get_template()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6268216", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6268216", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6268216", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6268216", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6268216", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6268216", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "7cf9b18822c2bd518cd5c63d44890251", "score": "0.6251278", "text": "public function getControl($caption = null): Html\n {\n $control = parent::getControl($caption);\n $control->addAttributes(array('class' => 'btn waves-effect waves-light'));\n return $control;\n }", "title": "" }, { "docid": "d505ca7a756e2930eb25e6070484a3fe", "score": "0.6250131", "text": "protected function getTemplate() {\n\t\treturn new Template('Premanager', 'projectForm');\n\t}", "title": "" }, { "docid": "1861d01d1173c57945a3f50d4dca2a85", "score": "0.62466186", "text": "public function template()\n {\n return \"plugins/enclosures.tpl.html\";\n }", "title": "" }, { "docid": "7b9b7c781db35a83c8b7416f3ec8f612", "score": "0.62455696", "text": "public function getTemplate()\n\t{\n\t\treturn $this->template;\n\t}", "title": "" }, { "docid": "bc700c2f0156ac4ed99fbb52ed1abd71", "score": "0.6245235", "text": "public function getTemplate() {\n\t\treturn $this->template; \n\t}", "title": "" }, { "docid": "bd03d73dce0f74ce9c00af7e36ffba78", "score": "0.62283283", "text": "public function get_template() {\n\t\treturn $this->template;\n\t}", "title": "" }, { "docid": "5ef79923d277b414b4ba6b55d48534cd", "score": "0.6225164", "text": "public function getTemplate() {\n return $this->template;\n }", "title": "" }, { "docid": "4674789aee13f19425957b849b21fcd5", "score": "0.62140596", "text": "protected function getTemplate() {\n\t\t$list = self::getList();\n\t\t$options = array();\n\t\tforeach ($list as $group) {\n\t\t\tif ($group->getProject()->getTitle() !== $currentProject) {\n\t\t\t\t$currentProject = $group->getProject()->getTitle(); \n\t\t\t\t$options[$currentProject] = array();\n\t\t\t}\n\t\t\t$options[$currentProject][$group->getID()] = $group->getName();\n\t\t}\n\t\t\n\t\t$template = new Template('Premanager', 'userJoinGroupForm');\n\t\t$template->set('groups', $options);\n\t\t$template->set('node', $this);\n\t\treturn $template;\n\t}", "title": "" }, { "docid": "fabe11de7e84017c8d0b5c56b3dd7518", "score": "0.62121946", "text": "public function getTemplate(): string\n {\n return $this->template;\n }", "title": "" }, { "docid": "aaa59b6842a1e30d1bc4cc2b5d0cb672", "score": "0.61956656", "text": "public function getTemplate(): string {\n\t\treturn $this->template;\n\t}", "title": "" }, { "docid": "980bd28f1ea720355e4dae82545204a4", "score": "0.61820316", "text": "public function getTemplate()\n {\n return $this->_template;\n }", "title": "" }, { "docid": "faa22c65b5b95011d8cb74a720a7b735", "score": "0.6180678", "text": "public function getTemplate()\n {\n if (is_null($this->_template)) {\n $this->_template = new SubmitInput();\n }\n return $this->_template;\n }", "title": "" }, { "docid": "e0552b59437b8927fc686a16c451abbc", "score": "0.61798835", "text": "function getElementTemplateType(){\n if ($this->_flagFrozen){\n return 'nodisplay';\n } else {\n return 'default';\n }\n }", "title": "" }, { "docid": "f2f21f69f1118343bc0ef01244965bd4", "score": "0.6173006", "text": "public function getTemplate(): string\n\t{\n\t\treturn $this->template;\n\t}", "title": "" }, { "docid": "b18d016141ca4097d931076621060551", "score": "0.6163928", "text": "final public function getTemplate()\n\t{\n\t\treturn $this->_template;\n\t}", "title": "" }, { "docid": "fa45c8a20f04cb7183f2e73ce4f0b7d1", "score": "0.61631113", "text": "public function getTemplate()\n {\n \treturn $this->_template;\n }", "title": "" }, { "docid": "321d847413b233aa9444b5172fe302f1", "score": "0.61618", "text": "public function getTemplate() {\n return $this->_template;\n }", "title": "" }, { "docid": "72d7fbe7a111a5a73048c7b4195d664a", "score": "0.6159417", "text": "public function getTemplate()\n {\n return $this->_template;\n }", "title": "" }, { "docid": "79a4cb1d04487d3a3ca5c906dca6219b", "score": "0.6155661", "text": "protected function template() {\n\t\treturn 'cortex-meta-box-block-editor.php';\n\t}", "title": "" }, { "docid": "f2b93ad3bc1fc23c59d616d68459589f", "score": "0.61397046", "text": "public function RenderControl () {\n\t\t$attrsStr = $this->renderControlAttrsWithFieldVars([\n\t\t\t'min', 'max', 'step',\n\t\t\t'list',\n\t\t\t'autoComplete',\n\t\t\t'placeHolder',\n\t\t]);\n\t\tif ($this->multiple) \n\t\t\t$attrsStr .= (strlen($attrsStr) > 0 ? ' ' : '')\n\t\t\t\t. 'multiple=\"multiple\"';\n\t\tif (!$this->form->GetFormTagRenderingStatus()) \n\t\t\t$attrsStr .= (strlen($attrsStr) > 0 ? ' ' : '')\n\t\t\t\t. 'form=\"' . $this->form->GetId() . '\"';\n\t\t$valueStr = $this->multiple && gettype($this->value) == 'array' \n\t\t\t? implode(',', (array) $this->value) \n\t\t\t: (string) $this->value;\n\t\t$valueStr = htmlspecialchars_decode(htmlspecialchars($valueStr, ENT_QUOTES), ENT_QUOTES);\n\t\t$formViewClass = $this->form->GetViewClass();\n\t\t/** @var $templates \\stdClass */\n\t\t$templates = static::$templates;\n\t\t$result = $formViewClass::Format($templates->control, [\n\t\t\t'id'\t\t=> $this->id,\n\t\t\t'name'\t\t=> $this->name . ($this->multiple ? '[]' : ''),\n\t\t\t'type'\t\t=> $this->type,\n\t\t\t'value'\t\t=> $valueStr . '\" data-value=\"' . $valueStr,\n\t\t\t'attrs'\t\t=> strlen($attrsStr) > 0 ? ' ' . $attrsStr : '',\n\t\t]);\n\t\treturn $this->renderControlWrapper($result);\n\t}", "title": "" }, { "docid": "85c2754d108b1a84245902eb11ff8b8f", "score": "0.61371154", "text": "public function getTemplate()\n {\n return 'SuluSalesCoreBundle:Widgets:core.flow.of.documents.html.twig';\n }", "title": "" }, { "docid": "a40e7fd169928ee9e06c5e8cc88a1524", "score": "0.6126405", "text": "public function content_template() {\n $control_uid = $this->get_control_uid();\n ?>\n <div class=\"elementor-control-field\">\n <label for=\"<?php echo esc_attr($control_uid); ?>\" class=\"elementor-control-title\">{{{ data.label }}}</label>\n <div class=\"elementor-control-input-wrapper\">\n <# var multiple = ( data.multiple ) ? 'multiple' : ''; #>\n <select id=\"<?php echo esc_attr($control_uid); ?>\" class=\"elementor-select2\" type=\"select2\" {{ multiple }} data-setting=\"{{ data.name }}\" data-test=\"1\">\n <# _.each( data.options, function( option_title, option_value ) {\n var value = data.controlValue;\n if ( typeof value == 'string' ) {\n var selected = ( option_value === value ) ? 'selected' : '';\n } else if ( null !== value ) {\n var value = _.values( value );\n var selected = ( -1 !== value.indexOf( option_value ) ) ? 'selected' : '';\n }\n #>\n <option {{ selected }} value=\"{{ option_value }}\">{{{ option_title }}}</option>\n <# } ); #>\n </select>\n </div>\n </div>\n <# if ( data.description ) { #>\n <div class=\"elementor-control-field-description\">{{{ data.description }}}</div>\n <# } #>\n <?php\n }", "title": "" }, { "docid": "d6f0c398d54b32a81c840a686fd1677c", "score": "0.61204976", "text": "public function getControl()\n\t{\n\t\t$formats = explode(self::$formatSeparator, $this->format);\n\n\t\t$container = Html::el('span');\n\t\t\n\t\tforeach($formats as $index => $format) {\n\t\t\t$format = trim($format, '%');\n\t\t\t/*if(0 === $index) {\n\t\t\t\t$this->getLabelPrototype()->id = $this->getHtmlId() . '-' . $format;\n\t\t\t}*/\n\t\t\t$control = Html::el('select');\n\t\t\t$control->id = $this->getHtmlId() . '-' . $format;\n\t\t\t$control->name = $this->getHtmlName() . '[' . $format . ']';\n\t\t\tif(!isset($this->formats[$format])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$modifier = $this->formats[$format]['modifier'];\n\t\t\t$default = $this->formats[$format]['default'];\n\t\t\t$range = $this->formats[$format]['range'];\n\t\t\t$strp = $this->formats[$format]['strp'][1];\n\t\t\t$sequence = $this->formats[$format]['sequence'];\n\t\t\t$from = is_numeric($range[0]) ? $range[0] : (int)date($default, strtotime($range[0]));\n\t\t\t$to = is_numeric($range[1]) ? $range[1] : (int)date($default, strtotime($range[1]));\n\t\t\t$current = $from;\n\n\t\t\t$options = array();\n\t\t\n\t\t\tif($this->skipFirst) {\n\t\t\t\t$options[''] = self::$emptyValue;\n\t\t\t}\n\n\t\t\t$cycles = 0;\n\t\t\tdo {\n\t\t\t\t$options[$current] = $modifier === $default ? $current : date($modifier, $current);\n\t\t\t\t$current+= $sequence;\n\t\t\t\t$cycles++;\n\t\t\t\tif(100 == $cycles) {\n\t\t\t\t\tbreak;\n\t\t\t\t\tdie('oops');\n\t\t\t\t}\n\t\t\t} while($to >= $current);\n\n\t\t\tif($this->skipFirst) {\n\t\t\t\tfor($i = 1; $i < strlen(end($options));++$i) {\n\t\t\t\t\t$options[''] .= self::$emptyValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach($options as $option) {\n\t\t\t\t$opt = $control->create('option')\n\t\t\t\t\t->setValue($option)\n\t\t\t\t\t->setText($option);\n\n\t\t\t\tif(isset($this->value[$strp]) && $this->value[$strp] == $option) {\n\t\t\t\t\t$opt->selected = 'selected';\n\t\t\t\t}\n\t\t\t\telseif(isset($this->value[$format]) && $this->value[$format] == $option) {\n\t\t\t\t\t$opt->selected = 'selected';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$container->add($control);\n\t\t}\n\t\treturn $container;\n\t}", "title": "" }, { "docid": "67ed2c2f3a0a8d16b154f519663da156", "score": "0.611864", "text": "protected function getTemplate()\n {\n return 'cms-package::forms.fields.money';\n }", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.6117924", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.6117924", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.6117924", "text": "public function getTemplate();", "title": "" }, { "docid": "67b047cec55e527efc6dd75bbd8e4797", "score": "0.6116298", "text": "final public function getTemplate(){\n\t\treturn $this->__src;\n\t}", "title": "" }, { "docid": "17be0d0dc4d01a2e3139b53ec98179e8", "score": "0.6097642", "text": "function getTemplate() {\n\t\t//print_r($this->page);\n\t\t\n\t\t//echo $this->page->template;\n\t\treturn $this->page->template;\n\t}", "title": "" }, { "docid": "e63a9f816c7a9252a89b989fb21300c5", "score": "0.6089122", "text": "public function getControl()\n\t{\n\t\t$i = $this->getHtmlName(true);\n\t\tif ($this->lookup('Form') instanceof MultiForm) {\n\t\t\t$i .= '-multi-';\n\t\t}\n\t\t$namespace = Environment::getSession('controls');\n\t\t$namespace->$i = array(\n\t\t\t'sql' => $this->sqllist,\n\t\t\t'class' => $this->getclass(),\n\t\t\t'autosubmit' => $this->autoSubmit,\n\t\t\t'link' => $this->link\n\t\t);\n\n\t\tif (!empty($this->value)) {\n\t\t\t$title = $this->getTitle();\n\t\t} else {\n\t\t\t$title = '';\n\t\t}\n\t\tif (!$this->readonly) {\n\t\t\tif ($this->nullable) {\n\t\t\t\t$this->cols -= 4;\n\t\t\t}\n\t\t\tif (!empty($this->link)) {\n\t\t\t\t$this->cols -= 4;\n\t\t\t}\n\t\t\tif ($this->info) {\n\t\t\t\t$this->cols -= 4;\n\t\t\t}\n\t\t\tif (empty($this->ico_drop)) {\n\t\t\t\t$this->cols += 4;\n\t\t\t}\n\n\t\t\t$f = $this->getForm()->getMainForm();\n\t\t\t$onSelect = $this->onSelectScript;\n\t\t\t$url = $f->lookup('Presenter')->Link($this->action, array('id' => $i));\n\t\t\t$link = $f->lookup('Presenter')->Link($this->link, array('id' => $this->value));\n\t\t\t$newLink = $f->lookup('Presenter')->Link($this->link, array('id' => 0));\n\t\t\t$callback = empty($this->constructUrlCallback) ? 'null' : $this->constructUrlCallback;\n\n\t\t\t$showAll = $this->showAll ? 'true' : 'false';\n\t\t\t$control = Html::el();\n\t\t\t$control->add(parent::getControl()->value($this->forcedValue === NULL ? $this->value : $this->forcedValue));\n\t\t\t$input = Html::el('input')\n\t\t\t\t\t->id($this->getHtmlName() . '_preview')\n\t\t\t\t\t->type('text')\n\t\t\t\t\t->readonly('readonly')\n\t\t\t\t\t->class($this->cssClass . ' lookupcontrol')\n\t\t\t\t\t->style($this->style)\n\t\t\t\t\t->value($title)\n\t\t\t\t\t->size($this->cols)\n\t\t\t\t\t->rel($url);\n\t\t\tif (!$this->isDisabled()) {\n\t\t\t\t$input->onclick('LookUpControl.constructUrlCallback = ' . $callback . '; LookUpControl.url = \\'' . $url . '\\'; a = LookUpControl.findPosByObj(this); LookUpControl.Show({x: a[0], y: a[1] +20, control: \\'' . $this->getHtmlName() . '\\', height: ' . $this->height . ', width: ' . $this->cbwidth . ',showAll: ' . $showAll . ', onSelect: function(result){' . $onSelect . '}});');\n\t\t\t}\n\t\t\t$control->add($input);\n\n\t\t\t$resetJs = '';\n\t\t\tif (!empty($this->link)) {\n\t\t\t\t$editImg = !empty($this->value) ? $this->ico_edit : $this->ico_new;\n\t\t\t\t$control->add(Html::el('a')->href($link)->target('_blank')->id($this->getHtmlName() . '_edit')\n\t\t\t\t\t\t\t\t->add(Html::el('img')\n\t\t\t\t\t\t\t\t\t\t->id($this->getHtmlName() . '_eimg')\n\t\t\t\t\t\t\t\t\t\t->class('lookupedit')\n\t\t\t\t\t\t\t\t\t\t->src($editImg)\n\t\t\t\t\t\t\t\t));\n\t\t\t\t$resetJs = 'document.getElementById(\\'' . $this->getHtmlName() . '_eimg\\').src = \\'' . $this->ico_new . '\\';document.getElementById(\\'' . $this->getHtmlName() . '_edit\\').href = \\'' . $newLink . '\\';';\n\t\t\t}\n\t\t\tif ($this->info) {\n\t\t\t\t$control->add(Html::el('img')\n\t\t\t\t\t\t\t\t->class('dropdown')\n\t\t\t\t\t\t\t\t->src($this->ico_info)\n\t\t\t\t\t\t\t\t->onclick('document.getElementById(\\'' . $this->getHtmlName() . '_preview\\').value = \\'\\'; document.getElementById(\\'' . $this->getHtmlName() . '\\').value = \\'\\';')\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!empty($this->ico_drop) && !$this->isDisabled()) {\n\t\t\t\t$control->add(Html::el('a')->add(Html::el('img')\n\t\t\t\t\t\t\t\t\t\t->class('dropdown')\n\t\t\t\t\t\t\t\t\t\t->src($this->ico_drop)\n\t\t\t\t\t\t\t\t\t\t->onclick('LookUpControl.constructUrlCallback = ' . $callback . '; LookUpControl.url = \\'' . $url . '\\';a = LookUpControl.findPosByObj(document.getElementById(\\'' . $this->getHtmlName() . '_preview\\')); LookUpControl.Show({x: a[0], y: a[1] +20, control: \\'' . $this->getHtmlName() . '\\', width: ' . $this->cbwidth . ', height: ' . $this->height . ', showAll: ' . $showAll . ', onSelect: function(result){' . $onSelect . '}});')\n\t\t\t\t\t\t));\n\t\t\t}\n\t\t\tif ($this->nullable && !$this->isDisabled()) {\n\t\t\t\t$autoSubmitJs = '';\n\t\t\t\tif ($this->autoSubmit) {\n\t\t\t\t\t$autoSubmitJs = 'document.getElementById(\\'' . $this->getHtmlName() . '\\').form.onsubmit()';\n\t\t\t\t}\n\t\t\t\t$control->add(Html::el('img')\n\t\t\t\t\t\t\t\t->class('dropdown')\n\t\t\t\t\t\t\t\t->src($this->ico_reset)\n\t\t\t\t\t\t\t\t->onclick($resetJs . 'document.getElementById(\\'' . $this->getHtmlName() . '_preview\\').value = \\'\\'; document.getElementById(\\'' . $this->getHtmlName() . '\\').value = \\'\\';' . $autoSubmitJs)\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\t$control = Html::el()->add($title);\n\t\t}\n\t\treturn $control;\n\t}", "title": "" }, { "docid": "8426f41bba1be9b3091dd7d0e9763d8a", "score": "0.6042726", "text": "protected function getTemplate()\n {\n // If not specified, default to the registered name of the prop\n $template = empty($this->template) ? $this->name : $this->template;\n return $template;\n }", "title": "" }, { "docid": "fc2aabd06f23045ef4a3d51b587c237a", "score": "0.6027479", "text": "public function getTemplate()\n\t{\n\t\tif (empty($this->_template)) {\n\t\t\t$this->_template = (string)$this->_xml->getXml()->attributes()->template;\n\t\t}\n\t\treturn $this->_template;\n\t}", "title": "" }, { "docid": "7c7b4d95354d5d262c45983fd0e41359", "score": "0.60225517", "text": "public function getTemplatesHtml()\n {\n $this->getChild('select_option_type')\n ->setCanReadPrice(false)\n ->setCanEditPrice(false);\n\n $this->getChild('file_option_type')\n ->setCanReadPrice(false)\n ->setCanEditPrice(false);\n\n $this->getChild('date_option_type')\n ->setCanReadPrice(false)\n ->setCanEditPrice(false);\n\n $this->getChild('text_option_type')\n ->setCanReadPrice(false)\n ->setCanEditPrice(false);\n\n $templates = $this->getChildHtml('text_option_type') . \"\\n\" .\n $this->getChildHtml('file_option_type') . \"\\n\" .\n $this->getChildHtml('select_option_type') . \"\\n\" .\n $this->getChildHtml('date_option_type');\n\n return $templates;\n }", "title": "" }, { "docid": "bb140a7337fa06bc4c5b0e5c72e33b1a", "score": "0.6008394", "text": "protected function getHtmlControl()\r\n\t{\r\n\t\treturn parent::getHtmlControl()->setTag('input')->type('submit')->class('button');\r\n\t}", "title": "" }, { "docid": "f1f62975f7eb1a92d8a8fe86572f90de", "score": "0.6004665", "text": "public function getHtml() {\n\t\t$filename = TPL_PATH . 'block/'.$this->template_name.'.tpl';\n\t\t$this->template = new Template( $filename );\t\t\n\n\t\t$this->template->set( $this->bindData );\t\t\n\t\treturn $this->template->parse();\n\n\t}", "title": "" }, { "docid": "0e89d06e166c1875385d7ab3bfbefed6", "score": "0.59681046", "text": "protected function getControlHtml()\n {\n $this->dataBind();\n\n if (empty($this->objDataSource) && $this->blnHideIfEmpty) {\n $this->objDataSource = null;\n return '';\n }\n\n\n $strHtml = $this->renderCaption();\n\n // Column tags (if applicable)\n if ($this->blnRenderColumnTags) {\n $strHtml .= $this->getColumnTagsHtml();\n }\n\n // Header Row (if applicable)\n if ($this->blnShowHeader) {\n $strHtml .= Html::renderTag('thead', null, $this->getHeaderRowHtml());\n }\n\n // Footer Row (if applicable)\n if ($this->blnShowFooter) {\n $strHtml .= Html::renderTag('tfoot', null, $this->getFooterRowHtml());\n }\n\n // DataGrid Rows\n $strRows = '';\n $this->intCurrentRowIndex = 0;\n if ($this->objDataSource) {\n foreach ($this->objDataSource as $objObject) {\n $strRows .= $this->getDataGridRowHtml($objObject, $this->intCurrentRowIndex);\n $this->intCurrentRowIndex++;\n }\n }\n $strHtml .= Html::renderTag('tbody', null, $strRows);\n\n $strHtml = $this->renderTag('table', null, null, $strHtml);\n\n $this->objDataSource = null;\n return $strHtml;\n }", "title": "" }, { "docid": "8df046a4e3332614b05f2312a12f1886", "score": "0.59539044", "text": "public function getControl()\n {\n return $this->control;\n }", "title": "" }, { "docid": "f9aae0e9b27ff93c9f6cc65e3cf850dd", "score": "0.59385306", "text": "public function getTemplate()\n {\n $magic = '__makeTemplate';\n if (!$this->hasTemplate() && method_exists($this, $magic)) {\n $this->template = $this->$magic();\n }\n return $this->template;\n }", "title": "" }, { "docid": "1f2bcb418ecfb40cb6b4059d8f5a2211", "score": "0.5922917", "text": "public function renderControl()\n\t{\n\t\t$this->template->name=$this->getName();\n\t\t$this->template->config=$this->config;\n\t\t// prirava tlacitek (config, pripadne start, stop, ci neco jineho)\n\t\t// vyber sablony\n\t\t$this->template->setFile(__DIR__.'/interTechnoRemoteControl.latte');\n\t\t//vykreslneni\n\t\tDebugger::barDump($this->template, 'this->template');\n\t}", "title": "" }, { "docid": "a5e68d31927a2cc0533dc1a8bc29b2ad", "score": "0.5916285", "text": "abstract protected function getTemplate();", "title": "" }, { "docid": "ddaa9f9c4f45a1659c7b13cab7049399", "score": "0.5900317", "text": "function getTemplate(){\n\t\t\t\t$app = JFactory::getApplication();\n\t\t\t\treturn $app->getTemplate();\n\t\t\t}", "title": "" }, { "docid": "4957d63e25b9263d2f644328b1c07005", "score": "0.5893919", "text": "public function getControl()\n {\n return $this->_control;\n }", "title": "" }, { "docid": "2073315f4a2b28efdf36cfad71d5f3a9", "score": "0.5887434", "text": "protected function getHtmlControl()\r\n\t{\r\n\t\treturn parent::getHtmlControl()->setTag('input')->type('reset')->class('button');\r\n\t}", "title": "" }, { "docid": "d373d7d83d09861410a6485f6d643546", "score": "0.5885678", "text": "public function renderControl(Widget $widget): string;", "title": "" }, { "docid": "1fc8fa5041c79d1140297e80d4a84d23", "score": "0.5868751", "text": "public function getTemplate()\n {\n if (! property_exists($this, 'template')) {\n throw new Exception('Undefined property: `template` not defined in class: ' . get_class($this));\n }\n\n try {\n return view($this->template);\n } catch (InvalidArgumentException $exception) {\n throw new InvalidArgumentException($exception->getMessage());\n }\n }", "title": "" }, { "docid": "733b36aa84f4fd335b8d0fe0c035caa7", "score": "0.5863345", "text": "public function getHtmlName(): string\n\t{\n\t\treturn $this->control->name ?? Nette\\Forms\\Helpers::generateHtmlName($this->lookupPath(Form::class));\n\t}", "title": "" }, { "docid": "e40226e9e4ea64ee2d9dd606c1af36ba", "score": "0.58437985", "text": "public function get_tpl()\n\t{\n\t\treturn $this->tpl;\n\t}", "title": "" }, { "docid": "62c4d897650c8dcb35cda4c3e1681e09", "score": "0.58418995", "text": "public function getTemplate(){\n $template = false;\n if (isset($this->options['template']))\n if ($this->options['template'])\n $template = $this->options['template'];\n return $template;\n }", "title": "" }, { "docid": "324c03c11ea832ab0dba645e85331e06", "score": "0.58407974", "text": "public function render()\n {\n $template = $this->getTemplate();\n\n $template = str_replace(\"{{attributes}}\", $this->getAttributes(true), $template);\n\n if($this->label) {\n $template = str_replace(\"{{label}}\", $this->label, $template);\n } else {\n $template = str_replace(\"{{label}}\", '', $template);\n }\n\n if(count($this->getFields())){\n $fields = array();\n\n foreach($this->getFields() as $field){\n $fields[] = $field->render();\n }\n\n $template = str_replace(\"{{fields}}\", implode(\"\", $fields), $template);\n } else {\n $template = str_replace(\"{{fields}}\", '', $template);\n }\n\n return $template;\n }", "title": "" }, { "docid": "81403feb6f44a9791cc24ab2dcb0bdc6", "score": "0.5840074", "text": "public function getPageTemplate()\n {\n return $this->MyTemplate();\n }", "title": "" }, { "docid": "705bd2eaac26a54ee0da89fd20244220", "score": "0.5838482", "text": "public function getControl()\r\n\t{\r\n\t\t$this->setOption('rendered', TRUE);\r\n\t\t$selectedParent = isset($this->items[$this->parentSelect->value]) ? $this->parentSelect->value : NULL;\r\n\r\n\t\tif($selectedParent === NULL) {\r\n\t\t\treturn NULL;\r\n\t\t}\r\n\t\t$control = clone $this->control;\r\n\t\t$control->name = $this->getHtmlName();\r\n\t\t$control->disabled = $this->disabled;\r\n\t\t$control->id = $this->getHtmlId();\r\n\r\n\t\t$selected = $this->getValue();\r\n\t\t$selected = is_array($selected) ? array_flip($selected) : array($selected => TRUE);\r\n\t\t$option = Html::el('option');\r\n\t\tif($selectedParent != NULL) {\r\n\t\t\t\r\n\t\t\tforeach($this->items[$selectedParent] as $key => $value) {\r\n\t\t\t\tif (!is_array($value)) {\r\n\t\t\t\t\t$value = array($key => $value);\r\n\t\t\t\t\t$dest = $control;\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$dest = $control->create('optgroup')->label($key);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tforeach ($value as $key2 => $value2) {\r\n\t\t\t\t\tif ($value2 instanceof Html) {\r\n\t\t\t\t\t\t$dest->add((string) $value2->selected(isset($selected[$key2])));\r\n\r\n\t\t\t\t\t} elseif ($this->useKeys) {\r\n\t\t\t\t\t\t$dest->add((string) $option->value($key2)->selected(isset($selected[$key2]))->setText($this->translate($value2)));\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$dest->add((string) $option->selected(isset($selected[$value2]))->setText($this->translate($value2)));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $control;\r\n\t}", "title": "" }, { "docid": "24d443811d7605e11113acf97e093806", "score": "0.58121777", "text": "public function getTemplate()\n {\n global $template;\n return $template;\n }", "title": "" }, { "docid": "c2e9f195104815395005f3389302bdbc", "score": "0.5807086", "text": "function renderControl($control, $data, $prefix='') {\n print '<label'.Html::attributes(array(\n 'for' => $control->id,\n )).'>'.Html::encode($control->caption).\n ($control->required ? '<span class=\"required\">*</span>' : '') .\n '</label>';\n\n\n if ($control->prefix) {\n print Html::encode($control->prefix);\n }\n\n if ($control instanceof Element_Input) {\n\n $attributes = $control->getAttributes($data, $prefix);\n\n // Add an error class to controls with issues\n if ($control->error) {\n $attributes['class'][] = 'error';\n }\n\n print '<input'.Html::attributes($attributes).'>';\n\n }elseif ($control instanceof Element_Select) {\n \n $attributes = $control->getAttributes($data, $prefix);\n\n print '<select'.Html::attributes($attributes) .'>'.\"\\n\";\n\n $value = $control->getValue($data);\n print Element_Select::renderOptions($control->options, $value, $control->multiple);\n\n print '</select>';\n }else{\n throw new Exception('Unknown control type for renderControl');\n }\n\n if ($control->suffix) {\n print Html::encode($control->suffix);\n }\n\n print \"\\n\";\n }", "title": "" }, { "docid": "e391dc4113959b40558a9c5628a62026", "score": "0.5802691", "text": "public function generate()\n {\n if (isset($GLOBALS['TL_HOOKS']['datepickerField']) && is_array($GLOBALS['TL_HOOKS']['datepickerField'])) {\n foreach ($GLOBALS['TL_HOOKS']['formDatepickerField'] as $callback) {\n $objCallback = (method_exists($callback[0], 'getInstance') ? call_user_func(array($callback[0], 'getInstance')) : new $callback[0]());\n $arrConfig = $objCallback->$callback[1]($this);\n }\n }\n\n $attributes = '';\n\n foreach($this->options as $key => $option){\n if($option != ''){\n $attributes .= 'data-date-'.ltrim(strtolower(preg_replace('/[A-Z]/', '-$0', $key)), '-').'=\"'.$option.'\"';\n }\n }\n\n return '\n <div class=\"input-group date\" data-provide=\"datepicker\" '.$attributes.'>\n <input type=\"text\" name=\"'.$this->strName.'\" id=\"ctrl_'.$this->strId.'\" class=\"tl_text '.$this->class.'\"'.$this->getAttributes().'> \n <span class=\"input-group-addon\">\n <span class=\"glyphicon glyphicon-th\"></span>\n </span>\n </div>';\n\n }", "title": "" }, { "docid": "528f26ffac89f6402375fccace178199", "score": "0.5781358", "text": "public function getElementHtml()\n {\n Mage::helper('mediachooserfield')->render($this);\n \n return parent::getElementHtml();\n }", "title": "" }, { "docid": "411eeab8a48cdb9b8d21528a612d2056", "score": "0.57787764", "text": "protected function GetTemplate()\n\t{\n\t\treturn 'history.tpl';\n\t}", "title": "" }, { "docid": "4cfc3cb69f33c85455955a9185750257", "score": "0.5761599", "text": "protected function render_template() {\r\n\t\t\t?>\r\n\t\t<li id=\"accordion-section-{{ data.id }}\" class=\"accordion-section control-section control-section-{{ data.type }} cannot-expand control-section-default\">\r\n\t\t\t<h3 class=\"wp-ui-highlight\">\r\n\t\t\t\t<# if ( data.title && data.pro_url ) { #>\r\n\t\t\t\t<a href=\"{{ data.pro_url }}\" class=\"wp-ui-text-highlight\" target=\"_blank\" rel=\"noopener\">{{ data.title }}</a>\r\n\t\t\t\t<# } #>\r\n\t\t\t</h3>\r\n\t\t</li>\r\n\t\t\t<?php\r\n\t\t}", "title": "" }, { "docid": "6a619770de1e0f96b7632c5b24ff38c0", "score": "0.5745758", "text": "protected function GetTemplate()\n\t{\n\t\treturn 'project.tpl';\n\t}", "title": "" }, { "docid": "bbbd57c535b4fa08480413342e5f85ab", "score": "0.5740418", "text": "function __toString()\n {\n return $this->template->toHtml();\n }", "title": "" }, { "docid": "37ee7be190f8483365462c7905c0852f", "score": "0.5740225", "text": "function getTemplate();", "title": "" }, { "docid": "37ee7be190f8483365462c7905c0852f", "score": "0.5740225", "text": "function getTemplate();", "title": "" }, { "docid": "4bce3f832c43a8c85071e9211e5d21af", "score": "0.5729673", "text": "public function getTemplate()\n {\n return $this->actionData['template'];\n }", "title": "" }, { "docid": "b8f299b193619bbb2cf1640406e34b06", "score": "0.5727706", "text": "public function criarHtml()\n {\n $label = empty($this->label) ? \"\" : $this->label();\n return \"\n<div class='form-group'>\n<div class='col-md-12 col-sm-12 col-xs-12'>\n {$label}\n </div>\n<div class='col-md-12 col-sm-12 col-xs-12'>\n <input placeholder='$this->placeholder' type='$this->type' class='$this->class form-control' onclick='$this->onclick' name='$this->name' id='$this->id' value='$this->value'/>\n</div>\n</div>\";\n }", "title": "" }, { "docid": "ddcdfddc19e1befda8bddc1272a971d6", "score": "0.5719387", "text": "public function render()\n {\n return $this->_templateName;\n }", "title": "" }, { "docid": "751773770eb6ea76b290ca323bd37452", "score": "0.57178307", "text": "protected function getHtmlControl()\r\n\t{\r\n\t\treturn parent::getHtmlControl()->type('radio');\r\n\t}", "title": "" }, { "docid": "caa8129d071f97dbe57eb108ca12a021", "score": "0.57132787", "text": "public function getTemplateSelector()\n {\n $result = [];\n \n $result[] = [\n 'text' => $this->__('Only item titles'),\n 'value' => 'itemlist_display.html.twig'\n ];\n $result[] = [\n 'text' => $this->__('With description'),\n 'value' => 'itemlist_display_description.html.twig'\n ];\n $result[] = [\n 'text' => $this->__('Custom template'),\n 'value' => 'custom'\n ];\n \n return $result;\n }", "title": "" }, { "docid": "b4dc193456e7ef8d2df509619b3c62d5", "score": "0.57114685", "text": "public function getMarkup($template = false)\n\t{\n\n\t\t$vars\t\t\t\t = $this->export();\n\t\t$vars['_unique_id']\t = uniqid();\n\n\t\t// we also want to know what asset this property belongs to\n\t\t$output = Helpers::callStatic($this->type, 'render', array($vars, $template));\n\t\tif (!$output)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "5fd19529b6df52c9da5bef03e8e18cf6", "score": "0.56956685", "text": "public function RenderControl ();", "title": "" }, { "docid": "9c148fd01463b95311af5236564fc88c", "score": "0.56928396", "text": "protected function GetTemplate()\n\t{\n\t\tif (isset($this->params['opml']) && ($this->params['opml'] === true)) {\n\t\t\treturn 'opml.tpl';\n\t\t} else if (isset($this->params['txt']) && ($this->params['txt'] === true)) {\n\t\t\treturn 'projectindex.tpl';\n\t\t}\n\t\treturn 'projectlist.tpl';\n\t}", "title": "" }, { "docid": "9f1197291e7f102a53107bfc7dc23167", "score": "0.5691624", "text": "public function createHelperHTML()\n {\n return new Html();\n }", "title": "" }, { "docid": "832b498ee11a74a56828a90ab2877dde", "score": "0.56865686", "text": "public function getTemplate()\n {\n return <<<'TEMP'\n<!DOCTYPE html>\n<html>\n <head>\n {{title}}{{meta}}\n </head>\n <body>\n \n </body>\n</html>\nTEMP;\n }", "title": "" }, { "docid": "f45d82de8371b4d1e49b1f3de981eedb", "score": "0.56854767", "text": "public function generate() {\n return '<input type=\"text\" class=\"tb\" name=\"' . $this->name . '\" id=\"' . $this->id() . '\" value=\"' . $this->value . '\"' . $this->format_attributes() .' />';\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "a2542a94a2955187a84393ac3c18377c", "score": "0.0", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'user_id' => 'required',\n 'old_shop_id' => 'required',\n 'new_shop_id' => 'required',\n ]);\n // dd($request->old_shop_id . ' = '. $request->new_shop_id);\n $usersql = StoreUser::find($request->user_id);\n $user_name = $usersql->name;\n \n $cominfo = new SalesVoid;\n $cominfo->user_id = $request->user_id;\n $cominfo->user_name = $user_name;\n $cominfo->old_shop_id = $request->old_shop_id;\n $cominfo->old_shop_name = $oldbranch_name;\n $cominfo->new_shop_id = $request->new_shop_id;\n $cominfo->new_shop_name = $newbranch_name;\n\n $cominfo->store_id=$this->sdc->storeID();\n $cominfo->branch_id=$this->sdc->branchID();\n $cominfo->created_by=$this->sdc->UserID();\n $cominfo->save();\n\n \n\n $this->sdc->log(\"Shop To Shop User Transfer Info\",$this->moduleName.\" Added Successfully.\");\n return redirect('shopToshopTrns')->with('status', 'Shop To Shop User Transfer Added Successfully!');\n }", "title": "" } ]
[ { "docid": "dcb5d67c26376fd57a5dc3977e13979f", "score": "0.72076565", "text": "public function store(Resource $resource, $tempResource);", "title": "" }, { "docid": "29f523253fa183bb58e06565b71660d4", "score": "0.70465356", "text": "public function store(ResourceStoreRequest $request)\n {\n $input = $request->all();\n $input['is_facility'] = $request->has('is_facility');\n\n $resource = Resource::create($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n flash('Resource \"'.$resource->name.'\" was created');\n\n return ($backUrl = session()->get('index-referer-url'))\n ? redirect()->to($backUrl)\n : redirect('/resources');\n }", "title": "" }, { "docid": "43692f9286169160bb1c60a601ad98b5", "score": "0.6790021", "text": "protected function storeResources()\n {\n $resources = $this->resources(['format' => 'json']);\n $this->resourceRepo->put($resources);\n }", "title": "" }, { "docid": "414a41005fac4c5124023387fb0ac54f", "score": "0.6785541", "text": "public function store(ResourceStoreRequest $request)\n {\n $resource = Resource::create($request->all());\n $resource->groups()->sync($request->get('groups'));\n\n flash('Resource was created');\n\n return redirect('/resources');\n }", "title": "" }, { "docid": "c8211f121a8daac5ecd303e9a47b19e5", "score": "0.675027", "text": "public function store(ResourceStoreRequest $request)\n {\n $this->data->resource = Resource::create($request->all());\n return $this->json();\n }", "title": "" }, { "docid": "2550c05736a0d6808eb726ba834a3af7", "score": "0.65642446", "text": "public function save()\n {\n if ($id = Input::get('id')) {\n $storage = Storage::find($id);\n }\n\n // Validation\n $validator = Validator::make($data = Input::all(), Storage::$rules);\n\n // Check if the form validates with success.\n if ($validator->passes()) {\n // Own?\n if (isset($storage) && $storage->isMine()) {\n // Save model\n $storage->update($data);\n // Message\n Flash::success('Storage saved successfully');\n } else {\n // Create model\n $storage = new Storage($data);\n // Asociate to current user\n Auth::user()->storages()->save($storage);\n // Message\n Flash::success('Storage created successfully');\n }\n\n // Redirect to resource list\n return Redirect::route('storages.index');\n }\n\n // Something went wrong\n return Redirect::back()->withErrors($validator)->withInput(Input::all());\n }", "title": "" }, { "docid": "ec6d262da21079d4f1969481774027a6", "score": "0.65576917", "text": "public function store(ResourceStoreRequest $request)\n {\n ResourceResource::withoutWrapping();\n\n $input = $request->all();\n\n $resource = Resource::create($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n return (new ResourceResource($resource))\n ->response()\n ->setStatusCode(201);\n }", "title": "" }, { "docid": "c47832a35d324942b82c153c36e19205", "score": "0.6528728", "text": "public function create($storage = null);", "title": "" }, { "docid": "7a008e03ec51a0b31adc684eaf2fd916", "score": "0.65134066", "text": "public function store(CreateStorageAPIRequest $request)\n {\n $input = $request->all();\n\n $storages = $this->storageRepository->create($input);\n\n return $this->sendResponse($storages->toArray(), 'Storage saved successfully');\n }", "title": "" }, { "docid": "c8c10c69f24ff56f5e9054d0271d55ee", "score": "0.6488161", "text": "protected function store()\n {\n if (!$this->id) {\n $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "98fadc36fd3a4194a25023de21dae9ff", "score": "0.6427309", "text": "public function save($resource);", "title": "" }, { "docid": "fa129c22fa10de6d1193110a7112a319", "score": "0.64101756", "text": "public function store(StoreResourceRequest $request)\n {\n $resource = new resource();\n $user = $request->user();\n if (!!$user->resources\n ->where('resource_name', $request->get('resource_name'))\n ->where('path', $request->get('path'))\n ->where('trashed', false)->count()) {\n throw ValidationException::withMessages([\n \"resource\" => [\"400006\"],\n ])->status(400);\n }\n $resource->resource_name = $request->get('resource_name');\n $resource->file = false;\n $resource->path = $request->get('path');\n if (!$resource->save()) {\n throw ValidationException::withMessages([\n \"resource\" => [\"500001\"],\n ])->status(500);\n }\n $user->resources()->attach($resource->id);\n\n return new ResourceResource(Resource::find($resource->id));\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.6375281", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63650924", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "5ca3b168620bb43c8e426b5b5e9b4164", "score": "0.6364329", "text": "public function store(Request $request)\n {\n $resource = new Resource;\n\n $resource->name = $request->name;\n $resource->description = $request->description;\n \n\n $resource->save();\n return redirect()->route('resources.show', [$resource->id]);\n }", "title": "" }, { "docid": "27c4a631f3e680f007d86149d1c453b3", "score": "0.63595706", "text": "private function store()\n\t{\n\t\t// Store the instance\n\t\t_MyCache::set($this->getServer(), $this->generateKey(), json_encode($this->aRecord));\n\n\t\t// Reset the changed flag\n\t\t$this->bChanged\t= false;\n\t}", "title": "" }, { "docid": "508f9936cc069ee7a710b93d12ee1beb", "score": "0.6346375", "text": "public function create(IResource $resource);", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "e3d0ccd4ada2dc88b7c57c5065e7e2e8", "score": "0.0", "text": "public function store(Request $request)\n {\n //\n }", "title": "" } ]
[ { "docid": "45903628ff69251019708b230944f6f0", "score": "0.6915523", "text": "public function store(StoreResourceRequest $request)\n {\n\n $data = $request->input();\n\n if ( empty($data['teacher_id']) ) {\n $data['teacher_id'] = null;\n }\n\n DB::transaction(function() use ($request, $data)\n {\n $resource = Resource::create($data);\n $uploadedFile = $request->file('file');\n\n $type = $uploadedFile->getClientOriginalExtension();\n $name = $resource->generateResourceName();\n $path = $resource->generateResourcePath();\n\n Storage::put(\"{$path}.{$type}\", file_get_contents($uploadedFile->getRealPath()));\n\n $file = File::create([\n 'resource_id' => $resource->id,\n 'name' => $name,\n 'type' => $type,\n 'url' => \"{$path}.{$type}\"\n ]);\n\n if ( !$resource || !$file ) {\n return redirect()->back()->with('error', 'Failed :( Try Again!');\n }\n });\n\n return redirect()\n ->route('home')\n ->with('info', 'Resource Uploaded. Pending of revision.');\n }", "title": "" }, { "docid": "3142727ee8880b6b9792726e4513dca0", "score": "0.680377", "text": "public function store()\n {\n $validation = new $this->resourceRequestValidation;\n $this->validate(request(), $validation->rules());\n DB::beginTransaction();\n try {\n $store = $this->repository->eloquentCreate($this->resourceCreateRequestInputs);\n if ($store) {\n Session::flash(\"success\", \" [ \". (!is_array($store->name) && $store->name ? $store->name : $store->name_val) .\" ] \" . __(\"main.session_created_message\"));\n } else {\n Session::flash(\"danger\", __(\"main.session_falid_created_message\"));\n }\n DB::commit();\n } catch (Exception $e) {\n DB::rollback();\n Session::flash(\"danger\", $e->getMessage());\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "8a450d988729c270cfacfb2daffbda8e", "score": "0.6761625", "text": "public function store(ResourceCreateRequest $request)\n {\n Resource::create([\n 'title' => $request->input('title'),\n 'description' => $request->input('description'),\n 'cat_id' => $request->input('category'),\n 'link' => $request->input('url'),\n 'user_id' => Auth::user()->id\n ]);\n return redirect(route('index'))->with('status', 'Resource Created Successfully');\n }", "title": "" }, { "docid": "a15cea6cc2c6f1b34e41fa10dc7a85e9", "score": "0.6512059", "text": "public function save()\n {\n $this->_storage->modify($this->id, $this->toHash(true));\n }", "title": "" }, { "docid": "8ee7e267114dc7aff05b19f9ebc39079", "score": "0.6424367", "text": "public function create($resource);", "title": "" }, { "docid": "7d031b8290ff632bab7fef6a00576916", "score": "0.6391937", "text": "public function store()\n\t\t{\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "2013cf53419c1746030f01635e54fbc5", "score": "0.6349437", "text": "public function storeAndNew()\n {\n $this->storeAndNew = true;\n $this->store();\n }", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
84161ba5ea6e0d2d442b49db2691be3d
///////////////////////////////// Get user record by login (username or email)
[ { "docid": "a1aa7b0558f6f1d344611f41174d67f2", "score": "0.77436703", "text": "function get_user_by_login($login)\n\t{\n\t\t$conditions = array(\n array('field'=>'user_name', 'math'=>'=', 'value'=>strtolower($login)), \n array('keyword' => 'OR','field'=>'user_email', 'math'=>'=', 'value'=>strtolower($login)));\n\n\t\t$myReturn = $this->myDb->simpleSelect(TABLE_USERS, \"*\", $conditions);\n\t\tif (isset($myReturn[0][TABLE_USERS])) return $myReturn[0][TABLE_USERS];\n\t\treturn NULL;\n\n\t}", "title": "" } ]
[ { "docid": "166c90d097095a751bec5cc9c1a349ba", "score": "0.74272877", "text": "private function getUserByEmail(){\n return User::model()->findByAttributes(array('email' => $this->loginForm->email));\n }", "title": "" }, { "docid": "7e05032eb594fc6aa660260528d3aab3", "score": "0.7367825", "text": "abstract function getUserByLogin($login);", "title": "" }, { "docid": "bd71c06e561c10288e2cfefe276ee1f1", "score": "0.72288543", "text": "public static function getUserByLogin($login) {\n // 1. Getting connection with DB\n $db = DB::connectToDB();\n\n // 2. Forming MySQL request\n $result = $db->prepare('SELECT login, password_encr FROM users WHERE login = :login');\n $result->bindParam(':login', $login, PDO::PARAM_STR);\n $result->execute();\n $result->setFetchMode(PDO::FETCH_ASSOC);\n\n // 3. Return user info if found\n return $result->fetch();\n }", "title": "" }, { "docid": "ce4a6fcfb93cfcaa3490932f441cfcb5", "score": "0.7107215", "text": "function get_user_by_login($login)\n\t{\n\t\treturn $this->users->get_user_by_login($login);\n\n\t}", "title": "" }, { "docid": "0594457d96dea7e782f84842abaef0fa", "score": "0.70870227", "text": "public function getUser(){\r\n\r\n\t\t$query = \"SELECT * FROM jf_admins WHERE email = '{$_SESSION['admin']}'\";\r\n\t\r\n\t\t$sql = $this->_connection->query($query);\r\n\r\n\t\t$result = $sql->fetchObject();\r\n\t\treturn $result;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "67e5a978b9a7b4da32020becd7752b9f", "score": "0.70435244", "text": "function login_with_email_address($username) {\n $user_username = null;\n $user = get_user_by('email', $username);\n $userDetails = $user->data;\n // print_r($userDetails->user_login);\n // exit;\n if (!empty($userDetails->user_login))\n $user_username = $userDetails->user_login;\n return $user_username;\n}", "title": "" }, { "docid": "1faa50f1aaf3135c10ff28e8c4eb63f9", "score": "0.7022992", "text": "function get_user_by_login($login, $password)\n {\n $this->db->select('users.id,users.full_name,users.login,users.role_id,users.is_super_admin,users.email');\n $this->db->from('users');\n $this->db->where('users.login', $login);\n $this->db->where('users.password', SHA1($password));\n $this->db->where('users.status', 'A');\n $query = $this->db->get()->row();\n return !empty($query) ? $query : false;\n }", "title": "" }, { "docid": "900c3de6ff78fc2528fd6cff6e608cf2", "score": "0.70172256", "text": "public function getByLogin($login)\n\t{\n\t\t$login = $this->db->quote($login);\n\t\t$query = \"SELECT * FROM user WHERE login=\".$login;\n\t\t// $res = mysqli_query($this->db, $query);\n\t\t$result = $this->db->query($query);\n\t\tif ($result)\n\t\t{\n\t\t\t// $user = mysqli_fetch_object($result, \"User\");\n\t\t\t$user = $result->fetchObject(\"User\");\n\t\t\tif ($user)\n\t\t\t{\n\t\t\t\treturn $user;\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new Exception(\"Utilisateur non existant\");\n\t\t}\n\t\telse\n\t\t\tthrow new Exception(\"Erreur interne\");\n\t}", "title": "" }, { "docid": "c7e1c9003ca65761e5bca8fb4fbd122f", "score": "0.69928545", "text": "public function getUserByEmail(){\n\t\t\t$stmt = $this->conn->prepare('SELECT * FROM users WHERE email = :email');\n\t\t\t$stmt->bindParam(':email', $this->email);\n\t\t\ttry{\n\t\t\t\tif($stmt->execute()){\n\t\t\t\t\t$user = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t}\n\t\t\t}catch(Exception $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t\treturn $user;\n\t\t}", "title": "" }, { "docid": "80de4d4f78ddb9e582c087c0b1456b00", "score": "0.6973912", "text": "function userLogin($email, $password){\n if (session_status() == PHP_SESSION_NONE) {\n \t\tsession_start();\n\t\t}\n $db=getDB();\n $result = $db->select(\"users\", [\n\t \"username\",\n\t \"email\"\n ], [\n\t \"email[=]\" => $email,\n \"password[=]\" => $password\n ]);\n if(sizeof($result)==0){\n return NULL;\n }\n return $result[0];\n \n }", "title": "" }, { "docid": "7ed5e6f6c130fd7816637c12dd08b7ee", "score": "0.68988746", "text": "public function getUserByEmail($email);", "title": "" }, { "docid": "7ed5e6f6c130fd7816637c12dd08b7ee", "score": "0.68988746", "text": "public function getUserByEmail($email);", "title": "" }, { "docid": "0af416b2bd5e6fada6a2c04eca91f9a1", "score": "0.6895119", "text": "protected static function identify($data) {\n extract(self::$fields);\n return Model::load(self::$userModel)->first(array(\n 'conditions' => array(\n $username => $data[$username],\n $password => call_user_func(self::$hash, $data[$password])\n )\n ));\n }", "title": "" }, { "docid": "7ddbcdae6cec0e895b8accbed22ba239", "score": "0.6863673", "text": "private function get_django_user()\n {\n $sessionid = $this->request->variable(\n $this->settings['cookie_name'], '', false,\n \\phpbb\\request\\request_interface::COOKIE);\n\n $query =\n \"SELECT u.username as username, u.email as email \".\n \" FROM users_user u, sessionprofile_sessionprofile sp\" .\n \" WHERE sp.session_key = '\" . pg_escape_string($sessionid) . \"' \" .\n \" AND u.id = sp.user_id\n AND u.is_active = True\";\n\n $query_id = pg_query($this->pg_session, $query);\n\n if (!$query_id) {\n throw new Exception(\"Could not check whether user was logged in: \" , pg_last_error());\n }\n\n $row = pg_fetch_array($query_id);\n if ($row) {\n return $row;\n }\n\n return null;\n }", "title": "" }, { "docid": "f104a2a573ef9517fe9f8adfb32704ec", "score": "0.6834113", "text": "public function get_user() {\n $openid = '1111111111';\n return $user = Db::table('user')->where('openid', $openid)->find(); \n }", "title": "" }, { "docid": "bcb03bbbd432639e3e65935f6e93b73d", "score": "0.68182003", "text": "function find_user($email){\n\t\t$this->db->query(\"SELECT \");\n\t}", "title": "" }, { "docid": "88d144fd0e18e85ff42cbe74556e81d7", "score": "0.68172175", "text": "function get_user($username, $password) {\n\t$username = mysql_real_escape_string ($username);\n\t$password = md5($password);\n\t\n\t// Get results\n\t$result = makequery(\"SELECT id, username, level FROM users WHERE username='$username' AND password='$password'\");\n\t\n\t$row = mysql_fetch_array($result);\n\t\n\tif ($row) {\n\t\treturn $row;\n\t} else {\n\t\treturn False;\n\t}\n\t\n}", "title": "" }, { "docid": "0fc48372a63e66a2852130b901a9d2a2", "score": "0.68160594", "text": "function user_find($login, $password)\n {\n // @var xDatabase $db\n return ENGINE::db()->selectRow('SELECT a.id as id, b.value as rights '\n .'from {{prefix}}_users as a left join {{prefix}}_right_users as b on a.rights=b.id where '\n .'a.name={{?}} and a.password={{?}};',$login,$password );\n }", "title": "" }, { "docid": "c2201617ed077aa14f4073c991982c23", "score": "0.6812808", "text": "public function getUser()\n {\n if ($this->_user === false) {\n if(strpos($this->username,\"@\")>0)\n {\n //邮箱登陆\n $this->_user = User::findOne(['user_email'=>$this->username]);\n }\n else\n {\n $this->_user = User::findOne(['user_login'=>$this->username]);\n }\n }\n return $this->_user;\n }", "title": "" }, { "docid": "79a3bf7877837e023d444ec8273f2b00", "score": "0.68127966", "text": "function login_with_email_address($username) {\n $user = get_user_by('email',$username);\n if(!empty($user->user_login))\n $username = $user->user_login;\n return $username;\n}", "title": "" }, { "docid": "bd0f32d100c515e2888ffa681bc4fd54", "score": "0.6806342", "text": "private function getUserByLogin($login_field, $login_name)\n {\n $user_row = \\App\\User::where($login_field, '=', $login_name)->first();\n\n if (!$user_row && !$this->create_user_if_not_exist) {\n throw new Exceptions\\DXCustomException(trans('errors.wrong_user_or_password'));\n }\n\n return $user_row;\n }", "title": "" }, { "docid": "58074f84f5923115ab8c04b658968201", "score": "0.6785632", "text": "public function get_login_user($data)\n {\n $query = $this->db\n ->select('user_id, first_name, last_name, user_name, email, user_image, isReset')\n ->where('email', $data['email'] )\n ->where('password', $data['password'])\n ->get('user');\n\n if ( $query->num_rows() > 0 )\n {\n $row = $query->row_array();\n return $row;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.67820585", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.67820585", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.67820585", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.67820585", "text": "public function getUser();", "title": "" }, { "docid": "2de22a2e2bb24504aaf12b939d8feab3", "score": "0.6780271", "text": "function user_for_auth ($username, $password) {\n return db_select('\n SELECT id, username, password\n FROM users\n WHERE username = ? AND password = ?',\n array($username, $password), true\n );\n}", "title": "" }, { "docid": "48816d628cf96bbf93f27aeaeea2afee", "score": "0.6774926", "text": "public function get_user()\n\t{\n\t\t$sql = \"SELECT * FROM user LIMIT 1\";\n\t\treturn $this->query($sql);\n\t}", "title": "" }, { "docid": "97efee6547082f2ba17178fce88ab72b", "score": "0.6772304", "text": "function getCurrentUser()\n{\n $pdo = getConnection();\n if (!isset($_SESSION[\"email\"])) {\n return fetchSpecificUser($pdo, \"email\", $_COOKIE[\"email\"]);\n }\n return fetchSpecificUser($pdo, \"email\", $_SESSION[\"email\"]);\n}", "title": "" }, { "docid": "de3de07f760205c1cab784fc25be856f", "score": "0.67596364", "text": "public function findByLogin($id) {\n\n\t \t$user = $this->model->whereEmail($id)->first();\n\n\t \t$this->resetModel();\n\t \treturn $this->parserResult($user);\n\t }", "title": "" }, { "docid": "8dbd7985af44bbfe9282f9f29285a559", "score": "0.67557573", "text": "function get_bus_app_user_by_username_pass($bus_app_user_name,$bus_app_user_password)\n {\n return $this->db->get_where('Bus_App_User',array('bus_app_user_name'=>$bus_app_user_name,'bus_app_user_password'=>$bus_app_user_password))->row_array();\n }", "title": "" }, { "docid": "8151d9af16507b14cff78792cb87f752", "score": "0.6747686", "text": "public function getSingleUser()\r\n {\r\n /* This function retrieves a single User from the Database corresponding to the id and/or email and returns an associative array containing all the results.*/\r\n\r\n if($this->id !== NULL)\r\n $query = \"SELECT * FROM $this->tableName WHERE ID = $this->id LIMIT 0, 1;\";\r\n else if($this->email !== NULL)\r\n $query = \"SELECT * FROM $this->tableName WHERE Email = '$this->email' LIMIT 0, 1;\";\r\n else\r\n {\r\n // * Demo query that will throw database error.\r\n $query = \"SELECT\";\r\n }\r\n\r\n $result = $this->dbConn->query($query);\r\n\r\n chkQuery($this->dbConn, $result);\r\n\r\n // When query is successful.\r\n\r\n if($result->num_rows > 0)\r\n {\r\n // User Found.\r\n $data = $result->fetch_assoc();\r\n\r\n // Assigning the user data.\r\n $this->id = $data[\"ID\"];\r\n $this->name = $data['Name'];\r\n $this->email = $data['Email'];\r\n $this->pass = $data['Password'];\r\n $this->isAdmin = $data['isAdmin'] == 1 ? true : false;\r\n\r\n return $data;\r\n\r\n }\r\n else\r\n {\r\n // User could not be found.\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "2f4b9f89dfa1199fe0e3dbad1355868d", "score": "0.6724481", "text": "function get_user($username, $password)\n {\n /*For Admin User*/\n $where = '(username=\"' . $username . '\" AND password=\"' . $password . '\")';\n $this->db->select(\"*\");\n $this->db->from(\"users\");\n $this->db->where($where);\n $query1 = $this->db->get();\n $num_rows1 = $query1->num_rows();\n\n if ($num_rows1 === 1) {\n $row1 = $query1->row();\n return $row1;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "e9cfb8ebd429d82bd074b91709705a1a", "score": "0.67155826", "text": "function user_login($username, $password) {\n\t$username = sanitize($username);\n\t$password = sha1($password);\n\tif (config('ServerEngine') !== 'OTHIRE')\n\t\t$data = mysql_select_single(\"SELECT `id` FROM accounts WHERE name='$username' AND password='$password';\");\n\telse\n\t\t$data = mysql_select_single(\"SELECT `id` FROM accounts WHERE id='$username' AND password='$password';\");\n\treturn ($data !== false) ? $data['id'] : false;\n}", "title": "" }, { "docid": "d9dd11c06232aedcc773a758309ec053", "score": "0.6700083", "text": "public function getUser($email,$password){\n global $db;\n $reqUsr = $db->fetch(\"SELECT * FROM users\n WHERE email = ? \n AND password = ?\",[$email,$password],false);\n return $reqUsr;\n }", "title": "" }, { "docid": "4d82a36d7d3831e9ec4b791b7c4a87f3", "score": "0.6696181", "text": "public function getUserByEmail() {\n\n // Open database connection\n $db = init_db();\n\n $req = $db->prepare( \"SELECT * FROM user WHERE email = ? AND activation IS NULL\" );\n $req->execute( array( $this->getEmail() ));\n\n // Close databse connection\n $db = null;\n\n return $req->fetch();\n }", "title": "" }, { "docid": "1e78b52c1ee01161bcfe28ee2bf9948d", "score": "0.6692683", "text": "function login($email, $password)\r\n {\r\n $sql = \"SELECT user_id FROM users WHERE email = :email AND password = :password\";\r\n\r\n $statement = $this->_dbh->prepare($sql);\r\n\r\n $statement->bindParam(':email', $email, PDO::PARAM_STR);\r\n $statement->bindParam(':password', $password, PDO::PARAM_STR);\r\n\r\n $statement->execute();\r\n\r\n $row = $statement->fetch(PDO::FETCH_ASSOC);\r\n\r\n global $f3;\r\n $f3->set('userID', $row['user_id']);\r\n return $row;\r\n }", "title": "" }, { "docid": "04f2d242cc492cc742bfedf3d23270e4", "score": "0.66862226", "text": "function getUser($filter=false){\n\t\t$strQuery=\"select username,phonenumber from users\";\n\t\tif($filter!=false){\n\t\t\t$strQuery=$strQuery . \" where $filter\";\n\t\t}\n\t\treturn $this->query($strQuery);\n\t}", "title": "" }, { "docid": "e79ba4fc508c995e19a0376bfedd0900", "score": "0.66805696", "text": "public function selectUser() {\n $username = $_POST['username'];\n $password = $_POST['password'];\n $sql = \"SELECT * FROM users WHERE username = :username \n AND password = :password\";\n $this->query($sql);\n $this->bind(':username', $username);\n $this->bind(':password', $password);\n return $this->fetchSingle();\n }", "title": "" }, { "docid": "7bab8cdf752c9d25f1d3fad1ffda70ac", "score": "0.6657852", "text": "public static function getUser() {\n\t\tif(isset($_SESSION['user_id'])) {\n\t\t\treturn User::findByID($_SESSION['user_id']);\n\t\t} else {\n\t\t\treturn static::loginFromCookie();\n\t\t}\n\t}", "title": "" }, { "docid": "350631167738bb87fb4c1017e1d5c5cd", "score": "0.6646606", "text": "public function finduser($request)\n {\n $useremail = $request['email'];\n $userpassword = $request['password'];\n //query which is used to fetch the details if it is a valid user\n $data = $this->db->query(\"select * from last where email='$useremail' And password='$userpassword' \")->row();\n return $data;\n }", "title": "" }, { "docid": "eaba9c84e0d54afb04063cf31db0a9f0", "score": "0.66380996", "text": "function getUserByEmail($email) {\r\n $result = mysql_query(\"SELECT * FROM persona WHERE EMAIL = '$email' LIMIT 1\");\r\n return $result;\r\n }", "title": "" }, { "docid": "65a646a1f2dcf22e29d4818be535f8af", "score": "0.6634401", "text": "function loadUserByUsername($username);", "title": "" }, { "docid": "2836118811c9ec4866b195f9f6c0227e", "score": "0.6633145", "text": "function GetCustomerLogindetail($comId,$email,$usertype='customer'){\r\n\t\tglobal $configTables,$Config;\t\r\n\t\tif(empty($comId) OR empty($email) OR empty($usertype))\r\n\t\treturn false;\r\n\t\t$sql=\"Select * FROM `company_user` WHERE 1 AND comId='$comId' AND user_name='$email' AND user_type='$usertype'\";\r\n\t\t$results=$this->get_results($sql);\r\n\t\tif(empty($results))\r\n\t\treturn false;\r\n\t\treturn $results[0];\r\n\t\t\r\n\t}", "title": "" }, { "docid": "9c16dcd83b54e02ea9c8091d5bb4683c", "score": "0.6625723", "text": "public function getByLogin($login)\n {\n return $this->query()\n ->where('email', $login)\n ->findOne();\n }", "title": "" }, { "docid": "fff4abb7acd072c383377f11377c8043", "score": "0.6625053", "text": "public function getUserByEmail($email){\n return $this->findOneBy(array('email' =>$email));\n }", "title": "" }, { "docid": "1ccca9611ef1046edb46b0d1b7c753d5", "score": "0.66245526", "text": "private function _getUserData() {\n\t\t$sql = \"SELECT * FROM rb_users WHERE (username = '$this->username' OR email = '$this->username') AND password = '$this->password' LIMIT 1;\";\n\t\t$qry = $this->pdo->query($sql);\n\n\t\t$this->data = $qry->fetch();\n\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "db37cfe843846ba9cc4526623b2b4b0b", "score": "0.6620243", "text": "function get_user($email) {\r\n\t\t$this->db->where ( 'user_email', $email );\r\n\t\t$query = $this->db->get ( 'user' );\r\n\t\treturn $query->result ();\r\n\t}", "title": "" }, { "docid": "73691087723b870b6131dc784ea80d0d", "score": "0.6615438", "text": "function get_user_login()\n{\n if (!is_sharp_user()) {\n return null;\n }\n\n return sharp_auth_guard()->user()->{get_user_login_field_name()};\n}", "title": "" }, { "docid": "52f59bbc8091cdbe01fb023bf39a51af", "score": "0.6615334", "text": "public function findUserByEmailAndPassword(){\n\n\t\t\t$email = $this->input->post('email');\n\t\t\t$password = $this->input->post('password');\n\t\t\t$status = 1;\n\n\t\t\t$hashedPassword = hash('md5', $password);\n\n\t\t\t$this->db->where('email', $email);\n\t\t\t$this->db->where('password', $hashedPassword);\n\t\t\t$this->db->where('status', $status);\n\t\t\t$this->db->select('user_id, role');\n\t\t\t$query = $this->db->get('login');\n\n\t\t\treturn $query->row_array();\n\n\t\t}", "title": "" }, { "docid": "dccd68e913010f5ed624a476c5262daf", "score": "0.66051334", "text": "public function read_user_information($username) {\r\n\t\t$condition = \"username =\" . \"'\" . $username . \"'\";\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('user_login');\r\n\t\t$this->db->join('employees','employees.eis = user_login.username');\r\n\t\t$this->db->where($condition);\r\n\t\t$this->db->limit(1);\r\n\t\t$query = $this->db->get();\r\n\t\tif ($query->num_rows() == 1) {\r\n\t\t\treturn $query->result();\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "7c0bca7a80cafa2ba64b62901460494c", "score": "0.660447", "text": "function getUser($user){\r\n global $database;\r\n \r\n $getUser = $database -> get(\"user\", [\"username\", \"email\", \"name\", \"thumb\", \"date_add\", \"date_update\"], [\r\n \"username\" => \"$user\"\r\n ]);\r\n \r\n return $getUser;\r\n}", "title": "" }, { "docid": "1cc0c169c04f2a60a02ee78ac4e3f0c9", "score": "0.6598527", "text": "public function getUserByLogin($login) :User\n {\n $query = $this->pdo->prepare(\"SELECT * FROM users WHERE login=:login\");\n $query->execute(array('login'=>$login));\n $row = $query->fetchALL(PDO::FETCH_ASSOC);\n $user = new User();\n $user->fromArray($row[0]);\n return $user;\n }", "title": "" }, { "docid": "68efe0c55f934d29ded45f522a6e3335", "score": "0.6598308", "text": "public function check_login_employer(){\n\t\treturn $this->db\n\t\t->where(\"com_email\",$this->input->post(\"email\"))\n\t\t->where(\"com_password\",md5($this->input->post(\"password\")))\n\t\t->get(\"tbl_company\");\t\n\t}", "title": "" }, { "docid": "85866b572ab85d39c47fac9f1ecda71c", "score": "0.6594921", "text": "public function get_user_by_name_or_email(string $username, string $email) {\n if ($username!='') {\n $query = $this->db->where('username',$username)->where('oauth2_login',null)->get('user'); //TODO: Test this\n return $query->row();\n }\n \n $query = $this->db->where('email',$email)->where('oauth2_login',null)->get('user'); //TODO: Test this\n $count = $query->num_rows();\n\n if ($count===1)\n return $query->row();\n else if ($count>1)\n return $query->result();\n else\n return null;\n }", "title": "" }, { "docid": "4468e1c080c925d59a56db5675c9c510", "score": "0.65851796", "text": "function get_user($username){\n $db = new Connect();\n $log = new Logger();\n $db->enableExceptions(true);\n $query = 'SELECT username, password FROM \"users\" WHERE username = :username;';\n try {\n $statement = $db->prepare($query);\n $statement->bindValue(':username', $username, SQLITE3_TEXT);\n $result = $statement->execute();\n $output = $result->fetchArray();\n return $output;\n }\n catch (Exception $exception){\n $output = \"Error: $exception\";\n $log->error($output);\n return false;\n }\n }", "title": "" }, { "docid": "b672ad5b76d9d2c349ac58f724529ccd", "score": "0.65757555", "text": "public function getUser ($login) {\n\t\tif ( strlen($login) < 1 ) {\n\t\t\tthrow new InvalidArgumentException(\"Login can't be empty\");\n\t\t}\n\t\t$client = new couchClient( $this->client->dsn() , $this->usersdb, $this->client->options());\n\t\treturn $client->getDoc(\"org.couchdb.user:\".$login);\n\t}", "title": "" }, { "docid": "573a136f3399c1540210611eec7e5095", "score": "0.655884", "text": "public function login($data)\n {\n $res = $this->get(\"SELECT * FROM $this->table WHERE email=:email\", $data);\n\n return $res;\n }", "title": "" }, { "docid": "9d391ec8da4aa448263b00ff61275eaa", "score": "0.6555686", "text": "function get_user($id){\n\t$user = jcms_db_get_row(\"SELECT * FROM \".$GLOBALS['users_tbl_name'].\" WHERE ID='\".$id.\"' OR user_name='\".$id.\"' OR email_address='\".$id.\"' OR activation_code='\".$id.\"'\");\n\tif(count($user) > 0){\n\t\treturn $user;\n\t}else{\n\t\treturn;\n\t}\n}", "title": "" }, { "docid": "d336c33b05e7d7edb9646e71cde96395", "score": "0.65534663", "text": "public function getUserByEmailAndPassword($email, $password) {\n $results = mysql_query(\"SELECT * FROM mechanics WHERE ('email','password') = ('$email','$password')\");\n $results = mysql_query(\"SELECT * FROM users WHERE ('email','password') = ('$email','$password')\");\n $result = mysql_fetch_array($results);\n return $result;\n\n }", "title": "" }, { "docid": "285c84329b175ce8414e4e58ec480abe", "score": "0.6548073", "text": "public function getUserDetails($email){\n return $this->db->find(\"SELECT * FROM \".DB_PREFIX.\"adminusers WHERE email = '\".$email.\"' \");\n }", "title": "" }, { "docid": "23b8831890314af04b6e48e52cc8cbf7", "score": "0.65400594", "text": "protected function getUser()\n {\n if ($this->_user === null) {\n $this->_user = Users::findOne(['user_name'=>$this->username]);\n\n if (empty($this->_user)) {\n $this->_user = Users::findOne([\n 'mobile_phone' => $this->username,\n ]);\n }\n\n if (!empty($this->_user) && !Yii::$app->authManager->checkAccess($this->_user->user_id, '/site/index')) {\n Yii::warning(\"$this->username 尝试登录,缺少权限\", __METHOD__);\n $this->_user = null;\n }\n }\n\n return $this->_user;\n }", "title": "" }, { "docid": "c582f8551bc80f50d314868d44e34994", "score": "0.6530749", "text": "public function getUser()\n {\n return User::findOne(['username' => $this->username]);\n }", "title": "" }, { "docid": "866e7e45f5c99fbf48119b350b3e0e86", "score": "0.65270007", "text": "public function getUser() {\n $result = Yii::app()->db->createCommand()->from('user')->where('user_id=:id OR username=:id', array(':id' => $this->username))->queryRow();\n return $result;\n }", "title": "" }, { "docid": "8db8d2eaa86492560cc404580b309357", "score": "0.6524055", "text": "function get_user_by_email($email)\n\t{\n\t\t$conditions = array(\n\t\t\t\t\t\tarray('field'=>'user_email', 'math'=>'=', 'value'=>strtolower($email)), \n\t\t\t\t\t\tarray('keyword' => 'AND','field'=>'user_delete_flag', 'math'=>'=', 'value'=>0));\n\n\t\t$myReturn = $this->myDb->simpleSelect(TABLE_USERS, \"*\", $conditions);\n\t\tif (isset($myReturn[0][TABLE_USERS])) return $myReturn[0][TABLE_USERS];\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "4e273f4bf2e597cda8ebb8fe0dbc9ab6", "score": "0.65190834", "text": "function authUser() {\n\treturn $_SESSION['login'];\n}", "title": "" }, { "docid": "5f193ae1b817866dffea85cfb1e5b35e", "score": "0.6513295", "text": "function getUserByEmail($email)\n {\n $sql = \"SELECT * FROM user WHERE Email = '$email'\";\n return $this->db->query($sql);\n }", "title": "" }, { "docid": "ccb195977a7bf5444e393afb3df3237e", "score": "0.65127355", "text": "public function getUser()\n {\n if ($this->_user === false) {\n $this->_user = $this->loginProvider->findByUsername($this->username);\n }\n\n return $this->_user;\n }", "title": "" }, { "docid": "91e842f50a25c45eee3982f6e9736297", "score": "0.6512272", "text": "function get_user_by_email($email) {\n\t\tglobal $connection;\n\t\t$safeEmail=prep_sql_string($email);\n\t\t$query=\"SELECT * \";\n\t\t$query.=\"FROM users \";\n\t\t$query.=\"WHERE email='{$safeEmail}' LIMIT 1\";\n\n\t\t$userSet=mysqli_query($connection,$query);\n\t\t//I am not logging errors for invalid email authentications\n\t\tif($userArray = mysqli_fetch_assoc($userSet)) {\n \t\t\treturn $userArray;\n\t\t}else {\n\t\t\treturn null;\t\n\t\t}\n}", "title": "" }, { "docid": "78b35ed6b1db46e7a1321ccad7e0b045", "score": "0.6506395", "text": "function getUser($email, $password){\n // geef gebruiker-object met $email en $wachtwoord EN actief = 1\n $this->db->where('email', $email);\n $this->db->where('actief', 1);\n $query = $this->db->get('gebruiker');\n \n if($query->num_rows() == 1){\n $user = $query->row();\n // controleren of het wachtwoord overeenkomt\n if(password_verify($password, $user->wachtwoord)){\n return $user;\n }else{\n return null;\n }\n }else{\n return null;\n }\n }", "title": "" }, { "docid": "22bfb8debb463c85e58c7406c1b4ce1a", "score": "0.65018207", "text": "public static function findUser($account)\n {\n\t\tif(is_null($account)){\n \tLog::write('error', 'findUser: account is null');\n\t\t\treturn;\n\t\t}\n\t\t/*\n\t\t\tURL: /users.json\n\t\t\tResponse JSON:\n \t\t\t{\"users\":[\n \t\t\t{\n \t\t\t\"id\":22,\n \t\t\t\"login\":\"CB_AKIRA\",\n \t\t\t\"firstname\":\"\\u30a2\\u30ad\\u30e9\",\n \t\t\t\"lastname\":\"CB_\",\n \t\t\t\"mail\":\"gkusumoto@gmail.com\",\n \t\t\t\"created_on\":\"2013-03-11T17:41:59Z\",\n \t\t\t\"last_login_on\":\"2018-06-01T23:29:12Z\"\n \t\t\t},\n\t\t\t\t:\n\t\t*/\n\n Log::write('info', 'findUser account='.$account);\n\n\t\t// status ... 1=active, 2=registering, 3=locked\n\t\t$json = RedmineUtil::get('users.json?name='.$account);\n\t\tif(is_null($json)){\n\t\t\treturn null;\n\t\t}\n\n\t\tforeach($json['users'] as $user){\n\t\t\t//Log::write('debug', 'user : '.implode(\" \",$user));\n\t\t\tif(strcmp($account, $user['login']) == 0){\n\t\t\t\tLog::write('info', 'user found: '.implode(\",\", $user));\n\t\t\t\treturn $user;\n\t\t\t}\t\n\t\t}\t\n\n\t\t// when user is not found with status=1, re-find with status=3\n\t\t$json = RedmineUtil::get('users.json?name='.$account.'&status=3');\n\t\tif(is_null($json)){\n\t\t\treturn null;\n\t\t}\n\t\tforeach($json['users'] as $user){\n\t\t\t//Log::write('debug', 'user : '.implode(\" \",$user));\n\t\t\tif(strcmp($account, $user['login']) == 0){\n\t\t\t\tLog::write('info', 'user found (locked user): '.implode(\",\", $user));\n\t\t\t\treturn $user;\n\t\t\t}\t\n\t\t}\n\n\t\tLog::write('info', 'user not found: '.$account);\n\t\treturn null;\n }", "title": "" }, { "docid": "a62a93f94c55e97af9994d9b2000169d", "score": "0.6499301", "text": "public function logInUser($username,$password){\n $sql = \"SELECT username, email, displayname, picture, type FROM user WHERE username = :username AND password = :password\";\n $result = $this->db->read($sql,array(\n ':username' => $username,\n ':password' => md5($password)\n ));\n\n if($result){\n echo json_encode($result);\n }elseif(!$result){\n echo json_encode(\"Invalid Username or Password\"); \n }\n }", "title": "" }, { "docid": "51ba94507d81ebaf27afb8dd83d7c3dc", "score": "0.6498292", "text": "function getUserName($username){\n $sql = 'SELECT `id`, `username`, `avatar` FROM Users WHERE email=:username OR username=:username1';\n $result = $this->dbconn->prepare($sql);\n $result->bindValue(':username', $username);\n $result->bindValue(':username1', $username);\n $result->execute();\n $entry = $result->fetch();\n return $entry;\n }", "title": "" }, { "docid": "f9b3ffa7a6ae8ce9faef50347726cd10", "score": "0.6497302", "text": "function find_user_by_username($username) \n\t{\n\t\tglobal $db;\n\t\t\n\t\t$sql = \"SELECT * \";\n\t\t$sql .= \"FROM users \";\n\t\t$sql .= \"WHERE username = :username \";\n\t\t$sql .= \"LIMIT 1\";\n\t\ttry\n\t\t{\n\t\t\t$statement = $db->prepare($sql);\n\t\t\t$statement->bindParam(\":username\", $username);\n\t\t\t$statement->execute();\n\t\t\t$user = $statement->fetch();\n\t\t}\n\t\tcatch (PDOException $error)\n\t\t{\n\t\t\techo \"ERROR: \" . $error->getMessage();\n\t\t}\n\t\tif($user) \n\t\t{\n\t\t\treturn $user;\n\t\t} \n\t\telse \n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "6c22d712e9a3708bdde569b0374daec1", "score": "0.64949876", "text": "public function getByEmailAndPassword($email, $password){\n\t\t$hash = md5($password);\n\t\t$result=mysql_query(\"SELECT * FROM user WHERE email='$email' and password='$hash'\");\n\t\tif($result){/*ensure query success*/\n\t\t\tif($row = mysql_fetch_array($result)){/*ensure record*/\n\t\t\t\t$vo = new user($row['username'],$row['password'],$row['email']);\n\t\t\t\t$vo->uid = $row['user_id'];\n\t\t\t\treturn $vo;\n\t\t\t}\n\t\t}\n\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "cc01b5f76d937e90f4dee5892e6449c4", "score": "0.64945227", "text": "public function getUserByNickname(string $nickname);", "title": "" }, { "docid": "d3b3e1dc18c7e2d5b1d398f65470da4d", "score": "0.6494463", "text": "public function getUser() {\n\t\tif ($this->loginData ['status'] === 'login') {\n\t\t\tif ($this->isImportedLoginName ()) {\n\t\t\t\t$user = array ();\n\t\t\t\t$user ['authenticated'] = FALSE;\n\t\t\t\tt3lib_div::devLog('invalid login detected: '.$this->username, 'rpx',2);\n\t\t\t\treturn $user;\n\t\t\t}\n\t\t\tif ($this->isRPXResponse ()) {\n\t\t\t\ttry {\n\t\t\t\t\t$this->parseRuntimeConfig ();\n\t\t\t\t\t$this->checkDomain();\n\t\t\t\t\t$responseXml = $this->getConnector ()->auth_info ( $_POST ['token'] );\n\t\t\t\t\t$profile = $this->getFactory ()->createProfile ( $responseXml );\n\t\t\t\t\t$user = $this->autoCreateUser ( $profile );\n\t\t\t\t\t$user ['authenticated'] = TRUE;\n\t\t\t\t\treturn $user;\n\t\t\t\t} catch (Exception $e ) {\n\t\t\t\t\tt3lib_div::devLog('rpx Fatal error: '.$e->getMessage(), 'rpx',2);\n\t\t\t\t\t$this->redirectError();\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "ba6cc5f8cb28a879495b2c860b3ad154", "score": "0.6493299", "text": "function getUser($username) {\n\t\n\t$sql = \"SELECT * FROM users WHERE username='$username'\";\n\ttry {\n\t\t$db = Db::getInstance(); \n\t\t$stmt = $db->prepare($sql);\n $stmt->execute();\n $user = $stmt->fetchObject(); \n return $user;\n\t} catch(PDOException $e) {\n\t\treturn $e->getMessage(); \n\t}\n}", "title": "" }, { "docid": "9c89a2f9d9474f52ce1d95a8f2d768e8", "score": "0.6492681", "text": "public static function identifyUser()\n\t{\n\t\tif( Yii::app()->user->name == 'Guest')\n\t\t\treturn false;\n\t\t$user = self::findByEmail( Yii::app()->user->name );\n\t\tif( $user === FALSE )\n\t\t\tYii::app()->user->logout();\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "061f3db28469f6d559d2947db635cbd7", "score": "0.6485485", "text": "function get_user($id_or_email, $format = OBJECT) {\n global $wpdb;\n\n if (empty($id_or_email))\n return null;\n\n// To simplify the reaload of a user passing the user it self.\n if (is_object($id_or_email)) {\n $id_or_email = $id_or_email->id;\n } else if (is_array($id_or_email)) {\n $id_or_email = $id_or_email['id'];\n }\n\n $id_or_email = strtolower(trim($id_or_email));\n\n if (is_numeric($id_or_email)) {\n $r = $wpdb->get_row($wpdb->prepare(\"select * from \" . NEWSLETTER_USERS_TABLE . \" where id=%d limit 1\", $id_or_email), $format);\n } else {\n $r = $wpdb->get_row($wpdb->prepare(\"select * from \" . NEWSLETTER_USERS_TABLE . \" where email=%s limit 1\", $id_or_email), $format);\n }\n\n if ($wpdb->last_error) {\n $this->logger->error($wpdb->last_error);\n return null;\n }\n return $r;\n }", "title": "" }, { "docid": "30bba2ad83af58337bbbd7a38817bf11", "score": "0.6483423", "text": "public function getUser()\n {\n if ($this->_user === false) {\n $user = User::findByUsername($this->login);\n if ($user !== null) {\n $this->setUser($user);\n } else {\n $user = User::findByEmail($this->login);\n $this->setUser($user);\n }\n }\n return $this->_user;\n }", "title": "" }, { "docid": "1a9a482a6a2cdeac69f2cc93f745551d", "score": "0.6482824", "text": "public function getUserByEmail($email){\n return $this->adminDao->getUserByEmail($email);\n }", "title": "" }, { "docid": "e27cac7f7bd3941621ded54a70085f1d", "score": "0.64761174", "text": "public function getLogin();", "title": "" }, { "docid": "f17e440ca783fa967ff0b8a6ccbb242b", "score": "0.64755064", "text": "function login($data) {\r\n $db = Database::getInstance();\r\n\r\n if(!isset($data['email']) || !isset($data['senha'])) {\r\n return false;\r\n }\r\n\r\n $user = $db->getList($this->table, '*', ['email' => $data['email']]);\r\n \r\n if(isset($user[0]['id'])) {\r\n if(password_verify($data['senha'] , $user[0]['senha'])) {\r\n return $user[0];\r\n }\r\n }\r\n\r\n return false;\r\n\r\n }", "title": "" }, { "docid": "621f91571fa035c8acf9ac91f3acd99d", "score": "0.64750046", "text": "function get_user_by_username($username)\n {\n /*For Admin User*/\n $where = '(username=\"' . $username . '\")';\n $this->db->select(\"*\");\n $this->db->from(\"users\");\n $this->db->where($where);\n $query1 = $this->db->get();\n $num_rows1 = $query1->num_rows();\n\n if ($num_rows1 === 1) {\n $row1 = $query1->row();\n return $row1;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "c9f58e37f43fc0cfabd48c48efc9c876", "score": "0.64695305", "text": "public function findUser()\n\t{\n\t\tif ($this->validate()) {\n\t\t\tif ($user = Users::findByUsername($this->username)) {\n\t\t\t\t$user->setTokenRetrievePassword();\n\t\t\t\treturn $user;\n\t\t\t}\n\n\t\t\t$this->addError('username', 'Такого пользователя не существует.');\n\t\t\treturn null;\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "d49fc2450d2951b6bf7fa402f47d7b69", "score": "0.646607", "text": "function login($email, $password) {\r\n $select = $this->db->prepare('select * from users where email=:email');\r\n $select->bindParam(':email', $email, PDO::PARAM_STR);\r\n $select->execute();\r\n \r\n $row = $select->fetch(PDO::FETCH_ASSOC);\r\n if (isset($row) && password_verify($password, $row['password'])) {\r\n return $row['user_id'];\r\n } else {\r\n return NULL;\r\n }\r\n }", "title": "" }, { "docid": "5d98037c379e95891ccdd3f1d91cf611", "score": "0.6465968", "text": "function get_user_by_email($table,$email){\n $pdo=new PDO(\"mysql:host=localhost; dbname=test\",\"root\",\"root\");\n $sql=\"SELECT * FROM $table WHERE email=:email\";\n $statement=$pdo->prepare($sql);\n $statement->execute([\n 'email'=>$email\n ]);\n $result=$statement->fetch(PDO::FETCH_ASSOC);\n return $result;\n }", "title": "" }, { "docid": "4cebcf4831749ecdba348c72ae5a87aa", "score": "0.6453879", "text": "private function _get_user_info()\n {\n $email = $this->input->post('email');\n $password = $this->input->post('password');\n $password = md5($password);\n\n $where = array('email' => $email , 'password' => $password);\n $user = $this->user_model->get_info_rule($where);\n return $user;\n }", "title": "" }, { "docid": "5065ff3ab30647ec12bccd1b770aca2f", "score": "0.6453375", "text": "function manpowerLoginByUsernameFieldInUserMethod_HS()\n {\n \treturn \"email\";\n }", "title": "" }, { "docid": "61980e0ac088a74fe02fe690b5ac3087", "score": "0.6445129", "text": "public function findUser($table, $email) {\n $sql = 'SELECT * FROM '. $table .' WHERE email = :email';\n $stmt = $this->conn->prepare($sql);\n $stmt->bindValue(':email', $email);\n $stmt->execute();\n return $stmt->fetch(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "ca83be7f6486bd163d51b8ad2ae38ae3", "score": "0.6443582", "text": "function getUserAccount($email)\n\t{\n\t\tglobal $connect;\n\t\t$sql = \"SELECT * FROM USER WHERE EMAIL='\".$email.\"'\";\n\t\t$req = $connect->prepare($sql);\n\t\t$req->execute() or die(print_r($connect->erroInfo()));\n\t\twhile ($User = $req->fetch()) {\n\t\t\t$this->tabCurrentUser = ['id' => $User['ID'],'firstname' => $User['FIRSTNAME'],'lastname' => $User['LASTNAME'],'city' => $User['CITY'],'address' => $User['ADDRESS'],'postalcode' => $User['POSTALCODE'],'country' => $User['COUNTRY'],'email' => $User['EMAIL'],'password' => $User['PASSWORD'],'birth' => $User['BIRTH']];\n\t\t}\n\t\treturn $this->tabCurrentUser;\n\t}", "title": "" }, { "docid": "183fa21f83a461ad64cac6e88d9371a4", "score": "0.64416194", "text": "function login($username, $password) {\r\n $select = $this->db->prepare('select * from users where username=:username');\r\n $select->bindParam(':username', $username, PDO::PARAM_STR);\r\n $select->execute();\r\n \r\n $row = $select->fetch(PDO::FETCH_ASSOC);\r\n if (isset($row) && password_verify($password, $row['password'])) {\r\n return $row['username'];\r\n } else {\r\n return NULL;\r\n }\r\n }", "title": "" }, { "docid": "82293e4f9b786e02dbd2b9e3f2666346", "score": "0.64392114", "text": "public function loginFetch($email, $password) {\n\t\t$query = $this->db->get_where('users', array('email' => $email, 'status' => 'Allow'));\n\t\t\n\t\tif ($query->num_rows()) {\n\t\t\t$rowArray = $query->row_array();\n\t\t\t\n\t\t\t$hash = hash('sha256', $rowArray['salt'] . $password);\n\t\t\t\n\t\t\tif ($rowArray['hash'] == $hash) {\n\t\t\t\t$theUser = new User();\n\t\t\t\t$theUser->createObject($rowArray);\n\t\t\t\treturn $theUser;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "4b2822bccbefc940c5d7616fde52c7df", "score": "0.64313006", "text": "public function getUserLogin($data) {\n $email = $data['email'];\n $password = $data['password'];\n $isAdmin = $data['isAdmin'];\n\n if($isAdmin == true) {\n $query = \"SELECT pa.AdminId id,\n null tutorid, UUID() guiid, 1 isAdmin\n FROM proAdministrator pa WHERE pa.EmailAddress LIKE '\".$email.\n \"' AND pa.Password LIKE '\".$password.\"' LIMIT 1;\";\n } else {\n $query = \"SELECT s.StudentId id, t.TutorId, UUID() guiid,\n CASE WHEN t.TutorId IS null THEN 0 else 1 END isTutor, 1 isStudent\n FROM proStudent s LEFT JOIN proTutor t ON s.StudentId = t.StudentId\n WHERE s.EmailAddress LIKE '\".$email.\n \"' AND s.Password LIKE '\".$password.\"' LIMIT 1;\";\n }\n\n $result = $this->conn->query($query) or die($this->conn->error . __LINE__);\n if ($result->num_rows > 0) {\n $r = array();\n return $r = $result->fetch_assoc();\n } else return;\n }", "title": "" }, { "docid": "0aeed30765a3cd76f088626e1d79ed3a", "score": "0.64293206", "text": "function getUserData($c, $u)\n {\n //Query database get the data for the user (will use sessions later)\n $sql = \"SELECT * FROM user WHERE username = '\" . $u . \"'\";\n $resultRow = mysql_query($sql, $c);\n\n //Get the row with the user's data\n $user = mysql_fetch_array($resultRow);\n\n //If there is no user with the inputted name in the database\n if ($user == null)\n {\n //echo 'no user';\n return false;\n }\n else\n {\n return $user;\n }\n }", "title": "" }, { "docid": "cc4b2a1961cb8efb352b49f7c3336dd8", "score": "0.64265186", "text": "public function login($param)\n\t{\n\t\t# get user info\n\t\t$bind = array(\n \t\t\t\":search\" => \"%\".$param['email']\n\t\t);\n\t\t$user_info = $this->db->select('users', 'email LIKE :search', $bind);\n\t\tif (!empty($user_info[0])) {\n\t\t\t$user_info = $user_info[0];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\t//echo \"<pre>\"; print_r($param); echo \"</pre>\";\n\n\t\t# password check\n\t\tif ($user_info['password'] == md5($param['password'])) {\n\t\t\t# 渡す情報からパスワードを除く\n\t\t\tunset($user_info['password']);\n\t\t\treturn $user_info;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9eaaa558396136bbd72cfd2d5bdca39c", "score": "0.6423482", "text": "public function get_user_by_identity($identity)\n\t{\n\t\treturn $this->ci->ion_auth_model->get_user_by_identity($identity)->row();\n\t}", "title": "" }, { "docid": "e16284328e8110c3973ecd54622ce744", "score": "0.6422973", "text": "function user()\n{\n\t$CI =& get_instance();\n\t$user = $CI->db->get_where('tbl_user',[\n\t\t'id_user' => $CI->session->userdata('id_user'),\n\t])->row();\n\treturn $user;\n}", "title": "" }, { "docid": "da2f920acc1880955f9fceb5fd6ce952", "score": "0.64210933", "text": "function login($useremail, $userpassword)\n\t\t\t{\n\t\t\t$query\t= \"select * from tbl_user where user_email = \".$useremail.\" and user_password = \".$userpassword.\"\";\n\t\t\t\t$rs\t\t= mysql_query($query);\n\t\t\t\t$row\t= mysql_fetch_array($rs);\n\t\t\t\t\n\t\t\t\treturn ($row);\n\t\t\t}", "title": "" } ]
dc066d0ddd68ae7484e76483fad43894
/ Purpose : To handle General Setting Functions To update the general settings details
[ { "docid": "5670d516b77c248c30fffa7a48e114b2", "score": "0.65417653", "text": "public function general_setting_update($gen_settings, $id)\n{\n\n \n\n $columns = '';\n $condition = '';\n if($gen_settings != '' && $id != '')\n {\n $columns = \"product_logo = '\".trim($gen_settings['product_logo']).\"', favicon = '\".trim($gen_settings['favicon']).\"', product_title = '\".trim($gen_settings['product_title']).\"', contact_person_name = '\".trim($gen_settings['contact_person_name']).\"', contact_person_email_id = '\".trim($gen_settings['contact_person_email_id']).\"', website = '\".trim($gen_settings['website']).\"', address ='\".trim($gen_settings['address']).\"', country = '\".trim($gen_settings['country']).\"', state = '\".trim($gen_settings['state']).\"', city = '\".trim($gen_settings['city']).\"', pincode = '\".trim($gen_settings['pincode']).\"', sgst = '\".trim($gen_settings['sgst']).\"', cgst = '\".trim($gen_settings['cgst']).\"', date_format = '\".trim($gen_settings['date_format']).\"', gst_no = '\".trim($gen_settings['gst_no']).\"', cin_no = '\".trim($gen_settings['cin_no']).\"', lead_replies_max = '\".trim($gen_settings['max_reply']).\"', lead_unattend_minimum_duration = '\".trim($gen_settings['min_duration']).\"' , smtp_host_name = '\".trim($gen_settings['smtp_host_name']).\"' , smtp_user_name = '\".trim($gen_settings['smtp_user_name']).\"', smtp_password = '\".trim($gen_settings['smtp_password']).\"'\";\n\n $condition = ' general_setting_id = \"'.$id.'\"';\n $result = common_update_values($columns, 'general_settings', $condition);\n\n }\n else\n {\n $result = false;\n }\n return $result;\n}", "title": "" } ]
[ { "docid": "62d44d5d8547aa2d59ee6bda7ce263ee", "score": "0.7457857", "text": "abstract protected function settings();", "title": "" }, { "docid": "028bb8cf12aa05c43dcc9fb2c3c00835", "score": "0.7378496", "text": "public function general_settings_page() {\r\n\t\t\trequire_once CP_V2_BASE_DIR . 'admin/general-settings.php';\r\n\t\t}", "title": "" }, { "docid": "b74124c57bf1b670a3c60885a4fef3c5", "score": "0.72805154", "text": "protected function _setting_handle() {}", "title": "" }, { "docid": "024b196a600b0c09c68c614ae1b56a3e", "score": "0.7190325", "text": "private function settings()\n {\n }", "title": "" }, { "docid": "6eb5625829c1147bc7b4937b5c395be0", "score": "0.71117306", "text": "public function update_some_info() {\n\t\tupdate_option(\n\t\t\t'TSB_settings',\n\t\t\t$this->plugin_settings\n\t\t);\n//\t\tupdate_option(\n//\t\t\t'plugin_name_prefix_plugin_setting_option2',\n//\t\t\t$this->plugin_setting_option2\n//\t\t);\n//\t\tupdate_option(\n//\t\t\t'plugin_name_prefix_plugin_setting_option3',\n//\t\t\t$this->plugin_setting_option3\n//\t\t);\n//\t\tupdate_option(\n//\t\t\t'plugin_name_prefix_plugin_setting_option4',\n//\t\t\t$this->plugin_setting_option4\n//\t\t);\n\t}", "title": "" }, { "docid": "6ce10e4b55a1e0ee06d20f98b010916c", "score": "0.70966816", "text": "function settings(){\n\t \n }", "title": "" }, { "docid": "aa66b3fd47feb5e182a8ad36fc05dbd3", "score": "0.70832384", "text": "function m_featureSettings() {\n\t\t#INTIALIZING TEMPLATES\n\t\t\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\", GRAPHICS_PATH);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SITEURL\",SITE_URL);\n\t\t$this->ObTpl->set_file(\"TPL_SETTING_FILE\", $this->settingsTemplate);\n\n\t\t$this->ObTpl->set_block(\"TPL_SETTING_FILE\",\"TPL_DSPMSG_BLK\",\"dspmsg_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_SETTING_FILE\",\"TPL_LANG_BLK\",\"lang_blk\");\n\t\t$this->ObTpl->set_var(\"dspmsg_blk\",\"\");\n\t\t$this->ObTpl->set_var(\"lang_blk\",\"\");\n\n\t\tif(isset($this->request['msg']) && $this->request['msg']==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_FEATURESETTINGS_UPDATED);\n\t\t\t$this->ObTpl->parse(\"dspmsg_blk\",\"TPL_DSPMSG_BLK\");\n\t\t}\t\t\n\t\t$this->obDb->query = \"SELECT * FROM \".SITESETTINGS;\n\t\t$row_setting=$this->obDb->fetchQuery();\n\t\t$rCount=$this->obDb->record_count;\n\t\tfor($i=0;$i<$rCount;$i++)\n\t\t{\n\t\t\tswitch($row_setting[$i]->vDatatype)\n\t\t\t{\t\t\t\n\t\t\t\tcase \"inventory\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ENABLEINVENTORY\", $this->displayIt($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"rssarticles\":\n\t\t\t\t\tif( !empty($row_setting[$i]->vSmalltext) && ($row_setting[$i]->vSmalltext > 1 ) ){\n\t\t\t\t\t\t$row_setting[$i]->vSmalltext = 1 ;\n\t\t\t\t\t}\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ENABLEARTICLESRSS\", $this->displayIt($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"rssproducts\":\n\t\t\t\t\tif( !empty($row_setting[$i]->vSmalltext) && ($row_setting[$i]->vSmalltext > 1 ) ){\n\t\t\t\t\t\t$row_setting[$i]->vSmalltext = 1 ;\n\t\t\t\t\t}\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ENABLEPRODUCTRSS\", $this->displayIt($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"topsellers\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ENABLETOPSELLERS\", $this->displayIt($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"shopbybrand\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ENABLESHOPBYBRAND\", $this->displayIt($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"recent\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ENABLERECENT\", $this->displayIt($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"customerReviews\":\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ENABLEREVIEWS\", $this->displayIt($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"wishlist\":\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ENABLEWISHLIST\",$this->displayIt($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"usecompare\":\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ENABLECOMPARE\",$this->displayIt($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartGiftWrapping\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_GIFTWRAP\",$this->displayIt($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"newsletternav\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_NEWSLETTERNAV\",$this->displayIt($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"captcha_registration\":\n\t\t\t\t\t$this->ObTpl->set_var(\"CAPTCHA_REGISTRATION\",$this->displayIt($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"captcha_contactus\":\n\t\t\t\t\t$this->ObTpl->set_var(\"CAPTCHA_CONTACTUS\",$this->displayIt($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartMailList\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_NEWSLETTER\",$this->displayIt($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"dropshipFeature\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_DROPSHIP\",$this->displayIt($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"membership\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ENABLEMEMBERSHIP\",$this->displayIt(OFFERMPOINT));\n\t\t\t\tbreak;\t\t\t\t\n\t\t\t\tcase \"Language\":\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (is_dir($this->LanguagePath)) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($dh = opendir($this->LanguagePath))\n\t\t\t\t\t\t\t{\t\t\t\n\t\t\t\t\t\t\t\twhile (($templateName = readdir($dh)) !== false) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif($templateName!=\".\" && $templateName!=\"..\") {\n\t\t\t\t\t\t\t\t\t\tif(preg_match(\"/([\\.htm|html|tpl|tpl.html|tpl.htm])$/\",$templateName)){\n\t\t\t\t\t\t\t\t\t\t\tif($templateName==$row_setting[$i]->vSmalltext)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$this->ObTpl->set_var(\"SELLANG\",\"selected\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$this->ObTpl->set_var(\"SELLANG\",\"\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_LANGNAME\",$templateName);\n\t\t\t\t\t\t\t\t\t\t\t$this->ObTpl->parse(\"lang_blk\",\"TPL_LANG_BLK\",true);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tclosedir($dh);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \"analyticsCode\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_TRACKINGCODE\",$this->libFunc->m_displayContent($row_setting[$i]->tLargetext));\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t}#END SWITCH\n\t\t}#END FOR LOOP\n\treturn($this->ObTpl->parse(\"return\",\"TPL_SETTING_FILE\"));\n\t}", "title": "" }, { "docid": "8e5473bb85a839c120c3958328f37b4c", "score": "0.7075203", "text": "public function setting_update()\n {\n if (Authenticate::is_authorized()) {\n $model_administrator = Administrator::getInstance();\n\n /*\n * populate data from post request.\n * make sure form data match with setting keys\n */\n $data = [\n Administrator::COLUMN_STG_NAME => $_POST[\"website_name\"],\n Administrator::COLUMN_STG_DESCRIPTION => $_POST[\"website_description\"],\n Administrator::COLUMN_STG_KEYWORD => $_POST[\"website_keyword\"],\n Administrator::COLUMN_STG_EMAIL => $_POST[\"website_email\"],\n Administrator::COLUMN_STG_NUMBER => $_POST[\"website_number\"],\n Administrator::COLUMN_STG_ADDRESS => $_POST[\"website_address\"],\n Administrator::COLUMN_STG_FACEBOOK => $_POST[\"website_facebook\"],\n Administrator::COLUMN_STG_TWITTER => $_POST[\"website_twitter\"]\n ];\n\n /*\n * invoke update_setting() method in administrator model.\n * check the return value that indicate upload favicon and update database are success\n */\n if ($model_administrator->update_setting($data)) {\n $_SESSION['setting_operation'] = 'success';\n } else {\n $_SESSION['setting_operation'] = 'error';\n }\n\n transport(\"dashboard/setting\");\n } else {\n transport(\"administrator\");\n }\n }", "title": "" }, { "docid": "e36a521f97add78c6e46c64205326540", "score": "0.700894", "text": "function settingsmain() {\r\n if (isset($_REQUEST['s'])) {\r\n switch($_REQUEST['s']) {\r\n case 'save':\r\n savesettings(); break;\r\n default:\r\n changesettings();\r\n }\r\n } else {\r\n changesettings();\r\n }\r\n }", "title": "" }, { "docid": "0405257f1d3b375217dfb861a8c59f24", "score": "0.6973675", "text": "function dicaracx_custom_settings(){\n\n //first name\t\n register_setting( 'dicaracx-settings-group','first_name');\n //last name\n register_setting( 'dicaracx-settings-group','last_name');\n //Twhiter Handler\n register_setting( 'dicaracx-settings-group','twiter_handler','dicaracx_sanitize_twiter_handler');\n //Twhiter facebook\n register_setting( 'dicaracx-settings-group','facebook_handler');\n //Twhiter youtube\n register_setting( 'dicaracx-settings-group','youtube_handler');\n // section we going to use\n add_settings_section( 'dicaracx-sidebar-options', 'Sidebar Option','dicaracx_sidebar_options', 'dicaracx_premiun' );\n // field we declarate and we going use in our section\n\n add_settings_field( 'sidebar-name','Full name', 'dicaracx_sidebar_name', 'dicaracx_premiun', 'dicaracx-sidebar-options');\n add_settings_field( 'sidebar-twitter','Twitter handler', 'dicaracx_sidebar_twiter', 'dicaracx_premiun', 'dicaracx-sidebar-options');\n add_settings_field( 'sidebar-facebbok','Facebook handler', 'dicaracx_sidebar_facebook', 'dicaracx_premiun', 'dicaracx-sidebar-options');\n add_settings_field( 'sidebar-youtube','Youtube handler', 'dicaracx_sidebar_youtube', 'dicaracx_premiun', 'dicaracx-sidebar-options');\n}", "title": "" }, { "docid": "7e03e9ced16b55a6ae133c0b5cbd45d0", "score": "0.6952241", "text": "function Settings() {\n global $_CORELANG, $_ARRAYLANG, $objDatabase;\n $this->_pageTitle = $_ARRAYLANG['SETTINGS_TEXT'];\n $this->_objTpl->loadTemplateFile('module_add_settings.html');\n if(isset($_REQUEST['mes']) && ($_REQUEST['mes'] == \"update\")) {\n $this->_strOkMessage = $_ARRAYLANG['TXT_SURVEY_SETTING_SUCC_TXT'];\n }\n $objResult = $objDatabase->Execute('SELECT * FROM '.DBPREFIX.'module_survey_settings ORDER BY id desc LIMIT 1');\n // Parsing javascript function to the place holder.\n $this->_objTpl->setVariable(array(\n 'CREATE_SETTING_JAVASCRIPT' => $this->getCreateSettingJavascript(),\n 'TXT_SAVE_TXT' => $_ARRAYLANG['TXT_SAVE_TXT'],\n 'SETTINGS_TEXT' => $_ARRAYLANG['SETTINGS_TEXT'],\n 'ADD_SALUTATION' => $_ARRAYLANG['ADD_SALUTATION'],\n 'AGE_GROUP' => $_ARRAYLANG['AGE_GROUP']\n ));\n\n while(!$objResult->EOF) {\n $SalutationValue = $objResult->fields['salutation'];\n $AgeGroupValue = $objResult->fields['agegroup'];\n $Salutation = explode (\"--\", $SalutationValue);\n $AgeGroup = explode (\"--\", $AgeGroupValue);\n $FinalSalutation = '';\n $FinalAgeGroup = '';\n\n foreach($Salutation as $value) {\n if(trim($value) != \"\")\n $FinalSalutation .= $value.\"\\n\";\n }\n foreach($AgeGroup as $value) {\n if(trim($value) != \"\")\n $FinalAgeGroup .= $value.\"\\n\";\n }\n $this->_objTpl->setVariable(array(\n 'TXT_SETTING_ID' => contrexx_raw2xhtml($objResult->fields['id']),\n 'DB_SALUTATION_VALUE' => contrexx_raw2xhtml($FinalSalutation),\n 'DB_AGEGROUP_VALUE' => contrexx_raw2xhtml($FinalAgeGroup)\n ));\n //$this->_objTpl->parse('showEntries');*/\n $objResult->MoveNext();\n }\n\n if(isset($_POST['settings_submit'])) {\n\n $Salutation = contrexx_input2raw($_POST['salutation']);\n $ageGroup = contrexx_input2raw($_POST['Age_group']);\n $id = contrexx_input2raw($_POST['settings_id']);\n $SalutationVal = explode (\"\\n\", $Salutation);\n $ageGroupVal = explode (\"\\n\", $ageGroup);\n\n foreach($SalutationVal as $row) {\n if(trim($row) != \"\")\n $FinalSalutationVal .= $row.\"--\";\n }\n foreach($ageGroupVal as $value) {\n if(trim($value) != \"\")\n $FinalageGroupVal .= $value.\"--\";\n }\n\n // Insert Query for Inserting the Fields Posted\n $insertSurvey = 'UPDATE `'.DBPREFIX.'module_survey_settings` SET\n `salutation` = \"'.contrexx_raw2db($FinalSalutationVal).'\",\n \t\t\t `agegroup` = \"'.contrexx_raw2db($FinalageGroupVal).'\"\n WHERE id = \"'.$id.'\"';\n $objDatabase->Execute($insertSurvey);\n\n \\Cx\\Core\\Csrf\\Controller\\Csrf::header(\"Location: \".ASCMS_PATH_OFFSET.ASCMS_BACKEND_PATH.\"/index.php?cmd=Survey&act=settings&mes=update\");\n }\n\n }", "title": "" }, { "docid": "f84819d4dc61fa9b2a2c443dd603b857", "score": "0.69488424", "text": "public function editSettings()\n\t{\n\t\tglobal $ilCtrl, $lng, $ilSetting;\n\t\t\n\t\t$pd_set = new ilSetting(\"pd\");\n\t\t\n\t\t$enable_calendar = ilCalendarSettings::_getInstance()->isEnabled();\n\t\t#$enable_calendar = $ilSetting->get(\"enable_calendar\");\t\t\n\t\t$enable_block_moving = $pd_set->get(\"enable_block_moving\");\n\t\t$enable_active_users = $ilSetting->get(\"block_activated_pdusers\");\t\t\n\t\t\n\t\tinclude_once(\"./Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\t$form->setFormAction($ilCtrl->getFormAction($this));\n\t\t$form->setTitle($lng->txt(\"pd_settings\"));\n\t\t\n\t\t// Enable calendar\n\t\t$cb_prop = new ilCheckboxInputGUI($lng->txt(\"enable_calendar\"), \"enable_calendar\");\n\t\t$cb_prop->setValue(\"1\");\n\t\t//$cb_prop->setInfo($lng->txt(\"pd_enable_block_moving_info\"));\n\t\t$cb_prop->setChecked($enable_calendar);\n\t\t$form->addItem($cb_prop);\n\n\t\t// Enable bookmarks\n\t\t$cb_prop = new ilCheckboxInputGUI($lng->txt(\"pd_enable_bookmarks\"), \"enable_bookmarks\");\n\t\t$cb_prop->setValue(\"1\");\n\t\t$cb_prop->setChecked(($ilSetting->get(\"disable_bookmarks\") ? \"0\" : \"1\"));\n\t\t$form->addItem($cb_prop);\n\t\t\n\t\t// Enable contacts\n\t\t$cb_prop = new ilCheckboxInputGUI($lng->txt(\"pd_enable_contacts\"), \"enable_contacts\");\n\t\t$cb_prop->setValue(\"1\");\n\t\t$cb_prop->setChecked(($ilSetting->get(\"disable_contacts\") ? \"0\" : \"1\"));\n\n\t\t\t$cb_prop_requires_mail = new ilCheckboxInputGUI($lng->txt('pd_enable_contacts_requires_mail'), 'enable_contacts_require_mail');\n\t\t\t$cb_prop_requires_mail->setValue(\"1\");\n\t\t\t$cb_prop_requires_mail->setChecked(($ilSetting->get(\"disable_contacts_require_mail\") ? \"0\" : \"1\"));\n\t\t\t$cb_prop->addSubItem($cb_prop_requires_mail);\n\n\t\t$form->addItem($cb_prop);\n\t\t\n\t\t// Enable notes\n\t\t$cb_prop = new ilCheckboxInputGUI($lng->txt(\"pd_enable_notes\"), \"enable_notes\");\n\t\t$cb_prop->setValue(\"1\");\n\t\t$cb_prop->setChecked(($ilSetting->get(\"disable_notes\") ? \"0\" : \"1\"));\n\t\t$form->addItem($cb_prop);\n\t\t\n\t\t// Enable notes\n\t\t$cb_prop = new ilCheckboxInputGUI($lng->txt(\"pd_enable_comments\"), \"enable_comments\");\n\t\t$cb_prop->setValue(\"1\");\n\t\t$cb_prop->setChecked(($ilSetting->get(\"disable_comments\") ? \"0\" : \"1\"));\n\t\t$form->addItem($cb_prop);\n\t\t\n\t\t$comm_del_user = new ilCheckboxInputGUI($lng->txt(\"pd_enable_comments_del_user\"), \"comm_del_user\");\n\t\t$comm_del_user->setChecked($ilSetting->get(\"comments_del_user\", 0));\n\t\t$cb_prop->addSubItem($comm_del_user);\t\t\n\t\t\n\t\t$comm_del_tutor = new ilCheckboxInputGUI($lng->txt(\"pd_enable_comments_del_tutor\"), \"comm_del_tutor\");\n\t\t$comm_del_tutor->setChecked($ilSetting->get(\"comments_del_tutor\", 1));\n\t\t$cb_prop->addSubItem($comm_del_tutor);\t\t\n\t\t\n\t\t// Enable Chatviewer\n\t\t$cb_prop = new ilCheckboxInputGUI($lng->txt(\"pd_enable_chatviewer\"), \"block_activated_chatviewer\");\n\t\t$cb_prop->setValue(\"1\");\n\t\t$cb_prop->setChecked(($ilSetting->get(\"block_activated_chatviewer\")));\n\t\t$form->addItem($cb_prop);\n\t\t\n\t\t// Enable block moving\n\t\t$cb_prop = new ilCheckboxInputGUI($lng->txt(\"pd_enable_block_moving\"),\n\t\t\t\"enable_block_moving\");\n\t\t$cb_prop->setValue(\"1\");\n\t\t$cb_prop->setInfo($lng->txt(\"pd_enable_block_moving_info\"));\n\t\t$cb_prop->setChecked($enable_block_moving);\n\t\t$form->addItem($cb_prop);\t\t\n\t\t\n\t\t// Enable active users block\n\t\t$cb_prop = new ilCheckboxInputGUI($lng->txt(\"pd_enable_active_users\"),\n\t\t\t\"block_activated_pdusers\");\n\t\t$cb_prop->setValue(\"1\");\n\t\t$cb_prop->setChecked($enable_active_users);\n\t\t\n\t\t\t// maximum inactivity time\n\t\t\t$ti_prop = new ilNumberInputGUI($lng->txt(\"pd_time_before_removal\"),\n\t\t\t\t\"time_removal\");\n\t\t\t$ti_prop->setValue($pd_set->get(\"user_activity_time\"));\n\t\t\t$ti_prop->setInfo($lng->txt(\"pd_time_before_removal_info\"));\n\t\t\t$ti_prop->setMaxLength(3);\n\t\t\t$ti_prop->setSize(3);\n\t\t\t$cb_prop->addSubItem($ti_prop);\n\t\t\t\n\t\t\t// osi host\n\t\t\t// see http://www.onlinestatus.org\n\t\t\t$ti_prop = new ilTextInputGUI($lng->txt(\"pd_osi_host\"),\n\t\t\t\t\"osi_host\");\n\t\t\t$ti_prop->setValue($pd_set->get(\"osi_host\"));\n\t\t\t$ti_prop->setInfo($lng->txt(\"pd_osi_host_info\").\n\t\t\t\t' <a href=\"http://www.onlinestatus.org\" target=\"_blank\">http://www.onlinestatus.org</a>');\n\t\t\t$cb_prop->addSubItem($ti_prop);\n\t\t\t\n\t\t$form->addItem($cb_prop);\n\t\t\n\t\t// Enable 'My Offers' (default personal items)\n\t\t$cb_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_my_offers'), 'enable_my_offers');\n\t\t$cb_prop->setValue('1');\n\t\t$cb_prop->setInfo($lng->txt('pd_enable_my_offers_info'));\n\t\t$cb_prop->setChecked(($ilSetting->get('disable_my_offers') ? '0' : '1'));\n\t\t$form->addItem($cb_prop);\n\t\t\n\t\t// Enable 'My Memberships'\n\t\t$cb_prop = new ilCheckboxInputGUI($lng->txt('pd_enable_my_memberships'), 'enable_my_memberships');\n\t\t$cb_prop->setValue('1');\n\t\t$cb_prop->setInfo($lng->txt('pd_enable_my_memberships_info'));\n\t\t$cb_prop->setChecked(($ilSetting->get('disable_my_memberships') ? '0' : '1'));\n\t\t$form->addItem($cb_prop);\n\t\t\n\t\tif($ilSetting->get('disable_my_offers') == 0 &&\n\t\t $ilSetting->get('disable_my_memberships') == 0)\n\t\t{\n\t\t\t// Default view of personal items\n\t\t\t$sb_prop = new ilSelectInputGUI($lng->txt('pd_personal_items_default_view'), 'personal_items_default_view');\n\t\t\t$sb_prop->setInfo($lng->txt('pd_personal_items_default_view_info'));\n\t\t\t$option = array();\n\t\t\t$option[0] = $lng->txt('pd_my_offers');\n\t\t\t$option[1] = $lng->txt('my_courses_groups');\n\t\t\t$sb_prop->setOptions($option);\n\t\t\t$sb_prop->setValue((int)$ilSetting->get('personal_items_default_view'));\n\t\t\t$form->addItem($sb_prop);\n\t\t}\n\t\t\n\t\t// command buttons\n\t\t$form->addCommandButton(\"saveSettings\", $lng->txt(\"save\"));\n\t\t$form->addCommandButton(\"view\", $lng->txt(\"cancel\"));\n\n\t\t$this->tpl->setContent($form->getHTML());\n\t}", "title": "" }, { "docid": "44f5b4970ceb1cf03eabedcb036a230e", "score": "0.6944926", "text": "public function misc_setting_save() {\n\n self::save_default_dbox_settings(esigpost('esig_dropbox_default'));\n\n if (!class_exists('ESIG_PDF_Admin')) {\n\n $misc_data = array();\n if (isset($_POST['pdfname'])) {\n foreach ($_POST['pdfname'] as $key => $value) {\n $misc_data[$key] = $value;\n }\n }\n $misc_ready = json_encode($misc_data);\n $settings = new WP_E_Setting();\n $settings->set_generic(\"esign_misc_pdf_name\", $misc_ready);\n\n if (isset($_POST['esig_pdf_option']))\n $settings->set_generic(\"esig_pdf_option\", $_POST['esig_pdf_option']);\n }\n }", "title": "" }, { "docid": "43b312eb86de86e90486d1461d6fcde2", "score": "0.69168013", "text": "public function settingsdisplay() {\r\n PageContext::includePath('resize');\r\n PageContext::addScript(\"settingsdisplay.js\");\r\n PageContext::addStyle(\"cmssettings.css\");\r\n $message = \"\";\r\n $success = \"\";\r\n\r\n // General settings updation\r\n if(isset($_POST['submitBtn'])){\r\n if(is_uploaded_file($_FILES['sitelogo']['tmp_name'])) {\r\n $bannerParts = pathinfo($_FILES['sitelogo']['name']);\r\n if(move_uploaded_file($_FILES['sitelogo']['tmp_name'], BASE_PATH.'project/styles/images/'.$_FILES['sitelogo']['name'])) {\r\n\r\n Cmshelper::createThumbnail($_FILES['sitelogo']['name'],'',true,283,67,IMAGE_ROOT_URL);\r\n Cmshelper::createThumbnail($_FILES['sitelogo']['name'],'footer_',true,157,36,IMAGE_ROOT_URL);\r\n $_POST['sitelogo'] = $_FILES['sitelogo']['name'];\r\n @unlink($bannerOriginal);\r\n }\r\n }\r\n\r\n foreach($enableChecks as $checkBoxes){\r\n if($_POST[$checkBoxes] == '')\r\n $_POST[$checkBoxes] = 'N';\r\n }\r\n\r\n Cmshelper::updateSettings($_POST);\r\n\r\n $message = \"Settings updated successfully.\";\r\n $success = \"success\";\r\n }\r\n\r\n\r\n\r\n\r\n if(isset($_POST['passwordSubmitBtn'])){\r\n\r\n if(trim($_SESSION['admin_type']) != '')\r\n $admin_uid \t\t= $_SESSION['admin_type']; // cms doesnt support uid as of now\r\n else if(trim($_SESSION['cms_admin_type']) != '')\r\n $admin_uid \t\t= $_SESSION['cms_admin_type']; // cms doesnt support uid as of now\r\n\r\n $adminUserName = $_SESSION['cms_cms_username'];\r\n\r\n $updatePassword = Cmshelper::updateAdminPassword($adminUserName, $_POST);\r\n if($updatePassword=='success'){\r\n $message \t= \"Password updated successfully.\";\r\n $success \t= \"success\";\r\n }else{\r\n $message \t= $updatePassword;\r\n $success \t= \"error\";\r\n }\r\n }\r\n\r\n\r\n\r\n //general settings\r\n $pageContents = Cmshelper::getListItem(\"lookup\", array('*'), array(array('field' => 'groupLabel' , 'value' => 'General')));\r\n $genSettings \t\t= array();\r\n foreach($pageContents as $items)\r\n \t$genSettings[$items->vLookUp_Name] \t= $items;\r\n \tPageContext::$response->genSettings \t= $genSettings;\r\n //echopre(PageContext::$response->genSettings);\r\n\r\n\r\n\r\n \t// advacned settings\r\n \t if(isset($_POST['btnAdvSubmit'])){\r\n\r\n\r\n \t \t \tCmshelper::updateAdminSettings('one_credit_value', \tPageContext::$request['one_credit_value']);\r\n \t \t \tCmshelper::updateAdminSettings('outbound_call_rate', \tPageContext::$request['outbound_call_rate']);\r\n \t \t \tCmshelper::updateAdminSettings('outbound_sms_rate', \tPageContext::$request['outbound_sms_rate']);\r\n \t \t \tCmshelper::updateAdminSettings('outbound_number', \tPageContext::$request['outbound_number']);\r\n \t \t \t$message = \"Settings updated successfully.\";\r\n \t$success = \"success\";\r\n \t }\r\n \t// get advanced settings\r\n \t$advContents\t= Cmshelper::getListItem(\"lookup\", array('*'), array(array('field' => 'groupLabel' , 'value' => 'payment')));\r\n $advSettings \t\t= array();\r\n foreach($advContents as $items)\r\n \t$advSettings[$items->vLookUp_Name] \t= $items;\r\n \tPageContext::$response->advSettings \t= $advSettings;\r\n \t//echopre(PageContext::$response->paySettings);\r\n\r\n\r\n\r\n PageContext::$response->message \t\t= $message;\r\n PageContext::$response->msgClass \t= $success;\r\n\r\n\r\n \tPageContext::$response->activeTab = PageContext::$request['tab'];\r\n if(PageContext::$response->activeTab == '') PageContext::$response->activeTab = 'general';\r\n if(PageContext::$request['page']!=\"\") {\r\n $pageUrl = $pageUrl;\r\n $pageUrl = str_replace(\"page=\".PageContext::$request['page'], \"\", $pageUrl);\r\n $pageUrl = $pageUrl.\"&\";\r\n }\r\n else\r\n $pageUrl=$pageUrl.\"&\";\r\n PageContext::addJsVar(\"currentURL\", $pageUrl);\r\n PageContext::$response->currentURL = $pageUrl;\r\n\r\n\r\n }", "title": "" }, { "docid": "061a2785830be9ed0bcd4e5583c3beed", "score": "0.69142365", "text": "public function updateSettings() {\n\t\t$code = MollieHelper::getModuleCode();\n $stores = Util::info()->stores();\n $vars = array(\n \t'default_currency' => 'DEF' // variable => default value\n );\n foreach($stores as $store) {\n \tforeach($vars as $var=>$val) {\n \t\tif (null == Util::config($store['store_id'])->get($code . '_' . $var, true)) {\n\t\t\t\t\tUtil::config($store['store_id'])->setValue($code, $code . '_' . $var, $val);\n\t\t\t\t}\n \t}\n }\n\t}", "title": "" }, { "docid": "ce6c0d3c4d7850559a7392fd3b7c8260", "score": "0.687164", "text": "public function renderPage_GeneralSettings() {\n\t\t$this->instantiate( 'Admin_General' );\n\t\t$this->Admin_General->display();\n\t}", "title": "" }, { "docid": "f9223e5d3ec14f8188b27a319f6d06ea", "score": "0.68677044", "text": "public function saveSettings()\n\t{\n\t\tglobal $ilCtrl, $ilSetting;\n\t\t\n\t\t$pd_set = new ilSetting(\"pd\");\n\t\t\n\t\tilCalendarSettings::_getInstance()->setEnabled( $_POST[\"enable_calendar\"]);\n\t\tilCalendarSettings::_getInstance()->save();\n\t\t\t\n\t\t#$ilSetting->set(\"enable_calendar\", $_POST[\"enable_calendar\"]);\n\t\t$ilSetting->set(\"disable_bookmarks\", (int) ($_POST[\"enable_bookmarks\"] ? 0 : 1));\n\n\t\t$ilSetting->set(\"disable_contacts\", (int) ($_POST[\"enable_contacts\"] ? 0 : 1));\n\t\t$ilSetting->set(\"disable_contacts_require_mail\", (int) ($_POST[\"enable_contacts_require_mail\"] ? 0 : 1));\n\n\t\t$ilSetting->set(\"disable_notes\", (int) ($_POST[\"enable_notes\"] ? 0 : 1));\n\t\t$ilSetting->set(\"disable_comments\", (int) ($_POST[\"enable_comments\"] ? 0 : 1));\n\t\n\t\t$ilSetting->set(\"comments_del_user\", (int) ($_POST[\"comm_del_user\"] ? 1 : 0));\n\t\t$ilSetting->set(\"comments_del_tutor\", (int) ($_POST[\"comm_del_tutor\"] ? 1 : 0));\t\t\t\n\t\t\n\t\t$ilSetting->set(\"block_activated_chatviewer\", (int) ($_POST[\"block_activated_chatviewer\"]));\t\t\n\t\t\n\t\t$ilSetting->set(\"block_activated_pdusers\", $_POST[\"block_activated_pdusers\"]);\n\t\t$pd_set->set(\"enable_block_moving\", $_POST[\"enable_block_moving\"]);\n\t\t$pd_set->set(\"user_activity_time\", (int) $_POST[\"time_removal\"]);\n\t\t$pd_set->set(\"osi_host\", $_POST[\"osi_host\"]);\n\t\t\n\t\t// Validate personal desktop view\n\t\tif(!(int)$_POST['enable_my_offers'] && !(int)$_POST['enable_my_memberships'])\n\t\t{\n\t\t\tilUtil::sendFailure($this->lng->txt('pd_view_select_at_least_one'), true);\n\t\t\t$ilCtrl->redirect($this, 'view');\n\t\t}\n\t\t\n\t\t// Enable 'My Offers' (default personal items)\n\t\t$ilSetting->set('disable_my_offers', (int)($_POST['enable_my_offers'] ? 0 : 1));\n\t\t\n\t\t// Enable 'My Memberships'\n\t\t$ilSetting->set('disable_my_memberships', (int)($_POST['enable_my_memberships'] ? 0 : 1));\n\t\t\n\t\tif((int)$_POST['enable_my_offers'] && !(int)$_POST['enable_my_memberships'])\n\t\t\t$_POST['personal_items_default_view'] = 0;\n\t\telse if(!(int)$_POST['enable_my_offers'] && (int)$_POST['enable_my_memberships'])\n\t\t\t$_POST['personal_items_default_view'] = 1;\n\t\telse if(!isset($_POST['personal_items_default_view']))\n\t\t\t$_POST['personal_items_default_view'] = $ilSetting->get('personal_items_default_view');\n\t\t\n\t\t// Default view of personal items\n\t\t$ilSetting->set('personal_items_default_view', (int)$_POST['personal_items_default_view']);\n\t\n\t\tilUtil::sendSuccess($this->lng->txt(\"settings_saved\"), true);\t\t\n\t\t$ilCtrl->redirect($this, \"view\");\n\t}", "title": "" }, { "docid": "08de671ac220039c96d34a6934cfc255", "score": "0.6864844", "text": "function changeMisc()\n\t{\n\t\t$tpl = &singleton('template');\n\t\t$config = $this->getOrigConfig();\n\t\t\n\t\t$wikiTitle = isset($this->post['wiki_title']) ? $this->post['wiki_title'] : $config['default']['wiki_title'];\n\t\t$defaultPage = isset($this->post['default_page']) ? $this->post['default_page'] : $config['default']['default_page'];\n\t\t$defaultLang = isset($this->post['default_lang']) ? $this->post['default_lang'] : $config['default']['default_lang'];\n\t\t$defaultTheme = isset($this->post['default_theme']) ? $this->post['default_theme'] : $config['default']['default_theme'];\n\t\t$dateFormat = isset($this->post['date_format']) ? $this->post['date_format'] : $config['default']['date_format'];\n\t\t\n\t\tif(!isset($config['languages'][$defaultLang])) {\n\t\t\t$defaultLang = $config['default']['default_lang'];\n\t\t}\n\t\tif(!isset($config['themes'][$defaultTheme])) {\n\t\t\t$defaultTheme = $config['default']['default_theme'];\n\t\t}\n\t\t\n\t\tif(!preg_match('/^'.$config['default']['title_format'].'$/', $defaultPage)) {\n\t\t\t$tpl->assign('isError', true);\n\t\t\t$tpl->assign('errors', array($this->lang['admin_config_invalid_page']));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$this->setConfigItem('default', 'wiki_title', $wikiTitle);\n\t\t$this->setConfigItem('default', 'default_page', $defaultPage);\n\t\t$this->setConfigItem('default', 'default_lang', $defaultLang);\n\t\t$this->setConfigItem('default', 'default_theme', $defaultTheme);\n\t\t$this->setConfigItem('default', 'date_format', $dateFormat);\n\t\t\n\t\t$this->rewriteConfig();\n\t\t\n\t\t$tpl->assign('isMessage', true);\n\t\t$tpl->assign('message', $this->lang['admin_config_updated']);\n\t}", "title": "" }, { "docid": "e35fab2e174a2aecae79764d8d5ff423", "score": "0.6847343", "text": "function m_dspDesignSettings(){\n\t\t#INTIALIZING TEMPLATES\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\", GRAPHICS_PATH);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SITEURL\",SITE_URL);\n\t\t$this->ObTpl->set_file(\"TPL_SETTING_FILE\", $this->settingsTemplate);\n\n\t\t$this->ObTpl->set_block(\"TPL_SETTING_FILE\",\"TPL_DSPMSG_BLK\",\"dspmsg_blk\");\n\t\t$this->ObTpl->set_var(\"dspmsg_blk\",\"\");\n\t\t$this->ObTpl->set_block(\"TPL_SETTING_FILE\",\"TPL_HOME_LAYOUT_BLK\", \"hTPL_HOME_LAYOUT_BLK\");\n\t\t$this->ObTpl->set_block(\"TPL_SETTING_FILE\",\"TPL_MAIN_LAYOUT_BLK\", \"hTPL_MAIN_LAYOUT_BLK\");\n\t\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_THUMBIMGWIDTH\",\"\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_THUMBIMGHEIGHT\",\"\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_LARGEIMGWIDTH\",\"\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_LARGEIMGHEIGHT\",\"\");\n\n\t\tif(isset($this->request['msg']) && $this->request['msg']==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_DESIGNSETTINGS_UPDATED);\n\t\t\t$this->ObTpl->parse(\"dspmsg_blk\",\"TPL_DSPMSG_BLK\");\n\t\t}\t\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_TREEMENU\",$this->displayIt(TREE_MENU));\n\n\t\t$this->obDb->query = \"SELECT * FROM \".SITESETTINGS;\n\t\t$row_setting=$this->obDb->fetchQuery();\n\t\t$rCount=$this->obDb->record_count;\n\t\tfor($i=0;$i<$rCount;$i++)\n\t\t{\n\t\t\tswitch($row_setting[$i]->vDatatype)\n\t\t\t{\n\t\t\t\n\t\t\t\tcase \"iTreeMenu\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_TREEMENU\", $this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\t# Image Upload Settings\n\t\t\t\tcase \"imgUploadJPGCompression\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_JPGCOMPRESSION\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"imgUploadSmallWidth\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SMIMAGEWIDTH\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"imgUploadSmallHeight\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SMIMAGEHEIGHT\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"imgUploadMediumWidth\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MDIMAGEWIDTH\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"imgUploadMediumHeight\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MDIMAGEHEIGHT\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"imgUploadLargeWidth\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_LGIMAGEWIDTH\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"imgUploadLargeHeight\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_LGIMAGEHEIGHT\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"imgUploadDeptSmallWidth\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_DEPTSMIMAGEWIDTH\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"imgUploadDeptSmallHeight\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_DEPTSMIMAGEHEIGHT\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"imgUploadDeptMediumWidth\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_DEPTMDIMAGEWIDTH\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"imgUploadDeptMediumHeight\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_DEPTMDIMAGEHEIGHT\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"imgUploadContentSmallWidth\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CONTENTSMIMAGEWIDTH\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"imgUploadContentSmallHeight\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CONTENTSMIMAGEHEIGHT\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"imgGalleryThumbnailWidth\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_THUMBIMGWIDTH\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"imgGalleryThumbnailHeight\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_THUMBIMGHEIGHT\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"imgGalleryLargeWidth\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_LARGEIMGWIDTH\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"imgGalleryLargeHeight\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_LARGEIMGHEIGHT\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t#NUMBER OF PRODUCTS PER PAGE (department or product page) \t\t\t\t\t\t\t\t\n\t\t\t\tcase \"deptlimit\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_IMGPERPAGE\",number_format($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"homeLayout\":\n\t\t\t\t\tif (is_dir(MODULES_PATH.\"default/templates/main/layout/\")) {\n\t\t\t\t\t\tif ($dh = opendir(MODULES_PATH.\"default/templates/main/layout/\")) {\t\t\t\n\t\t\t\t\t\t\twhile (($templateName = readdir($dh)) !== false) {\n\t\t\t\t\t\t\t\tif($templateName!=\".\" && $templateName!=\"..\") {\n\t\t\t\t\t\t\t\t\tif($templateName==$row_setting[$i]->vSmalltext)\t{\n\t\t\t\t\t\t\t\t\t\t$this->ObTpl->set_var(\"SEL_HOME_LAYOUT\",\"selected\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t$this->ObTpl->set_var(\"SEL_HOME_LAYOUT\",\"\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_HOME_LAYOUT\",$templateName);\n\t\t\t\t\t\t\t\t\t$this->ObTpl->parse(\"hTPL_HOME_LAYOUT_BLK\",\"TPL_HOME_LAYOUT_BLK\",true);\n\t\t\t\t\t\t\t\t}// end of templateName\n\t\t\t\t\t\t\t }// end of while\n\t\t\t\t\t\t\tclosedir($dh);\n\t\t\t\t\t\t}// end of if\n\t\t\t\t\t}// end of if\n\t\t\t\tbreak;\n\t\t\t\tcase \"mainLayout\":\n\t\t\t\t\tif (is_dir(MODULES_PATH.\"default/templates/main/layout/\")) {\n\t\t\t\t\t\tif ($dh = opendir(MODULES_PATH.\"default/templates/main/layout/\")) {\t\t\t\n\t\t\t\t\t\t\twhile (($templateName = readdir($dh)) !== false) {\n\t\t\t\t\t\t\t\tif($templateName!=\".\" && $templateName!=\"..\") {\n\t\t\t\t\t\t\t\t\tif($templateName==$row_setting[$i]->vSmalltext)\t{\n\t\t\t\t\t\t\t\t\t\t$this->ObTpl->set_var(\"SELLAYOUT\",\"selected\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t$this->ObTpl->set_var(\"SELLAYOUT\",\"\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MAIN_LAYOUT\",$templateName);\n\t\t\t\t\t\t\t\t\t$this->ObTpl->parse(\"hTPL_MAIN_LAYOUT_BLK\",\"TPL_MAIN_LAYOUT_BLK\",true);\n\t\t\t\t\t\t\t\t}// end of templateName\n\t\t\t\t\t\t\t }// end of while\n\t\t\t\t\t\t\tclosedir($dh);\n\t\t\t\t\t\t}// end of if\n\t\t\t\t\t}// end of if\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}#switch\n\t\t}#for loop\n\t\t\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_SETTING_FILE\"));\t\t\n\t}", "title": "" }, { "docid": "a34037bff7f14fb64d4f9eefa93a7da7", "score": "0.6839767", "text": "function handle_admin() {\n \tinclude('includes/admin/general_settings.php');\n }", "title": "" }, { "docid": "96db0cc4f1a7046ddcaff0e09274210f", "score": "0.68382937", "text": "function m_orderSettings()\n\t{\n\t\t#INTIALIZING TEMPLATES\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\", GRAPHICS_PATH);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SITEURL\",SITE_URL);\n\t\t$this->ObTpl->set_file(\"TPL_SETTING_FILE\", $this->settingsTemplate);\n\n\t\t$this->ObTpl->set_block(\"TPL_SETTING_FILE\",\"TPL_DSPMSG_BLK\",\"dspmsg_blk\");\n\t\n\t\t$this->ObTpl->set_var(\"dspmsg_blk\",\"\");\n\n\t\t$this->ObTpl->set_var(\"INCREASE_CHECKED\",\"\");\t\t\n\t\t$this->ObTpl->set_var(\"ORIGINAL_CHECKED\",\"checked='checked'\");\t\t\n\t\t$this->ObTpl->set_var(\"DECREASE_CHECKED\",\"\");\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_PERCENT\",\"\");\n\t\t\n\t\tif(isset($this->request['msg']) && $this->request['msg']==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_ORDERDETAILS_UPDATED);\n\t\t\t$this->ObTpl->parse(\"dspmsg_blk\",\"TPL_DSPMSG_BLK\");\n\t\t}\t\n\n\t\n\t\t$this->obDb->query = \"SELECT vDatatype,vSmalltext,nNumberdata FROM \".SITESETTINGS;\n\t\t$row_setting=$this->obDb->fetchQuery();\n\t\t$rCount=$this->obDb->record_count;\n\t\t\n\t\tfor($i=0;$i<$rCount;$i++)\n\t\t{\n\t\t\tswitch($row_setting[$i]->vDatatype)\n\t\t\t{\n\t\t\t\tcase \"cartAlternateShipping\":\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ENABLEADDRESS\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartDefaultShipping\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_POSTAGE\",$this->libFunc->m_displayContent($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"vatbaserate\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_VATBASERATE\",$row_setting[$i]->nNumberdata);\n\t\t\t\tbreak;\n\t\t\t\tcase \"incvat\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_INCVAT\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n case \"wholesale\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_WHOLESALE\", $this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"netgross\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_NETGROSS\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartOrderEmail\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ORDERMAIL\",$row_setting[$i]->vSmalltext);\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartInfoEmail\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_INFOMAIL\",$row_setting[$i]->vSmalltext);\n\t\t\t\tbreak;\n\t\t\t\t#MODIFIED ON 19-03-07 BY NSI\n\t\t\t\tcase \"cartWirelessEmail\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_WIRELESS\",$row_setting[$i]->vSmalltext);\n\t\t\t\tbreak;\n\t\t\t\t#MODIFIED ON 12-04-07 BY NSI\n\t\t\t\tcase \"cartPayCC\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_CREDIT\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartPayCCp\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_CREDIT_PHONE\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartPayEFT\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_ELECTRONIC_FUNDS\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartPayMail\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_CREDITPHONE\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\n\t\t\t\tcase \"cartPayCOD\":\n\t\t\t\t\t$this->ObTpl->set_var(\"COD\",number_format($row_setting[$i]->vSmalltext,2));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartCCTypeVisa\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_VISA\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartCCTypeVisaDelta\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_VISADELTA\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartCCTypeVisaElectron\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_VISAELECTRON\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartCCTypeMC\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_MASTERCARD\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartCCTypeAmex\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_AMEX\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartCCTypeDiscover\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_DISCOVER\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartCCTypeDiners\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_DINNER\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartCCTypeSolo\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_SOLO\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartCCTypeSwitch\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_SWITCH\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cartCCTypeMaestro\":\n\t\t\t\t\t$this->ObTpl->set_var(\"ENABLE_MASTERO\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"rrptext\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_RRPTEXT\",$row_setting[$i]->vSmalltext);\n\t\t\t\tbreak;\n\t\t\t\tcase \"vTaxName\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_TAXNAME\",$row_setting[$i]->vSmalltext);\n\t\t\t\tbreak;\n\t\t\t\tcase \"postagevatonoff\":\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_POSTAGEVATOPTION\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"IncVatTextFlag\":\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_INCVATTEXTCHECK\",$this->displayIt($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"minordertotal\":\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MINORDER\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t\tcase \"marginpercent\":\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_PERCENT\",number_format($row_setting[$i]->nNumberdata));\n\t\t\t\tbreak;\n\t\t\t}#END SWITCH\n\t\t}#END FOR LOOP\n\t\tswitch (MARGINSTATUS)\n\t\t{\n\t\t\tcase \"increase\":\n\t\t\t\t$this->ObTpl->set_var(\"INCREASE_CHECKED\",\"checked='checked'\");\n\t\t\tbreak;\n\t\t\tcase \"decrease\":\n\t\t\t\t$this->ObTpl->set_var(\"DECREASE_CHECKED\",\"checked='checked'\");\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->ObTpl->set_var(\"ORIGINAL_CHECKED\",\"checked='checked'\");\n\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t}\n\t\t#ASSIGNING FORM VARAIABLES\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_SETTING_FILE\"));\n\t}", "title": "" }, { "docid": "b6efd07f9766e6a8865f87c035868e71", "score": "0.6807177", "text": "public function appsettingsdisplay() {\r\n\r\n PageContext::includePath('resize');\r\n PageContext::addScript(\"settingsdisplay.js\");\r\n PageContext::addStyle(\"cmssettings.css\");\r\n $message = \"\";\r\n $success = \"\";\r\n\r\n\r\n /*********************** general settings starts *****************/\r\n\r\n // updating the general settings\r\n if(isset($_POST['btnSubmitGeneral'])){\r\n \tCmshelper::updateUserSettings('company-name', PageContext::$request['company-name']);\r\n \tPageContext::$response->message \t\t= 'Successfully updated the general settings';\r\n \tPageContext::$response->msgClass \t\t= 'success';\r\n }\r\n // get the general settings\r\n $pageContents = Cmshelper::getListItem(\"appsettings\", array('*'), array(array('field' => 'settings_group' , 'value' => 'general')));\r\n $genSettings \t\t= array();\r\n foreach($pageContents as $items)\r\n \t$genSettings[$items->settings_name] \t= $items;\r\n \tPageContext::$response->genSettings \t\t= $genSettings;\r\n \t/*********************** general settings ends *****************/\r\n\r\n\r\n\r\n \t/********************** Email settings starts **************/\r\n \t// update email settings\r\n \tif(isset($_POST['btnSubmitEmail'])){\r\n \tCmshelper::updateUserSettings('smtp_enable', \tPageContext::$request['smtp_enable']);\r\n \tCmshelper::updateUserSettings('smtp_host', \t\tPageContext::$request['smtp_host']);\r\n \tCmshelper::updateUserSettings('smtp_port', \t\tPageContext::$request['smtp_port']);\r\n \tCmshelper::updateUserSettings('smtp_username', \tPageContext::$request['smtp_username']);\r\n \tCmshelper::updateUserSettings('smtp_pwd', \t\tPageContext::$request['smtp_pwd']);\r\n\r\n \tPageContext::$response->message \t\t\t\t= 'Successfully updated the email settings';\r\n \tPageContext::$response->msgClass \t\t\t\t= 'success';\r\n }\r\n \t// get email settings\r\n $pageContents = Cmshelper::getListItem(\"appsettings\", array('*'), array(array('field' => 'settings_group' , 'value' => 'email')));\r\n $emailSettings \t\t= array();\r\n foreach($pageContents as $items)\r\n \t$emailSettings[$items->settings_name] \t\t\t= $items;\r\n \tPageContext::$response->emailSettings \t\t\t\t= $emailSettings;\r\n \t/************************ Email settings ends *****************/\r\n\r\n\r\n\r\n \t/************************ Call settings starts *****************/\r\n \t// update call settings\r\n \tif(isset($_POST['btnSubmitCall'])){\r\n \tCmshelper::updateUserSettings('asterisk-no', \t\tPageContext::$request['asterisk-no']);\r\n \tCmshelper::updateUserSettings('asterisk-ip', \t\tPageContext::$request['asterisk-ip']);\r\n \tCmshelper::updateUserSettings('queue-waiting-time', PageContext::$request['queue-waiting-time']);\r\n \tCmshelper::updateUserSettings('callforwarding', \tPageContext::$request['callforwarding']);\r\n \tCmshelper::updateUserSettings('restrictsingleip', \tPageContext::$request['restrictsingleip']);\r\n \tCmshelper::updateUserSettings('blockoutgoing', \t\tPageContext::$request['blockoutgoing']);\r\n\r\n \tPageContext::$response->message \t\t\t\t= 'Successfully updated the call settings';\r\n \tPageContext::$response->msgClass \t\t\t\t= 'success';\r\n }\r\n\r\n \t// get call settings\r\n $pageContents = Cmshelper::getListItem(\"appsettings\", array('*'), array(array('field' => 'settings_group' , 'value' => 'calls')));\r\n $callSettings \t\t= array();\r\n foreach($pageContents as $items)\r\n \t$callSettings[$items->settings_name] \t\t\t= $items;\r\n \tPageContext::$response->callSettings \t\t\t\t= $callSettings;\r\n \t//echopre(PageContext::$response->callSettings);\r\n\r\n \t/************************ Call settings ends *******************/\r\n\r\n\r\n\r\n\r\n\r\n PageContext::$response->activeTab = PageContext::$request['tab'];\r\n\r\n if(PageContext::$request['page']!=\"\") {\r\n $pageUrl = $pageUrl;\r\n $pageUrl = str_replace(\"page=\".PageContext::$request['page'], \"\", $pageUrl);\r\n $pageUrl = $pageUrl.\"&\";\r\n }\r\n else\r\n $pageUrl=$pageUrl.\"&\";\r\n PageContext::addJsVar(\"currentURL\", \t$pageUrl);\r\n PageContext::$response->currentURL \t= $pageUrl;\r\n }", "title": "" }, { "docid": "d9af30561993f21f5412f7efdd987b25", "score": "0.67849857", "text": "public function general_settings()\n {\n $pageName = 'General Page settings';\n $pageDescription = 'General settings to fully customize your counter page markup.';\n $general = true ;\n $auth = Auth::user();\n $generalSetting = GeneralSetting::first();\n $timeZones = timezone_identifiers_list();\n return view('admin.general',compact('pageName','general','auth','generalSetting','timeZones','pageDescription'));\n }", "title": "" }, { "docid": "355ab6d9ecd173cf19f23ab3aa628ad8", "score": "0.6778142", "text": "public function update_general() {\n if (isset($_POST['wp-sitemanager-general'])) {\n check_admin_referer('wp-sitemanager-general');\n do_action('wp-sitemanager-update-general');\n }\n }", "title": "" }, { "docid": "662327c52504cabb6598d3fe028cb5b2", "score": "0.67546713", "text": "public function settings(){\n /* Get data for dashboard */\n $data['current_page'] = $_SERVER['REQUEST_URI'];\n $data['title'] = \"Settings\";\n $data['welcomeMessage'] = \"Welcom to the Admin Panel Site Settings!\";\n\n /** Check to see if user is logged in **/\n if($data['isLoggedIn'] = $this->auth->isLogged()){\n /** User is logged in - Get their data **/\n $u_id = $this->auth->user_info();\n $data['currentUserData'] = $this->user->getCurrentUserData($u_id);\n if($data['isAdmin'] = $this->user->checkIsAdmin($u_id) == 'false'){\n /** User Not Admin - kick them out **/\n \\Libs\\ErrorMessages::push('You are Not Admin', '');\n }\n }else{\n /** User Not logged in - kick them out **/\n \\Libs\\ErrorMessages::push('You are Not Logged In', 'Login');\n }\n\n /* Check to see if Admin is submiting form data */\n if(isset($_POST['submit'])){\n /* Check to make sure the csrf token is good */\n if (Csrf::isTokenValid('settings')) {\n /* Check to make sure Admin is updating settings */\n if($_POST['update_settings'] == \"true\"){\n /* Get data sbmitted by form */\n $site_title = Request::post('site_title');\n $site_description = Request::post('site_description');\n $site_keywords = Request::post('site_keywords');\n $site_user_activation = Request::post('site_user_activation');\n $site_email_username = Request::post('site_email_username');\n $site_email_password = Request::post('site_email_password');\n $site_email_fromname = Request::post('site_email_fromname');\n $site_email_host = Request::post('site_email_host');\n $site_email_port = Request::post('site_email_port');\n $site_email_smtp = Request::post('site_email_smtp');\n $site_email_site = Request::post('site_email_site');\n $site_recapcha_public = Request::post('site_recapcha_public');\n $site_recapcha_private = Request::post('site_recapcha_private');\n\n if($this->model->updateSetting('site_title', $site_title)){}else{ $errors[] = 'Site Title Error'; }\n if($this->model->updateSetting('site_description', $site_description)){}else{ $errors[] = 'Site Description Error'; }\n if($this->model->updateSetting('site_keywords', $site_keywords)){}else{ $errors[] = 'Site Keywords Error'; }\n if($this->model->updateSetting('site_user_activation', $site_user_activation)){}else{ $errors[] = 'Site User Activation Error'; }\n if($this->model->updateSetting('site_email_username', $site_email_username)){}else{ $errors[] = 'Site Email Username Error'; }\n if($this->model->updateSetting('site_email_password', $site_email_password)){}else{ $errors[] = 'Site Email Password Error'; }\n if($this->model->updateSetting('site_email_fromname', $site_email_fromname)){}else{ $errors[] = 'Site Email From Name Error'; }\n if($this->model->updateSetting('site_email_host', $site_email_host)){}else{ $errors[] = 'Site Email Host Error'; }\n if($this->model->updateSetting('site_email_port', $site_email_port)){}else{ $errors[] = 'Site Email Port Error'; }\n if($this->model->updateSetting('site_email_smtp', $site_email_smtp)){}else{ $errors[] = 'Site Email SMTP Auth Error'; }\n if($this->model->updateSetting('site_email_site', $site_email_site)){}else{ $errors[] = 'Site Email Error'; }\n if($this->model->updateSetting('site_recapcha_public', $site_recapcha_public)){}else{ $errors[] = 'Site reCAPCHA Public Error'; }\n if($this->model->updateSetting('site_recapcha_private', $site_recapcha_private)){}else{ $errors[] = 'Site reCAPCHA Private Error'; }\n\n // Run the update profile script\n if(count($errors) == 0){\n // Success\n \\Libs\\SuccessMessages::push('You Have Successfully Updated Site Settings', 'AdminPanel-Settings');\n }else{\n // Error\n if(isset($errors)){\n $error_data = \"<hr>\";\n foreach($errors as $row){\n $error_data .= \" - \".$row.\"<br>\";\n }\n }else{\n $error_data = \"\";\n }\n /* Error Message Display */\n \\Libs\\ErrorMessages::push('Error Updating Site Settings'.$error_data, 'AdminPanel-Settings');\n }\n }else{\n /* Error Message Display */\n \\Libs\\ErrorMessages::push('Error Updating Site Settings', 'AdminPanel-Settings');\n }\n }else{\n /* Error Message Display */\n \\Libs\\ErrorMessages::push('Error Updating Site Settings', 'AdminPanel-Settings');\n }\n }\n\n /* Get Settings Data */\n $data['site_title'] = $this->model->getSettings('site_title');\n $data['site_description'] = $this->model->getSettings('site_description');\n $data['site_keywords'] = $this->model->getSettings('site_keywords');\n $data['site_user_activation'] = $this->model->getSettings('site_user_activation');\n $data['site_email_username'] = $this->model->getSettings('site_email_username');\n $data['site_email_password'] = $this->model->getSettings('site_email_password');\n $data['site_email_fromname'] = $this->model->getSettings('site_email_fromname');\n $data['site_email_host'] = $this->model->getSettings('site_email_host');\n $data['site_email_port'] = $this->model->getSettings('site_email_port');\n $data['site_email_smtp'] = $this->model->getSettings('site_email_smtp');\n $data['site_email_site'] = $this->model->getSettings('site_email_site');\n $data['site_recapcha_public'] = $this->model->getSettings('site_recapcha_public');\n $data['site_recapcha_private'] = $this->model->getSettings('site_recapcha_private');\n\n /* Setup Token for Form */\n $data['csrfToken'] = Csrf::makeToken('settings');\n\n /* Setup Breadcrumbs */\n $data['breadcrumbs'] = \"\n <li><a href='\".DIR.\"AdminPanel'><i class='fa fa-fw fa-cog'></i> Admin Panel</a></li>\n <li class='active'><i class='fa fa-fw fa-dashboard'></i> \".$data['title'].\"</li>\n \";\n\n Load::View(\"AdminPanel/Settings\", $data, \"AdminPanel::AP-Sidebar::Left\", \"AdminPanel\");\n }", "title": "" }, { "docid": "eb7242c6c12a92af4b3a47cecbc1dd2b", "score": "0.67504436", "text": "function updatesettingbackend()\n {\n $field = $this->input->post('field');\n $field = smit_isset($field, '');\n $value = $this->input->post('value');\n $value = smit_isset($value, '');\n\n // Dashboard Setting\n if( $field == 'be_dashboard_user' ){\n update_option('be_dashboard_user', $value);\n }elseif( $field == 'be_dashboard_juri' ){\n update_option('be_dashboard_juri', $value);\n }elseif( $field == 'be_dashboard_pendamping' ){\n update_option('be_dashboard_pendamping', $value);\n }elseif( $field == 'be_dashboard_tenant' ){\n update_option('be_dashboard_tenant', $value);\n }elseif( $field == 'be_dashboard_pelaksana' ){\n update_option('be_dashboard_pelaksana', $value);\n \n // Pra-Incubation Notif Setting\n }elseif( $field == 'be_notif_praincubation_confirm' ){\n update_option('be_notif_praincubation_confirm', $value);\n }elseif( $field == 'be_notif_praincubation_confirm2' ){\n update_option('be_notif_praincubation_confirm2', $value);\n }elseif( $field == 'be_notif_praincubation_not_success' ){\n update_option('be_notif_praincubation_not_success', $value);\n }elseif( $field == 'be_notif_praincubation_not_success2' ){\n update_option('be_notif_praincubation_not_success2', $value);\n }elseif( $field == 'be_notif_praincubation_success' ){\n update_option('be_notif_praincubation_success', $value);\n }elseif( $field == 'be_notif_praincubation_accepted' ){\n update_option('be_notif_praincubation_accepted', $value);\n \n // Incubation Notif Setting\n }elseif( $field == 'be_notif_incubation_confirm' ){\n update_option('be_notif_incubation_confirm', $value);\n }elseif( $field == 'be_notif_incubation_confirm2' ){\n update_option('be_notif_incubation_confirm2', $value);\n }elseif( $field == 'be_notif_incubation_not_success' ){\n update_option('be_notif_incubation_not_success', $value);\n }elseif( $field == 'be_notif_incubation_not_success2' ){\n update_option('be_notif_incubation_not_success2', $value);\n }elseif( $field == 'be_notif_incubation_success' ){\n update_option('be_notif_incubation_success', $value);\n }elseif( $field == 'be_notif_incubation_accepted' ){\n update_option('be_notif_incubation_accepted', $value);\n \n // Registration Notif Setting\n }elseif( $field == 'be_notif_registration_selection' ){\n update_option('be_notif_registration_selection', $value);\n }elseif( $field == 'be_notif_registration_pengusul' ){\n update_option('be_notif_registration_pengusul', $value);\n }elseif( $field == 'be_notif_registration_user' ){\n update_option('be_notif_registration_user', $value);\n }elseif( $field == 'be_notif_registration_juri' ){\n update_option('be_notif_registration_juri', $value);\n }elseif( $field == 'be_notif_registration_for_admin' ){\n update_option('be_notif_registration_for_admin', $value);\n }elseif( $field == 'be_notif_selection_for_admin' ){\n update_option('be_notif_selection_for_admin', $value);\n \n // Rated Notif Setting\n }elseif( $field == 'be_notif_rated_selection' ){\n update_option('be_notif_rated_selection', $value);\n \n // Forgot Password Notif Setting\n }elseif( $field == 'be_notif_forgot_password' ){\n update_option('be_notif_forgot_password', $value);\n \n // Contact Notif Setting\n }elseif( $field == 'be_notif_contact' ){\n update_option('be_notif_contact', $value);\n }\n }", "title": "" }, { "docid": "3227d0c8f50d195bb958fcff2493499f", "score": "0.6723218", "text": "public function update_settingsdata() {\n\t\t\tif (isset ( $this->_settingsUpdate )) {\n\t\t\t\t$autoPlay = filter_input ( INPUT_POST, 'autoplay' );\n\t\t\t\t$hdDefault = filter_input ( INPUT_POST, 'HD_default' );\n\t\t\t\t$playListauto = filter_input ( INPUT_POST, 'playlistauto' );\n\t\t\t\t$keyApps = filter_input ( INPUT_POST, 'keyApps' );\n\t\t\t\t$keydisqusApps = filter_input ( INPUT_POST, 'keydisqusApps' );\n\t\t\t\t$embedVisible = filter_input ( INPUT_POST, 'embed_visible' );\n\t\t\t\t$view_visible = filter_input ( INPUT_POST, 'view_visible' );\n\t\t\t\t$ratingscontrol = filter_input ( INPUT_POST, 'ratingscontrol' );\n\t\t\t\t$tagdisplay = filter_input ( INPUT_POST, 'tagdisplay' );\n\t\t\t\t$categorydisplay = filter_input ( INPUT_POST, 'categorydisplay' );\n\t\t\t\t$downLoad = filter_input ( INPUT_POST, 'download' );\n\t\t\t\t$playerTimer = filter_input ( INPUT_POST, 'timer' );\n\t\t\t\t$playerZoom = filter_input ( INPUT_POST, 'zoom' );\n\t\t\t\t$shareEmail = filter_input ( INPUT_POST, 'email' );\n\t\t\t\t$skinAutohide = filter_input ( INPUT_POST, 'skin_autohide' );\n\t\t\t\t$homePopular = filter_input ( INPUT_POST, 'popular' );\n\t\t\t\t$homeRecent = filter_input ( INPUT_POST, 'recent' );\n\t\t\t\t$homeFeature = filter_input ( INPUT_POST, 'feature' );\n\t\t\t\t$homeCategory = filter_input ( INPUT_POST, 'homecategory' );\n\t\t\t\t$playerWidth = filter_input ( INPUT_POST, 'width' );\n\t\t\t\t$playerHeight = filter_input ( INPUT_POST, 'height' );\n\t\t\t\t$stageColor = filter_input ( INPUT_POST, 'stagecolor' );\n\t\t\t\t$commentOption = filter_input ( INPUT_POST, 'comment_option' );\n\t\t\t\t$logoTarget = filter_input ( INPUT_POST, 'logotarget' );\n\t\t\t\t$logopath = filter_input ( INPUT_POST, 'logopathvalue' );\n\t\t\t\t$logoAlign = filter_input ( INPUT_POST, 'logoalign' );\n\t\t\t\t$logoAlpha = filter_input ( INPUT_POST, 'logoalpha' );\n\t\t\t\t$ffmpegPath = filter_input ( INPUT_POST, 'ffmpeg_path' );\n\t\t\t\t$normalScale = filter_input ( INPUT_POST, 'normalscale' );\n\t\t\t\t$fullScreenscale = filter_input ( INPUT_POST, 'fullscreenscale' );\n\t\t\t\t$licenseKey = filter_input ( INPUT_POST, 'license' );\n\t\t\t\t$preRoll = filter_input ( INPUT_POST, 'preroll' );\n\t\t\t\t$postRoll = filter_input ( INPUT_POST, 'postroll' );\n\t\t\t\t$buffer = filter_input ( INPUT_POST, 'buffer' );\n\t\t\t\t$volume = filter_input ( INPUT_POST, 'volume' );\n\t\t\t\t$gutterSpace = filter_input ( INPUT_POST, 'gutterspace' );\n\t\t\t\t$category_page = filter_input ( INPUT_POST, 'category_page' );\n\t\t\t\t$rowsPop = filter_input ( INPUT_POST, 'rowsPop' );\n\t\t\t\t$colPop = filter_input ( INPUT_POST, 'colPop' );\n\t\t\t\t$rowsRec = filter_input ( INPUT_POST, 'rowsRec' );\n\t\t\t\t$colRec = filter_input ( INPUT_POST, 'colRec' );\n\t\t\t\t$rowsFea = filter_input ( INPUT_POST, 'rowsFea' );\n\t\t\t\t$colFea = filter_input ( INPUT_POST, 'colFea' );\n\t\t\t\t$rowCat = filter_input ( INPUT_POST, 'rowCat' );\n\t\t\t\t$colCat = filter_input ( INPUT_POST, 'colCat' );\n\t\t\t\t$rowMore = filter_input ( INPUT_POST, 'rowMore' );\n\t\t\t\t$colMore = filter_input ( INPUT_POST, 'colMore' );\n\t\t\t\t$playList = filter_input ( INPUT_POST, 'playlist' );\n\t\t\t\t$fullScreen = filter_input ( INPUT_POST, 'fullscreen' );\n\t\t\t\t$default_player = 0;\n\t\t\t\t$skinVisible = filter_input ( INPUT_POST, 'skinVisible' );\n\t\t\t\t$skin_opacity = filter_input ( INPUT_POST, 'skin_opacity' );\n\t\t\t\t$subTitleColor = filter_input ( INPUT_POST, 'subTitleColor' );\n\t\t\t\t$subTitleBgColor = filter_input ( INPUT_POST, 'subTitleBgColor' );\n\t\t\t\t$subTitleFontFamily = filter_input ( INPUT_POST, 'subTitleFontFamily' );\n\t\t\t\t$subTitleFontSize = filter_input ( INPUT_POST, 'subTitleFontSize' );\n\t\t\t\t$sharepanel_up_BgColor = filter_input ( INPUT_POST, 'sharepanel_up_BgColor' );\n\t\t\t\t$sharepanel_down_BgColor = filter_input ( INPUT_POST, 'sharepanel_down_BgColor' );\n\t\t\t\t$sharepaneltextColor = filter_input ( INPUT_POST, 'sharepaneltextColor' );\n\t\t\t\t$sendButtonColor = filter_input ( INPUT_POST, 'sendButtonColor' );\n\t\t\t\t$sendButtonTextColor = filter_input ( INPUT_POST, 'sendButtonTextColor' );\n\t\t\t\t$textColor = filter_input ( INPUT_POST, 'textColor' );\n\t\t\t\t$skinBgColor = filter_input ( INPUT_POST, 'skinBgColor' );\n\t\t\t\t$seek_barColor = filter_input ( INPUT_POST, 'seek_barColor' );\n\t\t\t\t$buffer_barColor = filter_input ( INPUT_POST, 'buffer_barColor' );\n\t\t\t\t$skinIconColor = filter_input ( INPUT_POST, 'skinIconColor' );\n\t\t\t\t$pro_BgColor = filter_input ( INPUT_POST, 'pro_BgColor' );\n\t\t\t\t$playButtonColor = filter_input ( INPUT_POST, 'playButtonColor' );\n\t\t\t\t$playButtonBgColor = filter_input ( INPUT_POST, 'playButtonBgColor' );\n\t\t\t\t$playerButtonColor = filter_input ( INPUT_POST, 'playerButtonColor' );\n\t\t\t\t$playerButtonBgColor = filter_input ( INPUT_POST, 'playerButtonBgColor' );\n\t\t\t\t$relatedVideoBgColor = filter_input ( INPUT_POST, 'relatedVideoBgColor' );\n\t\t\t\t$scroll_barColor = filter_input ( INPUT_POST, 'scroll_barColor' );\n\t\t\t\t$scroll_BgColor = filter_input ( INPUT_POST, 'scroll_BgColor' );\n\t\t\t\t$playlist_open = filter_input ( INPUT_POST, 'playlist_open' );\n\t\t\t\t$showPlaylist = filter_input ( INPUT_POST, 'showPlaylist' );\n\t\t\t\t$midroll_ads = filter_input ( INPUT_POST, 'midroll_ads' );\n\t\t\t\t$adsSkip = filter_input ( INPUT_POST, 'adsSkip' );\n\t\t\t\t$adsSkipDuration = filter_input ( INPUT_POST, 'adsSkipDuration' );\n\t\t\t\t$relatedVideoView = filter_input ( INPUT_POST, 'relatedVideoView' );\n\t\t\t\t$imaAds = filter_input ( INPUT_POST, 'imaAds' );\n\t\t\t\t$trackCode = filter_input ( INPUT_POST, 'trackCode' );\n\t\t\t\t$showTag = filter_input ( INPUT_POST, 'showTag' );\n\t\t\t\t$shareIcon = filter_input ( INPUT_POST, 'shareIcon' );\n\t\t\t\t$volumecontrol = filter_input ( INPUT_POST, 'volumecontrol' );\n\t\t\t\t$playlist_auto = filter_input ( INPUT_POST, 'playlistauto' );\n\t\t\t\t$progressControl = filter_input ( INPUT_POST, 'progressControl' );\n\t\t\t\t$imageDefault = filter_input ( INPUT_POST, 'imageDefault' );\n\t\t\t\t$showSocialIcon = filter_input ( INPUT_POST, 'showSocialIcon' );\n\t\t\t\t$showPostedBy = filter_input ( INPUT_POST, 'ShowPostBy' );\n\t\t\t\t$recent_video_order = filter_input ( INPUT_POST, 'recent_video_order' );\n\t\t\t\t$related_video_count = filter_input ( INPUT_POST, 'related_video_count' );\n\t\t\t\t$report_visible = filter_input ( INPUT_POST, 'report_visible' );\n\t\t\t\t$amazonbuckets_enable = filter_input ( INPUT_POST, 'amazonbuckets_enable' ); // Amazon S3 Bucket field Details\n\t\t\t\t$amazonbuckets_name = filter_input ( INPUT_POST, 'amazonbuckets_name' );\n\t\t\t\t$amazonbuckets_link = filter_input ( INPUT_POST, 'amazonbuckets_link' );\n\t\t\t\t$amazon_bucket_access_key = filter_input ( INPUT_POST, 'amazon_bucket_access_key' );\n\t\t\t\t$amazon_bucket_access_secretkey = filter_input ( INPUT_POST, 'amazon_bucket_access_secretkey' );\n\t\t\t\t$user_allowed_method = filter_input ( INPUT_POST, 'user_allowed_method', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );\n\n\t\t\t\tif(!empty($user_allowed_method)){\n\t\t\t\t\t$user_allowed_method = implode ( ',', $user_allowed_method );\n\t\t\t\t}\n\n\t\t\t\t$iframe_visible = filter_input ( INPUT_POST, 'iframe_visible' );\n\t\t\t\t$googleadsense_visible = filter_input ( INPUT_POST, 'googleadsense_visible' );\n\t\t\t\t$show_added_on = filter_input ( INPUT_POST,'show_added_on' );\n\t\t\t\t$member_upload_enable = filter_input ( INPUT_POST,'member_upload_enable' );\n\t\t\t\t$show_title = filter_input ( INPUT_POST,'showTitle' );\n\t\t\t\t$show_related_video = filter_input ( INPUT_POST,'show_related_video' );\n\t\t\t\t$show_rss_icon = filter_input ( INPUT_POST,'show_rss_icon' );\n\t\t\t\t$youtube_key = filter_input ( INPUT_POST, 'youtube_key' );\n\t\t\t\t$player_color = array (\n\t\t\t\t\t\t'sharepanel_up_BgColor' => $sharepanel_up_BgColor,\n\t\t\t\t\t\t'sharepanel_down_BgColor' => $sharepanel_down_BgColor,\n\t\t\t\t\t\t'sharepaneltextColor' => $sharepaneltextColor,\n\t\t\t\t\t\t'sendButtonColor' => $sendButtonColor,\n\t\t\t\t\t\t'sendButtonTextColor' => $sendButtonTextColor,\n\t\t\t\t\t\t'textColor' => $textColor,\n\t\t\t\t\t\t'skinBgColor' => $skinBgColor,\n\t\t\t\t\t\t'seek_barColor' => $seek_barColor,\n\t\t\t\t\t\t'buffer_barColor' => $buffer_barColor,\n\t\t\t\t\t\t'skinIconColor' => $skinIconColor,\n\t\t\t\t\t\t'pro_BgColor' => $pro_BgColor,\n\t\t\t\t\t\t'playButtonColor' => $playButtonColor,\n\t\t\t\t\t\t'playButtonBgColor' => $playButtonBgColor,\n\t\t\t\t\t\t'playerButtonColor' => $playerButtonColor,\n\t\t\t\t\t\t'playerButtonBgColor' => $playerButtonBgColor,\n\t\t\t\t\t\t'relatedVideoBgColor' => $relatedVideoBgColor,\n\t\t\t\t\t\t'scroll_barColor' => $scroll_barColor,\n\t\t\t\t\t\t'scroll_BgColor' => $scroll_BgColor,\n\t\t\t\t\t\t'skinVisible' => $skinVisible,\n\t\t\t\t\t\t'skin_opacity' => $skin_opacity,\n\t\t\t\t\t\t'subTitleColor' => $subTitleColor,\n\t\t\t\t\t\t'subTitleBgColor' => $subTitleBgColor,\n\t\t\t\t\t\t'subTitleFontFamily' => $subTitleFontFamily,\n\t\t\t\t\t\t'subTitleFontSize' => $subTitleFontSize,\n\t\t\t\t\t\t'show_social_icon' => $showSocialIcon,\n\t\t\t\t\t\t'show_posted_by' => $showPostedBy,\n\t\t\t\t\t\t'show_related_video'=>$show_related_video,\n\t\t\t\t\t\t'recentvideo_order' => $recent_video_order,\n\t\t\t\t\t\t'related_video_count' => $related_video_count,\n\t\t\t\t\t\t'report_visible' => $report_visible,\n\t\t\t\t\t\t'amazon_bucket_access_secretkey' => $amazon_bucket_access_secretkey,\n\t\t\t\t\t\t'amazon_bucket_access_key' => $amazon_bucket_access_key,\n\t\t\t\t\t\t'amazonbuckets_link' => $amazonbuckets_link,\n\t\t\t\t\t\t'amazonbuckets_name' => $amazonbuckets_name,\n\t\t\t\t\t\t'amazonbuckets_enable' => $amazonbuckets_enable,\n\t\t\t\t\t\t'user_allowed_method' => $user_allowed_method,\n\t\t\t\t\t\t'iframe_visible' => $iframe_visible,\n\t\t\t\t\t\t'googleadsense_visible' => $googleadsense_visible,\n\t\t\t\t\t\t'show_added_on' => $show_added_on,\n\t\t\t\t\t\t'member_upload_enable' => $member_upload_enable,\n\t\t\t\t\t\t'showTitle' =>$show_title,\n\t\t\t\t\t\t'show_rss_icon' =>$show_rss_icon,\n\t\t\t\t\t\t'youtube_key'=>$youtube_key,\n\t\t\t\t);\n\t\t\t\t$settingsData = array (\n\t\t\t\t\t\t'default_player' => $default_player,\n\t\t\t\t\t\t'category_page' => $category_page,\n\t\t\t\t\t\t'autoplay' => $autoPlay,\n\t\t\t\t\t\t'HD_default' => $hdDefault,\n\t\t\t\t\t\t'playlistauto' => $playListauto,\n\t\t\t\t\t\t'keyApps' => $keyApps,\n\t\t\t\t\t\t'keydisqusApps' => $keydisqusApps,\n\t\t\t\t\t\t'embed_visible' => $embedVisible,\n\t\t\t\t\t\t'view_visible' => $view_visible,\n\t\t\t\t\t\t'ratingscontrol' => $ratingscontrol,\n\t\t\t\t\t\t'tagdisplay' => $tagdisplay,\n\t\t\t\t\t\t'categorydisplay' => $categorydisplay,\n\t\t\t\t\t\t'download' => $downLoad,\n\t\t\t\t\t\t'timer' => $playerTimer,\n\t\t\t\t\t\t'zoom' => $playerZoom,\n\t\t\t\t\t\t'email' => $shareEmail,\n\t\t\t\t\t\t'skin_autohide' => $skinAutohide,\n\t\t\t\t\t\t'popular' => $homePopular,\n\t\t\t\t\t\t'recent' => $homeRecent,\n\t\t\t\t\t\t'feature' => $homeFeature,\n\t\t\t\t\t\t'homecategory' => $homeCategory,\n\t\t\t\t\t\t'width' => $playerWidth,\n\t\t\t\t\t\t'height' => $playerHeight,\n\t\t\t\t\t\t'stagecolor' => $stageColor,\n\t\t\t\t\t\t'comment_option' => $commentOption,\n\t\t\t\t\t\t'logo_target' => $logoTarget,\n\t\t\t\t\t\t'logoalign' => $logoAlign,\n\t\t\t\t\t\t'logoalpha' => $logoAlpha,\n\t\t\t\t\t\t'ffmpeg_path' => $ffmpegPath,\n\t\t\t\t\t\t'normalscale' => $normalScale,\n\t\t\t\t\t\t'fullscreenscale' => $fullScreenscale,\n\t\t\t\t\t\t'license' => $licenseKey,\n\t\t\t\t\t\t'preroll' => $preRoll,\n\t\t\t\t\t\t'postroll' => $postRoll,\n\t\t\t\t\t\t'buffer' => $buffer,\n\t\t\t\t\t\t'volume' => $volume,\n\t\t\t\t\t\t'gutterspace' => $gutterSpace,\n\t\t\t\t\t\t'rowsPop' => $rowsPop,\n\t\t\t\t\t\t'colPop' => $colPop,\n\t\t\t\t\t\t'rowsRec' => $rowsRec,\n\t\t\t\t\t\t'colRec' => $colRec,\n\t\t\t\t\t\t'rowsFea' => $rowsFea,\n\t\t\t\t\t\t'colFea' => $colFea,\n\t\t\t\t\t\t'rowCat' => $rowCat,\n\t\t\t\t\t\t'colCat' => $colCat,\n\t\t\t\t\t\t'rowMore' => $rowMore,\n\t\t\t\t\t\t'colMore' => $colMore,\n\t\t\t\t\t\t'playlist' => $playList,\n\t\t\t\t\t\t'fullscreen' => $fullScreen,\n\t\t\t\t\t\t'player_colors' => serialize ($player_color),\n\t\t\t\t\t\t'playlist_open' => $playlist_open,\n\t\t\t\t\t\t'showPlaylist' => $showPlaylist,\n\t\t\t\t\t\t'midroll_ads' => $midroll_ads,\n\t\t\t\t\t\t'adsSkip' => $adsSkip,\n\t\t\t\t\t\t'adsSkipDuration' => $adsSkipDuration,\n\t\t\t\t\t\t'relatedVideoView' => $relatedVideoView,\n\t\t\t\t\t\t'imaAds' => $imaAds,\n\t\t\t\t\t\t'trackCode' => $trackCode,\n\t\t\t\t\t\t'showTag' => $showTag,\n\t\t\t\t\t\t'shareIcon' => $shareIcon,\n\t\t\t\t\t\t'volumecontrol' => $volumecontrol,\n\t\t\t\t\t\t'playlist_auto' => $playlist_auto,\n\t\t\t\t\t\t'progressControl' => $progressControl,\n\t\t\t\t\t\t'imageDefault' => $imageDefault,\t\t\t\t\t\t\n\t\t\t\t);\n\t\t\t\t\t\t\t\t\n\t\t\t\t$wp_upload_dir = wp_upload_dir(); // Upload directory path\n $image_path = $wp_upload_dir['basedir'] . '/videogallery/';\n \n if ( isset( $_FILES['logopath']['name'] ) && $_FILES ['logopath'] ['name'] != '') {\n\t\t\t\t\t$allowedExtensions = array (\n\t\t\t\t\t\t\t'jpg',\n\t\t\t\t\t\t\t'jpeg',\n\t\t\t\t\t\t\t'png',\n\t\t\t\t\t\t\t'gif' \n\t\t\t\t\t);\n\t\t\t\t\t$logoImage = strtolower ( $_FILES ['logopath'] ['name'] );\n\t\t\t\t\tif ( $logoImage && in_array ( end ( explode ( '.', $logoImage ) ), $allowedExtensions )) {\n\t\t\t\t\t\t$settingsData ['logopath'] = $_FILES ['logopath'] ['name'];\n\t\t\t\t\t\tmove_uploaded_file ( $_FILES ['logopath'] ['tmp_name'], $image_path . $_FILES ['logopath'] ['name'] );\n\t\t\t\t\t} else {\t\t\t\t\n\t\t\t\t\t $this->admin_redirect ( 'admin.php?page=hdflvvideosharesettings&extension=1' );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$settingsData ['logopath'] = $logopath;\n\t\t\t\t}\n\t\t\t\t$settingsDataformat = array (\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%d',\n\t\t\t\t\t\t'%s' \n\t\t\t\t);\n\t\t\t\t$updateflag = $this->update_settings ( $settingsData, $settingsDataformat );\n\t\t\t\tif ($updateflag) {\n\t\t\t\t\t$this->admin_redirect ( 'admin.php?page=hdflvvideosharesettings&update=1' );\n\t\t\t\t} else {\n\t\t\t\t\t$this->admin_redirect ( 'admin.php?page=hdflvvideosharesettings&update=0' );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5e2644ae1b1953497d2c6b85f964da30", "score": "0.6719341", "text": "function setSettings() {\n\n\t}", "title": "" }, { "docid": "20069bdab3ed875850e661409cb4e491", "score": "0.6699908", "text": "function m_systemSettings()\n\t{\n\t\t#INTIALIZING TEMPLATES\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\", GRAPHICS_PATH);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SITEURL\",SITE_URL);\n\t\t$this->ObTpl->set_file(\"TPL_SETTING_FILE\", $this->settingsTemplate);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",\"\");\n\t\t\n\t\t$this->ObTpl->set_block(\"TPL_SETTING_FILE\",\"TPL_DSPMSG_BLK\",\"dspmsg_blk\");\n\t\t\n\t\t$this->ObTpl->set_var(\"dspmsg_blk\",\"\");\n\t\t$this->ObTpl->set_block(\"TPL_SETTING_FILE\",\"COMPUTER_ENCODING_BLK\",\"COMPUTER_ENCODING_BLKs\");\n\t\t$this->ObTpl->set_var(\"COMPUTER_ENCODING_BLKs\",'');\n\n\t\tif(isset($this->request['msg']))\n\t\t{\n\t\t\tif($this->request['msg']==1)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_FILE_OPEN);\n\t\t\t\t$this->ObTpl->parse(\"dspmsg_blk\",\"TPL_DSPMSG_BLK\");\n\t\t\t}\n\t\t\telseif($this->request['msg']==2)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_FILE_NOWRITE);\n\t\t\t\t$this->ObTpl->parse(\"dspmsg_blk\",\"TPL_DSPMSG_BLK\");\n\t\t\t}\n\t\t\telseif($this->request['msg']==3)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_FILE_NOWRITABLE);\n\t\t\t\t$this->ObTpl->parse(\"dspmsg_blk\",\"TPL_DSPMSG_BLK\");\n\t\t\t}\n\t\t\telseif($this->request['msg']==4)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_SYSTEMSETTING_UPDATED);\n\t\t\t\t$this->ObTpl->parse(\"dspmsg_blk\",\"TPL_DSPMSG_BLK\");\n\t\t\t}\n\t\t}\n\t\tif($this->err==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$this->errMsg);\n\t\t\t$this->ObTpl->parse(\"dspmsg_blk\",\"TPL_DSPMSG_BLK\");\n\t\t}\n\n\n\t\t$this->obDb->query = \"SELECT * FROM \".SITESETTINGS;\n\t\t$row_setting=$this->obDb->fetchQuery();\n\t\t$rCount=$this->obDb->record_count;\n\t\t\n\t\tfor($i=0;$i<$rCount;$i++)\n\t\t{\n\t\t\tswitch($row_setting[$i]->vDatatype)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tcase \"dbServer\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_DBSERVER\",$this->getValue($row_setting[$i]->vSmalltext,\"dbServer\"));\n\t\t\t\tbreak;\n\t\t\t\tcase \"dsn\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_DSN\",$this->getValue($row_setting[$i]->vSmalltext,\"dsn\"));\n\t\t\t\tbreak;\n\t\t\t\tcase \"dbType\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_DBTYPE\",$this->getValue($row_setting[$i]->vSmalltext,\"dbType\"));\n\t\t\t\tbreak;\n\t\t\t\tcase \"dbPrefix\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_DBPREFIX\",$this->libFunc->m_displayContent($this->getValue($row_setting[$i]->vSmalltext,\"dbPrefix\")));\n\t\t\t\tbreak;\n\t\t\t\tcase \"dbUserName\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_USERNAME\",$this->libFunc->m_displayContent($this->getValue($row_setting[$i]->vSmalltext,\"dbUserName\")));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"dbPassword\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_PASSWORD\",$this->getValue($row_setting[$i]->vSmalltext,\"dbPassword\"));\n\t\t\t\tbreak;\n\t\t\t\tcase \"SITEURL\":\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_URLROOT\",$this->getValue($row_setting[$i]->vSmalltext,\"SITEURL\"));\n\t\t\t\tbreak;\n\n\t\t\t\tcase \"SITEPATH\":\n\t\t\t\t$row_setting[$i]->vSmalltext=addslashes($row_setting[$i]->vSmalltext);\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SITEDIRECTORY\",$this->libFunc->m_displayContent($this->getValue($row_setting[$i]->vSmalltext,\"SITEPATH\")));\n\t\t\t\tbreak;\n\t\n\t\t\t\tcase \"ADMINEMAIL\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ADMINEMAIL\",$this->libFunc->m_displayContent($this->getValue($row_setting[$i]->vSmalltext,\"ADMINEMAIL\")));\n\t\t\t\tbreak;\n\t\t\t\tcase \"CURRENCY\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CURRENCY\",$this->libFunc->m_displayContent($this->getValue($row_setting[$i]->vSmalltext,\"CURRENCY\")));\n\t\t\t\tbreak;\n\n\t\t\t\tcase \"cartSecureServer\":\n\t\t\t\t\t$this->ObTpl->set_var(\"CART_SECURE_SERVER\",$this->getValue($row_setting[$i]->vSmalltext,\"cartSecureServer\"));\n\t\t\t\tbreak;\n\n\t\t\t\tcase \"systemstate\":\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SYSTEM\",$this->displayIt($row_setting[$i]->vSmalltext));\n\t\t\t\tbreak;\n\t\t\t\tcase \"SMTP_AUTH\":\n\t\t\t\tif(!isset($this->request['SMTP_USERNAME'])){\n\t\t\t\t\t$smtpAuth=$row_setting[$i]->vSmalltext;\n\t\t\t\t}else{\n\t\t\t\t\t$smtpAuth=$this->libFunc->ifSet($this->request,\"SMTP_AUTH\",0);\n\t\t\t\t}\n\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SMTP_AUTH\",$this->displayIt($smtpAuth));\n\t\t\t\tbreak;\n\t\t\t\tcase \"SMTP_USERNAME\":\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SMTP_USERNAME\",$this->libFunc->m_displayContent($this->getValue($row_setting[$i]->vSmalltext,\"SMTP_USERNAME\")));\n\t\t\t\tbreak;\n\t\t\t\tcase \"SMTP_PASSWORD\":\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SMTP_PASSWORD\",$this->libFunc->m_displayContent($this->getValue($row_setting[$i]->vSmalltext,\"SMTP_PASSWORD\")));\n\t\t\t\tbreak;\n\t\t\t\tcase \"SMTP_HOST\":\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SMTP_HOST\",$this->libFunc->m_displayContent($this->getValue($row_setting[$i]->vSmalltext,\"SMTP_HOST\")));\n\t\t\t\tbreak;\n\t\t\t\tcase \"cencoding\":\t\t\t\t\t//$this->ObTpl->set_var(\"TPL_VAR_CENCODING\",$this->libFunc->m_displayContent($row_setting[$i]->vSmalltext));\n\t\t\t\t$computerEncoding=unserialize(COMPUTER_ENCODING);\n\t\t\t\t$this->libFunc->multi_chk_or_selectbox($this->ObTpl,'COMPUTER_ENCODING_BLK',$computerEncoding,$row_setting[$i]->vSmalltext,'selected');\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}#END SWITCH\n\t\t}#END FOR LOOP\n\t\n\t\t#ASSIGNING FORM VARAIABLES\n\t\t\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_SETTING_FILE\"));\n\t}", "title": "" }, { "docid": "274ab3bb4faa0f360d35b23d0dee67ab", "score": "0.66864973", "text": "public function settings()\n {\n }", "title": "" }, { "docid": "274ab3bb4faa0f360d35b23d0dee67ab", "score": "0.66864973", "text": "public function settings()\n {\n }", "title": "" }, { "docid": "a3e05fc9ef519a45395c2da2d06e6464", "score": "0.66810304", "text": "public function settings() {}", "title": "" }, { "docid": "2c61f9caccf0ae446b7590dff3008e85", "score": "0.66793066", "text": "protected function define_my_settings() {\n }", "title": "" }, { "docid": "3662b580a2bba758e83ce943ac50051b", "score": "0.66701126", "text": "protected function define_my_settings()\n {\n }", "title": "" }, { "docid": "2005576ba9e3574aa8c51986de9e5b17", "score": "0.6668505", "text": "private static function Settings()\n {\n self::SetDebugMode(ICEBERG_DEBUG_MODE);\n self::CompatibleVersion();\n }", "title": "" }, { "docid": "dd580a3573d8d480fb801d03c40e923f", "score": "0.665341", "text": "protected function defineSettings(){ \n $this->settings(array());\n }", "title": "" }, { "docid": "a7453c8b29168f8eedafc7c69d13323d", "score": "0.66448003", "text": "function templatic_save_settings() {\r\n global $pagenow;\r\n $settings = get_option( \"templatic_settings\" ); \r\n $filename = basename($_SERVER['PHP_SELF']);\r\n if ( $filename == 'admin.php' && $_GET['page'] == 'templatic_settings' )\r\n {\t\t\r\n\t\t/* POST BLOCKED IP ADDRESSES */\r\n\t\t\t/* CALL A FUNCTION TO SAVE IP DATA */\t\r\n\t\tif(function_exists('insert_ip_address_data')){\r\n\t\t\tforeach(explode(',',$_POST['block_ip']) as $ips){\r\n\t\t\t\t$ipsss[] = trim(preg_replace('/\\s+/', '', $ips));\r\n\t\t\t}\r\n\t\t\t$ipsss = implode(',',$ipsss);\r\n\t\t\tinsert_ip_address_data($ipsss);\r\n\t\t}\r\n\t\t/*Saving general settings data: Start*/\r\n\t\t\r\n\t\t\t\r\n\t\tif(isset($_REQUEST['tab']) && $_REQUEST['tab']==\"security-settings\" || $_REQUEST['tab']==\"\"){\r\n\t\t\t$_POST['site_key']=($_POST['site_key'])?$_POST['site_key']:'';\r\n\t\t\t$_POST['secret']=($_POST['secret'])?$_POST['secret']:'';\r\n\t\t\t$_POST['comments_theme']=($_POST['comments_theme'])?$_POST['comments_theme']:'';\r\n\t\t\t$_POST['captcha_language']=($_POST['captcha_language'])?$_POST['captcha_language']:'';\r\n\t\t\t$_POST['user_verification_page']=isset($_POST['user_verification_page'])?$_POST['user_verification_page']:array();\t\t\r\n\t\t\t$_POST['templatic-is_allow_ssl']=isset($_POST['templatic-is_allow_ssl'])?$_POST['templatic-is_allow_ssl']:'No';\r\n\t\t}\t\r\n\t\tif(isset($_REQUEST['tab']) && $_REQUEST['tab']==\"email\")\r\n\t\t{\r\n\t\t\t$_POST['send_to_frnd']=($_POST['send_to_frnd'])?$_POST['send_to_frnd']:'';\t\t\r\n\t\t\t$_POST['send_inquiry']=($_POST['send_inquiry'])?$_POST['send_inquiry']:'';\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif((isset($_REQUEST['tab']) && @$_REQUEST['tab']==\"general\") || $_REQUEST['tab']==\"\")\r\n\t\t{\r\n\t\t\t$_POST['tev_accept_term_condition']=isset($_POST['tev_accept_term_condition'])?$_POST['tev_accept_term_condition']:'';\t\r\n\t\t\t$_POST['sorting_option']=isset($_POST['sorting_option'])?$_POST['sorting_option']:array();\r\n\t\t\t$_POST['home_listing_type_value']=isset($_POST['home_listing_type_value'])?$_POST['home_listing_type_value']:array();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$_POST['facebook_share_detail_page']=isset($_POST['facebook_share_detail_page'])?$_POST['facebook_share_detail_page']:array();\r\n\t\t\t$_POST['google_share_detail_page']=isset($_POST['google_share_detail_page'])?$_POST['google_share_detail_page']:array();\r\n\t\t\t$_POST['twitter_share_detail_page']=isset($_POST['twitter_share_detail_page'])?$_POST['twitter_share_detail_page']:array();\r\n\t\t\t$_POST['pintrest_detail_page']=isset($_POST['pintrest_detail_page'])?$_POST['pintrest_detail_page']:array();\r\n\t\t\t$_POST['templatin_rating']=isset($_POST['templatin_rating'])?$_POST['templatin_rating']:array();\r\n\t\t\t$_POST['validate_rating']=isset($_POST['validate_rating'])?$_POST['validate_rating']:array();\r\n\t\t\t$_POST['allow_autologin_after_reg']=isset($_POST['allow_autologin_after_reg'])?$_POST['allow_autologin_after_reg']:array();\r\n\t\t\t\r\n\t\t\t$_POST['show_dashboard_bar']=isset($_POST['show_dashboard_bar'])?$_POST['show_dashboard_bar']:array();\r\n\t\t\t\r\n\t\t\t$_POST['templatic_view_counter']=isset($_POST['templatic_view_counter'])?$_POST['templatic_view_counter']:'No';\r\n\t\t\t$_POST['pippoint_oncategory']=isset($_POST['pippoint_oncategory'])?$_POST['pippoint_oncategory']:'0';\r\n\t\t\t\r\n\t\t\t$_POST['google_map_show']=isset($_POST['google_map_show'])?$_POST['google_map_show']:'No';\r\n\t\t\t$_POST['google_map_full_width']=isset($_POST['google_map_full_width'])?$_POST['google_map_full_width']:'No';\r\n\t\t\t$_POST['google_map_hide']=isset($_POST['google_map_hide'])?$_POST['google_map_hide']:'No';\r\n\t\t\t$_POST['tmpl_api_key']=isset($_POST['tmpl_api_key'])?$_POST['tmpl_api_key']:'';\r\n\t\t\t\r\n\t\t\t$_POST['direction_map']=isset($_POST['direction_map'])?$_POST['direction_map']:'No';\r\n\t\t\t$_POST['category_googlemap_widget']=isset($_POST['category_googlemap_widget'])?$_POST['category_googlemap_widget']:'no';\r\n\t\t\t\r\n\t\t\t$_POST['templatic-category_custom_fields']=isset($_POST['templatic-category_custom_fields'])?$_POST['templatic-category_custom_fields']:'No';\r\n\t\t\t\r\n\t\t\t$_POST['templatic-category_custom_search_fields']=isset($_POST['templatic-category_custom_search_fields'])?$_POST['templatic-category_custom_search_fields']:'No';\r\n\t\t\t\r\n\t\t\t$_POST['claim_post_type_value']=isset($_POST['claim_post_type_value'])?$_POST['claim_post_type_value']:'';\t\t\r\n\t\t\t$_POST['listing_hide_excerpt']=(isset($_POST['listing_hide_excerpt']))?$_POST['listing_hide_excerpt']:array();\t\t\r\n\t\t\t$_POST['related_post_type']=(isset($_POST['related_post_type']))?$_POST['related_post_type']:array();\r\n\t\t\t\r\n\t\t\t$_POST['allow_facebook_login']=isset($_POST['allow_facebook_login'])?$_POST['allow_facebook_login']:'';\r\n\t\t\t$_POST['facebook_key']=isset($_POST['facebook_key'])?$_POST['facebook_key']:'';\r\n\t\t\t$_POST['facebook_secret_key']=isset($_POST['facebook_secret_key'])?$_POST['facebook_secret_key']:'';\r\n\t\t\t$_POST['allow_google_login']=isset($_POST['allow_google_login'])?$_POST['allow_google_login']:'';\r\n\t\t\t$_POST['google_key']=isset($_POST['google_key'])?$_POST['google_key']:'';\r\n\t\t\t$_POST['google_secret_key']=isset($_POST['google_secret_key'])?$_POST['google_secret_key']:'';\r\n\t\t\t$_POST['allow_twitter_login']=isset($_POST['allow_twitter_login'])?$_POST['allow_twitter_login']:'';\r\n\t\t\t$_POST['twitter_key']=isset($_POST['twitter_key'])?$_POST['twitter_key']:'';\r\n\t\t\t$_POST['twitter_secret_key']=isset($_POST['twitter_secret_key'])?$_POST['twitter_secret_key']:'';\r\n\t\t}\r\n\t\tforeach($_POST as $key=>$val)\r\n\t\t{\r\n\t\t\t$settings[$key] = ($_POST[$key] || $_POST[$key]==0) ? $_POST[$key] : '';\r\n\t\t\tupdate_option('templatic_settings',$settings);\r\n\t\t}\r\n\t\t/* Saving general settings data: Start */\r\n }\r\n \r\n do_action('templatic_save_extra_settings');\r\n}", "title": "" }, { "docid": "83961ea899b5cba8cda74a41927933b4", "score": "0.6635878", "text": "public function getGeneralSettings(){\n\t\t\n\t\t$settings_sql \t\t= \"SELECT \n\t\t\t\t\t\t\t\t\tapplication_name,\n\t\t\t\t\t\t\t\t\tadmin_email,\n\t\t\t\t\t\t\t\t\tadmin_email_label,\n\t\t\t\t\t\t\t\t\tbackend_email,\n\t\t\t\t\t\t\t\t\tbackend_email_label,\n\t\t\t\t\t\t\t\t\tmail_cc_to,\n\t\t\t\t\t\t\t\t\tsend_live_mails,\n\t\t\t\t\t\t\t\t\tauto_bids_close,\n\t\t\t\t\t\t\t\t\tauto_bids_close_cronjob_time,\n\t\t\t\t\t\t\t\t\tsend_reminder_mails_to_borrower,\n\t\t\t\t\t\t\t\t\treminder_mails_days_before_due_date,\n\t\t\t\t\t\t\t\t\tmail_driver,\n\t\t\t\t\t\t\t\t\tmail_host,\n\t\t\t\t\t\t\t\t\tmail_port,\n\t\t\t\t\t\t\t\t\tmail_encryption,\n\t\t\t\t\t\t\t\t\tmail_username,\n\t\t\t\t\t\t\t\t\tmail_password,\n\t\t\t\t\t\t\t\t\tmonthly_pay_by_date,\n\t\t\t\t\t\t\t\t\tloan_fixed_fees,\n\t\t\t\t\t\t\t\t\tloan_fees_percent,\n\t\t\t\t\t\t\t\t\tloan_fees_minimum_applicable,\n\t\t\t\t\t\t\t\t\tpenalty_fee_minimum,\n\t\t\t\t\t\t\t\t\tpenalty_fee_percent,\n\t\t\t\t\t\t\t\t\tpenalty_interest,\n\t\t\t\t\t\t\t\t\ttoc_investor,\n\t\t\t\t\t\t\t\t\ttoc_borrower,\n\t\t\t\t\t\t\t\t\tfirsttime_borrower_popup,\n\t\t\t\t\t\t\t\t\tfirsttime_investor_popup\n\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\tsystem_settings\";\n\t\t\t\t\t\t\t\n\t\t$result\t\t\t\t=\t$this->dbFetchAll($settings_sql);\n\t\t\n\t\t$this->settingsList = \t$result;\t\t\t\t\t\t\n\t\t \n\t}", "title": "" }, { "docid": "b904b14d6b2301327789317831fb0c7e", "score": "0.6635607", "text": "function extapi_settings_page()\n{\n\tglobal $extapi_available_functions;\n include('settings_page.php');\n}", "title": "" }, { "docid": "ea7baa4ebea2e1b973a55ca06ce1bd5a", "score": "0.6626935", "text": "public function settings()\n\t{\n\t\t$factory = $this->session->userdata('factory');\n\t\t$fields = array(\n\t\t\t'forg' => makePrefixedField('Your Organization', 'org', $factory->org, 'https://github.com/', \"Name of your team's organization on Github.\"),\n\t\t\t'frepo' => makePrefixedField('Your Repository', 'repo', $factory->repo, 'https://github.com/.../', \"Name of your team repository, inside the above organization.\"),\n\t\t\t'fbranch' => makeRadioButtons('Branch to Deploy', 'branch', $factory->branch, ['master' => 'master', 'develop' => 'develop'], \"Which branch would you like automatically deployed for testing?\"),\n\t\t\t'fwebsite' => makePrefixedField('External website?', 'website', $factory->website, 'https://', \"URL for your team website, if not hosted on Umbrella's server. \" .\n\t\t\t\t\t\"This is important for the final assignment, when other plants will want to buy or sell parts with you.\"),\n\t\t\t'zsubmit' => makeSubmitButton('Update my settings', \"Click on home or <back> if you don't want to change anything!\", 'btn-success'),\n\t\t);\n\t\t$this->data = array_merge($this->data, $fields);\n\n\t\t$this->data['pagebody'] = 'settings';\n\t\t$this->render();\n\t}", "title": "" }, { "docid": "06a37cd605805ea75d8ff260c95ad82d", "score": "0.6621287", "text": "public function generalSettings($action='')\n {\n checkPermission(4);\n $data=array(); \n $data['settings']=$this->Adminmodel->getAllSettings();\n $data['timezone']=timezone_list();\n if($action=='asyn'){\n $this->load->view('content/General_settings',$data);\n }else if($action==''){ \n $this->load->view('theme/include/header');\n $this->load->view('content/General_settings',$data);\n $this->load->view('theme/include/footer');\n }\n\n //update general Settings \n if($action=='update'){\n $data = array(\n array(\n 'settings' => 'company_name' ,\n 'value' => $this->input->post(\"company-name\",true)\n ),\n array(\n 'settings' => 'language' ,\n 'value' => $this->input->post(\"language\",true)\n ),\n array(\n 'settings' => 'currency_code' ,\n 'value' => $this->input->post(\"cur-symbol\",true)\n ),\n array(\n 'settings' => 'email_address' ,\n 'value' => $this->input->post(\"email\",true)\n ),\n array(\n 'settings' => 'address' ,\n 'value' => $this->input->post(\"address\",true)\n ),\n array(\n 'settings' => 'phone' ,\n 'value' => $this->input->post(\"phone\",true)\n ),\n array(\n 'settings' => 'website' ,\n 'value' => $this->input->post(\"website\",true)\n ),\n array(\n 'settings' => 'timezone' ,\n 'value' => $this->input->post(\"timezone\",true)\n )\n );\n //-----Validation-----// \n $this->form_validation->set_rules('company-name', 'Company Name', 'trim|required|min_length[2]|max_length[50]');\n if (!$this->form_validation->run() == FALSE)\n {\n //Update Code\n $this->db->update_batch('settings', $data, 'settings');\n echo \"true\";\n //Finish Update Code\n }else{\n echo validation_errors('<span class=\"ion-android-alert failedAlert2\"> ','</span>');\n }\n\n }\n\n }", "title": "" }, { "docid": "4635bfdb1e97b88c1df2e8d4592c483e", "score": "0.6613333", "text": "function setting_custom_settings() {\n\n // Section 01\n add_settings_section('setting_general_section', 'Sub Heading', 'setting_general_section_function', 'setting_parent_slug');\n\n // Register 01\n register_setting('setting_general_group', 'email_id');\n\n // Settings field 01\n add_settings_field('setting_emailid_id', 'Email Id', 'setting_emailid_field_function', 'setting_parent_slug', 'setting_general_section');\n\n }", "title": "" }, { "docid": "83269730cc6bb7611d1e536b8352a0a0", "score": "0.6605274", "text": "private static function add_settings() {\n\t\t$page = Voce_Settings_API::GetInstance()->add_page( 'Site Settings', 'Site Settings', 'site-settings', 'manage_options', 'General settings and options for the theme.', 'options-general.php' );\n\n\t\tself::social_settings( $page );\n\t\tself::twitter_auth_settings( $page );\n\t}", "title": "" }, { "docid": "d071a960e5b6afdad60b4afce6fb2660", "score": "0.65994984", "text": "function fpf_settings_control() {\n\t$x = '<h2>Adjust general settings here</h2>';\n\t$x .= '<p><small>';\n\t\t$x .= 'Your settings will update when you change the value of each field.';\n\t$x .= '</small></p>';\n\t$settings = fpf_get_settings();\n\tforeach($settings as $setting_key=>$setting_value) {\n\t\t$setting_value = $setting_value;\n\t\t$x .= '<div class=\"fpf_setting\">';\n\t\t\t$x .= '<label>';\n\t\t\t\t$setting_name = str_replace('_', ' ', $setting_key);\n\t\t\t\t$setting_name = ucwords($setting_name);\n\t\t\t\t$x .= $setting_name;\n\t\t\t$x .= '</label>';\n\t\t\t$x .= '<div class=\"fpf_setting_span\">';\n\t\t\t\tif ($setting_key == 'show_messages') {\n\t\t\t\t\tif ($setting_value != 'false') {\n\t\t\t\t\t\t$checked = ' checked';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$checked = '';\n\t\t\t\t\t}\n\t\t\t\t\t$x .= '<input class=\"fpf_setting_value\" type=\"checkbox\" name=\"'.$setting_key.'\" id=\"'.$setting_key.'\" data-key=\"'.$setting_key.'\" value=\"true\"'.$checked.' />';\n\t\t\t\t} else {\n\t\t\t\t\t$x .= '<input class=\"fpf_setting_value\" type=\"text\" name=\"'.$setting_key.'\" id=\"'.$setting_key.'\" data-key=\"'.$setting_key.'\" value=\"'.$setting_value.'\" />';\n\t\t\t\t}\n\t\t\t$x .= '</div>';\n\t\t$x .= '</div>';\n\t}\n\t\n\treturn $x;\t\n}", "title": "" }, { "docid": "fae891e9550fe6688264f4a589e3dcd6", "score": "0.6594636", "text": "public function set_setting_post() {\n\n try {\n\n $clinic_id = !empty($this->Common_model->escape_data($this->post_data['clinic_id'])) ? trim($this->Common_model->escape_data($this->post_data['clinic_id'])) : '';\n $setting_type = !empty($this->Common_model->escape_data($this->post_data['setting_type'])) ? trim($this->Common_model->escape_data($this->post_data['setting_type'])) : '';\n $setting_data_type = !empty($this->Common_model->escape_data($this->post_data['setting_data_type'])) ? trim($this->Common_model->escape_data($this->post_data['setting_data_type'])) : '';\n $user_type = !empty($this->Common_model->escape_data($this->post_data['user_type'])) ? trim($this->Common_model->escape_data($this->post_data['user_type'])) : '';\n $data = !empty($this->post_data['data']) ? $this->post_data['data'] : '';\n\n if (empty($setting_type) ||\n empty($setting_data_type)\n ) {\n $this->bad_request();\n }\n\n $add_permission = 1;\n $edit_permission = 1;\n\n if ($user_type == 2) {\n $get_role_details = $this->Common_model->get_the_role($this->user_id);\n if (!empty($get_role_details['user_role_data'])) {\n\n $permission_data = array(\n 'role_data' => $get_role_details['user_role_data']\n );\n\n // 3 = if setting call for notification settings\n // 2 = if setting call for the data security \n if ($setting_type == 3) {\n $permission_data['module'] = 14;\n } else if ($setting_type == 2) {\n $permission_data['module'] = 17;\n } else if ($setting_type == 1) {\n $permission_data['module'] = 21;\n }\n\n $permission_data['key'] = 1;\n $check_add_permission = $this->check_module_permission($permission_data);\n if ($check_add_permission == 2) {\n $add_permission = 1;\n }\n $permission_data['key'] = 2;\n $check_edit_permission = $this->check_module_permission($permission_data);\n if ($check_edit_permission == 2) {\n $edit_permission = 1;\n }\n }\n }\n\n if (!in_array($setting_type, $this->setting_type)) {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('mycontroller_invalid_request');\n $this->send_response();\n }\n\n if (!in_array($setting_data_type, $this->setting_data_type)) {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('mycontroller_invalid_request');\n $this->send_response();\n }\n\n $setting_where = array(\n 'setting_user_id' => $this->user_id,\n 'setting_type' => $setting_type\n );\n\n// if (!empty($clinic_id)) {\n// $setting_where['setting_clinic_id'] = $clinic_id;\n// }\n\n $get_setting_data = $this->Common_model->get_single_row(TBL_SETTING, 'setting_id', $setting_where);\n\n if (!empty($get_setting_data['setting_id']) &&\n $edit_permission == 1\n ) {\n\n $update_setting_data = array(\n 'setting_data' => $data,\n 'setting_type' => $setting_type,\n 'setting_data_type' => $setting_data_type,\n 'setting_updated_at' => $this->utc_time_formated\n );\n\n $update_setting_where = array(\n 'setting_id' => $get_setting_data['setting_id']\n );\n\n $is_update = $this->Common_model->update(TBL_SETTING, $update_setting_data, $update_setting_where);\n\n if ($is_update > 0) {\n $this->my_response['status'] = true;\n $this->my_response['message'] = lang('setting_set');\n } else {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('failure');\n }\n } else if ($add_permission == 1) {\n\n $insert_setting_array = array(\n 'setting_user_id' => $this->user_id,\n 'setting_clinic_id' => $clinic_id,\n 'setting_data' => $data,\n 'setting_type' => $setting_type,\n 'setting_data_type' => $setting_data_type,\n 'setting_created_at' => $this->utc_time_formated\n );\n\n $inserted_id = $this->Common_model->insert(TBL_SETTING, $insert_setting_array);\n\n if ($inserted_id > 0) {\n $this->my_response['status'] = true;\n $this->my_response['message'] = lang('setting_set');\n } else {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('failure');\n }\n } else {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('permission_error');\n }\n $this->send_response();\n } catch (ErrorException $ex) {\n $this->error = $ex->getMessage();\n $this->store_error();\n }\n }", "title": "" }, { "docid": "362a85429ae0b0258e170b66423da4a5", "score": "0.65897644", "text": "function mag_settings_api_init() {\n \t// Add the section to reading settings so we can add our\n \t// fields to it\n \tadd_settings_section('mag_setting_section',\n\t\t'Magazine Settings',\n\t\t'mag_setting_section_function',\n\t\t'general');\n \t\n \t// Add the field with the names and function to use for our new\n \t// settings, put it in our new section\n \tadd_settings_field('mag_current_issue',\n\t\t'Current Issue',\n\t\t'mag_current_issue_setting_function',\n\t\t'general',\n\t\t'mag_setting_section');\n \t\n \tadd_settings_field('mag_master_category',\n\t\t'Master Category',\n\t\t'mag_master_category_setting_function',\n\t\t'general',\n\t\t'mag_setting_section');\n \t\n \t// Register our setting so that $_POST handling is done for us and\n \t// our callback function just has to echo the <input>\n \tregister_setting('general','mag_current_issue');\n \tregister_setting('general','mag_master_category');\n}", "title": "" }, { "docid": "dace1568049f35f129e2f2bf160f7ec3", "score": "0.65397274", "text": "function displaySettings() \n\t{\n\t\t$contents = xtc_draw_form('modules', 'easymarketing.php', 'content=save','post');\n \n \t$module_keys = $this->keys();\n \t$keys_extra = array();\n \t\n\t\tfor ($j = 0, $k = sizeof($module_keys); $j < $k; $j++) \n\t\t{\n \t\t$key_value_query = xtc_db_query(\"SELECT configuration_key,\n configuration_value,\n use_function,\n set_function\n FROM \" . TABLE_CONFIGURATION . \"\n WHERE configuration_key = '\" . $module_keys[$j] . \"'\");\n \t\t$key_value = xtc_db_fetch_array($key_value_query);\n \t\t\n\t\t\tif ($key_value['configuration_key'] !='') \n\t\t\t{\n \t\t$keys_extra[$module_keys[$j]]['title'] = constant(strtoupper($key_value['configuration_key'] .'_TITLE'));\n \t\t}\n \n\t \t\t$keys_extra[$module_keys[$j]]['value'] = $key_value['configuration_value'];\n \t\tif ($key_value['configuration_key'] !='') \n\t\t\t{\n \t\t$keys_extra[$module_keys[$j]]['description'] = constant(strtoupper($key_value['configuration_key'] .'_DESC'));\n \t\t}\n\t\t\t\n \t\t$keys_extra[$module_keys[$j]]['use_function'] = $key_value['use_function'];\n \t\t$keys_extra[$module_keys[$j]]['set_function'] = $key_value['set_function'];\n \t}\n \n\t\t$module_info['keys'] = $keys_extra;\n \n \twhile (list($key, $value) = each($module_info['keys'])) \n\t\t{\n \t\t$contents .= '<b>' . $value['title'] . '</b><br />' . $value['description'].'<br />';\n \n\t \t\tif ($value['set_function']) \n\t\t\t{\n \t\teval('$contents .= ' . $value['set_function'] . \"'\" . $value['value'] . \"', '\" . $key . \"');\");\n \t\t} else {\n \t\t$contents .= xtc_draw_input_field('configuration[' . $key . ']', $value['value']);\n \t\t}\n \t\t\n\t\t\t$contents .= '<br/><br/>';\n \t}\n \n \t$contents .= '<br/>' . xtc_button(BUTTON_SAVE);\n\t\t\n\t\t$contents .= '<hr />' . xtc_button_link(MODULE_EM_UNINSTALL_BUTTON, xtc_href_link('easymarketing.php', xtc_get_all_get_params(array('content')) . 'content=check_uninstall'));\n \n \treturn $contents;\n \t}", "title": "" }, { "docid": "2d7c8605f1fc726f0dc4df629fef1a7e", "score": "0.6532454", "text": "public function edit()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'setting', 'update')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\tif ($_POST['pk'] == '16') {\n\t\t\t\t$last_timezone = $this->podb->from('setting')->where('id_setting', '16')->limit(1)->fetch();\n\t\t\t\t$file_path = \"../\".DIR_INC.\"/core/config.php\";\n\t\t\t\t$insert_marker = $last_timezone['value'];\n\t\t\t\t$text = $this->postring->valid($_POST['value'], 'xss');\n\t\t\t\t$num_bytes = $this->insert_into_file($file_path, $insert_marker, $text, 'replace');\n\t\t\t}\n\t\t\tif ($_POST['pk'] == '2') {\n\t\t\t\t$ifsetting = $this->podb->from('setting')->where('id_setting', '2')->limit(1)->fetch();\n\t\t\t\tif (!empty($ifsetting)) {\n\t\t\t\t\t$setting = array(\n\t\t\t\t\t\t'value' => rtrim($this->postring->valid($_POST['value'], 'xss'), '/')\n\t\t\t\t\t);\n\t\t\t\t\t$query_setting = $this->podb->update('setting')\n\t\t\t\t\t\t->set($setting)\n\t\t\t\t\t\t->where('id_setting', '2');\n\t\t\t\t\t$query_setting->execute();\n\t\t\t\t\t$file_path = \"../\".DIR_INC.\"/core/config.php\";\n\t\t\t\t\t$insert_marker = $ifsetting['value'].'/';\n\t\t\t\t\t$text = rtrim($this->postring->valid($_POST['value'], 'xss'), '/').'/';\n\t\t\t\t\t$num_bytes = $this->insert_into_file($file_path, $insert_marker, $text, 'replace');\n\t\t\t\t}\n\t\t\t} elseif ($_POST['pk'] == '29') {\n\t\t\t\t$ifsetting = $this->podb->from('setting')->where('id_setting', '29')->limit(1)->fetch();\n\t\t\t\tif (!empty($ifsetting)) {\n\t\t\t\t\t$setting = array(\n\t\t\t\t\t\t'value' => $this->postring->valid($_POST['value'], 'xss')\n\t\t\t\t\t);\n\t\t\t\t\t$query_setting = $this->podb->update('setting')\n\t\t\t\t\t\t->set($setting)\n\t\t\t\t\t\t->where('id_setting', '29');\n\t\t\t\t\t$query_setting->execute();\n\t\t\t\t\t$file_path = \"../\".DIR_INC.\"/core/config.php\";\n\t\t\t\t\t$insert_marker = $ifsetting['value'];\n\t\t\t\t\t$text = $this->postring->valid($_POST['value'], 'xss');\n\t\t\t\t\t$num_bytes = $this->insert_into_file($file_path, $insert_marker, $text, 'replace');\n\t\t\t\t} else {\n\t\t\t\t\t$setting = array(\n\t\t\t\t\t\t'id_setting' => '29',\n\t\t\t\t\t\t'groups' => 'config',\n\t\t\t\t\t\t'options' => 'permalink',\n\t\t\t\t\t\t'value' => $this->postring->valid($_POST['value'], 'xss')\n\t\t\t\t\t);\n\t\t\t\t\t$query_setting = $this->podb->insertInto('setting')->values($setting);\n\t\t\t\t\t$query_setting->execute();\n\t\t\t\t\t$file_path = \"../\".DIR_INC.\"/core/config.php\";\n\t\t\t\t\t$insert_marker = 'slug/post-title';\n\t\t\t\t\t$text = $this->postring->valid($_POST['value'], 'xss');\n\t\t\t\t\t$num_bytes = $this->insert_into_file($file_path, $insert_marker, $text, 'replace');\n\t\t\t\t}\n\t\t\t} elseif ($_POST['pk'] == '30') {\n\t\t\t\t$ifsetting = $this->podb->from('setting')->where('id_setting', '30')->limit(1)->fetch();\n\t\t\t\tif (!empty($ifsetting)) {\n\t\t\t\t\t$setting = array(\n\t\t\t\t\t\t'value' => $this->postring->valid($_POST['value'], 'xss')\n\t\t\t\t\t);\n\t\t\t\t\t$query_setting = $this->podb->update('setting')\n\t\t\t\t\t\t->set($setting)\n\t\t\t\t\t\t->where('id_setting', '30');\n\t\t\t\t\t$query_setting->execute();\n\t\t\t\t\t$file_path = \"../\".DIR_INC.\"/core/config.php\";\n\t\t\t\t\t$insert_marker = $ifsetting['value'];\n\t\t\t\t\t$text = $this->postring->valid($_POST['value'], 'xss');\n\t\t\t\t\t$num_bytes = $this->insert_into_file($file_path, $insert_marker, $text, 'replace');\n\t\t\t\t} else {\n\t\t\t\t\t$setting = array(\n\t\t\t\t\t\t'id_setting' => '30',\n\t\t\t\t\t\t'groups' => 'config',\n\t\t\t\t\t\t'options' => 'slug_permalink',\n\t\t\t\t\t\t'value' => $this->postring->valid($_POST['value'], 'xss')\n\t\t\t\t\t);\n\t\t\t\t\t$query_setting = $this->podb->insertInto('setting')->values($setting);\n\t\t\t\t\t$query_setting->execute();\n\t\t\t\t\t$file_path = \"../\".DIR_INC.\"/core/config.php\";\n\t\t\t\t\t$insert_marker = 'detailpost';\n\t\t\t\t\t$text = $this->postring->valid($_POST['value'], 'xss');\n\t\t\t\t\t$num_bytes = $this->insert_into_file($file_path, $insert_marker, $text, 'replace');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$setting = array(\n\t\t\t\t\t'value' => $this->postring->valid($_POST['value'], 'xss')\n\t\t\t\t);\n\t\t\t\t$query_setting = $this->podb->update('setting')\n\t\t\t\t\t->set($setting)\n\t\t\t\t\t->where('id_setting', $this->postring->valid($_POST['pk'], 'sql'));\n\t\t\t\t$query_setting->execute();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a1338763ac8dc0eabbe3d19f778f47c0", "score": "0.6524466", "text": "public function settings(){\r\n\t\treturn;\r\n\t}", "title": "" }, { "docid": "5f050729d3b292f5802840e4fa137e4d", "score": "0.651377", "text": "protected function saveSettings()\r\n {\r\n // Go trough all active settings and see what the new value is\r\n foreach ($this->featureData as $groupkey => $group) {\r\n if (count($group['sub']) > 0) {\r\n foreach ($group['sub'] as $key => $data) {\r\n // Only even try if the feature is editable by the customer\r\n if ($data['state'] == 'editable') {\r\n $newValue = intval($_POST['setting'][$groupkey][$key]);\r\n $oldValue = intval($this->features[$groupkey][$key]);\r\n // if change from 0 to 1, call installation, if possible\r\n if ($oldValue == 0 && $newValue == 1) {\r\n if (isset($data['install'])) {\r\n $this->featureCallback($data['install']['callback'],$data['install']['params']);\r\n }\r\n }\r\n // if change from 1 to 0, call uninstallation, if possible\r\n if ($oldValue == 1 && $newValue == 0) {\r\n if (isset($data['uninstall'])) {\r\n $this->featureCallback($data['uninstall']['callback'],$data['uninstall']['params']);\r\n }\r\n }\r\n // only save it to the feature array if 0 or 1\r\n if ($newValue == 0 || $newValue == 1) {\r\n $this->features[$groupkey][$key] = $newValue;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Change the features if something has actually changed\r\n update_option('LbwpFeatures',$this->features);\r\n // As this went pretty well, return a wp message\r\n return $this->getMessage('updated','Einstellungen wurden gespeichert.');\r\n }", "title": "" }, { "docid": "ea4744222bb0a9d0ce211b19f860de6b", "score": "0.6512051", "text": "function Member_settings_save()\n {\n //***********Functionality limitations***********\n $functionality_enabled_error=Functionality_enabled('admin_config_members_modify');\n if($functionality_enabled_error!==true)\n {\n make_response(\"error\", create_temp_vars_set(array($functionality_enabled_error)), 1);\n return;\n }\n //*******End of functionality limitations********\n\n\n $post_vars = prepare_post();\n $validated_errors = $this->config_model->member_validate($post_vars);\n // if there some errors after $_POST data validation\n if(count($validated_errors)==0)\n {\n //save the new values into config file and DB\n $this->config_model->member_set($post_vars);\n //show the page with the updated data\n $data = $this->config_model->member_get();\n $data = $this->config_model->member_settings_vars_add($data);\n $mess = array();\n $mess[] = \"saved_ok\";\n $res=$this->load->view(\"/admin/config/member\", $data, true);\n make_response(\"output\", $res, 1, create_temp_vars_set($mess));\n }\n else\n {\n make_response(\"error\", create_temp_vars_set($validated_errors), 1);\n }\n simple_admin_log('members_settings_modify',false,(count($validated_errors)!=0),$validated_errors);\n }", "title": "" }, { "docid": "2363527ccc3eefbd30ddf7f675af2845", "score": "0.64966565", "text": "function account_update_settings( string $setting ,\n mixed $value ) : void\n{\n // Only logged in users can use this\n user_restrict_to_users();\n\n // Prepare and sanitize the data\n $user_id = sanitize(user_get_id(), 'int');\n $setting = sanitize($setting, 'string');\n\n // Ensure the values are within allowed boundaries and sanitize them\n if($setting === 'show_nsfw_content')\n $value = sanitize($value, 'int', 0, 2);\n else if($setting === 'quotes_languages')\n $value = sanitize($value, 'string');\n else\n $value = sanitize($value, 'int', 0, 1);\n\n // Update the setting\n query(\" UPDATE users_settings\n SET users_settings.$setting = '$value'\n WHERE users_settings.fk_users = '$user_id' \");\n\n // Update the session storage\n if($setting === 'show_nsfw_content')\n $_SESSION['settings_nsfw'] = $value;\n else if($setting === 'hide_youtube')\n $_SESSION['settings_privacy']['youtube'] = $value;\n else if($setting === 'hide_google_trends')\n $_SESSION['settings_privacy']['trends'] = $value;\n else if($setting === 'hide_discord')\n $_SESSION['settings_privacy']['discord'] = $value;\n else if($setting === 'hide_kiwiirc')\n $_SESSION['settings_privacy']['kiwiirc'] = $value;\n else if($setting === 'hide_from_activity')\n $_SESSION['settings_privacy']['online'] = $value;\n\n // All went well\n return;\n}", "title": "" }, { "docid": "c6187c08478d9fa4e9dca004895bb94b", "score": "0.6482595", "text": "function ewd_settings_page() {\n\t\n\tglobal $ewd_options;\n\t\t\n\t?>\n\t<div class=\"wrap\">\n\t\t<div id=\"icon-options-general\" class=\"icon32\"><br /></div>\n\t\t<h2><?php _e('Donation Settings', 'ewd'); ?></h2>\n\t\t<?php\n\n\t\tif ( ! isset( $_REQUEST['is-updated'] ) )\n\t\t\t$_REQUEST['settings-updated'] = false;\n\n\t\t?>\n\t\t<?php if ( false !== $_REQUEST['settings-updated'] ) : ?>\n\t\t<div class=\"updated fade\"><p><strong><?php _e( 'Options saved', 'ewd' ); ?></strong></p></div>\n\n\t\t<?php endif; ?>\n\t\t<form method=\"post\" action=\"options.php\" class=\"ewd_options_form\">\n\n\t\t\t<?php settings_fields( addslashes('ewd_settings_group') ); ?>\n\t\t\t\n\t\t\t<?php ewd_show_custom_tabs(); ?>\n\n\t\t\t<?php ewd_show_custom_fields(); ?>\n\t\t\t\n\t\t\t<!-- save the options -->\n\t\t\t<p class=\"submit\">\n\t\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e( 'Save Options', 'ewd' ); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t</form>\n\t</div><!--end .wrap-->\n\t<?php\n}", "title": "" }, { "docid": "3d26c8de888765f1b1b55fd5b4b90bca", "score": "0.64812773", "text": "public function settings()\n\t{\n\t$this->load->model(\"getterForAdminModel\");\n\t$val = $this->getterForAdminModel->getGroupNameList();\n\t$data['grouplist'] = $val;\n\t\n\t$val2 = $this->getterForAdminModel->getSubgroupNameList();\n\t$data['subgrouplist'] = $val2;\n\t\n\t//get user role details\n\t$this->load->model(\"adminModel\");\n\t$val3 = $this->adminModel->getUserRoles();\n\t$data['userroles'] = $val3;\n\t\n\t$val4 = $this->getterForAdminModel->getRoleNameList();\n\t$data['allroles'] = $val4;\n \n $val5 = $this->getterForAdminModel->getParamsList();\n $data['params'] = $val5;\n\t\n\t$data[\"title\"] = $this->title; //define page type\n $this->load->view('admin/header-admin',$data);\n\t$this->load->view('includes/header-include');\n\t$this->load->view('admin/navbar-admin');\n\t$this->load->view('admin/settings',$data);\n\t$this->load->view('admin/footer-admin');\n\t}", "title": "" }, { "docid": "867cf1e7b7dc389d5df61255d3a326ca", "score": "0.6471523", "text": "private static function default_settings() {}", "title": "" }, { "docid": "d521f80776422b76d4055129b376d143", "score": "0.646425", "text": "function ewpq_general_settings_callback() {\n echo '<p>' . __('Customize your version of Easy Query by updating the various settings below.', 'easy-query') . '</p>';\n}", "title": "" }, { "docid": "b99a2e286d26dc464a6bb119ee9e8a9a", "score": "0.64532167", "text": "function Member_settings()\n {\n $data = $this->config_model->member_get();\n //load additional language vars to $data array\n $data = $this->config_model->member_settings_vars_add($data);\n //load \"member settings\" view\n $res = $this->load->view(\"/admin/config/member\", $data, true);\n make_response(\"output\", $res, 1);\n }", "title": "" }, { "docid": "559977b5bef7e05f38472a4966a7a88c", "score": "0.6449642", "text": "private function _get_general_section_settings() {\n\n global $WWOF_SETTINGS_SORT_BY;\n\n return array(\n\n array(\n 'title' => __( 'General Options', 'woocommerce-wholesale-order-form' ),\n 'type' => 'title',\n 'desc' => '',\n 'id' => 'wwof_general_main_title'\n ),\n\n array(\n 'title' => __( 'Use Alternate View Of Wholesale Page?', 'woocommerce-wholesale-order-form' ),\n 'type' => 'checkbox',\n 'desc' => __( 'Checkbox on the right side of each product, and add to cart button at the bottom of the list' , 'woocommerce-wholesale-order-form' ),\n 'id' => 'wwof_general_use_alternate_view_of_wholesale_page'\n ),\n\n array(\n 'title' => __( 'Disable Pagination?' , 'woocommerce-wholesale-order-form' ),\n 'type' => 'checkbox',\n 'desc' => __( 'Shows all products ( Overrides products per page setting )' , 'woocommerce-wholesale-order-form' ),\n 'id' => 'wwof_general_disable_pagination'\n ),\n\n array(\n 'title' => __( 'Products Per Page' , 'woocommerce-wholesale-order-form' ),\n 'type' => 'number',\n 'desc' => __( 'Number of products to display per page on the front end product listing' , 'woocommerce-wholesale-order-form' ),\n 'id' => 'wwof_general_products_per_page',\n ),\n\n array(\n 'title' => __( 'Show In Stock Quantity?', 'woocommerce-wholesale-order-form' ),\n 'type' => 'checkbox',\n 'desc' => __( 'Should we display product stock quantity on the product listing on the front end?' , 'woocommerce-wholesale-order-form' ),\n 'id' => 'wwof_general_show_product_stock_quantity'\n ),\n\n array(\n 'title' => __( 'Show Product SKU?', 'woocommerce-wholesale-order-form' ),\n 'type' => 'checkbox',\n 'desc' => __( 'Should we display product sku on the product listing on the front end?' , 'woocommerce-wholesale-order-form' ),\n 'id' => 'wwof_general_show_product_sku'\n ),\n\n array(\n 'title' => __( 'Allow Product SKU Search?', 'woocommerce-wholesale-order-form' ),\n 'type' => 'checkbox',\n 'desc' => __( 'Should we allow searching for products via sku on the product listing on the front end?' , 'woocommerce-wholesale-order-form' ),\n 'id' => 'wwof_general_allow_product_sku_search'\n ),\n\n array(\n 'title' => __( 'Show Product Thumbnail?', 'woocommerce-wholesale-order-form' ),\n 'type' => 'checkbox',\n 'desc' => __( 'Should we display a small product thumbnail on the product listing on the front end?' , 'woocommerce-wholesale-order-form' ),\n 'id' => 'wwof_general_show_product_thumbnail'\n ),\n\n array(\n 'title' => __( 'Display the product details in a lightbox popup on click?' , 'woocommerce-wholesale-order-form' ),\n 'type' => 'checkbox',\n 'desc' => __( \"Should the product details be displayed in a popup or redirect the user to the product's page?\" , 'woocommerce-wholesale-order-form' ),\n 'id' => 'wwof_general_display_product_details_on_popup'\n ),\n\n array(\n 'title' => __( 'Display Zero Inventory Products?' , 'woocommerce-wholesale-order-form' ),\n 'type' => 'checkbox',\n 'desc' => __( 'Zero inventory products are products that are out of inventory and do not allow backorders. This also includes non simple products whose composition requires a certain products that have zero inventory.' , 'woocommerce-wholesale-order-form' ),\n 'id' => 'wwof_general_display_zero_products'\n ),\n\n array(\n 'title' => __( 'Hide wholesale quantity discount prices.' , 'woocommerce-wholesale-order-form' ),\n 'type' => 'checkbox',\n 'desc' => __( 'Hides the small table printed under the wholesale price when quantity based discounts are available for that product.' , 'woocommerce-wholesale-order-form' ),\n 'id' => 'wwof_general_hide_quantity_discounts'\n ),\n\n array(\n 'title' => __( 'Sort By' , 'woocommerce-wholesale-order-form' ),\n 'type' => 'select',\n 'desc' => '',\n 'id' => 'wwof_general_sort_by',\n 'class' => 'chosen_select',\n 'options' => $WWOF_SETTINGS_SORT_BY\n ),\n\n array(\n 'title' => __( 'Sort Order' , 'woocommerce-wholesale-order-form' ),\n 'type' => 'select',\n 'desc' => '',\n 'id' => 'wwof_general_sort_order',\n 'class' => 'chosen_select',\n 'options' => array(\n 'asc' => __( 'Ascending' , 'woocommerce-wholesale-order-form' ),\n 'desc' => __( 'Descending' , 'woocommerce-wholesale-order-form' )\n )\n ),\n\n array(\n 'title' => __( 'Display Cart Subtotal?' , 'woocommerce-wholesale-order-form' ),\n 'type' => 'checkbox',\n 'desc' => __( 'Display cart subtotal at the bottom of the order form' , 'woocommerce-wholesale-order-form' ),\n 'id' => 'wwof_general_display_cart_subtotal'\n ),\n\n array(\n 'title' => __( 'Cart Sub Total Prices Display' , 'woocommerce-wholesale-order-form' ),\n 'type' => 'select',\n 'desc' => __( 'Either to include or exclude price on sub total. Only used if \"Display Cart Sub Total\" option above is enabled.' , 'woocommerce-wholesale-order-form' ),\n 'desc_tip' => true,\n 'id' => 'wwof_general_cart_subtotal_prices_display',\n 'class' => 'chosen_select',\n 'options' => array (\n 'incl' => __( 'Including tax' , 'woocommerce-wholesale-order-form' ),\n 'excl' => __( 'Excluding tax' , 'woocommerce-wholesale-order-form' )\n ),\n 'default' => 'incl'\n ),\n\n array(\n 'type' => 'sectionend',\n 'id' => 'wwof_general_sectionend'\n )\n\n );\n\n }", "title": "" }, { "docid": "ce57765c3b54104eb56533d36ed93b15", "score": "0.64472795", "text": "function my_general_settings_register_fields()\n{\n register_setting('general', 'support_email', 'esc_attr');\n add_settings_field('support_email', '<label for=\"support_email\">'.__('Store Support Email' , 'support_email' ).'</label>' , 'my_general_settings_fields_html_support_email', 'general');\n\n //support phone- the support contact no of the store\n register_setting('general', 'support_phone', 'esc_attr');\n add_settings_field('support_phone', '<label for=\"support_phone\">'.__('Store Support Contact No' , 'support_phone' ).'</label>' , 'my_general_settings_fields_html_support_phone', 'general');\n\n //support team- the support team name of the store\n register_setting('general', 'support_team', 'esc_attr');\n add_settings_field('support_team', '<label for=\"support_team\">'.__('Store Support Team Name' , 'support_team' ).'</label>' , 'my_general_settings_fields_html_store_team', 'general');\n\n //Store facebook url\n register_setting('general', 'store_fb', 'esc_attr');\n add_settings_field('store_fb', '<label for=\"store_fb\">'.__('Store Facebook Url' , 'store_fb' ).'</label>' , 'my_general_settings_fields_html_store_fb', 'general');\n\n //Store twitter url\n register_setting('general', 'store_twitter', 'esc_attr');\n add_settings_field('store_twitter', '<label for=\"store_twitter\">'.__('Store Twitter url' , 'store_twitter' ).'</label>' , 'my_general_settings_fields_html_store_twitter', 'general');\n\n //Store pininterest url\n register_setting('general', 'store_pinterest', 'esc_attr');\n add_settings_field('store_pinterest', '<label for=\"store_pinterest\">'.__('Store Pinterest Url' , 'store_pinterest' ).'</label>' , 'my_general_settings_fields_html_store_pinterest', 'general');\n}", "title": "" }, { "docid": "4a94a6e0d430f071f5283d17df8bb00e", "score": "0.64306444", "text": "private function init_settings(){\n\t\t\t$this->settings['wit_dks'] = get_option('wit_dks_settings');\n\t\t\t$this->settings['wit_payment_gateway'] = get_option('wit_payment_gateway_settings');\n\t\t\t$this->settings['wit_cart_flow'] = get_option('wit_cart_flow_settings');\n\t\t\t$this->settings['wit_wc_extra_cfg'] = get_option('wit_wc_extra_cfg_settings');\n\t\t}", "title": "" }, { "docid": "6c43009cd965346e5be7d015e047d054", "score": "0.6428177", "text": "function update_settings() {\n\t\tif (current_user_can('manage_options')) {\n\t\t\t$this->sidebar_tweet_count = intval($this->sidebar_tweet_count);\n\t\t\tif ($this->sidebar_tweet_count == 0) {\n\t\t\t\t$this->sidebar_tweet_count = '3';\n\t\t\t}\n\t\t\tforeach ($this->options as $option) {\n\t\t\t\tupdate_option('aktt_'.$option, $this->$option);\n\t\t\t}\n\t\t\tif (empty($this->install_date)) {\n\t\t\t\tupdate_option('aktt_install_date', current_time('mysql'));\n\t\t\t}\n\t\t\t$this->initiate_digests();\n\t\t\t$this->upgrade();\n\t\t\t$this->upgrade_default_tweet_prefix();\n\t\t\tupdate_option('aktt_installed_version', AKTT_VERSION);\n\t\t\tdelete_option('aktt_twitter_password');\n\t\t}\n\t}", "title": "" }, { "docid": "ca863677c085ea41caa96ff0307bab19", "score": "0.6427157", "text": "public function user_setting()\n\t{\n\t\t$data['userData'] = $this->getAuthUser();\n\t\t$this->userBackend('userarea/user-setting',$data,true);\n\t}", "title": "" }, { "docid": "0901f44b2a683db6fcecddb074bac352", "score": "0.64235556", "text": "public function vsz_cf7_save_setting_callback(){\n\t\tglobal $wpdb;\n\n\t\t//Save settings fields related values\n\t\tif(isset($_POST['vsz_save_field_settings'])){\n\t\t\t// check nonce\n\t\t\tif(!isset($_POST['vsz_cf7_setting_nonce']) || empty($_POST['vsz_cf7_setting_nonce'])){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//Check form ID exist with current request or not\n\t\t\tif(!isset($_POST['fid']) || empty($_POST['fid'])){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//get form Id\n\t\t\t$fid = intval($_POST['fid']);\n\t\t\t//Get nonce value\n\t\t\t$nonce = sanitize_text_field($_POST['vsz_cf7_setting_nonce']);\n\t\t\t//Verify nonce value\n\t\t\tif(!wp_verify_nonce( $nonce, 'vsz-cf7-setting-nonce-'.$fid)){\n\t\t\t\t// This nonce is not valid.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$arr_fields = array();\n\t\t\t//Get all define fields information\n\t\t\tif(isset($_POST['field']) && !empty($_POST['field'])){\n\t\t\t\t//Fetch all fields name here\n\t\t\t\tforeach($_POST['field'] as $key => $arrVal){\n\n\t\t\t\t\t//sanitize new label name of field\n\t\t\t\t\t$arr_fields[$key]['label'] = sanitize_text_field($arrVal['label']);\n\n\t\t\t\t\t//Get field show or not information\n\t\t\t\t\t$arr_fields[$key]['show'] = intval($arrVal['show']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$show_record = (int)($_POST['cf7_show_record']);\n\t\t\t//Save Settings POPUP information in option table\n\t\t\tadd_option('vsz_cf7_settings_field_' . $fid, $arr_fields, '', 'no');\n\t\t\tupdate_option('vsz_cf7_settings_field_' . $fid, $arr_fields);\n\t\t\tupdate_option('vsz_cf7_settings_show_record_' . $fid, $show_record);\n\t\t}//close if for save setting information\n\n\t\t//Save form information here\n\t\tif(isset($_POST['vsz_cf7_save_field_value'])){\n\n\t\t\t// check nonce\n\t\t\tif(!isset($_POST['vsz_cf7_edit_nonce']) || empty($_POST['vsz_cf7_edit_nonce'])){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//Check form id\n\t\t\tif(!isset($_POST['fid']) || empty($_POST['fid'])){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//Check entry id\n\t\t\tif(!isset($_POST['rid']) || empty($_POST['rid'])){\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//Get form and entry id\n\t\t\t$fid = intval($_POST['fid']);\n\t\t\t$rid = intval($_POST['rid']);\n\t\t\t//Verify nonce value\n\t\t\t$nonce = sanitize_text_field($_POST['vsz_cf7_edit_nonce']);\n\t\t\tif(!wp_verify_nonce( $nonce, 'vsz-cf7-edit-nonce-'.$fid)){\n\t\t\t\t// This nonce is not valid.\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$arr_field_type = '';\n\n\t\t\t//Get field type information here\n\t\t\tif(isset($_POST['arr_field_type']) && !empty($_POST['arr_field_type'])){\n\t\t\t\t//Decode Json format string here\n\t\t\t\t$arr_field_type = json_decode(wp_unslash($_POST['arr_field_type']),true);\n\t\t\t}\n\n\t\t\t//Define option field type array\n\t\t\t$arr_option_type = array('checkbox','radio','select');\n\t\t\t//Get non editable fields information\n\t\t\t$not_editable_field = apply_filters('vsz_cf7_not_editable_fields',array());\n\t\t\t//Get entry related fields information\n\t\t\t$arr_exist_keys = get_entry_related_fields_info($fid,$rid);\n\n\t\t\tif(isset($_POST['field']) && !empty($_POST['field'])){\n\t\t\t\t//Fetch all fields information here\n\t\t\t\tforeach ($_POST['field'] as $key => $value){\n\t\t\t\t\t$value = sanitize_textarea_field(htmlspecialchars($value));\n\n\t\t\t\t\t$key = sanitize_text_field($key);\n\t\t\t\t\t//Escape loop if key have not editable field\n\t\t\t\t\tif(!empty($not_editable_field) && in_array($key,$not_editable_field)) continue;\n\n\t\t\t\t\t//Escape loop if key have file type value\n\t\t\t\t\tif(!empty($arr_field_type) && is_array($arr_field_type) && array_key_exists($key,$arr_field_type) && $arr_field_type[$key]['basetype'] == 'file') continue ;\n\n\t\t\t\t\t//Check key field have checkbox type or not\n\t\t\t\t\tif(!empty($arr_field_type) && is_array($arr_field_type) && array_key_exists($key,$arr_field_type) && in_array($arr_field_type[$key]['basetype'],$arr_option_type)){\n\t\t\t\t\t\t//Check if field name already exist with entry or not\n\t\t\t\t\t\tif(!empty($arr_exist_keys) && in_array($key,$arr_exist_keys)){\n\t\t\t\t\t\t\t//If field name match with current entry then field information update\n\t\t\t\t\t\t\t$wpdb->query($wpdb->prepare(\"UPDATE \".VSZ_CF7_DATA_ENTRY_TABLE_NAME.\" SET `value` = %s WHERE `name` = %s AND `data_id` = %d\", sanitize_textarea_field($value), $key, $rid));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t//If field name not match with current entry then new entry insert in DB\n\t\t\t\t\t\t\t$wpdb->query($wpdb->prepare('INSERT INTO '.VSZ_CF7_DATA_ENTRY_TABLE_NAME.'(`cf7_id`, `data_id`, `name`, `value`) VALUES (%d,%d,%s,%s)', $fid, $rid, sanitize_text_field($key), sanitize_textarea_field($value)));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//Check if field type is text area\n\t\t\t\t\telse if(!empty($arr_field_type) && is_array($arr_field_type) && array_key_exists($key,$arr_field_type) && $arr_field_type[$key]['basetype'] == 'textarea'){\n\t\t\t\t\t\t//Check if field name already exist with entry or not\n\t\t\t\t\t\tif(!empty($arr_exist_keys) && in_array($key,$arr_exist_keys)){\n\t\t\t\t\t\t\t//If field name match with current entry then field information update\n\t\t\t\t\t\t\t$wpdb->query($wpdb->prepare(\"UPDATE \".VSZ_CF7_DATA_ENTRY_TABLE_NAME.\" SET `value` = %s WHERE `name` = %s AND `data_id` = %d\", sanitize_textarea_field($value), $key, $rid));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t//If field name not match with current entry then new entry insert in DB\n\t\t\t\t\t\t\t$wpdb->query($wpdb->prepare('INSERT INTO '.VSZ_CF7_DATA_ENTRY_TABLE_NAME.'(`cf7_id`, `data_id`, `name`, `value`) VALUES (%d,%d,%s,%s)', $fid, $rid, sanitize_text_field($key), sanitize_textarea_field($value)));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}//Close text area else if\n\t\t\t\t\telse{\n\t\t\t\t\t\t//Check if field name already exist with entry or not\n\t\t\t\t\t\tif(!empty($arr_exist_keys) && in_array($key,$arr_exist_keys)){\n\t\t\t\t\t\t\t//If field name match with current entry then field information update\n\t\t\t\t\t\t\t$wpdb->query($wpdb->prepare(\"UPDATE \".VSZ_CF7_DATA_ENTRY_TABLE_NAME.\" SET `value` = %s WHERE `name` = %s AND `data_id` = %d\", sanitize_text_field($value), $key, $rid));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t//If field name not match with current entry then new entry insert in DB\n\t\t\t\t\t\t\t$wpdb->query($wpdb->prepare('INSERT INTO '.VSZ_CF7_DATA_ENTRY_TABLE_NAME.'(`cf7_id`, `data_id`, `name`, `value`) VALUES (%d,%d,%s,%s)', $fid, $rid, sanitize_text_field($key), sanitize_text_field($value)));\n\t\t\t\t\t\t}\n\t\t\t\t\t}//Close else\n\t\t\t\t}//Close foreach\n\t\t\t}//Close if for check field arrray is set or not\n\t\t}//Close if for save information\n\n\t\t//Delete form entry here\n\t\tif ($current_action = vsz_cf7_current_action()) {\n\t\t\t$current_action = sanitize_text_field($current_action);\n\t\t\t//Check current action is delete then execute this functionality\n\t\t\tif($current_action == 'delete'){\n\t\t\t\tif(isset($_POST['del_id'])){\n\t\t\t\t\t//Get nonce value\n\t\t\t\t\t$nonce = sanitize_text_field($_POST['_wpnonce']);\n\t\t\t\t\t//Verify nonce value\n\t\t\t\t\tif(!wp_verify_nonce($nonce, 'vsz-cf7-action-nonce')) {\n\t\t\t\t\t\tdie('Security check');\n\t\t\t\t\t}\n\t\t\t\t\t//Get Delete row ID information\n\t\t\t\t\t$del_id = implode(',', array_map('intval',$_POST['del_id']));\n\t\t\t\t\t//Get Form ID\n\t\t\t\t\t$fid = intval($_POST['fid']);\n\n\t\t\t\t\t// Checking for file type\n\t\t\t\t\t$arr_field_type_info = vsz_field_type_info($fid);\n\n\t\t\t\t\t//Get form Id related fields information\n\t\t\t\t\t$fields = vsz_cf7_get_db_fields($fid);\n\n\t\t\t\t\t$del_attach_key = array();\n\t\t\t\t\tforeach ($fields as $k1 => $v1) {\n\t\t\t\t\t\tif($arr_field_type_info[$k1] == 'file'){\n\t\t\t\t\t\t\t$del_attach_key[] = $k1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif(!empty($del_attach_key)){\n\t\t\t\t\t\t$del_attach_key = implode(\",\",$del_attach_key);\n\t\t\t\t\t\t$res = $wpdb->get_results(\"SELECT * FROM \".VSZ_CF7_DATA_ENTRY_TABLE_NAME.\" WHERE data_id IN($del_id) AND name IN ('\".$del_attach_key.\"')\");\n\n\t\t\t\t\t\tif(!empty($res)){\n\t\t\t\t\t\t\tforeach($res as $obj){\n\t\t\t\t\t\t\t\t$file_url = $obj->value;\n\t\t\t\t\t\t\t\tif(!empty($file_url)){\n\t\t\t\t\t\t\t\t\t//Get upload dir URL\n\t\t\t\t\t\t\t\t\t$upload_dir = wp_upload_dir();\n\t\t\t\t\t\t\t\t\t//Create custom upload folder\n\t\t\t\t\t\t\t\t\t$cf7d_upload_folder = VSZ_CF7_UPLOAD_FOLDER;\n\t\t\t\t\t\t\t\t\t$dir_upload = $upload_dir['basedir'] . '/' . $cf7d_upload_folder;\n\n\t\t\t\t\t\t\t\t\t$file_path = $dir_upload.\"/\".basename($file_url);\n\t\t\t\t\t\t\t\t\tif(file_exists($file_path)){\n\t\t\t\t\t\t\t\t\t\t$ret = unlink($file_path);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//Delete form ID related row entries from DB\n\t\t\t\t\t$wpdb->query(\"DELETE FROM \".VSZ_CF7_DATA_ENTRY_TABLE_NAME.\" WHERE data_id IN($del_id)\");\n\t\t\t\t\t$wpdb->query(\"DELETE FROM \".VSZ_CF7_DATA_TABLE_NAME.\" WHERE id IN($del_id)\");\n\t\t\t\t}\n\t\t\t}\n\t\t}//Close if for delete action\n\n\t\t//Setup export functionality here\n\t\tif(isset($_POST['btn_export'])){\n\t\t\t//Get form ID\n\t\t\t$fid = (int)$_POST['fid'];\n\n\t\t\t//Get export id related information\n\t\t\t$ids_export = ((isset($_POST['del_id']) && !empty($_POST['del_id'])) ? implode(',', array_map('intval',$_POST['del_id'])) : '');\n\t\t\t///Get export type related information\n\t\t\t$type = sanitize_text_field($_POST['vsz-cf7-export']);\n\t\t\t//Check type name and execute type related CASE\n\t\t\tswitch ($type) {\n\t\t\t\tcase 'csv':\n\t\t\t\t\tvsz_cf7_export_to_csv($fid, $ids_export);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'excel':\n\t\t\t\t\tvsz_cf7_export_to_excel($fid, $ids_export);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'pdf':\n\t\t\t\t\tvsz_cf7_export_to_pdf($fid, $ids_export);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-1':\n\t\t\t\t\treturn;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn;\n\t\t\t\t\tbreak;\n\t\t\t}//Close switch\n\t\t}//Close if for export\n\t}", "title": "" }, { "docid": "082d63d858fb57c160a3aa1c910ce1a0", "score": "0.64135766", "text": "function settings()\n\t{\n\t\t$this->EE->load->model('zenbu_display');\n\t\t$this->EE->load->model('zenbu_get');\n\t\t$this->EE->load->model('zenbu_db');\n\t\t$this->EE->load->helper('loader');\n\t\t\n\t\t$this->EE->zenbu_db->_save_settings();\n\t\t\n\t\t$this->EE->lang->loadfile('content', 'cp');\t// We'll need a few strings from there\n\t\t\n\t\tif(version_compare(APP_VER, '2.6', '>'))\n\t\t{\n\t\t\t$this->EE->view->cp_page_title = $this->EE->lang->line('zenbu_module_name').' - '.$this->EE->lang->line('display_settings');\n\t\t} else {\n\t\t\t$this->EE->cp->set_variable('cp_page_title', $this->EE->lang->line('zenbu_module_name').' - '.$this->EE->lang->line('display_settings'));\n\t\t}\n\t\t\n\t\t// Get settings and modules from the database\n\t\t$settings = $this->EE->zenbu_get->_get_settings();\n\t\t$installed_addons = $this->EE->zenbu_get->_get_installed_addons();\n\t\t\n\t\t// Check if comment module is installed\n\t\t$comment_module = (in_array('Comment', $installed_addons['modules'])) ? TRUE : FALSE;\n\t\t\n\t\t/**\n\t\t* -------------------------------\n\t\t* Setting up top right navigation\n\t\t* -------------------------------\n\t\t*/\n\t\t$nav_array['<i class=\\'icon-list\\'></i> '.$this->EE->lang->line('entries')] = BASE.AMP.\"C=addons_modules\".AMP.\"M=show_module_cp\".AMP.\"module=\".$this->addon_short_name.AMP.\"channel_id=\".$this->EE->input->get('channel_id');\n\n\t\t$nav_array['<i class=\\'icon-bookmark\\'></i> '.$this->EE->lang->line('manage_saved_searches')] = BASE.AMP.\"C=addons_modules\".AMP.\"M=show_module_cp\".AMP.\"module=\".$this->addon_short_name.AMP.\"method=manage_searches\";\n\t\t\n\t\tif($settings['setting']['can_access_settings'] == 'y' || $this->member_group_id == 1)\n\t\t{\n\t\t\t$nav_array['<i class=\\'icon-cog\\'></i> '.$this->EE->lang->line('display_settings')]\t= BASE.AMP.\"C=addons_modules\".AMP.\"M=show_module_cp\".AMP.\"module=\".$this->addon_short_name.AMP.\"method=settings\".AMP.\"channel_id=0\";\n\t\t}\n\t\t\n\t\tif($settings['setting']['can_admin'] == 'y' || $this->member_group_id == 1)\n\t\t{\n\t\t\t$nav_array['<i class=\\'icon-group\\'></i> '.$this->EE->lang->line('member_access_settings')]\t= BASE.AMP.\"C=addons_modules\".AMP.\"M=show_module_cp\".AMP.\"module=\".$this->addon_short_name.AMP.\"method=settings_admin\";\n\t\t}\n\t\t\n\t\tif($settings['setting']['can_access_settings'] != 'y' && $this->member_group_id != 1) {\n\t\t\t$this->EE->cp->set_right_nav($nav_array);\n\t\t\treturn $this->EE->lang->line('unauthorized_access');\n\t\t}\n\t\t\n\t\t$this->EE->cp->set_right_nav($nav_array);\n\t\t$this->EE->load->library('javascript');\n\t\t$this->EE->load->library('table');\n\t\t$this->EE->load->helper(array('form'));\n\t\t$this->EE->load->add_package_path(PATH_THIRD.'zenbu'); // Sometimes the wrong package is loaded. This makes sure the zenbu package is loaded.\n\t\t$this->EE->cp->load_package_js('zenbu_script');\n\t\t$this->EE->cp->load_package_js('zenbu_settings');\n\t\t\t\n\t\t//\t----------------------------------------\n\t\t//\tSet stylesheets\n\t\t//\t----------------------------------------\n\t\t$this->EE->zenbu_display->set_head_stylesheets();\n\n\t\t$this->EE->javascript->compile(); \n\t\t\t\n\t\t// Standard labels\n\t\t$labels_std = array(\n\t\t\t\"show_id\"\t\t\t\t=> $this->EE->lang->line('entry_id'),\n\t\t\t\"show_title\"\t\t\t=> $this->EE->lang->line('title'),\n\t\t\t\"show_url_title\" \t\t=> $this->EE->lang->line('url_title'),\n\t\t\t\"show_channel\" \t\t\t=> $this->EE->lang->line('channel'),\n\t\t\t\"show_categories\" \t\t=> $this->EE->lang->line('categories'),\n\t\t\t\"show_status\"\t\t\t=> $this->EE->lang->line('status'),\n\t\t\t\"show_sticky\" \t\t\t=> $this->EE->lang->line('is_sticky'),\n\t\t\t\"show_entry_date\" \t\t=> $this->EE->lang->line('entry_date'),\n\t\t\t\"show_expiration_date\" \t=> $this->EE->lang->line('expiration_date'),\n\t\t\t\"show_edit_date\" \t\t=> $this->EE->lang->line('edit_date'),\n\t\t\t\"show_author\" \t\t\t=> $this->EE->lang->line('author'),\n\t\t\t\"show_comments\" \t\t=> $this->EE->lang->line('comments'),\n\t\t\t\"show_view\" \t\t\t=> $this->EE->lang->line('live_look'),\n\t\t\t\"show_view_count\" \t\t=> $this->EE->lang->line('view_count'),\n\t\t\t\"show_last_author\" \t\t=> $this->EE->lang->line('show_last_author'),\n\t\t\t\"show_autosave\"\t\t\t=> $this->EE->lang->line('show_autosave'),\n\t\t);\n\n\t\t$vars_other['mass_check_fields'] = $labels_std;\n\t\t\t\n\t\t$field_order_std = array( // If no field order set (for eg. for newly created channels)\n\t\t\t'show_id',\n\t\t\t'show_title',\n\t\t\t'show_url_title',\n\t\t 'show_channel',\n\t\t 'show_categories',\n\t\t 'show_status',\n\t\t 'show_sticky',\n\t\t 'show_entry_date',\n\t\t 'show_expiration_date',\n\t\t 'show_edit_date',\n\t\t 'show_author',\n\t\t 'show_comments',\n\t\t 'show_view',\n\t\t 'show_view_count',\n\t\t 'show_last_author',\n\t\t 'show_autosave',\n\t\t);\n\n\t\t/**\n\t\t*\t===========================================\n\t\t*\tExtension Hook zenbu_add_column\n\t\t*\t===========================================\n\t\t*\n\t\t*\tAdds another standard setting row in the Display Settings section\n\t\t*\t@return $fields_and_labels \tarray\tAn array containing row data\n\t\t*/\n\t\tif ($this->EE->extensions->active_hook('zenbu_add_column') === TRUE)\n\t\t{\n\t\t\t$hook_fields_and_labels = $this->EE->extensions->call('zenbu_add_column');\n\t\t \tif ($this->EE->extensions->end_script === TRUE) return;\n\n\t\t \tif(is_array($hook_fields_and_labels))\n\t\t\t{\n\t\t\t\tforeach($hook_fields_and_labels as $key => $fal)\n\t\t\t\t{\n\t\t\t\t\t$field_order_std[] = isset($fal['column']) ? $fal['column'] : '';\n\t\t\t\t\t$labels_std[$fal['column']] = $fal['label'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$field_order_std = array_flip($field_order_std);\n\t\t\n\t\tif($comment_module === FALSE) {\n\t\t\tunset($labels_std['show_comments']);\n\t\t\tunset($field_order_std['show_comments']);\n\t\t}\n\n\t\t\t\n\t\t// Get channels\n\t\t$vars_channels = $this->EE->zenbu_get->_get_channel_data($this->member_group_id);\n\t\t\n\t\t//\t----------------------------------------\n\t\t// \tBuild labels \n\t\t//\t----------------------------------------\n\t\tforeach($vars_channels['channels']['channel_data'] as $channel_id => $value)\n\t\t{\n\t\t\t// Get basic template data\n\t\t\t$channel_id_array[] = $channel_id;\n\t\t\t$livelook_template_array = $this->EE->zenbu_get->_get_basic_template_data($channel_id_array, TRUE);\n\t\t\t\n\t\t\t// Get other field information\n\t\t\t$fields = $this->EE->zenbu_get->_get_field_ids();\n\n\t\t\tif( ! empty($fields[$channel_id]))\n\t\t\t{\n\t\t\t\t$field_label_array = $fields[$channel_id]['field'];\n\t\t\t\t$field_type_array = $fields[$channel_id]['fieldtype'];\n\t\t\t\t$field_id_array = $fields[$channel_id]['id'];\n\t\t\t} else {\n\t\t\t\t$field_label_array = array();\n\t\t\t\t$field_type_array = array();\n\t\t\t\t$field_id_array = array();\n\t\t\t}\n\t\t\t\n\t\t\t// Set field order\n\t\t\t$field_order = (isset($settings['setting'][$channel_id]['field_order'])) ? $settings['setting'][$channel_id]['field_order'] : $field_order_std;\n\t\t\t\n\t\t\tif($comment_module === FALSE) {\n\t\t\t\tif(isset($field_order['show_comments']))\n\t\t\t\t{\n\t\t\t\t\tunset($field_order['show_comments']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif( ! empty($fields) && $channel_id != 0)\n\t\t\t{\n\t\t\t\tforeach($field_id_array as $key => $id)\n\t\t\t\t{\n\t\t\t\t\t$c = 10;\n\t\t\t\t\tif(!array_key_exists('field_'.$id, $field_order))\n\t\t\t\t\t{\n\t\t\t\t\t\t$field_order['field_'.$id] = $c;\n\t\t\t\t\t\t$c++;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set extra options\n\t\t\t$extra_options = (isset($settings['setting'][$channel_id]['extra_options'])) ? $settings['setting'][$channel_id]['extra_options'] : array();\n\t\t\t\n\t\t\t// Get array of custom fields to show\n\t\t\tif(isset($settings['setting'][$channel_id]['show_custom_fields']) && !empty($settings['setting'][$channel_id]['show_custom_fields']))\n\t\t\t{\n\t\t\t\t$fields_to_show = explode('|', $settings['setting'][$channel_id]['show_custom_fields']); // array of field set to be shown\n\t\t\t} else {\n\t\t\t\t$fields_to_show = array();\n\t\t\t}\n\t\t\t\n\t\t\t// ------------------------------------------------------------------\n\t\t\t// Process fields, their order, their labels, their name=\"\" attribute\n\t\t\t// ------------------------------------------------------------------\n\t\t\t$vars_labels['extra_settings'] = ( ! isset($vars_labels['extra_settings']) || empty($vars_labels['extra_settings'])) ? array() : $vars_labels['extra_settings'];\n\t\t\tforeach($field_order as $table_col => $order)\n\t\t\t{\t\t\n\t\t\t\tif(substr($table_col, 0, 6) == 'field_')\n\t\t\t\t{\n\t\t\t\t\t// Custom fields\n\t\t\t\t\t\n\t\t\t\t\tif(in_array(substr($table_col, 6), $field_id_array)) // Checks if field still exists and compares with stored settings\n\t\t\t\t\t{\n\t\t\t\t\t\t$field_id = substr($table_col, 6);\n\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col]['input_name'] = 'settings['.$channel_id.']['.$table_col.'][show]';\n\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col]['order_input_name'] = 'settings['.$channel_id.']['.$table_col.'][field_order]';\n \t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col]['option_title'] = $field_label_array[$field_id];\n\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col]['checked'] = (in_array($field_id, $fields_to_show)) ? TRUE : FALSE;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// - Extra options\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$ft_class = $field_type_array[$field_id].'_ft';\n\t\t\t\t\t\tload_ft_class($ft_class);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(class_exists($ft_class))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ft_object = create_object($ft_class);\n\n\t\t\t\t\t\t\t// Set up previously saved settings, if they exit.\n\t\t\t\t\t\t\t$extra_options_saved_settings = (isset($extra_options[$table_col])) ? $extra_options[$table_col] : array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Retrieve extra settings display\n\t\t\t\t\t\t\t$field_settings = $fields[$channel_id]['settings'][$field_id];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$extra_settings_array = (method_exists($ft_object, 'zenbu_field_extra_settings')) ? $ft_object->zenbu_field_extra_settings($table_col, $channel_id, $extra_options_saved_settings, $field_settings) : array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Set up for sending to view\n\t\t\t\t\t\t\t// \"setting_labels\" contains the visual output code for each setting row\n\t\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col] = array_merge($vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col], $extra_settings_array);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Create a simple list of \"extra option\" short names for use in view\n\t\t\t\t\t\t\t// Used to loop through short names in view instead of handling the above \"setting_labels\" array\n\t\t\t\t\t\t\t$extra_settings_name_array = array_keys($extra_settings_array);\n\t\t\t\t\t\t\tforeach($extra_settings_name_array as $key => $extra_settings_name)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif( ! isset($vars_labels['extra_settings']))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$vars_labels['extra_settings'] = array();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(isset($vars_labels['extra_settings']) && ! in_array($extra_settings_name, $vars_labels['extra_settings']))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$vars_labels['extra_settings'][] = $extra_settings_name;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Add non-fieldtype short names to simple list of \"extra options\"\n\t\t\t\t\t\t// or else these won't appear in the settings view\n\t\t\t\t\t\t$non_ft_extra_settings = $this->non_ft_extra_options;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Add Pages modules option if installed\n\t\t\t\t\t\tif(in_array('Pages', $installed_addons['modules']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$non_ft_extra_settings['livelook_option_4'] = 'livelook_option_4';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Build the completed \"extra_settings\" array, to be looped in settings view\n\t\t\t\t\t\tif(isset($vars_labels['extra_settings']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$vars_labels['extra_settings'] = array_merge($vars_labels['extra_settings'], $non_ft_extra_settings);\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t// Cross-checking for fields not part of standard set:\n\t\t\t\t\tif(array_key_exists($table_col, $field_order_std))\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t// Standard fields\n\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col]['input_name'] = 'settings['.$channel_id.']['.$table_col.'][show]';\n\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col]['order_input_name'] = 'settings['.$channel_id.']['.$table_col.'][field_order]';\n\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col]['option_title'] = isset($labels_std[$table_col]) ? $labels_std[$table_col] : $field_order_std[$table_col];\n\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col]['checked'] = (isset($settings['setting'][$channel_id][$table_col]) && $settings['setting'][$channel_id][$table_col] == 'y') ? TRUE : FALSE;\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch ($table_col)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"show_categories\";\n\t\t\t\t\t\t\t\t$extra_category_option_1 \t= (isset($extra_options[$table_col]['category_option_1'])) ? $extra_options[$table_col]['category_option_1'] : '';\n\t\t\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col]['category_option_1'] = form_label($this->EE->lang->line('no_categories_to_display').NBS.form_input('settings['.$channel_id.']['.$table_col.'][category_option_1]', $extra_category_option_1, 'size=\"2\" maxlength=\"3\"'));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"show_view_count\":\n\n\t\t\t\t\t\t\t\t//\t----------------------------------------\n\t\t\t\t\t\t\t\t// \tAdd options for view count\n\t\t\t\t\t\t\t\t//\t----------------------------------------\n\t\t\t\t\t\t\t\tfor($i = 1; $i <= 4; $i++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t${'extra_show_view_count_'.$i} = (isset($extra_options[$table_col]['view_count_'.$i])) ? TRUE : FALSE;\n\t\t\t\t\t\t\t\t\t$option_view_counter_array['view_count_'.$i] = \"show_view_count_\".$i;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tforeach($option_view_counter_array as $label => $lang_string)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$checked_show_view_count = 'extra_show_'.$label;\n\t\t\t\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col][$label] = form_label(form_checkbox('settings['.$channel_id.']['.$table_col.']['.$label.']', 'y', $$checked_show_view_count).'&nbsp;'.$this->EE->lang->line('show_view_count').' '.substr($label, 11)).'<br />';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase ($table_col == \"show_entry_date\" || $table_col == \"show_expiration_date\" || $table_col == \"show_edit_date\"):\n\t\t\t\t\t\t\t\t$extra_date_option_1 \t= (isset($extra_options[$table_col]['date_option_1'])) ? $extra_options[$table_col]['date_option_1'] : '';\n\t\t\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col][\"date_option_1\"] = form_label($this->EE->lang->line('date_format').'&nbsp;'.form_input('settings['.$channel_id.']['.$table_col.'][date_option_1]', $extra_date_option_1, 'size=\"20\" class=\"bottom-margin\"'));\n\t\t\t\t\t\t\t\tif($table_col != \"show_edit_date\")\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$extra_date_option_2 \t= (isset($extra_options[$table_col]['date_option_2'])) ? $extra_options[$table_col]['date_option_2'] : '';\n\t\t\t\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col][\"date_option_2\"] = BR . form_label($this->EE->lang->line('date_format_future').'&nbsp;'.form_input('settings['.$channel_id.']['.$table_col.'][date_option_2]', $extra_date_option_2, 'size=\"20\"'));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"show_view\":\n\n\t\t\t\t\t\t\t\t//\t----------------------------------------\n\t\t\t\t\t\t\t\t// \tGet options\n\t\t\t\t\t\t\t\t//\t----------------------------------------\n\t\t\t\t\t\t\t\t$extra_livelook_option_1 \t= (isset($extra_options[$table_col]['livelook_option_1'])) ? $extra_options[$table_col]['livelook_option_1'] : '';\n\t\t\t\t\t\t\t\t$extra_livelook_option_2 \t= (isset($extra_options[$table_col]['livelook_option_2'])) ? $extra_options[$table_col]['livelook_option_2'] : '';\n\t\t\t\t\t\t\t\t$extra_livelook_option_3 \t= (isset($extra_options[$table_col]['livelook_option_3'])) ? $extra_options[$table_col]['livelook_option_3'] : '';\n\t\t\t\t\t\t\t\tif(in_array('Pages', $installed_addons['modules']))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$extra_livelook_option_4 \t= (isset($extra_options[$table_col]['livelook_option_4'])) ? TRUE : FALSE;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//\t----------------------------------------\n\t\t\t\t\t\t\t\t// \tBuild set templates\n\t\t\t\t\t\t\t\t//\t----------------------------------------\n\n\t\t\t\t\t\t\t\t$livelook_custom_hide = $extra_livelook_option_1 == \"use_livelook_settings\" || empty($extra_livelook_option_1) ? '' : 'invisible';\n\n\t\t\t\t\t\t\t\tif(isset($livelook_template_array[$channel_id]['group_name']) && isset($livelook_template_array[$channel_id]['template_name'])) \n\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t$livelook_template = BR . '<span class=\"livelook-custom-segments ' . $livelook_custom_hide . '\">' . $livelook_template_array[$channel_id]['group_name'] . '/' . $livelook_template_array[$channel_id]['template_name'] . '/</span>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t$livelook_template = BR . '<span class=\"livelook-custom-segments ' . $livelook_custom_hide . '\">' . lang('livelook_not_set').'/ </span>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//\t----------------------------------------\n\t\t\t\t\t\t\t\t// \tDisabled custom segment option if Live Look is used\n\t\t\t\t\t\t\t\t//\t----------------------------------------\n\n\t\t\t\t\t\t\t\tif($extra_livelook_option_1 == \"use_livelook_settings\" || empty($extra_livelook_option_1))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$disabled = 'disabled=\"disabled\" class=\"livelook-custom-segments seg-option invisible\"';\n\t\t\t\t\t\t\t\t\t$disabled_arr = array('disabled' => 'disabled', 'class' => 'livelook-custom-segments seg-option invisible');\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$disabled = 'class=\"livelook-custom-segments seg-option\"';\n\t\t\t\t\t\t\t\t\t$disabled_arr = array('class' => 'livelook-custom-segments seg-option');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif( empty($extra_livelook_option_1) && ! isset($livelook_template_array[$channel_id]) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$disabled = 'class=\"livelook-custom-segments seg-option invisible\"';\n\t\t\t\t\t\t\t\t\t$disabled_arr = array('class' => 'livelook-custom-segments seg-option invisible');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//\t----------------------------------------\n\t\t\t\t\t\t\t\t// \tShow Live Look option when it is set and for when multiple channels are displayed in Zenbu \n\t\t\t\t\t\t\t\t// \tNot when Live Look hasn't been set for channel\n\t\t\t\t\t\t\t\t//\t----------------------------------------\n\n\t\t\t\t\t\t\t\tif( isset($livelook_template_array[$channel_id]) || $channel_id == \"0\")\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$livelook_options_dropdown['use_livelook_settings'] = $this->EE->lang->line(\"use_livelook_settings\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$livelook_options_dropdown['use_custom_segments'] = $this->EE->lang->line(\"use_custom_segments\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$livelook_options_dropdown2 = array(\n\t\t\t\t\t\t\t\t\t'entry_id_suffix' \t\t=> $this->EE->lang->line(\"entry_id\"),\n\t\t\t\t\t\t\t\t\t'entry_title_suffix' \t=> $this->EE->lang->line(\"url_title\"),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// Dropdown for Live Look or custom segments\n\t\t\t\t\t\t\t\tif($channel_id != \"0\")\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col][\"livelook_option_1\"] = form_dropdown('settings['.$channel_id.']['.$table_col.'][livelook_option_1]', $livelook_options_dropdown, $extra_livelook_option_1, 'class=\"livelook-settings bottom-margin\"' ) . $livelook_template;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Reset for next loop\n\t\t\t\t\t\t\t\t\t$livelook_options_dropdown = array();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Build custom segments when single channels are displayed\n\t\t\t\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col][\"livelook_option_2\"] = form_label($this->EE->lang->line('custom_segments') . '&nbsp;' . form_input('settings['.$channel_id.']['.$table_col.'][livelook_option_2]', $extra_livelook_option_2, 'size=\"20\" id=\"\" ' . $disabled ) . ' /', '', $disabled_arr);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col][\"livelook_option_3\"] = form_dropdown('settings['.$channel_id.']['.$table_col.'][livelook_option_3]', $livelook_options_dropdown2, $extra_livelook_option_3, 'class=\"bottom-margin\"' );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Add option for Pages module override if Pages module is installed\n\t\t\t\t\t\t\t\t\tif(in_array('Pages', $installed_addons['modules']))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$field_order[$table_col]][$table_col][\"livelook_option_4\"] = '<br />'.form_label(form_checkbox('settings['.$channel_id.']['.$table_col.'][livelook_option_4]', 'y', $extra_livelook_option_4) . '&nbsp;' . $this->EE->lang->line('livelook_pages_override'));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\n\t\t\t//\n\t\t\t// Process new fields when NEW features are added\n\t\t\t//\n\t\t\tforeach($field_order_std as $table_col => $order)\n\t\t\t{\n\t\t\t\tif( ! array_key_exists($table_col, $field_order))\n\t\t\t\t{\n\t\t\t\t\t// Add new feature fields at the end of setting listing\n\t\t\t\t\t$order_num = min($field_order) - 1;\n\t\t\t\t\t\n\t\t\t\t\t// Create field data\n\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$order_num][$table_col]['input_name'] = 'settings['.$channel_id.']['.$table_col.'][show]';\n\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$order_num][$table_col]['order_input_name'] = 'settings['.$channel_id.']['.$table_col.'][field_order]';\n\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$order_num][$table_col]['option_title'] = isset($labels_std[$table_col]) ? $labels_std[$table_col] : $table_col;\n\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$order_num][$table_col]['checked'] = FALSE;\n\t\t\t\t\t\n\t\t\t\t\t// Add options for view count\n\t\t\t\t\tswitch ($table_col)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase \"show_view_count\":\n\t\t\t\t\t\t\t// Add options for view count\n\t\t\t\t\t\t\tfor($i = 1; $i <= 4; $i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t${'extra_show_view_count_'.$i} = (isset($extra_options[$table_col]['view_count_'.$i])) ? TRUE : FALSE;\n\t\t\t\t\t\t\t\t$option_view_counter_array['view_count_'.$i] = \"show_view_count_\".$i;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach($option_view_counter_array as $label => $lang_string)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$checked_show_view_count = 'extra_show_'.$label;\n\t\t\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$order_num][$table_col][$label] = form_label(form_checkbox('settings['.$channel_id.']['.$table_col.']['.$label.']', 'y', $$checked_show_view_count).'&nbsp;'.$this->EE->lang->line('show_view_count').' '.substr($label, 11)).'<br />';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase ($table_col == \"show_entry_date\" || $table_col == \"show_expiration_date\" || $table_col == \"show_edit_date\"):\n\t\t\t\t\t\t\t$extra_date_option_1 \t= (isset($extra_options[$table_col]['date_option_1'])) ? $extra_options[$table_col]['date_option_1'] : '';\n\t\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$order_num][$table_col][\"date_option_1\"] = form_label($this->EE->lang->line('date_format').'&nbsp;'.form_input('settings['.$channel_id.']['.$table_col.'][date_option_1]', $extra_date_option_1, 'size=\"20\"'));\n\n\t\t\t\t\t\t\tif($table_col != \"show_edit_date\")\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$extra_date_option_2 \t= (isset($extra_options[$table_col]['date_option_2'])) ? $extra_options[$table_col]['date_option_2'] : '';\n\t\t\t\t\t\t\t\t$vars_labels['setting_labels'][$channel_id][$order_num][$table_col][\"date_option_2\"] = BR . form_label($this->EE->lang->line('date_format_future').'&nbsp;'.form_input('settings['.$channel_id.']['.$table_col.'][date_option_2]', $extra_date_option_2, 'size=\"20\"'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\t//\n\t\t\t// Sort it so that view displays rows in the right order\n\t\t\t//\n\t\t\tif( ! empty($fields))\n\t\t\t{\n\t\t\t\tksort($vars_labels['setting_labels'][$channel_id]);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t/**\n\t\t*\t-----------------------------------\n\t\t*\tGeneral settings\n\t\t*\t-----------------------------------\n\t\t*/\n\t\t\n\t\t//\t----------------------------------------\n\t\t//\tMaximum results per page (above 200)\n\t\t//\t----------------------------------------\n\t\t$max_results_per_page = (isset($settings['setting']['general']['max_results_per_page'])) ? $settings['setting']['general']['max_results_per_page'] : '';\n\t\t$vars_labels['general_settings'][0]['label'] = form_label($this->EE->lang->line('max_results_per_page')).'<div class=\"subtext\">'.$this->EE->lang->line('max_results_per_page_note').'</div>';\n\t\t$vars_labels['general_settings'][0]['form_field'] = form_input('settings[general][max_results_per_page]', $max_results_per_page, 'maxlength=\"4\"');\n\n\t\t//\t----------------------------------------\n\t\t//\tDefault rule filters (title, cat_id, etc)\n\t\t//\t----------------------------------------\n\t\t$default_start_filters_array = array(\n\t\t\t'title'\t\t\t\t=> $this->EE->lang->line('entry_title'),\n\t\t\t'cat_id'\t\t\t=> $this->EE->lang->line('category'),\n\t\t\t'status'\t\t\t=> $this->EE->lang->line('status'),\n\t\t\t'author'\t\t\t=> $this->EE->lang->line('author'),\n\t\t\t'sticky'\t\t\t=> $this->EE->lang->line('is_sticky'),\n\t\t\t'date'\t\t\t\t=> $this->EE->lang->line('date'),\n\t\t\t'expiration_date'\t=> $this->EE->lang->line('expiration_date'),\n\t\t\t'edit_date'\t\t\t=> $this->EE->lang->line('edit_date'),\n\t\t\t'id'\t\t\t\t=> $this->EE->lang->line('entry_id'),\n\t\t\t'any_cf_title'\t\t=> $this->EE->lang->line('any_custom_fields_titles'),\t\t\n\t\t);\n\t\t$default_1st_filter = (isset($settings['setting']['general']['default_1st_filter'])) ? $settings['setting']['general']['default_1st_filter'] : '';\n\t\t$vars_labels['general_settings'][1]['label'] = form_label($this->EE->lang->line('default_filter')).'<div class=\"subtext\">'.$this->EE->lang->line('default_filter_note').'</div>';\n\t\t$vars_labels['general_settings'][1]['form_field'] = form_dropdown('settings[general][default_1st_filter]', $default_start_filters_array, $default_1st_filter);\n\n\t\t//\t----------------------------------------\n\t\t//\tDefault limit\n\t\t//\t----------------------------------------\n\t\t$default_limit_filters_array = $this->EE->zenbu_get->_get_general_form_variables();\n\n\t\t$default_limit_filters_array = $default_limit_filters_array['limit']['dropdown_labels'];\n\n\t\t$default_limit = (isset($settings['setting']['general']['default_limit'])) ? $settings['setting']['general']['default_limit'] : '25';\n\n\t\t$vars_labels['general_settings'][2]['label'] = form_label($this->EE->lang->line('default_limit')).'<div class=\"subtext\">'.$this->EE->lang->line('default_limit_note').'</div>';\n\n\t\t$vars_labels['general_settings'][2]['form_field'] = form_dropdown('settings[general][default_limit]', $default_limit_filters_array, $default_limit);\n\t\t\n\t\t//\t----------------------------------------\n\t\t//\tDefault ordering\n\t\t//\t----------------------------------------\n\t\t$default_ordering_array = array(\n\t\t\t\"entry_date\" \t\t=> $this->EE->lang->line('entry_date'),\n\t\t\t\"id\" \t\t\t\t=> $this->EE->lang->line('entry_id'),\n\t\t\t\"title\" \t\t\t=> $this->EE->lang->line('title'),\n\t\t\t\"category\" \t\t\t=> $this->EE->lang->line('category'),\n\t\t\t\"expiration_date\" \t=> $this->EE->lang->line('expiration_date'),\n\t\t\t\"edit_date\" \t\t=> $this->EE->lang->line('edit_date'),\n\t\t\t\"url_title\" \t\t=> $this->EE->lang->line('url_title'),\n\t\t\t\"status\" \t\t\t=> $this->EE->lang->line('status'),\n\t\t\t\"channel\" \t\t\t=> $this->EE->lang->line('channel'),\n\t\t\t\"author\"\t\t\t=> $this->EE->lang->line('author'),\n\t\t\t\"is_sticky\"\t\t\t=> $this->EE->lang->line('is_sticky'),\n\t\t\t\"comments\"\t\t\t=> $this->EE->lang->line('comments'),\n\t\t);\n\n\t\t$default_sorting_array = array(\n\t\t\t\"desc\" \t\t\t=> $this->EE->lang->line('desc'),\n\t\t\t\"asc\" \t\t\t=> $this->EE->lang->line('asc'),\n\t\t);\n\n\t\t$default_order = (isset($settings['setting']['general']['default_order'])) ? $settings['setting']['general']['default_order'] : 'entry_date';\n\n\t\t$default_sort =\t(isset($settings['setting']['general']['default_sort'])) ? $settings['setting']['general']['default_sort'] : 'desc';\n\n\t\t$vars_labels['general_settings'][3]['label'] = form_label($this->EE->lang->line('default_order_sort')).'<div class=\"subtext\">'.$this->EE->lang->line('default_order_sort_note').'</div>';\n\n\t\t$vars_labels['general_settings'][3]['form_field'] = form_dropdown('settings[general][default_order]', $default_ordering_array, $default_order)\n\t\t\t.'&nbsp;'.form_dropdown('settings[general][default_sort]', $default_sorting_array, $default_sort);\n\n\t\t//\t----------------------------------------\n\t\t//\tShow in dropdown and be able to search all custom fields\n\t\t//\t----------------------------------------\n\t\t$enable_hidden_field_search_y = (isset($settings['setting']['general']['enable_hidden_field_search']) && $settings['setting']['general']['enable_hidden_field_search'] == 'y') ? TRUE : FALSE;\n\n\t\t$enable_hidden_field_search_n = (isset($settings['setting']['general']['enable_hidden_field_search']) && $settings['setting']['general']['enable_hidden_field_search'] == 'n') ? TRUE : FALSE;\n\n\t\t$vars_labels['general_settings'][4]['label'] = form_label($this->EE->lang->line('enable_hidden_field_search')).'<div class=\"subtext\">'.$this->EE->lang->line('enable_hidden_field_search_note').'</div>';\n\n\t\t$vars_labels['general_settings'][4]['form_field'] = form_hidden('settings[general][enable_hidden_field_search]', 'n')\n\t\t\t.form_label( form_radio('settings[general][enable_hidden_field_search]', 'y', $enable_hidden_field_search_y).NBS.NBS.$this->EE->lang->line('yes') ).NBS.NBS.NBS.NBS.NBS\n\t\t\t.form_label( form_radio('settings[general][enable_hidden_field_search]', 'n', $enable_hidden_field_search_n).NBS.NBS.$this->EE->lang->line('no'));\n\t\t\t\n\t\t// Top right Links/URLs\n\n\t\t$vars_other['current_channel'] = $this->EE->input->get_post('channel_id', TRUE) !== FALSE ? $this->EE->input->get_post('channel_id', TRUE) : '';\n\t\t\n\t\t$vars_urls['action_url'] = \"C=addons_modules\".AMP.\"M=show_module_cp\".AMP.\"module=\".$this->addon_short_name.AMP.\"method=settings\".AMP.\"channel_id=\".$vars_other['current_channel'];\n\t\t\n\t\t$vars_urls['settings_view_url'] = BASE.AMP.\"C=addons_modules\".AMP.\"M=show_module_cp\".AMP.\"module=\".$this->addon_short_name.AMP.\"method=settings\";\n\t\t\n\t\t$vars_urls['settings_admin_url'] = BASE.AMP.\"C=addons_modules\".AMP.\"M=show_module_cp\".AMP.\"module=\".$this->addon_short_name.AMP.\"method=settings_admin\";\n\t\t\n\t\t// Check if current member group can copy profile to other member groups\n\t\tif($settings['setting']['can_copy_profile'] == 'y') {\n\t\t\t\n\t\t\t$sql = ($this->member_group_id != 1) ? \n\t\t\t\t$this->EE->db->query(\"SELECT group_id, group_title FROM exp_member_groups WHERE group_id NOT IN(0, 1) AND site_id = \".$this->site_id) : \n\t\t\t\t$this->EE->db->query(\"SELECT group_id, group_title FROM exp_member_groups WHERE group_id NOT IN(0) AND site_id = \".$this->site_id);\n\t\t\t\n\t\t\tif($sql->num_rows() > 0) {\n\t\t\t\t\n\t\t\t\t$vars_members['member_groups'] = $sql->result_array();\n\t\t\t}\n\n\t\t} else {\t\n\t\t\t\n\t\t\t$vars_members['member_groups'] = array();\n\t\t}\n\t\t\n\t\t// Check if current member group can administrate member access\n\t\t$vars_other['can_admin'] = $settings['setting']['can_admin'];\n\t\t\n\t\t$vars_other['current_member_group'] = $this->member_group_id;\n\t\t\n\t\t$vars = array_merge($vars_channels, $vars_labels, $settings, $vars_urls, $vars_members, $vars_other);\n\t\t\n\t\treturn $this->EE->load->view('zenbu_display_settings', $vars, TRUE);\n\t\t\n\t}", "title": "" }, { "docid": "683282c18efac0b732867aafdc89784d", "score": "0.6410017", "text": "function gallery_settings() {\r\r\n\t\t\tinclude('admin/gallery-settings.php');\r\r\n\t\t}", "title": "" }, { "docid": "c5bd3b7933613e5b6985e6bf429dc147", "score": "0.6409258", "text": "public function save_settings(){\n\t\t\n\t \t$this->posted_data = $_POST;\n\n\t \tif( empty( $this->settings ) ) {\n\n\t \t\t$this->init_settings();\n\n\t \t}\n\n\t \tforeach ($this->fields as $tab => $tab_data ) {\n\n\t \t\tforeach ($tab_data as $name => $field) {\n\t \t\t\t\n\t \t\t\t$this->settings[ $name ] = $this->{ 'validate_' . $field['type'] }( $name );\n\t \t\n\t \t\t}\n\n\t \t}\n\n\t \tupdate_option( $this->settings_id, $this->settings );\t\n\n\t}", "title": "" }, { "docid": "d460e7152308a6a6b56243bf5f100b90", "score": "0.64087564", "text": "function pkconfig_settings() {\n //must check that the user has the required capability \n if (!current_user_can('manage_options')) {\n wp_die(__('Usted no tiene los permisos necesarios para acceder a esta página.'));\n }\n\n // variables for the field and option names \n $opt_name = 'pk_pkconfig';\n $facebook = 'facebook';\n $twitter = 'twitter';\n $google = 'google';\n $email = 'email';\n $tlf = 'tlf';\n $direc = 'direc';\n\n\n // Read in existing option value from database\n $opt_val = get_option($opt_name);\n\n // See if the user has posted us some information\n // If they did, this hidden field will be set to 'Y'\n if (isset($_POST[$facebook])) {\n\n // Read their posted value\n $opt_val = json_encode($_POST);\n\n // Save the posted value in the database\n update_option($opt_name, $opt_val);\n\n //debug($opt_val, false);\n // Put an settings updated message on the screen\n ?>\n <div class=\"updated\"><p><strong><?php _e('Datos guardados con exito.', 'menu-test'); ?></strong></p></div>\n <?php\n }\n $db = json_decode($opt_val);\n// debug($db, false);\n// \n // Now display the settings editing screen\n\n echo '<div class=\"wrap\">';\n\n // header\n\n echo \"<h2>\" . __('Menu Informaci&oacute;n de Contacto', 'menu-test') . \"</h2>\";\n\n // settings form\n ?>\n <form name=\"form1\" method=\"post\" action=\"\">\n <table class=\"form-table\">\n <tr>\n <th scope=\"row\">\n <label><?php _e(\"Facebook URL:\", 'menu-test'); ?></label>\n </th>\n <td>\n <input type=\"url\" name=\"<?php echo $facebook; ?>\" value=\"<?php echo $db->facebook; ?>\" size=\"70\">\n <!--<p class=\"description\">Colocar la url de Facebook</p>-->\n </td>\n </tr>\n <tr>\n <th scope=\"row\">\n <label><?php _e(\"Twitter URL:\", 'menu-test'); ?> </label>\n </th>\n <td>\n <input type=\"url\" name=\"<?php echo $twitter; ?>\" value=\"<?php echo $db->twitter; ?>\" size=\"70\">\n </td>\n </tr>\n <tr>\n <th scope=\"row\">\n <label><?php _e(\"Google+ URL:\", 'menu-test'); ?></label>\n </th>\n <td>\n <input type=\"url\" name=\"<?php echo $youtube; ?>\" value=\"<?php echo $db->youtube; ?>\" size=\"70\">\n </td>\n </tr>\n <tr>\n <th scope=\"row\">\n <label><?php _e(\"Correo:\", 'menu-test'); ?></label>\n </th>\n <td>\n <input type=\"text\" name=\"<?php echo $email; ?>\" value=\"<?php echo $db->email; ?>\" size=\"70\">\n </td>\n </tr>\n <tr>\n <th scope=\"row\">\n <label><?php _e(\"Tel&eacute;fono:\", 'menu-test'); ?></label>\n </th>\n <td>\n <input type=\"text\" name=\"<?php echo $tlf; ?>\" value=\"<?php echo $db->tlf; ?>\" size=\"70\">\n </td>\n </tr>\n <tr>\n <th scope=\"row\">\n <label><?php _e(\"Direcci&oacute;n:\", 'menu-test'); ?></label>\n </th>\n <td>\n <input type=\"text\" name=\"<?php echo $direc; ?>\" value=\"<?php echo $db->direc; ?>\" size=\"70\">\n </td>\n </tr>\n\n </table>\n\n <p class=\"submit\">\n <input type=\"submit\" class=\"button-primary\" value=\"<?php esc_attr_e('Save Changes') ?>\" />\n </p>\n\n </form>\n\n <?php\n// debug($_REQUEST, false);\n// echo \"<h2>\" . __( 'Configuraciones Generales', 'menu-test' ) . \"</h2>\";\n\n echo \"</div>\"; //wrap\n}", "title": "" }, { "docid": "107cfb9e92a8fc8c88e3696d331217de", "score": "0.6394795", "text": "public static function editSettings(): void\n {\n if (!current_user_can('manage_options')) {\n wp_die(__('You do not have sufficient permissions to access this page.'));\n }\n require_once(__DIR__ . '/admin/settings.php');\n }", "title": "" }, { "docid": "d4623ae6fd2605975db232092e1348a5", "score": "0.6394473", "text": "public static function save_settings() {\r\n\r\n\t\t\t// Only admins can save settings.\r\n\t\t\tif ( ! current_user_can( 'manage_options' ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tself::save_integration_option();\r\n\t\t\tself::save_branding_option();\r\n\r\n\t\t\t// Let extensions hook into saving.\r\n\t\t\tdo_action( 'uael_admin_settings_save' );\r\n\t\t}", "title": "" }, { "docid": "c86a78803e28e3224b2e2455f9408b13", "score": "0.6390483", "text": "public static function InitializeSettings()\r\n\t{\r\n\t\tself::SaveSetting(self::DESIGN_SKIN_PATH, \"v1.0\");\r\n\t\tself::SaveSetting(self::PRODUCT_ENABLED_PATH, \"1\");\r\n\t\tself::SaveSetting(self::SUCCESS_ENABLED_PATH, \"1\");\r\n\t\tself::SaveSetting(self::SUCCESS_CSS_SELECTOR_PATH, \"\");\r\n\t\tself::SaveSetting(self::SUCCESS_POSITION_PATH, \"bottom\");\r\n\t\tself::SaveSetting(self::SUCCESS_CONT_CAPTION_PATH, \"Share the joy!\");\r\n\t\tself::SaveSetting(self::SUCCESS_SHARE_CAPTION_PATH, \"Tell your Friends\");\r\n\t\tself::SaveSetting(self::ACCOUNT_NOTIFIED_PATH, \"1\"); // Disable Zizio Account notification\r\n\t\tself::SaveSetting(self::NOTIFY_PINIT_PATH, \"1\"); // Disable new PinIt share button notification\r\n\t\tself::SaveSetting(self::DBCHANGES_NOTIFIED_PATH, \"1\"); // Disable DB Changes notification\r\n\r\n\t\t// Refresh store config\r\n\t\tMage::app()->getStore(null)->resetConfig();\r\n\r\n\t\t// Clear DB cache\r\n\t\tself::ClearDBSchemaCaches();\r\n\t}", "title": "" }, { "docid": "bc4fb5676e16d22281f95da180886021", "score": "0.6383662", "text": "function admin_settings_page() {\n\t\tif ( !current_user_can( 'manage_options' ) ) {\n\t\t\twp_die( __( 'You do not permission to access this page', $this->prefix ) );\n\t\t}\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t<h2><?php _e( 'Taxonomy Sync Settings', $this->prefix ) ?></h2>\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php \n\t\t\tsettings_fields( $this->prefix . '_settings' );\n\t\t\tdo_settings_sections( $this->prefix . '_settings' );\n\t\t\tsubmit_button( __( 'Save Taxonomy Sync Settings' ), 'primary', $this->prefix . '_save_settings' );\n\t\t\t?>\n\t\t</form>\n\t\t</div>\n\t\t<?php\t\n\t}", "title": "" }, { "docid": "3acb1d6455eca971140b90cde75f2578", "score": "0.63801134", "text": "public function settings_page_setup() {\n\t\techo '<div class=\"wrap\">';\n\t\t$this->page_tabs() ;\n\t\tif ( isset( $_GET['settings-updated'] ) ) {\n\t\t\techo \"<div class='updated'><p>Theme settings updated successfully.</p></div>\";\n\t\t} \n\t\t?>\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields( 'vilmosioo_options_'.$this->current ); ?>\n\t\t\t<?php do_settings_sections( 'vilmosioo' ); ?>\n\t\t\t\t<p class=\"submit\">\n\t\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n\t\t\t</p>\n\t\t</form>\n\t\t</div>\n\t\t<?php \n\t}", "title": "" }, { "docid": "e915034c4f06388387ff482f9948120f", "score": "0.63775945", "text": "public function updateGeneralSettings(UpdateGeneralSettingsRequest $request)\n {\n\n $settingApplicationService = new SettingApplicationService();\n $requestArray = $request->all();\n\n if (!array_key_exists( 'enable_registration' , $requestArray )) {\n $requestArray['enable_registration'] = '0';\n }\n\n foreach ($requestArray as $key => $value) {\n if ($key != '_method' && $key != '_token' ) {\n $setting = $this->settingRepository->byKey($key);\n if (!is_null($setting)) {\n $settingApplicationService->update($setting, ['value' => $value]);\n }\n }\n }\n\n Flash::success(trans('hackerspacecrm.messages.models.update.success', ['modelname' => trans('hackerspacecrm.models.settings')]));\n\n return back();\n }", "title": "" }, { "docid": "f6d2f14659b8cc7fca8726cf07f59f3d", "score": "0.6377272", "text": "function settings() {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\n\t\timport('admin.form.SiteSettingsForm');\n\n\t\t$settingsForm = new SiteSettingsForm();\n\t\t$settingsForm->initData();\n\t\t$settingsForm->display();\n\t}", "title": "" }, { "docid": "0edd9435969ac2223ef0bcd755dd2775", "score": "0.6369451", "text": "function _showSettings()\n {\n global $_ARRAYLANG, $_FRONTEND_LANGID;\n \n $this->pageTitle = $_ARRAYLANG['TXT_SETTINGS'];\n \n $sal_female = $this->getFemaleSalutation($_FRONTEND_LANGID);\n $sal_male = $this->getMaleSalutation($_FRONTEND_LANGID);\n $subject = $this->getMessageSubject($_FRONTEND_LANGID);\n $body = $this->getMessageBody($_FRONTEND_LANGID);\n \n $this->_showForm($sal_female, $sal_male, $subject, $body);\n }", "title": "" }, { "docid": "895f90dc777154004b0f25457599288b", "score": "0.6368646", "text": "function system_settings($param1 = '', $param2 = '', $param3 = '') {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url() . 'index.php?login', 'refresh');\n\n if ($param1 == 'do_update') {\n\n $data['description'] = $this->input->post('system_name');\n $this->db->where('type', 'system_name');\n $this->db->update('system_setting', $data);\n\n $data['description'] = $this->input->post('system_title');\n $this->db->where('type', 'system_title');\n $this->db->update('system_setting', $data);\n\n $data['description'] = $this->input->post('address');\n $this->db->where('type', 'address');\n $this->db->update('system_setting', $data);\n\n $data['description'] = $this->input->post('phone');\n $this->db->where('type', 'phone');\n $this->db->update('system_setting', $data);\n\n $data['description'] = $this->input->post('paypal_email');\n $this->db->where('type', 'paypal_email');\n $this->db->update('system_setting', $data);\n\n $data['description'] = $this->input->post('currency');\n $this->db->where('type', 'currency');\n $this->db->update('system_setting', $data);\n\n $data['description'] = $this->input->post('system_email');\n $this->db->where('type', 'system_email');\n $this->db->update('system_setting', $data);\n\n $data['description'] = $this->input->post('system_name');\n $this->db->where('type', 'system_name');\n $this->db->update('system_setting', $data);\n\n $data['description'] = $this->input->post('userfile');\n $this->db->where('type', 'userfile');\n $this->db->update('system_setting', $data);\n\n $data['description'] = $this->input->post('language');\n $this->db->where('type', 'language');\n $this->db->update('system_setting', $data);\n\n $data['description'] = $this->input->post('text_align');\n $this->db->where('type', 'text_align');\n $this->db->update('system_setting', $data);\n //$path = \"uploads/system_image/\" . $this->session->userdata('admin_id');\n //unlink($path);\n $as = move_uploaded_file($_FILES['userfile']['tmp_name'], 'uploads/system_image/' . $this->session->userdata('admin_id') . '.jpg');\n\n $this->session->set_flashdata('flash_message', get_phrase('data_updated'));\n redirect(base_url() . 'index.php?admin/system_settings/', 'refresh');\n }\n if ($param1 == 'upload_logo') {\n move_uploaded_file($_FILES['userfile']['tmp_name'], 'uploads/logo.png');\n\n $this->session->set_flashdata('flash_message', get_phrase('settings_updated'));\n redirect(base_url() . 'index.php?admin/system_settings/', 'refresh');\n }\n if ($param1 == 'change_skin') {\n $data['description'] = $param2;\n $this->db->where('type', 'skin_colour');\n $this->db->update('system_setting', $data);\n $this->session->set_flashdata('flash_message', get_phrase('theme_selected'));\n redirect(base_url() . 'index.php?admin/system_settings/', 'refresh');\n }\n $page_data['page_name'] = 'system_settings';\n $page_data['page_title'] = 'System Settings';\n $page_data['settings'] = $this->db->get('system_setting')->result_array();\n $this->load->view('backend/index', $page_data);\n }", "title": "" }, { "docid": "c7fb57e613c4f8226ad96a25218bd194", "score": "0.6364471", "text": "public function adminInit()\n {\n register_setting('c24_options_group_api', 'c24', array($this, 'saveSettings'));\n add_settings_section(\n 'settings_api', 'API Settings', array($this, 'printSectionInfo'), 'c24-settings-api'\n );\n add_settings_field(\n 'c24_api_theme', 'Theme', array($this, 'createFieldTheme'), 'c24-settings-api', 'settings_api'\n );\n add_settings_field(\n 'c24_api_url', 'Base URL', array($this, 'createFieldUrl'), 'c24-settings-api', 'settings_api'\n );\n add_settings_field(\n 'c24_api_version', 'Version', array($this, 'createFieldVersion'), 'c24-settings-api', 'settings_api'\n );\n add_settings_field(\n 'c24_api_key', 'Key', array($this, 'createFieldKey'), 'c24-settings-api', 'settings_api'\n );\n add_settings_field(\n 'c24_api_tag_text', 'Listing Tag Text', array($this, 'createFieldTagText'), 'c24-settings-api', 'settings_api'\n );\n add_settings_field(\n 'c24_api_tag_exact', 'Listing Tag Exact', array($this, 'createFieldTagExact'), 'c24-settings-api', 'settings_api'\n );\n add_settings_field(\n 'c24_api_epp', 'Events per page', array($this, 'createFieldEpp'), 'c24-settings-api', 'settings_api'\n );\n add_settings_field(\n 'c24_api_efp', 'Events front page', array($this, 'createFieldEfp'), 'c24-settings-api', 'settings_api'\n );\n add_settings_field(\n 'c24_api_vpp', 'Partners per page', array($this, 'createFieldVpp'), 'c24-settings-api', 'settings_api'\n );\n add_settings_field(\n 'c24_api_venue_id', 'Venue ID', array($this, 'createFieldVenueId'), 'c24-settings-api', 'settings_api'\n );\n add_settings_field(\n 'c24_api_user_id', 'User ID', array($this, 'createFieldUserId'), 'c24-settings-api', 'settings_api'\n );\n add_settings_field(\n 'c24_api_epp', 'Events per page', array($this, 'createFieldEpp'), 'c24-settings-api', 'settings_api'\n );\n add_settings_field(\n 'c24_api_efp', 'Event ID front page', array($this, 'createFieldEfp'), 'c24-settings-api', 'settings_api'\n );\n add_settings_field(\n 'c24_api_vpp', 'Partners per page', array($this, 'createFieldVpp'), 'c24-settings-api', 'settings_api'\n );\n }", "title": "" }, { "docid": "c43f8b75275988d1d67c7dbfe29814a3", "score": "0.634759", "text": "function icl_save_settings() {\n\tglobal $sitepress;\n\t$sitepress->save_settings();\n}", "title": "" }, { "docid": "3e0f127e6ace0c073fa92f815faa59aa", "score": "0.6343729", "text": "public static function saveSettings()\n {\n Bizyhood_Utility::setOption(Bizyhood_Core::KEY_API_URL, $_POST['api_url']);\n Bizyhood_Utility::setOption(Bizyhood_Core::KEY_ZIP_CODES, $_POST['zip_codes']);\n Bizyhood_Utility::setOption(Bizyhood_Core::KEY_USE_CUISINE_TYPES, $_POST['use_cuisine_types'] === 'true');\n Bizyhood_Utility::setOption(Bizyhood_Core::KEY_CATEGORIES, $_POST['categories']);\n Bizyhood_Utility::setOption(Bizyhood_Core::KEY_MAIN_PAGE_ID, $_POST['main_page_id']);\n Bizyhood_Utility::setOption(Bizyhood_Core::KEY_SIGNUP_PAGE_ID, $_POST['signup_page_id']);\n die(json_encode(array('success' => true)));\n }", "title": "" }, { "docid": "515c61edf7216ad4c61e24b6c9ed4a10", "score": "0.63433325", "text": "public function get_settings()\n {\n }", "title": "" }, { "docid": "70fd1a57bc1cc4f1105594b336d67f1a", "score": "0.633761", "text": "function _saveSettings()\n {\n global $_ARRAYLANG, $objDatabase, $_FRONTEND_LANGID;\n \n $error = false;\n \n if (empty($_POST['subject'])) {\n $error = true;\n }\n\n if (empty($_POST['body'])) {\n $error = true; \n }\n \n if (empty($_POST['salutation_female'])) {\n $error = true;\n }\n \n if (empty($_POST['salutation_male'])) {\n $error = true;\n }\n \n if ($error) {\n $this->pageTitle = $_ARRAYLANG['TXT_SETTINGS'];\n $this->strErrMessage = $_ARRAYLANG['TXT_ERROR'];\n \n $this->_showForm('', '');\n } else {\n $salutation_female = $_POST['salutation_female'];\n $salutation_male = $_POST['salutation_male'];\n $subject = $_POST['subject']; \n $body = $_POST['body'];\n\n $this->_saveValue('subject', $subject);\n $this->_saveValue('body', $body);\n $this->_saveValue('salutation_female', $salutation_female);\n $this->_saveValue('salutation_male', $salutation_male);\n \n $this->strOkMessage = $_ARRAYLANG['TXT_STATUS_OK'];\n \n $sal_female = $this->getFemaleSalutation($_FRONTEND_LANGID);\n $sal_male = $this->getMaleSalutation($_FRONTEND_LANGID);\n $subject = $this->getMessageSubject($_FRONTEND_LANGID);\n $body = $this->getMessageBody($_FRONTEND_LANGID);\n \n $this->_showForm($sal_female, $sal_male, $subject, $body);\n }\n }", "title": "" }, { "docid": "9a282c0889175d782041a50266f73cc6", "score": "0.6333152", "text": "public function to_top_edit_setting()\r\n\t {\r\n\t\t include(sprintf(\"%s/manage/admin.php\", dirname(__FILE__)));\r\n\t }", "title": "" }, { "docid": "2f06c5c46e1fd239113ecb9c5c345ed5", "score": "0.63298684", "text": "function m_paymentSettings()\n\t{\n\t\t#INTIALIZING TEMPLATES\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\", GRAPHICS_PATH);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SITEURL\",SITE_URL);\n\t\t$this->ObTpl->set_file(\"TPL_SETTING_FILE\", $this->settingsTemplate);\n\t\t$this->ObTpl->set_block(\"TPL_SETTING_FILE\",\"TPL_DSPMSG_BLK\",\"dspmsg_blk\");\n\n\t\tif($this->err==1){\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$this->errMsg);\n\t\t\t$this->ObTpl->parse(\"dspmsg_blk\",\"TPL_DSPMSG_BLK\");\n\t\t}else{\t\t\n\t\t\t$this->ObTpl->set_var(\"dspmsg_blk\",\"\");\n\t\t}\n\n\t\t$this->ObTpl->set_var(\"ENABLE_GATEWAYTESTMODE\", $this->displayIt(GATEWAY_TESTMODE));\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_PAYPAL_ID\", PAYPAL_ID);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_PAYPAL_CURRENCY\",PAYMENT_CURRENCY);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_AUTHORIZEPAYMENT_LOGIN\", AUTHORIZEPAYMENT_LOGIN);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_AUTHORIZEPAYMENT_TYPE\", AUTHORIZEPAYMENT_TYPE);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_AUTHORIZEPAYMENT_KEY\", AUTHORIZEPAYMENT_KEY);\n\t\t\n\t\tif(!empty($this->request['txtprotxVendor'])){\n\t\t\t$protx_vendor=$this->libFunc->m_displayContent1($this->request['txtprotxVendor']);\n\t\t\t$protx_apply_avs_cv2=$this->libFunc->m_displayContent1($this->request['txtprotxApplyAVSCV2']);\n\t\t\t$protx_3d_secure_status=$this->libFunc->m_displayContent1($this->request['txtprotx3DSecureStatus']);\n\t\t}\n\t\telse{\n\t\t\t$protx_vendor=$this->libFunc->m_displayContent1(PROTX_VENDOR);\n\t\t\t$protx_apply_avs_cv2=$this->libFunc->m_displayContent1(PROTX_APPLY_AVS_CV2);\n\t\t\t$protx_3d_secure_status=$this->libFunc->m_displayContent1(PROTX_3D_SECURE_STATUS);\n\t\t}\n\n\t\t$this->ObTpl->set_var(\"TPL_VAR_PROTX_VENDOR\", $protx_vendor);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_APPLY_AVS_CV2\",$protx_apply_avs_cv2);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_3D_SECURE_STATUS\",$protx_3d_secure_status);\n\t\t\n\t\t//PAYPAL DIRECT PAYMENTS\n\t\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_PAYPALAPI_USERNAME\", PAYPALAPI_USERNAME);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_PAYPALAPI_PASSWORD\", PAYPALAPI_PASSWORD);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_PAYPALAPI_SIGNATURE\", PAYPALAPI_SIGNATURE);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_PAYPALAPI_ENDPOINT\", PAYPALAPI_ENDPOINT);\n\t\t\n\t\t\t\t\n\t\t//Implementing secpay\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SECPAY_MERCHANT\", SECPAY_MERCHANT);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SECPAY_REMOTEPASSWORD\", SECPAY_REMOTEPASSWORD);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SECPAY_DIGESTKEY\", SECPAY_DIGESTKEY);\n\t\t\n\t\t//Implemented Verisign\n\t\t$this->ObTpl->set_var(\"TPL_VAR_VERISIGN_PARTNER\", VERISIGN_PARTNER);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_VERISIGN_LOGIN\", VERISIGN_LOGIN);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_VERISIGN_USER\", VERISIGN_USER);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_VERISIGN_PASSWORD\", VERISIGN_PASSWORD);\n\n\t\t //Implemetion Worldpay\n\t\t$this->ObTpl->set_var(\"TPL_VAR_WORLDPAY_INSTID\", WORLDPAY_INSTID);\t\n\t\t\n\t\t//Implemented HSBC\n\t\t$this->ObTpl->set_var(\"TPL_VAR_HSBC_KEY\", HSBC_KEY);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_HSBC_STOREID\", HSBC_STOREID);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_HSBC_CURRENCY\", HSBC_CURRENCY);\n\n\t\t//mplemented BARCLAYS\n\t\t$this->ObTpl->set_var(\"TPL_VAR_BARCLAYS_CLIENTID\", BARCLAYS_CLIENTID);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_BARCLAYS_PASSWORD\", BARCLAYS_PASSWORD);\n\t\t\n\t\t#NSI: 01-05-2008-Implement SecureTrading offline\n\t\t$this->ObTpl->set_var(\"TPL_VAR_ST_SITEREF\", STREFERENCE);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_ST_CLIENTID\", SECURETRADING_CLIENTID);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_ST_PASSWORD\", SECURETRADING_PASSWORD);\n\t\t\n\t\t//-Implemented SecureTrading\n \t\t$this->ObTpl->set_var(\"TPL_VAR_SECURETRADING_MERCHANTID\", SECURETRADING_MERCHANTID);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SECURETRADING_CURRENCY\", SECURETRADING_CURRENCY);\n\n\t\tif(isset($this->request['msg']) && $this->request['msg']==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_PAYMENTDETAILS_UPDATED);\n\t\t\t$this->ObTpl->parse(\"dspmsg_blk\",\"TPL_DSPMSG_BLK\");\n\t\t}\t\t\n \n #(BEGIN) SAGEPAY INTEGRATION \n\t\t$this->ObTpl->set_var(\"TPL_VAR_SAGEVENDORNAME\", SAGE_VENDORNAME);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_ENCRYPTIONPASSWORD\", SAGE_ENCRYPTEDPASSWORD);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SAGETRANSACTIONTYPE\", SAGE_TRANSACTIONTYPE);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SAGECURRENCY\", SAGE_CURRENCY);\n #(END) SAGEPAY INTEGRATION\n\t\t\n\t\t//-Implemented Propay\n\t\t//Propay Gateway Integration: Starts\n \t\t$this->ObTpl->set_var(\"TPL_VAR_PROPAY_ACCNUMBER\", PROPAY_ACCNUMBER);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_PROPAY_CERTSTRING\", PROPAY_CERTSTRING);\n\t\t\n\t\tif(PROPAY_CANADA == \"1\"){\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_PROPAY_CANADA\", \"checked='checked'\");\n\t\t}\n\t\t//Propay Gateway Integration: Ends\n\t\t\n\t\t// (BEGIN)CardPay payment Integration \n\t\t\t\n\t\t\t//bof: THE DIRECT METHOD\n\t\t\t//die(CS_MERCHANTID);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_CSMERCHANTID\",CS_MERCHANTID);\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_CSPASSWORD\",CS_CSPASSWORD);\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_CSBASEURL\",CS_CSBASEURL);\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_CSPORT\",CS_CSPORT);\n\t\t\t//eof: THE REDIRECT METHOD\n\t\t\t//bof: THE REDIRECT METHOD\n\t\t$this->ObTpl->set_var(\"TPL_VAR_CSRMERCHANTID\",CSR_MERCHANTID);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_CSRCALLBACK\",CSR_CALLBACK);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_CSRPERHASH\",CSR_PREHASH);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_MERCHANTPASS\",CSR_MERCHANTPASS);\n\t\t\t//eof: THE REDIRECT METHOD\n\t\t\t\n\t\t// (END) Cardpay payment Integration\n\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_SETTING_FILE\"));\n\t}", "title": "" }, { "docid": "43ba13d5e91a7688e2e4f3f339250db8", "score": "0.632893", "text": "public function edit(GeneralSetting $generalSetting)\n {\n //\n }", "title": "" }, { "docid": "a88af9e13fb4dfa24c0f6338b023c782", "score": "0.63248324", "text": "function init_settings() {\n\t\t\tif( is_admin() ) {\n\t\t\t\t$this->settings_array = apply_filters('register_settings_api', array());\n\t\t\t\tadd_action( 'admin_head', array( $this, 'script') );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "9f707f63880c3dbb168a0fbe2b330fc3", "score": "0.63208354", "text": "function wprss_settings_initialize() {\r\n\t\t// Get the settings from the new field in the database\r\n\t\t$settings = get_option( 'wprss_settings_general' );\r\n\r\n\t\t// Get the default plugin settings.\r\n\t\t$default_settings = wprss_get_default_settings_general();\r\n\r\n\t\t// Loop through each of the default plugin settings.\r\n\t\tforeach ( $default_settings as $setting_key => $setting_value ) {\r\n\r\n\t\t\t// If the setting didn't previously exist, add the default value to the $settings array.\r\n\t\t\tif ( ! isset( $settings[ $setting_key ] ) )\r\n\t\t\t\t$settings[ $setting_key ] = $setting_value;\r\n\t\t}\r\n\r\n\t\t// Update the plugin settings.\r\n\t\tupdate_option( 'wprss_settings_general', $settings );\r\n\t}", "title": "" }, { "docid": "b82c4a47eb75f43e5f759324ffd9edda", "score": "0.6316528", "text": "public function init_settings(): void {\r\n\r\n\t\tregister_setting('drama-setting-admin', $this->name, [$this, 'sanitize']);\r\n\t\tadd_settings_section('default','', function(){print _('Your posts and comments will be analyzed by the selected 3rd party drama provider. If the provider is unavailable, no drama score will be recorded.', 'drama-text-domain');}, 'drama-admin');\r\n\t\tadd_settings_field($this->name, 'Default Drama Provider', [$this, 'value_callback'], 'drama-admin', 'default');\r\n\t}", "title": "" }, { "docid": "63941febff78d933b4d347418c674baa", "score": "0.6315063", "text": "function settings($type = NULL)\n\t{\n\t\t$this->load->helper('country_dial_code_helper');\n\t\t$data['title'] = 'Settings';\n\t\t$valid_type = array('general', 'personal', 'appearance', 'password', 'save', 'filters');\n\t\tif ( ! in_array($type, $valid_type))\n\t\t{\n\t\t\tshow_404();\n\t\t}\n\n\t\tif ($_POST && $type === 'save')\n\t\t{\n\t\t\t$option = $this->input->post('option');\n\t\t\t// check password\n\t\t\tif ($option === 'password' && ! password_verify($this->input->post('current_password'), $this->Kalkun_model->get_setting()->row('password')))\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('notif', lang('kalkun_wrong_password'));\n\t\t\t\tredirect('settings/'.$option);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($option === 'personal')\n\t\t\t\t{\n\t\t\t\t\tif ($this->input->post('username') !== $this->session->userdata('username'))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($this->Kalkun_model->check_setting(array('option' => 'username', 'username' => $this->input->post('username')))->num_rows > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->session->set_flashdata('notif', lang('kalkun_username_exists'));\n\t\t\t\t\t\t\tredirect('settings/'.$option);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->Kalkun_model->update_setting($option);\n\t\t\t$this->session->set_flashdata('notif', lang('kalkun_settings_saved'));\n\t\t\tredirect('settings/'.$option);\n\t\t}\n\n\t\tif ($type === 'filters')\n\t\t{\n\t\t\t$data['filters'] = $this->Kalkun_model->get_filters($this->session->userdata('id_user'));\n\t\t\t$data['my_folders'] = $this->Kalkun_model->get_folders('all');\n\t\t}\n\n\t\t$data['main'] = 'main/settings/setting';\n\t\t$data['settings'] = $this->Kalkun_model->get_setting();\n\t\t$data['type'] = 'main/settings/'.$type;\n\n\t\t$this->load->view('main/layout', $data);\n\t}", "title": "" }, { "docid": "338bb73e5733f17759e544b58b84e055", "score": "0.63133115", "text": "function nagconfig() {\n // Global settings read\n $this->arrSettings = $_SESSION['SETS'];\n if (isset($_SESSION['domain'])) $this->intDomainId = $_SESSION['domain'];\n }", "title": "" }, { "docid": "c74ec6822e00d181fcbfa59944121734", "score": "0.63129014", "text": "function busiprof_general_settings( $wp_customize ){\n\t$wp_customize->add_panel( 'general_settings', array(\n\t\t'priority' => 125,\n\t\t'capability' => 'edit_theme_options',\n\t\t'title' => __('General settings', 'busiprof'),\n\t) );\n\t\n\t/* Front Page section */\n\t$wp_customize->add_section( 'front_page_section' , array(\n\t\t'title' => __('Front page', 'busiprof'),\n\t\t'panel' => 'general_settings',\n\t\t'priority' => 0,\n \t) );\n\t\n\t\t// Enable Front Page\n\t\t$wp_customize->add_setting(\n\t\t\t'busiprof_theme_options[front_page]', \n\t\t\tarray(\n\t\t\t'default' => 'yes',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'type'=>'option'\n\t\t));\n\t\t\n\t\t$wp_customize->add_control(\n\t\t\t'busiprof_theme_options[front_page]', \n\t\t\tarray(\n\t\t\t\t'label' => __('Enable front page','busiprof' ),\n\t\t\t\t'section' => 'front_page_section',\n\t\t\t\t'type' => 'radio',\n\t\t\t\t'choices' => array(\n\t\t\t\t\t'yes'=>'ON',\n\t\t\t\t\t'no'=>'OFF'\n\t\t\t\t)\n\t\t));\n\t\t\n\t/* custom logo section */\n\t$wp_customize->add_section( 'logo_section' , array(\n\t\t'title' => __('Custom logo', 'busiprof'),\n\t\t'panel' => 'general_settings',\n\t\t'priority' => 1,\n \t) );\n\t\n\t\t// Logo\n\t\t$wp_customize->add_setting( 'busiprof_theme_options[upload_image]',array('type' => 'option', 'sanitize_callback' => 'sanitize_text_field') );\n\t\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'busiprof_theme_options[upload_image]', array(\n\t\t\t'label' => __( 'Upload logo', 'busiprof' ),\n\t\t\t'section' => 'logo_section',\n\t\t\t'settings' => 'busiprof_theme_options[upload_image]',\n\t\t) ) );\n\t\t\n\t\t// width\n\t\t$wp_customize->add_setting( 'busiprof_theme_options[width]', array( 'default' => 138 , 'type' => 'option','sanitize_callback' => 'sanitize_text_field'\t) );\n\t\t$wp_customize->add_control(\t'busiprof_theme_options[width]', \n\t\t\tarray(\n\t\t\t\t'label' => __('Enter Logo Width', 'busiprof' ),\n\t\t\t\t'section' => 'logo_section',\n\t\t\t\t'type' => 'text',\n\t\t));\n\t\t\n\t\t// height\n\t\t$wp_customize->add_setting( 'busiprof_theme_options[height]', array( 'default' => 49 , 'type' => 'option','sanitize_callback' => 'sanitize_text_field' ) );\n\t\t$wp_customize->add_control(\t'busiprof_theme_options[height]', \n\t\t\tarray(\n\t\t\t\t'label' => __('Enter Logo Height', 'busiprof' ),\n\t\t\t\t'section' => 'logo_section',\n\t\t\t\t'type' => 'text',\n\t\t));\n\t\t\n\t\t// enable logo text\n\t\t$wp_customize->add_setting( 'busiprof_theme_options[enable_logo_text]' , array(\n\t\t'default' => false,\n\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t'type'=>'option'\n\t\t) );\n\t\t$wp_customize->add_control('busiprof_theme_options[enable_logo_text]' , array(\n\t\t'label' => __( 'Enable logo text', 'busiprof' ),\n\t\t'section' => 'logo_section',\n\t\t'type' => 'checkbox'\n\t\t) );\n\t\t\n\t/* custom css section */\n\t$wp_customize->add_section( 'custom_css_section' , array(\n\t\t'title' => __('Custom CSS', 'busiprof'),\n\t\t'panel' => 'general_settings',\n\t\t'priority' => 2,\n \t) );\n\t\n\t\t// custom css\n\t\t$wp_customize->add_setting( 'busiprof_theme_options[busiprof_custom_css]', array( 'default' => '' , 'type' => 'option', 'sanitize_callback' => 'wp_filter_nohtml_kses',\n\t\t'sanitize_js_callback' => 'wp_filter_nohtml_kses', ) );\n\t\t$wp_customize->add_control(\t'busiprof_theme_options[busiprof_custom_css]', \n\t\t\tarray(\n\t\t\t\t'label' => __('Custom CSS', 'busiprof' ),\n\t\t\t\t'section' => 'custom_css_section',\n\t\t\t\t'type' => 'textarea',\n\t\t));\n\t\n\n\t/* footer section */\n\t$wp_customize->add_section( 'footer_copy_section' , array(\n\t\t'title' => __('Footer copyright settings', 'busiprof'),\n\t\t'panel' => 'general_settings',\n\t\t'priority' => 3,\n \t) );\n\t\n\t\t// copyright text\n\t\t$wp_customize->add_setting( 'busiprof_theme_options[footer_copyright_text]', array( 'default' => '<p>All Rights Reserved by BusiProf. Designed and Developed by <a href=\"'.esc_url('http://www.webriti.com').'\" target=\"_blank\">WordPress Theme</a>.</p> ' , 'type' => 'option', 'sanitize_callback' => 'busiprof_copyright_sanitize_text' ) );\n\t\t$wp_customize->add_control(\t'busiprof_theme_options[footer_copyright_text]', \n\t\t\tarray(\n\t\t\t\t'label' => __( 'Copyright text','busiprof' ),\n\t\t\t\t'section' => 'footer_copy_section',\n\t\t\t\t'type' => 'textarea',\n\t\t));\n\t\t\n\t\tfunction busiprof_copyright_sanitize_text( $input ) {\n\n\t\treturn wp_kses_post( force_balance_tags( $input ) );\n\n\t\t}\n\t\n\t\tfunction busiprof_copyright_sanitize_html( $input ) {\n\n\t\treturn force_balance_tags( $input );\n\n\t\t}\n\t\t\n}", "title": "" }, { "docid": "261b243376f64b58587aba959df525f9", "score": "0.6312743", "text": "function edit($id) \n\t{\n\t\t//validating passed server id\t\n\t\t$id=trim($id);\n\t\tif(!$this->_checkId($id))\n\t\t{\n\t\t\t$this->Session->setFlash('Please Enter Valid ID');\n\t\t\t$this->redirect('/api_settings/');\n\t\t}\n\t\t\n\t\t$this->ApiSetting->id = $id;\n\t\tif (empty($this->data)) \n\t\t{\n\t\t\t$this->data=$this->ApiSetting->read();\t\t\n\t\t $this->set('NameType',$this->data['ApiSetting']['name']); \n \n\t\t}\n\t\telse\n\t\t{\n \n\t// live validation\n \n if( $this->ApiSetting->find( 'count', array('conditions' => array('ApiSetting.id' => $id,'ApiSetting.user_id' =>$this->Session->read('user_id'),'ApiSetting.name' => 'Google_Analytics', )) ) > 0 ){\n//\"GA case\";\n App::import('Vendor', 'analytics');\t\n \ttry{ \n\t\t\t$oAnalytics = new analytics($this->data['ApiSetting']['api_key'], $this->data['ApiSetting']['api_password']);\n\t\t\t$oAnalytics->setProfileById(\"ga:\".$this->data['ApiSetting']['api_token']);\n\n\t\t\t$oAnalytics->setMonth(date('n'), date('Y'));\n\t\t\t$pgs=\"\";\n\t\t\t$page_views=$oAnalytics->getVisitors();\n\t\t\t \n\t} catch (Exception $e) { \n\t $this->Session->setFlash('Please Enter Valid API credentials');\n\t\t$this->redirect('/api_settings/edit/'.$id);\n}\n\n}\n//else{\n//\"Ping or Non GA case\";\n//} \n\n \t\t\tif($this->data['ApiSetting']['name']=='Ping'){\n\t\t\t\t$this->data['ApiSetting']['api_token']='';\n\t\t\t\t$this->data['ApiSetting']['api_url']='';\n\t\t\t\t$this->data['ApiSetting']['description']='';\n\t\t\t} \n \n\t\t\tif ($this->ApiSetting->save($this->data))\n\t\t\t{\t\t\n\t\t\t\t$this->Session->setFlash('API has been updated.');\n\t\t\t\t$this->redirect('/api_settings/');\n\t\t\t}\n\t\t}\t\n\t\t//$this->autoRender=false;\n\t\t$apis=array('Ping' => 'Ping','Google_Analytics'=>'Google Analytics','Ad_Word' =>'Ad Word');\n\t\t$this->set('api_names',$apis);\n\t}", "title": "" }, { "docid": "a6b19ef417a8a8f5e350dc3fb8584663", "score": "0.6310427", "text": "public function get_settings() {}", "title": "" }, { "docid": "58f796acb51f9b8bd2d1c34edccff410", "score": "0.6301085", "text": "function _settings($id, $mode, $display_vars = array())\n\t{\n\t\tglobal $db, $user, $auth, $template;\n\t\tglobal $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;\n\t\tglobal $cache;\n\n\t\t$form_key = 'ucp_' . $mode . '_settings';\n\t\tadd_form_key($form_key);\n\n\t\t$submit = (isset($_POST['submit'])) ? true : false;\n\n\t\t$display_vars = array_merge(array('title' => 'UCP_IM_SETTINGS'), $display_vars);\n\n\t\tif (isset($display_vars['lang']))\n\t\t{\n\t\t\t$user->add_lang($display_vars['lang']);\n\t\t}\n\n\t\t$this->new_config = $user->data;\n\t\t$cfg_array = (isset($_REQUEST['config'])) ? utf8_normalize_nfc(request_var('config', array('' => ''), true)) : $this->new_config;\n\t\t$error = array();\n\n\t\t// We validate the complete config if whished\n\t\tif (sizeOf($display_vars['vars']))\n\t\t{\n\t\t\t//validate_config_vars($display_vars['vars'], $cfg_array, $error);\n\t\t}\n\n\t\tif ($submit && !check_form_key($form_key))\n\t\t{\n\t\t\t$error[] = $user->lang['FORM_INVALID'];\n\t\t}\n\t\t// Do not write values if there is an error\n\t\tif (sizeof($error))\n\t\t{\n\t\t\t$submit = false;\n\t\t}\n\n\t\t// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...\n\t\tif (sizeOf($display_vars['vars']))\n\t\t{\n\t\t\tforeach ($display_vars['vars'] as $config_name => $null)\n\t\t\t{\n\t\t\t\tif (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$this->new_config[$config_name] = $config_value = $cfg_array[$config_name];\n\n\t\t\t\tif ($submit)\n\t\t\t\t{\n\t\t\t\t\t$this->_set_config($config_name, $config_value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($submit)\n\t\t{\n\t\t\t//add_log('ucp', 'LOG_CONFIG_' . strtoupper($mode));\n\n\t\t\t//trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));\n\t\t}\n\n\t\t$template->assign_vars(array(\n\t\t\t'S_SETTINGS' => true,\n\t\t\t'S_ERROR'\t => (sizeof($error)) ? true : false,\n\t\t\t'ERROR_MSG'\t => implode('<br />', $error),\n\n\t\t\t'S_MODE'\t => $mode,\n\t\t\t'S_FOUNDER'\t => ($user->data['user_type'] == USER_FOUNDER) ? true : false,\n\n\t\t\t'U_ACTION'\t => $this->u_action));\n\n\t\t// Output relevant page\n\t\tif (sizeOf($display_vars['vars']))\n\t\t{\n\t\t\tforeach ($display_vars['vars'] as $config_key => $vars)\n\t\t\t{\n\t\t\t\tif (!is_array($vars) && strpos($config_key, 'legend') === false)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (strpos($config_key, 'legend') !== false)\n\t\t\t\t{\n\t\t\t\t\t$template->assign_block_vars('options', array(\n\t\t\t\t\t\t'S_LEGEND'\t => true,\n\t\t\t\t\t\t'LEGEND'\t => (isset($user->lang[$vars])) ? $user->lang[$vars] : $vars));\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$type = explode(':', $vars['type']);\n\n\t\t\t\t$l_explain = '';\n\t\t\t\tif ($vars['explain'] && isset($vars['lang_explain']))\n\t\t\t\t{\n\t\t\t\t\t$l_explain = (isset($user->lang[$vars['lang_explain']])) ? $user->lang[$vars['lang_explain']] : $vars['lang_explain'];\n\t\t\t\t}\n\t\t\t\telse if ($vars['explain'])\n\t\t\t\t{\n\t\t\t\t\t$l_explain = (isset($user->lang[$vars['lang'] . '_EXPLAIN'])) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '';\n\t\t\t\t}\n\n\t\t\t\t$content = build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars);\n\n\t\t\t\tif (empty($content))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$template->assign_block_vars('options', array(\n\t\t\t\t\t'KEY'\t\t\t => $config_key,\n\t\t\t\t\t'TITLE'\t\t\t => (isset($user->lang[$vars['lang']])) ? $user->lang[$vars['lang']] : $vars['lang'],\n\t\t\t\t\t'S_EXPLAIN'\t\t => $vars['explain'],\n\t\t\t\t\t'TITLE_EXPLAIN'\t => $l_explain,\n\t\t\t\t\t'CONTENT'\t\t => $content,\n\t\t\t\t));\n\n\t\t\t\tunset($display_vars['vars'][$config_key]);\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "f06b9630dfa6ca6d22d1a77fae40df64", "score": "0.6299918", "text": "function updatesettingfrontend()\n {\n $field = $this->input->post('field');\n $field = smit_isset($field, '');\n $value = $this->input->post('value');\n $value = smit_isset($value, '');\n\n if( $field == 'be_frontend_praincubation' ){\n update_option('be_frontend_praincubation', $value);\n }elseif( $field == 'be_frontend_incubation' ){\n update_option('be_frontend_incubation', $value);\n }elseif( $field == 'be_frontend_praincubation_note' ){\n update_option('be_frontend_praincubation_note', $value);\n }elseif( $field == 'be_frontend_incubation_note' ){\n update_option('be_frontend_incubation_note', $value);\n }elseif( $field == 'be_frontend_profil' ){\n update_option('be_frontend_profil', $value);\n }elseif( $field == 'be_frontend_task' ){\n update_option('be_frontend_task', $value);\n }elseif( $field == 'be_frontend_function' ){\n update_option('be_frontend_function', $value);\n }\n }", "title": "" }, { "docid": "d8fedfa9c60c5583fd02e8b3bcf31a57", "score": "0.629966", "text": "public function get_setting_post() {\n try {\n\n $clinic_id = !empty($this->Common_model->escape_data($this->post_data['clinic_id'])) ? trim($this->Common_model->escape_data($this->post_data['clinic_id'])) : '';\n $setting_type = !empty($this->Common_model->escape_data($this->post_data['setting_type'])) ? trim($this->Common_model->escape_data($this->post_data['setting_type'])) : '';\n $user_type = !empty($this->Common_model->escape_data($this->post_data['user_type'])) ? trim($this->Common_model->escape_data($this->post_data['user_type'])) : '';\n\n if (empty($this->user_id) ||\n empty($setting_type)\n ) {\n $this->bad_request();\n }\n\n if ($user_type == 2) {\n $get_role_details = $this->Common_model->get_the_role($this->user_id);\n if (!empty($get_role_details['user_role_data'])) {\n $permission_data = array(\n 'role_data' => $get_role_details['user_role_data'],\n 'key' => 3\n );\n\n // 3 = if setting call for notification settings\n // 2 = if setting call for the data security \n // 1 = Share record\n if ($setting_type == 3) {\n $permission_data['module'] = 14;\n } else if ($setting_type == 2) {\n $permission_data['module'] = 17;\n } else if ($setting_type == 1) {\n $permission_data['module'] = 21;\n }\n\n $check_module_permission = $this->check_module_permission($permission_data);\n if ($check_module_permission == 2) {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('permission_error');\n $this->send_response();\n }\n }\n }\n\n $setting_where = array(\n 'setting_user_id' => $this->user_id,\n 'setting_type' => $setting_type\n );\n\n// if (!empty($clinic_id)) {\n// $setting_where['setting_clinic_id'] = $clinic_id;\n// }\n\n $get_setting_data = $this->Common_model->get_single_row(TBL_SETTING, '', $setting_where);\n\n if (!empty($get_setting_data)) {\n $this->my_response['status'] = true;\n $this->my_response['message'] = lang('common_detail_found');\n $this->my_response['data'] = $get_setting_data;\n } else {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('common_detail_not_found');\n }\n\n $this->send_response();\n } catch (ErrorException $ex) {\n $this->error = $ex->getMessage();\n $this->store_error();\n }\n }", "title": "" }, { "docid": "68a1c835caddda489359f1ebe6fc9ab1", "score": "0.6298342", "text": "public function settings() {\n\t\t$options = $this->core->get_options();\n\n\t\tif ( ! isset( $options['post_types'] ) ) {\n\t\t\t$options['post_types'] = array(\n\t\t\t\t'post',\n\t\t\t);\n\t\t}//end if\n\n\t\t$invalid_optimizely_api_key = FALSE;\n\n\t\tif ( ! empty( $options['optimizely_api_key'] ) ) {\n\t\t\t$projects = $this->core->optimizely()->get_projects();\n\n\t\t\tif ( ! $projects || is_wp_error( $projects ) || 'Authentication failed' == $projects ) {\n\t\t\t\t$invalid_optimizely_api_key = TRUE;\n\t\t\t}//end if\n\t\t}//end if\n\n\t\tinclude_once __DIR__ . '/templates/settings.php';\n\t}", "title": "" }, { "docid": "ef849881e5a85908969a8a8263182729", "score": "0.62974304", "text": "public function settings()\n\t{\n\t\t$this->init_rbac();\n\t\t$this->session->set_flashdata('admin_menu', 'active');\n\t\t$tax_request = new Request('GET', $this->base_url . '/taxes?' . http_build_query($this->request_body), $this->headers);\n\t\t$client_request = new Request('GET', $this->base_url . '/clients?' . http_build_query($this->request_body), $this->headers);\n\t\t$settings_request = new Request('GET', $this->base_url . '/settings?' . http_build_query($this->request_body), $this->headers);\n\t\t$roles_request = new Request('GET', $this->base_url . '/roles?' . http_build_query($this->request_body), $this->headers);\n\t\ttry{\n\t\t\t$tax_response = $this->httpAdapter->sendRequest($tax_request);\n\t\t\t$client_response = $this->httpAdapter->sendRequest($client_request);\n\t\t\t$settings_response = $this->httpAdapter->sendRequest($settings_request);\n\t\t\t$roles_response = $this->httpAdapter->sendRequest($roles_request);\n\n\t\t\t$tax = json_decode($tax_response->getBody()->getContents(), true);\n\t\t\t$clients = json_decode($client_response->getBody()->getContents(), true);\n\t\t\t$settings = json_decode($settings_response->getBody()->getContents(), true);\n\t\t\t$roles = json_decode($roles_response->getBody()->getContents(), true);\n\n\t\t\t$this->setData([\n\t\t\t\t'taxes' => $tax['data']['taxes'],\n\t\t\t\t'clients' => $clients['data']['clients'],\n\t\t\t\t'settings' => $settings['data']['settings'],\n\t\t\t\t'permissions' => $settings['data']['permissions'],\n\t\t\t\t'roles' => $roles['data']['roles']\n\t\t\t]);\n\t\t}catch(RequestException $ex){\n\t\t\tlog_message('error', 'Error fetching settings. ' . $ex->getMessage() . '. Trace : ' . $ex->getTraceAsString());\n\t\t}\n\t\t$this->setBody('admin/settings')->loadView();\n\t}", "title": "" }, { "docid": "77674852036787b8a3aa2b3d8a217e8e", "score": "0.62879187", "text": "public function settings_page() {\r\n\r\n\t\t// Flush the rewrite rules if the settings were updated.\r\n\t\tif ( isset( $_GET['settings-updated'] ) )\r\n\t\t\tflush_rewrite_rules(); ?>\r\n\r\n\t\t<div class=\"wrap\">\r\n\t\t\t<h1><?php esc_html_e( 'Properties Settings', 'houzez' ); ?></h1>\r\n\r\n\t\t\t<?php settings_errors(); ?>\r\n\r\n\t\t\t<form method=\"post\" action=\"options.php\">\r\n\t\t\t\t<?php settings_fields( 'houzez_settings' ); ?>\r\n\t\t\t\t<?php do_settings_sections( $this->settings_page ); ?>\r\n\t\t\t\t<?php submit_button( esc_attr__( 'Update Settings', 'houzez' ), 'primary' ); ?>\r\n\t\t\t</form>\r\n\r\n\t\t</div><!-- wrap -->\r\n\t<?php }", "title": "" }, { "docid": "84497ab3826afb978d15ab862fdc7a10", "score": "0.62876266", "text": "public function ext_amp_general_options(){\n $this->class = new EXT_AMP_General_Options();\n $this->class->ext_amp_general_settings();\n }", "title": "" }, { "docid": "fd7ad7aae27eb466144a55172e3e00d9", "score": "0.62829304", "text": "function savesettings() {\r\n global $CONFIG;\r\n \r\n // Save new settings:\r\n if ($CONFIG['up'] == 1) {\r\n // Validate numeric fields:\r\n if (isset($_POST['news_age'])) {\r\n if (!is_numeric($_POST['news_age']) || $_POST['news_age'] < 1 || $_POST['news_age'] > 31)\r\n die(do_error('The <i>News Age</i> field must been a number between 1 and 31.'));\r\n }\r\n\r\n if (!is_numeric($_POST['numitems']) || $_POST['numitems'] < 1 || $_POST['numitems'] > 25) {\r\n die(do_error('The <i>Number of Items</i> field must been a number between 1 and 25.'));\r\n }\r\n\r\n if (!is_numeric($_POST['maxlen']) || $_POST['maxlen'] < 25 || $_POST['maxlen'] > 32000) {\r\n die(do_error('The <i></i> field must been a number between 25 and 32000.'));\r\n }\r\n\r\n if (!is_numeric($_POST['max_subject_len']) || $_POST['max_subject_len'] < 20 || $_POST['max_subject_len'] > 255) {\r\n die(do_error('The <i></i> field must been a number between 20 and 255.'));\r\n }\r\n\r\n if (!is_numeric($_POST['numcomments']) || $_POST['numcomments'] < 5 || $_POST['numcomments'] > 20) {\r\n die(do_error('The <i></i> field must been a number between 5 and 20.'));\r\n }\r\n\r\n if (!is_numeric($_POST['maxcomlen']) || $_POST['maxcomlen'] < 25 || $_POST['maxcomlen'] > 2000) {\r\n die(do_error('The <i></i> field must been a number between 25 and 2000.'));\r\n }\r\n\r\n // Loop through the $_POST var:\r\n while (list ($key, $val) = each ($_POST)) {\r\n if (array_key_exists($key, $CONFIG)) {\r\n $sql = \"UPDATE \" . $CONFIG['tblPrefix'] . \"config SET value='$val' WHERE name='$key'\";\r\n\r\n $result = mysql_query($sql) or die(do_error(mysql_error(), 1));\r\n if (!$result) { \r\n die(do_error('Failed to save settings.')); \r\n }\r\n }\r\n }\r\n\r\n if ($_POST['oldnews'] != 'archive' && $_POST['oldnews'] != 'delete') {\r\n if (is_numeric($_POST['news_age'])) {\r\n $date = $_POST['news_age'] . ' ' . $_POST['measurement'];\r\n $sql = \"UPDATE \" . $CONFIG['tblPrefix'] . \"config SET value='$date' WHERE name='oldnews'\";\r\n\r\n $result = mysql_query($sql) or die(do_error(mysql_error(), 1));\r\n if (!$result) { \r\n die(do_error('Failed to save settings.')); \r\n }\r\n } else {\r\n die(do_error('Invalid value specified for Old News option'));\r\n }\r\n }\r\n\r\n // Echo success:\r\n $title = $CONFIG['sitename'] . ' - Settings Saved';\r\n include 'header.html';\r\n\r\n echo 'The settings have been saved to the database.<br /><br />\r\n <a href=\"' . $CONFIG['scriptdir'] . 'index.php?action=settings\">Click here</a> to go back to the settings page.';\r\n\r\n include 'footer.html';\r\n } else {\r\n die(do_error('You do not have permission to modify the settings.'));\r\n }\r\n }", "title": "" } ]
bf383af88bfc2d9caeff872629ae3881
Gets the private '.service_locator.emQV481' shared service.
[ { "docid": "66af0187f1e82c5623ecbccec6fad4fa", "score": "0.0", "text": "public static function do($container, $lazyLoad = true)\n {\n return $container->privates['.service_locator.emQV481'] = new \\Symfony\\Component\\DependencyInjection\\Argument\\ServiceLocator($container->getService, [\n 'App\\\\Controller\\\\Admin\\\\DashboardController::configureUserMenu' => ['privates', '.service_locator.q6hA_O0', 'get_ServiceLocator_Q6hAO0Service', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\DashboardController::index' => ['privates', '.service_locator.JeTwYn4', 'get_ServiceLocator_JeTwYn4Service', true],\n 'App\\\\Controller\\\\DashboardController::profile' => ['privates', '.service_locator.JeTwYn4', 'get_ServiceLocator_JeTwYn4Service', true],\n 'App\\\\Controller\\\\DashboardController::show_product' => ['privates', '.service_locator.4NJ5A2B', 'get_ServiceLocator_4NJ5A2BService', true],\n 'App\\\\Controller\\\\HomeController::index' => ['privates', '.service_locator.5b83dTe', 'get_ServiceLocator_5b83dTeService', true],\n 'App\\\\Controller\\\\HomeController::show_category' => ['privates', '.service_locator.5b83dTe', 'get_ServiceLocator_5b83dTeService', true],\n 'App\\\\Controller\\\\RegistrationController::register' => ['privates', '.service_locator.pwZ6MTM', 'get_ServiceLocator_PwZ6MTMService', true],\n 'App\\\\Controller\\\\ResetPasswordController::request' => ['privates', '.service_locator.CpaXrFh', 'get_ServiceLocator_CpaXrFhService', true],\n 'App\\\\Controller\\\\ResetPasswordController::reset' => ['privates', '.service_locator.pwZ6MTM', 'get_ServiceLocator_PwZ6MTMService', true],\n 'App\\\\Controller\\\\SecurityController::login' => ['privates', '.service_locator.UDgw6Ol', 'get_ServiceLocator_UDgw6OlService', true],\n 'App\\\\Kernel::loadRoutes' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'App\\\\Kernel::registerContainerConfiguration' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'App\\\\Kernel::terminate' => ['privates', '.service_locator.KfwZsne', 'get_ServiceLocator_KfwZsneService', true],\n 'kernel::loadRoutes' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'kernel::registerContainerConfiguration' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'kernel::terminate' => ['privates', '.service_locator.KfwZsne', 'get_ServiceLocator_KfwZsneService', true],\n 'App\\\\Controller\\\\Admin\\\\DashboardController:configureUserMenu' => ['privates', '.service_locator.q6hA_O0', 'get_ServiceLocator_Q6hAO0Service', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:autocomplete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:configureActions' => ['privates', '.service_locator.CKlWSja', 'get_ServiceLocator_CKlWSjaService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:configureAssets' => ['privates', '.service_locator.U4Bbnsn', 'get_ServiceLocator_U4BbnsnService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:configureCrud' => ['privates', '.service_locator.4C0Bh8j', 'get_ServiceLocator_4C0Bh8jService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:configureFilters' => ['privates', '.service_locator.Nt.ogDb', 'get_ServiceLocator_Nt_OgDbService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:configureResponseParameters' => ['privates', '.service_locator.2dc0eaX', 'get_ServiceLocator_2dc0eaXService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:createEditForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:createEditFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:createIndexQueryBuilder' => ['privates', '.service_locator.rAlqQ78', 'get_ServiceLocator_RAlqQ78Service', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:createNewForm' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:createNewFormBuilder' => ['privates', '.service_locator.tbo4Jjv', 'get_ServiceLocator_Tbo4JjvService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:delete' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:deleteEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:detail' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:edit' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:index' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:new' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:persistEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:renderFilters' => ['privates', '.service_locator.ZOQ9v2d', 'get_ServiceLocator_ZOQ9v2dService', true],\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:updateEntity' => ['privates', '.service_locator.l2QwsaZ', 'get_ServiceLocator_L2QwsaZService', true],\n 'App\\\\Controller\\\\DashboardController:index' => ['privates', '.service_locator.JeTwYn4', 'get_ServiceLocator_JeTwYn4Service', true],\n 'App\\\\Controller\\\\DashboardController:profile' => ['privates', '.service_locator.JeTwYn4', 'get_ServiceLocator_JeTwYn4Service', true],\n 'App\\\\Controller\\\\DashboardController:show_product' => ['privates', '.service_locator.4NJ5A2B', 'get_ServiceLocator_4NJ5A2BService', true],\n 'App\\\\Controller\\\\HomeController:index' => ['privates', '.service_locator.5b83dTe', 'get_ServiceLocator_5b83dTeService', true],\n 'App\\\\Controller\\\\HomeController:show_category' => ['privates', '.service_locator.5b83dTe', 'get_ServiceLocator_5b83dTeService', true],\n 'App\\\\Controller\\\\RegistrationController:register' => ['privates', '.service_locator.pwZ6MTM', 'get_ServiceLocator_PwZ6MTMService', true],\n 'App\\\\Controller\\\\ResetPasswordController:request' => ['privates', '.service_locator.CpaXrFh', 'get_ServiceLocator_CpaXrFhService', true],\n 'App\\\\Controller\\\\ResetPasswordController:reset' => ['privates', '.service_locator.pwZ6MTM', 'get_ServiceLocator_PwZ6MTMService', true],\n 'App\\\\Controller\\\\SecurityController:login' => ['privates', '.service_locator.UDgw6Ol', 'get_ServiceLocator_UDgw6OlService', true],\n 'kernel:loadRoutes' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'kernel:registerContainerConfiguration' => ['privates', '.service_locator.KfbR3DY', 'get_ServiceLocator_KfbR3DYService', true],\n 'kernel:terminate' => ['privates', '.service_locator.KfwZsne', 'get_ServiceLocator_KfwZsneService', true],\n ], [\n 'App\\\\Controller\\\\Admin\\\\DashboardController::configureUserMenu' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::index' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::new' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController::updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::index' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::new' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController::updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::index' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::new' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController::updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::index' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::new' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController::updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::index' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::new' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController::updateEntity' => '?',\n 'App\\\\Controller\\\\DashboardController::index' => '?',\n 'App\\\\Controller\\\\DashboardController::profile' => '?',\n 'App\\\\Controller\\\\DashboardController::show_product' => '?',\n 'App\\\\Controller\\\\HomeController::index' => '?',\n 'App\\\\Controller\\\\HomeController::show_category' => '?',\n 'App\\\\Controller\\\\RegistrationController::register' => '?',\n 'App\\\\Controller\\\\ResetPasswordController::request' => '?',\n 'App\\\\Controller\\\\ResetPasswordController::reset' => '?',\n 'App\\\\Controller\\\\SecurityController::login' => '?',\n 'App\\\\Kernel::loadRoutes' => '?',\n 'App\\\\Kernel::registerContainerConfiguration' => '?',\n 'App\\\\Kernel::terminate' => '?',\n 'kernel::loadRoutes' => '?',\n 'kernel::registerContainerConfiguration' => '?',\n 'kernel::terminate' => '?',\n 'App\\\\Controller\\\\Admin\\\\DashboardController:configureUserMenu' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:index' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:new' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\MenuCrudController:updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:index' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:new' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCategoryCrudController:updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:index' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:new' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\PostCrudController:updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:index' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:new' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\ProductCrudController:updateEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:autocomplete' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:configureActions' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:configureAssets' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:configureCrud' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:configureFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:configureResponseParameters' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:createEditForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:createEditFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:createIndexQueryBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:createNewForm' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:createNewFormBuilder' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:delete' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:deleteEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:detail' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:edit' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:index' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:new' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:persistEntity' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:renderFilters' => '?',\n 'App\\\\Controller\\\\Admin\\\\UserCrudController:updateEntity' => '?',\n 'App\\\\Controller\\\\DashboardController:index' => '?',\n 'App\\\\Controller\\\\DashboardController:profile' => '?',\n 'App\\\\Controller\\\\DashboardController:show_product' => '?',\n 'App\\\\Controller\\\\HomeController:index' => '?',\n 'App\\\\Controller\\\\HomeController:show_category' => '?',\n 'App\\\\Controller\\\\RegistrationController:register' => '?',\n 'App\\\\Controller\\\\ResetPasswordController:request' => '?',\n 'App\\\\Controller\\\\ResetPasswordController:reset' => '?',\n 'App\\\\Controller\\\\SecurityController:login' => '?',\n 'kernel:loadRoutes' => '?',\n 'kernel:registerContainerConfiguration' => '?',\n 'kernel:terminate' => '?',\n ]);\n }", "title": "" } ]
[ { "docid": "b43d8c17c7885b0217fb16fb8dc993ff", "score": "0.6066471", "text": "public static function getShared()\n {\n return static::$shared;\n }", "title": "" }, { "docid": "14d3b7ddcf5ac2c64b3034d9b476184f", "score": "0.6033757", "text": "protected function getService()\r\n {\r\n return $this->getContainer()->get('hoya_masterpass_service');\r\n }", "title": "" }, { "docid": "13086a76f5d8b2effcc41c3e193c76a1", "score": "0.59493434", "text": "public function getServiceLocator()\n {\n return $this->sm;\n }", "title": "" }, { "docid": "8288ee4cea35ea1008ba2e68d058da10", "score": "0.5896732", "text": "public function getService()\n {\n return $this->_service;\n }", "title": "" }, { "docid": "0a5eee6dc30177a4e64d7799b8fded81", "score": "0.58862877", "text": "public function getService() {\n\t\treturn $this->_service;\n\t}", "title": "" }, { "docid": "647d6e3bd2955ebc4ed1aef4dfdab5bd", "score": "0.5843323", "text": "public function getShared()\n {\n return $this->shared;\n }", "title": "" }, { "docid": "647d6e3bd2955ebc4ed1aef4dfdab5bd", "score": "0.5843323", "text": "public function getShared()\n {\n return $this->shared;\n }", "title": "" }, { "docid": "d741cd84bab29bc272e66f6ce6f405c3", "score": "0.57762563", "text": "protected function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "6726bcdc49853fb7543a1d849da63d1f", "score": "0.5724985", "text": "public function getService()\n {\n return isset($this->service) ? $this->service : '';\n }", "title": "" }, { "docid": "23375ac00ccf2bc3aede6fac2bfcc1a3", "score": "0.5709129", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "23375ac00ccf2bc3aede6fac2bfcc1a3", "score": "0.5709129", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "23375ac00ccf2bc3aede6fac2bfcc1a3", "score": "0.5709129", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "23375ac00ccf2bc3aede6fac2bfcc1a3", "score": "0.5709129", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "23375ac00ccf2bc3aede6fac2bfcc1a3", "score": "0.5709129", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "23375ac00ccf2bc3aede6fac2bfcc1a3", "score": "0.5709129", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "23375ac00ccf2bc3aede6fac2bfcc1a3", "score": "0.5709129", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "23375ac00ccf2bc3aede6fac2bfcc1a3", "score": "0.5709129", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "23375ac00ccf2bc3aede6fac2bfcc1a3", "score": "0.5709129", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "23375ac00ccf2bc3aede6fac2bfcc1a3", "score": "0.5709129", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "23375ac00ccf2bc3aede6fac2bfcc1a3", "score": "0.5709129", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "cc5be9ba8d82ebeff0d59aae77d3f2ab", "score": "0.5705644", "text": "public function getService()\r\n {\r\n if (array_key_exists(0, $this->_refs)) {\r\n return $this->_refs[0];\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "de72792bf9b7f52633baa729a81619cc", "score": "0.5703565", "text": "public static function getServiceKey(): string;", "title": "" }, { "docid": "84c2102565909dc0b34a1ee1323e885f", "score": "0.56952465", "text": "public static function getService(): ?string\n {\n return static::$service;\n }", "title": "" }, { "docid": "093aa5fd32a847617067584554b9e74f", "score": "0.5671663", "text": "public function get_external_service_provider();", "title": "" }, { "docid": "862fe6b9c9cc72e76eef4d0ff34bf40c", "score": "0.56558704", "text": "function service(string $key)\n {\n return sys()->get($key);\n }", "title": "" }, { "docid": "6cc8695d87535fd8af00c841bcd55cbb", "score": "0.56537366", "text": "private function getServiceLocator()\n {\n return $this->serviceLocator;\n }", "title": "" }, { "docid": "65f71a6cbd62bc8d9b7e3504225f403f", "score": "0.5602536", "text": "public function getService()\n {\n return \"Qik\";\n }", "title": "" }, { "docid": "856bc0c35fe7e0ffd34a11a3561f3485", "score": "0.5597524", "text": "function getServiceId(): string;", "title": "" }, { "docid": "f599628b31b916c6b73c92279a6ba1dd", "score": "0.5574255", "text": "public function getService()\r\n {\r\n return $this->getPlugin()->getService();\r\n }", "title": "" }, { "docid": "abe8217f47da6de842f64f74c254af44", "score": "0.5558498", "text": "public function __get($key) {\n\t\treturn $this->getDI()->getShared($key);\n\t}", "title": "" }, { "docid": "78cf7b68a1cc874a83cb0707600be909", "score": "0.5527683", "text": "public function getService()\n {\n return $this->getGateway()->getService();\n }", "title": "" }, { "docid": "dfe4e8ad073b4273aa410c352d753ddc", "score": "0.5524054", "text": "public function getSpecialService() {\n return $this->get(self::SPECIAL_SERVICE);\n }", "title": "" }, { "docid": "a6717121765206b547871479f08e613b", "score": "0.5490695", "text": "public function getServiceId()\n {\n return $this->serviceId;\n }", "title": "" }, { "docid": "6dd677c0c247869e5a5b0f283640fb23", "score": "0.5481114", "text": "protected function getService()\n {\n return $this->get($this->service);\n }", "title": "" }, { "docid": "d7efc0ba626ff3a964af8f9ffb983829", "score": "0.54623795", "text": "private function _getUserService()\n {\n return $this->get('HMAC_apiuser_service');\n }", "title": "" }, { "docid": "d3c8b2ef491b80d49583333540f8f8c4", "score": "0.54448086", "text": "abstract protected function getService();", "title": "" }, { "docid": "6a95b57f75cb1dcd47d82699c6011c4d", "score": "0.5442152", "text": "public function getServiceKey(): string {\n\t\treturn self::getServiceName();\n\t}", "title": "" }, { "docid": "e84ef9aaab0e114f6b6b252f1084c80e", "score": "0.5426615", "text": "public function getServiceId()\n {\n return $this->_scopeConfig->getValue(self::XML_FASTLY_SERVICE_ID);\n }", "title": "" }, { "docid": "2ab36525bf750732756d0ff733cfd672", "score": "0.5403741", "text": "public function getServiceLocator() \r\n { \r\n return $this->serviceLocator; \r\n }", "title": "" }, { "docid": "5c4cdb5f257a5c8c73251996dd0e0c88", "score": "0.5390043", "text": "public function & getServiceObject() {\n\t\treturn $this->serviceObject;\n\t}", "title": "" }, { "docid": "a88349891c788c3b672981cf6e1669af", "score": "0.5387798", "text": "public function __invoke()\n {\n return $this->service;\n }", "title": "" }, { "docid": "649d70f64827fa1e11f0597ff67547df", "score": "0.5384892", "text": "public function getServiceLocator() {\n\t\treturn $this->serviceLocator;\n\t}", "title": "" }, { "docid": "db0c8840d009d5589420fd897e434ad1", "score": "0.5384219", "text": "protected function getServiceLocator_Bfd5b6291539802202b7fb6cbde163a4Service()\n {\n return $this->services['service_locator.bfd5b6291539802202b7fb6cbde163a4'] = new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('esi' => function () {\n return ${($_ = isset($this->services['fragment.renderer.esi']) ? $this->services['fragment.renderer.esi'] : $this->get('fragment.renderer.esi')) && false ?: '_'};\n }, 'inline' => function () {\n return ${($_ = isset($this->services['fragment.renderer.inline']) ? $this->services['fragment.renderer.inline'] : $this->get('fragment.renderer.inline')) && false ?: '_'};\n }, 'ssi' => function () {\n return ${($_ = isset($this->services['fragment.renderer.ssi']) ? $this->services['fragment.renderer.ssi'] : $this->get('fragment.renderer.ssi')) && false ?: '_'};\n }));\n }", "title": "" }, { "docid": "10e4691df4dc7465147f68e46fc095ed", "score": "0.5341114", "text": "public function getServiceLocator() \n { \n return $this->serviceLocator; \n }", "title": "" }, { "docid": "10e4691df4dc7465147f68e46fc095ed", "score": "0.5341114", "text": "public function getServiceLocator() \n { \n return $this->serviceLocator; \n }", "title": "" }, { "docid": "10e4691df4dc7465147f68e46fc095ed", "score": "0.5341114", "text": "public function getServiceLocator() \n { \n return $this->serviceLocator; \n }", "title": "" }, { "docid": "b5e6dd24b89935b7fa7a35e3803a5cd1", "score": "0.5339813", "text": "static function svc($service)\n {\n if (!isset ($GLOBALS['-SVC'][$service]))\n {\n $class = '\\App\\Service\\\\' . $service;\n $GLOBALS['-SVC'][$service] = new $class;\n }\n return $GLOBALS['-SVC'][$service];\n }", "title": "" }, { "docid": "2fb4361092b090a31fc8f039321a0e01", "score": "0.5336613", "text": "protected function getService() {}", "title": "" }, { "docid": "c8eaa814a9d9c37753da44114085f12d", "score": "0.53363496", "text": "public static function shared(string $key)\n {\n return static::$share[$key] ?? null;\n }", "title": "" }, { "docid": "05af363f0b107de7699c1eac5738012c", "score": "0.5330902", "text": "abstract public function getService();", "title": "" }, { "docid": "0428cb48488846acc5b3daac664910d5", "score": "0.5327674", "text": "private function getCodeQRService()\n {\n return $this->codeQRService = new CodeQRService();\n }", "title": "" }, { "docid": "e604c18d2c7c447c9b12e7fee9593333", "score": "0.53190845", "text": "public function getServiceLocator();", "title": "" }, { "docid": "60730683aadd565d1fa13a61ec009fcd", "score": "0.5309804", "text": "public function getShared()\n {\n if (array_key_exists(\"shared\", $this->_propDict)) {\n if (is_a($this->_propDict[\"shared\"], \"\\Beta\\Microsoft\\Graph\\Model\\Shared\") || is_null($this->_propDict[\"shared\"])) {\n return $this->_propDict[\"shared\"];\n } else {\n $this->_propDict[\"shared\"] = new Shared($this->_propDict[\"shared\"]);\n return $this->_propDict[\"shared\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "807d8cbdbbfa5d870b18318272854375", "score": "0.53062844", "text": "public function getServiceLocator()\n\t{\n\t\treturn $this->serviceLocator;\n\t}", "title": "" }, { "docid": "f3caf1ba362f42c87ad601982f97f8c9", "score": "0.5306114", "text": "public function getService();", "title": "" }, { "docid": "f3caf1ba362f42c87ad601982f97f8c9", "score": "0.5306114", "text": "public function getService();", "title": "" }, { "docid": "e17c32880b6494a965ca1e2cf8c0a381", "score": "0.5304184", "text": "static public function getService($service)\n {\n return self::getServiceContainer()->getService($service);\n }", "title": "" }, { "docid": "4920ac55a38f970d33354356091d1f32", "score": "0.52857095", "text": "protected function getCacheService() {\n if ($this->_cacheService === NULL) {\n $this->setCacheService(\n PapayaCache::getService($this->papaya()->options)\n );\n }\n return $this->_cacheService;\n }", "title": "" }, { "docid": "507f9a931c2985606bd1e09dce65ead4", "score": "0.52624816", "text": "public function __get($name){\n return $this->getService($name);\n }", "title": "" }, { "docid": "5ef6bd12bf5066052d993a9c7f3e1367", "score": "0.52600557", "text": "public function getServiceLocator()\n\t{\n\t\treturn ServiceLocator::getInstance($this);\n\t}", "title": "" }, { "docid": "80a05cd5c26d57afa160b84acf9ba068", "score": "0.5258044", "text": "public static function getService($key)\n {\n return static::getInstance()->container[$key];\n }", "title": "" }, { "docid": "84b564ab1cfe698b3f3eb12e19aac08a", "score": "0.52452874", "text": "public static function getInstance(){\n if(!self::$instance instanceof SharedMemory){\n self::$instance = new SharedMemory();\n }\n return self::$instance;\n }", "title": "" }, { "docid": "9f48222fce47fa223adab8c09d338167", "score": "0.5237156", "text": "public function getService()\n {\n if (null === $this->service) {\n $this->service = $this->getServiceLocator()->getService();\n }\n return $this->service;\n }", "title": "" }, { "docid": "cff4c359e7737a952705138d209dd726", "score": "0.5220027", "text": "abstract public function getServiceName();", "title": "" }, { "docid": "4554fc39b6e813c2984402ff0a1a66dc", "score": "0.5218418", "text": "protected function getServiceHelper()\n {\n if ($this->serviceHelper === null) {\n $this->serviceHelper = Service::create($this->service);\n }\n return $this->serviceHelper;\n }", "title": "" }, { "docid": "b2b48febdda4a6700a4bfff369e20cb3", "score": "0.52130777", "text": "public function service() {\n if (is_null($this->service)) {\n $this->service = \\Drupal::service('lightning_charge');\n }\n\n return $this->service;\n }", "title": "" }, { "docid": "630c204ea12958a9fe479c3feabb999a", "score": "0.51993215", "text": "static public function getServiceContainer()\n {\n return self::$serviceContainer;\n }", "title": "" }, { "docid": "d3a9560827442db2c6bf752799b4d225", "score": "0.5197719", "text": "public function service($service)\n {\n return $this->services[$service] ?? null;\n }", "title": "" }, { "docid": "f91c11a8626ea7f1e98ece94f22fbd60", "score": "0.51896197", "text": "public static function getInstance() {\n if (!isset(self::$instance)) {\n self::$instance = new Service();\n }\n return self::$instance;\n }", "title": "" }, { "docid": "55aa38eeafadc5fafed66c3445f16f3a", "score": "0.5182511", "text": "public function getServiceLocator()\n {\n return $this->serviceLocator;\n }", "title": "" }, { "docid": "55aa38eeafadc5fafed66c3445f16f3a", "score": "0.5182511", "text": "public function getServiceLocator()\n {\n return $this->serviceLocator;\n }", "title": "" }, { "docid": "55aa38eeafadc5fafed66c3445f16f3a", "score": "0.5182511", "text": "public function getServiceLocator()\n {\n return $this->serviceLocator;\n }", "title": "" }, { "docid": "55aa38eeafadc5fafed66c3445f16f3a", "score": "0.5182511", "text": "public function getServiceLocator()\n {\n return $this->serviceLocator;\n }", "title": "" }, { "docid": "55aa38eeafadc5fafed66c3445f16f3a", "score": "0.5182511", "text": "public function getServiceLocator()\n {\n return $this->serviceLocator;\n }", "title": "" }, { "docid": "55aa38eeafadc5fafed66c3445f16f3a", "score": "0.5182511", "text": "public function getServiceLocator()\n {\n return $this->serviceLocator;\n }", "title": "" }, { "docid": "55aa38eeafadc5fafed66c3445f16f3a", "score": "0.5182511", "text": "public function getServiceLocator()\n {\n return $this->serviceLocator;\n }", "title": "" }, { "docid": "267a82c995e3943d421a765d6a1c0468", "score": "0.5160461", "text": "public function getEmcService() {\n if ($this->validateConfig()) {\n return array(\n 'app_id' => $this->getAppId(),\n 'app_secret' => $this->getAppSecret(),\n 'auth_page' => $this->getAuthPage(),\n 'token_page' => $this->getTokenPage(),\n 'infocard' => $this->getInfocard(),\n 'persistent_data_handler' => $this->persistentDataHandler,\n 'http_client_handler' => $this->getHttpClient(),\n );\n }\n\n return FALSE;\n }", "title": "" }, { "docid": "58879c94537b1ec604e12cd1480dac17", "score": "0.5159049", "text": "public function getService()\n {\n return $this->config['service'];\n }", "title": "" }, { "docid": "344d4c65cdbe2940a0d37f91b3790c13", "score": "0.515656", "text": "public function getService()\n {\n if (array_key_exists(\"service\", $this->_propDict)) {\n if (is_a($this->_propDict[\"service\"], \"\\Beta\\Microsoft\\Graph\\Model\\ServiceInformation\") || is_null($this->_propDict[\"service\"])) {\n return $this->_propDict[\"service\"];\n } else {\n $this->_propDict[\"service\"] = new ServiceInformation($this->_propDict[\"service\"]);\n return $this->_propDict[\"service\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "6d5b064aafe4caa696cb1cdfacd6994c", "score": "0.51561385", "text": "protected function getImageService()\n {\n return $this->objectManager->get(ImageService::class);\n }", "title": "" }, { "docid": "6d5b064aafe4caa696cb1cdfacd6994c", "score": "0.51561385", "text": "protected function getImageService()\n {\n return $this->objectManager->get(ImageService::class);\n }", "title": "" }, { "docid": "3d2bbcfda3fece0f855752a8794ebebf", "score": "0.51480985", "text": "public function getServiceName();", "title": "" }, { "docid": "c9f97b81dd108e8844e3486b6b8d7930", "score": "0.5145978", "text": "public function get_id_service_application()\n\t{\n\t\treturn $this->id_service_application;\n\t}", "title": "" }, { "docid": "e3af3cdee320a0101473dec1abadd449", "score": "0.5138193", "text": "public function getServiceName() : string;", "title": "" }, { "docid": "9836abd02245c06925423969da8d344e", "score": "0.51295793", "text": "private function getSourceService()\n {\n return $this->sourceService;\n }", "title": "" }, { "docid": "a4c797aea7d8f9776aaff8268908c2ea", "score": "0.511235", "text": "public static function getInstance()\r\n {\r\n if (!self::$instance) {\r\n self::$instance = new Service();\r\n }\r\n\r\n return self::$instance;\r\n }", "title": "" }, { "docid": "1167c3317112541db98d9d46edb11efa", "score": "0.5100921", "text": "public function getDefault_service()\n {\n return isset($this->default_service) ? $this->default_service : null;\n }", "title": "" }, { "docid": "b12011fd7267016ec1a0c320e2c7f80c", "score": "0.51005226", "text": "public function getService(): ?string {\n $val = $this->getBackingStore()->get('service');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'service'\");\n }", "title": "" }, { "docid": "736f8e05090019a67cf5ae78469b767f", "score": "0.5091279", "text": "public function __get($name) {\n return $this->getService($name);\n }", "title": "" }, { "docid": "bb53ff2b225fd782eee02b5ce0844a07", "score": "0.5088755", "text": "public function setShared(string $name, $definition): ServiceInterface;", "title": "" }, { "docid": "1441d8279647073254c4332b7978c339", "score": "0.50598705", "text": "public function getHostService()\n {\n return $this->hostService;\n }", "title": "" }, { "docid": "fb4c2be44a812e964c3d599f44f14546", "score": "0.5055614", "text": "public static function getInstance ()\n\t{\n\t\tif (self::$instance === NULL)\n\t\t\tself::$instance = new DynamicRpcService();\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "7590e5bb8fbd5814a44a1a8d60e7cc3b", "score": "0.5032788", "text": "public function getServiceLocator()\n {\n return $this->serviceLocator->getServiceLocator();\n }", "title": "" }, { "docid": "7590e5bb8fbd5814a44a1a8d60e7cc3b", "score": "0.5032788", "text": "public function getServiceLocator()\n {\n return $this->serviceLocator->getServiceLocator();\n }", "title": "" }, { "docid": "59db6a0da5c257fc5720c7dec11b7524", "score": "0.5027105", "text": "public function getServiceKey()\n {\n return $this->getParameter('serviceKey');\n }", "title": "" }, { "docid": "79b3788ddc812048ac0a450063b3b0a5", "score": "0.50232863", "text": "public function getServiceEvo() {\n return $this->serviceEvo;\n }", "title": "" }, { "docid": "87fd0ff0a2d8c72efdf7856410ed9873", "score": "0.50216526", "text": "function get_satellite_service()\n {\n return($this->doSimple(__FUNCTION__));\n }", "title": "" }, { "docid": "82047122c5cafab834b37d8912bc34a6", "score": "0.5018672", "text": "protected function getService()\n {\n if (null === static::$service) {\n $container = $this->createClient()->getContainer();\n $session = new Session(new MockArraySessionStorage());\n $session->setId('12345');\n $cacheFactory = new CacheFactory($container);\n static::$service = new PermissionService($session, $container->get('doctrine'), $cacheFactory);\n }\n\n return static::$service;\n }", "title": "" }, { "docid": "e58a7b806f9aa671a421331edd8a34bd", "score": "0.50154907", "text": "protected static function getImageService()\n {\n\t\t/** @var ObjectManager $objectManager */\n\t\t$objectManager = GeneralUtility::makeInstance(ObjectManager::class);\n\t\treturn $objectManager->get(ImageService::class);\n }", "title": "" }, { "docid": "976358769d59935c2758bd6d4fe3524b", "score": "0.49988115", "text": "public static function instance($service = null)\n {\n\t\tif ( ! isset(self::$_instance))\n\t\t{\n\t\t\tGclient::$_instance = new Gclient($service);\n\t\t}\n\t\tif ($service)\n\t\t{\n\t\t\tGclient::$_instance->add_service($service);\n\t\t\t//Gclient::$_instance = new Gclient($service);\n\t\t}\n return Gclient::$_instance;\n }", "title": "" }, { "docid": "e618cfd71f21862838fb6078555a2ff3", "score": "0.49839944", "text": "abstract public static function getServiceType(): string;", "title": "" } ]
7397d2e391799b827e5f14198fbfd53f
Get the zend framework library path
[ { "docid": "56fdef1d3f14c2582f35716af9706b0e", "score": "0.5943389", "text": "protected static function getZendPath(string $vendorPath): string\n {\n $environment = getenv('ZF2_PATH');\n if ($environment) {\n return $environment;\n }\n\n if (defined('ZF2_PATH')) {\n return ZF2_PATH;\n }\n\n $libraryPath = $vendorPath . '/ZF2/library';\n if (is_dir($libraryPath)) {\n return $libraryPath;\n }\n\n throw new \\RuntimeException(\n 'Unable to load ZF2. Run `php composer.phar install` or define a ZF2_PATH environment variable.'\n );\n }", "title": "" } ]
[ { "docid": "f6d5075dd7b85a77ad24f906a681ff76", "score": "0.7418666", "text": "static public function getLibraryPath();", "title": "" }, { "docid": "5af81391a9f77613fc6c426ea914f8f9", "score": "0.73146176", "text": "public static function GetFrameworkPath()\r\t\t\t{\r\t\t\t\treturn __FRAMEWORK_PATH__;\r\t\t\t}", "title": "" }, { "docid": "d15258f0576bbb5b504dd94fc4ca655d", "score": "0.715432", "text": "public function get_framework_path() {\n\n\t\treturn untrailingslashit( plugin_dir_path( $this->get_framework_file() ) );\n\t}", "title": "" }, { "docid": "6e2c789a649f68dfb187c0bd4a906db5", "score": "0.7078705", "text": "public static function getFrameworkDir(): string {\n\t\treturn \\dirname(__FILE__);\n\t}", "title": "" }, { "docid": "cb213ed6a2c0d8b9dfd81adc6c610ab5", "score": "0.6988704", "text": "public function getLibrariesPath() {\n return $this->libraryResourcePath;\n }", "title": "" }, { "docid": "6f02627ae6f6ab94703fc8e3e696610b", "score": "0.68312776", "text": "function getAppLibSrcDir()\n{\n return \"../\" . getLibSrcDir();\n}", "title": "" }, { "docid": "1871df77df89ca63ead09ca47f627936", "score": "0.6722892", "text": "public function getLibDir() {\n if($this->config->lib_dir) {\n return $this->config->lib_dir;\n }\n\n return $this->getBaseDir() . DIRECTORY_SEPARATOR . 'lib';\n }", "title": "" }, { "docid": "1eab4d1553eeebed074d42b9630defe1", "score": "0.65224135", "text": "public function getLibBaseDir()\n {\n return $this->libBaseDir;\n }", "title": "" }, { "docid": "61951417524a58232b25ccf8f7a041bf", "score": "0.62810737", "text": "public function getIntegratorClassPath();", "title": "" }, { "docid": "8eeb4119cfeb37e9a87b3e45c4ebed83", "score": "0.62692255", "text": "public function getAutoloaderPath(): string\r\n\t{\r\n\t\treturn $this->sStubAutoloaderPath;\r\n\t}", "title": "" }, { "docid": "01a1c70685fab604f081b1060cad4b36", "score": "0.6220934", "text": "public function lib()\n\t{\n\t\treturn Convert::$vendor.'tcpdf/';\n\t}", "title": "" }, { "docid": "dbd80bf954206a1670d2af81f77611ef", "score": "0.61959964", "text": "static public function FrameworkDirPath($path = \"\")\n {\n return realpath(__FW . \"/\" . $path);\n }", "title": "" }, { "docid": "4663df2b7e9cde13369df35ea8cd5291", "score": "0.6160298", "text": "protected function _getClassPath()\r\n {\r\n return $this->app->path->path('jbzoo:classes') . DS . 'jbtemplate.php';\r\n }", "title": "" }, { "docid": "549e1c5a19cc15c5394038503def50ad", "score": "0.6139286", "text": "static public function getModulePath() { return dirname(__FILE__); }", "title": "" }, { "docid": "6024e4db37eaa614e1724db156e34639", "score": "0.6123586", "text": "public function get_framework_assets_path() {\n\n\t\treturn $this->get_framework_path() . '/assets';\n\t}", "title": "" }, { "docid": "6a880eb4dee1e813c9694e9e288ab764", "score": "0.6113818", "text": "function phpunit_path() {\n return $this->xfm_path().'/unittests/vendors';\n }", "title": "" }, { "docid": "300e4d2e363e793ce5bab9a46f354076", "score": "0.6110917", "text": "public static function getJqPath()\n {\n $confArr = T3jqueryUtility::getConf();\n if (preg_match(\"/\\/$/\", $confArr['configDir'])) {\n return $confArr['configDir'];\n } else {\n return $confArr['configDir'] . '/';\n }\n }", "title": "" }, { "docid": "55415f684046d4375bd742ecfc4d5c47", "score": "0.60887975", "text": "function _getModuleSearchPath() {\n $paths = array_merge(App::path('libs'), App::path('components'));\n $paths[] = App::pluginPath('Guard') . 'controllers' . DS . 'components' . DS;\n return $paths;\n }", "title": "" }, { "docid": "ea3f51655d9e5e42aa1472e85ac1c9d0", "score": "0.60764986", "text": "public function get_framework_file() {\n\n\t\treturn __FILE__;\n\t}", "title": "" }, { "docid": "ffc45cdd064611d27b45d71820b7b954", "score": "0.6036107", "text": "public function appPath()\n { \n return $this->basePath . 'app';\n }", "title": "" }, { "docid": "eb1e88f6c0bcbc36c58c5fe74dfd7c40", "score": "0.6035372", "text": "public function getBasePath()\n {\n return base_path('packages');\n }", "title": "" }, { "docid": "ea335b067a6435a603cc888361136a8c", "score": "0.59947735", "text": "public function getVendorDirectoryPath()\n {\n $path = (string) Mage::getConfig()->getNode('global/composer_autoloader/path');\n if (!$path) {\n $path = self::DEFAULT_PATH;\n }\n $path = str_replace('/', DS, $path);\n $path = str_replace('{{basedir}}', Mage::getBaseDir(), $path);\n $path = str_replace('{{libdir}}', Mage::getBaseDir('lib'), $path);\n $path = rtrim($path, DS);\n return realpath($path);\n }", "title": "" }, { "docid": "07fe07300a87f72b0f436924acacac33", "score": "0.59786433", "text": "function getAppEngineBinDir()\n{\n return \"../\" . getEngineBinDir();\n}", "title": "" }, { "docid": "16e27a1a7ebb1ec2049e793a954c0f4d", "score": "0.5911477", "text": "public function getVendorDir();", "title": "" }, { "docid": "0fa0db5586d1c117fff727ff3fe2304e", "score": "0.5903707", "text": "public function getObjectBridgeClassPath()\n {\n return __DIR__ . '/ObjectBridge.php';\n }", "title": "" }, { "docid": "9a51c8655538295e446a2f92e64c9509", "score": "0.5903329", "text": "public function zefirePath()\n { \n return $this->vendorPath() . DIRECTORY_SEPARATOR . 'zefireio' . DIRECTORY_SEPARATOR . 'framework' . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'Zefire';\n }", "title": "" }, { "docid": "63fe176e80e84fc194ed06f4217b80b6", "score": "0.5895697", "text": "protected function getPackageFolder()\n {\n return realpath(__DIR__);\n }", "title": "" }, { "docid": "73a5293f2fe0645d50137c28a6c5a1ea", "score": "0.5874159", "text": "public function vendorPath()\n { \n return $this->basePath . 'vendor';\n }", "title": "" }, { "docid": "f49153a8bd38663a60d60948da85c4e9", "score": "0.58507144", "text": "function getPathToPackages()\n {\n return $this->basePath.$this->pathPackages;\n }", "title": "" }, { "docid": "6ae21bdb6239d7a1d1d4a83e46a635b8", "score": "0.58036184", "text": "public function basePath()\n {\n return __DIR__ . '/../../';\n }", "title": "" }, { "docid": "ac4b958c2ebeb30ad27a936250aeceb7", "score": "0.57955223", "text": "public function get_path_helper()\n\t{\n\t\treturn $this->phpbb_path_helper;\n\t}", "title": "" }, { "docid": "042761ccca45a1d9543a4d4a55148a7a", "score": "0.57885146", "text": "public static function getBasePath() {\n return dirname(__DIR__);\n }", "title": "" }, { "docid": "042761ccca45a1d9543a4d4a55148a7a", "score": "0.57885146", "text": "public static function getBasePath() {\n return dirname(__DIR__);\n }", "title": "" }, { "docid": "042761ccca45a1d9543a4d4a55148a7a", "score": "0.57885146", "text": "public static function getBasePath() {\n return dirname(__DIR__);\n }", "title": "" }, { "docid": "042761ccca45a1d9543a4d4a55148a7a", "score": "0.57885146", "text": "public static function getBasePath() {\n return dirname(__DIR__);\n }", "title": "" }, { "docid": "7de9e50495e144b0e77c499c92a450d7", "score": "0.57882446", "text": "public function GetBasePath ();", "title": "" }, { "docid": "7de9e50495e144b0e77c499c92a450d7", "score": "0.57882446", "text": "public function GetBasePath ();", "title": "" }, { "docid": "5c70d3201b3523598b72b2d64b11ac45", "score": "0.5786709", "text": "public function getClassPath(): string;", "title": "" }, { "docid": "f0eb5e339f001e14341d1831aa5660d7", "score": "0.57821786", "text": "public function path()\n {\n return $this->basePath.'/app';\n }", "title": "" }, { "docid": "c6ad2042b1ea333a052e45727f1828c2", "score": "0.5769479", "text": "public function getJsHelperPath()\n {\n return $this->config->get('paths.js_helper', resource_path('js/libs/laravel-translation.js'));\n }", "title": "" }, { "docid": "a226d255da509ce4a44b81e8f515d587", "score": "0.5753081", "text": "function api_create_include_path_setting() {\n\t$include_path = ini_get ( 'include_path' );\n\tif (! empty ( $include_path )) {\n\t\t$include_path_array = explode ( PATH_SEPARATOR, $include_path );\n\t\t$dot_found = array_search ( '.', $include_path_array );\n\t\tif ($dot_found !== false) {\n\t\t\t$result = array ();\n\t\t\tforeach ( $include_path_array as $path ) {\n\t\t\t\t$result [] = $path;\n\t\t\t\tif ($path == '.') {\n\t\t\t\t\t// The path of ZLMS PEAR packages is to be inserted after the current directory path.\n\t\t\t\t\t$result [] = api_get_path ( LIB_PATH ) . 'pear';\n\t\t\t\t\t$result [] = api_get_path ( LIB_PATH ) . \"PHPExcel\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t//var_dump($result);exit;\n\t\t\treturn implode ( PATH_SEPARATOR, $result );\n\t\t}\n\t\t// Current directory is not listed in the include_path setting, low probability is here.\n\t\treturn api_get_path ( LIB_PATH ) . 'pear' . PATH_SEPARATOR . api_get_path ( LIB_PATH ) . \"PHPExcel\" . PATH_SEPARATOR . $include_path;\n\t}\n\t// The include_path setting is empty, low probability is here.\n\treturn api_get_path ( LIB_PATH ) . 'pear';\n}", "title": "" }, { "docid": "4d52d5432e4eb2848b18076babfe6860", "score": "0.5744977", "text": "function getAppEngineSrcDir()\n{\n return \"../\" . getEngineSrcDir();\n}", "title": "" }, { "docid": "7dd8ddf69f64583c00f984b0d723ef57", "score": "0.57446724", "text": "public function path()\n {\n return $this->basePath . DIRECTORY_SEPARATOR . 'app';\n }", "title": "" }, { "docid": "9abe0b45e20058baaac08036ee619aa8", "score": "0.57437193", "text": "public function getBasePath();", "title": "" }, { "docid": "9abe0b45e20058baaac08036ee619aa8", "score": "0.57437193", "text": "public function getBasePath();", "title": "" }, { "docid": "9abe0b45e20058baaac08036ee619aa8", "score": "0.57437193", "text": "public function getBasePath();", "title": "" }, { "docid": "1725e3e2904fc2b4b877976939cd4bd0", "score": "0.57429916", "text": "static public function FrameworkConfigsPath($path = \"\")\n {\n return realpath(__FW_CONFIGS . \"/\" . $path);\n }", "title": "" }, { "docid": "6dbb51bb5cec532d5f5ef6995dd555f4", "score": "0.5739727", "text": "public function getAppDirectory()\n {\n return dirname(__FILE__);\n }", "title": "" }, { "docid": "e63a71b3c516d72a9f1cde0f1dcdfc7d", "score": "0.57383835", "text": "public static function getBasePath(): string\n {\n return self::$basePath ?? \"\";\n }", "title": "" }, { "docid": "4d9a9e5f333626af466cda67dcf7630c", "score": "0.57378983", "text": "public function getBasePath()\n {\n return dirname(__DIR__);\n }", "title": "" }, { "docid": "4d9a9e5f333626af466cda67dcf7630c", "score": "0.57378983", "text": "public function getBasePath()\n {\n return dirname(__DIR__);\n }", "title": "" }, { "docid": "4d9a9e5f333626af466cda67dcf7630c", "score": "0.57378983", "text": "public function getBasePath()\n {\n return dirname(__DIR__);\n }", "title": "" }, { "docid": "d9938ae1119cdfec0be9c67cc6e65f1e", "score": "0.5736697", "text": "protected function configPath()\n {\n return __DIR__ . '/../config/jauth.php';\n }", "title": "" }, { "docid": "2fc631fb8e5ba1f2c400fc17c8271076", "score": "0.57321143", "text": "public function getBasePath(): string {\n return realpath(__DIR__ . \"/../../\") . \"/\";\n }", "title": "" }, { "docid": "106bdc803f12347cfa037543edcbd249", "score": "0.5699904", "text": "function getBasePath() {\n\t\treturn dirname(__FILE__);\n\t}", "title": "" }, { "docid": "26b428b60e355a444045928f3940febb", "score": "0.56906915", "text": "public function getAppBasePath()\n {\n return $this->app_base_path;\n }", "title": "" }, { "docid": "176f6a73d6e312840380a3691d0a7329", "score": "0.5689364", "text": "protected function declareConfigDir() {\r\n return ROOT_PATH . '/app/config'; //require declaring ROOT_PATH\r\n }", "title": "" }, { "docid": "594f6b0ee77d6ee9711720c04cd5613f", "score": "0.56864756", "text": "public function getComposerAppBasePath()\n {\n return $this->composer_app_base_path;\n }", "title": "" }, { "docid": "255efed09002afd798d46dc75248b393", "score": "0.56464106", "text": "public function app_directory()\n\t{\n\t\treturn $this->app_directory;\n\t}", "title": "" }, { "docid": "7b580a4d4bdab4504a433650962e5fbd", "score": "0.5645965", "text": "public function getPluginsDir()\n {\n\treturn sfConfig::get('sf_extjs'.$this->getExtjsVersion().'_plugins_dir');\n }", "title": "" }, { "docid": "4b69c1a7acb4b5bddc398bdae0092d37", "score": "0.5645412", "text": "public function GetAppRoot ();", "title": "" }, { "docid": "4b69c1a7acb4b5bddc398bdae0092d37", "score": "0.5645412", "text": "public function GetAppRoot ();", "title": "" }, { "docid": "3a8ff5e72f206579607cf4c1bf76f50f", "score": "0.56376505", "text": "function SkyGetRoot() {\n\treturn dirname(dirname(dirname(dirname(__DIR__)))) . \"/\";\n}", "title": "" }, { "docid": "36e07ae590d2401011593c031e67d89a", "score": "0.5629753", "text": "public function getModelsFactoryPath()\n {\n return Config::get('modules.modelsFactoryPath');\n }", "title": "" }, { "docid": "f66b9a9395cc7cf50479099b7bcce05a", "score": "0.5626111", "text": "public function getLibraries();", "title": "" }, { "docid": "f66b9a9395cc7cf50479099b7bcce05a", "score": "0.5626111", "text": "public function getLibraries();", "title": "" }, { "docid": "65152d6fc4fb1179c65520e84cce269b", "score": "0.56250626", "text": "public function getPath()\n {\n return base_path().'/vendor/'.$this->getName();\n }", "title": "" }, { "docid": "52d4b1bcb62f6220101bdc60075ab7de", "score": "0.5618724", "text": "protected function getRootWebPath()\n {\n return realpath(__DIR__ . '/../../../web');\n }", "title": "" }, { "docid": "a063138e9af6b493ba6131a3346645b4", "score": "0.5611388", "text": "function dirPath() { return (\"../../../../\"); }", "title": "" }, { "docid": "b5f3e257d29abf8612e2c5e4d719dafd", "score": "0.5611319", "text": "public function getPackageDir()\n\t{\n\t\treturn __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..';\n\t}", "title": "" }, { "docid": "d652e228b75fabd74c2a2d3ef1a38418", "score": "0.560991", "text": "public function getAppPath()\n {\n return $this->rootPath.'/app/';\n }", "title": "" }, { "docid": "65ea9f26ba019d4fab39c8c9963e0247", "score": "0.5609077", "text": "public function getDeploymentPackageDirectory()\n {\n return __DIR__;\n }", "title": "" }, { "docid": "9ca082a802b6e58480c5f829fbc3ace7", "score": "0.56066", "text": "protected function getConfigPath()\n {\n return realpath(__DIR__.'/../config/jsroute.php');\n }", "title": "" }, { "docid": "ac5d246f345ba2123535f2ceeef37ee1", "score": "0.56041425", "text": "public function getAppPath()\n {\n return $this->appPath;\n }", "title": "" }, { "docid": "ac5d246f345ba2123535f2ceeef37ee1", "score": "0.56041425", "text": "public function getAppPath()\n {\n return $this->appPath;\n }", "title": "" }, { "docid": "ac5d246f345ba2123535f2ceeef37ee1", "score": "0.56041425", "text": "public function getAppPath()\n {\n return $this->appPath;\n }", "title": "" }, { "docid": "6c2f53d0a3224523a33a45f628edeae3", "score": "0.5603795", "text": "public function getBasePath()\n {\n return static::BASE_PATH;\n }", "title": "" }, { "docid": "2f06847bc893f9217810e537a80d0d4d", "score": "0.55765015", "text": "public function get_framework_assets_url() {\n\n\t\treturn untrailingslashit( plugins_url( '/assets', $this->get_framework_file() ) );\n\t}", "title": "" }, { "docid": "957b7dd8ad090369a2e7e2f723105504", "score": "0.5568943", "text": "public static function get_libs()\n\t\t{\n\t\t\tif (self::$libs === null) {\n\t\t\t\t$libs = array();\n\t\t\t\t$base = BASE_DIR.self::DIR_VENDOR;\n\t\t\t\t$vendors = \\System\\Directory::ls($base, 'd');\n\n\t\t\t\tforeach ($vendors as $vendor) {\n\t\t\t\t\t$vendor_path = $base.'/'.$vendor;\n\t\t\t\t\t$local = \\System\\Directory::ls($vendor_path, 'd');\n\n\t\t\t\t\tforeach ($local as $key=>$lib) {\n\t\t\t\t\t\t$local[$key] = $vendor.'/'.$lib;\n\t\t\t\t\t}\n\n\t\t\t\t\t$libs = array_merge($libs, $local);\n\t\t\t\t}\n\n\t\t\t\tself::$libs = $libs;\n\t\t\t}\n\n\t\t\treturn self::$libs;\n\t\t}", "title": "" }, { "docid": "20a52f095e22f7b173d5e8b9c571c9fd", "score": "0.55688727", "text": "function addLibIncludePath( $path )\n{\n\taddIncludePath( getAppLibSrcDir() . $path ); \n}", "title": "" }, { "docid": "cfc2fafd1be4a36fefe8dbc52b7ec1b4", "score": "0.55641204", "text": "public function getAppPath()\n\t{\n\t\treturn $this->_appPath;\n\t}", "title": "" }, { "docid": "fcecc7ab28826bb300af58ac7adff284", "score": "0.5556186", "text": "protected function _getEnvironmentPath() {\n\t\t$path = realpath(APP);\n\t\tif (substr($path, -1, 1) !== DS) {\n\t\t\t$path .= DS;\n\t\t}\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "e81919dd07bc1761c9bc4299c68d1552", "score": "0.5554825", "text": "private static function getPath()\n {\n return _PS_MODULE_DIR_ . 'aramexshipping/wsdl/';\n }", "title": "" }, { "docid": "fa66af842f2166ac213faec33f9a80b1", "score": "0.554417", "text": "public static function getPhpPath()\n {\n return static::$instance->config[static::CFG_PHP];\n }", "title": "" }, { "docid": "e9056884498f6240c8c9e23b7ff9ac0a", "score": "0.5540689", "text": "protected function get_library() {\n\n return $this->_library;\n }", "title": "" }, { "docid": "15299b18090ecb099eda90cda9c9b590", "score": "0.5533368", "text": "protected function getFixturesPath()\n {\n if (!defined('APPLICATION_PATH')) {\n throw new Zle_Exception(\n 'You must define APPLICATION_PATH constant or override this method'\n );\n }\n return realpath(APPLICATION_PATH . '/../tests/fixtures');\n }", "title": "" }, { "docid": "50b7cd9d91e58f404f61168721cd0246", "score": "0.5532292", "text": "protected function getIncludeDir()\n {\n return realpath(__DIR__);\n }", "title": "" }, { "docid": "3c78a69c58a126de87a03f90d28d3481", "score": "0.5531146", "text": "static private function getJSDir() {\n return __DIR__.DIRECTORY_SEPARATOR.\"Resources\".DIRECTORY_SEPARATOR.\"public\".DIRECTORY_SEPARATOR.\"js\";\n }", "title": "" }, { "docid": "35af739ecf70a109abbea5b0991727d5", "score": "0.55277556", "text": "function module_path($path = '')\n{\n return app()->basePath() . (DS . 'vendor' . DS . 'btybug') . ($path ? DS . $path : $path);\n}", "title": "" }, { "docid": "c717c3371b765826c7c5590fb9cac4a4", "score": "0.5527087", "text": "private function _getHelperPaths()\n {\n $helperPathNamespace = new Zend_Session_Namespace('Phprojekt-_getHelperPaths');\n if (!isset($helperPathNamespace->helperPaths)) {\n $helperPaths = array();\n // System modules\n foreach (scandir(PHPR_CORE_PATH) as $module) {\n $dir = PHPR_CORE_PATH . DIRECTORY_SEPARATOR . $module;\n if ($module == '.' || $module == '..' || !is_dir($dir)) {\n continue;\n }\n\n $helperPaths[] = array('module' => $module,\n 'path' => PHPR_CORE_PATH . DIRECTORY_SEPARATOR,\n 'directory' => $dir . DIRECTORY_SEPARATOR . 'Helpers');\n }\n\n // User modules\n foreach (scandir(PHPR_USER_CORE_PATH) as $module) {\n $dir = PHPR_USER_CORE_PATH . $module;\n if ($module == '.' || $module == '..' || !is_dir($dir)) {\n continue;\n }\n\n $helperPaths[] = array('module' => $module,\n 'path' => PHPR_USER_CORE_PATH,\n 'directory' => $dir . DIRECTORY_SEPARATOR . 'Helpers');\n }\n\n $helperPathNamespace->helperPaths = $helperPaths;\n } else {\n $helperPaths = $helperPathNamespace->helperPaths;\n }\n\n return $helperPaths;\n }", "title": "" }, { "docid": "710e4873bdf02b12e23ec9640eba94b2", "score": "0.5522636", "text": "public function phpLib() {\n if ( is_null( $this->_PHP_LIB ) ) {\n\n\n include($this->INSTALLER_DIRECTORY . '/libs/bluedog-phplib.class.php');\n\n $this->_PHP_LIB = new bluedog_phplib;\n }\n\n return $this->_PHP_LIB;\n }", "title": "" }, { "docid": "33390d75a3702bfb876f42359b846157", "score": "0.55198634", "text": "public function basePath()\n { \n return $this->basePath;\n }", "title": "" }, { "docid": "c7de7d53690a4c8a130a4dee4987a13d", "score": "0.551601", "text": "function getBaseDir()\n {\n\n }", "title": "" }, { "docid": "56eb271de3183381dc589a2b2eb51dc6", "score": "0.5509275", "text": "public function basePath(): string;", "title": "" }, { "docid": "781d2da67ec6efd22ae09229eb1d49b8", "score": "0.5505703", "text": "public function getBasePath() {\n \t\n \treturn ((isset($this->config['General']['base_path']) \n && $this->config['General']['base_path'] \n && isset($this->config['General']['use_base_path']) \n && $this->config['General']['use_base_path']) \n ? $this->config['General']['base_path'] : null);\n }", "title": "" }, { "docid": "1efda7b7c680b9d5f5dbff05839b2134", "score": "0.55038327", "text": "public function getMainClassPath()\n {\n return $this->rootPath.'/app/Main.php';\n }", "title": "" }, { "docid": "86454799936af7b0710031bd930adf7a", "score": "0.5491965", "text": "private static function determine_library_location()\n {\n $outer_lib_1 = realpath(FCPATH . '../../botdetect-captcha-lib/simple-botdetect.php');\n $outer_lib_2 = realpath(FCPATH . '../../lib/simple-botdetect.php');\n\n $inner_root_dir_lib_1 = FCPATH . 'botdetect-captcha-lib' . DS . 'simple-botdetect.php';\n $inner_root_dir_lib_2 = FCPATH . 'lib' . DS . 'simple-botdetect.php';\n\n $inner_app_dir_lib_1 = BDCI_LIB_PATH . 'botdetect-captcha-lib' . DS . 'simple-botdetect.php';\n $inner_app_dir_lib_2 = BDCI_LIB_PATH . 'lib' . DS . 'simple-botdetect.php';\n\n if (is_readable($outer_lib_1)) {\n self::define_library_path($outer_lib_1);\n } else if (is_readable($outer_lib_2)) {\n self::define_library_path($outer_lib_2);\n } else if (is_readable($inner_app_dir_lib_1)) {\n self::define_library_path($inner_app_dir_lib_1);\n } else if (is_readable($inner_app_dir_lib_2)) {\n self::define_library_path($inner_app_dir_lib_2);\n } else if (is_readable($inner_root_dir_lib_1)) {\n self::define_library_path($inner_root_dir_lib_1);\n } else if (is_readable($inner_root_dir_lib_2)) {\n self::define_library_path($inner_root_dir_lib_2);\n } else {\n // show an error message if user does not include lib yet\n self::show_error_library_include_message();\n }\n }", "title": "" }, { "docid": "c9b71bb7d2b17c701095b1f46cf1dcec", "score": "0.5488276", "text": "protected abstract function baseDir(): string;", "title": "" }, { "docid": "00f95f30b0f70979bc204117d48cdff0", "score": "0.54872596", "text": "public static function getApplicationDir(): string {\n\t\treturn \\dirname(\\ROOT);\n\t}", "title": "" }, { "docid": "758d89f40f25e224b531c6cf99d24a93", "score": "0.5485445", "text": "public function getVuejsExtensionPath()\n {\n return $this->config->get('paths.vuejs_extension', resource_path('js/libs/vue/laravel-translation.js'));\n }", "title": "" } ]
15e82ec00b9d70f938bda4e16c47c52b
Changes a string into a URLfriendly string Derived from MIT fURL::makeFriendly Source: License:
[ { "docid": "df7d72317ae155d53d5bcc0e84632648", "score": "0.6995842", "text": "private static function makeUrlFriendly($string, $max_length=NULL, $delimiter=NULL)\n\t{\n\t\t// This allows omitting the max length, but including a delimiter\n\t\tif ($max_length && !is_numeric($max_length)) {\n\t\t\t$delimiter = $max_length;\n\t\t\t$max_length = NULL;\n\t\t}\n\n\t\t//$string = fHTML::decode(fUTF8::ascii($string));\n\t\t$string = strtolower(trim($string));\n\t\t$string = str_replace(\"'\", '', $string);\n\n\t\tif (!strlen($delimiter)) {\n\t\t\t$delimiter = '_';\n\t\t}\n\n\t\t$delimiter_replacement = strtr($delimiter, array('\\\\' => '\\\\\\\\', '$' => '\\\\$'));\n\t\t$delimiter_regex = preg_quote($delimiter, '#');\n\n\t\t$string = preg_replace('#[^a-z0-9\\-_]+#', $delimiter_replacement, $string);\n\t\t$string = preg_replace('#' . $delimiter_regex . '{2,}#', $delimiter_replacement, $string);\n\t\t$string = preg_replace('#_-_#', '-', $string);\n\t\t$string = preg_replace('#(^' . $delimiter_regex . '+|' . $delimiter_regex . '+$)#D', '', $string);\n\t\t\n\t\t$length = strlen($string);\n\t\tif ($max_length && $length > $max_length) {\n\t\t\t$last_pos = strrpos($string, $delimiter, ($length - $max_length - 1) * -1);\n\t\t\tif ($last_pos < ceil($max_length / 2)) {\n\t\t\t\t$last_pos = $max_length;\n\t\t\t}\n\t\t\t$string = substr($string, 0, $last_pos);\n\t\t}\n\t\t\n\t\treturn $string;\n\t}", "title": "" } ]
[ { "docid": "c1211a85ec91c1560a15358891b084be", "score": "0.7724221", "text": "function friendly_url ( $string )\n{\n\t$string = preg_replace( \"`\\[.*\\]`U\", \"\", $string );\n\t$string = preg_replace( '`&(amp;)?#?[a-z0-9]+;`i', '-', $string );\n\t$string = htmlentities( $string, ENT_COMPAT, 'utf-8' );\n\t$string = preg_replace( \"`&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig|quot|rsquo);`i\", \"\\\\1\", $string );\n\t$string = preg_replace( array( \"`[^a-z0-9]`i\",\"`[-]+`\") , \"-\", $string );\n\treturn strtolower( trim( $string, '-' ) );\n}", "title": "" }, { "docid": "3ab93e852af460979572de1c7781d83f", "score": "0.76819843", "text": "public function seoFriendlyURL() {\n /*\n * first of all the URL should be lowercase\n */\n $this->_url = strtolower($this->_url);\n /*\n * Strip any unwanted characters, allowed characters:\n * letters, numbers, underscores, colon, and forward slash\n */\n $this->_url = preg_replace(\"/[^a-z0-9_:\\/\\.\\s-]/\", \"\", $this->_url);\n /*\n * extra check clean multiple dashes or whitespaces\n */\n $this->_url = preg_replace(\"/[\\s-]+/\", \" \", $this->_url);\n /*\n * Convert whitespaces to dash\n */\n $this->_url = preg_replace(\"/[\\s]/\", \"-\", $this->_url);\n\n return $this->_url;\n }", "title": "" }, { "docid": "7fcdb2f4fe1e7e54fec6a2c32b7fae48", "score": "0.75982004", "text": "function make_url_friendly($url)\n{\n\tglobal $lang;\n\n\t// Remove Re: in case of replies\n\t$url = strtolower(str_replace('Re: ', '', $url));\n\t$url = ip_clean_string($url, $lang['ENCODING']);\n\n\t$url = ($url == '') ? 'urlrw' : $url;\n\n\treturn $url;\n}", "title": "" }, { "docid": "b44a8e0defa434369098740764594233", "score": "0.73424476", "text": "function make_url_friendly($input)\r\n{\r\n\t$output = replace_symbols($input); \r\n\t$output = mb_substr($output, 0, 240);\r\n\t$output = mb_strtolower($output, 'UTF-8');\r\n\t$output = trim($output); \r\n\t//From Wordpress and http://www.bernzilla.com/item.php?id=1007\r\n\t$output = sanitize_title_with_dashes($output);\r\n\t$output = urldecode($output); \r\n\t\r\n\tif( $output ) {\r\n\t\treturn $output;\r\n\t}\r\n\r\n\treturn false;\r\n}", "title": "" }, { "docid": "6aea0996cd563ee923d24bc0151a48c7", "score": "0.72038376", "text": "function urlify($string){\n\t\t$string = strtr($string,'àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ', 'aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY');\n\t\t$string = str_replace(\" \", \"%20\", $string);\n\t\t$string = str_replace(\",\", \"%2C\", $string);\n\t\t$string = str_replace(\"#\", \"%23\", $string);\n\t\treturn $string;\n\t }", "title": "" }, { "docid": "d7807c233aea74a5f333aa1f0f6bd3cc", "score": "0.71385235", "text": "function makeUrlFriendly($postUsername) {\n\t\t\t\t\t\t\t\t\t$output = preg_replace(\"/\\s/e\" , \"_\" , $postUsername);\n\t\t\t\t\t\t\t\t\t// Remove non-word characters\n\t\t\t\t\t\t\t\t\t$output = preg_replace(\"/\\W/e\" , \"\" , $output);\n\t\t\t\t\t\t\t\t\treturn strtolower($output);\n\t\t\t\t\t\t\t\t}", "title": "" }, { "docid": "75dddd1ae04e65566f4812b02f83fb95", "score": "0.7098249", "text": "private function friendly_url($url){\n\t\t$url = strtolower($this->replace_accents(trim($url)));\n\t\t// decode html maybe needed if there's html I normally don't use this\n\t\t//$url = html_entity_decode($url,ENT_QUOTES,'UTF8');\n\t\t// 2. Replacing spaces and union characters with -\n\t\t$find = array(' ', '&', '\\r\\n', '\\n', '+',',');\n\t\t$url = str_replace($find, '-', $url);\n\t\t// 3. Delete and replace the rest of special characters\n\t\t$find = array('/[^a-z0-9\\-<>]/', '/[\\-]+/', '/<[^>]*>/');\n\t\t$repl = array('', ' ', '');\n\t\t$url = str_replace(' ','-',trim(preg_replace($find, $repl, $url)));\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "75dddd1ae04e65566f4812b02f83fb95", "score": "0.7098249", "text": "private function friendly_url($url){\n\t\t$url = strtolower($this->replace_accents(trim($url)));\n\t\t// decode html maybe needed if there's html I normally don't use this\n\t\t//$url = html_entity_decode($url,ENT_QUOTES,'UTF8');\n\t\t// 2. Replacing spaces and union characters with -\n\t\t$find = array(' ', '&', '\\r\\n', '\\n', '+',',');\n\t\t$url = str_replace($find, '-', $url);\n\t\t// 3. Delete and replace the rest of special characters\n\t\t$find = array('/[^a-z0-9\\-<>]/', '/[\\-]+/', '/<[^>]*>/');\n\t\t$repl = array('', ' ', '');\n\t\t$url = str_replace(' ','-',trim(preg_replace($find, $repl, $url)));\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "78e23619c448ae92c8d745c3ca2c8312", "score": "0.7098123", "text": "public function seo_friendly_url($string){\n\n $string = str_replace(array('[\\', \\']'), '', $string);\n\n $string = preg_replace('/\\[.*\\]/U', '', $string);\n\n $string = preg_replace('/&(amp;)?#?[a-z0-9]+;/i', '-', $string);\n\n $string = htmlentities($string, ENT_COMPAT, 'utf-8');\n\n $string = preg_replace('/&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig|quot|rsquo);/i', '\\\\1', $string );\n\n $string = preg_replace(array('/[^a-z0-9]/i', '/[-]+/') , '-', $string);\n\n return strtolower(trim($string, '-'));\n\n }", "title": "" }, { "docid": "19e82789fddd4defd477ed99f833a56b", "score": "0.6995232", "text": "function seoUrl($string) {\n\t//Lower case everything\n\t$string = strtolower($string);\n\t$string = preg_replace(\"/&amp;/\", \"\", $string);\n\t//Make alphanumeric (removes all other characters)\n\t$string = preg_replace(\"/[^a-z0-9_\\s-]/\", \"\", $string);\n\t//Clean up multiple dashes or whitespaces\n\t$string = preg_replace(\"/[\\s-]+/\", \" \", $string);\n\t//Convert whitespaces and underscore to dash\n\t$string = preg_replace(\"/[\\s_]/\", \"-\", $string);\n\treturn $string;\n}", "title": "" }, { "docid": "c45eeac64213cc5256b0e273e3c23d9a", "score": "0.69725657", "text": "function url_slug($string = \"\")\n{\n if (!is_string($string)) {\n $string = \"\";\n }\n\n $s = trim(mb_strtolower($string));\n \n // Replace azeri characters\n $s = str_replace(\n array(\"ü\", \"ö\", \"ğ\", \"ı\", \"ə\", \"ç\", \"ş\"), \n array(\"u\", \"o\", \"g\", \"i\", \"e\", \"c\", \"s\"), \n $s);\n \n // Replace cyrilic characters\n $cyr = array('а','б','в','г','д','е','ё','ж','з','и','й','к','л','м',\n 'н','о','п','р','с','т','у', 'ф','х','ц','ч','ш','щ','ъ', \n 'ы','ь', 'э', 'ю','я');\n $lat = array('a','b','v','g','d','e','io','zh','z','i','y','k','l',\n 'm','n','o','p','r','s','t','u', 'f', 'h', 'ts', 'ch',\n 'sh', 'sht', 'a', 'i', 'y', 'e','yu', 'ya');\n $s = str_replace($cyr, $lat, $s);\n\n // Replace all other characters\n $s = preg_replace(\"/[^a-z0-9]/\", \"-\", $s);\n\n // Replace consistent dashes\n $s = preg_replace(\"/-{2,}/\", \"-\", $s);\n\n return trim($s, \"-\");\n}", "title": "" }, { "docid": "4716a16dbb766059581f3ed0914c71ca", "score": "0.69553477", "text": "function urlFormat($str)\n{\n // Strip out all whitespace\n $str = preg_replace('/\\s*/', '', $str);\n //Convert the string to all lowercase\n $str = strtolower($str);\n // URL Encode\n $str = urldecode($str);\n return $str;\n}", "title": "" }, { "docid": "31767d47bebd7327ea4268614157f594", "score": "0.69550884", "text": "function url_slug($str)\n{\n\t$str = strtolower($str);\n\t// remove special characters\n\t$str = preg_replace('/[^a-zA-Z0-9]/i',' ', $str);\n\t// remove white space characters from both side\n\t$str = trim($str);\n\t// remove double or more space repeats between words chunk\n\t$str = preg_replace('/\\s+/', ' ', $str);\n\t// fill spaces with hyphens\n\t$str = preg_replace('/\\s+/', '-', $str);\n\treturn $str;\n}", "title": "" }, { "docid": "2f30dbd236c7de93e21613727dab7743", "score": "0.68595135", "text": "private function makeUrlFriendly($postUsername) {\r\n\t\t$output = preg_replace(\"/\\s/e\" , \"_\" , $postUsername);\r\n\t\t// Remove non-word characters\r\n\t\t$output = preg_replace(\"/\\W/e\" , \"\" , $output);\r\n\t\treturn strtolower($output);\r\n\t}", "title": "" }, { "docid": "caf96e7fd3d8acfb39d37b6357ab8654", "score": "0.68509173", "text": "function make_slug($string,$limit = '140'){\n\t/*$slug = str_replace('&','-',$string);\n\t$slug = preg_replace('/[^A-Za-z0-9-]+/', '-',$slug);\t\t\n\t$slug = str_replace(' ','',$slug);\n\t$slug = str_replace('--','-',$slug);\n\t$slug = str_replace('--','-',$slug);\n\n\tif(substr($slug,1,strlen($slug)) == '-'){\n\t\t$slug = trim(substr($slug,2,strlen($slug)));\n\t}\n\tif(substr($slug,strlen($slug)-1,strlen($slug)) == '-'){\n\t\t$slug = trim(substr($slug,0,strlen($slug)-1));\n\t}\n\tif($limit == 0){ // No Limit\n\t\t$slug = strtolower($slug);\n\t}else{\n\t\t$slug = substr(strtolower($slug),0,$limit);\n\t}*/\n\t$seperator = '-';\n $string = str_replace('&','and',$string);\n\t$string = strtolower($string);\n $string = preg_replace(\"/[^a-z0-9_\\s-]/\", $seperator, $string);\n $string = preg_replace(\"/[\\s-]+/\", \" \", $string);\n $string = preg_replace(\"/[\\s_]/\", $seperator, $string);\n return $string;\n\n}", "title": "" }, { "docid": "b8151e72d572aa488188f2cafa1c8509", "score": "0.6826868", "text": "function makeLink($string){\n\t\t// make it all lowercase\n\t\t$link = strtolower (preg_replace('/[^A-Za-z0-9\\n\\/ \\-]/', '', $string));\n\t\t// replace spaces, new lines and forward slashes with dashes\n\t\t$link = str_replace(array(\" \", \"\\n\", \"/\"), \"-\", $link);\n\t\t// sometimes it makes a double slash so replace those with single slash\n\t\t$link = str_replace(\"--\", \"-\", $link);\n\t\t// check if last character is a dash, if so, trim it off\n\t\tif(substr($link, -1, 1)==\"-\"){\n\t\t\t$link = substr($link, 0, -1);\n\t\t}\n\n\t\treturn $link;\n }", "title": "" }, { "docid": "ada6dd1eaab56bc2bcb02690753c20f0", "score": "0.6806844", "text": "public static function generateUrl($str)\n\t{\n\t\tstatic $allow_accented_chars = null;\n\n\t\t$str = trim($str);\n\n\t\tif (function_exists('mb_strtolower'))\n\t\t\t$str = mb_strtolower($str, 'utf-8');\n\t\tif (!$allow_accented_chars)\n\t\t\t$str = Url::replaceAccentedChars($str);\n\n\t\t// Remove all non-whitelist chars.\n\t\tif ($allow_accented_chars)\n\t\t\t$str = preg_replace('/[^a-zA-Z0-9\\s\\'\\:\\/\\[\\]-\\pL]/u', '', $str);\n\t\telse\n\t\t\t$str = preg_replace('/[^a-zA-Z0-9\\s\\'\\:\\/\\[\\]-]/','', $str);\n\n\t\t$str = preg_replace('/[\\s\\'\\:\\/\\[\\]-]+/', ' ', $str);\n\t\t$str = str_replace(array(' ', '/'), '-', $str);\n\n\t\t// If it was not possible to lowercase the string with mb_strtolower, we do it after the transformations.\n\t\t// This way we lose fewer special chars.\n\t\tif (!function_exists('mb_strtolower'))\n\t\t\t$str = strtolower($str);\n\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "cbc23fcf1d53157c3ec1dda1a4ec62e2", "score": "0.6759829", "text": "function url_slug($str, $separator = '-', $lowercase = FALSE)\n{\n if ($separator == 'dash')\n {\n $separator = '-';\n }\n else if ($separator == 'underscore')\n {\n $separator = '_';\n }\n\n $q_separator = preg_quote($separator);\n\n $trans = array(\n '&.+?;' => '',\n '[^a-z0-9 _-]' => '',\n '\\s+' => $separator,\n '('.$q_separator.')+' => $separator\n );\n //custom replace symbols with normal character\n $search = array('Ș', 'Ț', 'ş', 'ţ', 'Ş', 'Ţ', 'ș', 'ț', 'î', 'â', 'ă', 'Î', 'Â', 'Ă', 'ë', 'Ë');\n $replace = array('s', 't', 's', 't', 's', 't', 's', 't', 'i', 'a', 'a', 'i', 'a', 'a', 'e', 'E');\n $str = str_ireplace($search, $replace, $str);\n //end custom\n $str = strip_tags($str);\n\n foreach ($trans as $key => $val)\n {\n $str = preg_replace(\"#\".$key.\"#i\", $val, $str);\n }\n\n if ($lowercase === TRUE)\n {\n $str = strtolower($str);\n }\n\n return trim($str, $separator);\n}", "title": "" }, { "docid": "6da76921596f15b680631d52830477aa", "score": "0.6752158", "text": "function seo_url($string){\r\n\t$chars = array(\",\",\"/\",\"\\\\\");\r\n\t$string = str_replace($chars,' ',$string);\r\n\t$string = capitalise($string);\r\n\t$string = preg_replace('/\\s+/','-',$string);\r\n\treturn $string;\r\n}", "title": "" }, { "docid": "060b2fc26830371e3ed1ef8dd7ecedda", "score": "0.67315125", "text": "function makeurls($name)\r\n{\r\n //first convert spanish charter\r\n $specs=array(''=>'a',''=>'e',''=>'i','' =>'o',''=>'u','?' =>'n');\r\n foreach($specs as $k => $v)\r\n {\r\n $name=str_replace($k,$k,$name);\r\n }\r\n $name=str_replace(chr($k),'-',$name);\r\n for ($k = 1; $k <= 47; $k++)\r\n {\r\n $name=str_replace(chr($k),'-',$name);\r\n }\r\n for ($k = 58; $k <= 64; $k++)\r\n {\r\n $name=str_replace(chr($k),'-',$name);\r\n }\r\n for ($k = 91; $k <= 96; $k++)\r\n {\r\n $name=str_replace(chr($k),'-',$name);\r\n }\r\n for ($k = 123; $k <= 255; $k++)\r\n {\r\n $name=str_replace(chr($k),'-',$name);\r\n }\r\n return $name;\r\n}", "title": "" }, { "docid": "902325ac4e565cb1abc581ad25782120", "score": "0.66923404", "text": "function to_link($str)\n\t{\n\t $str = str_replace(\" \",\"-\",$str);\n\t $str = str_replace(\"Á\",\"a\",$str);\n\t $str = str_replace(\"É\",\"e\",$str);\n\t $str = str_replace(\"Í\",\"i\",$str);\n\t $str = str_replace(\"Ó\",\"o\",$str);\n\t $str = str_replace(\"Ú\",\"u\",$str);\n\t $str = str_replace(\" \",\"-\",$str);\n\t $str = str_replace(\"á\",\"a\",$str);\n\t $str = str_replace(\"é\",\"e\",$str);\n\t $str = str_replace(\"í\",\"i\",$str);\n\t $str = str_replace(\"ó\",\"o\",$str);\n\t $str = str_replace(\"ú\",\"u\",$str);\n\t $str = preg_replace(\"/\\W+/\",'-',$str);\n\t $str = strtolower($str); \n\t return $str;\n\t}", "title": "" }, { "docid": "b632d04bf7f96ba2ad97e1c3e3cc39d9", "score": "0.6681756", "text": "function title2URL($url){\r\n\t$arr_str = str_replace('%20',' ', $url);\r\n $arr_str = explode(' ', $arr_str);\r\n\t$arr_str = array_slice($arr_str, 0, 40 );\r\n\t$url= implode(' ', $arr_str);\r\n $url = strtolower($url);\r\n $url = strip_tags($url);\r\n $url = stripslashes($url);\r\n $url = html_entity_decode($url);\r\n # Remove quotes (can't, etc.)\r\n $url = str_replace('\\'', '', $url);\r\n # Replace non-alpha numeric with hyphens\r\n $match = '/[^a-z0-9]+/';\r\n $replace = '_';\r\n $url = preg_replace($match, $replace, $url);\r\n $url = trim($url, '_');\r\n return $url;\r\n}", "title": "" }, { "docid": "92f2a5a1caaeed63783834e629604c1c", "score": "0.66190714", "text": "public static function urlFriendly($string, $lowercase = true) {\n // set default value to be compatible with PHP 5.3\n $entitiesOption = defined('ENT_HTML401') ? ENT_COMPAT | ENT_HTML401 : ENT_COMPAT;\n $string = static::translit($string);\n $string = utf8_decode($string);\n $string = htmlentities($string, $entitiesOption, 'utf-8');\n $string = ($lowercase) ? strtolower($string) : $string;\n $string = str_replace('&amp;', 'and', $string);\n $string = preg_replace(\"/&(.)(acute|cedil|circ|ring|tilde|uml);/\", \"$1\", $string);\n $string = preg_replace(\"/([^a-zA-Z0-9]+)/\", \"-\", html_entity_decode($string, $entitiesOption, 'utf-8'));\n $string = trim($string, \"-\");\n return $string;\n }", "title": "" }, { "docid": "bcc1223c48aa4e7b53c3d0617e72488c", "score": "0.6608137", "text": "function pretty_url($url)\n{\n return ucwords(str_replace('_', ' ', $url));\n}", "title": "" }, { "docid": "1556d23cd4d1a6be2207be74da7bfcae", "score": "0.6567632", "text": "static function url($string) {\n\t\treturn str_replace('_', '-', self::variable($string));\n\t}", "title": "" }, { "docid": "81b0e6c8cacc2bccff59f318db52fd2d", "score": "0.65537524", "text": "function title_for_url($title)\n{\n return str_replace(' ', '-', remove_special_char($title));\n}", "title": "" }, { "docid": "1622d0327fd8bc7604c2fef91a1dbbc4", "score": "0.6531091", "text": "function make_link($string)\n {\n $string = ' ' . $string;\n $string = preg_replace_callback(\"#(^|[\\n ])([\\w]+?://.*?[^ \\\"\\n\\r\\t<]*)#is\", \"shorten_link\", $string);\n $string = preg_replace(\"#(^|[\\n ])((www|ftp)\\.[\\w\\-]+\\.[\\w\\-.\\~]+(?:/[^ \\\"\\t\\n\\r<]*)?)#is\", \"$1<a href=\\\"http://$2\\\">$2</a>\", $string);\n $string = my_substr($string, 1, my_strlen($string, CHARSET), CHARSET);\n return $string;\n }", "title": "" }, { "docid": "1f86fa377f47df4ed0c7dbe10a8ef042", "score": "0.6501662", "text": "function toLink($string){\n\t\t$link = str_replace(\"&\", \"and\", $string);\n\t\t// strip all but forward slashes, newlines, letters and numbers\n\t\t// make it all lowercase\n\t\t$link = strtolower ( preg_replace(\t'/[^A-Za-z0-9\\n\\/ \\-]/', '', $link));\n\t\t// replace spaces, new lines and forward slashes with dashes\n\t\t$link = str_replace(array(\" \", \"\\n\", \"/\"), \"-\", $link);\n\t\t// sometimes it makes a double slash so replace those with single slash\n\t\t$link = str_replace(\"--\", \"-\", $link);\n\t\t// check if last character is a dash, if so, trim it off\n\t\tif(substr($link, -1, 1)==\"-\"){\n\t\t\t$link = substr($link, 0, -1);\n\t\t}\n\t\treturn $link;\n\t}", "title": "" }, { "docid": "89300f691ca9bb0ddda9a9324f52a984", "score": "0.6476508", "text": "function urlGenerator($url){\r\n $url = strtolower($url);\r\n $url = strip_tags($url);\r\n $url = stripslashes($url);\r\n $url = html_entity_decode($url);\r\n\r\n # Remove quotes (can't, etc.)\r\n $url = str_replace('\\'', '', $url);\r\n\r\n # Replace non-alpha numeric with hyphens\r\n $match = '/[^a-z0-9]+/';\r\n $replace = '-';\r\n $url = preg_replace($match, $replace, $url);\r\n\r\n $url = trim($url, '-');\r\n return $url;\r\n }", "title": "" }, { "docid": "d530edf209a43fa7c266ff66a7def6af", "score": "0.6471534", "text": "function slugify($string, $allow_slash = false)\n{\n $string = strtolower($string);\n if (!$allow_slash)\n {\n $string = str_replace('/', ' and ', $string);\n }\n $string = str_replace('&', ' and ', $string);\n $string = str_replace(['[',']','_'], '-', $string);\n $string = preg_replace('|[^-/ a-zA-Z0-9]|', '', $string);\n $string = str_replace(' ', '-', $string);\n while (stristr($string, '--'))\n {\n $string = str_replace('--', '-', $string);\n }\n $string = ltrim($string, '-');\n $string = rtrim($string, '-');\n return $string;\n}", "title": "" }, { "docid": "2edfe9ae6297c742972d9b31c22033ef", "score": "0.64712614", "text": "function deslugify($string, $ucfirst = false)\n{\n $string = str_replace('/', ' | ', $string);\n $string = str_replace(['-','_'], ' ', $string);\n $string = str_replace(' &amp; ', ' & ', $string);\n $string = str_replace(' and ', ' & ', $string);\n if ($ucfirst)\n {\n $string = ucfirst($string);\n }\n else\n {\n $string = ucwords($string);\n }\n return $string;\n}", "title": "" }, { "docid": "3150dfa9c5dc82eab2e12d77cb06f617", "score": "0.64668447", "text": "function url_title($str)\n{\n $str = str_replace(' ', '-', $str);\n return strtolower($str);\n}", "title": "" }, { "docid": "6a5e41b6ce973b31b81a724ab18d4c35", "score": "0.6448997", "text": "function title3URL($url){\r\n\t$arr_str = str_replace('%20',' ', $url);\r\n $arr_str = explode(' ', $arr_str);\r\n\t$arr_str = array_slice($arr_str, 0, 40 );\r\n\t$url= implode(' ', $arr_str);\r\n $url = strtolower($url);\r\n $url = strip_tags($url);\r\n $url = stripslashes($url);\r\n $url = html_entity_decode($url);\r\n # Remove quotes (can't, etc.)\r\n $url = str_replace('\\'', '', $url);\r\n # Replace non-alpha numeric with hyphens\r\n $match = '/[^a-z0-9]+/';\r\n $replace = '-';\r\n $url = preg_replace($match, $replace, $url);\r\n $url = trim($url, '-');\r\n return $url;\r\n}", "title": "" }, { "docid": "a60ad0811a6c4a9a8156a171fafebdab", "score": "0.6442067", "text": "function stringURLSafeV2($string)\n{\n $str = str_replace('-', ' ', $string);\n $str = str_replace('_', ' ', $string);\n\n //$str = $lang->transliterate($str);\n //convert unwanted characters\n $turkish = array(\"ı\", \"ğ\", \"ü\", \"ş\", \"ö\", \"ç\", \"İ\", \"Ğ\", \"Ü\", \"Ş\", \"Ö\", \"Ç\");\n $english = array(\"i\", \"g\", \"u\", \"s\", \"o\", \"c\", \"I\", \"G\", \"U\", \"S\", \"O\", \"C\");\n $str = str_replace($turkish, $english, $str);\n\n // remove any duplicate whitespace, and ensure all characters are alphanumeric\n $str = preg_replace(array('/\\s+/', '/[^A-Za-z0-9\\-]/'), array('-', ''), $str);\n\n // lowercase and trim\n $str = trim(strtolower($str));\n return $str;\n}", "title": "" }, { "docid": "c420fe8f5a0c18c1cfc67efdfd1c775f", "score": "0.64406383", "text": "function create_slug($str, $ext=''){ \n\t\t$replace = '-';\n\t\t$str = strtolower($str); \n\t\t\n\t\t//remove query string \n\t\tif(preg_match(\"#^http(s)?://[a-z0-9-_.]+\\.[a-z]{2,4}#i\",$str)){ \n\t\t\t$parsed_url = parse_url($str); \n\t\t\t$str = $parsed_url['host'].' '.$parsed_url['path']; \n\t\t\t//if want to add scheme eg. http, https than uncomment next line \n\t\t\t$str = $parsed_url['scheme'].' '.$str; \n\t\t} \n\t\t\n\t\t//replace / and . with white space \n\t\t$str = preg_replace(\"/[\\/\\.]/\", \" \", $str); \n\t\t$str = preg_replace(\"/[^a-z0-9_\\s-]/\", \"\", $str); \n\t\t\n\t\t//remove multiple dashes or whitespaces \n\t\t$str = preg_replace(\"/[\\s-]+/\", \" \", $str); \n\t\t\n\t\t//convert whitespaces and underscore to $replace \n\t\t$str = preg_replace(\"/[\\s_]/\", $replace, $str); \n\t\t\n\t\t//limit the slug size \n\t\t$str = substr($str, 0, 100); \n\t\t\n\t\t//slug is generated \n\t\treturn ($ext) ? $str.$ext : $str; \n\t}", "title": "" }, { "docid": "ca90e8492c2bd23ab32ee4c17118fdf6", "score": "0.6420695", "text": "function lcwp_stringToUrl($string){\r\n\t\r\n\t// if already exist at least an option, use the default encoding\r\n\tif(!get_option('mg_non_latin_char')) {\r\n\t\t$trans = array(\"à\" => \"a\", \"è\" => \"e\", \"é\" => \"e\", \"ò\" => \"o\", \"ì\" => \"i\", \"ù\" => \"u\");\r\n\t\t$string = trim(strtr($string, $trans));\r\n\t\t$string = preg_replace('/[^a-zA-Z0-9-.]/', '_', $string);\r\n\t\t$string = preg_replace('/-+/', \"_\", $string);\t\r\n\t}\r\n\t\r\n\telse {$string = trim(urlencode($string));}\r\n\t\r\n\treturn $string;\r\n}", "title": "" }, { "docid": "929eff071a36976c886627659e2b2304", "score": "0.6407744", "text": "function Wikify($string) {\n\t\t\treturn rawurlencode(str_replace(\" \", \"_\",\n\t\t\t\ttrim(preg_replace(\"/[!?;@#\\$%\\\\^&*<>=+`~\\\\x00-\\\\x20_-]+/\", \" \", $string))));\n\t\t}", "title": "" }, { "docid": "be49a87d1b3f16b19710c2f8797231b1", "score": "0.6381266", "text": "function lcwp_urlToName($string) {\r\n\t$string = ucwords(str_replace('_', ' ', $string));\r\n\treturn $string;\t\r\n}", "title": "" }, { "docid": "14472c55772450850a6229a19d571e22", "score": "0.63699734", "text": "function create_slug($str) {\n\n $search = array('Ș', 'Ț', 'ş', 'ţ', 'Ş', 'Ţ', 'ș', 'ț', 'î', 'â', 'ă', 'Î', 'Â', 'Ă', 'ë', 'Ë');\n $replace = array('s', 't', 's', 't', 's', 't', 's', 't', 'i', 'a', 'a', 'i', 'a', 'a', 'e', 'E');\n $str = str_replace($search, $replace, strtolower(trim($str)));\n $str = preg_replace('/[^\\w\\d\\-\\ ]/', '', $str);\n $str = str_replace(' ', '-', $str);\n return preg_replace('/\\-{2,}/', '-', $str);\n\n }", "title": "" }, { "docid": "c6e10c6bcb8e937e23d4ca41d94f290e", "score": "0.63654643", "text": "function book($url){\n\t$o = str_replace('http%3A%2F%2Fxxxxxx.xxxx%2Fxxxx%2Fxxxx%2F','',$url);\n\t$o = str_replace('http://xxx.xxx/xx/xx','',$o);\n\t$o = str_replace('%2F&action=set&type=set','',$o);\n\t$o = str_replace('%20',' ',$o);\n\t\n\t$o = rtrim(ucwords($o),'/');\n\t\n\treturn $o;\n}", "title": "" }, { "docid": "30688c65054a95fc4579c8085ddb2e49", "score": "0.6341772", "text": "private function slugify($s) {\n\t\treturn urlencode(str_replace(\" \", \"_\", strtolower($s)));\n\t}", "title": "" }, { "docid": "3ac2603e45fef94315931f9617f0bb36", "score": "0.633276", "text": "function urls_amigables($url) {\n\t\t$url = strtolower($url);\n\t\t//Reemplazamos caracteres especiales latinos\n\t\t$find = array('á', 'é', 'í', 'ó', 'ú', 'ñ', 'ç');\n\t\t$repl = array('a', 'e', 'i', 'o', 'u', 'n', 'c');\n\t\t$url = str_replace ($find, $repl, $url);\n\t\t// Añaadimos los guiones\n\t\t$find = array(' ', '&', '\\r\\n', '\\n', '+');\n\t\t$url = str_replace ($find, '-', $url);\n\t\t// Eliminamos y Reemplazamos demás caracteres especiales\n\t\t$find = array('/[^a-z0-9\\-<>]/', '/[\\-]+/', '/<[^>]*>/');\n\t\t$repl = array('', '-', '');\n\t\t$url = preg_replace ($find, $repl, $url);\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "413d3c28772504b898660092d66c7c3a", "score": "0.6316194", "text": "function url_escape($input) {\n\t/*\n\t\tShish: I have a feeling that these three lines are important, possibly for searching for tags with slashes in them like fate/stay_night\n\t\tgreen-ponies: indeed~\n\n\t$input = str_replace('^', '^^', $input);\n\t$input = str_replace('/', '^s', $input);\n\t$input = str_replace('\\\\', '^b', $input);\n\n\t/* The function idn_to_ascii is used to support Unicode domains / URLs as well.\n\t See here for more: http://php.net/manual/en/function.filter-var.php\n\t However, it is only supported by PHP version 5.3 and up\n\n\tif (function_exists('idn_to_ascii')) {\n\t\t\treturn filter_var(idn_to_ascii($input), FILTER_SANITIZE_URL);\n\t} else {\n\t\t\treturn filter_var($input, FILTER_SANITIZE_URL);\n\t}\n\t*/\n\tif(is_null($input)) {\n\t\treturn \"\";\n\t}\n\t$input = str_replace('^', '^^', $input);\n\t$input = str_replace('/', '^s', $input);\n\t$input = str_replace('\\\\', '^b', $input);\n\t$input = rawurlencode($input);\n\treturn $input;\n}", "title": "" }, { "docid": "a63060c989bd06c73cf9b07c2adbf24a", "score": "0.6313616", "text": "function makeLink($str, $id){\r\n\r\n\t $string_return = str_replace(\" \", \"-\", $str);\r\n\t $string_return = str_replace(\"'\", \"-\", $string_return);\r\n\t $string_return = str_replace('\"', \"-\", $string_return);\r\n\t $string_return = str_replace(';', \"-\", $string_return);\r\n\t $string_return = str_replace('.', \"-\", $string_return);\r\n\t $string_return = str_replace(',', \"-\", $string_return);\r\n\t $string_return = str_replace('\\\\', \"-\", $string_return);\r\n\t $string_return = str_replace('/', \"-\", $string_return);\r\n\t $string_return = str_replace(':', \"-\", $string_return);\r\n\t $string_return = str_replace('?', \"-\", $string_return);\r\n\t $string_return = str_replace('%', \"-\", $string_return);\r\n\t $string_return = str_replace('#', \"-\", $string_return);\r\n\t $string_return = str_replace('~', \"-\", $string_return);\r\n\t $string_return = str_replace('`', \"-\", $string_return);\r\n\t $string_return = str_replace('!', \"-\", $string_return);\r\n\t $string_return = str_replace('>', \"-\", $string_return);\r\n\t $string_return = str_replace('<', \"-\", $string_return);\r\n\t $string_return = str_replace('+', \"-\", $string_return);\r\n\r\n\t $string_return .= \"-\".$id;\r\n\r\n\t $string_return = str_replace('--', \"-\", $string_return);\r\n\r\n\t $string_return = strtolower($string_return);\r\n\r\n\t return $string_return;\r\n\r\n}", "title": "" }, { "docid": "ffd948f3085a1d1e5b0fb9174a6d5840", "score": "0.6307123", "text": "function yourls_sanitize_string($in) {\n\tif (YOURLS_URL_CONVERT <= 37)\n\t\t$in = strtolower($in);\n\treturn substr(preg_replace('/[^a-zA-Z0-9]/', '', $in), 0, 199);\n}", "title": "" }, { "docid": "4b7b8b23342ef8ebdc63b3cf32587b2c", "score": "0.6290864", "text": "function _prepare_url_text($string)\n{\n // remove all characters that aren't a-z, 0-9, dash, underscore or space\n $NOT_acceptable_characters_regex = '#[^-a-zA-Z0-9_ ]#';\n $string = preg_replace($NOT_acceptable_characters_regex, '', $string);\n\n // remove all leading and trailing spaces\n $string = trim($string); \n\n // change all dashes, underscores and spaces to dashes\n $string = preg_replace('#[-_ ]+#', '-', $string); \n\n // return the modified string\n return $string;\n}", "title": "" }, { "docid": "e2341f41441bf2eb94d4b222a15d0643", "score": "0.6281071", "text": "function app_create_slug($string, $ext = '') {\n $replace = '-';\n $string = strtolower($string);\n //replace / and . with white space\n $string = preg_replace(\"/[\\/\\.]/\", \" \", $string);\n $string = preg_replace(\"/[^a-z0-9_\\s-]/\", \"\", $string);\n //remove multiple dashes or whitespaces\n $string = preg_replace(\"/[\\s-]+/\", \" \", $string);\n //convert whitespaces and underscore to $replace\n $string = preg_replace(\"/[\\s_]/\", $replace, $string);\n //limit the slug size\n $string = substr($string, 0, 200);\n //slug is generated\n return ($ext) ? $string . $ext : $string;\n }", "title": "" }, { "docid": "f86d3263085b15e9d1b12c3c04156a7a", "score": "0.62782353", "text": "function create_slug($string){\n $string = strtolower($string);\n $slug = preg_replace('/[^A-Za-z0-9-]+/', '-', $string);\n return $slug;\n}", "title": "" }, { "docid": "bf7ce35424dde1d1e7d867512e76850d", "score": "0.62563384", "text": "function urlCompatible($url) {\n $url = htmlspecialchars_decode($url, ENT_QUOTES);\n $url = preg_replace(\"/[&?:;@,!_=\\/'\\s()]/\", \"-\", $url);\n $url = preg_replace(\"/-+/\", \"-\", $url);\n $words = explode('-', $url);\n $array_size = count($words);\n $j = 1;\n $wordstats[0] = $words[0];\n for ($i = 1; $i <= $array_size; $i++) {\n if ($words[$i] != $words[$i - 1]) $wordstats[($j++) ] = $words[$i];\n }\n $url = implode('-', $wordstats);\n $url = rtrim($url, \"-\");\n \n //$url=urlencode($url);\n return $url;\n }", "title": "" }, { "docid": "05c08f645f0faf4f0a2fe74f5e1bc31c", "score": "0.62515396", "text": "function urlformat($q){\n $s='&'.$q.'&';\n $argc=func_num_args();\n for($i = 1;$i < $argc;++$i){\n $name=(string)func_get_arg($i);\n $value=(string)func_get_arg(++$i);\n $pattern = '/&'.$name.'\\=[^&]*(?=&)/i';\n $s=preg_replace($pattern,'&',$s);\n $s .= '&'.$name.'='.urlencode($value).'&';\n }\n $s = preg_replace(array('/&{2,}/','/(^&|&$)/'),array('&',''),$s);\n return $s;\n}", "title": "" }, { "docid": "528d60c4c6b14d57617dc398fc00c69c", "score": "0.6231861", "text": "public function generateSlugFrom($string): string\n {\n // Remove any character that is not alphanumeric, white-space, or a hyphen \n $string = preg_replace('/[^a-z0-9\\s\\-]/i', '', $string);\n // Replace all spaces with hyphens\n $string = preg_replace('/\\s/', '-', $string);\n // Replace multiple hyphens with a single hyphen\n $string = preg_replace('/\\-\\-+/', '-', $string);\n // Remove leading and trailing hyphens, and then lowercase the URL\n $string = strtolower(trim($string, '-'));\n\n return $string;\n }", "title": "" }, { "docid": "cc359220af5d93b76242e9db82742dea", "score": "0.6226655", "text": "static public function stringURLSafe($string)\n {\n $str = str_replace('-', ' ', $string);\n\t\t$str = str_replace('_', ' ', $string);\n\t\t\n // remove any duplicate whitespace, and ensure all characters are alphanumeric\n $str = preg_replace(array('/\\s+/','/[^A-Za-z0-9\\-]/'), array('-',''), $str);\n\n // lowercase and trim\n $str = trim(strtolower($str));\n return $str;\n }", "title": "" }, { "docid": "e5ffaaae510f4e4d041cc1137c832e21", "score": "0.620893", "text": "function makeSlug(String $string)\r\n{\r\n\t$string = strtolower($string);\r\n\t$slug = preg_replace('/[^A-Za-z0-9-]+/', '-', $string);\r\n\treturn $slug;\r\n}", "title": "" }, { "docid": "a3a977bf14c6b66c8331ddef3aaee99a", "score": "0.62052184", "text": "function url_title($str, $separator = '-', $lowercase = FALSE)\n\t{\n\t\tif ($separator === 'dash')\n\t\t{\n\t\t\t$separator = '-';\n\t\t}\n\t\telseif ($separator === 'underscore')\n\t\t{\n\t\t\t$separator = '_';\n\t\t}\n\n\t\t$q_separator = preg_quote($separator, '#');\n\n\t\t$trans = array(\n\t\t\t'&.+?;'\t\t\t=> '',\n\t\t\t'[^\\w\\d _-]'\t\t=> '',\n\t\t\t'\\s+'\t\t\t=> $separator,\n\t\t\t'('.$q_separator.')+'\t=> $separator\n\t\t);\n\n\t\t$str = strip_tags($str);\n\t\tforeach ($trans as $key => $val)\n\t\t{\n\t\t\t$str = preg_replace('#'.$key.'#i'.(UTF8_ENABLED ? 'u' : ''), $val, $str);\n\t\t}\n\n\t\tif ($lowercase === TRUE)\n\t\t{\n\t\t\t$str = strtolower($str);\n\t\t}\n\n\t\treturn trim(trim($str, $separator));\n\t}", "title": "" }, { "docid": "a3a977bf14c6b66c8331ddef3aaee99a", "score": "0.62052184", "text": "function url_title($str, $separator = '-', $lowercase = FALSE)\n\t{\n\t\tif ($separator === 'dash')\n\t\t{\n\t\t\t$separator = '-';\n\t\t}\n\t\telseif ($separator === 'underscore')\n\t\t{\n\t\t\t$separator = '_';\n\t\t}\n\n\t\t$q_separator = preg_quote($separator, '#');\n\n\t\t$trans = array(\n\t\t\t'&.+?;'\t\t\t=> '',\n\t\t\t'[^\\w\\d _-]'\t\t=> '',\n\t\t\t'\\s+'\t\t\t=> $separator,\n\t\t\t'('.$q_separator.')+'\t=> $separator\n\t\t);\n\n\t\t$str = strip_tags($str);\n\t\tforeach ($trans as $key => $val)\n\t\t{\n\t\t\t$str = preg_replace('#'.$key.'#i'.(UTF8_ENABLED ? 'u' : ''), $val, $str);\n\t\t}\n\n\t\tif ($lowercase === TRUE)\n\t\t{\n\t\t\t$str = strtolower($str);\n\t\t}\n\n\t\treturn trim(trim($str, $separator));\n\t}", "title": "" }, { "docid": "ea44b8fe0bb5e9e440e8a345da1e5250", "score": "0.6193413", "text": "public function createBaseSlug($str) {\n\t\t// convert all spaces to underscores:\n\t\t$treated = strtr($str, \" \", \"_\");\n\t\t// convert what's needed to convert to nothing (remove them...)\n\t\t$treated = preg_replace('/[\\!\\@\\#\\$\\%\\^\\&\\*\\(\\)\\+\\=\\~\\:\\.\\,\\;\\'\\\"\\<\\>\\/\\\\\\`]/', \"\", $treated);\n\t\t// convert underscores to dashes\n\t\t$treated = strtr($treated, \"_\", \"-\");\n\n\t\tif ($this->lowercaseUrl) {\n\t\t\t$treated = mb_strtolower($treated, 'UTF-8');\n\t\t}\n\n\t\treturn $treated;\n\t}", "title": "" }, { "docid": "23a967977b4f22f478b29582014a9b70", "score": "0.6178185", "text": "function url_replace_callback_kb2($matches)\n{\n\treturn make_url_friendly($matches[6]) . '-kba' . $matches[1] . '.html' . if_query($matches[2]) . stripslashes($matches[5] . $matches[6]) . '</a>';\n}", "title": "" }, { "docid": "90184759ffdcbaf31125bb8de32de147", "score": "0.6167909", "text": "function createURL($filename){\n\t\t$filename = strtolower($filename);\n\t\t$filename = str_replace(\"1/8\",\"one-sixteenth\",$filename);\n\t\t$filename = str_replace(\"1/8\",\"one-eighth\",$filename);\n\t\t$filename = str_replace(\"1/4\",\"one-quarter\",$filename);\n\t\t$filename = str_replace(\"1/2\",\"one-half\",$filename);\n\t\t$filename = str_replace('&','-and-',$filename);\n\t\t$replace=\"-\";\n\t\t$filename = preg_replace(\"/[^a-zA-Z0-9\\.]/\",$replace,$filename);\n\t\t$filename = str_replace('--','-',$filename);\n\t\t$filename = str_replace('-','-',$filename);\n\t\tif(substr($filename,-1,1)=='-'){ $filename = substr($filename,0,-1); }\n\t\tif(substr($filename,0,1)=='-'){ $filename = substr($filename,1); }\n\t\t\n\t\treturn $filename;\n\t}", "title": "" }, { "docid": "a6ae658db833bebd396a58e7c5b78d7f", "score": "0.616471", "text": "function str_slug($string)\n{\n $string = preg_replace(\"/[^\\\\a-zA-Z0-9\\/_\\|\\+\\s\\-]/\", '', $string);\n $string = strtolower(trim($string, '-'));\n\n return strip_tags(preg_replace(\"/[\\/\\\\\\_\\|\\+\\s\\-]+/\", '-', $string));\n}", "title": "" }, { "docid": "fee44aa24d6aa28677d2ae442e817281", "score": "0.6158807", "text": "function create_slug($string){\n $slug=preg_replace('/[^A-Za-z0-9-]+/', '-', $string);\n $slug = strtolower($slug);\n return $slug;\n }", "title": "" }, { "docid": "4fa95aeb170aa853fa7809aa8b5c935b", "score": "0.61347556", "text": "function sluggify( $url ) {\n $url = strtolower($url);\n $url = strip_tags($url);\n $url = stripslashes($url);\n $url = html_entity_decode($url);\n # Remove quotes (can't, etc.)\n $url = str_replace('\\'', '', $url);\n # Replace non-alpha numeric with hyphens\n $match = '/[^a-z0-9]+/';\n $replace = '-';\n $url = preg_replace($match, $replace, $url);\n $url = trim($url, '-');\n return $url;\n}", "title": "" }, { "docid": "f64de8c83dab8edc19f2400ad258069f", "score": "0.6128686", "text": "function u($string = \"\") {\n // encoded equivalents - turns space into '+'\n // Used for path after '?' in url\n return urlencode($string);\n\n }", "title": "" }, { "docid": "990b83a973d4f4f5c3e18fa3d1085e1c", "score": "0.6121643", "text": "function seo_friendly($string)\n{\n\t$string = preg_replace(\"`\\[.*\\]`U\",\"\",$string);\n\t$string = preg_replace('`&(amp;)?#?[a-z0-9]+;`i','-',$string);\n\t$string = htmlentities($string, ENT_COMPAT, 'utf-8');\n\t$string = preg_replace( \"`&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig|quot|rsquo);`i\",\"\\\\1\", $string );\n\t$string = preg_replace( array(\"`[^a-z0-9]`i\",\"`[-]+`\") , \"-\", $string);\n\t\n\treturn strtolower(trim($string, '-'));\n}", "title": "" }, { "docid": "d6459231b9d17d2616bb61a0e2f83160", "score": "0.6119554", "text": "public function shorten($url);", "title": "" }, { "docid": "7d61cb23034261ec44dd820d3cc26bdf", "score": "0.61194354", "text": "function cleanURL($string) {\n $unwanted_array = array( 'Š'=>'S', 'š'=>'s', 'Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',\n 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U',\n 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss', 'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c',\n 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o',\n 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y' );\n $string = strtr( $string, $unwanted_array );\n $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens.\n return strtolower( preg_replace('/[^A-Za-z0-9\\-]/', '', $string) ); // Removes special chars.\n}", "title": "" }, { "docid": "5bff95015ea4260b1b678f5a2cef8545", "score": "0.61110914", "text": "public function traduceTextoaFriendlyURL($texto)\n\t{\n\t\t$resultado = strtolower($texto);\n\t\t$resultado = preg_replace(\"/[^a-z0-9\\s-]/\", \"\", $resultado);\n\t\t$resultado = trim(preg_replace(\"/[\\s-]+/\", \" \", $resultado));\n\t\t$resultado = preg_replace(\"/\\s/\", \"-\", $resultado);\n\t\treturn $resultado;\n\t}", "title": "" }, { "docid": "d198fd7f6128f768f0a16a20740ff6fb", "score": "0.6107896", "text": "function webalize($s, $charlist = NULL, $lower = TRUE){\n\t$s = toAscii($s);\n\tif ($lower) {\n\t\t$s = strtolower($s);\n\t}\n\t$s = preg_replace('#[^a-z0-9' . preg_quote($charlist, '#') . ']+#i', '-', $s);\n\t$s = trim($s, '-');\n\treturn $s;\n}", "title": "" }, { "docid": "9c2b83b48ff47831ab427f1c527c65fa", "score": "0.61065775", "text": "function slug($str = NULL) {\n\t$url = url_title($str, 'dash', TRUE);\n\tif ($url == '')\n\t\treturn str_replace(' ', '-', $str);\n\telse\n\t\treturn $url;\n}", "title": "" }, { "docid": "2b9170a605281f220cf3da7e007c9ed3", "score": "0.61042696", "text": "function create_slug($str = \"\", $symbol = \"-\")\r\n {\r\n // if not english\r\n $regex = '/^[ -~]+$/';\r\n if (!preg_match($regex, $str)) {\r\n $str = transliterator_transliterate('Any-Latin;Latin-ASCII;', $str);\r\n }\r\n\r\n $str = mb_strtolower($str);\r\n $str = str_replace(\"'\", \"\", $str);\r\n $str = str_replace('\"', \"\", $str);\r\n $str = str_replace(\".\", $symbol, $str);\r\n $str = str_replace(\"\\\\\", $symbol, $str);\r\n $str = str_replace(\"/\", $symbol, $str);\r\n $str = preg_replace(\"/[~\\:;\\,\\?\\s\\(\\)\\'\\\"\\[\\]\\{\\}#@&%\\$\\!\\^\\+\\*=\\!\\<\\>\\|?`]/\", $symbol, trim($str));\r\n\r\n // everything but letters and numbers\r\n $str = preg_replace('/(.)\\\\1{2,}/', '$1', $str);\r\n\r\n // letters replace only with 2+ repetition\r\n $str = preg_replace(\"/[-]{2,}/\", $symbol, $str);\r\n $str = rtrim($str, $symbol);\r\n\r\n return mb_strtolower($str);\r\n }", "title": "" }, { "docid": "499ede1b73d53957330fbb38e64e155c", "score": "0.6094377", "text": "function strToUri($str='')\n\t{\n\t\t$str = mb_strtolower($str, 'UTF-8');\n\t\t$str = trim($str);\n\t\t$str = str_replace(' ', '-', $str);\n\t\t\n\t\t$str = preg_replace(array_keys(parent::$uriReplacements), array_values(parent::$uriReplacements), $str);\n\t\t//$str = preg_replace(\"/[^a-zA-Z0-9:\\/\\.\\(\\)\\-\\_#]/\", \"\", $str);\n\t\t$str = preg_replace(\"/[^a-zA-Z0-9\\-\\_]/\", \"\", $str);\n\t\t\n\t\t// remove: remove not allowed signs!!!\n\t\t$str = substr($str, 0, 180); // baseuri (max length 75) will prefixed \n\t\treturn $str;\n\t}", "title": "" }, { "docid": "c463e5d09c1bee1661f9aef745603907", "score": "0.6087341", "text": "function optimizeUrl($productId, $productName){\n // $productNameWithDash = preg_replace('/\\s/', '-', $productName);\n // $productNameRemoveAmpersand = preg_replace('/&/', '-and-', $productNameWithDash);\n // $productNameRemoveAmpersand = preg_replace('/=/', '', $productNameWithDash);\n $productNameUrlFriendly = Str::slug($productName);\n\n return $productId . '-' . $productNameUrlFriendly;\n}", "title": "" }, { "docid": "164b2be0d7bda530028fbc410bbe0abe", "score": "0.60852826", "text": "function putUrl($text, $url){\n return str_replace(\"URL\", $url, $text);\n}", "title": "" }, { "docid": "40bd2617bc70d9ad483a85bb03219b60", "score": "0.607652", "text": "function encurtarLink($link){\n $link = strtolower($link);\n $start = 0;\n $new_link = substr($link,$start,7);\n if($new_link === 'http://'){\n \t$start = 7;\n $new_link = substr($link,$start);\n }else{\n $new_link = substr($link,0,8);\n \tif($new_link === 'https://'){\n \t\t$start = 8;\n \t\t$new_link = substr($link,$start);\n \t}\n }\n\n if($start == 7 || $start == 8){\n \t$arr = str_split($new_link);\n\n\t if($arr[0] == 'w' && $arr[1] == 'w' && $arr[2] == 'w' ){\n\t \t$start = 4;\n\t \t$new_link = substr($new_link,$start);\n\t \t$arr = str_split($new_link);\n\t }\n\n\t $new_link = '';\n\t foreach ($arr as $k => $value) {\n\t if($value != '.'){\n\t $new_link = $new_link . $value;\n\t }else{\n\t break;\n\t }\n\t }\n\n }else{\n\n \t$arr = str_split($link);\n\n \tif($arr[0] == 'w' && $arr[1] == 'w' && $arr[2] == 'w' ){\n\t \t$start = 4;\n\t }\n\n\t $new_link = substr($link,$start);\n \t$arr = str_split($new_link);\n\n\t $new_link = '';\n\t foreach ($arr as $k => $value) {\n\t if($value != '.'){\n\t $new_link = $new_link . $value;\n\t }else{\n\t break;\n\t }\n\t }\n }\n\n return $new_link;\n\n}", "title": "" }, { "docid": "7837be832c63a0ea9d6ac2cbd73465f3", "score": "0.6068063", "text": "function make_alias($string) {\r\n //return str_replace(array(\" \", \",\", \"'\", \"\\\"\", \"&#39;\"), \"-\", strtolower(trim(html_entity_decode($title))));\r\n $string = strtolower($string);\r\n $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens.\r\n $string = preg_replace('/[^A-Za-z0-9\\-]/', '', $string); // Removes special chars.\r\n\r\n return preg_replace('/-+/', '-', $string); // Replaces multiple hyphens with single one.\r\n}", "title": "" }, { "docid": "175e86f2c32a4c3423e9bc829b9da9c8", "score": "0.60677344", "text": "static function buildFriendlyURL($controller, $id, $url_key = null) {\n if ($url_key == 'list')\n return \"/{$controller}/$url_key\";\n if ($url_key == \"list/artist\")\n return \"/$controller/$url_key/$id\";\n if ($controller == 'user')\n return '/user/profile/' . $id;\n\n return '/' . $controller . ($url_key ? \"/$url_key,$id.html\" : \"/detail/$id\");\n }", "title": "" }, { "docid": "850a68e82481853cdb3664f2a7640059", "score": "0.6059363", "text": "function createSlug($string)\n{\n if (! $string) {\n return;\n }\n\n if (checkUnicode($string)) {\n $slug = str_replace(' ', '-', $string);\n } else {\n $slug = preg_replace('/[^A-Za-z0-9-]+/', '-', strtolower($string));\n }\n return $slug;\n}", "title": "" }, { "docid": "afcf2ad06398130456793f52d0157c18", "score": "0.6054813", "text": "public static function url($title) {\n\n\t\t// reemplaza cualquier cadena inválida por \"-\";\n\t\t$title = str_replace(\"&\", \"and\", $title);\n\t\t$arrStupid = array('feat.', 'feat', '.com', '(tm)', ' ', '*', \"'s\", '\"', \",\", \":\", \";\", \"@\", \"#\", \"(\", \")\", \"?\", \"!\", \"_\",\n\t\t\t\"$\", \"+\", \"=\", \"|\", \"'\", '/', \"~\", \"`s\", \"`\", \"\\\\\", \"^\", \"[\", \"]\", \"{\", \"}\", \"<\", \">\", \"%\", \"&#8482;\");\n\n\t\t$title = htmlentities($title);\n\t\t$title = preg_replace('/&([a-zA-Z])(.*?);/', '$1', $title);\n\t\t$title = strtolower(\"$title\");\n\t\t$title = str_replace(\".\", \"\", $title);\n\t\t$title = str_replace($arrStupid, \"_\", $title);\n\t\t$flag = 1;\n\n\t\twhile ($flag) {\n\t\t\t$newtitle = str_replace(\"--\", \"-\", $title);\n\t\t\tif ($title != $newtitle) {\n\t\t\t\t$flag = 1;\n\t\t\t} else {\n\t\t\t\t$flag = 0;\n\t\t\t}\n\n\t\t\t$title = $newtitle;\n\t\t}\n\t\t$len = strlen($title);\n\t\tif ($title[$len - 1] == \"\") {\n\t\t\t$title = substr($title, 0, $len - 1);\n\t\t}\n\n\t\treturn $title;\n\n\t}", "title": "" }, { "docid": "9ce33b30e292c139ac104b5dadd1e5d8", "score": "0.60468763", "text": "function slug($str) {\n $str = (mb_strlen($str, 'UTF-8') > 150) ? substr($str, 0, 149) : $str;\n\n $str = mb_strtolower($str, 'UTF-8');\n\n $str = str_replace(['ö', 'ü', 'ó', 'ő', 'ú', 'é', 'á', 'ű', 'í'], ['o', 'u', 'o', 'o', 'u', 'e', 'a', 'u', 'i'],\n $str);\n\n $str = html_entity_decode($str, ENT_QUOTES | ENT_HTML5, 'UTF-8');\n\n $str = strip_tags($str);\n\n $str = preg_replace('/[^a-z0-9-]/', '-', $str); // Replace illegals with dashes\n\n $str = preg_replace('/-{2,}/', '-', $str); // Replace multiple dashes with one\n\n $str = trim($str, '-'); // Remove the leading/trailing dash\n\n return $str;\n}", "title": "" }, { "docid": "9239a40d135040d1a9db67dace36bea9", "score": "0.6024116", "text": "function slugForURL($url) {\n return preg_replace('/https?:\\/\\//', '', $url);\n}", "title": "" }, { "docid": "178cc8bb2ace079c6a30db2f6474dfdd", "score": "0.60206586", "text": "public function friendlyURL($address) {\n\t\treturn FAKE_ADDR . $address;\n\t}", "title": "" }, { "docid": "898710e1315c71f2da687e62b6afa394", "score": "0.60199183", "text": "function deslug($string) {\n return ucwords(str_replace('_', ' ', $string));\n}", "title": "" }, { "docid": "2637652275c3ce7cc8e0666068b6ee82", "score": "0.6016708", "text": "public function toSlug()\n {\n $slug = str_replace(array('(', ')', '%', '#', '/', '\\\\n'), '', $this->str);\n $slug = strtolower(trim($slug));\n $slug = preg_replace('/[^a-z0-9-]/', '-', $slug);\n $slug = preg_replace('/-+/', \"-\", $slug);\n return $slug;\n }", "title": "" }, { "docid": "1478fd3313583069f16e1956c6b7b005", "score": "0.6012987", "text": "function createSlug($string) {\n $string = substr(strtolower($string), 0, 35);\n $old_pattern = array(\"/[^a-zA-Z0-9]/\", \"/_+/\", \"/_$/\");\n $new_pattern = array(\"_\", \"_\", \"\");\n $return = strtolower(preg_replace($old_pattern, $new_pattern, $string)) . rand(111111, 9999999) . time();\n return $return;\n }", "title": "" }, { "docid": "351790e034f2e305f533b015212b38c2", "score": "0.600944", "text": "public function escapeUrl(string $input): string\n {\n }", "title": "" }, { "docid": "3d4dcb84432036e2035cff6a9484d11a", "score": "0.6005417", "text": "public static function urlize($string)\n {\n $string = str_replace('®', '', $string);\n $string = @iconv(\"UTF-8\", \"ASCII//TRANSLIT\", $string);\n $string = strtolower(preg_replace(array('/[^-a-zA-Z0-9\\s]/', '/[\\s]/'), array('', '-'), $string));\n $string = str_replace(array('---', '--'), '-', $string);\n return $string;\n }", "title": "" }, { "docid": "43fdb121c83b7d59d4012d0974d7e750", "score": "0.6001523", "text": "public static function friendlyURLString(string $string, int $maxWords = null)\n {\n\n $string = trim($string);\n $string = mb_strtolower($string);\n\n $whiteList = [\n 'a', 'b', 'c', 'd', 'e',\n 'f', 'g', 'h', 'i', 'j',\n 'k', 'l', 'm', 'n', 'o',\n 'p', 'q', 'r', 's', 't',\n 'u', 'v', 'w', 'x', 'y',\n 'z', '-',\n ];\n\n $search = [\n 'á', 'à', 'ä', 'â', 'ª',\n 'é', 'è', 'ë', 'ê',\n 'í', 'ì', 'ï', 'î',\n 'ó', 'ò', 'ö', 'ô',\n 'ú', 'ù', 'ü', 'û',\n 'ñ', 'ç',\n ' ', ' ',\n ];\n $replace = [\n 'a', 'a', 'a', 'a', 'a',\n 'e', 'e', 'e', 'e',\n 'i', 'i', 'i', 'i',\n 'o', 'o', 'o', 'o',\n 'u', 'u', 'u', 'u',\n 'nn', 'c',\n ' ', '-',\n ];\n\n $string = preg_replace(\"/(\\t|\\r\\n|\\r|\\n){1,}/\", '', $string);\n $string = preg_replace(\"/(\\x{00A0}){1,}/u\", ' ', $string);\n $string = str_replace($search, $replace, $string);\n\n $stringSplit = str_split($string, 1);\n\n foreach ($stringSplit as $key => $char) {\n if (!in_array($char, $whiteList)) {\n unset($stringSplit[$key]);\n }\n }\n\n $string = is_array($stringSplit) ? implode('', $stringSplit) : $string;\n\n $string = preg_replace(\"/-{2,}/\", '-', $string);\n\n if (is_int($maxWords)) {\n\n $words = explode('-', $string);\n\n $wordsLimitied = [];\n $countWords = count($words);\n\n for ($i = 0; $i < $maxWords && $i < $countWords; $i++) {\n $word = $words[$i];\n $wordsLimitied[] = $word;\n }\n\n $string = implode('-', $wordsLimitied);\n\n }\n\n return trim($string, '-');\n }", "title": "" }, { "docid": "7c6ab6a4f10f1d432a79e1fbaded09e5", "score": "0.6000627", "text": "function pz_do_url_write( $full_string, $url, $content ) {\n if( $url ) {\n $replacer = \"<a href=\" . $url . \">\";\n } else { \n $replacer = \"\";\n }\n if( PZ_DEBUG ) {\n pz_log_msg( \"Replacer is \" . $replacer );\n }\n\n $phrase = PZ_START_TAG_OPEN . $full_string . PZ_START_TAG_CLOSE; // original special tag to look for\n $pos = stripos( $content, $phrase );\n if( $pos ) {\n $content = substr_replace( $content, $replacer, $pos, strlen( $phrase ) );\n }\n if( $replacer ) {\n $replacer = \"</a>\";\n }\n $pos = stripos( $content, PZ_CLOSE_TAG );\n if( $pos ) {\n $content = substr_replace( $content, $replacer, $pos, strlen( PZ_CLOSE_TAG ));\n }\n return $content;\n}", "title": "" }, { "docid": "52f69cd0f6b1120c0c58b179894e23d8", "score": "0.59950566", "text": "public function slugify($string);", "title": "" }, { "docid": "01af4ca6b77c9dfbe22035708286905d", "score": "0.5973979", "text": "function clean_url($text) { \n if (function_exists('mb_strtolower')) {\n $text = strip_tags(mb_strtolower($text)); \n } else {\n $text = strip_tags(strtolower($text)); \n }\n $code_entities_match = array(' ?',' ','--','&quot;','!','@','#','$','%','^','&','*','(',')','+','{','}','|',':','\"','<','>','?','[',']','\\\\',';',\"'\",',','.','/','*','+','~','`','='); \n $code_entities_replace = array('','-','-','','','','','','','','','','','','','','','','','','','','','','',''); \n $text = str_replace($code_entities_match, $code_entities_replace, $text); \n $text = urlencode($text);\n $text = str_replace('--', '-', $text);\n $text = str_replace('--', '-', $text); \n $text = rtrim($text, '-');\n return $text; \n}", "title": "" }, { "docid": "fc4ea60bf208a2d94039f988070044f0", "score": "0.59703237", "text": "public function \n\t\tstring_for_url($strIn) \n\t{\n\t\t//\n\t\t$strOut = '';\n\t\t$allowed = '/[^a-zA-Z0-9 ]/';\n\t\t$strOut = $strIn;\n\n\t\t// only alphanum and spaces allowed\n\t\t$strOut = preg_replace($allowed, '', $strOut);\n\n\t\t// swap spaces for _ (changed to delete spaces)\n\t\t// $strOut = str_replace(' ', '_', $strOut);\n\t\t$strOut = str_replace(' ', '', $strOut);\n\t\t$strOut = trim($strOut);\n\n\t\t// make lower case for consistancy\n\t\t$strOut = strtolower($strOut);\n\n\t\treturn $strOut;\n\t}", "title": "" }, { "docid": "d54651850ec1a2127fe89f454673708e", "score": "0.5963014", "text": "public static function URLPurify($name) {\n\t\t$name = preg_replace(\"/[^a-zA-Z0-9\\s\\-]/\", \"\", $name); //Remove all non-alphanumeric characters, except for spaces\n\t\t$name = preg_replace(\"/[\\s]/\", \"-\", $name); //Replace remaining spaces with a \"-\"\n\t\t$name = str_replace(\"--\", \"-\", $name); //Replace \"--\" with \"-\", will occur if a something like \" & \" is removed\n\t\treturn strtolower($name);\n\t}", "title": "" }, { "docid": "5821c4711bf84aa9512d4b4b4ff6abfe", "score": "0.5962615", "text": "function url_replace_callback_f1($matches)\n{\n\t//\"make_url_friendly('\\\\6') . '-vc\\\\1.html' . if_query('\\\\2') . stripslashes('\\\\5\\\\6') . '</a>'\",\n\treturn make_url_friendly($matches[6]) . '-vc' . $matches[1] . '.html' . if_query($matches[2]) . stripslashes($matches[5] . $matches[6]) . '</a>';\n}", "title": "" }, { "docid": "99a443c456d26876b68c9af97dae535b", "score": "0.59617573", "text": "function url_replace_callback_d2($matches)\n{\n\treturn make_url_friendly($matches[6]) . '-df' . $matches[1] . '.html' . if_query($matches[2]) . stripslashes($matches[5] . $matches[6]) . '</a>';\n}", "title": "" }, { "docid": "247190f46566a8479988848dd718f470", "score": "0.5960809", "text": "public function limpiarUrl(){\n\t\t\t\n\t\t\t$nombre1 = strtolower($this->nombre);\n\t\t\t\n\t\t\t//Rememplazamos caracteres especiales latinos\n\n\t\t\t$find = array('á', 'é', 'í', 'ó', 'ú', 'ñ');\n\n\t\t\t$repl = array('a', 'e', 'i', 'o', 'u', 'n');\n\n\t\t\t$nombre1 = str_replace ($find, $repl, $nombre1);\n\t\t\t\n\t\t\tif($separar=explode(' ',$nombre1))\n\t\t\t{\t\t\t\t//separamos por espacios\n\t\t\t$slug= ucwords($separar[0]); //ponemos primera letra de la palabra en mayusculas\n\t\t\tfor($i=1; $i<count($separar); $i++)\n\t\t\t\t{\n\t\t\t\t\t$slug.=' ';\n\t\t\t\t\t$slug.=strtoupper($separar[$i]);\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t\t// Añaadimos los guiones\n\n\t\t\t$find = array(' ', '\\r\\n', '\\n');\n\t\t\t$slug = str_replace ($find, '_', $slug);\n\t\t\t\n\t\t\t// Eliminamos y Reemplazamos demás caracteres especiales\n\n\t\t\t$find = array('/[^a-zA-Z0-9\\_+&<>-]/', '/[\\-]+-/', '/<[^>]*>-/');\n\t\t\t//$find = array('/[^a-zA-Z0-9\\_+&<>]/', '/[\\-]+/', '/<[^>]*>/');\n\t\t\t\n\t\t\t$repl = array('', '_', '');\n\n\t\t\t$slug = preg_replace ($find, $repl, $slug);\n\t\t\t$this->url_limpia = $slug;\n\t\t\t\n\t\t\treturn $this->url_limpia;\n\t\t}", "title": "" }, { "docid": "8a6c1232841459fdae82b4506e0183ff", "score": "0.59575623", "text": "function generate_seo_link($input,$replace = '-',$remove_words = true,$words_array = array())\n{\n\t$return = trim(ereg_replace(' +',' ',preg_replace('/[^a-zA-Z0-9\\s]/','',strtolower($input))));\n\n\t//remove words, if not helpful to seo\n\t//i like my defaults list in remove_words(), so I wont pass that array\n\tif($remove_words) { $return = remove_words($return,$replace,$words_array); }\n\n\t//convert the spaces to whatever the user wants\n\t//usually a dash or underscore..\n\t//...then return the value.\n\treturn str_replace(' ',$replace,$return);\n}", "title": "" }, { "docid": "b3d1d2bc2a5e1985e29d5b052ef90542", "score": "0.59469575", "text": "public function convertNameToSlug();", "title": "" }, { "docid": "2e937e627ea6d902f63b359611e18c9c", "score": "0.59429026", "text": "function url_slug($str, $options = array()) {\n $str = mb_convert_encoding((string)$str, 'UTF-8', mb_list_encodings());\n \n $defaults = array(\n 'delimiter' => '-',\n 'limit' => null,\n 'lowercase' => true,\n 'replacements' => array(),\n 'transliterate' => false,\n );\n \n // Merge options\n $options = array_merge($defaults, $options);\n \n $char_map = array(\n // Latin\n 'À' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ã' => 'A', 'Ä' => 'A', 'Å' => 'A', 'Æ' => 'AE', 'Ç' => 'C', \n 'È' => 'E', 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Ì' => 'I', 'Í' => 'I', 'Î' => 'I', 'Ï' => 'I', \n 'Ð' => 'D', 'Ñ' => 'N', 'Ò' => 'O', 'Ó' => 'O', 'Ô' => 'O', 'Õ' => 'O', 'Ö' => 'O', 'Ő' => 'O', \n 'Ø' => 'O', 'Ù' => 'U', 'Ú' => 'U', 'Û' => 'U', 'Ü' => 'U', 'Ű' => 'U', 'Ý' => 'Y', 'Þ' => 'TH', \n 'ß' => 'ss', \n 'à' => 'a', 'á' => 'a', 'â' => 'a', 'ã' => 'a', 'ä' => 'a', 'å' => 'a', 'æ' => 'ae', 'ç' => 'c', \n 'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e', 'ì' => 'i', 'í' => 'i', 'î' => 'i', 'ï' => 'i', \n 'ð' => 'd', 'ñ' => 'n', 'ò' => 'o', 'ó' => 'o', 'ô' => 'o', 'õ' => 'o', 'ö' => 'o', 'ő' => 'o', \n 'ø' => 'o', 'ù' => 'u', 'ú' => 'u', 'û' => 'u', 'ü' => 'u', 'ű' => 'u', 'ý' => 'y', 'þ' => 'th', \n 'ÿ' => 'y',\n\n // Latin symbols\n '©' => '(c)',\n\n // Greek\n 'Α' => 'A', 'Β' => 'B', 'Γ' => 'G', 'Δ' => 'D', 'Ε' => 'E', 'Ζ' => 'Z', 'Η' => 'H', 'Θ' => '8',\n 'Ι' => 'I', 'Κ' => 'K', 'Λ' => 'L', 'Μ' => 'M', 'Ν' => 'N', 'Ξ' => '3', 'Ο' => 'O', 'Π' => 'P',\n 'Ρ' => 'R', 'Σ' => 'S', 'Τ' => 'T', 'Υ' => 'Y', 'Φ' => 'F', 'Χ' => 'X', 'Ψ' => 'PS', 'Ω' => 'W',\n 'Ά' => 'A', 'Έ' => 'E', 'Ί' => 'I', 'Ό' => 'O', 'Ύ' => 'Y', 'Ή' => 'H', 'Ώ' => 'W', 'Ϊ' => 'I',\n 'Ϋ' => 'Y',\n 'α' => 'a', 'β' => 'b', 'γ' => 'g', 'δ' => 'd', 'ε' => 'e', 'ζ' => 'z', 'η' => 'h', 'θ' => '8',\n 'ι' => 'i', 'κ' => 'k', 'λ' => 'l', 'μ' => 'm', 'ν' => 'n', 'ξ' => '3', 'ο' => 'o', 'π' => 'p',\n 'ρ' => 'r', 'σ' => 's', 'τ' => 't', 'υ' => 'y', 'φ' => 'f', 'χ' => 'x', 'ψ' => 'ps', 'ω' => 'w',\n 'ά' => 'a', 'έ' => 'e', 'ί' => 'i', 'ό' => 'o', 'ύ' => 'y', 'ή' => 'h', 'ώ' => 'w', 'ς' => 's',\n 'ϊ' => 'i', 'ΰ' => 'y', 'ϋ' => 'y', 'ΐ' => 'i',\n\n // Turkish\n 'Ş' => 'S', 'İ' => 'I', 'Ç' => 'C', 'Ü' => 'U', 'Ö' => 'O', 'Ğ' => 'G',\n 'ş' => 's', 'ı' => 'i', 'ç' => 'c', 'ü' => 'u', 'ö' => 'o', 'ğ' => 'g', \n\n // Russian\n 'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G', 'Д' => 'D', 'Е' => 'E', 'Ё' => 'Yo', 'Ж' => 'Zh',\n 'З' => 'Z', 'И' => 'I', 'Й' => 'J', 'К' => 'K', 'Л' => 'L', 'М' => 'M', 'Н' => 'N', 'О' => 'O',\n 'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T', 'У' => 'U', 'Ф' => 'F', 'Х' => 'H', 'Ц' => 'C',\n 'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Sh', 'Ъ' => '', 'Ы' => 'Y', 'Ь' => '', 'Э' => 'E', 'Ю' => 'Yu',\n 'Я' => 'Ya',\n 'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g', 'д' => 'd', 'е' => 'e', 'ё' => 'yo', 'ж' => 'zh',\n 'з' => 'z', 'и' => 'i', 'й' => 'j', 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o',\n 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't', 'у' => 'u', 'ф' => 'f', 'х' => 'h', 'ц' => 'c',\n 'ч' => 'ch', 'ш' => 'sh', 'щ' => 'sh', 'ъ' => '', 'ы' => 'y', 'ь' => '', 'э' => 'e', 'ю' => 'yu',\n 'я' => 'ya',\n\n // Ukrainian\n 'Є' => 'Ye', 'І' => 'I', 'Ї' => 'Yi', 'Ґ' => 'G',\n 'є' => 'ye', 'і' => 'i', 'ї' => 'yi', 'ґ' => 'g',\n\n // Czech\n 'Č' => 'C', 'Ď' => 'D', 'Ě' => 'E', 'Ň' => 'N', 'Ř' => 'R', 'Š' => 'S', 'Ť' => 'T', 'Ů' => 'U', \n 'Ž' => 'Z', \n 'č' => 'c', 'ď' => 'd', 'ě' => 'e', 'ň' => 'n', 'ř' => 'r', 'š' => 's', 'ť' => 't', 'ů' => 'u',\n 'ž' => 'z', \n\n // Polish\n 'Ą' => 'A', 'Ć' => 'C', 'Ę' => 'e', 'Ł' => 'L', 'Ń' => 'N', 'Ó' => 'o', 'Ś' => 'S', 'Ź' => 'Z', \n 'Ż' => 'Z', \n 'ą' => 'a', 'ć' => 'c', 'ę' => 'e', 'ł' => 'l', 'ń' => 'n', 'ó' => 'o', 'ś' => 's', 'ź' => 'z',\n 'ż' => 'z',\n\n // Latvian\n 'Ā' => 'A', 'Č' => 'C', 'Ē' => 'E', 'Ģ' => 'G', 'Ī' => 'i', 'Ķ' => 'k', 'Ļ' => 'L', 'Ņ' => 'N', \n 'Š' => 'S', 'Ū' => 'u', 'Ž' => 'Z',\n 'ā' => 'a', 'č' => 'c', 'ē' => 'e', 'ģ' => 'g', 'ī' => 'i', 'ķ' => 'k', 'ļ' => 'l', 'ņ' => 'n',\n 'š' => 's', 'ū' => 'u', 'ž' => 'z'\n );\n \n // Make custom replacements\n $str = preg_replace(array_keys($options['replacements']), $options['replacements'], $str);\n \n // Transliterate characters to ASCII\n if ($options['transliterate']) {\n $str = str_replace(array_keys($char_map), $char_map, $str);\n }\n \n // Replace non-alphanumeric characters with our delimiter\n $str = preg_replace('/[^\\p{L}\\p{Nd}]+/u', $options['delimiter'], $str);\n \n // Remove duplicate delimiters\n $str = preg_replace('/(' . preg_quote($options['delimiter'], '/') . '){2,}/', '$1', $str);\n \n // Truncate slug to max. characters\n $str = mb_substr($str, 0, ($options['limit'] ? $options['limit'] : mb_strlen($str, 'UTF-8')), 'UTF-8');\n \n // Remove delimiter from ends\n $str = trim($str, $options['delimiter']);\n\n $str = str_replace('-amp-', '-and-', $str);\n \n return $options['lowercase'] ? mb_strtolower($str, 'UTF-8') : $str;\n }", "title": "" }, { "docid": "7ede904fe1d978506dfd123d070c4ff9", "score": "0.59234345", "text": "function build_safe_url($args)\n\t{\n\t\t$string = isset($args['scheme']) ? \"{$args['scheme']}://\": '';\n\t\t$string .= isset($args['host']) ? \"{$args['host']}\": '';\n\t\t$string .= isset($args['port']) ? \":{$args['port']}\": '';\n\t\t$string .= isset($args['path']) ? \"{$args['path']}\": '';\n\t\t$string .= isset($args['query']) ? \"?{$args['query']}\": '';\n\t\treturn htmlentities($string, ENT_QUOTES, 'UTF-8');\n\t}", "title": "" }, { "docid": "6e761973b6cbce77314df349b06a5050", "score": "0.59200263", "text": "function cleanUrl($url) {\r\n // Replace white space & special chars to \"simple\"\r\n $arr_chars = array(' ', 'ç', 'ñ', 'Å¡', 'ž', '¢', 'µ', '×', 'ß');\r\n\r\n $arr_chars_replace = array('-', 'c', 'n', 's', 'z', 'c', 'u', 'x', 'ss');\r\n\r\n $url = str_ireplace($arr_chars, $arr_chars_replace, $url);\r\n\r\n $arr_chars = array('([åäáàâã])',\r\n '([Ͼ])',\r\n '([èéêë])',\r\n '([ìíîï])',\r\n '([ùúûü])',\r\n '([ýÿ])',\r\n '([ðòóôõöø])');\r\n\r\n $arr_chars_replace = array('a',\r\n 'ae',\r\n 'e',\r\n 'i',\r\n 'u',\r\n 'y',\r\n 'o');\r\n\r\n $url = preg_replace($arr_chars, $arr_chars_replace, $url);\r\n\r\n $allowed_chars = \"/[^a-z0-9_-]/i\";\r\n\r\n $url = preg_replace($allowed_chars, '', $url);\r\n\r\n\r\n return strtolower($url);\r\n}", "title": "" }, { "docid": "07b3cf586b6d2db560f45f563d9fad50", "score": "0.5914753", "text": "function mp_str_to_slug( string $string)\n\t{\n\t\treturn strtolower( trim( preg_replace( '/[^A-Za-z0-9-]+/', '-', $string ) ) );\n\t}", "title": "" } ]
f6bd7a8bfb53b814a8bffe555ff9fe9d
Method to invalidate the instance pool of all tables related to AmendmentSubmissionQC_Search by a foreign key with ON DELETE CASCADE
[ { "docid": "75608021b2104c8e4d358cc24724cc64", "score": "0.5697846", "text": "public static function clearRelatedInstancePool()\n\t{\n\t}", "title": "" } ]
[ { "docid": "534a63d09eafd7f7f4df0f704649a2e0", "score": "0.62795246", "text": "public function forceRelease()\n {\n $this->connection->table($this->table)\n ->where('key', $this->name)\n ->delete();\n }", "title": "" }, { "docid": "a2baa08d5e6600d99c18d9b2ee4f9550", "score": "0.62270826", "text": "public static function clearRelatedInstancePool()\n {\n // Invalidate objects in \".$this->getClassNameFromBuilder($joinedTableTableMapBuilder).\" instance pool,\n // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n EmailManagerTraceTableMap::clearInstancePool();\n EmailManagerHistoryTableMap::clearInstancePool();\n EmailManagerTraceI18nTableMap::clearInstancePool();\n }", "title": "" }, { "docid": "ca756d54a787ff3be90f625b9e6696e2", "score": "0.61245984", "text": "public function testDoDeleteAllInstancePool()\n {\n $review = ReviewQuery::create()->findOne();\n $book = $review->getBook();\n BookTableMap::doDeleteAll();\n $this->assertNull(BookQuery::create()->findPk($book->getId()), 'doDeleteAll invalidates instance pool');\n $this->assertNull(ReviewQuery::create()->findPk($review->getId()), 'doDeleteAll invalidates instance pool of related tables with ON DELETE CASCADE');\n }", "title": "" }, { "docid": "2a7200622592042a3d6bf5621f4f630c", "score": "0.5954062", "text": "public function deleteAll()\n {\n $this->delete();\n foreach ($this->_model->related as $name => $info) {\n $model = $this->_model->getRelated($name)->getModel();\n $model->cache->delete();\n }\n }", "title": "" }, { "docid": "95ed32c70e404f87ec05ad6e1f511dff", "score": "0.5939571", "text": "public static function clearRelatedInstancePool()\n\t{\n\t\t// Invalidate objects in CustomerPeer instance pool, \n\t\t// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n\t\tCustomerPeer::clearInstancePool();\n\t\t// Invalidate objects in WebsitePeer instance pool, \n\t\t// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n\t\tWebsitePeer::clearInstancePool();\n\t\t// Invalidate objects in WebsiteTemplatePeer instance pool, \n\t\t// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n\t\tWebsiteTemplatePeer::clearInstancePool();\n\t\t// Invalidate objects in MemberFeedbackPeer instance pool, \n\t\t// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n\t\tMemberFeedbackPeer::clearInstancePool();\n\t}", "title": "" }, { "docid": "cf066819b025d093ef48179254c29a16", "score": "0.591185", "text": "public static function clearRelatedInstancePool()\n {\n // Invalidate objects in related instance pools,\n // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n QuoteItemTableMap::clearInstancePool();\n }", "title": "" }, { "docid": "56dca81581909dfaca07a54c032b6933", "score": "0.5888563", "text": "function cleanDBonPurge() {\n Rule::cleanForItemAction($this, '%entities_id');\n Rule::cleanForItemCriteria($this);\n\n $this->deleteChildrenAndRelationsFromDb(\n [\n Entity_KnowbaseItem::class,\n Entity_Reminder::class,\n Entity_RSSFeed::class,\n ]\n );\n }", "title": "" }, { "docid": "f393cc9c2415d3be7c81ca4807a07016", "score": "0.5874184", "text": "public function __destruct()\n {\n $this->database->statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "title": "" }, { "docid": "3bd1d99814fb54423d97f543a07dde25", "score": "0.5867213", "text": "public function cleanRefTables()\n {\n $entityClass = $this->getEntityClass();\n foreach ($entityClass::getRelations() as $relation => $info) {\n if (!isset($info[3]) || $info[3] === true) {\n continue;\n }\n $stmt = $this->getDB()->prepare('SELECT a_b.'.$info[1].' rel1, a_b.'.$info[2].' rel2 FROM '.$info[3].' a_b LEFT JOIN '.$entityClass::getTableName().' a ON a_b.'.$info[1].' = a.'.$entityClass::getIdentifier().' WHERE a.'.$entityClass::getIdentifier().' IS NULL')->execute();\n $refTableIds = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $where = array();\n $values = array();\n foreach ($refTableIds as $row) {\n $where[] = '('.$info[1].' = ? AND '.$info[2].' = ?)';\n $values[] = $row['rel1'];\n $values[] = $row['rel2'];\n }\n $deleteStmt = $this->getDB()->prepare('DELETE FROM '.$info[3].' WHERE '.implode(' OR ', $where))->execute($values);\n }\n }", "title": "" }, { "docid": "27e0b5c565b6ec796400e98d27b6c1e9", "score": "0.58525705", "text": "public static function clearRelatedInstancePool()\n\t{\n\t\t// Invalidate objects in CheddarGetterNotificationPeer instance pool, \n\t\t// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n\t\tCheddarGetterNotificationPeer::clearInstancePool();\n\t\t// Invalidate objects in DomainPeer instance pool, \n\t\t// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n\t\tDomainPeer::clearInstancePool();\n\t\t// Invalidate objects in CouponUsagePeer instance pool, \n\t\t// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n\t\tCouponUsagePeer::clearInstancePool();\n\t\t// Invalidate objects in EmailAccountPeer instance pool, \n\t\t// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n\t\tEmailAccountPeer::clearInstancePool();\n\t\t// Invalidate objects in PagePeer instance pool, \n\t\t// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n\t\tPagePeer::clearInstancePool();\n\t\t// Invalidate objects in ClientMessagePeer instance pool, \n\t\t// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n\t\tClientMessagePeer::clearInstancePool();\n\t\t// Invalidate objects in TemplateCustomizationPeer instance pool, \n\t\t// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n\t\tTemplateCustomizationPeer::clearInstancePool();\n\t}", "title": "" }, { "docid": "b4a1196bcf718d04b71146533f16dd74", "score": "0.58369255", "text": "public static function clearRelatedInstancePool()\n {\n }", "title": "" }, { "docid": "b4a1196bcf718d04b71146533f16dd74", "score": "0.58369255", "text": "public static function clearRelatedInstancePool()\n {\n }", "title": "" }, { "docid": "b4a1196bcf718d04b71146533f16dd74", "score": "0.58369255", "text": "public static function clearRelatedInstancePool()\n {\n }", "title": "" }, { "docid": "b4a1196bcf718d04b71146533f16dd74", "score": "0.58369255", "text": "public static function clearRelatedInstancePool()\n {\n }", "title": "" }, { "docid": "b4a1196bcf718d04b71146533f16dd74", "score": "0.58369255", "text": "public static function clearRelatedInstancePool()\n {\n }", "title": "" }, { "docid": "c051955c79525e6cfc7bc288fac84c0f", "score": "0.57493204", "text": "protected function clean()\n {\n $categories = array_keys(Doctrine_Query::create()\n ->select('c.id')\n ->from('category c INDEXBY c.id')\n ->whereIn('c.unique_name', array('partenaires', 'thematiques', 'main-menu', 'association'))\n ->fetchArray());\n\n Doctrine_Query::create()\n ->delete('lien l')\n ->whereIn('l.category_id', $categories)\n ->execute();\n\n Doctrine_Query::create()\n ->delete('category c')\n ->whereIn('c.unique_name', array('partenaires', 'thematiques'))\n ->execute();\n }", "title": "" }, { "docid": "0ca593fd577776cf63b516806f32184f", "score": "0.5749068", "text": "public function cleanup(){\n\n $model = $this->_p->Model('AccessKey');\n\n $this->_p->db->query($this->_p->db->getQueryBuilder($model->getModelStorage())->compileDelete($model, array('where' => array('expired' => array('op' => '<', 'value' => $this->_p->getTime())))), $model->getModelStorage());\n\n }", "title": "" }, { "docid": "5ce8b6413a2c4d05c896a5ef686ddcfd", "score": "0.57426643", "text": "protected function gc() {\n\t\t$this->getDbConnection()->createCommand('DELETE FROM '.$this->tableName.' WHERE expire>0 AND expire<'.time())->execute();\n\t}", "title": "" }, { "docid": "e45748f8530585364489d8d657364c48", "score": "0.5737434", "text": "public function purge(){\n\n $escenarios=$this->escenarios;\n $this->precondiciones()->detach();\n $this->aserciones()->detach(); \n \n foreach ($escenarios as $key => $escenario) {\n $escenario->purge();\n }\n\n $this->delete();\n }", "title": "" }, { "docid": "1e0292298d1bcf4553342464d3f7eabf", "score": "0.56309295", "text": "public function delete_qualification()\n {\n \n }", "title": "" }, { "docid": "c41cebcce005ee0e233d1915e2cd788f", "score": "0.55734247", "text": "public function delete() {\n foreach ($this->getTaxaImageColl()->getItems() as $image) {\n $image->delete();\n }\n $this->deleteAllTaxaAttributes();\n foreach ($this->getAddDicoColl()->getItems() as $addDico) {\n $addDico->delete();\n }\n $this->db->query('DELETE FROM `taxa_region` \n WHERE `taxa_id`=' . intval($this->data['id'])\n , \\Zend\\Db\\Adapter\\Adapter::QUERY_MODE_EXECUTE);\n $this->db->query('UPDATE `dico_item` SET `taxa_id`=NULL \n WHERE `taxa_id`=' . intval($this->data['id'])\n , \\Zend\\Db\\Adapter\\Adapter::QUERY_MODE_EXECUTE);\n $this->deleteSearch();\n parent::delete();\n \n }", "title": "" }, { "docid": "2bac07e4dd073eccd3804efb8608d855", "score": "0.5556675", "text": "public static function clearRelatedInstancePool()\n {\n // Invalidate objects in related instance pools,\n // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n AdminUserTableMap::clearInstancePool();\n ApplicationTableMap::clearInstancePool();\n }", "title": "" }, { "docid": "6f96d655e7d179fdd036de3e0f8b6949", "score": "0.5555759", "text": "public function delete_all() {\n $this->db->prepare(\"TRUNCATE cayl_cache\")->execute();\n $this->db->prepare(\"TRUNCATE cayl_check\")->execute();\n }", "title": "" }, { "docid": "264a3ae7d6dc1a27a9786799cd1a569f", "score": "0.5511981", "text": "public function dispose()\n {\n // Drop subjects\n $subjects = Forum::find('all', ['conditions' => ['forum_id = ?', $this->id]]);\n foreach ( $subjects as $sbj ) {\n $sbj->delete();\n }\n\n // Drop themes\n $themes = ForumTheme::find('all', ['conditions' => ['forum_id = ?', $this->id]]);\n foreach ( $themes as $thm ) {\n $thm->delete();\n }\n }", "title": "" }, { "docid": "50dfff1f1954c3009266691369ea28e0", "score": "0.5511425", "text": "public function purge() {\r\n\r\n $this->where('created_at <', date('Y-m-d H:i:s', time() - $this->expiration_time))->delete_many_by();\r\n }", "title": "" }, { "docid": "d3815ee131f9dfff4e2b5327d4127dc9", "score": "0.55095327", "text": "public function delete() {\n\t\t$result = rex_sql::factory();\n\t\t$result->setQuery(\"DELETE FROM \". \\rex::getTablePrefix() .\"375_group WHERE id = \". $$this->id);\n }", "title": "" }, { "docid": "7d067276992568361e1e5bde18c4be4c", "score": "0.5496896", "text": "public function delete_qualification()\n {\n $this->delete_qual_main();\n }", "title": "" }, { "docid": "325c9b45a992e4fb3fba4eaede80175b", "score": "0.54731727", "text": "protected function _delete()\n { \n $id = (int) $this->id;\n \n //Check if there is a user account associated with this\n \n if ($user = $this->user_id) {\n $user->delete();\n }\n \n $db = get_db();\n \n //Remove all taggings associated with this entity\n $taggings = $db->getTable('Taggings')->findBy(array('entity' => $id));\n \n foreach ($taggings as $tagging) {\n $tagging->delete();\n }\n \n $update_join = \"\n UPDATE $db->EntitiesRelations \n SET entity_id = NULL \n WHERE entity_id = ?\";\n \n $db->exec($update_join, array($id)); \n }", "title": "" }, { "docid": "46518b674b60e85a459734a3d8bebb23", "score": "0.5465098", "text": "public function down() {\n DB::table('searchengine')->where('name', '=', 'googleDE')->delete();\n DB::table('searchengine')->where('name', '=', 'suchmaschineB')->delete();\n DB::table('searchengine')->where('name', '=', 'suchmaschineC')->delete();\n }", "title": "" }, { "docid": "121b6a44d6f948f94bf605c287aa360f", "score": "0.546296", "text": "public function cleanDatabase()\n {\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Currency::truncate();\n CurrencyRate::truncate();\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "title": "" }, { "docid": "1b5c0b04cc7bf8ca08f4a80605ee8786", "score": "0.54510003", "text": "public static function enableSoftDelete()\n\t{\n\t\tTblAdherentQuery::enableSoftDelete();\n\t\t// some soft_deleted objects may be in the instance pool\n\t\tTblAdherentPeer::clearInstancePool();\n\t}", "title": "" }, { "docid": "cd4d8132678dc3daf2ad6f4fa5efe3c6", "score": "0.544792", "text": "function delete(){\n\t\t\tif(count($this->image_sets)==0) $this->get_images();\n\t\t\tfor($i=0;$i<count($this->image_sets);$i++){\n\t\t\t\t$this->image_sets[$i]->delete();\n\t\t\t}\n\n\t\t\t// DELETE ASSOCIATED DATA\n\t\t\t$associated_tables = array('plant_flowering_season_plants','plant_flower_attribute_plants','plant_garden_style_plants','plant_growth_habit_plants','plant_landscape_use_plants','plant_problem_solution_plants','plant_special_feature_plants','plant_sunset_zones','plant_sun_exposure_plants','plant_type_plants','videos_plants','wish_list_items');\n\n\t\t\tfor($i=0;$i<count($associated_tables);$i++){\n\t\t\t\tmysql_query('DELETE FROM '.$associated_tables[$i].' WHERE plant_id=' . $this->info['id']);\n\t\t\t}\n\n\t\t\t// DELETE RECORD ITSELF\n\t\t\tparent::delete();\n\t\t}", "title": "" }, { "docid": "a834495780b6c2417bb65832284622f0", "score": "0.5439342", "text": "public function __destruct()\n {\n $this->clearDB($this->em);\n }", "title": "" }, { "docid": "9463bc9ba8f8eb6279b6a2a39fb867ea", "score": "0.5437011", "text": "public function delete()\n {\n if ($this->address) {\n UpdateStackDnsRecords::dispatch(\n $this->project, $this->address->public_address\n );\n }\n\n DeleteServerOnProvider::dispatch(\n $this->project, $this->providerServerId()\n );\n\n $this->address()->delete();\n $this->tasks()->delete();\n\n parent::delete();\n }", "title": "" }, { "docid": "f51499868d3ad0486a2c786a99809d15", "score": "0.54147583", "text": "public function __destruct() {\n\t\tunset($this->cacheByKey, $this->map, $this->uidsOfMemoryOnlyDummyModels);\n\t}", "title": "" }, { "docid": "0ae495fb912ca56a60bd475814ab0c81", "score": "0.5408015", "text": "public function joinClear() {\r\n self::$joins[$this->getTableName()] = array();\r\n Samus_CRUD::$joins = array();\r\n Samus_CRUD::$joinsWith = array();\r\n }", "title": "" }, { "docid": "7d011b48af10822a799fba952f4b2fd6", "score": "0.53999317", "text": "public function purge()\n {\n $this->absentTypes->each->delete();\n\n $this->publicHolidays->each->delete();\n\n $this->owner()->where('current_location_id', $this->id)\n ->update(['current_location_id' => null]);\n\n $this->users()->where('current_location_id', $this->id)\n ->update(['current_location_id' => null]);\n\n $this->users()->detach();\n\n $this->delete();\n }", "title": "" }, { "docid": "c4e38d15fcfc29196e0ef9e4de565672", "score": "0.5399228", "text": "public function reset() {\n\t\t$sth = database::$dbh -> prepare(\"DELETE team_round FROM team_round JOIN team ON team_round.team_team_id = team.team_id WHERE team.game_id = :game_id;\");\r\n\t\t$sth -> execute(array('game_id' => $this -> get_game_id()));\r\n\t\t$sth = database::$dbh -> prepare(\"DELETE answer FROM answer JOIN question ON answer.question_id = question.question_id JOIN round ON round.round_id = question.round_id WHERE round.game_id = :game_id;\");\r\n\t\t$sth -> execute(array('game_id' => $this -> get_game_id()));\r\n\t\t$sth = database::$dbh -> prepare(\"DELETE person_table FROM person_table JOIN person ON person.person_id = person_table.person_id JOIN game ON person.game_id = game.game_id WHERE game.game_id = :game_id;\");\r\n\t\t$sth -> execute(array('game_id' => $this -> get_game_id()));\r\n\t}", "title": "" }, { "docid": "c435a625942f7ec98886be654d7bc39a", "score": "0.53965604", "text": "public function safeDown() {\n\t\t$this->execute('DROP INDEX public.queue_delayed_unique_insert_index CASCADE');\n\t\t$this->execute('DROP FUNCTION public.crc32(TEXT)');\n\t}", "title": "" }, { "docid": "35a718c1fbc511e1d88109a76f9554b9", "score": "0.5381688", "text": "public function testAcquisitionAssignmentsUndelete()\n {\n }", "title": "" }, { "docid": "5ecf52d13140408e9f26cf18cdd413df", "score": "0.5361387", "text": "public function DeleteCheckingAccountLookup() {\n\t\t\t$this->objCheckingAccountLookup->UnassociateAllPeople();\n\t\t\t$this->objCheckingAccountLookup->Delete();\n\t\t}", "title": "" }, { "docid": "4ea03f8068e72c19ecaa786a5d9c1abc", "score": "0.53559554", "text": "public function deleteEloquaSubmittedData();", "title": "" }, { "docid": "6728e05338c127388fcd11c8bbc869b5", "score": "0.5337696", "text": "function clearCommision()\n {\n $this->cache->select($this->dbindex_commision);\n $this->cache->flushDB();\n }", "title": "" }, { "docid": "c132e31c489af883c5b4925794d17d5c", "score": "0.53372335", "text": "private function cleanDatabase()\n {\n // sets foreign key checks to zero\n // TODO: needs to removed before going live\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n foreach ($this->tables as $table)\n {\n DB::table($table)->truncate();\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "title": "" }, { "docid": "9b5278078d2a99796aa67edb2bdd872d", "score": "0.5326922", "text": "public static function clearRelatedInstancePool()\n {\n // Invalidate objects in ActionPropertyTimePeer instance pool,\n // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n ActionPropertyTimePeer::clearInstancePool();\n }", "title": "" }, { "docid": "a6ef49dbd29fb35a69ca00ae946b0d34", "score": "0.5318907", "text": "public function truncate()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Group::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "20163fedc1cfef49c51d094901c8e93c", "score": "0.5310819", "text": "private function dropForeignKeys() : void\n {\n $this->foreignKeyStore = [];\n $tables = $this->schemaManager->listTables();\n foreach ($tables as $table){\n foreach ($table->getForeignKeys() as $fk){\n $this->foreignKeyStore[$table->getName()][] = $fk;\n $this->schemaManager->dropForeignKey($fk, $table);\n }\n }\n }", "title": "" }, { "docid": "bebf38a625fc3b850e24fdc6f3259709", "score": "0.53094006", "text": "public function free()\n {\n // Free the collected IDs.\n $toFree = $this->getIdsToFree();\n foreach ($toFree as $id) {\n if (isset(self::$cache[ $id ])) {\n $this->freeInstance($id);\n }\n }\n }", "title": "" }, { "docid": "7ea9be5753ef6c75971cd69f5b09dc3a", "score": "0.52978754", "text": "public function delete()\r\r\n {\r\r\n parent::delete();\r\r\n $this->queueInstance->deleteReserved($this->queue, $this->job);\r\r\n }", "title": "" }, { "docid": "c76b4c0b353745b33b1e8ead02e25cd2", "score": "0.52966917", "text": "public static function uninstall()\n {\n $db = XenForo_Application::get('db');\n\n $faqIds = $db->fetchAll('SELECT faq_id FROM kmk_faq_question');\n XenForo_Model::create('XenForo_Model_Alert')->deleteAlerts('kmk_faq_question', $faqIds);\n XenForo_Model::create('XenForo_Model_Like')->deleteContentLikes('kmk_faq_question', $faqIds);\n\n // Unassociate FAQ Attachments\n // An hourly cron runs which will then prune unassociated and unused attachments\n $db->query('UPDATE kmk_attachment set unassociated = 1 WHERE content_type = \\'kmk_faq_question\\'');\n\n // Delete questions and categories\n $db->query('DROP TABLE IF EXISTS `kmk_faq_question`, `kmk_faq_category`;');\n\n // Remove content type\n $db->query(\"DELETE FROM kmk_content_type WHERE content_type IN ('kmk_faq_question');\");\n\n // Remove content type fields\n $db->query(\"DELETE FROM kmk_content_type_field WHERE content_type IN ('kmk_faq_question');\");\n\n // Delete from cache\n XenForo_Application::setSimpleCacheData('faq_categories', false);\n\n // Bye caches!\n XenForo_Model::create('XenForo_Model_DataRegistry')->delete('faqCache');\n XenForo_Model::create('XenForo_Model_DataRegistry')->delete('faqStats');\n XenForo_Model::create('XenForo_Model_ContentType')->rebuildContentTypeCache();\n\n unset($db);\n }", "title": "" }, { "docid": "4fab88f05022e2ebe3091cdd3ee654c7", "score": "0.52953327", "text": "protected function disableForeignKeyConstraints(){\n $this->getRawConnection()->query('SET foreign_key_checks = 0');\n }", "title": "" }, { "docid": "0019c21645ca9dda7dc02e20781609f6", "score": "0.52941173", "text": "function webquest_delete_instance($id) {\r\n/// delete the instance and any data that depends on it.\r\n global $CFG;\r\n\r\n if (! $webquest = get_record(\"webquest\", \"id\", \"$id\")) {\r\n return false;\r\n }\r\n\r\n $result = true;\r\n\r\n if (! delete_records(\"webquest\", \"id\", \"$webquest->id\")) {\r\n $result = false;\r\n }\r\n if (!delete_records(\"webquest_resources\", \"webquestid\", \"$webquest->id\")){\r\n $result = false;\r\n }\r\n if (!delete_records(\"webquest_tasks\", \"webquestid\", \"$webquest->id\")){\r\n $result = false;\r\n }\r\n if (!delete_records(\"webquest_rubrics\", \"webquestid\", \"$webquest->id\")){\r\n $result = false;\r\n }\r\n if (!delete_records(\"webquest_grades\", \"webquestid\", \"$webquest->id\")){\r\n $result = false;\r\n }\r\n if (!delete_records(\"webquest_teams\", \"webquestid\", \"$webquest->id\")){\r\n $result = false;\r\n }\r\n if (!delete_records(\"webquest_team_members\", \"webquestid\", \"$webquest->id\")){\r\n $result = false;\r\n }\r\n if ($submissions = get_records(\"webquest_submissions\", \"webquestid\", \"$webquest->id\")){\r\n foreach ($submissions as $submission){\r\n $dirpath = \"$CFG->dataroot/$webquest->course/$CFG->moddata/webquest/$submission->id\";\r\n fulldelete($dirpath);\r\n }\r\n }\r\n if (!delete_records(\"webquest_submissions\", \"webquestid\", \"$webquest->id\")){\r\n $result = false;\r\n }\r\n return $result;\r\n}", "title": "" }, { "docid": "228e86d38950b4e0abd2afb3e5b65f82", "score": "0.5287979", "text": "protected function performDeleteOnModel()\n {\n $query = $this->newQuery()->where($this->getKeyName(), $this->getKey());\n if ($this->softDelete) {\n $query->update(array(static::DELETED_AT => new DateTime()));\n } else {\n $query->delete();\n }\n }", "title": "" }, { "docid": "8718e3c6a7b883d43dd10f9e25112493", "score": "0.528027", "text": "public function delete(){\n $this->db->delete($this::DB_TABLE, array(\n $this::DB_TABLE_PK => $this->{$this::DB_TABLE_PK},\n ));\n unset($this->{$this::DB_TABLE_PK}); \n }", "title": "" }, { "docid": "353d9710a7bc2fb980db4743cd3df91f", "score": "0.52771103", "text": "protected function delete()\n\t{\n\t\t$this->table->delete();\n\t}", "title": "" }, { "docid": "2a587178e8fb03d6ebd276bfd85eeffe", "score": "0.5272348", "text": "public function purge()\n\t{\n\t\t$db = $this->getDbo();\n\n\t\t// Truncate the links table.\n\t\t$db->truncateTable('#__finder_links');\n\n\t\t// Truncate the links terms tables.\n\t\tfor ($i = 0; $i <= 15; $i++)\n\t\t{\n\t\t\t// Get the mapping table suffix.\n\t\t\t$suffix = dechex($i);\n\n\t\t\t$db->truncateTable('#__finder_links_terms' . $suffix);\n\t\t}\n\n\t\t// Truncate the terms table.\n\t\t$db->truncateTable('#__finder_terms');\n\n\t\t// Truncate the taxonomy map table.\n\t\t$db->truncateTable('#__finder_taxonomy_map');\n\n\t\t// Delete all the taxonomy nodes except the root.\n\t\t$query = $db->getQuery(true)\n\t\t\t->delete($db->quoteName('#__finder_taxonomy'))\n\t\t\t->where($db->quoteName('id') . ' > 1');\n\t\t$db->setQuery($query);\n\t\t$db->execute();\n\n\t\t// Truncate the tokens tables.\n\t\t$db->truncateTable('#__finder_tokens');\n\n\t\t// Truncate the tokens aggregate table.\n\t\t$db->truncateTable('#__finder_tokens_aggregate');\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "cd44365b49d285f3b808a7e25b3545af", "score": "0.52662545", "text": "function forceDelete() {\n try {\n DB::beginWork('Removing object from database @ ' . __CLASS__);\n \n // Object context\n if($this instanceof IObjectContext) {\n ApplicationObjects::forgetContexts($this);\n } // if\n \n // Favorites\n if($this instanceof ICanBeFavorite) {\n Favorites::deleteByParent($this);\n } // if\n \n // Attachments\n if($this instanceof IAttachments) {\n Attachments::deleteByParent($this, false);\n } // if\n \n // Comments\n if($this instanceof IComments) {\n Comments::deleteByParent($this, false);\n } // if\n \n // Subtasks\n if($this instanceof ISubtasks) {\n Subtasks::deleteByParent($this, false);\n } // if\n \n // Activity logs\n if($this instanceof IActivityLogs) {\n ActivityLogs::deleteByParent($this, false);\n } // if\n \n // Subscriptions\n if($this instanceof ISubscriptions) {\n Subscriptions::deleteByParent($this);\n } // if\n \n // Assignees\n if($this instanceof IAssignees) {\n Assignments::deleteByParent($this);\n } // if\n \n // Reminders\n if($this instanceof IReminders) {\n \tReminders::deleteByParent($this);\n } // if\n \n // History\n if($this instanceof IHistory) {\n ModificationLogs::deleteByParent($this);\n } // if\n \n parent::delete();\n \n DB::commit('Object removed from database @ ' . __CLASS__);\n \n // Search index (done outside of the transaction)\n if($this instanceof ISearchItem) {\n $this->search()->clear();\n } // if\n \n } catch(Exception $e) {\n DB::rollback('Failed to remove object from database @ ' . __CLASS__);\n throw $e;\n } // try\n }", "title": "" }, { "docid": "88a3691cc6f778326fb3e9945a2bc4d1", "score": "0.52660364", "text": "public function __destruct(){\r\n\t\t$this->mysqli->query(\"DROP TABLE itens\");\r\n\t}", "title": "" }, { "docid": "a31af8d8aacc3dc5ba9400f21129e5eb", "score": "0.5266035", "text": "function DeleteAvailable() {\n\n\t\t\t$sql = \"DELETE FROM Listing_Choice\";\n\t\t\t$sql .= \" WHERE listing_id = $this->listing_id\";\n\t\t\t$sql .= \" AND editor_choice_id = $this->editor_choice_id\";\n\n\t\t\t$dbMain = db_getDBObject(DEFAULT_DB, true);\n\t\t\tif (defined(\"SELECTED_DOMAIN_ID\")) {\n\t\t\t\t$dbObj = db_getDBObjectByDomainID(SELECTED_DOMAIN_ID, $dbMain);\n\t\t\t} else {\n\t\t\t\t$dbObj = db_getDBObject();\n\t\t\t}\n//\t\t\t$dbMain->close();\n\t\t\tunset($dbMain);\n\t\t\t$dbObj->query($sql);\n\n\t\t}", "title": "" }, { "docid": "545fc43021432149ad9ebd97a65ccfab", "score": "0.5264692", "text": "function clean($conditions)\n {\n $all = $this->getAll($conditions);\n $this->db->delete($this->table_name, $conditions);\n // Delete Foreign Tables\n if($this->foreign_tables != null && is_array($this->foreign_tables) && count($this->foreign_tables)!=0){\n foreach ($this->foreign_tables as $table_name){\n foreach ($all as $item){\n $this->db->delete($table_name, array($this->primary_key=>$item[$this->primary_key]));\n }\n }\n }\n }", "title": "" }, { "docid": "8b51238928d1f29eb65e7011265cea97", "score": "0.526062", "text": "static function DeleteInstancesFor($obj){\n\t\t$dbmole = IobjectLink::GetDbmole();\n\t\t$dbmole->doQuery(\"DELETE FROM iobject_links WHERE linked_table=:table_name AND linked_record_id=:record_id\",array(\n\t\t\t\":table_name\" => $obj->getTableName(),\n\t\t\t\":record_id\" => $obj,\n\t\t));\n\t}", "title": "" }, { "docid": "1eba5a4b55f97220ccf5f43fccb09fe3", "score": "0.5257445", "text": "public function delete()\n {\n if (parent::delete()) {\n // Delete tickets\n foreach ($this->tickets->exec()->fetch_all() as $ticket) {\n $ticket->delete();\n }\n\n // Delete milestones\n foreach ($this->milestones->exec()->fetch_all() as $milestone) {\n $milestone->delete();\n }\n\n // Delete timeline\n foreach (Timeline::select('id')->where('project_id', $this->_data['id'])->exec()->fetch_all() as $timeline) {\n $timeline->delete();\n }\n\n // Delete repositories\n /*foreach ($this->repositories->exec()->fetch_all() as $repo) {\n $repo->delete();\n }*/\n\n // Delete components\n foreach ($this->components->exec()->fetch_all() as $component) {\n $component->delete();\n }\n\n // Delete wiki pages\n foreach ($this->wiki_pages->exec()->fetch_all() as $wiki) {\n $wiki->delete();\n }\n\n // Delete subscriptions\n foreach ($this->subscriptions->exec()->fetch_all() as $sub) {\n $sub->delete();\n }\n\n // Delete roles\n foreach ($this->roles->exec()->fetch_all() as $role) {\n $role->delete();\n }\n\n // Delete members\n foreach ($this->user_roles->exec()->fetch_all() as $member) {\n $member->delete();\n }\n\n // Delete permissions\n foreach ($this->permissions->exec()->fetch_all() as $permission) {\n $permission->delete();\n }\n }\n }", "title": "" }, { "docid": "349cffde8b89711bc50dbf08d62bcadb", "score": "0.5254426", "text": "public function resetQuotas()\n {\n $plan = $this->getPlan();\n\n $this->usage()\n ->get()\n ->each(function (Usage $usage) use ($plan) {\n $feature = $plan->getFeature($usage->feature_id);\n\n if ($feature->isResettable()) {\n $usage->delete();\n }\n });\n }", "title": "" }, { "docid": "9635ff8454f2653a3b1ebe94622a38ee", "score": "0.5253669", "text": "public function deleteSearch() {\n $taxaSearch = $this->getTaxaSearch();\n $taxaSearch->delete();\n }", "title": "" }, { "docid": "ecf475903b0ffbad3ab53cdbb6cbd090", "score": "0.52535105", "text": "function delete() {\n // model. Instead, just drop the association with the form which\n // will give the appearance of deletion. Not deleting means that\n // the field will continue to exist on form entries it may already\n // have answers on, but since it isn't associated with the form, it\n // won't be available for new form submittals.\n $this->set('form_id', 0);\n $this->save();\n }", "title": "" }, { "docid": "f72954a61abb49b14790af1ea62b1879", "score": "0.5247937", "text": "public function clear()\n {\n $query = clone $this->query;\n $query->clear($this->relation->entity())\n ->execute();\n }", "title": "" }, { "docid": "e939913106c7e905057a1d44a3e44cc2", "score": "0.52237797", "text": "public function __destruct() {\n\t\tparent::clear();\n\t\tparent::destroy();\n\t}", "title": "" }, { "docid": "50ba4fa77453a799e31a8997902863d1", "score": "0.52032745", "text": "public function __destruct()\n\t{\n\t\tunset($this->sql);\n\t}", "title": "" }, { "docid": "f22ca944055313fd868b3555500abb01", "score": "0.5201899", "text": "public function processDelete() {\r\n\t\t$this->model->delete($this->table, $this->id);\r\n\t}", "title": "" }, { "docid": "755686979c279ae0835be72bd6f63a8d", "score": "0.5197861", "text": "public function delete_all_sync_requests() {\n\t\t$stmt = $this->database->prepare(\"DELETE FROM sync_request WHERE server_id = ?\");\n\t\t$stmt->bind_param('d', $this->id);\n\t\t$stmt->execute();\n\t}", "title": "" }, { "docid": "754d1b49c0a26be486adc3f92ee39be9", "score": "0.5186245", "text": "public function delete()\n {\n $this->submissions()->each->delete();\n\n FormModel::where('handle', $this->handle())->delete();\n\n FormDeleted::dispatch($this);\n }", "title": "" }, { "docid": "386258887209b7664c74c2ed9b383d35", "score": "0.5183906", "text": "private function cleanUp()\n\t{\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\t\tDB::table('locales')->truncate();\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1');\n\t}", "title": "" }, { "docid": "dc73ad3be40276cd071079f6fbe3e38c", "score": "0.5180176", "text": "public function delete(){\n $tid = $this->id;\n\n // delete view counter\n Counter::where(\"[entityId] = ? AND [entityTypeId] = ?\",[$tid,Topic::ENTITY_TYPE])->delete();\n Rating::where(\"[entityId] = ? AND [entityType] = ?\",[$tid,Topic::ENTITY_TYPE])->delete();\n RatingStatistic::where(\"[entityId] = ? AND [entityType] = ?\",[$tid,Topic::ENTITY_TYPE])->delete();\n Comment::where(\"[topicId] = ?\", $tid)->delete();\n\n parent::delete();\n }", "title": "" }, { "docid": "c3e6c08238167a638487fb7d577b606f", "score": "0.5178302", "text": "public function delete()\n {\n $this->db->delete(\"recyclebin\", $this->db->quoteInto(\"id = ?\", $this->model->getId()));\n }", "title": "" }, { "docid": "8ee36506d5e290090a9e133c4074ee4f", "score": "0.5177004", "text": "public function delete() {\n parent::delete();\n }", "title": "" }, { "docid": "79d08d45012fafb995f74efee155b4b9", "score": "0.517518", "text": "protected function deleteHasManyRelations(){\n\t\tSendsms::model()->deleteAllByAttributes(array('campaign_id' => $this->id));\n//\t\tSentsms::model()->deleteAllByAttributes(array('cid' => $this->id));\n\t\tCpworktime::model()->deleteAllByAttributes(array('cid' => $this->id));\n\t\tCpfilter::model()->deleteAllByAttributes(array( 'cid' => $this->id));\n//\t\tCporder::model()->deleteAllByAttributes(array( 'cid' => $this->id));\n\t}", "title": "" }, { "docid": "0bce96b9ff2c288ba8393e1f38ffae0c", "score": "0.51711327", "text": "public static function cleanDatabase()\n {\n // Remove any record from a model table that does not have\n // a corresponding record in the dmodel table.\n $abstractModels = DClassQuery::load()\n ->setAncestor(DModel::class)\n ->setFilter(DClassQuery::FILTER_ABSTRACT)\n ->getClassNames();\n $abstractModels[] = self::class;\n foreach ($abstractModels as $qualifiedName) {\n try {\n new DQuery('app\\\\decibel\\\\model\\\\DModel-cleanMissingModels', array(\n 'qualifiedName' => $qualifiedName,\n 'table' => DDatabaseMapper::getTableNameFor($qualifiedName),\n ));\n } catch (DQueryExecutionException $e) {\n }\n }\n // Call cleaning functionality in available field database mappers.\n $mappers = DClassQuery::load()\n ->setAncestor('app\\\\decibel\\\\model\\\\field\\\\DFieldDatabaseMapper')\n ->getClassNames();\n foreach ($mappers as $mapper) {\n $mapper::cleanDatabase();\n }\n }", "title": "" }, { "docid": "55da4c0a1c1058717a4aae1574fa1feb", "score": "0.5170635", "text": "public function __destruct(){\n // Empty the database cache\n $this->CACHE = array();\n // Clear any current links\n $this->clear();\n // Close the database connection\n $this->db_close();\n }", "title": "" }, { "docid": "60c04de65f5160a1c865e13ede50ed38", "score": "0.51691484", "text": "public function delete()\r\n\t{\r\n\t\t$sql = 'DELETE FROM '.static::$_table.' WHERE id=\"'.$this->_obj_id.'\"';\r\n\t\tself::db()->delete($sql);\r\n\t}", "title": "" }, { "docid": "da01a1a9eca6b46dc2b6cc639047fc59", "score": "0.51661706", "text": "public function delete_dead_relations()\n {\n $l_dead_rel_objects = $l_delete_relation = $l_delete_dead_relations = $l_tables = [];\n\n $l_check_sql = 'SELECT isys_catg_relation_list__id, isys_catg_relation_list__isys_obj__id, slave.isys_obj__id AS slaveID, master.isys_obj__id AS masterID\n\t\t\tFROM isys_catg_relation_list\n \tINNER JOIN isys_relation_type ON isys_relation_type__id = isys_catg_relation_list__isys_relation_type__id\n \tLEFT JOIN isys_obj AS master ON master.isys_obj__id = isys_catg_relation_list__isys_obj__id__master\n \tLEFT JOIN isys_obj AS slave ON slave.isys_obj__id = isys_catg_relation_list__isys_obj__id__slave\n \tWHERE isys_relation_type__type != ' . C__RELATION__EXPLICIT . ' AND isys_relation_type__id != ' . C__RELATION_TYPE__DATABASE_INSTANCE . ';';\n $l_res = $this->retrieve($l_check_sql);\n // Collect all relations from table \"isys_catg_relation_list\" which has no slave or master\n while ($l_row = $l_res->get_row())\n {\n if (empty($l_row['masterID']) || empty($l_row['slaveID']))\n {\n $l_delete_dead_relations[$l_row['isys_catg_relation_list__id']] = $l_row['isys_catg_relation_list__isys_obj__id'];\n } // if\n } // while\n\n $l_check_sql = 'SELECT isys_obj__id\n\t\t\tFROM isys_obj\n\t\t\tLEFT JOIN isys_catg_relation_list ON isys_catg_relation_list__isys_obj__id = isys_obj__id\n\t\t\tWHERE isys_obj__isys_obj_type__id = ' . $this->convert_sql_id(C__OBJTYPE__RELATION) . '\n\t\t\tAND isys_catg_relation_list__id IS NULL';\n\n $l_res = $this->retrieve($l_check_sql);\n // Collect all relation objects which have no entry in table \"isys_catg_relation_list\"\n while ($l_row = $l_res->get_row())\n {\n $l_dead_rel_objects[] = $l_row['isys_obj__id'];\n } // while\n\n $l_amount_dead_relations = count($l_delete_dead_relations);\n // Delete relation object. If it fails add the relation id to the array which deletes only the relation entry\n if ($l_amount_dead_relations)\n {\n foreach ($l_delete_dead_relations AS $l_rel_id => $l_rel_obj_id)\n {\n $this->delete_object_and_relations($l_rel_obj_id);\n if ($this->affected_after_update() == 0)\n {\n // Object does not exist for whatever reasons\n // delete relation entry instead\n if (is_numeric($l_rel_id))\n {\n $l_delete_relation[] = $l_rel_id;\n $l_amount_dead_relations--;\n } // if\n } // if\n } // foreach\n } // if\n\n // Delete relation objects which have no entry in isys_catg_relation_list\n if (count($l_dead_rel_objects))\n {\n foreach ($l_dead_rel_objects AS $l_dead_object)\n {\n $this->delete_object_and_relations($l_dead_object);\n } // foreach\n $l_amount_dead_relations += count($l_dead_rel_objects);\n } // if\n\n // Delete relation entries which have no relation object\n $l_relations_with_no_object = count($l_delete_relation);\n if ($l_relations_with_no_object)\n {\n $l_delete = 'DELETE FROM isys_catg_relation_list WHERE isys_catg_relation_list__id IN (' . implode(',', $l_delete_relation) . ')';\n $this->update($l_delete);\n } // if\n\n $this->apply_update();\n\n return [\n self::C__DEAD_RELATION_OBJECTS => $l_amount_dead_relations,\n self::C__DEAD_RELATION_CATEGORY_ENTRIES => $l_relations_with_no_object,\n ];\n }", "title": "" }, { "docid": "b4b12ff401448f6c3daf70c18a7d4933", "score": "0.5164949", "text": "public static function cleanup()\n {\n $db = getMySQL();\n $db->query(\"DELETE FROM \".JOBD_TABLE.\" WHERE status='done' AND result='ok' AND time_finished < ?\",\n time() - 86400);\n }", "title": "" }, { "docid": "e4fa031d3376515ba64dc883101ebe8f", "score": "0.5163824", "text": "public function __destruct() {\n\t\t$this->DAO_Factory->clearDBResources ();\n\t}", "title": "" }, { "docid": "eb5bf5b9d772eae7a7eedf4268b7dd5c", "score": "0.5163724", "text": "function deleteRelatedLists() {\n\t\tglobal $adb;\n\t\t$adb->pquery(\"DELETE FROM vtiger_relatedlists WHERE tabid=?\", Array($this->id));\n\t\tself::log(\"Deleting related lists ... DONE\");\n\t}", "title": "" }, { "docid": "6cb2a57e6888db66deaaed5dd9ec66a5", "score": "0.515849", "text": "function __destruct() {\n foreach(self::$tournaments as $tournament) {\n if($tournament instanceof BBTournament) {\n $tournament->delete();\n }\n }\n }", "title": "" }, { "docid": "aabaa772cf9b35a8f3677147f4a4eaa3", "score": "0.51556456", "text": "protected abstract function delete();", "title": "" }, { "docid": "8958a88f368fce28fdb7b273259b4e4b", "score": "0.5150236", "text": "public function __destruct()\n {\n if (!$this->adapter->isScope(PdfLibAdapter::SCOPE_OBJECT)) {\n $this->adapter->deleteTable($this);\n }\n }", "title": "" }, { "docid": "ee27ac2d6d3bf8841e0c04d8ff7d25ba", "score": "0.5147387", "text": "public static function clearInstancePool($and_clear_all_references = false)\n {\n if ($and_clear_all_references) {\n foreach (GsHandelsproductenPeer::$instances as $instance) {\n $instance->clearAllReferences(true);\n }\n }\n GsHandelsproductenPeer::$instances = array();\n }", "title": "" }, { "docid": "e2616d1fad39996b1847f9ef13997bd7", "score": "0.5145243", "text": "public function __destruct() {\n \n $this->dbInstance = null;\n }", "title": "" }, { "docid": "3c0429832dd0563d07d0c1c74a1106b6", "score": "0.51399267", "text": "function _collapse(){\n foreach ($this->_branches as $key=>$value) {\n # $this->_branches[$key]->destroy();\n unset($this->_branches[$key]);\n }\n\n }", "title": "" }, { "docid": "0d310d994b957d3b2d1df99de766129f", "score": "0.5137616", "text": "public function destroy($id) {\n // Todo: delete centres safly considering the assignements made\n }", "title": "" }, { "docid": "15b9da37fcd3e2bb552c192cd9403269", "score": "0.5137376", "text": "public function delete(){\n\t\t $db = Loader::db();\n\t\t\t$db->Execute(\"DELETE FROM {$this->tableName} WHERE id = ?\", array($this->id));\n $db->Execute(\"DELETE FROM ClinicaPersonnelLocations WHERE personnelID = ?\", array($this->id));\n\t\t}", "title": "" }, { "docid": "48ea5d8cd9772f1922e8b620816da3bb", "score": "0.5133723", "text": "public function discard()\n {\n if ($this->isNew()) {\n $app = Facade::getFacadeApplication();\n $db = $app->make('database')->connection();\n // check for related version edits. This only gets applied when we edit global areas.\n $r = $db->executeQuery('select cRelationID, cvRelationID from CollectionVersionRelatedEdits where cID = ? and cvID = ?', array(\n $this->cID,\n $this->cvID,\n ));\n while ($row = $r->fetch()) {\n $cn = Page::getByID($row['cRelationID'], $row['cvRelationID']);\n $cnp = new Permissions($cn);\n if ($cnp->canApprovePageVersions()) {\n $v = $cn->getVersionObject();\n $v->delete();\n $db->executeQuery('delete from CollectionVersionRelatedEdits where cID = ? and cvID = ? and cRelationID = ? and cvRelationID = ?', array(\n $this->cID,\n $this->cvID,\n $row['cRelationID'],\n $row['cvRelationID'],\n ));\n }\n }\n $this->delete();\n }\n $this->refreshCache();\n }", "title": "" }, { "docid": "9ea78b987e463ef29803827f30131beb", "score": "0.5113765", "text": "public function __destruct() {\n\t\tparent::__destruct();\n\t\tif($this->auto_delete) {\n\t\t\t$this->unlink();\n\t\t}\n\t}", "title": "" }, { "docid": "5d940c37d6df2da53cf28b9878adbf9c", "score": "0.5113639", "text": "public function safeDown()\n {\n $this->dropTable($this->relatedTableName);\n $this->dropTable($this->tableName);\n }", "title": "" }, { "docid": "e4609d90d023dd95350b8396b048ed36", "score": "0.5109325", "text": "private function garbageCollect() {\n\t\t$db = $this->loadBalancer->getConnection( DB_PRIMARY );\n\t\t$hourAgo = ( new DateTime() )->sub( new DateInterval( \"PT{$this->garbageInterval}M\" ) );\n\t\t$db->delete(\n\t\t\t'processes',\n\t\t\t[\n\t\t\t\t'p_started < ' . $db->timestamp( $hourAgo->format( 'YmdHis' ) ),\n\t\t\t\t// Status is not PROCESS_INTERRUPTED\n\t\t\t\t'p_state != ' . $db->addQuotes( InterruptingProcessStep::STATUS_INTERRUPTED ),\n\t\t\t],\n\t\t\t__METHOD__\n\t\t);\n\t}", "title": "" }, { "docid": "95d950d4009e171ab02c54bfec100ee3", "score": "0.5108789", "text": "public function safeDown()\n {\n $this->delete($this->tableName, 'code = :code', [':code' => 'ua']);\n }", "title": "" }, { "docid": "04827c1a5efa8736278204b3ff6e1c7d", "score": "0.51007783", "text": "protected function clearAcars()\n {\n if(config('database.default') === 'mysql') {\n DB::statement('SET foreign_key_checks=0');\n }\n\n Acars::truncate();\n Pirep::truncate();\n\n if (config('database.default') === 'mysql') {\n DB::statement('SET foreign_key_checks=1');\n }\n\n $this->info('ACARS and PIREPs cleared!');\n }", "title": "" } ]
f787623a9fdde4e6edbd803e854c740e
used on news.search page
[ { "docid": "60a3ef27456235d1ad61bd793c9a1a79", "score": "0.0", "text": "public function getAll(){\n $query = $this->query()\n ->orderBy('id', 'desc')\n ->paginate(4);\n return $query;\n }", "title": "" } ]
[ { "docid": "f7dcc0ac05ba20ffe2335d6afd7be4a0", "score": "0.71641546", "text": "public function searchNewsAction() {\n\n\t}", "title": "" }, { "docid": "91d3072682e00c0b70703006474fe0d2", "score": "0.67507493", "text": "public function news() {\n $keyword = $_REQUEST['keyword'];\n $articles = $this->getArticles($keyword);\n $this->set('articles', $articles);\n }", "title": "" }, { "docid": "892112a353239613b34001cb72118c06", "score": "0.63039887", "text": "function search() {\n\t\t\n\n\t\t// breadcrumb urls\n\t\t$this->data['action_title'] = get_msg( 'collect_search' );\n\t\t\n\t\t// condition with search term\n\t\t$conds = array( 'searchterm' => $this->searchterm_handler( $this->input->post( 'searchterm' )) );\n\t\t// no publish filter\n\t\t$conds['no_publish_filter'] = 1;\n\n\t\t// pagination\n\t\t$this->data['rows_count'] = $this->Collection->count_all_by( $conds );\n\n\t\t// search data\n\t\t$this->data['collections'] = $this->Collection->get_all_by( $conds, $this->pag['per_page'], $this->uri->segment( 4 ) );\n\t\t\n\t\t// load add list\n\t\tparent::search();\n\t}", "title": "" }, { "docid": "5e7edc67336739c52f43380e6bf660d3", "score": "0.6287286", "text": "function admin_search()\n\t{\n\t}", "title": "" }, { "docid": "d902057ac388fb4aabe4f5e43f876ffb", "score": "0.6247218", "text": "function getNews($page, $page_size) { \r\n $Model = new Model();\r\n return $Model->table('wp_posts')->join('wp_term_relationships ON wp_posts.ID = wp_term_relationships.object_id')\r\n ->where(array('wp_posts.post_type' => 'post','wp_posts.post_status'=>'publish'))\r\n ->where(\"wp_term_relationships.term_taxonomy_id = 1\")\r\n ->page($page, $page_size)\r\n ->order('post_date DESC') \r\n ->select(); \r\n /* $Model = new Model();\r\n return $Model->query(\"SELECT * from wp_posts wp where wp.post_type = 'post' \r\n and wp.post_status = 'publish' \r\n join wp_term_relationships wtr where wp.ID = wtr.object_id and wtr.term_taxonomy_id = 1 \")->page($page, $page_size)\r\n ->order('post_date DESC') ; */\r\n }", "title": "" }, { "docid": "a5bd5d12b297835f7f9a0a3e88aa3326", "score": "0.62454784", "text": "public function search()\n\t{\n\t}", "title": "" }, { "docid": "9e811fedc7bc4030f3e27fce941466fa", "score": "0.62447727", "text": "function get_news($new_id = 0,$start = 0,$limit = 1,$new_type = 0 , $order = \"\", $keywords = \"\" ,$new_sub_type = false){\n\t$sql = \"SELECT\n\t *\n\t FROM\n\t news\n\t INNER JOIN news_visit ON new_id = nev_id\n\t WHERE new_active = 1 \";\n\tif($new_id != 0){\n\t \t$sql .= \"AND new_id =\".$new_id.\" \";\n\t}\n\telse{\n\t\t$sql\t.=\t\" AND new_type = \".$new_type;\n\t}\n\t/*\n\tif($hot != 0){\n\t $sql .= \"AND new_is_hot = 1 \";\n\t}*/\n\tif($new_sub_type !== false){\n\t\t$sql\t.=\t\" AND new_sub_type = \".intval($new_sub_type);\n\t}\n\tif($keywords != \"\"){\n\t$sql .= \" AND (\n\t match(new_title,new_brief,new_description) against('\".$keywords.\"')\n\t OR new_title LIKE '%\" .$keywords. \"%'\n\t OR new_brief LIKE '%\" .$keywords. \"%'\n\t ) \";\n\t}\n\n\n\t$sql .= \" ORDER BY \".$order.\" new_is_hot DESC,new_up_time DESC,new_view DESC \";\n\t$sql .= \" LIMIT \".$start.\",\".$limit.\" \";\n\t//echo $sql;\n\t$arr_size\t=\tarray(\n\t\"small\",\"medium\",\"init\"\n\t);\n\t$path_img\t=\t\"/pictures/news/\";\n\t$db_news = new db_query($sql, __FILE__.__LINE__, 'USE_SLAVE');\n\t$result = array();\n\twhile($row = mysql_fetch_assoc($db_news->result)){\n\t foreach($arr_size as $size){\n\t \t\t$row['new_image_url_'.$size]\t=\t$path_img.$size.'_'.$row['new_image_url'];\n\t }\n\t $result[$row['new_id']] = $row;\n\t}\n\tunset($db_news);\n\treturn $result;\n}", "title": "" }, { "docid": "6c16b1f662e845112b57510760b0636b", "score": "0.615103", "text": "public function search()\r\n {\r\n\r\n }", "title": "" }, { "docid": "2dfdfdde37b60dd431434e4665d3b6f1", "score": "0.6129514", "text": "public function search() {\n\n\t}", "title": "" }, { "docid": "b9f0e78e12a71be1fabe9bec7241aa68", "score": "0.611874", "text": "public function url_search()\n {\n $data['body'] = 'admin/url_search';\n $data['page_title'] = 'Crawl URL';\n $this->_viewcontroller($data);\n }", "title": "" }, { "docid": "9570218011bf8c40e5704f26b2aa5230", "score": "0.6014349", "text": "function search() {\n\t\tif (isset($_POST['query']) && !empty($_POST['query'])) {\n\n\t\t\t$query = trim($_POST['query']);\n\n\t\t\t$min_len = 3;\n\n\t\t\tif (mb_strlen($query) < 3) {\n\t\t\t\tMain::Redirect('/admin/forum', 'Слишком короткий поисковый запрос. Поиск должен содержать минимум '.$min_len.' символа.');\n\t\t\t}\n\n\t\t\t// Get topics model\n\t\t\t$model = $this->getModel('topics');\n\t\t\t// Find topics\n\t\t\t$topics = $model->searchItems($query);\n\t\t\t// Get messages model\n\t\t\t$model = $this->getModel('messages');\n\t\t\t// Find topics\n\t\t\t$messages = $model->searchItems($query);\n\n\t\t\t// Set pathway for the page\n\t\t\t$pathway = new Pathway;\t\t\t\t\n\t\t\t$pathway->addItem('Форум', '/admin/forum');\n\t\t\t$pathway->addItem('Поиск', '');\t\t\t\n\n\t\t\t// Set template params\n\t\t\t$tmpl = new Template;\n\n\t\t\t$tmpl->setVar('topics', $topics);\n\t\t\t$tmpl->setVar('messages', $messages);\n\t\t\t$tmpl->setVar('query', $query);\n\t\t\t$tmpl->setVar('query_parts', explode(' ', $query));\n\n\t\t\t$tmpl->display('search');\n\n\t\t} else {\n\n\t\t\tMain::Redirect('/admin/forum');\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "ac3716f62ab2fe6d0bd9e274225901a8", "score": "0.60097086", "text": "function Newsletters() {\n if(!isset($_GET['start']) || !is_numeric($_GET['start']) || (int)$_GET['start'] < 1) $_GET['start'] = 0;\n $SQL_start = (int)$_GET['start'];\n $doSet = DataObject::get(\n $callerClass = \"NewsletterPage\",\n $filter = \"`ParentID` = '\".$this->ID.\"'\",\n $sort = \"NewsletterDate DESC\",\n $join = \"\",\n $limit = \"{$SQL_start},5\"\n );\n \n return $doSet ? $doSet : false;\n }", "title": "" }, { "docid": "f8f628fe9030b3c04783651f5e0eacdc", "score": "0.5967873", "text": "public function search()\n {\n }", "title": "" }, { "docid": "9eb4aed3929d006d555e480010452f00", "score": "0.5962266", "text": "public function searchResultAction($search = NULL) {\n\t\t$pluginArguments = $this->request->getPluginArguments();\n\t\tif (isset($pluginArguments['itemsPerPage'])) {\n\t\t\t$itemsPerPage = (int) $pluginArguments['itemsPerPage'];\n\t\t} else {\n\t\t\t$itemsPerPage = '';\n\t\t}\n\t\t$allNews = $this->newsService->searchResult($search, $pluginArguments);\n\t\t$this->view->assign('itemsPerPage', $itemsPerPage);\n\t\t$this->view->assign('assetsForNews', $this->newsService->assetsForNews($allNews));\n\t\t$this->view->assign('newsSearched', $allNews);\n\t}", "title": "" }, { "docid": "96eb53132d3c7c5e92b90e04c4295a12", "score": "0.5952687", "text": "public function search(){\n $Omdb = Omdb::getFilms($_GET[ \"search\" ]);\n if(property_exists($Omdb, 'Search')){\n $this->renderView( 'list', (object) $Omdb->Search ); \n }else{\n $this->renderView( 'error', $Omdb );\n }\n }", "title": "" }, { "docid": "8094ba6586f377e73561df98967afb0f", "score": "0.59432423", "text": "function wpeddit_retrieveNews(){\n\n\t\t\t\tglobal $tweety_urls;\n include_once(ABSPATH . WPINC . '/feed.php');\n add_filter( 'wp_feed_cache_transient_lifetime' , 'wpeddit_feed_cache' );\n\t\t\t\t$url = 'http://epicplugins.com/feed/';\n $rss = fetch_feed($url);\n remove_filter( 'wp_feed_cache_transient_lifetime' , 'wpeddit_feed_cache' );\n \n if (!is_wp_error( $rss ) ) {\n\t\t\t\t\t\n\t\t\t\t\t$maxitems = $rss->get_item_quantity(5); \n $rss_items = $rss->get_items(0, $maxitems); \n\t\t\t\t\t\n\t\t\t\t} ?>\n \n <ul>\n <?php \n\t\t\t\t\tif ($maxitems == 0) \n\t\t\t\t\t\techo '<li>No News (is this good news?)</li>';\n else \n\t\t\t\t\t\tforeach ( $rss_items as $item ) : ?>\n <li>\n <a href='<?php echo esc_url( $item->get_permalink() ); ?>' target = '_blank'\n title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>'>\n <?php echo $item->get_title() ; ?></a><br/>\n <?php echo $item->get_description() ; ?>\n </li>\n <?php endforeach; ?>\n </ul>\n \n <?php\n\t\n}", "title": "" }, { "docid": "0b561c9152040b4782ffe924aef72cc3", "score": "0.5924328", "text": "function initiate_news ($url,$indexpage = \"\") \n{\n $this->indexpage = $indexpage; \n $find = array (\" \",\"&\"); \n $replace = array (\"+\",\"&\"); \n $url = str_replace($find,$replace,$url); \n $this->url = $url; \n $this->converturl($this->url,$this->segments); \n}", "title": "" }, { "docid": "a476bf61347e681af0fd4c7472c365d7", "score": "0.5912872", "text": "public function search()\n\t{\n\t\t$like = array();\n\t\t$like['title'] = $_GET['q'];\n\n\t\t// Get the parser data for the results\n\t\t$parser_data = $this->get_parser_data();\n\t\t$parser_data['title'] = 'Search Results for ' . $_GET['q'];\n\t\t$parser_data['results'] = $this->entry_model->search($like);\n\t\t$parser_data['total_results'] = count($parser_data['results']);\n\n\t\t// Format the results\n\t\t$this->format_entries($parser_data['results']);\n\n\t\t// Show the results of the search\n\t\t$this->parser->parse('journal/search/results.html', $parser_data);\n\t}", "title": "" }, { "docid": "5b00e06ae6b30599b17dc6657edcf0af", "score": "0.5911428", "text": "function get_search_haystack(){\n\n return $this->author.\" \".$this->booktitle.\" \";\n\n }", "title": "" }, { "docid": "cfaa3465739f64acd39befcd53628fbd", "score": "0.58983225", "text": "function showSearchResult($rows)\n{\n if($rows>0){\n ?><ul><?\n for($i=0; $i<$rows; $i++ )\n {\n $row = $this->db->db_FetchAssoc();\n $link = $this->Link( $row['cat_translit'], $row['translit']);\n ?><li><a href=\"<?=$link;?>\"><?=stripslashes( $row['name']);?></a></li><?\n }\n ?>\n </ul>\n <?} else{\n $FrontendPages = new FrontendPages();\n echo $FrontendPages->Msg->show_text('SEARCH_NO_RES');\n }\n}", "title": "" }, { "docid": "e84b58e20b4b8c193f8cd5bd59929a87", "score": "0.5896486", "text": "function envo_get_news ($envovar, $where, $plname, $order, $datef, $timef, $timeago)\n{\n\n\tif (!empty($envovar)) {\n\t\t$sqlin = 'active = 1 ORDER BY ' . $order . ' ';\n\t} else if (empty($envovar) && is_numeric($where)) {\n\t\t$sqlin = 'id = ' . $where . ' AND active = 1 ORDER BY ' . $order . ' ';\n\t} else if (empty($envovar) && !is_numeric($where)) {\n\t\t$sqlin = 'id IN(' . $where . ') AND active = 1 ORDER BY ' . $order . ' ';\n\t} else {\n\t\t$sqlin = 'active = 1 ORDER BY ' . $order . ' LIMIT 1';\n\t}\n\n\tglobal $envodb;\n\tglobal $setting;\n\t$envodata = array ();\n\t$result = $envodb -> query('SELECT * FROM ' . DB_PREFIX . 'news WHERE ((startdate = 0 OR startdate <= ' . time() . ') AND (enddate = 0 OR enddate >= ' . time() . ')) AND (FIND_IN_SET(' . ENVO_USERGROUPID . ',permission) OR permission = 0) AND ' . $sqlin . $envovar);\n\twhile ($row = $result -> fetch_assoc()) {\n\n\t\t$PAGE_TITLE = $row['title'];\n\t\t$PAGE_CONTENT = $row['content'];\n\n\t\t// Write content in short format with full words\n\t\t$shortmsg = envo_cut_text($PAGE_CONTENT, $setting[\"shortmsg\"], '...', TRUE);\n\n\t\t// Parse url for user link\n\t\t$parseurl = ENVO_rewrite ::envoParseurl($plname, 'news-article', $row['id'], ENVO_base ::envoCleanurl($PAGE_TITLE), '');\n\n\t\t// EN: Insert each record into array\n\t\t// CZ: Vložení získaných dat do pole\n\t\t$envodata[] = array (\n\t\t\t'id' => $row['id'],\n\t\t\t'title' => envo_secure_site($PAGE_TITLE),\n\t\t\t'content' => envo_secure_site($PAGE_CONTENT),\n\t\t\t'showtitle' => $row['showtitle'],\n\t\t\t'showdate' => $row['showdate'],\n\t\t\t'showhits' => $row['showhits'],\n\t\t\t'created' => ENVO_base ::envoTimesince($row['time'], $datef, $timef, $timeago),\n\t\t\t'titleurl' => ENVO_base ::envoCleanurl($row['title']),\n\t\t\t'hits' => $row['hits'],\n\t\t\t'previmg' => $row['previmg'],\n\t\t\t'contentshort' => $shortmsg,\n\t\t\t'parseurl' => $parseurl,\n\t\t\t'date-time' => $row['time']\n\t\t);\n\n\t}\n\n\tif (!empty($envodata)) return $envodata;\n}", "title": "" }, { "docid": "fcb4dd17da4092b96e2151f17f5b6daa", "score": "0.589245", "text": "public function ManageNewsGrid(&$numNews)\n\t\t{\n\t\t\t$page = 0;\n\t\t\t$start = 0;\n\t\t\t$numNews = 0;\n\t\t\t$numPages = 0;\n\t\t\t$GLOBALS['NewsGrid'] = \"\";\n\t\t\t$GLOBALS['Nav'] = \"\";\n\t\t\t$max = 0;\n\t\t\t$searchURL = '';\n\n\t\t\tif (isset($_GET['searchQuery'])) {\n\t\t\t\t$query = $_GET['searchQuery'];\n\t\t\t\t$GLOBALS['Query'] = $query;\n\t\t\t\t$searchURL = '&amp;searchQuery='.$query;\n\t\t\t} else {\n\t\t\t\t$query = \"\";\n\t\t\t\t$GLOBALS['Query'] = \"\";\n\t\t\t}\n\n\t\t\tif (isset($_GET['sortOrder']) && $_GET['sortOrder'] == 'asc') {\n\t\t\t\t$sortOrder = 'asc';\n\t\t\t} else {\n\t\t\t\t$sortOrder = \"desc\";\n\t\t\t}\n\n\t\t\t$sortLinks = array(\n\t\t\t\t\"Title\" => \"n.newstitle\",\n\t\t\t\t\"Date\" => \"n.newsdate\",\n\t\t\t\t\"Visible\" => \"n.newsvisible\"\n\t\t\t);\n\n\t\t\tif (isset($_GET['sortField']) && in_array($_GET['sortField'], $sortLinks)) {\n\t\t\t\t$sortField = $_GET['sortField'];\n\t\t\t\tSaveDefaultSortField(\"ManageNews\", $_REQUEST['sortField'], $sortOrder);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sortField = \"n.newsdate\";\n\t\t\t\tlist($sortField, $sortOrder) = GetDefaultSortField(\"ManageNews\", \"n.newsdate\", $sortOrder);\n\t\t\t}\n\n\t\t\tif (isset($_GET['page'])) {\n\t\t\t\t$page = (int)$_GET['page'];\n\t\t\t} else {\n\t\t\t\t$page = 1;\n\t\t\t}\n\n\t\t\t$sortURL = sprintf(\"&sortField=%s&sortOrder=%s\", $sortField, $sortOrder);\n\t\t\t$GLOBALS['SortURL'] = $sortURL;\n\n\t\t\t// Limit the number of questions returned\n\t\t\tif ($page == 1) {\n\t\t\t\t$start = 1;\n\t\t\t} else {\n\t\t\t\t$start = ($page * ISC_NEWS_PER_PAGE) - (ISC_NEWS_PER_PAGE-1);\n\t\t\t}\n\n\t\t\t$start = $start-1;\n\n\t\t\t// Get the results for the query\n\t\t\t$newsResult = $this->_GetNewsList($query, $start, $sortField, $sortOrder, $numNews);\n\t\t\t$numPages = ceil($numNews / ISC_NEWS_PER_PAGE);\n\n\t\t\t// Add the \"(Page x of n)\" label\n\t\t\tif($numNews > ISC_NEWS_PER_PAGE) {\n\t\t\t\t$GLOBALS['Nav'] = sprintf(\"(%s %d of %d) &nbsp;&nbsp;&nbsp;\", GetLang('Page'), $page, $numPages);\n\t\t\t\t$GLOBALS['Nav'] .= BuildPagination($numNews, ISC_NEWS_PER_PAGE, $page, sprintf(\"index.php?ToDo=viewNews%s\", $sortURL));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$GLOBALS['Nav'] = \"\";\n\t\t\t}\n\n\t\t\t$GLOBALS['Nav'] = rtrim($GLOBALS['Nav'], ' |');\n\t\t\t$GLOBALS['SearchQuery'] = $query;\n\t\t\t$GLOBALS['SortField'] = $sortField;\n\t\t\t$GLOBALS['SortOrder'] = $sortOrder;\n\n\t\t\tBuildAdminSortingLinks($sortLinks, \"index.php?ToDo=viewNews&amp;\".$searchURL.\"&amp;page=\".$page, $sortField, $sortOrder);\n\n\t\t\t// Workout the maximum size of the array\n\t\t\t$max = $start + ISC_NEWS_PER_PAGE;\n\n\t\t\tif ($max > count($newsResult)) {\n\t\t\t\t$max = count($newsResult);\n\t\t\t}\n\n\t\t\tif($numNews > 0) {\n\t\t\t\t// Display the news\n\t\t\t\twhile ($row = $GLOBALS[\"ISC_CLASS_DB\"]->Fetch($newsResult))\n\t\t\t\t{\n\t\t\t\t\t$GLOBALS['Title'] = isc_html_escape($row['newstitle']);\n\n\t\t\t\t\tif (isc_strlen($row['newscontent']) > 100) {\n\t\t\t\t\t\t$GLOBALS['Content'] = isc_substr(strip_tags($row['newscontent']), 0, 100) . \"...\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$GLOBALS['Content'] = $row['newscontent'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$GLOBALS['Date'] = CDate($row['newsdate']);\n\t\t\t\t\t$GLOBALS['NewsId'] = $row['newsid'];\n\n\t\t\t\t\t// If they have permission to edit news, they can change\n\t\t\t\t\t// the visibility status of a news post by clicking on the icon\n\n\t\t\t\t\tif ($GLOBALS[\"ISC_CLASS_ADMIN_AUTH\"]->HasPermission(AUTH_Edit_News)) {\n\t\t\t\t\t\tif ($row['newsvisible'] == 1) {\n\t\t\t\t\t\t\t$GLOBALS['Visible'] = sprintf(\"<a title='%s' href='index.php?ToDo=editNewsVisibility&amp;newsId=%d&amp;visible=0'><img border='0' src='images/tick.gif'></a>\", GetLang('ClickToHideNews'), $row['newsid']);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$GLOBALS['Visible'] = sprintf(\"<a title='%s' href='index.php?ToDo=editNewsVisibility&amp;newsId=%d&amp;visible=1'><img border='0' src='images/cross.gif'></a>\", GetLang('ClickToShowNews'), $row['newsid']);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($row['newsvisible'] == 1) {\n\t\t\t\t\t\t\t$GLOBALS['Visible'] = \"<img border='0' src='images/tick.gif'>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$GLOBALS['Visible'] = \"<img border='0' src='images/cross.gif'>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Workout the edit link -- do they have permission to do so?\n\t\t\t\t\tif ($GLOBALS[\"ISC_CLASS_ADMIN_AUTH\"]->HasPermission(AUTH_Edit_News)) {\n\t\t\t\t\t\t$GLOBALS['EditNewsLink'] = sprintf(\"<a title='%s' class='Action' href='index.php?ToDo=editNews&amp;newsId=%d'>%s</a>\", GetLang('NewsEdit'), $row['newsid'], GetLang('Edit'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$GLOBALS['EditNewsLink'] = sprintf(\"<a class='Action' disabled>%s</a>\", GetLang('Edit'));\n\t\t\t\t\t}\n\n\t\t\t\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate(\"news.manage.row\");\n\t\t\t\t\t$GLOBALS['NewsGrid'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate(true);\n\t\t\t\t}\n\n\t\t\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate(\"news.manage.grid\");\n\t\t\t\treturn $GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate(true);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "742f36169a0e59544f5b42937cd9d685", "score": "0.5883525", "text": "function search()\n {\n global $hwdvsItemid;\n\t\t$app = & JFactory::getApplication();\n\n $pattern = JRequest::getVar( 'pattern', '' );\n $category_id = JRequest::getInt( 'category_id', '0' );\n $rpp = JRequest::getInt( 'rpp', '0' );\n $sort = JRequest::getInt( 'sort', '0' );\n $ep = JRequest::getVar( 'ep', '' );\n $ex = JRequest::getVar( 'ex', '' );\n\n\t\t$url = JRoute::_(\"index.php?option=com_hwdvideoshare&task=displayresults&Itemid=$hwdvsItemid&category_id=$category_id\");\n\t\t$url = str_replace(\"&amp;\", \"&\", $url);\n\n\t\t$pos = strpos($url, \"?\");\n\t\tif ($pos === false)\n\t\t{\n\t\t\t$url = $url.\"?pattern=$pattern&rpp=$rpp&sort=$sort&ep=$ep&ex=$ex\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$url = $url.\"&pattern=$pattern&rpp=$rpp&sort=$sort&ep=$ep&ex=$ex\";\n\t\t}\n\n\t\t$app->redirect($url);\n }", "title": "" }, { "docid": "a0813bcb3357d2ef4f3d7bb6db90a2fa", "score": "0.58808666", "text": "public function index()\n\t{\n\t$queryTerm = htmlspecialchars($this->input->get('query'));\n\t\t$origin = $_SERVER['HTTP_REFERER'];\n\t\tif(strpos($origin,\"Communication\") === false)\n\t\t\t$origin = 1;\t//Normal Search\n\t\telse\n\t\t\t$origin = 2;\t//Communication First\n\t\t$this->search_resultfe($queryTerm,$origin);\n\t}", "title": "" }, { "docid": "e79fa2fd0c0abf8b7eafdacfedae9856", "score": "0.58739823", "text": "public function website_search()\n {\n $data['body'] = 'admin/website_search';\n $data['page_title'] = 'Crawl Website';\n $this->_viewcontroller($data);\n }", "title": "" }, { "docid": "61fb28c3c30f8842dfa15e84aec19477", "score": "0.58737826", "text": "function ___logic () {\n/*\n $res = $this->_get_resource ( '_api/modules/indexer' ) ;\n\n $msg = $res->_post ( array (\n 'uri' => 'news/1003'\n ) ) ;\n\n echo \"[$msg]\" ;\n*/\n }", "title": "" }, { "docid": "85b647bccacbede4478683ac5205a4ef", "score": "0.5865103", "text": "function GetNewsIdByQuickSearch( $search_keywords = null, $idModule = null )\n {\n $search_keywords = stripslashes($search_keywords);\n $sel_table = NULL;\n $str_like = NULL;\n $filter_cr = ' OR ';\n $str_like = $this->build_str_like(TblModNewsNames.'.name', $search_keywords);\n $str_like .= $filter_cr.$this->build_str_like(TblModNewsShort.'.short', $search_keywords);\n $str_like .= $filter_cr.$this->build_str_like(TblModNewsFull.'.full', $search_keywords);\n $sel_table = \"`\".TblModNews.\"`, `\".TblModNewsCat.\"`, `\".TblModNewsNames.\"`, `\".TblModNewsShort.\"`, `\".TblModNewsFull.\"` \";\n\n $q =\"SELECT\n `\".TblModNews.\"`.id,\n `\".TblModNews.\"`.start_date,\n `\".TblModNews.\"`.display\n FROM \".$sel_table.\"\n WHERE (\".$str_like.\")\n AND `\".TblModNewsNames.\"`.lang_id = '\".$this->lang_id.\"'\n AND `\".TblModNews.\"`.id = `\".TblModNewsNames.\"`.id_news\n AND `\".TblModNewsShort.\"`.lang_id = '\".$this->lang_id.\"'\n AND `\".TblModNews.\"`.id = `\".TblModNewsShort.\"`.id_news\n AND `\".TblModNewsFull.\"`.lang_id = '\".$this->lang_id.\"'\n AND `\".TblModNews.\"`.id = `\".TblModNewsFull.\"`.id_news\n AND `\".TblModNews.\"`.`id_category` = `\".TblModNewsCat.\"`.`cod`\n AND `\".TblModNewsCat.\"`.lang_id = '\".$this->lang_id.\"'\n AND `\".TblModNews.\"`.status != 'n'\n AND `\".TblModNews.\"`.status != 'i'\n AND `\".TblModNews.\"`.`visible` = '1'\n ORDER BY `\".TblModNews.\"`.`display` desc\n \";\n\n $res = $this->db->db_Query( $q );\n// echo '<br>'.$q.' <br/>$res='.$res.' $this->db->result='.$this->db->result;\n if ( !$res OR !$this->db->result ) return false;\n $rows = $this->db->db_GetNumRows();\n $array = array();\n for( $i=0; $i<$rows; $i++ ) {\n $row = $this->db->db_FetchAssoc($res);\n $dateId = strtotime ($row['start_date']);\n $array[$dateId]['id'] = $row['id'];\n //$array[$dateId]['start_date'] = $row['start_date'];\n $array[$dateId]['id_module'] = $idModule;\n }\n //print_r($array);\n return $array;\n }", "title": "" }, { "docid": "59510bc5fc3c6691ecd830e0df5bf4e2", "score": "0.5853051", "text": "public function search()\n {\n\n }", "title": "" }, { "docid": "59510bc5fc3c6691ecd830e0df5bf4e2", "score": "0.5853051", "text": "public function search()\n {\n\n }", "title": "" }, { "docid": "59510bc5fc3c6691ecd830e0df5bf4e2", "score": "0.5853051", "text": "public function search()\n {\n\n }", "title": "" }, { "docid": "fc082dc9b3d2fc54048c7aba29a45291", "score": "0.5850928", "text": "function &search( &$queryText, $sortMode=time, $fetchPublished=false, $offset=0, $limit=10, $params = array(), &$SearchTotalCount )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n $queryText = $db->escapeString( $queryText );\r\n\r\n // Build the ORDER BY\r\n $OrderBy = \"eZArticle_ArticleWordLink.Frequency DESC\";\r\n switch( $sortMode )\r\n {\r\n case \"alpha\" :\r\n {\r\n $OrderBy = \"eZArticle_Article.Name DESC\";\r\n }\r\n break;\r\n }\r\n\r\n if ( $fetchPublished == true )\r\n {\r\n $fetchText = \"\";\r\n }\r\n else\r\n {\r\n $fetchText = \"AND eZArticle_Article.IsPublished = '1'\";\r\n }\r\n\r\n $usePermission = true;\r\n\r\n $user =& eZUser::currentUser();\r\n\r\n // Build the permission\r\n $loggedInSQL = \"\";\r\n $groupSQL = \"\";\r\n if ( $user )\r\n {\r\n $groups =& $user->groups( false );\r\n\r\n foreach ( $groups as $group )\r\n {\r\n $groupSQL .= \" ( Permission.GroupID='$group' AND CategoryPermission.GroupID='$group' ) OR\r\n ( Permission.GroupID='$group' AND CategoryPermission.GroupID='-1' ) OR\r\n ( Permission.GroupID='-1' AND CategoryPermission.GroupID='$group' ) OR\r\n \";\r\n }\r\n $currentUserID = $user->id();\r\n $loggedInSQL = \"eZArticle_Article.AuthorID=$currentUserID OR\";\r\n\r\n if ( $user->hasRootAccess() )\r\n $usePermission = false;\r\n }\r\n\r\n $loggedInSQL = \"( ( ( $groupSQL Permission.GroupID='-1' AND CategoryPermission.GroupID='-1' ) AND Permission.ReadPermission='1' AND CategoryPermission.ReadPermission='1' ) ) AND\";\r\n\r\n if ( $usePermission )\r\n $permissionSQL = $loggedInSQL;\r\n else\r\n $permissionSQL = \"\";\r\n\r\n // stop word frequency\r\n $ini =& INIFile::globalINI();\r\n $StopWordFrequency = $ini->read_var( \"eZArticleMain\", \"StopWordFrequency\" );\r\n\r\n\r\n $query = new eZQuery( \"eZArticle_Word.Word\", $queryText );\r\n $query->setIsLiteral( true );\r\n $query->setStopWordColumn( \"eZArticle_Word.Frequency\" );\r\n $query->setStopWordPercent( $StopWordFrequency );\r\n $searchSQL = $query->buildQuery();\r\n\r\n $authorSQL = \"\";\r\n $dateSQL = \"\";\r\n $catSQL = \"\";\r\n $typeTables = \"\";\r\n $typeSQL = \"\";\r\n $sectionsSQL = \"\";\r\n $photoSQL = \"\";\r\n $photoTables = \"\";\r\n\r\n if ( isSet( $params[\"FromDate\"] ) )\r\n {\r\n $fromdate = $params[\"FromDate\"];\r\n if( is_a( $fromdate, \"eZDateTime\" ) )\r\n $fromdate = $fromdate->timeStamp();\r\n $dateSQL .= \"AND eZArticle_Article.Published >= '$fromdate'\";\r\n }\r\n if ( isSet( $params[\"ToDate\"] ) )\r\n {\r\n $todate = $params[\"ToDate\"];\r\n if( is_a( $todate, \"eZDateTime\" ) )\r\n $todate = $todate->timeStamp();\r\n $dateSQL .= \"AND eZArticle_Article.Published <= '$todate'\";\r\n }\r\n if ( isSet( $params[\"Categories\"] ) )\r\n {\r\n $cats = $params[\"Categories\"];\r\n $sql = \"\";\r\n $i = 0;\r\n foreach( $cats as $cat )\r\n {\r\n if ( $i > 0 )\r\n $sql .= \"OR \";\r\n $sql .= \"Category.ID = '$cat' \";\r\n ++$i;\r\n }\r\n if ( count( $cats ) > 0 )\r\n {\r\n $catSQL = \"AND ( $sql ) AND Category.ID=eZArticle_ArticleCategoryLink.CategoryID\r\n AND eZArticle_Article.ID=eZArticle_ArticleCategoryLink.ArticleID\";\r\n }\r\n }\r\n if ( isSet( $params[\"Type\"] ) )\r\n {\r\n $type = $params[\"Type\"];\r\n $typeSQL = \"AND eZArticle_Attribute.TypeID='$type'\r\n AND eZArticle_Attribute.ID=eZArticle_AttributeValue.AttributeID\r\n AND eZArticle_AttributeValue.ArticleID=eZArticle_Article.ID\";\r\n $typeTables = \"eZArticle_Attribute, eZArticle_AttributeValue, \";\r\n }\r\n if ( isSet( $params[\"AuthorID\"] ) )\r\n {\r\n $author = $params[\"AuthorID\"];\r\n $authorSQL = \"AND eZArticle_Article.ContentsWriterID='$author'\";\r\n }\r\n\tif ( isSet( $params[\"SectionsList\"] ) )\r\n\t{\r\n\t $sectionsList = $params[\"SectionsList\"];\r\n\t $sectionsArray = explode( \",\", $sectionsList );\r\n\t if ( is_numeric( $sectionsArray[0] ) )\r\n\t {\r\n\t\t$sectionsSQL .= \"AND ( Category.SectionID='$sectionsArray[0]'\";\r\n\t\tfor ( $i=1; $i<count( $sectionsArray ); $i++ )\r\n\t {\r\n\t\t $sectionsSQL .= \" OR Category.SectionID='$sectionsArray[$i]'\";\r\n\t\t}\r\n\t\t$sectionsSQL .= \" ) \";\r\n }\r\n }\r\n if ( isSet( $params[\"PhotographerID\"] ) )\r\n {\r\n $photo = $params[\"PhotographerID\"];\r\n $photoSQL = \"AND eZImageCatalogue_Image.PhotographerID='$photo'\r\n AND eZImageCatalogue_Image.ID=eZArticle_ArticleImageLink.ImageID\r\n AND eZArticle_Article.ID=eZArticle_ArticleImageLink.ArticleID\";\r\n $photoTables = \"eZArticle_ArticleImageLink, eZImageCatalogue_Image,\";\r\n }\r\n\r\n\r\n if ( isset($params[\"SearchExcludedArticles\"]) && $params[\"SearchExcludedArticles\"] == \"true\" )\r\n $excludeFromSearchSQL = \" \";\r\n else\r\n $excludeFromSearchSQL = \" AND Category.ExcludeFromSearch = '0' \";\r\n\r\n // special search for MySQL, mimic subselects ;)\r\n if ( $db->isA() == \"mysql\" )\r\n {\r\n $queryArray = explode( \" \", trim( $queryText ) );\r\n\r\n $db->query( \"CREATE TEMPORARY TABLE eZArticle_SearchTemp( ArticleID int )\" );\r\n\r\n $count = 1;\r\n foreach ( $queryArray as $queryWord )\r\n {\r\n $queryWord = trim( $queryWord );\r\n\r\n $searchSQL = \" ( eZArticle_Word.Word = '$queryWord' AND eZArticle_Word.Frequency < '$StopWordFrequency' ) \";\r\n\r\n $queryString = \"INSERT INTO eZArticle_SearchTemp ( ArticleID ) SELECT DISTINCT eZArticle_Article.ID AS ArticleID\r\n FROM eZArticle_Article,\r\n eZArticle_ArticleWordLink,\r\n eZArticle_Word,\r\n eZArticle_ArticleCategoryLink as Link,\r\n $typeTables\r\n $photoTables\r\n eZArticle_ArticleCategoryDefinition as Definition,\r\n eZArticle_ArticlePermission as Permission,\r\n eZArticle_Category AS Category,\r\n eZArticle_CategoryPermission as CategoryPermission\r\n\r\n WHERE\r\n $permissionSQL\r\n $searchSQL\r\n $dateSQL\r\n $catSQL\r\n $typeSQL\r\n $authorSQL\r\n $photoSQL\r\n\t\t $sectionsSQL\r\n AND\r\n ( eZArticle_Article.ID=eZArticle_ArticleWordLink.ArticleID\r\n AND Definition.ArticleID=eZArticle_Article.ID\r\n AND Definition.CategoryID=Category.ID\r\n $excludeFromSearchSQL\r\n AND eZArticle_ArticleWordLink.WordID=eZArticle_Word.ID\r\n AND Permission.ObjectID=eZArticle_Article.ID\r\n AND CategoryPermission.ObjectID=Definition.CategoryID\r\n $fetchText\r\n AND Link.ArticleID=eZArticle_Article.ID\r\n )\r\n ORDER BY $OrderBy\";\r\n\r\n $db->query( $queryString );\r\n\r\n // check if this is a stop word\r\n $queryString = \"SELECT Frequency FROM eZArticle_Word WHERE Word='$queryWord'\";\r\n\r\n $db->query_single( $WordFreq, $queryString, array( \"LIMIT\" => 1 ) );\r\n\r\n if ( $WordFreq[\"Frequency\"] <= $StopWordFrequency )\r\n $count += 1;\r\n }\r\n $count -= 1;\r\n\r\n $queryString = \"SELECT ArticleID, Count(*) AS Count FROM eZArticle_SearchTemp GROUP BY ArticleID HAVING Count>='$count'\";\r\n\r\n $db->array_query( $article_array, $queryString );\r\n\r\n// $db->array_query( $article_array, $queryString, array( \"Limit\" => $limit, \"Offset\" => $offset ) );\r\n\r\n $db->query( \"DROP TABLE eZArticle_SearchTemp\" );\r\n\r\n $SearchTotalCount = count( $article_array );\r\n if ( $limit >= 0 )\r\n $article_array =& array_slice( $article_array, $offset, $limit );\r\n }\r\n else\r\n {\r\n $queryString = \"SELECT DISTINCT eZArticle_Article.ID AS ArticleID, eZArticle_Article.Published, eZArticle_Article.Name, eZArticle_ArticleWordLink.Frequency\r\n FROM eZArticle_Article,\r\n eZArticle_ArticleWordLink,\r\n eZArticle_Word,\r\n eZArticle_ArticleCategoryLink,\r\n $catDefTable\r\n $catTable\r\n $typeTables\r\n $photoTables\r\n eZArticle_ArticlePermission\r\n WHERE\r\n $searchSQL\r\n $dateSQL\r\n $catSQL\r\n $typeSQL\r\n $authorSQL\r\n $photoSQL\r\n AND\r\n ( eZArticle_Article.ID=eZArticle_ArticleWordLink.ArticleID\r\n AND eZArticle_ArticleCategoryDefinition.ArticleID=eZArticle_Article.ID\r\n AND eZArticle_ArticleCategoryDefinition.CategoryID=eZArticle_Category.ID\r\n $excludeFromSearchSQL\r\n AND eZArticle_ArticleWordLink.WordID=eZArticle_Word.ID\r\n AND eZArticle_ArticlePermission.ObjectID=eZArticle_Article.ID\r\n $fetchText\r\n AND eZArticle_ArticleCategoryLink.ArticleID=eZArticle_Article.ID AND\r\n ( $loggedInSQL ($groupSQL eZArticle_ArticlePermission.GroupID='-1')\r\n AND eZArticle_ArticlePermission.ReadPermission='1'\r\n )\r\n )\r\n ORDER BY $OrderBy\";\r\n\r\n $db->array_query( $article_array, $queryString );\r\n\r\n $SearchTotalCount = count( $article_array );\r\n $article_array =& array_slice( $article_array, $offset, $limit );\r\n }\r\n\r\n for ( $i = 0; $i < count($article_array); $i++ )\r\n {\r\n $return_array[$i] = new eZArticle( $article_array[$i][$db->fieldName( \"ArticleID\" )], false );\r\n }\r\n\r\n return $return_array;\r\n }", "title": "" }, { "docid": "2635fac757de2f242cb12a72fceb73b8", "score": "0.5841893", "text": "function page_search($keywords,$s){\t \n\t $limit=5; \n\t \tinclude_once(\"db.inc.php\");\n\t$db=new DB();\n\t$db->open();\n\tif (empty($s)) {\n $s=0;\n }\n$query .= \"SELECT title,content FROM pages \" . \"WHERE content LIKE '%\".$keywords['0'].\"%' limit $s,$limit\";\n$num_results = $db->numRows($result);\n$numresults = $db->query($query);\n$numrows = $db->numRows($numresult);\n\necho \"Results<BR>\";\n$count = 1 + $s ;\nwhile($row=$db->fetchArray($result))\n{\necho \"$count.)<a href=\".$stcfg[RootDir].\"/?loc=\".$row['title'].\">\".$row['title'].\"</a><BR>\";\n$count++ ;\n}\n$currPage = (($s/$limit) + 1);\n\n echo \"<br />\";\n if ($s>=1) { // bypass PREV link if s is 0\n $prevs=($s-$limit);\n print \"&nbsp;<a href=\\\"$PHP_SELF?s=$prevs&search=$keywords\\\">&lt;&lt; \n Prev 10</a>&nbsp&nbsp;\";\n }\n $pages=intval($numrows/$limit);\n\n if ($numrows%$limit) {\n $pages++;\n }\n if (!((($s+$limit)/$limit)==$pages) && $pages!=1) {\n $news=$s+$limit;\necho \"&nbsp;<a href=\\\"$PHP_SELF?s=$news&q=$var\\\">Next 10 &gt;&gt;</a>\";\n }\n$a = $s + ($limit) ;\n if ($a > $numrows) { $a = $numrows ; }\n $b = $s + 1 ;\n echo \"<p>Showing results $b to $a of $numrows</p>\";\n}", "title": "" }, { "docid": "14680f39388e7aed030ec8a1f3ad28e5", "score": "0.5834444", "text": "static function search_link() {\n\t\treturn array(\n\t\t\t'query' => 'bookmarks.bookmarks_bo.link_query',\n\t\t\t'title' => 'bookmarks.bookmarks_bo.link_title',\n\t\t\t//'titles' => 'infolog.infolog_bo.link_titles',\n\t\t\t'view' => array(\n\t\t\t\t'menuaction' => 'bookmarks.bookmarks_ui.view',\n\t\t\t),\n\t\t\t'view_id' => 'bm_id',\n\t\t\t'view_list'\t=>\t'bookmarks.bookmarks_ui.list',\n\t\t\t'view_popup' => '750x440',\n\t\t\t'add' => array(\n\t\t\t\t'menuaction' => 'bookmarks.bookmarks_ui.create',\n\t\t\t),\n\t\t\t'add_app' => 'bookmarks',\n\t\t\t'add_id' => 'bm_id',\n\t\t\t'add_popup' => '750x440',\n\t\t);\n\t}", "title": "" }, { "docid": "07640dc159b936c17d81e8a3ddde5a78", "score": "0.5834086", "text": "public function index()\n {\n\t\t/*\n\t\t\tFunction for Main Page by Take information from database such as news,\n\t\t\tthread, popular news and recent thread\n\t\t*/\n }", "title": "" }, { "docid": "72003985b5d73eb3065a35d0122f42f8", "score": "0.5817879", "text": "public function actionShowsearchtext() {\n $text = $_POST['text'];\n $text = '%' . $text . '%';\n $news = Yii::app()->db->createCommand()\n ->select('*')\n ->from('news')\n ->where(\"title LIKE :text OR description LIKE :text\", array(':text' => $text))\n ->queryAll();\n\n $data = array(\n 'news' => $news,\n );\n $this->render('rezsearchtag', $data);\n }", "title": "" }, { "docid": "aea0dd09bccfa72828c9a8df5d2ab668", "score": "0.58176666", "text": "function showPagination() {\n// $this->cur_page, 'noticesearch', array('q' => $this->q, 'ct' => $this->ct, $this->total)); \n $this->numpagination($this->total_count, 'noticesearch', array(), \n\t\t\t\tarray('q' => $this->q, 'ct' => $this->ct), NOTICES_PER_PAGE);\n }", "title": "" }, { "docid": "6116c8d0fe58bec36abe4d6edd497fb6", "score": "0.58143", "text": "public function index(Request $request)\n {\n $news=News::all();\n\n $news = News::when($request->search, function ($query) use ($request) {\n\n return $query->whereTranslationLike('title', '%'.$request->search.'%');\n\n })->latest()->paginate(2);\n \n\n\n\n\n return view('dashboard.news.index',compact('news'));\n\n }", "title": "" }, { "docid": "db6f7172f632df4f154fe2d33a0e5d67", "score": "0.58094484", "text": "function newsListing($searchText = '', $page, $segment)\n {\n $this->db->select();\n $this->db->from('news');\n if(!empty($searchText)) {\n $likeCriteria = \"(news.news_title LIKE '%\".$searchText.\"%'\n OR news.news_details LIKE '%\".$searchText.\"%'\n OR news.published_on LIKE '%\".$searchText.\"%')\";\n $this->db->where($likeCriteria);\n }\n $this->db->order_by('news.id', 'DESC');\n $this->db->limit($page, $segment);\n $query = $this->db->get();\n\n $result = $query->result();\n return $result;\n }", "title": "" }, { "docid": "8f3368ae8a879ff17ffa3d8c94672ae0", "score": "0.58055276", "text": "public function searchengine_search()\n {\n $data['body'] = 'admin/searchengine_search';\n $data['page_title'] = 'Searchengine Search';\n $data['social_network'] = $this->get_social_networks();\n $data['email_provider'] = $this->get_email_providers();\n $data['searh_engine'] = $this->get_searche_engines();\n $this->_viewcontroller($data);\n }", "title": "" }, { "docid": "5e140471202a62afed67f9659993fc0b", "score": "0.58046997", "text": "function news() {\r\n\t\t\t$rss_items = $this->fetch_rss_items( 5 );\r\n\t\t\t\r\n\t\t\t$content = '<ul>';\r\n\t\t\tif ( !$rss_items ) {\r\n\t\t\t $content .= '<li class=\"yoast\">'.__( 'No news items, feed might be broken...', 'wordpress-seo' ).'</li>';\r\n\t\t\t} else {\r\n\t\t\t foreach ( $rss_items as $item ) {\r\n\t\t\t \t$url = preg_replace( '/#.*/', '', esc_url( $item->get_permalink(), $protocolls=null, 'display' ) );\r\n\t\t\t\t\t$content .= '<li class=\"yoast\">';\r\n\t\t\t\t\t$content .= '<a class=\"rsswidget\" href=\"'.$url.'#utm_source=wpadmin&utm_medium=sidebarwidget&utm_term=newsitem&utm_campaign=wpseoplugin\">'. esc_html( $item->get_title() ) .'</a> ';\r\n\t\t\t\t\t$content .= '</li>';\r\n\t\t\t }\r\n\t\t\t}\t\t\t\t\t\t\r\n\t\t\t$content .= '<li class=\"facebook\"><a href=\"https://www.facebook.com/yoastcom\">'.__( 'Like Yoast on Facebook', 'wordpress-seo' ).'</a></li>';\r\n\t\t\t$content .= '<li class=\"twitter\"><a href=\"http://twitter.com/yoast\">'.__( 'Follow Yoast on Twitter', 'wordpress-seo' ).'</a></li>';\r\n\t\t\t$content .= '<li class=\"googleplus\"><a href=\"https://plus.google.com/115369062315673853712/posts\">'.__( 'Circle Yoast on Google+', 'wordpress-seo' ).'</a></li>';\r\n\t\t\t$content .= '<li class=\"rss\"><a href=\"'.$this->feed.'\">'.__( 'Subscribe with RSS', 'wordpress-seo' ).'</a></li>';\r\n\t\t\t$content .= '<li class=\"email\"><a href=\"http://yoast.com/wordpress-newsletter/\">'.__( 'Subscribe by email', 'wordpress-seo' ).'</a></li>';\r\n\t\t\t$content .= '</ul>';\r\n\t\t\t$this->postbox('yoastlatest', __( 'Latest news from Yoast', 'wordpress-seo' ), $content);\r\n\t\t}", "title": "" }, { "docid": "1faf3381f5919263079879a5c307ec11", "score": "0.58004206", "text": "public function shownews_endless_scroll()\r\n {\r\n\r\n $news = NULL;\r\n $category = NULL;\r\n $sub = NULL;\r\n\r\n $jnews_conf = $this -> modex;\r\n\r\n $page = filter_input(INPUT_POST, \"page\", FILTER_VALIDATE_INT);\r\n $category = filter_input(INPUT_GET, \"sub\", FILTER_SANITIZE_STRING);\r\n\r\n $pagex = ($page) ? $page * 1 : 0;\r\n\r\n $tcnx = new mysqli('localhost', _US, _PS, _DB);\r\n $tcnx -> set_charset(\"utf8\");\r\n\r\n if (!empty($category))\r\n {\r\n $rcat = $tcnx -> query(\"SELECT \" . $jnews_conf['fields']['topic'] . \" FROM \" . $jnews_conf['table'] . \" WHERE \" . $jnews_conf['fields']['topic'] . \"='$category'\");\r\n $sub = ($category && $rcat -> num_rows > 0) ? \"AND categoria='$category'\" : \"\";\r\n $rcat -> free();\r\n }\r\n\r\n #condiçoes de pesquisa na base de dados\r\n $sql_conditions = parent::define_sql_conditions($jnews_conf['conditions']);\r\n\r\n #oredenação dos resultados de pesquisa na base de dados\r\n $sql_order = parent::define_sql_order($jnews_conf['order']);\r\n\r\n $query = \"SELECT \" . implode(\",\", $jnews_conf['fields']) . \" FROM \" . $jnews_conf['table'] . \" $sql_conditions $sub $sql_order LIMIT $pagex , $this->itensPerPage\";\r\n $rslt = $tcnx -> query($query);\r\n\r\n while ($new = $rslt -> fetch_array())\r\n {\r\n\r\n if ($new[$jnews_conf['fields']['title']])\r\n {\r\n\r\n $news .= $this -> newsbi($new);\r\n\r\n }\r\n }\r\n\r\n return $news;\r\n\r\n $rslt -> close();\r\n\r\n }", "title": "" }, { "docid": "69a479e923b5e94c9557359d6400feaf", "score": "0.5769849", "text": "function bhl_find_article($atitle, $title, $volume, $page, $series = '', $date = '', $issn= '')\n{\n\tglobal $db;\n\tglobal $debug;\n\t\n\t// Data structure to hold search result\n\t$obj = new stdclass;\n\t$obj->TitleID = 0;\n\t$obj->ISSN = $issn;\n\t$obj->ItemIDs = array();\n\t$obj->hits = array();\n\t\n\t//$debug=true;\n\t\n\t// hack\n\t\n\t/*\n\tif ($title == 'Biologia Centrali-Americana')\n\t{\n\t\t$title = 'The entomologist\\'s record and journal of variation';\n\t}\n\t*/\n\t\n\t\n\tif ($title == 'Annuaire du Musée zoologique de l\\'Academie des Sciences')\n\t{\n\t\t$title = 'Ezhegodnik.';\n\t}\t\n\t\n\tif ($title == 'J Res Lepid')\n\t{\n\t\t$title = 'Journal of Research on the Lepidoptera';\n\t}\n\t\n\t\n\t\n\tif ($title == 'Memoirs on the Coleoptera Lancaster Pa')\n\t{\n\t\t$title = 'Memoirs on the Coleoptera';\n\t}\n\n\t\n\tif ($title == 'Annals of the Cape Provincial Museums Natural History')\n\t{\n\t\t$title = 'Annals of the Cape Provincial Museums';\n\t}\n\tif ($title == 'Annals of The Cape Provincial Museums Natural History')\n\t{\n\t\t$title = 'Annals of the Cape Provincial Museums';\n\t}\n\t\n\tif ($title == 'Gen. Insect.')\n\t{\n\t\t$title = 'Genera insectorum';\n\t}\n\n\n\tif ($title == 'Gayana Botánica')\n\t{\n\t\t$title = 'Gayana';\n\t}\n\tif ($title == 'Gayana Botanica')\n\t{\n\t\t$title = 'Gayana';\n\t}\n\t\n\t\n\tif ($title == 'J Lepid Soc')\n\t{\n\t\t$title = 'Journal of the Lepidopterists\\' Society';\n\t}\n\t\n\t\n\tif ($title == 'Entomologist\\'s Record Bishop\\'s Stortford')\n\t{\n\t\t$title = 'The entomologist\\'s record and journal of variation';\n\t}\n\t\n\t\n\tif ($title == 'Revue Mycologique Toulouse')\n\t{\n\t\t$title = 'Revue Mycologique';\n\t}\n\t\n\t\n\tif ($title == 'Transactions of the Geological Society of London')\n\t{\n\t\t$title = 'Transactions of the Geological Society';\n\t}\n\n\tif ($title == 'Notul.Syst. (Paris)')\n\t{\n\t\t$title = 'Notulae systematicae';\n\t}\n\n\tif ($title == 'JB mal Ges')\n\t{\n\t\t$title = 'Jahrbücher der Deutschen Malakozoologischen Gesellschaft';\n\t}\n\n\tif ($title == 'Boletim Biologico Sao Paulo')\n\t{\n\t\t$title = 'Boletim Biologico';\n\t}\n\t\n\tif ($title == 'Memoirs of Nanjing Institute of Geology and Palaeontology')\n\t{\n\t\t$title = 'Zhongguo ke xue yuan Nanjing di zhi gu sheng wu yan jiu suo ji kan';\n\t}\n\t\n\tif ($title == 'Horae Societatis Entomologicae Rossicae')\n\t{\n\t\t$title = 'Horae Societatis Entomologicae Rossicae, variis sermonibus in Rossia usitatis editae';\n\t}\n\t\n\tif ($title == 'Muelleria')\n\t{\n\t\t$title = 'Muelleria : An Australian Journal of Botany';\n\t}\n\tif ($title == 'MUELLERIA')\n\t{\n\t\t$title = 'Muelleria : An Australian Journal of Botany';\n\t}\n\t\n\tif ($title == 'Entomologische Zeitschrift, Frankfurt a. M.')\n\t{\n\t\t$title = 'Entomologische Zeitschrift';\n\t}\t\n\t\n\t\n\t// Step one\n\t// --------\n\t// Map journal title to BHL titles. We try to achieve this by first finding ISSN for title,\n\t// then querying BHL for that ISSN in the bhl_title_identifier table. If we don't have an ISSN,\n\t// or BHL doesn't have this ISSN then we try approximate string matching. This may return multiple\n\t// hits, for now we take the best one. If we still haven't found the title, it may be in the\n\t// VolumeInfo field (for example, large articles or monographs may be bound separately and hence\n\t// treated as individual titles, rather than as items of a title (e.g., Fieldiana). If still no\n\t// hits, we abandon search.\n\t\n\t// Can we do this via ISSN?\t\n\tif ($obj->ISSN == '')\n\t{\n\t\t$obj->ISSN = issn_from_title($title);\n\t}\n\tif ($obj->ISSN != '')\n\t{\n\t\t$obj->TitleID = bhl_titleid_from_issn($obj->ISSN);\n\t}\n\n\tif ($debug)\n\t{\n\t\techo __FILE__ . ' line ' . __LINE__ . ' ISSN = ' . $obj->ISSN . \"<br />\\n\";\n\t}\n\t\n\t// Special cases where mapping is tricky\n\tswitch ($obj->ISSN)\n\t{\n\t\tcase '0027-4070':\n\t\t\t$obj->TitleID = 68686;\n\t\t\tbreak;\n\t\n\t\tcase '0016-5301':\n\t\t\t$obj->TitleID = 40896;\n\t\t\tbreak;\n\t\t\t\n\t\tcase '1000-3215':\n\t\t\t$obj->TitleID = 53832;\n\t\t\tbreak;\n\t\t\t\n\t\t// Adansonia new series\n\t\tcase '0001-804X':\n\t\t\t$obj->TitleID = 169110;\n\t\t\tbreak;\t\t\n\t\t\t\n\t\t// Annotationes Zoologicae Japonenses\n\t\tcase '0003-5092':\n\t\t\t$obj->TitleID = 79642;\n\t\t\tbreak;\n\t\t\t\n\t\t// Arnaldoa : revista del Herbario HAO\n\t\tcase '1815-8242':\n\t\t\t$obj->TitleID = 61808;\n\t\t\tbreak;\n\t\t\t\n\t\t// Australian Entomological Magazine\n\t\tcase '0311-1881':\n\t\t\t$obj->TitleID = 181031;\n\t\t\tbreak;\n\n\t\t\t\n\t\n\t\tcase '0373-6660':\n\t\t\t$obj->TitleID = 13345;\n\t\t\tbreak;\n\t\t\t\n\t\t// Apex\n\t\tcase '0773-5251':\n\t\t\t$obj->TitleID = 63880;\n\t\t\tbreak;\n\t\t\t\n\t\t// Beagle\n\t\tcase '0811-3653':\n\t\t\t$obj->TitleID = 144396;\n\t\t\tbreak;\n\t\t\t\n\t\t\n\t\t// Bonn zoological bulletin\n\t\tcase '2190-7307':\n\t\t\t$obj->TitleID = 82521;\n\t\t\tbreak;\n\t\t\t\n\t\t\n\t\t// Bulletin de la Société philomathique de Paris\n\t\tcase '0366-3515':\n\t\t\t$obj->TitleID = 9580;\n\t\t\tbreak;\n\t\t\t\n\t\t// Bulletin Du Museum Paris\n\t\tcase '1148-8425':\n\t\t\t$obj->TitleID = 5943;\n\t\t\tbreak;\n\t\t\t\n\t\tcase '0181-0626':\n\t\t\t$obj->TitleID = 158834;\n\t\t\tbreak;\n\t\t\n\t\t// Bulletin of the Brooklyn Entomological Society.\n\t\tcase '1051-8932':\n\t\t\t$obj->TitleID = 16211;\n\t\t\tbreak;\n\t\t\n\t\t// Bulletin of the Natural History Museum. Zoology series\n\t\tcase '0968-0470':\n\t\t\t$obj->TitleID = 62642;\n\t\t\tbreak;\n\t\t\t\n\t\t// Bulletin of the Natural History Museum. Botany series.\n\t\tcase '0968-0446':\n\t\t\t$obj->TitleID = 53883;\n\t\t\tbreak;\n\t\t\t\n\t\t// Bulletin of the Southern California Academy of Sciences\n\t\tcase '0038-3872':\n\t\t\t$obj->TitleID = 4949;\n\t\t\tbreak;\n\t\t\t\n\t\t// Contributions in science \n\t\tcase '0459-8113':\n\t\t\t$obj->TitleID = 122696;\n\t\t\tbreak;\n\t\t\t\n\t\tcase '0046-192X':\n\t\tcase '0158-4197':\n\t\t\t$obj->TitleID = 16355;\n\t\t\tbreak;\n\t\t\t\n\t\t\t// Fieldiana, Bot\n\t\tcase '0015-0746':\n\t\t\t$obj->TitleID = 42247;\n\t\t\tbreak;\n\t\t\n\t\t\n\n\t\t// Gayana\n\t\tcase '0016-531X':\n\t\t\t$obj->TitleID = 39684;\n\t\t\tbreak;\n\t\t\t\n\t\t// Manila Phillipine J Sci D\n\t\tcase '0031-7683':\n\t\t\t$obj->TitleID = 50545;\n\t\t\tbreak;\n\n\t\t// Muelleria\n\t\tcase '0077-1813':\n\t\t\t$obj->TitleID = 112965;\n\t\t\tbreak;\n\t\t\t\n\t\t// Novon\n\t\tcase '1055-3177':\n\t\t\t$obj->TitleID = 744;\n\t\t\tbreak;\n\n\t\t// Occasional Papers Museum of Texas Tech University\n\t\tcase '0149-175X':\n\t\t\t$obj->TitleID = 156995;\n\t\t\tbreak;\n\n\n\t\t// Smithiana\n\t\tcase '1684-4130':\n\t\t\t$obj->TitleID = 141859;\n\t\t\tbreak;\n\n\t\n\t\t// Stuttgarter Beiträge zur Naturkunde\n\t\tcase '0341-0145':\n\t\t\t$obj->TitleID = 49174;\n\t\t\tbreak;\n\t\t\t\n\t\t// Transactions American Microscopical Society \n\t\tcase '0003-0023':\n\t\t\t$obj->TitleID = 37912;\n\t\t\tbreak;\n\t\t\t\n\t\t// Transactions of the Linnean Society\n\t\tcase '1945-9432':\n\t\t\t$obj->TitleID = 2203;\n\t\t\tbreak;\n\n\t\tcase '0771-0488':\n\t\t\t$obj->TitleID = 10603;\n\t\t\tbreak;\n\t\t\t\n\t\tcase '1019-8563':\n\t\t\t$obj->TitleID = 15675;\n\t\t\tbreak;\n\t\t\t\n\t\tcase '0177-7424':\n\t\t\t$obj->TitleID=42670;\n\t\t\tbreak;\n\t\t\t\n\t\t// Scientific papers of the Natural History Museum, University of Kansas\n\t\tcase '1094-0782':\n\t\t\t$hits = bhl_title_lookup($atitle);\n\t\t\tif (count($hits) > 0)\n\t\t\t{\n\t\t\t\tif ($hits[0]['sl'] > 90)\n\t\t\t\t{\n\t\t\t\t\t$obj->TitleID = $hits[0]['TitleID'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase '0375-099X':\n\t\t\t$obj->TitleID = 10294;\n\t\t\tbreak;\n\t\t\n\t\t// Spixiana\n\t\tcase '0341-8391':\n\t\t\t$obj->TitleID = 40214;\n\t\t\tbreak;\n\t\t\t\n\t\t// Iheringia. Série zoologia\n\t\tcase '0073-4721':\n\t\t\t$obj->TitleID=50228;\n\t\t\tbreak;\n\t\t\t\n\t\tcase '0084-5620':\n\t\t\t$obj->TitleID=45493;\n\t\t\tbreak;\n\t\t\t\n\t\t// Transactions of the Linnean Society of London. Zoology.\n\t\tcase '1945-9440':\n\t\t\t$obj->TitleID=51416;\n\t\t\tbreak;\n\t\t\t\n\t\t// Zoological Science (Tokyo)\n\t\tcase '0289-0003':\n\t\t\t$obj->TitleID = 61647;\n\t\t\tbreak;\n\t\t\t\n\t\t// Fieldiana\n\t\tcase '0015-0754':\n\t\t\t$obj->TitleID = 5132;\n\t\t\tbreak;\n\t\t\n\t\t// Nature\n\t\tcase '0028-0836':\n\t\t\t$obj->TitleID = 21368;\n\t\t\tbreak;\n\t\t\t\n\t\t// Proceedings of the Zoological Society of London\n\t\tcase '0370-2774':\n\t\t\t$obj->TitleID = 44963;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\t\n\tif ($debug)\n\t{\n\t\techo __FILE__ . ' line ' . __LINE__ . ' TitleID = ' . $obj->TitleID . \"<br />\\n\";\n\t}\n\t\n\t/*$obj->ISSN = '0150-9322';\n\t$obj->TitleID = 4647;*/\n\t\n\t// Non-trivial cases just specifiy a match\n\tif ($obj->TitleID == 0)\n\t{\n\t\tswitch ($title)\n\t\t{\n\t\t\tcase 'Annales du Musee Zoologique Academie des Sciences St Peterburg':\n\t\t\tcase 'Annales du Musee Zoologique St Peterburg':\n\t\t\tcase 'Ann Mus St Petersburg':\n\t\t\tcase 'St Petersburg Ann mus zool':\n\t\t\t\t$obj->TitleID = 8097;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\n\t\t\tcase 'Adansonia; recueil d\\'observations botaniques':\n\t\t\t\t$obj->TitleID = 600;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'Bollettino della Società entomologica italiana':\n\t\t\tcase 'Bollettino della Società Entomologica Italiana':\n\t\t\t\t$obj->TitleID = 9612;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'Bulletin du Museum National d\\'Histoire Naturelle Section B Adansonia':\n\t\t\tcase 'Bulletin Du Museum National D\\'histoire Naturelle Section B Adansonia Botanique Phytochimie':\n\t\t\t\t$obj->TitleID = 13855;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'Bulletin de la Société portugaise des sciences naturelles':\n\t\t\t\t$obj->TitleID = 169522;\n\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\tcase 'Exot. Microlep.':\n\t\t\t\t$obj->TitleID = 8646;\n\t\t\t\tbreak;\t\t\t\n\t\t\t\t\n\t\t\tcase 'Journal and Proceedings of the Royal Society of Western Australia':\n\t\t\t\t$obj->TitleID = 77508;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'Journal of Ornithology':\n\t\t\t\t$obj->TitleID = 47027;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'Notulae Systematicae. Herbier Du Museum De Paris':\n\t\t\t\t$obj->TitleID = 314;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'Russkoe entomologicheskoe obozrenie':\n\t\t\tcase 'Revue russe d\\'entomologie';\n\t\t\t\t$obj->TitleID = 11807;\n\t\t\t\tbreak;\n\n\t\t\tcase 'Zoologica; scientific contributions of the New York Zoological Society':\n\t\t\tcase 'Zoologica New York':\n\t\t\tcase 'Zoologica New York N Y':\n\t\t\tcase 'Zoologica N Y':\n\t\t\tcase 'Zoologica':\n\t\t\t\t$obj->TitleID = 42858;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}\n\t\n\tif ($debug)\n\t{\n\t\techo __FILE__ . ' line ' . __LINE__ . ' TitleID = ' . $obj->TitleID . \"<br />\\n\";\n\t}\n\t\n\t\n\t\n\t// If no ISSN, or no mapping available via ISSN, so try string matching\n\tif ($obj->TitleID == 0)\n\t{\n\t\t$hits = bhl_title_lookup($title);\n\t\t\n\t\tif ($debug)\n\t\t{\n\t\t\techo __FILE__ . ' line ' . __LINE__ . \"<br />\\n\";\n\t\t\techo '<pre>';\n\t\t\tprint_r($hits);\n\t\t\techo '</pre>';\n\t\t}\n\t\t\n\t\t\n\t\tif (count($hits) > 0)\n\t\t{\n\t\t\t$obj->TitleID = $hits[0]['TitleID'];\n\t\t}\t\t\n\t}\n\t\n\tif ($debug)\n\t{\n\t\techo __FILE__ . ' line ' . __LINE__ . ' TitleID = ' . $obj->TitleID . \"\\n\";\n\t}\n\t\n\t\n\t// Special cases where title is in VolumeInfo (e.g., article is treated as a monograph)\n\tif ($obj->TitleID == 0)\t\n\t{\n\t\tif (isset($obj->ISSN))\n\t\t{\n\t\t\tswitch ($obj->ISSN)\n\t\t\t{\n\t\t\t\tcase '0015-0754':\n\t\t\t\t\t//echo $title . \"\\n\";\n\t\t\t\t\t//echo \"Handle Fieldiana...\\n\";\n\t\t\t\t\t$obj->ItemIDs = bhl_itemid_from_pattern ('Fieldiana% Zoology%', '/^Fieldiana\\.? Zoology/', $volume);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\t\n\t// At this point if we have a title we then want to find items for this title\n\tif($obj->TitleID != 0)\n\t{\t\t\n\t\tbhl_title_retrieve ($obj->TitleID, $obj);\n\t\t\t\t\n\t\t// Problem -- volume info varies across titles (and sometimes within...)\n\t\t\n\t\tif ($debug)\n\t\t{\n\t\t\techo __LINE__ . \"<br/>TitleID:\" . $obj->TitleID . \"<br/>Volume: \" . $volume . \"<br/>Series: \" . $series . \"<br/>\";\n\t\t}\n\t\t$volume_offset = 0;\n\t\t$obj->ItemIDs = bhl_itemid_from_volume($obj->TitleID, $volume, $series);\n\n\t\tif ($debug)\n\t\t{\n\t\t\techo __LINE__ . \" ItemIDs<br/>\\n\";\n\t\t\tprint_r($obj->ItemIDs);\n\t\t\techo '<br />';\n\t\t}\n\t\t\n\t\t// Special cases where VolumeInfo is year, not volume\n\t\tif ((count($obj->ItemIDs) == 0) && ($date != ''))\n\t\t{\n\t\t\t$year = substr($date, 0, 4);\n\t\t\tswitch ($obj->TitleID)\n\t\t\t{\n\t\t\t\tcase 11516:\n\t\t\t\t\t$obj->ItemIDs = bhl_itemid_from_year($obj->TitleID, $year);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Special cases where we know there are problems. For example, there may be multiple titles\n\t\t// that correspond to the same journal. In these cases we clear the item list, and add to it \n\t\t// items from all titles that match our query\n\t\t$title_list = array();\n\t\tswitch ($obj->TitleID)\n\t\t{\n\t\t\t// Abhandlungen und Berichte des Koniglichen Zoologischen und Anthropologisch-Ethnographischen Museums zur Dresden\n\t\t\tcase 49442:\n\t\t\tcase 96150:\n\t\t\t\t$title_list = array(49442, 96150);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Acta Botánica Mexicana\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 114584:\ncase 119348:\ncase 119595:\ncase 119604:\ncase 119605:\ncase 119611:\ncase 119612:\ncase 119614:\ncase 119685:\ncase 119760:\ncase 119766:\ncase 119767:\ncase 119773:\ncase 119902:\ncase 119913:\ncase 119935:\ncase 119972:\ncase 119977:\ncase 120104:\ncase 120167:\ncase 120170:\ncase 120416:\ncase 120417:\ncase 120453:\ncase 120454:\ncase 120461:\ncase 120462:\ncase 120537:\ncase 120538:\ncase 120539:\ncase 120543:\ncase 120544:\ncase 120545:\ncase 120547:\ncase 120550:\ncase 120560:\ncase 120561:\ncase 120565:\ncase 120672:\ncase 120673:\ncase 120674:\ncase 120752:\ncase 120761:\ncase 120763:\ncase 120764:\ncase 120766:\ncase 120767:\ncase 120768:\ncase 120769:\ncase 114584:\n\ncase 122954:\ncase 122957:\ncase 122958:\ncase 122959:\n\ncase 144945:\ncase 146228:\n\ncase 147072:\ncase 147039:\n\ncase 147027:\n\ncase 147371:\ncase 147339:\ncase 147338:\ncase 147324:\ncase 147299:\n\ncase 147599:\ncase 147623:\ncase 147630:\ncase 147632:\ncase 147650:\n\ncase 147939:\ncase 147893:\n\ncase 148608:\n\ncase 148896:\n\ncase 153862:\ncase 155143:\n\t\t\t\t$title_list = array(114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,114584,119348,119595,119604,119605,119611,119612,119614,119685,119760,119766,119767,119773,119902,119913,119935,119972,119977,120104,120167,120170,120416,120417,120453,120454,120461,120462,120537,120538,120539,120543,120544,120545,120547,120550,120560,120561,120565,120672,120673,120674,120752,120761,120763,120764,120766,120767,120768,120769,114584,\n\t\t\t\t122954,\n122957,\n122958,\n122959,\n\n144945,\n146228,\n\n147072,\n147039,\n\n147027,\n\n147371,\n147339,\n147338,\n147324,\n147299,\n\n147599,\n147623,\n147630,\n147632,\n147650,\n\n147939,\n147893,\n\n148608,\n\n148896,\n\n153862,\n\n155143\n\n\n);\n\t\t\t\tbreak;\n\t\t\n\t\t\t// Acta Societatis pro Fauna et Flora Fennica\n\t\t\tcase 5558:\n\t\t\tcase 13345:\n\t\t\t\t$title_list = array(5558, 13345);\n\t\t\t\tbreak;\n\t\t\n\t\t\t// Actes de la Société linnéenne de Bordeaux\n\t\t\tcase 4199:\n\t\t\tcase 16235:\n\t\t\t\t$title_list = array(4199, 16235);\n\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t// \tAmerican journal of conchology\n\t\t\tcase 15900:\n\t\t\tcase 7077:\n\t\t\t\t$title_list = array(7077, 15900);\n\t\t\t\tbreak;\n\n\t\t\t// The American journal of science\n\t\t\tcase 14965:\n\t\t\tcase 60982:\n\t\t\t\t$title_list = array(14965, 60982);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// American malacological bulletin\n\t\t\tcase 94759:\n\t\t\tcase 120078:\n\t\t\t\t$title_list = array(94759, 120078);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Annali del Museo civico di storia naturale di Genova\n\t\t\tcase 7929:\n\t\t\tcase 9576:\n\t\t\tcase 43408:\n\t\t\t\t$title_list = array(7929, 9576, 43408);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Annales du Jardin botanique de Buitenzorg\n\t\t\tcase 3659:\n\t\t\tcase 39889:\n\t\t\t\t$title_list = array(3659, 39889);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Annales de la Société entomologique de Belgique\n\t\t\tcase 11933:\n\t\t\tcase 11938:\n\t\t\t\t$title_list = array(11933, 11938);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Annales des sciences naturelles\n\t\t\tcase 2205:\n\t\t\tcase 6343:\n\t\t\tcase 5010:\n\t\t\tcase 13266:\n\t\t\t\t$title_list = array(2205, 6343, 5010, 13266);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Annales de la Société royale malacologique de Belgique\n\t\t\tcase 6301:\n\t\t\tcase 6205:\n\t\t\tcase 7031:\n\t\t\t\t$title_list = array(6301,6205,7031);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Archives néerlandaises des sciences exactes et naturelles\n\t\t\tcase 7407:\n\t\t\tcase 82374:\n\t\t\t\t$title_list = array(7407, 82374);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Atti del Reale Istituto Veneto di Scienze, Lettere ed Arti\n\t\t\tcase 7926:\n\t\t\tcase 8237:\n\t\t\t\t$title_list = array(7926, 8237);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t// Annales de la Société entomologique de Belgique.\n\t\t\tcase 51679:\n\t\t\tcase 11933:\n\t\t\t\t$title_list = array(51679, 11933);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Annales des Sciences naturelles\n\t\t\tcase 6343:\n\t\t\tcase 2205:\n\t\t\tcase 13266:\n\t\t\tcase 4647:\n\t\t\tcase 5010:\n\t\t\t\t$title_list = array(6343, 2205, 13266, 4647, 5010);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Annales du Muséum National d'Histoire Naturelle\n\t\t\tcase 4378:\n\t\t\tcase 41507:\n\t\t\t\t$title_list = array(4378, 41507);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Annuaire du Conservatoire et du jardin botaniques de Genève\n\t\t\tcase 5111:\n\t\t\tcase 52147:\n\t\t\t\t$title_list = array(5111, 52147);\n\t\t\t\tbreak;\n\n\t\t\t// Ann. Mag. Nat. Hist.\n\t\t\tcase 2195:\n\t\t\tcase 15774:\n\t\t\t\t$title_list = array(2195, 15774);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Anales de la Sociedad Científica Argentina\n\t\t\tcase 44792:\n\t\t\tcase 51644:\n\t\t\tcase 3630:\n\t\t\t\t$title_list = array(44792, 51644, 3630);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Anales del Museo Nacional de Historia Natural de Buenos Aires\n\t\t\tcase 5595:\n\t\t\tcase 5597:\n\t\t\t\t$title_list = array(5595, 5597);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Annals of the Lyceum of Natural History of New York\n\t\t\tcase 4219 :\n\t\t\tcase 15987:\n\t\t\t\t$title_list = array(4219, 15987);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Annals of the Missouri Botanical Garden\n\t\t\tcase 125530 :\n\t\t\tcase 702:\n\t\t\t\t$title_list = array(125530, 702);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Annals of the New York Academy of Sciences\n\t\t\tcase 4382 :\n\t\t\tcase 51004:\n\t\t\t\t$title_list = array(4382, 51004);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Annals of the South African Museum\n\t\t\tcase 62815:\n\t\t\tcase 6928:\n\t\t\t\t$title_list = array(62815, 6928);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Annales de l'Université de Lyon.\n\t\t\tcase 4372:\n\t\t\tcase 104713:\n\t\t\t\t$title_list = array(4372, 104713);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// \tAnnales des sciences naturelles, Zoologie\n\t\t\tcase 13266:\n\t\t\tcase 4647:\n\t\t\t\t$title_list = array(4647,13266);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Arachnologische mitteilungen\n\t\t\tcase 118453:\n\t\t\tcase 116226:\n\t\t\t\t$title_list = array(118453,116226);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Archiv für Naturgeschichte\n\t\t\tcase 6638:\n\t\t\tcase 7051:\n\t\t\tcase 2371:\n\t\t\tcase 5923:\n\t\t\tcase 12937:\n\t\t\tcase 12938:\n\t\t\t\t$title_list = array(6638,7051,2371,5923,12937,12938);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Archives de zoologie expérimentale et générale\n\t\t\tcase 5559:\n\t\t\tcase 7065:\n\t\t\tcase 79165:\n\t\t\t\t$title_list = array(5559,7065, 79165);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Archivos do Museu Nacional do Rio de Janeiro.\n\t\t\t// Arquivos do Museu Nacional\n\t\t\tcase 6524:\n\t\t\tcase 152597:\n\t\t\t\t$title_list = array(6524,152597);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t\t\n\t\t\t// Atti della Società italiana di scienze naturali\n\t\t\tcase 9582:\n\t\t\tcase 60455:\n\t\t\t\t$title_list = array(9582,60455);\n\t\t\t\tbreak;\n\n\t\t\tcase 9586:\n\t\t\tcase 16255:\n\t\t\tcase 16213:\n\t\t\tcase 157691:\n\t\t\t\t$title_list = array(9586, 16255,16213, 157691);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t// [The] Beagle\n\t\t\tcase 144396:\n\t\t\tcase 145927:\n\t\t\t\t$title_list = array(144396,145927);\n\t\t\t\tbreak;\n\n\t\t\t// Beiträge zur Kenntnis der Meeresfauna Westafrikas\n\t\t\tcase 11824:\n\t\t\tcase 7400:\n\t\t\t\t$title_list = array(11824,7400);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Bericht der Senckenbergischen Naturforschenden Gesellschaft in Frankfurt am Main\n\t\t\tcase 14292:\n\t\t\tcase 8745:\n\t\t\t\t$title_list = array(14292,8745);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Berliner entomologische Zeitschrift\n\t\t\tcase 46204:\n\t\t\tcase 46202:\n\t\t\tcase 8267:\n\t\t\t\t$title_list = array(8267,46202,46204);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Boletim do Museu Paraense Emílio Goeldi\n\t\t\tcase 127815:\n\t\t\tcase 129215:\n\t\t\tcase 129346:\n\t\t\tcase 64575:\n\t\t\t\t$title_list = array(127815,129215,64575,129346);\n\t\t\t\tbreak;\t\t\t\n\t\t\t\t\t\t\n\t\t\t// Boletin de la Sociedad de Biología de Concepción\n\t\t\tcase 45409:\n\t\t\tcase 51419:\n\t\t\t\t$title_list = array(45409,51419);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Boletín de la Sociedad Española de Historia Natural\n\t\t\tcase 5929:\n\t\t\tcase 6171:\n\t\t\t\t$title_list = array(5929,6171);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Bonner zoologische Beiträge\n\t\t\tcase 82521:\n\t\t\tcase 82240:\n\t\t\t\t$title_list = array(82521,82240);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Bonner zoologische Monographien\n\t\t\tcase 98946:\n\t\t\tcase 82295:\n\t\t\t\t$title_list = array(98946,82295);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Boston journal of natural history\n\t\t\tcase 5927:\n\t\t\tcase 46530:\n\t\t\t\t$title_list = array(5927,46530);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Botanical gazette\n\t\t\tcase 6040:\n\t\t\tcase 9540:\n\t\t\t\t$title_list = array(6040,9540);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Botanical Magazine Tokyo\n\t\t\tcase 6214:\n\t\t\tcase 63894:\n\t\t\t\t$title_list = array(6214,63894);\n\t\t\t\tbreak;\n\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t// Botanische Jahrbucher fur Systematik, Pflanzengeschichte und Pflanzengeographie\n\t\t\tcase 60:\n\t\t\tcase 68683:\n\t\t\t\t$title_list = array(60,68683);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Brotéria\n\t\t\tcase 5931:\n\t\t\tcase 7952:\n\t\t\tcase 7861:\n\t\t\t\t$title_list = array(5931,7952,7861);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Bulletins of American paleontology\n\t\t\tcase 9663:\n\t\t\tcase 39837:\n\t\t\t\t$title_list = array(9663,39837);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Bulletin de l'Académie Royale des Sciences, des Lettres et des Beaux-Arts de Belgique\n\t\t\tcase 2735:\n\t\t\tcase 5550:\n\t\t\t\t$title_list = array(2735, 5550);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t// Bulletin de l'Académie impériale des sciences de St.-Pétersbourg\n\t\t\tcase 42575:\n\t\t\tcase 49351:\n\t\t\tcase 10614:\n\t\t\t\t$title_list = array(42575,49351,10614);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Bollettino dei musei di zoologia ed anatomia comparata della R. Università di Torino\n\t\t\tcase 14698:\n\t\t\tcase 10776:\n\t\t\t\t$title_list = array(14698,10776);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Bulletin de la Société botanique de France\n\t\t\tcase 359:\n\t\t\tcase 5948:\n\t\t\tcase 9580:\n\t\t\t\t$title_list = array(359,5948,9580);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Bulletin de la Société philomathique de Paris\n\t\t\tcase 9580:\n\t\t\tcase 5064:\n\t\t\t\t$title_list = array(9580,5064);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Bulletin de la Société zoologique de France\n\t\t\tcase 51699:\n\t\t\tcase 7415:\n\t\t\tcase 10614:\n\t\t\t\t$title_list = array(51699,7415,10614);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Bulletin du Muséum National d'Histoire Naturelle\n\t\t\tcase 14109:\n\t\t\tcase 5943:\t\n\t\t\tcase 14964:\n\t\t\tcase 12908:\n\t\t\tcase 13855:\n\t\t\t\t$title_list = array(14109,5943,14964,12908,13855);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Bulletin international de l'Académie des sciences de Cracovie\n\t\t\tcase 5605:\n\t\t\tcase 5607:\n\t\t\tcase 13192:\n\t\t\t\t$title_list = array(51699,5605,5607);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Bulletin of the British Ornithologists' Club.\n\t\t\tcase 8260:\n\t\t\tcase 46639:\n\t\t\tcase 62378:\n\t\t\tcase 102724:\n\t\t\tcase 8261:\n\t\t\t\t$title_list = array(8260,46639, 62378, 102724,8261);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Bulletin of the Brooklyn Entomological Society\n\t\t\tcase 142219:\n\t\t\tcase 16211:\n\t\t\t\t$title_list = array(142219,16211);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Bulletin of the Illinois State Laboratory of Natural History\n\t\t\tcase 5041:\n\t\t\tcase 8196:\n\t\t\t\t$title_list = array(5041,8196);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Bulletin of the Natural History Museum (Entomology)\n\t\t\tcase 2192:\n\t\t\tcase 2201:\n\t\t\tcase 53882:\n\t\t\tcase 62492: // supplement\n\t\t\t\t$title_list = array(2192, 2201, 53882, 62492);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Bulletin of the Southern California Academy of Sciences\n\t\t\tcase 4949:\n\t\t\tcase 50446:\n\t\t\tcase 60457:\n\t\t\tcase 110105:\n\t\t\t\t$title_list = array(4949, 50446, 60457, 110105);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t\t\n\t\t\t// Bulletin of zoological nomenclature\n\t\t\tcase 11541:\n\t\t\tcase 51603:\n\t\t\t\t$title_list = array(11541, 51603);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Bulletin of the New York State Museum\n\t\t\tcase 8290:\n\t\t\tcase 135505:\n\t\t\t\t$title_list = array(8290, 135505);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// The Canadian field-naturalist\n\t\t\tcase 1929:\n\t\t\tcase 39970:\n\t\t\t\t$title_list = array(1929, 39970);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Comptes rendus hebdomadaires des séances de l'Académie des scien...\n\t\t\tcase 7014:\n\t\t\tcase 4466:\n\t\t\tcase 1590:\n\t\t\t\t$title_list = array(4466, 7014, 1590);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Comptes rendus des séances de la Société de biologie et de ses filiales. \n\t\t\tcase 5068:\n\t\t\tcase 8070:\n\t\t\tcase 66681:\n\t\t\t\t$title_list = array(5068, 8070,66681);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Current Herpetology\n\t\t\tcase 66716:\n\t\t\tcase 70709:\n\t\t\t\t$title_list = array(66716,70709);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Discovery Reports\n\t\t\tcase 6168:\n\t\t\tcase 15981:\n\t\t\t\t$title_list = array(6168, 15981);\n\t\t\t\tbreak;\n\n\t\t\t// Entomological News\n\t\t\tcase 34360:\n\t\t\tcase 2356:\n\t\t\tcase 2359:\n\t\t\t\t$title_list = array(34360, 2356,2359);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Fieldiana\n\t\t\tcase 5132:\n\t\t\tcase 42256:\n\t\t\t\t$title_list = array(5132, 42256);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Repertorium specierum novarum regni vegetabilis\n\t\t\tcase 276:\n\t\t\tcase 647:\n\t\t\t\t$title_list = array(276, 647);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t// Gayana\n\t\t\tcase 39684:\n\t\t\tcase 39988:\n\t\t\tcase 40896:\n\t\t\t\t$title_list=array(39988,39684, 40896);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t// The Gardens' bulletin; Straits Settlements\n\t\t\tcase 77367:\n\t\t\tcase 7056:\n\t\t\t\t$title_list=array(77367,7056);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t// Gardens' bulletin Singapore\n\t\t\t//case 77367:\n\t\t\tcase 77306:\n\t\t\tcase 127427:\n\t\t\tcase 127489:\n\t\t\t\n\t\t\tcase 128832:\n\t\t\tcase 128797:\n\t\t\tcase 128809:\n\t\t\tcase 128832:\n\t\t\tcase 128790:\n\t\t\tcase 127427:\n\t\t\tcase 127489:\n\t\t\tcase 128777:\n\t\t\tcase 130872:\n\t\t\t\n\t\t\tcase 141270:\n\t\t\t\n\t\t\tcase 152647:\n\t\t\tcase 152577:\n\t\t\t\n\t\t\t\t$title_list = array(\n\t\t\t\t//77367,\n\t\t\t\t77306,127427, 127489,128832,\n\t\t\t\t128797,\n\t\t\t\t128809,\n\t\t\t\t128832,\n\t\t\t\t128790,\n\t\t\t\t127427,\n\t\t\t\t127489,\n\t\t\t\t128777,\n\t\t\t\t130872,\n\t\t\t\t141270,\n\t\t\t\t152647,\n\t\t\t\t152577\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Goeldiana zoologia\n\t\t\tcase 125545:\n\t\t\tcase 131446:\n\t\t\tcase 134508:\n\t\t\t\t$title_list=array(125545,131446, 134508);\n\t\t\t\tbreak;\n\n\t\t\t// Insektenbörse\n\t\t\tcase 13337:\n\t\t\tcase 68618:\n\t\t\t\t$title_list=array(13337,68618);\n\t\t\t\tbreak;\n\n\t\t\t\t\n\t\t\tcase 51724:\n\t\t\tcase 49986:\n\t\t\t\t$title_list=array(51724,49986);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Jahrbuch der Hamburgischen Wissenschaftlichen Anstalten\n\t\t\tcase 7925:\n\t\t\tcase 9594:\n\t\t\t\t$title_list=array(7925,9594);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t// Journal für Ornithologie.\n\t\t\tcase 11280 :\n\t\t\tcase 14025:\n\t\t\tcase 47027:\n\t\t\t\t$title_list=array(11280 ,14025, 47027);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Journal of botany\t\n\t\t\t// Journal of botany, British and foreign\n\t\t\tcase 234: // not same journal but to help discovery\n\t\t\tcase 235: // not same journal but to help discovery\n\t\t\tcase 8066 :\n\t\t\tcase 15787:\n\t\t\t\t$title_list=array(8066 ,15787, 234, 235);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t// Journal of the Asiatic Society of Bengal\n\t\t\t// Journal and proceedings of the Asiatic Society of Bengal\n\t\t\tcase 51678 :\n\t\t\tcase 47024:\n\t\t\t\t$title_list=array(47024 ,51678);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// The journal of the Bombay Natural History Society.\n\t\t\tcase 7414:\n\t\t\tcase 122995:\n\t\t\t\t$title_list=array(122995,7414);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Journal of the Botanical Research Institute of Texas\n\t\t\tcase 50590 :\n\t\t\tcase 63883:\n\t\t\tcase 109678:\n\t\t\tcase 109775:\n\t\t\tcase 109289:\n\t\t\tcase 107602:\n\t\t\tcase 106809:\n\t\t\tcase 139274:\n\t\t\tcase 156612:\n\t\t\tcase 156608:\n\t\t\t\t$title_list=array(50590,63883,109678,109775,109289,107602,106809,139274,\n\t\t\t\t156612,\n\t\t\t\t156608,\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// The journal of the College of Agriculture, Tohoku Imperial University, Sapporo, Japan\n\t\t\tcase 8338 :\n\t\t\tcase 98298:\n\t\t\t\t$title_list=array(8338,98298);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Journal of East Africa Natural History\n\t\t\t// The Journal of the East Africa and Uganda Natural History Society\n\t\t\tcase 53426:\n\t\t\tcase 14163:\n\t\t\tcase 119018:\n\t\t\tcase 119012:\n\t\t\t\t$title_list=array(53426,14163,119018,119012);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t// Journal of the Linnean Society\n\t\t\tcase 45411:\n\t\t\tcase 350:\n\t\t\tcase 349:\n\t\t\t\t$title_list=array(45411, 350, 349);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Journal of the New York Entomological Society.\n\t\t\tcase 8089 :\n\t\t\tcase 122978:\n\t\t\t\t$title_list=array(8089,122978);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\n\t\t\t// Journal of the Royal Society of Western Australia\n\t\t\tcase 77508 :\n\t\t\tcase 122986:\n\t\t\t\t$title_list=array(77508,122986);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Journal of the Washington Academy of Sciences\n\t\t\tcase 2087:\n\t\t\tcase 60244:\n\t\t\t\t$title_list=array(2087,60244);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Kungliga Svenska Vetenskaps-Akademiens handlingar\n\t\t\tcase 2512:\n\t\t\tcase 12549:\n\t\t\tcase 50688:\n\t\t\t\t$title_list=array(2512,12549, 50688);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// London and Edinburgh Philosophical Magazine and Journal of Science\n\t\t\tcase 2440:\n\t\t\tcase 58332:\n\t\t\tcase 3735:\n\t\t\t\t$title_list=array(2440,58332, 3735);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Malakozoologische Blätter\n\t\t\tcase 51643:\n\t\t\tcase 15800:\n\t\t\t\t$title_list=array(51643,15800);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Memoirs of the Asiatic Society of Bengal\n\t\t\tcase 65764:\n\t\t\tcase 103412:\n\t\t\t\t$title_list=array(65764,103412);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Memoirs And Proceedings of The Manchester Literary And Philosophical Society\n\t\t\tcase 50366:\n\t\t\tcase 9535:\n\t\t\t\t$title_list=array(50366,9535);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t// Mem. Calif. Acad. Sci.\n\t\t\tcase 3955:\n\t\t\tcase 3949:\n\t\t\t\t$title_list=array(3955,3949);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Mémoires de l'Académie royale des sciences, des lettres et des beaux-arts de Belgique\n\t\t\tcase 2743 :\n\t\t\tcase 2732:\n\t\t\tcase 5551:\n\t\t\t\t$title_list = array(2743,2732,5551);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Memórias do Instituto Butantan\n\t\t\tcase 97055:\n\t\t\tcase 122512:\n\t\t\tcase 146497:\n\t\t\t\t$title_list=array(97055,122512,146497);\n\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t// Memoirs on the coleoptera\n\t\t\tcase 1159:\n\t\t\tcase 48776:\n\t\t\tcase 15993:\n\t\t\t\t$title_list = array(1159,48776,15993);\n\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t// Memoirs of the Queensland Museum\n\t\t\tcase 12912 :\n\t\t\tcase 60751:\n\t\t\tcase 61449:\n\t\t\tcase 101455:\n\t\t\tcase 107966:\n\t\t\tcase 137899:\n\t\t\t\t$title_list = array(12912,60751,61449,101455, 107966, 137899);\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t// Misc Pub Kansas (some of these are treated as individual titles)\n\t\t\tcase 4050:\n\t\t\tcase 16171:\n\t\t\tcase 16222:\n\t\t\tcase 5474:\n\t\t\t\t$title_list = array(4050, 16171, 16222, 5474);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t// Mitteilungen aus dem Naturhistorischen Museum in Hamburg\n\t\t\tcase 8009:\n\t\t\tcase 9579:\n\t\t\tcase 42281:\n\t\t\t\t$title_list = array(8009, 9579, 42281);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t// Mitteilungen aus dem Zoologischen Museum in Berlin.\n\t\t\tcase 11448:\n\t\t\tcase 42540:\n\t\t\t\t$title_list = array(11448,42540);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Mitteilungen des Naturwissenschaftlichen Vereines für Steiermark\n\t\t\tcase 12305:\n\t\t\tcase 42384:\n\t\t\t\t$title_list = array(12305,42384);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Meddelanden af Societatis pro Fauna et Flora Fennica\n\t\t\tcase 3613:\n\t\t\tcase 13470:\n\t\t\t\t$title_list = array(3613, 13470);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t// Mémoires du Muséum d'histoire naturelle.\n\t\t\tcase 4501:\n\t\t\tcase 50067:\n\t\t\t\t$title_list = array(4501, 50067);\n\t\t\t\tbreak;\t\n\n\t\t\t// Memoirs of the National Museum of Victoria\n\t\t\t// Memoirs of the National Museum, Melbourne\n\t\t\t// Memoirs of the National Museum, Melbourne\n\t\t\tcase 58640:\n\t\t\tcase 13041:\n\t\t\tcase 57949:\n\t\t\tcase 65479:\n\t\t\tcase 59883:\n\t\t\t\t$title_list = array(58640, 13041, 57949,65479,59883);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t/*\n\t\t\t// Memoirs of Museum Victoria\n\t\t\tcase 109981:\n\t\t\tcase 65479:\n\t\t\tcase 59883:\t\t\n\t\t\t\t$title_list = array(109981, 65479, 59883);\n\t\t\t\tbreak;\t\n\t\t\t*/\n\t\t\t\t\n\t\t\t// Monatsberichte der Königlichen Preussische Akademie des Wissenschaften zu Berlin\n\t\t\tcase 48522:\n\t\t\tcase 51443:\n\t\t\t\t$title_list = array(48522, 51443);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t// Natural history report.\n\t\t\tcase 1163:\n\t\t\tcase 42665:\n\t\t\t\t$title_list = array(1163, 42665);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t// Nova acta Academiae Caesareae Leopoldino-Carolinae Germanicae Naturae Curiosorum\n\t\t\tcase 12266:\n\t\t\tcase 86329:\n\t\t\t\t$title_list = array(12266, 86329);\n\t\t\t\tbreak;\t\n\t\t\t\n\t\t\t\t\n\t\t\t// Occasional Papers of the Boston Society of Natural History\n\t\t\tcase 7539:\n\t\t\tcase 50720:\n\t\t\t\t$title_list = array(7539, 50720);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t// Occasional papers of the California Academy of Sciences\n\t\t\tcase 4672:\n\t\t\tcase 5584:\n\t\t\t\t$title_list = array(4672, 5584);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t// Occasional papers of the Museum of Natural History, the University of Kansas.\n\t\t\tcase 7410:\n\t\t\tcase 15798:\n\t\t\t\t$title_list = array(7410, 15798);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t// Occasional papers / the Museum, Texas Tech University\n\t\t\tcase 147045:\n\t\t\tcase 147060:\n\t\t\tcase 147024:\n\t\t\tcase 147002:\n\t\t\tcase 146997:\n\t\t\tcase 146994:\n\t\t\tcase 140981:\n\t\t\tcase 156843:\n\t\t\tcase 156835:\n\t\t\tcase 156831:\n\t\t\tcase 156825:\n\t\t\tcase 156821:\n\t\t\tcase 156816:\n\t\t\tcase 156822:\n\t\t\t\ncase 157011:\ncase 157007:\ncase 157005:\ncase 157004:\ncase 157003:\ncase 156999:\ncase 156995:\ncase 156994:\ncase 156993:\ncase 156992:\ncase 156988:\ncase 156987:\ncase 156983:\ncase 156982:\ncase 156981:\ncase 156980:\ncase 156979:\ncase 156978:\ncase 156977:\ncase 156976:\ncase 156974:\ncase 156973:\ncase 156972:\ncase 156969:\ncase 156967:\ncase 156966:\ncase 156965:\ncase 156963:\ncase 156960:\ncase 156958:\ncase 156953:\ncase 156952:\ncase 156951:\ncase 156948:\ncase 156947:\ncase 156939:\ncase 156938:\ncase 156937:\ncase 156936:\ncase 156933:\ncase 156931:\ncase 156930:\ncase 156929:\ncase 156924:\ncase 156923:\ncase 156921:\ncase 156920:\ncase 156918:\ncase 156917:\ncase 156915:\ncase 156913:\ncase 156912:\ncase 156909:\ncase 156906:\ncase 156905:\ncase 156904:\ncase 156903:\ncase 156902:\ncase 156899:\ncase 156898:\ncase 156897:\ncase 156896:\ncase 156891:\ncase 156890:\ncase 156889:\ncase 156888:\ncase 156886:\ncase 156872:\ncase 140981:\ncase 140981:\ncase 140981:\ncase 140981:\ncase 156825:\ncase 140981:\ncase 140981:\ncase 140981:\ncase 140981:\n\ncase 156823:\t\n\ncase 156969:\ncase 156972:\ncase 156973:\ncase 156974:\ncase 156976:\ncase 156977:\ncase 156978:\ncase 156979:\ncase 156980:\ncase 156981:\ncase 156982:\ncase 156983:\ncase 156987:\ncase 156988:\ncase 156992:\ncase 156993:\ncase 156994:\ncase 156995:\n\ncase 156999:\ncase 157003:\ncase 157004:\ncase 157005:\ncase 157007:\ncase 157011:\ncase 157268:\ncase 157269:\ncase 157270:\ncase 157382:\ncase 157383:\ncase 157395:\ncase 157431:\ncase 157489:\ncase 157532:\ncase 157562:\t\n\ncase 157622:\ncase 157623:\ncase 157624:\ncase 157625:\ncase 157626:\ncase 157627:\ncase 157629:\ncase 157630:\ncase 157631:\ncase 157632:\ncase 157633:\ncase 157634:\ncase 157635:\ncase 157651:\ncase 157652:\ncase 157662:\ncase 157663:\ncase 157664:\ncase 157665:\ncase 157666:\ncase 157667:\ncase 157668:\ncase 157668:\ncase 157671:\ncase 157672:\ncase 157675:\ncase 157676:\ncase 157677:\ncase 157678:\ncase 157697:\ncase 157698:\ncase 157711:\ncase 157712:\ncase 157713:\ncase 157727:\ncase 157728:\ncase 157729:\ncase 157738:\ncase 157739:\ncase 157744:\ncase 157745:\ncase 157746:\ncase 157747:\ncase 157752:\ncase 157753:\ncase 157756:\t\n\t\t\t\t\t\t\n\t\t\t\t$title_list = array(\t\t\t\n\t\t\t\t147045,\n\t\t\t\t147060,\n\t\t\t\t147024,\n\t\t\t\t147002,\n\t\t\t\t146997,\n\t\t\t\t146994,\n\t\t\t\t140981,\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t156843,\n\t\t\t\t156835,\n\t\t\t\t156831,\n\t\t\t\t156825,\n\t\t\t\t156821,\n\t\t\t\t156816,\t\n\t\t\t\t\n\t\t\t\t156822,\t\n\t\t\t\t\n157011,\n157007,\n157005,\n157004,\n157003,\n156999,\n156995,\n156994,\n156993,\n156992,\n156988,\n156987,\n156983,\n156982,\n156981,\n156980,\n156979,\n156978,\n156977,\n156976,\n156974,\n156973,\n156972,\n156969,\n156967,\n156966,\n156965,\n156963,\n156960,\n156958,\n156953,\n156952,\n156951,\n156948,\n156947,\n156939,\n156938,\n156937,\n156936,\n156933,\n156931,\n156930,\n156929,\n156924,\n156923,\n156921,\n156920,\n156918,\n156917,\n156915,\n156913,\n156912,\n156909,\n156906,\n156905,\n156904,\n156903,\n156902,\n156899,\n156898,\n156897,\n156896,\n156891,\n156890,\n156889,\n156888,\n156886,\n156872,\n140981,\n140981,\n140981,\n140981,\n156825,\n140981,\n140981,\n140981,\n140981,\t\t\n\n156823,\t\t\n\n156969,\n156972,\n156973,\n156974,\n156976,\n156977,\n156978,\n156979,\n156980,\n156981,\n156982,\n156983,\n156987,\n156988,\n156992,\n156993,\n156994,\n156995,\n\n156999,\n157003,\n157004,\n157005,\n157007,\n157011,\n157268,\n157269,\n157270,\n157382,\n157383,\n157395,\n157431,\n157489,\n157532,\n157562,\t\t\n\n157622,\n157623,\n157624,\n157625,\n157626,\n157627,\n157629,\n157630,\n157631,\n157632,\n157633,\n157634,\n157635,\n157651,\n157652,\n157662,\n157663,\n157664,\n157665,\n157666,\n157667,\n157668,\n157668,\n157671,\n157672,\n157675,\n157676,\n157677,\n157678,\n157697,\n157698,\n157711,\n157712,\n157713,\n157727,\n157728,\n157729,\n157738,\n157739,\n157744,\n157745,\n157746,\n157747,\n157752,\n157753,\n157756,\n\t\t\t\t\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Öfversigt af Kongl. Vetenskaps-akademiens forhandlingar\n\t\t\tcase 2515:\n\t\t\tcase 15534:\n\t\t\t\t$title_list = array(2515, 15534);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t// Ornis\n\t\t\tcase 16093:\n\t\t\tcase 8629:\n\t\t\t\t$title_list = array(16093, 8629);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t// Ornithologische Monatsberichte\n\t\t\tcase 8609:\n\t\t\tcase 46941:\n\t\t\t\t$title_list = array(8609, 46941);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t// Nature\n\t\t\tcase 21368:\n\t\t\tcase 40302:\n\t\t\t\t$title_list = array(21368, 40302);\n\t\t\t\tbreak;\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t// Neues Jahrbuch für Mineralogie, Geognosie, Geologie und Petrefaktenkunde.\n\n\t\t\tcase 51831:\n\t\t\tcase 51830:\n\t\t\t\t$title_list = array(51831, 51830);\n\t\t\t\tbreak;\t\n\t\t\t\n\t\t\t\t\n\t\t\t// Nota lepidopterologica.\n\t\t\tcase 79076:\n\t\t\tcase 63275:\n\t\t\t\t$title_list = array(79076, 63275);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t// Notes from the Leyden Museum\n\t\t\tcase 8740:\n\t\t\tcase 12935:\n\t\t\t\t$title_list = array(8740, 12935);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t// Palaeontographica\n\t\t\tcase 11490:\n\t\t\tcase 48672:\n\t\t\tcase 51557:\n\t\t\t\t$title_list = array(11490, 48672, 51557);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t// The Philippine journal of science\n\t\t\tcase 69:\n\t\t\tcase 50545:\n\t\t\t\t$title_list = array(69, 50545);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// The Philosophical magazine\n\t\t\tcase 982:\n\t\t\tcase 58331:\n\t\t\tcase 58328:\n\t\t\t\t$title_list = array(982, 58331, 58328);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t\t\n\t\t\t// Pom\n\t\t\tcase 9567:\n\t\t\tcase 8154:\n\t\t\tcase 12098:\n\t\t\t\t$title_list = array(9567, 8154,12098);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Proceedings of the American Academy of Arts and Sciences\n\t\t\tcase 3640:\n\t\t\tcase 3934:\n\t\t\t\t$title_list = array(3934, 3640);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Proceedings of the Biological Society of Washington\n\t\t\tcase 2211:\n\t\t\tcase 3622:\n\t\t\tcase 50687:\n\t\t\t\t$title_list = array(2211, 3622, 50687);\n\t\t\t\tbreak;\n\n\t\t\t// Proceedings of the California Academy of Sciences\n\t\t\tcase 3952:\n\t\t\tcase 7411:\n\t\t\tcase 15816:\n\t\t\tcase 3966:\n\t\t\tcase 4274:\n\t\t\tcase 3943:\n\t\t\tcase 12931:\n\t\t\tcase 45400:\n\t\t\tcase 150741:\n\t\t\tcase 154994:\n\t\t\t\t$title_list = array(3952, 7411, 15816, 3966, 4274, 3943, 12931, 45400, 150741, 154994);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Proceedings of the Royal Society of Victoria. New series.\n\t\t\tcase 8096:\n\t\t\tcase 138908:\n\t\t\t\t$title_list = array(8096,138908);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Proceedings of the Royal Irish Academy\n\t\t\tcase 2375:\n\t\t\tcase 60468:\n\t\t\t\t$title_list = array(2375,60468);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Proceedings of the Linnean Society of New South Wales\n\t\t\tcase 2375:\n\t\t\tcase 60468:\n\t\t\tcase 169620:\n\t\t\tcase 6525:\n\t\t\t\n\t\t\t\t$title_list = array(2375,60468, 169620, 6525);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Proceedings of the Zoological Society of London\n\t\t\tcase 1594:\n\t\t\tcase 44963:\n\t\t\t\t$title_list = array(1594,44963);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Quarterly journal of microscopical science\n\t\t\tcase 13831:\n\t\t\tcase 14014:\n\t\t\t\t$title_list = array(13831,14014);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t// Records of the Indian Museum\n\t\t\tcase 53477:\n\t\t\tcase 10294:\n\t\t\t\t$title_list=array(53477,10294);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Records of the Queen Victoria Museum Launceston\n\t\t\tcase 143263:\n\t\t\tcase 144635:\n\t\t\tcase 145701:\n\t\t\t\t$title_list=array(143263,144635,145701);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Records of the South Australian Museum\n\t\t\tcase 14053:\n\t\t\tcase 42375:\n\t\t\tcase 61893:\n\t\t\t\t$title_list=array(14053,42375,61893);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Records of the Western Australian Museum\t\n\t\t\tcase 125400:\n\t\t\tcase 141878:\n\t\t\t\t$title_list=array(125400,141878);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Reise der oesterreichischen Fregatte Novara\n\t\t\tcase 5376:\n\t\t\tcase 1597:\n\t\t\tcase 9173:\n\t\t\t\t$title_list=array(5376,1597,9173);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Report of the Commissioner for ...\n\t\t\tcase 6927:\n\t\t\tcase 15220:\n\t\t\t\t$title_list=array(6927,15220);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Revista do Museu Paulista\n\t\t\tcase 10241:\n\t\t\tcase 107243:\n\t\t\t\t$title_list=array(10241,107243);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Revue d'entomologie\n\t\t\tcase 10428:\n\t\t\tcase 11902:\n\t\t\tcase 14588:\n\t\t\t\t$title_list=array(10428,11902, 14588);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Revue et magasin de zoologie pure et appliquée\n\t\t\tcase 51560:\n\t\t\tcase 51630:\n\t\t\tcase 2744:\n\t\t\tcase 2212:\n\t\t\t\t$title_list = array(2744, 51630, 51560, 2212);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Revue suisse de zoologie\n\t\t\tcase 8981:\n\t\t\tcase 62174:\n\t\t\tcase 69643:\n\t\t\t\t$title_list=array(8981,62174,69643);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Russkoe entomologicheskoe obozrenie = Revue russe d'entomologie.\n\t\t\tcase 11807:\n\t\t\tcase 11489:\n\t\t\t\t$title_list=array(11807,11489);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// The Scientific proceedings of the Royal Dublin Society\n\t\t\tcase 14895:\n\t\t\tcase 44062:\n\t\t\t\t$title_list = array(14895, 44062);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Scopus\n\t\t\tcase 64405:\n\t\t\tcase 99906:\n\t\t\t\t$title_list=array(64405,99906);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// The Scottish Naturalist\n\t\t\tcase 6920:\n\t\t\tcase 6924:\n\t\t\t\t$title_list = array(6920, 6924);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t// Sitzungsberichte der Gesellschaft Naturforschender Freunde zu Berlin\n\t\t\tcase 9584:\n\t\t\tcase 7922:\n\t\t\t\t$title_list = array(7922, 9584);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Sitzungsberichte der Kaiserlichen Akademie der Wissenschaften. Mathematisch-Naturwissenschaftliche Classe\n\t\t\tcase 6884:\n\t\t\tcase 8219:\n\t\t\tcase 6888:\n\t\t\tcase 6776:\n\t\t\tcase 8100:\n\t\t\tcase 7337:\n\t\t\t\t$title_list = array(6884, 8219, 6888, 6776, 8100,7337);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t// Special publications - The Museum, Texas Tech University\n\t\t\tcase 142707:\n\t\t\tcase 156869:\n\t\t\tcase 156873:\n\t\t\tcase 156875:\n\t\t\tcase 156869:\n\t\t\t\t$title_list = array(\n\t\t\t\t\t142707,\n\t\t\t\t\t156869,\n\t\t\t\t\t156873,\n\t\t\t\t\t156875,\n\t\t\t\t\t156869,\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Stettiner Entomologische Zeitung\n\t\t\tcase 8630:\n\t\t\tcase 8641:\n\t\t\t\t$title_list = array(8630, 8641);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// The South Australian Naturalist\n\t\t\tcase 14015:\n\t\t\tcase 65144:\n\t\t\t\t$title_list = array(14015, 65144);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Stuttgarter Beiträge zur Naturkunde\n\t\t\tcase 49392:\n\t\t\tcase 51723:\n\t\t\tcase 49174:\n\t\t\tcase 43750:\n\t\t\t\t$title_list = array(49392, 51723, 49174, 43750);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Természetrajzi füzetek\n\t\t\tcase 11105:\n\t\t\tcase 13503:\n\t\t\t\t$title_list = array(11105, 13503);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// Tijdschrift voor entomologie.\n\t\t\tcase 10088:\n\t\t\tcase 39564:\n\t\t\t\t$title_list = array(10088, 39564);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Trabajos del Museo de Ciencias Naturales\n\t\t\tcase 13508:\n\t\t\tcase 15242:\n\t\t\t\t$title_list = array(13508, 15242);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Transactions of the Albany Institute\n\t\t\tcase 5590:\n\t\t\tcase 69278:\n\t\t\t\t$title_list = array(5590, 69278);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Transactions of the New York Academy of Sciences\n\t\t\tcase 5609:\n\t\t\tcase 12303:\n\t\t\t\t$title_list = array(5609, 12303);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Transactions and proceedings and report of the Royal Society of South Australia (Incorporated)\n\t\t\tcase 51476:\n\t\t\tcase 16197:\n\t\t\tcase 16190:\n\t\t\tcase 51127:\n\t\t\tcase 51669:\n\t\t\t\t$title_list = array(51476, 16197,16190, 51127, 51669);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t\t\n\t\t\t// Transactions and proceedings of the New Zealand Institute\n\t\t\tcase 48984:\n\t\t\tcase 4095:\n\t\t\t\t$title_list = array(48984, 4095);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Transactions of Kansas Academy of Sciences\n\t\t\tcase 8255:\n\t\t\tcase 8256:\n\t\t\t\t$title_list = array(8255, 8256);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Transactions of the Academy of Science of Saint Louis\n\t\t\tcase 3634:\n\t\t\tcase 6336:\n\t\t\tcase 42204:\n\t\t\t\t$title_list = array(3634, 6336, 42204);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t// Transactions of the American Entomological Society\n\t\t\tcase 7830:\n\t\t\tcase 7549:\n\t\t\tcase 5795:\n\t\t\t\t$title_list = array(5795, 7549, 7830);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t\t\n\t\t\t// Transactions of the Connecticut Academy of Arts and Sciences\n\t\t\tcase 7541:\n\t\t\tcase 5604:\n\t\t\tcase 13505:\n\t\t\t\t$title_list = array(7541, 5604, 13505);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Transactions of The Linnean Society of London\n\t\t\tcase 2203: //-> 683\n\t\t\tcase 8257: //-> -> 51416\n\t\t\tcase 683:\n\t\t\tcase 51416:\n\t\t\t\t$title_list=array(683,51416);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Transactions of the Royal Society of South Australia\n\t\t\tcase 16197:\n\t\t\tcase 16186:\n\t\t\tcase 51127:\n\t\t\tcase 16190:\n\t\t\tcase 62638:\n\t\t\tcase 63905:\n\t\t\tcase 63906:\n\t\t\t\t$title_list=array(16197, 16186,51127, 16190, 62638, 63905, 63906);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Transactions of the San Diego Society of Natural History\n\t\t\tcase 51441:\n\t\t\tcase 3144:\n\t\t\t\t$title_list = array(51441, 3144);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Transactions of the Zoological Society of London\n\t\t\tcase 12650:\n\t\t\tcase 45493:\n\t\t\t\t$title_list = array(12650, 45493);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// The Kansas University science bulletin\n\t\t\tcase 3179:\n\t\t\tcase 15415:\n\t\t\t\t$title_list = array(3179, 15415);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Tulane\n\t\t\tcase 3119:\n\t\t\tcase 5361:\n\t\t\t\t$title_list = array(3119, 5361);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Veliger\n\t\t\tcase 66841:\n\t\t\tcase 69283:\n\t\t\tcase 67217:\n\t\t\t\t$title_list = array(66841, 69283, 67217);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Verhandelingen der Koninklijke Akademie van Wetenschappen\n\t\t\tcase 2522:\n\t\t\tcase 8938:\n\t\t\t\t$title_list = array(2522, 8938);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t// Verhandlungen der Naturforschenden Gesellschaft in Basel.\n\t\t\tcase 8939:\n\t\t\tcase 46540:\n\t\t\t\t$title_list = array(8939, 46540);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Verhandlungen des Zoologisch-Botanischen Vereins in Wien\n\t\t\tcase 11285:\n\t\t\tcase 13275:\n\t\t\tcase 44800:\n\t\t\t\t$title_list = array(11285, 13275, 44800);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Veröffentlichungen der Zoologischen Staatssammlung München\n\t\t\tcase 39971:\n\t\t\tcase 51449:\n\t\t\t\t$title_list = array(39971, 51449);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// The Victorian Naturalist\n\t\t\tcase 5027:\n\t\t\tcase 8941:\n\t\t\tcase 60605:\n\t\t\tcase 43746:\n\t\t\t\t$title_list = array(5027, 8941, 60605, 43746);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Videnskabelige meddelelser fra den Naturhistoriske forening\n\t\t\tcase 7547:\n\t\t\tcase 52368:\n\t\t\tcase 2226:\n\t\t\t\t$title_list = array(7547, 52368, 2226);\n\t\t\t\tbreak;\n\n\t\t\t// Zeitschrift für wissenschaftliche Zoologie\n\t\t\tcase 2334:\n\t\t\tcase 9197:\n\t\t\t\t$title_list = array(2334, 9197);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Zoologica\n\t\t\t// These are two difefrent journals but this kght help us catch some \n\t\t\tcase 'Zoologica':\n\t\t\tcase 8079 :\n\t\t\tcase 42858:\n\t\t\tcase 122735:\n\t\t\t\t$title_list = array(8079, 42858, 122735);\n\t\t\t\tunset($obj->ISSN);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Zoological results of the fishing experiments carried on by F.I.S. \"Endeavour,\"\n\t\t\tcase 6512:\n\t\t\tcase 11387:\n\t\t\t\t$title_list = array(6512, 11387);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Zoologische Jahrbücher\n\t\t\tcase 8980:\n\t\t\t//case 13352:\n\t\t\tcase 47068:\n\t\t\t\t$title_list = array(8980, 13352, 47068);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t\t\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\tif (count($title_list) != 0)\n\t\t{\n\t\t\t$obj->ItemIDs = array();\n\t\t\tforeach ($title_list as $id)\n\t\t\t{\n\t\t\t\t//echo \"<h2>Title list $id</h2>\";\n\t\t\t\t$obj->ItemIDs = array_merge(bhl_itemid_from_volume($id, $volume, $series), $obj->ItemIDs);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//echo __LINE__;\n\t\n\t// FORCE\n\t// hack\n\t// specify\n\t// If we set an ItemID here we restrict searches to that item,\n\t// handy if the same volume numbering is reused, \n\t// e.g. Bulletin du Muséum National d'Histoire Naturelle\n\t//$obj->ItemIDs = bhl_itemid_from_itemid(254261);\n\t//$obj->ItemIDs = bhl_itemid_from_itemid(266029);\n\t\n\tif (0)\n\t{\n\t\t$obj->ItemIDs = array();\n\t\n\t\t$a = array(\n\t\t266029,\n\t\t266101,\n\t\t266106,\n\t\t266124,\n\t\t266154,\n\t\t);\n\n\t\t$a = array(\n\t\t267059,\n\t\t267049\n\t\t);\n\t\t\n\t\t$a = array(\n\t\t//27191,\n\t\t//27174\n\t\t//27212\n\t\t//244612,\n\t\t\n//214042,\n//244728,\n//213700,\n//213983,\n\n//213935,\n//214800,\n//214591,\n//216333,\n//216867,\n// 216893, // 10\n//217367,\n\n//237816,\n\n//252663, // 13\n//219074, // 14\n//220796,\n//233774, // 16\n//230738,\n//229446,\n//232285, // 19\n//235567,\n//235813, // 21\n//237339, // 22\n\n//237300,\n//237712, // 24\n//238386, // 25\n//239914, // 26\n//239535, // 27\n//239950, // 28\n//240164, // 29\n//240169, // 30\n//240445, // 31\n//240473, //32\n//240925,\n//241023,\n//241901, // 35\n//241902,\n//242455,\n//242583,\n//242405,\n//244736,\n//247209,\n//251385,\n\n//259961\n//259987\n//260069\n\n\n// missed\n//241023,\n\n\t\t);\n\t\t\n\t\t\n\t\t$a = array(\n//27194, // 14 series 1\n//27198, // 15\n//27184, // 16\n//106649, // 17\n//106493, // 18\n//27226,\n//106496, // 20\n//27185, // 21\n//137435,\n//27188, // 22\n//27203, // 23\n//27205, // 24\n//27186, // 25\n//27200, // 26\n//137428,\n//27554, // 27\n106546, // 28\n//213221, // 29\n//213222, // 30\n//212974, // 31\n//212975, // 32\n//213956, // 33\n//213840,// 34\n);\n\t\t$a=array(35036);\n\t\t\n\t\t$a=array(311640);\n\t\t\n\t\t\n\t\t\n\t\tforeach ($a as $itemid)\n\t\t{\n\t\t\t$it = bhl_itemid_from_itemid($itemid);\t\n\t\t\t$obj->ItemIDs[] = $it[0];\n\t\t}\n\t}\t\n\t\n\t\n\t\n\t\n\t\n\tif ($debug)\n\t{\n\t\techo \"Line \" . __LINE__ . \"<br/>\";\n\t\techo '<h2>Title list</h2>';\n\t\tprint_r($title_list);\n\t\tprint_r($obj->ItemIDs);\n\t}\n\t\t\n\t// At this point if we have any items then we have a potential hit. For each item in the list we\n\t// query the BHL database and look for pages with PageNumber matching our query\n\t$num_items = count($obj->ItemIDs);\n\tif ($num_items != 0)\n\t{\n\t\tfor ($i = 0; $i < $num_items; $i++)\n\t\t{\n\t\t\t// default\n\t\t\t\n\t\t\t$sql = 'SELECT * FROM bhl_page \n\t\t\tINNER JOIN page USING(PageID)\n\t\t\tWHERE (bhl_page.ItemID = ' . $obj->ItemIDs[$i]->ItemID . ') \n\t\t\tAND (PageNumber = ' . $db->qstr($page) . ')\n\t\t\tORDER BY SequenceOrder';\n\t\t\t\n\t\t\t$sql = 'SELECT * FROM bhl_page \n\t\t\tINNER JOIN page USING(PageID)\n\t\t\tWHERE (bhl_page.ItemID = ' . $obj->ItemIDs[$i]->ItemID . ') \n\t\t\tAND (PageNumber = ' . $db->qstr($page) . ')\n\t\t\tOR (PageNumber = ' . $db->qstr('%[' . $page . ']') . ')\n\t\t\tORDER BY SequenceOrder';\n\n\t\t\t$sql = 'SELECT * FROM bhl_page \n\t\t\tINNER JOIN page USING(PageID)\n\t\t\tWHERE (bhl_page.ItemID = ' . $obj->ItemIDs[$i]->ItemID . ') \n\t\t\tAND (\n\t\t\t (PageNumber = ' . $db->qstr($page) . ')\n\t\t\t OR (PageNumber = ' . $db->qstr('[' . $page . ']') . ')\n\t\t\t OR (PageNumber = ' . $db->qstr('Page%' . $page) . ')\n\t\t\t OR (PageNumber = ' . $db->qstr('p.%' . $page) . ')\n\t\t\t \n\t\t\t)\n\t\t\tORDER BY SequenceOrder';\n\t\t\t\n\t\t\tif ($debug)\n\t\t\t{\n\t\t\t\techo $sql;\n\t\t\t}\n\t\t\t\n\t\t\t//exit();\n\t\t\t\n\t\t\t$result = $db->Execute($sql);\n\t\t\tif ($result == false) die(\"failed [\" . __FILE__ . \":\" . __LINE__ . \"]: \" . $sql);\n\t\t\t\n\t\t\t/*\n\t\t\t\n\t\t\t// if no hit try difefrent formatting\n\t\t\tif ($result->NumRows() == 0)\n\t\t\t{\n\t\t\t\t$sql = 'SELECT * FROM bhl_page \n\t\t\t\tINNER JOIN page USING(PageID)\n\t\t\t\tWHERE (bhl_page.ItemID = ' . $obj->ItemIDs[$i]->ItemID . ') \n\t\t\t\tAND (PageNumber = ' . $db->qstr('[' . $page . ']') . ')\n\t\t\t\tORDER BY SequenceOrder';\n\n\t\t\t\t$result = $db->Execute($sql);\n\t\t\t\tif ($result == false) die(\"failed [\" . __FILE__ . \":\" . __LINE__ . \"]: \" . $sql);\n\t\t\t\n\t\t\t}\n\t\t\t*/\n\t\t\t\n\t\t\t$obj->ItemIDs[$i]->pages = array();\t\t\t\n\n\t\t\tswitch ($result->NumRows())\n\t\t\t{\n\t\t\t\tcase 0:\n\t\t\t\t\t//no hit :(\n\t\t\t\t\t\n\t\t\t\t\t// Try and handle case where page one is a title page\n\t\t\t\t\t$guess = bhl_step_back(\n\t\t\t\t\t\t$obj->ItemIDs[$i]->ItemID, \n\t\t\t\t\t\t$page, \n\t\t\t\t\t\t$obj->ItemIDs[$i]->volume_offset);\n\t\t\t\t\tif ($guess != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$obj->ItemIDs[$i]->pages[] = $guess;\n\t\t\t\t\t\t$obj->hits[] = $guess;\n\t\t\t\t\t\t$obj->ItemIDs[$i]->PageID = $guess;\t\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 1:\n\t\t\t\t\t// unique hit\n\t\t\t\t\t$obj->ItemIDs[$i]->pages[] = $result->fields['PageID'];\n\t\t\t\t\t$obj->hits[] = $result->fields['PageID'];\n\t\t\t\t\t$obj->ItemIDs[$i]->PageID = $result->fields['PageID'];\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t// More than one hit, for example if Item has multiple volumes, hence potentially\n\t\t\t\t\t// more than one page with this number.\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\twhile (!$result->EOF) \n\t\t\t\t\t{\n\t\t\t\t\t\t$obj->ItemIDs[$i]->pages[] = $result->fields['PageID'];\n\t\t\t\t\t\t$obj->hits[] = $result->fields['PageID'];\n\t\t\t\t\t\t$result->MoveNext();\n\t\t\t\t\t}\n\t\t\t\t\t// Assume page in nth volume is nth page in SequenceOrder\n\t\t\t\t\t// (but actually we store all hits and use string matching on title to filter)\n\t\t\t\t\t$obj->ItemIDs[$i]->PageID = $obj->ItemIDs[$i]->pages[$obj->ItemIDs[$i]->volume_offset];\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\t\n\tif ($debug)\n\t{\n\t\techo __LINE__;\n\t\techo '<pre>';\n\t\tprint_r($obj);\n\t\techo '</pre>';\n\t}\t\n\n\t// Summarise results as array of hits \t\n\t$search_results = array();\n\t\n\t// Post process hits, filtering by title match...\n\t$n = count($obj->ItemIDs);\n\tfor ($i = 0; $i < $n; $i++)\n\t{\n\t\tforeach ($obj->ItemIDs[$i]->pages as $page)\n\t\t{\n\t\t\t$search_hit = bhl_score_page($page, $atitle);\n\t\t\t\n/*\t\t\tnew stdclass;\n\t\t\t$search_hit->PageID = $page;\n\t\t\t$search_hit->score = -1;\n\t\t\t$search_hit->snippet = '';\n\t\t\t\n\t\t\t// Score title match\n\t\t\tif ($atitle != '')\n\t\t\t{\n\t\t\t\t$search_hit->score = bhl_score_string(\n\t\t\t\t\t$search_hit->PageID, \n\t\t\t\t\t$atitle, \n\t\t\t\t\t$search_hit->snippet\n\t\t\t\t\t);\n\t\t\t} */\n\t\t\t\n\t\t\t$search_results[] = $search_hit;\n\t\t}\t\n\t}\n\t\n\t//return $obj;\n\treturn $search_results;\n}", "title": "" }, { "docid": "0382a0fc4f0c278e9ad11dcde36e64fd", "score": "0.5767715", "text": "function show($keyword='',$numperpage=10,$page=0)//5-8-2010\n\t{\n\t\t\n\t\t$this->db->select('id_news,id_nwc,id_text,id_cattext,news_title,news_quickview,news_img_thumb,news_date,news_author'); \n\t\t$this->db->from('news');\n\t\tif(!empty($keyword))\n\t\t\t$this->db->like('news_title', $keyword)->or_like('news_quickview', $keyword)->or_like('news_content', $keyword);\n\t\t$this->db->order_by('news_date', 'DESC');\n\t\t$this->db->limit($numperpage, $page);\n\t\t$query = $this->db->get();\n\t\tif($query->num_rows()>0)\n\t\t\treturn $query;\n\t\telse return FALSE;\n\t}", "title": "" }, { "docid": "b45cfdd33f53f04b6c66f67a8463465c", "score": "0.57421285", "text": "function template_search($articles) {\n\t\n\t// no results\n\tif (!$articles) {\n\t\treturn template('searchresult-none');\n\t}\n\t\n\t// has results\n\t$template = '';\n\tforeach ($articles as $article) {\n\t\t$template .= template('searchresult', array(\n\t\t\t'TITLE' => readable($article->item[1]),\n\t\t\t'ID' => $article->item[0]\n\t\t));\n\t}\n\treturn $template;\n}", "title": "" }, { "docid": "75a13b73f71411daf77aeac01b1681c7", "score": "0.5740304", "text": "public function hots(Request $request) {\n// die;\n $articles = DB::table('weixin_article')\n ->where(\"publish_time\", \">\", date(\"Y-m-d H:i:s\", strtotime(\"-10 days\")))\n ->orderBy(\"weixin_article.favor\", 'desc')\n ->paginate(20);\n\n return view('index.search', ['articles'=>$articles, \"seo_title\"=>\"最新资讯_粮叔叔_炜煜_稻花香_水稻合作社\", \"seo_description\"=>\"粮叔叔为您呈现最新资讯, 如有需要纯正五常大米,请联系13522168390(刘女士)\"]);\n }", "title": "" }, { "docid": "0f0ff517a35f401359b20320ef209d1c", "score": "0.57353544", "text": "public function index() {\n \t$news = M('news');\n \t//引入Page类\n \timport('Org.Util.Page');\n \t$count = $news->count();\n \t$Page = new \\Think\\Page($count,10);\n \t$show = $Page->show();\n \t$list = $news->order('add_time desc')->limit($Page->firstRow.','.$Page->listRows)->select();\n \t$this->assign('list',$list);\n \t$this->assign('page',$show);\n $this->display();\n }", "title": "" }, { "docid": "faa0ff29cbd76f725fd9a34200059c10", "score": "0.57194376", "text": "protected function _postUpdate() {\n// Ext_Search_Lucene::deleteItemFromIndex ( $this->id, Ext_Search_Lucene::NEWS );\n// if ($this->pub == 1) {\n// $this->addItemToSearchIndex();\n// }\n\n }", "title": "" }, { "docid": "8e14b93477f9baab755e1396201bb252", "score": "0.5712925", "text": "public function actionList() {\n $status = 1;\n $pageSize = Yii::app()->params['defaultPageSize'];\n if (!empty($_POST)) {\n $status = $_POST['res_filter'];\n \n $dataProvider = new CActiveDataProvider('News', array(\n 'criteria' => array(\n 'condition' => ('status = \"' . $status . '\"' ), 'order' => 'id DESC',\n ), 'pagination' => array('pageSize' => $pageSize),\n ));\n \n }else{\n //$dataProvider = new CActiveDataProvider('Package');\n $dataProvider = new CActiveDataProvider('News', array(\n 'criteria' => array(\n 'condition' => ('status = \"' . $status . '\"' ), 'order' => 'id DESC',\n ), 'pagination' => array('pageSize' => $pageSize),\n ));\n \n }\n\n $this->render('news_list', array(\n 'dataProvider' => $dataProvider, 'msg' => 0\n ));\n }", "title": "" }, { "docid": "08d63ac9a26d50d19b6300cc7f6820d1", "score": "0.570629", "text": "public function searchprocessAction() {\n\t\t$this->_helper->ajaxgrid->setConfig ( Reviews::grid() )->search ();\n\t}", "title": "" }, { "docid": "2ad1f7d74c4ae05697342464695da094", "score": "0.56976616", "text": "public function testNewsListMatch()\n {\n $this->_entitiesModelMock();\n $this->_testMatchCase('/all_news', true, 'news', 'index');\n }", "title": "" }, { "docid": "50af4579d90897ba46ceddfa586b6848", "score": "0.56725645", "text": "function search_proposed_article(){\n $this->data['mainTab'] = 'mainboard';\n $this->data['activeTab'] = 'article_proposal';\n $this->data['article_title'] = $this->input->post(\"article_title\");\n //$this->data['search_option'] = $this->input->post(\"search_option\"); \n \n $this->data['all_archieve_article_also'] =\"\";\n $this->data['article_proposals'] = $this->info_model->get_proposed_article_by_org_id($this->session->userdata('member_org'), $this->data['article_title']);\n $this->data['dynamicView'] = 'pages/organization/mainboard/article_proposal';\n $this->_commonPageLayout('frontend_viewer');\n}", "title": "" }, { "docid": "c308d526484b59db5a5340f37366c029", "score": "0.5669266", "text": "public function p_search(){\n\t\t\n\t\tif (!$this->user){\n\t\t\tRouter::redirect(\"/users/login/\");\n\t\t\treturn false;\n\t\t}\n\t\t\t\n\t\t\n\t\t#Search for posts among those that I'm following\n\t\t\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST); #sanitize the search string post\n\t\t\n\t\tif ( strlen($_POST['search_string']) == 0 ){ #Get all posts if search string is empty\n\t\t\t\n\t\t\t#Query to find all post from the people I'm following, displaying newest on top.\n\t\t\t$q = \"SELECT posts.*,users.first_name,users.last_name FROM posts,users WHERE posts.user_id IN (SELECT subscribed_id FROM subscriptions WHERE subscriber_id=\".$this->user->user_id.\") AND users.user_id=posts.user_id ORDER BY posts.modified DESC\";\n\t\t\n\t\t}else{ \t#only find posts matching the search string - check agains e-mail, firstname, lastname, firstname+lastname\n\t\t\t\n\t\t\t$q = \"SELECT posts.*,users.first_name,users.last_name FROM posts,users \n\t\t\tWHERE posts.user_id IN (SELECT subscribed_id FROM subscriptions WHERE subscriber_id=\".$this->user->user_id.\") \n\t\t\tAND (users.user_id=posts.user_id) \n\t\t\tAND ((posts.text LIKE '%\".$_POST['search_string'].\"%') or\n\t\t\t(users.first_name LIKE '%\".$_POST['search_string'].\"%') or \n\t\t\t(users.last_name LIKE '%\".$_POST['search_string'].\"%') or\n\t\t\t(CONCAT(users.first_name, ' ', users.last_name) LIKE '%\".$_POST['search_string'].\"%')) \n\t\t\tORDER BY posts.modified DESC\";\n\t\t\t\n\t\t}\n\t\t$posts = DB::instance(DB_NAME)->select_rows($q);\n\t\t\n\t\t#format the mod date for each post\n\t\tforeach($posts as $key => &$next_post){\n\t\t\t$next_post['modified'] = Time::display($next_post['modified']);\n\t\t}\n\t\t\n\t\t$this->template->content = View::instance(\"v_posts_index\");\n\t\t$this->template->content->search_results = View::instance(\"v_posts_search_results\");\n\t\t$this->template->content->search_results->results = $posts;\n\t\t\n\t\techo $this->template;\t\n\t\t\n\t}", "title": "" }, { "docid": "1235fd6995e12a913038d4e6ceae3ec6", "score": "0.566772", "text": "function search()\n\t{\n\t\t$badchars = array('#', '>', '<', '\\\\');\n\t\t$searchword = trim(str_replace($badchars, '', JRequest::getString('searchword', null, 'post')));\n\t\t// if searchword enclosed in double quotes, strip quotes and do exact match\n\t\tif (substr($searchword, 0, 1) == '\"' && substr($searchword, -1) == '\"') {\n\t\t\t$post['searchword'] = substr($searchword, 1, -1);\n\t\t\tJRequest::setVar('searchphrase', 'exact');\n\t\t}\n\t\telse {\n\t\t\t$post['searchword'] = $searchword;\n\t\t}\n\t\t$post['ordering']\t= JRequest::getWord('ordering', null, 'post');\n\t\t$post['searchphrase']\t= JRequest::getWord('searchphrase', 'all', 'post');\n\t\t$post['limit'] = JRequest::getInt('limit', null, 'post');\n\t\tif ($post['limit'] === null) unset($post['limit']);\n\n\t\t$areas = JRequest::getVar('areas', null, 'post', 'array');\n\t\tif ($areas) {\n\t\t\tforeach($areas as $area)\n\t\t\t{\n\t\t\t\t$post['areas'][] = JFilterInput::getInstance()->clean($area, 'cmd');\n\t\t\t}\n\t\t}\n\n\t\t\t\t// set elementid id for links from menu\n\t\t$app\t= JFactory::getApplication();\n\t\t$menu\t= $app->getMenu();\n\t\t$elements\t= $menu->getelements('link', 'index.php?option=com_search&view=search');\n\n\t\tif(isset($elements[0])) {\n\t\t\t$post['elementid'] = $elements[0]->id;\n\t\t} elseif (JRequest::getInt('elementid') > 0) { //use elementid from requesting page only if there is no existing menu\n\t\t\t$post['elementid'] = JRequest::getInt('elementid');\n\t\t}\n\n\t\tunset($post['task']);\n\t\tunset($post['submit']);\n\n\t\t$uri = JURI::getInstance();\n\t\t$uri->setQuery($post);\n\t\t$uri->setVar('option', 'com_search');\n\n\n\t\t$this->setRedirect(JRoute::_('index.php'.$uri->toString(array('query', 'fragment')), false));\n\t}", "title": "" }, { "docid": "7ef91f6821bf11b5a74772cd71982fcf", "score": "0.56664604", "text": "public function updatingSearch(){\n $this->resetPage();\n }", "title": "" }, { "docid": "2bb8b03ba922591cda7ab6c73172b358", "score": "0.5657996", "text": "private function catch_search() {\n\t\tif ( isset( $_GET['page'] ) && 'rp4wp_link_related' == $_GET['page'] && isset ( $_POST['s'] ) ) {\n\t\t\t$base_url = admin_url( sprintf( 'admin.php?page=rp4wp_link_related&rp4wp_parent=%d&rp4wp_view=%s', absint( $_GET['rp4wp_parent'] ), $_GET['rp4wp_view'] ) );\n\t\t\tif ( ! empty( $_POST['s'] ) ) {\n\t\t\t\t$s = urlencode( $_POST['s'] );\n\t\t\t\t// post to get solution\n\t\t\t\t$url = add_query_arg( 's', $s, $base_url );\n\t\t\t} else {\n\t\t\t\t$url = remove_query_arg( 's', $base_url );\n\t\t\t}\n\t\t\t// post to get solution\n\t\t\twp_redirect( $url, 302 );\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "6918f081836014b5d0b9fe54c39181af", "score": "0.5649389", "text": "function &news( )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n $return_array = array();\r\n\r\n if (!($fp = @fopen($this->Site, \"r\"))) {\r\n include_once( \"classes/ezlog.php\" );\r\n\t eZLog::writeWarning( \"RSS read failure: \".$this->Site.\"\\n\" );\r\n return false;\r\n }\r\n\r\n $output = \"\";\r\n while ( !feof ( $fp ) )\r\n {\r\n $output .= fgets( $fp, 4096 );\r\n }\r\n\r\n fclose( $fp );\r\n\r\n $params[\"TrimWhiteSpace\"] = true;\r\n $doc =& eZXML::domTree( $output, $params );\r\n if ( count( $doc->children ) > 0 )\r\n foreach ( $doc->children as $child )\r\n {\r\n if ( $child->name == \"backslash\" || $child->name == \"linuxtoday\" )\r\n {\r\n foreach ( $child->children as $channel )\r\n {\r\n if ( $channel->name == \"story\" )\r\n {\r\n $title = \"\";\r\n $link = \"\";\r\n $description = \"\";\r\n \r\n foreach ( $channel->children as $item )\r\n {\r\n $content = \"\";\r\n foreach ( $item->children as $value )\r\n {\r\n if ( $value->name == \"text\" )\r\n {\r\n $content = $value->content;\r\n } \r\n }\r\n \r\n switch ( $item->name )\r\n {\r\n case \"title\" :\r\n {\r\n $title = $content;\r\n }\r\n break;\r\n \r\n case \"url\" :\r\n {\r\n $link = $content;\r\n }\r\n break;\r\n \r\n case \"time\" :\r\n {\r\n $publishingDate = $content;\r\n }\r\n break; \r\n }\r\n }\r\n\r\n $news = new eZNews();\r\n $news->setName( $title );\r\n $news->setURL( $link );\r\n\r\n if ( ereg( \"([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})\", $publishingDate, $valueArray ) )\r\n {\r\n $year = ( $valueArray[1] );\r\n $month = ( $valueArray[2] );\r\n $day = ( $valueArray[3] );\r\n $hour = ( $valueArray[4] );\r\n $minute = ( $valueArray[5] );\r\n $second = ( $valueArray[6] );\r\n \r\n $dateTime = new eZDateTime( $year, $month, $day, $hour, $minute, $second );\r\n $news->setOriginalPublishingDate( $dateTime );\r\n }\r\n\r\n $return_array[] = $news;\r\n }\r\n }\r\n }\r\n }\r\n \r\n return $return_array;\r\n }", "title": "" }, { "docid": "b29166ee1203099b936e66783aee0044", "score": "0.5649319", "text": "public function manage_news()\r\n {\r\n $data = array();\r\n $data['title'] = 'Manage News | HPP';\r\n if( $this->adminID > 0 && $this->logged_admin == TRUE ){\r\n $data['select_page'] = 'manage_news';\r\n $data['user_menu'] = $this->load->view('page_templates/dashboard/company/user_menu', $data, true);\r\n\r\n $search = isset($_GET['search']) ? $_GET['search'] : 'all';\r\n $data['select_news'] = $this->Hpp_Admin_Model->select_all_news();\r\n $data['main_content'] = $this->load->view( 'page_templates/dashboard/company/manage-news', $data, TRUE );\r\n $this->load->view( 'admin_master', $data );\r\n }else {\r\n redirect(SITE_URL.'hpp/Admin', 'refresh');\r\n }\r\n }", "title": "" }, { "docid": "cf3d9fb23b1ebd8ef24c115d6a285300", "score": "0.56460804", "text": "function print_search_result($site, $caption, $html, $url){\n $request = engine::escape_string(urldecode($_GET[1]));\n $html = preg_replace('#<[^>]+>#', \" \", $html);\n $html = trim(preg_replace('#[\\s]+#', ' ', $html));\n $pos = strpos($html, $request);\n if($pos){\n if(strlen($html)>180){\n if($pos<90){\n $start = '';\n $from = 0;\n }else{\n $start = '..';\n $from = $pos-90;\n }$html = $start.mb_substr($html, $from, 180).'..';\n }$html = str_replace($_GET[1], \"<b>\".$_GET[1].\"</b>\", $html);\n $fout = '<div class=\"search_result\">'\n . '<a vr-control id=\"link-'.$url.'\" href=\"'.$url.'\" target=\"_blank\" class=\"fs16\">'.$caption.'</a>'\n . '<p>'.$html.'</p>'\n . '</div><br/>';\n return $fout;\n }\n}", "title": "" }, { "docid": "4f978c91addc99a6dba961c6f60666ee", "score": "0.56436414", "text": "function do_search_block($map)\n{\n require_lang('search');\n require_css('search');\n require_javascript('ajax_people_lists');\n\n $zone = array_key_exists('zone', $map) ? $map['zone'] : get_module_zone('search');\n\n $title = array_key_exists('title', $map) ? $map['title'] : null;\n if ($title === null) {\n $title = do_lang('SEARCH');\n }\n\n $sort = array_key_exists('sort', $map) ? $map['sort'] : 'relevance';\n $author = array_key_exists('author', $map) ? $map['author'] : '';\n $days = array_key_exists('days', $map) ? intval($map['days']) : -1;\n $direction = array_key_exists('direction', $map) ? $map['direction'] : 'DESC';\n $only_titles = (array_key_exists('only_titles', $map) ? $map['only_titles'] : '') == '1';\n $only_search_meta = (array_key_exists('only_search_meta', $map) ? $map['only_search_meta'] : '0') == '1';\n $boolean_search = (array_key_exists('boolean_search', $map) ? $map['boolean_search'] : '0') == '1';\n $conjunctive_operator = array_key_exists('conjunctive_operator', $map) ? $map['conjunctive_operator'] : 'AND';\n $_extra = array_key_exists('extra', $map) ? $map['extra'] : '';\n\n $map2 = array('page' => 'search', 'type' => 'results');\n if (array_key_exists('search_under', $map)) {\n $map2['search_under'] = $map['search_under'];\n }\n $url = build_url($map2, $zone, null, false, true);\n\n $extra = array();\n foreach (explode(',', $_extra) as $_bits) {\n $bits = explode('=', $_bits, 2);\n if (count($bits) == 2) {\n $extra[$bits[0]] = $bits[1];\n }\n }\n\n $input_fields = array('content' => do_lang('SEARCH_TITLE'));\n if (array_key_exists('input_fields', $map)) {\n $input_fields = array();\n foreach (explode(',', $map['input_fields']) as $_bits) {\n $bits = explode('=', $_bits, 2);\n if (count($bits) == 2) {\n $input_fields[$bits[0]] = $bits[1];\n }\n }\n }\n\n $search_types = array();\n\n $limit_to = array('all_defaults');\n $extrax = array();\n if ((array_key_exists('limit_to', $map)) && ($map['limit_to'] != 'all_defaults')) {\n $limit_to = array();\n $map['limit_to'] = str_replace('|', ',', $map['limit_to']); // \"|\" looks cleaner in templates\n foreach (explode(',', $map['limit_to']) as $key) {\n $limit_to[] = 'search_' . $key;\n if (strpos($map['limit_to'], ',') !== false) {\n $extrax['search_' . $key] = '1';\n $search_types[] = $key;\n }\n }\n $hooks = find_all_hooks('modules', 'search');\n foreach (array_keys($hooks) as $key) {\n if (!array_key_exists('search_' . $key, $extrax)) {\n $extrax['search_' . $key] = '0';\n }\n }\n if (strpos($map['limit_to'], ',') === false) {\n $extra['id'] = $map['limit_to'];\n }\n }\n\n $url_map = $map;\n unset($url_map['input_fields']);\n unset($url_map['extra']);\n unset($url_map['zone']);\n unset($url_map['title']);\n unset($url_map['limit_to']);\n unset($url_map['block']);\n $full_link = build_url(array('page' => 'search', 'type' => 'browse') + $url_map + $extra + $extrax, $zone);\n\n if ((!array_key_exists('content', $input_fields)) && (count($input_fields) != 1)) {\n $extra['content'] = '';\n }\n\n $options = array();\n if ((count($limit_to) == 1) && ($limit_to[0] != 'all_defaults')) { // If we are doing a specific hook\n $id = preg_replace('#^search\\_#', '', $limit_to[0]);\n\n require_code('hooks/modules/search/' . filter_naughty_harsh($id, true));\n $object = object_factory('Hook_search_' . filter_naughty_harsh($id, true));\n $info = $object->info();\n if (($info !== null) && ($info !== false)) {\n if (array_key_exists('special_on', $info)) {\n foreach ($info['special_on'] as $name => $display) {\n $_name = 'option_' . $id . '_' . $name;\n $options[$_name] = array('SEARCH_FOR_SEARCH_DOMAIN_OPTION', array('CHECKED' => (get_param_string('content', null) === null) || (get_param_integer($_name, 0) == 1), 'DISPLAY' => $display));\n }\n }\n if (array_key_exists('special_off', $info)) {\n foreach ($info['special_off'] as $name => $display) {\n $_name = 'option_' . $id . '_' . $name;\n $options[$_name] = array('SEARCH_FOR_SEARCH_DOMAIN_OPTION', array('CHECKED' => (get_param_integer($_name, 0) == 1), 'DISPLAY' => $display));\n }\n }\n if (method_exists($object, 'get_fields')) {\n $fields = $object->get_fields();\n foreach ($fields as $field) {\n $_name = 'option_' . $field['NAME'];\n $options[$_name] = array('SEARCH_FOR_SEARCH_DOMAIN_OPTION' . $field['TYPE'], array('DISPLAY' => $field['DISPLAY'], 'SPECIAL' => $field['SPECIAL'], 'CHECKED' => array_key_exists('checked', $field) ? $field['CHECKED'] : false));\n }\n }\n }\n }\n\n $_input_fields = array();\n foreach ($input_fields as $key => $val) {\n $input = new Tempcode();\n if (isset($options['option_' . $key])) { // If there is an input option for this particular $key\n $tpl_params = $options['option_' . $key][1];\n $tpl_params['NAME'] = 'option_' . $key;\n if ($val != '') {\n $tpl_params['DISPLAY'] = $val;\n }\n $input = do_template($options['option_' . $key][0], $tpl_params);\n }\n $_input_fields[$key] = array(\n 'LABEL' => $val,\n 'INPUT' => $input,\n );\n }\n\n return array(\n 'TITLE' => $title,\n 'INPUT_FIELDS' => $_input_fields,\n 'EXTRA' => $extra,\n 'SORT' => $sort,\n 'AUTHOR' => $author,\n 'DAYS' => strval($days),\n 'DIRECTION' => $direction,\n 'ONLY_TITLES' => $only_titles ? '1' : '0',\n 'ONLY_SEARCH_META' => $only_search_meta ? '1' : '0',\n 'BOOLEAN_SEARCH' => $boolean_search ? '1' : '0',\n 'CONJUNCTIVE_OPERATOR' => $conjunctive_operator,\n 'LIMIT_TO' => $limit_to,\n 'URL' => $url,\n 'FULL_SEARCH_URL' => $full_link,\n 'SEARCH_TYPE' => (count($search_types) != 1) ? null : $search_types[0],\n );\n}", "title": "" }, { "docid": "e5fa6321f541deb817bd09d6013d04c9", "score": "0.564269", "text": "function search() {\n\t\tSession::setSearch(\"itemtype_id\", getVar(\"itemtype_id\"));\n\t\tSession::setSearch(\"tags\", getVar(\"tags\"));\n\t\tSession::setSearch(\"sindex\", getVar(\"sindex\"));\n\t}", "title": "" }, { "docid": "095509b5e608eca75dc2c2a0b1c95e8e", "score": "0.56380713", "text": "public function addSearchItems(){\n if (is_paged()){\n $newItemLabel = sprintf($this->getLabel('search'), get_search_query());\n $newItemUrl = get_search_link();\n $this->addItem(new WabootBreadcrumbItem($newItemLabel,$newItemUrl));\n } elseif ($this->canShowTitles()){\n $newItemLabel = sprintf($this->getLabel('search'), get_search_query());\n $this->addItem(new WabootBreadcrumbItem($newItemLabel));\n }\n }", "title": "" }, { "docid": "81d3ab04d55767789c699f784997eb8d", "score": "0.56279165", "text": "function search ($search_object) \r\n\t{\r\n\t}", "title": "" }, { "docid": "73b7cb0db7e0f3849846de12becfc41f", "score": "0.5622889", "text": "public function news()\n\t{\n\t\t$page = $this->input->get('p') ? $this->security->xss_clean($this->input->get('p')) : 0;\n\t\t$limit = $this->_limit;\n\t\t// $limit = 1;\n\n\t\t$conditions = 'A.NewsStatus = 2';\n\t\t\n\t\t$get_total_data = $this->news_model->totalData($conditions);\n\t\t\n\t\tif (($page + 1) > $get_total_data) {\n $page = 0;\n }\n\n $list_data = $this->news_model->getList($limit, $page, $conditions);\n\t\t\n\t\t/* s: set pagination */\n $config = $this->config->item('paging');\n $config['base_url'] = site_url('news').'?';\n // $config['uri_segment'] = $get_segment['uri_segment'];\n $config['total_rows'] = $get_total_data;\n $config['per_page'] = $limit;\n $config['page_query_string'] = TRUE;\n $config['query_string_segment'] = 'p';\n \n $query_string = $this->input->get();\n \n if (isset($query_string['p'])) {\n unset($query_string['p']);\n }\n\n if ($query_string <> '' && count($query_string) > 0) {\n $config['suffix'] = '&' . http_build_query($query_string, '', \"&\");\n $config['first_url'] = $config['base_url'] . '?' . http_build_query($query_string, '', \"&\");\n }\n $this->pagination->initialize($config);\n /* e: set pagination */\n\n /* e: logical process */\n\n\t\t/* s: set data variable */\n\t\t$data = array();\n\t\t$data['result'] \t = ($list_data) ? $list_data : NULL;\n\t\t$data['total_data'] = $get_total_data;\n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t\n\t\t// $data['success_msg'] = $this->session->flashdata(\"success_msg\");\n\t\t// $data['error_msg'] = $this->session->flashdata(\"error_msg\");\n\t\t// $data['info_msg'] = $this->session->flashdata(\"info_msg\");\n\t\t$data_header = array();\n\t\t$data_header['menu'] = 'news';\n\t\t\n\t\t$data_footer = array();\n\t\t/* e: set data variable */\n\n\t\t/* s: load data to view */\n\t\t$view['title'] = 'Otowow - News';\n\t\t$view['head'] = $this->load->view('head_section/home','',TRUE);\n\t\t$view['header'] = $this->load->view('header',$data_header,TRUE);\n\t\t$view['content'] = $this->load->view('news',$data,TRUE);\n\t\t$view['footer'] = $this->load->view('footer',$data_footer,TRUE);\n\t\t$view['foot'] = $this->load->view('foot_section/home','',TRUE);\n\t\t/* e: load data to view */\n\n\t\t/* s: load view to main template */\n\t\t$this->load->view('main_template', $view);\n\t\t/* e: load view to main template */\n\t}", "title": "" }, { "docid": "b5fc534e1b9513bb5e7ff4287954194f", "score": "0.5617056", "text": "function get_news()\n {\n $sql = <<<EOSQL\nselect id, title, root_id, url, published, created\nfrom navigation\nwhere parent_id = 39\nand visible = 1\nand expired IS NULL\nand deleted IS NULL\nand url != \"\"\nand root_id = id\nand published ORDER BY `id` ASC\nEOSQL;\n\n return $this->db->query($sql);\n }", "title": "" }, { "docid": "0564240ce10acb25fb136e193ac4faed", "score": "0.5612481", "text": "function processResult($submitValues) {\n\n if ($submitValues['search_text'] != '') {\n //$tableFields = $GLOBALS['TYPO3_DB']->admin_get_fields($this->tablettNews);\n $tableFields=array(\"title\",\"category\",\"short\",\"bodytext\",\"author\",\"author_email\",\"news_files\",\"title\",\"keywords\");\n foreach ($tableFields as $fieldsName => $value){\n //$where_condition_level .= \"$this->tablettNews.$value like '%\".$submitValues['search_text'].\"%' or \";\n $conditionBuild=$this->getNewCondition($submitValues['search_text'],$this->tablettNews.\".\".$value);\n $where_condition_level .= \"($conditionBuild) or \";\n }\n $where_condition_level = \" and (\".substr($where_condition_level, 0, -3).\")\";\n }\n //$this->_debug($where_condition_level);\t\t\t\n //$this->_debug($submitValues['category']);\n $subPartArray['###SEARCH_PAGER###']='';\n $_whereCondition .= $where_condition_level.$this->cObj->enableFields($this->tablettNews);\n $_fieldsDistinct = \"DISTINCT COUNT(*) as numRec\";\n $_fields = \"$this->tablettNews.*,$this->tablettNewsCat.title as cat_title,$this->tablettNewsCat.uid as cat_id\";\n $_tables = \"$this->tablettNews,$this->tablettNewsCat\";\n $_tables_mm = \"$this->tablettNewsCatMm\";\n $_groupBy='';\n $_orderBy=\"\";\n $_postPointer=t3lib_div::_GET($this->extKey);\n\n //$this->_debug($HTTP_GET_VARS);\n //$this->_debug($_postPointer);\n $_startPointer=0;\n if($this->piVars['pointer'])\n $_startPointer =$this->piVars['pointer'] * $this->internal['results_at_a_time'];\n //\t\t\t$this->_debug($_startPointer);\n $_limit = \"$_startPointer, \".$this->internal['results_at_a_time'];\n //$this->_debug($_limit);\n if($submitValues['style']=='curriculum')\n {\n $_groupBy=$this->tablettNews.'.category';\n $_orderBy='('.$this->tablettNews.'.title+'.$this->tablettNews.'.datetime)';\n }\n\n $template['search_result'] = $this->cObj->getSubpart($this->templateCode, '###SEARCH_RESULT###');\n $template['search_result_nodata'] = $this->cObj->getSubpart($this->templateCode, '###SEARCH_RESULT_NODATA###');\n\n $_templateNoData=$this->cObj->substituteMarkerArrayCached($template['search_result_nodata'], array(), array(), array());\n //Initialising the Templates\n $resCategoryAll=$this->getCategory_ttnews('',1);\n if ($this->checkEmptyRecords($resCategoryAll)) {\n while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resCategoryAll)) {\n $subPartArray['###SEARCH_RESULT_DATA_'.$row['uid'].'###']= '';\n $subPartArray['###SEARCH_RESULT_DATA_TITLE_'.$row['uid'].'###']= '';\n }\n }\n $subPartArray['###SAVE_SEARCH_TEXT###']='';\n if($GLOBALS['TSFE']->fe_user->user['uid']!='')\n {\n $subPartArray['###SAVE_SEARCH_TEXT###']='<a href=\"#\" onclick=\"document.savesearchresult.search_name.value=prompt(\\'Please enter the search name\\');document.savesearchresult.submit();\">Save Search</a>';\n }\n $subPartArray['###SEARCH_RESULT_DATA_DEFAULT###']= '';\n $subPartArray['###SEARCH_RESULT_DATA_TITLE_DEFAULT###']= '';\n\n // Log search for later reference and statistics\n if (!array_key_exists(\"pointer\", $this->piVars) && (strlen($submitValues['search_text']) > 0)) {\n global $TYPO3_DB;\n $TYPO3_DB->exec_INSERTquery(\"tx_newssearch_log\",\n array(\"user\" => $TSFE->fe_user->user['uid'],\n \"search_string\" => $submitValues['search_text'],\n \"crdate\" => time()));\n }\n\n if(is_array($submitValues['category']) && $submitValues['category'][0]!='all')\n {\n $_CatgSelected='';\n foreach($submitValues['category'] as $catVal)\n {\n $_CatgSelected.=$catVal.\",\";\t\n }\n $_CatgSelected=substr($_CatgSelected,0,strlen($_CatgSelected)-1);\n\n $_whereConditionInLoop=$_whereCondition .\" and $this->tablettNewsCatMm.uid_foreign IN (\".$_CatgSelected. \") \".$this->cObj->enableFields($this->tablettNews);\n\n $resCount=$GLOBALS['TYPO3_DB']->exec_SELECT_mm_query($_fieldsDistinct, $this->tablettNews, $_tables_mm, $this->tablettNewsCat, $_whereConditionInLoop,$_groupBy,\"$this->tablettNewsCat.uid, $this->tablettNews.datetime DESC\");\n $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query($_fields, $this->tablettNews, $_tables_mm, $this->tablettNewsCat, $_whereConditionInLoop,$_groupBy,\"$this->tablettNewsCat.uid, $this->tablettNews.datetime DESC\",$_limit);\n //$this->_debug($GLOBALS['TYPO3_DB']->SELECT_mm_query($_fields, $this->tablettNews, $_tables_mm, $this->tablettNewsCat, $_whereConditionInLoop,$_groupBy,\"$this->tablettNewsCat.uid\",$_limit));\n\n $data_detail = '';\n\n $_lastCat='';\n if($this->checkEmptyRecords($res))\n {\n while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\n //Check for linking page\n if($this->checkKeyExist($row['cat_id'], $this->catToLandingPage))\n {\n $linkPageId=$this->catToLandingPage[$row['cat_id']];\n }\t\t\t\t\t\n else \n {\n $linkPageId=$this->catToLandingPage[$this->newsCatLookup($row['uid'])]; \n }\n\n if($_lastCat!=$row['cat_id'])\n {\n $template['search_result_data_title'] = $this->cObj->getSubpart($template['search_result'], \"###SEARCH_RESULT_DATA_TITLE_\".$row['cat_id'].\"###\");\n if(strlen($template['search_result_data_title'])<1 || is_null($template['search_result_data']))\n {\n $template['search_result_data_title'] = $this->cObj->getSubpart($template['search_result'], \"###SEARCH_RESULT_DATA_TITLE_DEFAULT###\");\n $subPartArrayTitle['###CATEGORY_TITLE###'] = $this->getCategory_ttnews_byName($row['cat_id']);\n $subPartArray[\"###SEARCH_RESULT_DATA_DEFAULT###\"] .=$this->cObj->substituteMarkerArrayCached($template['search_result_data_title'], $subPartArrayTitle, array(), array());\n\n }else{\n $subPartArrayTitle['###CATEGORY_TITLE###'] = $this->getCategory_ttnews_byName($row['cat_id']);\n $subPartArray[\"###SEARCH_RESULT_DATA_\".$row['cat_id'].\"###\"] .=$this->cObj->substituteMarkerArrayCached($template['search_result_data_title'], $subPartArrayTitle, array(), array());\n }\n\n }\n $_lastCat=$row['cat_id'];\n\n $template['search_result_data']=$this->cObj->getSubpart($template['search_result'], \"###SEARCH_RESULT_DATA_\".$row['cat_id'].\"###\");\n if(strlen($template['search_result_data'])<1 || is_null($template['search_result_data']))\n {\n $template['search_result_data']=$this->cObj->getSubpart($template['search_result'], \"###SEARCH_RESULT_DATA_DEFAULT###\");\n $subPartArray[\"###SEARCH_RESULT_DATA_DEFAULT###\"] .= $this->prepareResult($template['search_result_data'], $row,$linkPageId);\n }else{\n\n $subPartArray[\"###SEARCH_RESULT_DATA_\".$row['cat_id'].\"###\"] .= $this->prepareResult($template['search_result_data'], $row,$linkPageId);\n }\n }\n //$subPartArray[\"###SEARCH_RESULT_DATA_\".$row['cat_id'].\"###\"]=$data_detail;\n }\n\n if($resCount)\n {\n $rowCount=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($resCount);\n $this->internal['res_count'] = $rowCount['numRec'];\n }\n $pagerResult=trim(strip_tags($this->pi_list_browseresults()));\n if($pagerResult!=\"Displaying results 0 to 0 out of 0\"){\n $subPartArray['###SEARCH_PAGER###']=$this->pi_list_browseresults();\n }else{\n $subPartArray['###SEARCH_PAGER###']=$template['search_result_nodata'];\n }\n\n\n\n\n }\n else\n {\n //$_fields.=\", $this->tablettNewsCat.uid as cat_id\";\n //\t\t\t\t$_fieldsDistinct=\"distinct(\".$this->tablettNewsCat.\".uid) as cat_id\";\n //$this->_debug($this->conf['SearchCategory']); //tmp debug\n\t\t\t//$this->conf['SearchCategory'] = \"48,49,50,52,56,57,71,78,109\";\n\t $_fieldsDistinct = \"COUNT(*) as numRec\";\n\t\t\t$_groupBy=\"$this->tablettNews.title\";\n\t\t\t$_orderBy=\"\";\n $_whereCondition .= \" and $this->tablettNewsCat.uid IN (\".$this->conf['SearchCategory'].\")\".$this->cObj->enableFields($this->tablettNews);\n\n $resCount=$GLOBALS['TYPO3_DB']->exec_SELECT_mm_query($_fieldsDistinct, $this->tablettNews, $_tables_mm, $this->tablettNewsCat, $_whereCondition,$_groupBy,$_orderBy);\n\t\t\t// $query = $GLOBALS['TYPO3_DB']->SELECT_mm_query($_fieldsDistinct, $this->tablettNews, $_tables_mm, $this->tablettNewsCat, $_whereCondition,$_groupBy,$_orderBy);\n\t\t\t// cbDebug( 'query', $query );\t\n\n $_orderBy=\"$this->tablettNews.datetime DESC, $this->tablettNewsCat.uid\";\n $_orderBy=\"$this->tablettNewsCat.uid ASC, $this->tablettNews.datetime DESC\";\n $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query($_fields, $this->tablettNews, $_tables_mm, $this->tablettNewsCat, $_whereCondition,$_groupBy,$_orderBy,$_limit);\n // $query = $GLOBALS['TYPO3_DB']->SELECT_mm_query($_fields, $this->tablettNews, $_tables_mm, $this->tablettNewsCat, $_whereCondition,$_groupBy,$_orderBy,$_limit);\n\t\t\t// cbDebug( 'query', $query );\t\n\n $data_detail = '';\n $_lastCat='';\n if($this->checkEmptyRecords($res))\n {\n while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\n //Check for linking page\n if($this->checkKeyExist($row['cat_id'], $this->catToLandingPage))\n {\n $linkPageId=$this->catToLandingPage[$row['cat_id']];\n }\t\t\t\t\t\n else \n {\n // $linkPageId=$GLOBALS['TSFE']->id;\n $linkPageId=$this->catToLandingPage[$this->newsCatLookup($row['uid'])]; \n }\n\n if($_lastCat!=$row['cat_id'])\n {\n $template['search_result_data_title'] = $this->cObj->getSubpart($template['search_result'], \"###SEARCH_RESULT_DATA_TITLE_\".$row['cat_id'].\"###\");\n\n if(is_null($template['search_result_data_title'])) {\n $template['search_result_data_title'] = $this->cObj->getSubpart($template['search_result'], \"###SEARCH_RESULT_DATA_TITLE_DEFAULT###\");\n\n $subPartArrayTitle['###CATEGORY_TITLE###'] = $this->getCategory_ttnews_byName($row['cat_id']);\n $subPartArray[\"###SEARCH_RESULT_DATA_DEFAULT###\"] .=$this->cObj->substituteMarkerArrayCached($template['search_result_data_title'], $subPartArrayTitle, array(), array());\n\n }else{\n $subPartArrayTitle['###CATEGORY_TITLE###'] = $this->getCategory_ttnews_byName($row['cat_id']);\n $subPartArray[\"###SEARCH_RESULT_DATA_\".$row['cat_id'].\"###\"] .=$this->cObj->substituteMarkerArrayCached($template['search_result_data_title'], $subPartArrayTitle, array(), array());\n }\n\n }\n $_lastCat=$row['cat_id'];\n\n $template['search_result_data']=$this->cObj->getSubpart($template['search_result'], \"###SEARCH_RESULT_DATA_\".$row['cat_id'].\"###\");\n if(strlen($template['search_result_data'])<1 && is_null($template['search_result_data']))\n {\n $template['search_result_data']=$this->cObj->getSubpart($template['search_result'], \"###SEARCH_RESULT_DATA_DEFAULT###\");\n $subPartArray[\"###SEARCH_RESULT_DATA_DEFAULT###\"] .= $this->prepareResult($template['search_result_data'], $row,$linkPageId);\n }else{\n\n $subPartArray[\"###SEARCH_RESULT_DATA_\".$row['cat_id'].\"###\"] .= $this->prepareResult($template['search_result_data'], $row,$linkPageId);\n }\n }\n //$subPartArray[\"###SEARCH_RESULT_DATA_\".$row['cat_id'].\"###\"]=$data_detail;\n }\n\n if($resCount)\n {\n $this->internal['res_count'] = 0;\n\t\t\t\twhile( $resCount &&\n\t\t\t\t\t$rowCount=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($resCount))\n\t\t\t\t{\n \t$this->internal['res_count']++;\n\t\t\t\t}\n }\n //$subPartArray['###SEARCH_PAGER###']=$this->pi_list_browseresults();\n $pagerResult=trim(strip_tags($this->pi_list_browseresults()));\n if($pagerResult!=\"Displaying results 0 to 0 out of 0\"){\n $subPartArray['###SEARCH_PAGER###']=$this->pi_list_browseresults();\n }else{\n $subPartArray['###SEARCH_PAGER###']=$template['search_result_nodata'];\n }\n }\n $_returnTraverse=false;\n $_lastMarkerId='';\n foreach($subPartArray as $label=>$labelVal)\n {\n if(eregi('###SEARCH_RESULT_',$label))\n $_returnTraverse = true;\n $_lastMarkerId = $label;\n }\n if(!$_returnTraverse)\n {\n $this->_debug($subPartArray);\n $subPartArray[$_lastMarkerId] = $_templateNoData;\n }\n\n $_hiddenfrmField='';\n foreach($submitValues as $key=>$val)\n {\n if($key!='search')\n {\n if(is_array($val))\n {\n foreach($val as $keyVal)\n $_hiddenfrmField.=\"<input type='hidden' name='$this->extKey[$key][]' value='$keyVal'>\\n\";\n }\n else\n {\n $_hiddenfrmField.=\"<input type='hidden' name='$this->extKey[$key]' value='$val'>\\n\";\n }\n }\n }\n $_hiddenfrmField.=\"<input type='hidden' name='action' value='saveresult'>\\n\";\n\n $subPartArray['###FORMACTION###'] = $this->pi_getPageLink($GLOBALS[\"TSFE\"]->id, $GLOBALS[\"TSFE\"]->sPre);\n $subPartArray['###HIDDEN_FORM_FILEDS###'] = $_hiddenfrmField;\n\n // Handle backlink\n $subPartArray['###BACKLINK###'] = '';\n if ($this->cObj->data['tx_newssearch_backlink_to_page']) {\n $backlinktemplate = $this->cObj->getSubpart($template['search_result'], '###BACKLINK###');\n $subPartArray['###BACKLINK###'] = $this->cObj->substituteMarkerArray(\n $backlinktemplate, array(\n '###BACKLINK_URL###' => $this->pi_getPageLink($this->cObj->data['tx_newssearch_backlink_to_page'])));\n }\n\n $content = $this->cObj->substituteMarkerArrayCached($template['search_result'], array(), $subPartArray, array());\n //js get the crosssite results by topic:\n\t\tif ($this->debug) { print_r($this->conf); }\n\t\tif ($this->conf['showTopicResults']) { \n\t\t\t$content = $this->getTopicWiseLinksContent($submitValues['search_text']) . $content;\n\t\t}\n\t\t//echo $content;\n\t\treturn $content;\n\n }", "title": "" }, { "docid": "18d224e1c910bea4d7d09f186f613f6e", "score": "0.56060535", "text": "function sort_searchresult_by_title($k) {\nif(is_search()) {\n$k->query_vars['orderby'] = 'title';\n$k->query_vars['order'] = 'ASC';\n}\n}", "title": "" }, { "docid": "4cb9f7e3e20d9fe574f3260828df6250", "score": "0.56052995", "text": "function outList($cmd = 'news') {\n\n $tag = $this->route->getParam('tag');\n $category = $this->route->getParam('category');\n $this->pag = $this->route->getParam('pag');\n\n if(!Utility::isPositiveInt($this->pag)) {\n $this->pag = 1;\n }\n\n if($category) {\n\n $options = [];\n $options['tableFilename'] = 'news_category';\n\n $this->NewsCategoryObj = new NewsCategory($options);\n\n $this->NewsCategoryObj = $this->NewsCategoryObj->getByHref($category);\n\n if(!$this->NewsCategoryObj || !$this->NewsCategoryObj->attivo) {\n $this->route->redirectTo('notFound');\n }\n }\n\n $filters = [];\n $joins = [];\n\n if($tag) {\n\n $join = [];\n $join['table'] = 'rel_news_tags';\n $join['alias'] = 'rel';\n $join['on1'] = 'news_id';\n $join['on2'] = 'news.id';\n $join['operatore'] = '=';\n\n $joins[] = $join;\n\n $join = [];\n $join['table'] = 'tags';\n $join['alias'] = '';\n $join['on1'] = 'id';\n $join['on2'] = 'rel.tag_id';\n $join['operatore'] = '=';\n\n $joins[] = $join;\n\n $filter_record = [];\n $filter_record['chiave'] = 'tags.tag';\n $filter_record['operatore'] = '=';\n $filter_record['valore'] = urldecode($tag);\n\n $filters[] = $filter_record;\n\n $this->setGlobal('PAGE_TITLE', Traduzioni::getLang('news', 'NEWS_CON_TAG').' '.$tag);\n\n $this->setVariabiliGlobali('tag');\n\n // qui ci passo se sono in una pagina di elenco news per una determinata categoria\n } elseif($category) {\n\n $join = [];\n $join['table'] = 'rel_news_category_news';\n $join['alias'] = 'rel';\n $join['on1'] = 'id_news';\n $join['on2'] = 'news.id';\n $join['operatore'] = '=';\n\n $joins[] = $join;\n\n $filter_record = [];\n $filter_record['chiave'] = 'rel.news_category_id';\n $filter_record['operatore'] = '=';\n $filter_record['valore'] = $this->NewsCategoryObj->fields['id'];\n\n $filters[] = $filter_record;\n\n $this->setVariabiliGlobali('list');\n\n } else {\n $this->setVariabiliGlobali('list');\n }\n\n\n // e qui ci passo sempre, però se non son passato dai precedenti if vuol dire che sono nell'elenco generale.\n $data = [];\n $data['news'] = $this->getPagina($filters, $joins, $cmd);\n \n $out = [];\n $out['OBJ'] = $this->NewsObj;\n $out['SMARTY'] = $data;\n $out['data']['NewsCategoryObj'] = $this->NewsCategoryObj;\n\n return $out;\n\n }", "title": "" }, { "docid": "98873806bcbed2cfd6813e5358a0a0f4", "score": "0.5603161", "text": "function QuickSearch($search_keywords)\n {\n $search_keywords = stripslashes($search_keywords);\n\n $sel_table = NULL;\n $str_like = NULL;\n $filter_cr = ' OR ';\n $str_like = $this->build_str_like_for_full(TblModNewsNames.'.name', $search_keywords);\n $str_like .= $filter_cr.$this->build_str_like_for_full(TblModNewsFull.'.full', $search_keywords);\n $sel_table = \"`\".TblModNews.\"`, `\".TblModNewsCat.\"`, `\".TblModNewsNames.\"`, `\".TblModNewsShort.\"`, `\".TblModNewsFull.\"` \";\n\n $q =\"SELECT `\".TblModNews.\"`.`id`,\n `\".TblModNewsNames.\"`.`link`,\n `\".TblModNewsNames.\"`.`name`,\n `\".TblModNews.\"`.`start_date`,\n `\".TblModNews.\"`.`id_cat`,\n (\n MATCH(`\" . TblModNewsNames . \"`.`name`) AGAINST('*\".$search_keywords.\"*' IN BOOLEAN MODE) * 10 +\n MATCH(`\" . TblModNewsShort . \"`.`short`) AGAINST('*\".$search_keywords.\"*' IN BOOLEAN MODE) +\n MATCH(`\" . TblModNewsFull . \"`.`full`) AGAINST('*\".$search_keywords.\"*' IN BOOLEAN MODE)\n ) AS `relev`\n FROM \".$sel_table.\"\n WHERE (\".$str_like.\") and\n `\".TblModNews.\"`.id = `\".TblModNewsShort.\"`.id_news and\n `\".TblModNews.\"`.id = `\".TblModNewsNames.\"`.id_news and\n `\".TblModNews.\"`.id = `\".TblModNewsFull.\"`.id_news and\n `\".TblModNewsShort.\"`.lang_id='\".$this->lang_id.\"' and\n `\".TblModNewsNames.\"`.`lang_id`='\".$this->lang_id.\"' and\n `\".TblModNewsFull.\"`.`lang_id`='\".$this->lang_id.\"' and\n `\".TblModNewsNames.\"`.`name`!=''\n ORDER BY `\".TblModNews.\"`.`start_date` desc\n \";\n\n $res = $this->db->db_Query( $q );\n// echo '<br>q='.$q.' res='.$res.' $tmp_db->result='.$this->db->result;\n if ( !$res) return false;\n if( !$this->db->result ) return false;\n $rows = $this->db->db_GetNumRows();\n //echo \"<br> rows = \";\n //print_r($rows);\n return $rows;\n }", "title": "" }, { "docid": "ef2dd63f7a9cbac3e178d706bfc355f4", "score": "0.56000113", "text": "private function _search($skey)\n\t{\n\t\t$per_page = $this->input->get(\"ps\");\n\n\t\tif($per_page===FALSE || !is_numeric($per_page)){\n\t\t\t$per_page=10;\n\t\t}\n\n\t\t//current page\n\t\t$curr_page=$this->input->get('per_page');//$this->uri->segment(4);\n\n\t\t//filter to further limit search\n\t\t$filter=array();\n\n\t\t$this->field=\t\t$this->input->get('field');\n\t\t$this->keywords=\t$this->input->get('keywords');\n\t\t$this->sort_order=\t$this->input->get('sort_order') ? $this->input->get('sort_order') : 'desc';\n\t\t$this->sort_by=\t\t$this->input->get('sort_by');\n\n if (trim($this->field)==''){\n $this->field='all';\n }\n\t\t//filter\n\t\t$filter=NULL;\n\n\t\t//simple search\n\t\tif ($this->keywords){\n\t\t\t$filter[0]['field']=$this->field;\n\t\t\t$filter[0]['keywords']=$this->keywords;\n\t\t}\n\n\t\t//records\n\t\t$data['rows']=$this->Citation_model->search($per_page, $curr_page ,$filter, $this->sort_by, $this->sort_order);\n\n\t\t//total records in the db\n\t\t$total = $this->Citation_model->search_count();\n\n\t\tif ($curr_page>$total){\n\t\t\t$curr_page=$total-$per_page;\n\t\t\t//search again\n\t\t\t$data['rows']=$this->Citation_model->search($per_page, $curr_page,$filter);\n\t\t}\n\n\t\t//set pagination options\n\t\t$base_url = site_url('admin/related_citations/index/'.$skey);\n\t\t$config['base_url'] = $base_url;\n\t\t$config['total_rows'] = $total;\n\t\t$config['per_page'] = $per_page;\n\t\t$config['page_query_string'] = TRUE;\n\t\t$config['additional_querystring']=get_querystring( array('id', 'sort_by','sort_order','keywords', 'field','ps'));//pass any additional querystrings\n\t\t$config['next_link'] = t('page_next');\n\t\t$config['num_links'] = 5;\n\t\t$config['prev_link'] = t('page_prev');\n\t\t$config['first_link'] = t('page_first');\n\t\t$config['last_link'] = t('last');\n\t\t$config['full_tag_open'] = '<span class=\"page-nums\">' ;\n\t\t$config['full_tag_close'] = '</span>';\n\n\t\t//intialize pagination\n\t\t$this->pagination->initialize($config);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "bd117d0d1f7e1b3ef6c338cbf3098726", "score": "0.55983716", "text": "public function search( $search );", "title": "" }, { "docid": "bcd9289f5afe07338ca869f8fcc49562", "score": "0.5597284", "text": "function search($string) {\n $query = \"SELECT news_id, shironam, image_file, content\n FROM `bdnews_news` \n WHERE (\n CONVERT( `shironam` USING utf8 ) LIKE '%\" . $string . \"%' OR \n CONVERT( `content` USING utf8 ) LIKE '%\" . $string . \"%' OR\n CONVERT( `content_html` USING utf8 ) LIKE '%\" . $string . \"%' OR\n CONVERT( `reporter` USING utf8 ) LIKE '%\" . $string . \"%' \n )\";\n// LIMIT 0 , 30\";\n return $data = $this->Helper_Model->_get_data($query);\n// return $this->_attach_trailer($data, SEARCH_TRAILER_LENGTH);\n }", "title": "" }, { "docid": "280b97d70af5c6206b469fed8e78ec85", "score": "0.55958945", "text": "function yourSearch() {\n $yourSearch = '';\n if (!empty($_GET['keyword'])) $yourSearch .= '<span class=\"your-search-item\">Keyword - ' . htmlentities($_GET['keyword']) . '</span>';\n if (!empty($_GET['performance'])) $yourSearch .= '<span class=\"your-search-item\">Title - ' . htmlentities($_GET['performance']) . '</span>';\n if (!empty($_GET['actor']) && !empty(array_filter($_GET['actor'], 'strlen'))) $yourSearch .= '<span class=\"your-search-item\">Actors - ' . htmlentities(implode(', ', array_filter($_GET['actor'], 'strlen'))) . '</span>';\n if (!empty($_GET['role']) && !empty(array_filter($_GET['role'], 'strlen'))) $yourSearch .= '<span class=\"your-search-item\">Roles - ' . htmlentities(implode(', ', array_filter($_GET['role'], 'strlen'))) . '</span>';\n if (!empty($_GET['author'])) $yourSearch .= '<span class=\"your-search-item\">Author - ' . htmlentities($_GET['author']) . '</span>';\n\n return (!empty($yourSearch)) ? '<span class=\"your-search-for\"> for: </span><span class=\"your-search-items\">' . $yourSearch . '</span>' : '';\n }", "title": "" }, { "docid": "14a5f19b610b1e1cbc923639e6e39e4a", "score": "0.5593851", "text": "public function updatingSearch() {\n $this->resetPage();\n }", "title": "" }, { "docid": "e2268b2c6994872ec426a79ce91234f4", "score": "0.5585831", "text": "public function __construct( )\n {\n // //if ($_SERVER['REMOTE_ADDR'] == \"24.24.203.171\") return;\n // \t\t\t\n // parent::search_keywords( );\n // \n // $host = parse_url ($this->referer, PHP_URL_HOST);\n // \n // $keys=$this->get_keys();\n // \n // if( sizeof($keys)==0 ||\n // \t$keys[2]==\"Unknown\" )\n // {\n // \treturn; // without referral field, unknown search engine\n // }\n // \n // \tDBHelper::connect ();\n // global $DB, $SETTINGS;\n // \n // $sql=\"INSERT INTO keywords (date,ip,engine,keywords,referer,url) values(NOW(),\".\n // $DB->qstr( $_SERVER['REMOTE_ADDR'] ).\",\".\n // $DB->qstr( $keys[2] ).\",\".\n // $DB->qstr( $keys[1] ).\",\".\n // $DB->qstr( $_SERVER['HTTP_REFERER'] ).\",\".\n // $DB->qstr( $_SERVER['REQUEST_URI'] ).\n // \")\";\n // $DB->Execute( $sql );\n\t\t\t\t\n/* $text= */\n/* \"Keywords: \\\"$keys[1]\\\" */\n\n/* $keys[2]: $_SERVER[REMOTE_ADDR] (http://www.geoiptool.com/en/?IP=$_SERVER[REMOTE_ADDR]) */\n\t \n/* Found: http://lasr.cs.ucla.edu$_SERVER[REQUEST_URI]. */\n\n/* Sincerely, */\n/* Your Home Page Robot\"; */\n\n/* $html= */\n/* \"<b>Keywords: </b> <a href=\\\"$_SERVER[HTTP_REFERER]\\\"><strong>$keys[1]</strong></a><br/> */\n/* <b>$keys[2]: </b> <a href='http://www.geoiptool.com/en/?IP=$_SERVER[REMOTE_ADDR]'>$_SERVER[REMOTE_ADDR]</a><br/> */\n/* <br/> */\n/* <b>Found: </b> <a href=\\\"http://lasr.cs.ucla.edu$_SERVER[REQUEST_URI]\\\">http://lasr.cs.ucla.edu$_SERVER[REQUEST_URI]</a>.<br/> */\n/* OA<br/> */\n/* <br/> */\n/* Sincerely,<br/> */\n/* Your Home Page Robot\"; */\n\n // MailHelper::sendToUserFromRobot( $SETTINGS['user.name'], $SETTINGS['user.email'],\n // \t\t\t\t \"$keys[2] ($host)\",\n // \t\t\t\t $html,\n // \t\t\t\t $text );\n }", "title": "" }, { "docid": "d388a09c92dac1e68bf4319295467ec7", "score": "0.55831385", "text": "public function search(){\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$this->title = 'Search Monthly-Expense';\r\n\t\t$this->list = $this->Results();\r\n\t\treturn $this->renderWith(array('MonthlyExpense_results','App'));\r\n\t}", "title": "" }, { "docid": "759d1bafc48e2a86770231bc6215eba3", "score": "0.5581456", "text": "public function getSearchOne()\n {\n }", "title": "" }, { "docid": "9d67345e6cef0cb6bed57c4b39b309ea", "score": "0.5574176", "text": "function onSearch()\n {\n $data = $this->form->getData();\n \n TSession::setValue('SurveyList_filter_desc', NULL);\n if (isset($data->description) AND ($data->description)) {\n $filter = new TFilter('description', 'ilike', \"%$data->description%\");\n TSession::setValue('SurveyList_filter_desc', $filter);\n }\n\n $this->form->setData($data);\n TSession::setValue('Survey_filter_data', $data);\n \n $param=array();\n $param['offset'] =0;\n $param['first_page']=1;\n $this->onReload($param);\n }", "title": "" }, { "docid": "6f0e9a17b9f690b4ae4f482f3ca25f41", "score": "0.5573282", "text": "public function news()\n\t{\n\t\t$posts= $this->_pages->getAllPostsByCat('Actualites');\n\n\t\t$view= new View('News');\n\t\t$view->generate(array('posts'=>$posts));\n\t}", "title": "" }, { "docid": "50cce2ade504268d35831a6a2bce6276", "score": "0.55685776", "text": "public function search() {\n\t\t$pageTitle = 'Search';\n\t\tinclude_once SYSTEM_PATH.'/view/header.tpl';\n\t\tinclude_once SYSTEM_PATH.'/view/search.tpl';\n\t\tinclude_once SYSTEM_PATH.'/view/footer.tpl';\n }", "title": "" }, { "docid": "c581e70eae591ac4906f5b60e6342b3c", "score": "0.5553594", "text": "function advsearch()\n\t{\n\t\tif (!$this->sitemgr)\n\t\t{\n\t\t\tcommon::egw_header();\n\t\t\techo parse_navbar();\n\t\t\t$this->navbar_shown = True;\n\t\t}\n\t\t$this->t->set_file('search_form', 'adv_search.tpl');\n\n\t\t$this->t->set_var(array(\n\t\t\t'row_on'\t\t\t=> $GLOBALS['egw_info']['theme']['row_on'],\n\t\t\t'row_off'\t\t\t=> $GLOBALS['egw_info']['theme']['row_off'],\n\t\t\t'lang_advanced_search' => lang('Advanced Search'),\n\t\t\t'lang_find'\t\t\t=> lang('Find results'),\n\t\t\t'lang_all_words'\t=> lang('With all the words'),\n\t\t\t'lang_phrase'\t\t=> lang('With the exact phrase'),\n\t\t\t'lang_one_word'\t\t=> lang('With at least one of the words'),\n\t\t\t'lang_without_word'\t=> lang('Without the words'),\n\t\t\t'lang_show_cats'\t=> lang('Show messages in category'),\n\t\t\t'lang_all'\t\t\t=> lang('all'),\n\t\t\t'lang_include_subs'\t=> lang('Include subcategories'),\n\t\t\t'lang_pub_date'\t\t=> lang('Publication date'),\n\t\t\t'lang_anytime'\t\t=> lang('anytime'),\n\t\t\t'lang_3_months'\t\t=> lang('past %1 months', 3),\n\t\t\t'lang_6_months'\t\t=> lang('past %1 months', 6),\n\t\t\t'lang_past_year'\t=> lang('past year'),\n\t\t\t'lang_ocurrences'\t=> lang('Ocurrences'),\n\t\t\t'lang_anywhere'\t\t=> lang('Anywhere in the article'),\n\t\t\t'lang_in_title'\t\t=> lang('in the title'),\n\t\t\t'lang_in_topic'\t\t=> lang('in the topic'),\n\t\t\t'lang_in_text'\t\t=> lang('in the text'),\n\t\t\t'lang_num_res'\t\t=> lang('Number of results per page'),\n\t\t\t'lang_user_prefs'\t=> lang('User preferences'),\n\t\t\t'lang_order'\t\t=> lang('Order results by'),\n\t\t\t'lang_created'\t\t=> lang('Creation date'),\n\t\t\t'lang_artid'\t\t=> lang('Article ID'),\n\t\t\t'lang_title'\t\t=> lang('title'),\n\t\t\t'lang_user'\t\t\t=> lang('user'),\n\t\t\t'lang_modified'\t\t=> lang('Modification date'),\n\t\t\t'lang_desc'\t\t\t=> lang('Descendent'),\n\t\t\t'lang_asc'\t\t\t=> lang('Ascendent'),\n\t\t\t'lang_search'\t\t=> lang('search'),\n\t\t\t'form_action'\t\t=> $this->link('menuaction=phpbrain.uikb.index'),\n\t\t\t'select_categories'\t=> $this->bo->categories_obj->formatted_list('select', 'all', '', True)\n\t\t));\n\t\tif ($this->sitemgr)\n\t\t{\n\t\t\treturn $this->t->parse('out', 'search_form');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->t->pparse('output', 'search_form');\n\t\t}\n\t}", "title": "" }, { "docid": "6f930bce22fe5b14d7845c4969e61b99", "score": "0.554723", "text": "public function index(Request $request)\n {\n $keyword = $request->get('search');\n if(!empty($keyword)){\n $news = News::where('id', 'LIKE', \"%$keyword%\")\n ->orWhere('news_title', 'LIKE', \"%$keyword\")\n ->orWhere('news_image', 'LIKE', \"%$keyword\")\n ->orWhere('news_views', 'LIKE', \"%$keyword\")\n ->orWhere('news_author', 'LIKE', \"%$keyword\")\n ->latest()->paginate(10);\n }\n else{\n $news = News::latest()->paginate(10);\n }\n return view('admin.news.index', compact('news'));\n }", "title": "" }, { "docid": "0c19e7c62a1e4b2df9eaf5e8d36a4416", "score": "0.554723", "text": "public function news() \n\t{\n\t\tAdminModel::auth();\n\t\t\n //get all the news articles\n\t\t$news = AdminModel::news();\n \n\t\t$this->View->Render('admin/news', array('news' => $news));\n }", "title": "" }, { "docid": "f49ee45043b8f1586bf7fba8ef3ca6e5", "score": "0.5542077", "text": "public function search_news_for($query) {\n $raw = $this->_provider->search_for($query);\n $this->_store->save($raw);\n $json = $this->_presenter->to_json($raw);\n return $json;\n }", "title": "" }, { "docid": "839678e09e4e4278f3739d020152a199", "score": "0.5535497", "text": "function searchContentNew($search,$pagecontent,$default='')\n\t{\n\t\t//loop through the content\n\t\t//print_r($pagecontent);\n\t\tif (!is_object($data)) {\n\t\t\t//echo 'objects not supported yet';\n\t\t\treturn($default);\n\t\t\texit;\n\t\t}\n\telse {\n\t\n\n\t\t////exit;\n\t\tforeach ($pagecontent as $data)\n\t\t{\n\t\t\t//echo 'kk';\n\t\t\t//print_r($data);\n\t\t\t//force it to be a object, damn you PHP behave. Also check it is not already one\n\t \t//if (!is_object($data)) {\n\t \t\t//echo 'not object';\n\t\t\t\t//exit;\n\t\t\t\t$dobj = (object) $data;\n\t\t\t//}\n\t\t\t//else {\n\t\t\t\t//$dobj = $data;\n\t\t\t//}\n\t\t\t\n\t\t\t//echo $dobj->key;\n\t\t\t//exit;\n\t\t\t////echo $dobj->key;\n\t\t\t//check f this is the object you are looking for\n\t\t\tif (strtolower($dobj->key) == strtolower($search))\n\t\t\t{\n\t\t\t\t//return the value.\n\t\t\t//\techo 'iii';\n\t\t\t\treturn($dobj->value);\n\t\t\t}\n\t\t}\n\t\t//return the default\n\t\texit;\n\t\treturn($default);\n\t\t}\n\t}", "title": "" }, { "docid": "5ff9d0825cfe4a1a46e71a9bc8a0dc4c", "score": "0.5535374", "text": "function publishNewsFeeds( ) {\n\tchangePublishNewsFeeds( 1 );\n}", "title": "" }, { "docid": "9a6919c937b83c706c913018d6713801", "score": "0.55320776", "text": "public function news()\n {\n // load the resources\n $this->load->model('news_model', 'news');\n $this->load->helper('xml');\n\n $news = $this->news->get_news_items($this->config->item('rss_num_entries'), null);\n\n // need an empty array to prevent errors\n $data = array();\n\n if ($news->num_rows() > 0) {\n $i = 1;\n foreach ($news->result() as $item) {\n $data['entries'][$i]['link'] = site_url('main/viewnews/'.$item->news_id);\n $data['entries'][$i]['title'] = $item->news_title;\n $data['entries'][$i]['date'] = $item->news_date;\n\n $news_header = ucfirst(lang('labels_a') .' '. lang('global_newsitem') .' '. lang('labels_by'));\n $news_header.= ' '. $this->char->get_character_name($item->news_author_character, true) .\"\\r\\n\";\n $news_header.= \"<b>\". ucfirst(lang('labels_category')) .\"</b> - \". $item->newscat_name .\"\\r\\n\\r\\n\";\n\n $data['entries'][$i]['content'] = nl2br($news_header . $item->news_content);\n\n ++$i;\n }\n }\n\n // set the header\n header(\"Content-Type: application/rss+xml\");\n\n $this->_regions['items'] = Location::view('_base/rss_items', null, null, $data);\n\n Template::assign($this->_regions);\n\n Template::render();\n }", "title": "" }, { "docid": "d1beb8cb943159f2fbce551ffd861d1e", "score": "0.5531188", "text": "public function searchRs(){\n }", "title": "" }, { "docid": "3ec3885e30c8d8ab27f7bdbd0608335d", "score": "0.5530029", "text": "public function updatingSearch():void \n {\n $this->gotoPage(1);\n }", "title": "" }, { "docid": "0b9a9ab3230c56d0138fbfc8cc01dd13", "score": "0.55295986", "text": "public abstract function searching();", "title": "" }, { "docid": "6a26498f054e8a43c96912bc215371c0", "score": "0.55253375", "text": "function &searchTitle( &$queryText, $fetchPublished=false, &$SearchTotalCount, $categoryID = false )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n $queryText = $db->escapeString( $queryText );\r\n\r\n // Build the ORDER BY\r\n $OrderBy = \"eZArticle_Article.Published DESC\";\r\n\r\n if ( $fetchPublished == true )\r\n $fetchText = \"\";\r\n else\r\n $fetchText = \"AND eZArticle_Article.IsPublished = '1'\";\r\n\r\n if ( $categoryID )\r\n $categoryText = \"AND eZArticle_ArticleCategoryLink.CategoryID = '$categoryID'\";\r\n else\r\n $categoryText = \"\";\r\n\r\n $usePermission = true;\r\n\r\n $user =& eZUser::currentUser();\r\n\r\n $query = \"SELECT eZArticle_Article.ID AS ArticleID FROM eZArticle_Article, eZArticle_ArticleCategoryLink WHERE\r\n eZArticle_Article.Name LIKE '%$queryText%' AND\r\n eZArticle_Article.ID = eZArticle_ArticleCategoryLink.ArticleID\r\n $fetchText\r\n $categoryText GROUP BY eZArticle_Article.ID ORDER BY eZArticle_Article.Published\";\r\n\r\n $db->array_query( $article_array, $query );\r\n $SearchTotalCount = count( $article_array );\r\n\r\n for ( $i = 0; $i < count( $article_array ); $i++ )\r\n {\r\n $return_array[$i] = new eZArticle( $article_array[$i][$db->fieldName( \"ArticleID\" )], false );\r\n }\r\n\r\n return $return_array;\r\n }", "title": "" }, { "docid": "ee1b48c79a859b2d2ec2e9c2862cf99f", "score": "0.55239713", "text": "function search() {\n\n $host = system::getConfig()->getParam(\"solr\", \"video\")->getParamValue();\n\t\t$curl_handle = curl_init();\n\n if ( $this->getCorporateID() ) {\n \n $name = mofilmCorporate::getInstance($this->getCorporateID())->getName();\n //$name = preg_replace('/\\s/','+', $name);\n $url = $host.'select/?q=s_corpid:' . $this->getCorporateID();\n \n if ( $this->getBrandID() ) {\n $name = mofilmBrand::getInstance($this->getBrandID())->getName();\n $url = $url . '+AND+s_brandid:' . $this->getBrandID();\n }\n \n if ( $this->getEventID() ) {\n $url = $url . \"+AND+s_eventid:\" . $this->getEventID();\n }\n\n if ( $this->getStatus() ) {\n $url = $url . \"+AND+s_status:\" . urlencode($this->getStatus());\n }\n \n if ( $this->getProductID() ) {\n $url = $url . \"+AND+s_productid:\" . urlencode($this->getProductID());\n }\n\n if ( urldecode($this->getKeyword()) != \"*:*\" ) {\n systemLog::message($this->getKeyword());\n $keyword = preg_replace(\"/\\+/\",\"+AND+\",trim($this->getKeyword()));\n\t\t\t$url = $url . \"+AND+q=\" . $keyword;\n }\n \n \n if ( $this->getType() ) {\n $url = $url . \"+AND+s_type:\" . urlencode($this->getType());\n }\n\n if ( $this->getMovieID() ) {\n $url = $url . \"+AND+s_id=\" . $this->getMovieID();\n }\n $url .= '&wt=json&start=' . $this->getStart() . '&rows=30';\n\n } \n else if ( $this->getBrandID() ) {\n \n $name = mofilmBrand::getInstance($this->getBrandID())->getName();\n //$name = preg_replace('/\\s/','+', $name);\n $url = $host.'select/?q=s_brandid:' . $this->getBrandID();\n \n if ( $this->getEventID() ) {\n $url = $url . \"+AND+s_eventid:\" . $this->getEventID();\n }\n \n if ( $this->getProductID() ) {\n $url = $url . \"+AND+s_productid:\" . urlencode($this->getProductID());\n }\n\n if ( $this->getStatus() ) {\n $url = $url . \"+AND+s_status:\" . urlencode($this->getStatus());\n }\n\n if ( urldecode($this->getKeyword()) != \"*:*\" ) {\n $keyword = preg_replace(\"/\\+/\",\"+AND+\",trim($this->getKeyword()));\n\t\t\t$url = $url . \"+AND+q=\" . $keyword;\n }\n \n \n if ( $this->getType() ) {\n $url = $url . \"+AND+s_type:\" . urlencode($this->getType());\n }\n\n if ( $this->getMovieID() ) {\n $url = $url . \"+AND+s_id=\" . $this->getMovieID();\n }\n $url .= '&wt=json&start=' . $this->getStart() . '&rows=30';\n\n } else if ( $this->getTags() && urldecode($this->getKeyword()) != \"*:*\" ) {\n\n\t\t\t//$keyword = preg_replace(\"/ /\",\"+AND+\",trim(urldecode($this->getKeyword()))); \n $keyword = trim($this->getKeyword());\n systemLog::message(\"tag\".urldecode($keyword));\n systemLog::message(\"tag\".$keyword);\n systemLog::message(\"tag\".urlencode($keyword));\n\t\t\tsystemLog::message(\"tag\".urlencode('\"'.$keyword.'\"'));\n\t\t\t$url = $host.'select/?q=s_genre:\"' . $keyword. '\"';\n\t\t\t\n\t\t\tif ( $this->getEventID() ) {\n\t\t\t\t$url = $url . \"+AND+s_eventid:\" . $this->getEventID();\n\t\t\t}\n if ( $this->getProductID() ) {\n $url = $url . \"+AND+s_productid:\" . urlencode($this->getProductID());\n }\n \n\t\t\tif ( $this->getStatus() ) {\n\t\t\t\t$url = $url . \"+AND+s_status:\" . urlencode($this->getStatus());\n\t\t\t}\n\n\t\t\tif ( $this->getType() ) {\n\t\t\t\t$url = $url . \"+AND+s_type:\" . urlencode($this->getType());\n\t\t\t}\n\n\t\t\tif ( $this->getMovieID() ) {\n\t\t\t\t$url = $url . \"+AND+s_id=\" . $this->getMovieID();\n\t\t\t}\n\n\t\t\t$url .= '&wt=json&start=' . $this->getStart() . '&rows=30';\n\n\n\n\t\t} else if ( $this->getEventID() ) {\n\n\t\t\tif ( $this->getEventID() ) {\n\t\t\t\t$url = $host.'select/?q=s_eventid:' . $this->getEventID();\n\t\t\t}\n if ( $this->getProductID() ) {\n $url = $url . \"+AND+s_productid:\" . urlencode($this->getProductID());\n }\n \n\t\t\tif ( $this->getStatus() ) {\n\t\t\t\t$url = $url . \"+AND+s_status:\" . urlencode($this->getStatus());\n\t\t\t}\n\n if ( urldecode($this->getKeyword()) != \"*:*\" ) {\n $keyword = preg_replace(\"/\\+/\",\"+AND+\",trim($this->getKeyword()));\n $url = $url . \"+AND+q=\" . $keyword;\n }\n/* \n\t\t\tif ( urldecode($this->getKeyword()) != \"*:*\" ) {\n\t\t\t\t$url = $url . \"+AND+q=\" . urlencode($this->getKeyword());\n\t\t\t}\n*/\n\t\t\tif ( $this->getType() ) {\n\t\t\t\t$url = $url . \"+AND+s_type:\" . urlencode($this->getType());\n\t\t\t}\n\t\t\t\n\t\t\tif ( $this->getMovieID() ) {\n\t\t\t\t$url = $url . \"+AND+s_id=\" . $this->getMovieID();\n\t\t\t}\n\t\t\n\t\t\t$url .= '&wt=json&start=' . $this->getStart() . '&rows=30';\n\t\t} else if ( $this->getUserID() ) {\n \n\t\t\t$url = $host.'select/?q=s_userid:' . $this->getUserID() . '&wt=json&start=' . $this->getStart() . '&rows=30';\n\t\t} else if ( $this->getStatus() ) {\n\t\t\t$url = $host.'select/?q=s_status:' . urlencode($this->getStatus()) . '&wt=json&start=' . $this->getStart() . '&rows=30';\n\t\t} else if ( $this->getProductID() ) {\n $url = $host . \"select/?q=s_productid:\" . $this->getProductID();\n \n \tif ( $this->getType() ) {\n\t\t\t\t$url = $url . \"+AND+s_type:\" . urlencode($this->getType());\n\t\t\t}\n \n\t\t $url .= '&wt=json&start=' . $this->getStart() . '&rows=30';\n \n } else if ( $this->getType() ) {\n $url = $host.'select/?q=s_type:' . urlencode($this->getType());\n\t\t\tif ( urldecode($this->getKeyword()) == \"*:*\" ) {\n\t\t\t\t$url = $url ;\n\t\t\t} else {\n\t\t\t\t$url = $url . '+AND+s_tagname:'. $this->getKeyword();\n\t\t\t} \n if ( $this->getProductID() ) {\n $url = $url . \"+AND+s_productid:\" . urlencode($this->getProductID());\n }\n $url .= '&wt=json&start=' . $this->getStart() . '&rows=30';\n \n\t\t} else if ( $this->getMovieID() ) {\n\t\t\t$url = $host. 'select/?q=s_id:' . $this->getMovieID() . '&wt=json&start=' . $this->getStart() . '&rows=30';\n\t\t} else {\n systemLog::message(\"keyword\" . $this->getKeyword());\n \n //$keyword = preg_replace(\"/\\+/\",\"+AND+\",trim($this->getKeyword()));\n $keyword = trim(urldecode($this->getKeyword()));\n $keyword = preg_replace(\"/\\+/\",\"+AND+\", $keyword); \n if ($keyword != \"*:*\"){\n systemLog::message(\"here\".$keyword);\n $keyword = preg_replace(\"/:/\",\"\\:\", $keyword);\n $keyword = urlencode('\"'.$keyword.'\"');\n }\n \n\t\t\t//$url = $url . \"+AND+q=\" . url$keyword; \n\t\t\t$url = $host. 'select/?q=' . $keyword . '&wt=json&start=' . $this->getStart() . '&rows=30';\n\t\t}\n\n\t\tif ( $this->getOrderDirection() == 2 && $this->getOrderBy() == self::ORDER_BY_RATING ) {\n\t\t\t$url.= \"&sort=s_avgrating+desc\";\n\t\t} else if ( $this->getOrderDirection() == 1 && $this->getOrderBy() == self::ORDER_BY_RATING ) {\n\t\t\t$url.= \"&sort=s_avgrating+asc\";\n } else if ( $this->getOrderDirection() == 2 && $this->getOrderBy() == self::ORDER_BY_UPLOADED ){\n $url.= \"&sort=s_uploaded+desc\";\n } else if ( $this->getOrderDirection() == 1 && $this->getOrderBy() == self::ORDER_BY_UPLOADED ) {\n $url.= \"&sort=s_uploaded+asc\";\n } else if ( $this->getOrderDirection() == 2 && $this->getOrderBy() == self::ORDER_BY_FMNAME ){\n $url.= \"&sort=s_name+desc\";\n } else if ( $this->getOrderDirection() == 1 && $this->getOrderBy() == self::ORDER_BY_FMNAME ) {\n $url.= \"&sort=s_name+asc\";\n } else if ( $this->getOrderDirection() == 2 && $this->getOrderBy() == self::ORDER_BY_TITLE ){\n $url.= \"&sort=s_title+desc\";\n } else if ( $this->getOrderDirection() == 1 && $this->getOrderBy() == self::ORDER_BY_TITLE ) {\n $url.= \"&sort=s_title+asc\";\n } else if ( $this->getOrderDirection() == 1 && $this->getOrderBy() == self::ORDER_BY_AWARD ){\n $url.= \"&sort=s_award+desc\";\n } else if ( $this->getOrderDirection() == 2 && $this->getOrderBy() == self::ORDER_BY_AWARD ) {\n $url.= \"&sort=s_award+asc\";\n } \n\n\t\tsystemLog::message($url);\n\t\tcurl_setopt($curl_handle, CURLOPT_URL, $url);\n\t\tcurl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);\n\t\t$jsonResponse = curl_exec($curl_handle);\n\n\n\t\tcurl_close($curl_handle);\n\t\t$this->setResponse(json_decode($jsonResponse));\n\t}", "title": "" }, { "docid": "7aaa51d475b99302f3cfdd82414a4b1f", "score": "0.5521069", "text": "function indexPage($html) {\n echo \"Title: \".$html->find('title', 0)->innertext.\"<br>\";\n echo \"<br><br>\";// I'm echoing the title here but this is where you may\n \t\t\t\t\t\t\t\t\t\t\t\t// want to link what you want to index into a SQL database\n // sqlQuery('INSERT INTO table .... VALUES ($title)');\n }", "title": "" }, { "docid": "4cb94bd8a4e821cbec3f7b37aeaced78", "score": "0.55128217", "text": "function SearchLinksCallback(&$s)\n{\n $s = new SelectBuilder('*', 'lx_links');\n $s->AddJoin('lx_links', 'lx_link_fields', '', 'link_id');\n\n if( $_REQUEST['field'] == 'title,description,keywords' )\n {\n $s->AddFulltextWhere($_REQUEST['field'], $_REQUEST['search'], TRUE);\n }\n else\n {\n $s->AddWhere($_REQUEST['field'], $_REQUEST['search_type'], $_REQUEST['search'], FALSE);\n }\n\n $s->AddWhere('status', ST_MATCHES, $_REQUEST['status'], TRUE);\n $s->AddWhere('is_edited', ST_MATCHES, $_REQUEST['is_edited'], TRUE);\n\n return TRUE;\n}", "title": "" }, { "docid": "751caf7fd5a6b46784c85bff096a05a5", "score": "0.5495838", "text": "function ListPage_Lookup(&$params)\r\n\t{\r\n\t\t// call parent constructor. always at the first line!!!\r\n\t\tparent::ListPage_Embed($params);\r\n\t\t// init params\r\n\t\t$this->initLookupParams();\t\r\n\t\t\r\n\t\t$this->permis[ $this->tName ][\"search\"] = 1;\t\t\r\n\t\t$this->jsSettings['tableSettings'][$this->tName]['permissions'] = $this->permis[$this->tName];\r\n\r\n\t\t$this->isUseAjaxSuggest = false;\t\r\n\t}", "title": "" }, { "docid": "f9da9a3e45a2e72fd01c98a43569cb9f", "score": "0.54773265", "text": "function get_news() {\n\t\t\tinclude_once(\"db.inc.php\");\n\t$db=new DB();\n\t$db->open();\n\t\t$query = \"SELECT * FROM posts where forumname = '1' and parentpost = '0' order by postid DESC LIMIT 5\";\n\t\t$result = $db->query($query);\n\t\t$num_results = $db->numRows($result);\n\t\tif ($DEBUG) echo $query . \"<br>\\n\";\n\t\tif ($DEBUG) echo('Invalid query: ' . mysql_error() . \"<br>\\n\");\n\t\tfor ($i=0; $i <$num_results; $i++)\n\t\t{\n\t\t\t$row = $db->fetchArray($result);\n$data=$row[content];\n\t\t\tinclude './skin/site/news.html';\n\n\t\t}\n\t}", "title": "" }, { "docid": "b1f60b88b0559d8808d16bb40cd34f25", "score": "0.5473769", "text": "public function search()\n\t{\n\t\t$term = $this->input->get('term');\n\t\t$results = Auto_Modeler_ORM::factory('client')->search($term);\n\t\t$this->view->results = $results;\n\t}", "title": "" }, { "docid": "20371c0ec46e21f90286aa3e780f3ef4", "score": "0.547295", "text": "public function show(News $news)\n {\n //\n }", "title": "" }, { "docid": "20371c0ec46e21f90286aa3e780f3ef4", "score": "0.547295", "text": "public function show(News $news)\n {\n //\n }", "title": "" }, { "docid": "20371c0ec46e21f90286aa3e780f3ef4", "score": "0.547295", "text": "public function show(News $news)\n {\n //\n }", "title": "" }, { "docid": "20371c0ec46e21f90286aa3e780f3ef4", "score": "0.547295", "text": "public function show(News $news)\n {\n //\n }", "title": "" }, { "docid": "a203eac5a52e14c6ad042fdaffb50761", "score": "0.546762", "text": "function display_old_news()\n{\n $articles[] = new Article();\n global $main_news_max, $old_news_max;\n\n $articles = get_article_array(($main_news_max+$old_news_max));\n for ($i = $main_news_max; $i < count($articles); $i++)\n {\n $articles[$i]->print_link();\n }\n}", "title": "" } ]
e90e8b4928bf52b4a6b170e974696dfd
RETOURNE L'ID DE LA MAINTENANCE QUI VIENT DETRE CREER
[ { "docid": "2ec57c47ce3829bfe4816c3ef19cfe25", "score": "0.0", "text": "function getIdMaintenance($id_probleme,$dateDebut,$dateFin)\n{\n require 'config/dbconnect.php';\n\n $sql = \"SELECT id FROM `maintenance` WHERE id_probleme = \".$id_probleme.\" and dateDebut='\".$dateDebut.\"' AND dateFin ='\".$dateFin.\"' \";\n $requete = $db->query($sql);\n\n $row = $requete->fetch();\n return $row['id'];\n}", "title": "" } ]
[ { "docid": "7a2c8456421c857fb270500b6687c036", "score": "0.70164627", "text": "public function ID_INSTANCIA();", "title": "" }, { "docid": "bf39c2522a9cb9839805f4d493c134e5", "score": "0.6923777", "text": "private function getID(){\n\t\treturn $this->ultimoID;\n\t}", "title": "" }, { "docid": "4a10ca5dec1396a2dfb54e47fc080096", "score": "0.67798996", "text": "protected abstract function _obtener_id();", "title": "" }, { "docid": "fa2437e64d25ced3c76124d10e1244b3", "score": "0.66642934", "text": "function GestionID($ID,$DP){\n\t/// Principe : \n\t/// - l'ensemble des versions des formualaire sont sauvegardes dans la base\n\t/// - chaque version possède un identifiant unique VID\n\t/// Methode :\n\t/// - les insersions pour chaque nouveau patient ou chaque nouveau formualaire est gérée\n\t/// en amont de l'affichage du formualire web\n\t/// - la fonction d'engistrement du/des formulaires web n'utilise que la fonction Mysql update\n\t/// Nouveaux patients :\n\t/// - pour les nouveaux patients deux options sont possibles\n\t/// * soit creation par l'utilisateur d'un numero de patient :\n\t/// * soit attribution de façon automatique d'un numéro d'indentification\n\t/// - on identifie les nouveaux patients par l'arguement identifiant unique (ID) = 0\n\n\t//Création d'une nouvelle ligne dans la base de données pour l'identifiant\n\t//patient 0\n\n\t//Création d'une nouvelle ligne dans la base\n\t//sur la base d'une duplication de la dernière mise à jour \n\t//pour un patient donnée\n\t\n\t//Recuperation des donnees formulaire\t\n\t$DetailsFormulaire=$this->GetDetailsFormulaire($DP);\n\t\n\t//Récupération du VID créé servant d'identifiant unique pour le reste des enregistrements\n\tif($ID!=0){\n\t\t//All entry for this ID are inactives\n\t\t$Res=parent::update('UPDATE '.$DP['NABV'].' SET ACTIF=0 WHERE ID='.$ID);\n\t\t//Methode de duplicatinon de ligne tenant compte de l'auto-incrémentation\n\t\t// ref : http://www.av8n.com/computer/htm/clone-sql-record.htm\n\t\t$VidUpdate=$DP['db']->select('select max(vid) as vid from '.$DP['NABV'].' where id='.$ID);\n\t\t$Res=parent::execute('CREATE TEMPORARY TABLE tmp ENGINE=MEMORY SELECT * FROM '.$DP['NABV'].' WHERE vid='.$VidUpdate[0]['vid']);\n\t\t$Res=parent::execute('select max(vid) as vid from '.$DP['NABV']);$VidUpdate=$Res[0]['vid']+1;\n\t\t$Res=parent::execute('UPDATE tmp SET vid='.$VidUpdate);\n\t\t$Res=parent::execute('INSERT INTO '.$DP['NABV'].' SELECT * FROM tmp');\n\t\t$Res=parent::execute('DROP TABLE tmp');\n\t\t$Res=parent::execute('UPDATE '.$DP['NABV'].' SET ACTIF=0 WHERE ID='.$ID);\n\t\t$Res=parent::execute('UPDATE '.$DP['NABV'].' SET ACTIF=1 WHERE VID='.$VidUpdate);\n\t}\n\n\tif($ID==0){\n\t\t$IdUpdate=parent::execute('select max(id) as id from '.$DP['NABV']);\n\t\t$NewID=$IdUpdate[0]['id']+1;\n\t\t$Res=parent::execute('insert into '.$DP['NABV'].' (ID) values ('.$NewID.')');\n\t\t$VidUpdate=parent::select('select max(vid) as vid from '.$DP['NABV'].' where id='.$NewID);\n\t\t$VidUpdate=$VidUpdate[0]['vid']; \n\t}\n\n\n\n\treturn($VidUpdate);\n\n\t}", "title": "" }, { "docid": "99cec2a0e09e4b6ffe370179cb526630", "score": "0.6654042", "text": "public function create() {\n\n $lastId = parent::create();\n if ($lastId != NULL) {\n //RECALCULAR EL PRESUPUESTO\n $this->getIDPsto()->save();\n }\n return $lastId;\n }", "title": "" }, { "docid": "207a8ecef9157f8c9ab56524d4bf79ff", "score": "0.6599397", "text": "function getIdMessaggioDiRiferimento();", "title": "" }, { "docid": "7cb73bc5980a78651d4cc62d246ad41e", "score": "0.6526455", "text": "public function get_id()\n {\n }", "title": "" }, { "docid": "7cb73bc5980a78651d4cc62d246ad41e", "score": "0.65264475", "text": "public function get_id()\n {\n }", "title": "" }, { "docid": "7cb73bc5980a78651d4cc62d246ad41e", "score": "0.6526165", "text": "public function get_id()\n {\n }", "title": "" }, { "docid": "7cb73bc5980a78651d4cc62d246ad41e", "score": "0.65257853", "text": "public function get_id()\n {\n }", "title": "" }, { "docid": "7cb73bc5980a78651d4cc62d246ad41e", "score": "0.6525532", "text": "public function get_id()\n {\n }", "title": "" }, { "docid": "7cb73bc5980a78651d4cc62d246ad41e", "score": "0.6525532", "text": "public function get_id()\n {\n }", "title": "" }, { "docid": "492d11a1b4110fa9e0073d15b674877f", "score": "0.6506858", "text": "public function obtenerID();", "title": "" }, { "docid": "e3563b2b4d8d11bc0d4f9633221e0245", "score": "0.64448076", "text": "private function getNewIdAction()\n\t{\n\t\t$requete_prepare = parent::getConnexion()->prepare(\"SELECT idAction FROM t_combat_action\");\n\t\t$requete_prepare->execute();\n\t\t$requete_prepare->setFetchMode(PDO::FETCH_OBJ);\n\t\n\t\t//On récupère le plus grand identifiant (sans le A)\n\t\t$last = 0;\n\t\twhile($id = $requete_prepare->fetch())\n\t\t{\n\t\t\t$id = $id->idAction;\n\t\t\t$num = intval(substr($id, 1, strlen($id)-1));\n\t\t\tif($num > $last)\n\t\t\t\t$last=$num;\n\t\t}\n\t\n\t\t$newId = 'A1';\n\t\tif($last != 0) //On incrémente l'identifiant de 1\n\t\t{\n\t\t\t$newId = 'A'.($last+1);\n\t\t}\n\t\treturn $newId;\n\t}", "title": "" }, { "docid": "316d1a297072fcb8745e93a1a7596854", "score": "0.6441442", "text": "function getUltimoIdInsertado(){\r\n\t\treturn 0;\r\n\t}", "title": "" }, { "docid": "600974b0d81675fab1951ec61fe0f2e9", "score": "0.6425121", "text": "function getId() ;", "title": "" }, { "docid": "dc5167d09c14671d0e62c619e9a55cc7", "score": "0.64097226", "text": "public function obtenerID(){\n\t\t\treturn $this->id;\n\t\t}", "title": "" }, { "docid": "8615a5d37c281324fcdf18e9cae9b549", "score": "0.64097214", "text": "private function getNewIdCombat()\n\t{\n\t\t$requete_prepare = parent::getConnexion()->prepare(\"SELECT idCombat FROM t_combat\");\n\t\t$requete_prepare->execute();\n\t\t$requete_prepare->setFetchMode(PDO::FETCH_OBJ);\n\t\n\t\t//On récupère le plus grand identifiant (sans le C)\n\t\t$last = 0;\n\t\twhile($id = $requete_prepare->fetch())\n\t\t{\n\t\t\t$id = $id->idCombat;\n\t\t\t$num = intval(substr($id, 1, strlen($id)-1));\n\t\t\tif($num > $last)\n\t\t\t\t$last=$num;\n\t\t}\n\t\n\t\t$newId = 'C1';\n\t\tif($last != 0) //On incrémente l'identifiant de 1\n\t\t{\n\t\t\t$newId = 'C'.($last+1);\n\t\t}\n\t\treturn $newId;\n\t}", "title": "" }, { "docid": "05f57a20d6ac8cdd4a788ff0c8c5471e", "score": "0.63895607", "text": "public function getRegPuisiID(){\n\t\t$version = \"04\";\n\t\t$sq = mysql_query(\"SELECT * FROM tbl_puisi\") or die(mysql_error());\n\t\t$num_row = mysql_num_rows($sq);\n\t\t$DT = getdate();\n\t\t$DR = $DT['year'].\"\".$DT['mon'].\"\".$DT['mday'];\n\t\tif($num_row <= 0){\n\t\t\t$number = 1;\n\t\t\t$id_reg = \"PUISI-\".$DR.\"-0\".$number.\"-\".$version;\n\t\t}else{\n\t\t\t$number = $num_row + 1;\n\t\t\tif($number < 10){\n\t\t\t\t$id_reg = \"PUISI-\".$DR.\"-0\".$number.\"-\".$version;\n\t\t\t}else{\n\t\t\t\t$id_reg = \"PUISI-\".$DR.\"-\".$number.\"-\".$version;\n\t\t\t}\n\t\t}\n\t\treturn $id_reg;\n\t}", "title": "" }, { "docid": "af4a4873cb1010e91bfe0b7c85bd48cf", "score": "0.63711125", "text": "public function getID()\r\n{\r\nreturn $this->comentario;\r\n}", "title": "" }, { "docid": "1a33f2bad5b9e72dc95fd3661d4279eb", "score": "0.63456583", "text": "function createTransactionID() {\n\t\t$oNewsletterHistory = new mofilmCommsNewsletterhistory();\n\t\t$oNewsletterHistory->setNewsletterID($this->getNewsletterData()->getNewsletterID());\n\t\t$oNewsletterHistory->setStatus(0);\n\t\t$oNewsletterHistory->setUserID($this->getUserID());\n\t\t$oNewsletterHistory->setTransactionID($this->getTransactionID());\n\t\t$oNewsletterHistory->save();\n\t\treturn $oNewsletterHistory->getID();\n\t}", "title": "" }, { "docid": "32c70b4c49b820da2f70de83fe5619bb", "score": "0.63235027", "text": "public function get_id()\n {\n }", "title": "" }, { "docid": "a9390b2e6fd55ab5bb897a40de5f8c82", "score": "0.632281", "text": "function getIdasociada() { return $this->idasociada;\n }", "title": "" }, { "docid": "d97e691c26b172a11971ded3f9ca96ac", "score": "0.6309386", "text": "public function determineId() {}", "title": "" }, { "docid": "3d500c3ec25412b092cd9d43a6888a41", "score": "0.6304623", "text": "function get_id() {\r\n\t\treturn $this->id_ma;\r\n\t}", "title": "" }, { "docid": "930ca34cb07fafe30e59d298b1ce6207", "score": "0.62975025", "text": "public function getID();", "title": "" }, { "docid": "930ca34cb07fafe30e59d298b1ce6207", "score": "0.62975025", "text": "public function getID();", "title": "" }, { "docid": "930ca34cb07fafe30e59d298b1ce6207", "score": "0.62975025", "text": "public function getID();", "title": "" }, { "docid": "24694fcb321509330cb4fb050d7d5299", "score": "0.6264212", "text": "public function get_idActeur()\n {\n return $this->_idActeur;\n }", "title": "" }, { "docid": "24a937f0596dcbbe58490b0eb7aea16b", "score": "0.62552416", "text": "public function getId_incidencia()\n {\n return $this->id_incidencia;\n }", "title": "" }, { "docid": "6048e6eed597787b96a6b23c21ee31da", "score": "0.62540114", "text": "public function getIdcompte()\n{\nreturn $this->idcompte;\n}", "title": "" }, { "docid": "d0f6498f74f05418f7b63a6769fe7196", "score": "0.6241925", "text": "public function GetId()\n\t{\n\t\t$datas = $this->db->query('select DISTINCT no_formulir,namadepartemen from v_tblformulir order by no_formulir asc');\n\t\treturn $datas;\n\t}", "title": "" }, { "docid": "deef30f112d02b7b6ae2b2f35131374b", "score": "0.62375027", "text": "public function get_id();", "title": "" }, { "docid": "deef30f112d02b7b6ae2b2f35131374b", "score": "0.62375027", "text": "public function get_id();", "title": "" }, { "docid": "deef30f112d02b7b6ae2b2f35131374b", "score": "0.62375027", "text": "public function get_id();", "title": "" }, { "docid": "deef30f112d02b7b6ae2b2f35131374b", "score": "0.62375027", "text": "public function get_id();", "title": "" }, { "docid": "13ba37f5e2afa649a1555b296f32e7b7", "score": "0.6227109", "text": "public function getId(){\n\t\treturn $this->crmbuscador->getIdcrm();\n\t}", "title": "" }, { "docid": "3109c76e71172f74bec1dc41a5385030", "score": "0.6218765", "text": "public function save()\r\n {\r\n $this->periodo->save();\r\n \r\n // Retornar el ID de la plantilla modificada\r\n $id = $this->periodo->get('periodo_lectivo_id');\r\n return $id;\r\n }", "title": "" }, { "docid": "9a4d45c6738ae095ead16eb13c5ca9a5", "score": "0.6217619", "text": "public function getIdEntreprise()\n {\n return $this->idEntreprise;\n }", "title": "" }, { "docid": "9a4d45c6738ae095ead16eb13c5ca9a5", "score": "0.6217619", "text": "public function getIdEntreprise()\n {\n return $this->idEntreprise;\n }", "title": "" }, { "docid": "496548f5516050437f01dc3d5986d78c", "score": "0.6201358", "text": "function getidManif(){\n return $this->idmanif;\n }", "title": "" }, { "docid": "fbce23439af9bbee814f8c8e8131daac", "score": "0.6195964", "text": "public function niveau() {\n\t\treturn $this->idNiveau ; \n\t}", "title": "" }, { "docid": "2791e2c413268ac521ad6bfea50d73f7", "score": "0.61903155", "text": "public function ID();", "title": "" }, { "docid": "4e4caab14ce85e3d1540bdca86287b9e", "score": "0.61877745", "text": "public function getVersiondId() {}", "title": "" }, { "docid": "de6512ca5251f21e4e77f027f23d69d2", "score": "0.6147804", "text": "function zonawilayah_createid( $tbl_zonawilayah ){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_zonawilayah ORDER BY id DESC\"); \n\t\t$data =\tmysql_fetch_array($sql);\n\t\t$UID = $data[\"id\"];\n\t\t$UID = $UID+1; \n\t\treturn $UID;\n\t}", "title": "" }, { "docid": "b1fccc20c33c499137b079edd8f000f7", "score": "0.61461693", "text": "function getId_asignatura()\n {\n if (!isset($this->iid_asignatura) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_asignatura;\n }", "title": "" }, { "docid": "950c92aae9299d8fdf010734e51398d0", "score": "0.6138954", "text": "public function getIdCompra()\r\n{\r\nreturn $this->idCompra;\r\n}", "title": "" }, { "docid": "950c92aae9299d8fdf010734e51398d0", "score": "0.6138954", "text": "public function getIdCompra()\r\n{\r\nreturn $this->idCompra;\r\n}", "title": "" }, { "docid": "4f01d32fdd497d6364712dd367445682", "score": "0.6135206", "text": "public function getID() : int {return $this->_id;}", "title": "" }, { "docid": "14d90a96fab6dbe1d2b16d31c354aad4", "score": "0.6120877", "text": "function readContratID(){\n\n $query = \"SELECT * FROM \" . $this->table_name . \" WHERE id = ? LIMIT 0,1\";\n\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(1, $this->id);\n $stmt->execute();\n\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n $this->no_contrat = $row['ref_contrat'];\n $this->idimmatveh = $row['collaborateur'];\n }", "title": "" }, { "docid": "0af299e53d5459a4362ba5114a6a64fe", "score": "0.610969", "text": "public function get_id() : string\n {\n }", "title": "" }, { "docid": "0af299e53d5459a4362ba5114a6a64fe", "score": "0.610969", "text": "public function get_id() : string\n {\n }", "title": "" }, { "docid": "ddf107f4a95436973295d3745ef9725a", "score": "0.6109531", "text": "public function getIdEdificio()\n {\n return $v_id_edificio;\n \n }", "title": "" }, { "docid": "fc3211eb585a26c81be4e15ff34309bb", "score": "0.60886604", "text": "function idRequerimiento(){\n $consulta = \"SELECT id FROM requerimientos ORDER BY CAST(id AS INTEGER) DESC LIMIT 1\";\n\n $conec = new Conexion();\n\n $conec->conectar();\n\n if (!$conec->obtenerConexion()){\n return -1; // Error en la conexion!\n }\n\n $resultado = pg_query($consulta);\n\n if (!$resultado){\n return 0; // Error en la consulta\n }else{// Se ejecuto con éxito\n if (pg_numrows($resultado) > 0){\n $arr = pg_fetch_row ($resultado, 0);\n\n $this->id = $arr[0]+1;\n\n pg_FreeResult($resultado);\n $conec->cerrarConexion();\n }\n return 1;\n }\n }", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.60882676", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.60882676", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.60882676", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.60882676", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.60882676", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.60882676", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.60882676", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.60882676", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.60882676", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.60882676", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.60882676", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.60882676", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.60882676", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.60882676", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.60882676", "text": "public function id();", "title": "" }, { "docid": "79401ec99ec3d4a5108ac09f8d917bc5", "score": "0.60882676", "text": "public function id();", "title": "" }, { "docid": "98effaf568d74120c6888ddf76631eef", "score": "0.60843295", "text": "public function getIdCompra()\n {\n $this->delete->truncar(\"tb_precio_compra_temporal\");\n $idUser = $this->session->userdata('idUser');\n // // obtener el ultimo id de ventas del mismo usuario\n $maxIdVentas = $this->consultas->getMaxIdVentasByUser($idUser);\n $dataVenta = array(\n 'idUsuario' => $idUser,\n );\n if($maxIdVentas!=0)\n {\n if($maxIdVentas['Total']<=0)\n {\n $this->delete->delMovimientosFallidos($maxIdVentas['id']);\n }\n if($maxIdVentas['Total']<=0)\n {\n return $maxIdVentas['id'];\n }\n else{\n $idVenta = $this->insertar->newVenta($dataVenta);\n return $idVenta;\n }\n }\n // asignar nueva venta a este usuario\n $idVenta = $this->insertar->newVenta($dataVenta);\n }", "title": "" }, { "docid": "1543ff2c328d24dc7c0d2b800b4af85b", "score": "0.60797375", "text": "public function getId()\n\t{\n\t\treturn (int)$this->id_cliente;\n\t}", "title": "" }, { "docid": "3835293f5bab083f0e16906728b99049", "score": "0.6076872", "text": "function ID()\n {\n #echo \"eZNewsUtility::ID()<br />\\n\";\n $value = 0;\n \n if ( $this->State_ != \"new\" )\n {\n $value = $this->ID;\n }\n \n return $value;\n }", "title": "" }, { "docid": "c1d91aaa5d0a6f32c9474eea29e1a211", "score": "0.607517", "text": "function getId()\t\t\t\t {return $this->id;}", "title": "" }, { "docid": "f5ee92b8c2ccfac87d943b6a17bac0c9", "score": "0.6071321", "text": "public function id(): int;", "title": "" }, { "docid": "f5ee92b8c2ccfac87d943b6a17bac0c9", "score": "0.6071321", "text": "public function id(): int;", "title": "" }, { "docid": "64d0c2828f6b552247333c426946993c", "score": "0.6069841", "text": "public static function dernier () {\n self::initialiserDB();\n return self::$database->dernierId();\n }", "title": "" }, { "docid": "c78559d00cd698a0435852a13d25f7aa", "score": "0.60677963", "text": "function getIdPersonne() {\n return $this->idpersonne;\n }", "title": "" }, { "docid": "1f617a7c527945bc74c3520a44cd8a3b", "score": "0.6059898", "text": "private function establecerAutor()\n {\n $obj_autor = Autor::where('nombre', $this->autor)->first();\n\n if($obj_autor == null)\n {\n // echo \"NO EXISTE autor</br>\";\n\n $obj_autor = Autor::Create(['nombre' => $this->autor, 'creador_id' => $this->creador]); //Guardo la especie-mariedad-forma asociandola a un orden\n return $obj_autor->id;\n }\n // echo \"</br>EXISTE autor</br>\";\n\n return $obj_autor->id;\n }", "title": "" }, { "docid": "82173aa9023746690e12d97afa7c1b11", "score": "0.6059864", "text": "function getIDDuLieu() {\n return $this->idDuLieu;\n}", "title": "" }, { "docid": "45698fe45a3aa46cf642fc94024c2a18", "score": "0.605864", "text": "public function setId($nouvelleValeur) {\n\t\t/* La modification de l'identifiant DB est interdite SAUF SI l'objet est vide au depart */\n\t\tif (!$this->getEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\t$this->id = $nouvelleValeur;\n\t}", "title": "" }, { "docid": "b1e529fcf5a78a0abcfd5b62e051ea52", "score": "0.6055972", "text": "function get_id(){\n\t\treturn $this->id;\n\t}", "title": "" }, { "docid": "5c979e0d87ee50cee60d74e400d3ee56", "score": "0.6055566", "text": "function getID(){\r\n\t\treturn $this->id;\r\n\t}", "title": "" }, { "docid": "ddbdc3e43885a4cb87d4f44a243d8c0b", "score": "0.60501766", "text": "function getId_entorno() {\n return $this->id_entorno;\n }", "title": "" }, { "docid": "e466debc0890b1b775db8644985b9d8a", "score": "0.6043894", "text": "function get_id()\n { return $this->id ;\n }", "title": "" }, { "docid": "1bfc634a412793adad6c4b5cfd12f1b8", "score": "0.60416496", "text": "public function getId(){\n return $this->iId;\n }", "title": "" }, { "docid": "7fabf6cfd1cbb37f99ac6868e5e3fd22", "score": "0.60385877", "text": "function sommaire_intertitre_ancre($titre, $h, $ancres_vues = array()) {\tif ($id = extraire_attribut($h[1], 'id')) {\n\t\treturn $id;\n\t}\n\n\t// generer une ancre a partir du titre\n\t$ancre = trim(textebrut($titre));\n\t$ancre = translitteration($ancre);\n\t$ancre = couper($ancre, 80);\n\t$ancre = preg_replace(',\\W+,', '-', $ancre);\n\t$ancre = trim($ancre, '-');\n\tif (!preg_match(',^[a-z],i', $ancre)) {\n\t\t$ancre = \"t$ancre\";\n\t}\n\n\tif (!in_array($ancre, $ancres_vues)) {\n\t\treturn $ancre;\n\t}\n\n\t$md5 = substr(md5($titre), 0, 4);\n\tif (!in_array(\"$ancre-$md5\", $ancres_vues)) {\n\t\treturn \"$ancre-$md5\";\n\t}\n\n\t$i = 2;\n\twhile (in_array(\"$ancre-$i\", $ancres_vues)) {\n\t\t$i++;\n\t}\n\treturn \"$ancre-$i\";\n}", "title": "" }, { "docid": "9d98e25ddff0038715c8d767883578be", "score": "0.6033082", "text": "public function getId(){\n return $this->__get('id');\n }", "title": "" }, { "docid": "b6152e47e703d501139a4b1fecc5049e", "score": "0.6032455", "text": "abstract public function getID();", "title": "" }, { "docid": "b6152e47e703d501139a4b1fecc5049e", "score": "0.6032455", "text": "abstract public function getID();", "title": "" }, { "docid": "b6152e47e703d501139a4b1fecc5049e", "score": "0.6032455", "text": "abstract public function getID();", "title": "" }, { "docid": "1280453ccb184f1434b1bb7791aae2cb", "score": "0.602953", "text": "function getId();", "title": "" }, { "docid": "1280453ccb184f1434b1bb7791aae2cb", "score": "0.602953", "text": "function getId();", "title": "" }, { "docid": "1280453ccb184f1434b1bb7791aae2cb", "score": "0.602953", "text": "function getId();", "title": "" }, { "docid": "1280453ccb184f1434b1bb7791aae2cb", "score": "0.602953", "text": "function getId();", "title": "" }, { "docid": "b8077486bab91e700e02376abad9449b", "score": "0.6023669", "text": "public function getIdgarante(){\r\n\treturn $this->idgarante;\r\n}", "title": "" }, { "docid": "7babb8ea903ab65d8b1c495f9e38586c", "score": "0.60196275", "text": "public function getID(): int{\n return $this -> id;\n }", "title": "" }, { "docid": "b3c8e61588abf3e81c95eb91a36a17c1", "score": "0.6014355", "text": "public function id() : int;", "title": "" }, { "docid": "0b4af2125199bfd87ed1dc765d69a01b", "score": "0.6013241", "text": "public function save()\n\t{\n\t\tglobal $ilDB;\n\n\t\t// sequence\n\t\t$this->setId($ilDB->nextId(\"adn_ta_expertise\"));\n\t\t$id = $this->getId();\n\n\t\t$fields = $this->propertiesToFields();\n\t\t$fields[\"id\"] = array(\"integer\", $id);\n\t\t\t\n\t\t$ilDB->insert(\"adn_ta_expertise\", $fields);\n\n\t\tparent::save($id, \"adn_ta_expertise\");\n\t\t\n\t\treturn $id;\n\t}", "title": "" }, { "docid": "da55ab9fac6989950ee8a7a51f0c2233", "score": "0.60063887", "text": "function newsKategori_CreateID( $tbl_newskategori ){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_newskategori ORDER BY id DESC\"); \n\t\t$data =\tmysql_fetch_array($sql);\n\t\t$UID = $data[\"id\"];\n\t\t$UID = $UID+1; \n\t\treturn $UID;\n\t}", "title": "" }, { "docid": "07fd87448caaecd61fff54bc7ad0e620", "score": "0.6005386", "text": "function creerCommande() {\r\n\t\t$numerop=SelectMax(\"numerop\",\"if_bo_com\");\r\n\t\t$numerop++;\r\n\t\tmysql_query(\"INSERT INTO if_bo_com (numerop,numclient,etat,ttva) VALUES ('$numerop','$this->numclient','0','$this->ttva')\");\r\n\t\treturn mysql_insert_id(); //numcom\r\n\t}", "title": "" } ]
f598166986dbc1c26b8d30565a3f4130
Below is an example of adding options you can pass into a validator from your hook function. You might want to include, for example, a range to validate against, or a list of correct values that may change between the field's implementations on different content types. Can delete anything below this line if you don't want to pass in options, tho. ColorHex constructor. Usage: $fields['field_example']>addConstraint('ColorHex', ['someOptions' => ['A','B','C']]);
[ { "docid": "cc6f98b820f1680abc170bff155ae04e", "score": "0.52122056", "text": "public function __construct($options = null)\n {\n if (null !== $options && !is_array($options)) {\n $options = array(\n 'someOptions' => $options\n );\n }\n parent::__construct($options);\n\n /* To enforce required options:\n if (null === $this->options) {\n throw new MissingOptionsException(sprintf('The option \"someOptions\" must be given for constraint %s', __CLASS__), ['someOptions']);\n }\n */\n }", "title": "" } ]
[ { "docid": "828fc65d5581f7ddd23fca4ce213806a", "score": "0.6267465", "text": "protected function validateOptions()\n\t{\n\t}", "title": "" }, { "docid": "0fddcd9bd06ee1d13cc218371e703b69", "score": "0.6151913", "text": "public function beforeValidate($options = array()) {\n \n }", "title": "" }, { "docid": "738099b68e02e95b74835624811877fd", "score": "0.5811723", "text": "abstract protected function _defineOptions();", "title": "" }, { "docid": "305281e696215ea5c5a3ada5a845f291", "score": "0.5700813", "text": "public function validateOption($name);", "title": "" }, { "docid": "0b3737e73007f249d74fdbdcbbeccbed", "score": "0.56538886", "text": "public function beforeValidate($options = array()) {\n\t\t$this->validate = array_merge($this->validate, array(\n\t\t\t'topic_id' => array(\n\t\t\t\t'numeric' => array(\n\t\t\t\t\t'rule' => array('numeric'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t\t'allowEmpty' => true,\n\t\t\t\t\t'required' => true,\n\t\t\t\t),\n\t\t\t),\n\t\t\t'user_id' => array(\n\t\t\t\t'numeric' => array(\n\t\t\t\t\t'rule' => array('numeric'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t\t'allowEmpty' => true,\n\t\t\t\t\t'required' => true,\n\t\t\t\t),\n\t\t\t),\n\t\t));\n\t}", "title": "" }, { "docid": "f9f6b50425f8a7b1e74cc32c4e6d9ecd", "score": "0.5585513", "text": "public function beforeValidate($options = array()) {\n\t\t$displayTypes = array_keys(self::$displayTypes);\n\n\t\t$this->validate = ValidateMerge::merge($this->validate, array(\n\t\t\t'frame_key' => array(\n\t\t\t\t'notBlank' => array(\n\t\t\t\t\t'rule' => array('notBlank'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'display_type' => array(\n\t\t\t\t'inList' => array(\n\t\t\t\t\t'rule' => array('inList', $displayTypes),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t\t'allowEmpty' => true,\n\t\t\t\t)\n\t\t\t),\n\t\t\t'display_digit' => array(\n\t\t\t\t'naturalNumber' => array(\n\t\t\t\t\t'rule' => array('naturalNumber', true),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t\t'numeric' => array(\n\t\t\t\t\t'rule' => array('range', self::DISPLAY_DIGIT_MIN - 1, self::DISPLAY_DIGIT_MAX + 1),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t),\n\t\t));\n\n\t\treturn parent::beforeValidate($options);\n\t}", "title": "" }, { "docid": "6fe9ea9d310c28f650e28968f465548b", "score": "0.5496916", "text": "public function addOptions(Field $field, $options) {\n\t\t\n\t\t/** @var WireDatabasePDO $database */\n\t\t$database = $this->wire('database');\n\t\t\n\t\t// options that have pre-assigned IDs\n\t\t$optionsByID = array();\n\n\t\tunset($this->optionsCache[$field->id]);\n\n\t\t// determine if any added options already have IDs\n\t\tforeach($options as $option) {\n\t\t\tif(!$option instanceof SelectableOption || !strlen($option->title)) continue;\n\t\t\tif($option->id > 0) $optionsByID[(int) $option->id] = $option;\n\t\t}\n\t\t\n\t\tif(count($options) > count($optionsByID)) {\n\t\t\t// Determine starting value (max) for auto-assigned IDs\n\t\t\t$sql =\n\t\t\t\t\"SELECT MAX(option_id) FROM \" . self::optionsTable . \" \" .\n\t\t\t\t\"WHERE fields_id=:fields_id\";\n\n\t\t\t$query = $database->prepare($sql);\n\t\t\t$query->bindValue(':fields_id', $field->id);\n\t\t\t$query->execute();\n\n\t\t\tlist($max) = $query->fetch(\\PDO::FETCH_NUM);\n\t\t\t$query->closeCursor();\n\t\t} else {\n\t\t\t// there are no auto-assigned IDs\n\t\t\t$max = 0;\n\t\t}\n\n\t\t$sql = \t\n\t\t\t\"INSERT INTO \" . self::optionsTable . \" \" .\n\t\t\t\"SET fields_id=:fields_id, option_id=:option_id, \" . \n\t\t\t\"sort=:sort, title=:title, `value`=:value\";\n\n\t\t$cnt = 0;\n\t\t$query = $database->prepare($sql);\n\n\t\tforeach($options as $option) {\n\t\t\tif(!$option instanceof SelectableOption || !strlen($option->title)) continue;\n\t\t\tif($option->id > 0) {\n\t\t\t\t$id = $option->id;\n\t\t\t} else {\n\t\t\t\t$id = ++$max;\n\t\t\t\twhile(isset($optionsByID[$id])) $id++;\n\t\t\t}\n\t\t\t$query->bindValue(':fields_id', $field->id, \\PDO::PARAM_INT);\n\t\t\t$query->bindValue(':option_id', $id, \\PDO::PARAM_INT);\n\t\t\t$query->bindValue(':sort', $option->sort, \\PDO::PARAM_INT);\n\t\t\t$query->bindValue(':title', $option->title);\n\t\t\t$query->bindValue(':value', $option->value); \n\t\t\t\n\t\t\ttry {\n\t\t\t\tif($query->execute()) $cnt++;\n\t\t\t\t$option->id = $database->lastInsertId();\n\n\t\t\t} catch(\\Exception $e) {\n\t\t\t\t$this->error($e->getMessage());\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->message(sprintf($this->_n('Added %d option', 'Added %d options', $cnt), $cnt));\n\n\t\treturn $cnt;\n\t}", "title": "" }, { "docid": "5fa28ad7e131e2613f77a317fbc975ab", "score": "0.5491869", "text": "public function options_validate ( $input )\n\t\t{\n\t\t}", "title": "" }, { "docid": "2c0254e5d204c4a56879ccfb3c99b26d", "score": "0.54632545", "text": "function acf_validate_field( $field = array() ) {\n}", "title": "" }, { "docid": "bed81c6794c8203a071c89a45215c30b", "score": "0.54540104", "text": "protected abstract function validateOption( string $name, mixed $value );", "title": "" }, { "docid": "f57a88f97f632e6db0ba43ebbf13e1cd", "score": "0.5449994", "text": "function register_and_build_fields() {\n\tregister_setting('plugin_options', 'plugin_options', 'validate_setting');\n}", "title": "" }, { "docid": "5dbad6182b42529debbdc9a72a6fa129", "score": "0.542802", "text": "public function validate_options($fields) { \n $valid_fields = array();\n \n $enabled = $fields['enabled'];\n $showSubtotal = $fields['show_subtotal'];\n $circular = $fields['circular'];\n \n // Validate Background Color\n $background = trim( $fields['background']);\n $background = strip_tags( stripslashes( $background ) );\n\n $forecolour = trim($fields['forecolour']);\n $forecolour = strip_tags(stripslashes($forecolour));\n\n // Check if is a valid hex color\n if( FALSE === $this->check_colour( $background ) ) {\n \n // Set the error message\n add_settings_error( 'uqc_settings_options', 'uqc_bg_error', 'Insert a valid color for Background', 'error' ); // $setting, $code, $message, $type\n \n // Get the previous valid value\n $valid_fields['background'] = $this->options['background'];\n } else {\n $valid_fields['background'] = $background; \n }\n\n // Check if is a valid hex color\n if( FALSE === $this->check_colour( $forecolour ) ) {\n \n // Set the error message\n add_settings_error( 'uqc_settings_options', 'uqc_forecolour_error', 'Insert a valid color for Forecolour', 'error' ); // $setting, $code, $message, $type\n \n // Get the previous valid value\n $valid_fields['forecolour'] = $this->options['forecolour'];\n } else {\n $valid_fields['forecolour'] = $background; \n }\n \n $valid_fields['enabled'] = $enabled;\n $valid_fields['show_subtotal'] = $showSubtotal;\n $valid_fields['circular'] = $circular;\n $valid_fields['background'] = $background;\n $valid_fields['forecolour'] = $forecolour;\n\n return apply_filters('validate_options', $valid_fields, $fields);\n }", "title": "" }, { "docid": "1f2ae8fa2cbe035948716c5fdafd582f", "score": "0.54143685", "text": "public function beforeValidate($options = array()) {\n\t\t$this->validator()->getField('description')->setRules($this->validate['description']);\n\t\t$this->validator()->getField('url')->setRules($this->validate['url']);\n\n\t\t$disableFieldValidation = isset($this->data['SecurityPolicy']['_disableReviewFields']);\n\t\t$disableFieldValidation = $disableFieldValidation && !empty($this->data['SecurityPolicy']['_disableReviewFields']);\n\n\t\t// for bulk edits and cases where document type is needed for proper validation\n\t\tif (!isset($this->data['SecurityPolicy']['use_attachments']) && !empty($this->id)) {\n\t\t\t$this->data['SecurityPolicy']['use_attachments'] = $this->field('use_attachments');\n\t\t}\n\n\t\tif (isset($this->data['SecurityPolicy']['use_attachments']) && !$disableFieldValidation) {\n\t\t\tif ($this->data['SecurityPolicy']['use_attachments'] == SECURITY_POLICY_USE_CONTENT) {\n\t\t\t\t$this->validator()->getField('description')->setRule('notEmpty', array(\n\t\t\t\t\t'rule' => 'notBlank',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'allowEmpty' => false,\n\t\t\t\t\t'message' => __('This field cannot be left blank while Document Content type is set as \"%s\"', getPoliciesDocumentContentTypes(SECURITY_POLICY_USE_CONTENT))\n\t\t\t\t));\n\t\t\t}\n\t\t\tif ($this->data['SecurityPolicy']['use_attachments'] == SECURITY_POLICY_USE_URL) {\n\t\t\t\t$this->validator()->getField('url')->setRule('notEmpty', array(\n\t\t\t\t\t'rule' => 'notBlank',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'allowEmpty' => false,\n\t\t\t\t\t'message' => __('This field cannot be left blank while Document Content type is set as \"%s\"', getPoliciesDocumentContentTypes(SECURITY_POLICY_USE_URL))\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\t$ldapConnectorField = $this->validator()->getField('ldap_connector_id');\n\t\tif ($ldapConnectorField !== null) {\n\t\t\t$ldapConnectorField->setRules($this->validate['ldap_connector_id']);\n\t\t}\n\n\t\t$ldapGroupsField = $this->validator()->getField('ldap_groups');\n\t\tif ($ldapGroupsField !== null) {\n\t\t\t$ldapGroupsField->setRules($this->validate['ldap_groups']);\n\t\t}\n\n\t\tif (isset($this->data['SecurityPolicy']['permission'])) {\n\t\t\tif ($this->data['SecurityPolicy']['permission'] != SECURITY_POLICY_LOGGED) {\n\t\t\t\t$this->validator()->remove('ldap_connector_id');\n\t\t\t\t$this->validator()->remove('ldap_groups');\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->validator()->add('ldap_connector_id', $this->validate['ldap_connector_id']);\n\t\t\t\t$this->validator()->add('ldap_groups', $this->validate['ldap_groups']);\n\n\t\t\t\t$_data = $this->data['SecurityPolicy'];\n\t\t\t\t// bulk edit case\n\t\t\t\tif (!isset($_data['ldap_connector_id']) && !isset($_data['ldap_groups'])) {\n\t\t\t\t\t$this->invalidate('permission', __('Authorized permission cannot be set with bulk actions, use standard edit form to update this value'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (isset($this->data['SecurityPolicy']['Project'])) {\n\t\t\t$this->invalidateRelatedNotExist('Project', 'Project', $this->data['SecurityPolicy']['Project']);\n\t\t}\n\n\t\tif (isset($this->data['SecurityPolicy']['asset_label_id'])) {\n\t\t\t$this->invalidateRelatedNotExist('AssetLabel', 'asset_label_id', $this->data['SecurityPolicy']['asset_label_id']);\n\t\t}\n\n\t\tif (isset($this->data['SecurityPolicy']['security_policy_document_type_id'])) {\n\t\t\t$this->invalidateRelatedNotExist('SecurityPolicyDocumentType', 'security_policy_document_type_id', $this->data['SecurityPolicy']['security_policy_document_type_id']);\n\t\t}\n\n\t\tif (empty($options['import']) && empty($this->data['SecurityPolicy']['id']) && !$this->validateAttachment()) {\n\t\t\t$this->invalidate('attachment', __('This field cannot be left blank.'));\n\t\t}\n\t}", "title": "" }, { "docid": "d771eb4ab8cbe47154e835c96da1b101", "score": "0.54129785", "text": "public function createFormForValidation($options = NULL) {\n \n }", "title": "" }, { "docid": "4a0331b449ef071294263b59c733235d", "score": "0.5399166", "text": "function FormValidatorCustom(&$form, $field, $type, $message, $userFunction, $additionalArguments = array(), $complementReturn = false) {\n\t\tparent::FormValidator($form, $field, $type, $message);\n\t\t$this->_userFunction = $userFunction;\n\t\t$this->_additionalArguments = $additionalArguments;\n\t\t$this->_complementReturn = $complementReturn;\n\t}", "title": "" }, { "docid": "0f2097cfa58fa646467b9eaae1dd7c76", "score": "0.5393516", "text": "public function add( $options );", "title": "" }, { "docid": "02bc301cc0ddc22fd03598b2eed8f4d0", "score": "0.5380603", "text": "public function validate(string $field, $name, array $options = []): void\n {\n $this->validator()->remove($field)->add($field, $name, $options);\n }", "title": "" }, { "docid": "6c78ea0f9164a9ffbc76c14be414dd94", "score": "0.5376526", "text": "public function beforeValidate($options = array()) {\n\t\t$this->validate = array_merge($this->validate, array(\n\t\t\t'calendar_id' => array(\n\t\t\t\t'rule1' => array(\n\t\t\t\t\t'rule' => array('numeric'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t\t'required' => true,\n\t\t\t\t),\n\t\t\t),\n\t\t\t'room_id' => array(\n\t\t\t\t'rule1' => array(\n\t\t\t\t\t'rule' => array('numeric'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t\t'required' => true,\n\t\t\t\t),\n\t\t\t),\n\t\t\t//langauge_id, status, is_active, is_latestは削除した。\n\t\t\t//'language_id' => array(\n\t\t\t//\t'rule1' => array(\n\t\t\t//\t\t'rule' => array('numeric'),\n\t\t\t//\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t//\t),\n\t\t\t//),\n\t\t\t//'status' => array(\n\t\t\t//\t'rule1' => array(\n\t\t\t//\t\t'rule' => array('numeric'),\n\t\t\t//\t\t'message' => __d('net_commons', 'Invalid request'),\n\t\t\t//\t\t'required' => true,\n\t\t\t//\t),\n\t\t\t//),\n\t\t\t//'is_active' => array(\n\t\t\t//\t'rule1' => array(\n\t\t\t//\t\t'rule' => 'boolean',\n\t\t\t//\t\t'message' => __d('net_commons', 'Invalid request'),\n\t\t\t//\t),\n\t\t\t//),\n\t\t\t//'is_latest' => array(\n\t\t\t//\t'rule1' => array(\n\t\t\t//\t\t'rule' => 'boolean',\n\t\t\t//\t\t'message' => __d('net_commons', 'Invalid request'),\n\t\t\t//\t),\n\t\t\t//),\n\t\t));\n\t\treturn parent::beforeValidate($options);\n\t}", "title": "" }, { "docid": "47cb9dd22271ecc948e14d3547dda855", "score": "0.53739345", "text": "public function __construct($options = null)\n {\n if (null !== $options && count($options) > 0) {\n throw new ConstraintDefinitionException('The constraint Valid does not accept any options');\n }\n }", "title": "" }, { "docid": "ac02ed6a21d0c996ff3109b01d9b9f94", "score": "0.53673106", "text": "public function addOptions(Getopt $_options)\n {\n }", "title": "" }, { "docid": "94c0575cb06e68693c53888258acd52b", "score": "0.5350294", "text": "private function addValidators(array &$arrFilter, $strValidator, $arrOption)\n {\n $this->addGeneric($arrFilter, 'validators', $strValidator, $arrOption);\n }", "title": "" }, { "docid": "1e5f56b49ac7786cef589cb0738a0bfa", "score": "0.532962", "text": "public function beforeValidate($options = array()) {\n\t\t$this->validate = Hash::merge($this->validate, array(\n\t\t\t'block_key' => array(\n\t\t\t\t'notEmpty' => array(\n\t\t\t\t\t'rule' => array('notEmpty'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'use_like' => array(\n\t\t\t\t'boolean' => array(\n\t\t\t\t\t'rule' => array('boolean'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'use_unlike' => array(\n\t\t\t\t'boolean' => array(\n\t\t\t\t\t'rule' => array('boolean'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'use_comment' => array(\n\t\t\t\t'boolean' => array(\n\t\t\t\t\t'rule' => array('boolean'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'agree' => array(\n\t\t\t\t'boolean' => array(\n\t\t\t\t\t'rule' => array('boolean'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'mail_notice' => array(\n\t\t\t\t'boolean' => array(\n\t\t\t\t\t'rule' => array('boolean'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'auto_play' => array(\n\t\t\t\t'boolean' => array(\n\t\t\t\t\t'rule' => array('boolean'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'comment_agree' => array(\n\t\t\t\t'boolean' => array(\n\t\t\t\t\t'rule' => array('boolean'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'comment_agree_mail_notice' => array(\n\t\t\t\t'boolean' => array(\n\t\t\t\t\t'rule' => array('boolean'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t),\n\t\t));\n\n\t\treturn parent::beforeValidate($options);\n\t}", "title": "" }, { "docid": "72bdb31e4bb4b330445a350742aabcdd", "score": "0.528641", "text": "public function beforeValidate($options = array()) {\n\t\t$this->validate = ValidateMerge::merge($this->validate, array(\n\t\t\t'title' => array(\n\t\t\t\t'rule1' => array(\n\t\t\t\t\t'rule' => array('notBlank'),\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'message' => __d('reservations', 'Invalid input. (plan title)'),\n\t\t\t\t),\n\t\t\t\t'rule2' => array(\n\t\t\t\t\t'rule' => array('maxLength', ReservationsComponent::CALENDAR_VALIDATOR_TITLE_LEN),\n\t\t\t\t\t'message' => sprintf(__d('reservations',\n\t\t\t\t\t\t'%d character limited. (plan title)'), ReservationsComponent::CALENDAR_VALIDATOR_TITLE_LEN),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'is_allday' => array(\n\t\t\t\t'rule1' => array(\n\t\t\t\t\t'rule' => array('inList', [0, 1, null]),\n\t\t\t\t\t'message' => __d('reservations',\n\t\t\t\t\t\t'「利用時間の制限なし」は0, 1またはnullにしてください。'),\n\t\t\t\t),\n\n\t\t\t),\n\t\t\t'start_date' => array(\n\t\t\t\t'rule1' => array(\n\t\t\t\t\t'rule' => array('checkYyyymmdd'),\n\t\t\t\t\t'message' => __d('reservations', '予約日はyyyymmdd形式で入力して下さい。'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'start_time' => array(\n\t\t\t\t'rule1' => array(\n\t\t\t\t\t'rule' => array('checkHis'),\n\t\t\t\t\t'message' => __d('reservations', '開始時刻はhhmmss形式で入力して下さい。'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'end_time' => array(\n\t\t\t\t'rule1' => array(\n\t\t\t\t\t'rule' => array('checkHis'),\n\t\t\t\t\t'message' => __d('reservations', '終了時刻はhhmmss形式で入力して下さい。'),\n\t\t\t\t),\n\t\t\t),\n\t\t));\n\t}", "title": "" }, { "docid": "78c8ea74eff756535d1f302d8f7a8c9c", "score": "0.52828395", "text": "public function beforeValidate($options = array()) {\n\t\t$qIndex = $options['questionIndex'];\n\t\t// Questionモデルは繰り返し判定が行われる可能性高いのでvalidateルールは最初に初期化\n\t\t// mergeはしません\n\t\t$this->validate = array(\n\t\t\t'question_sequence' => array(\n\t\t\t\t'numeric' => array(\n\t\t\t\t\t'rule' => array('numeric'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t\t'comparison' => array(\n\t\t\t\t\t'rule' => array('comparison', '==', $qIndex),\n\t\t\t\t\t'message' => __d('quizzes', 'question sequence is illegal.')\n\t\t\t\t),\n\t\t\t),\n\t\t\t'question_type' => array(\n\t\t\t\t'inList' => array(\n\t\t\t\t\t'rule' => array('inList', QuizzesComponent::$typesList),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'question_value' => array(\n\t\t\t\t'notBlank' => array(\n\t\t\t\t\t'rule' => array('notBlank'),\n\t\t\t\t\t'message' => __d('quizzes', 'Please input question text.'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'is_choice_random' => array(\n\t\t\t\t'boolean' => array(\n\t\t\t\t\t'rule' => array('boolean'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'is_choice_horizon' => array(\n\t\t\t\t'boolean' => array(\n\t\t\t\t\t'rule' => array('boolean'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'is_order_fixed' => array(\n\t\t\t\t'boolean' => array(\n\t\t\t\t\t'rule' => array('boolean'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'allotment' => array(\n\t\t\t\t'numeric' => array(\n\t\t\t\t\t'rule' => array('naturalNumber'),\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'allowEmpty' => false,\n\t\t\t\t\t'message' => __d('quizzes', 'Please enter a number greater than 0 .'),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\t// validates時にはまだquiz_page_idの設定ができないのでチェックしないことにする\n\t\t// quiz_page_idの設定は上位のQuizPageクラスで責任を持って行われるものとする\n\n\t\tparent::beforeValidate($options);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a6f8275d53ccd9b46c307b4cc4c705f5", "score": "0.5278891", "text": "public function addOptions(\\google\\protobuf\\Option $value){\n return $this->_add(3, $value);\n }", "title": "" }, { "docid": "a6f8275d53ccd9b46c307b4cc4c705f5", "score": "0.5278891", "text": "public function addOptions(\\google\\protobuf\\Option $value){\n return $this->_add(3, $value);\n }", "title": "" }, { "docid": "8ca798c1e7cf3aecaf8876eb24850e91", "score": "0.52744174", "text": "public function beforeValidate($options = array()) {\n\t\t// Model::dataにfieldがないとvalidationされないためダミーフィールドをset\n\t\t// メッセージ表示用にdatabeseという名前でset\n\t\t// @see\n\t\t// https://github.com/cakephp/cakephp/blob/2.9.4/lib/Cake/Model/Validator/CakeValidationSet.php#L131\n\t\t$this->set('database');\n\n\t\t$this->validate = ValidateMerge::merge(\n\t\t\t$this->validate,\n\t\t\t[\n\t\t\t\t'database' => [\n\t\t\t\t\t'existsRequireAttribute' => [\n\t\t\t\t\t\t'rule' => ['existsRequireAttribute'],\n\t\t\t\t\t\t// Nc2ToNc3UserValidationBehavior::existsRequireAttributeでメッセージを返す\n\t\t\t\t\t\t//'message' => __d('nc2_to_nc3', 'The require attribute of nc3 missing in nc2.'),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\treturn parent::beforeValidate($options);\n\t}", "title": "" }, { "docid": "c5f42f7ecce21f69f1815c575b350296", "score": "0.5267213", "text": "public function beforeValidate($options = array()) {\n\t\t$this->validate = array_merge($this->validate, array(\n\t\t\t'frame_key' => array(\n\t\t\t\t'notBlank' => array(\n\t\t\t\t\t'rule' => array('notBlank'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t),\n\t\t));\n\n\t\treturn parent::beforeValidate($options);\n\t}", "title": "" }, { "docid": "959bf895cbc272918606541f93c59b34", "score": "0.5261345", "text": "public function on_validate (array $options)\n {\n global $config;\n\n $output = array ();\n foreach ($options as $options_id => $value) {\n // Find the field in the $sections structure.\n foreach ($config->sections as $section) {\n $section_id = $section[0];\n foreach ($section[1] as $field) {\n $field_id = $field[0];\n $callable = $field[3];\n if ($options_id == $section_id . '.' . $field_id) {\n // Field found. Validate it and pass it on.\n $output[$options_id] = call_user_func ($callable, $value);\n }\n }\n }\n }\n $output['general.section_caption'] = __ ('General', DOMAIN);\n // Merge with old options\n return array_merge (get_option (OPTIONS, array ()), $output);\n }", "title": "" }, { "docid": "3ed637fd0b944a5d4e45e6669c44348c", "score": "0.52601993", "text": "function validation( $options ) {\r\n\t\t$id_conta = trim( $options['id_conta'] );\r\n\r\n\t\tif ( ! empty( $id_conta ) ) {\r\n\t\t\t$id_conta = preg_replace( '/@.+$/', '', $id_conta );\r\n\t\t\t$options['id_conta'] = $id_conta;\r\n\t\t}\r\n\r\n\t\tforeach ( $options as $key => $value )\r\n\t\t\t$options[$key] = trim( $value );\r\n\r\n\t\t$this->options = $options;\r\n\t\treturn $options;\r\n\t}", "title": "" }, { "docid": "f39a90e9aa4df761c1914434d940bbe9", "score": "0.52465564", "text": "public function setAdditionalOptions(){ }", "title": "" }, { "docid": "15901d438336eb130189575972c471ac", "score": "0.523972", "text": "public function addValidator(callable $validator);", "title": "" }, { "docid": "6856252c167463f8f20579bccc5e4edc", "score": "0.52356386", "text": "public function __construct( $options = array() ) {\n\t\tif ( !empty( $options['options'] ) ) {\n\t\t\t$keys = array_keys( $options['options'] );\n\t\t\t$use_name_as_value = ( array_keys( $keys ) === $keys );\n\t\t\tforeach ( $options['options'] as $k => $v ) {\n\t\t\t\t$this->data[] = array(\n\t\t\t\t\t'name' => $v,\n\t\t\t\t\t'value' => $use_name_as_value ? $v : $k,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tparent::__construct($options);\n\t\t\n\t\t// Add the options CSS\n\t\tfm_add_style( 'fm_options_css', 'css/fieldmanager-options.css' );\n\t\t\n\t\t// Sanitization\n\t\t$this->sanitize = function( $value ) {\n\t\t\n\t\t\tif ( isset( $value ) && is_array( $value ) && !empty( $value ) ) {\n\t\t\t\treturn array_map( 'sanitize_text_field', $value );\n\t\t\t} else {\n\t\t\t\treturn sanitize_text_field( $value );\n\t\t\t}\n\t\t};\n\t\t\n\t\t// If the taxonomy parameter is set, populate the data from the given taxonomy if valid\n\t\tif ( $this->taxonomy != null ) $this->get_taxonomy_data();\n\t\n\t}", "title": "" }, { "docid": "5fb270894f73c24f4a11c75352fc85dc", "score": "0.52305084", "text": "public function withOptions(array $options): ISelectableField;", "title": "" }, { "docid": "5d2784f71f0c78043784f1e88a5a1139", "score": "0.52268386", "text": "public function configureOptions(OptionsResolver $resolver): void\n {\n // of the compound option, which should always be false.\n $validateNotTrue = function ($value) {\n return true !== $value;\n };\n\n // Define a function which tests against non-negative numbers. It will be used to validate the values\n // of the delay and minimum_input_length options.\n $validateNotNegative = function ($value) {\n return $value >= 0;\n };\n\n // Define a function which validates the value of the allow_clear option.\n $allowClearValidator = function (Options $options, $value) {\n if (!$value) {\n return $value;\n }\n\n if ($options['compatibility']) {\n if ($options['multiple']) {\n throw new InvalidOptionsException(\n 'On compatibility mode you cannot set the allow_clear option to true for multi-value fields!'\n );\n }\n\n if (null === $options['placeholder'] || '' === $options['placeholder']) {\n throw new InvalidOptionsException(\n 'On compatibility mode you cannot set the allow_clear option to true for single-value fields '\n . 'if the placeholder is empty!'\n );\n }\n } elseif (!$options['multiple'] && null === $options['placeholder']) {\n throw new InvalidOptionsException(\n 'On the default mode you cannot set the allow_clear option to true for single-value fields '\n . 'if the placeholder is undefined!'\n );\n }\n\n return $value;\n };\n\n $resolver->setRequired(['data_resolver'])\n ->setDefaults([\n 'compound' => false,\n 'autocomplete_path' => null,\n 'multiple' => false,\n 'placeholder' => null,\n 'delay' => 0,\n 'minimum_input_length' => 1,\n 'allow_clear' => false,\n 'other_select2_options' => null,\n 'context' => null,\n // Must be set to true if the used Select2 version is lower than 4.0.0.\n 'compatibility' => false,\n 'dropdownParent' => false\n ])\n ->setAllowedTypes('data_resolver', 'string')\n ->setAllowedTypes('autocomplete_path', ['null', 'string'])\n ->setAllowedTypes('multiple', 'boolean')\n ->setAllowedTypes('placeholder', ['null', 'string'])\n ->setAllowedTypes('delay', 'integer')\n ->setAllowedTypes('minimum_input_length', 'integer')\n ->setAllowedTypes('allow_clear', 'boolean')\n ->setAllowedTypes('other_select2_options', ['array', 'object', 'null'])\n ->setAllowedTypes('compatibility', 'boolean')\n ->setAllowedValues('compound', $validateNotTrue)\n ->setAllowedValues('delay', $validateNotNegative)\n ->setAllowedValues('minimum_input_length', $validateNotNegative)\n ->setNormalizer('allow_clear', $allowClearValidator);\n }", "title": "" }, { "docid": "60daca5cc2fa366369fbfe4d0e0cb165", "score": "0.5220784", "text": "function assert_options ($what, $value = null) {}", "title": "" }, { "docid": "95d16e060ad988c2f673e83c8d7b1a18", "score": "0.52141356", "text": "public function validate($value, Constraint $constraint)\n {\n if (!$constraint instanceof ContainsOptionProject) {\n throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\\ContainsOptionProject');\n }\n\n $message = 'The Options is not valid. ';\n $valid = empty($value) ? 0 : 1;\n\n $options = ['language_level', 'quality', 'expertise', 'specific_attachment', 'priority', 'uniq_author'];\n $array_keys_request = array_keys($value);\n $options_diff = array_diff($array_keys_request, $options);\n\n if (count($options_diff) != 0) {\n foreach ($options_diff as $fields)\n $message .= 'Option '.$fields.' is not possible. ';\n $this->context->addViolation($message);\n\n return;\n }\n\n if (isset($value['language_level']) && !in_array($value['language_level'], ['regular', 'premium', 'enterprise'])) {\n $message .= 'The Language level is not valid. ';\n $valid = 0;\n }\n\n if (isset($value['quality']) && !is_bool($value['quality'])) {\n $message .= 'The Quality is not valid. ';\n $valid = 0;\n }\n\n if (isset($value['specific_attachment']) && !is_bool($value['specific_attachment'])) {\n $message .= 'The Specific attachment is not valid. ';\n $valid = 0;\n }\n\n if (isset($value['priority']) && !is_bool($value['priority'])) {\n $message .= 'The Priority is not valid. ';\n $valid = 0;\n }\n\n if (isset($value['uniq_author']) && !is_bool($value['uniq_author'])) {\n $message .= 'The Uniq author is not valid. ';\n $valid = 0;\n }\n\n if (0 === $valid) {\n $this->context->addViolation($message);\n\n }\n }", "title": "" }, { "docid": "0fbc44f0daf787c6cbb86b54ced1aff5", "score": "0.52052534", "text": "public function addOptions(\\google\\protobuf\\Option $value){\n return $this->_add(9, $value);\n }", "title": "" }, { "docid": "cdcb821c1409de4b0fcc888fac715c5c", "score": "0.5193454", "text": "public function addOptions(\\google\\protobuf\\Option $value){\n return $this->_add(4, $value);\n }", "title": "" }, { "docid": "3195831a216db824e5aec7ae73626621", "score": "0.519227", "text": "function register($field_name, $validator_class, $optional = false) {\n $this->_fields_validators[$field_name] = array('validator' => $validator_class, 'optional' => $optional);\n }", "title": "" }, { "docid": "0282eaa6572b307e3b43a9fada7a1b6e", "score": "0.51872504", "text": "public function validates($options = array()){\n\t\t$this->validate = array(\n\t\t'Name' => array(\n\t\t\t'notempty' => array(\n\t\t\t\t'rule' => 'notempty',\n\t\t\t\t'message' => __('The Name must not be empty'),\n\t\t\t\t'allowEmpty' => false,\n\t\t\t\t'required' => true,\n\t\t\t\t'last' => true, // Stop validation after this rule\n\t\t\t\t//'on' => 'create', // Limit validation to 'create' or 'update' operations\n\t\t\t\t),\n\t\t\t 'regex'=> array(\n\t\t\t\t'rule' => '/^[a-z,A-Z,0-9,-]*$/i',\n\t\t\t\t'message' => __('The Name must contains only [a-z,A-Z,0-9,-]')\n\t\t\t\t\t\n\t\t\t\t)\t\n\t\t\t)\t\t\t\n\t\t);\n\t\treturn parent::validates($options);\n\t}", "title": "" }, { "docid": "e7dd8284d410c627cd2fffc493453c4b", "score": "0.5172402", "text": "abstract public function options();", "title": "" }, { "docid": "e7dd8284d410c627cd2fffc493453c4b", "score": "0.5172402", "text": "abstract public function options();", "title": "" }, { "docid": "342dbfa2a6d0debaf2d4351d79439d6d", "score": "0.5168365", "text": "abstract public function addBoostedField($field, $options = [], $boost = null);", "title": "" }, { "docid": "96922ebc825c48bbba485f44296754d9", "score": "0.51669526", "text": "protected function configure($options = array(), $messages = array()) {\n $this->addMessage('max_length', '\"%value%\" is too long (%max_length% characters max).');\n $this->addMessage('min_length', '\"%value%\" is too short (%min_length% characters min).');\n\n $this->addOption('max_length');\n $this->addOption('min_length');\n\n $this->setOption('empty_value', '');\n }", "title": "" }, { "docid": "f4456210449e89b4ebc6c588a3240525", "score": "0.5166466", "text": "public function beforeValidate($options = array()) {\n\t\t$choiceIndex = $options['choiceIndex'];\n\t\t// Choiceモデルは繰り返し判定が行われる可能性高いのでvalidateルールは最初に初期化\n\t\t// mergeはしません\n\t\t$this->validate = array(\n\t\t\t'choice_label' => array(\n\t\t\t\t'notBlank' => array(\n\t\t\t\t\t'rule' => array('notBlank'),\n\t\t\t\t\t'message' => __d('quizzes', 'Please input choice text.'),\n\t\t\t\t),\n\t\t\t\t'choiceLabel' => array(\n\t\t\t\t\t'rule' => array('custom', '/^(?!.*\\#\\|\\|\\|\\|\\|\\|\\#).*$/'),\n\t\t\t\t\t'message' =>\n\t\t\t\t\t\t__d('quizzes', 'You can not use the string of #||||||# for choice text.'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'choice_sequence' => array(\n\t\t\t\t'naturalNumber' => array(\n\t\t\t\t\t'rule' => array('naturalNumber', true),\n\t\t\t\t\t'allowEmpty' => false,\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'message' => __d('quizzes', 'choice sequence is illegal.')\n\t\t\t\t),\n\t\t\t\t'comparison' => array(\n\t\t\t\t\t'rule' => array('comparison', '==', $choiceIndex),\n\t\t\t\t\t'message' => __d('quizzes', 'choice sequence is illegal.')\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\t// validates時にはまだquiz_question_idの設定ができないのでチェックしないことにする\n\t\t// quiz_question_idの設定は上位のQuestionnaireQuestionクラスで責任を持って行われるものとする\n\n\t\treturn parent::beforeValidate($options);\n\t}", "title": "" }, { "docid": "d193782c38a88060ec0bffd7251935c3", "score": "0.5139471", "text": "public function testGetOptions()\n {\n $node = new FieldNodeDefinition(self::TEST_NAME, $this->testDefinition);\n $this->assertEquals(self::TEST_ACL, $node->getAclResource());\n\n // options come from setter\n $options = array('another_opt' => 'another_value');\n\n $node = new FieldNodeDefinition(self::TEST_NAME, array());\n $node->setOptions($options);\n $this->assertEquals($options, $node->getOptions());\n\n // option override\n $node->replaceOption('another_opt', 'newValue');\n $options = $node->getOptions();\n $this->assertArrayHasKey('another_opt', $options);\n $this->assertEquals('newValue', $options['another_opt']);\n }", "title": "" }, { "docid": "252270ad8f33595c86c3f0e7f8b7dcaf", "score": "0.5139215", "text": "abstract protected function options();", "title": "" }, { "docid": "e1ddf9f9275894f02fb3f6740c05547f", "score": "0.51375103", "text": "protected function getValidatorOptions()\n {\n //\n }", "title": "" }, { "docid": "e1ddf9f9275894f02fb3f6740c05547f", "score": "0.51375103", "text": "protected function getValidatorOptions()\n {\n //\n }", "title": "" }, { "docid": "90c317acc0a1a7289c77faa484cb6b51", "score": "0.5134175", "text": "public function beforeValidate($options = array()) {\n\t\t$this->validate = Hash::merge($this->validate, array(\n\t\t\t'name' => array(\n\t\t\t\t'notEmpty' => array(\n\t\t\t\t\t'rule' => array('notEmpty'),\n\t\t\t\t\t'message' => sprintf(__d('net_commons', 'Please input %s.'), __d('Blocks', 'name')),\n\t\t\t\t\t'required' => false,\n\t\t\t\t),\n\t\t\t),\n\t\t\t'public_type' => array(\n\t\t\t\t'notEmpty' => array(\n\t\t\t\t\t'rule' => array('notEmpty'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t\t'inList' => array(\n\t\t\t\t\t'rule' => array('inList', array('0', '1', '2')),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'from' => array(\n\t\t\t\t'datetime' => array(\n\t\t\t\t\t'rule' => array('datetime', 'ymd'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t\t'required' => false,\n\t\t\t\t),\n\t\t\t),\n\t\t\t'to' => array(\n\t\t\t\t'datetime' => array(\n\t\t\t\t\t'rule' => array('datetime', 'ymd'),\n\t\t\t\t\t'message' => __d('net_commons', 'Invalid request.'),\n\t\t\t\t\t'required' => false,\n\t\t\t\t),\n\t\t\t\t'custom' => array(\n\t\t\t\t\t'rule' => array('checkFromTo', 'Block'),\n\t\t\t\t\t'message' => '開始日より大きい日付を入力してください。',\n\t\t\t\t),\n\t\t\t),\n\t\t));\n\n\t\treturn parent::beforeValidate($options);\n\t}", "title": "" }, { "docid": "15e81a9250430bcd8057816220d480db", "score": "0.5129778", "text": "function create_options($key, $field)\n\t{\n\t\t$field['max'] = isset($field['max']) ? $field['max'] : 100;\n\t\t$field['min'] = isset($field['min']) ? $field['min'] : 0;\n\t\t$field['step'] = isset($field['step']) ? $field['step'] : 1;\n\t\t$field['default_value'] = isset($field['default_value']) ? $field['default_value'] : 0;\n?>\n\t\t<tr class=\"field_option field_option_<?php echo $this->name; ?>\">\n\t\t\t<td class=\"label\">\n\t\t\t\t<label><?php _e(\"max\",'acf'); ?></label>\n\t\t\t\t<p class=\"description\"><?php _e(\"max should be no less than min\",'acf'); ?></p>\n\t\t\t</td>\n\t\t\t<td>\n<?php \n\t\t$this->parent->create_field(array(\n\t\t\t'type'\t=>\t'text',\n\t\t\t'name'\t=>\t'fields['.$key.'][max]',\n\t\t\t'value'\t=>\t$field['max'],\n\t\t));\n?>\n\t\t\t\t<!-- <p class=\"alert\" id=\"alert_max\"></p> TODO -->\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr class=\"field_option field_option_<?php echo $this->name; ?>\">\n\t\t\t<td class=\"label\">\n\t\t\t\t<label><?php _e(\"min\",'acf'); ?></label>\n\t\t\t\t<p class=\"description\"><?php _e(\"min should be no more than max\",'acf'); ?></p>\n\t\t\t</td>\n\t\t\t<td>\n<?php \n\t\t$this->parent->create_field(array(\n\t\t\t'type'\t=>\t'text',\n\t\t\t'name'\t=>\t'fields['.$key.'][min]',\n\t\t\t'value'\t=>\t$field['min'],\n\t\t));\n?>\n\t\t\t\t<!-- <p class=\"alert\" id=\"alert_min\"></p> TODO -->\n\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr class=\"field_option field_option_<?php echo $this->name; ?>\">\n\t\t\t<td class=\"label\">\n\t\t\t\t<label><?php _e(\"step\",'acf'); ?></label>\n\t\t\t\t<p class=\"description\"><?php _e(\"step should be positive\",'acf'); ?></p>\n\t\t\t</td>\n\t\t\t<td>\n<?php \n\t\t$this->parent->create_field(array(\n\t\t\t'type'\t=>\t'text',\n\t\t\t'name'\t=>\t'fields['.$key.'][step]',\n\t\t\t'value'\t=>\t$field['step'],\n\t\t));\n?>\n\t\t\t\t<!-- <p class=\"alert\" id=\"alert_step\"></p> TODO -->\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr class=\"field_option field_option_<?php echo $this->name; ?>\">\n\t\t\t<td class=\"label\">\n\t\t\t\t<label><?php _e(\"Default Value\",'acf'); ?></label>\n\t\t\t\t<p class=\"description\"><?php _e(\"Default Value should be between min and max\",'acf'); ?></p>\n\t\t\t</td>\n\t\t\t<td>\n<?php \n\t\t$this->parent->create_field(array(\n\t\t\t'type'\t=>\t'text',\n\t\t\t'name'\t=>\t'fields['.$key.'][default_value]',\n\t\t\t'value'\t=>\t$field['default_value'],\n\t\t));\n?>\n\t\t\t\t<!-- <p class=\"alert\" id=\"alert_default_value\"></p> TODO -->\n\t\t\t</td>\n\t\t</tr>\n<?php \n\t}", "title": "" }, { "docid": "3c5227e921ddd6c72e7851617b59d97b", "score": "0.5109933", "text": "protected function addOptions(Array $options)\n {\n //h should always be an option\n $this->addHelpOption($options);\n \n //v should always be an option\n $this->addVerboseOption($options);\n \n foreach ($options as $option)\n {\n if (!is_array($option) || count($option) == 1)\n {\n throw new PhpCliException(\"Options are not valid.\"); \n }\n }\n\n $this->setOptions($options);\n }", "title": "" }, { "docid": "389c4612f17e6da0fad3960d88deb247", "score": "0.5103484", "text": "public function setAllowedOptions($key, $options);", "title": "" }, { "docid": "a4e221af4be9a8b4fe5eb9828808a925", "score": "0.5097477", "text": "protected function configure($options = array(), $messages = array())\n {\n $this->setOption('required', false);\n $this->addMessage('not_implmented', 'this parameter is not implmented yet.');\n parent::configure($options, $messages);\n }", "title": "" }, { "docid": "6aed9c19c4767a634a076f825b778de8", "score": "0.5095892", "text": "protected function configure($options = [], $messages = [])\n {\n $this->addMessage('max_length', 'Value may not have more that %max_length% items.');\n $this->addMessage('min_length', 'Value must have at least %max_length% items.');\n $this->addMessage('invalid', 'One or more provided values are not valid.');\n\n $this->addOption('delimiter', ',');\n $this->addOption('max_length');\n $this->addOption('min_length');\n $this->addOption('unique', false);\n $this->addOption('validator', new sfValidatorPass(['required' => true]));\n\n $this->setOption('empty_value', []);\n }", "title": "" }, { "docid": "1a31d4b807ce125660ba60c9d15a190d", "score": "0.5086712", "text": "public function addFileConstraint(array $options = array())\n {\n self::$constraints[] = new Assert\\File($options);\n }", "title": "" }, { "docid": "8e4651c6a2073b34afb5e2ccb0956a78", "score": "0.5073113", "text": "function add_field() {}", "title": "" }, { "docid": "0a4afaa2f82e8519b5a1d36c49f6f48a", "score": "0.50661236", "text": "public function addValidator()\n {\n $this->app->validator->extendImplicit('recaptcha', function ($attribute, $value, $parameters) {\n return app('recaptcha.checker')->verify($value)->check();\n }, 'Please ensure that you are a human!');\n }", "title": "" }, { "docid": "65e40c33c789d95743079db2a2c4cf6c", "score": "0.50644445", "text": "public function __construct(array $options = [])\n {\n parent::__construct($options);\n $this->validate($options);\n }", "title": "" }, { "docid": "03f541ab6107c1c9dd99df90a43c8f41", "score": "0.50571585", "text": "private function validateInitializationOptions(array $options) {\n\n if (!isset($options['price']) ||\n empty($options['price']) ||\n !(is_int($options['price']) || is_float($options['price'])) || \n $options['price'] <= 0) {\n\n throw new \\InvalidArgumentException('price must be a positive integer or float');\n }\n\n if (empty($options['category']) ||\n !is_string($options['category']) || \n !in_array($options['category'], self::ALL_CATEGORIES)) {\n\n throw new \\InvalidArgumentException('category must be set and of an available Product category');\n }\n\n if (!isset($options['isImported']) ||\n !is_bool($options['isImported'])) {\n\n throw new \\InvalidArgumentException('isImported must be set and a boolean');\n }\n\n if (!isset($options['name']) || \n empty($options['name']) || \n !is_string($options['name'])) {\n \n throw new \\InvalidArgumentException('name must be set and a valid string');\n }\n }", "title": "" }, { "docid": "b8f6f6f6a43433850978ccb8701681ae", "score": "0.5056643", "text": "function libsynoptions_init() {\n register_setting( 'libsynoptions_options', 'libsynoption', 'libsynoptions_validate' );\n}", "title": "" }, { "docid": "03d918d5929a0ac3029071f3634c8b01", "score": "0.505064", "text": "protected function configure($options = array(), $messages = array()) {\n parent::configure($options, $messages);\n\n $this->setMessage('invalid', 'From time should be before to time.');\n\n $this->addRequiredOption('from_time');\n $this->addRequiredOption('to_time');\n $this->addOption('from_field', 'from');\n $this->addOption('to_field', 'to');\n }", "title": "" }, { "docid": "86bc8a8119b4bbb34b89ec1740881c5f", "score": "0.5046192", "text": "function validate_options( $input ){\n $valid = array();\n $valid['color'] = sanitize_text_field( $input['color'] );\n \n return $valid;\n }", "title": "" }, { "docid": "10b403e5679b480fa90882ecd0b17f46", "score": "0.5046146", "text": "public function rules()\n {\n return [\n 'option_name' => 'required|min:3',\n 'option_value' => 'required|',\n ];\n }", "title": "" }, { "docid": "3a909c3cc9164a051cc03a3ffff255f2", "score": "0.5045308", "text": "public function register_options()\n\t{\n\t\tregister_setting('zemanta_options', 'zemanta_options', array($this, 'validate_options'));\n\n\t\tadd_settings_section('zemanta_options_plugin', null, array($this, 'callback_options_dummy'), 'zemanta');\n\t\tadd_settings_field('zemanta_option_api_key', 'Your API key', array($this, 'options_set'), 'zemanta', 'zemanta_options_plugin', $this->options['zemanta_option_api_key']);\n\n\t\tadd_settings_section('zemanta_options_image', null, array($this, 'callback_options_dummy'), 'zemanta');\n\t\tadd_settings_field('zemanta_option_image_upload', 'Enable image uploader', array($this, 'options_set'), 'zemanta', 'zemanta_options_image', $this->options['zemanta_option_image_upload']);\n\t}", "title": "" }, { "docid": "b7dcf0c56d29e801f22db26bd255570f", "score": "0.50397617", "text": "function settings_validate( $new_options ) {\n\n\t\t$options = (array)$this->module->options;\n\n\t\t$options['post_types'] = $this->clean_post_type_options( $new_options['post_types'], $this->module->post_type_support );\n\n\t\tif ( in_array( $new_options['quick_create_post_type'], array_keys( $this->get_all_post_types() ) ) )\n\t\t\t$options['quick_create_post_type'] = $new_options['quick_create_post_type'];\n\n\t\tif ( 'on' != $new_options['ics_subscription'] )\n\t\t\t$options['ics_subscription'] = 'off';\n\t\telse\n\t\t\t$options['ics_subscription'] = 'on';\n\n\t\treturn $options;\n\t}", "title": "" }, { "docid": "c7bc5357ed5474781c3180bb380af4d4", "score": "0.50387913", "text": "function create_options( $field )\n\t{\n\n// vars\n$key = $field['name'];\n\n\n// validate\nif( !$field['row_min'] )\n{\n\t$field['row_min'] = '';\n}\n\nif( !$field['row_limit'] )\n{\n\t$field['row_limit'] = '';\n}\n\n\n// add clone\n$field['sub_fields'][] = apply_filters('acf/load_field_defaults', array(\n\t'key'\t=> 'field_clone',\n\t'label'\t=> __(\"New Field\",'acf'),\n\t'name'\t=> __(\"new_field\",'acf'),\n\t'type'\t=> 'text',\n));\n\n\n// get name of all fields for use in field type drop down\n$fields_names = apply_filters('acf/registered_fields', array());\nunset( $fields_names[ __(\"Layout\",'acf') ]['tab'] );\n\n\n// conditional logic dummy data\n$conditional_logic_rule = array(\n\t'field' => '',\n\t'operator' => '==',\n\t'value' => ''\n);\n\n\n?>\n<tr class=\"field_option field_option_<?php echo $this->name; ?> field_option_<?php echo $this->name; ?>_fields\">\n\t<td class=\"label\">\n\t\t<label><?php _e(\"Repeater Fields\",'acf'); ?></label>\n\t</td>\n\t<td>\n\t<div class=\"repeater\">\n\t\t<div class=\"fields_header\">\n\t\t\t<table class=\"acf widefat\">\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th class=\"field_order\"><?php _e('Field Order','acf'); ?></th>\n\t\t\t\t\t\t<th class=\"field_label\"><?php _e('Field Label','acf'); ?></th>\n\t\t\t\t\t\t<th class=\"field_name\"><?php _e('Field Name','acf'); ?></th>\n\t\t\t\t\t\t<th class=\"field_type\"><?php _e('Field Type','acf'); ?></th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t</table>\n\t\t</div>\n\t\t<div class=\"fields\">\n\n\t\t\t<div class=\"no_fields_message\" <?php if(count($field['sub_fields']) > 1){ echo 'style=\"display:none;\"'; } ?>>\n\t\t\t\t<?php _e(\"No fields. Click the \\\"+ Add Sub Field button\\\" to create your first field.\",'acf'); ?>\n\t\t\t</div>\n\t\n\t\t\t<?php foreach($field['sub_fields'] as $sub_field): \n\t\t\t\t\n\t\t\t\t$fake_name = $key . '][sub_fields][' . $sub_field['key'];\n\t\t\t\t\n\t\t\t\t?>\n\t\t\t\t<div class=\"field field_type-<?php echo $sub_field['type']; ?> field_key-<?php echo $sub_field['key']; ?> sub_field\" data-type=\"<?php echo $sub_field['type']; ?>\" data-id=\"<?php echo $sub_field['key']; ?>\">\n\t\t\t\t\t<input type=\"hidden\" class=\"input-field_key\" name=\"fields[<?php echo $fake_name; ?>][key]\" value=\"<?php echo $sub_field['key']; ?>\" />\n\t\t\t\t\t<div class=\"field_meta\">\n\t\t\t\t\t<table class=\"acf widefat\">\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class=\"field_order\"><span class=\"circle\"><?php echo (int)$sub_field['order_no'] + 1; ?></span></td>\n\t\t\t\t\t\t\t<td class=\"field_label\">\n\t\t\t\t\t\t\t\t<strong>\n\t\t\t\t\t\t\t\t\t<a class=\"acf_edit_field\" title=\"<?php _e(\"Edit this Field\",'acf'); ?>\" href=\"javascript:;\"><?php echo $sub_field['label']; ?></a>\n\t\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t\t<div class=\"row_options\">\n\t\t\t\t\t\t\t\t\t<span><a class=\"acf_edit_field\" title=\"<?php _e(\"Edit this Field\",'acf'); ?>\" href=\"javascript:;\"><?php _e(\"Edit\",'acf'); ?></a> | </span>\n\t\t\t\t\t\t\t\t\t<span><a title=\"<?php _e(\"Read documentation for this field\",'acf'); ?>\" href=\"http://www.advancedcustomfields.com/docs/field-types/\" target=\"_blank\"><?php _e(\"Docs\",'acf'); ?></a> | </span>\n\t\t\t\t\t\t\t\t\t<span><a class=\"acf_duplicate_field\" title=\"<?php _e(\"Duplicate this Field\",'acf'); ?>\" href=\"javascript:;\"><?php _e(\"Duplicate\",'acf'); ?></a> | </span>\n\t\t\t\t\t\t\t\t\t<span><a class=\"acf_delete_field\" title=\"<?php _e(\"Delete this Field\",'acf'); ?>\" href=\"javascript:;\"><?php _e(\"Delete\",'acf'); ?></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class=\"field_name\"><?php echo $sub_field['name']; ?></td>\n\t\t\t\t\t\t\t<td class=\"field_type\"><?php echo $sub_field['type']; ?></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"field_form_mask\">\n\t\t\t\t\t<div class=\"field_form\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<table class=\"acf_input widefat\">\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t<tr class=\"field_label\">\n\t\t\t\t\t\t\t\t\t<td class=\"label\">\n\t\t\t\t\t\t\t\t\t\t<label><?php _e(\"Field Label\",'acf'); ?> <span class=\"required\">*</span></label>\n\t\t\t\t\t\t\t\t\t\t<p class=\"description\"><?php _e(\"This is the name which will appear on the edit page\",'acf'); ?></p>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\t\tdo_action('acf/create_field', array(\n\t\t\t\t\t\t\t\t\t\t\t'type'\t=>\t'text',\n\t\t\t\t\t\t\t\t\t\t\t'name'\t=>\t'fields[' . $fake_name . '][label]',\n\t\t\t\t\t\t\t\t\t\t\t'value'\t=>\t$sub_field['label'],\n\t\t\t\t\t\t\t\t\t\t\t'class'\t=>\t'label',\n\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr class=\"field_name\">\n\t\t\t\t\t\t\t\t\t<td class=\"label\">\n\t\t\t\t\t\t\t\t\t\t<label><?php _e(\"Field Name\",'acf'); ?> <span class=\"required\">*</span></label>\n\t\t\t\t\t\t\t\t\t\t<p class=\"description\"><?php _e(\"Single word, no spaces. Underscores and dashes allowed\",'acf'); ?></p>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\t\tdo_action('acf/create_field', array(\n\t\t\t\t\t\t\t\t\t\t\t'type'\t=>\t'text',\n\t\t\t\t\t\t\t\t\t\t\t'name'\t=>\t'fields[' . $fake_name . '][name]',\n\t\t\t\t\t\t\t\t\t\t\t'value'\t=>\t$sub_field['name'],\n\t\t\t\t\t\t\t\t\t\t\t'class'\t=>\t'name',\n\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr class=\"field_type\">\n\t\t\t\t\t\t\t\t\t<td class=\"label\"><label><?php _e(\"Field Type\",'acf'); ?> <span class=\"required\">*</span></label></td>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\t\tdo_action('acf/create_field', array(\n\t\t\t\t\t\t\t\t\t\t\t'type'\t=>\t'select',\n\t\t\t\t\t\t\t\t\t\t\t'name'\t=>\t'fields[' . $fake_name . '][type]',\n\t\t\t\t\t\t\t\t\t\t\t'value'\t=>\t$sub_field['type'],\n\t\t\t\t\t\t\t\t\t\t\t'class'\t=>\t'type',\n\t\t\t\t\t\t\t\t\t\t\t'choices'\t=>\t$fields_names,\n\t\t\t\t\t\t\t\t\t\t\t'optgroup' \t=> \ttrue\n\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr class=\"field_instructions\">\n\t\t\t\t\t\t\t\t\t<td class=\"label\"><label><?php _e(\"Field Instructions\",'acf'); ?></label></td>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif( !isset($sub_field['instructions']) )\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$sub_field['instructions'] = \"\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tdo_action('acf/create_field', array(\n\t\t\t\t\t\t\t\t\t\t\t'type'\t=>\t'text',\n\t\t\t\t\t\t\t\t\t\t\t'name'\t=>\t'fields[' . $fake_name . '][instructions]',\n\t\t\t\t\t\t\t\t\t\t\t'value'\t=>\t$sub_field['instructions'],\n\t\t\t\t\t\t\t\t\t\t\t'class'\t=>\t'instructions',\n\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr class=\"required\">\n\t\t\t\t\t\t\t\t\t<td class=\"label\"><label><?php _e(\"Required?\",'acf'); ?></label></td>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\t\tdo_action('acf/create_field', array(\n\t\t\t\t\t\t\t\t\t\t\t'type'\t=>\t'radio',\n\t\t\t\t\t\t\t\t\t\t\t'name'\t=>\t'fields[' .$fake_name . '][required]',\n\t\t\t\t\t\t\t\t\t\t\t'value'\t=>\t$sub_field['required'],\n\t\t\t\t\t\t\t\t\t\t\t'choices'\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t1\t=>\t__(\"Yes\",'acf'),\n\t\t\t\t\t\t\t\t\t\t\t\t0\t=>\t__(\"No\",'acf'),\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t'layout'\t=>\t'horizontal',\n\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr class=\"field_column_width\">\n\t\t\t\t\t\t\t\t\t<td class=\"label\">\n\t\t\t\t\t\t\t\t\t\t<label><?php _e(\"Column Width\",'acf'); ?></label>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif( !isset($sub_field['column_width']) )\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$sub_field['column_width'] = \"\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tdo_action('acf/create_field', array(\n\t\t\t\t\t\t\t\t\t\t\t'type'\t\t=>\t'number',\n\t\t\t\t\t\t\t\t\t\t\t'name'\t\t=>\t'fields[' . $fake_name . '][column_width]',\n\t\t\t\t\t\t\t\t\t\t\t'value'\t\t=>\t$sub_field['column_width'],\n\t\t\t\t\t\t\t\t\t\t\t'class'\t\t=>\t'column_width',\n\t\t\t\t\t\t\t\t\t\t\t'append'\t=>\t'%'\n\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$sub_field['name'] = $fake_name;\n\t\t\t\t\t\t\t\tdo_action('acf/create_field_options', $sub_field );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<tr class=\"conditional-logic\" data-field_name=\"<?php echo $field['key']; ?>\">\n\t\t\t\t\t\t\t\t\t<td class=\"label\"><label><?php _e(\"Conditional Logic\",'acf'); ?></label></td>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\t\tdo_action('acf/create_field', array(\n\t\t\t\t\t\t\t\t\t\t\t'type'\t=>\t'radio',\n\t\t\t\t\t\t\t\t\t\t\t'name'\t=>\t'fields[' . $fake_name . '][conditional_logic][status]',\n\t\t\t\t\t\t\t\t\t\t\t'value'\t=>\t$sub_field['conditional_logic']['status'],\n\t\t\t\t\t\t\t\t\t\t\t'choices'\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t1\t=>\t__(\"Yes\",'acf'),\n\t\t\t\t\t\t\t\t\t\t\t\t0\t=>\t__(\"No\",'acf'),\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t'layout'\t=>\t'horizontal',\n\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// no rules?\n\t\t\t\t\t\t\t\t\t\tif( ! $sub_field['conditional_logic']['rules'] )\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$sub_field['conditional_logic']['rules'] = array(\n\t\t\t\t\t\t\t\t\t\t\t\tarray() // this will get merged with $conditional_logic_rule\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t<div class=\"contional-logic-rules-wrapper\" <?php if( ! $sub_field['conditional_logic']['status'] ) echo 'style=\"display:none\"'; ?>>\n\t\t\t\t\t\t\t\t\t\t\t<table class=\"conditional-logic-rules widefat acf-rules <?php if( count($sub_field['conditional_logic']['rules']) == 1) echo 'remove-disabled'; ?>\">\n\t\t\t\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t<?php foreach( $sub_field['conditional_logic']['rules'] as $rule_i => $rule ): \n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t// validate\n\t\t\t\t\t\t\t\t\t\t\t\t\t$rule = array_merge($conditional_logic_rule, $rule);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t// fix PHP error in 3.5.4.1\n\t\t\t\t\t\t\t\t\t\t\t\t\tif( strpos($rule['value'],'Undefined index: value in') !== false )\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$rule['value'] = '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr data-i=\"<?php echo $rule_i; ?>\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input class=\"conditional-logic-field\" type=\"hidden\" name=\"fields[<?php echo $fake_name; ?>][conditional_logic][rules][<?php echo $rule_i; ?>][field]\" value=\"<?php echo $rule['field']; ?>\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td width=\"25%\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdo_action('acf/create_field', array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t=>\t'select',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'name'\t=>\t'fields[' . $fake_name . '][conditional_logic][rules][' . $rule_i . '][operator]',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'value'\t=>\t$rule['operator'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'choices'\t=>\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'=='\t=>\t__(\"is equal to\",'acf'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'!='\t=>\t__(\"is not equal to\",'acf'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><input class=\"conditional-logic-value\" type=\"hidden\" name=\"fields[<?php echo $fake_name; ?>][conditional_logic][rules][<?php echo $rule_i; ?>][value]\" value=\"<?php echo $rule['value']; ?>\" /></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"buttons\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ul class=\"hl clearfix\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li><a class=\"acf-button-remove\" href=\"javascript:;\"></a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li><a class=\"acf-button-add\" href=\"javascript:;\"></a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\t\n\t\t\t\t\t\t\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t<ul class=\"hl clearfix\">\n\t\t\t\t\t\t\t\t\t\t\t\t<li style=\"padding:4px 4px 0 0;\"><?php _e(\"Show this field when\",'acf'); ?></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li><?php do_action('acf/create_field', array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t=>\t'select',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'name'\t=>\t'fields[' . $fake_name . '][conditional_logic][allorany]',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'value'\t=>\t$sub_field['conditional_logic']['allorany'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'choices' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'all'\t=>\t__(\"all\",'acf'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'any'\t=>\t__(\"any\",'acf'),\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t)); ?></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li style=\"padding:4px 0 0 4px;\"><?php _e(\"these rules are met\",'acf'); ?></li>\n\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr class=\"field_save\">\n\t\t\t\t\t\t\t\t\t<td class=\"label\">\n\t\t\t\t\t\t\t\t\t\t<!-- <label><?php _e(\"Save Field\",'acf'); ?></label> -->\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<ul class=\"hl clearfix\">\n\t\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"acf_edit_field acf-button grey\" title=\"<?php _e(\"Close Field\",'acf'); ?>\" href=\"javascript:;\"><?php _e(\"Close Sub Field\",'acf'); ?></a>\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\n\t\t\t\t\t</div><!-- End Form -->\n\t\t\t\t\t</div><!-- End Form Mask -->\n\t\t\t\t\n\t\t\t\t</div>\n\t\t\t<?php endforeach; ?>\n\t\t</div>\n\t\t<div class=\"table_footer\">\n\t\t\t<div class=\"order_message\"><?php _e('Drag and drop to reorder','acf'); ?></div>\n\t\t\t<a href=\"javascript:;\" id=\"add_field\" class=\"acf-button\"><?php _e('+ Add Sub Field','acf'); ?></a>\n\t\t</div>\n\t</div>\n\t</td>\n</tr>\n<tr class=\"field_option field_option_<?php echo $this->name; ?>\">\n\t<td class=\"label\">\n\t\t<label><?php _e(\"Minimum Rows\",'acf'); ?></label>\n\t</td>\n\t<td>\n\t\t<?php \n\t\tdo_action('acf/create_field', array(\n\t\t\t'type'\t=>\t'text',\n\t\t\t'name'\t=>\t'fields['.$key.'][row_min]',\n\t\t\t'value'\t=>\t$field['row_min'],\n\t\t));\n\t\t?>\n\t</td>\n</tr>\n<tr class=\"field_option field_option_<?php echo $this->name; ?>\">\n\t<td class=\"label\">\n\t\t<label><?php _e(\"Maximum Rows\",'acf'); ?></label>\n\t</td>\n\t<td>\n\t\t<?php \n\t\tdo_action('acf/create_field', array(\n\t\t\t'type'\t=>\t'text',\n\t\t\t'name'\t=>\t'fields['.$key.'][row_limit]',\n\t\t\t'value'\t=>\t$field['row_limit'],\n\t\t));\n\t\t?>\n\t</td>\n</tr>\n<tr class=\"field_option field_option_<?php echo $this->name; ?> field_option_<?php echo $this->name; ?>_layout\">\n\t<td class=\"label\">\n\t\t<label><?php _e(\"Layout\",'acf'); ?></label>\n\t</td>\n\t<td>\n\t\t<?php \n\t\tdo_action('acf/create_field', array(\n\t\t\t'type'\t=>\t'radio',\n\t\t\t'name'\t=>\t'fields['.$key.'][layout]',\n\t\t\t'value'\t=>\t$field['layout'],\n\t\t\t'layout'\t=>\t'horizontal',\n\t\t\t'choices'\t=>\tarray(\n\t\t\t\t'table'\t=>\t__(\"Table\",'acf'),\n\t\t\t\t'row'\t=>\t__(\"Row\",'acf')\n\t\t\t)\n\t\t));\n\t\t?>\n\t</td>\n</tr>\n<tr class=\"field_option field_option_<?php echo $this->name; ?>\">\n\t<td class=\"label\">\n\t\t<label><?php _e(\"Button Label\",'acf'); ?></label>\n\t</td>\n\t<td>\n\t\t<?php \n\t\tdo_action('acf/create_field', array(\n\t\t\t'type'\t=>\t'text',\n\t\t\t'name'\t=>\t'fields['.$key.'][button_label]',\n\t\t\t'value'\t=>\t$field['button_label'],\n\t\t));\n\t\t?>\n\t</td>\n</tr>\n<?php\n\t\n\t}", "title": "" }, { "docid": "dad94c89313d2da82237e01e40ed972e", "score": "0.50324386", "text": "public function schemaValidate($filename, $options = null) {}", "title": "" }, { "docid": "0efa836a32df73e41e6ee43a4d563816", "score": "0.5030194", "text": "public function __construct($mandatory = false,$options = array()) {\t\t\n\t\t\t$this->setAtributes($options);\n\t\t\tif($mandatory) {\n\t\t\t\t$this->addValidator(new Form_Validator_Mandatory($this->atributes['name']));\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "ab53807d6a9659455738c8caa23b9a28", "score": "0.50233597", "text": "private static function validateOptions(array $options, $control) {\n $validEntities = ['occurrence', 'sample', 'location'];\n if (empty($options['entity']) || !in_array($options['entity'], $validEntities)) {\n throw new exception(\"The [voting_comments.$control] control requires an @entity option naming an entity that supports comments.\");\n }\n if (empty($_GET[\"$options[entity]_id\"])) {\n throw new exception(\"The [voting_comments.$control] control a $options[entity]_id parameter in the URL.\");\n }\n if (empty($options['voteFields']) && empty($options['textFields'])) {\n throw new exception(\"The [voting_comments.$control] control requires at least one of the voteFields or textFields options to be populated.\");\n }\n if (isset($options['voteFields']) && !is_array($options['voteFields'])) {\n throw new exception(\"The [voting_comments.$control] control @voteFields option must be a JSON object with field names and field titles as key/value pairs.\");\n }\n if (isset($options['textFields']) && !is_array($options['textFields'])) {\n throw new exception(\"The [voting_comments.$control] control @textFields option must be a JSON object with field names and field titles as key/value pairs.\");\n }\n }", "title": "" }, { "docid": "0a30415c55de65f979879e401b8115e7", "score": "0.5021513", "text": "public function buildOptions(array $options);", "title": "" }, { "docid": "a4d2c03ea7cab78e1f4f4d254fdab2a5", "score": "0.50164515", "text": "function optionsframework_options() {\n\t$options[] = array(\n\t\t'name' => __( 'Colour', 'theme-textdomain' ),\n\t\t'type' => 'heading'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( 'Background Colour', 'theme-textdomain' ),\n\t\t'desc' => __( '', 'theme-textdomain' ),\n\t\t'id' => 'background_colour',\n\t\t'std' => '#f5f5f5',\n\t\t'type' => 'color'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( 'Paper Colour', 'theme-textdomain' ),\n\t\t'desc' => __( '', 'theme-textdomain' ),\n\t\t'id' => 'paper_colour',\n\t\t'std' => '#FAFAFA',\n\t\t'type' => 'color'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( 'Header Text Colour', 'theme-textdomain' ),\n\t\t'desc' => __( '', 'theme-textdomain' ),\n\t\t'id' => 'header-text-colour',\n\t\t'std' => '#444444',\n\t\t'type' => 'color'\n\t);\t\n\n\treturn $options;\n}", "title": "" }, { "docid": "9303844aeded67634dc6e4dabb6cf89d", "score": "0.5013507", "text": "function validate_options($options) {\n\n\t\t$options['footer-note'] = trim( strip_tags( $options['footer-note'], '<a><b><strong><em><ol><li><div><span>' ) );\n\t\t$options['custom-css'] = trim( strip_tags( $options['custom-css'] ) );\n\t\t$options['display-author'] = isset( $options['display-author'] ) && $options['display-author'] == 1 ? true : false;\n\t\t$options['display-tags'] = isset( $options['display-tags'] ) && $options['display-tags'] == 1 ? true : false;\n\t\t$options['display-categories'] = isset( $options['display-categories'] ) && $options['display-categories'] == 1 ? true : false;\n\n\t\treturn $options;\n\t}", "title": "" }, { "docid": "77af22aaf3844352d623bbafd2a9bc40", "score": "0.5006945", "text": "public function beforeValidate($options = array()) {\n\t\t$this->validate = array_merge(\n\t\t\t$this->validate,\n\t\t\tarray(\n\t\t\t\t'name' => array(\n\t\t\t\t\t'notBlank' => array(\n\t\t\t\t\t\t'rule' => array('notBlank'),\n\t\t\t\t\t\t'message' => sprintf(\n\t\t\t\t\t\t\t__d('net_commons', 'Please input %s.'), __d('photo_albums', 'Album Name')\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'allowEmpty' => false,\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\treturn parent::beforeValidate($options);\n\t}", "title": "" }, { "docid": "307862683da25ac964c7b4c52d9ff5e6", "score": "0.49761987", "text": "public function __construct($spec, $options = null)\n {\n parent::__construct($spec, $options);\n $this->setAllowEmpty(true)\n ->setRequired(true)\n ->setAutoInsertNotEmptyValidator(false)\n ->addValidator($this->getCaptcha(), true);\n }", "title": "" }, { "docid": "18346bdf98598a2a9a2729bfbef08df4", "score": "0.4973058", "text": "function __construct($options = []);", "title": "" }, { "docid": "c2939e04cce2c0d88a0aac0ced475c24", "score": "0.4972306", "text": "function ChoiceValidator ()\n {\n\n parent::Validator();\n\n $this->params['choices'] = array();\n $this->params['choices_error'] = 'Invalid value';\n $this->params['sensitive'] = FALSE;\n $this->params['valid'] = TRUE;\n\n }", "title": "" }, { "docid": "8c9fc233cc6f9943d393968dd1de04d9", "score": "0.49631882", "text": "function validate_options( $fields ) {\n\t\tglobal $publishthis;\n\n\t\t//invalidate the cache for client info\n\t\tdelete_option( 'pt_client_info' );\n\t\tdelete_transient( 'pt_client_info' );\n\t\tdelete_transient( 'pt_admin_client_info' );\n\n\t\t$options = $publishthis->get_options();\n\n\t\t$errors = 0;\n\t\tif ( !isset( $fields['tax_mapping'] ) ) {\n\t\t\t$fields['tax_mapping'] = array();\n\t\t}\n\n\t\tforeach ( $fields as $key=>$val ) {\n\t\t\t//save selected value to user session\n\t\t\tif ( !isset( $_SESSION['publishthis_settings_'.$key] ) ) $_SESSION['publishthis_settings_'.$key] = $val;\n\n\t\t\tswitch ( $key ) {\n\t\t\tcase 'api_token': //validate API token\n\t\t\t\t$api_token = sanitize_text_field( $fields['api_token'] );\n\t\t\t\t$token_status = $this->is_token_valid( $api_token );\n\t\t\t\tif ( ! ( isset( $api_token ) && is_string( $api_token ) && $token_status['valid'] ) ) {\n\t\t\t\t\tadd_settings_error( 'publishthis_api_token', 'publishthis_api_token_error', $token_status['message'], 'error' );\n\t\t\t\t\t$errors++;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'debug': //validate Debug\n\t\t\tcase 'curatedby': //validate curated by logo\n\t\t\t\tif ( ! ( isset( $fields[ $key ] ) && in_array( $fields[ $key ], array( '0', '1', '2' ) ) ) ) {\n\t\t\t\t\t$errors++;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'cat_mappings':\n\t\t\tcase 'author_mappings':\n\t\t\tcase 'include_analytics': //whether to include our js file for tracking how pt content does for them\n\t\t\tcase 'pause_polling': //validate Pause polling\n\t\t\tcase 'styling': //validate Styling\n\t\t\t\tif ( ! ( isset( $val ) && in_array( $val, array( '0', '1' ) ) ) ) {\n\t\t\t\t\t$errors++;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'curated_publish': //no specific validation required, just setup crons\n\t\t\t\tif ( !isset( $val ) ) {\n\t\t\t\t\t$errors++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif( $val == 'import_with_cron' ) {\n\t\t\t\t\t\t$publishthis->cron->pt_add();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$publishthis->cron->pt_remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif ( $errors == 0 ) {\n\t\t\t//reset simulate cron\n\t\t\tupdate_option( \"pt_simulated_cron\", 0 );\n\t\t\t$options = array_merge( $options, $fields );\n\t\t}\n\n\t\treturn $options;\n\t}", "title": "" }, { "docid": "09c7be1c12400fc2e237c4b2d38cc44e", "score": "0.49531907", "text": "public function beforeValidate($options = array()) {\n\t\t// この継承クラスたちがValidateロジックを走らせる前に必ずDBを切り替える\n\t\t$this->setDataSource('master');\n\t\treturn parent::beforeValidate($options);\n\t}", "title": "" }, { "docid": "02b56bab4a69197ccb906669e71c7c40", "score": "0.4951008", "text": "public function withValidator($validator)\n{\n $validator->after(function ($validator) {\n $validator->errors()->add('field', 'Something is wrong with this field!');\n });\n}", "title": "" }, { "docid": "c094537814b86b42afbae445b796bf03", "score": "0.49479505", "text": "public function beforeValidate($options = array()) {\n // Update validation rules according to CO Settings, but only for records attached\n // to a CO Person Role\n \n if(!empty($this->data['Address']['co_person_role_id'])) {\n // Map to the CO ID\n \n $args = array();\n $args['joins'][0]['table'] = 'cm_co_person_roles';\n $args['joins'][0]['alias'] = 'CoPersonRole';\n $args['joins'][0]['type'] = 'INNER';\n $args['joins'][0]['conditions'][0] = 'CoPerson.id=CoPersonRole.co_person_id';\n $args['conditions']['CoPersonRole.id'] = $this->data['Address']['co_person_role_id'];\n $args['contain'] = false;\n \n $cop = $this->CoPersonRole->CoPerson->find('first', $args);\n \n if($cop) {\n $fields = $this->CoPersonRole->CoPerson->Co->CoSetting->getRequiredAddressFields($cop['CoPerson']['co_id']);\n \n foreach($fields as $f) {\n // Make this field required\n $this->validator()->getField($f)->getRule('content')->required = true;\n $this->validator()->getField($f)->getRule('content')->allowEmpty = false;\n $this->validator()->getField($f)->getRule('content')->message = _txt('fd.required');\n }\n } else {\n // If for some reason we can't find the CO, fall back to the defaults\n }\n }\n \n return parent::beforeValidate($options);\n }", "title": "" }, { "docid": "577346db1965e184ef0b500397534bfd", "score": "0.4947163", "text": "public function renderField($options = array());", "title": "" }, { "docid": "c5e718ba37be2482896f45e9b058b8ab", "score": "0.49426484", "text": "public function setOptions(Field $field, $options, $allowDelete = true) {\n\n\t\t$existingOptions = $this->getOptions($field);\n\t\t$updatedOptions = array();\n\t\t$deletedOptionIDs = array();\n\t\t$addedOptions = array();\n\t\t$result = array(\n\t\t\t'added' => 0,\n\t\t\t'updated' => 0,\n\t\t\t'deleted' => 0,\n\t\t\t'marked' => 0\n\t\t);\n\n\t\t// iterate through new options\n\t\t$sort = 0;\n\n\t\tforeach($options as $option) {\n\n\t\t\t$option->set('sort', $sort);\n\n\t\t\tif(!$option->id) {\n\t\t\t\t// new option to add \n\t\t\t\t$addedOptions[] = $option;\n\n\t\t\t} else {\n\t\t\t\t// existing option\n\t\t\t\t$o = null;\n\t\t\t\tforeach($existingOptions as $existingOption) {\n\t\t\t\t\tif($existingOption->id == $option->id) {\n\t\t\t\t\t\t$o = $existingOption;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($o) {\n\t\t\t\t\t// found option with same id, has anything changed?\n\t\t\t\t\tif($o->values(true) != $option->values(true)) {\n\t\t\t\t\t\t$updatedOptions[] = $option;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// user must have specified their own id\n\t\t\t\t\t$addedOptions[] = $option;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$sort++;\n\t\t}\n\n\t\t// iterate through existing options to determine which of them\n\t\t// are no longer present and thus should be deleted\n\t\tforeach($existingOptions as $existingOption) {\n\t\t\t$found = false;\n\t\t\tforeach($options as $option) {\n\t\t\t\tif($option->id == $existingOption->id) {\n\t\t\t\t\t$found = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!$found) {\n\t\t\t\t$deletedOptionIDs[] = (int) $existingOption->id;\n\t\t\t}\n\t\t}\n\n\t\t// insert new options\n\t\tif(count($addedOptions)) {\n\t\t\t$result['added'] = $this->addOptions($field, $addedOptions);\n\t\t}\n\n\t\t// delete options\n\t\tif(count($deletedOptionIDs)) {\n\t\t\tif($allowDelete) {\n\t\t\t\t$result['deleted'] = $this->deleteOptionsByID($field, $deletedOptionIDs);\n\t\t\t} else {\n\t\t\t\t$result['marked'] = $this->removedOptionIDs = $deletedOptionIDs; \n\t\t\t}\n\t\t}\n\n\t\t// update options\n\t\tif(count($updatedOptions)) {\n\t\t\t$result['updated'] = $this->updateOptions($field, $updatedOptions);\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "be69d1f954454ffcf97bd1e8720aaa9b", "score": "0.49414858", "text": "public function addOptions($arr = array()) \n\t{\n\t\tif (!$this->hasErrors()) return $this;\n\n\t\t$this->arrErrors = array_merge($this->arrErrors, $arr);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "380e3b3647520c2ccf47dabb164dc3c6", "score": "0.493532", "text": "public function add_fields_advanced_options_cb($args) {\n\n $referrer = $args['referrer'];\n\n switch ($referrer) {\n\n case PTB_Custom_Taxonomy::AD_PUBLICLY_QUERYABLE :\n\n echo $this->generate_input_radio_yes_no(\n PTB_Custom_Taxonomy::AD_PUBLICLY_QUERYABLE, $this->ctx->ad_publicly_queryable, __('If the taxonomy should be publicly queryable.', 'ptb')\n );\n break;\n\n case PTB_Custom_Taxonomy::AD_SHOW_UI :\n\n echo $this->generate_input_radio_yes_no(\n PTB_Custom_Taxonomy::AD_SHOW_UI, $this->ctx->ad_show_ui, __('Whether to generate a default UI for managing this taxonomy.', 'ptb')\n );\n break;\n\n case PTB_Custom_Taxonomy::AD_SHOW_TAG_CLOUD :\n\n echo $this->generate_input_radio_yes_no(\n PTB_Custom_Taxonomy::AD_SHOW_TAG_CLOUD, $this->ctx->ad_show_tag_cloud, __('Whether to allow the Tag Cloud widget to use this taxonomy.', 'ptb')\n );\n break;\n\n case PTB_Custom_Taxonomy::AD_SHOW_ADMIN_COLUMN :\n\n echo $this->generate_input_radio_yes_no(\n PTB_Custom_Taxonomy::AD_SHOW_ADMIN_COLUMN, $this->ctx->ad_show_admin_column, __('Whether to allow automatic creation of taxonomy columns on associated post-types table.', 'ptb')\n );\n break;\n }\n }", "title": "" }, { "docid": "f6e0c6d7a65b2cddecaaedf1e06a91b5", "score": "0.49342522", "text": "function addRule($type, $validation = 'client', $message, $arr_args = null)\r\n { \r\n $i = count($this->arr_rule);\r\n $this->arr_rule[$i]['type'] = $type; \r\n $this->arr_rule[$i]['validation'] = $validation;\r\n $this->arr_rule[$i]['message'] = $message; \r\n $this->arr_rule[$i]['args'] = array();\r\n $this->arr_rule[$i]['args'] = $arr_args; \r\n }", "title": "" }, { "docid": "adff5a8a06e56131163628b3e8a6f016", "score": "0.49300438", "text": "public function addImageConstraint(array $options = array())\n {\n self::$constraints[] = new Assert\\Image($options);\n }", "title": "" }, { "docid": "adc368b07888f74ec31f7567fb9dea96", "score": "0.49295717", "text": "public function __construct($name,$values){\n parent::__construct($name, array(\n 'required' => true,\n 'label' => $name,\n 'validators' => array(\n array('InArray', true, array(array_keys($values)))\n ),\n 'multiOptions'=>$values\n ));\n // $this->addDecorator('HtmlTag', array('tag' => 'p'))\n // ->addDecorator('Label', null);\n }", "title": "" }, { "docid": "716ed9bd6aa84d02e81efe4aebe01e04", "score": "0.49274185", "text": "public function __construct($options = null)\n {\n \n $result = $this->parseOptions($options);\n \n if (count($result->invalidOptions) > 0) {\n throw new InvalidOptionsException(\n sprintf('The options \"%s\" do not exist in rule %s', implode('\", \"', $result->invalidOptions), get_class($this)),\n $result->invalidOptions\n );\n }\n\n if (count($result->missingOptions) > 0) {\n throw new MissingOptionsException(\n sprintf('The options \"%s\" must be set for rule %s', implode('\", \"', array_keys($result->missingOptions)), get_class($this)),\n array_keys($result->missingOptions)\n );\n }\n }", "title": "" }, { "docid": "be7cd889bd47333daa1a9487e0c6859b", "score": "0.49259534", "text": "function theme_options_validate( $input ) {\n\tglobal $select_options, $radio_options;\n\n\t// Our checkbox value is either 0 or 1\n\tif ( ! isset( $input['anchor'] ) )\n\t\t$input['anchor'] = null;\n\t$input['anchor'] = ( $input['anchor'] == 1 ? 1 : 0 );\n\n\t// Say our text option must be safe text with no HTML tags\n\t$input['color'] = wp_filter_nohtml_kses( $input['color'] );\n\n\t// Our select option must actually be in our array of select options\n\tif ( ! array_key_exists( $input['selectinput'], $select_options ) )\n\t\t$input['selectinput'] = null;\n\n\t// Our radio option must actually be in our array of radio options\n\tif ( ! isset( $input['icon'] ) )\n\t\t$input['icon'] = null;\n\tif ( ! array_key_exists( $input['icon'], $radio_options ) )\n\t\t$input['icon'] = null;\n\n\t// Say our textarea option must be safe text with the allowed tags for posts\n\t//$input['google_analytics'] = wp_filter_post_kses( $input['google_analytics'] );\n\t$input['google_analytics'] = $input['google_analytics'] ;\n\n\treturn $input;\n}", "title": "" }, { "docid": "bf4142e5c2bfcc730c6c2b80c3d6c89a", "score": "0.49208552", "text": "public function disallowedOptions($field);", "title": "" }, { "docid": "6fd3a254b3993d41a742dae46651e7a5", "score": "0.492038", "text": "function theme_options_init(){\n\tregister_setting( 'sample_options', 'svbtle_options', 'theme_options_validate' );\n}", "title": "" }, { "docid": "15b68ff764e70916c95dfff4c244d2e0", "score": "0.49192673", "text": "function theme_options_init(){\n\tregister_setting( 'scout_options', 'scout_theme_options', 'theme_options_validate' );\n}", "title": "" }, { "docid": "ee48f08f269bad53efc376479368fef0", "score": "0.4918089", "text": "public function register_options (){ \n\t\tregister_setting( 'flexie-crm-settings', 'flexie_track_product' );\n\t\tregister_setting( 'flexie-crm-settings', 'flexie_track_cart' );\n\t\tregister_setting( 'flexie-crm-settings', 'flexie_track_order' );\n\t\tregister_setting( 'flexie-crm-settings', 'flexie_track_pagehit' );\n\t\tregister_setting( 'flexie-crm-settings', 'flexie_subdomain' );\n\t\tregister_setting( 'flexie-crm-settings', 'flexie_api_key', array($this, 'credential_validation') );\t\n\t}", "title": "" }, { "docid": "39615902b10d92bc1ab35583b4572797", "score": "0.4915709", "text": "public function options_validate(&$form, &$form_state) {\n parent::options_validate($form, $form_state);\n }", "title": "" }, { "docid": "39615902b10d92bc1ab35583b4572797", "score": "0.4915709", "text": "public function options_validate(&$form, &$form_state) {\n parent::options_validate($form, $form_state);\n }", "title": "" }, { "docid": "11f355c27d2dbd192d4b256f663665bd", "score": "0.49144807", "text": "protected function configure($options = array(), $messages = array())\r\n {\r\n\t parent::configure($options, $messages);\r\n\t $this->addOption('max_width');\r\n\t $this->addOption('min_width');\r\n\t $this->addOption('max_height');\r\n\t $this->addOption('min_height');\r\n }", "title": "" }, { "docid": "1f328c7d497a6aa5c8b03cf397c55102", "score": "0.4910498", "text": "public function alterOptions($field, WorkbenchAccessManagerInterface $manager);", "title": "" }, { "docid": "fa2c392a3f8428e1ed71a3fe30f979a9", "score": "0.4884096", "text": "public function setOptions(array $options = []);", "title": "" } ]
7165007e7c962aaff3de7498a0f643d2
Array of attributes to getter functions (for serialization of requests)
[ { "docid": "493b38b40d53841a1300d3df811c097d", "score": "0.0", "text": "public static function getters()\n {\n return self::$getters;\n }", "title": "" } ]
[ { "docid": "dcdd7e78446e59496a91ef934007234a", "score": "0.65155315", "text": "function attributes()\n {\n return array( \"post\", \"get\", \"session\" );\n }", "title": "" }, { "docid": "2154f1cb9160c7a13493622cdd3c7325", "score": "0.65085584", "text": "public function getAttributes(): array;", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.64624524", "text": "public static function getters();", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.64624524", "text": "public static function getters();", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.64624524", "text": "public static function getters();", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.64624524", "text": "public static function getters();", "title": "" }, { "docid": "448a3bf5829e461d95315a137e9ce0f6", "score": "0.6455488", "text": "public static function getters()\n {\n return [\n 'name' => 'getName',\n 'parent_id' => 'getParentId',\n 'kind' => 'getKind',\n 'contact' => 'getContact',\n 'enabled' => 'getEnabled',\n 'customer_id' => 'getCustomerId',\n 'internal_tag' => 'getInternalTag',\n 'language' => 'getLanguage',\n 'default_idp_id' => 'getDefaultIdpId',\n 'update_lock' => 'getUpdateLock'\n ];\n }", "title": "" }, { "docid": "75d64fa244324d3df723b827e7fafc43", "score": "0.64493734", "text": "function getAttributes() {}", "title": "" }, { "docid": "054c7867070928b1f5551013253c75c3", "score": "0.64349455", "text": "public abstract function getAttributes();", "title": "" }, { "docid": "8ab8059e5990032f24178b37b4fd0fe6", "score": "0.6410925", "text": "public function getAttributes ();", "title": "" }, { "docid": "52314666f2c918cd0bfa0ba4ccb4b48c", "score": "0.63658446", "text": "function attributes(): array\n {\n }", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.6315606", "text": "public function getAttributes();", "title": "" }, { "docid": "053e8ae6a8f01968ae4585c934bf9ff9", "score": "0.6310518", "text": "public static function getters()\n {\n return [\n 'value' => 'getValue',\n 'lock' => 'getLock',\n 'exclusive' => 'getExclusive'\n ];\n }", "title": "" }, { "docid": "6727fc2d710aff78364e6c39e5641c99", "score": "0.62908727", "text": "public function getAttributes() : array;", "title": "" }, { "docid": "6727fc2d710aff78364e6c39e5641c99", "score": "0.62908727", "text": "public function getAttributes() : array;", "title": "" }, { "docid": "6727fc2d710aff78364e6c39e5641c99", "score": "0.62908727", "text": "public function getAttributes() : array;", "title": "" }, { "docid": "740a66e02d5c331fbe8c49512ba7a1c8", "score": "0.6277695", "text": "protected function attributes() {\n global $database;\n\n //$row_result = $database->query(\"select * from \". static::$table_name. \" where id=1 limit 1\");\n\n $row_result = $database->query(\"select * from \". static::$table_name. \" limit 1\");\n\n $finfo = mysqli_fetch_fields($row_result);\n\n //echo \"attributes are: \". print_r($finfo);\n\n $attribute = array();\n foreach ($finfo as $val) {\n $name = $val->name;\n if(property_exists($this, $name)) {\n $attribute[\"{$name}\"] = $this->$name; //\"'$\".\"{$name}'\";\n }\n } \n mysqli_free_result($row_result);\n\n return $attribute;\n\n }", "title": "" }, { "docid": "beaafc1738658df8e504ee7581e7c3d8", "score": "0.6241648", "text": "public function getAttributes()\n {\n }", "title": "" }, { "docid": "beaafc1738658df8e504ee7581e7c3d8", "score": "0.6241648", "text": "public function getAttributes()\n {\n }", "title": "" }, { "docid": "073a15237baca5920dfae755f73a9e4e", "score": "0.6189253", "text": "public function attributes(): array\n {\n }", "title": "" }, { "docid": "0dbf3bbb21760d1c3cc2d1981387ad47", "score": "0.6178781", "text": "public function getCustomAttributes();", "title": "" }, { "docid": "d9a777fab6f5664cb274982f84d01a45", "score": "0.61513674", "text": "protected function attributes01() {\n $attribute = array();\n foreach(static::$db_fields as $field) {\n if(property_exists($this, $field)) {\n $attribute[$field] = $this->$field;\n }\n }\n\n print_r($attribute);\n\n return $attribute;\n\n }", "title": "" }, { "docid": "7f062819d55a7fbdd7c79b5db48bd29f", "score": "0.61175305", "text": "public function toArray()\n {\n $getters = [\n 'name' => 'getName',\n 'place' => 'getPlace'\n ];\n\n $data = [];\n foreach ($getters as $property => $getter) {\n $data[$property] = $this->{$getter}();\n }\n\n return $data;\n }", "title": "" }, { "docid": "4c008e0bd2b0fff1fbf381550317248c", "score": "0.6091894", "text": "protected function attributes() {\n $attributes = array();\n foreach($this->describe() as $field) {\n if(property_exists($this, $field)) {\n $attributes[$field] = $this->$field;\n }\n }\n return $attributes;\n }", "title": "" }, { "docid": "62ced2cd1fc1685215948fa7bc4ed433", "score": "0.6069828", "text": "public static function getAttributes(): array\n {\n return static::ATTRIBUTES;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.60485387", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "c3efd92e0ded0c0fde73230a5b08bf9d", "score": "0.60385484", "text": "protected function attributeDefinitions(){\n\t\tswitch($this->method)\n\t\t{\n\t\t\tcase 'GET':\t\t\t\t\n\t\t\t\t$ev = 'read';\n\t\t\t\t$evObj = array('attributeDefinitions'=>$this->verb);\n\t\t\tbreak;\n\t\t\tcase 'POST':\t\t\t\t\n\t\t\t\t$ev = 'update';\n\t\t\t\t$evObj = array('attributeDefinitions'=>$this->verb,'args'=>$this->args);\n\t\t\tbreak;\n\t\t\tcase 'PUT':\t\t\t\t\n\t\t\t\t$ev = 'create';\n\t\t\t\t$evObj = array('attributeDefinitions'=>$this->verb,'args'=>$this->args);\n\t\t\tbreak;\n\t\t\tcase 'DELETE':\t\t\t\t\n\t\t\t\t$ev = 'delete';\n\t\t\t\t$evObj = array('attributeDefinitions'=>$this->verb,'args'=>$this->args);\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$this->fireEvent($this->endpoint,$ev,\"before\",$evObj);\n\t\t$obj = $this->$ev();\n\t\t$evObj['results']=$obj;\n\t\t$this->fireEvent($this->endpoint,$ev,\"after\",$evObj);\n\t\treturn $obj;\n\t\t\n\t}", "title": "" }, { "docid": "d0ee5909c7cddca1ad2691c7f258602e", "score": "0.60236704", "text": "public static function getters()\n{\nreturn parent::getters() + self::$getters;\n}", "title": "" }, { "docid": "89ecb553967cbaaf63c5badd2b011df4", "score": "0.60046357", "text": "public function toArray()\n {\n $machineNamesToGetters = self::machineNamesToMethods('get');\n\n $array = [];\n foreach ($machineNamesToGetters as $machineName => $getter) {\n $array[$machineName] = $this->$getter();\n }\n return $array;\n }", "title": "" }, { "docid": "b12a7064a836a7547ab4a3dc08406773", "score": "0.60018086", "text": "public function getAttributes($request);", "title": "" }, { "docid": "a5297318a7d0b90e66b3f2e4201d0a5e", "score": "0.59996957", "text": "public function generateModelGetters()\n {\n if (count($this->_modelGetters))\n return $this->_modelGetters;\n $fieldsNames = array_keys($this->getDbShema());\n foreach ($fieldsNames as $field) {\n $camelCase = $this->toCamelCase($field);\n $this->_modelGetters[] = 'get' . ucfirst($camelCase);\n }\n return $this->_modelGetters;\n }", "title": "" }, { "docid": "24b2ee19585fd8f89398ac7389f49c73", "score": "0.5965513", "text": "public function attributes(string $field): array;", "title": "" }, { "docid": "e760c1912e59ae099ce9c5d01716f85b", "score": "0.59508437", "text": "public static function getters() : array\n {\n return self::$getters;\n }", "title": "" }, { "docid": "e760c1912e59ae099ce9c5d01716f85b", "score": "0.59508437", "text": "public static function getters() : array\n {\n return self::$getters;\n }", "title": "" }, { "docid": "e760c1912e59ae099ce9c5d01716f85b", "score": "0.59508437", "text": "public static function getters() : array\n {\n return self::$getters;\n }", "title": "" }, { "docid": "9a6861b51e7efa10c45bf7e19e2ab8bf", "score": "0.5950087", "text": "function getAttributes($value) {}", "title": "" }, { "docid": "04e4dd6a2138ad39a66fb6763e961c70", "score": "0.5949961", "text": "public static function attributeMap();", "title": "" }, { "docid": "04e4dd6a2138ad39a66fb6763e961c70", "score": "0.5949961", "text": "public static function attributeMap();", "title": "" }, { "docid": "04e4dd6a2138ad39a66fb6763e961c70", "score": "0.5949961", "text": "public static function attributeMap();", "title": "" }, { "docid": "04e4dd6a2138ad39a66fb6763e961c70", "score": "0.5949961", "text": "public static function attributeMap();", "title": "" }, { "docid": "24f55af1ca6d10111fabf9141cfa5b5a", "score": "0.59439635", "text": "function jsonSerialize() {\n\t\t$objectData = array();\n\t\tforeach ($this->_fields as $field) {\n\t\t\t$getterName = 'get' . ucfirst($field);\n\t\t\t$objectData[$field] = $this->$getterName();\n\t\t}\n\t\treturn $objectData;\n\t}", "title": "" }, { "docid": "90e0f3dbb56829f4d72aff3ec7ecde22", "score": "0.59332705", "text": "public function attributes();", "title": "" }, { "docid": "ceedfac97481a9da3e69abdb4813d3a5", "score": "0.59235674", "text": "function getGettersSetters() {\n $table = $this->table;\n\n // Gets all attributes.\n $attrs = $table->getAttrs();\n $getGettersSetters = \"\";\n foreach ($attrs as $name => $attr_obj) {\n\n // Replaces id with ID.\n $tmp = preg_replace('/_id$/', '_ID', $name);\n $tmp = ucwords(str_replace('_', ' ', $tmp));\n $func_name = str_replace(' ', '', $tmp);\n $getter = $this->_getGetter($name, $func_name, $attr_obj->getDataType());\n $setter = $this->_getSetter($name, $func_name, $attr_obj->getDataType());\n $getGettersSetters .= \"$getter\\n\\n$setter\\n\\n\";\n }\n return rtrim($getGettersSetters, \"\\n\");\n }", "title": "" }, { "docid": "60763b13c38b1bfe46275883ed9e56f1", "score": "0.5909065", "text": "public function get_attributes() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "11d1036988a74155595105a483cced1e", "score": "0.5908439", "text": "public function attributesToArray();", "title": "" }, { "docid": "c3d3fabf34c7ca29daa35eff95a7e697", "score": "0.5884492", "text": "public function dataProviderTestProvidesVirtualGetterMethods()\n {\n $map = Phergie_Event_Request::getArgumentMapping();\n $data = array();\n foreach ($map as $command => $params) {\n $data[] = array($command, $params);\n }\n return $data;\n }", "title": "" }, { "docid": "8a916ac6cb0c04b4de33b4b264394e7c", "score": "0.58821434", "text": "function get_attributes($attributes)\r\n {\r\n\r\n // initialize the array that will be returned\r\n $result = array();\r\n\r\n // if the request was for a single attribute,\r\n // treat it as an array of attributes\r\n if (!is_array($attributes)) $attributes = array($attributes);\r\n\r\n // iterate through the array of attributes to look for\r\n foreach ($attributes as $attribute)\r\n\r\n // if attribute exists\r\n if (array_key_exists($attribute, $this->attributes))\r\n\r\n // populate the $result array\r\n $result[$attribute] = $this->attributes[$attribute];\r\n\r\n // return the results\r\n return $result;\r\n\r\n }", "title": "" }, { "docid": "938c2d0d50551d21a734fff2b054c851", "score": "0.5860272", "text": "public function getRestAttributes()\n\t{\n\t\tif ( method_exists( $this, 'attributeRestMap' ) )\n\t\t{\n\t\t\t$_resultList = array();\n\t\t\t$_columnList = $this->getSchema();\n\n\t\t\tforeach ( $this->attributeRestMap() as $_key => $_value )\n\t\t\t{\n\t\t\t\t$_attributeValue = $this->getAttribute( $_key );\n\n\t\t\t\t//\tApply formats\n\t\t\t\tswitch ( $_columnList[$_key]->dbType )\n\t\t\t\t{\n\t\t\t\t\tcase 'date':\n\t\t\t\t\tcase 'datetime':\n\t\t\t\t\tcase 'timestamp':\n\t\t\t\t\t\t//\tHandle blanks\n\t\t\t\t\t\tif ( null !== $_attributeValue && $_attributeValue != '0000-00-00' && $_attributeValue != '0000-00-00 00:00:00' ) $_attributeValue = date( 'c', strtotime( $_attributeValue ) );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$_resultList[$_value] = $_attributeValue;\n\t\t\t}\n\n\t\t\treturn $_resultList;\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "5ecc55e678a4545be93f3481e9f65e5e", "score": "0.58216196", "text": "public function arrayAttributesProvider() : array\n {\n return [\n [\n [\n 'title' => 'title_value',\n 'subject' => 'subject_value',\n 'number' => 16,\n 'class' => new \\stdClass(),\n 'float' => 14.40,\n 'propertyA' => 'foo',\n 'propertyB' => 'bar'\n ]\n ]\n ];\n }", "title": "" }, { "docid": "0c728612f5af804214a152a44305108a", "score": "0.5816689", "text": "protected function attributes() {\n // return get_object_vars($this);\n $attributes = array();\n foreach(static::$db_fields as $field) {\n if(property_exists($this, $field)) {\n $attributes[$field] = $this->$field;\n }\n }\n return $attributes;\n }", "title": "" }, { "docid": "7db2ce056dde344ffbf5456084353d1b", "score": "0.5808947", "text": "public function jsonSerialize()\n {\n $data = [];\n\n foreach (get_object_vars($this) as $key => $value) {\n $data[$key] = $this->possibleGetter($key);\n }\n\n return $data;\n }", "title": "" }, { "docid": "fafe359e24e14f8de0658dd8ecd0b958", "score": "0.5807884", "text": "public function toArray()\n {\n $r = new ReflectionClass($this);\n\n $data = array();\n foreach ($r->getProperties(ReflectionProperty::IS_PROTECTED) as $property) {\n $method = 'get' . ucwords($property->getName());\n $data[$property->getName()] = $this->$method();\n }\n\n return $data;\n }", "title": "" }, { "docid": "e976341e6fc1c7061d2cd07e2ad5bcd6", "score": "0.58074707", "text": "public function getData(){\n $values = array();\n $attributes = $this->defineAttributes();\n foreach ($attributes as $k => $v){\n $values[$k] = $this->$k;\n }\n return $values;\n }", "title": "" }, { "docid": "e054309d4360821b408ad1d1f9e0ad8a", "score": "0.5798356", "text": "protected function attributes() {\r\n\t $attributes = array();\r\n\t foreach($this->db_fields as $field) {\r\n\t if(property_exists($this, $field)) {\r\n\t $attributes[$field] = $this->$field;\r\n\t }\r\n\t }\r\n\t return $attributes;\r\n\t}", "title": "" }, { "docid": "58633d454d594ee500f1b8fb947120d1", "score": "0.5797117", "text": "public function getAttributes()\n {\n return array();\n }", "title": "" }, { "docid": "c1c23595fd8b7dc56c8d66c5f8bbebd2", "score": "0.57916933", "text": "public function testAttributeGetMultiple()\r\n {\r\n\r\n }", "title": "" }, { "docid": "496c51efc22e8fb3db39b5632bad489e", "score": "0.57893085", "text": "public function get_attributes()\n {\n // Initialize the attributes array with the return value of\n // the parent method\n $attributes = parent::get_attributes();\n\n // Add the action attribute\n $attributes['action'] = (string) $this->get_action();\n\n // Add the method attribute\n $attributes['method'] = (string) $this->get_method();\n\n // Return the completed set of attributes\n return $attributes;\n }", "title": "" }, { "docid": "a929972e285fd7a732115bb5e55a4baa", "score": "0.57823", "text": "public function __get($method)\n\t{\n\t\treturn array($this, $method);\t\t\n\t}", "title": "" }, { "docid": "07ec7fc92937b9a5b7e89bdd20a1ec06", "score": "0.5781436", "text": "public function attributes() :array\n {\n return [];\n }", "title": "" }, { "docid": "71aabecb7d5836a179686e8ac0e7f4f4", "score": "0.5780449", "text": "protected function attributes(){\r\n\t\t \r\n\t\t $attributes = array();\r\n\t\t foreach(static::$db_fields as $field){\r\n\t\t\t \r\n\t\t\t if(property_exists($this,$field)){\r\n\t\t\t\t $attributes[$field] = $this->$field ;// here $this->field we use dynamique field to access.\r\n\t\t\t\t // key or name = value\r\n\t\t\t }\r\n\t\t\t \r\n\t\t }\r\n\t\t return $attributes ;// the new array of attributes who corresspond to db attributes.\r\n\t\t }", "title": "" }, { "docid": "4249f3eb7738b9ea21595628fef3791d", "score": "0.57793933", "text": "public function getEAttributes();", "title": "" }, { "docid": "df703b8fd12dc1fd2eaf3f108ad24f7a", "score": "0.5770082", "text": "public static function getDynamicGetters()\n {\n return static::$dynamicGetters[get_called_class()] ?? [];\n }", "title": "" }, { "docid": "fe6429d654ef3be36de95c3fd315008b", "score": "0.5764227", "text": "public function concreteAttributes() : array;", "title": "" }, { "docid": "fa3b8c6a9fd1c74dc2fe6a6d15cfec07", "score": "0.57483435", "text": "public function attrs() : array;", "title": "" }, { "docid": "ed7fba32dce003787c7e6e75c3ab22b0", "score": "0.5724143", "text": "public static function getters()\n {\n return [\n 'start' => 'getStart',\n 'end' => 'getEnd'\n ];\n }", "title": "" }, { "docid": "3959092e8fe7b8da44f055249319bf43", "score": "0.57038796", "text": "protected function attributes()\n\t{\n\n\t\t$attributes = array();\n\n\t\t//for each of the field names in the users table\n\t\tforeach( static::$database_fields as $field ) {\n\n\t\t\tif( property_exists( $this, $field ) ) {\n\n\t\t\t\t$attributes[ $field ] = $this->$field;\n\n\t\t\t}\n\t\t}\n\n\t\treturn $attributes;\n\n\t}", "title": "" }, { "docid": "fea24ce9609a5c09dea1e6ba90a7fe5c", "score": "0.5701011", "text": "public function getMethodMap();", "title": "" }, { "docid": "89a9c2c7c8722ec4c6b27cc37a0fd3fa", "score": "0.57002026", "text": "protected function attributes() {\n\t global $mydb;\n\t $attributes = array();\n\t foreach($this->dbfields() as $field) {\n\t if(property_exists($this, $field)) {\n\t\t\t$attributes[$field] = $this->$field;\n\t\t}\n\t }\n\t return $attributes;\n\t}", "title": "" }, { "docid": "0a3a11bf168af2d01f627e967adde7ba", "score": "0.5688089", "text": "public function attributes()\n {\n return [];\n }", "title": "" }, { "docid": "0a3a11bf168af2d01f627e967adde7ba", "score": "0.5688089", "text": "public function attributes()\n {\n return [];\n }", "title": "" }, { "docid": "0a3a11bf168af2d01f627e967adde7ba", "score": "0.5688089", "text": "public function attributes()\n {\n return [];\n }", "title": "" }, { "docid": "79d4a100dc654807244013e6a887c250", "score": "0.5688041", "text": "protected function attributeList() {\n $attributes = [];\n $reflection = new \\ReflectionClass($this);\n $properties = $reflection->getProperties(\\ReflectionProperty::IS_PUBLIC);\n\n foreach ($properties as $property) {\n if (in_array($property->getName(), $this->getNonAttributeProperties())) {\n continue;\n }\n\n $attributes[] = preg_replace('/\\*/', '', $property->getName());\n }\n\n return $attributes;\n }", "title": "" }, { "docid": "8056c439cf0d18ee82c35598e459736f", "score": "0.5683283", "text": "protected function attributes() {\n\t $attributes = array();\n\t foreach(self::$db_fields as $field) {\n\t if(property_exists($this, $field)) {\n\t $attributes[$field] = $this->$field;\n\t }\n\t }\n\t return $attributes;\n\t}", "title": "" }, { "docid": "33afc607c264ae7c0b8bbbe2f12ca572", "score": "0.56832254", "text": "public static function attributeMap()\n{\nreturn parent::attributeMap() + self::$attributeMap;\n}", "title": "" }, { "docid": "0bfe89ef428041f0eee97ad5ab2a7431", "score": "0.56688094", "text": "public function getAttributes($names=true)\n\t{\n\t\t$attributes=$this->_attributes;\n\t\tforeach($this->attributeNames() as $name)\n\t\t{\n\t\t\tif(property_exists($this,$name))\n\t\t\t\t$attributes[$name]=$this->$name;\n\t\t\telse if($names===true && !isset($attributes[$name]))\n\t\t\t\t$attributes[$name]=null;\n\t\t}\n\t\tif(is_array($names))\n\t\t{\n\t\t\t$attrs=array();\n\t\t\tforeach($names as $name)\n\t\t\t{\n\t\t\t\tif(property_exists($this,$name))\n\t\t\t\t\t$attrs[$name]=$this->$name;\n\t\t\t\telse\n\t\t\t\t\t$attrs[$name]=isset($attributes[$name])?$attributes[$name]:null;\n\t\t\t}\n\t\t\treturn $attrs;\n\t\t}\n\t\telse\n\t\t\treturn $attributes;\n\t}", "title": "" }, { "docid": "812c45ad048711e983a903f13da721c7", "score": "0.5667284", "text": "public function getAttributes()\n {\n return [\n 'meta_title' => 'string',\n 'app_name' => 'string',\n 'logo_auth' => 'file',\n 'logo_header' => 'file',\n 'favicon' => 'file',\n 'name_and_logo' => 'bool',\n ];\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "361652edbcde58625e2cb9750ead1217", "score": "0.0", "text": "public function index()\n {\n $penduduks = Penduduk::with('kartu_keluarga', 'kewarganegaraan')\n ->paginate(25);\n\n return view('penduduk.index', compact('penduduks'));\n }", "title": "" } ]
[ { "docid": "1d384f4e78f98647387c1b7298b0696a", "score": "0.74735427", "text": "public function index ()\n {\n $this->list();\n }", "title": "" }, { "docid": "4bed8c9cfd05d9666f1acd8791970421", "score": "0.74595845", "text": "public function index()\n {\n /** @var \\Colibri\\Database\\ModelCollection $items */\n $items = new $this->listClass();\n $this->applyListFilters($items);\n $items->load();\n\n $this->template->vars[$this->listTplVar] = $items;\n if ($this->pagedList) {\n $this->template->vars['pagination'] = [\n 'page' => (int)(isset($_GET['page']) ? $_GET['page'] : 0),\n 'recordsPerPage' => $items->recordsPerPage,\n 'recordsCount' => $items->recordsCount,\n 'pagesCount' => $items->pagesCount,\n 'base_url' => '/' . $this->division . '/' . $this->module,\n ];\n }\n }", "title": "" }, { "docid": "fd728130e464c7ca0e936873b067ad9b", "score": "0.74557644", "text": "public function index()\n {\n $resource = $this->resource->with('fields')->where('slug', $this->slug)->first();\n\n $select = ['id'];\n $eagerLoad = [];\n foreach($resource->fields as $field)\n {\n if($field->list) $select[] = $field->slug;\n\n if($field->type == 'relational')\n {\n $eagerLoad[] = $field->data('method');\n }\n }\n\n $model = $this->getModel($resource);\n $entities = $model::with($eagerLoad)->select($select)->get();\n\n $hasObjects = false;\n if(method_exists($model, 'objects')) $hasObjects = true;\n\n return view('laramanager::resource.index', compact('resource', 'entities', 'hasObjects'));\n }", "title": "" }, { "docid": "6126929dc3b0a4f22ee22cc3ad8d6a7b", "score": "0.742424", "text": "public function index() \n\t{ \n\t\t$this->listing();\t\n\t}", "title": "" }, { "docid": "53e8cdd7001e03b480caa697d00c6da2", "score": "0.73947984", "text": "public function indexAction()\r\n {\r\n $limit = $this->Request()->getParam('limit', 1000);\r\n $offset = $this->Request()->getParam('start', 0);\r\n $sort = $this->Request()->getParam('sort', []);\r\n $filter = $this->Request()->getParam('filter', []);\r\n\r\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\r\n $this->View()->assign(['success' => true, 'data' => $result]);\r\n }", "title": "" }, { "docid": "c66f120116ada3a42cc9932c701e6a9d", "score": "0.7343025", "text": "public function listAction()\n {\n $bookRepository = new BookRepository();\n $books = $bookRepository->getAll();\n\n $argsArray = [\n 'books' => $books\n ];\n $templateName = 'list';\n return $this->app['twig']->render($templateName . '.html.twig', $argsArray);\n }", "title": "" }, { "docid": "f89eac18f2fecb9e12a4e0696258300d", "score": "0.7321151", "text": "public function listing()\n {\n return $this->render(\"listing.html.twig\");\n }", "title": "" }, { "docid": "27e6e4cef6757eab4dd656d684b1f18f", "score": "0.729922", "text": "public function index()\n {\n if (Input::get('ajax')) {\n return $this->_resourcePersistence->getAll($this->_getListOrder(), $this->_getQueryConditions());\n }\n\n return view('admin.' . $this->resource . '.index')\n ->with('resource', $this->resource);\n }", "title": "" }, { "docid": "223999e9a02d01dc0cad36705dec31b1", "score": "0.72478926", "text": "public function actionList() {\n $this->_getList();\n }", "title": "" }, { "docid": "eb8bf6d357654d40e9f3c6be964ff840", "score": "0.72384673", "text": "public function index()\n {\n $data = $this->model->all();\n return view('admin::resource.index', [\n 'items' => $data,\n 'model_name' => $this->modelName,\n ]);\n }", "title": "" }, { "docid": "1a9358d5e70acc9743aa95c2f18698aa", "score": "0.7216698", "text": "public function listAction()\n {\n $this->View()->assign(\n $this->getList(\n $this->Request()->getParam('start', 0),\n $this->Request()->getParam('limit', 20),\n $this->Request()->getParam('sort', []),\n $this->Request()->getParam('filter', []),\n $this->Request()->getParams()\n )\n );\n }", "title": "" }, { "docid": "09297f1ea9fe181abebbfadcb8142222", "score": "0.7186935", "text": "public function index(){\n $this->listItems();\n }", "title": "" }, { "docid": "ecc2dbc48848a139f5406206edda7fd6", "score": "0.70593506", "text": "function seeAll() {\n $results = array();\n $data = Resource::getList();\n $results['resources'] = $data['results'];\n $results['totalRows'] = $data['totalRows'];\n $results['pageTitle'] = \"Resource Archive | Couch To Code\";\n require( $TEMPLATE_PATH . \"/archive.php\" );\n}", "title": "" }, { "docid": "1e170838915eaf18af92a3ce754576f4", "score": "0.70549136", "text": "public function index()\n {\n $this->setResources();\n\n $modelResource = new $this->Model;\n\n $filter = Input::get('filter');\n\n $perPage = Input::get('per_page');\n\n $sort = Input::get('sort');\n\n if ($perPage) $modelResource->setPerPage($perPage);\n\n $filterBy = $modelResource->getFilterBy();\n\n $sortBy = $modelResource->getSortBy() ?: $filterBy;\n\n $sort = $sort ? explode('|', $sort) : [$sortBy, 'asc'];\n\n if (!$filter) {\n return new $this->ResourceCollection(\n $modelResource::orderBy($sort[0], $sort[1])->paginate()\n );\n }\n\n return new $this->ResourceCollection(\n $modelResource::where(\"$filterBy\", 'like', \"%$filter%\")\n ->orderBy($sort[0], $sort[1])\n ->paginate()\n );\n }", "title": "" }, { "docid": "1bc9d0eeecbb5965922934931cecd66c", "score": "0.7042268", "text": "public function index()\n { \n //Get entries\n $entries = Entry::paginate(10);\n \n //Return collection of entries as a resource\n return EntryResource::collection($entries);\n }", "title": "" }, { "docid": "d64ddf4f7bf215d8ac46dc7bbfb1a5eb", "score": "0.70275784", "text": "public function listAction()\n {\n $this->_useAdditionalContent = true;\n \t\n \t$dataType = $this->_request->getParam('dataType');\n if($dataType == 'data'){\n \t// Abstract route\n \tthrow new Lib_Exception(\"dataType 'data' not allowed for listAction\");\n }\n $page = $this->_getParam('page', 1);\n $result = Data_Utils::getList($this->_user, $this->_acl, $dataType, $page);\n $items = $this->_paginateData($result['select'], $page, $result['itemsPerPage']);\n\n if(count($items)){\n \t$item = $items->getIterator()->current();\n } else {\n \t$table = ucfirst($dataType);\n \t$table = new $table();\n \t$item = $table->fetchNew();\n }\n Zend_Registry::set('Category', $item->getCategory());\n Zend_Registry::set('SubCategory', $item->getSubCategory());\n\n $this->_helper->layout->setLayout($item->getLayout(Data::ACTION_LIST));\n\n $this->view->items = $items;\n $this->view->dataType = $dataType;\n $this->view->separateFirstContentCardHeader = true;\n }", "title": "" }, { "docid": "03aab1a3d0f29df3c9c01f676da4d986", "score": "0.69908047", "text": "public function index()\n\t{\n\t\t$this->listing('recent');\n\t}", "title": "" }, { "docid": "42bf79f7c36bcd7921da4ede6d5056e2", "score": "0.69541866", "text": "public function lists()\n\t{\n\t\t$pics = Picture::all();\n\t\treturn view('default.rc.resources.lists')->with('pics', $pics);\n\t}", "title": "" }, { "docid": "673459c7290880615c394e798a3f1a65", "score": "0.69069874", "text": "public function index()\n {\n return ReadingListResource::collection(ReadingList::all());\n }", "title": "" }, { "docid": "11b3547fc126f6093eb0a2e7e0aef2eb", "score": "0.68977946", "text": "public function listAction()\n {\n $pages = \\Page\\Model\\Page::find();\n $filter = new \\Api\\Filter\\PagesList();\n $payload = new \\Api\\Model\\Payload($filter->filter($pages));\n\n return $this->render($payload);\n }", "title": "" }, { "docid": "76af57d44f9f03d2c164c16d1a203b35", "score": "0.68751", "text": "public function index()\n {\n $resources = Resource::all();\n return view('resources.index')->with('resources', $resources);\n }", "title": "" }, { "docid": "d5424d838a7b9b5f2347c4e6d78a4dae", "score": "0.6867298", "text": "public function indexAction()\n\t{\n\t\t$page = $this->getRequest()->getParam('page');\n\n\t\t$resources = Application_Model_Document_Resource::all();\n\t\t// Store the resources in the view so it can render them with partials\n\t\t$this->view->resources = $resources;\n\t\tforeach($resources as $resource) {\n\t\t\t$array[] = $resource;\n\t\t}\n\t\t$paginator = Zend_Paginator::factory($array);\n\t\t$paginator->setCurrentPageNumber(intval($page));\n\t\t$paginator->setItemCountPerPage(8);\n\t\t$this->view->paginator = $paginator;\n\t}", "title": "" }, { "docid": "1a97cf3e4d924e503cce423b0ca0da55", "score": "0.6864841", "text": "public function listAction()\n\t{\t\n\t\tZend_Paginator::setDefaultScrollingStyle('Sliding');\n\n\t\tZend_View_Helper_PaginationControl::setDefaultViewPartial('list.phtml');\n\n\t\t$this->_currentPage = $this->_getParam('page',1);\n\t\t$this->_currentPage = $this->_currentPage < 1 ? 1 : $this->_currentPage;\n\n\t\t/** TODO get total of records for $totalOfItems \n\t\t * @var unknown_type\n\t\t */\n\t\t$totalOfItems = $this->_itemsPerPage;\n\n\t\t$this->_lastPage = (int)(($totalOfItems/$this->_itemsPerPage));\t\t\t\t\n\t\t\n\t\t$paginator = $this->_getPagedData();\n\t\t$records = $this->_getProcessedRecords($paginator->getCurrentItems());\n\t\t\n\t\t$this->_model->setRelationships($records);\t\t\n\n\t\t$html = new Fgsl_Html();\t\t\n\t\t$this->_table = $html->createTable($records);\t\t\n\n\t\t$this->configureViewAssign();\n\t\t$this->view->render('list.phtml');\n\t}", "title": "" }, { "docid": "ae4b114ffb14ab57ea0164b2b2a1e2a9", "score": "0.6854672", "text": "public function listing()\n {\n $mode = Input::get('mode') ?: \"search\";\n\n switch ($mode) {\n case 'roots':\n $roots = $this->listRootNodes();\n return response()->json(['data' => $roots]);\n case 'search':\n $page = Input::get('page')?: 1;\n $pageInfoArray = $this->listPage($page);\n return response()->json($pageInfoArray);\n default:\n return response()->json(['message' => 'Invalid search mode', 'errors' => array()])\n ->setStatusCode(400, '');\n }\n }", "title": "" }, { "docid": "b446e47526e7914ef4bdc3737ae4f077", "score": "0.68438184", "text": "public function list(){\n\t\t$this->load->view('listing');\n\t}", "title": "" }, { "docid": "761494348df8b3750a8a88c51e0b7195", "score": "0.68372846", "text": "public function actionList()\n {\n if(!in_array('list',$this->crudActions))\n throw new CHttpException('404 Not Found');\n\n $this->render(Yii::app()->request->isAjaxRequest ? $this->listPartial : $this->listView);\n }", "title": "" }, { "docid": "87f5741441fb47fe705676a54aca43a4", "score": "0.68317467", "text": "public function actionList()\n {\n $loansearch= new LoanSearch();\n $dataProvider = $loansearch->search(Yii::$app->request->get());\n \n return $this->render('list', [\n 'dataProvider' => $dataProvider,\n 'searchmodel' => $loansearch\n ]);\n }", "title": "" }, { "docid": "87bb478103dde18bab9318d72db00152", "score": "0.6822629", "text": "public function index()\n\t{\n\t\t$items = Item::all();\n\t\treturn \\View::make('Item/list_item',compact('items'));\n\t}", "title": "" }, { "docid": "d1b243aa3b9ada5174dcd3dee5386a71", "score": "0.67757565", "text": "public function actionList() {\n\t\t$searchModel = DynamicSearchRecord::forModel ( $this->modelClassname );\n\t\t$dataProvider = $searchModel->search ( \\Yii::$app->request->queryParams );\n\t\t\n\t\treturn $this->owner->render ( 'list.json', [ \n\t\t\t\t'searchModel' => $searchModel,\n\t\t\t\t'dataProvider' => $dataProvider \n\t\t] );\n\t}", "title": "" }, { "docid": "d6f559efcd790aae0721cec604c5738a", "score": "0.67756224", "text": "public function listAction()\n {\n $frontEndDiscountsService = $this->container->get('dft_foapi.front_end_discounts');\n\n return $this->render('dftFoapiBundle:Common:data.json.twig', array(\n \"data\" => $frontEndDiscountsService->fetchAll($this->getAuthenticatedUserIdAndSubAccountIds())\n ));\n }", "title": "" }, { "docid": "48bfc0bd9a7b31cd041cca86fc310bff", "score": "0.6764525", "text": "public function listing() {\n\n $this->getMapper()->tableExists();\n\n // process any paging params\n $offset = 0;\n $limit = 10;\n $order = $this->getMapper()->getKey();\n $asc = TRUE;\n\n // process any offset requirements\n if ($this->request->getQueryParam('offset') !== NULL && is_numeric($this->request->getQueryParam('offset'))) {\n $offset = $this->request->getQueryParam('offset');\n }\n\n // process any limit requirements\n if ($this->request->getQueryParam('limit') !== NULL && is_numeric($this->request->getQueryParam('limit'))) {\n $limit = $this->request->getQueryParam('limit');\n }\n\n // process any order parameters\n if ($this->request->getQueryParam('order') !== NULL) {\n if (property_exists($this->mapper->getModel(), $this->request->getQueryParam('order'))) {\n $order = $this->request->getQueryParam('order');\n }\n }\n\n // process any asccending/decending requirements\r\n if ($this->request->getQueryParam('desc') !== NULL) {\r\n $asc = FALSE;\r\n }\n\n // ensure we arent passing in keys in query params ?keys=1,2,3,4 etc\n if ($this->request->getQueryParam('keys') !== NULL) {\n // List by id\r\n $result = $this->getMapper()->load_multiple(explode(',', $this->request->getQueryParam('keys')), $offset, $limit, $order, $asc);\n $data = $result['list'];\n $total = $result['total'];\n }\n else {\n // List all\n $result = $this->getMapper()->listing(NULL, $offset, $limit, $order, $asc);\n $data = $result['list'];\r\n $total = $result['total'];\n }\n\n // set the data\n $this->response->setMeta(array(\n 'order' => $order,\n 'offset' => $offset,\n 'limit' => $limit,\n 'direction' => ($asc == TRUE) ? 'ASC' : 'DESC',\n 'count' => count($data),\n 'total' => $total\n ));\n $this->response->setData($data);\n\n // Set response\n if (!empty($data)) {\n $this->response->setHeader('__OK', Http::Response(Http::OK));\n return TRUE;\n }\n $this->response->setHeader('__NOT_FOUND', Http::Response(Http::NOT_FOUND));\n return TRUE;\n }", "title": "" }, { "docid": "4af89c443382295cf45d3e2622ace5f2", "score": "0.67597896", "text": "public function show_list(){\n\t\t$fields\t\t\t = $this->get_fields();\n\t\t$display_fields\t = $fields;\n\t\t$db_fields\t\t = array_keys($fields);\n\t\t$this->set_fields($db_fields);\n\t\t$this->set_filters($this->get_filters_filter());\n\t\t$count\t\t\t = $this->get_count($this->get_filters());\n\t\t$this->set_row_count($count);\n\t\t$rows\t\t\t = $this->get_all($this->get_filters(), true);\n\t\t$this->un_set_fields();\n\t\tif($count == 1){\n\t\t\t$id\t\t\t\t = $rows[0][$this->get_primary_id_col()];\n\t\t\t$params\t\t\t = array();\n\t\t\t$params['id']\t = $id;\n\t\t\tif($this->needs_sub_table()){\n\t\t\t\t$params['sub_id'] = $rows[0][$this->get_sub_id_col()];\n\t\t\t}\n\t\t\t$params['action'] = 'edit';\n\t\t\t$this->redirect('', $params);\n\t\t}\n\t\t$col_count\t = count($fields);\n\t\t$filter_url\t = $this->get_ctrl_url();\n\t\t$this\n\t\t\t\t->assign('rows', $rows)\n\t\t\t\t->assign('fields', $display_fields)\n\t\t\t\t->assign('filter_url', $filter_url)\n\t\t\t\t->assign('col_count', $col_count)\n\t\t\t\t->view('list');\n\t}", "title": "" }, { "docid": "d711cb52a8e6005890b369293af69e7b", "score": "0.6758816", "text": "public function index()\n {\n $Recipes = Recipe::with('ingredients')->orderBy('name', 'asc')->paginate(15);\n return RecipeResource::collection($Recipes);\n }", "title": "" }, { "docid": "ff7b9b0b2610bec017a23bdf07c0fadc", "score": "0.6749715", "text": "public function index()\n {\n\n // SECURITY:\n // if view_table_permission is false, abort\n if (isset($this->crud['view_table_permission']) && !$this->crud['view_table_permission']) {\n abort(403, 'Not allowed.');\n }\n\n // get all results for that entity\n $model = $this->crud['model'];\n\n if (isset($this->crud['is_translate']) && $this->crud['is_translate'] == true) {\n $this->data['entries'] = $model::orderby('id', 'ASC')->get();\n } else {\n $this->data['entries'] = $model::all();\n }\n\n // add the fake fields for each entry\n //dd($this->data['entries']);\n //foreach ($this->data['entries'] as $key => $entry) {\n // $entry->addFakes($this->getFakeColumnsAsArray());\n //}\n\n $this->prepareColumns();\n $this->data['crud'] = $this->crud;\n\n // load the view from /resources/views/vendor/dick/crud/ if it exists, otherwise load the one in the package\n\n return $this->firstViewThatExists('vendor.infinety.crud.list', 'crud::list', $this->data);\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6742193", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "d68899c3dabc0c21b0b2be7724f8030d", "score": "0.67380875", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Part Subtitute - '.APP_NAME;\n $this->global['pageMenu'] = 'List Part Subtitute';\n $this->global['contentHeader'] = 'List Part Subtitute';\n $this->global['contentTitle'] = 'List Part Subtitute';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n $this->global ['repo'] = $this->repo;\n \n $data['readonly'] = $this->readonly;\n $data['classname'] = $this->cname;\n $data['url_list'] = base_url($this->cname.'/list/json');\n $this->loadViews($this->view_dir.'index', $this->global, $data);\n }", "title": "" }, { "docid": "06f27ec9bf146b469adbf2e6705aabe8", "score": "0.6732888", "text": "public function index()\n {\n $pagination = new Pagination();\n $options = array();\n $pagination->setTotal(call_user_func_array([$this->_modelName, 'count'], array($options)));\n $options['limit'] = $pagination->rowsPerPage;\n $options['page'] = $pagination->offset;\n $records = call_user_func_array([$this->_modelName, 'all'], array($options));\n $this->set(compact('records', 'pagination'));\n }", "title": "" }, { "docid": "c71795f30a5bb75ebbd3e292fb5e8a4b", "score": "0.67322874", "text": "public function index()\n {\n return ProspectListResource::collection(Prospect::paginate());\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "652313a0e1da74ef567bfde3163208da", "score": "0.6711615", "text": "public function index()\n {\n return Resources::collection(Model::orderBy('id', 'desc')->get());\n }", "title": "" }, { "docid": "09d6b29a7dfc37d687e4be6b37813ff1", "score": "0.66846824", "text": "private function listing()\n {\n //List partners\n $PartnersLib = new PartnersLib($this->DB);\n $this->responseSetContent($PartnersLib->listing());\n }", "title": "" }, { "docid": "66b2855c608ff83c2186cf3c1df31163", "score": "0.6681495", "text": "public function Index()\n\t{\n\t\t$data = parent::_ListData($this->_getPageTitle($this->method), 1000, \"parent_id = \".$this->db->escape_str($this->parent_id), \"\", $this->parent_id.\"/\", \"sort\", \"asc\");\n\n\t\t$data['tpl_page'] = $this->_getController().'/list';\n\t\tparent::_OnOutput($data);\n\t}", "title": "" }, { "docid": "69c11dee847c7c0490ac6622948612f7", "score": "0.6678495", "text": "public function index()\n {\n return view('resource-collections.index', ['resourceCollections' => ResourceCollection::orderBy('title')->get()]);\n }", "title": "" }, { "docid": "79017f87f771247f39999d976e80538f", "score": "0.6677284", "text": "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getViews();\t\n\t\t$page = (int)($this->_request->getParam('page'));\n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t$this->view->page = $page;\n\t }", "title": "" }, { "docid": "d6bd209eea7a909ec1bbf56afae413a6", "score": "0.66759527", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppBundle:Search')->findAll();\n\n return $this->render('AppBundle:Search:list.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "8f532ae29d0271e5352287d73bdf275b", "score": "0.6675639", "text": "public function index()\n\t\t{\n\t\t\t// Consolidate data\n\t\t\t$data = array('hello' => 'world');\n\n\t\t\t// Handle request\n\t\t\tswitch (\\Request::format())\n\t\t\t{\n\t\t\t\tcase 'json':\n\t\t\t\t\treturn Response::json($data); // API\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t$this->layout->content = \\View::make('scores::admin.listing', $data); // HTML\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5b2bfe4741f53980dfae4fe18136b3f9", "score": "0.66670376", "text": "public function consolesListingPage() {\n Auth::redirectToLoginIfNotLoggedIn();\n\n $data['title'] = 'Consoles';\n $data['message'] = 'Here is the entire listing of available consoles.';\n $data['no-consoles'] = \"Sorry, there aren't any consoles available yet.\";\n $data['consoles'] = \\services\\Console::createConsoleObjectArray();\n\n View::rendertemplate('header', $data);\n View::render('consoles/consoles', $data);\n View::rendertemplate('footer', $data);\n }", "title": "" }, { "docid": "26b71fb578321a0935c2ecdff45d3b80", "score": "0.6665553", "text": "public function listAction()\n {\n return $this->render(\n 'AppBundle:employee:list.html.twig',\n [\n 'employees' => $this->get('employee')->loadEmployees(),\n ]\n );\n }", "title": "" }, { "docid": "02a808be513bd750788350c882906a0c", "score": "0.6660171", "text": "public function index() {\n // Get pagination parameters\n $fields = \\Core\\App::getInstance()->request->get(\"fields\");\n $fields = explode(\",\", $fields);\n\n $limit = \\Core\\App::getInstance()->request->get(\"limit\");\n $offset = \\Core\\App::getInstance()->request->get(\"offset\");\n $sort = \\Core\\App::getInstance()->request->get(\"sort\");\n $order = \\Core\\App::getInstance()->request->get(\"order\");\n $search = \\Core\\App::getInstance()->request->get(\"search\");\n $where = \\Core\\App::getInstance()->request->get(\"where\");\n $filter = json_decode(\\Core\\App::getInstance()->request->get(\"filter\"), true);\n\n // Get the data\n $data = \\Helpers\\Database::getObjects($this->_lc_classname, $this->_lc_classname, $fields, $search, $where, $offset, $limit, $sort, $order, $filter);\n $count = \\Helpers\\Database::countObjects($this->_lc_classname, $this->_lc_classname, $fields, $search, $where, $filter);\n\n // Send response\n \\Helpers\\Response::success([\n 'total' => $count,\n 'rows' => $data\n ]);\n }", "title": "" }, { "docid": "a3406c7ff6face6ebd5912a2a062298a", "score": "0.66530275", "text": "public function listAction()\n\t{\n\t\t$list = $this->db->select();// recuperation les infomations relatif a la function Select du fichier Database.php.\n\t\techo $this->twig->render('listPost.html',\n\t\t\t[\n\t\t\t\t\"list\" => $list\n\t\t\t]\n\t\t);\n\n\t}", "title": "" }, { "docid": "79f5369358653dfc5bbd4ed88772cc37", "score": "0.6647595", "text": "public function index()\n {\n //method show all Tags\n return TagResource::collection(Tag::paginate());\n }", "title": "" }, { "docid": "3e2f78b81b111995e32d53c1e5113d60", "score": "0.6631635", "text": "public function index()\n {\n return view('resource.row',\n [\n 'resources' => Resources::with('category', 'reservation')\n ->get()\n ]);\n }", "title": "" }, { "docid": "4eecf023369060252d00f8bf4fee5c2b", "score": "0.66296786", "text": "public function index()\n {\n return $this->show(\"All\");\n }", "title": "" }, { "docid": "28aaefde81bffe6c35ee93653410bbe4", "score": "0.6615643", "text": "public function listAction(){\n $this->view->role = Auth_Info::getUser()->user_type;\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';Start action');\n if($this->getRequest()->isGet()&&!isset($this->_input->page)){\n $this->session->removeData(self::SESSION_KEY_SEARCH);\n }\n $this->session->removeData(self::SESSION_KEY_PAGE);\n $this->session->removeData(self::SESSION_KEY_RETURN_DETAIL);\n $page = null;\n if ($this->getRequest()->isPost()) {\n $where = $this->_input->getEscaped();\n\n } else {\n $where = $this->session->getData(self::SESSION_KEY_SEARCH);\n if (is_null($where)) {\n $where = array();\n }\n $page = isset($this->_input->page) ? $this->_input->page : $this->session->getData(self::SESSION_KEY_PAGE);\n }\n $this->getRequest()->setParams($where);\n $this->session->setModuleScope(self::SESSION_KEY_SEARCH, $where);\n $this->session->setModuleScope(self::SESSION_KEY_PAGE, $page);\n\n $select = MInformations::getInstance()->getListSelect($where);\n $this->view->max_display_char = Zynas_Registry::getConfig()->constants->max_display_char;\n $this->view->paginator = Zynas_Paginator::factoryWithOptions($select, $page, $this->view);\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';End action');\n }", "title": "" }, { "docid": "0ce098c670548596cee63a4f7a02e6d6", "score": "0.6610194", "text": "public function list() { \n try {\n $list = $this->listModel->getList($_POST['pageNo']);\n if($list) {\n $this->response($list,200,'Success');\n } else {\n $this->response('',204,'No content');\n } \n } catch(Exception $ex) {\n $this->response('',500,'Error');\n } \n }", "title": "" }, { "docid": "01f5c196228688f47955dc605b965462", "score": "0.66081655", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Engineers - '.APP_NAME;\n $this->global['pageMenu'] = 'List Engineers';\n $this->global['contentHeader'] = 'List Engineers';\n $this->global['contentTitle'] = 'List Engineers';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n $this->global ['repo'] = $this->repo;\n \n $data['classname'] = $this->cname;\n $data['readonly'] = $this->readonly;\n $data['url_list'] = base_url($this->cname.'/list/json');\n $this->loadViews($this->view_dir.'index', $this->global, $data);\n }", "title": "" }, { "docid": "7f1c8a5ab63c01e02fb3ba65a1e27120", "score": "0.66048485", "text": "public function index()\n {\n return StudentResource::collection($this->studentRepository->list());\n }", "title": "" }, { "docid": "09ff54f3ae80db26f6fde9cf6871ccdc", "score": "0.6594758", "text": "public function index()\n {\n // Get all Intents\n $intents = Intent::paginate(50);\n\n return IntentResource::collection($intents);\n }", "title": "" }, { "docid": "38d10de11fa88686187f73576fe11a7c", "score": "0.6575308", "text": "public function index()\n {\n View::share('resourceUrl', $this->resourceUrl);\n \n $photos = PhotoModel::all()->toArray();\n $babys = \\BabyModel::all()->lists('name', 'id');\n \n $this->layout->with('title', '列表');\n $this->layout->content = View::make( $this->resourceUrl . 'index' )->with(compact('photos', 'babys'));\n }", "title": "" }, { "docid": "218a3bcc6c3ba48283149f8614d45562", "score": "0.65740526", "text": "public function index() {\n\t\t$this->get ();\n\t}", "title": "" }, { "docid": "f9a0a7fc5de7f0a8c0c42ac168169d27", "score": "0.6572973", "text": "public function index()\n {\n $books = Book::all();\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "643e2e525a9956d4f3d154800f2706fb", "score": "0.6567327", "text": "public function index()\n {\n // Get all the resources list.\n\n $contacts = Contact::orderBy('id', 'asc')->paginate(10);\n \n // Check if there is no resource.\n if(is_null($contacts)) {\n return response()->json([\"message\"=>\"No Contact found.\", \"data\"=>[], \"errors\"=>[], \"success\"=>true], 204);\n }\n // Return the list of resources.\n return response()->json([\"message\"=>\"Contacts list.\", \"data\"=>$contacts, \"errors\"=>[], \"success\"=>true], 200);\n }", "title": "" }, { "docid": "c4b3a61da5b12f663884b5e9ad36c7d1", "score": "0.6566601", "text": "public function index()\n {\n $products = Product::paginate(12);\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "2e6cf3266883ceb02caa28803bff3287", "score": "0.65665895", "text": "public function indexAction()\n {\n return $this->forward()\n ->dispatch(\n $this->params()\n ->fromRoute( 'controller', get_called_class() ),\n array(\n 'action' => 'list',\n 'locale' => (string) $this->locale(),\n )\n );\n }", "title": "" }, { "docid": "98b6312310ec07ad4be1841adb403ce3", "score": "0.656651", "text": "public function actionList() {\n $data = Yii::app()->db->createCommand('SELECT * from products')->queryAll();\n // or $data = Products::model()->findAll();\n $dataProvider = new CArrayDataProvider($data, array(\n 'pagination' => array('pagesize' => 10),\n ));\n $this->render('list', array(\n 'dataProvider' => $dataProvider,\n ));\n }", "title": "" }, { "docid": "131cc08b0e6134cac1d6af3250da5d11", "score": "0.6564312", "text": "public function list()\n {\n //\n return view('admin.onepage.list');\n }", "title": "" }, { "docid": "9ce8b7d31b54ee923c432b4460d8fe38", "score": "0.65637076", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = $this->crud->getTitle() ?? mb_ucfirst($this->crud->entity_name_plural);\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "54d7b491cb48bf1dc5aa48e4b70243e8", "score": "0.6560677", "text": "public function index()\n {\n //Get Suppliers\n $suppliers = Supplier::paginate(100);\n\n //Return collection of suppliers as resource\n return SupplierResource::collection($suppliers);\n }", "title": "" }, { "docid": "eab040e429e9d0ed7c49740991e16b6a", "score": "0.65539455", "text": "public function actionList()\r\n {\r\n //All Sites\r\n $allSites = new Site('search');\r\n $allSites->unsetAttributes();\r\n if (isset($_GET['Site']))\r\n $allSites->attributes = $_GET['Site'];\r\n\r\n $this->render('list', array(\r\n 'allSites' => $allSites,\r\n 'gridViewSettings' => Site::gridViewSettings(),\r\n ));\r\n }", "title": "" }, { "docid": "b5dabee7628f504a4f1332387216fe1b", "score": "0.6541906", "text": "public function index()\n\t{\n\n\t\t$this->set(strtolower($this->modelNamePlural), $this->model->getAll());\n\n\t\t$this->render('index');\n\t}", "title": "" }, { "docid": "bce9b2084302b70f248236ecc9038792", "score": "0.65368795", "text": "public function index()\n {\n try {\n $keywords = $this->request->query('keywords');\n $where = $this->request->query('where');\n $category_id = $this->request->query('category_id');\n\n $listings = $this->service\n ->search($keywords, $where, $category_id)\n ->sortByDesc('created_at');\n\n if ($this->paginate !== null) {\n $listings = $listings->paginate($this->paginate);\n }\n\n return new ListingResourceCollection($listings);\n } catch (Exception $ex) {\n return parent::handleException($ex);\n }\n }", "title": "" }, { "docid": "4f95d8e48aed5748b1d47771a5c780ff", "score": "0.65317386", "text": "public function index()\n {\n // Get divisions\n $divisions = Division::latest()->paginate(5);\n\n // Return collection of divisions as a resource\n return DivisionResource::collection($divisions);\n }", "title": "" }, { "docid": "bdc3df82aa2775b984746ad43f1f270d", "score": "0.65289664", "text": "public function listAction() {\n //Render the list twig\n return $this->render('MesdReportDemoBundle:Report:list.html.twig');\n }", "title": "" }, { "docid": "b3239f030ba6e204500bc8512083d8dd", "score": "0.6527235", "text": "public function index()\n {\n return ProgramsResource::collection(Program::paginate(15));\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "a590bbd0ca49f8f16ccf69ff4c577785", "score": "0.651896", "text": "public function index()\n {\n $sortieDetails = SortieDetails::all();\n\n // Return collection of sortie_details as a resource\n return SortieDetailsResource::collection($sortieDetails);\n }", "title": "" }, { "docid": "d88f7c52ab4450961acca7bf2dca42d7", "score": "0.65143025", "text": "public function displayList()\n\t{\n\n\t\t$this->lAdmin->DisplayList();\n\t}", "title": "" }, { "docid": "339c0962f54b7e532fa1290f675bd8c4", "score": "0.6505196", "text": "public function action_listing()\n\t{\n\t\t// populate data array\n\t\t$data = Table::get_all_data();\n\n\t\tif ($submit = \\Input::post('submit'))\n\t\t{\n\t\t\t// update table data via post and redirect\n\t\t\tTable::update_data(\\Input::post(null));\n\n\t\t\t// choose redirect action\n\t\t\tif ($submit == 'Back')\n\t\t\t{\n\t\t\t\t$action = self::_breadcrumbs(\\Request::active()->action, 'prev');\n\t\t\t}\n\n\t\t\tif ($submit == 'Next')\n\t\t\t{\n\t\t\t\t$action = self::_breadcrumbs(\\Request::active()->action, 'next');\n\t\t\t}\n\n\t\t\t\\Response::redirect($action);\n\t\t}\n\n\t\t// set common template vars\n\t\tself::_set_template_vars($this->template);\n\t}", "title": "" }, { "docid": "9574404dd05ce3c2611ce508bd896204", "score": "0.6504046", "text": "public function indexAction() {\n $this->_forward('list');\n }", "title": "" }, { "docid": "e2c39459334902c7d856712c054793ec", "score": "0.6503653", "text": "public function index()\n {\n return $this->resourceCollection($this->model->with('teams')->get());\n }", "title": "" }, { "docid": "b7bae9c804826cdd9b0c94669ad36536", "score": "0.6501805", "text": "public function index()\n {\n $request = $this->makeRequest('index');\n $result = $this->service->getAll();\n\n return $this->maybeMakeResource('collection', $result);\n }", "title": "" }, { "docid": "56cb1332aceddef95a5e1453e37d8832", "score": "0.6501376", "text": "public function listAction()\n {\n try {\n $this->collectParameters();\n $this->findAirports();\n \n return $this->listActionResponse();\n } catch (\\Exception $e) { // Log exception and return an error response\n return $this->buildErrorResponse($e);\n }\n }", "title": "" }, { "docid": "97eab9d51e99c2a53b12711e284a2665", "score": "0.64992535", "text": "function display() {\n\t\t$this->getDefaultView()->setListingId(KRequest::getInt('listing_id'))->display();\n\t}", "title": "" }, { "docid": "cad2135c8b884f5e32721aec5b9bea32", "score": "0.6497837", "text": "public function index()\n {\n return CategoryResource::collection(Category::paginate());\n }", "title": "" }, { "docid": "b806629cb8d4f33084d6c8e3071e3f35", "score": "0.6496737", "text": "public function listAction()\n {\n $params = $this->params();\n $request = $this->getRequest();\n $bodyOnly = $request->isXmlHttpRequest();\n $page = $params->fromRoute( 'page',\n $request->getPost( 'page',\n $request->getQuery( 'page', 1 )\n )\n );\n\n $view = new ViewModel( array(\n 'paginator' => $this->getPaginator(),\n 'page' => ( (int) $page ) ?: 1,\n 'format' => $bodyOnly,\n ) );\n\n if ( $bodyOnly )\n {\n $view->setTerminal( true );\n }\n\n return $view;\n }", "title": "" }, { "docid": "47edbc785ea53823a4f3981e16262e11", "score": "0.64958936", "text": "public function index()\n {\n // Get all clubs\n $clubs = Club::all();\n\n // Return club as a collection of resources\n return ClubResource::collection($clubs);\n }", "title": "" }, { "docid": "50b30c3618e535c4e58fcbcaa800b3f9", "score": "0.6494503", "text": "public function index()\n {\n // Get items from CACHE if exists else get items from database and add them CACHE\n $items = Cache::remember(request()->fullUrl(), 60, function() {\n return Item::paginate(10);\n });\n\n return ResourcesItem::collection($items);\n }", "title": "" }, { "docid": "fb449ee6d59076f97a7b455cd49a361a", "score": "0.6492989", "text": "public function index()\n {\n $cate = Category::paginate();\n return CategoryResource::collection($cate);\n }", "title": "" }, { "docid": "a3105ba14523f4d28c0c61f1ae3a4126", "score": "0.64928555", "text": "public function index()\n {\n $doctor = Doctor::paginate(15);\n // Return collection of articles as a resource\n return DoctorResource::collection($doctor);\n }", "title": "" }, { "docid": "2f893b7055407e4ba0e047d0d86b3713", "score": "0.64906514", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_room->get_all();\n\t\t$this->template->set('title', 'Room List');\n\t\t$this->template->load('template', 'contents', 'room/room_list', $data);\n\t}", "title": "" }, { "docid": "b1b0091e0a8ca9b0c8e1d24b8ccf3dfc", "score": "0.64853764", "text": "public function index()\n {\n $books = Book::all();\n\n return $this->showAll($books);\n }", "title": "" }, { "docid": "b1b0091e0a8ca9b0c8e1d24b8ccf3dfc", "score": "0.64853764", "text": "public function index()\n {\n $books = Book::all();\n\n return $this->showAll($books);\n }", "title": "" }, { "docid": "bcb5195ddfb190dcd7d1cb464966fa39", "score": "0.6483486", "text": "protected function indexAction()\n {\n /* Select all rows request */\n $this->crudHelper->get($this->mapper);\n }", "title": "" }, { "docid": "bee92afbf5f5543a8639ff7712cc6521", "score": "0.6480457", "text": "public function list()\n\t{\n\t\t$chechPermission = get_controller_and_action();\n\t\tif($chechPermission == FALSE)\n\t\t{\n\t\t\tredirect(base_url('access'));\n\t\t}\n\t\t$data['title'] = 'Po List';\n\t\t$this->load->view('admin/includes/_header', $data);\n\t\t$this->load->view('po/po_list');\n\t\t$this->load->view('admin/includes/_footer');\t\n\t}", "title": "" }, { "docid": "0db1519c1fe132e8fd9ea16de60ae674", "score": "0.64800423", "text": "public function index()\n {\n return Resource::collection(User::paginate(10));\n }", "title": "" }, { "docid": "a8c3b4396d681ea7d1b2f1cd417a6d26", "score": "0.64796", "text": "abstract public function view_list();", "title": "" }, { "docid": "8867deb779456d5ddb47aa51a4b25985", "score": "0.6476355", "text": "public function index() {\n $this->all();\n }", "title": "" }, { "docid": "f71ee6e727b6e6ce48d431df89e195db", "score": "0.6474087", "text": "public function index()\r\n {\r\n $this->retrieve();\r\n }", "title": "" } ]
9a1784aca28afd976e814688918906de
A number of helper functions for dealing with the content of the $_POST array To be used with submit button returns from forms with more then one submit button. Takes a $_POST ["formnamefunction"] => formname[record][field] and trims out the record to return it.
[ { "docid": "9ae63b732b9d21d85cd09aba5140136b", "score": "0.0", "text": "function trimNumber($record){\n \n // this will be of the form \"[Thing I want][stuff]\"\n $record = strstr(strstr($record, '['), ']', true);\n // is now of the form \"[thing I want\"\n $record = substr($record, 1);\n // clean, return it.\n return $record;\n}", "title": "" } ]
[ { "docid": "d7a11633b30a4a54733b4996f220d553", "score": "0.67071724", "text": "function cleanpost($index = NULL, $xss_clean = FALSE) {\n // Check if a field has been provided\n if ($index === NULL AND !empty($_POST)) {\n $post = array();\n //TODO Sundar Check post array for clean\n//$this->_fetch_from_array($_POST, $key, $xss_clean);\n // Loop through the full _POST array and return it\n foreach (array_keys($_POST) as $key) {\n $post[$key] = $_POST[$key];\n }\n return $post;\n }\n\n// return $this->_fetch_from_array($_POST, $index, $xss_clean);\n}", "title": "" }, { "docid": "bb03de4a4f817d83103e1090d1156f2b", "score": "0.64781636", "text": "function postCleanup($_POST) {\n\t\t$allowed_html_tags='<p>,<br>,<b>,<em>,<big>,<small>,<strong>,<pre>';\n\t\tforeach ($_POST as $key => $value) {\n\t\t\t$value=trim($value); //remove white space from left and right\n\t\t\t$value=strip_tags($value, $allowed_html_tags); //strip any unwanted tags\n\t\t\t$value=htmlspecialchars($value); //convert special chrs to html entities\n\t\t\t$_POST[$key]=$value;\n\t\t}\n\t\treturn $_POST;\n}", "title": "" }, { "docid": "62c966f74510227b9de09a425808ef1d", "score": "0.63062555", "text": "public static function getPost($function=\"htmlentities\") {\n\t\treturn array_map($function, $_POST);\n\t}", "title": "" }, { "docid": "cddefa4a686fbf5b8094f6179862e64a", "score": "0.6274723", "text": "function getFormData()\n{\n $fields = array('security_quest', 'security_ans_input', 'email_add', 'pwd_input', 'conf_pwd_input');\n $data = array();\n $counter = 0;\n foreach($fields as $field)\n {\n if (empty(filter_input(INPUT_POST, $field)))\n {\n echo(\"Cannot submit an empty form!\");\n return false;\n }\n else\n {\n $data[$counter] = filter_input(INPUT_POST, $field);\n \n }\n \n $counter ++;\n }\n return $data;\n}", "title": "" }, { "docid": "ee847e2c49ca444f8d2a2592d9cfdde3", "score": "0.6251168", "text": "function cleanPOST($field){\r\n if(!empty($_POST[$field])){\r\n return e_attr($_POST[$field]);\r\n } else \r\n return '';\r\n }", "title": "" }, { "docid": "d4bf6f34e86e7300f714b228feb2587e", "score": "0.6201952", "text": "function process_post()\n{\n $myReturn = ''; //set to initial empty value\n\n foreach($_POST as $varName=> $value)\n {#loop POST vars to create JS array on the current page - include email\n $strippedVarName = str_replace(\"_\",\" \",$varName);#remove underscores\n if(is_array($_POST[$varName]))\n {#checkboxes are arrays, and we need to collapse the array to comma separated string!\n $myReturn .= $strippedVarName . \": \" . implode(\",\",$_POST[$varName]) . PHP_EOL;\n }else{//not an array, create line\n $myReturn .= $strippedVarName . \": \" . $value . PHP_EOL;\n }\n }\n return $myReturn;\n}", "title": "" }, { "docid": "dc7b82782416c139712d7ea3db7f815f", "score": "0.62012017", "text": "function process_post()\n{\n $myReturn = ''; //set to initial empty value\n\n foreach($_POST as $varName=> $value) \n {#loop POST vars to create JS array on the current page - include email\n $strippedVarName = str_replace(\"_\",\" \",$varName);#remove underscores\n if(is_array($_POST[$varName]))\n {#checkboxes are arrays, and we need to collapse the array to comma separated string!\n $myReturn .= $strippedVarName . \": \" . implode(\",\",$_POST[$varName]) . PHP_EOL;\n }else{//not an array, create line\n $myReturn .= $strippedVarName . \": \" . $value . PHP_EOL;\n }\n }\n return $myReturn;\n}", "title": "" }, { "docid": "67a0427122f9107e639c7b0f03eb2cda", "score": "0.617386", "text": "function call_post(){\n\t\tunset($_POST['action']);\n\t\t\n\t\tforeach($_POST as $key => $value) {\n\t\t\tglobal ${$key};\n\t\t\t${$key} = stripslashes($value);\n\t\t}\n\t\t\n\t\t\n}", "title": "" }, { "docid": "d6e05b661791b7e8822ee04377c1eaa4", "score": "0.6118582", "text": "function trim_data(){\n $data = $_POST;\n foreach ($data as $entry) {\n $entry = trim($entry);\n #sanitise data of html special characters\n $entry = htmlspecialchars($entry);\n }\n return $data;\n }", "title": "" }, { "docid": "55aa23c568bd2c93c91f8226dc3bbcbd", "score": "0.6099682", "text": "function cleanPostedData($var, $stripslashes = true, $strip_control_chars = false)\n{\n if (is_array($var)) {\n foreach ($var as $key => $value) {\n $var[$key] = cleanPostedData($value);\n }\n } elseif (is_string($var)) {\n // expand tabs\n $var = str_replace(\"\\t\", \" \", $var);\n\n // prune control characters\n if ($strip_control_chars) {\n $var = preg_replace('/[[:cntrl:][:space:]]/', ' ', $var);\n }\n\n // Ah, the joys of \\\"magic quotes\\\"!\n if ($stripslashes && get_magic_quotes_gpc()) {\n $var = stripslashes($var);\n }\n }\n\n return $var;\n}", "title": "" }, { "docid": "34309ec89e4d43560a228bfffa118411", "score": "0.60979235", "text": "function getData($field) {\n if (!isset($_POST[$field])) {\n $data = \"\";\n } else {\n $data = trim($_POST[$field]);\n $data = htmlspecialchars($data);\n }\n return $data;\n}", "title": "" }, { "docid": "91a28d61664cc35b231a52300fc571a7", "score": "0.6033901", "text": "function post_data() {\n\t$rtn = \"\";\n\tforeach ($_POST as $key => $value) {\n\t\t$rtn = $rtn.$key.\"=\".$value.\",\";\n\t}\n\treturn rtrim($rtn, \",\");\n}", "title": "" }, { "docid": "5985974fa9bcc9ac7397162e3c2e27e3", "score": "0.6009804", "text": "function handle_post($indata) {\n// showDebug('form_class POST:');\n// showArray($indata); \n return;\n }", "title": "" }, { "docid": "bc21b5fa4d3d14b62409872b78c958a1", "score": "0.5965635", "text": "function valueForm($field) {\r\n\tif (!empty($_POST[$field])) {\r\n\t\treturn $_POST[$field];\r\n\t}\r\n}", "title": "" }, { "docid": "382ccf4ee6863c16c9135bef4c82ba2c", "score": "0.5944131", "text": "protected function _get_post()\n {\n \t$data = array();\n \t$extra_data = array('submit', 'password_confirmation');\n \tforeach($_POST as $k => $v) {\n \t\t$is_extra = in_array(strtolower($k), $extra_data);\n \t\t$is_temp = (substr(strtolower($k), 0, 4) == '_tmp');\n \t\tif (!$is_extra && !$is_temp) {\n \t\t\t$data[$k] = $this->input->post($k);\n \t\t}\n \t}\n \treturn $data;\n }", "title": "" }, { "docid": "76e49fb1f1bfddc39d896cd68a5b10a3", "score": "0.5942644", "text": "function clean_form_data($formdata)\n{\n\t$clean_data = array();\n\t\n\tforeach($formdata AS $key=>$value)\n\t{\n\t\t$clean_data[$key] = htmlspecialchars(addslashes($value));\n\t}\n\t\n\treturn $clean_data;\n}", "title": "" }, { "docid": "d4d9c42f3021a60101740bb7b3a7b632", "score": "0.5922239", "text": "function processPost($formvalues) {\n\t\t// trim spaces from the name field\n\t\tif(isArrayKeyAnEmptyString('status', $formvalues)){\n\t\t\tunset($formvalues['status']);\n\t\t}\n\t\tif(isArrayKeyAnEmptyString('companyid', $formvalues)){\n\t\t\tunset($formvalues['companyid']);\n\t\t}\n\t\tif(isArrayKeyAnEmptyString('userid', $formvalues)){\n\t\t\tunset($formvalues['userid']);\n\t\t}\n\t\tif(isArrayKeyAnEmptyString('startdate', $formvalues)){\n\t\t\tunset($formvalues['startdate']);\n\t\t}\n\t\tif(isArrayKeyAnEmptyString('enddate', $formvalues)){\n\t\t\tunset($formvalues['enddate']);\n\t\t}\n\t\tif(isArrayKeyAnEmptyString('dateapproved', $formvalues)){\n\t\t\tunset($formvalues['dateapproved']);\n\t\t}\n\t\tif(isArrayKeyAnEmptyString('datesubmitted', $formvalues)){\n\t\t\tunset($formvalues['datesubmitted']);\n\t\t}\n\t\tif(isArrayKeyAnEmptyString('timesheetdate', $formvalues)){\n\t\t\tunset($formvalues['timesheetdate']);\n\t\t}\n\t\tif(isArrayKeyAnEmptyString('approvedbyid', $formvalues)){\n\t\t\tunset($formvalues['approvedbyid']);\n\t\t}\n\t\tif(isArrayKeyAnEmptyString('datein', $formvalues)){\n\t\t\tunset($formvalues['datein']);\n\t\t} else {\n\t\t\t$formvalues['datein'] = date('Y-m-d', strtotime($formvalues['datein']));\n\t\t}\n\t\tif(isArrayKeyAnEmptyString('dateout', $formvalues)){\n\t\t\tunset($formvalues['dateout']);\n\t\t} else {\n\t\t\t$formvalues['dateout'] = date('Y-m-d', strtotime($formvalues['dateout']));\n\t\t}\n\t\tif(isArrayKeyAnEmptyString('timein', $formvalues)){\n\t\t\tunset($formvalues['timein']);\n\t\t} else {\n\t\t\t$formvalues['timein'] = date(\"H:i:s\", strtotime($formvalues['timein']));\n\t\t}\n\t\tif(isArrayKeyAnEmptyString('timeout', $formvalues)){\n\t\t\tunset($formvalues['timeout']);\n\t\t} else {\n\t\t\t$formvalues['timeout'] = date(\"H:i:s\", strtotime($formvalues['timeout']));\n\t\t}\n\t\tif(isArrayKeyAnEmptyString('payrollid', $formvalues)){\n\t\t\tunset($formvalues['payrollid']);\n\t\t}\n\t\tif(isArrayKeyAnEmptyString('isrequest', $formvalues)){\n\t\t\tunset($formvalues['isrequest']);\n\t\t}\n\t\tif(isArrayKeyAnEmptyString('hours', $formvalues)){\n\t\t\tunset($formvalues['hours']);\n\t\t}\n\t\t// debugMessage($formvalues); exit();\n\t\tparent::processPost($formvalues);\n\t}", "title": "" }, { "docid": "068f5088f2169366aa16132160dcbf37", "score": "0.5913511", "text": "function get_post($index = '', $xss_clean = FALSE) {\n if (!isset($_POST[$index])) {\n return $this->get($index, $xss_clean);\n } else {\n return $this->post($index, $xss_clean);\n }\n}", "title": "" }, { "docid": "80a4010c841552705573d4e3f9a51fd1", "score": "0.589022", "text": "function gatherFormFields($submitType)\n{\n\t// then pass the data along to the appropriate function for\n\t// editing or insertion\n\t\n\t$arrFields = array(); // To hold the sanitized values\n\t\n\t// Field: ID\n\tif (isset($_POST['couponid']))\n\t{\n\t\t$id = (int)$_POST['couponid'];\n\t}\n\telse\n\t{\n\t\t$submitType = 'add'; // Even if this was submitted as an edit, if no couponid was provided, create a new record\n\t}\n\t\n\t// Field: company\n\tif (isset($_POST['edit_company']))\n\t{\n\t\t$arrFields['company'] = array('integer', intval($_POST['edit_company']));\n\t}\n\telse\n\t{\n\t\t$arrFields['company'] = null;\n\t}\n\t\n\t// Field: joblo_url\n\tif (isset($_POST['edit_joblo_url']))\n\t{\n\t\t$arrFields['joblo_url'] = array('string', $_POST['edit_joblo_url']);\n\t}\n\telse\n\t{\n\t\t$arrFields['joblo_url'] = array('string', '');\n\t}\n\t\n\t// Field: aff_url\n\tif (isset($_POST['edit_aff_url']))\n\t{\n\t\t$arrFields['aff_url'] = array('string', $_POST['edit_aff_url']);\n\t}\n\telse\n\t{\n\t\t$arrFields['aff_url'] = array('string', '');\n\t}\n\t\n\t// Field: _desc\n\tif (isset($_POST['edit_description']))\n\t{\n\t\t$arrFields['_desc'] = array('string', $_POST['edit_description']);\n\t}\n\telse\n\t{\n\t\t$arrFields['_desc'] = array('string', '');\n\t}\n\n\t// Field: url\n\tif (isset($_POST['edit_url']))\n\t{\n\t\t$arrFields['url'] = array('string', $_POST['edit_url']);\n\t}\n\telse\n\t{\n\t\t$arrFields['url'] = array('string', '');\n\t}\n\n\t// Field: clean_url\n\tif (isset($_POST['edit_clean_url']))\n\t{\n\t\t$arrFields['clean_url'] = array('string', $_POST['edit_clean_url']);\n\t}\n\telse\n\t{\n\t\t$arrFields['clean_url'] = array('string', '');\n\t}\n\t\n\t// Field: _show\n\tif (isset($_POST['edit_show']) && intval($_POST['edit_show']) == 0)\n\t{\n\t\t$arrFields['_show'] = array('integer', 0);\n\t}\n\telse\n\t{\n\t\t$arrFields['_show'] = array('integer', 1);\n\t}\n\t\n\t// Field: enable\n\tif (isset($_POST['edit_start_date']))\n\t{\n\t\t$arrFields['enable'] = array('string', date('Y-m-d 00:00:00', strtotime($_POST['edit_start_date'])));\n\t}\n\telse\n\t{\n\t\t$arrFields['enable'] = array('string', date('Y-m-d 00:00:00'));\n\t}\n\t\n\t// Field: expire\n\tif (isset($_POST['edit_end_date']))\n\t{\n\t\t$arrFields['expire'] = array('string', date('Y-m-d 00:00:00', strtotime($_POST['edit_end_date'])));\n\t}\n\telse\n\t{\n\t\t$arrFields['expire'] = array('string', date('Y-m-d 00:00:00'));\n\t}\n\t\n\t// Field: code\n\tif (isset($_POST['edit_code']))\n\t{\n\t\t$arrFields['code'] = array('string', $_POST['edit_code']);\n\t}\n\telse\n\t{\n\t\t$arrFields['code'] = array('string', '');\n\t}\n\t\n\t// Field: deal \n\tif (isset($_POST['edit_deal']) && intval($_POST['edit_deal']) == 1)\n\t{\n\t\t$arrFields['deal'] = array('integer', 1);\n\t}\n\telse\n\t{\n\t\t$arrFields['deal'] = array('string', 0);\n\t}\n\t\n\t// Field: \n\tif (isset($_POST['edit_who']))\n\t{\n\t\t$arrFields['who'] = array('string',\t$_POST['edit_who']);\n\t}\n\telse\n\t{\n\t\t$arrFields['who'] = array('string', '');\n\t}\n\t\n\t// Field: _when\n\t$arrFields['_when'] = array('string', date('Y-m-d')); // Set variable to the current time. This data will only be used in a new record.\n\t\n\t// Field: notes\n\tif (isset($_POST['edit_notes']))\n\t{\n\t\t$arrFields['notes'] = array('string', $_POST['edit_notes']);\n\t}\n\telse\n\t{\n\t\t$arrFields['notes'] = array('string', '');\n\t}\n\t\n\t// Field: \n\tif (isset($_POST['edit_status']))\n\t{\n\t\tswitch (intval($_POST['edit_status']))\n\t\t{\n\t\t\tcase 3:\n\t\t\t\t$arrFields['status'] = array('integer', 3);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$arrFields['status'] = array('integer', 2);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$arrFields['status'] = array('integer', 1);\n\t\t\t\tbreak;\n\t\t\tcase 0:\n\t\t\tdefault:\n\t\t\t\t$arrFields['status'] = array('integer', 0);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\telse\n\t{\n\t\t$arrFields[''] = array('string', 0);\n\t}\n\n\t// redirect to the appropriate function\n\tif ($submitType == 'edit')\n\t{\n\t\teditExisting($arrFields, $id);\n\t}\n\telse\n\t{\n\t\taddNew($arrFields);\n\t}\n}", "title": "" }, { "docid": "c9045fd296894dbfb8714fb7848e7462", "score": "0.588814", "text": "function standardSelector($form_name, $post, $full=false){\n $return = array();\n // check to see if the $_POST contains either of the non-record specific options.\n if(isset($post[$form_name.'-new'])) { $return[0] = \"new\";}\n if(isset($post[$form_name.'-add'])) { $return[0] = \"new\";}\n if(isset($post[$form_name.'-update'])) { $return[0] = \"update\";}\n \n // deal with record specific return options.\n if(isset($post[$form_name.'-drop'])) {\n $return[0] = \"drop\";\n if(!$full){ $return[1] = trimNumber($post[$form_name.'-drop']);}\n if($full){$return[1] = ($post[$form_name.'-drop']);}\n }\n if(isset($post[$form_name.'-edit'])) {\n $return[0] = \"edit\";\n if(!$full){ $return[1] = trimNumber($post[$form_name.'-edit']);}\n if($full){$return[1] = ($post[$form_name.'-edit']);}\n }\n \n // return varies based on if something was set.\n if(isset($return[0])){ return $return;}\n \n return array(null);\n}", "title": "" }, { "docid": "8221f77537ace703bcaa9a8f57ba6465", "score": "0.58178794", "text": "function getPost()\n{\n $action='';\n if(isset($_POST['add_to_fav']))\n {\n $action = 'add_to_fav'; \n }\n else if((isset($_POST['rem_from_fav'])))\n {\n $action = 'rem_from_fav'; \n }\n else if((isset($_POST['delete'])))\n {\n $action = 'delete';\n }\n else if((isset($_POST['download'])))\n {\n $action = 'download';\n }\n else if((isset($_POST['rename'])))\n {\n $action = 'rename';\n }\n else\n {\n setErrorMsg('We are encountering some problems, kindly try again later.'\n . ' Sorry for any inconvenience caused!', DASHBOARD_PATH);\n }\n return $action;\n}", "title": "" }, { "docid": "e5d2473446bae59096c8c0ed9fb8e682", "score": "0.5817519", "text": "function e_post_to_string()\n{\n\t$ignores = array(\n\t\t'MAX_FILE_SIZE', 'fm_form_submit', 'e'\n\t);\n\t$content = '';\n\tforeach($_POST as $key => $value) {\n\t\tif(in_array($key, $ignores)) {\n\t\t\tcontinue;\n\t\t}\n\t\t$key = str_replace('_', ' ', $key);\n\t\t$key = ucwords($key);\n\t\tif(is_array($value)) {\n\t\t\t$value = implode(',', $value);\n\t\t}\n\t\t$content .= '<b>' . $key . '</b>' . ': ' . nl2br($value) . \"\\n\";\n\t}\n\treturn $content;\n}", "title": "" }, { "docid": "97d32755cd2c485153473886ab329be5", "score": "0.5806174", "text": "static function cleanPOST(){\n foreach ($_POST as &$data) {\n $data = preg_replace(array('/[\\<\\>\\/\\,\\?\"\\`\\|]/',\"/'/\"), '', $data); // Removes special unsafe characters. later versions we can just encode + decode.\n }\n }", "title": "" }, { "docid": "5feba40bd161aa358b8d4ce5cae6614d", "score": "0.5773224", "text": "function userSubmittedFormValues($conn) {\n\t\t$submittedFormValues = [];\n\t\tforeach ($_POST as $value) {\n\t\t\tif (isset($value)) {\n\t\t\t\tarray_push($submittedFormValues, $value);\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn $submittedFormValues;\n}", "title": "" }, { "docid": "47891d036e50ec142e8e59bcdcc87bc4", "score": "0.57264566", "text": "public function main() {\n if(count($_POST)){\n if(isset($_POST['get_submit'])){ \n return $this->getRequest();\n }\n elseif(isset($_POST['post_submit'])){\n return $this->postRequest();\n }\n }\n }", "title": "" }, { "docid": "a215f852de62d536f9968211aa120d2a", "score": "0.56921935", "text": "function method($a){\n return htmlspecialchars($_POST[$a]);\n}", "title": "" }, { "docid": "8f76734b1fde5f8272ad0307a83827fb", "score": "0.56871337", "text": "function take_post_vars(){\n if(isset($_POST)){\n foreach ($_POST as $k => $v){\n $this->data[\"$k\"] = $this->clean_var($v);\n }\n }\n }", "title": "" }, { "docid": "3531c08a92f93829ade9ff7451bee5bc", "score": "0.5683567", "text": "function postValue($index)\n{\n global $mysql;\n if (isset($_POST[$index]) && $_POST[$index] != '') {\n return mysqli_escape_string($mysql, $_POST[$index]);\n }\n\n return null;\n}", "title": "" }, { "docid": "bfb697fc39d34b8fe3a1bef628731579", "score": "0.566641", "text": "function get_record( $submission , $qs_cf7_data_map , $type = \"json\", $template = \"\" ){\n $submited_data = $submission->get_posted_data();\n //TODO: implement upload file -> https://github.com/kennym/cf7-to-api/commit/1e47b9179ec1d6878e64efdedcb800dc83ab7ebb \n $record = array();\n\n\n foreach( $qs_cf7_data_map as $form_key => $qs_cf7_form_key ){\n if( is_array( $qs_cf7_form_key ) ){\n //arrange checkbox arrays\n foreach( $submited_data[$form_key] as $value ){\n if( $value ){\n $value = apply_filters( 'set_record_value' , $value , $qs_cf7_form_key );\n\n $template = str_replace( \"[{$form_key}-{$value}]\", $value, $template );\n }\n }\n }else{\n\n $value = isset($submited_data[$form_key]) ? $submited_data[$form_key] : \"\";\n \n $value = preg_replace('/\\r|\\n/', '\\\\n', $value);\n $value = str_replace('\\\\n\\\\n', '\\n', $value);\n\n //flatten radio\n if( is_array( $value ) ){\n if(count($value) == 1)\n $value = reset( $value );\n else \n $value = implode(\";\",$value);\n }\n // handle boolean acceptance fields\n if( $this->isAcceptanceField($form_key) ) {\n $value = $value == \"\" ? \"false\" : \"true\";\n }\n\n //$template = str_replace( \"[{$form_key}]\", $value, $template );\n\n // replace \"[$form_key]\" with json-encoded value\n $template = preg_replace( \"/(\\\")?\\[{$form_key}\\](\\\")?/\", json_encode($value), $template );\n\n }\n }\n\n //clean unchanged tags\n foreach( $qs_cf7_data_map as $form_key => $qs_cf7_form_key ){\n if( is_array( $qs_cf7_form_key ) ){\n foreach( $qs_cf7_form_key as $field_suffix=> $api_name ){\n $template = str_replace( \"[{$form_key}-{$field_suffix}]\", '', $template );\n }\n }\n\n }\n\n $record[\"fields\"] = $template;\n $record = apply_filters( 'cf7api_create_record', $record , $submited_data , $qs_cf7_data_map , $type , $template );\n \n \n return $record;\n }", "title": "" }, { "docid": "fc98eed5c085060cd073eb65aeaf21fa", "score": "0.564084", "text": "public function cleanSubmission($fields, $post)\r\n {\r\n $submission = [];\r\n foreach ($fields as $field) {\r\n $submission[$field[\"name\"]] = isset($post[$field[\"name\"]]) ? $post[$field[\"name\"]] : null;\r\n }\r\n\r\n // Remove keys with NULL, but leave values of FALSE, Empty Strings (\"\") and 0 (zero)\r\n $submission = array_filter($submission, function ($val) {\r\n return $val !== null;\r\n });\r\n\r\n // Strip whitespace from the beginning and end of each string element of the array\r\n $submission = array_map(function ($el) {\r\n if (is_string($el)) {\r\n return trim($el);\r\n } elseif (is_array($el)) {\r\n // For Select List & Checkbox elements\r\n array_map('trim', $el);\r\n return $el;\r\n }\r\n return $el;\r\n }, $submission);\r\n\r\n return $submission;\r\n }", "title": "" }, { "docid": "56ad79d1ca0caa2f31dd77448eed10d9", "score": "0.5626771", "text": "public function post($field = false) {\n\t\tif ($field) {\n\t\t\tif (!isset($_POST[$field]))\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn $_POST[$field];\n\t\t} else {\n\t\t\treturn $_POST;\n\t\t}\n\t}", "title": "" }, { "docid": "c0cbb9c1be153f14e16595c1bb650b05", "score": "0.56129277", "text": "function fu_post($key, $default='', $strip_tags=false) {\r\n\treturn fu_get_global($_POST, $key, $default, $strip_tags);\r\n}", "title": "" }, { "docid": "445f547936a261db8a76bae53120ca45", "score": "0.5597656", "text": "function getPostValue($name)\n{\n if(isset($_POST[$name])) { return $_POST[$name]; }\n else { return ''; }\n}", "title": "" }, { "docid": "f415be06677d90aa8079319f9d6fe45a", "score": "0.5597621", "text": "function _INPUT($name){\n // QUERY HANDLER: Used to get form elements and queries in a simple manner\n // AUTHOR: Martin Thomsen\n // USAGE: $form_text = _INPUT('form_text_name');\n if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST[$name]))\n return strip_tags($_POST[$name]);\n //elseif ($_SERVER['REQUEST_METHOD'] == 'GET' and isset($_GET[$name]))\n // return strip_tags($_GET[$name]);\n else return NULL;\n}", "title": "" }, { "docid": "13d6409240f93dbf895fdf7d0d9acd8c", "score": "0.5593591", "text": "function formGet($field)\n\t{\n\t\tif (isset($_POST[$field]))\n\t\t\treturn removeHtmlEntities( trim($_POST[$field]) );\n\t\telse\n\t\t\treturn '';\n\t}", "title": "" }, { "docid": "d4df3d0183eb3a3906172df098f47e84", "score": "0.5583997", "text": "static function filterPost() {\n $fields = array('title', 'solution_short', 'solution_long', 'supervisor_id');\n\n $input = array();\n foreach ($fields as $prop) {\n if (isset($_POST[$prop])) {\n $input[$prop] = $_POST[$prop];\n }\n }\n return $input;\n }", "title": "" }, { "docid": "07ae208544bec89d225c4929762dac6f", "score": "0.55635965", "text": "protected function getFormFieldsFromPOST()\n\t{\n\t\t$form_fields = array(\n\t\t\t\"pageformat\" => ilUtil::stripSlashes($_POST[\"pageformat\"]),\n\t\t\t\"padding_top\" => ilUtil::stripSlashes($_POST[\"padding_top\"]),\n\t\t\t\"margin_body_top\" => ilUtil::stripSlashes($_POST[\"margin_body\"][\"top\"]),\n\t\t\t\"margin_body_right\" => ilUtil::stripSlashes($_POST[\"margin_body\"][\"right\"]),\n\t\t\t\"margin_body_bottom\" => ilUtil::stripSlashes($_POST[\"margin_body\"][\"bottom\"]),\n\t\t\t\"margin_body_left\" => ilUtil::stripSlashes($_POST[\"margin_body\"][\"left\"]),\n\t\t\t\"certificate_text\" => ilUtil::stripSlashes($_POST[\"certificate_text\"], FALSE),\n\t\t\t\"pageheight\" => ilUtil::stripSlashes($_POST[\"pageheight\"]),\n\t\t\t\"pagewidth\" => ilUtil::stripSlashes($_POST[\"pagewidth\"]),\n\t\t\t\"active\" => ilUtil::stripSlashes($_POST[\"active\"])\n\t\t);\n\t\t$this->object->getAdapter()->addFormFieldsFromPOST($form_fields);\n\t\treturn $form_fields;\n\t}", "title": "" }, { "docid": "d0f36a32b8f79d6d8ae715b463d8a8e8", "score": "0.55559945", "text": "private function sanitizeData(){\n\n\t\t\t$entry = array();\n\t\t\t$_entry = $_POST;\n\t\t\tunset( $_entry['action'] );\n\t\t\tunset( $_entry['post_id'] );\n\t\t\tunset( $_entry['_chef_form_submit'] );\n\t\t\tunset( $_entry['_wp_http_referer'] );\n\t\t\tunset( $_entry['_fid'] );\n\t\t\tunset( $_entry['_rootPid'] );\n\n\t\t\t//remove anti-spam measures before saving\n\t\t\t$_entry = AntiSpam::sanitizeEntry( $_entry );\n\n\t\t\tforeach( $_entry as $name => $value ){\n\n\t\t\t\t$entry[] = array(\n\t\t\t\t\t'name'\t=> $name,\n\t\t\t\t\t'value'\t=> $value\n\t\t\t\t);\n\n\t\t\t}\n\n\n\t\t\t$_POST['entry'] = $entry;\n\t\t\treturn $entry;\n\n\t\t}", "title": "" }, { "docid": "a2a143040e5de6b5bd5a1eb297f2e40b", "score": "0.5545556", "text": "private static function getPostRequest()\n {\n $response = false;\n if (!empty($_POST)) {\n foreach ($_POST as $post) {\n $post = htmlspecialchars($post);\n }\n $response = $_POST;\n }\n return $response;\n }", "title": "" }, { "docid": "0b573052619aade31a546925b573db83", "score": "0.55350906", "text": "protected function postForm($k = NULL){\n\n\t\t$data = NULL;\n\n\t\tif(!empty($this->postArray)){\n\t\t\tforeach ($this->postArray as $key => $value) {\n\t\t\t\tif($key === $k){\n\t\t\t\t\t$data = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn mysqli_real_escape_string(DB::getInstance()->conn, $data);\n\t\t}else{\n\t\t\treturn $data;\n\t\t}\n\t}", "title": "" }, { "docid": "f8f041ce5a832b2afb6041ac4b00d712", "score": "0.55200887", "text": "function fm_cleandata($postarray) {\r\n array_walk($postarray,'fm_cleanfield');\r\n return $postarray;\r\n}", "title": "" }, { "docid": "f9ff6ca4999d04a5c76dc12eb73a7a82", "score": "0.55163115", "text": "function GatherRecordFromFormBasedOnTableSchema($strDatabase, $strTable)\n{\n\t$arrOut=Array();\n\t$records = TableExplain($strDatabase, $strTable);\n\tforeach ($records as $k => $info )\n\t{\n\t\t $field= $info[\"Field\"];\n\t\t $arrOut[$field]=$_POST[$field];\n \t\t $type= $info[\"Type\"];\n\t\t if($type==\"datetime\")\n\t\t {\n\t\t \t $arrOut[$field]= RequestCompoundDate(qpre . $field);\n\t\t }\n\t}\n\treturn $arrOut;\n}", "title": "" }, { "docid": "a1e68062a4e8c327d82c33d44ea82ede", "score": "0.5512128", "text": "function _parse_post()\n\t{\n\t\t// -------------------------------------\n\t\t//\tPrep\n\t\t// -------------------------------------\n\n\t\tunset($_POST['XID'], $_POST['submit']);\n\n\t\tif (empty($_POST) === TRUE) return FALSE;\n\n\t\tif (ee()->TMPL->fetch_param('dynamic') !== FALSE AND $this->check_no(ee()->TMPL->fetch_param('dynamic')) === TRUE) return FALSE;\n\n\t\t$_POST\t= ee()->security->xss_clean($_POST);\n\n\t\t// -------------------------------------\n\t\t//\tRedirect POST?\n\t\t// -------------------------------------\n\n\t\t$redirect_post\t\t\t= TRUE;\n\t\t$redirect_post_forced\t= FALSE;\n\n\t\tif (! empty($_POST['redirect_post']))\n\t\t{\n\t\t\tif ($this->check_no($_POST['redirect_post']))\n\t\t\t{\n\t\t\t\t$redirect_post = FALSE;\n\t\t\t}\n\n\t\t\t$redirect_post_forced = TRUE;\n\t\t}\n\n\t\t// -------------------------------------\n\t\t//\tParse POST into search array\n\t\t// -------------------------------------\n\n\t\tee()->load->library('super_search_lib');\n\n\t\tif (($str = ee()->super_search_lib->parse_post($_POST)) === FALSE)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// -------------------------------------\n\t\t//\tAre we redirecting POST searches to the query string method?\n\t\t// -------------------------------------\n\n\t\t// We may have a race condition here\n\t\t// We're defaulting to yes, but that can get overridden by posts and template variables\n\n\t\tif ($redirect_post_forced !== TRUE)\n\t\t{\n\t\t\t// We haven't been passed a value to use from the post data\n\t\t\t// Inspect the tmpl params to see if its anywhere there\n\t\t\tif (ee()->TMPL->fetch_param('redirect_post') !== FALSE)\n\t\t\t{\n\t\t\t\tif ($this->check_no(ee()->TMPL->fetch_param('redirect_post')))\n\t\t\t\t{\n\t\t\t\t\t$redirect_post = FALSE;\n\t\t\t\t}\n\t\t\t\telseif ($this->check_yes(ee()->TMPL->fetch_param('redirect_post')))\n\t\t\t\t{\n\t\t\t\t\t$redirect_post = TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($redirect_post === TRUE)\n\t\t{\n\t\t\t$str\t= trim(str_replace(array(SLASH, '%26%26'), array($this->slash, '&&'), $str), '&');\n\n\t\t\t$return = '';\n\n\t\t\tif ($redirect_post == FALSE)\n\t\t\t{\n\t\t\t\t$return\t= ee()->TMPL->fetch_param('redirect_post');\n\t\t\t}\n\n\t\t\t$return\t= $this->_chars_decode($this->_prep_return($return)) . 'search'.$this->parser.$str.'/';\n\n\t\t\tif ($return != '')\n\t\t\t{\n\t\t\t\tee()->functions->redirect($return);\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t//\tSend it to _parse_uri()\n\t\t// -------------------------------------\n\n\t\tif (($q = $this->_parse_uri(ee()->uri->uri_string . 'search' . $this->parser . $str . '/')) === FALSE)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn $q;\n\t}", "title": "" }, { "docid": "f74a080b0c2f5d6add24e7c28ebcceb6", "score": "0.55048555", "text": "function getPosts()\r\n{\r\n $posts = array();\r\n $posts[0] = $_POST['eid'];\r\n $posts[1] = $_POST['ename'];\r\n $posts[2] = $_POST['dname'];\r\n $posts[3] = $_POST['ephn'];\r\n $posts[4] = $_POST['gender'];\r\n $posts[5] = $_POST['eaddress'];\r\n return $posts;\r\n}", "title": "" }, { "docid": "a0a00090e386d20ef10a3165a879361e", "score": "0.5485241", "text": "private function cleanFormPostData(){\n\t\t$filter_array = array('SecondaryPhone','WorkPhone','PrimaryPhone');\n\t\tforeach($this->request->data as $key=>$value){\n\t\t\t\t\n\t\t\t//take out the characters and spaces\t\t\t\t\t\n\t\t\tif(in_array($key,$filter_array)){\n\t\t\t\t$this->request->data[$key] = str_replace(array('-','(',')',' '), array('','','',''), $value);\t\n\t\t\t}\n\n\t\t}\t\n\t}", "title": "" }, { "docid": "f238427dd585c5449fab6b3f7d8b3f1e", "score": "0.54811823", "text": "public function getPostData()\n {\n if (isset($_POST[$this->name]))\n {\n $val = $_POST[$this->name];\n return $val;\n }\n else\n {\n return '';\n }\n }", "title": "" }, { "docid": "b5b651e22b010bd47528a1d1ec9c3bad", "score": "0.5476311", "text": "function postdata($s) {\n\treturn isset($_POST[$s]) ? $_POST[$s] : null;\n}", "title": "" }, { "docid": "63cb07d4b9422ff3f435641fc9d01de1", "score": "0.54745984", "text": "public static function cleanUserSubmited($data)\r\n {\r\n if(is_array($data))\t{\r\n $ret = array();\r\n foreach($data as $key=>$value)\t{\r\n $ret[$key] = $this->cleanUserSubmited($value);\r\n }\r\n return $ret;\r\n } else\t{\r\n if(!is_numeric($data)){\r\n if(get_magic_quotes_gpc()){\r\n $data = stripslashes($data);\r\n }\r\n \t\r\n //Escape string for database ; equivalant to mysql_real_escape_string\r\n $data = strtr($data, array(\r\n \"\\x00\" => '\\x00',\r\n \"\\n\" => '\\n',\r\n \"\\r\" => '\\r',\r\n '\\\\' => '\\\\\\\\',\r\n \"'\" => \"\\'\",\r\n '\"' => '\\\"',\r\n \"\\x1a\" => '\\x1a'\r\n ));\r\n }\r\n \r\n return $data;\r\n }\r\n }", "title": "" }, { "docid": "7e9808ed6df9a0e99dfbf8b653c17099", "score": "0.547386", "text": "function getPosts()\r\n{\r\n $posts = array();\r\n $posts[0] = $_POST['b_no'];\r\n $posts[1] = $_POST['bname'];\r\n $posts[2] = $_POST['address'];\r\n $posts[3] = $_POST['usn'];\r\n\r\n \r\n return $posts;\r\n}", "title": "" }, { "docid": "66c21c94b1e5fd1b79eea47ffeee5343", "score": "0.5471535", "text": "function prathap($field)\n{\n$prathap=trim($_POST[$field]);\t\n$prathap=strip_tags($prathap);\t\n$prathap=mysql_real_escape_string($prathap);\t\nreturn $prathap;\n}", "title": "" }, { "docid": "84b978f76eaa9fbbe858af27a7ae4097", "score": "0.546793", "text": "function emptyPost() {\n\t\t$_POST = array();\n\t}", "title": "" }, { "docid": "9156bcd9a203064a8fe0fd1c558ddbc3", "score": "0.5466611", "text": "final public function getPostedValues($postArray)\n\t{\n\t\t// Forms with no parameters defined will not have valid params\n\t\tif ( $this->params ) {\n\t\t\tforeach ( $this->params as $key=>$param ) {\n\t\t\t\t// TODO: fix this so we don't get NULL values but keep empty string and 0 and 0.0...\n\t\t\t\tif ( !empty( $postArray[$param[\"name\"]] ) || $postArray[$param[\"name\"]] === '0' ) {\n\t\t\t\t\t$value = $postArray[$param[\"name\"]];\n\t\t\n\t\t\t\t\t// if the value has spaces and has not yet ben quoted, \n\t\t\t\t\t// put quotes around it to aid parsing later\n\t\t\t\t\t$value = trim($value);\n\t\t\t\t\tif ( strpos($value, \" \") ) {\n\t\t\t\t\t\tif ( !preg_match('/\"([^\"]*)\"/', $value) ) {\n\t\t\t\t\t\t\t$value = '\"'.$value.'\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\t$this->params[$key][\"value\"] = $value;\n\t\t\t\t} else if ( $postArray['process'] && empty( $postArray[$param[\"name\"]] ) ) {\n\t\t\t\t\t// TODO: Checking if the form has been submitted is very ugly here, \n\t\t\t\t\t// try passing in a value from to parent form (runAppionLoop.php) to\n\t\t\t\t\t// decide if we should check for empty checkboxes...\n\t\t\t\t\t$this->params[$key][\"value\"] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b061427077419ce9bd0ca91b06213ae8", "score": "0.5465687", "text": "function old($field_name){\n\t\tif ( isset($field_name) ) {\n\t\t\tif ( isset($_POST[$field_name]) ) {\n\t\t\t\techo $_POST[$field_name];\n\t\t\t}\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "778a8eeba3f3a658f2d5211936f8a9a8", "score": "0.5465629", "text": "function get_post($var){\n\t$var = stripslashes($_POST[$var]);\n\t$var = htmlentities($var);\n\t$var = strip_tags($var);\n\treturn $var;\n}", "title": "" }, { "docid": "2729681ff250ed39e754ac48deae1a53", "score": "0.54619366", "text": "function process_form(){\n\t\t$to_process = array();\n\t\tforeach ($_REQUEST as $key=>$value){\n\t\t\tif ( stripos($key,'dynamic_form') === 0 ){ //dynamic_form at first position of field name\n\t\t\t\tif ( $key == 'dynamic_form_id' ){\n\t\t\t\t\t$form_id = $value;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$to_process[str_replace('dynamic_form_','',$key)] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ( $key == 'transaction_id' ) {//for payment forms\n\t\t\t\t$to_process['transaction_id'] = $value;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$answers = array();\n\t\t$email_body = '';\n\t\t//loop through the fields and gather the question\n\t\tforeach ($to_process as $key=>$value){\n\t\t\tif ( $key == 'transaction_id' ){ //if we're looking at transaction_id\n\t\t\t\t//add to answer array\n\t\t\t\t$answers[] = array(\n\t\t\t\t\t'question_id'=>'transaction_id',\n\t\t\t\t\t'question'=>'Transaction ID',\n\t\t\t\t\t'answer'=>$value\n\t\t\t\t);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$question = $this->get_question($key);\n\t\t\t\t\n\t\t\t\t//deal with checkboxes\n\t\t\t\tif ($question['question_type'] == 'checkbox' ){\n\t\t\t\t\tif ( $value != '' ){\n\t\t\t\t\t\t$value = 'Checked';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$value = \"Not Checked\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//add to answer array\n\t\t\t\t$answers[] = array(\n\t\t\t\t\t'question_id'=>$key,\n\t\t\t\t\t'question'=>stripslashes($question['question_label']),\n\t\t\t\t\t'answer'=>$value\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\t//add to email body\n\t\t\t$email_body .= \"<br><strong>\".stripslashes($question['question_label']).\": </strong>\".$value;\n\t\t}\n\t\t\n\t\t//insert answers into DB\n\t\t$this->db->insert('forms_submitted',array(\n\t\t\t'form_id'=>$form_id,\n\t\t\t'answer_data'=>json_encode($answers),\n\t\t\t'submitted_datetime'=>date(\"Y-m-d H:i:s\")\n\t\t));\n\t\t\n\t\t//email recipients\n\t\t$form = $this->get_form($form_id);\n\t\t$recipients = array();\n\t\tfor ($i=0; $i<6; $i++){\n\t\t\tif ( $form['form_email_recipient_'.$i] != ''){\n\t\t\t\t$recipients[] = $form['form_email_recipient_'.$i];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( count($recipients) > 0 ){\n\t\t\t$email = new email;\n\t\t\tforeach( $recipients as $recipient ){\n\t\t\t\t$email_array = array(\n\t\t\t\t\t'to_address'=>$recipient,\n\t\t\t\t\t'from_address'=>\"DO_NOT_REPLY@\".SITE_URL,\n\t\t\t\t\t'from_name'=>SITE_FULL_TITLE.\" Form Processor\",\n\t\t\t\t\t'subject'=>\"Form Submission: \".stripslashes($form['form_name']),\n\t\t\t\t\t'html_body'=>$email_body, //html code\n\t\t\t\t\t'text_body'=>strip_tags(str_replace('<br>','\\r\\n',$email_body))\n\t\t\t\t);\n\t\t\t\t$email->email_to_queue($email_array);\n\t\t\t}\n\t\t}\n\n\t\treturn array('form_id'=>$form_id,'response'=>\"Your form has been submitted\");\n\t}", "title": "" }, { "docid": "fb9dee382dce21538399185ee5dfbc82", "score": "0.5459529", "text": "function _INPUT($name){\n // QUERY HANDLER: Used to get form elements and queries in a simple manner\n // AUTHOR: Martin Thomsen\n // USAGE: $form_text = _INPUT('form_text_name');\n if ($_SERVER['REQUEST_METHOD'] == 'POST' and isset($_POST[$name]))\n return strip_tags($_POST[$name]);\n elseif ($_SERVER['REQUEST_METHOD'] == 'GET' and isset($_GET[$name]))\n return strip_tags($_GET[$name]);\n else return NULL;\n}", "title": "" }, { "docid": "e5c6a9feb11d3d64ac9ba892b69691df", "score": "0.5456732", "text": "function data_submitted($url=\"\") {\n/// Returns the data as an object, if it's found.\n/// This object can be used in foreach loops without\n/// casting because it's cast to (array) automatically\n///\n/// Checks that submitted POST data exists, and also\n/// checks the referer against the given url (it uses\n/// the current page if none was specified.\n\n global $CFG;\n\n if (empty($_POST)) {\n return false;\n\n } else {\n if (match_referer($url)) {\n return (object)$_POST;\n } else {\n if ($CFG->debug > 10) {\n notice(\"The form did not come from this page! (referer = \".get_referer().\")\");\n }\n return false;\n }\n }\n}", "title": "" }, { "docid": "f3d7c6dd05cbd8408242c7b1b899f54a", "score": "0.54567015", "text": "function cleanget($index = NULL, $xss_clean = FALSE) {\n // Check if a field has been provided\n if ($index === NULL AND !empty($_GET)) {\n $get = array();\n //TODO Sundar Check post array for clean\n//$this->_fetch_from_array($_GET, $key, $xss_clean);\n // loop through the full _GET array\n foreach (array_keys($_GET) as $key) { \n $get[$key] = $_GET[$key];\n }\n return $get;\n }\n\n// return $this->_fetch_from_array($_GET, $index, $xss_clean);\n}", "title": "" }, { "docid": "b8d88eec9c244dff94828deb55eb35a1", "score": "0.5446234", "text": "function postSave($formData) {\n\t\tswitch ($this->_formName) {\n\t\t}\n\t\treturn $formData;\n\t}", "title": "" }, { "docid": "485f719438098b791db198097fd51d8e", "score": "0.54401916", "text": "function processMailForm()\n {\n fixUploadedFileName();\n $preferences = getPreferences();\n\n foreach($preferences['form_fields'] as $key => $value)\n {\n if(trim($_POST[$key]) != '')\n {\n $email_response .= \"$key: {$_POST[$key]}\" .\n CC_FB_SENDMAIL_EOL . CC_FB_SENDMAIL_EOL;\n $form_response .= \"$key: {$_POST[$key]}<br/>\\n\";\n $txt_file .= \"$key: {$_POST[$key]}|\";\n }\n }\n \n }", "title": "" }, { "docid": "619aaf10b17a40eafd8f799cda15dfc8", "score": "0.5426192", "text": "function process_form_data($urldata, $formdata, $action)\n\t{\t\n\t\t$query = '';\n\t\t\n\t\t# Determine what to do with the form data based on the action\n\t\tif($action == 'delete')\n\t\t{\n\t\t\t$query = $this->Query_reader->get_query_by_code('delete_db_query', array('id'=>$urldata['id']));\n\t\t}\n\t\t#Save data\n\t\telse if($action == 'save')\n\t\t{\n\t\t\t# Before saving this data, add slashes so that bad additions and quotes are 'neutralised'\n\t\t\t$formdata = clean_form_data($formdata);\n\t\t\t\n\t\t\t# User is editing\n\t\t\tif($urldata['id'] !== FALSE || isset($urldata['querycode']))\n\t\t\t{\n\t\t\t\t$query = $this->Query_reader->get_query_by_code('update_db_query', array_merge(array('id'=>$urldata['id']), $formdata));\n\t\t\t}\n\t\t\t# User is inserting a new query\n\t\t\telse\n\t\t\t{\n\t\t\t\t$previous_query_array = $this->Query_reader->get_row_as_array('pick_query_by_code', array('querycode'=>$formdata['querycode']));\n\t\t\t\t# Query data doesnt exist\n\t\t\t\tif(count($previous_query_array) == 0)\n\t\t\t\t{\n\t\t\t\t\t$query = $this->Query_reader->get_query_by_code('insert_db_query', $formdata);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->db->query($query);\n\t}", "title": "" }, { "docid": "2edbbf33f305735e6c8588e0a9b74b54", "score": "0.542523", "text": "function get_form_action() : ?string\n{\n return $_POST['action'] ?? null;\n}", "title": "" }, { "docid": "dfbe8fd92b2566a17036dbf25ab411cc", "score": "0.5422904", "text": "public function getPostFields()\n\t{\n\t\tif (!$this->post_data){\n\t\t\treturn '';\n\t\t}\n\t\t$data = '';\n\t\tforeach ($this->post_data as $var=>$var_value){\n\t\t\t$data .= rawurlencode($var). '=' .rawurlencode($var_value).'&';\n\t\t}\n\t\treturn substr($data,0,-1);\n\t}", "title": "" }, { "docid": "2bf96a2496e94ddbb394ce3b967450ee", "score": "0.54080194", "text": "function get_post($conn, $var)\n{\n return sanitize($conn->real_escape_string($_POST[$var]));\n}", "title": "" }, { "docid": "3e6ead5da04d0b99bdb0ee02b71aef77", "score": "0.5397193", "text": "function extractPost() {\n\t// Unescape each time we use this stuff\n\t$FIXED = array();\n\tforeach($_POST as $key => $value ) {\n\t\tif (get_magic_quotes_gpc()) $value = stripslashes($value);\n\t\t$FIXED[$key] = $value;\n\t}\n\t$retval = array();\n\t$retval['key'] = isset($FIXED['oauth_consumer_key']) ? $FIXED['oauth_consumer_key'] : null;\n\t$retval['context_id'] = isset($FIXED['context_id']) ? $FIXED['context_id'] : null;\n\t$retval['link_id'] = isset($FIXED['resource_link_id']) ? $FIXED['resource_link_id'] : null;\n\t$retval['user_id'] = isset($FIXED['user_id']) ? $FIXED['user_id'] : null;\n\n\tif ( $retval['key'] && $retval['context_id'] && $retval['link_id'] && $retval['user_id'] ) {\n\t\t// OK To Continue\n\t} else {\n\t\treturn false;\n\t}\n\t\n\t$retval['service'] = isset($FIXED['lis_outcome_service_url']) ? $FIXED['lis_outcome_service_url'] : null;\n\t$retval['sourcedid'] = isset($FIXED['lis_result_sourcedid']) ? $FIXED['lis_result_sourcedid'] : null;\n\n\t$retval['context_title'] = isset($FIXED['context_title']) ? $FIXED['context_title'] : null;\n\t$retval['link_title'] = isset($FIXED['resource_link_title']) ? $FIXED['resource_link_title'] : null;\n\t$retval['user_email'] = isset($FIXED['lis_person_contact_email_primary']) ? $FIXED['lis_person_contact_email_primary'] : null;\n\tif ( isset($FIXED['lis_person_name_full']) ) {\n\t\t$retval['user_displayname'] = $FIXED['lis_person_name_full'];\n\t} else if ( isset($FIXED['lis_person_name_given']) && isset($FIXED['lis_person_name_family']) ) {\n\t\t$retval['user_displayname'] = $FIXED['lis_person_name_given'].' '.$FIXED['lis_person_name_family'];\n\t} else if ( isset($FIXED['lis_person_name_given']) ) {\n\t\t$retval['user_displayname'] = $FIXED['lis_person_name_given'];\n\t} else if ( isset($FIXED['lis_person_name_family']) ) {\n\t\t$retval['user_displayname'] = $FIXED['lis_person_name_given'];\n\t}\n\t$retval['role'] = 0;\n\tif ( isset($FIXED['roles']) ) {\n $roles = strtolower($FIXED['roles']);\n if ( ! ( strpos($roles,\"instructor\") === false ) ) $retval['role'] = 1;\n if ( ! ( strpos($roles,\"administrator\") === false ) ) $retval['role'] = 1;\n\t}\n\treturn $retval;\n}", "title": "" }, { "docid": "fc2a82a93d215e408a6ac47d15a42bdb", "score": "0.5396469", "text": "function data_submitted($url = '') {\n\t\n\tif (empty ( $_POST )) {\n\t\treturn false;\n\t} else {\n\t\treturn ( object ) $_POST;\n\t}\n}", "title": "" }, { "docid": "a5430370855d8251f334c695d3b80222", "score": "0.5391275", "text": "function getHiddenFields() {\n\tif ($_POST['appl'] == \"ADD\") {\n\t\t$out_Fields = \"<input type='hidden' name='appl' id='appl' value='ADD' />\";\n\t} else {\n\t\t$out_Fields = \"<input type='hidden' name='appl' id='appl' value='EDIT' />\";\n\t}\n\t\n\treturn $out_Fields;\n}", "title": "" }, { "docid": "6ff62168473e0d49d82af51493f3d39b", "score": "0.5387027", "text": "function cp($post){\n\tif(isset($_POST[''.$post.''])) return $_POST[''.$post.'']; else return '';\n\t}", "title": "" }, { "docid": "e40d664696d0d53fd6e2d3e84c656433", "score": "0.5383501", "text": "function getValue($field){\n if(isset($_POST[$field])){\n echo $_POST[$field];\n }\n }", "title": "" }, { "docid": "f23a74d68f011611900e7855bd5ccf0b", "score": "0.53810203", "text": "function varpost($var){\n if(!isset($_POST[$var]))\n return '';\n else\n return htmlspecialchars(addslashes($_POST[$var]), ENT_QUOTES, \"UTF-8\");\n \n}", "title": "" }, { "docid": "60fca7ecf4eb4837d5bbaee78deeec1b", "score": "0.5379955", "text": "function render_button($name, $form_value = \"Submit\", $post_functions = array()){\n global $cfg, $crypt;\n\n // if post_functions is empty, rebuld it from the object backtrace\n if (empty($post_functions)){\n\n //Find a caller class if any\n foreach(debug_backtrace() as $item) {\n\n if (isset($item['class']) && isset($item['object']->object_pk)) {\n\n $object_name = $item['object']->object_name;\n $action_class = $item['object']->class_name;\n\n // work out action name; convention is to have $action_$object_name\n // for any exceptions - fill in the function options!\n $action_name = str_replace(\"_\" . $object_name,\"\",$name);\n\n if (!empty($action_name) && empty($action)){\n $action = ($action_name == \"add\") ? \"insert\" : $action_name;\n }\n\n // Prepare post functions array\n $post_functions = array(\n $object_name,\n (!empty($action)) ? $action : null,\n $action_class,\n (!empty($item['object']->{$item['object']->object_pk})) ? $item['object']->{$item['object']->object_pk} : null\n );\n\n break;\n\n }\n }\n }\n\n $html = '<input type=\"submit\" name=\"'.$name.'\" value=\"'.$form_value.'\" class=\"btn blue right\"/>';\n\n if (!empty($post_functions)) {\n\n $html .= '<input type=\"hidden\" name=\"posted_actions\" id=\"posted_'.$name.'\" value=\"'.( $crypt->str_encrypt(serialize($post_functions)) ) .'\"/>';\n\n } else {\n\n $html .= '<input type=\"hidden\" name=\"posted_actions\" id=\"posted_'.$name.'\" value=\"'.$name.'\"/>';\n\n }\n\n return $html;\n }", "title": "" }, { "docid": "8c23b1138808c12a5b745451231d6319", "score": "0.5368312", "text": "function _prepare_post_body($formvars, $formfiles)\n {\n \tsettype($formvars, \"array\");\n \tsettype($formfiles, \"array\");\n \t$postdata = '';\n\n \tif (count($formvars) == 0 && count($formfiles) == 0)\n \t\treturn;\n\n \tswitch ($this->_submit_type) {\n \t\tcase \"application/x-www-form-urlencoded\":\n \t\treset($formvars);\n \t\twhile (list($key, $val) = each($formvars)) {\n \t\t\tif (is_array($val) || is_object($val)) {\n \t\t\t\twhile (list($cur_key, $cur_val) = each($val)) {\n \t\t\t\t\t$postdata .= urlencode($key) . \"[]=\" . urlencode($cur_val) . \"&\";\n \t\t\t\t}\n \t\t\t} else\n \t\t\t$postdata .= urlencode($key) . \"=\" . urlencode($val) . \"&\";\n \t\t}\n \t\tbreak;\n\n \t\tcase \"multipart/form-data\":\n \t\t$this->_mime_boundary = \"Snoopy\" . md5(uniqid(microtime()));\n\n \t\treset($formvars);\n \t\twhile (list($key, $val) = each($formvars)) {\n \t\t\tif (is_array($val) || is_object($val)) {\n \t\t\t\twhile (list($cur_key, $cur_val) = each($val)) {\n \t\t\t\t\t$postdata .= \"--\" . $this->_mime_boundary . \"\\r\\n\";\n \t\t\t\t\t$postdata .= \"Content-Disposition: form-data; name=\\\"$key\\[\\]\\\"\\r\\n\\r\\n\";\n \t\t\t\t\t$postdata .= \"$cur_val\\r\\n\";\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\t$postdata .= \"--\" . $this->_mime_boundary . \"\\r\\n\";\n \t\t\t\t$postdata .= \"Content-Disposition: form-data; name=\\\"$key\\\"\\r\\n\\r\\n\";\n \t\t\t\t$postdata .= \"$val\\r\\n\";\n \t\t\t}\n \t\t}\n\n \t\treset($formfiles);\n \t\twhile (list($field_name, $file_names) = each($formfiles)) {\n \t\t\tsettype($file_names, \"array\");\n \t\t\twhile (list(, $file_name) = each($file_names)) {\n \t\t\t\tif (!is_readable($file_name)) continue;\n\n \t\t\t\t$fp = fopen($file_name, \"r\");\n \t\t\t\t$file_content = fread($fp, filesize($file_name));\n \t\t\t\tfclose($fp);\n \t\t\t\t$base_name = basename($file_name);\n\n \t\t\t\t$postdata .= \"--\" . $this->_mime_boundary . \"\\r\\n\";\n \t\t\t\t$postdata .= \"Content-Disposition: form-data; name=\\\"$field_name\\\"; filename=\\\"$base_name\\\"\\r\\n\\r\\n\";\n \t\t\t\t$postdata .= \"$file_content\\r\\n\";\n \t\t\t}\n \t\t}\n \t\t$postdata .= \"--\" . $this->_mime_boundary . \"--\\r\\n\";\n \t\tbreak;\n \t}\n\n \treturn $postdata;\n }", "title": "" }, { "docid": "26fca5530c7f46c529356fe5c2f6e2b9", "score": "0.5354957", "text": "function parse_post_arguments(){\r\n $args = array();\r\n unset($_POST['purpose']);\r\n $keys = array_keys($_POST);\r\n foreach ($keys as $key){\r\n if($key == \"costs\"){\r\n if(!empty($_POST[$key])){\r\n $args[$key] = json_decode($_POST[$key], true);\r\n for($i = 0; $i < count($args[$key]); $i++){\r\n $costKeys = array_keys($args[$key][$i]);\r\n foreach($costKeys as $costKey){\r\n $args[$key][$i][$costKey] = mysql_real_escape_string($args[$key][$i][$costKey]);\r\n }\r\n }\r\n } else {\r\n $args[$key] = $_POST[$key];\r\n }\r\n } else {\r\n $args[$key] = mysql_real_escape_string($_POST[$key]);\r\n }\r\n }\r\n sort($keys, SORT_STRING);\r\n $newargs = array();\r\n for($i = 0; $i < count($keys); $i++){\r\n $newargs[$i] = $args[$keys[$i]];\r\n }\r\n return $newargs;\r\n}", "title": "" }, { "docid": "0f72905cb20f583275628c143c22dc26", "score": "0.5353572", "text": "protected function _checkPostData() {\r\n $keys = func_get_args();\r\n \r\n foreach ($keys as $key) {\r\n if ( !array_key_exists($key, $_POST) ) {\r\n $_POST[$key] = '';\r\n }\r\n else {\r\n $_POST[$key] = trim( $_POST[$key] );\r\n }\r\n }\r\n }", "title": "" }, { "docid": "809f41fce605330c3e3d6f9794d72ce6", "score": "0.5344065", "text": "public function ForwardTest_RetPostData() {\n echo implode(',',array_keys($_POST)).':'.implode(',',$_POST);\n }", "title": "" }, { "docid": "5c3e7fdab48b5128ee09d84ecbdebed6", "score": "0.53379357", "text": "public function getPOST();", "title": "" }, { "docid": "77ac6233ade2c5e70e1acb4c8830d752", "score": "0.5333618", "text": "private function process_post()\n { // Check if this grid is posted\n if ((!isset($_POST['submited_grid_id'])) ||\n ($_POST['submited_grid_id'] != $this->grid_id))\n {\n // Call user function when there is no post\n if (method_exists($this, 'on_nopost'))\n $this->on_nopost();\n return false;\n }\n\n if ($_POST['libgrid_backend_action'] == 'click')\n {\n // Call user function when there is click event\n if (method_exists($this, 'on_click'))\n $this->on_click($_POST['libgrid_backend_colid'], $_POST['libgrid_backend_rowid'], $this->data[$_POST['libgrid_backend_rowid']]);\n return true;\n }\n else if ($_POST['libgrid_backend_action'] == 'headerclick')\n {\n // Call user function when there is no post\n if (method_exists($this, 'on_header_click'))\n $this->on_header_click($_POST['libgrid_backend_colid']);\n return true;\n }\n else if ($_POST['libgrid_backend_action'] == 'changepage')\n {\n \t$this->options['startrow'] = (is_numeric($_POST['libgrid_backend_startrow'])?$_POST['libgrid_backend_startrow']:1);\n }\n \n }", "title": "" }, { "docid": "c7c8e800357f148d0942784b68acf5a9", "score": "0.53325015", "text": "function readPOSTvalues () {\n\t\tif (!isset ($_POST['importorders_csv']) || !is_array ($_POST['importorders_csv'])) {\n\t\t\treturn NULL;\n\t\t}\n\t\t$return = true;\n\t\tforeach ($_POST['importorders_csv'] as $key => $value) {\n\t\t\tif (get_magic_quotes_gpc ()) {\n\t\t\t\t$value = stripslashes ($value);\n\t\t\t}\n\t\t\t$this->addPassValue ($key, $value);\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "171c8f2e4caacad466014c006eeb8a3e", "score": "0.53270257", "text": "public function clean_post($val)\n {\n if (isset($_POST[$val])) {\n $value = trim($_POST[$val]);\n // Si las comillas mágicas no se activan, agregue barras inclinadas.\n if (!get_magic_quotes_gpc()) // Adds the slashes.\n {\n $value = addslashes($value);\n }\n\n // Tira todas como etiquetas hacen valor.\n $value = strip_tags($value);\n }\n // Return the value out of the function.\n return $value;\n\n }", "title": "" }, { "docid": "5255e746deeb6b10bde2c15223f2a238", "score": "0.53260994", "text": "function old($field_name){\n\n\t\tif ( isset($field_name) ) {\n\t\t\t\n\t\t\tif( isset($_POST[$field_name]) ){\n\t\t\t\techo $_POST[$field_name];\n\t\t\t}\n\n\t\t}\n\n\n\n\t}", "title": "" }, { "docid": "c3f5d2ba1e06bd36c9cd6f7f808215ca", "score": "0.5315523", "text": "function sanitize_data(){\n $sanitize_args = array(\n 'file_name' => FILTER_SANITIZE_STRING,\n 'nfile_name' => FILTER_SANITIZE_STRING,\n 'var_name' => FILTER_SANITIZE_STRING,\n 'var_value' => FILTER_SANITIZE_STRING,\n 'skip_en' => FILTER_SANITIZE_STRING,\n 'path' => FILTER_SANITIZE_STRING,\n );\n array_filter($_POST, 'trim_value'); // the data in $_POST is trimmed\n $data = filter_input_array(INPUT_POST, $sanitize_args); // sanitze the string\n return $data;\n }", "title": "" }, { "docid": "abb7c1d13104a8dc6a1e543f48b254e1", "score": "0.5310765", "text": "function getPost($key = null, $default = null)\n {\n if (is_null($key) && isset($_POST)) {\n // no key selected, return the whole $_POST array\n return Yawp::dispelMagicQuotes($_POST);\n } elseif (isset($_POST[$key])) {\n // looking for a specific key\n return Yawp::dispelMagicQuotes($_POST[$key]);\n } else {\n // specified key does not exist\n return $default;\n }\n }", "title": "" }, { "docid": "5890a498a168706da780ccf8c94498ab", "score": "0.53092486", "text": "private static function convert_post_to_entry(){\r\n\r\n $entry = array();\r\n\r\n foreach($_POST as $key => $value){\r\n\r\n $id = str_replace('_', '.', str_replace('input_', '', $key));\r\n $entry[$id] = $value;\r\n\r\n }\r\n\r\n return $entry;\r\n }", "title": "" }, { "docid": "29e8690c32cb36f7f00cd444ce4babf9", "score": "0.5297855", "text": "function _form($data = array())\n\t{\n\t\tif (count($data) == 0) return '';\n\n\t\tif (! isset($data['tagdata']) OR $data['tagdata'] == '')\n\t\t{\n\t\t\t$tagdata\t=\tee()->TMPL->tagdata;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tagdata\t= $data['tagdata'];\n\t\t\tunset($data['tagdata']);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Special Handling for return=\"\" parameter\n\t\t// -------------------------------------\n\n\t\tforeach(array('return', 'RET') as $val)\n\t\t{\n\t\t\tif (isset($data[$val]) AND $data[$val] !== FALSE AND $data[$val] != '')\n\t\t\t{\n\t\t\t\t$data[$val] = str_replace(SLASH, '/', $data[$val]);\n\n\t\t\t\tif (preg_match(\"/\".LD.\"\\s*path=(.*?)\".RD.\"/\", $data[$val], $match))\n\t\t\t\t{\n\t\t\t\t\t$data[$val] = ee()->functions->create_url($match['1']);\n\t\t\t\t}\n\t\t\t\telseif (stristr($data[$val], \"http://\") === FALSE)\n\t\t\t\t{\n\t\t\t\t\t$data[$val] = ee()->functions->create_url($data[$val]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t//\tGenerate form\n\t\t// -------------------------------------\n\n\t\t$arr\t=\tarray(\n\t\t\t'action'\t\t=> ee()->functions->fetch_site_index(),\n\t\t\t'id'\t\t\t=> $data['form_id'],\n\t\t\t'enctype'\t\t=> '',\n\t\t\t'onsubmit'\t\t=> (isset($data['onsubmit'])) ? $data['onsubmit'] : ''\n\t\t);\n\n\t\t$arr['onsubmit'] = (ee()->TMPL->fetch_param('onsubmit')) ? ee()->TMPL->fetch_param('onsubmit') : $arr['onsubmit'];\n\n\t\tif (isset($data['name']) !== FALSE)\n\t\t{\n\t\t\t$arr['name']\t= $data['name'];\n\t\t\tunset($data['name']);\n\t\t}\n\n\t\tunset($data['form_id']);\n\t\tunset($data['onsubmit']);\n\n\t\t$arr['hidden_fields']\t= $data;\n\n\t\t// -------------------------------------\n\t\t// HTTPS URLs?\n\t\t// -------------------------------------\n\n\t\tif (ee()->TMPL->fetch_param('secure_action') == 'yes')\n\t\t{\n\t\t\tif (isset($arr['action']))\n\t\t\t{\n\t\t\t\t$arr['action'] = str_replace('http://', 'https://', $arr['action']);\n\t\t\t}\n\t\t}\n\n\t\tif (ee()->TMPL->fetch_param('secure_return') == 'yes')\n\t\t{\n\t\t\tforeach(array('return', 'RET') as $return_field)\n\t\t\t{\n\t\t\t\tif (isset($arr['hidden_fields'][$return_field]))\n\t\t\t\t{\n\t\t\t\t\tif (preg_match(\"/\".LD.\"\\s*path=(.*?)\".RD.\"/\", $arr['hidden_fields'][$return_field], $match) > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$arr['hidden_fields'][$return_field] = ee()->functions->create_url($match['1']);\n\t\t\t\t\t}\n\t\t\t\t\telseif (stristr($arr['hidden_fields'][$return_field], \"http://\") === FALSE)\n\t\t\t\t\t{\n\t\t\t\t\t\t$arr['hidden_fields'][$return_field] = ee()->functions->create_url($arr['hidden_fields'][$return_field]);\n\t\t\t\t\t}\n\n\t\t\t\t\t$arr['hidden_fields'][$return_field] = str_replace('http://', 'https://', $arr['hidden_fields'][$return_field]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Override Form Attributes with form:xxx=\"\" parameters\n\t\t// -------------------------------------\n\n\t\t$extra_attributes = array();\n\n\t\tif (is_object(ee()->TMPL) === TRUE AND ! empty(ee()->TMPL->tagparams))\n\t\t{\n\t\t\tforeach(ee()->TMPL->tagparams as $key => $value)\n\t\t\t{\n\t\t\t\tif (strncmp($key, 'form:', 5) == 0)\n\t\t\t\t{\n\t\t\t\t\tif (isset($arr[substr($key, 5)]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$arr[substr($key, 5)] = $value;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$extra_attributes[substr($key, 5)] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Create Form\n\t\t// -------------------------------------\n\n\t\t$r\t= ee()->functions->form_declaration($arr);\n\n\t\t$r\t.= stripslashes($tagdata);\n\n\t\t$r\t.= \"</form>\";\n\n\t\t// -------------------------------------\n\t\t//\t Add <form> attributes from\n\t\t// -------------------------------------\n\n\t\t$allowed = array('accept', 'accept-charset', 'enctype', 'method', 'action',\n\t\t\t\t\t\t 'name', 'target', 'class', 'dir', 'id', 'lang', 'style',\n\t\t\t\t\t\t 'title', 'onclick', 'ondblclick', 'onmousedown', 'onmousemove',\n\t\t\t\t\t\t 'onmouseout', 'onmouseover', 'onmouseup', 'onkeydown',\n\t\t\t\t\t\t 'onkeyup', 'onkeypress', 'onreset', 'onsubmit');\n\n\t\tforeach($extra_attributes as $key => $value)\n\t\t{\n\t\t\tif (! in_array($key, $allowed)) continue;\n\n\t\t\t$r = str_replace(\"<form\", '<form '.$key.'=\"'.htmlspecialchars($value).'\"', $r);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t//\tReturn\n\t\t// -------------------------------------\n\n\t\treturn str_replace('{/exp:', LD.T_SLASH.'exp:', str_replace(T_SLASH, '/', $r));\n\t}", "title": "" }, { "docid": "70e0973af5999919525bb0e6bb299be9", "score": "0.52888733", "text": "function realMethod() {\n return $_POST[\"method\"];\n}", "title": "" }, { "docid": "47fe34205cffafdd9daf76c66d7cdd28", "score": "0.52887964", "text": "function jr_contact_form_submit($submission_type){\n\tif (empty($_POST['contact'])){\n\t\treturn false;\n\t} else {\n\t\t$values = array();\n\t\t$message = \"<b style='text-decoration:underline'>\".$submission_type.\"</b><br/><br/>\";\n\t\tforeach ($_POST['contact'] as $key => $value){\n\t\t\t$label = str_replace(\"_\", \" \", $key);\n\t\t\t$label = ucwords($label);\n\t\t\t$values[] = array('label'=>$label, 'value'=>$value);\n\t\t}\n\t\tforeach ($values as $key => $value){\n\t\t\t$message .= \"<b><i>\".$value['label'].\"</i></b>: \".$value['value'].\"<br/>\";\n\t\t}\n\t\t$message .= \"<br/><br/><span style='font-size:11px; font-style:italic;'>This was an automatically generated email, please do not reply to it</span>\";\n\t\tif (function_exists(get_field)){\n\t\t\t$admin_email = get_field('email','option');\n\t\t} else {\n\t\t\t$admin_email = 'noreply@wordpress.canada-web-services.com';\n\t\t}\n\t\t$admin_email = 'noreply@wordpress.canada-web-services.com';\n\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n\t\t$headers .= 'From: '.get_bloginfo('name').' <noreply@'.$_SERVER['HTTP_HOST'].'>' . \"\\r\\n\";\n\t\tmail($admin_email, $submission_type, $message, $headers);\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "4e60759e286732e3a0039b3ace8f7515", "score": "0.52842164", "text": "function clean_input($data, $default = NULL) {\n\t\t// trim(); // no whitespaces\n\t\t// stripslashes(); // strip slashes \\\\\\\\\n\t\t// strip_tags(); // <p></p> only if you dont want html tags\n\n\t\t// return isset and sanitized POST\n\t return isset($_POST[$data]) ? stripslashes(trim($_POST[$data])) : $default;\n\t}", "title": "" }, { "docid": "105ef406f0ac5a79e2acba194089ee78", "score": "0.5284023", "text": "function _post($varname, $type, $default)\r\n{\r\n\tswitch($type)\r\n\t{\r\n\t\tcase \"int\":\r\n\t\t\tif(!isset($default))$default = 0;\r\n\t\t\treturn (isset($_POST[$varname]) && (int)$_POST[$varname]>0) ? (int)$_POST[$varname] : $default;\r\n\t\t\tbreak;\r\n\t\tcase \"string\":\r\n\t\t\tif(!isset($default))$default = \"\";\r\n\t\t\tif(get_magic_quotes_gpc())\r\n\t\t\t\treturn (isset($_POST[$varname])) ? trim(stripslashes($_POST[$varname])) : $default;\r\n\t\t\telse\r\n\t\t\t\treturn (isset($_POST[$varname])) ? trim($_POST[$varname]) : $default;\r\n\t\t\tbreak;\r\n\t\tcase \"array\":\r\n\t\t\tif(!isset($default))$default = array();\r\n\t\t\treturn (isset($_POST[$varname]) && is_array($_POST[$varname]) ? $_POST[$varname] : $default);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t}\r\n}", "title": "" }, { "docid": "51889eec61d0ab72e060610360663262", "score": "0.528237", "text": "function old($index) {\r\n global $formdata;\r\n \r\n if (isset($formdata) && \r\n is_array($formdata) && \r\n key_exists($index, $formdata)) {\r\n echo $formdata[$index];\r\n }\r\n}", "title": "" }, { "docid": "e4f0e206ac4ced6f45fc735942f98bf1", "score": "0.5281321", "text": "function get_post($conn, $var){return $conn->real_escape_string($_POST[$var]);\n\t\t\t}", "title": "" }, { "docid": "3d7cb1200262cfb3e2ca4db920cf916b", "score": "0.5275296", "text": "function prj_cleandata($postarray)\n{\n array_walk($postarray, 'prj_cleanfield');\n return $postarray;\n}", "title": "" }, { "docid": "50f26ff93fa1d52f0a15d0d07c758135", "score": "0.52629673", "text": "protected function captureForm(array $formFields=[]) {\n \n // 1.- Capture Form\n //-----------------\n $log_header=$this->line_header . __METHOD__ .\"()] - \";\n try {\n\n // 1.1.- Detect Form Fields\n if(empty($formFields)){$formFields=$this->view->getFields();}\n $output=$formFields;\n \n // 1.2.- Capture Form \n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n $this->debug( $log_header . \"CAPTURE FORM [\". serialize($output) .\"]\");\n foreach($formFields as $key=>$value){\n $valor = $this->test_input($_POST[$key]);\n $output[$key]['value']=$valor;\n }\n } \n } catch (Exception $e) {\n $this->treatException($e\n , $log_header . \"CAPTURE FORM\"\n );\n } catch (Error $e) {\n $this->treatError($e\n , $log_header . \"CAPTURE FORM\"\n );\n }\n\n // 2.- Return\n //-----------------\n return $output;\n }", "title": "" }, { "docid": "70b3c12962cf5c15a43ead0702eb5edf", "score": "0.5257143", "text": "public static function getPOSTValues() {\n\t\tstatic $post;\n\t\tif (!is_array($post)) {\n\t\t\tif (self::$_postValidated === null) {\n\t\t\t\tif (!Environment::getCurrent()->getSession())\n\t\t\t\t\tself::$_postValidated = true;\n\t\t\t\telse {\n\t\t\t\t\t// pretend post data to be validated for accessing the validator\n\t\t\t\t\tself::$_postValidated = true;\n\t\t\t\t\t$validator = self::getPOST('postValidator');\n\t\t\t\t\tself::$_postValidated =\n\t\t\t\t\t\t$validator == Environment::getCurrent()->getSession()->getKey();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!self::$_postValidated)\n\t\t\t\treturn array();\n\t\t\t\n\t\t\t$post = $_POST;\n\t\t\tif (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc())\n\t\t\t\t$post = self::deepStripslashes($post);\n\t\t}\n\t\t\n\t\treturn $post;\n\t}", "title": "" }, { "docid": "c75548bcf842148e2060bc7a0e54391d", "score": "0.5242099", "text": "public static function post($key = NULL, $clean_xss = TRUE)\n {\n if ($clean_xss)\n {\n if (empty($key))\n {\n if($_POST)\n {\n $input = array();\n foreach ($_POST as $key => $string)\n {\n $input[strip_tags($key)] = self::clean($string);\n }\n return $input;\n }\n }\n else\n {\n return self::clean($_POST[$key]);\n }\n }\n else\n {\n if (empty($key))\n {\n return $_POST;\n }\n else\n {\n return $_POST[strip_tags($key)];\n }\n }\n }", "title": "" }, { "docid": "9c5dc8d01df39ec0f14ab033a0a795d4", "score": "0.523663", "text": "function post($post, $tags = FALSE) {\n\tif (!$tags) {\n\t\treturn strip_tags(trim(str_replace(\"'\", \"´\", $_POST[$post])));\n\t} else {\n\t\treturn trim(str_replace(\"'\", \"´\", $_POST[$post]));\n\t}\n}", "title": "" }, { "docid": "959e87a0df167d0adc029af6e00cf12b", "score": "0.5236498", "text": "public function Post ($index = '', $xssClean = true)\r\n\t{\r\n\t\t// Check if a field has been provided\r\n\t\tif (empty ($index) && !empty($_POST) )\r\n\t\t{\r\n\t\t\t$post = array();\r\n\r\n\t\t\t// Loop through the full _POST array and return it\r\n\t\t\tforeach (array_keys ($_POST) as $key)\r\n\t\t\t{\r\n\t\t\t\t$post[$key] = $this->_fetchFromArray ($_POST, $key, $xssClean);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $post;\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->_fetchFromArray ($_POST, $index, $xssClean);\r\n\t}", "title": "" }, { "docid": "6aea1b3634076f08f41294c8905c95e5", "score": "0.52325153", "text": "public function getFormPost($post = array())\n {\n return null;\n }", "title": "" }, { "docid": "df2b0fdfe7c640df7085f6a46d84ee9b", "score": "0.5227061", "text": "function get_quickcreate_form($fieldlabel,$uitype,$fieldname,$tabid)\n{\n\tglobal $log;\n\t$log->debug(\"Entering get_quickcreate_form(\".$fieldlabel.\",\".$uitype.\",\".$fieldname.\",\".$tabid.\") method ...\");\n\t$return_field ='';\n\tswitch($uitype)\t\n\t{\n\t\tcase 1: $return_field .=get_textField($fieldlabel,$fieldname);\n\t\t\t$log->debug(\"Exiting get_quickcreate_form method ...\");\n\t\t\treturn $return_field;\n\t\t\tbreak;\n\t\tcase 2: $return_field .=get_textmanField($fieldlabel,$fieldname,$tabid);\n\t\t\t$log->debug(\"Exiting get_quickcreate_form method ...\");\n\t\t\treturn $return_field;\n\t\t\tbreak;\n\t\tcase 6: $return_field .=get_textdateField($fieldlabel,$fieldname,$tabid);\n\t\t\t$log->debug(\"Exiting get_quickcreate_form method ...\");\n\t\t\treturn $return_field;\n\t\t\tbreak;\n\t\tcase 11: $return_field .=get_textField($fieldlabel,$fieldname);\n\t\t\t$log->debug(\"Exiting get_quickcreate_form method ...\");\n\t\t\treturn $return_field;\n\t\t\tbreak;\n\t\tcase 13: $return_field .=get_textField($fieldlabel,$fieldname);\n\t\t\t$log->debug(\"Exiting get_quickcreate_form method ...\");\n\t\t\treturn $return_field;\t\n\t\t\tbreak;\n\t\tcase 15: $return_field .=get_textcomboField($fieldlabel,$fieldname);\n\t\t\t$log->debug(\"Exiting get_quickcreate_form method ...\");\n\t\t\treturn $return_field;\t\n\t\t\tbreak;\n\t\tcase 16: $return_field .=get_textcomboField($fieldlabel,$fieldname);\n\t\t\t$log->debug(\"Exiting get_quickcreate_form method ...\");\n\t\t\treturn $return_field;\t\n\t\t\tbreak;\n\t\tcase 17: $return_field .=get_textwebField($fieldlabel,$fieldname);\n\t\t\t$log->debug(\"Exiting get_quickcreate_form method ...\");\n\t\t\treturn $return_field;\n\t\t\tbreak;\n\t\tcase 19: $return_field .=get_textField($fieldlabel,$fieldname);\n\t\t\t$log->debug(\"Exiting get_quickcreate_form method ...\");\n\t\t\treturn $return_field;\t\n\t\t\tbreak;\n\t\tcase 22: $return_field .=get_textmanField($fieldlabel,$fieldname,$tabid);\n\t\t\t$log->debug(\"Exiting get_quickcreate_form method ...\");\n\t\t\treturn $return_field;\n\t\t\tbreak;\n\t\tcase 23: $return_field .=get_textdateField($fieldlabel,$fieldname,$tabid);\n\t\t\t$log->debug(\"Exiting get_quickcreate_form method ...\");\n\t\t\treturn $return_field;\n\t\t\tbreak;\n\t\tcase 50: $return_field .=get_textaccField($fieldlabel,$fieldname,$tabid);\n\t\t\t$log->debug(\"Exiting get_quickcreate_form method ...\");\n\t\t\treturn $return_field;\n\t\t\tbreak;\n\t\tcase 51: $return_field .=get_textaccField($fieldlabel,$fieldname,$tabid);\n\t\t\t$log->debug(\"Exiting get_quickcreate_form method ...\");\n\t\t\treturn $return_field;\n\t\t\tbreak;\n\t\tcase 55: $return_field .=get_textField($fieldlabel,$fieldname);\n\t\t\t$log->debug(\"Exiting get_quickcreate_form method ...\");\n\t\t\treturn $return_field;\n\t\t\tbreak;\n\t\tcase 63: $return_field .=get_textdurationField($fieldlabel,$fieldname,$tabid);\n\t\t\t$log->debug(\"Exiting get_quickcreate_form method ...\");\n\t\t\treturn $return_field;\n\t\t\tbreak;\n\t\tcase 71: $return_field .=get_textField($fieldlabel,$fieldname);\n\t\t\t$log->debug(\"Exiting get_quickcreate_form method ...\");\n\t\t\treturn $return_field;\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "031ece4c7417db227ba8bf706aa00bce", "score": "0.5223249", "text": "function retrievePostVar($varName) {\n $postVar = \"\";\n \n if( isset($_POST[$varName]) ) {\n $postVar = strip_tags($_POST[$varName]);\n $postVar = trim($postVar);\n }\n \n return $postVar;\n}", "title": "" }, { "docid": "c2a0652707da8877bd3385d3b6e61aef", "score": "0.52215415", "text": "function safePost($approved)\n{\n $errors = FALSE;\n \n foreach($_POST as $key => $value)\n {\n if(!in_array($key, $approved))\n {\n unset($_POST[$key]);\n echo (!$errors) ? \"<font color=BLUE>Invalid POST entry: '$key'\" : \", '$key'\";\n $errors = TRUE; \n }\n }\n \n if($errors)\n {\n echo \"</font><br>\\n\";\n displayErrorDie(\"Invalid POST entries.\");\n }\n}", "title": "" }, { "docid": "a214d2d64a99fde55bd6ffff52f850f9", "score": "0.5216146", "text": "function get_form_data_v($inputValue){\r\n\r\n\t\t$values \t= array();\r\n\r\n\t\t//Filter the form and put all property values into a keys array:\r\n\t\tforeach ($_POST as $key => $value) {\r\n\t\t\tif(strpos($key, $inputValue) === 0){\r\n\t\t\t\t$values[]=$value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $values;\r\n\t}", "title": "" } ]
1b39e02288f33f806d95ffad0bcd4534
Seed the application's database.
[ { "docid": "fc7976b9806107b1f51d840281cbc432", "score": "0.0", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(ComunasTableSeeder::class);\n $this->call(MesesTableSeeder::class);\n $this->call(TiposRadiacionTableSeeder::class);\n $this->call(RadiacionesTableSeeder::class);\n $this->call(TemperaturasTableSeeder::class);\n $this->call(MaterialesTableSeeder::class);\n $this->call(PropiedadesMaterialesTableSeeder::class);\n $this->call(MaterialTienePropiedadTableSeeder::class);\n $this->call(TiposMaterialesTableSeeder::class);\n $this->call(MaterialPropiedadTipoTableSeeder::class);\n $this->call(VentanasTableSeeder::class);\n $this->call(PropiedadesVentanasTableSeeder::class);\n $this->call(VentanaTienePropiedadTableSeeder::class);\n $this->call(TiposVentanasTableSeeder::class);\n $this->call(VentanaPropiedadTipoTableSeeder::class);\n $this->call(MarcosTableSeeder::class);\n $this->call(PropiedadesMarcosTableSeeder::class);\n $this->call(MarcoTienePropiedadTableSeeder::class);\n $this->call(TiposMarcosTableSeeder::class);\n $this->call(MarcoPropiedadTipoTableSeeder::class);\n\n }", "title": "" } ]
[ { "docid": "9d79d54688565c6d917c9faae161628a", "score": "0.8064933", "text": "public static function dbSeed(){\n\t\tif (App::runningUnitTests()) {\n\t\t\t//Turn foreign key checks off\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');// <- USE WITH CAUTION!\n\t\t\t//Seed tables\n\t\t\tArtisan::call('db:seed');\n\t\t\t//Turn foreign key checks on\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');// <- SHOULD RESET ANYWAY BUT JUST TO MAKE SURE!\n\t\t}\n\t}", "title": "" }, { "docid": "842f742cbdf510ce80042be58d8703ee", "score": "0.7848158", "text": "protected function seedDB()\n {\n $ans = $this->ask('Seed your database?: ', 'y');\n\n // Check if the answer is true\n if (preg_match('/^y/', $ans))\n {\n $this->call('db:seed');\n $this->comment('');\n $this->comment('Database successfully seeded.');\n $this->comment('=====================================');\n echo \"Your app is now ready!\";\n }\n }", "title": "" }, { "docid": "25e08f78392fabf81feceda5a737e516", "score": "0.7674873", "text": "protected function seedDatabase(): void\n {\n $this->seedProductCategories();\n $this->seedProducts();\n }", "title": "" }, { "docid": "acfde3a3f507818ede697244f7fb59f4", "score": "0.724396", "text": "public function setupDatabase()\n {\n Artisan::call('migrate:refresh');\n Artisan::call('db:seed');\n\n self::$setupDatabase = false;\n }", "title": "" }, { "docid": "95da2dd2f54b0adac5f3a77feafea8f7", "score": "0.7216743", "text": "public function run()\n {\n $this->seed('FormsMenuItemsTableSeeder');\n $this->seed('FormsDataTypesTableSeeder');\n $this->seed('FormsDataRowsTableSeeder');\n $this->seed('FormsPermissionsTableSeeder');\n $this->seed('FormsSettingsTableSeeder');\n $this->seed('FormsTableSeeder');\n }", "title": "" }, { "docid": "3b0f516d870209c2b2dd9ce490f0f73c", "score": "0.7132209", "text": "public function run()\n {\n if (defined('STDERR')) fwrite(STDERR, print_r(\"\\n--- Seeding ---\\n\", TRUE));\n\n if (App::environment('production')) {\n if (defined('STDERR')) fwrite(STDERR, print_r(\"--- ERROR: Seeding in Production is prohibited ---\\n\", TRUE));\n return;\n }\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n $this->call(DistrictsTableSeeder::class);\n $this->call(ConfigsTableSeeder::class);\n $this->call(ConfigContentsTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n if (defined('STDERR')) fwrite(STDERR, print_r(\"Set FOREIGN_KEY_CHECKS=1 --- DONE\\n\", TRUE));\n\n // \\Artisan::call('command:regenerate-user-feeds');\n\n \\Cache::flush();\n\n if (defined('STDERR')) fwrite(STDERR, print_r(\"--- End Seeding ---\\n\\n\", TRUE));\n }", "title": "" }, { "docid": "ffc67fd509fc02150381396b73a82b5e", "score": "0.70970356", "text": "protected function setupDatabase()\n {\n $this->call('migrate');\n $this->call('db:seed');\n\n $this->info('Database migrated and seeded.');\n }", "title": "" }, { "docid": "16547d5faa64dc71264cbf37cd0a5a22", "score": "0.70752203", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "title": "" }, { "docid": "1f7ebfeedb70b0fa8f9253395e890457", "score": "0.704928", "text": "public function seedDatabase(): void\n {\n echo \"Running seeds\";\n\n // Folder where all the seeds are.\n $folder = __DIR__ . '/../seeds/';\n\n // Scan all files/folders inside database.\n $files = \\scandir($folder);\n\n $seeders = [];\n foreach ($files as $key => $file) {\n\n // All files that don't start with a dot.\n if ($file[0] !== '.') {\n\n // Load the file.\n require_once $folder . $file;\n\n // We have to call the migrations after because\n // some seeds are dependant from other seeds.\n $seeders[] = explode('.', $file)[0];\n }\n }\n\n // Run all seeds.\n foreach ($seeders as $seeder) {\n (new $seeder)->run();\n }\n }", "title": "" }, { "docid": "2b904d323ab1cf2a6dd3e896632c992a", "score": "0.699208", "text": "protected function seedDatabase()\n {\n //$this->app->make('db')->table(static::TABLE_NAME)->delete();\n\n TestExtendedModel::create([\n 'unique_field' => '999',\n 'second_field' => null,\n 'name' => 'unchanged',\n 'active' => true,\n 'hidden' => 'invisible',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1234567',\n 'second_field' => '434',\n 'name' => 'random name',\n 'active' => false,\n 'hidden' => 'cannot see me',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1337',\n 'second_field' => '12345',\n 'name' => 'special name',\n 'active' => true,\n 'hidden' => 'where has it gone?',\n ]);\n }", "title": "" }, { "docid": "42d621ddcf018b6c5126115186414872", "score": "0.6987078", "text": "public function initDatabase()\n {\n $this->call('migrate');\n\n $userModel = config('admin.database.users_model');\n\n if ($userModel::count() == 0) {\n $this->call('db:seed', ['--class' => AdminSeeder::class]);\n }\n }", "title": "" }, { "docid": "045743c1357c4420078f9c15a541aece", "score": "0.69839287", "text": "public function run ()\n {\n if (App::environment() === 'production') {\n exit('Seed should be run only in development/debug environment.');\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('role_user')->truncate();\n\n // Root user\n $user = User::find(1);\n $user->assignRole('owner');\n\n $user = User::find(2);\n $user->assignRole('admin');\n\n $user = User::find(3);\n $user->assignRole('admin');\n\n $user = User::find(4);\n $user->assignRole('moderator');\n\n $user = User::find(5);\n $user->assignRole('moderator');\n \n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "title": "" }, { "docid": "405457e4748850c8afea73856c44f600", "score": "0.6966499", "text": "public function run()\n {\n Model::unguard();\n\n if (env('DB_CONNECTION') == 'mysql') {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n }\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(EntrustTableSeeder::class);\n\n $this->call(AccounttypeSeeder::class);\n $this->call(AppUserTableSeeder::class);\n $this->call(AppEmailUserTableSeeder::class);\n\n\n $this->call(CountryTableSeeder::class);\n $this->call(CityTableSeeder::class);\n\n\n $this->call(PostTypeTableSeeder::class);\n $this->call(PostSubTypeTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(AppPostSolvedTableSeeder::class);\n\n\n $this->call(AppCommentTypeTableSeeder::class);\n // $this->call(AppCommentTableSeeder::class);\n // $this->call(AppSubCommentTableSeeder::class);\n\n\n if (env('DB_CONNECTION') == 'mysql') {\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "55e01a4037613108b381035b246006dc", "score": "0.68990964", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::table('password_resets')->truncate();\n DB::table('domains')->truncate();\n DB::table('folders')->truncate();\n DB::table('bookmarks')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->seedUserAccount('jpearson@ec4p.com');\n $this->seedUserAccount('jgpearson1@gmail.com');\n }", "title": "" }, { "docid": "24fd5cafb5e6ee8c42bb9bed462271f7", "score": "0.6868679", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n // $this->call(UsersTableSeeder::class);\n /* Schema::dropIfExists('employees');\n Schema::dropIfExists('users');\n Schema::dropIfExists('requests');\n Schema::dropIfExists('requeststatus');*/\n User::truncate();\n InstallRequest::truncate();\n RequestStatus::truncate();\n\n $cantidadEmployyes = 20;\n $cantidadUsers = 20;\n $cantidadRequestStatus = 3;\n $cantidadRequests = 200;\n\n factory(User::class, $cantidadUsers)->create();\n factory(RequestStatus::class, $cantidadRequestStatus)->create();\n factory(InstallRequest::class, $cantidadRequests)->create();\n }", "title": "" }, { "docid": "2da6cbc88c45b008eed0803a854da9ca", "score": "0.68468624", "text": "public function run()\n {\n Model::unguard();\n foreach (glob(__DIR__ . '/seeds/*.php') as $filename) {\n require_once($filename);\n }\n // $this->call(UserTableSeeder::class);\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n// $this->call('CustomerTableSeeder');\n $this->call('PhotoTableSeeder');\n// $this->call('ProductTableSeeder');\n// $this->call('StaffTableSeeder');\n// $this->call('PasswordResetsTableSeeder');\n// $this->call('UsersTableSeeder');\n $this->call('CustomersTableSeeder');\n $this->call('EmployeesTableSeeder');\n $this->call('InventoryTransactionTypesTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrderDetailsStatusTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('InvoicesTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrdersStatusTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n\n $this->call('OrdersTaxStatusTableSeeder');\n $this->call('PrivilegesTableSeeder');\n $this->call('EmployeePrivilegesTableSeeder');\n $this->call('ProductsTableSeeder');\n $this->call('InventoryTransactionsTableSeeder');\n $this->call('PurchaseOrderDetailsTableSeeder');\n\n $this->call('PurchaseOrderStatusTableSeeder');\n $this->call('PurchaseOrdersTableSeeder');\n $this->call('SalesReportsTableSeeder');\n $this->call('ShippersTableSeeder');\n $this->call('StringsTableSeeder');\n $this->call('SuppliersTableSeeder');\n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n Model::reguard();\n }", "title": "" }, { "docid": "3efa2a2b2fff556936230638fc2f37d6", "score": "0.68307716", "text": "public function run()\n\t{\n $this->cleanDatabase();\n\n Eloquent::unguard();\n\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('ProductsTableSeeder');\n\t\t$this->call('CartsTableSeeder');\n $this->call('StoreTableSeeder');\n $this->call('AdvertisementsTableSeeder');\n \n\t}", "title": "" }, { "docid": "121c1c9fd45c49cb7ba5a46fa1e0562f", "score": "0.68206114", "text": "public function run()\n {\n \tDB::table('seeds')->truncate();\n\n $seeds = array(\n array(\n 'name' => 'PreferencesTableSeeder_Update_11_18_2013',\n ),\n array(\n 'name' => 'PreferencesTableSeeder_Update_11_20_2013',\n ),\n );\n\n // Uncomment the below to run the seeder\n DB::table('seeds')->insert($seeds);\n }", "title": "" }, { "docid": "c8f9450dd0a187387bfb971ad4b665b8", "score": "0.6803113", "text": "public function run()\n {\n $this->createDefaultPermissionSeeder(env('DB_CONNECTION', 'mysql'));\n }", "title": "" }, { "docid": "c8f9450dd0a187387bfb971ad4b665b8", "score": "0.6803113", "text": "public function run()\n {\n $this->createDefaultPermissionSeeder(env('DB_CONNECTION', 'mysql'));\n }", "title": "" }, { "docid": "3ca7a5413652d25c74ae75fecd6a6143", "score": "0.6801801", "text": "protected function setUp(): void\n {\n $db = new DB;\n\n $db->addConnection([\n 'driver' => 'sqlite',\n 'database' => ':memory:',\n ]);\n\n $db->bootEloquent();\n $db->setAsGlobal();\n\n $this->createSchema();\n }", "title": "" }, { "docid": "6bc84e00e88fdfb47fd7e73c554b23fa", "score": "0.6789746", "text": "public function run()\n {\n //$this->call('UserTableSeeder');\n //$this->call('ProjectTableSeeder');\n //$this->call('TaskTableSeeder');\n\n /**\n * Prepare seeding\n */\n $faker = Faker::create();\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Model::unguard();\n\n /**\n * Seeding user table\n */\n App\\User::truncate();\n factory(App\\User::class)->create([\n 'name' => 'KCK',\n 'email' => 'chrud66@example.com',\n 'password' => bcrypt('password')\n ]);\n\n /*factory(App\\User::class, 9)->create();\n $this->command->info('users table seeded');*/\n\n /**\n * Seeding roles table\n */\n Spatie\\Permission\\Models\\Role::truncate();\n DB::table('model_has_roles')->truncate();\n $superAdminRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '최고 관리자'\n ]);\n $adminRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '관리자'\n ]);\n $regularRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '정회원'\n ]);\n $associateRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '준회원'\n ]);\n\n App\\User::where('email', '!=', 'chrud66@example.com')->get()->map(function ($user) use ($regularRole) {\n $user->assignRole($regularRole);\n });\n\n App\\User::whereEmail('chrud66@example.com')->get()->map(function ($user) use ($superAdminRole) {\n $user->assignRole($superAdminRole);\n });\n $this->command->info('roles table seeded');\n\n /**\n * Seeding articles table\n */\n App\\Article::truncate();\n $users = App\\User::all();\n\n $users->each(function ($user) use ($faker) {\n $user->articles()->save(\n factory(App\\Article::class)->make()\n );\n });\n $this->command->info('articles table seeded');\n\n /**\n * Seeding comments table\n */\n App\\Comment::truncate();\n $articles = App\\Article::all();\n\n $articles->each(function ($article) use ($faker, $users) {\n for ($i = 0; $i < 10; $i++) {\n $article->comments()->save(\n factory(App\\Comment::class)->make([\n 'author_id' => $faker->randomElement($users->pluck('id')->toArray()),\n //'parent_id' => $article->id\n ])\n );\n };\n });\n $this->command->info('comments table seeded');\n\n /**\n * Seeding tags table\n */\n App\\Tag::truncate();\n DB::table('article_tag')->truncate();\n $articles->each(function ($article) use ($faker) {\n $article->tags()->save(\n factory(App\\Tag::class)->make()\n );\n });\n $this->command->info('tags table seeded');\n\n /**\n * Seeding attachments table\n */\n App\\Attachment::truncate();\n if (!File::isDirectory(attachment_path())) {\n File::deleteDirectory(attachment_path(), true);\n }\n\n $articles->each(function ($article) use ($faker) {\n $article->attachments()->save(\n factory(App\\Attachment::class)->make()\n );\n });\n\n //$files = App\\Attachment::pluck('name');\n\n if (!File::isDirectory(attachment_path())) {\n File::makeDirectory(attachment_path(), 777, true);\n }\n\n /*\n foreach ($files as $file) {\n File::put(attachment_path($file), '');\n }\n */\n\n $this->command->info('attachments table seeded');\n\n /**\n * Close seeding\n */\n Model::reguard();\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "title": "" }, { "docid": "2cf35b5c88130935be1716e550aea2d8", "score": "0.6788733", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => 'admin@yahoo.com',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "title": "" }, { "docid": "a3b5e348a2c2027bcd0993a793190bc4", "score": "0.6788008", "text": "public function run()\n {\n $this->call(CountriesTableSeeder::class);\n $this->call(StatesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n\n factory(Group::class)->create();\n factory(Contact::class, 5000)->create();\n }", "title": "" }, { "docid": "c28976bc68e5ebf658f2a1d5cae4172c", "score": "0.6786291", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t// $this->call('AdminTableSeeder');\n\t\t// $this->call('UserTableSeeder');\n\t\t// $this->call('MenuTableSeeder');\n\t\t// $this->call('ProductTableSeeder');\n\t\t// $this->call('CategoryTableSeeder');\n\t\t// $this->call('OptionTableSeeder');\n\t\t// $this->call('OptionGroupTableSeeder');\n\t\t// $this->call('TypeTableSeeder');\n\t\t// $this->call('LayoutTableSeeder');\n\t\t// $this->call('LayoutDetailTableSeeder');\n\t\t// $this->call('BannerTableSeeder');\n\t\t// $this->call('ConfigureTableSeeder');\n\t\t// $this->call('PageTableSeeder');\n\t\t// $this->call('ImageTableSeeder');\n\t\t// $this->call('ImageableTableSeeder');\n\t\t// ======== new Seed =======\n\t\t$this->call('AdminsTableSeeder');\n\t\t$this->call('BannersTableSeeder');\n\t\t$this->call('CategoriesTableSeeder');\n\t\t$this->call('ConfiguresTableSeeder');\n\t\t$this->call('ImageablesTableSeeder');\n\t\t$this->call('ImagesTableSeeder');\n\t\t$this->call('LayoutsTableSeeder');\n\t\t$this->call('LayoutDetailsTableSeeder');\n\t\t$this->call('MenusTableSeeder');\n\t\t$this->call('OptionablesTableSeeder');\n\t\t$this->call('OptionsTableSeeder');\n\t\t$this->call('OptionGroupsTableSeeder');\n\t\t$this->call('PagesTableSeeder');\n\t\t$this->call('PriceBreaksTableSeeder');\n\t\t$this->call('ProductsTableSeeder');\n\t\t$this->call('ProductsCategoriesTableSeeder');\n\t\t$this->call('SizeListsTableSeeder');\n\t\t$this->call('TypesTableSeeder');\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('ContactsTableSeeder');\n\t\t$this->call('RolesTableSeeder');\n\t\t$this->call('PermissionsTableSeeder');\n\t\t$this->call('PermissionRoleTableSeeder');\n\t\t$this->call('AssignedRolesTableSeeder');\n\t\t$this->call('OrdersTableSeeder');\n\t\t$this->call('OrderDetailsTableSeeder');\n\t\tCache::flush();\n\t\t// BackgroundProcess::copyFromVI();\n\t}", "title": "" }, { "docid": "d139be93dece287f9994e7edc8f530ab", "score": "0.67765796", "text": "public function run()\n {\n Model::unguard();\n\n User::create([\n 'email' => 'admin@example.org',\n 'name' => 'admin',\n 'password' => Hash::make('1234'),\n 'email_verified_at' => Carbon::now()\n ]);\n\n factory(User::class, 200)->create();\n\n // $this->call(\"OthersTableSeeder\");\n }", "title": "" }, { "docid": "3ce6673f581e3cecf13f5c82072162e0", "score": "0.67742485", "text": "public function run()\n {\n $this->seedRegularUsers();\n $this->seedAdminUser();\n }", "title": "" }, { "docid": "9edac58b656987ff00fde10933b49e77", "score": "0.677106", "text": "public function run()\n {\n if (\\App::environment() === 'local') {\n\n // Delete existing data\n\n\n Eloquent::unguard();\n\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // Truncate all tables, except migrations\n $tables = array_except(DB::select('SHOW TABLES'), ['migrations']);\n foreach ($tables as $table) {\n $tables_in_database = \"Tables_in_\" . Config::get('database.connections.mysql.database');\n DB::table($table->$tables_in_database)->truncate();\n }\n\n // supposed to only apply to a single connection and reset it's self\n // but I like to explicitly undo what I've done for clarity\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n //get roles\n $this->call('AccountSeeder');\n $this->call('CountrySeeder');\n $this->call('StateSeeder');\n $this->call('CitySeeder');\n $this->call('OptionSeeder');\n $this->call('TagSeeder');\n $this->call('PrintTemplateSeeder');\n $this->call('SettingsSeeder');\n\n\n\n if(empty($web_installer)) {\n $admin = Sentinel::registerAndActivate(array(\n 'email' => 'admin@crm.com',\n 'password' => \"admin\",\n 'first_name' => 'Admin',\n 'last_name' => 'Doe',\n ));\n $admin->user_id = $admin->id;\n $admin->save();\n\n $adminRole = Sentinel::findRoleById(1);\n $adminRole->users()->attach($admin);\n }\n else {\n $admin = Sentinel::findById(1);\n }\n\n //add dummy staff and customer\n $staff = Sentinel::registerAndActivate(array(\n 'email' => 'staff@crm.com',\n 'password' => \"staff\",\n 'first_name' => 'Staff',\n 'last_name' => 'Doe',\n ));\n $admin->users()->save($staff);\n\n foreach ($this->getPermissions() as $permission) {\n $staff->addPermission($permission);\n }\n $staff->save();\n\n $customer = Sentinel::registerAndActivate(array(\n 'email' => 'customer@crm.com',\n 'password' => \"customer\",\n 'first_name' => 'Customer',\n 'last_name' => 'Doe',\n ));\n Customer::create(array('user_id' => $customer->id, 'belong_user_id' => $staff->id));\n $staff->users()->save($customer);\n\n //add respective roles\n\n $staffRole = Sentinel::findRoleById(2);\n $staffRole->users()->attach($staff);\n $customerRole = Sentinel::findRoleById(3);\n $customerRole->users()->attach($customer);\n\n\n\n DB::table('sales_teams')->truncate();\n DB::table('opportunities')->truncate();\n\n //Delete existing seeded users except the first 4 users\n User::where('id', '>', 3)->get()->each(function ($user) {\n $user->forceDelete();\n });\n\n //Get the default ADMIN\n $user = User::find(1);\n $staffRole = Sentinel::getRoleRepository()->findByName('staff');\n $customerRole = Sentinel::getRoleRepository()->findByName('customer');\n\n //Seed Sales teams for default ADMIN\n foreach (range(1, 4) as $j) {\n $this->createSalesTeam($user->id, $j, $user);\n $this->createOpportunity($user, $user->id, $j);\n }\n\n\n //Get the default STAFF\n $staff = User::find(2);\n $this->createSalesTeam($staff->id, 1, $staff);\n $this->createSalesTeam($staff->id, 2, $staff);\n\n //Seed Sales teams for each STAFF\n foreach (range(1, 4) as $j) {\n $this->createSalesTeam($staff->id, $j, $staff);\n $this->createOpportunity($staff, $staff->id, $j);\n }\n\n foreach (range(1, 3) as $i) {\n $staff = $this->createStaff($i);\n $user->users()->save($staff);\n $staffRole->users()->attach($staff);\n\n $customer = $this->createCustomer($i);\n $staff->users()->save($customer);\n $customerRole->users()->attach($customer);\n $customer->customer()->save(factory(\\App\\Models\\Customer::class)->make());\n\n\n //Seed Sales teams for each STAFF\n foreach (range(1, 5) as $j) {\n $this->createSalesTeam($staff->id, $j, $staff);\n $this->createOpportunity($staff, $i, $j);\n }\n\n }\n\n //finally call it installation is finished\n file_put_contents(storage_path('installed'), 'Welcome to LCRM');\n }\n }", "title": "" }, { "docid": "5902dc21eaa995c29569d4b6fe0f9c02", "score": "0.67651874", "text": "public function run()\n {\n if (env('DB_DATABASE') == 'connection') {\n Connection::create([\n \"ruc\" => \"12312312312\",\n \"basedata\" => \"nbdata2018_1\",\n ]);\n \n Connection::create([\n \"ruc\" => \"12312312315\",\n \"basedata\" => \"nbdata2018_2\",\n ]);\n \n $this->call(ConnectionTableSeeder::class);\n } else {\n $this->call(AppSeeder::class);\n }\n }", "title": "" }, { "docid": "11f93fd317406678d68655e471ff927a", "score": "0.6761959", "text": "public function setupDatabase()\n {\n exec('rm ' . storage_path() . '/testdb.sqlite');\n exec('cp ' . 'database/database.sqlite ' . storage_path() . '/testdb.sqlite');\n }", "title": "" }, { "docid": "189174cea9e9e7145c489e18fd0089a4", "score": "0.675823", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "574daec9c61801a3e21b6e40a7bb00a3", "score": "0.67337847", "text": "public function run()\n {\n # truncates tables before seeding\n foreach ($this->toTruncate as $table) {\n DB::table($table)->delete();\n }\n\n factory(App\\Models\\Product::class, 25)->create();\n }", "title": "" }, { "docid": "f1aab925715e5061693bb722dde93465", "score": "0.6733437", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Post::truncate();\n Comment::truncate();\n // CommentReply::truncate();\n \n\n\n factory(User::class,10)->create();\n factory(Post::class,20)->create();\n factory(Comment::class,30)->create();\n // factory(CommentReply::class,30)->create();\n }", "title": "" }, { "docid": "47a565fee92e5bb94b1f5027c76d81ed", "score": "0.67295784", "text": "public function run()\n\t{\n \n Eloquent::unguard();\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\t\t$this->call('UserTableSeeder');\n\t $this->call('LayerTableSeeder');\n $this->call('UserLevelTableSeeder');\n $this->call('RoleUserTableSeeder');\n $this->call('RoleLayerTableSeeder');\n $this->call('BookmarkTableSeeder');\n \n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\t}", "title": "" }, { "docid": "64ddc727eef6e28c29db4c4be58c3578", "score": "0.67290515", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "title": "" }, { "docid": "5b880595ea5798cabac1baebe896e5e7", "score": "0.6724652", "text": "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "title": "" }, { "docid": "9ff48bd5bae551310205501e1200d440", "score": "0.67226326", "text": "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = your.email@domain.com\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "title": "" }, { "docid": "a64a79b6290a6d216a2915060c8b9e07", "score": "0.6722267", "text": "public function run()\n {\n DB::statement('SET foreign_key_checks = 0');\n DB::table('topics')->truncate();\n\n factory(\\App\\Topic::class, 100)->create();\n // ->each(function($topic) {\n\n // // Seed para a relação com group\n // $topic->group()->save(factory(App\\Group::class)->make());\n\n // // Seed para a relação com topicMessages\n // $topic->topicMessages()->save(factory(App\\TopicMessage::class)->make());\n\n // // Seed para a relação com user\n // $topic->user()->save(factory(App\\User::class)->make());\n // });\n \n DB::statement('SET foreign_key_checks = 1');\n }", "title": "" }, { "docid": "b19ea8615691233689c410d5d9d618f4", "score": "0.6721339", "text": "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "title": "" }, { "docid": "5135c61ecf0c8b9bff6aa12600c6be3a", "score": "0.6715842", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n Categoria::truncate();\n Atractivo::truncate();\n Galeria::truncate();\n User::truncate();\n\n $this->call(CategoriasTableSeeder::class);\n $this->call(AtractivosTableSeeder::class);\n $this->call(GaleriasTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n }", "title": "" }, { "docid": "2aecf9eb364d400373643b09bc309f98", "score": "0.67070943", "text": "public function run(Faker $faker)\n {\n Schema::disableForeignKeyConstraints();\n DB::table('users')->insert([\n 'name' => $faker->name(),\n 'email' => 'admin@admin.com',\n 'password' => Hash::make('12345678'),\n ]);\n }", "title": "" }, { "docid": "50d1afb9699a61553b0055191290858c", "score": "0.67060536", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "title": "" }, { "docid": "64ad50be9dd7b9419383b6641a02f8a8", "score": "0.67031103", "text": "public function run()\n {\n\t $this->call(CategoryTableSeed::class);\n\t $this->call(ProductTableSeed::class);\n\t $this->call(UserTableSeed::class);\n }", "title": "" }, { "docid": "7d910a22627c6e84105a219bf261513f", "score": "0.6702514", "text": "public function run()\n {\n $this->cleanDatabase();\n\n factory(User::class, 50)->create();\n factory(Document::class, 30)->create();\n }", "title": "" }, { "docid": "5e96f7590986cfcc5b9acbc78d7ab3d6", "score": "0.6702361", "text": "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "0439dc2285231aa0788f0cbfba3c0e1a", "score": "0.67017967", "text": "public function run()\n {\n \t// DB::table('webapps')->delete();\n\n $webapps = array(\n\n );\n\n // Uncomment the below to run the seeder\n // DB::table('webapps')->insert($webapps);\n }", "title": "" }, { "docid": "cfd926a12de7425b95c464a284d003f0", "score": "0.6695973", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'test@yandex.ru'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "0b54969e6867810452ab3c6b1860caa5", "score": "0.6693496", "text": "public function run()\n {\n $tables = array(\n 'users',\n 'companies',\n 'stands',\n 'events',\n 'visitors',\n 'api_keys'\n );\n\n if (!App::runningUnitTests()) {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n }\n\n foreach ($tables as $table) {\n DB::table($table)->truncate();\n }\n\n $this->call(UsersTableSeeder::class);\n $this->call(EventsTableSeeder::class);\n $this->call(CompaniesTableSeeder::class);\n $this->call(StandsTableSeeder::class);\n $this->call(VisitorsTableSeeder::class);\n\n if (!App::runningUnitTests()) {\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }\n }", "title": "" }, { "docid": "80029eda94306be7dd06321a86e96e4f", "score": "0.66868156", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "title": "" }, { "docid": "6e1c0e2c1bf6c7cea6c044cb06d54c79", "score": "0.66837406", "text": "public function run()\n {\n $clear = $this->command->confirm('Wil je de database leegmaken? (Dit haalt alle DATA weg)');\n\n if ($clear):\n $this->command->callSilent('migrate:refresh');\n $this->command->info('Database Cleared, starting seeding');\n endif;\n\n $this->call([\n SeedSeeder::class,\n RoleSeeder::class,\n UserSeeder::class,\n // BoardgameSeeder::class,\n BoardgamesTableSeeder::class,\n StatusSeeder::class,\n TournamentSeeder::class,\n AchievementsSeeder::class,\n TournamentUsersSeeder::class,\n ]);\n }", "title": "" }, { "docid": "16b2e1d3b4d2acea1fae2044bbbfc336", "score": "0.6678434", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n $this->call(PaisSeeder::class);\n $this->call(DepartamentoSeeder::class);\n $this->call(MunicipioSeeder::class);\n $this->call(PersonaSeeder::class);\n }", "title": "" }, { "docid": "8a680c765a511d82bd7dd155e4e5128c", "score": "0.66755766", "text": "public function run()\n {\n //\n if (App::environment() === 'production') {\n exit('Do not seed in production environment');\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n\n DB::table('events')->truncate();\n \n Event::create([\n 'id' => 1,\n 'name' => 'Spot Registration For Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'register',\n 'formId'\t\t=> null,\n ]);\n\n Event::create([\n 'id' => 2,\n 'name' => 'Spot Screening For Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'screen',\n 'formId'\t\t=> 1,\n ]);\n \n Event::create([\n 'id' => 3,\n 'name' => 'Spot Registration For Skin Cancer',\n 'cancerId' => 2,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'register',\n 'formId'\t\t=> null,\n ]);\n\n\n Event::create([\n 'id' => 3,\n 'name' => 'Registration cum Screening camp for Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addWeeks(1),\n 'eventType'\t\t=> 'register_screen',\n 'formId'\t\t=> 1,\n ]);\n \n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n\n }", "title": "" }, { "docid": "c11f54a340d90e2ff3d67bb38e68fd66", "score": "0.66726524", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // Para que no verifique el control de claves foráneas al hacer el truncate haremos:\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n\t\t// Primero hacemos un truncate de las tablas para que no se estén agregando datos\n\t\t// cada vez que ejecutamos el seeder.\n\t\t//Foto::truncate();\n\t\t//Album::truncate();\n\t\t//Usuario::truncate();\n DB::table('users')->delete();\n DB::table('ciudades')->delete();\n DB::table('tiendas')->delete();\n DB::table('ofertas')->delete();\n DB::table('ventas')->delete();\n\n\n\t\t// Es importante el orden de llamada.\n\t\t$this->call('UserSeeder');\n $this->call('CiudadSeeder');\n\t\t$this->call('TiendaSeeder');\n $this->call('OfertaSeeder');\n $this->call('VentaSeeder');\n }", "title": "" }, { "docid": "544ed88db5e67c97453fa909fe9cabf5", "score": "0.666599", "text": "public function run()\n {\n $this->call(\\Database\\Seeders\\GroupByRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\SingleIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\MultiIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\JoinFiveTablesSeeder::class);\n\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// // 試しに一回流す\n// $data = $this->makeData(0, 'userFactory', 1);\n// DB::table('users')->insert($data);\n// $data = $this->makeData(0, 'userDetailFactory', 1);\n// DB::table('user_details')->insert($data);\n//\n// // $this->call(UsersTableSeeder::class);\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userFactory', 2500);\n// DB::table('users')->insert($data);\n// }\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userDetailFactory', 2500);\n// DB::table('user_details')->insert($data);\n// }\n }", "title": "" }, { "docid": "95b3b07dce5bc3d655879364cd206a21", "score": "0.664943", "text": "public function run()\n {\n $this->truncateTables([\n 'users',\n 'categories',\n 'types',\n 'courses',\n 'classrooms',\n 'contents',\n 'companies',\n ]);\n\n $this->call(CompanyTableSeeder::class);\n $this->call(TypeTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(CoursesTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n $this->call(ContentTableSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(ClassroomTableSeeder::class);\n $this->call(TestTableSeeder::class);\n $this->call(BankTableSeeder::class);\n\n\n // factory(\\App\\User::class, 50)\n // ->create()\n // ->each(function ($user) {\n // // $user->companies()->save();\n // $company = \\App\\Company::inRandomOrder()->first();\n // $user->companies()->attach($company->id);\n // $user->assignRole(['participante']);\n // });\n /*\n factory(\\App\\User::class, 50)\n ->create()\n ->each(function ($user) {\n $user->assignRole(['participante']);\n });*/\n }", "title": "" }, { "docid": "16a41b1d21b90370dbad313e06d54c0c", "score": "0.6640641", "text": "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "title": "" }, { "docid": "37572a10db872492e8fd88e57abb8b18", "score": "0.663921", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Question::truncate();\n Option::truncate();\n// Answer::truncate();\n Quiz::truncate();\n QuizQuestion::truncate();\n\n //for admin\n $admin = factory(User::class)->create([\n 'name' => 'Admin',\n 'email' => 'admin@mail.com',\n 'is_admin' => 1,\n ]);\n\n //for user\n $user = factory(User::class)->create([\n 'name' => 'User',\n 'email' => 'user@mail.com',\n ]);\n\n factory(Question::class, 100)->create()->each(function ($question) {\n factory(Option::class, mt_rand(2, 4))->create([\n 'question_id' => $question->id,\n ]);\n });\n\n factory(Quiz::class, 10)->create()->each(function ($quiz) {\n\n factory(QuizQuestion::class, mt_rand(5, 10))->create();\n });\n\n\n }", "title": "" }, { "docid": "a488b949f6efd95a9da7dfe56ccad211", "score": "0.66387916", "text": "public function run()\n {\n $this->call([\n SiteSettingsSeeder::class,\n LaratrustSeeder::class,\n CountrySeeder::class,\n GovernorateSeeder::class,\n FaqSeeder::class,\n SitePageSeeder::class,\n UsersSeeder::class,\n ]);\n\n Country::whereiso(\"EG\")->update(['enable_shipping' => true]);\n\n factory(User::class, 400)->create();\n\n Category::create([\n 'en' => [\n 'name' => \"cake tools\"\n ]\n ]);\n\n Category::create([\n 'en' => [\n 'name' => \"Party Supplies\"\n ]\n ]);\n\n $this->call([\n ProductCategorySeeder::class,\n ProductSeeder::class\n ]);\n }", "title": "" }, { "docid": "d36ae264ea8bed5db5df8af79c6555a5", "score": "0.6636016", "text": "public function run()\n {\n $this->call(PermissionsTableSeeder::class);\n\n if (App::environment('local')) {\n $this->call(FakeUsersTableSeeder::class);\n $this->call(FakeArticlesTableSeeder::class);\n $this->call(FakeEventsTableSeeder::class);\n }\n }", "title": "" }, { "docid": "83611dcc727797d754d853257c05cfaa", "score": "0.6633116", "text": "public function run()\n {\n Model::unguard();\n\n $this->call(CategoryTypesTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(AccountTypesTableSeeder::class);\n $this->call(TransactionTypesTableSeeder::class);\n\n if (App::environment() !== 'production') {\n $this->call(UserTableSeeder::class);\n $this->call(AccountBudgetTableSeeder::class);\n $this->call(TransactionTableSeeder::class);\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "132122d759458a0dd574d4ee445723f0", "score": "0.6629787", "text": "public function run()\n {\n User::truncate();\n Product::truncate();\n User::forceCreate([\n 'name' => 'foo',\n 'email' => 'foo@foo.com',\n 'password' => bcrypt('password'),\n ]);\n factory(User::class, 5)->create();\n factory(Product::class, 5)->create();\n }", "title": "" }, { "docid": "87c4056fa72c6f615cce8c09387b202e", "score": "0.6627134", "text": "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "title": "" }, { "docid": "7fb02ea72f8a70e18dc421aa48a043df", "score": "0.6625862", "text": "public function run()\n {\n $this->call([UsersTableSeeder::class]);\n $this->call([ContratosTableSeeder::class]);\n $this->call([UsuariosTableSeeder::class]);\n $this->call([UnidadesTableSeeder::class]);\n $this->call([AtestadosTableSeeder::class]);\n }", "title": "" }, { "docid": "efa4266c44a724b8ef768b673efc269b", "score": "0.661699", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(\"OthersTableSeeder\");\n\n // DB::table('locations')->insert([\n // 'id' => 1,\n // 'name' => 'Default',\n // 'name' => 'district',\n // 'district_id' => 1,\n // 'province_id' => 1,\n // ]);\n }", "title": "" }, { "docid": "c421c445835920389646ee5d76045daa", "score": "0.66093796", "text": "public function run()\n {\n $data = include env('DATA_SEED');\n\n \\Illuminate\\Support\\Facades\\DB::table('endpoints')->insert((array)$data);\n }", "title": "" }, { "docid": "682fbc51270b0b677556c47b8efe43a4", "score": "0.6602538", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('admins')->truncate();\n\n for ($i = 0; $i < 10; $i++)\n {\n $faker = Factory::create('en_US');\n $values = [\n 'name' => $faker->userName,\n 'email' => $faker->freeEmail,\n 'password' => bcrypt($faker->password),\n 'phone' => $faker->phoneNumber,\n 'status' => random_int(0,1)\n ];\n admin::create($values);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "title": "" }, { "docid": "a9c19d0d1f4451d66d5dc4bbdfe3e9d3", "score": "0.65996546", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n DB::beginTransaction();\n// $this->seed();\n DB::commit();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "title": "" }, { "docid": "4ebc514bfee38a114d03e09600d0af4b", "score": "0.659914", "text": "public function run()\n {\n \\DB::table('provinces')->delete();\n \\DB::table('cities')->delete();\n \\DB::table('districts')->delete();\n // import provinces and cities from sql file\n $sqlFile = app_path() . '/../database/raw/administrative_indonesia_without_districts.sql';\n DB::unprepared(file_get_contents($sqlFile));\n $this->command->info('Successfully seed Provinces and Cities!');\n\n // import districts with latitude and longitude from csv file\n $csvFile = app_path() . '/../database/raw/administrative_indonesia_districts_with_lat_lng.csv';\n $districts = $this->csvToArray($csvFile);\n // check if lat lng exists\n foreach ($districts as $i => $d) {\n if ($d['latitude'] == '') $districts[$i]['latitude'] = 0;\n if ($d['longitude'] == '') $districts[$i]['longitude'] = 0;\n }\n // insert it\n $insert = District::insert($districts);\n if ($insert) $this->command->info('Successfully seed Districts!');\n }", "title": "" }, { "docid": "80df27413590f0f8f62790c06fd6c0cd", "score": "0.6596484", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RegionsTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n $this->call(DistrictsTableSeeder::class);\n $this->call(SubDistrictsTableSeeder::class);\n $this->call(PostcodesTableSeeder::class);\n\n if (env('APP_ENV') !== 'production') {\n // Wipe up 5 churches, and each church has 5 cells, and each cell has 20 members associated with.\n // In other word, we wipe up 500 church members.\n for ($i = 0; $i < 2; $i++) {\n $church = factory(\\App\\Models\\Church::class)->create();\n\n $church->areas()->saveMany(factory(\\App\\Models\\Area::class, 2)->create([\n 'church_id' => $church->id\n ])->each(function($area) {\n $area->cells()->saveMany(factory(\\App\\Models\\Cell::class, 2)->create([\n 'area_id' => $area->id\n ])->each(function($cell) {\n $cell->members()->saveMany(factory(App\\Models\\Member::class, 10)->create([\n 'cell_id' => $cell\n ]));\n }));\n }));\n }\n }\n }", "title": "" }, { "docid": "7271515474a59b3a91bbcb7696b87fbc", "score": "0.6596383", "text": "public function run()\n {\n User::create([\n 'name' => 'Regynald',\n 'email' => 'correo@correo.com',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n ]);\n\n User::create([\n 'name' => 'Leonardo',\n 'email' => 'correo2@correo.com',\n 'password' => Hash::make('123456789')\n ]);\n\n // seed sin model\n /* DB::table('users')->insert([\n 'name' => 'Regynald',\n 'email' => 'correo@correo.com',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]); */\n }", "title": "" }, { "docid": "e98e09ad92c74e9752b6a90bccdc5f98", "score": "0.65922767", "text": "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "title": "" }, { "docid": "c604b0af551e5719732dd0dd070a4278", "score": "0.65922284", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => 'carlos@email.com',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "title": "" }, { "docid": "96de3d34141831f960c87d3ef040bd44", "score": "0.65913564", "text": "public function run()\n {\n $this->environmentPath = env('APP_ENV') === 'production' ||\n env('APP_ENV') === 'qa' ||\n env('APP_ENV') === 'integration' ?\n 'Production':\n 'local';\n //disable FK\n Model::unguard();\n DB::statement(\"SET session_replication_role = 'replica';\");\n\n // $this->call(HrEmployeeTableSeeder::class);\n $this->call(\"Modules\\HR\\Database\\Seeders\\\\$this->environmentPath\\HrEmployeePosTableSeeder\");\n // $this->call(HrEmployeePresetsDiscountTableSeeder::class);\n\n // Enable FK\n DB::statement(\"SET session_replication_role = 'origin';\");\n Model::reguard();\n }", "title": "" }, { "docid": "88da3237962c15b8726f019004ee1e44", "score": "0.65889347", "text": "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "title": "" }, { "docid": "22ee8ba5bac17cda7cba9d20850eadb5", "score": "0.65812707", "text": "protected static function seed()\n {\n foreach (self::fetch('database/seeds', false) as $file) {\n Bus::need($file);\n }\n }", "title": "" }, { "docid": "b20760bd4e820915ca8df8b8f39d4c68", "score": "0.65811145", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n $faker = F::create('App\\Proovedores');\n for($i=0; $i < 10; $i++){\n DB::table('users')->insert([\n 'usuario' => $i,\n 'password' => $i,\n 'email' => $faker->email,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "3961f8d067de542aa565b8a4079e65e6", "score": "0.6579546", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Delete all records.\n DB::table('users')->delete();\n // Reset AUTO_INCREMENT.\n DB::table('users')->truncate();\n\n // Dev user.\n App\\Models\\User::create([\n 'email' => 'peterwong.brisbane@gmail.com',\n 'password' => '$2y$10$t6q81nz.XrMrh20NHDvxUu/szwHBwgzPd.01e8uuP0qVy0mPa6H/e',\n 'first_name' => 'L5',\n 'last_name' => 'App',\n 'username' => 'l5-app',\n 'is_email_verified' => 1,\n ]);\n\n // Dummy users.\n TestDummy::times(10)->create('App\\Models\\User');\n }", "title": "" }, { "docid": "0b64844f98200994b8cbcb2feaf108e3", "score": "0.6578819", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n User::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // We did this for test purposes. Shouldn't be doing this for production\n $password = Hash::make('123456');\n\n User::create([\n 'name' => 'Administrator',\n 'email' => 'admin@lig.com',\n 'password' => $password,\n ]);\n }", "title": "" }, { "docid": "d11202a0dc5543870710f2cae5cf8749", "score": "0.6575912", "text": "public function run()\n {\n Model::unguard();\n \n factory('App\\User','admin')->create();\n factory('App\\Evento',100)->create();\n //factory('App\\User','miembro',10)->create();\n factory('App\\Telefono',13)->create();\n factory('App\\Notificacion',10)->create();\n factory('App\\Rubro',10)->create();\n factory('App\\Tecnologia',10)->create();\n factory('App\\Cultivo',10)->create();\n factory('App\\Etapa',10)->create();\n factory('App\\Variedad',10)->create();\n factory('App\\Caracteristica',10)->create();\n factory('App\\Practica',30)->create();\n factory('App\\Tag',15)->create();\n // $this->call(PracticaTableSeeder::class);\n $this->call(TrTableSeeder::class);\n $this->call(MesTableSeeder::class);\n $this->call(SemanasTableSeeder::class);\n $this->call(PsTableSeeder::class);\n $this->call(MsTableSeeder::class);\n $this->call(CeTableSeeder::class);\n $this->call(CvTableSeeder::class);\n $this->call(PtSeeder::class);\n \n\n Model::unguard();\n }", "title": "" }, { "docid": "02a9ed15eb5c2fdfcea6e4cd8acd988b", "score": "0.65749073", "text": "public function run() {\n $this->call(UserSeeder::class);\n $this->call(PermissionSeeder::class);\n $this->call(CreateAdminUserSeeder::class);\n // $this->call(PhoneSeeder::class);\n // $this->call(AddressSeeder::class);\n\n $this->call(ContactFormSeeder::class);\n //$this->call(ContactSeeder::class);\n\n User::factory()->count(20)->create()->each(function ($user) {\n // Seed the relation with one address\n $address = Address::factory()->make();\n $user->address()->save($address);\n\n // Seed the relation with one phone\n $phone = Phone::factory()->make();\n $user->phone()->save($phone);\n\n // Seed the relation with 15 contacts\n $contact = Contact::factory()->count(25)->make();\n $user->contacts()->saveMany($contact);\n });\n }", "title": "" }, { "docid": "c4e9ed2f8e04f1abb6df87eb661b775f", "score": "0.6574314", "text": "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "title": "" }, { "docid": "cb1f2f91c293bfbc561bd294e3833fd8", "score": "0.657148", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Activity::truncate();\n User::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n $this->call(UserTableSeeder::class);\n $this->call(ActivityTableSeeder::class);\n }", "title": "" }, { "docid": "0350e1fc9ed9c9553317db568c12e5ba", "score": "0.65696406", "text": "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "title": "" }, { "docid": "48d3d394d1df91cfab4a3dd2653f35b4", "score": "0.6568972", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n \\App\\User::truncate();\n \\App\\Category::truncate();\n \\App\\Product::truncate();\n \\App\\Transaction::truncate();\n DB::table('category_product')->truncate();\n\n \\App\\User::flushEventListeners();\n \\App\\Category::flushEventListeners();\n \\App\\Product::flushEventListeners();\n \\App\\Transaction::flushEventListeners();\n\n\n $usersQuentity = 1000;\n $categoriesQuentity = 30;\n $productsQuentity = 1000;\n $transactionsQuentity = 1000;\n\n factory(\\App\\User::class, $usersQuentity)->create();\n factory(\\App\\Category::class, $categoriesQuentity)->create();\n factory(\\App\\Product::class, $productsQuentity)->create()->each(\n function ($product){\n $categories = \\App\\Category::all()->random(mt_rand(1, 5))->pluck('id');\n\n $product->categories()->attach($categories);\n }\n );\n factory(\\App\\Transaction::class, $transactionsQuentity)->create();\n\n }", "title": "" }, { "docid": "501dc2634dfbb75e5a10b68a7b23522e", "score": "0.65624833", "text": "public function run()\n {\n Eloquent::unguard();\n \n $this->call('AdminMemberTableSeeder');\n $this->call('BankInfoTableSeeder');\n $this->call('LocationLookUpTableSeeder');\n $this->call('OrderStatusTableSeeder');\n $this->call('AdminRoleTableSeeder');\n\n }", "title": "" }, { "docid": "a6c38e54657da8cc80a5c2710d1f4079", "score": "0.6560332", "text": "public static function setUpBeforeClass()\n {\n parent::setUpBeforeClass();\n $app = require __DIR__ . '/../../bootstrap/app.php';\n /** @var \\Pterodactyl\\Console\\Kernel $kernel */\n $kernel = $app->make(Kernel::class);\n $kernel->bootstrap();\n $kernel->call('migrate:fresh');\n\n \\Artisan::call('db:seed');\n }", "title": "" }, { "docid": "f7c1907f6a50fb63e7bb5652b26717f5", "score": "0.6559092", "text": "public function run()\n {\n Model::unguard();\n\n if( !User::where('email', 'nbpalomino@gmail.com')->count() ) {\n User::create([\n 'nombre'=>'Nick'\n ,'apellidos'=>'Palomino'\n ,'email'=>'nbpalomino@gmail.com'\n ,'password'=> Hash::make('1234567u')\n ,'celular'=>'966463589'\n ]);\n }\n\n $this->call('CategoriaTableSeeder');\n $this->call('WhateverSeeder');\n $this->call('ProductTableSeeder');\n }", "title": "" }, { "docid": "55042c46cc451fe214d902139169f3a6", "score": "0.6557491", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => 'empresa02@gmail.com',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "title": "" }, { "docid": "59932a2ac0ddf71a0ba4cd6e451a93fb", "score": "0.65555155", "text": "public function run()\n {\n Model::unguard();\n\n $this->command->info('seed start!');\n\n // 省市县\n $this->call('RegionTableSeeder');\n // 用户、角色\n $this->call('UserTableSeeder');\n // 权限\n $this->call('PurviewTableSeeder');\n // 博文分类\n $this->call('CategoryTableSeeder');\n // 博文、评论、标签\n $this->call('ArticleTableSeeder');\n // 心情\n $this->call('MoodTableSeeder');\n // 留言\n $this->call('MessageTableSeeder');\n // 文件\n $this->call('StorageTableSeeder');\n\n $this->command->info('seed end!');\n }", "title": "" }, { "docid": "bda676e03d5f6203ffdbe855ca8e56b2", "score": "0.6554255", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => 'admin@petstore.com',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "title": "" }, { "docid": "4f1f4a14ba8eb598ea17ecfe1ff83f8f", "score": "0.65509576", "text": "public function run()\n {\n $this->call(RolesDatabaseSeeder::class);\n $this->call(UsersDatabaseSeeder::class);\n $this->call(LocalesDatabaseSeeder::class);\n $this->call(MainDatabaseSeeder::class);\n }", "title": "" }, { "docid": "71ee372921e38b2ac95f55d19dda8f92", "score": "0.6548099", "text": "public function run()\n {\n\n Schema::disableForeignKeyConstraints(); //in order to execute truncate before seeding\n\n $this->call(UsersTableSeeder::class);\n $this->call(PostCategoriesSeeder::class);\n $this->call(TagsSeeder::class);\n $this->call(PostsSeeder::class);\n\n Schema::enableForeignKeyConstraints();\n\n\n }", "title": "" }, { "docid": "bd9bb322b3d31e66c00722fea5d89c27", "score": "0.65479296", "text": "public function run()\n {\n // DB::table('users')->insert([\n // ['id'=>1, 'email'=>'nhat','password'=>bcrypt(1234), 'lever'=>0]\n // ]);\n // $this->call(UsersTableSeeder::class);\n // $this->call(CatTableSeeder::class);\n // $this->call(TypeTableSeeder::class);\n // $this->call(AppTableSeeder::class);\n // $this->call(GameTableSeeder::class);\n \n \n }", "title": "" }, { "docid": "1b46fa2a96790281813264fc3f8288b5", "score": "0.6545845", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "title": "" }, { "docid": "54d95fdec12dd3b90aa89834dc54de32", "score": "0.65443295", "text": "public function run()\n {\n $this->seedUsers();\n $this->seedAdmins();\n $this->seedMeals();\n\n $this->seedOrder();\n $this->seedOrderlist();\n\n $this->seedReload();\n }", "title": "" }, { "docid": "42ba4e2013e68a562b6b7771a2ee5f3f", "score": "0.65434265", "text": "public function run()\n\t{\n\t\t//composer require fzaninotto/faker\n\t\t\n\t\t$this->call(populateAllSeeder::class);\n\t\t\n\t}", "title": "" }, { "docid": "f68e34f3b32dde0d0dbe1d773d3bd115", "score": "0.65432936", "text": "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "title": "" }, { "docid": "57b8d1ce87a8bc60f67439ed4385b709", "score": "0.654295", "text": "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => 'ignacio@dh.com',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "title": "" }, { "docid": "5a0752286d1085fa660420b58ce24fec", "score": "0.65426385", "text": "public function run()\n {\n Model::unguard();\n\n $faker =Faker\\Factory::create();\n\n // $this->call(UserTableSeeder::class);\n\n $this->seedTasks($faker);\n $this->seedTags($faker);\n\n Model::reguard($faker);\n }", "title": "" }, { "docid": "ff581332117c5a8ceb165939e5861a64", "score": "0.6541781", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "title": "" }, { "docid": "95379f39165e5874b8c2b61f1a8cb4fd", "score": "0.6539325", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n $this->call([\n CountriesSeeder::class,\n ProvincesSeeder::class,\n SettingsSeeder::class,\n AdminsTableSeeder::class,\n ]);\n }", "title": "" } ]
268fdc0b15f96c1e971d880f546820aa
FOR SYSTEM // After image cache was cleaned
[ { "docid": "10c148ce511ecc2261a6999e33dc898e", "score": "0.0", "text": "public function cleanCatalogImagesCacheAfter()\n {\n Mage::helper('searchanise/ApiSe')->queueImport();\n\n return $this;\n }", "title": "" } ]
[ { "docid": "90832e19bfb3417499eae12236785b0d", "score": "0.7381937", "text": "function amty_repopulateImageCache(){\r\n\tamty_populateCache(1);\r\n}", "title": "" }, { "docid": "7c252cc0225a3a947bd038307223ea76", "score": "0.7306487", "text": "public function clearCacheImage()\n {\n // if the photo has been changed\n if ($this->old_photo !== null && ($this->old_photo != $this->com_photo)) {\n \\app\\components\\helpers\\Image::DeleteS3($this->old_photo);\n }\n\n // if the banner photo has been changed\n if ($this->old_banner !== null && ($this->old_banner != $this->com_banner_photo)) {\n \\app\\components\\helpers\\Image::DeleteS3($this->old_banner);\n }\n }", "title": "" }, { "docid": "6b1a9ac948668502deef5f3701b99556", "score": "0.69303364", "text": "function cleanUpImages() {\n\n\tglobal $config;\n\tlog_debug(\"Attempting to remove files older than \" . $config['CAM_RETENTION_TIME_HOURS'] . \" hours\");\n\n\tif ($config['CAM_STORAGE_METHOD'] == \"seafile\") {\n\t\tcleanUpImagesSeafile();\n\t}\n\telse {\n\t\tcleanUpImagesLocal();\n\t}\n}", "title": "" }, { "docid": "551fa963edd80574849790a444b805e7", "score": "0.686435", "text": "private function verifyCachedImage(): void {\n\t\tif (!file_exists($this->fileFullPath)) {\n\t\t\t$this->createImage();\n\t\t}\n\t}", "title": "" }, { "docid": "d568f41cb9fd280a503d11bbc5577a86", "score": "0.6750387", "text": "public function cleanImagesAction()\n {\n try {\n Mage::getModel('catalog/product_image')->clearCache();\n Mage::dispatchEvent('clean_catalog_images_cache_after');\n $this->_getSession()->addSuccess(\n Mage::helper('adminhtml')->__('The image cache was cleaned.')\n );\n }\n catch (Mage_Core_Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n }\n catch (Exception $e) {\n $this->_getSession()->addException(\n $e,\n Mage::helper('adminhtml')->__('An error occurred while clearing the image cache.')\n );\n }\n $this->_redirectreferer();\n }", "title": "" }, { "docid": "9c825d76991a8bfafff1bc8489dbcb5a", "score": "0.6722036", "text": "private function flush_img() {\n\n $flush_sql = 'DELETE from s_product_metadata WHERE product_id <> '.\n '(SELECT product_id FROM s_product)'; // add duration\n\n $flush_query = $this -> db -> query($flush_sql);\n\n }", "title": "" }, { "docid": "0364752dc8ff449b4ec30c24a33ab6a1", "score": "0.6714934", "text": "public function removeImage () {}", "title": "" }, { "docid": "fc05dccf7eeec07b6c9339f13832085b", "score": "0.66634685", "text": "public static function maybe_regenerate_images()\n {\n }", "title": "" }, { "docid": "62ba872a03e3e7fa02c6532cd825d030", "score": "0.66492945", "text": "public function despeckleImage () {}", "title": "" }, { "docid": "9ac8cd644e8c91a1586c6ebdd17a2405", "score": "0.6587693", "text": "public function deconstructImages () {}", "title": "" }, { "docid": "e70e9fd334c48ffec4cffcccb5f7d8a5", "score": "0.65359426", "text": "function admin_clear_thumbnail_cache($folder_name=null) {\n \t$this->autoRender = false;\n \tif($folder_name[0] == '.') { $folder_name = null; return false; } // don't something like ../other-folder be passed, even though htaccess would catch and it wouldn't even get here, if code somewhere calls it.\n \t$cycle_images_folder = new Folder(WWW_ROOT.'cycle_images');\n \tif(empty($folder)) {\n\t \t$contents = $cycle_images_folder->read();\n\t \tforeach($contents[0] as $folder) {\n\t \t\t// Might as well do a final check to ensure it's really a folder just to be safe also don't remove the \"thumb\" folder, it's been put there by meio upload and it's not being used. There's nothing in it anyway.\n\t \t\tif((is_dir(WWW_ROOT.'cycle_images'.DS.$folder)) && ($folder != 'thumb')) {\n\t \t\t\t$cycle_images_folder->delete(WWW_ROOT.'cycle_images'.DS.$folder);\n\t \t\t}\n\t \t}\n \t} else {\n \t\t// Ensure it's a directory, don't let files be removed\n \t\tif(is_dir(WWW_ROOT.'cycle_images'.DS.$folder_name)) {\n \t\t\t$cycle_images_folder->delete(WWW_ROOT.'cycle_images'.DS.$folder_name);\n \t\t}\n \t} \n \tclearCache('cycles', 'views', ''); // Elements need to be cleared too in order to run PHP to regenerate new thumbnails\n \t$this->redirect(array('action' => 'index'));\n }", "title": "" }, { "docid": "640a1f0e9c16b8da0678f94688e97acb", "score": "0.6521523", "text": "public function getImageDispose () {}", "title": "" }, { "docid": "ebbf8a9d1d994e1b35a4899fdc923136", "score": "0.6459441", "text": "function DestroyImage()\n\t{\n\t\tif ($this->ImageID)\n\t\t{\n\t\t\timagedestroy($this->ImageID);\n\t\t}\n\t\t$this->ChangeFlag = true;\n\t}", "title": "" }, { "docid": "e6dcc09bb2fa1696f0b63963073c44ee", "score": "0.6444813", "text": "function destroy()\n\t{\n\t\timageDestroy($this->image);\n\t}", "title": "" }, { "docid": "720104a6fda9345b6614d1196a98c5d2", "score": "0.64375", "text": "function Destroy()\n \t{\n \t if ($this->original_image != -1) {ImageDestroy($this->original_image);}\n \t if ($this->marked_image != -1) {ImageDestroy($this->marked_image);}\n \t if ($this->mark_image != -1) {ImageDestroy($this->mark_image);}\n \t}", "title": "" }, { "docid": "09c62ae082b99965692c5140894c07e8", "score": "0.64223814", "text": "private function clear(){\n $dir = file_directory_temp();\n \n foreach($this -> tmp_images as $img){\n unlink($dir .'/' . $img);\n }\n \n \n \n }", "title": "" }, { "docid": "2c873da3d9d1c1b2a44cd799f1208bc3", "score": "0.6412019", "text": "function __destruct() {\n\t\t@imagedestroy($this->img);\n\t}", "title": "" }, { "docid": "c490503829ea38b5dbf65993a931ccb0", "score": "0.640664", "text": "public function removeImage() {\n //check if we have an old image\n if ($this->image) {\n //store the old name to delete on the update\n $this->temp = $this->image;\n //delete the current image\n $this->image = NULL;\n }\n }", "title": "" }, { "docid": "6ce11c5f0f2d183f5e49bf98d46346a5", "score": "0.6401903", "text": "function Destroy()\n {\n imagedestroy($this->img);\n }", "title": "" }, { "docid": "88ccacb9be85dd0222cf8b1ee5c464fa", "score": "0.6397923", "text": "function imagedestroy($image)\n{\n}", "title": "" }, { "docid": "88ccacb9be85dd0222cf8b1ee5c464fa", "score": "0.6397923", "text": "function imagedestroy($image)\n{\n}", "title": "" }, { "docid": "a38509b1f867080b0f83654e713e9f3f", "score": "0.63819766", "text": "function elgg_reset_system_cache() {\n\t_elgg_services()->systemCache->reset();\n}", "title": "" }, { "docid": "321b8f6cc6174a993dba155538e66c31", "score": "0.63259906", "text": "public function delete_image() {\n if ($this->value) {\n $this->value = 0;\n }\n }", "title": "" }, { "docid": "17987efbd41b4bbcf0b25781360eeb6f", "score": "0.6318459", "text": "private function checkCacheForImg() {\n $imageModifiedTime = filemtime($this->pathToImage);\n $cacheModifiedTime = is_file($this->cacheFileName) ? filemtime($this->cacheFileName) : null;\n\n // If cached image is valid, output it.\n if (!$this->ignoreCache && is_file($this->cacheFileName) && $imageModifiedTime < $cacheModifiedTime) {\n if ($this->verbose) {\n $this->verbose(\"Cache file is valid, output it.\");\n }\n $this->outputImage($this->cacheFileName);\n }\n\n if ($this->verbose) {\n $this->verbose(\"Cache is not valid, process image and create a cached version of it.\");\n }\n }", "title": "" }, { "docid": "6eadd0db2aff540996f943dc66f54818", "score": "0.6312758", "text": "abstract protected function clearFileCache();", "title": "" }, { "docid": "01a2227c0ebf46a1cb571cd85fe5e4a4", "score": "0.6307913", "text": "function destroyWorkingImageData()\n {\n imagedestroy($this->image);\n $this->image = NULL;\n\n $this->coreFileName = NULL; // basic filename part for use in building all other names\n $this->origFileName = NULL;\n $this->tmpFileName = NULL;\n \n $this->width = 0; // initial image width\n $this->height = 0; // initial image height\n $this->gdtype = NULL; // EXIF image type as retreivec from EXIF data\n $this->mime = NULL; // actual mime type retrieved from the image\n $this->type = NULL; // type as something we can deal with easily in code png|jpg|bmp|gif\n }", "title": "" }, { "docid": "5e1a9b90eb967dd5eec7336ec50b2c0f", "score": "0.628398", "text": "public function __destruct() {\n @imagedestroy ( $this->_image );\n }", "title": "" }, { "docid": "25d1e476316cf58cacfe9b661c2f59fd", "score": "0.6282542", "text": "protected static function clearCache() {\n\t\tif( self::$enable_caching == false ) return;\n\t\t// default timeout is one day :)\n\t\t$timeout = self::$caching_interval;\n\t\t\t\t\n\t\t// get all images in the folder and delete the expired images :)\t\t\n\t\t$list_of_images = self::readCacheFolder();\n\t\tforeach($list_of_images as $one_image ) {\n\t\t\tif ( getimagesize( $one_image['path']) === false )\tcontinue;\n\t\t\t\n\t\t\t$expiring_time = $one_image['time'] + $timeout;\n\t\t\t// we have to delete this shit :)\n\t\t\tif( $expiring_time < time() ) {\n\t\t\t\tunlink( $one_image['path'] );\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "0d8a59f7f1d720899db012f05345edd9", "score": "0.6255295", "text": "function delete_geomywp_caching() {\n\treturn false;\n}", "title": "" }, { "docid": "4a38903903d48ff5864823adf587e96b", "score": "0.6241038", "text": "protected function processImage() {}", "title": "" }, { "docid": "fce9ffc297e8504f2fecee6e14f3cdfb", "score": "0.6233781", "text": "function clearstatcache()\n{\n}", "title": "" }, { "docid": "c33ac91da438df3d5b3b912ad881669f", "score": "0.62168115", "text": "public function __destruct() {\n\t\timagedestroy($this->_image);\n\t}", "title": "" }, { "docid": "bbd6e89798f619626517686de90f1649", "score": "0.6215489", "text": "public function __destruct() {\n imagedestroy($this->_image);\n }", "title": "" }, { "docid": "116f447dcf6cb942e2bba83e7917b92b", "score": "0.62134415", "text": "public function postImport() {\n variable_set('ti_amg_fw_image_flush', 1);\n }", "title": "" }, { "docid": "478e9a696cffd2a8dcbe92b4edfe9daf", "score": "0.62113595", "text": "private function cachePrint(){\n $img = $this->imageResource($this->cachedFile, $this->type);\n $this->imagePrint($img, $this->type);\n }", "title": "" }, { "docid": "4acc319a6769982399a34397542e2b3a", "score": "0.6201961", "text": "public function image_clear() {\n\t\t$props = array('source_image', 'new_image', 'image_type', 'quality', 'orig_width', 'orig_height', 'rotation_angle', 'x_axis', 'y_axis', 'wm_overlay_path', 'wm_use_truetype', 'dynamic_output', 'wm_font_size', 'wm_text', 'wm_vrt_alignment', 'wm_hor_alignment', 'wm_padding', 'wm_hor_offset', 'wm_vrt_offset', 'wm_font_color', 'wm_use_drop_shadow', 'wm_shadow_color', 'wm_shadow_distance', 'wm_opacity');\n\n\t\tforeach ($props as $val)\n\t\t\t$this->image_params[$val] = '';\n\n\t\t$this->image_params['master_dim'] = 'auto';\n\t}", "title": "" }, { "docid": "c4f93b1edc6f269e0e2797b24daa9485", "score": "0.6177421", "text": "public function __destruct()\n {\n imagedestroy($this->imageTag);\n }", "title": "" }, { "docid": "dbd740fb56fb9619395ae81ad15f7724", "score": "0.6169925", "text": "public function __destruct() { \n\t\tif(is_resource($this->resource)) { \n\t\t\t\\imagedestroy($this->resource); \n\t\t} \n\t}", "title": "" }, { "docid": "74f73825af93dbcbf0c591a04f638e82", "score": "0.61693466", "text": "public function clean_cache();", "title": "" }, { "docid": "a64061624b7ed0256662859ccd5fa1de", "score": "0.61657244", "text": "protected function _after()\n {\n unset($this->image);\n parent::_after();\n }", "title": "" }, { "docid": "a64061624b7ed0256662859ccd5fa1de", "score": "0.61657244", "text": "protected function _after()\n {\n unset($this->image);\n parent::_after();\n }", "title": "" }, { "docid": "6b213375e2f3e0da5afa4f2b1cfff560", "score": "0.61490285", "text": "function amty_clearImageCacheSoft(){\r\n\t$query = new WP_Query( 'posts_per_page=-1' );\r\n\twhile ( $query->have_posts() ) : $query->the_post();\r\n\t\tdelete_post_meta(get_the_ID(), 'amtyThumb');\r\n\tendwhile;\r\n\twp_reset_postdata();\r\n}", "title": "" }, { "docid": "857711b91c461eaf16c94a0b19c2bcae", "score": "0.6146775", "text": "function jig_purge_external_caching(){\r\n\t\t\tcheck_ajax_referer('jig_purge_external_caching', 'security');\r\n\t\t\t$output = array();\r\n\t\t\tglobal $wpdb;\r\n\t\t\t$tablename = $wpdb->prefix.'jig_ext_images';\r\n\t\t\tif($wpdb->query(\"DELETE FROM $tablename\") !== false){ // Don't drop it\r\n\t\t\t\t$output['result'] = __('Cache purged.','jig_td');\r\n\t\t\t}else{\r\n\t\t\t\t$output['result'] = __('Error purging the cache.','jig_td');\r\n\t\t\t}\r\n\t\t\techo json_encode($output);\r\n\t\t\tdie();\r\n\t\t}", "title": "" }, { "docid": "1273d6dc82e44bb71ddd87d6a4f78237", "score": "0.6143581", "text": "function file_cache_clear() {\n if ($this->cache_files) {\n $this->file_cache_set(NULL);\n }\n }", "title": "" }, { "docid": "630f42a1e9a5ead1655a944a03d2fec1", "score": "0.6106973", "text": "function flushCache() {\n\t}", "title": "" }, { "docid": "d16bf5350cc0a0c264abe505a13e1d22", "score": "0.6103569", "text": "public function free()\r\n {\r\n if (null !== $this->image) {\r\n if (null !== $this->image->getCore()) {\r\n imagedestroy($this->image->getCore());\r\n }\r\n }\r\n $this->image = null;\r\n }", "title": "" }, { "docid": "e0bca8e78ff3743104b6b70eff7ee71f", "score": "0.609436", "text": "private function lazyLoad(){\n\t\tif(empty($this->_image_resource)){\n\t\t\tif($this->_cache && !$this->cacheExpired()){\n\t\t\t\t$this->_cache_skip = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$resource = $this->GetImageResource($this->_image_path, $this->_extension);\n\t\t\t$this->_image_resource = $resource;\n\t\t}\t \n\t}", "title": "" }, { "docid": "23305710963abf3fe7eda52fc8bd3c5d", "score": "0.60828906", "text": "public static function deleteCache() {\n\t\tif( self::$enable_caching == false ) return;\n\t\t// default timeout is one day :)\n\t\t$timeout = self::$caching_interval;\n\t\t\t\t\n\t\t// get all images in the folder and delete the expired images :)\t\t\n\t\t$list_of_images = self::readCacheFolder();\n\t\tforeach($list_of_images as $one_image ) {\n\t\t\tif ( getimagesize( $one_image['path']) === false )\tcontinue;\n\t\t\t\n\t\t\t$expiring_time = $one_image['time'] + $timeout;\n\t\t\t// we have to delete this shit :)\n\t\t\tif( $expiring_time < time() ) {\n\t\t\t\tunlink( $one_image['path'] );\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "8155846dac58278d14b2ec8931d04544", "score": "0.60742694", "text": "public function __destruct()\n {\n if (is_resource($this->temporaryImage)) {\n imagedestroy($this->temporaryImage);\n }\n }", "title": "" }, { "docid": "84f4210a14c8becc5858b3c1f130a930", "score": "0.6071213", "text": "public static function finalize() {\n\t\tCache::write(static::$cacheKey, static::$cache, '_cake_core_');\n\t\tif (Configure::read('UrlCache.pageFiles') && !empty(static::$cachePage)) {\n\t\t\tCache::write(static::$cachePageKey, static::$cachePage, '_cake_core_');\n\t\t}\n\t}", "title": "" }, { "docid": "548f6a8f31f6ea2882e977f3bf329ac1", "score": "0.6059729", "text": "function elgg_invalidate_simplecache() {\n\t_elgg_services()->simpleCache->invalidate();\n}", "title": "" }, { "docid": "108b75be9c25ed93853815a64dacf51e", "score": "0.60494727", "text": "public function __destruct () {\n\t\tif ($this->image) imagedestroy($this->image);\n\t\tif ($this->source) imagedestroy($this->source);\n\t}", "title": "" }, { "docid": "1d727ad30b97cd00b35ec185f4c01751", "score": "0.6046276", "text": "public function finalize ()\n {\n if ($this->isCacheAble() && $this->detectStatusCode()) {\n file_put_contents($this->cacheDirPath.$this->cachedFilename, ob_get_contents());\n ob_end_clean();\n $this->handle();\n }\n }", "title": "" }, { "docid": "b142fbaf83d44dbb1826b87e4cfec227", "score": "0.60388905", "text": "function UnloadImage(\\raylib\\Image $image): void { }", "title": "" }, { "docid": "2b64bf9c1d6f970b6bdbe5f4ef4e767a", "score": "0.6035745", "text": "public static function removeCacheFiles() {}", "title": "" }, { "docid": "3dbf9f12aeda46ccc0764c8c5285385e", "score": "0.6033193", "text": "function delete() {\r\n\r\n\t\t\tglobal $wpdb;\r\n\r\n\t\t\t// Require glob support for older php versions (version < 4.3)\r\n\r\n\t\t\trequire_once realpath(dirname(__file__) . '/includes/GlobExtension.script.php');\r\n\r\n\t\t\t// we want to erase all traces of this previously uploaded image:\r\n\t\t\t// first, we delete all generated thumbnails\r\n\r\n\t\t\t$emptyArray = array('');\r\n\t\t\t$exampleThumb = $this->_getUniqueThumbnailName($emptyArray);\r\n\t\t\t$thumbGlob = preg_replace('/(.*\\..*\\.).*(\\.th\\..*)/','$1*$2',$exampleThumb);\r\n\t\t\t$globPattern = YAPB_CACHE_ROOT_DIR . $thumbGlob;\r\n\r\n\t\t\t$allThumbnails = glob($globPattern);\r\n\t\t\tfor ($i=0, $len=count($allThumbnails); $i<$len; $i++) {\r\n\t\t\t\tunlink($allThumbnails[$i]);\r\n\t\t\t}\r\n\r\n\t\t\t// now we delete the original image\r\n\r\n\t\t\t@unlink($this->systemFilePath());\r\n\r\n\t\t\t// at last we clean up the database entries belonging to that image\r\n\r\n\t\t\t$wpdb->query('DELETE FROM ' . YAPB_TABLE_NAME . ' where id = ' . $this->id);\r\n\r\n\t\t}", "title": "" }, { "docid": "9c14214552bd30e8e8a51556136852f0", "score": "0.6031718", "text": "protected function clearCacheOnError() {}", "title": "" }, { "docid": "cff0159f164eca64325b1c88112ec60d", "score": "0.6020003", "text": "public function tearDown() {\n delete($this->image);\n }", "title": "" }, { "docid": "a78e925a444260f6a7a0e33a776f2a55", "score": "0.6019294", "text": "public function clearCache()\n {\n if($this->packfile)\n $this->packfile->clearCache();\n }", "title": "" }, { "docid": "7d85513007f3a7ff6b8b47aa94418c4a", "score": "0.5989704", "text": "public function imageFlush() {\n self::$db->prepared_query(\"\n SELECT CollageID FROM collages_torrents WHERE GroupID = ?\n \", $this->id\n );\n if (self::$db->has_results()) {\n self::$cache->deleteMulti(array_map(fn ($id) => \"collagev2_$id\", self::$db->collect(0, false)));\n }\n\n self::$db->prepared_query(\"\n SELECT DISTINCT UserID\n FROM torrents AS t\n LEFT JOIN torrents_group AS tg ON (t.GroupID = tg.ID)\n WHERE tg.ID = ?\n \", $this->id\n );\n if (self::$db->has_results()) {\n self::$cache->deleteMulti(array_map(fn ($id) => sprintf(self::USER_RECENT_UPLOAD, $id), self::$db->collect(0, false)));\n }\n\n self::$db->prepared_query(\"\n SELECT DISTINCT xs.uid\n FROM xbt_snatched xs\n INNER JOIN torrents t ON (t.ID = xs.fid)\n WHERE t.GroupID = ?\n \", $this->id\n );\n if (self::$db->has_results()) {\n self::$cache->deleteMulti(array_map(fn ($id) => sprintf(self::USER_RECENT_SNATCH, $id), self::$db->collect(0, false)));\n }\n }", "title": "" }, { "docid": "e3b0be3383b427a2b8ebf0d19f4376c0", "score": "0.5988784", "text": "private function _clearCache()\n\t{\n\t\tif ($this->input->get('task', '', 'cmd') == __FUNCTION__)\n\t\t{\n\t\t\tdie(__FUNCTION__ . ' : direct call not allowed');\n\t\t}\n\n\t\t$cache = JFactory::getCache('com_flexicontent');\n\t\t$cache->clean();\n\t\t$itemcache = JFactory::getCache('com_flexicontent_items');\n\t\t$itemcache->clean();\n\t}", "title": "" }, { "docid": "679b1a2e6af15696f23329b3bc6e3cfb", "score": "0.5981913", "text": "private function delete_cover_image() {\n if (!$this->cover_image) { return; }\n $this->cover_image->destroy();\n $this->cover_image = null;\n }", "title": "" }, { "docid": "1c9e9e6ab3a40d492e813f16da7a6a5b", "score": "0.5975754", "text": "public function resetPerPost()\n\t{\n\t\t$this->cache->updateCacheWithoutSaving( '_tmp_bbcode_images', 0 );\n\t}", "title": "" }, { "docid": "131d4952fb7b36e15f7284830cdc5e25", "score": "0.5972067", "text": "function processImages() {\n\n\tglobal $config, $image_manager, $clean_interval_start_time, $encryption_interval_start_time;\n\n\t// Retrieve all the images into an array\n\t$image_list = retrieveImages();\n\t\n\t// Composite the images together in a grid\n\t$dest_image = compositeImages($image_list);\n\t\n\t// Save the composite image \n\tsaveImage($dest_image);\n\n\t// Remove old files if needed\n\tif ( (microtime(true) - $clean_interval_start_time) > ($config['CAM_CLEAN_TIME_MINS'] * 60) ) {\n\t\tlog_debug(\"Cleaning old files\");\n\t\t$clean_interval_start_time = microtime(true);\n\t\tcleanUpImages();\t\n\t}\n\n\t// If our storage method was seafile, then attempt to renew the decryption according to the configuration\n\tif ($config['CAM_STORAGE_METHOD'] == \"seafile\") {\n\t\tif ( (microtime(true) - $encryption_interval_start_time) > ($config['CAM_SEAFILE_ENCRYPT_TIMEOUT_MINS'] * 60) ) {\n\t\t\tlog_info(\"Requesting library decryption\");\n\t\t\t$encryption_interval_start_time = microtime(true);\n\t\t\tdecryptSeafileLibrary();\t\n\t\t}\n\t}\n}", "title": "" }, { "docid": "3c1438d6d72fe6222239743cd720f3fa", "score": "0.5970936", "text": "public function cache_delete()\n {\n }", "title": "" }, { "docid": "0bbae7239196623665a87ebd6619b904", "score": "0.59696203", "text": "function elgg_flush_caches() {\n\t_elgg_services()->events->trigger('cache:flush', 'system');\n}", "title": "" }, { "docid": "7a343523a3ae02e5b3eabf8b0efa86a3", "score": "0.59660006", "text": "private function imageInCache(){\n if (file_exists($this->cachedFile) && \n ( filemtime($this->cachedFile)>filemtime($this->pathToImages.$this->fname)) &&\n ( filectime($this->cachedFile)>filectime($this->pathToImages.$this->fname)) ) {\n return true;\n }else return false;\n }", "title": "" }, { "docid": "af6bf544842d3cdcc8a4b316a0b3eca5", "score": "0.5961902", "text": "public static function flushInternalRuntimeCaches() {}", "title": "" }, { "docid": "c14afb1f1a41fb1f7bd6628fe98b8327", "score": "0.5961695", "text": "public function stripImage () {}", "title": "" }, { "docid": "e485336befb227c577e6a1c4057a196c", "score": "0.59555745", "text": "function afterImport()\n {\n $f = $this->getPath();\n $gd_info = getimagesize($f);\n }", "title": "" }, { "docid": "78d8ff5829c60dc1e6ac07c353ab2dca", "score": "0.5949332", "text": "function clearstatcache($clear_realcache_path = false, $filename = null)\n{\n}", "title": "" }, { "docid": "c3b3b824ab23575a44865331c60246ee", "score": "0.59476453", "text": "function web_clearLocalAssetCache() {\n\t\t\t$this->layout->appendTitle('Clear Local Asset Cache');\t\t\t\n\n\t\t\t$view_data \t= '';\n\t\t\t\n\t\t\t$view_data \t= '<div class=\"content_header\"><h2>CLEAR ASSET CACHE</h2></div>'\n\t\t\t\t \t\t. '<p>Complete.</p>'\n\t\t\t\t \t\t. '<pre>' . $this->site_maintenance->clearAssetCache('all', 'website') . '</pre>';\n\t\t\t\n\t\t\t$this->layout->show($view_data);\t\n\n\n\n\t}", "title": "" }, { "docid": "ef47e4854d1dbcb659b00a7561bc385f", "score": "0.59474826", "text": "private function invalidateMetaDataCache() {\n\t\t$this->metaDataCache = null;\n\t}", "title": "" }, { "docid": "529a53217fea70867832a71814c6a999", "score": "0.59366566", "text": "private function _destroy()\n\t{\n\t\tglobal $wpdb ;\n\n\t\tif ( ! Data::get_instance()->tb_exist( 'img_optm' ) ) {\n\t\t\tDebug2::debug( '[Img_Optm] DESTROY bypassed due to table not exist' ) ;\n\t\t\treturn;\n\t\t}\n\n\t\tDebug2::debug( '[Img_Optm] excuting DESTROY process' ) ;\n\n\t\t/**\n\t\t * Limit images each time before redirection to fix Out of memory issue. #665465\n\t\t * @since 2.9.8\n\t\t */\n\t\t// Start deleting files\n\t\t$limit = apply_filters( 'litespeed_imgoptm_destroy_max_rows', 500 ) ;\n\t\t$q = \"SELECT src,post_id FROM `$this->_table_img_optm` WHERE optm_status = %d ORDER BY id LIMIT %d\" ;\n\t\t$list = $wpdb->get_results( $wpdb->prepare( $q, self::STATUS_PULLED, $limit ) ) ;\n\t\tforeach ( $list as $v ) {\n\t\t\t// del webp\n\t\t\t$this->__media->info( $v->src . '.webp', $v->post_id ) && $this->__media->del( $v->src . '.webp', $v->post_id ) ;\n\t\t\t$this->__media->info( $v->src . '.optm.webp', $v->post_id ) && $this->__media->del( $v->src . '.optm.webp', $v->post_id ) ;\n\n\t\t\t$extension = pathinfo( $v->src, PATHINFO_EXTENSION ) ;\n\t\t\t$local_filename = substr( $v->src, 0, - strlen( $extension ) - 1 ) ;\n\t\t\t$bk_file = $local_filename . '.bk.' . $extension ;\n\t\t\t$bk_optm_file = $local_filename . '.bk.optm.' . $extension ;\n\n\t\t\t// del optimized ori\n\t\t\tif ( $this->__media->info( $bk_file, $v->post_id ) ) {\n\t\t\t\t$this->__media->del( $v->src, $v->post_id ) ;\n\t\t\t\t$this->__media->rename( $bk_file, $v->src, $v->post_id ) ;\n\t\t\t}\n\t\t\t$this->__media->info( $bk_optm_file, $v->post_id ) && $this->__media->del( $bk_optm_file, $v->post_id ) ;\n\t\t}\n\n\t\t// Check if there are more images, then return `to_be_continued` code\n\t\t$q = \"SELECT COUNT(*) FROM `$this->_table_img_optm` WHERE optm_status = %d\" ;\n\t\t$total_img = $wpdb->get_var( $wpdb->prepare( $q, self::STATUS_PULLED ) ) ;\n\t\tif ( $total_img > $limit ) {\n\t\t\t$q = \"DELETE FROM `$this->_table_img_optm` WHERE optm_status = %d ORDER BY id LIMIT %d\" ;\n\t\t\t$wpdb->query( $wpdb->prepare( $q, self::STATUS_PULLED, $limit ) ) ;\n\n\t\t\tDebug2::debug( '[Img_Optm] To be continued 🚦' ) ;\n\n\t\t\treturn $this->_self_redirect( self::TYPE_DESTROY );\n\t\t}\n\n\t\t// Delete postmeta info\n\t\t$q = \"DELETE FROM `$wpdb->postmeta` WHERE meta_key = %s\" ;\n\t\t$wpdb->query( $wpdb->prepare( $q, self::DB_SIZE ) ) ;\n\n\t\t// Delete img_optm table\n\t\tData::get_instance()->tb_del( 'img_optm' ) ;\n\t\tData::get_instance()->tb_del( 'img_optming' ) ;\n\n\t\t// Clear options table summary info\n\t\tself::delete_option( '_summary' ) ;\n\t\tself::delete_option( self::DB_NEED_PULL ) ;\n\n\t\t// Inform Cloud server\n\t\t$data = array(\n\t\t\t'action'\t=> self::CLOUD_ACTION_CLEAN,\n\t\t);\n\t\t$json = Cloud::post( Cloud::SVC_IMG_OPTM, $data ) ;\n\n\t\t$msg = __( 'Destroy all optimization data successfully.', 'litespeed-cache' ) ;\n\t\tAdmin_Display::succeed( $msg ) ;\n\t}", "title": "" }, { "docid": "c845b4a8d389a002ae3aafa5890a1d54", "score": "0.59355307", "text": "function clearImageToGarbageByCause($idx = 0, $is_date = false){\n\n $sql = 'delete from images_garbage where ';\n $images = array();\n // set first cause = delete images from garbage table and clean images from \n // server\n if($is_date) {\n // set cause for select\n $cause = \" TIMESTAMPADD(HOUR, \" . ADMIN_GARBAGE_IMAGE_TIME_LIVE . \", createdate)<'\" .date(\"Y-m-d H:i:s\").\"'\";\n\n // get images to delete from DB garbage table\n $sql_all = 'SELECT id FROM images_garbage WHERE ' . $cause;\n $images = $this->dsp->db->Select( $sql_all );\n\n // clean images from table 'images'\n foreach ($images as $image) {\n $this->clearByIDX($image['id']);\n }\n $sql .= $cause;\n\n // delete images from 'images_garbage' table\n $r = $this->dsp->db->Execute( $sql );\n }\n // simply clean images from garbage table\n else if(!empty($idx) && IsInt($idx)>0) {\n\n $sql .= \" id=? \";\n $variable = (int)$idx;\n $r = $this->dsp->db->Execute( $sql, $idx);\n }\n\n if($this->dsp->db->last_errno) { \n return 'db error';\n }\n else {\n return false;\n }\n }", "title": "" }, { "docid": "627ee34da7539e68470bfc88894d7a71", "score": "0.59289294", "text": "protected function cleanMemcache()\n {\n }", "title": "" }, { "docid": "3f3a60e0dbd7551b07bcfeefdeedb2e2", "score": "0.59247345", "text": "function cleanUpImagesLocal() {\n\n\tglobal $config;\n\n\ttry {\n\t\t// Indicate the time right now\n\t\t$now = new DateTime();\n\n\t\t// Get all of the items in the local directory\n\t\t$items = scandir($config['CAM_STORAGE_DIRECTORY']);\n\n\t\t// Iterate through all the items\n\t\tforeach ($items as $item) {\n\t\t\n\t\t\t$filename = $config['CAM_STORAGE_DIRECTORY'] . \"/\" . $item;\n\n\t\t\t// Make sure its a jpg file\n\t\t\tif (substr($item,-4) == \".jpg\") {\n\n\t\t\t\t// Calculate the time difference\n\t\t\t\t$timediff = $now->getTimeStamp() - filemtime($filename);\n\t\t\t\tlog_debug(\"Checking item \" . $filename . \" - time difference \" . $timediff);\n\t\t\n\t\t\t\t// If the difference between now and the file's timestamp is more than the retention period hours\n\t\t\t\tif ($timediff > ($config['CAM_RETENTION_TIME_HOURS'] * 60 * 60)) {\n\t\t\t\t\tunlink($filename);\n\t\t\t\t\tlog_info(\"Removed: \" . $filename);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tcatch (Exception $e) {\n\t\tlog_error(\"Could not remove old file from local directory. Error message: \" . $e->getMessage());\n\t}\n}", "title": "" }, { "docid": "11037a6970e17879939a1a90a759a6c9", "score": "0.59148926", "text": "public static function removeCacheFiles()\n {\n self::getCacheManager()->flushCachesInGroup('system');\n }", "title": "" }, { "docid": "440ea9b83520d7da9eef606e0de67e06", "score": "0.59114873", "text": "protected function cleanCache()\n {\n $this->load->driver('cache');\n $this->cache->file->clean();\n }", "title": "" }, { "docid": "373d0978d2edcd4990ceb40ddf1a0c2c", "score": "0.5909992", "text": "public function postRollback() {\n variable_set('ti_amg_fw_image_flush', 1);\n }", "title": "" }, { "docid": "93f686a797c88591f99a1da5adad2eeb", "score": "0.5903114", "text": "public function refresh() {\n\t\t$adjustments = array(\n\t\t\tnew ResizeImageAdjustment(\n\t\t\t\tarray(\n\t\t\t\t\t'maximumWidth' => $this->maximumWidth,\n\t\t\t\t\t'maximumHeight' => $this->maximumHeight,\n\t\t\t\t\t'ratioMode' => $this->ratioMode,\n\t\t\t\t\t'allowUpScaling' => $this->allowUpScaling,\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t$processedImageInfo = $this->imageService->processImage($this->originalAsset->getResource(), $adjustments);\n\n\t\t$this->resource = $processedImageInfo['resource'];\n\t\t$this->width = $processedImageInfo['width'];\n\t\t$this->height = $processedImageInfo['height'];\n\t}", "title": "" }, { "docid": "5ea9eec3a49250c34b863314d408be0b", "score": "0.59031117", "text": "public static function queue_image_regeneration()\n {\n }", "title": "" }, { "docid": "4692800d9da3de929946e1babafe063d", "score": "0.58959126", "text": "public function onAfterWrite()\n {\n DynamicCache::inst()->clear();\n }", "title": "" }, { "docid": "7f38e3d5c9882eab5e54f959930b4d1d", "score": "0.58952636", "text": "function bp_core_clear_cache() {\r\n\tglobal $cache_path, $cache_filename;\r\n\r\n\tif ( function_exists( 'prune_super_cache' ) ) {\r\n\t\tdo_action( 'bp_core_clear_cache' );\r\n\r\n\t\treturn prune_super_cache( $cache_path, true );\r\n\t}\r\n}", "title": "" }, { "docid": "7902f24be01d52623a88a8ed2e8ce6c7", "score": "0.5892762", "text": "public function deleteImage(){\n if(is_file($this->getImage())){\n unlink($this->getImage());\n }\n $this->setImage(null);\n }", "title": "" }, { "docid": "b7737514c2a69370c66d1e827991be0f", "score": "0.58867925", "text": "function wp_cache_reset()\n{\n}", "title": "" }, { "docid": "83c2d409573d3c898152d19329228750", "score": "0.5883363", "text": "public static function clearCache(): void\n {\n // destroy all stored images\n foreach (self::$blockTextureMap as $blocks) {\n foreach ($blocks as $biomes) {\n foreach ($biomes as $img) {\n imagedestroy($img);\n }\n }\n }\n\n // clear cache of all resource packs\n $textures = array_keys(self::$blockTextureMap);\n foreach ($textures as $path) {\n unset(self::$blockTextureMap[$path]);\n }\n }", "title": "" }, { "docid": "832e5a38b3e71b37036d853747ac8847", "score": "0.5876164", "text": "public function __destruct() {\n if (is_resource($this->resource)) {\n imagedestroy($this->resource);\n }\n }", "title": "" }, { "docid": "ecb4d6a5b9f5058d89e279ca82be05db", "score": "0.5874933", "text": "function cache_image($proj, $blob, $name) {\n global $CONFIG;\n\n $tempImg = $CONFIG['cache_directory'] . $proj . \"/\" . $name;\n\n // $cmd = \"GIT_DIR=\" . escapeshellarg($CONFIG['repo_directory'] . $proj . $CONFIG['repo_suffix']) . \" git cat-file blob \" . escapeshellarg($blob) . \" | hexdump -e '16/1 \" . '\"U%02x\" \"\\n\"' . \"' | sed 's/U //g' | sed 's/G/\" . '\"' . \"/g' | sed 's/U/\\\\x/g'\";\n\n $cmd = \"GIT_DIR=\" . escapeshellarg($CONFIG['repo_directory'] . $proj . $CONFIG['repo_suffix']) . \" git cat-file blob \" . escapeshellarg($blob) . \" >\" . escapeshellarg($tempImg);\n exec($cmd, &$out);\n\n $image = file_get_contents($tempImg);\n chmod($tempImg, 0666);\n unlink($tempImg);\n\n $pinfo = pathinfo($name);\n \n $filesize = strlen($image);\n\theader(\"Pragma: public\"); // required\n\theader(\"Expires: 0\");\n\theader(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\n\theader(\"Cache-Control: private\", false); // required for certain browsers\n\theader(\"Content-Transfer-Encoding: binary\");\n\theader(\"Content-Type: image/\" . $pinfo['extension']);\n\theader(\"Content-Length: \" . $filesize);\n\theader(\"Content-Disposition: attachment; filename=\" . $name . \";\");\n\theader(\"Expires: +1d\");\n\techo $image;\n\tdie();\n}", "title": "" }, { "docid": "6ba2bd5b23617246023b7995aafeeefb", "score": "0.58742577", "text": "public static function clean_plugin_cache()\n {\n }", "title": "" }, { "docid": "52f7b32f5849d6026e02801b177ef27d", "score": "0.5871456", "text": "public function recompileCache()\n\t{\n\t}", "title": "" }, { "docid": "81074a2c1d0a9386c9470d4c44270149", "score": "0.587046", "text": "function recompileCache() {\n\t}", "title": "" }, { "docid": "474a5ac096c6edc2de46da3b0abf1f5c", "score": "0.5866883", "text": "public static function register_cache_clean()\n {\n }", "title": "" }, { "docid": "f5a0007d5eff1fa3fcd4b0646bc2e595", "score": "0.58663696", "text": "public function delDetailImage() {\n if (file_exists('../data/detail_img/'.$this->detailImg)) {\n unlink('../data/detail_img/'.$this->detailImg);\n }\n }", "title": "" }, { "docid": "9d39f3b6fb71aeb08722f40565b72353", "score": "0.5863498", "text": "public function refreshCaches() {\n \\Drupal::service('asset.css.collection_optimizer')->deleteAll();\n \\Drupal::service('asset.js.collection_optimizer')->deleteAll();\n\n // Change the js/css cache buster.\n _drupal_flush_css_js();\n \\Drupal::service('cache.data')->deleteAll();\n }", "title": "" }, { "docid": "d0675df90c5679eba67b133c1dbcd0c8", "score": "0.5863414", "text": "abstract public function clearCache();", "title": "" }, { "docid": "d421c4d1e31fade25a22acc622d4f056", "score": "0.5862559", "text": "public function refreshPicturesFromLdap()\n {\n\n }", "title": "" }, { "docid": "247c2be4a78890d92b061fd2eff87d23", "score": "0.58597356", "text": "private function loadImage()\n\t{\n\t\t$this->image = Image::getImageData($this->id, $this->connection);\n\t}", "title": "" }, { "docid": "68902a4b2d42cd3e87a3df3781b24d7f", "score": "0.5858186", "text": "public function clearCache() {\n if ($this->file->exists()) {\n $this->file->delete();\n }\n }", "title": "" }, { "docid": "b190371e7db91bee9dbd28065fab26c0", "score": "0.5857612", "text": "public function clearCache() {}", "title": "" }, { "docid": "b190371e7db91bee9dbd28065fab26c0", "score": "0.5857612", "text": "public function clearCache() {}", "title": "" } ]
1ddf5b2b1d83468829f20f97ae69dd72
Return true if controller is callable, false otherwise.
[ { "docid": "a7b1d653069822c7a9afc1d5a3a90bca", "score": "0.62392753", "text": "private function _callable()\n {\n if ($this->_validObject === true) {\n \n if ($this->_discoveredHandler && \n class_exists($this->_discoveredHandler)) {\n \n unset($this->_regexMatches[0]);\n $this->_handlerInstance = new $this->_discoveredHandler();\n \n if ($this->_request->isAjaxRequest() && \n method_exists($this->_discoveredHandler, $this->_method . '_xhr')) {\n \n $this->_method .= '_xhr';\n }\n \n if (method_exists($this->_handlerInstance, $this->_method)) {\n\n return true;\n }\n }\n }\n \n return false;\n }", "title": "" } ]
[ { "docid": "e8c7308c9b6eeb901b65091077df666c", "score": "0.7697344", "text": "public static function hasController()\n {\n return false;\n }", "title": "" }, { "docid": "752cf6936658f19ff0fb2498810b4d36", "score": "0.7481154", "text": "public function hasControllerName(): bool;", "title": "" }, { "docid": "08a5d36fca976a9d5340bfacd67e417d", "score": "0.7398108", "text": "public function isController() : bool\n\t{\n\t\treturn $this->type == self::CONTROLLER;\n\t}", "title": "" }, { "docid": "d40efd7ade638af93d36d92c2b04352a", "score": "0.7284514", "text": "public function hasControllerName() {}", "title": "" }, { "docid": "88803312249f3369f1efaea2f8634023", "score": "0.7166124", "text": "protected function isServiceController()\n {\n return true;\n }", "title": "" }, { "docid": "09cf39d588faa6136976a38be4b6e33f", "score": "0.7029438", "text": "protected function isControllerAction()\n {\n return is_string($this->action['uses']) && ! $this->isSerializedClosure();\n }", "title": "" }, { "docid": "15be7067368a4e7484e503c7d50da359", "score": "0.6933263", "text": "public function hasControllerArguments(): bool;", "title": "" }, { "docid": "478cf4bc938407d10813b22bb034d623", "score": "0.6866817", "text": "protected function isControllerAction()\n\t{\n\t\treturn is_string($this->action['uses']);\n\t}", "title": "" }, { "docid": "0cdee272cf4cb6e03fc771ea52eec7ab", "score": "0.6780392", "text": "public function isCallable()\n {\n \tif(!empty($this->isCallable)) return $this->isCallable;\n \t\n \tif(!class_exists(str_replace(\" \", \"_\", $this->module), true)) return $this->isCallable=false;\n \t\n \t$refl = new ReflectionClass($this->module);\n \tif(!$refl->hasMethod(str_replace(\" \", \"_\", $this->name))) return $this->isCallable=false;\n \t\n \t$m = $refl->getMethod(str_replace(\" \", \"_\", $this->name));\n \tif(!$m->isPublic() || !$m->isStatic()) return $this->isCallable=false;\n \t\n \t$n = $m->getNumberOfParameters();\n \tif($n!=1 && $n!=3) return $this->isCallable=false;\n \t\n \tif(!strpos($m->getDocComment(), \"* @mr:remote\\n\")) return $this->isCallable=false;\n \t\n \t$params = $m->getParameters();\n \t\n \t/* @var $p ReflectionParameter */\n \t\n \t$p = $params[0];\n \tif(!$p->isArray()) return $this->isCallable=false;\n \t\n \t$this->isCallable = true;\n \t$this->methodReflection = $m;\n \t\n \treturn true;\n }", "title": "" }, { "docid": "13898336ad28944ea45dd86b07320952", "score": "0.67280424", "text": "public function isValidControllerAction(): bool\n {\n return $this->controllerAction && strpos($this->controllerAction, '/') !== false;\n }", "title": "" }, { "docid": "8cd61f589d0dd1f4690a4fee186368a6", "score": "0.672107", "text": "public function hasBaseController()\n\t{\n\t\treturn ! empty($this->resource->controllers_base);\n\t}", "title": "" }, { "docid": "eb438ce9e96cb2c3129148ba9ed146f9", "score": "0.66842645", "text": "public function getHasControllerAttemptedAuthorization(){\n return $this->controllerAuthCount > 0;\n }", "title": "" }, { "docid": "b75801f70c268f6d01a80db156717bb0", "score": "0.65815085", "text": "private function isRequestValid() {\n if (!class_exists($this->controller)) {\n // Redirect to 404 page.\n $this->error = 'The controller specified - ' . $this->controller . ' does not exist.';\n return false;\n }\n $this->objView = new View($this);\n $this->objController = new $this->controller($this, $this->objView);\n $action = $this->action;\n if (!method_exists($this->objController, $action)) {\n // Redirect to 405. Method does not exist.\n $this->error = 'The action specified - ' . $action . ' does not exist.';\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "1dae61db590771e8931d82c9e85316a9", "score": "0.6573387", "text": "public function ClientWantsTheDownloadController()\n {\n if($this->HasKeyInGET(self::getControllerKey()))\n {\n if\n (\n $this->IsValueForControllerKeyInGETEqualsTheTestValue\n (\n self::getDownLoadControllerValue()\n )\n )\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "de5d3023c0a4175fd49ce0c090c943c8", "score": "0.65508246", "text": "public function isCallable()\n\t{\n\t\treturn is_callable($this->callback);\n\t}", "title": "" }, { "docid": "85ca8c6b0f8da8724a281b63037c6fc7", "score": "0.6549607", "text": "public function isCallable()\n\t{\n\t\treturn is_callable($this->cb);\n\t}", "title": "" }, { "docid": "dc5155583cc970f88edda514324e3129", "score": "0.65451914", "text": "public function isCallableFromRouter($actionName)\n {\n return TRUE;\n }", "title": "" }, { "docid": "7f59a747bd970123f4d47336aa68deb2", "score": "0.65403247", "text": "protected function isRouteCallable()\n {\n return $this->callHook($this::C_HOOK_ROUTE_VALIDATION);\n }", "title": "" }, { "docid": "8dca208b16c68ff0a237507dfa6bec21", "score": "0.6484531", "text": "function hasSubControllers() {\n\t\treturn isset($this->_Controller->controllers);\n\t}", "title": "" }, { "docid": "0590068da4edf1aaab826e3bd0711584", "score": "0.6454539", "text": "public function isCallable(): bool\n\t{\n\t\treturn is_callable($this->definition);\n\t}", "title": "" }, { "docid": "129d25d5eef115902fe2845eda0e14ea", "score": "0.64031976", "text": "public function isExactControllerName()\n {\n return $this->_isExactControllerName;\n }", "title": "" }, { "docid": "625d9d90ddbf1d0e3e81ef799124b97b", "score": "0.63418835", "text": "public function isControllerAvailable($controller) {\n\t\treturn class_exists($this->getControllerClass($controller));\n\t}", "title": "" }, { "docid": "ec553f10fb43c90e11fa84192fc61e45", "score": "0.6314167", "text": "public function supportsAction($action) : bool\n {\n return is_callable($action);\n }", "title": "" }, { "docid": "529c867cf0b1a0e6c8631ec1db177a28", "score": "0.6302486", "text": "private function isPublicController($controllerName) {\n return in_array($controllerName, $this->publicControllers);\n }", "title": "" }, { "docid": "ea4001cc7d77739c984c96705b9cd2d1", "score": "0.62948173", "text": "protected function _callControllerMethod() {\n\n // Make sure the controller we are calling exists\n if (!isset($this->_controller) || !is_object($this->_controller)) {\n $this->_error(\"Controller does not exist: \" . $this->_url_controller);\n return false;\n }\n\n // Make sure the method we are calling exists\n if (!method_exists($this->_controller, $this->_url_method)) {\n $this->_error(\"Method does not exist: \" . $this->_url_method);\n return false;\n }\n\n call_user_func_array(array($this->_controller, $this->_url_method), $this->_url_args);\n }", "title": "" }, { "docid": "09ef36fab7a57e7fd7033e31793f69f5", "score": "0.6279788", "text": "public function isAction() : bool\n\t{\n\t\treturn $this->type == self::CONTROLLER_ACTION;\n\t}", "title": "" }, { "docid": "0bb58306686d2f6ddc3615afd21d389c", "score": "0.6229445", "text": "public function isControllerSupported($controller)\n {\n return isset($this->supportedControllers[$controller]);\n }", "title": "" }, { "docid": "0cd2b04b4f599c0cc5ec0da3179598d9", "score": "0.6178199", "text": "public function authorize(): bool\n {\n if ($this instanceof ClientPermissionsRequest || method_exists($this, 'permission')) {\n $server = $this->route()->parameter('server');\n\n if ($server instanceof Server) {\n return $this->user()->can($this->permission(), $server);\n }\n\n // If there is no server available on the reqest, trigger a failure since\n // we expect there to be one at this point.\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "b625b49ffa35a30e314320553ffc6cf9", "score": "0.61391836", "text": "public function init() {\n if (!empty($this->_url_controller)) {\n $this->_loadExistingController();\n $this->_callControllerMethod();\n } else {\n $this->_loadDefaultController();\n return false;\n }\n }", "title": "" }, { "docid": "edd10454a3e3b72c17615fc4e1b075da", "score": "0.6097972", "text": "public function isCallable()\n\t{\n\t\treturn $this->typeHint === self::CALLABLE_TYPE_HINT;\n\t}", "title": "" }, { "docid": "4ebe090697adf8e1db22b4979245a879", "score": "0.60426664", "text": "protected static function isSuitable($key, $noReturn, $controllerExists, $isCoreFile)\n {\n if ($noReturn\n && $controllerExists\n && Controller::$instance != null\n && $isCoreFile == false\n && ! isset(Controller::$instance->{$key}) // Warning: If user use $this->c['uri'] in load method \n ) { // it overrides instance of the current controller uri and effect to layers\n return true; // we need to check the key using isset\n }\n return false;\n }", "title": "" }, { "docid": "7775498e696e02379579488f903c8651", "score": "0.60235846", "text": "function startup(&$controller) {\n\t\t$isErrorOrTests = (\n\t\t\tstrtolower($controller->name) == 'cakeerror' ||\n\t\t\t(strtolower($controller->name) == 'tests' && Configure::read() > 0)\n\t\t);\n\t\tif ($isErrorOrTests) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$methods = array_flip($controller->methods);\n\t\t$action = strtolower($controller->params['action']);\n\t\t$isMissingAction = (\n\t\t\t$controller->scaffold === false &&\n\t\t\t!isset($methods[$action])\n\t\t);\n\n\t\tif ($isMissingAction) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (!$this->__setDefaults()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->data = $controller->data;\n\t\t$url = '';\n\n\t\tif (isset($controller->params['url']['url'])) {\n\t\t\t$url = $controller->params['url']['url'];\n\t\t}\n\t\t$url = Router::normalize($url);\n\t\t$loginAction = Router::normalize($this->loginAction);\n\n\t\t$allowedActions = array_map('strtolower', $this->allowedActions);\n\t\t$isAllowed = (\n\t\t\t$this->allowedActions == array('*') ||\n\t\t\tin_array($action, $allowedActions)\n\t\t);\n\n\t\tif ($loginAction != $url && $isAllowed) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($loginAction == $url) {\n\t\t\tif (empty($controller->data) || !isset($controller->data[$this->model->alias])) {\n\t\t\t\tif (!$this->Session->check('Auth.redirect') && !$this->loginRedirect && env('HTTP_REFERER')) {\n\t\t\t\t\t$this->Session->write('Auth.redirect', $controller->referer(null, true));\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$isValid = !empty($controller->data[$this->model->alias][$this->fields['username']]) &&\n\t\t\t\t!empty($controller->data[$this->model->alias][$this->fields['password']]);\n\n\t\t\tif ($isValid) {\n\t\t\t\t$username = $controller->data[$this->model->alias][$this->fields['username']];\n\t\t\t\t$password = $controller->data[$this->model->alias][$this->fields['password']];\n\n\t\t\t\t$data = array(\n\t\t\t\t\t$this->model->alias . '.' . $this->fields['username'] => $username,\n\t\t\t\t\t$this->model->alias . '.' . $this->fields['password'] => $password\n\t\t\t\t);\n\n\t\t\t\tif ($this->login($data)) {\n\t\t\t\t\tif ($this->autoRedirect) {\n\t\t\t\t\t\t$controller->redirect($this->redirect(), null, true);\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t$this->Session->setFlash($this->loginError, $this->flashElement, array(), 'auth');\n\t\t\t$controller->data[$this->model->alias][$this->fields['password']] = null;\n\t\t\treturn false;\n\t\t} else {\n\t\t\tif (!$this->user()) {\n\t\t\t\tif (!$this->RequestHandler->isAjax()) {\n\t\t\t\t\t$this->Session->setFlash($this->authError, $this->flashElement, array(), 'auth');\n\t\t\t\t\tif (!empty($controller->params['url']) && count($controller->params['url']) >= 2) {\n\t\t\t\t\t\t$query = $controller->params['url'];\n\t\t\t\t\t\tunset($query['url'], $query['ext']);\n\t\t\t\t\t\t$url .= Router::queryString($query, array());\n\t\t\t\t\t}\n\t\t\t\t\t$this->Session->write('Auth.redirect', $url);\n\t\t\t\t\t$controller->redirect($loginAction);\n\t\t\t\t\treturn false;\n\t\t\t\t} elseif (!empty($this->ajaxLogin)) {\n\t\t\t\t\t$controller->viewPath = 'elements';\n\t\t\t\t\techo $controller->render($this->ajaxLogin, $this->RequestHandler->ajaxLayout);\n\t\t\t\t\t$this->_stop();\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\t$controller->redirect(null, 403);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!$this->authorize) {\n\t\t\treturn true;\n\t\t}\n\n\t\textract($this->__authType());\n\t\tswitch ($type) {\n\t\t\tcase 'controller':\n\t\t\t\t$this->object =& $controller;\n\t\t\tbreak;\n\t\t\tcase 'crud':\n\t\t\tcase 'actions':\n\t\t\t\tif (isset($controller->LDAPAcl)) {\n\t\t\t\t\t$this->LDAPAcl =& $controller->LDAPAcl;\n\t\t\t\t} else {\n\t\t\t\t\ttrigger_error(__('Could not find LDAPAclComponent. Please include LDAPAcl in Controller::$components.', true), E_USER_WARNING);\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'model':\n\t\t\t\tif (!isset($object)) {\n\t\t\t\t\t$hasModel = (\n\t\t\t\t\t\tisset($controller->{$controller->modelClass}) &&\n\t\t\t\t\t\tis_object($controller->{$controller->modelClass})\n\t\t\t\t\t);\n\t\t\t\t\t$isUses = (\n\t\t\t\t\t\t!empty($controller->uses) && isset($controller->{$controller->uses[0]}) &&\n\t\t\t\t\t\tis_object($controller->{$controller->uses[0]})\n\t\t\t\t\t);\n\n\t\t\t\t\tif ($hasModel) {\n\t\t\t\t\t\t$object = $controller->modelClass;\n\t\t\t\t\t} elseif ($isUses) {\n\t\t\t\t\t\t$object = $controller->uses[0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$type = array('model' => $object);\n\t\t\tbreak;\n\t\t}\n\n\t\tif ($this->isAuthorized($type)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$this->Session->setFlash($this->authError, $this->flashElement, array(), 'auth');\n\t\t$controller->redirect($controller->referer(), null, true);\n\t\treturn false;\n\t}", "title": "" }, { "docid": "3634bbdb949be151e37d3cec23520a16", "score": "0.60224724", "text": "public function checkEndpoint() : bool\n {\n $role = Repository::role()->user()->getRepository();\n $permission = Repository::permission()->endpoint()->getRepository();\n\n return $this->permissionHandler($role,$permission);\n }", "title": "" }, { "docid": "52c62b24fbd50b5603884acd32bcf645", "score": "0.60211027", "text": "public function isStatic()\n {\n if (is_callable($this->action) AND is_array($this->action))\n {\n $class = is_string($this->action[0])? $this->action[0]: get_class($this->action[0]);\n $method = $this->action[1];\n \n if (method_exists($class, $method))\n {\n $rm = new ReflectionMethod( $class, $method );\n return $rm-> isStatic ();\n }\n else\n {\n return FALSE;\n }\n }\n return FALSE;\n }", "title": "" }, { "docid": "08e48609897f039206e955bb0afd1c1a", "score": "0.60060376", "text": "public function dispatch()\n {\n // Routes.phpにて指定されたControllerクラスのaction(動的)メソッドを実行する\n $callable = $this->getCallable();\n $controllerClass = $callable[0];\n $action = (isset($callable[1])) ? $callable[1] : \"\";\n\n // Factoryを使ってインスタンス生成するべきか\n $classReflection = new \\ReflectionClass($controllerClass);\n $controller = $classReflection->newInstance();\n\n // 全てのコントローラはBaseControllerを継承していること\n if ($controller instanceof BaseController) {\n $data = $this->getParams();\n if ($action === \"\") {\n $action = (isset($data['action'])) ? $data['action']: 'index';\n }\n // 指定されたアクション、executeメソッドが実行出来ること\n if (is_callable(array($controller, $action)) && is_callable(array($controller, 'execute'))) {\n // Invoke action\n $controller->execute($action, $data, $this->middleware);\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "6a24f8d5ccdfb59dc409747600ca7e7a", "score": "0.597743", "text": "public function isSellController() {\r\n if(Mage::registry('is_sell_pre_dispatch') == '1') return true;\r\n return false;\r\n }", "title": "" }, { "docid": "611e516a08fa556621e3e85c44c4d6db", "score": "0.5959372", "text": "public function isControllerActive($name)\n\t{\n\t\treturn (in_array($name, $this->activeControllers()));\n\t}", "title": "" }, { "docid": "6eb44d74f9f92e5685ca76ce3731f581", "score": "0.59515953", "text": "function wponion_is_callable( $callback ) {\n\t\tif ( is_callable( $callback ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( is_string( $callback ) && has_action( $callback ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( is_string( $callback ) && has_filter( $callback ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "07c9c46739485539e12ab1e1d9e807bd", "score": "0.5950696", "text": "protected function isAvailableAction($controller)\n {\n $values = explode(':', $controller);\n $entity = $values[0] .\":\". $values[1];\n $method = strtolower($values[2]);\n //\n $getAvailable = \"getAvailable\" . ucfirst($this->action);\n $Lists = self::$getAvailable();\n //\n if ( $entity && !isset($Lists[$entity]) ) {\n return false;\n } elseif ( $entity && !in_array($method, $Lists[$entity]['method']) ) {\n return false;\n }\n $this->entity = $entity;\n $this->setMethod($method);\n \n return true;\n }", "title": "" }, { "docid": "405d09a17330e75b7d81e720b83eaaf3", "score": "0.59481394", "text": "public function authorize() : bool\n {\n return true;\n }", "title": "" }, { "docid": "405d09a17330e75b7d81e720b83eaaf3", "score": "0.59481394", "text": "public function authorize() : bool\n {\n return true;\n }", "title": "" }, { "docid": "405d09a17330e75b7d81e720b83eaaf3", "score": "0.59481394", "text": "public function authorize() : bool\n {\n return true;\n }", "title": "" }, { "docid": "6d413473b767c2dc8782e9ba74624ba5", "score": "0.5945332", "text": "function has_performed() {\n\t\treturn $this->performed_render || $this->performed_redirect;\n\t}", "title": "" }, { "docid": "9e8dfdcb2edb61c44bf07030f71843a6", "score": "0.5943982", "text": "protected function canExecute() {\r\n return !empty($this->operations);\r\n }", "title": "" }, { "docid": "b411f9b772b1f59741b4d897daeaf1fb", "score": "0.59351647", "text": "public function authorize()\n : bool\n {\n return true;\n }", "title": "" }, { "docid": "c618841837d28a7f5fe340be0820b391", "score": "0.5923997", "text": "public function authorize()\n {\n if (Sentinel::check()) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "f919b6551269d203738539d79cec4b1f", "score": "0.59205514", "text": "public function authorize()\n {\n // по сути еще один middleware\n\n return true;\n }", "title": "" }, { "docid": "efb5a830292dfd8eb1be115c787e0e19", "score": "0.591426", "text": "public function canServe(): bool;", "title": "" }, { "docid": "f95e7c7eaa00dfe3ec144f0e96b30b61", "score": "0.59103787", "text": "public function authorize(): bool\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fd19d3dd24c34d7507d501f0e3557ab4", "score": "0.5901716", "text": "public function isAuthorized(){\n $nowAction = empty($this->request->getParam('action'))?'index':$this->request->getParam('action');\n $nowControllerAction = $this->request->getParam('controller').'-'.$nowAction;\n $roleActions = $this->request->session()->read('roleActions');\n if(in_array($nowControllerAction, $roleActions)){\n return true;\n }\n\n //Default deny\n return false;\n }", "title": "" }, { "docid": "590dc1733f2585cbd9259f35720398a9", "score": "0.58928996", "text": "public function isDataTableRequest() {\n\t\t$trigger = isset($this->settings['trigger']) ? $this->settings['trigger'] : $this->_defaults['trigger'];\n\t\tif ($trigger === true) {\n\t\t\treturn $this->_isDataTableRequest();\n\t\t}\n\t\tif (is_string($trigger) && is_callable(array($this->Controller, $trigger))) {\n\t\t\treturn $this->Controller->{$trigger}();\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "64562def79ba0691c79dc1b0b4d248a9", "score": "0.589078", "text": "function is_caller()\n\t{\n\t\treturn current_role() === UserRole::CALLER;\n\t}", "title": "" }, { "docid": "662d8777d387be022d538e06d5af87ec", "score": "0.588546", "text": "public function can_call() {\r\n if ($this->username && $this->password &&\r\n (is_null($this->ratelimit) || ($this->rateremaining > $this->ratelimit\r\n || $this->ratereset != time()))) {\r\n return true;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "27dd38a102f971713b84e7d94d7a91f6", "score": "0.5883698", "text": "public function authorize()\n {\n //false 表示用户无权限,如果要带入控制器设置为true\n return false;\n }", "title": "" }, { "docid": "44fa9ce57309410b0dc971d587c4ad3b", "score": "0.5883438", "text": "public function __invoke(): bool;", "title": "" }, { "docid": "d537ff1cc03a7eb4a08208ee984ea288", "score": "0.58672756", "text": "public function authorize()\n {\n $post = $this->route();\n return true;\n }", "title": "" }, { "docid": "35a3fcbd19e60d24d1064a1946e0b16f", "score": "0.58660066", "text": "public function canRun() {\n return TRUE;\n }", "title": "" }, { "docid": "54e6724331c5cddb916bcff2a5795d51", "score": "0.58587384", "text": "public function canHandleRequest() {\n\t\t$configuration = $this->configurationManager->getConfiguration(\n\t\t\tConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK\n\t\t);\n\n\t\treturn $configuration['extensionName'] === 'DfTools';\n\t}", "title": "" }, { "docid": "78ee042a253d2fb350154533b0cc4f58", "score": "0.58491427", "text": "protected function controllerMethodExists($methodName)\n {\n return method_exists($this->controller, $methodName);\n }", "title": "" }, { "docid": "cbceb2d80595fce18fc2cc1dc1537b45", "score": "0.58402675", "text": "private static function checkController(): void\n {\n Debug::setBacklog();\n\n /**\n * First, it defines the route controller name. If there is a specific controller set with\n * the 'controller' parent parameter in the route configuration, then it is set.\n *\n * However, if there is no specific controller defined, it sets the controller name based on\n * a base namespace (it can be the default namespace app/controller or a namespace defined\n * with the 'namespace' route parameter) and the namespace that follows the URL until the\n * parent node. The parent node is the controller class itself, and all the url nodes before\n * forms the namespace.\n */\n $controllerNamespace = Route::getControllerNamespace();\n\n if ($nodeController = Parameters::getController()) {\n $routeControllerName = $nodeController;\n } else {\n $baseNodeNamespace = Parameters::getNamespace() ?: self::DEFAULT_NODE_NAMESPACE;\n $routeControllerName = $baseNodeNamespace . implode($controllerNamespace);\n }\n\n /**\n * Checks if there is an output set in the route configuration. If there is, checks if the\n * defined output requires a controller to work.\n */\n if (Parameters::getOutput() !== null) {\n self::$controllerIsRequired = self::{Parameters::getOutput().'RequiresController'}();\n }\n\n /**\n * Next, it checks if the class exists.\n *\n * if the class exists, then its name is set in the $routeControllerName property and the\n * next method called is the checkControllerExtendsCore.\n */\n if (class_exists($routeControllerName)) {\n self::$routeControllerName = $routeControllerName;\n\n PerformanceAnalysis::flush(PERFORMANCE_ANALYSIS_LABEL);\n\n self::checkControllerExtendsCore();\n\n } else {\n /**\n * However, when the route controller doesn't exists, if the given output do not\n * requires a controller to work, it will jump to the checkOutputIsSet method and no\n * error will occur.\n */\n if (self::$controllerIsRequired === false) {\n self::checkOutputIsSet();\n return;\n }\n\n /**\n * However, if it requires a controller, then an exception is thrown.\n */\n $workingController = explode('\\\\', $routeControllerName);\n\n $notFoundClass = str_replace('\\\\', '', array_pop($workingController));\n $notFoundNamespace = implode('/', $workingController);\n\n throw new Exception(self::CONTROLLER_NOT_FOUND[1], self::CONTROLLER_NOT_FOUND[0], [$routeControllerName, $notFoundClass, $notFoundNamespace]);\n }\n }", "title": "" }, { "docid": "2b980f126d009b16c4a493d4dc426460", "score": "0.58347183", "text": "protected function passesAuthorization()\n\t{\n\t\tif (method_exists($this, 'authorize')) {\n\t\t\t$result = $this->container->call([$this, 'authorize']);\n\t\t\t\n\t\t\treturn $result instanceof Response ? $result->authorize() : $result;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" }, { "docid": "22580ba0b55117c4147c857f888b4631", "score": "0.5832826", "text": "public function authorize(): bool\n {\n return true;\n }", "title": "" } ]
1c8b71ac596a73b4876539aba0999d98
/ Time Ago Function Starts ///
[ { "docid": "2ecbb22cf38618d60d488a9de744127a", "score": "0.0", "text": "function time_ago($timestamp){ \n $time_ago = strtotime($timestamp); \n $current_time = time(); \n $time_difference = $current_time - $time_ago; \n $seconds = $time_difference; \n $minutes = round($seconds / 60 ); // value 60 is seconds \n $hours = round($seconds / 3600); //value 3600 is 60 minutes * 60 sec \n $days = round($seconds / 86400); //86400 = 24 * 60 * 60; \n $weeks = round($seconds / 604800); // 7*24*60*60; \n $months = round($seconds / 2629440); //((365+365+365+365+366)/5/12)*24*60*60 \n $years = round($seconds / 31553280); //(365+365+365+365+366)/5 * 24 * 60 * 60 \n if($seconds <= 60) { \n return \"Just Now\"; \n\t}else if($minutes <=60) { \n if($minutes==1){ \n return \"one minute ago\"; \n } else { \n return \"$minutes minutes ago\"; \n }\n }else if($hours <=24) { \n\tif($hours==1){ \n\treturn \"an hour ago\"; \n\t}else{ \n\treturn \"$hours hrs ago\"; \n\t} \n }else if($days <= 7){ \n\tif($days==1) \n\t{ \n\treturn \"yesterday\"; \n\t} \n\telse \n\t{ \n\treturn \"$days days ago\"; \n\t} \n }\n //4.3 == 52/12\n else if($weeks <= 4.3){ \n\tif($weeks==1){ \n\treturn \"a week ago\"; \n\t}else{ \n\treturn \"$weeks weeks ago\"; \n\t} \n\t}else if($months <=12){ \n\tif($months==1){ \n\treturn \"a month ago\"; \n\t}else{ \n\treturn \"$months months ago\"; \n\t} \n }else{ \n if($years==1) { \n return \"one year ago\"; \n }else{ \n return \"$years years ago\"; \n } \n }\n}", "title": "" } ]
[ { "docid": "f43301f60e5009488ab6197883a83719", "score": "0.73139596", "text": "private function airtime()\n {\n }", "title": "" }, { "docid": "4d38cbab68f695bb564880bb0c25ef4d", "score": "0.68103766", "text": "function timeStart()\n {\n Measure::getInstance()\n ->start();\n }", "title": "" }, { "docid": "24dc3cf007601cd04507a32e4caac3c9", "score": "0.6754823", "text": "function time(){}", "title": "" }, { "docid": "77858d104c036c24e0347e98002dae42", "score": "0.6570084", "text": "public function run()\n {\n $time = new Time();\n Log::debug('hellow Maryadi');\n Log::debug($time);\n Log::debug($time->timezone);\n Log::debug(Time::now());\n Log::debug(new Date());\n }", "title": "" }, { "docid": "c2e16171e810b766581f28691b1067b8", "score": "0.649291", "text": "abstract public function time();", "title": "" }, { "docid": "8bdeace3d2a24ff3f6e419a0029bfa69", "score": "0.6322712", "text": "public function getATime(){}", "title": "" }, { "docid": "8bdeace3d2a24ff3f6e419a0029bfa69", "score": "0.63218987", "text": "public function getATime(){}", "title": "" }, { "docid": "ccb3f47a69942580cae7323845b80534", "score": "0.6256294", "text": "function start_timer()\n{\n $time = time();\n return $time; //\"olms.asset_timer='$time'; olms.asset_timer_total = 0;\";\n}", "title": "" }, { "docid": "921a7e2dff46cc1a42c608afea201da1", "score": "0.6247168", "text": "final public static function time(){}", "title": "" }, { "docid": "d09079be26edb7ff4122c15c150dc17d", "score": "0.6202053", "text": "private function startTimer()\n {\n $this->startTime = microtime(true);\n }", "title": "" }, { "docid": "44fdc81f8b672e442c9b3f75657179c6", "score": "0.61945564", "text": "public function getATime()\n {\n }", "title": "" }, { "docid": "da76665849a6dedd4e91aca4a9a75434", "score": "0.6095007", "text": "public function schedule(){\n\t\t\t\n\t\t}", "title": "" }, { "docid": "bb138a2a2258a3f1ac15ffdb08da81d0", "score": "0.60659343", "text": "public function onTimer() {\r\n\r\n }", "title": "" }, { "docid": "e9f0cffea49018185e7fee366533b0c6", "score": "0.60238194", "text": "public function start() {\n\t\n\t\tlist($usec, $sec) = explode(' ',microtime());\n\t\t$this->timeStart = ((float)$usec + (float)$sec);\n\t\t\n\t}", "title": "" }, { "docid": "72d794d5b283d7f54324de42ccffac09", "score": "0.6023721", "text": "public static function Start(){ \n $oThis = self::CreateInstanceIfNotExists(); \n $oThis->aTime = array(\"start\" => microtime(true));\n }", "title": "" }, { "docid": "a8b34e5e2e45e869cf532bf9c84c5f25", "score": "0.5972767", "text": "public function tic()\n {\n if ($this->time <= $this->delay) {\n $this->time += .5;\n } else {\n $this->time = 1;\n }\n }", "title": "" }, { "docid": "d936154a10518b2ee4750241471f6f39", "score": "0.5952449", "text": "public function timeOut()\n\t{\n\t\techo 'alive!';\n\t}", "title": "" }, { "docid": "5b1b745ff49ea4b15c64d37e17dd777f", "score": "0.59428424", "text": "function start_time() {\n return time() + 24 * 60 * 60;\n}", "title": "" }, { "docid": "d3ddc34286d233d49ad4de27dbe31c10", "score": "0.5937233", "text": "public static function start_timer()\r\n\t\t{\r\n\r\n\t\t\t// Store the current time.\r\n\t\t\tself::$execution_time = microtime( true );\r\n\r\n\t\t}", "title": "" }, { "docid": "52085116cbe8cdcd53c4a0ccd5a3b2e3", "score": "0.5905323", "text": "public function schedule() {\n\n }", "title": "" }, { "docid": "abbbbb947230904f156c85917724cd63", "score": "0.5883558", "text": "function displayTime()\n {\n global $startTime;\n $timeInSeconds = microtime(true) - $startTime;\n echo \"<h3>This Game Took: \" . $timeInSeconds . \" in seconds (MicroTime) </h3><br /><br/>\";\n echo \"<h3>Total Matches:\" . $_SESSION['gameCount'] . \"</h3><br />\";\n $_SESSION['finalTime'] += $timeInSeconds;\n echo \"<h3>Total Time for All Matches: \" . $_SESSION['finalTime'] . \"</h3><br /><br />\";\n echo \"<h3>Average Time Per Game: \" . ( $_SESSION['finalTime'] / $_SESSION['gameCount']).\"</h3>\";\n $_SESSION['gameCount']++; \n }", "title": "" }, { "docid": "0d872d78d4a9bdcac0719a371b64e076", "score": "0.58759737", "text": "function start()\n {\n $this->_time_start = $this->timestamp();\n }", "title": "" }, { "docid": "921650f3959c04a504816515f0cce7e0", "score": "0.5863676", "text": "function principal_A(){\n\t//echo \"\\n<h1>inicio - \".date('d/m/Y H:i:s').\"</h1>\";\n\tfiltroPrimarioAgua();\n\t#sleep(120);\n\t//echo \"\\n<h1>passou pelo primario - \".date('d/m/Y H:i:s').\"</h1>\";\n\tfiltroSecundario('A');\n\t#sleep(60);\n\t//echo \"\\n<h1>passou pelo secundario - \".date('d/m/Y H:i:s').\"</h1>\";\n\talertaSMS('A');\n\t//echo \"\\n<h1>recebeu os sms - \".date('d/m/Y H:i:s').\"</h1>\";\n\t#sleep(30);\n\t//echo \"\\n<h1>fim Agua - \".date('d/m/Y H:i:s').\"</h1>\";\n}", "title": "" }, { "docid": "0ace36888cff4d8c51517c9090ee6f01", "score": "0.58440363", "text": "public function pauseUsageTimer(){}", "title": "" }, { "docid": "838fdeabedff9316895ab9de790a4769", "score": "0.58320665", "text": "public function start(): void\n {\n $this->timeEnd = 0;\n $this->timeStart = microtime(true);\n }", "title": "" }, { "docid": "51090255d3741370480703d913e10334", "score": "0.5830723", "text": "public function run()\n {\n $data = [\n\t\t\t['from'=>'08:00:00', 'to'=>'08:30:00'],\n\t\t\t['from'=>'08:30:00', 'to'=>'09:00:00'],\n\t\t\t['from'=>'09:00:00', 'to'=>'09:30:00'],\n\t\t\t['from'=>'09:30:00', 'to'=>'10:00:00'],\n\t\t\t['from'=>'10:00:00', 'to'=>'10:30:00'],\n\t\t\t['from'=>'10:30:00', 'to'=>'11:00:00'],\n\t\t\t['from'=>'11:00:00', 'to'=>'11:30:00'],\n\t\t\t['from'=>'11:30:00', 'to'=>'12:00:00'],\n\t\t\t['from'=>'13:30:00', 'to'=>'14:00:00'],\n\t\t\t['from'=>'14:00:00', 'to'=>'14:30:00'],\n\t\t\t['from'=>'14:30:00', 'to'=>'15:00:00'],\n\t\t\t['from'=>'15:00:00', 'to'=>'15:30:00'],\n\t\t\t['from'=>'15:30:00', 'to'=>'16:00:00'],\n\t\t\t['from'=>'16:00:00', 'to'=>'16:30:00'],\n\t\t\t['from'=>'16:30:00', 'to'=>'17:00:00']\n ];\n TimeSlot::insert($data); \n }", "title": "" }, { "docid": "d19fd2c409f8e0271f566b7be43135a4", "score": "0.5816765", "text": "public function start()\n {\n $this->start_time = $this->getMicrotime();\n }", "title": "" }, { "docid": "6500f6b6587f7cf5f58e66df1395c4c9", "score": "0.5816525", "text": "public static function start_timer()\r\n\t\t{\r\n\t\t\t\r\n\t\t\t// Increment the index.\r\n\t\t\t++self::$_execution_time_index;\r\n\r\n\t\t\t// Store the current time.\r\n\t\t\tself::$_execution_time[self::$_execution_time_index] = microtime( true );\r\n\r\n\t\t}", "title": "" }, { "docid": "e164205b7e1302c32bcfc2911acad4fd", "score": "0.580755", "text": "function mytime()\n {\n \t\n \t/*\n \t\tthe form is using the term id so getting the term object to put the term\n \t\tinfo into the database\n \t*/\n \t$project_info = taxonomy_term_load($_POST['project_id']);\n \t\n \t/* clean the user input */\n \t$user_task = check_plain($_POST['user_task']);\n \t\n \t/* clean user input */\n \t$project_hours = check_plain($_POST['hours_used']);\n \t\n \t/* clean user input */\n \t$event_date = check_plain($_POST['event_date']);\n \t \t\n \t\n \t/* add record to user database */\n \tglobal $user;\n \t \t\n \t$event = db_insert('timetracker_project_events') \n\t\t\t\t->fields(array(\n\t\t\t\t 'user_id' => $user->uid,\n\t\t\t\t 'project_id' => $project_info->tid,\n\t\t\t\t 'project_name' => $project_info->name,\n\t\t\t\t 'project_user_task' => $user_task,\n\t\t\t\t 'event_date' => $event_date,\n\t\t\t\t 'project_hours' => $project_hours,\n\t\t\t\t 'created' => date(\"Y-m-d H:i:s\"),\n\t\t\t\t 'changed' => date(\"Y-m-d H:i:s\")\n\t\t\t\t))\n\t\t\t\t->execute();\n\t\t\t\t\n\t\t/* inform the user */\n\t\t//drupal_set_message(t( 'Confirming ') . $project_hours . t(' task hours added to ') . $project_info->name . t(' for ') . $event_date );\n\t\t\n\t\t/* show the updated report */\n\t\tprint $event_date.'}{'. self::dailyreport(TRUE, $event_date);\n \t \t\n }", "title": "" }, { "docid": "ea47ba8d3a3df052f1bc4b083336282d", "score": "0.5791626", "text": "public function startTime($time);", "title": "" }, { "docid": "b9a2fe2fdc5ce35e10104695436db309", "score": "0.57878786", "text": "public function calculateTime(){\n //Duration in seconds\n $this->eDuration = $this->eElectricty / 3; \n }", "title": "" }, { "docid": "aa5d14adeb248ea97a6c1fe84bb11397", "score": "0.5725724", "text": "public function run()\n {\n $now = date('Y-m-d H:i:s');\n \n }", "title": "" }, { "docid": "bf1d7f0dc938aa727f1857bd5cbbd088", "score": "0.5720771", "text": "public function run()\n {\n factory(Rreturntime::class,20)->create();\n }", "title": "" }, { "docid": "0829b47d282889fe1e9cd5dc83409f99", "score": "0.57193655", "text": "public function resetTime()\n\t{\n\t\t$this->start_time = $this->microtime_float();\n\t}", "title": "" }, { "docid": "bd273a46ded1fc0ee60dae7dfa395b6a", "score": "0.57176465", "text": "public static function End(){ \n $oThis = self::CreateInstanceIfNotExists(); \n \n if(array_key_exists(\"start\", $oThis->aTime)){ \n $oThis->aTime[\"end\"] = microtime(true); \n $oThis->aTime[\"loading\"] = number_format(abs($oThis->aTime[\"end\"] - $oThis->aTime[\"start\"]), 4, \".\", \"\"); \n } \n }", "title": "" }, { "docid": "93ee7f3304be1361f0416dfa50f96eff", "score": "0.56600636", "text": "function getTime();", "title": "" }, { "docid": "b49e9b3a4a85d6a93bf241f4971e4d3b", "score": "0.5635925", "text": "function instantaneous()\n\t{\n\t\tif ($this -> session -> userdata('l0g_i5m')) {\n\t\t\t$data = $this->data;\n\n\t\t\t$data['all_meter'] = $this->user_m->all_meter($data['mem_id']);\n\t\t\t\n\t\t\t$data['all_meter_data'] = $this->user_m->all_meter_data($data['main_meter']);\n\t\t\t\n\t\t\t$data['title'] = 'Instantaneous';\n\t\t\t$data['sub_content'] = 'user/instantaneous';\n\t\t\t$this->load->view('template_index', $data);\n\t\t}else{\n\t\t\tredirect('home', 'refresh');\n\t\t}\n\t}", "title": "" }, { "docid": "9adc5697a4adf98dafc669f665944f90", "score": "0.5635579", "text": "function tangca($start,$finish)\n\n{\n\t$Start=$start;\n\t$Finish=$finish;\n\t//fe//cho \"$start and $finish\";\n\t$start=strtotime($Start);\t\t\t//chuyen string thanh typedef time int\n\t$start__=strtotime($Start);\n\t$start=getdate($start);\t\t\t//array [hours,minus,seconds,day,mon,year]\n\t$start_year=$start['year'];\n\t$start_mon=$start['mon'];\n\t$start_day=$start['mday']; //ngay\n\t$start_hours=$start['hours'];\n\t$start_minus=$start['minutes'];\n\t$start_nameday=$start['weekday'];\n\t$start_his=\"$start_hours:$start_minus:00\";\n\n\t// echo $date1_nameday;\n\t$finish=strtotime($Finish);\n\t$finish__=strtotime($Finish);\n\t$finish=getdate($finish);\n\t//$date__2=strtotime($finish);\n\n\t$finish_year=$finish['year'];\n\t$finish_mon=$finish['mon'];\n\t$finish_day=$finish['mday']; //ngay\n\t$finish_hours=$finish['hours'];\n\t$finish_minus=$finish['minutes'];\n\t$finish_nameday=$finish['weekday'];\n\t$finish_his=\"$finish_hours:$finish_minus:00\";\n\n\n\t$overtime=0;\n\t$temp=0;\n\n\tif (strotime($start_his)> strtotime(\"16:45:00\"))\n\t{\n\t\t$overtime=($finish__ - $start__)/60 - 30;\n\t}\n\telse\n\t\t{\n\n\t\t\tif (strotime($start_his) <= strtotime(\"10:00:00\"))\n\t\t\t{\n\t\t\t\tif ( strotime($finish_his)<=strtotime(\"10:00:00\"))\n\t\t\t\t\t$temp=0;\n\t\t\t\telseif ( strotime($finish_his)<=strtotime(\"12:00:00\"))\n\t\t\t\t\t$temp=15;\n\t\t\t\telseif ( strotime($finish_his)<=strtotime(\"15:00:00\"))\n\t\t\t\t\t$temp=60;\n\t\t\t\telseif ( strotime($finish_his)<=strtotime(\"16:45:00\"))\n\t\t\t\t\t$temp=75;\n\t\t\t\telse $temp=105;\n\t\t\t}\n\t\t\telseif (strotime($start_his) <= strtotime(\"12:00:00\"))\n\t\t\t{\n\t\t\t\tif ( strotime($finish_his)<=strtotime(\"12:00:00\"))\n\t\t\t\t\t$temp=0;\n\t\t\t\telseif ( strotime($finish_his)<=strtotime(\"15:00:00\"))\n\t\t\t\t\t$temp=45;\n\t\t\t\telseif ( strotime($finish_his)<=strtotime(\"16:45:00\"))\n\t\t\t\t\t$temp=60;\n\t\t\t\telse $temp=90;\n\t\t\t}\n\t\t\telseif (strotime($start_his) <= strtotime(\"15:00:00\"))\n\t\t\t{\n\t\t\t\tif ( strotime($finish_his)<=strtotime(\"15:00:00\"))\n\t\t\t\t\t$temp=0;\n\t\t\t\telseif ( strotime($finish_his)<=strtotime(\"16:45:00\"))\n\t\t\t\t\t$temp=15;\n\t\t\t\telse $temp=45;\n\t\t\t}\n\t\t\telseif (strotime($start_his) <= strtotime(\"16:45:00\"))\n\t\t\t{\n\t\t\t\tif ( strotime($finish_his)<=strtotime(\"16:45:00\"))\n\t\t\t\t$temp=0;\n\t\t\t\telse $temp=30;\n\t\t\t}\n\t\t\telseif (strotime($start_his) > strtotime(\"16:45:00\"));\n\n\n\t\t}\n\n\t\t$overtime=($finish__ - $start__)/60 - $temp;\n\n\treturn $overtime;\n}", "title": "" }, { "docid": "7a85c3190108f18ca231f6e174f8872a", "score": "0.5625664", "text": "abstract protected function getTotalTime(): float;", "title": "" }, { "docid": "8ab36d93beeed53c45f2adcb6d49ceb8", "score": "0.5623734", "text": "function _time()\n{\n\tstatic $timeshift = 0;\n\tif ($zone = config('system.time zone'))\n\t\tini_set(\"date.timezone\", $zone);\n\tif ($extra = config('system.time shift'))\n\t\t$timesift = $extra;\n\treturn time() + $extra;\n}", "title": "" }, { "docid": "2e12480c2fba3e8cac23486457b4ab29", "score": "0.5614723", "text": "public function time_greeting(){\r\n date_default_timezone_set('Europe/Dublin');\t\r\n $time = (int)date(\"H\");\r\n if($time >=0 && $time < 12 ){\r\n $result = 'good morning';\r\n }elseif($time >= 12 && $time < 17){\r\n $result = 'good afternoon';\r\n }elseif($time >=17 && $time <=24){\r\n $result = 'good evening';\r\n }\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "98c7971abaeccdb2da48240584b7e061", "score": "0.56137544", "text": "public function calculateTimeForDistance()\r\n\t{\r\n\t}", "title": "" }, { "docid": "4c624cfc4d02e7f291ca811ad07c351b", "score": "0.55925155", "text": "function actionHeartBeat() \r\n\t{\r\n\t\tPelicanoHelper::heartBeat();\r\n\t}", "title": "" }, { "docid": "096132ef2fa166dcd3ba2fa76007310f", "score": "0.55846256", "text": "public function actionTestTime()\n {\n echo date_default_timezone_get() . \"<br>\\n\";;\n echo \"Time: \" . date(\"Y-m-d H:i:s\") . \"<br>\\n\";\n\n $shortName = exec('date +%Z');\n echo \"Short timezone:\" . $shortName . \"<br>\";\n\n $longName = timezone_name_from_abbr($shortName);\n echo \"Long timezone:\" . $longName . \"<br>\";\n\n date_default_timezone_set($longName);\n echo \"Time: \" . date(\"Y-m-d H:i:s\") . \"<br>\\n\";\n }", "title": "" }, { "docid": "fccab14be8c10837aa4c69dff5b60f9e", "score": "0.5567834", "text": "function api_newTimeEntry(){\n\t$db=Database::getDB();\n\t$empty=$db->putEmptyTime();\n\tif($empty){\n\t\ttpr_asyncOK(['id'=>$empty['time_id']]);\n\t}else{\n\t\ttpr_asyncError('Database error occurred while logging time.');\n\t}\n}", "title": "" }, { "docid": "8d28f8c2da418fa2bda1c901c9b4a7e3", "score": "0.555907", "text": "public function sleep(){}", "title": "" }, { "docid": "8824dce387514e22f648f544c1f2971f", "score": "0.5545413", "text": "function OnVdMainLoop()\n{\n\tglobal $Ap , $Ap_Vd, $Vd_Timer, $Vd_Mbs\t;\n\n\t$Vd_Timer->RunTimer()\t;//Must for Timer.\n\n}", "title": "" }, { "docid": "7f1699d4dad706a0b1a48b39e76ea314", "score": "0.55428743", "text": "public function run()\n {\n //\n $timer = new Timer();\n $timer->name = 'Sample Record';\n $timer->start = '2019-02-01 10:00:00';\n $timer->end = '2019-02-01 11:00:00';\n $timer->save();\n\n }", "title": "" }, { "docid": "ec41b34b11f3f2784830194075bcb5b8", "score": "0.55418164", "text": "abstract function getStartTime();", "title": "" }, { "docid": "98060a992edbcb8969ce663318392acc", "score": "0.55413866", "text": "public function testDoTimeWithTime()\n {\n $this->doCommandTest(\n 'PRIVMSG nick :' . chr(1) . 'TIME time'\n . chr(1), 'doTime', array('nick', 'time')\n );\n }", "title": "" }, { "docid": "e84db8832bd5d5954efe1b15f6b89439", "score": "0.5538281", "text": "public function schedules();", "title": "" }, { "docid": "07a879ef73795c57cfd5eee98ba6d3b9", "score": "0.5534179", "text": "public function actionLotteryTimers()\n {\n }", "title": "" }, { "docid": "2c4ec4162f3450a888dde6b782c126ef", "score": "0.5528579", "text": "public function Todzeit_Reached(){ \n \n $MemVal = new puffer($this->GetIDForIdent(\"puffer\"));\n \n\n $MemVal->setMem(\"Todzeit\", true); // Merker setzen\n $this->SendDebug(\"Todzeit_Reached\", \"Timer ist abgelaufen: \".$MemVal->getMem(\"Todzeit\"), 0);\n $this->SetTimerInterval('T_TodZeit', 0); //Timer abschalten\n $this->Heat_Stat();\n $this->SendDebug(\"Todzeit_Reached\", \"Heat_Stat() starten. \", 0);\n }", "title": "" }, { "docid": "a1143f47a1ed29317bc2836dadcd7331", "score": "0.55274606", "text": "function time_from_start($time) {\n global $start_time;\n //$time = strtotime($time);\n $time = $time - $start_time; // submission time in seconds since start of contest\n return seconds_to_time($time);\n}", "title": "" }, { "docid": "4ff05c491363a0fad8dbb97afd0cc7ef", "score": "0.5521099", "text": "public static function startwatch()\n\t{\n\t//\tCompter\n\t\t$mtime = microtime();\n\t\t$mtime = explode(' ', $mtime);\n\t//\tPlusieurs chronos peuvent cohabiter. En ouvrir un nouveau\n\t\tself::$stopwatch[] = $mtime[1] + $mtime[0];\n\t}", "title": "" }, { "docid": "297fa748e534fa5bc2d0fe42d1b692ba", "score": "0.55208707", "text": "public function syncTime()\n {\n if(empty($this->password)) \n {\n $this->log(\"error\", \"You have to set your password first\");\n return false;\n }\n\n $date = date(\"YmdHis\");\n $this->log(\"info\", \"Setting time on Integra to \" . $date);\n $this->send(\"8E\" . $this->getPassword() . $date);\n }", "title": "" }, { "docid": "cede0329fe411b13255a0a673c570237", "score": "0.5517926", "text": "public function time(float $time){}", "title": "" }, { "docid": "277a456353fff122d3e6d3541175b8f9", "score": "0.5498201", "text": "public function generateTiming()\n {\n return time();\n }", "title": "" }, { "docid": "f5b92d9f5f03cf8fa6fb243dbc0b61cd", "score": "0.5491626", "text": "public function start_track_time()\r\n {\r\n $startTime = microtime(true);\r\n $endTime = microtime(true);\r\n $callTime = $endTime - $startTime;\r\n echo PHP_EOL . 'Start Time: ', sprintf('%.4f', $callTime), ' s', PHP_EOL;\r\n echo 'Memory: ', sprintf('%.2f', (memory_get_usage(false) / 1024)), ' k', PHP_EOL;\r\n echo 'Peak Memory: ', sprintf('%.2f', (memory_get_peak_usage(false) / 1024)), ' k', PHP_EOL, PHP_EOL;\r\n\r\n }", "title": "" }, { "docid": "8d083b597a091a34234815e47ec1bc9c", "score": "0.54915124", "text": "public function test(){\r\n //dump($aa);\r\n echo (0%2).'<br>';\r\n echo date('Y-m-d H:i:s',1554052767).PHP_EOL;\r\n echo time();\r\n }", "title": "" }, { "docid": "b2927216ed8889a337e28a34a98d900f", "score": "0.5476763", "text": "function eventclass_time()\n\t{\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\n//\tonscreen events\n\n\t}", "title": "" }, { "docid": "dcbd24a24fbf39a64a8c69cb523c3f4e", "score": "0.54740864", "text": "function indo_time($time = '') {\n\t\t$jam = date(\"g:i a\", strtotime($time));\n\t\treturn $jam;\n\t}", "title": "" }, { "docid": "dfd2ca853582269e43b51457882cdd79", "score": "0.545551", "text": "function timing($key, $time);", "title": "" }, { "docid": "cbc003af5970485a48656650f9e6b53b", "score": "0.54504013", "text": "function gameStart(){\n\t\t\tif($this->winner('X') == true){\n\t\t\t\techo \"<center>GAME OVER <br> X wins </center>\";\n\t\t\t\t$this->win = true;\n\t\t\t}else if($this->winner('O') == true){\n\t\t\t\techo \"<center>GAME OVER <br> O wins </center>\";\n\t\t\t\t$this->win = true;\n\t\t\t}\n\t\t\t\n\t\t\t$this->turn();\n\t\t\t\n\t\t\t\n\t\t\tif($this->turn_count == 9 && $this->win == false){\n\t\t\t\techo \"<center>It's a tie</center>\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->display();\n\t\t\t\n\t\t}", "title": "" }, { "docid": "828e02a3ae886b893be89e22a956fca7", "score": "0.5447425", "text": "private function setTime() {\n $this->time = strftime(\"%Y-%m-%d %H:%M:%S\", time());\n }", "title": "" }, { "docid": "21a7704eae9c4cd41aaf07d0855f44e6", "score": "0.543744", "text": "public function partytime(){\t\n\t\t$this->Set_Template('output', 'thestone/partytime.php');\n\t\t$this->setTheStoneCommonTemplates();\n\t\t$this->Output_Page();\n\t}", "title": "" }, { "docid": "183b520a809292819759caa763c0bb97", "score": "0.54300815", "text": "function activate_time_to_read() {\n\tTime_To_Read::activate();\n}", "title": "" }, { "docid": "46f85449d681228c46a48ead72f67f98", "score": "0.5417073", "text": "function run_time_to_read() {\n\t$plugin = new Time_To_Read();\n\t$plugin->run();\n}", "title": "" }, { "docid": "00e802ba786089ad1a2e2b439f699537", "score": "0.54136443", "text": "public function setAutoHangup($time);", "title": "" }, { "docid": "bd2c1f0511769c0376af2314b88bf533", "score": "0.54077417", "text": "function timer_start() {\n global $timer;\n list($usec, $sec) = explode(' ', microtime());\n $timer = (float)$usec + (float)$sec;\n}", "title": "" }, { "docid": "6b9c857b0f2194b3b68cc843d3ccea87", "score": "0.54072887", "text": "private function __sleep()\n {\n\n }", "title": "" }, { "docid": "618215b031cfcb00ce758360765a7f4f", "score": "0.5402435", "text": "function calculateTime($point2){\r\n $drivingTime = sqrt(pow(0 - $point2[0], 2) + pow(0 - $point2[1], 2));\r\n return round($drivingTime, 2);\r\n }", "title": "" }, { "docid": "8bff060b1d0f5032b1ce0a77617b68e4", "score": "0.53953415", "text": "public function excute();", "title": "" }, { "docid": "0187adda50fa554d852ac227eaed453b", "score": "0.5394297", "text": "public function clockSequence($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "title": "" }, { "docid": "24ab41c2e8f0e66148d31ce5f7cda8cf", "score": "0.539154", "text": "function getLifeTime();", "title": "" }, { "docid": "7eb8b0de162fc1f21823669abb447547", "score": "0.5388611", "text": "public function aseate() {\n echo \"Me estoy limpiando las plumas<br>\";\n }", "title": "" }, { "docid": "402a4936d7aa137b6456ad4ddb9d3fe5", "score": "0.538377", "text": "public function getInitialTime(){ }", "title": "" }, { "docid": "87183debe71743b2bdf3626d04f97f66", "score": "0.5383306", "text": "private function __sleep()\r\n {\r\n }", "title": "" }, { "docid": "58fe8d3d57c2e66d7e5e7d091633df18", "score": "0.53831166", "text": "public function getTimer();", "title": "" }, { "docid": "a3c0c2f099d7ffd0d5fd5d51a7d37876", "score": "0.5381545", "text": "function __sleep()\n {\n }", "title": "" }, { "docid": "21ea5cc5b52bdceb6001c46b5dc45a79", "score": "0.53808254", "text": "function gatOneAmActivity(){\n\n }", "title": "" }, { "docid": "b1ba3e31b65cdb33d07404aa925129a3", "score": "0.537718", "text": "public function timingAction($time)\n {\n sleep($time);\n\n return new Response(\"waking up\");\n }", "title": "" }, { "docid": "534e71195ddf30cd1ed40afe84187661", "score": "0.5362802", "text": "function setLifeTime($time);", "title": "" }, { "docid": "5dfd8b6366d87f16fa950b4580135770", "score": "0.5362712", "text": "public function startCase() {\n\t}", "title": "" }, { "docid": "7236f2758ccaf9b835eef85b80bc9739", "score": "0.53559077", "text": "function __sleep() {\r\n\t}", "title": "" }, { "docid": "f001e6f58d69ad5c633272e445833302", "score": "0.53420085", "text": "function ajr_trackmate_find_incorrect_comptime( $testing, $args ) { \n\n\t## Process Timer - Start\n\t//$start_time = microtime(true);\n\n\tglobal $wpdb; \n\n\t# Options\n\t$option_comptime\t\t\t\t\t\t= get_option( 'ajr_trackmate_comptime');\n\t$comptime_margin_flat_fast_fast\t\t\t= ( empty($option_comptime['comptime_incorrect_margin_fast']['flat_fast']) ? 0 : $option_comptime['comptime_incorrect_margin_fast']['flat_fast'] - 100 );\n\t$comptime_margin_flat_fast_slow\t\t\t= ( empty($option_comptime['comptime_incorrect_margin_fast']['flat_slow']) ? 0 : $option_comptime['comptime_incorrect_margin_fast']['flat_slow'] - 100 );\n\t$comptime_margin_flat_good_firm_fast\t= ( empty($option_comptime['comptime_incorrect_margin_good_firm']['flat_fast']) ? 0 : $option_comptime['comptime_incorrect_margin_good_firm']['flat_fast'] - 100 );\n\t$comptime_margin_flat_good_firm_slow\t= ( empty($option_comptime['comptime_incorrect_margin_good_firm']['flat_slow']) ? 0 : $option_comptime['comptime_incorrect_margin_good_firm']['flat_slow'] - 100 );\n\t$comptime_margin_flat_good_fast\t\t\t= ( empty($option_comptime['comptime_incorrect_margin_good']['flat_fast']) ? 0 : $option_comptime['comptime_incorrect_margin_good']['flat_fast'] - 100 );\n\t$comptime_margin_flat_good_slow\t\t\t= ( empty($option_comptime['comptime_incorrect_margin_good']['flat_slow']) ? 0 : $option_comptime['comptime_incorrect_margin_good']['flat_slow'] - 100 );\n\t$comptime_margin_flat_good_soft_fast\t= ( empty($option_comptime['comptime_incorrect_margin_good_soft']['flat_fast']) ? 0 : $option_comptime['comptime_incorrect_margin_good_soft']['flat_fast'] - 100 );\n\t$comptime_margin_flat_good_soft_slow\t= ( empty($option_comptime['comptime_incorrect_margin_good_soft']['flat_slow']) ? 0 : $option_comptime['comptime_incorrect_margin_good_soft']['flat_slow'] - 100 );\n\t$comptime_margin_flat_soft_fast\t\t\t= ( empty($option_comptime['comptime_incorrect_margin_soft']['flat_fast']) ? 0 : $option_comptime['comptime_incorrect_margin_soft']['flat_fast'] - 100 );\n\t$comptime_margin_flat_soft_slow\t\t\t= ( empty($option_comptime['comptime_incorrect_margin_soft']['flat_slow']) ? 0 : $option_comptime['comptime_incorrect_margin_soft']['flat_slow'] - 100 );\n\t$comptime_margin_flat_heavy_fast\t\t= ( empty($option_comptime['comptime_incorrect_margin_heavy']['flat_fast']) ? 0 : $option_comptime['comptime_incorrect_margin_heavy']['flat_fast'] - 100 );\n\t$comptime_margin_flat_heavy_slow\t\t= ( empty($option_comptime['comptime_incorrect_margin_heavy']['flat_slow']) ? 0 : $option_comptime['comptime_incorrect_margin_heavy']['flat_slow'] - 100 );\n\t$comptime_margin_jump_fast_fast\t\t\t= ( empty($option_comptime['comptime_incorrect_margin_fast']['jump_fast']) ? 0 : $option_comptime['comptime_incorrect_margin_fast']['jump_fast'] - 100 );\n\t$comptime_margin_jump_fast_slow\t\t\t= ( empty($option_comptime['comptime_incorrect_margin_fast']['jump_slow']) ? 0 : $option_comptime['comptime_incorrect_margin_fast']['jump_slow'] - 100 );\n\t$comptime_margin_jump_good_firm_fast\t= ( empty($option_comptime['comptime_incorrect_margin_good_firm']['jump_fast']) ? 0 : $option_comptime['comptime_incorrect_margin_good_firm']['jump_fast'] - 100 );\n\t$comptime_margin_jump_good_firm_slow\t= ( empty($option_comptime['comptime_incorrect_margin_good_firm']['jump_slow']) ? 0 : $option_comptime['comptime_incorrect_margin_good_firm']['jump_slow'] - 100 );\n\t$comptime_margin_jump_good_fast\t\t\t= ( empty($option_comptime['comptime_incorrect_margin_good']['jump_fast']) ? 0 : $option_comptime['comptime_incorrect_margin_good']['jump_fast'] - 100 );\n\t$comptime_margin_jump_good_slow\t\t\t= ( empty($option_comptime['comptime_incorrect_margin_good']['jump_slow']) ? 0 : $option_comptime['comptime_incorrect_margin_good']['jump_slow'] - 100 );\n\t$comptime_margin_jump_good_soft_fast\t= ( empty($option_comptime['comptime_incorrect_margin_good_soft']['jump_fast']) ? 0 : $option_comptime['comptime_incorrect_margin_good_soft']['jump_fast'] - 100 );\n\t$comptime_margin_jump_good_soft_slow\t= ( empty($option_comptime['comptime_incorrect_margin_good_soft']['jump_slow']) ? 0 : $option_comptime['comptime_incorrect_margin_good_soft']['jump_slow'] - 100 );\n\t$comptime_margin_jump_soft_fast\t\t\t= ( empty($option_comptime['comptime_incorrect_margin_soft']['jump_fast']) ? 0 : $option_comptime['comptime_incorrect_margin_soft']['jump_fast'] - 100 );\n\t$comptime_margin_jump_soft_slow\t\t\t= ( empty($option_comptime['comptime_incorrect_margin_soft']['jump_slow']) ? 0 : $option_comptime['comptime_incorrect_margin_soft']['jump_slow'] - 100 );\n\t$comptime_margin_jump_heavy_fast\t\t= ( empty($option_comptime['comptime_incorrect_margin_heavy']['jump_fast']) ? 0 : $option_comptime['comptime_incorrect_margin_heavy']['jump_fast'] - 100 );\n\t$comptime_margin_jump_heavy_slow\t\t= ( empty($option_comptime['comptime_incorrect_margin_heavy']['jump_slow']) ? 0 : $option_comptime['comptime_incorrect_margin_heavy']['jump_slow'] - 100 );\n\t\n\t# args\n\t$table_name\t\t\t\t\t\t= 'ajr_trackmate_comptime';\n\t$race_date\t\t\t\t\t\t= $args['race_date'];\n\t$race_time\t\t\t\t\t\t= $args['race_time'];\n\t$track_name\t\t\t\t\t\t= $args['track_name'];\n\t$rcode_track_factor\t\t\t\t= $args['rcode_track_factor'];\n\t$yards\t\t\t\t\t\t\t= $args['yards'];\n\t$going_description\t\t\t\t= $args['going_description'];\n\t$race_comptime\t\t\t\t\t= $args['race_comptime'];\n\t$race_comptime_numeric\t\t\t= $args['race_comptime_numeric'];\n\t$factor_id\t\t\t\t\t\t= $args['factor_id'];\n\t$factors_comptime\t\t\t\t= $args['factors_comptime'];\n\t$factors_comptime_numeric\t\t= $args['factors_comptime_numeric'];\n\t//if( ajr_trackmate_authorised('administrator') ) : echo '<br>Testing: '.$track_name.' - '.$race_date.' - '.$race_time.' - '.$yards.' - '.$factor_id; endif; \t\n\n\t# Calculations\n\t$comptime_standard_diff\t\t\t= number_format( ($race_comptime_numeric / $factors_comptime_numeric) * 100 - 100, 2);\n\t$comptime_standard_diff_secs\t= number_format($race_comptime_numeric - $factors_comptime_numeric, 2);\n\t\n\t/*if( is_null($race_comptime_numeric) ) :\n\t\techo '<br>Blank: '.$track_name.' - '.$race_date.' - '.$race_time.' - '.$race_comptime_numeric.' - '.$race_comptime.' - '.$factors_comptime_numeric;\n\telse :\n\t\techo '<br>Not Blank: '.$track_name.' - '.$race_date.' - '.$race_time.' - '.$race_comptime_numeric.' - '.$race_comptime.' - '.$factors_comptime_numeric;\n\tendif;*/\n\t\n\t//echo $comptime_standard_diff.' > '.$comptime_margin_jump_heavy_slow.' = red || '.$comptime_standard_diff.' < '.$comptime_margin_jump_heavy_fast.' = limegreen';\n\n\t# check for incorrect comptime (not within trigger margins)\n\t$incorrect_comptime = false;\n\tif(\tin_array($rcode_track_factor,array('Flat','NH Flat','Poltrack','Tapeta','Fibresand','Sand')) ) :\n\t\tif( strtolower($going_description)=='fast' && ($comptime_standard_diff <= $comptime_margin_flat_fast_fast || $comptime_standard_diff >= $comptime_margin_flat_fast_slow) ) :\n\t\t\t$incorrect_comptime_info\t= 'rcode:<strong>'.$rcode_track_factor.'</strong> going:<strong>'.$going_description.'</strong> fast:<strong>'.$comptime_margin_flat_fast_fast.'</strong> slow:<strong>'.$comptime_margin_flat_fast_slow.'</strong> diff:<strong style=\"color:'.($comptime_standard_diff>$comptime_margin_flat_fast_slow?'red':($comptime_standard_diff<$comptime_margin_flat_fast_fast?'limegreen':'')).'\">'.$comptime_standard_diff.'%</strong> ('.$comptime_standard_diff_secs.')';\n\t\t\t$incorrect_comptime\t\t\t= true;\n\t\telseif( strtolower($going_description)=='good to firm' && ($comptime_standard_diff <= $comptime_margin_flat_good_firm_fast || $comptime_standard_diff >= $comptime_margin_flat_good_firm_slow) ) :\n\t\t\t$incorrect_comptime_info\t= 'rcode:<strong>'.$rcode_track_factor.'</strong> going:<strong>'.$going_description.'</strong> fast:<strong>'.$comptime_margin_flat_good_firm_fast.'</strong> slow:<strong>'.$comptime_margin_flat_good_firm_slow.'</strong> diff:<strong style=\"color:'.($comptime_standard_diff>$comptime_margin_flat_good_firm_slow?'red':($comptime_standard_diff<$comptime_margin_flat_good_firm_fast?'limegreen':'')).'\">'.$comptime_standard_diff.'%</strong> ('.$comptime_standard_diff_secs.')';\n\t\t\t$incorrect_comptime\t\t\t= true;\n\t\telseif( strtolower($going_description)=='good' && ($comptime_standard_diff <= $comptime_margin_flat_good_fast || $comptime_standard_diff >= $comptime_margin_flat_good_slow) ) :\n\t\t\t$incorrect_comptime_info\t= 'rcode:<strong>'.$rcode_track_factor.'</strong> going:<strong>'.$going_description.'</strong> fast:<strong>'.$comptime_margin_flat_good_fast.'</strong> slow:<strong>'.$comptime_margin_flat_good_slow.'</strong> diff:<strong style=\"color:'.($comptime_standard_diff>$comptime_margin_flat_good_slow?'red':($comptime_standard_diff<$comptime_margin_flat_good_fast?'limegreen':'')).'\">'.$comptime_standard_diff.'%</strong> ('.$comptime_standard_diff_secs.')';\n\t\t\t$incorrect_comptime\t\t\t= true;\n\t\telseif( strtolower($going_description)=='good to soft' && ($comptime_standard_diff <= $comptime_margin_flat_good_soft_fast || $comptime_standard_diff >= $comptime_margin_flat_good_soft_slow) ) :\n\t\t\t$incorrect_comptime_info\t= 'rcode:<strong>'.$rcode_track_factor.'</strong> going:<strong>'.$going_description.'</strong> fast:<strong>'.$comptime_margin_flat_good_soft_fast.'</strong> slow:<strong>'.$comptime_margin_flat_good_soft_slow.'</strong> diff:<strong style=\"color:'.($comptime_standard_diff>$comptime_margin_flat_good_soft_slow?'red':($comptime_standard_diff<$comptime_margin_flat_good_soft_fast?'limegreen':'')).'\">'.$comptime_standard_diff.'%</strong> ('.$comptime_standard_diff_secs.')';\n\t\t\t$incorrect_comptime\t\t\t= true;\n\t\telseif( strtolower($going_description)=='soft' && ($comptime_standard_diff <= $comptime_margin_flat_soft_fast || $comptime_standard_diff >= $comptime_margin_flat_soft_slow) ) :\n\t\t\t$incorrect_comptime_info\t= 'rcode:<strong>'.$rcode_track_factor.'</strong> going:<strong>'.$going_description.'</strong> fast:<strong>'.$comptime_margin_flat_soft_fast.'</strong> slow:<strong>'.$comptime_margin_flat_soft_slow.'</strong> diff:<strong style=\"color:'.($comptime_standard_diff>$comptime_margin_flat_soft_slow?'red':($comptime_standard_diff<$comptime_margin_flat_soft_fast?'limegreen':'')).'\">'.$comptime_standard_diff.'%</strong> ('.$comptime_standard_diff_secs.')';\n\t\t\t$incorrect_comptime\t\t\t= true;\n\t\telseif( strtolower($going_description)=='heavy' && ($comptime_standard_diff <= $comptime_margin_flat_heavy_fast || $comptime_standard_diff >= $comptime_margin_flat_heavy_slow) ) :\n\t\t\t$incorrect_comptime_info\t= 'rcode:<strong>'.$rcode_track_factor.'</strong> going:<strong>'.$going_description.'</strong> fast:<strong>'.$comptime_margin_flat_heavy_fast.'</strong> slow:<strong>'.$comptime_margin_flat_heavy_slow.'</strong> diff:<strong style=\"color:'.($comptime_standard_diff>$comptime_margin_flat_heavy_slow?'red':($comptime_standard_diff<$comptime_margin_flat_heavy_fast?'limegreen':'')).'\">'.$comptime_standard_diff.'%</strong> ('.$comptime_standard_diff_secs.')';\n\t\t\t$incorrect_comptime\t\t\t= true;\n\t\tendif;\n\telseif( in_array($rcode_track_factor,array('Chase','Hurdle')) ) :\n\t\tif( strtolower($going_description)=='fast' && ($comptime_standard_diff <= $comptime_margin_jump_fast_fast || $comptime_standard_diff >= $comptime_margin_jump_fast_slow) ) :\n\t\t\t$incorrect_comptime_info\t= 'rcode:<strong>'.$rcode_track_factor.'</strong> going:<strong>'.$going_description.'</strong> fast:<strong>'.$comptime_margin_jump_fast_fast.'</strong> slow:<strong>'.$comptime_margin_jump_fast_slow.'</strong> diff:<strong style=\"color:'.($comptime_standard_diff>$comptime_margin_jump_fast_slow?'red':($comptime_standard_diff<$comptime_margin_jump_fast_fast?'limegreen':'')).'\">'.$comptime_standard_diff.'%</strong> ('.$comptime_standard_diff_secs.')';\n\t\t\t$incorrect_comptime\t\t\t= true;\n\t\telseif( strtolower($going_description)=='good to firm' && ($comptime_standard_diff <= $comptime_margin_jump_good_firm_fast || $comptime_standard_diff >= $comptime_margin_jump_good_firm_slow) ) :\n\t\t\t$incorrect_comptime_info\t= 'rcode:<strong>'.$rcode_track_factor.'</strong> going:<strong>'.$going_description.'</strong> fast:<strong>'.$comptime_margin_jump_good_firm_fast.'</strong> slow:<strong>'.$comptime_margin_jump_good_firm_slow.'</strong> diff:<strong style=\"color:'.($comptime_standard_diff>$comptime_margin_jump_good_firm_slow?'red':($comptime_standard_diff<$comptime_margin_jump_good_firm_fast?'limegreen':'')).'\">'.$comptime_standard_diff.'%</strong> ('.$comptime_standard_diff_secs.')';\n\t\t\t$incorrect_comptime\t\t\t= true;\n\t\telseif( strtolower($going_description)=='good' && ($comptime_standard_diff <= $comptime_margin_jump_good_fast || $comptime_standard_diff >= $comptime_margin_jump_good_slow) ) :\n\t\t\t$incorrect_comptime_info\t= 'rcode:<strong>'.$rcode_track_factor.'</strong> going:<strong>'.$going_description.'</strong> fast:<strong>'.$comptime_margin_jump_good_fast.'</strong> slow:<strong>'.$comptime_margin_jump_good_slow.'</strong> diff:<strong style=\"color:'.($comptime_standard_diff>$comptime_margin_jump_good_slow?'red':($comptime_standard_diff<$comptime_margin_jump_good_fast?'limegreen':'')).'\">'.$comptime_standard_diff.'%</strong> ('.$comptime_standard_diff_secs.')';\n\t\t\t$incorrect_comptime\t\t\t= true;\n\t\telseif( strtolower($going_description)=='good to soft' && ($comptime_standard_diff <= $comptime_margin_jump_good_soft_fast || $comptime_standard_diff >= $comptime_margin_jump_good_soft_slow) ) :\n\t\t\t$incorrect_comptime_info\t= 'rcode:<strong>'.$rcode_track_factor.'</strong> going:<strong>'.$going_description.'</strong> fast:<strong>'.$comptime_margin_jump_good_soft_fast.'</strong> slow:<strong>'.$comptime_margin_jump_good_soft_slow.'</strong> diff:<strong style=\"color:'.($comptime_standard_diff>$comptime_margin_jump_good_soft_slow?'red':($comptime_standard_diff<$comptime_margin_jump_good_soft_fast?'limegreen':'')).'\">'.$comptime_standard_diff.'%</strong> ('.$comptime_standard_diff_secs.')';\n\t\t\t$incorrect_comptime\t\t\t= true;\n\t\telseif( strtolower($going_description)=='soft' && ($comptime_standard_diff <= $comptime_margin_jump_soft_fast || $comptime_standard_diff >= $comptime_margin_jump_soft_slow) ) :\n\t\t\t$incorrect_comptime_info\t= 'rcode:<strong>'.$rcode_track_factor.'</strong> going:<strong>'.$going_description.'</strong> fast:<strong>'.$comptime_margin_jump_soft_fast.'</strong> slow:<strong>'.$comptime_margin_jump_soft_slow.'</strong> diff:<strong style=\"color:'.($comptime_standard_diff>$comptime_margin_jump_soft_slow?'red':($comptime_standard_diff<$comptime_margin_jump_soft_fast?'limegreen':'')).'\">'.$comptime_standard_diff.'%</strong> ('.$comptime_standard_diff_secs.')';\n\t\t\t$incorrect_comptime\t\t\t= true;\n\t\telseif( strtolower($going_description)=='heavy' && ($comptime_standard_diff <= $comptime_margin_jump_heavy_fast || $comptime_standard_diff >= $comptime_margin_jump_heavy_slow) ) :\n\t\t\t$incorrect_comptime_info\t= 'rcode:<strong>'.$rcode_track_factor.'</strong> going:<strong>'.$going_description.'</strong> fast:<strong>'.$comptime_margin_jump_heavy_fast.'</strong> slow:<strong>'.$comptime_margin_jump_heavy_slow.'</strong> diff:<strong style=\"color:'.($comptime_standard_diff>$comptime_margin_jump_heavy_slow?'red':($comptime_standard_diff<$comptime_margin_jump_heavy_fast?'limegreen':'')).'\">'.$comptime_standard_diff.'%</strong> ('.$comptime_standard_diff_secs.')';\n\t\t\t$incorrect_comptime\t\t\t= true;\n\t\tendif;\n\tendif;\n\n\t# if incorrect comptime found\n\tif( $incorrect_comptime ) :\n\t\t\n\t\t# check if exists\n\t\t$comptime_exists = $wpdb->get_results($wpdb->prepare( 'SELECT COUNT(track_name) as count_track, updated_date, updated_by FROM '.$table_name.' WHERE track_name = \"'.$track_name.'\" AND race_date = \"'.$race_date.'\" AND race_time = \"'.$race_time.'\" AND yards = \"'.$yards.'\"' ));// AND (updated_date IS NULL OR updated_by IS NULL)\n\t\tif( $comptime_exists[0]->count_track > 1 ) :\n\n\t\t\t# duplicated\n\t\t\tif( ajr_trackmate_authorised('username') ) :\n\t\t\t\techo '<div style=\"margin-top:1em; text-align:center;\"><strong style=\"color:red;\">Duplicated Incorrect Comptime:</strong> date:<strong>'.$race_date.'</strong> | time:<strong>'.$race_time.'</strong> | track:<strong>'.$track_name.'</strong> | tfrcode:<strong>'.$rcode_track_factor.'</strong> | yards:<strong>'.$yards.'</strong> | going:<strong>'.$going_description.'</strong> | comptime:<strong>'.$race_comptime_numeric.'</strong> | standard:<strong>'.(empty($factors_comptime_numeric) ? '<span style=\"color:red;\">ERROR_NO_STANDARD_IN_FACTORS</span>' : $factors_comptime ).'</strong> | diff:<strong style=\"color:'.($comptime_standard_diff>0?'red':'limegreen').'\">'.$comptime_standard_diff.'%</strong> ('.$comptime_standard_diff_secs.') <span style=\"color:red;\">&lt;DUPLICATED&gt;</span></div>';\n\t\t\t\t//echo '<div style=\"text-align:center;\"><strong>Testing:</strong> '.$incorrect_comptime_info.'</div>';\n\t\t\tendif;\n\n\t\telseif( $comptime_exists[0]->count_track == 1 && $comptime_exists[0]->updated_date != '0000-00-00 00:00:00' ) :\n\n\t\t\t# already exists & updated\n\t\t\tif( ajr_trackmate_authorised('username') ) :\n\t\t\t\techo '<div style=\"margin-top:1em; text-align:center;\"><strong style=\"color:red;\">Updated Incorrect Comptime:</strong> date:<strong>'.$race_date.'</strong> | time:<strong>'.$race_time.'</strong> | track:<strong>'.$track_name.'</strong> | tfrcode:<strong>'.$rcode_track_factor.'</strong> | yards:<strong>'.$yards.'</strong> | going:<strong>'.$going_description.'</strong> | comptime:<strong>'.$race_comptime_numeric.'</strong> | standard:<strong>'.(empty($factors_comptime_numeric) ? '<span style=\"color:red;\">ERROR_NO_STANDARD_IN_FACTORS</span>' : $factors_comptime ).'</strong> | diff:<strong style=\"color:'.($comptime_standard_diff>0?'red':'limegreen').'\">'.$comptime_standard_diff.'%</strong> ('.$comptime_standard_diff_secs.') <span style=\"color:red;\">&lt;updated on '.$comptime_exists[0]->updated_date.' by '.$comptime_exists[0]->updated_by.' &gt;</span></div>';\n\t\t\t\t//echo '<div style=\"text-align:center;\"><strong>Testing:</strong> '.$incorrect_comptime_info.'</div>';\n\t\t\tendif;\n\n\t\telseif( $comptime_exists[0]->count_track == 1 && $comptime_exists[0]->updated_date == '0000-00-00 00:00:00' ) :\n\n\t\t\t# already exists & waiting to be updated\n\t\t\tif( ajr_trackmate_authorised('username') ) :\n\t\t\t\techo '<div style=\"margin-top:1em; text-align:center;\"><strong style=\"color:red;\">Existing Incorrect Comptime:</strong> date:<strong>'.$race_date.'</strong> | time:<strong>'.$race_time.'</strong> | track:<strong>'.$track_name.'</strong> | tfrcode:<strong>'.$rcode_track_factor.'</strong> | yards:<strong>'.$yards.'</strong> | going:<strong>'.$going_description.'</strong> | comptime:<strong>'.$race_comptime_numeric.'</strong> | standard:<strong>'.(empty($factors_comptime_numeric) ? '<span style=\"color:red;\">ERROR_NO_STANDARD_IN_FACTORS</span>' : $factors_comptime ).'</strong> | diff:<strong style=\"color:'.($comptime_standard_diff>0?'red':'limegreen').'\">'.$comptime_standard_diff.'%</strong> ('.$comptime_standard_diff_secs.') <span style=\"color:red;\">&lt;Waiting to be updated&gt;</span></div>';//<a class=\"button\" style=\"display:block; margin-top:0.25em; font-size:0.9em; font-weight:300;\" href=\"'.site_url('/ajr-comptime-checker/').'\" target=\"_blank\">click here to go to the comptime checker</a></div>';\n\t\t\t\t//echo '<div style=\"text-align:center;\"><strong>Testing:</strong> '.$incorrect_comptime_info.'</div>';\n\t\t\tendif;\n\n\t\telse :\n\t\t\n\t\t\t# doesn't exist\n\t\t\tif( ajr_trackmate_authorised('username') ) :\n\t\t\t\techo '<div style=\"margin-top:1em; text-align:center;\"><strong style=\"color:red;\">INCORRECT COMPTIME:</strong> date:<strong>'.$race_date.'</strong> | time:<strong>'.$race_time.'</strong> | track:<strong>'.$track_name.'</strong> | tfrcode:<strong>'.$rcode_track_factor.'</strong> | yards:<strong>'.$yards.'</strong> | going:<strong>'.$going_description.'</strong> | comptime:<strong>'.$race_comptime_numeric.'</strong> | standard:<strong>'.$factors_comptime_numeric.'</strong> | diff:<strong style=\"color:'.($comptime_standard_diff>0?'red':'limegreen').'\">'.$comptime_standard_diff.'%</strong> ('.$comptime_standard_diff_secs.')</div>';\n\t\t\t\techo '<div style=\"text-align:center;\"><strong>test:</strong> '.$incorrect_comptime_info.'</div>';\n\t\t\tendif;\n\t\n\t\t\t# add new comptime to database - id, factor_id, new_standard_mins, new_standard_secs, comptime_trigger, added_date, added_by, updated_date, updated_by\n\t\t\t$data = array(\n\t\t\t\t'added_date'\t\t\t=> date('Y-m-d H:i:s'),\n\t\t\t\t'added_by'\t\t\t\t=> (ajr_trackmate_current_user('user_login')?:'cron'),\n\t\t\t\t'race_date'\t\t\t\t=> $race_date,\n\t\t\t\t'race_time'\t\t\t\t=> $race_time,\n\t\t\t\t'track_name'\t\t\t=> $track_name,\n\t\t\t\t'yards'\t\t\t\t\t=> $yards,\n\t\t\t\t'going_description'\t\t=> $going_description,\n\t\t\t\t'race_comptime'\t\t\t=> $race_comptime,\n\t\t\t\t'race_comptime_numeric'\t=> $race_comptime_numeric,\n\t\t\t\t'factor_id'\t\t\t\t=> $factor_id,\n\t\t\t);\n\t\t\t$wpdb->insert_id = 0;\n\t\t\tif( !$testing['db_update_off'] ) : $wpdb->insert( $table_name, $data ); endif;\n\t\t\t\n\t\t\t# check insertion and show results to admins\n\t\t\tif( ajr_trackmate_authorised('username') ) :\n\t\t\t\techo '<pre><span style=\"color:'.( $wpdb->insert_id > 0 ? 'green;\"><strong>SUCCESS</strong>' : 'red;\"><strong>ERROR</strong>' ).' adding new incorrect Comptime:</span> '; print_r($data); echo '</pre>';\n\t\t\tendif;\n\n\t\t\t# Count successful insertions\n\t\t\tif( !$testing['db_update_off'] || $wpdb->insert_id > 0 ) :\n\t\t\tendif;\n\t\t\t$results['count_comptime']++;\n\t\t\n\t\tendif;\n\t\t\n\tendif;\n\t\n\t## Process Timer //<div class=\"info\"></div>\n\t//if( ajr_trackmate_authorised('username') ) : echo '<div class=\"page-load-time\">Comptime checker process took: <span>'.number_format( microtime(true) - $start_time, 5 ).' seconds.</span></div>'; endif;\n\t\n\treturn $results;\n}", "title": "" }, { "docid": "4c31c590149759992432ade283b9b8f2", "score": "0.53312624", "text": "function timeGreet(){\n $hour = date('H'); //Get current time (24 hour)\n if ($hour >= '00' && $hour < '12') {$greeting = 'Morning';} //Morning: midnight to 11:59am\n elseif ($hour >= '12' && $hour < '17') {$greeting = 'Afternoon';} //Afternoon: 12:00pm to 5:00pm\n elseif ($hour >= '17' && $hour < '19') {$greeting = 'Evening';} // Evening: 5:01pm to 8:00pm\n else {$greeting = 'Night';} //8:01pm to Midnight\n return $greeting;\n }", "title": "" }, { "docid": "a31d65c5962b28d9ae820e1ed33c5f4d", "score": "0.5330613", "text": "public function run()\n {\n //\n $tiempo = new DateTime();\n DB::table('options')->insert([\n 'id' => 1,\n 'state' => false,\n 'rules' => 'Reglas del juego',\n 'startTime' => $tiempo,\n 'endTime' => $tiempo\n ]);\n }", "title": "" }, { "docid": "1ce902700d136137cc8627107f920360", "score": "0.5327415", "text": "public function alarm() : void\n {\n $this->isTimedOut = true;\n }", "title": "" }, { "docid": "9c901eaa5074efcf1e08896ed4c3b35d", "score": "0.53272355", "text": "private function startDebug() {\n if($this->debug_timings) {\n $this->tstart = microtime(TRUE);\n }\n }", "title": "" }, { "docid": "8480fc475889ad82de76fa4311fd9a92", "score": "0.5325325", "text": "abstract function getStopTime();", "title": "" }, { "docid": "98c39a84cf845830be0d4a2606bf14cc", "score": "0.53205943", "text": "public function workload(){}", "title": "" }, { "docid": "d6acf08e1715b0c631c7021ee1ce2ef7", "score": "0.53185743", "text": "function _checktimer()\n {\n if (!$this->_loggedin) {\n return;\n }\n \n // has to be count() because the array may change during the loop!\n for ($i = 0; $i < count($this->_timehandler); $i++) {\n $handlerobject = &$this->_timehandler[$i];\n $microtimestamp = $this->_microint();\n if ($microtimestamp >= ($handlerobject->lastmicrotimestamp+($handlerobject->interval/1000))) {\n $methodobject = &$handlerobject->object;\n $method = $handlerobject->method;\n $handlerobject->lastmicrotimestamp = $microtimestamp;\n \n if (@method_exists($methodobject, $method)) {\n $this->log(SMARTIRC_DEBUG_TIMEHANDLER, 'DEBUG_TIMEHANDLER: calling method \"'.get_class($methodobject).'->'.$method.'\"', __FILE__, __LINE__);\n $methodobject->$method($this);\n }\n }\n }\n }", "title": "" }, { "docid": "7e549e868747a3d6d97380d2f3349d94", "score": "0.53111005", "text": "function AdjustTime(&$time1, &$time2) { \n\n if($time1 >= 60) {\n $time2 += 1; \n $time1 = ($time1 % 60);\n }\n}", "title": "" }, { "docid": "02a065c992fdadaa561e19f1de7b6016", "score": "0.5307892", "text": "function aDay($time) \r\n {\r\n return ADAY;\r\n }", "title": "" }, { "docid": "c5795b307bfa1088ac0a79fa08ce5630", "score": "0.5292317", "text": "public function onExecutionStart() {\n $this->_start = $this->_microtimeFloat(); \n return;\n }", "title": "" }, { "docid": "a9db8d5a4654dc0aa2e4b4bcf0dc931d", "score": "0.52892274", "text": "private function calculateSpentTime()\n {\n $this->time = microtime(true) - $this->startTime;\n }", "title": "" }, { "docid": "ce9e4414fc14530b0cad62e81ea0764c", "score": "0.5285653", "text": "function time()\n{\n return \\Yiisoft\\Rbac\\Tests\\PhpManagerTest::$time ?: \\time();\n}", "title": "" }, { "docid": "3c0f46262c90387824377b6bbdd047f0", "score": "0.5284243", "text": "public function actionT9() {\n// var_dump($row) ;\n $t = time() ;\n var_dump($t) ;\n \n$date1 = date('Y-m-d',$t) ;\nvar_dump($date1) ;\n// echo date('Y-m-d',strtotime(\"$date1 +5 day\"));\n// var_dump(date('Y-m-d',$t)) ;\n echo MyHelpers::future_time_point(5, 1, $t) ;\n }", "title": "" }, { "docid": "dc8ca334430c07c334ecce4194ee8918", "score": "0.52744305", "text": "protected function ready()\n {\n $timeEntry = $this->output->ask(\"🕐 I'm waiting patiently for a time entry...\");\n\n $this->addTime($timeEntry);\n }", "title": "" }, { "docid": "43bcdd8dd0d9aab8891b947bc55b8e17", "score": "0.52709764", "text": "public function run()\n {\n VagaEmprego::factory()\n ->times(25)\n ->create();\n //\n }", "title": "" } ]
9657a70c2ee9c4c30b43a6b71e2580f2
Returns true if the value is an integer or float
[ { "docid": "6a18339d56293c38f37d2e03948e33be", "score": "0.5863477", "text": "public function isNumber(): bool\n {\n return false;\n }", "title": "" } ]
[ { "docid": "cce6aef60e37dca848a336ce98277a75", "score": "0.7940585", "text": "final public static function is($value):bool\n {\n return is_float($value);\n }", "title": "" }, { "docid": "bb6c93426ccffdf6d261b65224ef3e0c", "score": "0.76848197", "text": "private static function isFloat($value)\n {\n return is_numeric($value);\n }", "title": "" }, { "docid": "29e9237dcbda0c60fadfd4fab885d3c2", "score": "0.7664142", "text": "function is_float ($var) {}", "title": "" }, { "docid": "16c1105b44dadad6887e359747d3e557", "score": "0.7566955", "text": "public static function isInt(int|float|string $value): bool\n {\n return (string)(int)$value === (string)$value;\n }", "title": "" }, { "docid": "f8ea7aadea76cbd3eb8c2c4383e1ee90", "score": "0.74342406", "text": "public static function isNumber($value)\n {\n return is_float($value) // includes INF\n || is_int($value)\n // || $value instanceof Number ???\n ;\n }", "title": "" }, { "docid": "146cd3410df6282a80a600bf2e339fe3", "score": "0.73404574", "text": "public function isFloat()\n {\n return is_float($this->storedValue);\n }", "title": "" }, { "docid": "ca97938f4a5f3bad30a33f96bcbb6682", "score": "0.7326129", "text": "function is_number($var):bool {\n return is_int($var) || is_float($var);\n}", "title": "" }, { "docid": "e1bfaeb5c8d8ec99286cec59806a529a", "score": "0.72254306", "text": "public function isFloat(): bool\n {\n return false;\n }", "title": "" }, { "docid": "801bfd2c57c3ef29374d84e3bd1e3bf4", "score": "0.721329", "text": "final protected function valueIsValid($value)\n {\n return (is_int($value) || is_float($value));\n }", "title": "" }, { "docid": "413b6e8468157e4bd540bfae0e307788", "score": "0.72069085", "text": "protected static function _isFloat($value)\r\n\t{\r\n\t\t$isFloat = false;\r\n\t\tif (is_float($value))\r\n\t\t{\r\n\t\t\t$isFloat = true;\r\n\t\t}\r\n\t\telse if (is_numeric($value))\r\n\t\t{\r\n\t\t\tif (strval(floatval($value)) == $value)\r\n\t\t\t\t$isFloat = true;\r\n\t\t\telse if ( preg_match('/^\\s*\\d*(\\.\\d*)?\\s*$/', $value)===1 )\r\n\t\t\t\t$isFloat = true;\r\n\t\t}\r\n\t\treturn $isFloat;\r\n\t}", "title": "" }, { "docid": "164f34085509ccecc39112131b496fee", "score": "0.71942836", "text": "public static function isFloat($value)\n {\n return is_numeric($value) ? floatval($value) == $value : false;\n }", "title": "" }, { "docid": "0f568e6553a2564f14f3800935c18072", "score": "0.719086", "text": "function is_whole_number($var){\n return (is_numeric($var)&&(intval($var)==floatval($var)));\n}", "title": "" }, { "docid": "a09b9f8b5e5149034c1ef33b6eb4ecf6", "score": "0.7175678", "text": "public static function isFloat($value)\n {\n return is_float($value);\n }", "title": "" }, { "docid": "70402a58b28bcc7d3f7f60d09ad0606d", "score": "0.7077862", "text": "function isFloat(&$float){\n\t\tif(filter_var($float, FILTER_VALIDATE_FLOAT) === false) {\n \t\treturn false;\n\t\t} else {\n\t\t\t$float = (float) $float;\n\t\t return true;\n\t\t}\n\t}", "title": "" }, { "docid": "6834846fe845432d322679d37f0ae520", "score": "0.69856757", "text": "public function validateFloat($value)\n {\n if ($this->objManager->validateBlank($value)) {\n return ! $this->objManager->getRequire();\n }\n\n if (is_float($value)) {\n return true;\n }\n\n // otherwise, must be numeric, and must be same as when cast to float \n return is_numeric($value) && $value == (float) $value;\n }", "title": "" }, { "docid": "a485c63ccfa2afbcca2894d9b11e1f59", "score": "0.6975392", "text": "function isFloat($var)\n{\n filter_var($var,FILTER_VALIDATE_FLOAT); \n}", "title": "" }, { "docid": "8b9b57846872ffafbf8e9ad28b1fdfd0", "score": "0.6964279", "text": "private function isFloat($float){\n\t\tif (strlen(trim($float)) > 14) $float = substr(trim($float), 0, 14);\n\t\treturn ($float == (string)(float)$float || (is_numeric($float) && (string)(float)$float != 0));\n\t}", "title": "" }, { "docid": "2c3f4bd45a3b2c3ae6bc66ae82c2deb1", "score": "0.6878761", "text": "public static function value($value){\n return is_integer($value);\n }", "title": "" }, { "docid": "bc48389614348cbddb507451cc4039de", "score": "0.68303925", "text": "public function isFloat($var): bool\n {\n $return = is_float($var);\n\n return $return;\n }", "title": "" }, { "docid": "d821b80f84f936925eaa9c7233a71653", "score": "0.68254113", "text": "public function isNumber($value)\n {\n// return is_numeric($value);\n// if(!is_numeric($value)){\n// throw new \\Exception(\"The given value is not a number\");\n// }\n// return true;\n\n// option 2 :use gettype to check type of value;\n if(gettype($value) === 'integer' || gettype($value) === 'double'){\n return true;\n }else {\n throw new \\Exception(\"The given value is not a number\");\n }\n }", "title": "" }, { "docid": "c8c12647a670b9b8ca0118533d8de1af", "score": "0.6790822", "text": "private static function isValidFloat($value) {\n return (bool) preg_match(self::REGEX_FLOAT, $value);\n }", "title": "" }, { "docid": "51f5b313ed39ed06b1f78d7484d6fc5f", "score": "0.67778057", "text": "private function check_value($val = null) {\n if (!empty($val)) {\n if (is_float($val) || is_numeric($val)) {\n return true; \n }\n }\n \n return false;\n }", "title": "" }, { "docid": "ad0183bddd62010ad2a25f4b15c34058", "score": "0.6751539", "text": "function testFloat($key)\n\t{\n\t\tif (!$this->keyExists($key)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (Inspekt::isFloat($this->_getValue($key))) {\n\t\t\treturn $this->_getValue($key);\n\t\t}\n\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "11222d376fb49285682ed77d34921480", "score": "0.67437154", "text": "function checkIfNumber($val){\n\treturn is_numeric($val);\n}", "title": "" }, { "docid": "ccb0317fe85397b5b9b41a370b29ab40", "score": "0.66945505", "text": "public static function isNativeType($value) {\n return is_numeric($value) && $value >= self::MIN_VALUE && $value <= self::MAX_VALUE || $value === self::NAN || $value === self::NEGATIVE_INFINITY || $value === self::POSITIVE_INFINITY;\n }", "title": "" }, { "docid": "7a370599deebf5a4d908fcd54e52b3e1", "score": "0.6654894", "text": "public static function isFloat($parameter) {\r\n\r\n\t\treturn is_float($parameter) && !self::isEmpty($parameter);\r\n\t}", "title": "" }, { "docid": "f7547c6b136fc292f50b938cb71e36d6", "score": "0.6612732", "text": "public static function isFloat(mixed $float): bool\n {\n if (!is_scalar($float)) {\n return false;\n }\n\n return (string)((float)$float) === (string)$float;\n }", "title": "" }, { "docid": "63bb9a9dbb8afe290b03b7bd404dac3f", "score": "0.66057223", "text": "public static function isFloat($number) {\r\n if(is_int($number)) {\r\n // It's a PHP integer.\r\n return true;\r\n }\r\n if(is_float($number)) {\r\n // NAN if conversion to string includes pound.\r\n return (bool)(is_nan($number) || false !== strpos(strval($number), '#'));\r\n }\r\n if(!is_string($number)) {\r\n // NAN - non-string.\r\n return false;\r\n }\r\n $number = trim($number);\r\n if(ctype_digit($number) && strlen($number) < 308) {\r\n // It's a string of digits.\r\n return true;\r\n }\r\n if(false !== strpos(strtolower($number), \"e\") && preg_match('/[0-9\\.]+e[\\s]*[0-9\\+\\-]+$/i', $number)) {\r\n $f = floatval($number);\r\n if(!$f) {\r\n // NAN\r\n return false;\r\n }\r\n return (false === strpos(strval($f), '#')) ? true : false;\r\n }\r\n $parser = new NumberParser($number);\r\n // Return result from the number parser class.\r\n return $parser->isValidNumber();\r\n }", "title": "" }, { "docid": "61dbf2ec4ece860ab7a4f286a6ff8966", "score": "0.65553814", "text": "public function isNumber($value) {\n\t\treturn is_numeric($value);\n\t}", "title": "" }, { "docid": "3e7b3e81a4f48e95b1ddbffb69af9636", "score": "0.6516192", "text": "function is_integer_value($value)\n{\n\treturn is_numeric($value) ? intval($value) == $value : false;\n}", "title": "" }, { "docid": "efe8e2a5ff0c04e3d1ea4db5dedf5339", "score": "0.6479148", "text": "public function allowFloats() {\n return $this->allowFloat;\n }", "title": "" }, { "docid": "c3394520ab3d0948a833616e20048aed", "score": "0.6471329", "text": "public function checkFloat($attribute, $value)\n {\n if ( ! empty($value) && ! is_float($value)) {\n return sprintf('%s must be a float.', $attribute);\n }\n\n return true;\n }", "title": "" }, { "docid": "050c9cef56ca3e65d276a2066e6ed545", "score": "0.646293", "text": "public static function isUnsignedInt(float|int|string $value): bool\n {\n return ((string)(int)$value === (string)$value && $value < 4294967296 && $value >= 0);\n }", "title": "" }, { "docid": "c374c3ae2cc22df6a65ec484a2f22183", "score": "0.6462076", "text": "function checkVarFloat($float) {\r\n $validation = filter_var($float, FILTER_VALIDATE_FLOAT);\r\n return $validation;\r\n}", "title": "" }, { "docid": "91be6a07380f7f257f8d913933355eec", "score": "0.6455258", "text": "function validate_is_float($field_input, array &$field): bool\n{\n if (!is_float($field_input)) {\n $field['error'] = 'Įveskite float tipo skaičių !';\n\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "fda62bfb160dcf9729f64513e2fd845d", "score": "0.64110243", "text": "private function isFloat($number)\n {\n return !!strpos($number, '.');\n }", "title": "" }, { "docid": "95fadf7c54f0eca858da2826b7e506a7", "score": "0.64017606", "text": "function is_num ($var1) {\n if (is_numeric($var1)) {\n\n }\n}", "title": "" }, { "docid": "0a3a279d90b4823dd786e0996500b65b", "score": "0.6379815", "text": "function is_number($value) {\r\n if (is_int($value)) {\r\n return true;\r\n } else if (is_string($value)) {\r\n return ((string)(int)$value) === $value;\r\n } else {\r\n return false;\r\n }\r\n}", "title": "" }, { "docid": "c27d352fef10a597f6e17f276b63907a", "score": "0.63531137", "text": "function is_intValued($var) {\r\n\t// Determines if a variable's value is an integer regardless of type\r\n\t// meant to be an analogy to PHP's is_numeric()\r\n\tif (is_int($var))\r\n\t\treturn TRUE;\r\n\tif (is_string($var) and $var === (string) (int) $var)\r\n\t\treturn TRUE;\r\n\tif (is_float($var) and $var === (float) (int) $var)\r\n\t\treturn TRUE;\r\n\telse\r\n\t\treturn FALSE;\r\n}", "title": "" }, { "docid": "41d41e2202064b4eeee5f56157d2c258", "score": "0.63464665", "text": "private function isInt($value) {\n\t\tif (is_numeric($value)) {\n\t\t\tif((int)$value == $value) return true;\n\t\t\telse return false;\n\t\t}\n\t\telse return false;\n\t}", "title": "" }, { "docid": "514ee787cdd1aef54a19e3dc310f37f7", "score": "0.6332307", "text": "public function isInt()\n {\n return is_int($this->storedValue);\n }", "title": "" }, { "docid": "ed4bebed414436409291e71c9e534fe0", "score": "0.6326098", "text": "public static function check_float($num)\n {\n //should be numeric and should have decimal point\n if(is_numeric($num) && strpos($num,'.'))\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "e1d764a2f7ace4e2c7b76d36894730be", "score": "0.62552917", "text": "public static function validateFloat(IControl $control): bool\n\t{\n\t\t$value = str_replace([' ', ','], ['', '.'], $control->getValue());\n\t\tif (Validators::isNumeric($value)) {\n\t\t\t$control->setValue((float) $value);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f0357372607d0507f96c51d6b3dd63d6", "score": "0.6238323", "text": "public function isInteger(): bool\n {\n return '1' === $this->getDenominator();\n }", "title": "" }, { "docid": "87fa5a93396d24f64bb317f5b5ff1c87", "score": "0.62380534", "text": "public static function floatValue()\n {\n return Hamcrest_Type_IsDouble::doubleValue();\n }", "title": "" }, { "docid": "ceedf53784e5f1000f78281b4a170486", "score": "0.6237085", "text": "public function isValid($value)\n {\n if (!is_string($value) && !is_int($value) && !is_float($value)) {\n $this->error(self::INVALID);\n\n return false;\n }\n\n $value = trim((string) $value);\n $this->value = $value;\n /** @var array $parts */\n $parts = explode('.', $value);\n\n if (count($parts) > 2) {\n $this->error(self::INVALID);\n\n return false;\n }\n\n foreach ($parts as $number) {\n // Check if number is a valid integer\n if (false !== filter_var($number, FILTER_VALIDATE_INT)) {\n continue;\n }\n\n // Check if number is invalid because of integer overflow\n $invalid = array_filter(\n str_split($number, strlen((string) PHP_INT_MAX) - 1),\n function($chunk) {\n // Leading zeros should not invalidate the chunk\n $chunk = ltrim($chunk, '0');\n\n // Allow chunks containing zeros only\n return '' !== $chunk && false === filter_var($chunk, FILTER_VALIDATE_INT);\n }\n );\n\n if (count($invalid) !== 0) {\n $this->error(self::INVALID);\n\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "c65599a6f92505f33d5a04a02bc0eb0b", "score": "0.6199426", "text": "function isRealInt($Value)\r\n\t{\r\n\t\tif ($Value == floor($Value))\r\n\t\treturn(TRUE);\r\n\t\treturn(FALSE);\r\n\t}", "title": "" }, { "docid": "20b9fb3bb2e5aacf2753735ba863758f", "score": "0.61942244", "text": "public function testAssertIsFloat() {\n\t\tself::assertIsFloat( 1.2 );\n\t}", "title": "" }, { "docid": "8140dc7d10dd6e6e83d6f5e2f47f62f2", "score": "0.6190539", "text": "function is_numeric ($var) {}", "title": "" }, { "docid": "2328ad12586fe5031f02e435eace5fa6", "score": "0.61545765", "text": "private static function isRealInt($Value) {\r\n\t\treturn ($Value == ( int ) ($Value));\r\n\t}", "title": "" }, { "docid": "5b1355e2a46ca4982c7939cd90bd6a1a", "score": "0.61510175", "text": "static public final function isInteger($value)\n {\n\treturn (preg_match('/^[+-]?\\d+$/', trim($value)) == 1);\n }", "title": "" }, { "docid": "577e16ec82077357a26ea885c263c14f", "score": "0.6149549", "text": "function v_is_numeric($var) {\n return is_numeric($var);\n}", "title": "" }, { "docid": "33a2f83e0f6e79346845378aaa4694fb", "score": "0.6140028", "text": "function isint($x){ return (is_numeric($x) ? intval($x) == $x : false); }", "title": "" }, { "docid": "9fbe6c5aff3bd37b1c8b5981deedeb0e", "score": "0.61236", "text": "public static function isDouble($pValue)\n {\n return is_float($pValue);\n }", "title": "" }, { "docid": "04fb451a88d6145939449ffee41ffb86", "score": "0.6110771", "text": "public static function validateFloat(TextBase $control)\n\t{\n\t\tforeach ($control->getValue() as $tag) {\n\t\t\tif (!Strings::match($tag, '/^-?[0-9]*[.,]?[0-9]+$/')) {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "e9554bf3d8a01e8442299d5020246427", "score": "0.6110164", "text": "protected static function _isInt($value)\r\n\t{\r\n\t\t$isInt = false;\r\n\t\tif (is_int($value))\r\n\t\t{\r\n\t\t\t$isInt = true;\r\n\t\t}\r\n\t\telse if (is_numeric($value))\r\n\t\t{\r\n\t\t\tif (strval(intval($value)) == $value)\r\n\t\t\t\t$isInt = true;\r\n\t\t}\r\n\t\treturn $isInt;\r\n\t}", "title": "" }, { "docid": "c3af032cf2418404ab4dccf8dd3f20df", "score": "0.6110039", "text": "public function isValid($value)\n {\n if (! is_string($value) && ! is_int($value) && ! is_float($value)) {\n $this->error(self::INVALID);\n return false;\n }\n\n if (is_int($value)) {\n return true;\n }\n\n if ($this->strict) {\n $this->error(self::NOT_INT_STRICT);\n return false;\n }\n\n $this->setValue($value);\n\n $locale = $this->getLocale();\n try {\n $format = new NumberFormatter($locale, NumberFormatter::DECIMAL);\n if (intl_is_failure($format->getErrorCode())) {\n throw new Exception\\InvalidArgumentException('Invalid locale string given');\n }\n } catch (IntlException $intlException) {\n throw new Exception\\InvalidArgumentException('Invalid locale string given', 0, $intlException);\n }\n\n try {\n $parsedInt = $format->parse((string) $value, NumberFormatter::TYPE_INT64);\n if (intl_is_failure($format->getErrorCode())) {\n $this->error(self::NOT_INT);\n return false;\n }\n } catch (IntlException $intlException) {\n $this->error(self::NOT_INT);\n return false;\n }\n\n $decimalSep = $format->getSymbol(NumberFormatter::DECIMAL_SEPARATOR_SYMBOL);\n $groupingSep = $format->getSymbol(NumberFormatter::GROUPING_SEPARATOR_SYMBOL);\n\n $valueFiltered = strtr((string) $value, [\n $groupingSep => '',\n $decimalSep => '.',\n ]);\n\n if ((string) $parsedInt !== $valueFiltered) {\n $this->error(self::NOT_INT);\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "bdc5a841975340bb1b20ab1e65eed2e4", "score": "0.6105639", "text": "public function isNumeric()\n {\n return is_numeric($this->storedValue);\n }", "title": "" }, { "docid": "8294295271cdb737db32918f0e1df427", "score": "0.61037254", "text": "public function isDouble($value)\n {\n /*if (filter_var($value, FILTER_VALIDATE_INT)) {\n return false;\n } else {\n if (filter_var($value, FILTER_VALIDATE_FLOAT)) {\n return true;\n } else {\n if (in_array($value, [0, 0.0, '0', '0.0'], true)) {\n return true;\n } else {\n return false;\n }\n }\n }*/\n return NumberValidator::isReal($value);\n }", "title": "" }, { "docid": "91e23a7d8329174599c368b039159e2b", "score": "0.6089396", "text": "public function isValueValid($value) {\n\t\treturn $value instanceof DataType\\IntegerType;\n\t}", "title": "" }, { "docid": "1f0090f32a0b9ef858a3a490f37a1fe5", "score": "0.6062742", "text": "private function isValueOf($value, string $type) : bool\n {\n if (! $this->isBuiltinType($type)) {\n return ($value instanceof $type);\n }\n\n if ($type == 'callable') {\n return is_callable($value);\n }\n\n if ($type == 'iterable') {\n return (is_array($value) || ($value instanceof Traversable));\n }\n\n $valueType = $this->getTypeNameFromValue($value);\n $numerics = ['int', 'float'];\n\n // PHP accepts float for int and vice versa, as well as numeric string values\n if (in_array($type, $numerics)) {\n return in_array($valueType, $numerics) || (is_string($value) && is_numeric($value));\n }\n\n return ($type == $valueType);\n }", "title": "" }, { "docid": "aebc343b70bc83adccd7ddb26fd5a46d", "score": "0.6048741", "text": "public function isValid($value)\r\n {\r\n if ($this->hasOption('msg')) {\r\n $msg = $this->getOption('msg');\r\n } else {\r\n $msg = self::NOT_NUMERIC;\r\n }\r\n \r\n if (!preg_match('/^[\\-+]?[0-9]*\\.?[0-9]+$/', $value)) {\r\n $this->setMessage('valueInvalidNumeric', $msg);\r\n }\r\n\r\n $result = true;\r\n if (count($this->errors) > 0) {\r\n $result = false;\r\n } \r\n return $result;\r\n }", "title": "" }, { "docid": "936cd9c593428e749b30abffbc1928b1", "score": "0.6046122", "text": "#[DataProvider('floatAndIntegerProvider')]\n public function testFloatAndIntegers($value, bool $expected, string $locale, string $type): void\n {\n $this->validator->setLocale($locale);\n\n self::assertEquals(\n $expected,\n $this->validator->isValid($value),\n 'Failed expecting ' . $value . ' being ' . ($expected ? 'true' : 'false')\n . sprintf(' (locale:%s, type:%s)', $locale, $type) . ', ICU Version:' . INTL_ICU_VERSION . '-'\n . INTL_ICU_DATA_VERSION\n );\n }", "title": "" }, { "docid": "bf875c66d838280400d9029a41df02a1", "score": "0.60360163", "text": "public static function isValid($value) {\n $type = gettype($value);\n $isNum = ($type === 'integer' || $type === 'double');\n if ($isNum &&\n $value >= static::$MIN_VALUE &&\n $value <= static::$MAX_VALUE)\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "1cb27889246e9f3778704cd0c278c7ab", "score": "0.60185105", "text": "public function validate_float($data, $param=null, $error='', $success=''){\n if (filter_var($data, FILTER_VALIDATE_FLOAT)===true) {\n $this->_success = $success;\n return true;\n }else{\n $this->_error = $error;\n return false;\n }\n }", "title": "" }, { "docid": "8724d273c8fe47d0ca90769ed85de007", "score": "0.60175914", "text": "function isFloat($field, $msg)\n\t{\n\t\t$value = $this->_getValue($field);\n\t\tif(!is_float($value))\n\t\t{\n\t\t\t$this->_errorList[] = array(\"field\" => $field, \"value\" => $value, \"msg\" => $msg);\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "fea096fb53925e75e17b1d7e69438875", "score": "0.59909546", "text": "public function isNumeric() {\n\t\tstatic $columns = array(\n\t\t\t'TINYINT', 'SMALLINT', 'MEDIUMINT', 'INT', 'BIGINT', 'REAL', 'DOUBLE', 'FLOAT', 'DECIMAL', 'NUMERIC'\n\t\t);\n\n\t\treturn in_array($this->type, $columns);\n\t}", "title": "" }, { "docid": "f92815123dc4fcc1f2d2f86fb9889817", "score": "0.59753716", "text": "protected static function _isDouble($value)\r\n\t{\r\n\t\t$isDouble = false;\r\n\t\tif (is_double($value))\r\n\t\t{\r\n\t\t\t$isDouble = true;\r\n\t\t}\r\n\t\telse if (is_numeric($value))\r\n\t\t{\r\n\t\t\tif (strval(doubleval($value)) == $value)\r\n\t\t\t\t$isDouble = true;\r\n\t\t\telse if ( preg_match('/^\\s*\\d*(\\.\\d*)?\\s*$/', $value)===1 )\r\n\t\t\t\t$isDouble = true;\r\n\t\t}\r\n\t\treturn $isDouble;\r\n\t}", "title": "" }, { "docid": "59de783610fd1b8f44530980ca48934e", "score": "0.59601456", "text": "function number_check($num) {\n // Sanitize or takes everything but a number out.\n $num = filter_var($num, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);\n // Validate or makes sure it is a number.\n $num = filter_var($num, FILTER_VALIDATE_FLOAT);\n return $num;\n}", "title": "" }, { "docid": "8cfdd4dfedb211a2207d39a8d5220cf7", "score": "0.59509593", "text": "function validate_numeric($variable) {\n\n return is_numeric($variable);\n}", "title": "" }, { "docid": "099fb12ae1195271dc181f127384b2a6", "score": "0.5950178", "text": "protected function isIntegeric($value)\n\t{\n\t\treturn is_string($value) ? (preg_match('/^-?[0-9]*$/D', $value) === 1) : is_int($value);\n\t}", "title": "" }, { "docid": "4d885c17285891ba175f7b818186f20a", "score": "0.59427905", "text": "public function isIntegral(): bool\n {\n $integralTypes = [\n self::Int64,\n self::Int32,\n self::Int16,\n self::Byte,\n self::SByte,\n ];\n return in_array($this->getValue(), $integralTypes);\n }", "title": "" }, { "docid": "25ab790c0b629d83d6dfceddd5a7d3cd", "score": "0.5928094", "text": "function isNumber($input) {\n if (preg_match(\"#^[+-]?[0-9]+(\\.[0-9]+)?([eE][+-]?[0-9]*)?$#\", $input)){\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "7fdd3e4fde154fca67d01575caf6ee96", "score": "0.5925302", "text": "public function isInteger(): bool\n {\n return false;\n }", "title": "" }, { "docid": "89cb1b870af594a14e880b70096637da", "score": "0.5920397", "text": "public function isNumber() {\n\t\treturn $this->getType() == self::PARSED_TYPE_NUMBER;\n\t}", "title": "" }, { "docid": "f47675b8c6cbadfee3f45c8aeed0ef59", "score": "0.5918451", "text": "function testFloatDataType() {\n $data = array(\n 'id' => 1,\n 'floatfield' => 10.35,\n );\n $this->insertValues($data);\n $this->selectAndCheck($data);\n }", "title": "" }, { "docid": "ef3b96c82e6ccbb0cef727a1ee367da5", "score": "0.5915966", "text": "final public static function isEmpty($value):bool\n {\n return is_float($value) && empty($value);\n }", "title": "" }, { "docid": "11f3a75c261e7c1a979b774f39062498", "score": "0.5913292", "text": "function fun_esfloat($num){\n\t\t$numero=true;\n\t\n\t\t$num=(string)$num;\n\t\t\n\t\tfor($i=0;$i<strlen($num) and $numero;$i++){\n\t\t\n\t\t\tif(ctype_digit($num[$i]) || $num[$i]==\".\" || $num[$i]==\"-\"){\n\t\t\t\t$numero=true;\n\t\t\t}else{\n\t\t\t\t$numero=false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $numero;\n\t}", "title": "" }, { "docid": "0eeb85f7c05ef0daf074159521b3817a", "score": "0.5912867", "text": "public static function isValueValid($value) : bool\n {\n if (! is_float($value)) {\n return false;\n }\n \n return $value >= -273.15;\n }", "title": "" }, { "docid": "4459dba2f84f0f2a7f93738545566c95", "score": "0.590712", "text": "function is_integer ($var) {}", "title": "" }, { "docid": "2be1a1e569694b370d7a151051627595", "score": "0.58971804", "text": "function is_finite ($val) {}", "title": "" }, { "docid": "44271a0fc94dacf56bc8cbf7d475c935", "score": "0.5896303", "text": "public function isAverageable($value)\n {\n return $this->typeHelper->isIntOrFloatRecursive($value);\n }", "title": "" }, { "docid": "31113dd681a80781496454cd9728628e", "score": "0.5892635", "text": "public function checkValueType($value);", "title": "" }, { "docid": "36e6a58425899d667bd83f7ee1872e1b", "score": "0.5890457", "text": "public function validate($value) {\n if (!is_numeric($value)) {\n throw new PapayaFilterExceptionNotFloat($value);\n }\n if (!is_null($this->_min) && $value < $this->_min) {\n throw new PapayaFilterExceptionRangeMinimum($this->_min, $value);\n }\n if (!is_null($this->_max) && $value > $this->_max) {\n throw new PapayaFilterExceptionRangeMaximum($this->_max, $value);\n }\n return TRUE;\n }", "title": "" }, { "docid": "c3629613321ce1c7fb7e9b1d82a7c175", "score": "0.58726877", "text": "public function is($value);", "title": "" }, { "docid": "305cf7cbca4849ef68e98aa7fb688329", "score": "0.58720255", "text": "function isBasic ( $value )\n{\n return is_bool($value)\n || is_int($value)\n || is_float($value)\n || is_null($value)\n || is_string($value);\n}", "title": "" }, { "docid": "47d3583926a4a91422fe2b06efc9657d", "score": "0.5868923", "text": "private function isFloat($value, $name)\r\n {\r\n $value = preg_replace('/[^A-Za-z0-9\\-.,]/', '', $value);\r\n if (is_numeric($value)) {\r\n if ($value !== 0 and $value !== '0') {\r\n if (!is_float((float)$value)) {\r\n throw new HttpException(400, \"Parameter $name is not Float!\");\r\n }\r\n } else {\r\n return (float)0;\r\n }\r\n return (float)$value;\r\n } else if ($value == '') {\r\n return NULL;\r\n } else {\r\n throw new HttpException(400, \"Parameter $name is not Numeric!\");\r\n }\r\n }", "title": "" }, { "docid": "636b28aeb586247b82cf1f228afb3b72", "score": "0.58629936", "text": "public static function any(){\n $are_any = false;\n $values = func_get_args();\n\n foreach($values as $value){\n if(is_integer($value)){\n $are_any = true;\n break;\n }\n }\n\n return $are_any;\n }", "title": "" }, { "docid": "5eac33617c6d27ef522af553cb6f855f", "score": "0.5854715", "text": "function wponion_is_numeric( $value ) {\n\t\treturn ( ! is_numeric( $value ) ) ? __( 'Please Enter A Valid Numeric Value', 'wponion' ) : true;\n\t}", "title": "" }, { "docid": "455759df7a73c08471995617baa3a820", "score": "0.5852256", "text": "protected function numeric($input, $value){\n\n\tif(is_numeric($value)){\n\t\treturn true;\n\t} else {\n\t\treturn $this->log_error($input, \"$input must be a number\", 'numeric');\n\t}\t\n\n}", "title": "" }, { "docid": "6f693181f7b1d7f2b92d1bcc8461ce52", "score": "0.5848865", "text": "function number($str)\n {\n return (!is_numeric($str)) ? false : true;\n }", "title": "" }, { "docid": "af489da2f8c50c2435dd9800f04a8c06", "score": "0.58450246", "text": "public static function isNumeric($pValue)\n {\n return is_numeric($pValue);\n }", "title": "" }, { "docid": "c442110209fb4c7d16ffe5ac86300a5b", "score": "0.5842385", "text": "function is_int ($var) {}", "title": "" }, { "docid": "9e34e38135ddf586c0db5997d55d6e0f", "score": "0.5817229", "text": "function is($var = null)\n{\n if (is_bool($var))\n return _bool($var);\n if (is_int($var))\n return _int($var);\n if (is_float($var))\n return _float($var);\n if (is_string($var))\n return _string($var); \n\n throw new \\System\\ArgumentException();\n}", "title": "" }, { "docid": "22e507e28add4974b7cc6f57bec2184f", "score": "0.580874", "text": "public function check($value) {\n\t\tif (!is_numeric($value)) {\n\t\t\t$this->message = '\\''.$value.'\\' is not a number';\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\t$this->message = \"\";\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "c2b6f95bac2eb0fc27b7947a88b61a55", "score": "0.58038896", "text": "final public static function isNotEmpty($value):bool\n {\n return is_float($value) && !empty($value);\n }", "title": "" }, { "docid": "251dff91fc0b19f49b10aa757d673922", "score": "0.5799427", "text": "public static function validIsInt($value){\n if($value === null){\n return true;\n }\n \n return parent::validIsInt($value);\n }", "title": "" }, { "docid": "6ee6dab485b5d4fc75251e1f9f3894ac", "score": "0.5789759", "text": "function checkIfInt($arg){\n return is_numeric($arg) && is_int(+$arg);\n }", "title": "" }, { "docid": "b47a9cb7078fd1756f1f222845bd4f64", "score": "0.57817185", "text": "public static function isNumeric()\n {\n return true;\n }", "title": "" }, { "docid": "7d8fa4111900ab6dc80877a4a9b421c6", "score": "0.5780232", "text": "private function validateNumeric($attribute, $value)\n {\n return is_numeric($value);\n }", "title": "" } ]
4e89fcb41923a2fe056ccacf0de2da66
Return the properties that have been removed
[ { "docid": "e59765b63e7f14d0479f5ad464fc5799", "score": "0.8602754", "text": "public function getPropertiesToRemove()\n {\n return $this->propertiesToRemove;\n }", "title": "" } ]
[ { "docid": "17b6e2061c03dc380f968f020880cda9", "score": "0.76168805", "text": "private function generatePropertiesToRemove()\n {\n $properties = array();\n if (array_key_exists($this->getTableName(), $this->oldModelFile)) {\n if (array_key_exists(\"properties\", $this->oldModelFile[$this->getTableName()])) {\n foreach ($this->oldModelFile[$this->getTableName()][\"properties\"] as $property => $type) {\n if (!array_key_exists($property, $this->propertiesArr)) {\n $properties[$property] = $type;\n } else if ($this->oldModelFile[$this->getTableName()][\"properties\"][$property] != $this->propertiesArr[$property]) {\n $properties[$property] = $this->propertiesArr[$property];\n }\n }\n }\n }\n\n return $properties;\n }", "title": "" }, { "docid": "a369c31e3dcde9290c5ee517764689d0", "score": "0.7234782", "text": "public function getProperties()\n {\n $vars = get_object_vars($this);\n\n foreach ($vars as $key => $value) {\n if (strcmp(\"db\", $key) == 0) {\n unset($vars[$key]);\n }\n }\n\n return $vars;\n }", "title": "" }, { "docid": "c709fa0ba9922f56cbe03c601ac51bf3", "score": "0.70560116", "text": "function DelPropsAll () {\n // global $mysql;\n $oid = $this->oid;\n if ($oid > 0) {\n $this->DelPropFiles (); // delete all property files associated with this object\n \n $query = \"DELETE FROM `properties`\n WHERE `oid`='$oid'\";\n $sql = mysql_query ($query) or die (mysql_error ());\n \n $this->cache['props'] = null;\n return $sql;\n }\n }", "title": "" }, { "docid": "019e889a82b093c442ba309a1d793271", "score": "0.7019588", "text": "public function getRemovedFields()\n {\n return $this->removedFields;\n }", "title": "" }, { "docid": "abd91d4b5f84eab64ee80b20958f0868", "score": "0.6781336", "text": "public function filledProperties() {\n\t\treturn array_filter($this->_properties);\n\t}", "title": "" }, { "docid": "e25510938597cc98368de799c2c2c1dc", "score": "0.6749826", "text": "public function getPropertyItemsDeleted();", "title": "" }, { "docid": "9c278aca8ad7765360232c95c4c7a64e", "score": "0.64395136", "text": "public function RemoveUnknownProperties()\n\t{\n\t\t$this->__unknown_properties = [];\n\t}", "title": "" }, { "docid": "8bffc3ffe4ddeb386251df2489dd7c4b", "score": "0.64301825", "text": "public function listInvalidProperties()\n {\n $invalid_properties = array();\n return $invalid_properties;\n }", "title": "" }, { "docid": "8bffc3ffe4ddeb386251df2489dd7c4b", "score": "0.64301825", "text": "public function listInvalidProperties()\n {\n $invalid_properties = array();\n return $invalid_properties;\n }", "title": "" }, { "docid": "8bffc3ffe4ddeb386251df2489dd7c4b", "score": "0.64301825", "text": "public function listInvalidProperties()\n {\n $invalid_properties = array();\n return $invalid_properties;\n }", "title": "" }, { "docid": "8bffc3ffe4ddeb386251df2489dd7c4b", "score": "0.64301825", "text": "public function listInvalidProperties()\n {\n $invalid_properties = array();\n return $invalid_properties;\n }", "title": "" }, { "docid": "b036e2aa6c43b5c48fced00caf2be093", "score": "0.6413916", "text": "public function listInvalidProperties()\n {\n $invalid_properties = parent::listInvalidProperties();\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "b036e2aa6c43b5c48fced00caf2be093", "score": "0.6413916", "text": "public function listInvalidProperties()\n {\n $invalid_properties = parent::listInvalidProperties();\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "d7aeff97ef9e55272649fd9d7fb5bee5", "score": "0.64069", "text": "public function listInvalidProperties()\r\n {\r\n $invalid_properties = [];\r\n return $invalid_properties;\r\n }", "title": "" }, { "docid": "d7aeff97ef9e55272649fd9d7fb5bee5", "score": "0.64069", "text": "public function listInvalidProperties()\r\n {\r\n $invalid_properties = [];\r\n return $invalid_properties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.63810086", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.63810086", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.63810086", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.63810086", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.63810086", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.63810086", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "d214a1128d588571b3bdb8ead012eef4", "score": "0.63810086", "text": "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n return $invalidProperties;\r\n }", "title": "" }, { "docid": "40831014ca18a9470e0bf127fc0c5a5c", "score": "0.6360314", "text": "public function listInvalidProperties()\n {\n $invalidProperties = parent::listInvalidProperties();\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "40831014ca18a9470e0bf127fc0c5a5c", "score": "0.6360314", "text": "public function listInvalidProperties()\n {\n $invalidProperties = parent::listInvalidProperties();\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "40831014ca18a9470e0bf127fc0c5a5c", "score": "0.6360314", "text": "public function listInvalidProperties()\n {\n $invalidProperties = parent::listInvalidProperties();\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "40831014ca18a9470e0bf127fc0c5a5c", "score": "0.6360314", "text": "public function listInvalidProperties()\n {\n $invalidProperties = parent::listInvalidProperties();\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "4c98564a0835302f4cbc7f65ebe8854a", "score": "0.63398176", "text": "protected function getDrupalProperties() {\n $properties = $this->getDrupalEntity()->getPropertyInfo();\n $excluded_properties = $this->excludedProperties();\n return array_diff_key($properties, $excluded_properties);\n }", "title": "" }, { "docid": "343c14a564bb2e864d93e5dd24bdf2ce", "score": "0.632467", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n return $invalid_properties;\n }", "title": "" }, { "docid": "343c14a564bb2e864d93e5dd24bdf2ce", "score": "0.632467", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n return $invalid_properties;\n }", "title": "" }, { "docid": "16bc458973558b9e87e891890d1390d8", "score": "0.629711", "text": "#[\\ReturnTypeWillChange]\n public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "701abdd9f96795f775c013d6e3e9c053", "score": "0.6288465", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "701abdd9f96795f775c013d6e3e9c053", "score": "0.6288465", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "701abdd9f96795f775c013d6e3e9c053", "score": "0.6288465", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "9c9c2488e009c5df558616c9b99759f0", "score": "0.6283567", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n return $invalidProperties;\n }", "title": "" }, { "docid": "9c9c2488e009c5df558616c9b99759f0", "score": "0.6283567", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n return $invalidProperties;\n }", "title": "" }, { "docid": "9c9c2488e009c5df558616c9b99759f0", "score": "0.6283567", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n return $invalidProperties;\n }", "title": "" }, { "docid": "9c9c2488e009c5df558616c9b99759f0", "score": "0.6283567", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n return $invalidProperties;\n }", "title": "" }, { "docid": "9c9c2488e009c5df558616c9b99759f0", "score": "0.6283567", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n return $invalidProperties;\n }", "title": "" }, { "docid": "9c9c2488e009c5df558616c9b99759f0", "score": "0.6283567", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n return $invalidProperties;\n }", "title": "" }, { "docid": "7df7567b7c37ada799f90c694f037c44", "score": "0.628182", "text": "protected function clean_properties() {\n\n\t\tglobal $database;\n\n\t\t$clean_properties = array();\n\n\t\tforeach ($this->properties() as $key => $value) {\n\t\t\t\n\t\t\t$clean_properties[$key] = $database->escape_string($value);\n\n\t\t}\n\n\t\treturn $clean_properties;\n\n\t}", "title": "" }, { "docid": "7fed39667d839c08102ac22f697eafc2", "score": "0.6269982", "text": "public function listInvalidProperties();", "title": "" }, { "docid": "7fed39667d839c08102ac22f697eafc2", "score": "0.6269982", "text": "public function listInvalidProperties();", "title": "" }, { "docid": "7fed39667d839c08102ac22f697eafc2", "score": "0.6269982", "text": "public function listInvalidProperties();", "title": "" }, { "docid": "7fed39667d839c08102ac22f697eafc2", "score": "0.6269982", "text": "public function listInvalidProperties();", "title": "" }, { "docid": "3a947994254c6d2de019201ad92547e2", "score": "0.62269264", "text": "public function getListOfDirtyProperties() : array\n {\n $transformer = new CaseTransformer(new Format\\CamelCase(), new Format\\StudlyCaps());\n $dirtyProperties = [];\n foreach ($this->getListOfProperties() as $property) {\n $originalProperty = $transformer->transform($property);\n #echo \"Writing into \\$this->{$originalProperty}: getListOfDirtyProperties\\n\";\n if (!isset($this->_original[$originalProperty]) || $this->$property != $this->_original[$originalProperty]) {\n $dirtyProperties[$property] = [\n 'before' => isset($this->_original[$originalProperty]) ? $this->_original[$originalProperty] : null,\n 'after' => $this->$property,\n ];\n }\n }\n return $dirtyProperties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.6193315", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.6193315", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.6193315", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.6193315", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.6193315", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.6193315", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.6193315", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.6193315", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.6193315", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.6193315", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.6193315", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.6193315", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.6193315", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "42189e358727dc2b01e72f1b24898542", "score": "0.6193315", "text": "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n return $invalid_properties;\n }", "title": "" }, { "docid": "e70a8cbeb6a7f77b4b5a87095dbe8114", "score": "0.6184303", "text": "public function getPropertiesList(){\n return $this->_get(4);\n }", "title": "" }, { "docid": "d4c38a490e85bbabdc89e57ac16292e2", "score": "0.6164711", "text": "public function properties()\n {\n return array_keys($this->properties);\n }", "title": "" }, { "docid": "9183fa6ab12b52cb4d5c15486cf8d74c", "score": "0.61583304", "text": "protected function privateProperties() : array\n {\n $reflection = new ReflectionObject($this);\n $properties = $reflection->getProperties(ReflectionProperty::IS_PUBLIC | ReflectionProperty::IS_PROTECTED | ReflectionProperty::IS_STATIC);\n $accessibleProperties = [];\n foreach ($properties as $property) {\n $accessibleProperties[] = $property->getName();\n }\n $allProperties = array_keys(get_class_vars(self::class));\n return array_diff($allProperties, $accessibleProperties);\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "ec13eec935135acf2f7582139f3a08c4", "score": "0.61556005", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n return $invalidProperties;\n }", "title": "" } ]
ccbac23fe5060d65630b19e5693a41e9
Get the validation rules that apply to the request.
[ { "docid": "d888b52a9969ccd39cf0ac9ed5ba0392", "score": "0.0", "text": "public function rules()\n {\n return [\n 'nama_wisata' => 'required|max:255',\n 'alamat' => 'required|max:255',\n 'lokasi' => 'required',\n 'jarak' => 'required|integer',\n 'deskripsi' => 'required',\n 'kendaraan' => 'required',\n 'retribusi' => 'required',\n 'makanan' => 'required'\n ];\n }", "title": "" } ]
[ { "docid": "f3c76174c5a69ad644c99824df4f1003", "score": "0.8072995", "text": "public function getValidationRules();", "title": "" }, { "docid": "ed13728d1c4b0e3b8d70c0217634ba83", "score": "0.8068863", "text": "public function getValidationRules()\n\t{\n\t\treturn $this->validationRules;\n\t}", "title": "" }, { "docid": "88d2fb5c78b64b5dcaa6b048e0cb04ea", "score": "0.80274284", "text": "private function getValidationRules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "0dcefcecc2757019abb2676735cba5bf", "score": "0.8006164", "text": "public function rules()\n {\n return $this->transformer->getValidationRules();\n }", "title": "" }, { "docid": "74547c5f4add13c5f8ff64d12a139065", "score": "0.79930794", "text": "public function rules()\n {\n $validation = app(Validation::class);\n\n return $validation->getRules();\n }", "title": "" }, { "docid": "2e57695d9533f1db057256ec3dc34778", "score": "0.7991769", "text": "public function rules()\n {\n $rules = [\n 'login' => ['required'],\n ];\n\n // reCAPTCHA\n $rules = $this->recaptchaRules($rules);\n\n return $rules;\n }", "title": "" }, { "docid": "0cefcdaa2acc30d7130630ba4474e861", "score": "0.7950015", "text": "public function rules()\n {\n if(Request::isMethod('post')){\n $rules = $this->rules;\n }\n return $rules;\n }", "title": "" }, { "docid": "674f48033c4da89ffa7685260cca729a", "score": "0.79264987", "text": "public function rules()\n {\n return $this->validationRules;\n }", "title": "" }, { "docid": "674f48033c4da89ffa7685260cca729a", "score": "0.79264987", "text": "public function rules()\n {\n return $this->validationRules;\n }", "title": "" }, { "docid": "d6b5085b51806551653390820a7627fa", "score": "0.7901862", "text": "public function rules()\n {\n\n $rules = $this->getRules();\n\n app()[ValidationManager::class]->mergeGlobalRules($rules);\n\n return $rules;\n }", "title": "" }, { "docid": "a833cb3d919bff782af9dc86bc0f41e4", "score": "0.7885883", "text": "public static function getRules()\n {\n $rules = [\n 'relason' => 'required',\n 'lift_date' => 'required'\n ];\n return $rules;\n }", "title": "" }, { "docid": "2b5a20ec1a5ae2d23f79f8f53f6eafdb", "score": "0.7881532", "text": "public function rules()\n {\n switch ($this->getMethod()) {\n case Request::METHOD_POST:\n return [\n 'value' => [\n 'required', 'numeric',\n ],\n 'user_id' => [\n 'required', Rule::exists('user_users', 'id'),\n ],\n 'type_id' => [\n 'required', Rule::exists('transaction_types', 'id'),\n ],\n ];\n case Request::METHOD_PUT:\n return [\n 'value' => [\n 'required', 'numeric',\n ],\n 'user_id' => [\n 'required', Rule::exists('user_users', 'id'),\n ],\n 'type_id' => [\n 'required', Rule::exists('transaction_types', 'id'),\n ],\n ];\n default:\n return [];\n }\n }", "title": "" }, { "docid": "ad3d953053d2553fb551f54b0b141e3c", "score": "0.7862254", "text": "public function getValidationRules()\n {\n return [\n 'name' => 'required',\n 'type' => 'required',\n ];\n }", "title": "" }, { "docid": "0ee92c08b23861e231ac7fed2822d241", "score": "0.78328764", "text": "public function getValidationRules()\n {\n return array();\n }", "title": "" }, { "docid": "d731c93e510069b99ad3568e7d711f14", "score": "0.7822328", "text": "public function rules()\n {\n $actionMethod = $this->route()->getActionMethod();\n switch ($actionMethod) {\n case \"login\":\n return [\n 'phone' => 'required',\n 'code' => 'required',\n 'key' => 'required',\n ];\n break;\n case \"refreshToken\":\n return [\n 'refresh_token' => 'required',\n ];\n break;\n case \"sendSmsCode\":\n return [\n 'phone' => 'required',\n ];\n break;\n case \"resetPassword\":\n $rules = [\n 'step' => 'required|integer|in:1,2,3',\n\n ];\n switch ($this->input('step')) {\n case 1:\n $rules['phone'] = 'required|string';\n break;\n case 2:\n $rules['code'] = 'required|string';\n $rules['key'] = 'required|string';\n break;\n case 3:\n $rules['key'] = 'required|string';\n $rules['password'] = 'required|string';\n break;\n }\n return $rules;\n break;\n\n }\n }", "title": "" }, { "docid": "c6a93f347007a0f1d768ed1b54f164b0", "score": "0.77910346", "text": "public function getValidationRules()\n {\n $rules = [];\n\n foreach (get_class_methods(get_called_class()) as $method) {\n if (preg_match('/^get[A-Za-z]+ValidationRule$/', $method)) {\n $rules = array_merge($rules, call_user_func([$this, $method]));\n }\n }\n\n return $rules;\n }", "title": "" }, { "docid": "69b0fb4d5f81fc199db366129ecb28ff", "score": "0.77879775", "text": "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n \n }\n return $rules;\n }", "title": "" }, { "docid": "3327846e46867e675bcf61a6bae2436d", "score": "0.77786255", "text": "public function getValidationRules()\n\t{\n\t\treturn $this->getModel()->getValidationRules();\n\t}", "title": "" }, { "docid": "9edd8fe3725aa1d4326988007b7edf78", "score": "0.7770045", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'description' => 'required'\n ];\n\n if ($this->request->has('hrefs')) {\n foreach ($this->request->get('hrefs') as $key => $val) {\n $rules['hrefs.' . $key] = 'required|url';\n $rules['titles.' . $key] = 'required';\n }\n }\n\n if ($this->request->has('titles')) {\n foreach ($this->request->get('titles') as $key => $val) {\n $rules['titles.' . $key] = 'required';\n $rules['hrefs.' . $key] = 'required|url';\n }\n }\n\n return $rules;\n }", "title": "" }, { "docid": "a67df9bab17643a18eb5e0451b936de8", "score": "0.77628785", "text": "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "title": "" }, { "docid": "f634fdf337b5bf564e898d3194856894", "score": "0.77404886", "text": "public function getRules()\n\t{\n\t\t$rules = self::$validationRules->all();\n\t\t\n\t\treturn $rules;\n\t}", "title": "" }, { "docid": "72452ea65b5fc6ae128152692ef84034", "score": "0.7736417", "text": "public static function getRules(){\n $rules = array(\n 'servName' => 'required',\n 'event_date' => 'required',\n 'participants' => 'required',\n 'units' => 'required'\n );\n return $rules;\n }", "title": "" }, { "docid": "3c0d3b8f01f190359f24c737d8739bb5", "score": "0.7706707", "text": "public static function getValidatorRules()\n\t{\n\t $rules = array('username' => 'required|max:100|unique:users',\n\t 'email_address' => 'required|email|max:255|unique:users|confirmed',\n\t 'email_address_confirmation' => 'required|email|max:255|',\n\t 'password' => 'required|min:5|max:100|confirmed',\n\t 'password_confirmation' => 'required|min:5|max:100',\n\t 'birthday' => 'required|date',\n\t 'gender' => 'required|in:male,female');\n return $rules;\n\t}", "title": "" }, { "docid": "99516e3df4e8476ad9c9ddc9cb0f2346", "score": "0.77006775", "text": "public function rules()\n {\n $rules = $this->rules;\n if(!Request::isMethod('post')){\n\n }\n return $rules;\n }", "title": "" }, { "docid": "bc29e2d122f7f2ef7386a3b9ee74fc7e", "score": "0.76968", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET': {\n return [\n 'id' => ['required, id']\n ];\n }\n case 'POST': {\n return [\n 'name' => ['required'],\n 'link' => ['required'],\n 'price' => ['required']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "title": "" }, { "docid": "8b0ec405b05d06b4eb540b07baa774dc", "score": "0.76933473", "text": "public function rules()\n {\n return $this->getRules();\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "dea43ad28e5d20edc74f9af7db0d7e5b", "score": "0.76740485", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'sold_units' => 'required|numeric',\n 'number_days' => 'required|numeric',\n 'probability' => 'required|numeric',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'sold_units' => 'required|numeric',\n 'number_days' => 'required|numeric',\n 'probability' => 'required|numeric',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "title": "" }, { "docid": "9cfe6867f9642a7fe9e460c61822ee78", "score": "0.76442456", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'title' => 'required|max:100',\n 'provider_id' => 'required',\n 'attendees' => 'required|max:100',\n 'start_date_time' => 'required',\n 'end_date_time' => 'required',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'title' => 'required|max:100',\n 'provider_id' => 'required',\n 'attendees' => 'required|max:100',\n 'start_date_time' => 'required',\n 'end_date_time' => 'required',\n ];\n default:\n return [];\n }\n }", "title": "" }, { "docid": "72af0d545752914c26d6cc6681d6fe95", "score": "0.7607342", "text": "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n 'country_code' => 'nullable|string',\n 'admin_name' => 'nullable|string',\n 'tag_admin_name' => 'nullable|string',\n 'last_save_case_admin_name' => 'nullable|string',\n 'tag_start' => 'nullable|date',\n 'tag_end' => 'nullable|date',\n 'last_save_start' => 'nullable|date',\n 'last_save_end' => 'nullable|date',\n 'status' => 'nullable|boolean',\n\n ];\n break;\n case 'store':\n return [\n 'excel' => 'required|file',\n ];\n break;\n case 'update':\n return [\n 'crm_resource_ids' => 'required|array',\n 'crm_resource_ids.*' => 'required|exists:crm_resources,id',\n 'admin_id' => 'required_if:distribute,1|exists:crm_bo_admins,admin_id',\n 'distribute' => 'required|boolean',\n\n ];\n break;\n default:\n return [];\n break;\n }\n }", "title": "" }, { "docid": "04f41656b47d22229e64a0d3457d6146", "score": "0.75863427", "text": "public function rules()\n {\n return array_merge((new CommonRequest())->rules(), [\n 'message' => ['nullable', 'string',],\n 'is_read' => ['nullable', 'integer', Rule::in(0, 1)],\n ]);\n }", "title": "" }, { "docid": "a31ae9b25b8e7eb26cffbee1a618acd1", "score": "0.7569198", "text": "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Queued' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'inArray' => array('values' => array(self::STATUS_HOLD, self::STATUS_QUEUED, self::STATUS_PROCESSING, self::STATUS_SENT, self::STATUS_FAILED),),\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "1e19b70b08a78e9c45d9b0f97120bd14", "score": "0.75672674", "text": "public function rules(): array\n {\n switch ($this->method()) {\n case \"GET\":\n return [\n \"page\" => \"required|integer\",\n \"size\" => \"required|integer\"\n ];\n case \"POST\":\n case \"PUT\":\n return [\n 'province' => 'required',\n 'city' => 'required',\n 'district' => 'required',\n 'address' => 'required',\n 'zip' => 'required',\n 'contact_name' => 'required',\n 'contact_phone' => 'required',\n ];\n }\n return [];\n }", "title": "" }, { "docid": "908e2ecbcbdcda2f9a8d83d5c23b7c40", "score": "0.7562199", "text": "public function rules()\n {\n $routeName = $this->route()->getName();\n switch ($routeName) {\n case \"api.member-manage.check-out.store\":\n $rule = [\n \"member_name\" => \"required\",\n \"member_ID\" => \"required\",\n \"bed\" => \"required\",\n \"check-out_time\" => \"required|integer\",\n \"check-out_reason\" => \"required\",\n \"manager\" => \"required\",\n \"manage_time\" => \"required|integer\",\n \"remark\" => \"required\",\n \"account_balance\" => \"required\",\n ];\n break;\n case \"\":\n $rule = [];\n break;\n default:\n $rule = [];\n };\n\n return $rule;\n }", "title": "" }, { "docid": "ef6e7c2bae7bd1614f924fc15fba11fb", "score": "0.7559008", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n {\n return $this->translateRequest();\n }\n case 'PUT':\n case 'PATCH':\n {\n return $this->translateRequestunique();\n }\n default:break;\n }\n }", "title": "" }, { "docid": "97b4872123a44487d665beec1e5ec27b", "score": "0.7556369", "text": "public function rules()\n {\n if ($this->method() == 'PUT') {\n return [\n \"address\" => \"required\",\n \"number\" => \"required\",\n \"district\" => \"required\",\n \"city\" => \"required\",\n \"zip_code\" => \"required\",\n \"zip_code\" => \"required\",\n \"state\" => \"required\"\n ];\n }\n }", "title": "" }, { "docid": "08c0ecff552dcc147438c1164562b6fb", "score": "0.7553157", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n {\n return [\n 'name_first' => ['required'],\n 'name_last' => ['required'],\n 'phone' => ['required', 'numeric'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users,email'],\n 'password' => ['required', 'min:6', 'confirmed']\n ];\n }\n case 'PUT':\n {\n return [\n 'name_first' => ['required'],\n 'name_last' => ['required'],\n 'phone' => ['required', 'numeric'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users,email'],\n 'password' => ['sometimes', 'min:6', 'confirmed']\n ];\n }\n default:\n return [];\n }\n }", "title": "" }, { "docid": "f4d08d000564d289c4acdca00ba2f8c0", "score": "0.7552394", "text": "public function rules()\n {\n return $this->{$this->getCallableValidationMethod()}();\n }", "title": "" }, { "docid": "d53282c1821670baf67fc9497a191209", "score": "0.7550709", "text": "private function getValidationRules(Request $request)\n {\n $rules = [\n 'name' => 'required|string',\n 'first_name' => 'required|string',\n 'phone_number' => 'required|string|min:10',\n 'year' => 'required_if:status,student|nullable|integer|min:1900|max:'.(date('Y') + 5),\n 'major' => 'sometimes|present|max:190',\n 'hometown' => 'sometimes|present|max:190',\n 'bio' => 'sometimes|present|max:65000',\n 'favorite_music' => 'sometimes|present|max:65000',\n 'favorite_shows' => 'sometimes|present|max:65000',\n 'source' => 'sometimes|present|string',\n 'walkup' => 'sometimes|present|max:190',\n ];\n\n if (ends_with($request->user()->email, '@carleton.edu')) {\n $rules['status'] = 'required|in:student,faculty,staff';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "4c2b6dc551385ec32bef90f467bc9906", "score": "0.7548898", "text": "public function rules()\n {\n $rules = Arr::dot(parent::rules());\n\n return $rules;\n }", "title": "" }, { "docid": "0119531d97607970cbec7122fab1bdbd", "score": "0.7547403", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'POST':\n {\n return [\n 'last_name' => 'required|max:255',\n 'first_name' => 'required|max:255',\n 'phone' => 'required|regex:/[0-9]{3}(-)[0-9]{7}/',\n 'date_of_birth' => 'required|date',\n ];\n }\n default:break;\n }\n }", "title": "" }, { "docid": "27713536398e435e2da0c68bdf4577f3", "score": "0.75468814", "text": "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_ChannelID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_DistributionID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Width' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Height' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Bitrate' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Duration' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Size' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_Action' => array(\n\t\t\t\t'string' => array(),\n\t\t\t),\n\t\t\t'_Category' => array(\n\t\t\t\t'string' => array(),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "1154fbf2b7902633a6d14fa73dc82cf5", "score": "0.754284", "text": "public function rules()\n {\n $rules = [\n 'title' => 'required',\n 'content' => 'required',\n ];\n\n $isJsonApi = $this->isJsonApiRequest();\n\n if (config('app.comment_google_recaptcha') && ! $isJsonApi) {\n $rules['g-recaptcha-response'] = 'required|recaptcha';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "f5c2953b1844527b189c6993e61d2b72", "score": "0.75207967", "text": "protected function getValidationRules(): array\n {\n return [\n QueryComplexity::class => new QueryComplexity(config('lighthouse.security.max_query_complexity', 0)),\n QueryDepth::class => new QueryDepth(config('lighthouse.security.max_query_depth', 0)),\n DisableIntrospection::class => new DisableIntrospection(config('lighthouse.security.disable_introspection', false)),\n ];\n }", "title": "" }, { "docid": "a8ddfdb35a848ab4b79cc188b1058d73", "score": "0.7518695", "text": "public function rules()\n {\n switch ($this->method()) {\n // CREATE\n case 'PATCH':\n // UPDATE\n case 'PUT':\n case 'POST':\n {\n return [\n 'tour_id' => 'required',\n 'tour_date' => 'required|date_format:Y-m-d',\n 'given_name.*' => 'required|max:128|string',\n 'surname.*' => 'required|max:64|string',\n 'email.*' => 'required|email|max:128',\n 'mobile.*' => 'required|max:16|regex:/^([0-9\\s\\-\\+\\(\\)]*)$/',\n 'dob.*' => 'required|date_format:Y-m-d|before:today',\n 'passport.*' => 'required|max:16',\n ];\n }\n case 'GET':\n case 'DELETE':\n default:\n {\n return [];\n }\n }\n }", "title": "" }, { "docid": "23fcc60df26f1ed62b13eca14064a422", "score": "0.7517089", "text": "public function rules()\n {\n switch ($this->method())\n {\n case 'POST':\n return [\n 'year' => 'required|string|date_format:Y',\n ];\n case 'PUT':\n return [\n 'time_limit' => 'required|numeric|min:0',\n ];\n default: break;\n }\n }", "title": "" }, { "docid": "5ccce716b5a2a2ce0dfad5d3901dba15", "score": "0.7509706", "text": "public function rules() {\n\n switch($this->method()) {\n\n case 'GET':\n return [];\n case 'DELETE':\n return [\n 'id' => 'required|integer'\n ];\n\n case 'POST':\n return [\n 'name' => 'required|max:255',\n 'about' => 'max:1024'\n ];\n\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:255',\n 'about' => 'max:1024'\n ];\n\n default:\n return [];\n }\n }", "title": "" }, { "docid": "e6de1edf668d2476f99589cc345637c3", "score": "0.75036335", "text": "final public function getValidationRules(): array\n {\n return array_merge(\n array_values($this->getBuiltInValidationRules()),\n array_values(($this->format ? $this->format->getValidationRules() : [])),\n array_values($this->validationRules)\n );\n }", "title": "" }, { "docid": "50e12b159f9140054cf352dc4fea9272", "score": "0.7490797", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'POST':\n $this->errorBag = 'examPost';\n return [\n 'name' => 'required|min:6',\n 'stop_at' => 'required|time_greater_than:start_at',\n 'start_at' => 'required'\n ];\n break;\n case 'PATCH':\n $this->errorBag = 'examPatch';\n return [\n 'name' => 'required|min:6',\n 'stop_at' => 'required|time_greater_than:start_at',\n 'start_at' => 'required'\n ];\n break;\n default:\n\n break;\n }\n }", "title": "" }, { "docid": "6eb6931c0cbeda0504917ae14b5ca6ad", "score": "0.7486808", "text": "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "title": "" }, { "docid": "3e0c33124cf1ca14f8abb610d9b71d14", "score": "0.7480164", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required|string',\n 'profile' => 'required|url',\n 'profession' => 'required|string',\n 'email' => 'required|email'\n ];\n\n if(in_array($this->method(), ['PUT','PATCH'])) {\n $rules = [\n 'name' => 'string',\n 'profile' => 'url',\n 'profession' => 'string',\n 'email' => 'email'\n ];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "4251b29a2105379903b71f0d20fb3e99", "score": "0.7477489", "text": "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n }\n }", "title": "" }, { "docid": "7a262ba8b0ffc679be355f2718ad48d5", "score": "0.74720335", "text": "public function rules()\n {\n $rules = [\n 'client' => 'required|integer',\n 'credit' => 'int',\n 'fromdate' => 'required|date',\n 'todate' => 'required|date',\n 'balance' => 'required|decimal|min:0',\n 'status' => 'required|integer'\n ];\n\n switch ($this->getMethod())\n {\n case 'POST':\n return $rules;\n case 'PUT':\n return [\n 'id' => 'required|integer|exists:accounts,id'\n ] + $rules; // и берем все остальные правила\n // case 'PATCH':\n case 'DELETE':\n return [\n 'id' => 'required|integer|exists:accounts,id'\n ];\n }\n }", "title": "" }, { "docid": "c3b4b3f6f5810d7d70fd54b847031d6a", "score": "0.74660116", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'name' => 'required|min:1',\n 'description' => 'nullable',\n ];\n break;\n case 'PUT':\n return [\n 'name' => 'required|min:1',\n 'description' => 'nullable',\n ];\n break;\n }\n }", "title": "" }, { "docid": "07bb6e4c7e8919d4d4637d5377b145d9", "score": "0.74563336", "text": "private function getFormValidationRules() {\n return array(\n 'name' => 'required|max:99',\n 'image' => 'image',\n );\n }", "title": "" }, { "docid": "bae14b3ff417cca70431e94c1c092ebd", "score": "0.74552625", "text": "public function rules()\n {\n $rules = array();\n\n $rules['title'] = $this->validateTitle();\n $rules['category'] = $this->validateCategory();\n $rules['content'] = $this->validateContent();\n\n return $rules;\n }", "title": "" }, { "docid": "3611826f0fd76bfe37b3517cc49ef234", "score": "0.7444845", "text": "public function rules()\n {\n $rules = [];\n\n foreach ($this->request->get('firstName') as $key => $val) {\n $rules['firstName.' . $key] = 'required|min:2';\n $rules['lastName.' . $key] = 'required|min:2';\n $rules['email.0'] = 'required|email';\n $rules['phone_number.0'] = 'required|min:10';\n\n }\n $rules['g-recaptcha-response'] = 'recaptcha';\n\n return $rules;\n }", "title": "" }, { "docid": "f701869ae7fc9d8c13d78d7c3d2905f7", "score": "0.7440865", "text": "public function rules()\n {\n $rules = $this->rules;\n \n if(Request::isMethod('PATCH')){\n $rules['vipName'] = 'required|max:12';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "0f2dcf4d12f83a5461f212a658e33718", "score": "0.7437881", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'POST':\n {\n return [\n 'question_id' => 'required',\n 'answer' => 'required | min:5 | max:255',\n ];\n }\n break;\n\n case 'PUT':\n {\n return [\n 'question_id' => 'sometimes | required',\n 'answer' => 'sometimes | required | min:5 | max:255',\n ];\n }\n break;\n\n default:\n break;\n }\n }", "title": "" }, { "docid": "a57c188a7a6be51a35a05f5c74829d1e", "score": "0.74371254", "text": "public function rules() {\n return self::$rules;\n }", "title": "" }, { "docid": "bd64541d4eb34fdaf30648543857809b", "score": "0.7434064", "text": "public function rules()\n {\n $rules = [\n 'title' => ['required', new SpamFree],\n 'body' => ['required', new SpamFree],\n ];\n\n if ($this->method() === 'POST') {\n $rules['channel_id'] = ['required', 'exists:channels,id'];\n $rules['g-recaptcha-response'] = ['required', $this->recaptcha];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "50faa08937cf913264c54657247df529", "score": "0.7433532", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n //\n \"name\" => \"required\",\n \"email\" => 'required|email|unique:users,email|max:50',\n \"type\" => \"required\",\n \"status\" => \"required\",\n \"password\" => 'required|min:6|confirmed',\n \"password_confirmation\" => \"required\"\n ];\n\n break;\n\n case 'PATCH' :\n return [\n //\n \"name\" => \"required\",\n \"type\" => \"required\",\n \"status\" => \"required\",\n ];\n break;\n \n default:\n # code...\n break;\n }\n \n }", "title": "" }, { "docid": "11cf1316f61837598f1ea6684d7688c3", "score": "0.7427516", "text": "private function getRules()\n {\n return array(\n 'department' => 'required|regex:/^[\\w -=@]+$/',\n 'class' => 'required|regex:/^[\\w -=@]+$/',\n 'code' => 'required|regex:/^[\\w -=@]+$/',\n 'year level' => 'required|numeric|min:3|max:12',\n 'number of students' => 'required|numeric',\n 'teacher' => 'required',\n 'role' => 'required|regex:/^[a-z\\d\\-_\\s]+$/i|in:Teacher,Department Head,Department head',\n 'email' => 'required|email'\n );\n }", "title": "" }, { "docid": "9b40ff5fc00eb64f2f3561cb09592728", "score": "0.742173", "text": "public function rules()\n {\n $rules = array();\n $rules['nombre'] = $this->validarNombre();\n $rules['precio'] = $this->validarPrecio();\n $rules['stock'] = $this->validarStock();\n $rules['sabor'] = $this->validarSabor();\n $rules['caracteristicas'] = $this->validarCaracteristicas();\n return $rules;\n }", "title": "" }, { "docid": "20feae88317aa1b312f2628093059b50", "score": "0.74179286", "text": "public function rules()\n {\n $rules = [\n 'url' => 'required|string',\n 'frame_id' => 'required|check_frame',\n 'dynamic_id' => 'required|check_dynamic',\n 'category_id' => 'check_category',\n 'author_id' => 'check_author',\n 'crawl_resources' => 'mixed'\n \n ];\n return $rules;\n // return $this->parseRules($rules);\n }", "title": "" }, { "docid": "20034c828782eb3c046f6515ee910583", "score": "0.7410075", "text": "public function rules()\n {\n\n $rules = [];\n\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [];\n break;\n }\n case 'POST':\n {\n $rules = [\n 'branch_id' => 'required|exists:branches,id',\n 'method_id' => 'required|exists:payment_methods,id',\n 'amount' => 'required',\n 'capital_date' => 'required',\n 'fiscal_period_id' => '',\n 'description' => ''\n ];\n break;\n }\n case 'PUT':\n case 'PATCH':\n {\n $rules = [\n 'branch_id' => 'required|exists:branches,id',\n 'method_id' => 'required|exists:payment_methods,id',\n 'amount' => 'required',\n 'capital_date' => 'required',\n 'fiscal_period_id' => '',\n 'description' => ''\n ];\n break;\n }\n default:\n break;\n }\n\n return $rules;\n\n }", "title": "" }, { "docid": "4f4047a54d56ac0baed3a841649a1a0b", "score": "0.74023473", "text": "public function rules()\n {\n $formRequests = [\n OrderRequest::class,\n DetailOrderRequest::class,\n ];\n $rules = [\n 'name' => 'required',\n 'table_name' => 'required',\n 'price' => 'required',\n 'discount' => 'required',\n 'final_price' => 'required',\n ];\n foreach ($formRequests as $source) {\n $rules = array_merge(\n $rules,\n (new $source())->rules()\n );\n }\n // dd($rules);\n return $rules;\n }", "title": "" }, { "docid": "69ad1f6e2877cf8c0a785769c78ef420", "score": "0.73994297", "text": "public function rules()\n {\n return array_merge(\n $this->getRulesForTranslation(\n 'name',\n 'required|string'\n ),\n $this->getRulesForTranslation(\n 'preview',\n 'string'\n ),\n $this->getRulesForTranslation(\n 'text',\n 'string'\n ),\n $this->getBaseRules()\n );\n }", "title": "" }, { "docid": "41d019308ddd2d608a752b92d5026402", "score": "0.73993343", "text": "public function rules()\n {\n $main_rules [\n 'username' => 'required|min:3', \n 'name' => 'required|min:3',\n ];\n if ($this->isMethod('post')) {\n return $main_rules + [\n 'password' => 'required|min:6',\n 'repassword' => 'same:password|min:6'\n ];\n }\n return $main_rules;\n }", "title": "" }, { "docid": "173fd60dbc4d9b838e212c6eed8f39d0", "score": "0.73979235", "text": "public function rules()\n {\n $rules = [];\n if($this->method() == 'POST'){\n $rules = [\n 'title' => 'required|string',\n 'slug' => 'required|string',\n 'content' => 'required|string|max:255',\n 'is_published' => 'nullable|boolean',\n ];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "5988f5548a36ad0e7be54161ba920923", "score": "0.73914737", "text": "public function rules()\n {\n $rules = [\n\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "ea5bdb2b9aea1f041fcc1c8fb5c1d6af", "score": "0.73858285", "text": "public function rules()\n {\n $rules = $this->rules;\n\n $rules['title'] = 'required|max:80';\n $rules['gender'] = 'required';\n $rules['region'] = 'required|different:reg';\n $rules['reward'] = 'required|max:50';\n $rules['content'] = 'required|max:255';\n\n return $rules;\n }", "title": "" }, { "docid": "352614adb48e4ce8984bdae268224d27", "score": "0.7380819", "text": "public function rules()\n {\n $model = null;\n foreach (config('wordit.models') as $model) {\n $getModelInstance = new $model;\n if ($this->segment(2) == $getModelInstance->getRouteName()) {\n $model = $getModelInstance;\n }\n }\n\n return $model->getValidationRules();\n }", "title": "" }, { "docid": "78f1562fcadfcee36397fa4b0a8d4e5d", "score": "0.7377877", "text": "public function rules()\n {\n $rules = parent::rules();\n $rules = array_merge($rules, [\n ]);\n\n return $rules;\n }", "title": "" }, { "docid": "2afb7b5260c95dd3ff8db07af4f73030", "score": "0.73760486", "text": "public function rules()\n {\n foreach ($this->request as $key => $value) {\n if (strpos($key,'content') !== false ) {\n $rules[$key] = 'bail|required|string|max:160';\n }\n if(strpos($key,'answer') !== false ){\n $rules[$key] = 'in:yes,no';\n }\n }\n\n return $rules;\n }", "title": "" }, { "docid": "9db259426d69516ecf456c848f8ca459", "score": "0.7368886", "text": "public function rules() { \n $validation = array();\n $validation['name'] = 'required';\n $validation['address'] = 'required';\n $validation['phone'] = 'required';\n \n return $validation;\n }", "title": "" }, { "docid": "214cfa8dd27b6f5a1f3ee5d288b25f06", "score": "0.73620796", "text": "public function rules(): array\n {\n return [\n 'name' => 'required',\n 'subject' => 'required',\n 'resource' => 'required',\n 'properties' => 'required',\n 'action' => 'required',\n 'algorithm' => 'required',\n 'rules' => 'required',\n ];\n }", "title": "" }, { "docid": "a1d1ff40c87a95692d6f314422eebd17", "score": "0.7358706", "text": "public function rules()\n {\n $this->addValidator();\n return [\n //use request to validate user's input\n //sometimes when the fileds shows on the page, then need to validate\n\n //use own customized rule:check_password\n 'oldpwd' =>'sometimes|required|check_password',\n 'newpwd' =>'sometimes|required|confirmed',\n 'newpwd_confirmation'=>'sometimes|required',\n ];\n }", "title": "" }, { "docid": "47d44f5f89ee7a59dc23f67f2c677776", "score": "0.735297", "text": "public function rules()\n {\n if (in_array($this->method(), ['POST', 'PUT'])) {\n return [\n 'name' => 'required|string|max:150',\n ];\n }\n\n return [];\n }", "title": "" }, { "docid": "90f762d9defdeb4a87d9f52033fd121d", "score": "0.73475206", "text": "public function getFilterValidationRules();", "title": "" }, { "docid": "08c8727b581426b1bc4e5a6545bd2dc1", "score": "0.73455524", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required|max:255',\n ];\n\n if ($this->request->get('password')) {\n $rules['old_password'] = 'required|min:3|old_password';\n $rules['password'] = 'required|min:3|confirmed';\n $rules['password_confirmation'] = 'required';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "0c9e10f71e8f798faa5a1848e10486b2", "score": "0.73438406", "text": "public function rules(): array\n {\n switch ($this->getMethod())\n {\n case 'POST':\n $rules = [\n 'title' => 'required|string|between:2,50',\n 'description' => 'required|string|between:2,1000',\n 'price' => 'required|numeric',\n 'stock' => 'required|integer|min:0',\n ];\n return $rules;\n break;\n case 'PATCH':\n $rules = [\n 'title' => 'nullable|string|between:2,50',\n 'description' => 'nullable|string|between:2,1000',\n 'price' => 'nullable|numeric',\n 'stock' => 'required|integer|min:0',\n ];\n return $rules;\n break;\n case 'DELETE':\n return [\n\n ];\n\n }\n }", "title": "" }, { "docid": "cc8493476388572dc13608b52564bda2", "score": "0.7341267", "text": "public function rules()\n {\n $rules = [\n \n ];\n\n return $rules;\n }", "title": "" }, { "docid": "929676a93381ea9d7c141c9efaeb2950", "score": "0.73388064", "text": "public function getRules()\n {\n return $this->rules();\n }", "title": "" }, { "docid": "09fb2136482ceafdbc35887e4cac1896", "score": "0.7334593", "text": "public function rules()\n {\n $rules = Jalur::$rules;\n \n return $rules;\n }", "title": "" }, { "docid": "1717d11baaeb9056868160677f72dffa", "score": "0.73329395", "text": "public function rules()\n {\n // $rules = $this->rules;\n\n // if(Input::get('hospital'))\n\n return [\n 'recipient' => 'required|min:2',\n 'street' => 'required|min:2',\n 'number' => 'required|min:1',\n 'postalcode'=> 'required|min:4|max:4',\n 'city' => 'required|min:2'\n ];\n }", "title": "" }, { "docid": "8b8e4d4959d4a54a2d5bb24b557201de", "score": "0.7331728", "text": "public function getRules()\n\t{\n\t\treturn [\n\t\t\t'plan_id' \t=> ['required', 'string'],\n\t\t\t'app_id' \t=> ['required', 'in:' . implode(',', SELF::APP_ID)],\n\t\t\t'max_tenant' \t=> ['required', 'number'],\n\t\t\t'max_user' \t\t=> ['required', 'number'],\n\t\t];\n\t}", "title": "" }, { "docid": "5b414a13e4f7ad02258397c20bb38e27", "score": "0.7328168", "text": "public function rules()\n {\n $rule = [\n 'value' => 'bail|required|boolean',\n ];\n\n if($this->getMethod() == 'POST'){\n $rule += ['type' => 'bail|required'];\n }\n\n return $rule;\n }", "title": "" }, { "docid": "2d0f6c0c50f592ef026e7445b07ba53c", "score": "0.73275775", "text": "public function rules()\n {\n return $this->settings->get('rules');\n }", "title": "" }, { "docid": "022d78ff3b5416639cd2cf823726be6d", "score": "0.7323669", "text": "public function rules()\n {\n $rules = [];\n\n if ($this->isMethod('POST') || $this->isMethod('PUT')) {\n $rules = [\n 'data.brand_id' => 'required',\n 'data.title' => 'required',\n 'data.price' => 'required|numeric',\n 'data.open_status' => 'required|in:' . implode(',', array_keys(ProductProtocol::openStatus())),\n 'data.attributes' => 'required|array',\n 'data.detail' => 'required',\n 'data.skus' => 'required|array',\n 'data.images_ids' => 'array',\n 'data.group_ids' => 'array'\n ];\n }\n\n if ($this->route()->getName() == 'api.products.operate') {\n $rules = [\n 'action' => 'required|in:' . ProductProtocol::VAR_PRODUCT_STATUS_UP . ',' . ProductProtocol::VAR_PRODUCT_STATUS_DOWN,\n 'product_ids' => 'required'\n ];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "80689ffa29bd510b831e090ceeb4f68b", "score": "0.73105633", "text": "public function rules()\n {\n $rules = [];\n $systemVersions = implode(\",\", SystemVersion::lists('id')->toArray());\n\n $rules = ['systemVersion' => sprintf('required|in:%s', $systemVersions)];\n $orgRules = $this->getRulesForOrg($this->get('organization'));\n $userRules = $this->getRulesForUsers($this->get('users'));\n $rules = array_merge($rules, $orgRules, $userRules);\n\n return $rules;\n }", "title": "" }, { "docid": "7c860f711362cbb4593c0c4c7ed8c903", "score": "0.73057914", "text": "public function rules()\n {\n $rotation = $this->get('rotation');\n\n $rules = [\n 'item_name' => 'required',\n 'price' => 'required|numeric',\n 'billing_cycle' => 'required',\n ];\n\n if (in_array($rotation, ['weekly', 'bi-weekly'])) {\n $rules['day_of_week'] = 'required';\n }\n elseif (in_array($rotation, ['monthly', 'quarterly', 'half-yearly', 'annually'])) {\n $rules['day_of_month'] = 'required';\n }\n\n\n return $rules;\n }", "title": "" }, { "docid": "d76b8ddc2f64acf8b41011c845539a09", "score": "0.7304529", "text": "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n case 'PUT': {\n return [\n 'point' => 'required|numeric|between:-99.99,99.99',\n 'instrument_id' => [\n 'required',\n Rule::exists('instruments', 'id')\n ],\n 'market_id' => [\n 'required',\n Rule::exists('markets', 'id')\n ]\n ];\n }\n }\n }", "title": "" }, { "docid": "21fffbdef8489d71a524168085f68890", "score": "0.729653", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n case 'POST':\n return [\n 'cuota' => 'required|numeric|min:1',\n ];\n case 'PUT':\n case 'PATCH':\n default:\n break;\n }\n return [];\n }", "title": "" }, { "docid": "5297e0f7419f691f86dfae98d2c4fb4b", "score": "0.7295692", "text": "public function rules() {\n if (Request::get('send_to_radios') == 'selected_users') {\n $user_validation = 'required';\n } else {\n $user_validation = '';\n }\n\n if (Request::get('send_to_radios') == 'selected_location') {\n $location_validation = 'required';\n } else {\n $location_validation = '';\n }\n return [\n 'notification_title' => 'required|max:100',\n 'notification_message' => 'required|max:250',\n 'send_to_radios' => 'required',\n 'js_users' => $user_validation,\n 'js_location' => $location_validation\n ];\n }", "title": "" }, { "docid": "56c9f5489ba7e8ea6553894a451d6123", "score": "0.7294492", "text": "public function rules()\n {\n $rules = array();\n\n $rules['status'] = 'nullable|numeric';\n $rules['shipping_address'] = 'required|string';\n $rules['phone'] = 'required|string';\n\n return $rules;\n }", "title": "" }, { "docid": "5799cae670f1724ccf7be324bfc9ff76", "score": "0.7293944", "text": "public function validationRules(): array\n {\n return [\n\n ];\n }", "title": "" }, { "docid": "7fff3a3ff58f87b794b76bbda8fa7b25", "score": "0.7293346", "text": "public function rules()\n\t{\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'name' => 'required|min:5',\n\t\t\t\t\t\t'email' => 'unique:users,email|email|required',\n\t\t\t\t\t\t'password' => 'required|min:6',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t\t'roles' => 'array',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'name' => 'required|min:5',\n\t\t\t\t\t\t'email' => 'email|required',\n\t\t\t\t\t\t'password' => '',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t\t'roles'=> 'array',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n\t}", "title": "" }, { "docid": "27638c67f88dcc8a2102634f3b7bb095", "score": "0.7287053", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'classify_id' => 'required|int',\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'before' => 'required|string',\n 'after' => 'required|string',\n 'hospital' => 'string',\n 'project' => 'string',\n 'price' => '',\n ];\n break;\n case 'PATCH':\n return [\n 'classify_id' => 'int',\n 'title' => 'string',\n 'content' => 'string',\n 'before' => 'string',\n 'after' => 'string',\n 'hospital' => 'string',\n 'project' => 'string',\n 'price' => '',\n ];\n break;\n }\n }", "title": "" }, { "docid": "8c3ce0647291b49e635052cc04f17a0a", "score": "0.72851247", "text": "public function rules() {\n\t\t$rules = [\n\t\t\t'name' => ['required', 'min:4', 'max:10'],\n\t\t\t'email' => ['required', 'email'],\n\t\t\t'message' => ['required']\n\t\t];\n\n\t\treturn $rules;\n\t}", "title": "" }, { "docid": "e37054feef66b05aa89b4b649629034c", "score": "0.7283289", "text": "public function rules($request)\n {\n\t\t$function = explode(\"@\", $request->route()[1]['uses'])[1];\n\t\t\n return $this->getRouteValidateRule($this->rules, $function);\n }", "title": "" } ]
dc74ea9f8c37d037b34a9424d3827329
Contract Provision Valued Item List.
[ { "docid": "f5fa5b0b4ceabfd3619336e3fd51dae9", "score": "0.0", "text": "public function getValuedItem()\n {\n return $this->valuedItem;\n }", "title": "" } ]
[ { "docid": "4cdf52f31b735e1bc015ac54ab513fcf", "score": "0.6355111", "text": "public function getItemsList(){\n return $this->_get(7);\n }", "title": "" }, { "docid": "1cf5930f147b9d04d285e02a1262cdf0", "score": "0.6302718", "text": "function getItemList() {\r\n return $this->item_list;\r\n }", "title": "" }, { "docid": "52d55cf627b4c2d460678da88e9fc9b1", "score": "0.6221077", "text": "public function getItemListList(){\r\n return $this->_get(2);\r\n }", "title": "" }, { "docid": "530a1d1e9c0123d341289615c1e8f0d1", "score": "0.6037227", "text": "public function getItemList()\n {\n return $this->ItemList;\n }", "title": "" }, { "docid": "180e52a3bc82108ab3f19f4f8f1b1e7e", "score": "0.59578377", "text": "public static function getItems() {\n \n }", "title": "" }, { "docid": "66dea19adf2ee1b2e93481da0c506434", "score": "0.594162", "text": "public function process_items()\n {\n }", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.59080374", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.59080374", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.59080374", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.59080374", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.59080374", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.59080374", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.59080374", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.59080374", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.59080374", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.59080374", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.59080374", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.59080374", "text": "public function getItems();", "title": "" }, { "docid": "4cb46dfcc4f8e11b97ff83a0972210b3", "score": "0.5875368", "text": "public function getItems(): array;", "title": "" }, { "docid": "4cb46dfcc4f8e11b97ff83a0972210b3", "score": "0.5875368", "text": "public function getItems(): array;", "title": "" }, { "docid": "4cb46dfcc4f8e11b97ff83a0972210b3", "score": "0.5875368", "text": "public function getItems(): array;", "title": "" }, { "docid": "46184dd015e1e4ae82a89b2934f33b8e", "score": "0.5791235", "text": "public function presentItems();", "title": "" }, { "docid": "278f7fc0a39bd89bc6ec041ebd0a7507", "score": "0.57294524", "text": "private function buildItem() {\n $item = new Types\\ItemType();\n /**\n * We want a multiple quantity fixed price listing.\n */\n $item->ListingType = Enums\\ListingTypeCodeType::C_FIXED_PRICE_ITEM;\n $item->Quantity = 99;\n $item->ProductListingDetails = new Types\\ProductListingDetailsType([\n 'BrandMPN' => new Types\\BrandMPNType([\n 'Brand' => 'PIATO',\n 'MPN' => '59602'])\n ]);\n /**\n * Let the listing be automatically renewed every 30 days until cancelled.\n */\n $item->ListingDuration = Enums\\ListingDurationCodeType::C_GTC;\n /**\n * The cost of the item is $19.99.\n * Note that we don't have to specify a currency as eBay will use the site id\n * that we provided earlier to determine that it will be United States Dollars (USD).\n */\n $item->StartPrice = new Types\\AmountType(['value' => 139.99]);\n /**\n * Allow buyers to submit a best offer.\n */\n $item->BestOfferDetails = new Types\\BestOfferDetailsType();\n $item->BestOfferDetails->BestOfferEnabled = true;\n\n /**\n * Automatically accept best offers of $17.99 and decline offers lower than $15.99.\n */\n /* $item->ListingDetails = new Types\\ListingDetailsType();\n $item->ListingDetails->BestOfferAutoAcceptPrice = new Types\\AmountType(['value' => 17.99]);\n $item->ListingDetails->MinimumBestOfferPrice = new Types\\AmountType(['value' => 15.99]); */\n\n /**\n * Provide a title and description and other information such as the item's location.\n * Note that any HTML in the title or description must be converted to HTML entities.\n */\n $item->Title = 'X Test produit API';\n $item->Description = '<h1>Bits & Bobs</h1><p>Just some &lt;stuff&gt; I found.</p>';\n $item->SKU = 'ABC-0010-0055';\n $item->Country = 'FR';\n $item->Location = 'Creteil';\n $item->PostalCode = '94000';\n /**\n * This is a required field.\n */\n $item->Currency = 'EUR';\n /**\n * Display a picture with the item.\n */\n $item->PictureDetails = new Types\\PictureDetailsType();\n $item->PictureDetails->GalleryType = Enums\\GalleryTypeCodeType::C_GALLERY;\n $item->PictureDetails->PictureURL = ['https://www.w3schools.com/css/img_fjords.jpg'];\n /**\n * List item in the Books > Audiobooks (29792) category.\n */\n $item->PrimaryCategory = new Types\\CategoryType();\n $item->PrimaryCategory->CategoryID = '181876';\n\n /**\n * Tell buyers what condition the item is in.\n * For the category that we are listing in the value of 1000 is for Brand New.\n */\n $item->ConditionID = 1000;\n /**\n * Buyers can use one of two payment methods when purchasing the item.\n * Visa / Master Card\n * PayPal\n * The item will be dispatched within 1 business days once payment has cleared.\n * Note that you have to provide the PayPal account that the seller will use.\n * This is because a seller may have more than one PayPal account.\n */\n $item->PaymentMethods = [\n 'VisaMC',\n 'PayPal'\n ];\n $item->PayPalEmailAddress = 'sc2mimini@hotmail.fr';\n $item->DispatchTimeMax = 1;\n /**\n * Setting up the shipping details.\n * We will use a Flat shipping rate for both domestic and international.\n */\n $item->ShippingDetails = new Types\\ShippingDetailsType();\n $item->ShippingDetails->ShippingType = Enums\\ShippingTypeCodeType::C_FLAT;\n /**\n * Create our first domestic shipping option.\n * Offer the Economy Shipping (1-10 business days) service at $2.00 for the first item.\n * Additional items will be shipped at $1.00.\n */\n $shippingService = new Types\\ShippingServiceOptionsType();\n $shippingService->ShippingServicePriority = 1;\n $shippingService->ShippingService = 'FR_Ecopli';\n $shippingService->ShippingServiceCost = new Types\\AmountType(['value' => 2.00]);\n $shippingService->ShippingServiceAdditionalCost = new Types\\AmountType(['value' => 1.00]);\n $item->ShippingDetails->ShippingServiceOptions[] = $shippingService;\n\n\n /**\n * Create our second international shipping option.\n * Offer the USPS Priority Mail International (6-10 business days) service at $5.00 for the first item.\n * Additional items will be shipped at $4.00.\n * The item will only be shipped to the following locations with this service.\n * N. and S. America\n * Canada\n * Australia\n * Europe\n * Japan\n */\n $shippingService = new Types\\InternationalShippingServiceOptionsType();\n $shippingService->ShippingServicePriority = 2;\n $shippingService->ShippingService = 'FR_OtherInternational';\n $shippingService->ShippingServiceCost = new Types\\AmountType(['value' => 5.00]);\n $shippingService->ShippingServiceAdditionalCost = new Types\\AmountType(['value' => 4.00]);\n $shippingService->ShipToLocation = [\n 'Europe',\n 'IT'\n ];\n $item->ShippingDetails->InternationalShippingServiceOption[] = $shippingService;\n /**\n * The return policy.\n * Returns are accepted.\n * A refund will be given as money back.\n * The buyer will have 14 days in which to contact the seller after receiving the item.\n * The buyer will pay the return shipping cost.\n */\n $item->ReturnPolicy = new Types\\ReturnPolicyType();\n $item->ReturnPolicy->ReturnsAcceptedOption = 'ReturnsAccepted';\n $item->ReturnPolicy->RefundOption = 'MoneyBack';\n $item->ReturnPolicy->ReturnsWithinOption = 'Days_14';\n $item->ReturnPolicy->ShippingCostPaidByOption = 'Buyer';\n\n\n return $item;\n }", "title": "" }, { "docid": "d0182b021dfa1e372a5dfd7f186df2b6", "score": "0.57236385", "text": "public function listItems()\n {\n return $this->items;\n\n }", "title": "" }, { "docid": "76b640f62549ae3d5b6d92b001d5b0a3", "score": "0.5666223", "text": "public function get_items() {\n return $this->items;\n }", "title": "" }, { "docid": "cadf7477ec5edc377b724e0a39a642ba", "score": "0.5658481", "text": "public function items();", "title": "" }, { "docid": "128a1f7060bf46756ce48d35f08f1ce6", "score": "0.5643597", "text": "public function getItems()\n {\n \treturn $this->items;\n }", "title": "" }, { "docid": "8aba08922d101a239a85ebf84032d2c2", "score": "0.5636344", "text": "public function getItems(){\n return $this->items;\n }", "title": "" }, { "docid": "a22a975679fa95a6baf80fcc76776e15", "score": "0.56026924", "text": "public function getActiveItems();", "title": "" }, { "docid": "532358c1c5ee7d7b6df638409c00e797", "score": "0.5597185", "text": "public function getItems() {\n return $this->items;\n }", "title": "" }, { "docid": "6f3d460feb2afd056bc5f4a659b37310", "score": "0.55962217", "text": "public function beforeCreateFromList()\n {\n }", "title": "" }, { "docid": "dca03f08d6b856a298105d82db4e5fca", "score": "0.5594369", "text": "public function getInvoiceItems();", "title": "" }, { "docid": "b72f395928ce60e6c25f3dd1b0b7ac52", "score": "0.5570399", "text": "protected abstract function getAllItems();", "title": "" }, { "docid": "6823b95289734c60c067100dc92486cc", "score": "0.5529859", "text": "public function validateList();", "title": "" }, { "docid": "6e827f2dbb5ef2f9f3aa2ff4bf42c58c", "score": "0.5519655", "text": "function getItems() {\n return $this->items;\n }", "title": "" }, { "docid": "d2e77cc62bf5bde69b0fb4ed1f66770a", "score": "0.5509694", "text": "abstract public function getItems() : \\ArrayObject;", "title": "" }, { "docid": "9c6e01ef76b83ad4845185f33dd38f48", "score": "0.5504821", "text": "function getItems() {\n\t\treturn $this->items;\n\t}", "title": "" }, { "docid": "f921e0b4d0de62620537f0c79c1402bd", "score": "0.5493818", "text": "function item_list_data($invoice_id = 0) {\n\n $list_data = $this->Sales_QuotationItems_model->get_details(array(\"fid_quotation\" => $invoice_id))->result();\n $result = array();\n foreach ($list_data as $data) {\n $result[] = $this->_make_item_row($data);\n }\n echo json_encode(array(\"data\" => $result));\n // $this->output->enable_profiler(TRUE);\n // print_r($list_data);\n\n }", "title": "" }, { "docid": "3dc0859dcddd017a366d030c063f40e3", "score": "0.54914546", "text": "public function getAllItems();", "title": "" }, { "docid": "190766a36de18b8524acb4a14bbc4910", "score": "0.54749227", "text": "function get_items();", "title": "" }, { "docid": "cb6c2bd1de3b0ab2f7236169814802e0", "score": "0.54713297", "text": "public function amendShoppingList($items){\n $shoppingList = $this->db->SHOPPING_LIST[($this->db->FB_USER[$this->userId])[\"SELECTED_CG\"]];\n $content = array(\"list\"=>[]);\n foreach($items as $item){\n array_push($content[\"list\"],array(\"item_name\" => trim($item)));\n }\n\n $content = json_encode($content);\n $shoppingList[\"CONTENT\"] = $content;\n $shoppingList->update();\n }", "title": "" }, { "docid": "48ed8293b16bbf52e78bc8cbb9828538", "score": "0.544988", "text": "public function getItems()\r\n {\r\n return $this->items;\r\n }", "title": "" }, { "docid": "d2e6f75e78e7e4f560b4c0b161215f41", "score": "0.54494345", "text": "function item_list_data($proposal_id = 0) {\n validate_numeric_value($proposal_id);\n $this->access_only_allowed_members();\n\n $list_data = $this->Proposal_items_model->get_details(array(\"proposal_id\" => $proposal_id))->getResult();\n $getResult = array();\n foreach ($list_data as $data) {\n $getResult[] = $this->_make_item_row($data);\n }\n echo json_encode(array(\"data\" => $getResult));\n }", "title": "" }, { "docid": "9dac1a16ad38de9067a0d088edc026eb", "score": "0.5446971", "text": "public function getItemsAllowed()\n {\n return $this->items_allowed;\n }", "title": "" }, { "docid": "8fd92881ba56c1ea6e71f504201a1c1a", "score": "0.54287815", "text": "public function __construct() {\r\n $ids = getAllItemIDs();\r\n for ($i = 0; $i < count($ids); $i++) {\r\n $new_item = new Item($ids[$i]);\r\n $this->item_list[$ids[$i]] = $new_item;\r\n }\r\n }", "title": "" }, { "docid": "0f9901d605233e8a539e92ab82128b95", "score": "0.54283226", "text": "public function insert() {\r\n\tItem::$rawItems[] = array (\r\n\t\t\t'idItem' => count(Item::$rawItems),\r\n\t\t\t'amount' => $this->amount,\r\n\t\t\t'priece' => $this->priece,\r\n\t\t\t'name' => $this->name\r\n\t);\r\n}", "title": "" }, { "docid": "cf8a26568f0629b9c30fb0a2357b88f2", "score": "0.54195786", "text": "public function getItemsData(): array\n {\n return $this->items_data;\n }", "title": "" }, { "docid": "f29187c5977ee6aff080f1d5aa31a8e7", "score": "0.5419561", "text": "public function getItems() \n {\n return $this->_fields['Items']['FieldValue'];\n }", "title": "" }, { "docid": "2139be77d4e2c13afb7a1c9cd637cb21", "score": "0.54194605", "text": "public function getItemListAction()\n {\n // Init errors array for validation problems list\n $errors = [];\n\n // Getting GET params for pagination\n\n /** @var int $limit Number of records to select */\n $limit = $this->request->getQuery('limit', 'string', '100');\n\n /** @var int $offset Start point of selection of the records */\n $offset = $this->request->getQuery('offset', 'string', '0');\n\n // Validate LIMIT parameter as positive integer\n if (!empty($limit) && (!ctype_digit($limit) || ($limit < 1))) {\n $errors['limit'] = 'Limit must be a positive integer';\n }\n\n // Validate OFFSET parameter as positive integer\n if (!empty($offset) && (!ctype_digit($offset) || ($offset < 0))) {\n $errors['offset'] = 'Offset must be a positive integer';\n }\n\n // Align human-understandable offset (offset =0 & offset =1 returns same)\n // Offset = 12 means we will get 12th element from collection first, not 13th\n $offset = $offset > 0 ? $offset - 1 : 0;\n\n // Check for any validation errors stacked in errors array\n if ($errors) {\n $this->logger->error('['.__METHOD__.'] Validation error acquired:'.print_r($errors, true));\n $exception = new Http400Exception(_('Input parameters validation error'), self::ERROR_INVALID_REQUEST);\n throw $exception->addErrorDetails($errors);\n }\n\n\n try {\n // Get an items from service\n\n /** @var mixed $records List of items from service */\n $records = $this->recordService->getItemList((int) $limit, (int) $offset);\n } catch (ServiceException $e) {\n $this->logger->error('['.__METHOD__.'] Exception raised.'.$e->getMessage());\n throw new Http500Exception(_('Internal Server Error'), $e->getCode(), $e);\n }\n\n // Return result back to API\n return $records;\n }", "title": "" }, { "docid": "74f680d5c5ab54db6190e00e88c2992f", "score": "0.54071575", "text": "public function processItem(): void;", "title": "" }, { "docid": "92fab536062f8394d068288bbd9c85f8", "score": "0.5396679", "text": "public function get_items() {\n return $this->items;\n }", "title": "" }, { "docid": "7add457fecc6c2ef835db7b1f8ab3e08", "score": "0.5390396", "text": "public function getAdminList()\r\n {\r\n $itemList = '';\r\n\r\n $itemIds = $this->getIds(\"ALL\", ($this->canShowOnlyPartnerOwned() ? get_current_user_id() : -1));\r\n foreach($itemIds AS $itemId)\r\n {\r\n $objItem = new Item($this->conf, $this->lang, $this->settings, $itemId);\r\n $itemDetails = $objItem->getExtendedDetails();\r\n $objDepositManager = new ItemDepositManager($this->conf, $this->lang, $this->settings, $itemId);\r\n $itemDepositDetails \t\t = $objDepositManager->getDetails();\r\n $item = array_merge($itemDetails, $itemDepositDetails);\r\n $objPriceGroup = new PriceGroup($this->conf, $this->lang, $this->settings, $item['price_group_id']);\r\n $priceGroupDetails = $objPriceGroup->getDetailsWithPartner();\r\n $enabled = $this->lang->getText($item['enabled'] == 1 ? 'NRS_ADMIN_AVAILABLE_TEXT' : 'NRS_ADMIN_HIDDEN_TEXT');\r\n $displayInSlider = $this->lang->getText($item['display_in_slider'] == 1 ? 'NRS_ADMIN_DISPLAYED_TEXT' : 'NRS_ADMIN_HIDDEN_TEXT');\r\n\r\n if(!is_null($priceGroupDetails))\r\n {\r\n $printTranslatedPriceGroupName = $priceGroupDetails['print_translated_price_group_name'].' '.$priceGroupDetails['print_via_partner'];\r\n } else\r\n {\r\n $printTranslatedPriceGroupName = '<span style=\"color: darkred;\">'.$this->lang->getText('NRS_NOT_SET_TEXT').'</span>';\r\n }\r\n\r\n if($item['item_page_id'] != 0 && $item['item_page_url'] != '')\r\n {\r\n\r\n $itemPageTitle = get_the_title($item['item_page_id']);\r\n $linkTitle = sprintf($this->lang->getText('NRS_ADMIN_VIEW_PAGE_IN_NEW_WINDOW_TEXT'), $itemPageTitle);\r\n $printTranslatedItemManufacturerAndModelWithLink = '<a href=\"'.$item['item_page_url'].'\" target=\"_blank\" title=\"'.$linkTitle.'\">';\r\n $printTranslatedItemManufacturerAndModelWithLink .= $item['print_translated_manufacturer_title'].' '.$item['print_translated_model_name'].' '.$item['print_via_partner'];\r\n $printTranslatedItemManufacturerAndModelWithLink .= '</a>';\r\n } else\r\n {\r\n $printTranslatedItemManufacturerAndModelWithLink = $item['print_translated_manufacturer_title'].' '.$item['print_translated_model_name'].' '.$item['print_via_partner'];\r\n }\r\n\r\n if($this->lang->canTranslateSQL())\r\n {\r\n $printTranslatedItemManufacturerAndModelWithLink .= '<br /><span class=\"not-translated\" title=\"'.$this->lang->getText('NRS_ADMIN_WITHOUT_TRANSLATION_TEXT').'\">('.$item['print_model_name'].')</span>';\r\n }\r\n\r\n $itemList .= '<tr>';\r\n $itemList .= '<td>'.$itemId.'</td>';\r\n $itemList .= '<td>'.$item['print_item_sku'].'</td>';\r\n $itemList .= '<td>'.$item['print_translated_body_type_title'].'</td>';\r\n $itemList .= '<td>'.$item['print_translated_transmission_type_title'].'</td>';\r\n $itemList .= '<td>'.$printTranslatedItemManufacturerAndModelWithLink.'</td>';\r\n $itemList .= '<td style=\"white-space: nowrap\">';\r\n $itemList .= '<span style=\"cursor:pointer;\" title=\"'.$this->lang->getText('NRS_ADMIN_MAX_ITEM_UNITS_PER_BOOKING_TEXT').'\">'.$item['max_units_per_booking'].'</span> / ';\r\n $itemList .= '<span style=\"cursor:pointer;font-weight:bold\" title=\"'.$this->lang->getText('NRS_ADMIN_TOTAL_ITEM_UNITS_IN_STOCK_TEXT').'\">'.$item['units_in_stock'].'</span> ';\r\n $itemList .= '</td>';\r\n $itemList .= '<td>'.$item['print_translated_fuel_type_title'].'</td>';\r\n $itemList .= '<td>'.$printTranslatedPriceGroupName.'</td>';\r\n if($this->depositsEnabled)\r\n {\r\n $itemList .= '<td>'.$item['unit_print']['fixed_deposit_amount'].'</td>';\r\n }\r\n $itemList .= '<td>'.$item['print_min_driver_age'].'</td>';\r\n $itemList .= '<td>'.$enabled.'</td>';\r\n $itemList .= '<td>'.$displayInSlider.'</td>';\r\n $itemList .= '<td align=\"right\">';\r\n if($objItem->canEdit())\r\n {\r\n $itemList .= '<a href=\"'.admin_url('admin.php?page='.$this->conf->getURLPrefix().'add-edit-item&amp;item_id='.$itemId).'\">'.$this->lang->getText('NRS_ADMIN_EDIT_TEXT').'</a> || ';\r\n $itemList .= '<a href=\"javascript:;\" onclick=\"javascript:delete'.$this->conf->getExtensionFolder().'Item(\\''.$itemId.'\\')\">'.$this->lang->getText('NRS_ADMIN_DELETE_TEXT').'</a>';\r\n } else\r\n {\r\n $itemList .= '--';\r\n }\r\n $itemList .= '</td>';\r\n $itemList .= '</tr>';\r\n }\r\n\r\n return $itemList;\r\n }", "title": "" }, { "docid": "87f50e9b7a5b92bcd3bfae9a1d5dcebd", "score": "0.53801215", "text": "public function getItems(): array\n {\n return $this->items;\n }", "title": "" }, { "docid": "87f50e9b7a5b92bcd3bfae9a1d5dcebd", "score": "0.53801215", "text": "public function getItems(): array\n {\n return $this->items;\n }", "title": "" }, { "docid": "87f50e9b7a5b92bcd3bfae9a1d5dcebd", "score": "0.53801215", "text": "public function getItems(): array\n {\n return $this->items;\n }", "title": "" }, { "docid": "2fbefc4332993d7648c2ad8280637c46", "score": "0.53668576", "text": "public function addItems()\n {\n $code = $this->getCode();\n\n $items = $this->getItems();\n\n $add = array();\n if ($items) {\n $datetime = date('Y-m-d H:i:s');\n foreach ($items as $item) {\n $add[] = array(\n 'code' => $code,\n 'contact_id' => $this->getContact()->getId(),\n 'product_id' => $item['product_id'],\n 'sku_id' => $item['sku_id'],\n 'create_datetime' => $datetime,\n 'quantity' => $item['quantity'],\n 'type' => $item['type'],\n 'service_id' => $item['service_id'],\n 'service_variant_id' => $item['service_variant_id'],\n 'parent_id' => $item['parent_id'],\n );\n }\n (new shopQuickorderPluginCartItemsModel())->multipleInsert($add);\n }\n }", "title": "" }, { "docid": "f5565effbffc7639eb793dbcfb067b41", "score": "0.5366706", "text": "public function getItems()\n\t{\n\t\t\n\t\t$items = parent::getList(); \n\t\n\t\tforeach(@$items as $item)\n\t\t{\n\t\t\t$registry = new JRegistry;\n\t\t\t$registry->loadString($item->params);\n\t\t\t$item->attribs = $registry->toObject();\n\t\t\t//Modal Link\n\t\t\t$item->form_link = 'index.php?option=com_favorites&controller=items&view=items&layout=form&tmpl=component&id='.$item->id;\n\t\t\tif(strlen($item->url) == 0) {\n\t\t\t\t$item->url = $item->scope_url . $item->object_id;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $items;\n\t}", "title": "" }, { "docid": "c95ec46e80b8bc395cbe69bd5a47a867", "score": "0.53521377", "text": "public function getItems(){\n return $this->_get(self::ITEMS);\n }", "title": "" }, { "docid": "574075d016e378dea2dced64b42a824b", "score": "0.53334624", "text": "public function getItems()\n {\n return $this->items;\n }", "title": "" }, { "docid": "574075d016e378dea2dced64b42a824b", "score": "0.53334624", "text": "public function getItems()\n {\n return $this->items;\n }", "title": "" }, { "docid": "574075d016e378dea2dced64b42a824b", "score": "0.53334624", "text": "public function getItems()\n {\n return $this->items;\n }", "title": "" }, { "docid": "574075d016e378dea2dced64b42a824b", "score": "0.53334624", "text": "public function getItems()\n {\n return $this->items;\n }", "title": "" }, { "docid": "574075d016e378dea2dced64b42a824b", "score": "0.53334624", "text": "public function getItems()\n {\n return $this->items;\n }", "title": "" }, { "docid": "574075d016e378dea2dced64b42a824b", "score": "0.53334624", "text": "public function getItems()\n {\n return $this->items;\n }", "title": "" }, { "docid": "5471f32d05ea0f5b547b597201054dd0", "score": "0.5328702", "text": "public function setListItems($listItems)\n {\n if(count($listItems==count($listItems,COUNT_RECURSIVE))){\n $listItems=[$listItems];\n }\n foreach($listItems as $value){\n $item=new Item();\n $item->setName($data['name'])->setCurrency($data['currency'])->setPrice($data['price'])->setSku($data['sku'])->setQuantity($data['quantity']);\n $this->listItems[]=$item;\n $this->totalAmout+=$item->getPrice()*$item->getQuantity();\n }\n \n return $this;\n }", "title": "" }, { "docid": "7a3df89040e5384cab655bcc64db1211", "score": "0.53270394", "text": "function list_items($list_id) {\n\t\treturn $this->hook(\"/todos/list/{$list_id}\",\"todo-list\");\n\t}", "title": "" }, { "docid": "d5e1acf5efde9a79bdb6cae2614d8247", "score": "0.53197414", "text": "public function items() {\n return $this->items;\n }", "title": "" }, { "docid": "de60ac3d9296b54fc082251c438e84bd", "score": "0.53154296", "text": "protected function ensurePopulated() {\n if (!isset($this->list[0])) {\n $this->list[0] = $this->createItem(0);\n // Populate the 0 value with the correct data.\n $this->list[0]->getValue();\n }\n }", "title": "" }, { "docid": "d5a7d5b927b64571757c3aee9c770b5a", "score": "0.5314299", "text": "public function updateListItems()\n\t{\n\t\tif($this->canUpdateClientSide())\n\t\t{\n\t\t\t$items = $this->getControl()->getItems();\n\t\t\tif($items instanceof TActiveListItemCollection\n\t\t\t\t&& $items->getListHasChanged())\n\t\t\t{\n\t\t\t\t$items->updateClientSide();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "386798b9c7b37190d790b643b6297158", "score": "0.52998877", "text": "public function retrieveItem()\n\t{\n\t}", "title": "" }, { "docid": "9a24ae4c925dfe4379d36afd1806c9f8", "score": "0.5295101", "text": "public function getItems()\n\t{\n\t\treturn $this->items;\n\t}", "title": "" }, { "docid": "9a24ae4c925dfe4379d36afd1806c9f8", "score": "0.5295101", "text": "public function getItems()\n\t{\n\t\treturn $this->items;\n\t}", "title": "" }, { "docid": "9a24ae4c925dfe4379d36afd1806c9f8", "score": "0.5295101", "text": "public function getItems()\n\t{\n\t\treturn $this->items;\n\t}", "title": "" }, { "docid": "3f5e2d7cb3d05b017fc12e96c237e3a8", "score": "0.5287477", "text": "function inline_items()\n\t{\n\t\t$this->items();\n\t}", "title": "" }, { "docid": "df3b7147884b2a9e7ad8654199c04865", "score": "0.52871597", "text": "public function __construct(ItemContract $items)\n {\n $this->items = $items;\n }", "title": "" }, { "docid": "559c95b360265677dd32acc6f988e3f0", "score": "0.528554", "text": "public function getItems() {\n\n\t\treturn $this->items;\n\t\n\t}", "title": "" }, { "docid": "d0dacf3ff1f0649afbbac3a7cd4c247e", "score": "0.52813524", "text": "private function itemsField(): EntityReferenceFieldItemListInterface {\n return $this->get($this->getEntityType()->getKey('items'));\n }", "title": "" }, { "docid": "ead8c545f1898ae2d48b5766ef8fff2c", "score": "0.52758133", "text": "public function addItemsToShoppingList($items){\n $fbUser = $this->db->FB_USER[$this->userId];\n $shoppingList=$this->db->SHOPPING_LIST[$fbUser[\"SELECTED_CG\"]];\n if($shoppingList[\"CONTENT\"]){\n $content = json_decode($shoppingList[\"CONTENT\"],true);\n }\n else{\n $content = array(\"list\"=>[]);\n }\n\n foreach($items as $item){\n array_push($content[\"list\"],array(\"item_name\" => trim($item)));\n }\n\n $content = json_encode($content);\n \n $shoppingList[\"CONTENT\"] = $content;\n $affected = $shoppingList->update();\n }", "title": "" }, { "docid": "b311e795091a3b544e7cb60dd21186ec", "score": "0.5264808", "text": "public function getItemValues(): array\n {\n return $this->item_values;\n }", "title": "" }, { "docid": "9134a37b8f2cc9730795ad896280db0e", "score": "0.52632624", "text": "public function getItems() {\n return $this->items;\n }", "title": "" }, { "docid": "9134a37b8f2cc9730795ad896280db0e", "score": "0.52632624", "text": "public function getItems() {\n return $this->items;\n }", "title": "" }, { "docid": "1c36cd9cbc1439cfef98747d4719b35d", "score": "0.52584803", "text": "protected function setPriceListItems()\r\n {\r\n $data = get_post_meta($this->_priceListObject->ID, '_plp_price_list_item', true);\r\n $this->_priceListItems = $data['data'];\r\n $this->_currencySign = $data['currency'];\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "a13da43955bc62b0dd33d2d367cc8232", "score": "0.5256587", "text": "public function listItem()\n {\n \n $query= $this->db->get('item')->result();\n return $query;\n }", "title": "" }, { "docid": "163c5a720f07bfbbf54af81076970ec7", "score": "0.52544004", "text": "function addListItem($listItem){\r\n array_push($this->listItems, $listItem);\r\n }", "title": "" }, { "docid": "d9d7ec2dbe3d27a78dcdeaa3967ead0e", "score": "0.525036", "text": "public function getCustomItems(): CustomItemCollectionInterface;", "title": "" }, { "docid": "777b8a168f95e6d85c1a2e1ae154b89d", "score": "0.52479774", "text": "public function prepare_items() {\n\n // $this->_column_headers = $this->get_column_info();\n\n /** Process bulk action */\n // $this->process_bulk_action();\n\n $per_page = $this->get_items_per_page( 'payments_per_page' );\n $current_page = $this->get_pagenum();\n $total_items = self::record_count();\n\n $this->set_pagination_args( array(\n 'total_items' => $total_items,\n 'per_page' => $per_page\n ) );\n\n\n $this->items = self::get_payments( $per_page, $current_page );\n\n }", "title": "" }, { "docid": "611bdeb621893ac7cd992315049c5dd9", "score": "0.5234402", "text": "public function getItems() {\n\t\treturn $this->items;\n\t}", "title": "" }, { "docid": "286af0098730c8c3e10c8bd1905e6ef8", "score": "0.5229532", "text": "public function write($list, $data){\n\t\t\t\n\t\t//Create XML to set values in the new Row Item\n\t\t$items = '';\n\t\tforeach($data AS $itm => $val){\n\t\t\t$items .= \"<Field Name='{$itm}'>{$val}</Field>\\n\";\n\t\t}\n\t\t//CAML query (request), add extra Fields as necessary\n\t\t$CAML =\"\n\t\t <UpdateListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>\n\t\t\t <listName>{$list}</listName>\n\t\t\t <updates>\n\t\t\t\t <Batch ListVersion='1' OnError='Continue'>\n\t\t\t\t\t <Method Cmd='New' ID='1'>\n\t\t\t\t\t\t{$items}\n\t\t\t\t\t </Method>\n\t\t\t\t </Batch>\n\t\t\t </updates>\n\t\t </UpdateListItems>\";\n\t\t \n\t\t$xmlvar = new SoapVar($CAML, XSD_ANYXML);\n\t\t//Attempt to run operation\n\t\ttry{\n\t\t\t$result = $this->xmlHandler($this->soapObject->UpdateListItems($xmlvar)->UpdateListItemsResult->any);\n\t\t}catch(SoapFault $fault){\n\t\t\t$this->onError($fault);\n\t\t\t$result = null;\n\t\t}\n\t\t//Return a XML as nice clean Array\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "6f9de7703ec2c3ca1f1a92135851e346", "score": "0.5224929", "text": "public function addItemList(\\utilpb\\PetEquipItem $value){\r\n return $this->_add(2, $value);\r\n }", "title": "" }, { "docid": "62f337c5605ff7c69c723f9d0e84a23a", "score": "0.52235836", "text": "public function getItemList(){\n\t\t$version = self::getLatestCDNVersion();\n\n\t\t$url = \"http://ddragon.leagueoflegends.com/cdn/{$version}/data/en_US/item.json\";\n\t\t$items = file_get_contents($url);\n\t\t$items = json_decode($items);\n\n\t\treturn $items;\n\t}", "title": "" }, { "docid": "d0e2749b1444a924539e98dd50b22aa4", "score": "0.5218857", "text": "public function getItems()\n\t{\n\t\t$items = parent::getItems();\n\n\t\treturn $items;\n\t}", "title": "" }, { "docid": "35ba0289523add3f6de5b53a4742f1ff", "score": "0.52122813", "text": "public function publishItem()\n {\n }", "title": "" }, { "docid": "2e12161c172d9d33c3652758a0562437", "score": "0.5206715", "text": "public function getItems()\n {\n return $this->_items;\n }", "title": "" }, { "docid": "2e12161c172d9d33c3652758a0562437", "score": "0.5206715", "text": "public function getItems()\n {\n return $this->_items;\n }", "title": "" }, { "docid": "b17d0bb0af37afec5db30910274ffe63", "score": "0.5195344", "text": "public function getItems()\n {\n return $this->items;\n }", "title": "" }, { "docid": "15b5d52a5e780cb8c4c1e5cbb41772b6", "score": "0.5193651", "text": "public function prepare_items() {\n\n\t\t$this->_column_headers = $this->get_column_info();\n\n\t\t/** Process bulk action */\n\t\t$this->process_bulk_action();\n\t\t$this->search_box( ig_es_get_request_data( 's' ), 'subscriber-search-input' );\n\t\t$this->prepare_lists_dropdown();\n\t\t$this->prepare_statuses_dropdown();\n\n\t\t$per_page = $this->get_items_per_page( self::$option_per_page, 200 );\n\t\t$current_page = $this->get_pagenum();\n\t\t$total_items = $this->get_subscribers( 0, 0, true );\n\n\t\t$this->set_pagination_args( array(\n\t\t\t'total_items' => $total_items, //WE have to calculate the total number of items\n\t\t\t'per_page' => $per_page //WE have to determine how many items to show on a page\n\t\t) );\n\n\t\t$contacts = $this->get_subscribers( $per_page, $current_page );\n\n\n\t\t$this->items = $contacts;\n\n\t\tif ( count( $contacts ) > 0 ) {\n\n\t\t\t$contact_ids = array_map( array( $this, 'get_contact_id' ), $contacts );\n\n\t\t\t$contact_lists_statuses = ES()->lists_contacts_db->get_list_status_by_contact_ids( $contact_ids );\n\n\t\t\t$this->contact_lists_statuses = $contact_lists_statuses;\n\n\t\t\t$this->lists_id_name_map = ES()->lists_db->get_list_id_name_map();\n\t\t}\n\t}", "title": "" }, { "docid": "5598f2bf188c6fa1c64dc4a4a81dd4a7", "score": "0.5188471", "text": "public function getListItems()\n {\n return $this->listItems;\n }", "title": "" }, { "docid": "fcf9d6fb92f8ed2578849313a9564e73", "score": "0.5186229", "text": "public function getItemDetailsList();", "title": "" }, { "docid": "f491f44f32411c8f6c4863e436e21f2c", "score": "0.5184348", "text": "function listItems(){\r\n\tglobal $mysqli;\r\n\tif(!$stmt = $mysqli->prepare(\"SELECT pk, item FROM diaryItems\")){\r\n\t\t$ret = array('status'=>'FAIL','msg'=>'failed to prepare query when getting list of items');\r\n\t\tretJson($ret);\r\n\t}\r\n\tif(!$stmt->execute()){\r\n\t\t$ret = array('status'=>'FAIL','msg'=>'failed to execute query when getting list of items');\r\n\t\tretJson($ret);\r\n\t}\r\n\r\n $res = array();\r\n $place = array();\r\n $pk = -1;\r\n $item = \"\";\r\n $stmt->bind_result($pk, $item);\r\n $res['status']='OK';\r\n $res['msg']='';\r\n\twhile($stmt->fetch()){\r\n\t\t$place[] = array('pk'=>$pk,'item'=>$item);\r\n }\r\n $res['items']=$place;\r\n\tretJson($res);\r\n}", "title": "" }, { "docid": "d5507cd08eda3f91a975eacb78c1e123", "score": "0.5178572", "text": "public function testCollectsList()\n {\n $client = static::getInsalesApiClient();\n $client->collectsList();\n }", "title": "" }, { "docid": "adf64347d9a23f4c9d4ea1334cc8b52d", "score": "0.5174062", "text": "public function listAllPHPItems( array $directoryInfo, array $itemsList ) {\r\n\r\n$IPBHTML .= <<<EOF\r\n<script type='text/javascript' src='{$this->settings['js_app_url']}addItem.js'></script>\r\n<div class='section_title'>\r\n\t<h2>{$this->lang->words['add_item_list_title']}</h2>\r\n</div>\r\n<div id='addItem'>\r\n\t<form method='post' action='{$this->settings['base_url']}module=items&amp;section=add&amp;do=add'>\r\n\t\t<input type='hidden' name='_admin_auth_key' value='{$this->registry->adminFunctions->getSecurityKey()}' />\r\n\t\t<div class='acp-box'>\r\n\t\t\t<h3>{$this->lang->words['add_item_list_table']}</h3>\r\n\t\t\t<ul class='acp-form alternate_rows'>\r\n\t\t\t\t<li><label class='head'>{$this->lang->words['choose_which_item']}</label></li>\r\n\r\nEOF;\r\nforeach($directoryInfo as $directory => $info)\r\n{\r\n\t$dropdown = ipsRegistry::getClass('output')->formDropdown('directory['.$directory.']', $itemsList[$directory], -1);\r\n\t$IPBHTML .= <<<EOF\r\n\t\t\t\t<li>\r\n\t\t\t\t\t<label>\r\n\t\t\t\t\t\t{$info['title']}\r\n\r\nEOF;\r\n\tif($info['description'])\r\n\t{\r\n\t\t$IPBHTML .= <<<EOF\r\n\t\t\t\t\t\t<span class=\"desctext\">{$info['description']}</span>\r\n\r\nEOF;\r\n\t}\r\n\t$IPBHTML .= <<<EOF\r\n\t\t\t\t\t</label>\r\n\t\t\t\t\t{$dropdown}\r\n\t\t\t\t\t<script type='text/javascript'>\r\n\t\t\t\t\t\tibMarketItemsList.register('directory[{$directory}]');\r\n\t\t\t\t\t</script>\r\n\t\t\t\t</li>\r\n\r\nEOF;\r\n}\r\n$IPBHTML .= <<<EOF\r\n\t\t\t</ul>\r\n\t\t\t<div class='acp-actionbar'>\r\n\t\t\t\t<div class='centeraction'>\r\n\t\t\t\t\t<input type='submit' value='{$this->lang->words['add_item_list_button']}' class='button primary'>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</form>\r\n</div>\r\n\r\nEOF;\r\n\r\nreturn $IPBHTML;\r\n}", "title": "" } ]
0eb9813d4a61366dda09c3844f78aaa7
Sets value based on offset.
[ { "docid": "5fa2dba714fc6f6f69ac4b774d64d076", "score": "0.0", "text": "public function offsetSet($offset, $value)\r\n {\r\n if (is_null($offset)) {\r\n $this->container[] = $value;\r\n } else {\r\n $this->container[$offset] = $value;\r\n }\r\n }", "title": "" } ]
[ { "docid": "82b5967479762f1678517a8dea0e5302", "score": "0.83198756", "text": "function __set($offset, $value)\n\t{\n\t\t$this->data[$offset] = $value ;\n\t}", "title": "" }, { "docid": "95b2f59e0d196c815aceca7293f97d70", "score": "0.82879174", "text": "function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.8170811", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "738816da94a97f694e941e6c4700cd84", "score": "0.81601685", "text": "private function offsetSet ($offset, $value) {}", "title": "" }, { "docid": "ee7ed2e83c86f9b1f44fa4e61b11ed7a", "score": "0.8128529", "text": "public function offsetSet($offset, $value) {\n\t\t$this->data[$offset] = $value;\n\n\t}", "title": "" }, { "docid": "c1aba0b3510aad7615e6b4ecb290f884", "score": "0.81274885", "text": "public function offsetSet($offset, $value) {\n\t\t$this->_data[$offset] = $value;\n\t}", "title": "" }, { "docid": "635675bd0cdf339bc1d48b9ec58e1b4d", "score": "0.8074024", "text": "public function offsetSet($offset, $value);", "title": "" }, { "docid": "d69e14ebd65f3dfc1c1b6d5cda317e0f", "score": "0.8065048", "text": "public function offsetSet($offset, $value) {\n\t\t\t$this->setValue($offset, $value);\n\t\t}", "title": "" }, { "docid": "4ee478d66000e13e666ee66bb1db60e0", "score": "0.8059954", "text": "public function offsetSet ( $offset , $value )\r\n {\r\n $this->data[$offset] = $value;\r\n }", "title": "" }, { "docid": "011a93e9e67fbcf3cdd54e5862f0eb7d", "score": "0.8049104", "text": "public function offsetSet($offset, $value) {}", "title": "" }, { "docid": "c5ec92f35926019fb767de5d610707b8", "score": "0.8044643", "text": "public function offsetSet($offset,$value) {\n $this->aData[$offset] = $value;\n }", "title": "" }, { "docid": "385d9281e1b751dbb6f056c481f2ab2c", "score": "0.80387694", "text": "public final function offsetSet($offset, $value) {\n\t\t$this->set($offset, $value);\n }", "title": "" }, { "docid": "44a31378c70ba8cc93c2d5bb29759ea9", "score": "0.8035222", "text": "public function offsetSet($offset, $value)\n\t{\n\t\t$this->_data[$offset] = $value;\n\t}", "title": "" }, { "docid": "d5c189ae45a3668313c845eba4a1cc7e", "score": "0.80345494", "text": "public function offsetSet($offset, $value) { }", "title": "" }, { "docid": "020f847f8ecb19a3730fb986f08e8ed0", "score": "0.8030391", "text": "public function offsetSet($offset, $value)\n {\n $this->{$offset} = $value;\n }", "title": "" }, { "docid": "71282d119bcbdcd384e2560d026c8a9a", "score": "0.8012937", "text": "public function offsetSet($offset, $value)\n\t{\n\t\t$this->{$offset} = $value;\n\t}", "title": "" }, { "docid": "769f41c321c0060448f21afd0786b117", "score": "0.80100423", "text": "#[\\ReturnTypeWillChange]\n public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "14cd498ad16fbe06a670c48b14666f4c", "score": "0.79962486", "text": "public function offsetSet($offset, $value)\n {\n $this->data[$offset] = $value;\n }", "title": "" }, { "docid": "14cd498ad16fbe06a670c48b14666f4c", "score": "0.79962486", "text": "public function offsetSet($offset, $value)\n {\n $this->data[$offset] = $value;\n }", "title": "" }, { "docid": "14cd498ad16fbe06a670c48b14666f4c", "score": "0.79962486", "text": "public function offsetSet($offset, $value)\n {\n $this->data[$offset] = $value;\n }", "title": "" }, { "docid": "83c0ceefa375bfd546f3d06d509cc0f6", "score": "0.7992963", "text": "public function offsetSet($offset, $value) {\n\t\t$this->__set($offset, $value);\n\t}", "title": "" }, { "docid": "83c0ceefa375bfd546f3d06d509cc0f6", "score": "0.7992963", "text": "public function offsetSet($offset, $value) {\n\t\t$this->__set($offset, $value);\n\t}", "title": "" }, { "docid": "3b34290014e72afb0ad84a51fc1bd67c", "score": "0.7957538", "text": "final public function offsetSet( $offset, $value )\n {\n $this->set( $offset, $value );\n }", "title": "" }, { "docid": "bcf6f4d7d65c9ae8bf4f4fdaef259e37", "score": "0.7954145", "text": "public function offsetSet($offset, $value)\n {\n $this->addValue($offset, $value);\n }", "title": "" }, { "docid": "66b34ddee74863447ec607296901f71e", "score": "0.79359454", "text": "public function offsetSet($offset, $value)\n {\n $this->setAttribute($offset, $value);\n }", "title": "" }, { "docid": "1f4387eeb5d131bf2cafbad5d64d409f", "score": "0.7935103", "text": "public function offsetSet($offset, $value)\n {\n }", "title": "" }, { "docid": "1f4387eeb5d131bf2cafbad5d64d409f", "score": "0.7935103", "text": "public function offsetSet($offset, $value)\n {\n }", "title": "" }, { "docid": "1f4387eeb5d131bf2cafbad5d64d409f", "score": "0.7935103", "text": "public function offsetSet($offset, $value)\n {\n }", "title": "" }, { "docid": "1f4387eeb5d131bf2cafbad5d64d409f", "score": "0.7935103", "text": "public function offsetSet($offset, $value)\n {\n }", "title": "" }, { "docid": "1f4387eeb5d131bf2cafbad5d64d409f", "score": "0.7935103", "text": "public function offsetSet($offset, $value)\n {\n }", "title": "" }, { "docid": "1f4387eeb5d131bf2cafbad5d64d409f", "score": "0.7935103", "text": "public function offsetSet($offset, $value)\n {\n }", "title": "" }, { "docid": "de15b1030847c868571549581398e423", "score": "0.79083335", "text": "public function offsetSet($offset, $value)\n {\n $this->setAttribute($offset, $value);\n }", "title": "" }, { "docid": "de15b1030847c868571549581398e423", "score": "0.79083335", "text": "public function offsetSet($offset, $value)\n {\n $this->setAttribute($offset, $value);\n }", "title": "" }, { "docid": "de15b1030847c868571549581398e423", "score": "0.79083335", "text": "public function offsetSet($offset, $value)\n {\n $this->setAttribute($offset, $value);\n }", "title": "" }, { "docid": "33c17bea092aaf76e92b1353ff1badef", "score": "0.7904537", "text": "public function offsetSet($offset, $value) {\n\t\t// TODO: Implement offsetSet() method.\n\t}", "title": "" }, { "docid": "47ed5ae5cd765e3e1322967d8ae4175b", "score": "0.7890838", "text": "public function offsetSet( $offset, $value )\n\t{\n\t\t$this->setAttribute($offset,$value);\n\t}", "title": "" }, { "docid": "6e5e148cf014d4e4398583b7e5f979ab", "score": "0.7883336", "text": "public function offsetSet($offset, $value) {\n\t\tif (is_null($offset)) {\n\t\t\t$this->data[] = $value;\n\t\t} else {\n\t\t\t$this->data[$offset] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "6838915c134137bc388c562425cfe80a", "score": "0.788148", "text": "public function offsetSet($offset, $value) {\n if (is_null($offset)) {\n $this->data[] = $value;\n } else {\n $this->data[$offset] = $value;\n }\n }", "title": "" }, { "docid": "e8fbc035cbc2050ca8119b6a773c0a83", "score": "0.7848305", "text": "public function offsetSet($offset, $value)\n\t{\n\t\tif (is_null($offset)) {\n\t\t\t$this->_data[] = $value;\n\t\t} else {\n\t\t\t$this->_data[$offset] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "3dade8db503db70599b016ebb17ce61c", "score": "0.7844263", "text": "public function offsetSet($offset, $value)\n {\n $this->replace($offset, $value);\n }", "title": "" }, { "docid": "06f546ac35e67e7c9d74be8f2af10a40", "score": "0.78436774", "text": "public function offsetSet($offset, $value): void\n\t{\n\t\t$this->setAttribute($offset, $value);\n\t}", "title": "" }, { "docid": "1d84ef82506eb2f3de2cdfcc3a18ae9a", "score": "0.7840624", "text": "public function offsetSet($offset, $value)\r\n {\r\n $this->set($offset, $value);\r\n }", "title": "" }, { "docid": "1b40fa5f28cb79828a9d4d168e2742b9", "score": "0.78388494", "text": "public function offsetSet($offset, $value)\n {\n $this->__set($offset, $value);\n }", "title": "" }, { "docid": "1b40fa5f28cb79828a9d4d168e2742b9", "score": "0.78388494", "text": "public function offsetSet($offset, $value)\n {\n $this->__set($offset, $value);\n }", "title": "" }, { "docid": "626b7cc6ebcb1ad9c3ef2b464ca37697", "score": "0.78351957", "text": "public function offsetSet ($offset, $value)\n {\n $this->set($offset, $value);\n }", "title": "" }, { "docid": "859f36a4ae837e847cc11e27f8ed92b9", "score": "0.78302985", "text": "public function offsetSet($offset, $value)\n {\n // TODO: Implement offsetSet() method.\n }", "title": "" }, { "docid": "4bca724e96f922bee87cf2d81839b520", "score": "0.78285754", "text": "public function offsetSet(mixed $offset, mixed $value): void\n {\n if ($offset === null) {\n $this->data[] = $value;\n } else {\n $this->data[$offset] = $value;\n }\n }", "title": "" }, { "docid": "624e719215aeff7dfa94f06894f61ae5", "score": "0.7813532", "text": "public function offsetSet($offset, $value)\n {\n $this->set($offset, $value);\n }", "title": "" }, { "docid": "624e719215aeff7dfa94f06894f61ae5", "score": "0.7813532", "text": "public function offsetSet($offset, $value)\n {\n $this->set($offset, $value);\n }", "title": "" }, { "docid": "20253435b0c1b65abb985c107fb5f971", "score": "0.77771765", "text": "public function offsetSet($offset, $value)\n {\n $this->attributes[$offset] = $value;\n }", "title": "" }, { "docid": "5611c5e0d76aea53d66906de201bce93", "score": "0.7742656", "text": "public function offsetSet($offset, $value)\n {\n $this->setParameter($offset, $value);\n }", "title": "" }, { "docid": "64ca779cb817f882647188e819af5a8e", "score": "0.7724315", "text": "#[\\ReturnTypeWillChange]\n\tpublic function offsetSet ($offset, $value) {\n\t\tif ($offset === NULL) {\n\t\t\t$this->currentData[] = $value;\n\t\t} else {\n\t\t\t$this->currentData[$offset] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "bc28e449f9c0cb928d1b63be87b4dd2c", "score": "0.77175635", "text": "public function offsetSet( $offset, $value )\n {\n if (! in_array( $offset, $this->_readOnlyFields ) ) {\n $this->_fields[$offset] = $value;\n }\n }", "title": "" }, { "docid": "a97598382c8d3f1968d4c5be8a4f1b47", "score": "0.7712642", "text": "public function offsetSet($offset, $value): void\n {\n $this->__set($offset, $value);\n }", "title": "" }, { "docid": "6d04f2dcc00575424a01bb61c5fa5567", "score": "0.770892", "text": "public function offsetSet($offset, $value)\n {\n $this->append($value);\n }", "title": "" }, { "docid": "6598b3f2077f51d9ba9522bcd8f9c644", "score": "0.76732635", "text": "public function offsetSet($offset, $value)\n {\n $this->getIterator()[$offset] = $value;\n }", "title": "" }, { "docid": "fda6617db883288e1039dff24aef2457", "score": "0.76718897", "text": "public function offsetSet($offset, $value)\n {\n $this->_accounts[$this->_strip($offset)] = $value;\n $this->_save();\n }", "title": "" }, { "docid": "24094de1c4e976d92b82b9cb784d4d2e", "score": "0.766685", "text": "public function offsetSet($offset, $value)\n {\n $this->capsule[$offset] = $value;\n }", "title": "" }, { "docid": "a0824bca51e320097ceea644b280ffb2", "score": "0.7642721", "text": "public function set($offset, $value)\n {\n // Don't insert elements that are not of type class.\n if (null !== $this->class && ! ($value instanceof $this->class)) {\n return;\n }\n\n $this->offsetSet($offset, $value);\n }", "title": "" }, { "docid": "7d0e817a94f4ddc0235e49b157bdec08", "score": "0.76399064", "text": "public function offsetSet($offset, $value)\n {\n $this->items[$offset] = $value;\n }", "title": "" }, { "docid": "6e359578f5e1aab65e613416adb1f7d1", "score": "0.76276463", "text": "public function offsetSet($offset, $value) {\n if (is_null($offset)) {\n $this->mMarks[] = $value;\n } else {\n $this->mMarks[$offset] = $value;\n }\n }", "title": "" }, { "docid": "37296f54d0013874b0862cd529d975ec", "score": "0.7625536", "text": "public function offsetSet($offset, $value)\n {\n if (!isset($offset)) {\n $this->add($value);\n }\n\n $this->set($offset, $value);\n }", "title": "" }, { "docid": "3deabb61784bd3d8b1b70d53059e9480", "score": "0.7615292", "text": "public function offsetSet($offset, $value)\n {\n if (isset($this->data[$offset])) {\n $this->data[$offset] = $value;\n }\n else {\n $this->data[] = $value;\n }\n }", "title": "" }, { "docid": "0bc95b186cefe4f851eba26ce1b59911", "score": "0.76144594", "text": "public function setOffset(int $offset);", "title": "" }, { "docid": "9b062c0b69523c174f66351322cce000", "score": "0.7601256", "text": "public function offsetSet($offset, $value)\n {\n $this->user[$offset] = $value;\n }", "title": "" }, { "docid": "7f7abbb497d72cf675745105914a524c", "score": "0.7586323", "text": "public function offsetSet($offset, $value)\n {\n $offset = strtolower($offset);\n $this->log('offsetSet(' . $offset . ', ' . $value . ')');\n $this->a[$offset] = $value;\n }", "title": "" }, { "docid": "8ca1d6641e1c3af598c1a1dfce9fe737", "score": "0.7583861", "text": "public function offsetSet(\n $offset,\n $value\n ) {\n\n if( $this->m_fields === null ) {\n $this->m_fields = $this->m_source->fetch_fields();\n }\n\n //ZIH - check type before casting to string\n\n $this->$offset = strval( $value );\n }", "title": "" }, { "docid": "35080069099a0b079fd0a18e52e25b39", "score": "0.7579713", "text": "public function offsetSet($offset, $value): void\n {\n $this->items[$offset] = $value;\n }", "title": "" }, { "docid": "64f14e8e6db0421b29ffd9f0c439702b", "score": "0.75743943", "text": "public function offsetSet($offset, $offsetValue)\n {\n $this->{$offset} = $offsetValue;\n }", "title": "" }, { "docid": "0d0f0b80445e5cf5793a9c9d500af7f2", "score": "0.75696874", "text": "public function offsetSet($offset, $value)\n {\n if (!$this->isReadOnly()) {\n if (is_array($value) || $value instanceof \\Traversable) {\n $value = new self($value);\n }\n $this->data[$offset] = $value;\n $this->count = count($this->data);\n }\n }", "title": "" }, { "docid": "831c1396823322e41a3d1b952a36e7ab", "score": "0.7561588", "text": "public function offsetSet($offset, $value) : void\n {\n $this->splFixedArray->offsetSet($offset, $value);\n }", "title": "" }, { "docid": "db06905328ac0aa7931a359dced4155c", "score": "0.7546729", "text": "public function setOffset($offset);", "title": "" }, { "docid": "8d44e951b7771b679c995ecd72b1815b", "score": "0.7539952", "text": "public function offsetSet($offset, $value)\n {\n $this->getIterator()->offsetSet($offset, $value);\n }", "title": "" }, { "docid": "9cf0da6731e777c3bb5afbadff6b0d80", "score": "0.7522686", "text": "public function offsetSet($offset, $value)\n {\n $this->params[$offset] = $value;\n }", "title": "" }, { "docid": "2a2610595d00be1f7faf9f13cec51b43", "score": "0.7507707", "text": "public function offsetSet(mixed $offset, mixed $value): void\n {\n if (is_null($offset)) {\n $this->container[] = $value;\n } else {\n $this->container[$offset] = $value;\n }\n }", "title": "" }, { "docid": "2a2610595d00be1f7faf9f13cec51b43", "score": "0.7507707", "text": "public function offsetSet(mixed $offset, mixed $value): void\n {\n if (is_null($offset)) {\n $this->container[] = $value;\n } else {\n $this->container[$offset] = $value;\n }\n }", "title": "" }, { "docid": "7c4ee834ca7b4f72b61cfd4342860b35", "score": "0.749966", "text": "public function offsetSet($offset, $value) : void\n {\n if (null === $offset) {\n $this->container[] = $value;\n } else {\n $this->container[$offset] = $value;\n }\n }", "title": "" }, { "docid": "7c4ee834ca7b4f72b61cfd4342860b35", "score": "0.749966", "text": "public function offsetSet($offset, $value) : void\n {\n if (null === $offset) {\n $this->container[] = $value;\n } else {\n $this->container[$offset] = $value;\n }\n }", "title": "" }, { "docid": "7c4ee834ca7b4f72b61cfd4342860b35", "score": "0.749966", "text": "public function offsetSet($offset, $value) : void\n {\n if (null === $offset) {\n $this->container[] = $value;\n } else {\n $this->container[$offset] = $value;\n }\n }", "title": "" }, { "docid": "7c4ee834ca7b4f72b61cfd4342860b35", "score": "0.749966", "text": "public function offsetSet($offset, $value) : void\n {\n if (null === $offset) {\n $this->container[] = $value;\n } else {\n $this->container[$offset] = $value;\n }\n }", "title": "" }, { "docid": "7c4ee834ca7b4f72b61cfd4342860b35", "score": "0.749966", "text": "public function offsetSet($offset, $value) : void\n {\n if (null === $offset) {\n $this->container[] = $value;\n } else {\n $this->container[$offset] = $value;\n }\n }", "title": "" }, { "docid": "7c4ee834ca7b4f72b61cfd4342860b35", "score": "0.749966", "text": "public function offsetSet($offset, $value) : void\n {\n if (null === $offset) {\n $this->container[] = $value;\n } else {\n $this->container[$offset] = $value;\n }\n }", "title": "" } ]
4c10b34b50642209fe3ea07770f11035
Common method to get binded values
[ { "docid": "3c0fb3678215d87eb89ad157af2737cf", "score": "0.5740512", "text": "function getbindValues($table, $data)\n{\n global $db_lnk;\n $qry_val_arr = array(\n $table\n );\n $result = pg_query_params($db_lnk, 'SELECT * FROM information_schema.columns WHERE table_name = $1 ', $qry_val_arr);\n $bindValues = array();\n while ($field_details = pg_fetch_assoc($result)) {\n $field = $field_details['column_name'];\n $val_arr = array(\n 'created',\n 'modified'\n );\n if (in_array($field, $val_arr)) {\n continue;\n }\n //todo : get list_id from lists table\n if ($field == 'id' && $table == 'lists' && array_key_exists('list_id', $data)) {\n $bindValues['id'] = $data['list_id'];\n }\n if ($field == 'ip_id') {\n $data['ip'] = !empty($data['ip']) ? $data['ip'] : '';\n $ip_id = saveIp();\n $bindValues[$field] = $ip_id;\n } elseif (array_key_exists($field, $data)) {\n if ($field == 'is_active' || $field == 'is_allow_email_alias') {\n $boolean = !empty($data[$field]) ? 'true' : 'false';\n $bindValues[$field] = $boolean;\n } else if ($field == 'due_date' && $data[$field] == null) {\n $bindValues[$field] = null;\n } else {\n $bindValues[$field] = $data[$field];\n }\n }\n }\n return $bindValues;\n}", "title": "" } ]
[ { "docid": "3ee3659e86a5814e7cb6898ed7851453", "score": "0.7821961", "text": "public function getBindValues();", "title": "" }, { "docid": "1c3629f535f058c291e273ee2370ab7b", "score": "0.6692077", "text": "public function getValueBinder(): ValueBinder;", "title": "" }, { "docid": "05ef5f3e0d8e3b5279b090bf7318c148", "score": "0.6488744", "text": "public function bindValues()\n {\n $ret = [];\n\n if ($this->data)\n {\n $ret = \\array_values($this->data);\n }\n\n if ($this->getWhereValues())\n {\n $ret = \\array_merge($ret, $this->getWhereValues());\n }\n\n return Utils::arrayFlatten($ret);\n }", "title": "" }, { "docid": "dadcf5f28ff1b48de28ee67cb0c3199e", "score": "0.6361467", "text": "protected function getBParamDataAttributes() {}", "title": "" }, { "docid": "d9594ea8265a1d472de0d79704eb3aaa", "score": "0.6350474", "text": "public function getBind();", "title": "" }, { "docid": "2d6bc323452ebf84080551e230ade79a", "score": "0.6317869", "text": "public function getBindings();", "title": "" }, { "docid": "e6e6f26915ffa4ef50e7141d3b8cd4a6", "score": "0.63017046", "text": "public function getBoundVariables() {}", "title": "" }, { "docid": "1dc3cc9c1b91637a853dd3cda062c867", "score": "0.6113188", "text": "public function getBindings(): array;", "title": "" }, { "docid": "58f4c80f720bf10612c88c2d2bd6d6a2", "score": "0.6084245", "text": "public function get_values(){ return $this->values; }", "title": "" }, { "docid": "3d03fbaeaf6fffc1ceeb47436672bf96", "score": "0.59955657", "text": "protected function getValuesForDatabase() : array {\n\t\t$values = array();\n\t\tforeach ($this->propertyMap as $propertyName => $dbBinding) {\n\t\t\t$value = $this->{$propertyName};\n\t\t\t$value = $this->onBeforeSave($value, $propertyName);\n\n\t\t\t$values[$dbBinding] = $value;\n\t\t}\n\n\t\treturn $values;\n\t}", "title": "" }, { "docid": "59a03439a2150bf8a88b8344956cdfa1", "score": "0.5953329", "text": "public function processBind()\n {\n $bind = [];\n\n foreach ($this->fields as $field)\n {\n\n if($field == $this->tablePK)\n {\n $bind[\":id\"] = $this->data[$field];\n }\n else\n {\n $bind[\":$field\"] = $this->data[$field];\n }\n }\n $this->bind = $bind;\n }", "title": "" }, { "docid": "e9ba13a875a0318eea4c420f1ba7d80e", "score": "0.59304535", "text": "public function get_binds_values()\r\n {\r\n return array_values_recursive_with_keys($this->binds);\r\n }", "title": "" }, { "docid": "32177da2d3e3b966a3cc7f54291004d2", "score": "0.5921224", "text": "public function getBinds(): array;", "title": "" }, { "docid": "b56ff7f50743e1dbab4fb653041f8264", "score": "0.58866984", "text": "protected function buildBindings(): void\n {\n $this->bindings = $this->fieldValueSet->getBoundValues();\n }", "title": "" }, { "docid": "dde3ae86eb8a237381413ff1f511ab71", "score": "0.58784205", "text": "function get_value() {return $this->get();}", "title": "" }, { "docid": "426d195e34deb682f971cfa50c75bcfe", "score": "0.5853439", "text": "protected function getValueAttribute() {}", "title": "" }, { "docid": "8b090d3316568d5b616fcaa399352e10", "score": "0.57908934", "text": "private function getBoundValue($bind, string $name)\n {\n if ($bind === false) {\n return null;\n }\n\n $bind = $bind ?: $this->getBoundTarget();\n\n if ($this->manyRelation) {\n return $this->getAttachedKeysFromRelation($bind, $name);\n }\n\n $boundValue = data_get($bind, $name);\n\n if ($bind instanceof Model && $boundValue instanceof DateTimeInterface) {\n return $this->formatDateTime($bind, $name, $boundValue);\n }\n\n return $boundValue;\n }", "title": "" }, { "docid": "e6f043bff21fb720b1e985e653542016", "score": "0.5764487", "text": "private function getBoundTarget()\n {\n return $this->getFormDataBinder()->get();\n }", "title": "" }, { "docid": "982d706703f7537bd99ab3678b76c2a4", "score": "0.57601726", "text": "public function bound () :array\n {\n return [\n\n ];\n }", "title": "" }, { "docid": "922eb96af8467c9fdb10974f07f2c140", "score": "0.57174945", "text": "public function getValues() {}", "title": "" }, { "docid": "922eb96af8467c9fdb10974f07f2c140", "score": "0.57174945", "text": "public function getValues() {}", "title": "" }, { "docid": "ccef4c07057e3ac4ce44f7ceddcf0a81", "score": "0.5717437", "text": "private function bindValues() {\n\t\tforeach ($this->builder->bindings as $key => $value) {\n\t\t\t$this->statement->bindValue(\n\t\t\t\t(is_string($key) ? $key : $key + 1),\n\t\t\t\t$value,\n\t\t\t\t(is_int($value) || is_float($value) ? PDO::PARAM_INT : PDO::PARAM_STR)\n\t\t\t);\n\t\t}\n\n\t\t// Reset Builder - ready for next statement\n\t\t$this->builder->bindings = [];\n\t\t$this->builder->wheres = [];\n\t}", "title": "" }, { "docid": "d84d445384e52ac4fc7c2ddf62055cab", "score": "0.57009083", "text": "function getParamaters() {\n\t\treturn $this->preparedvalues;\n\t}", "title": "" }, { "docid": "2f21f7b00c1ab7fbafc6c10000e181f8", "score": "0.56625026", "text": "function getDataValues(){\n\t\t$this->getData();\n\t\treturn $this->_dataValues;\n\t}", "title": "" }, { "docid": "5dd3cf904a4a7883e379b8219d7ee3e8", "score": "0.5638534", "text": "public function getBindVars(): array\n {\n return $this->container->getAll();\n }", "title": "" }, { "docid": "dcdc25965de8ebf665b4eae6ae370ff3", "score": "0.561644", "text": "public function get_bound_variables() {\n $bound_variables = [];\n //odbc doesn't support named parameters, only numerically indexed ones\n //We go through the query string, find the named parameters\n $query_bound_variables = $this->query_bound_variables;\n#\t\t\tFB::log($query_bound_variables, 'named_parameters');\n foreach ($query_bound_variables as $index => $parameter) {\n $_bv = isset($this->bound_variables[$parameter]) ? $this->bound_variables[$parameter] : false;\n if (!$_bv) {\n $parameter_name = (string)$parameter;\n throw new PDOException(\"SQLSTATE[HY093]: Invalid parameter number: parameter {$parameter_name} was not defined\", (int)'HY093');\n }\n \n $data_type = $_bv[1];\n $_bv_value = $_bv[0];\n switch ($data_type) {\n case PDO::PARAM_BOOL:\n $value = !isset($_bv_value) ? null : (bool)$_bv_value ? 1 : 0;\n break;\n case PDO::PARAM_NULL:\n $value = null;\n break;\n case PDO::PARAM_INT:\n $value = (int)$_bv_value;\n break;\n case PDO::PARAM_STR:\n #todo todo todo todo todo todo todo: This probably is not adequate enough to prevent SQL injection\n $_bv_value = ODBC::ms_escape_string($_bv_value);\n $value = \"'{$_bv_value}'\";\n break;\n case PDO::PARAM_LOB:\n case PDO::PARAM_STMT:\n case PDO::PARAM_INPUT_OUTPUT:\n default:\n //Not sure what the default value should be\n $value = null;\n break;\n }\n \n $bound_variables[] = $value;\n }\n return $bound_variables;\n }", "title": "" }, { "docid": "1b550183f9184b146abd9720e26037e3", "score": "0.5594088", "text": "public function bindings();", "title": "" }, { "docid": "26a9a4073921be12c7ec83f6e5c7764c", "score": "0.55939054", "text": "public function getValues();", "title": "" }, { "docid": "aa51c3e82c914bebe1bbbb9be32b00fb", "score": "0.5554512", "text": "public static function get_values()\n {\n }", "title": "" }, { "docid": "aa51c3e82c914bebe1bbbb9be32b00fb", "score": "0.5554512", "text": "public static function get_values()\n {\n }", "title": "" }, { "docid": "aa51c3e82c914bebe1bbbb9be32b00fb", "score": "0.5554512", "text": "public static function get_values()\n {\n }", "title": "" }, { "docid": "d8cd78ace588b2a9575c7e888d9aecee", "score": "0.5540919", "text": "public function getBind() {\n return $this->aBind;\n }", "title": "" }, { "docid": "1ad5698f2f09a13a95e5f9c2ba6e16ae", "score": "0.55342305", "text": "public function getBindings(): array\n {\n return $this->bindings;\n }", "title": "" }, { "docid": "3bb6b9130ffea5aa76e804c3cbb4d685", "score": "0.5527581", "text": "private function getBindingsCollection(): ?Collection\n\t{\n\t\treturn $this->entityObject->get($this->fieldNameMap->getBindings());\n\t}", "title": "" }, { "docid": "46ac13e13a1c6238340efc069dd8ef12", "score": "0.5525395", "text": "abstract protected function getValue();", "title": "" }, { "docid": "ed60cadec51b1cf64cf965b317f292d1", "score": "0.5523319", "text": "protected function get_bindings(): array {\n\t\treturn [];\n\t}", "title": "" }, { "docid": "2f4f40c5362505ffeabf33423ef025a7", "score": "0.55133355", "text": "public function get_value()\n {\n }", "title": "" }, { "docid": "2f4f40c5362505ffeabf33423ef025a7", "score": "0.55133355", "text": "public function get_value()\n {\n }", "title": "" }, { "docid": "efc781d544f2ded0f3bfef0c7d3afee4", "score": "0.54967177", "text": "public function getData()\n\t{\n\t\treturn $this->value ? $this->value : $this->input;\n\t}", "title": "" }, { "docid": "4a9a8575b6e2db412fb332ee0325b486", "score": "0.5490371", "text": "function get_value_db()\n\t{\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "6f89d1add157db5e1672c7c1bc4d8f5e", "score": "0.54893076", "text": "public function &getValue();", "title": "" }, { "docid": "b9523e5c8b5d49f79e84c29d03386b45", "score": "0.5488142", "text": "function get_value_list()\n\t{\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "f2da1cd0ff022e0aeca4946f1eb38777", "score": "0.54873276", "text": "public function getBindings()\n {\n $bindings = [];\n\n // We will run through all the bindings and pluck out\n // the component (select, where, etc.)\n foreach ($this->bindings as $component => $binding) {\n if (!empty($binding)) {\n // For every binding there could be multiple\n // values set so we need to add all of them as\n // flat $key => $value item in our $bindings.\n foreach ($binding as $key => $value) {\n $bindings[$key] = $value;\n }\n }\n }\n\n return $bindings;\n }", "title": "" }, { "docid": "a2645e5473cce3a557f51bc3c7186dc8", "score": "0.54832476", "text": "public abstract function getSoapAvailableValues();", "title": "" }, { "docid": "8fe9e5e399d50e1e5d76d1702f7f9050", "score": "0.54668576", "text": "abstract public function getValue();", "title": "" }, { "docid": "8fe9e5e399d50e1e5d76d1702f7f9050", "score": "0.54668576", "text": "abstract public function getValue();", "title": "" }, { "docid": "9996003569d22be07b3a31152a6856b8", "score": "0.5465285", "text": "public function getBindings()\n {\n return $this->bindings;\n }", "title": "" }, { "docid": "9996003569d22be07b3a31152a6856b8", "score": "0.5465285", "text": "public function getBindings()\n {\n return $this->bindings;\n }", "title": "" }, { "docid": "d179752fc78ae64ac3a5f79b012f3f38", "score": "0.54644907", "text": "public function get_binds(){\n\t\treturn $this->binds;\n\t}", "title": "" }, { "docid": "8fe9e5e399d50e1e5d76d1702f7f9050", "score": "0.54643416", "text": "abstract public function getValue();", "title": "" }, { "docid": "8a97f734e683380ccc22288ea14b5630", "score": "0.5464297", "text": "public function getData()\r\n\t{\r\n\t\tif (is_null($this->data))\r\n\t\t{\r\n\t\t\tthrow new BadMethodCallException('Not bound with data array.');\r\n\t\t}\r\n\t\treturn $this->data;\r\n\t}", "title": "" }, { "docid": "aa0ab8091098e4ffdc1652edc7bbb9e3", "score": "0.5458514", "text": "function getBindVariableName() ;", "title": "" }, { "docid": "db235ecf9f5ef1c0d059d7d261be50d0", "score": "0.5456373", "text": "public function queryData(){\r\n\t\treturn $this->_placeholders;\r\n\t}", "title": "" }, { "docid": "84ac2999bf8da4d2692acf160e6bb527", "score": "0.5449742", "text": "public function getViaTableAttributesValue();", "title": "" }, { "docid": "209bd67b023ecce010d487e718579dbc", "score": "0.5447643", "text": "public function getResult()\n {\n return $this->valueConverter;\n }", "title": "" }, { "docid": "8b467d6310cbe22a9473c25b26b98615", "score": "0.54136586", "text": "function getRawInputValues();", "title": "" }, { "docid": "64dcef44af2dc1c185143e38972a2783", "score": "0.54112846", "text": "public function getBind(string $name): mixed;", "title": "" }, { "docid": "eb0815c2fb393952ed8d20c871415cec", "score": "0.5400078", "text": "public function getBindVariableName() {}", "title": "" }, { "docid": "6438b1accd52e8e1d8b47655c3c5a7e5", "score": "0.53844225", "text": "protected function getPostValues() {}", "title": "" }, { "docid": "34e332fe3d2dba20dbc9e4ab2563a6cc", "score": "0.5369633", "text": "public function getValuesList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "3602ddb22e2573783727c19a21418629", "score": "0.5358075", "text": "abstract public static function getValues(): array;", "title": "" }, { "docid": "55774865d6fef717bc2f84d2ec1658c6", "score": "0.5355894", "text": "function getValues()\n {\n return $this->type->getValues();\n }", "title": "" }, { "docid": "0a09268cf338d2d412ac9308d8173c81", "score": "0.53437245", "text": "private function get_bound_value($field)\n\t{\n\t\tif (!array_key_exists($field, $this->_bindings))\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t$variable = $this->_bindings[$field][0];\n\t\t$key = $this->_bindings[$field][1];\n\t\t\n\t\treturn $this->evaluate_bind($variable, $key);\n\t}", "title": "" }, { "docid": "eefe68cc09acebf21867f236b7f910fa", "score": "0.5331071", "text": "protected function populate_value()\n {\n }", "title": "" }, { "docid": "789ccac8ea724f26014e1cc80d739be8", "score": "0.5327091", "text": "public function __get($_name) {\n\t\tif (array_key_exists($_name,$this->fields))\n\t\t\treturn $this->fields[$_name];\n\t\tif (array_key_exists($_name,$this->virtual))\n\t\t\treturn $this->virtual[$_name]['value'];\n\t\tF3::$global['CONTEXT']=$_name;\n\t\ttrigger_error(self::TEXT_AxonNotMapped);\n\t}", "title": "" }, { "docid": "5b2ecd2985f485226aacd6e335d57929", "score": "0.53233236", "text": "public function values();", "title": "" }, { "docid": "5b2ecd2985f485226aacd6e335d57929", "score": "0.53233236", "text": "public function values();", "title": "" }, { "docid": "5b2ecd2985f485226aacd6e335d57929", "score": "0.53233236", "text": "public function values();", "title": "" }, { "docid": "5b2ecd2985f485226aacd6e335d57929", "score": "0.53233236", "text": "public function values();", "title": "" }, { "docid": "5b2ecd2985f485226aacd6e335d57929", "score": "0.53233236", "text": "public function values();", "title": "" }, { "docid": "b350ed8332c49b6b1b50c628fb20efbe", "score": "0.53191686", "text": "public function bindValues(array $bind_values);", "title": "" }, { "docid": "e4e9871dd2ea7d61b61e18e9151af34e", "score": "0.5305797", "text": "public function getValues()\n {\n return $this->getVal('value', []);\n }", "title": "" }, { "docid": "ee465ecaaf10d27be68083e988c68ea2", "score": "0.5303129", "text": "public function getValues()\n {\n\n\t\t$record = ProductAttributeValues::whereIn('avid',[1,6])->get();\n\t\t$rec = $record->pluck('pro_att_value');\n\t\treturn $rec;\n }", "title": "" }, { "docid": "c8e7423580476d7130aa019279fa2460", "score": "0.5297018", "text": "public function getValue(){ }", "title": "" }, { "docid": "e0c9cc44c6017a243e62e0cf78a5709b", "score": "0.52959985", "text": "public function getValue(){\n return $this->getData();\n }", "title": "" }, { "docid": "ecc48048b49ffd22113fa5d0bb1ed44a", "score": "0.52881193", "text": "protected function getVars()\n {\n return array_merge(parent::getVars(),get_object_vars($this));\n }", "title": "" }, { "docid": "ca308723f80c7d30a32831bed0ef4e5a", "score": "0.52877015", "text": "public function getBindVariableName();", "title": "" }, { "docid": "60a44c1a27dcdf4fb72c54c09c317006", "score": "0.52781636", "text": "public function getRawValue();", "title": "" }, { "docid": "40084ed401017e5baa40c768111a0a28", "score": "0.5277083", "text": "protected function getBParamDataAttributes()\n {\n list($fieldRef, $rteParams, $rteConfig, , $irreObjectId, $irreCheckUniqueAction, $irreAddAction, $irreInsertAction) = explode('|', $this->bparams);\n\n return [\n 'data-this-script-url' => strpos($this->thisScript, '?') === false ? $this->thisScript . '?' : $this->thisScript . '&',\n 'data-form-field-name' => 'data[' . $fieldRef . '][' . $rteParams . '][' . $rteConfig . ']',\n 'data-field-reference' => $fieldRef,\n 'data-field-reference-slashed' => addslashes($fieldRef),\n 'data-rte-parameters' => $rteParams,\n 'data-rte-configuration' => $rteConfig,\n 'data-irre-object-id' => $irreObjectId,\n 'data-irre-check-unique-action' => $irreCheckUniqueAction,\n 'data-irre-add-action' => $irreAddAction,\n 'data-irre-insert-action' => $irreInsertAction,\n ];\n }", "title": "" }, { "docid": "79a5c958f7dc5cf97cd3f6ab5375bc5d", "score": "0.5275519", "text": "public function get_data() {\n $data = parent::get_data();\n if ($data !== null) {\n }\n return $data;\n }", "title": "" }, { "docid": "36b8bae9eda9e8ad3905899e294de9a8", "score": "0.52659506", "text": "abstract protected function getDirectGetters();", "title": "" }, { "docid": "692b85e19733cc87d3159a528f53bb44", "score": "0.52646124", "text": "function getValuesAttributes(){\n $complete = [];\n \n foreach($this as $attribute => $valor){\n $complete[$attribute] = $valor;\n }\n \n return $complete;\n }", "title": "" }, { "docid": "a07658a0195f21bd5ad2c65e29aad5b0", "score": "0.5261988", "text": "function getAllDataValues() {\n\t\t$conn = Doctrine_Manager::connection(); \n\t\t$resultvalues = $conn->fetchAll(\"SELECT * FROM lookuptypevalue WHERE lookuptypeid = '\".$this->getID().\"' order by lookupvaluedescription asc \");\n\t\treturn $resultvalues;\t\n\t}", "title": "" }, { "docid": "effa818d8b16a0632688672570f1db38", "score": "0.5261231", "text": "public function getInternalValueAttribute()\n {\n $value = $this->data->get($this->localKey);\n if (!$this->is_serialized) {\n return $value;\n }\n \n return (@unserialize($value) ?: []);\n }", "title": "" }, { "docid": "470c85ba594fd56cfb166e778e42595a", "score": "0.52606976", "text": "public function getInputValues();", "title": "" }, { "docid": "23b628bc928e7f8087143145d56291fb", "score": "0.5256812", "text": "public function getArguments()\n {\n if (!isset($this->_arguments)) {\n $this->_arguments = new \\Yana\\Http\\Requests\\ValueWrapper();\n }\n return $this->_arguments;\n }", "title": "" }, { "docid": "671c4e07c15f1c655a889dccdc14c3ab", "score": "0.5251477", "text": "public function getData(){\n $values = array();\n $attributes = $this->defineAttributes();\n if(property_exists($this, 'handle') && property_exists($this, 'type')){\n $matrixAttributes = anu()->matrix->getMatrixByName($this->handle)->defineAttributes()[$this->type];\n $attributes = array_merge($attributes, $matrixAttributes);\n }\n\n foreach ($attributes as $k => $v){\n if(property_exists($this, $k)){\n $values[$k] = $this->$k;\n }\n }\n return $values;\n }", "title": "" }, { "docid": "c9a7896f5e3088dc22d09da79b1983e5", "score": "0.5250925", "text": "public static function getBindings(){\n //Method inherited from \\Illuminate\\Container\\Container \n return \\Illuminate\\Foundation\\Application::getBindings();\n }", "title": "" }, { "docid": "c45a217d07724d43aa5d94f6da4d788b", "score": "0.52467173", "text": "public function getIsBindable();", "title": "" }, { "docid": "c13a5d24d2aa4c3a36c39861efb9488d", "score": "0.524566", "text": "private function getModelsDhcpValueForSubnet(){\n\t\treturn $this->hasMany(DhcpValue::className(), ['subnet' => 'id'])->select('option, value, weight')->asArray()->all();\n\t}", "title": "" }, { "docid": "e43b78deda3364440b2e228e2e2f4b2c", "score": "0.52356696", "text": "function getFieldValues()\n {\n $myvalues = $this->m_oPageHelper->getFieldValues($this->m_protocol_shortname);\n return $myvalues;\n }", "title": "" }, { "docid": "1dd9904e4543ab12f5ce446e267465b3", "score": "0.52315956", "text": "public function getTranslatableEntityObjectValues() {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "f9672b492de4ee920fbd96f092b9d1c4", "score": "0.52283335", "text": "abstract public function get() ;", "title": "" }, { "docid": "1b1de697ccc187061a0e542c908436fa", "score": "0.52279466", "text": "function retrieve_values(){\n if(!empty($this->vardef) && isset($this->bean->{$this->name})){\n $values = array();\n $values = $this->bean->{$this->name}->get(true);\n $bean_name = $this->vardef['bean_name'];\n $new_bean = new $bean_name();\n $fields_values = Array();\n $k = 0;\n if (!empty($values)) {\n foreach ($values as $key=>$value) {\n $new_bean->retrieve($value);\n $field_defs = $new_bean->field_defs;\n foreach ($this->displayParams['collection_field_list'] as $key_field=>$value_field) {\n $this->value_name[$k][$value_field['name']] = $new_bean->{$value_field['name']};\n if($field_defs[$value_field['name']]['type'] == 'relate' && !empty($field_defs[$value_field['name']]['id_name'])){\n $id_name = $field_defs[$value_field['name']]['id_name'];\n $this->relay_id[$value_field['name']][$this->value_name[$k][$value_field['name']]] = $new_bean->$id_name;\n }\n }\n if (!isset($this->value_name[$k]['id'])){\n $this->value_name[$k]['id'] = $value;\n }\n $k++;\n }\n } else {\n foreach ($this->displayParams['collection_field_list'] as $key_field=>$value_field) {\n $this->value_name[0][$value_field['name']] = '';\n }\n if (!isset($this->value_name[0]['id'])){\n $this->value_name[0]['id'] = '';\n }\n }\n }\n }", "title": "" }, { "docid": "9988671424834460f769b2a909ed9db3", "score": "0.5226546", "text": "public function returnDynamicValues () {\n \treturn $this->_email_dynamic;\n }", "title": "" }, { "docid": "4ce6dbd8f656432d3ab503437e247f19", "score": "0.5223072", "text": "private function values($appendPrimaryKey = true) {\r\n\t\t$c = get_called_class();\r\n\r\n\t\t$return = array();\r\n\t\tforeach ($c::getRequirements() as $column => $details) {\r\n\t\t\tif($c::$primaryKey != $column) {\r\n\t\t\t\t$property = substr($column,1,strlen($column)-2);\r\n\t\t\t\tif(in_array($property, array('creationDate','updateDate'))) {\r\n\t\t\t\t\t$return[] = $this->$property->format('Y-m-d H:i:s');\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$return[] = $this->$property;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($appendPrimaryKey) {\r\n\t\t\t$return[] = $this->{substr($c::$primaryKey,1,strlen($c::$primaryKey)-2)}; }\r\n\t\treturn $return;\r\n\t}", "title": "" }, { "docid": "fb50696ee8dc4e29e6acf32b0ae12d8c", "score": "0.52109945", "text": "public function parameterValue() {\n return $this->has_many_and_belongs_to('Searchengine', 'ParameterValue', 'parameterID', 'searchengineID');\n }", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.52061695", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.52061695", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.52061695", "text": "public function getValue();", "title": "" } ]
a5c63541af57ee60f7a115838e6fe7d9
Finds and displays a lieuxAVisiter entity.
[ { "docid": "8611206f168a9d74b6bc2e94974ff7ee", "score": "0.6340943", "text": "public function showAction(LieuxAVisiter $lieuxAVisiter)\n {\n $deleteForm = $this->createDeleteForm($lieuxAVisiter);\n\n return $this->render('lieuxavisiter/ShowAsie.html.twig', array(\n 'lieuxAVisiter' => $lieuxAVisiter,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" } ]
[ { "docid": "ad45ad91a2716aae7909f778f2da153c", "score": "0.61170244", "text": "public function show(incidente $incidente)\n {\n //\n }", "title": "" }, { "docid": "8028d280a4e6932ffea4308163f38e87", "score": "0.6024108", "text": "public function entity_viewer()\n\t{\n\t\t$this->load->view('chartex/entity_viewer');\n\t}", "title": "" }, { "docid": "437bcc8e48f96a30dd472660391aa7b6", "score": "0.6003099", "text": "public function ShowSignalementAction()\n { $em=$this->getDoctrine()->getManager();\n $AvisHost=$em->getRepository(\"HomeEntityBundle:Avishost\")->findSignalementHost();\n return $this->render(\"HomeAvisBundle:Back:AvisSignaler.html.twig\",array(\"AvisHost\"=>$AvisHost));\n }", "title": "" }, { "docid": "9d3a8c66332a07976008414e9e636c36", "score": "0.5963749", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ControlEquipoBundle:Visita')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Visita entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n $foto=0;\n\n $nombre = $entity->getUsuario()->getCedula().'.png';\n\n $nombre=$entity->getUsuario()->getCedula();\n\n if (file_exists('/var/www/uploads/visitas/'.$nombre)):\n $foto=1;\n endif;\n\n // Consultamos sus equipos\n $equipos = $em->getRepository('ControlEquipoBundle:RegistrosExternos')->findBy(array('propietarioId' => $entity->getUsuario()->getId(),\n 'tipo' => 2,'fechaSalida' => NULL));\n $ye = $em->getRepository('ControlEquipoBundle:EquiposExternos')->findBy(array('propietarioId' => $entity->getUsuario()->getId(),\n 'tipoPropietario' => 2));\n\n return $this->render('ControlEquipoBundle:Visita:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n 'foto' => $foto,\n 'equipos' => $equipos,\n 'yourequipos' => $ye\n ));\n }", "title": "" }, { "docid": "24c844be0da4dfb50bf62dcf1e006004", "score": "0.59221226", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $lieuxAVisiters = $em->getRepository('MyAppAdminBundle:LieuxAVisiter')->findAll();\n\n return $this->render('lieuxavisiter/index.html.twig', array(\n 'lieuxAVisiters' => $lieuxAVisiters,\n ));\n }", "title": "" }, { "docid": "0a89ee4894cb2f765653c8bbbc783167", "score": "0.5873743", "text": "public function viewAction(){\n $this->view->hin = \"msk\";\n $id = $this->fcR->getParam('id');\n\n $artiste = $this->em->find('Entity\\Artiste',intval($id));\n\n if(is_null($artiste)) throw new Exception(\"Error Processing Request\", 1);\n \n $this->view->artiste = $artiste;\n }", "title": "" }, { "docid": "88f6d8b6e39a2772036beb752771b13d", "score": "0.5866037", "text": "public function show($id)\n {\n //Visualizzare il Singolo Studente di Dettaglio\n }", "title": "" }, { "docid": "bc86a013c93e47913b527c8bc2214bc7", "score": "0.582764", "text": "public function show(Glucosa $glucosa)\n {\n //\n }", "title": "" }, { "docid": "cc2a80a6b9dddd95e5ed7830292456de", "score": "0.580121", "text": "public function show(Veiculo $veiculo)\n {\n //\n }", "title": "" }, { "docid": "b0f1023c3fc34eca3ee138382ea28466", "score": "0.57815516", "text": "public function show(Venta $venta)\n {\n\n }", "title": "" }, { "docid": "aa15949e0056eac6e11fd601869b0998", "score": "0.577512", "text": "public function avis()\n {\n if ($this->isAdmin()) {\n // On inctancie le modele\n $AvisModel = new AvisModel;\n\n // on va chercher une rubrique\n $avis = $AvisModel->findAll();\n\n // on envoie a la vue\n $this->render('admin/avisList', compact('avis'), 'admin');\n }\n }", "title": "" }, { "docid": "3d1c69c7ddaa2d17e5df9bfedd2a9cf7", "score": "0.5768204", "text": "public function show(Riego $riego)\n {\n //\n }", "title": "" }, { "docid": "21983532ad8598d0729348cffe10cff8", "score": "0.5739236", "text": "public function show(cr $cr)\r\n {\r\n //\r\n }", "title": "" }, { "docid": "165e723018ceb4677192181271fff430", "score": "0.5730029", "text": "public function show(Instituicao $instituicao)\n {\n //\n }", "title": "" }, { "docid": "f584ca958cee8264d608a43dee67d440", "score": "0.5695778", "text": "public function show(Iznajmljena_brodica $iznajmljena_brodica)\n {\n //\n }", "title": "" }, { "docid": "3eb53fd976bc1d6207c6f9d1b76484fb", "score": "0.5689002", "text": "public function show(Forfait $forfait)\n {\n //\n }", "title": "" }, { "docid": "ef482482b5d5450aa3f3c19d8c1c8a62", "score": "0.5687081", "text": "public function show(instruktur $instruktur)\n {\n //\n }", "title": "" }, { "docid": "4843f906c9239b3c453a7e540b6401d1", "score": "0.56712407", "text": "public function show(Intervenir $intervenir)\n {\n //\n }", "title": "" }, { "docid": "5455e68bbc63acfdfaea3bacfea63fed", "score": "0.5654195", "text": "public function show(Expence $expence)\n {\n\n }", "title": "" }, { "docid": "7026a78abc7389c5c8bcc6d9408a1778", "score": "0.56365085", "text": "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BackOfficebackBundle:Demandeextrait')->findBy(array('commentaire'=>\"vvv\"));\n\n return $this->render('BackOfficebackBundle:Demandeextrait:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "8a445d124d827a75366445df03ecf046", "score": "0.56256086", "text": "function present(){\n //\n //Show this entity only if it is not ignored.\n if ($this->visible()){\n //\n //\n //Draw the elipse to represent the entity\n echo \"<g>\"\n . \"<ellipse \" \n .\"cx='$this->cx'\" \n .\"cy='$this->cy'\" \n .\"rx='150'\" \n .\"ry='50'\"\n .\"style='fill:$this->color'\" \n .\"id='$this->name'\"\n .'onclick=\"$page_graph.select(this)\"'\n . 'class=\"draggable\"'\n .\"/>\"\n \n . \" <text \" \n .\"x='$this->cx'\" \n .\"y='$this->cy'\"\n .\"text-anchor='middle'\" \n .\"fill='white'>$this->name\"\n .\"</text>\"\n .\"<g>\"; \n //\n //Draw the ;ines to represent the relations starting from this entity\n foreach($this->columns as $column){\n $column->present_relation();\n } \n }\n \n }", "title": "" }, { "docid": "44ad9ddb876117fca081c1436ac9ff04", "score": "0.56225616", "text": "public function show(Creneau $creneau)\n {\n //\n }", "title": "" }, { "docid": "ce7591030ca47a7eb077f87b597ffa0d", "score": "0.5620421", "text": "public function show(Statistique $statistique)\n {\n //\n }", "title": "" }, { "docid": "737f1cec18aa90ad2612b979f68be771", "score": "0.56197304", "text": "public function show($atte_id)\n {\n //\n }", "title": "" }, { "docid": "a24b6d57c440d52416b6fa1de6fe203f", "score": "0.56120074", "text": "public function show()\n\t{\n\t\t$tus = new Service();\n\n\t\t$activityId = $_GET[\"id_aktivnost\"];\n\t\t$aktivnost = $tus->getActivityById($activityId);\n\t\t$voda = $tus->getUserById($aktivnost->id_izvidac)->username;\n\n\t\t$memberList = $tus->getMembersByActivityId($activityId);\n\t\t$isaMember = false;\n\n\t\tforeach ($memberList as $member) {\n\t\t\tif (strcmp($member->id_izvidac, $_SESSION[\"id\"]) === 0)\n\t\t\t\t$isaMember = true;\n\t\t}\n\n\t\t$_SESSION[\"id_aktivnost\"] = $_GET[\"id_aktivnost\"];\n\n\t\trequire_once \"view/activity_show.php\";\n\t}", "title": "" }, { "docid": "e2825eeab4cbd2f6a530989ca95b26fd", "score": "0.5595288", "text": "public function show( $uniteEnseignement)\n {\n $da=UniteEnseignement::find($uniteEnseignement);\n $data['UE']=$da->UE;\n return view('UE.show',$data);\n\n }", "title": "" }, { "docid": "8c39752ef34a6a40800a44e529f487b6", "score": "0.55850494", "text": "public function show(Equipe $equipe)\n {\n //\n }", "title": "" }, { "docid": "ee45ab7ffd6da8a47e375262aa285355", "score": "0.55799305", "text": "public function show(Specie $specie)\n {\n //\n }", "title": "" }, { "docid": "bd5cab44a0961b5ecc6ef3eb5d2f01df", "score": "0.5573756", "text": "function display() {\n echo $this->searchView().'<br/>';\n echo $this->typeVC().'<br/>';\n echo $this->yearVC().'<br/>';\n echo $this->authorVC().'<br/>';\n echo $this->tagVC().'<br/>';\n }", "title": "" }, { "docid": "f1919612984d797496fb91a1df6bfc28", "score": "0.5572889", "text": "public function show(Resident $resident)\n {\n //\n }", "title": "" }, { "docid": "dec7ae6f946383d4b0a7f2409a45f36d", "score": "0.5572805", "text": "public function show(rendezVous $rendezVous)\n {\n //\n }", "title": "" }, { "docid": "fb800b407291ff5bab00d324f3123e5e", "score": "0.5571304", "text": "public function show(FactureProduit $factureProduit)\n {\n //\n }", "title": "" }, { "docid": "344b237bd671abee1d3f030fa78c1a88", "score": "0.55695564", "text": "public function show(Convenio $convenio)\n {\n //\n }", "title": "" }, { "docid": "45cf44cbbe3117ba75fb5776b23a6d11", "score": "0.5567336", "text": "public function show(Incentive $incentive)\n {\n //\n }", "title": "" }, { "docid": "d451086fe3aefa573d391bb9cbd78de1", "score": "0.5563858", "text": "function visualizacao($id = null){\r\n\t\tglobal $estagiario;\r\n\t\tglobal $contratos;\r\n\t\t$estagiario = find($id);\r\n\t\t$contratos = find_contratos($id);\r\n\t}", "title": "" }, { "docid": "51b01a5d0b1ce6ca027d29d8077d26c3", "score": "0.5551104", "text": "public function show(CapaEntrega $capaEntrega)\n {\n //\n }", "title": "" }, { "docid": "e31ddd6c9d265255a6eccd3cf54d1614", "score": "0.55375427", "text": "public function show(Asistencia $asistencia)\n {\n //\n }", "title": "" }, { "docid": "47b37dfb1211d0f3483ff6d9902e230c", "score": "0.5532938", "text": "public function show(DenemeOgrenci $denemeOgrenci)\n {\n //\n }", "title": "" }, { "docid": "257ff7d0f255ec541a3519732b7166d9", "score": "0.5527448", "text": "public function show($id)\n {\n return ReservaVisita::find($id);\n }", "title": "" }, { "docid": "4255ecc3d7b8d4581907723dcb8c97c9", "score": "0.5510785", "text": "public function showInvestigate()\n {\n return view('admin.incidents.investigate');\n }", "title": "" }, { "docid": "93be57e554d174736c8b5dfcde99e7b4", "score": "0.55100334", "text": "public function show(Caroussel $caroussel)\n {\n //\n }", "title": "" }, { "docid": "2b648b850c5d508193cb9ed93399577f", "score": "0.55075943", "text": "public function explorerAction() {\n // Get and check the collection's existence\n $collection = get_record_by_id('Collection', $this->getParam('id'));\n if (empty($collection) || raw_iiif_metadata($collection, 'iiifitems_collection_type_element') != 'Collection') {\n throw new Omeka_Controller_Exception_404;\n }\n // Pass collection to view\n $this->view->collection = $collection;\n }", "title": "" }, { "docid": "5e03753a242ec6b6d7640c7ab721d4d6", "score": "0.55028665", "text": "public function show(Convoit $convoit)\n {\n //\n }", "title": "" }, { "docid": "f4244823a1367b1ab42f4e4b72d5339a", "score": "0.5496475", "text": "public function show($ntuhaRide)\n {\n\n }", "title": "" }, { "docid": "3c24716fe57a3b8bc55bc9e05c80f31e", "score": "0.54877514", "text": "public function show(Estilo $estilo)\n {\n //\n }", "title": "" }, { "docid": "0507f5fae8128aaf82b942272a340224", "score": "0.5484793", "text": "public function showAction($id) {\n $em = $this->getDoctrine()->getManager();\n $user = $this->container->get('security.context')->getToken()->getUser();\n /* @var $user User */\n if (!is_object($user) || !$user instanceof UserInterface) {\n throw new AccessDeniedException(\n 'Problem...');\n }\n\n $entity = $em->getRepository('WalvaNatagoraBundle:Evenement')->find($id);\n $entity->setEleveFocus($user->getEleve());\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Evenement entity.');\n }\n $entity->getDate();\n //$entity->updatePosition();\n\n\n return $this->render('WalvaNatagoraBundle:Evenement:public\\show.html.twig', array(\n 'entity' => $entity,\n ));\n }", "title": "" }, { "docid": "81eb84aa70f1c7aa2e0b9f31eede2403", "score": "0.5483255", "text": "public function render(){\n\t\t$avisos = $this->model->get();\n\t\tif($avisos != null){\n\t\t\t$this->view->avisos = $avisos;\n\t\t}else{\n\t\t\t$this->view->mensaje = \"Error al cargar los avisos o no hay avisos para mostrar\" .$id;\n\t\t}\n\t\t$this->view->activoA = \"active\";\n\t\t$this->view->render('aviso/index');\n\t}", "title": "" }, { "docid": "139e998e667ca27f3101d4f72d6b4e77", "score": "0.5477613", "text": "public function show($idSolicitud)\n {\n\n\n }", "title": "" }, { "docid": "6eddb37698aca7131f620babc72ab750", "score": "0.54765034", "text": "public function show(Sejarah $sejarah)\n {\n //\n }", "title": "" }, { "docid": "34cc5a5bcb89cb3b70aac961159a912e", "score": "0.5466419", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $dql = \"SELECT v FROM ControlEquipoBundle:Visita v join v.usuario u order by v.fechaentrada DESC, v.horaentrada DESC\";\n $query = $em->createQuery($dql);\n //$query->setMaxResults(250);\n $entities = $query->getResult();\n\n return $this->render('ControlEquipoBundle:Visita:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "17b75e89476dd4ffe3bd84856a7eaf6b", "score": "0.5466387", "text": "public function show(Seat $seat)\n {\n //\n }", "title": "" }, { "docid": "7021c141687c6f2381b46438d7c3355e", "score": "0.54662645", "text": "public function show(Actualite $actualite)\n {\n //\n }", "title": "" }, { "docid": "cbbc1cf4482e12882717107115ca7666", "score": "0.5453562", "text": "public function show($id_kuisioner)\n {\n // Kuisioner::find($id_kuisioner)\n\n }", "title": "" }, { "docid": "9932a4e376aecce343fe211a43ee40a0", "score": "0.5452165", "text": "public function show(Breach $breach)\n {\n //\n }", "title": "" }, { "docid": "29703e27ba78e40e05f9a47370f598bf", "score": "0.5450541", "text": "public function show(Ator $ator)\n {\n //\n }", "title": "" }, { "docid": "956c3ac7fdeccc5dd15fa14419c228df", "score": "0.54495007", "text": "public function show(Yonetici $yonetici)\n {\n //\n }", "title": "" }, { "docid": "723baced051bb07b3f01045ef5224933", "score": "0.5444467", "text": "public function show(Suscriber $suscriber)\n {\n //\n }", "title": "" }, { "docid": "330c1ecbbb3dbcc1ce9bfdb62b6cb1ab", "score": "0.5443319", "text": "public function show(Factura $factura)\n {\n //\n }", "title": "" }, { "docid": "330c1ecbbb3dbcc1ce9bfdb62b6cb1ab", "score": "0.5443319", "text": "public function show(Factura $factura)\n {\n //\n }", "title": "" }, { "docid": "19d209e8474b7357fd64b8d11e131ca3", "score": "0.5443119", "text": "public function show(Habitacion $habitacion)\n {\n //\n }", "title": "" }, { "docid": "53f9ae97f34c3228f47747d160bea295", "score": "0.5439708", "text": "public function show(partner $partner)\n {\n //\n }", "title": "" }, { "docid": "b8d7ce8704f684d252ccccbcffa4eafa", "score": "0.5434787", "text": "public function show(Incidencia $incidencia) {\n //\n }", "title": "" }, { "docid": "97e997ff9fa1c13cef38042672eda0a3", "score": "0.54333043", "text": "public function show(Partner $partner)\n {\n //\n }", "title": "" }, { "docid": "ec5a8cd0ca9f953dc5a1163af30521f1", "score": "0.5428077", "text": "public function show(Interview $interview)\n {\n //\n }", "title": "" }, { "docid": "ad8f058907aaf1752a100a7144405c95", "score": "0.54272777", "text": "public function show(EstudioSocioeconimico $estudioSocioeconimico)\n {\n //\n }", "title": "" }, { "docid": "b4cbc451945a2907de716bcd14cd1b5f", "score": "0.54251677", "text": "public function show(LoreItem $loreItem)\n {\n //\n }", "title": "" }, { "docid": "22f57665e28f701c96d09ca9ef7b2fdf", "score": "0.5422514", "text": "public function show() {\n\t\tif (!isset($this->request->arguments[2])) {\n\t\t\t$this->index();\n\t\t} else {\n\t\t\t\n\t\t\t// General setup\n\t\t\t$this->setup();\n\n\t\t\t// Try to fetch the requested object\n\t\t\t$object = $this->objects->getByLink($this->request->arguments[2]);\n\n\t\t\tif (!empty($object)) {\n\t\t\t\t// The main View\n\t\t\t\t$this->data['view_object'] = $this->viewHelper->objectView($object[0]);\n\t\t\t} else {\n\t\t\t\t$this->data['view_object'] = \"<p>Objektet hittades inte</p>\";\n\t\t\t}\n\n\t\t}\n\t}", "title": "" }, { "docid": "795bb83c9162011d5534103280e54abd", "score": "0.54146385", "text": "public function show(visite $visite,$id)\n {\n $visite = visite::find($id);\n $x = $visite->nEmployé;\n $y = $visite->id_med;\n $z = $visite->id_v;\n $emp = employe::where('nEmployé',$x)->first();\n $user = User::where('id', $y)->first();\n $ori = orientations::where('id_v', $z )->first();\n $ap = aptitudeAuTravail::where('id_v',$z)->first();\n\n return view('visite.show',compact('visite','emp','user','ori','ap'));\n }", "title": "" }, { "docid": "2c234c6c16d8d0e9bc5127a81a278c61", "score": "0.5414189", "text": "public function show(Estudiante $estudiante)\n {\n //\n }", "title": "" }, { "docid": "2c234c6c16d8d0e9bc5127a81a278c61", "score": "0.5414189", "text": "public function show(Estudiante $estudiante)\n {\n //\n }", "title": "" }, { "docid": "0fb9a7481bcb87aff36bbb6dcb51bf37", "score": "0.54131967", "text": "public function show(qlsv_tukhaosat $qlsv_tukhaosat)\n {\n //\n }", "title": "" }, { "docid": "48f550a5697af3ec21dd05424455f923", "score": "0.5409017", "text": "public function show(Cour $cour)\n {\n //\n }", "title": "" }, { "docid": "3d0b9e8b3082e5019cdb2171937a6f88", "score": "0.54024476", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('PredDemandeBundle:Evaluateur')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Evaluateur entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('PredDemandeBundle:Evaluateur:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }", "title": "" }, { "docid": "3459f25f762feff2e72c71ef4950b029", "score": "0.54019153", "text": "public function show(Constracter $constracter)\n {\n //\n }", "title": "" }, { "docid": "1953fba08d3c2097c37b07d5367a36da", "score": "0.5396583", "text": "public function show()\n {\n $articleRepository = new ArticleRepository();\n $articleToShow = $articleRepository->getArticle($_GET['id']);\n \n $commentRepository = new CommentRepository();\n \n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n $commentType = new CommentType();\n if ($commentType->isValid()) {\n $commentRepository->add();\n } else {\n $error->commentType->notValid();\n }\n }\n\n require '../view/article/article.php';\n }", "title": "" }, { "docid": "2196ef2b86a95427b37c77c06337ab77", "score": "0.5396252", "text": "public function show(Uni $uni)\n {\n //\n }", "title": "" }, { "docid": "9f4d3920520194a68e9b0a8da70cec15", "score": "0.5384888", "text": "public function show()\n {\n \n// $equipe = Equipe::find(1);\n// return view('ebl1')->with('equipe'->$id);\n \n }", "title": "" }, { "docid": "ad1cdbe8e84e4fd0c0c51643968bddf0", "score": "0.5373973", "text": "public function executeShow(sfWebRequest $request)\n {\n $d_id = $request->getParameter('id');\n //querry\n $this->dementi = Doctrine_Core::getTable('Dementi')->createQuery('a')->from('Dementi d')->innerJoin('d.sfGuardUser u' )->where('id = ?', $d_id)\n ->fetchOne(); //important but ->fetchOne(!!!)\n //just in case from orygin executeShow action\n $this->forward404Unless($this->dementi);\n }", "title": "" }, { "docid": "c2232f404b954a90afee62058e5574e1", "score": "0.537249", "text": "public function show(Royxat_Otish $royxat_Otish)\n {\n //\n }", "title": "" }, { "docid": "b6d07f04a7421c39e1ac5f6128c273c1", "score": "0.53667617", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "dd1af693543629ee00d083239e902b2f", "score": "0.5359908", "text": "public function show(Retur $retur)\n {\n //\n }", "title": "" }, { "docid": "a3e63b78d523a226d986b7f5c47ad6b0", "score": "0.53547615", "text": "public function show($id)\n {\n return Entreecaisse::find($id);\n \n }", "title": "" }, { "docid": "22bb6815bd377ef88c6cf32ee8ad4ed4", "score": "0.5350913", "text": "public function view() {\n $web_user = Auth::check('web_user');\n// var_dump($web_user);\n \n\t\t$venue = Venue::first($this->request->id);\n $dishes = Dishes::find('all', array(\n 'conditions' => array(\n 'venueId' => ($venue->_id)\n )\n ));\n $title = 'View Venue';\n return compact('web_user', 'venue', 'dishes', 'title');\n//\t\treturn compact('venue');\n\t}", "title": "" }, { "docid": "9a37ff2ccef0df0a1457aceaf296b11f", "score": "0.53448737", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $fournisseur = $em->getRepository('BoutiqueDatabaseBundle:Fournisseur')->find($id);\n\n if (!$fournisseur) {\n throw $this->createNotFoundException('Impossible de trouver le fournisseur sélectionné.');\n }\n \n $dql = \"SELECT a FROM BoutiqueDatabaseBundle:Article a WHERE a.fournisseur = '\".$fournisseur->getId().\"'\";\n $query = $em->createQuery($dql);\n \n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate(\n $query,\n $this->get('request')->query->get('page', 1)/*page number*/,\n 30 /*limit per page*/\n );\n\n return $this->render('BoutiqueGestionStockBundle:Fournisseur:show.html.twig', array(\n 'fournisseur' => $fournisseur,\n 'pagination' => $pagination\n ));\n }", "title": "" }, { "docid": "2164053523742391f53cc18fee815f39", "score": "0.53434527", "text": "public function show() {\r\n\r\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.5342546", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.5342546", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.5342546", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.5342546", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.5342546", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.5342546", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.5342546", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.5342546", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.5342546", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.5342546", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.5342546", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.5342546", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "81693c887653abcc71e2ab07439178a9", "score": "0.53423214", "text": "public function show(Venue $venue)\n {\n //\n }", "title": "" }, { "docid": "81693c887653abcc71e2ab07439178a9", "score": "0.53423214", "text": "public function show(Venue $venue)\n {\n //\n }", "title": "" }, { "docid": "3ecf9ab42171ea64ec56654f505e7dcc", "score": "0.5339112", "text": "public function show(Docente $docente)\n {\n //\n }", "title": "" } ]
5a85293caa8687817a6d56afb0948418
return self::where('key', $key)>where('user_id', $userId)>first();
[ { "docid": "16a0ca3e62d7ff16787b7e4ceecec4b4", "score": "0.0", "text": "public static function getValue($key, $userId)\n {\n\n $q = new Queue('getQueue');\n $q->broadcast(['key' => $key, 'user_id' => $userId, 'requestIndex'=> $_GET['requestIndex']]);\n $a = new Queue('answer');\n $answer = $a->listenAnswer();\n return (object)['key'=>$key, 'value'=>$answer];\n }", "title": "" } ]
[ { "docid": "f16fcadbd4450f3629bef6e63d93d402", "score": "0.5993171", "text": "public function retrieveByToken($identifier, $token)\n{\n\n // TODO: Implement retrieveByToken() method.\n $qry = user::where('id_kl','=',$identifier)->where('remember_token','=',$token);\n\n if($qry->count() >0)\n {\n $user = $qry->select('id_kl', 'gebrnm_kl', 'vl_kl', 'email_kl', 'pw_kl', 'tel_kl', 'sexe_kl', 'id_bd', 'premium_kl')->first();\n\n $attributes = array(\n 'id_kl' => $user->id_kl,\n 'gebrnm_kl' => $user->gebrnm_kl,\n 'pw_kl' => $user->pw_kl,\n 'email_kl' => $user->email_kl,\n 'vl_kl' => $user->vl_kl,\n );\n\n return $user;\n }\n return null;\n\n\n\n}", "title": "" }, { "docid": "95be0875fd5a6940d954dc3794dc4885", "score": "0.5980461", "text": "public function getByKey($key)\n {\n return $this->model->where('key','=',$key)->first();\n }", "title": "" }, { "docid": "849a7c346aad5bc9d09fd34f807a3f31", "score": "0.5836875", "text": "public function retrieveByCredentials(array $credentials)\n{\n \n // TODO: Implement retrieveByCredentials() method.\n $qry = user::where('email_kl','=',$credentials['email_kl']);\n\n if($qry->count() > 0)\n {\n $user = $qry->select('id_kl', 'gebrnm_kl', 'vl_kl', 'email_kl', 'pw_kl', 'tel_kl', 'sexe_kl', 'id_bd', 'premium_kl')->first();\n return $user;\n }\n\n return null;\n\n\n}", "title": "" }, { "docid": "d9ad2d5a1c24cf60670cff090ac801cd", "score": "0.56720227", "text": "public function retrieveById($identifier)\n{\n // TODO: Implement retrieveById() method.\n\n\n $qry = user::where('id_kl','=',$identifier);\n\n if($qry->count() >0)\n {\n $user = $qry->select('id_kl', 'gebrnm_kl', 'vl_kl', 'email_kl', 'pw_kl', 'tel_kl', 'sexe_kl', 'id_bd', 'premium_kl')->first();\n\n $attributes = array(\n 'id_kl' => $user->id_kl,\n 'gebrnm_kl' => $user->gebrnm_kl,\n 'pw_kl' => $user->pw_kl,\n 'email_kl' => $user->email_kl,\n 'vl_kl' => $user->vl_kl,\n );\n\n return $user;\n }\n return null;\n}", "title": "" }, { "docid": "3bfd015c97f43efb2e5c473761b86678", "score": "0.564323", "text": "public function query()\n {\n return MTsCustomer::query()->orderByDesc('ID_No');\n\n\n // if (auth()->guard('admin')->user()->branches_id == $branches->first()->id){\n // }else{\n // return MTsCustomer::query()->orderByDesc('id')->where('branches_id','=',auth()->guard('admin')->user()->branches_id);\n // }\n }", "title": "" }, { "docid": "c72c31a59a512936726cab7428135e9d", "score": "0.5606989", "text": "function searchUserById($userId)\n{\n $user = DB::table('users')->where('user_id', $userId)->get();\n}", "title": "" }, { "docid": "c8713c1c02146d56e71b41c41e87ce05", "score": "0.54645514", "text": "function getTokensByUserId($userId)\n{\n return Capsule::table('pw_payment_token')->where('user_id', $userId)->get();\n}", "title": "" }, { "docid": "bc1c489ed6e77d14e5e2833a5c4326da", "score": "0.5433069", "text": "public function a4(){\n $beritas=Berita::whereHas('user',function($q){\n $q->whereHas('pengumumans')->has('artikels')->has('galeris')->has('kategoriArtikels');\n\n })->get();\n\n return $beritas;\n}", "title": "" }, { "docid": "2f7ed5a9b55cc92c7611624685ac270b", "score": "0.5387245", "text": "public function scopeGVWK($query,string $key){\n $data = $query->where('key',$key)->first();\n return $data;\n }", "title": "" }, { "docid": "909997fd49d37a1eb3cf4f4cace348b4", "score": "0.5386923", "text": "public function mostlike($key1){\n $sql=\"SELECT * FROM post WHERE permission='approved' and id='\".$key1['status_id'].\"' \";\n if( $query_result = $this->conn->query($sql)) {\n return $query_result;\n }\n\n }", "title": "" }, { "docid": "8ae2069850c2a98125c1d2add9ebc97a", "score": "0.53813493", "text": "public function retrieveByCredentials(array $credentials)\n{\n // dd('salve',$credentials);\n $qry = User::where('usunome','=',strtoupper($credentials['usunome']))->where('status','ATIVO');\n // dd($qry);\n if($qry->count() > 0)\n {\n //DD(\"AEW\");\n $user = $qry->select('usucod', 'usunome', 'ususenha','avatar','filial','is_medic','medic','is_admin','auth_encaixe')->first();\n\n\n //dd($attributes);\n\n return $user;\n }\n\n return null;\n\n\n}", "title": "" }, { "docid": "db944637fe679803ab95c10bb9e60557", "score": "0.52911127", "text": "public function query()\n {\n $student = Student::whereHas('getStudentViaBatch', function(Builder $query){\n $query->where('batch_id', $this->excBatch);\n })->where('school_id', Auth::user()->school_id);\n\n if($this->shift != NULL){\n $student = $student->where('shift_id',$this->shift);\n }\n if($this->class != NULL){\n $student = $student->where('class_id',$this->class);\n }\n if($this->section != NULL){\n $student = $student->where('section_id',$this->section);\n }\n return $student; \n }", "title": "" }, { "docid": "a6ef1d9310fec889641cba1c45333761", "score": "0.5286809", "text": "public function getTransactionTourDetail($transactionTourID){\n $result = \\DB::table('transaction_tour_details')\n ->where('transaction_tour_id',$transactionTourID)\n ->where('is_active',1)\n ->get();\n if($result){\n return $result;\n }else{\n return 'false';\n }\n}", "title": "" }, { "docid": "dea451c521b571fd2681ddf77dbf2b6a", "score": "0.5286433", "text": "function get_by_key($key=\"\"){\r\n\t\t$member = $this->find(\"first\", array(\"conditions\"=>array(\"Member.username\"=>$key)));\r\n\t\tif (!$member){\r\n\t\t\t$member = $this->find(\"first\", array(\"conditions\"=>array(\"Member.id\"=>$key)));\r\n\t\t}\r\n\t\treturn $member;\r\n\t}", "title": "" }, { "docid": "d8f979f6665362865c1759023f11c4b0", "score": "0.52771825", "text": "public function findOneByKey($key);", "title": "" }, { "docid": "85ce76c6bb552a2799a31bd5d1c95129", "score": "0.5274437", "text": "private function KeyCondition()\n {\n $schema = $this->GetSchema();\n $table = $schema->Table();\n $sql = $schema->SqlBuilder();\n $keyField = $table->Field($schema->KeyField());\n return $sql->Equals($keyField, $sql->Value($this->KeyValue()));\n }", "title": "" }, { "docid": "1a57cab236cb1c8f51e0e3279d89ac78", "score": "0.5232311", "text": "public function queryRelation(){\n \n $primaryKey = $this->getKeyName();\n \n \n return $this->with(['roles', 'roles.permissions'])\n ->where($primaryKey, '=', $this->attributes[$primaryKey])\n ->first(); \n }", "title": "" }, { "docid": "5508fc4bd7a59cee4e5b08f6335205d9", "score": "0.5209759", "text": "public function getUsersAdmin(){\n // $users=DB::table('users')->get();\n\n if(isset($_GET['q'])){\n $q=$_GET['q'];\n // $data=DB::table('imodels')->where('modelName' , 'LIKE ' ,'%'.$q.'%')->get();\n $users=User::where('blocked' , 0)\n ->where(function($query) use($q){\n $query->where('name' , 'LIKE' ,'%'.$q.'%')\n ->orwhere('mail', 'LIKE' ,'%'.$q.'%') \n ->orwhere('id', '=' ,$q) ;\n }) \n ->paginate(5);\n\n }else{\n $users=User::where('blocked' , 0)->paginate(7);\n }\n \n\n // $users=array();\n\n return view('backend.pages.activeUsers')->withusers($users);\n\n\n}", "title": "" }, { "docid": "8f8555e9c0719c5205a3e56f9b9a2948", "score": "0.51969564", "text": "public function findWhereFirst();", "title": "" }, { "docid": "81c98a82d81ae334f5d89f688323d7cc", "score": "0.51906264", "text": "public function query()\n {\n\n $users = ItemTransaction::where('item_code','=',$this->itemCode)\n ->where('hospital_id','=',Auth::user()->hospital_id)\n ->orderBy('created_at','desc');\n\n return $this->applyScopes($users);\n }", "title": "" }, { "docid": "ac0c208b6157c1501d6c1f0f5435db35", "score": "0.51794267", "text": "public function checkPayment()\n {\n // dd($this);\n // return $this->hasMany('App\\Models\\Image_auction','id_auction_book','id');\n // xem record do co ton tai khong\n $a = bill_auction::where('id_auction_book',$this->id)->where('id_account',$this->auction_book_final_winner)->exists();\n // dd($a);\n return $a;\n }", "title": "" }, { "docid": "5801079dc5778b4e45836fd33bfd9683", "score": "0.5165455", "text": "function get_user_by_hash($hashed_id) {\n $qry = \"SELECT * FROM `{$this->table_name}` WHERE hashed_id='{$hashed_id}' AND activated = '1'\";\n $res = self::$db->execute($qry);\n\n if(is_object($res) && $arr = $res->fetchrow()){\n foreach($arr as $key => $value)\n $this->$key = $value;\n\n return TRUE;\n }\n //return $res->fetchrow();\n return NULL;\n }", "title": "" }, { "docid": "3cdfc192f40b27af23ede5770ac6876c", "score": "0.51613706", "text": "public function GetAllUser(){\n return User::where('id' ,'=>','1')->get();\n }", "title": "" }, { "docid": "c29b01fa8cd9578f30e69d381e68c67f", "score": "0.5161065", "text": "public function retrieveByToken($identifier, $token)\n{\n // dd('salve1',$identifier);\n // TODO: Implement retrieveByToken() method.\n $qry = User::where('usucod','=',$identifier);\n\n if($qry->count() >0)\n DD(\"FOI\");\n {\n $user = $qry->select('usucod', 'usunome', 'ususenha','avatar','filial','is_medic','medic','is_admin','auth_encaixe')->first();\n\n $attributes = array(\n 'usucod' => $user->usucode,\n 'usunome' => $user->usunome,\n 'ususenha' => $user->ususenha,\n 'avatar' =>$user->avatar,\n 'filial' =>$user->filial,\n 'is_medic' => $user->is_medic,\n 'id_medic' => $user->medic, \n 'is_admin' => $user->is_admin,\n 'auth_encaixe' => $user->auth_encaixe, \n );\n\n return $user;\n }\n return null;\n\n\n\n}", "title": "" }, { "docid": "00a006cc85510cd9b1c3dc6d5c2d194c", "score": "0.5158473", "text": "public static function findByActivationKey($key)\n {\n $that = new self;\n $user = MerchantUsers::find()->where(['activation_key'=>$key])->one();\n if($user){\n $that->_user = $user;\n return $that;\n }\n $user = CsEmployees::find()->where(['activation_key'=>$key])->one();\n if($user){\n $that->_user = $user;\n return $that;\n }\n return NULL;\n }", "title": "" }, { "docid": "53a459f06ac3d9d30ed775a3e4fe327d", "score": "0.51551086", "text": "function getOrderStatus($status,$u_id=0)\n{\n $user_id = $u_id == 0 ? \\Auth::user()->id : $u_id;\n\n $orders = \\App\\Order::where('user_id',$user_id)\n ->where(function($t) use($status){\n if($status >= 0 && $status < 10){\n $t->where('status',$status);\n }else{\n $t->where('status','>=',0);\n }\n })->count();\n\n\n return $orders;\n\n}", "title": "" }, { "docid": "4ddd00bc4547c209f2452d674d426de2", "score": "0.51494914", "text": "protected function newEloquentQuery($key, $username)\n {\n $model = $this->createModel();\n\n if (method_exists($model, 'trashed')) {\n // If the trashed method exists on our User model, then we must be\n // using soft deletes. We need to make sure we include these\n // results so we don't create duplicate user records.\n $model = $model->withTrashed();\n }\n\n return $model->where([$key => $username]);\n }", "title": "" }, { "docid": "2e2f23a1c1472d33875fccae3c6a8a63", "score": "0.51415086", "text": "function valid_user($key, $userid, $db) {\r\n\t\t$result = $db -> select(\"SELECT `user_id`,`tempkey` FROM `users` WHERE `user_id`=\".$userid.\" AND `tempkey`=\".$key.\"\");\r\n\t\tif(count($result) < 1) return false;\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "220ab3a59fc8648a625664bebb5ce5df", "score": "0.5137535", "text": "function getUserById($id)\n {\n return User::Where('id', $id)->first();\n }", "title": "" }, { "docid": "a6bae79b2a1f37fd62ffc182e751c434", "score": "0.5128422", "text": "public function retrieveById($identifier)\n{\n //dd(\"vtc5\");\n // TODO: Implement retrieveById() method.\n dd('SALVE', $identifier);\n\n\n$qry = User::where('usunome',$identifier);\n\nif($qry->count() >0)\n{\n //dd($attributes);\n $user = $qry->select('usucod', 'usunome', 'ususenha','avatar','filial','is_medic','medic','is_admin','auth_encaixe')->first();\n\n $attributes = array(\n 'usucod' => $user->usucode,\n 'usunome' => $user->usunome,\n 'ususenha' => $user->ususenha,\n 'avatar' =>$user->avatar,\n 'filial' =>$user->filial,\n 'is_medic' => $user->is_medic,\n 'id_medic' => $user->medic, \n 'is_admin' => $user->is_admin, \n 'auth_encaixe' => $user->auth_encaixe,\n );\n\n\n return $user;\n}\nreturn null;\n}", "title": "" }, { "docid": "e1e0a6ef1f826a55f8100211a42d14c3", "score": "0.51192105", "text": "function get_user_by_id($user_id) {\n $qry = \"SELECT * FROM `{$this->table_name}` WHERE id='{$user_id}' AND activated = '1'\";\n //$qry = \"SELECT * FROM `{$this->table_name}` WHERE id='{$user_id}'\";\n //echo $qry.'<br>';\n $res = self::$db->execute($qry);\n self::$db->setFetchMode(ADODB_FETCH_ASSOC);\n if(is_object($res)){\n $arr = $res->fetchrow();\n foreach($arr as $key => $value)\n $this->$key = $value;\n\n return TRUE;\n }\n\n return NULL;\n }", "title": "" }, { "docid": "33d397fe7edba8b2eed7d91f9844f3f1", "score": "0.5105868", "text": "function bedge($user_id){\n\t\t$this->db->select('*');\n\t\t$this->db->where('id',$user_id);\n\t\t$check = $this->db->get(DB_PREFIX.'users')->row_array();\t\t\n\t\treturn $check; \n\t}", "title": "" }, { "docid": "5992b41be2a9ebc4f3c5d3c465a55d99", "score": "0.5104954", "text": "public function findByKey($key);", "title": "" }, { "docid": "b9ca34ac93f4cbd4e3876255de1bdd67", "score": "0.5099499", "text": "function validatedKey($user) {\n\ttry {\n\t\t$veri = User::where('id', '=', $user['id'])->first();\n\t\t$encriptedKey = hash('sha512', $veri->id.$veri->email.$veri->created_at);\n\t\t\n\t\tif($user['key'] == $encriptedKey) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t} catch (Exception $e) {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "0e2791cf5209e21ed2dd67009ede518c", "score": "0.50976366", "text": "function get_by_key($withSetAttributeValue=FALSE) {\t\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM umuser \n\t\t\t\tWHERE UsID=?\";\n\t\t$query = $this->ums->query($sql, array($this->UsID));\n\t\tif ( $withSetAttributeValue ) {\n\t\t\t$this->row2attribute( $query->row() );\n\t\t} else {\n\t\t\treturn $query ;\n\t\t}\n\t}", "title": "" }, { "docid": "f9fccedcd499f4c1eec9dbff271ccab5", "score": "0.50945336", "text": "function findByKey($key);", "title": "" }, { "docid": "b538fd77b17342e6a86015065d5f6ce2", "score": "0.50937635", "text": "public function query()\n {\n if(Auth::user()->type == 'pegawai'){\n $st_id = [];\n $mySt = DetailSuratTugas::where('pegawai_id', Auth::user()->pegawai_id)->get();\n if ($mySt) {\n foreach ($mySt as $key => $value) {\n $st_id[] = $value->surat_tugas_id;\n }\n }\n\n $query = SuratTugas::whereIn('st_id', $st_id)->latest();\n\n }elseif (Auth::user()->type == 'admin') {\n \n $query = SuratTugas::latest();\n \n }elseif (Auth::user()->type == 'spk') {\n $query = SuratTugas::latest();\n \n }else{\n die();\n }\n\n return $this->applyScopes($query);\n }", "title": "" }, { "docid": "b6405ff75b7f3149c61a49d1a497a889", "score": "0.5080557", "text": "public function query()\n {\n\n \t$translations = translation::get()->toArray();\n $translationKeys = translationKey::get(['id', 'key'])->toArray();\n foreach($translationKeys as &$translationKey)\n\t\t{\n\t\t\tforeach($translations as &$translation)\n\t\t\t{\n\t\t\t\tforeach($this->languages as &$language)\n\t\t\t\t{\n\t\t\t\t\tif($translation['translation_key_id'] == $translationKey['id'] and $translation['language_id'] == $language['language_id'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$translationKey[$language['language_id']] = $translation['translation'];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif(empty($translationKey[$language['language_id']]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$translationKey[$language['language_id']] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n return $this->applyScopes($translationKeys);\n }", "title": "" }, { "docid": "4a16d7ae59b033642419d8f5ca9c48cc", "score": "0.5072979", "text": "public function getTokenByUserId() {\n try{\n $user = Auth::user()->id;\n return $this->tokenRepo->findByField('user_id',$user)->first();\n } catch(\\Exception $e) {\n return $this->fail();\n }\n }", "title": "" }, { "docid": "ff9ec265adcf33f865de2fa22f3006e2", "score": "0.5069438", "text": "function getUser (){\n\n $userKey = $_GET['selectedUserKey'];\n $userRecords = $_SESSION['userRecords'];\n foreach ($userRecords as $key => $user) {\n \n if( $user[4] == $userKey ){\n\n return $key;\n }\n\n }\n}", "title": "" }, { "docid": "584cf9eab78cc75cf5443205235440ef", "score": "0.5068408", "text": "public static function filter_key($orm, $key) {\n\t\treturn $orm->where('CustomerKey', $key);\n\t}", "title": "" }, { "docid": "96c4c4d4d9894256072da8169ee13ff2", "score": "0.5063442", "text": "public static function fetchActiveKeyMatch($rec) {\n $keyValue = $rec->getKeyValue();\n $c = $rec::asActiveCriteria($rec->clientId);\n $c->setKeyValue($keyValue);\n if ($rec->getPkValue()) \n $c->setPkValue(CriteriaValue::notEquals($rec->getPkValue()));\n return end(self::fetchAllBy($c));\n }", "title": "" }, { "docid": "2f5af684e6da2ed4780162a7da0f7142", "score": "0.5024282", "text": "function appInvoiceStatus($show_id,$user_id)\n{ \n\n $collection = ClassHorse::select(\"id\")->with(\"horse\")\n ->where(\"show_id\",$show_id)\n ->where(\"user_id\",$user_id)\n ->where(\"status\",0)\n ->groupBy(\"horse_id\")\n ->first();\n if(count($collection)>0){\n \t$status = \"Un-Paid\";\n }else{\n \t$status = \"Paid\";\n }\n return $status;\n}", "title": "" }, { "docid": "aa06e1ae5ec119648dadfdfafa48f9de", "score": "0.5010755", "text": "function auth_key_check($key)\n\t{\n\n\t\t\t$cutom_query =custom_query(\"SELECT `api_token` FROM `tbl_user` WHERE `api_token`='{$key}'\",\"row\");\n\t\t\treturn $cutom_query->api_token;\n\n\t}", "title": "" }, { "docid": "5318b7caac434bdbc97e2e3c631a4816", "score": "0.5007831", "text": "public function getVehicle($id)\n{\n $vehicle=DB::table('vehicles')->where([\n ['taxi_drivers_id',$id],\n ['active','1']\n ])->first();\n return $vehicle;\n}", "title": "" }, { "docid": "16472439b8d463d71f055cd7a5c3e515", "score": "0.49998534", "text": "public function findByUser(UserModel $userModel){\n // $results2 = DB::select('select * from users where id = ?', array(1));\n $results = DB::select('select * from users where username = :username AND password = :password', ['username' => $userModel->getUsername(), 'password' => $userModel->getPassword()]);\n //$result = sqlsrv_query($connection, \"SELECT `ID`, `USERNAME`, `PASSWORD` FROM `users` WHERE 1\");\n if($results){\n return true;\n }\n else{\n return false;\n }\n \n }", "title": "" }, { "docid": "4cd97530d149fa853baf94e6c98db1a5", "score": "0.49977678", "text": "public function searchAll()\n {\n $users = User::whereDoesntHave('blockerOf',function($query){\n $query->where('user_id', $this->id);\n })\n ->whereDoesntHave('blockss', function($qq){\n $qq->where('user_second_id', $this->id);\n })\n\n // ->whereHas('userPictures', function ($query) {\n // $query->where('image_type', 'profilepic');\n // $query->where('checked', true);\n // })\n\n ->where('gender', $this->oltGender())\n ->where('img_name', '<>', null)\n // ->where('gender', Auth::user()->lookingFor())\n ->orderBy('updated_at', 'desc')\n ->paginate(24);\n\n return $users;\n }", "title": "" }, { "docid": "1069f05474121777bd53281d5830228e", "score": "0.4992827", "text": "public function vendedores(){ return Usuario::where('tipoc','Vendedor')->orderBy('id','desc')->get(); }", "title": "" }, { "docid": "2e280ab576a6b6c64220cfa8d2665bde", "score": "0.4983198", "text": "public function filterByPrimaryKey($key)\r\n\t{\r\n\t\treturn $this->addUsingAlias(UserPeer::ID, $key, Criteria::EQUAL);\r\n\t}", "title": "" }, { "docid": "4a319c6fcd77000bf02f9d372bc459ac", "score": "0.49804163", "text": "public function scopeOfKey($query, $key)\n {\n return $query->where('key', $key);\n }", "title": "" }, { "docid": "1345b24bb734e690ffe5eda8b096ff36", "score": "0.49802893", "text": "public function check_one_bysessionID(){\n $result = $this->db->get_where($this->table,array('userID'=>$this->sessionID)); \n return $result->row();\n }", "title": "" }, { "docid": "c99b4adc416086fad24dc5f086e4ac92", "score": "0.49739176", "text": "public function getUserPrefferrence(){\n $authID = Auth::user()->id;\n return self::where('userId', $authID)\n //->select('user_preference')\n ->select('language')\n ->first();\n }", "title": "" }, { "docid": "31d0cd0df067bb0ed44e20de24362ebf", "score": "0.49717897", "text": "function excludeReviewer()\n{\n Database::getInstance()->where('u.user_id', getUserSession()->user_id, '<>');\n return Database::getInstance();\n}", "title": "" }, { "docid": "944eed96845b13530175364102464e2c", "score": "0.49695435", "text": "function getProvider($user_id)\n{\n $provider = Provider::where('user_id', '=', $user_id)->first();\n}", "title": "" }, { "docid": "7620ab6d36d794c1f39591856a554b75", "score": "0.49691048", "text": "public function getWhere($table, $column, $key)\n {\n $this->setTable($table);\n $query = $this;\n $req = $query->where($column,$key)->get();\n return $req;\n }", "title": "" }, { "docid": "c9571665217ade6e2e86ad39cfe02d99", "score": "0.4966129", "text": "public function getKey($id): ?UsersKey;", "title": "" }, { "docid": "4b26a04c695b0cc8c2bd87751c3ede63", "score": "0.49643975", "text": "public function where($key, $value);", "title": "" }, { "docid": "4b26a04c695b0cc8c2bd87751c3ede63", "score": "0.49643975", "text": "public function where($key, $value);", "title": "" }, { "docid": "a61630e336be7215fcd504271215ea51", "score": "0.49622", "text": "public function getUserWihRequest() {\n $query = $this->db->get_where('usertable', array(\"userChangeTypeRequest\"=>\"true\")); \n return $query;\n }", "title": "" }, { "docid": "e4f7f8c532d90d9e495b0d876703b126", "score": "0.49592578", "text": "function get_row_by_key($col,$key,$value,$table)\n\n\t{\n\n\t if(!empty($key))\n\n\t {\n\n\t\t$CI =& get_instance();\n\n\t\t$result = $CI->db->select($col)->from($table)->where($key,$value)->get()->row();\n\n\t\treturn $result;\n\n\t }\n\n\t}", "title": "" }, { "docid": "40e13eabc03cbd375e25d916c69a9b28", "score": "0.4954561", "text": "public function PackageAndEventHaveSameCategory($evenTypeStatus,$events,$package_id)\n{\n if($evenTypeStatus == 1){\n $package = VendorPackage::find($package_id);\n $event_category = UserEventMetaData::where('event_id',$events->id)\n ->where('key','category_id')\n ->where('type','events')\n ->where('key_value',$package->category_id)\n ->where('user_id',Auth::user()->id)\n ->count();\n\n return $event_category > 0 ? 1 : 0;\n \n }\n return 0;\t \n}", "title": "" }, { "docid": "faf7bee224d09c83aab19df5fffdbbaf", "score": "0.49471366", "text": "protected function constrainByUser()\n {\n $userKey = $this->parent->getKey();\n\n $this->query->where($this->getQualifiedUserPivotKeyName(), $userKey);\n\n return $this;\n }", "title": "" }, { "docid": "aef318f06b4c851b6318910130d5f9f1", "score": "0.4915949", "text": "public function getUserAsAuth()\n {\n $user = Auth::user();\n if($user->role < 4){\n return $this->_model::where('id','>', 1)->get();\n }\n return $this->_model::all();\n }", "title": "" }, { "docid": "8538804acf636bbbfdc136a5092d90d7", "score": "0.49072245", "text": "public function show($key)\n {\n $id_user = Auth::user()->id;\n $link=Link::with(['voteLink'\n =>function($query){\n $query->withCount('voters');\n $query->withCount('candidates');\n }\n ,\n // 'voteLink.candidates',\n 'voteLink.voters'=>function($query) use ($id_user){\n $query->select('user_votes.id_vote','a.name as name','b.name as option');\n $query->join('users as a','id_user','a.id');\n $query->join('vote_candidates as b','id_candidate','b.id');\n // $query->count();\n $query->where('id_user', '=', $id_user);\n }, \n ])\n ->where('key',$key)->first();\n \n foreach ($link['voteLink'] as $value) {\n \n // Log::channel('stderr')->info($value['voters']);\n $value['canvote'] = count($value['voters']) > 0 ? false :true;\n $value['urvote'] = count($value['voters']) > 0 ? $value['voters'][0] : null;\n unset($value['voters']);\n }\n Log::channel('stderr')->info($link);\n // $link = Link::with([\n // 'votes', \n // 'votes.candidates',\n // 'votes.voters' => function ($query) use ($id_user) {\n // $query->select('vote_candidates.name AS candidate', 'vote_candidates.updated_at')\n // ->join('vote_candidates', 'user_votes.id_candidate', 'vote_candidates.id')\n // ->where('id_user', $id_user);\n // }\n // ])\n // ->where('key', $key)\n // ->get()\n // ->first() ?? false;\n\n if ($link) {\n return response()->json(['data' => $link], 200);\n }\n\n return $this->error404();\n }", "title": "" }, { "docid": "23fac430e11f470fab6d5eb42b661c49", "score": "0.4906898", "text": "public function newreqkey()\n{\n $new=new buybookEloquent;\n $new->bookid=$this->bookid;\n $new->userid=$this->userid;\n $new->save();\n return $new;\n}", "title": "" }, { "docid": "fed1471926e5ecdb7e3cfd29b0ae7364", "score": "0.48880717", "text": "public function resultData()\n {\n\n $haha = $this->userId;\n return PeriksaKebuntingan::with('sapi')\n ->where(function ($query){\n if($this->searchTerm != \"\"){\n $query->where('metode','like','%'.$this->searchTerm.'%');\n $query->orWhere('hasil','like','%'.$this->searchTerm.'%');\n \n }\n if($this->sapiId != null){\n $query->Where('sapi_id','like','%'.$this->sapiId.'%');\n }\n // if($this->statusId != null){\n // $query->Where('status','like','%'.$this->statusId.'%');\n // }\n \n })\n ->whereHas('sapi.peternak', function($q) use($haha) {\n if($haha != null){\n $q->where('user_id', $haha);\n }\n })\n ->WhereBetween('waktu_pk',[$this->startDate, $this->endDate])\n ->get();\n }", "title": "" }, { "docid": "b6dc746a58a1c84dfa011b6fd8e1fa18", "score": "0.488489", "text": "function getReceiver($id, $receiver)\n {\n // $tamp = $this->db->query($query);\n // return $tamp->result();\n // var_dump($receiver);exit();\n $result = DB::table('oborolan')\n // ->where('nama_pengirim', '=', $id)\n // ->Orwhere('nama_pengirim', '=', $receiver)\n // ->where('nama_penerima', '=', $receiver)\n // ->Orwhere('nama_penerima', '=', $id)\n // ->orderBy('id_oborolan', 'desc')\n // ->limit(3)\n // ->groupBy('nama_pengirim')\n // ->get();\n ->where(function ($query) use ($id,$receiver) {\n $query->where('nama_pengirim', '=', $id)\n ->orWhere('nama_pengirim', '=', $receiver);\n })->where(function ($query) use ($id,$receiver) {\n $query->where('nama_penerima', '=', $receiver)\n ->orWhere('nama_penerima', '=', $id);\n })\n ->orderBy('id_oborolan', 'desc')\n ->limit(3)\n ->get();\n // var_dump($result);exit();\n return $result;\n }", "title": "" }, { "docid": "a616e861a8b43299d7520f0a3dd6430f", "score": "0.48674655", "text": "public static function findByKey($key)\n {\n return static::findOne(['key' => $key, 'status' => self::STATUS_ENABLED]);\n }", "title": "" }, { "docid": "58c081687b77e770ca038ac9e99ad4ca", "score": "0.48601317", "text": "public function where()\n {\n $db = $this->table()->getAdapter();\n return $db->quoteInto(\"\\\"{$this->_primary}\\\" = ?\", $this->_id);\n }", "title": "" }, { "docid": "6263571171e08b0d0f12a256bb10f4c1", "score": "0.48575342", "text": "public function getAttributeValueByKey($key)\n {\n\n return AttributeValue::where('key' , '=', $key)->first();\n\n }", "title": "" }, { "docid": "36dc62e33ccd5e7c5f5e79bfcb79d89e", "score": "0.4857379", "text": "function checkUserAPIKey($userid)\n{\n global $conn;\n\n $stmt = $conn->prepare(\"SELECT user_id FROM `api-key` WHERE user_id = ? AND active = 1;\");\n $stmt->bind_param(\"s\", $userid);\n\n $stmt->execute();\n $stmt->store_result();\n $count = $stmt->num_rows;\n\n if ($count < 1) {\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "8769c8cb9d8b942c40767c2bdb3fb56b", "score": "0.48518443", "text": "function get_user_of_id($id) {\n $sql = \"select * from User where user_id=?\";\n $user = DB::select($sql, array($id));\n $user = $user[0];\n return $user;\n}", "title": "" }, { "docid": "ad61f3340c28fb95fb91cca682bc7054", "score": "0.48489845", "text": "public function getActive() \n {\n return $this->model->where('is_active', '=', '1')->orderBy('created_at', 'desc')->get();\n }", "title": "" }, { "docid": "e7cdac7003878a701cf8c336085fb9fc", "score": "0.48441327", "text": "function get_with_double_condition($col1, $value1, $col2, $value2) {\n $table = $this->get_table();\n // $table = 'user_login';\n $this->db->where($col1, $value1);\n $this->db->or_where($col2, $value2);\n $query=$this->db->get($table);\n return $query;\n}", "title": "" }, { "docid": "4f3f2e1914ec0590eb30fef5781f6a1e", "score": "0.48437482", "text": "public function a2(){\n $artikels=Artikel::where('id', 4)->orWhere('id', 5)->orderBy ('id','desc')->get();\n return $artikels;\n }", "title": "" }, { "docid": "c608dd28bce65391d5c9b4d25bc86509", "score": "0.4842225", "text": "public function whereQuery($key, $operator, $value)\n { \n Log::info('where: '.$key.'.'.$operator.'.'.$value);\n return $this->model->where($key, $operator, $value)->get();\n }", "title": "" }, { "docid": "5aa50ff7a332bfcdc28e42881442d5d7", "score": "0.4841482", "text": "public function where()\n {\n\n \t//$produtos = DB::table('produtos')->where('id', '3')->orWhere('id', '<>', '2')->get();\n\n \t//$produtos = DB::table('produtos')->where('nome', 'like', \"%cabide%\")->get();\n\n \t//$produtos = DB::table('produtos')->whereIn('id', [1,3])->get();\n\n\t\t//$produtos = DB::table('produtos')->whereNotIn('id', [1,3])->get();\n\n\t\t//$produtos = DB::table('produtos')->select('id', 'nome')->whereNull('created_at')->get();\n\n\t\t//$produtos = DB::table('produtos')->select('id', 'nome')->whereNotNull('created_at')->get(); \t\n\n\t\t//$produtos = DB::table('produtos')->select('id', 'nome')->whereBetween('cod', [500, 1000])->get(); \n\n\t\t$produtos = DB::table('produtos')->select('id', 'nome')->whereNotBetween('cod', [500, 1000])->get(); \t\n\n\n\n \treturn $produtos;\n }", "title": "" }, { "docid": "3aabb54a82c03e26584725ea4176084d", "score": "0.48408204", "text": "function find_row($whereclause)\n{\n$ary=$this->toArray();\n$qltester = new GWQL($whereclause);\n//print_r($this->data);\n$retval = $qltester->find($ary);\n//if ($r == true) echo \"COMPARE TRUE\";\n//if ($r == false) echo \"COMPARE FALSE\";\n//echo \"\\nR is $r\\n\";\nreturn $retval;\n}", "title": "" }, { "docid": "aa0431ac53be3937036086156a4c91ab", "score": "0.48402366", "text": "function matchesQuery($where=array(),$params=array()){\n\t\t\t$params['show_deleted']=1;\n\t\t\t$where['uid'] = $this->getId();\n\t\t\treturn $this->getFirst($where,$params);\n\t\t}", "title": "" }, { "docid": "4192041ff9fc6cba444395228fd9bd6c", "score": "0.48313874", "text": "public function sessionDetail($sessionKey)\n {\n \t$sessionKeyUserDetail = $this->database\n \t\t\t \t\t\t\t->table('session_key')\n \t\t\t \t\t\t\t->select('user_id','active')\n \t\t\t\t->where('session_key',$sessionKey)\n \t\t\t\t->first(); \t\t\t\t\n \treturn $sessionKeyUserDetail;\n }", "title": "" }, { "docid": "bdde13aed56ed16b32ae0f301ba49b69", "score": "0.48305336", "text": "public function a3(){\n $artikels=Artikel::where('id', 4)->whereHas('user', function (Builder $query){\n $query->where('name','Zamira Agustina S.Pt');\n })->with('user')->get();\n return $artikels;\n }", "title": "" }, { "docid": "e0d7beefc279fab466caee5617306404", "score": "0.48200437", "text": "public function filterByPrimaryKey($key)\r\n {\r\n\r\n return $this->addUsingAlias(TokenPeer::ID, $key, Criteria::EQUAL);\r\n }", "title": "" }, { "docid": "0f4f914a8259616bbf7d16f3a7d7e29b", "score": "0.47940925", "text": "function getFlowerPlanDetails($loggedInUser = null) {\n\n $result = [\n 'is_flower_plan' => 0,\n 'flower_plan_details' => array(),\n ];\n DB::enableQueryLog();\n $myFlowerPlan = GroupFlowerPayment::select('id')->where('user_id', '=', $loggedInUser)\n ->whereNotExists(\n function($query) {\n $query->select(DB::raw('id'))\n ->from('group_flowers')\n ->whereRaw('group_flowers.payment_id = group_flower_payments.id');\n }\n )->first();\n // dd(DB::getQueryLog());\n if (!empty($myFlowerPlan)) {\n $result = [\n 'is_flower_plan' => 1,\n 'flower_plan_details' => $myFlowerPlan,\n ];\n }\n\n return $result;\n}", "title": "" }, { "docid": "caae9e60a2fe709f5b15a26bf0b5401b", "score": "0.47905144", "text": "protected function sqlKeyFilter()\n {\n return \"`user_id` = @user_id@\";\n }", "title": "" }, { "docid": "09999fc933b55b0c8a01d6a8f5e220d0", "score": "0.47811583", "text": "public function rw()\n {\n \t// hasOne(RelatedModel, foreignKeyOnRelatedModel , localKey)\n \treturn $this->hasOne(Rw::class, 'rw_id', 'id_rt');\n }", "title": "" }, { "docid": "675f170ba65f75bd63cf8ad1cb9744dc", "score": "0.47760826", "text": "public function favorited(){\n\t return (bool) Favorite::where('user_id', Auth::id())\n\t ->where('post_id', $this->id)\n\t ->first();\n\t}", "title": "" }, { "docid": "61533d6c4ee08d23d4fc2eb2e583c554", "score": "0.47642452", "text": "public function forKey($key)\n {\n return $this->select()\n ->where(Project::prefix('key'), $key)\n ->one();\n }", "title": "" }, { "docid": "2ce43a381d77e101cfad98db3a4dc842", "score": "0.4762655", "text": "public function byUser($user_id) {\n return $this->where('user_id', $user_id)->orWhereNull('user_id')->get();\n }", "title": "" }, { "docid": "6fa13e9b29155a360937c56d68cf4ada", "score": "0.47614643", "text": "public function kyc(){\n return $this->hasOne(UserKyc::class, 'user_id', 'id');\n }", "title": "" }, { "docid": "4a7f14670b52c79a06f6583ea7de02e0", "score": "0.4761006", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(OOBookingPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "95d31c4b66b43b05051e54124f20fb4e", "score": "0.47602046", "text": "public function checkreq($tuserid,$tbookid){\n $reqq=buybookEloquent::where('userid','=',$tuserid)->get();\n for($i=0;$i<count($reqq);$i++){\n if($reqq[$i]->bookid==$tbookid)return 1; //have req \n }\n return 0; \n }", "title": "" }, { "docid": "247befd80c4198c2df6b2f211d25867d", "score": "0.47559673", "text": "public function getUser()\n\t{\n\t\treturn $this->hasOne(User::className(),['id'=>'userid']);\n\t\t//->where();\n\t\t//self::find()->where(['parent_id'=>$this->id])->count();\n\t}", "title": "" }, { "docid": "76d1c0e1c393b7c744ed576a9c949a2a", "score": "0.47540492", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(FairRequestsPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "989d7d3291cbedda34e3a91fd87f4240", "score": "0.47532797", "text": "public function GET($key){\n\n if(isPrimaryUser()){\n\n if(isset($key)){\n $this->query = \"select name from \" . $this->table . \" where $this->resourcekey=$key\";\n // echo $this->query;\n }else{\n return 0;\n }\n return parent::GET(null);\n }\n return 0;\n }", "title": "" }, { "docid": "2a9489098b7e90ad9e6f11181e4a51b1", "score": "0.47460797", "text": "public static function has_all_data(){\n \n if(Auth::user()->user_type == 'vendor')\n $all_data = Self::where('vendor_id',Auth::id())->get();\n else\n $all_data = Self::where('user_id',Auth::id())->get();\n\n $all_data = $all_data->map(function($data){\n $data->user_info = Self::user_details($data->user_id);\n $data->vendor_info = Self::user_details($data->vendor_id);\n $data->last_msg = DB::table('inbox_message')->where('inbox_id',$data->id)->orderBy('id','DESC')->limit(1)->get();\n return $data;\n }); \n\n return $all_data;\n\n }", "title": "" }, { "docid": "589ec6c1b7966b7c08032e76556cf4d5", "score": "0.47460097", "text": "public function scopeLessors($query)\n {\n return $query->where('lessor', true);\n }", "title": "" }, { "docid": "d2bc8b1feb949855ec0a5fd5cd3a3adc", "score": "0.47444698", "text": "function mail_exists($key)\r\n{\r\n $this->db->where('usermailid',$key);\r\n $query = $this->db->get('ssr_t_users');\r\n if ($query->num_rows() > 0){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n}", "title": "" }, { "docid": "fd93a3bed61227df1ff01942ce4d30bf", "score": "0.47371152", "text": "public function next(){\n // get next user\n return Press::where('id', '>', $this->id)->orderBy('id','asc')->first(['id','title','created_at']);\n\n }", "title": "" }, { "docid": "cbc7f1aecdc6866b25038588117d19ea", "score": "0.47294593", "text": "public function hasOneofs(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "14204d6d07e6b6192ab6ee1b1a057946", "score": "0.47284225", "text": "public function scopeWithKey($query, $key)\n {\n return $query->where('key', $key);\n }", "title": "" }, { "docid": "a8f97ffd82710c9535af1902cf5d3c12", "score": "0.4726237", "text": "public static function select_records($column,$value)\n {\n return Tour_bookings::where('status',1)->where($column,$value)->first(); \n }", "title": "" } ]
627c1ea6989e0986f8815fdf900c162e
Create a new controller instance.
[ { "docid": "e0b04e672070d25c63b228ecce652174", "score": "0.0", "text": "public function __construct()\n {\n //\n }", "title": "" } ]
[ { "docid": "9ca4cb085e75ebbc4eeb6003cf283f0a", "score": "0.7571501", "text": "protected function createController(): void\n {\n $this->controllerName = $this->request->getControllerName();\n $newControllerName = ($this->controllerName === 'default' || empty($this->controllerName)) ?\n ($this->defControllerName ?? '') : $this->controllerName;\n $newControllerName = ucfirst(strtolower($newControllerName));\n $this->controllerName = $newControllerName;\n if (empty($this->controllerName)) {\n throw new ControllerNotFoundException($this->controllerName);\n }\n $controllerClassName = '\\\\App\\\\Controllers\\\\' . $this->controllerName . 'Controller';\n if (!class_exists($controllerClassName, true)) {\n throw new ControllerNotFoundException($controllerClassName);\n }\n $this->controller = new $controllerClassName();\n }", "title": "" }, { "docid": "5c55dec501b32100e018d6907eb7dbe8", "score": "0.7324489", "text": "private function instantiatingController()\n {\n require_once $this->controllerAddress;\n $this->controllerReflectionInstance = new \\ReflectionClass($this->controllerName);\n $this->controllerInstance = $this->controllerReflectionInstance->newInstance(self::$registry->getInstance());\n\n return;\n }", "title": "" }, { "docid": "88f0e675d297f3f7071faccec51aeb63", "score": "0.71446085", "text": "public function createController()\n\t{\n\t\t// Check class\n\t\tif( class_exists( $this->controller ) ){\n\t\t\t$parents = class_parents( $this->controller );\n\n\t\t\t// Check extends\n\t\t\tif( in_array( 'Controller', $parents ) ){\n\t\t\t\tif( method_exists( $this->controller, $this->action ) ) {\n\t\t\t\t\treturn new $this->controller( $this->action, $this->request );\n\t\t\t\t}else {\n\t\t\t\t\t// Method does not exists.\n\t\t\t\t\techo '<h1>Method does not exist.</h1>';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Base controller not found.\n\t\t\t\techo '<h1>Base controller does not exist.</h1>';\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\t// Controller class does not exist.\n\t\t\techo '<h1>Controller Class does not exist.</h1>';\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "5c91dc3b1249244a16cc74d7a505bf1b", "score": "0.7073886", "text": "public function newController($classname)\n\t{\n\t\treset_instance();\n\t\t$controller = new $classname;\n\t\t$this->CI =& get_instance();\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "eca3728757ec1f1ad666269cd8f83f9e", "score": "0.7040315", "text": "public static function create()\n\t{\n\t\t//check, if an ObjectLogController instance already exists\n\t\tif(ObjectLogController::$objectLogController == null)\n\t\t{\n\t\t\tObjectLogController::$objectLogController = new ObjectLogController();\n\t\t}\n\n\t\treturn ObjectLogController::$objectLogController;\n\t}", "title": "" }, { "docid": "b5d9a9fc298853ca28d1202cbc43c360", "score": "0.6980793", "text": "function newController ($name, $actions=array())\n {\n $this->makeController($name, $actions);\n $this->makeControllerTest($name);\n//$this->makeHelper($name);\n//$this->makeHelperTest($name);\n $this->actions++;\n }", "title": "" }, { "docid": "329839044a72b84e2d36f3ca9222346a", "score": "0.6934752", "text": "private static function initializeController()\n {\n $controllerClass = \"Controllers\\\\\";\n\n if (self::$url[0] === 'api' && JSON_API) {\n $controllerClass .= \"Api\\\\\" . self::$url[1];\n array_shift(self::$url);\n } else {\n $controllerClass .= self::$url[0];\n }\n\n if (!class_exists($controllerClass))\n self::error();\n\n self::$controller = new $controllerClass(self::$url[0]);\n return;\n }", "title": "" }, { "docid": "51e09755bf4d6ecea438a434ba96b145", "score": "0.6861466", "text": "abstract protected function createCtrl();", "title": "" }, { "docid": "49c2ac4744b4a33855d7f47298cd1683", "score": "0.68580323", "text": "private function routerCreateController(Request $request)\n {\n $controllerName = \"Welcome\"; //Default Controller\n\n //Check if inside inside the url there is a controller attribute\n if ($request->requestParamExist('controller')) {\n \n //The controllerName is in fact the class to instance\n $controllerName = $request->requestGetParam('controller');\n\n //First Letter in Uppercase\n $controllerName = ucfirst($controllerName);\n\n }\n\n $controllerClass = \"Controller\" . $controllerName;\n $controllerFile = \"controller/\" . lcfirst($controllerClass) . \".class.php\";\n\n if (file_exists($controllerFile)) {\n //Inclusion of the file related to the controller\n require $controllerFile;\n\n //Creation of the specific object controller\n $controller = new $controllerClass();\n $controller->ctrlSetRequest($request);\n return $controller;\n } else {\n throw new Exception(\"File '$controllerFile' does not exist...\");\n }\n }", "title": "" }, { "docid": "3974afd3580ce29af128b0a576eaefd8", "score": "0.67710364", "text": "public function instance() {\n if(self::$instance != null)\n return self::$instance;\n\n self::$instance = new Controller();\n self::$instance->postConstruct();\n return self::$instance;\n }", "title": "" }, { "docid": "f68abd8527a98967e94ec169adc020ee", "score": "0.67456007", "text": "static public function createController(\\Framework\\Base\\CApplication $application, \\Framework\\Base\\CPackage $package=NULL)\n\t{\n\t\t$class = get_called_class();\n\t\t$controller = new $class;\n\n\t\t//Initialize\n\t\t$controller->_application = $application;\n\t\t$controller->_package = $package;\n\t\t$controller->initialize();\n\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "2f999e0458c3c949c126d23b44de7a59", "score": "0.6743401", "text": "public function getInstance()\n {\n $class = 'controllers\\\\' . $this->defaultController;\n\n $this->controllerInstance = $this->factory->getInstance($class, $this->model);\n\n }", "title": "" }, { "docid": "ca74c8c8942ecfedcc6427bd19dca826", "score": "0.67088264", "text": "private static function getController() {\n\t\t// Extrae las variables para manipularlas facilmente\n\t\textract(self::$_vars, EXTR_OVERWRITE);\n\t\tif (!include_once \"$default_path{$dir}/$controller_path{$suffix}\") {\n\t\t\tthrow new KumbiaException(null, 'no_controller');\n\t\t}\n\t\t//Asigna el controlador activo\n\t\t$app_controller = Util::camelcase($controller) . 'Controller';\n\t\treturn new $app_controller(self::$_vars);\n\t}", "title": "" }, { "docid": "1d079165142c8f5b61fda404bef8cf95", "score": "0.66686845", "text": "protected function createController($input)\n {\n $this->call('api-docs:create-controller', [\n 'model-name' => $input->modelName,\n '--controller-name' => $input->controllerName,\n '--controller-directory' => $input->controllerDirectory,\n '--views-directory' => $input->viewDirectory,\n '--resource-file' => $input->resourceFile,\n '--routes-prefix' => $input->prefix,\n '--language-filename' => $input->languageFilename,\n '--with-auth' => $input->withAuth,\n '--template-name' => $input->template,\n '--controller-extends' => $input->controllerExtends,\n '--api-version' => $input->apiVersion,\n '--force' => $input->force,\n ]);\n\n return $this;\n }", "title": "" }, { "docid": "a80489cea5dae649938a1d958e54b8d4", "score": "0.6667862", "text": "private function get_controller_instance()\n {\n $default_path = 'Controller\\\\' . str_replace(DIRECTORY_SEPARATOR, '\\\\', $this->controller);\n\n $module = App::get_instance()->get_module();\n if (isset($module)) {\n $module_path = 'Module\\\\' . ucfirst(strtolower($module)) . '\\\\' . $default_path;\n if (class_exists($module_path)) {\n return new $module_path();\n }\n }\n\n if (!class_exists($default_path)) {\n Error::set(sprintf(self::ERROR_NO_CONTROLLER_FILE, $this->controller, $default_path));\n }\n\n return new $default_path();\n }", "title": "" }, { "docid": "52644d10d1bc3ff963d55315b9df0c74", "score": "0.6629744", "text": "public function getController() {\r\n // does the controller exist? if not use the default one\r\n !class_exists($classname = $this->getControllerName()) &&\r\n $classname = $this->getHttpControllerName();\r\n // create and instance of the controller and return it.\r\n return new $classname();\r\n }", "title": "" }, { "docid": "ca3e59e378c7458cc08e303f4b589fd3", "score": "0.6569274", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n # 2. Call the worker method\n $results = $this->worker($this->args);\n if ($results) {\n $_SESSION[\"template_id\"] = $results[\"template_id\"]; # Save for use by other examples\n $msg = $results['created_new_template'] ? \"The template has been created!\" :\n \"Done. The template already existed in your account.\";\n\n $this->clientService->showDoneTemplate(\n \"Template results\",\n \"Template results\",\n \"{$msg}<br/>Template name: {$results['template_name']}, \n ID {$results['template_id']}.\"\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "327c5a4ac5efbaf00ca243bbe23ebeaf", "score": "0.6561111", "text": "private function _buildController()\n {\n $request = new ServerRequest(['url' => '/debug-kit/']);\n\n $resolver = new OrmResolver();\n $authorization = new AuthorizationService($resolver);\n\n $request = $request->withAttribute('authorization', $authorization);\n\n return new DebugKitController($request);\n }", "title": "" }, { "docid": "ba1142b5f45e71d09db2133676ac3d35", "score": "0.65382", "text": "private function createController( $controllerName, ParameterHolder $variables = null )\n\t{\n\t\tif ( ! $this->getApplication()->hasController( $controllerName ) )\n\t\t\tthrow new ENotFound( 'Controller ' . $controllerName . ' was not found' );\n\t\t\n\t\tif( !in_array($controllerName, get_declared_classes()) )\n\t\t\tinclude Core::getApp()->getAppDir() . '/controllers/' . $controllerName . '.php';\n\t\t\t\n\t\t$controller = new $controllerName();\n\t\t$variables = $this->addGlobalVariables( $variables );\n\t\t$controller->setVariables( $variables );\n\t\t\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "e4bee37b6de8aa2aa700d6d9e93f0b59", "score": "0.65264225", "text": "public function getController() {\n $page = ($_GET['page']) ? $_GET['page'] : 'index';\n $page = rtrim($page, '/');\n $this->url = explode('/', $page);\n if (isset($this->url[0])) {\n $this->file = ROOT . '/app/controllers/' . ucfirst($this->url[0]) . 'Controller.php';\n if (is_readable($this->file)) {\n $name = ucfirst($this->url[0]) . 'Controller';\n $this->controller = new $name($this->registry);\n } else {\n $this->controller = new Index($this->registry);\n }\n }\n }", "title": "" }, { "docid": "4cd2692263f0a72ac758bcdd2b6c8bd9", "score": "0.648266", "text": "protected function _createAction($name)\n {\n // actually instantiate the controller ourselves. \n }", "title": "" }, { "docid": "7f685731d8003e8f0f7e338a716bf03b", "score": "0.6479473", "text": "public function makeInstanceFor($controller)\n {\n $name_spaced_class = app()->getNamespace('Controllers') . $controller;\n\n return app()->make( $name_spaced_class );\n }", "title": "" }, { "docid": "4d581822ecf2c0e1204dce5491b0f836", "score": "0.6443955", "text": "protected function makeController()\n {\n try {\n /**\n * @var $bundle BundleAbstract\n */\n $bundle = $this->manager->driver($this->route->getModule());\n if ( ! $bundle) {\n abort(404, \"App {$this->route->getModule()} does not found.\");\n }\n\n $controller = $bundle->getControllerClassName($this->route->getController());\n \n return $controller;\n } catch (InvalidArgumentException $e) {\n abort(404, $e->getMessage());\n }\n }", "title": "" }, { "docid": "c693be6a5c4a34690da6440e1bce78fb", "score": "0.63981384", "text": "public static function create($view = NULL,$controller = NULL)\n\t{\n\t\t$inst = new static($view,$controller);\n\t\treturn $inst;\n\t}", "title": "" }, { "docid": "7e92549b871cc14a1b7b5fc77a33d041", "score": "0.63919276", "text": "protected function makeController()\n {\n $class = $this->qualifyClass($this->getNameInput());\n\n // get the destination path, based on the default namespace\n $path = $this->getPath($class);\n\n $content = file_get_contents($path);\n\n // Update the file content with additional data (regular expressions)\n\n file_put_contents($path, $content);\n }", "title": "" }, { "docid": "4e5f9593b8d7ff86dd604d523cf6b2e6", "score": "0.6384683", "text": "private function generateController($args, $assoc_args) {\n\n // Get current theme path\n $path = get_stylesheet_directory();\n\n // Get current theme\n $currentTheme = wp_get_theme();\n\n // Ask to user all the needed informations\n $newController = [\n 'namespace' => str_replace(' ', '', $currentTheme->get('Name')),\n 'class_name' => (isset($assoc_args['name'])) ? $assoc_args['name'] : WPCLIHook::askToUser('Controller class name ?'),\n 'example' => (isset($assoc_args['example'])) ? $assoc_args['example'] : WPCLIHook::askForUserCommit('Do you want example code inside ?', 'n'),\n ];\n\n // Create the controller\n WPCLIHook::generateFile($path . '/controllers/' . $newController['class_name'] . '.php' , 'controllers/controller.twig', $newController);\n\n // Success !\n WP_CLI::success('Your new controller has been generated !');\n }", "title": "" }, { "docid": "066797975e46a454f2e2b0c0127e7005", "score": "0.6377724", "text": "public function createController($pi, array $params)\n {\n $depends = include __DIR__ . '/depends.php';\n $container = new Container($depends);\n $class = __NAMESPACE__ . '\\Controller\\\\' . ucfirst($params['page']);\n\n return $container->get($class);\n }", "title": "" }, { "docid": "f4ed1d907787c34bb5e894567487c782", "score": "0.63736033", "text": "private function createClass($classname, $params = []) {\r\n try{\r\n eval(\"\\$controller = new App\\\\Controllers\\\\$classname();\"); \r\n } catch (MyException $ex) {\r\n throw new MyException($ex->getMessage());\r\n }\r\n return $controller;\r\n }", "title": "" }, { "docid": "9c7fd24776757cd267c3264207299f5d", "score": "0.63327956", "text": "public function loadController() : ControllerInterface\n {\n $controllerLoader = $this->getContainer()->newControllerLoader();\n $controllerPath = $controllerLoader->load($this);\n return $this->getContainer()->newController($controllerPath, $this->getParam(), $this->getContainer());\n }", "title": "" }, { "docid": "0b4306ca6060d6fe55a3dd464d640c55", "score": "0.6317969", "text": "function control($controller) \n {\n $path = $_SERVER['DOCUMENT_ROOT'];\n require_once $path. '/controllers/'. $controller . '.php';\n return $controller = new $controller;\n }", "title": "" }, { "docid": "95d295caf8acb2b16d46b02718549031", "score": "0.63173693", "text": "protected function createController($input)\n {\n if (!$this->option('without-controller')) {\n $this->call(\n 'create:controller',\n [\n 'model-name' => $input->modelName,\n '--controller-name' => $input->controllerName,\n '--controller-directory' => $input->controllerDirectory,\n '--controller-extends' => $input->controllerExtends,\n '--model-directory' => $input->modelDirectory,\n '--views-directory' => $input->viewsDirectory,\n '--resource-file' => $input->resourceFile,\n '--models-per-page' => $input->perPage,\n '--routes-prefix' => $input->prefix,\n '--language-filename' => $input->languageFileName,\n '--with-form-request' => $input->formRequest,\n '--without-form-request' => $this->option('without-form-request'),\n '--form-request-directory' => $input->formRequestDirectory,\n '--with-auth' => $input->withAuth,\n '--template-name' => $input->template,\n '--force' => $input->force,\n ]\n );\n }\n\n return $this;\n }", "title": "" }, { "docid": "192c93a33f0c5ed44e6079dafbae9d34", "score": "0.63150513", "text": "protected function initController($class_name) {\n\t\t$instance = new $class_name;\n\t\tif (is_a($class_name, Controller::class, true)) {\n\t\t\t/** @var \\Sm\\Controller\\Controller $instance */\n\t\t\tif (isset($this->layerRoot)) {\n\t\t\t\t$instance->setLayerRoot($this->layerRoot);\n\t\t\t}\n\t\t\treturn $instance->proxy();\n\t\t}\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "69d20c011feba8ffd9af05c533dd493b", "score": "0.62830395", "text": "protected function loadController()\n {\n if (file_exists('../app/controllers/' . $this->url[0] . 'Controller.php')) {\n $this->controller = $this->url[0];\n unset($this->url[0]);\n }\n $path = '\\Vincent\\App\\Controllers' . '\\\\' . $this->controller . 'Controller';\n\n $this->controller = new $path;\n }", "title": "" }, { "docid": "c406bf6c1afc4cbe19e37510b1579c62", "score": "0.6275971", "text": "public function createScaffoldController()\n {\n $routeInfo = Stub::make(\n 'Slick\\Mvc\\Router\\RouteInfo',\n [\n 'getController' => function() {\n return 'Mvc\\MyScaffoldController';\n }\n ]\n );\n $application = Stub::make(\n 'Slick\\Mvc\\Application',\n [\n 'getRequest' => function() {return new Request(); },\n 'getResponse' => function() {return new Response(); }\n ]\n );\n $dispatcher = new Dispatcher(\n [\n 'routeInfo' => $routeInfo,\n 'application' => $application\n ]\n );\n /** @var Scaffold $scaffold */\n $scaffold = $dispatcher->getController('index');\n $this->assertInstanceOf('Slick\\Mvc\\Scaffold', $scaffold);\n $this->assertInstanceOf(\n 'Mvc\\MyScaffoldController',\n $scaffold->getController()\n );\n\n $this->assertEquals('Models\\MyScaffoldController', $scaffold->modelName);\n $this->assertEquals('myScaffoldControllers', $scaffold->get('modelPlural'));\n $this->assertEquals('myScaffoldController', $scaffold->get('modelSingular'));\n $scaffold->setModelName(\"Models\\\\User\");\n $this->assertEquals('users', $scaffold->get('modelPlural'));\n $this->assertEquals('user', $scaffold->get('modelSingular'));\n }", "title": "" }, { "docid": "09fcfbaced98d3a3b6e8fc6a4760464f", "score": "0.6271607", "text": "function loadController() {\n\t\t$name = ucfirst($this->request->controller) . 'Controller';\n\t\t$file = ROOT . DS . 'controller' . DS . $name . '.php';\t\n\t\tif(!file_exists($file)){\n\t\t\t$this->error('The controller ' . $this->request->controller . ' doesn\\'t exists.');\n\t\t}\n\t\trequire_once $file;\n\t\t$controller = new $name($this->request);\n\t\treturn $controller;\n\n\t}", "title": "" }, { "docid": "f6e27c86859574cfa1233c5a78b2b019", "score": "0.6262631", "text": "public static function getController() {\r\n\t\tsession_start();\r\n\t\tif(!isset($_SESSION['controller'])){\r\n\t\t\treturn new Controller();\r\n\t\t}\r\n\t\r\n\t\t$contrl = unserialize($_SESSION['controller']);\r\n\t\t$contrl->DBH = DBH::getDBH();\r\n\t\t$contrl->conn = $contrl->DBH->createConnection();\r\n\t\treturn $contrl;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "4830f68fecfedcf86a437277fb767486", "score": "0.625451", "text": "public static function getController() {\n if (isset($_SESSION[self::CONTROLLER_KEY])) {\n return unserialize($_SESSION[self::CONTROLLER_KEY]);\n } else {\n return new Controller();\n }\n }", "title": "" }, { "docid": "e8827147f726b2b1b5b2a43ca7592dba", "score": "0.62485546", "text": "protected function fetchController()\n\t{\n\t\t$base = 'JacliControllerweb';\n\n\t\t$sub = strtolower($this->input->get('do', 'default'));\n\n\t\t$className = $base . ucfirst($sub);\n\n\t\t// If the requested controller exists let's use it.\n\t\tif (class_exists($className))\n\t\t{\n\t\t\treturn new $className($this->input, $this);\n\t\t}\n\n\t\t// Nothing found. Panic.\n\t\tthrow new InvalidArgumentException('Controller not found: ' . $sub, 400);\n\t}", "title": "" }, { "docid": "d4d7a0842024fd570678215b09c25e8c", "score": "0.62286484", "text": "public function createController($serviceName)\n {\n $module = $this->module;\n $version = $this->moduleEntity->getLatestVersion();\n $serviceName = str_replace(\"\\\\\", \"/\", $serviceName);\n\n $srcPath = $this->modules->getRpcPath($module, $version, $serviceName);\n\n if (! file_exists($srcPath)) {\n mkdir($srcPath, 0775, true);\n }\n\n $className = sprintf('%sController', $serviceName);\n $classPath = sprintf('%s/%s.php', $srcPath, $className);\n $controllerService = sprintf('%s\\\\V%s\\\\Rpc\\\\%s\\\\Controller', $module, $version, $serviceName);\n\n if (file_exists($classPath)) {\n throw new Exception\\RuntimeException(sprintf(\n 'The controller \"%s\" already exists',\n $className\n ), 409);\n }\n\n $view = new ViewModel([\n 'module' => $module,\n 'classname' => $className,\n 'servicename' => $serviceName,\n 'version' => $version,\n ]);\n\n $resolver = new Resolver\\TemplateMapResolver([\n 'code-connected/rpc-controller' => __DIR__ . '/../../view/code-connected/rpc-controller.phtml',\n ]);\n\n $view->setTemplate('code-connected/rpc-controller');\n $renderer = new PhpRenderer();\n $renderer->setResolver($resolver);\n\n if (\n ! file_put_contents(\n $classPath,\n \"<\" . \"?php\\n\" . $renderer->render($view)\n )\n ) {\n return false;\n }\n\n $fullClassFactory = $this->createFactoryController($serviceName);\n\n $this->configResource->patch([\n 'controllers' => [\n 'factories' => [\n $controllerService => $fullClassFactory,\n ],\n ],\n ], true);\n\n $fullClassName = sprintf('%s\\\\V%s\\\\Rpc\\\\%s\\\\%s', $module, $version, $serviceName, $className);\n\n return (object) [\n 'class' => $fullClassName,\n 'file' => $classPath,\n 'service' => $controllerService,\n ];\n }", "title": "" }, { "docid": "f1888b936abcf09238c317502b1bd3e9", "score": "0.6219922", "text": "function makeController ($name, $actions)\n {\n $ctrl = $this->makeControllerName($name);\n $helper = $this->makeHelperName($name);\n//$body = sprintf($this->template('ctrl'), $ctrl, $helper, join('', $this->getActions($actions)));\n $body = sprintf($this->template('ctrl'), $ctrl, 'AppController', join('', $this->getActions($actions)));\n return $this->createFile($this->makeControllerFn($name), $body);\n }", "title": "" }, { "docid": "f4c984829486c72438da3281069ae636", "score": "0.6208644", "text": "protected function _loadController()\n {\n require_once($this->_router->controller('path'));\n $controller_name = $this->_router->controller('name');\n $this->_controller = new $controller_name();\n return $this;\n }", "title": "" }, { "docid": "87f0f87b8b4a611f2d35ff19c87c2911", "score": "0.6200526", "text": "function __construct()\n {\n $this->getUrlData();\n\n // chamar controller necessario\n\n // Validar controller\n $control = explode('-', $this->controller);\n $this->controller = null;\n foreach ($control as $key => $value) {\n $this->controller .= ucfirst($value);\n }\n\n $this->controller .= \"Controller\";\n\n\n // Verificar arquivo de controller\n if (!file_exists(CONTROL_PATH . \"/{$this->controller}.php\")) {\n require_once VIEWS_PATH . \"/not-found.view.php\";\n echo (DEBUG) ? \" Controller File.\" : \"\";\n return;\n }\n \n // Verificar classe do controller\n require CONTROL_PATH . \"/{$this->controller}.php\";\n\n if (!class_exists($this->controller))\n {\n require_once VIEWS_PATH . \"/not-found.view.php\";\n echo (DEBUG) ? \" Controller Class.\" : \"\";\n\n return;\n }\n\n // Instaciar classe\n $this->controller = new $this->controller($this->params);\n\n // checar se o metodo existe e chama-lo\n if(method_exists($this->controller, $this->action)) {\n $this->controller->{$this->action}($this->params);\n } else {\n include VIEWS_PATH . \"/not-found.view.php\";\n echo (DEBUG) ? \" Controller Method.\" : \"\";\n\n return;\n }\n }", "title": "" }, { "docid": "9d2e2e596532cfa07a3bccf70eecfc4b", "score": "0.6150541", "text": "protected function createController($controller)\n {\n if (strpos($controller, '::') === false) {\n throw new \\InvalidArgumentException(sprintf(\n 'Unable to find controller \"%s\".',\n $controller\n ));\n }\n\n list($class, $method) = explode('::', $controller, 2);\n\n if (!class_exists($class)) {\n throw new \\InvalidArgumentException(sprintf('Class \"%s\" does not exist.', $class));\n }\n\n $object = new $class();\n if ($object instanceof RouterAwareInterface) {\n $object->setRouter($this->getRouter());\n }\n\n if ($object instanceof AuthenticationManagerAwareInterface) {\n $object->setAuthenticationManager($this->getAuthenticationManager());\n }\n\n if ($object instanceof AssetManagerAwareInterface) {\n $object->setAssetManager($this->getAssetManager());\n }\n\n if ($object instanceof CacheAwareInterface) {\n $object->setCache($this->getCache());\n }\n\n if ($object instanceof MailerFactoryAwareInterface) {\n $object->setMailerFactory($this->getMailerFactory());\n }\n\n return array($object, $method);\n }", "title": "" }, { "docid": "45119e94435849a78a367dcc7b0ddf87", "score": "0.6124701", "text": "public function __construct()\n {\n $this->reflection = new ReflectionController($this);\n }", "title": "" }, { "docid": "4a886996ac043ab47b9dd0a67f581016", "score": "0.61033434", "text": "function getController($controller_name, $application_name = null) {\n $application = $application_name === null ? $this->getRequest()->getApplicationName() : $application_name;\n \n $controller_class = $this->getControllerClass($controller_name);\n $controller_file = $this->getControllerPath($controller_class, true, $application);\n \n if(!is_file($controller_file)) {\n throw new Angie_FileSystem_Error_FileDnx($controller_file);\n } // if\n \n require $controller_file;\n \n $reflection = new ReflectionClass($controller_class);\n if($reflection->isAbstract()) {\n throw new Angie_Controller_Error_ControllerDnx($controller_name);\n } // if\n \n $controller = new $controller_class();\n if(!($controller instanceof Angie_Controller)) {\n throw new Angie_Core_Error_InvalidInstance('controller', $controller, 'Angie_Controller');\n } // if\n \n $controller->setEngine($this);\n \n return $controller;\n }", "title": "" }, { "docid": "f7317f196db89d310f34ef59ad671104", "score": "0.6079934", "text": "function GetController(){}", "title": "" }, { "docid": "f7317f196db89d310f34ef59ad671104", "score": "0.6079934", "text": "function GetController(){}", "title": "" }, { "docid": "393b95d027e6b0f5d4ad48e6a5014268", "score": "0.6063041", "text": "public function loadController()\n {\n $name = $this->request->controller . \"Controller\";\n $file = ROOT . 'Controllers/' . ucfirst($name) . '.php';\n if(file_exists($file)){\n require($file);\n $controller = new $name();\n return $controller;\n }\n else\n Router::show_nonexistent_controller($this->request->controller);\n }", "title": "" }, { "docid": "4280a305cbdb209a527848a4c0b4ea8f", "score": "0.60438424", "text": "protected function generateControllerClassFile()\n {\n $this->createFiles(\n 'controller',\n app_path().'/Http/Controllers/'.$this->controllerName.'Controller.php'\n );\n }", "title": "" }, { "docid": "066c5e7d9b4d964f842b85e2fee30558", "score": "0.6036674", "text": "public function controller(): ControllerInterface;", "title": "" }, { "docid": "734abea6f625ed156d6d5901dc421f2c", "score": "0.603352", "text": "private function _loadExistingController()\n {\n $file = ROOT . DS . 'application' . DS . 'Controllers' . DS . $this->_url[0] . '.php';\n \n if (file_exists($file)) {\n require $file;\n $newclassname = preg_replace('#[-_]#i', \"\", $this->_url[0]);\n $this->_controller = new $newclassname();\n // $this->_controller->loadModel($this->_url[0]);\n } else {\n // Send the value as a param into index\n require ROOT . DS . 'application' . DS . 'Controllers' . DS .'index.php';\n $this->_controller = new Index();\n $method = new ReflectionMethod('Index', 'index');\n $param = $method->getParameters();\n if (isset($this->_url[0]) && method_exists('Index', $this->_url[0]))\n {\n array_unshift($this->_url, 'index');\n $this->_controller = new Index();\n $this->_callControllerMethod();\n }\n else if ( $param )\n {\n //Echo from index class as param\n $this->_controller->index($this->_url[0]);\n return false;\n }\n else\n {\n self::_error();\n return false;\n }\n }\n }", "title": "" }, { "docid": "923d2f54c540129455c1ecd1fe4ce820", "score": "0.603326", "text": "public function __construct() {\r\n $url = $this->parseURL();\r\n\r\n // Verificando se existe um controller com o mesmo nome do indice 1 da url\r\n if( file_exists('../App/Controllers/' . $url[1] . '.php') ) {\r\n $this->controller = $url[1];\r\n unset($url[1]);\r\n }\r\n\r\n // chamando o controller atualizado (arquivo referente ao 1 parâmetro da url)\r\n require_once '../App/Controllers/' . $this->controller . '.php';\r\n // Atributo controller agora é um objeto(class)\r\n $this->controller = new $this->controller;\r\n\r\n // Verificando de existe o parâmetro 2 da url\r\n if( isset($url[2]) ) {\r\n // Verificando se existe o método(function) dentro do Objeto(controller/class)\r\n if( method_exists($this->controller, $url[2]) ) {\r\n $this->method = $url[2];\r\n unset($url[2]);\r\n unset($url[0]);\r\n }\r\n }\r\n\r\n // Se a URL tiver valores(parâmetros) irá atribuir ao atributo $this->parameter, caso não exista ele continuará vazio\r\n $this->parameter = $url ? array_values($url) : [];\r\n\r\n // Executando método que está dentro do controller p/ acessar url\r\n call_user_func_array([$this->controller, $this->method], $this->parameter);\r\n\r\n }", "title": "" }, { "docid": "21e9c02c959d2ec1baae7f031e40fe7c", "score": "0.6025279", "text": "private static function createController(array $c, string $template = ''): ?object\n {\n if (!isset($c['controllerPath']) || !is_file($c['controllerPath'])) {\n return null;\n }\n require_once apply_filters('Municipio/blade/controller', $c['controllerPath']);\n\n do_action_deprecated(\n 'Municipio/blade/after_load_controller',\n $template,\n '3.0',\n 'Municipio/blade/afterLoadController'\n );\n return new $c['controllerClass']();\n }", "title": "" }, { "docid": "79766bf1ac1d64645ab50c9e6f7801ed", "score": "0.60204715", "text": "public function getController(): IController {\n\n //Get controller path from url if exists\n\n $controller = '';\n\n if(array_key_exists('url', $_GET)) {\n $controller = $_GET['url'];\n }\n\n //Get url query if exists\n\n $params = [];\n \n $parsedURL = parse_url($_SERVER['REQUEST_URI']);\n if(array_key_exists('query', $parsedURL)) {\n parse_str($parsedURL['query'], $params);\n }\n\n /*\n ** Check if controller's file exist\n **\n ** If exitsts return controller instance\n ** If no return error controller instance with status 404\n */\n if (file_exists(\"../app/controllers/$controller.controller.php\")) {\n $controllerName = ucwords($controller) . \"Controller\";\n $controllerClassName = \"App\\\\Controllers\\\\$controllerName\";\n return new $controllerClassName($params);\n } else {\n return new ErrorController(['status' => 404]);\n }\n\n }", "title": "" }, { "docid": "af3c1bb0c5224a9f0b1f672d730e1cb6", "score": "0.60201246", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n $_SESSION[\"envelope_id\"] = $results[\"envelope_id\"]; # Save for use by other examples\n # which need an envelope_id\n $this->clientService->showDoneTemplate(\n \"Envelope sent\",\n \"Envelope sent\",\n \"The envelope has been created and sent!<br/> Envelope ID {$results[\"envelope_id\"]}.\"\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "34ab83a087350a342f5a35be49c8eb8b", "score": "0.6012155", "text": "public function resolveController(): Application {\n $this->controller = new \\NexusMedia\\Controllers\\IndexController();\n\n return $this; \n }", "title": "" }, { "docid": "07644af412d7807ebccede227597b44d", "score": "0.60047436", "text": "public function controller($args)\n {\n list($name) = $args;\n\n $this->createFile($this->controller, $name);\n }", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "3c14eeba0b95f01a692051115d939f28", "score": "0.59845185", "text": "public function init()\n {\n return new AppController();\n }", "title": "" }, { "docid": "579fe59226e2f901c2f5ee57fc901124", "score": "0.59749824", "text": "public function run(string $controllerName): ControllerInterface;", "title": "" }, { "docid": "ded3a0219bb7e0dd55163351a0c41968", "score": "0.5968325", "text": "private function setUpController()\n {\n $this->controller = new TestObject(new EmailController);\n }", "title": "" }, { "docid": "d7b291bf8dc50cf9045bb9118e865959", "score": "0.5963816", "text": "public function testCreateTheControllerClass()\n {\n $controller = new GameController();\n $this->assertInstanceOf(\"App\\Http\\Controllers\\GameController\", $controller);\n }", "title": "" }, { "docid": "cbe715cd619d5826e1d312986f06c0bd", "score": "0.59633714", "text": "function __construct() {\n $url = $_SERVER['REQUEST_URI'];\n $url = explode('/', $url);\n $controllerName = (empty($url[1]) ? 'main' : $url[1]);\n $action = (empty($url[2]) ? 'index' : $url[2]);\n $paramAction = (empty($url[3]) ? '' : $url[3]);\n\n //load controller\n $controllerPath = 'controllers/' . $controllerName . '.php';\n if (file_exists($controllerPath)) {\n require_once($controllerPath);\n $controller = new $controllerName();\n } else {\n $this->error();\n }\n\n //start controller's action\n if (method_exists($controller, $action)) {\n $controller->$action($paramAction);\n } else {\n $this->error();\n }\n\n }", "title": "" }, { "docid": "c850c51c3a3ac3506a810383dcbaf4cf", "score": "0.59614325", "text": "public function testCreateTheControllerClass()\n {\n $controller = new HighscoreController();\n $this->assertInstanceOf(\"App\\Http\\Controllers\\HighscoreController\", $controller);\n }", "title": "" }, { "docid": "fb18ee5e5eb0dfe54308bb000955b18b", "score": "0.59576255", "text": "protected function createController(Am_Mvc_Request $request, Am_Mvc_Response $response, array $invokeArgs)\n {\n return new Am_Mvc_Controller_CreditCard($request, $response, $invokeArgs);\n }", "title": "" }, { "docid": "4e33211305398101ae2c45530f1d32fd", "score": "0.5949818", "text": "public function createInstance();", "title": "" }, { "docid": "871f3866889ef8a981643b4e5dc0cc3a", "score": "0.59350246", "text": "public function create()\n\t{\n\t\t//\n\t\t$this->index();\n\t}", "title": "" }, { "docid": "ce333842fd00cce31fe687a2bc0b7e04", "score": "0.5933754", "text": "public function get_instance() {\n\t\t$shortcode = new WCC_Controller();\n\t\treturn $shortcode;\n\t}", "title": "" }, { "docid": "fb9f61fb5c627165f1ed61bfe9a10896", "score": "0.59290874", "text": "public function createController($name, $path, $modelFilds)\n {\n if (!File::exists($path)) {\n File::makeDirectory($path);\n }\n if (!File::exists($path . '/' . ucfirst($name) . 'Controller' . '.php')) {\n File::put($path . '/' . ucfirst($name) . 'Controller' . '.php',\n $this->contentsController($name, $modelFilds));\n }\n }", "title": "" }, { "docid": "9c60fbff64810741d378ec324a56be82", "score": "0.59013796", "text": "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "title": "" }, { "docid": "1f418582d14b380181fe472b61c02e1e", "score": "0.5899612", "text": "public function testCreateCrossDomainController()\n {\n $factory = new CrossDomainControllerFactory();\n\n $this->assertInstanceOf(\n 'Evolver\\CrossDomainPolicyModule\\Controller\\CrossDomainController',\n $factory->createService($this->getControllerManager())\n );\n }", "title": "" }, { "docid": "d27f3b04c973759bf3ef7f5f34bb5a00", "score": "0.58890206", "text": "public function gotoController()\n {\n $controllerName = $this->controllerName;\n $controller = new $controllerName($this->request);\n $controller->start();\n }", "title": "" }, { "docid": "5554a9f6d544359e0b8b48ebfa60f3d2", "score": "0.58850133", "text": "function CreateBookCtrl(){}", "title": "" }, { "docid": "81d3306a319c40d3d7f82d968f8270c0", "score": "0.58844244", "text": "private function createController($rootDIR,$filename){\n\t\t$model=\"\";\n\t\tif(!file_exists (\"$rootDIR/controllers/$filename.php\")){\n\t\t\t$className = ucfirst($filename);\n\t\t\t$file = fopen(\"$rootDIR/controllers/$filename.php\", \"w\");\n\t\t\t$code = \"<?php\\nclass $className extends Controller{\n\tpublic function index(){\n\t\\t\\$this->model('\".$className.\"_model');\n\t\\t\\$this->view('\".lcfirst($className).\"/');\n\t}\\n}\";\n\t\t\tfwrite($file, $code);\n\t\t\tfclose($file);\n\t\t}\n\t}", "title": "" }, { "docid": "e13c840e8fd2a9bc6a490a02a639b308", "score": "0.58778536", "text": "public static function controller( ShortCircuit\\Iface\\Controller $controller = NULL ){\n if( $controller ) return self::$controller = $controller;\n if( isset( self::$controller ) ) return self::$controller;\n return self::$controller = new ShortCircuit\\Controller();\n }", "title": "" }, { "docid": "1d2d221813a253d51bef990a6fc529cc", "score": "0.5874336", "text": "public function __construct(){\n $url = self::getUrl();\n\n if(file_exists('app/controllers/' . ucwords($url[0]) . '.php')){\n $this->_sController = ucwords($url[0]); \n unset($url[0]);\n }\n\n require_once 'app/controllers/' . $this->_sController . '.php';\n\n /* Once the controller CLASS has been included; it MUST be instantied. */\n $this->_sController = new $this->_sController;\n\n if(isset($url[1])){\n if(method_exists($this->_sController, $url[1])){\n $this->_sMethod = $url[1];\n unset($url[1]);\n }\n }\n\n $this->_sParams = $url ? array_values($url) : [];\n\n call_user_func_array([$this->_sController, $this->_sMethod], $this->_sParams);\n }", "title": "" }, { "docid": "1b52994a7fbc4ca996ff3cad7deaa398", "score": "0.5864504", "text": "protected function controller($controller)\n {\n $controllerClass = ucwords(strtolower($controller)) . 'Controller';\n\n if (isset($this->controllers[$controllerClass])) {\n return $this->controllers[$controllerClass];\n }\n\n $controllerClassWithNamespace = WalrusAutoload::getNamespace($controllerClass);\n\n if (!$controllerClassWithNamespace) {\n throw new WalrusException('Request unexistant controller: ' . $controllerClass);\n }\n\n $controllerInstance = new $controllerClassWithNamespace();\n $this->controllers[$controllerClass] = $controllerInstance;\n\n return $controllerInstance;\n }", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5853714", "text": "public function create() {}", "title": "" }, { "docid": "e44f971995eca73a8826da691dae1adf", "score": "0.5846056", "text": "private function setUpController()\n {\n $this->controller = new TestObject(new DraftControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "title": "" }, { "docid": "f09fe770c4a5d3a1e9b36cbc66c147d3", "score": "0.5843174", "text": "public function __construct()\n {\n Debug::log('Controller Constructing: ' . get_class($this));\n }", "title": "" }, { "docid": "5e6e33ae3c8a05474747aa95e8a9f940", "score": "0.58424336", "text": "public function __construct()\n {\n $url = $this->parseUrl();\n //check if controller file exist or not\n if(file_exists('../app/controller/'.$url[0].'.php'))\n {\n $this->controller = $url[0];\n unset($url[0]);\n }\n\n\n //getting and creating instance of the class of the controller\n require_once '../app/controller/'.$this->controller.'.php';\n\n $this->controller = new $this->controller;\n\n //check if the method exist in the controller class\n if(isset($url[1]))\n {\n if(method_exists($this->controller, $url[1]))\n {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n //storing the parameters in parms\n $this->parms = $url ? array_values($url) : [];\n\n //calling the method of the class controller and sending the parameters as array\n call_user_func_array([$this->controller, $this->method], [$this->parms]);\n }", "title": "" }, { "docid": "2c6140bc036a1a781349473f21d0f92f", "score": "0.5841192", "text": "private static function defineController(): void\n {\n // Get controller file name\n self::$controllerFile = URI::parseURI();\n\n if (is_null(self::$controllerFile) || !file_exists(self::$controllerFile)) {\n return;\n }\n\n // Validate the URI and load the controller.\n URI::validateURI();\n self::defineControllerName();\n }", "title": "" }, { "docid": "7e8c84e34b1b3ed7d010923d9de5dd4d", "score": "0.5838518", "text": "static public function create() {\n\t\t\t$class = get_called_class();\n\t\t\treturn new $class();\n\t\t}", "title": "" }, { "docid": "8d6cb090a6c1a20284ea36aecb5551fe", "score": "0.58371085", "text": "public function actionCreate()\n {\n try {\n $this->getListAction();\n $model = new Controllers();\n // Validate ajax (unique controller name)\n if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ActiveForm::validate($model);\n }\n if ($model->load(Yii::$app->request->post())) {\n $model->handleBeforeSave();\n $model->save();\n// $mUser = Users::find()->where(['id' => Yii::$app->user->id])->one();\n// $mUser->initSessionBeforeLogin();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n } catch (Exception $exc) {\n Checks::catchAllExeption($exc);\n }\n }", "title": "" }, { "docid": "0cf1a701f7b04845c50115d2d90aa008", "score": "0.58340716", "text": "public function createNodeController($name);", "title": "" }, { "docid": "d273fa87563cd8218b9f0480e1187254", "score": "0.581919", "text": "public static function create(EventDispatcherInterface $dispatcher, array $controllerNamespaces, array $controllerDependencies = [])\n {\n return new static(new ControllerFactory($controllerNamespaces, $controllerDependencies), $dispatcher);\n }", "title": "" }, { "docid": "4b8a4930dd1babc59aa3a66b3f26d5ab", "score": "0.58185947", "text": "static public function Create()\n\t{\n\t\t$class = get_called_class();\n\t\t$app = new $class();\n\t\treturn $app;\n\t}", "title": "" }, { "docid": "db751810a98b2d38d4b73c4cc9bdc69f", "score": "0.58155453", "text": "public function create($context = '') {\n $this->addMapAssets();\n return $this->asExtension('FormController')->create($context);\n }", "title": "" }, { "docid": "b04183e214fc1631cf18e7b6a5fa312e", "score": "0.5800368", "text": "public static function load_controller() {\n\t\t// Controller Base Class.\n\t\t self::load_file( 'class-controller.php', 'classes' );\n\t\t new treitusQuote_Controller();\n\t}", "title": "" }, { "docid": "4c2a5dc739a7c63f312f03f70490959e", "score": "0.5798873", "text": "public function controller($filename)\n\t{\n\t\tif (file_exists( $this->config->load('controllerPath') . '/' . $filename . '.php' ))\n\t\t{\n\t\t\t$class = '\\\\Serene\\\\Controllers\\\\' . $filename;\n\t\t\treturn new $class($this, $this->config);\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "8003053b2dc7af87e904b56b30ec89d4", "score": "0.5785981", "text": "function getController($request, $resources) {\n\t$realPath = realpath(dirname(__FILE__));\n\t// add our resource name\n\t$resourcePath = $realPath . \"/controller/\" . $resources[$request->resource] . \".php\";\n\t// check if readable\n\tif (!is_readable($resourcePath)) {\n\t\tRestHandler::sendError(500);\n\t}\n\t// load it !\n\tinclude $resourcePath;\n\t// and instanciate it\n\t$controllerClass = $resources[$request->resource];\n\t$controller = new $controllerClass();\n\treturn $controller;\n}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "db251f874ee921d6db05e022df4e8895", "score": "0.5770178", "text": "public function create()\n { \n $class = new Klass();\n \n return view('klass.create', compact('class'));\n }", "title": "" }, { "docid": "b9d738ddbb235b8477fb68bd81b9d6a6", "score": "0.5769688", "text": "private function generateControllerClass()\n {\n $this->setDataToGenerate();\n\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, $this->dataToGenerate);\n }", "title": "" }, { "docid": "50c072ee9246eb0cb7f6f05291bb82c4", "score": "0.5764692", "text": "public function create() {\n // Not needed currently\n }", "title": "" }, { "docid": "c497af728aa273080e1df94ed7556219", "score": "0.5762419", "text": "private function getController()\n {\n $this->controllerAddress = FILE_PATH . 'application' . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . self::$registry->request->getController() . 'Controller.php';\n \n if(file_exists($this->controllerAddress) && is_readable($this->controllerAddress))\n {\n $this->controllerName = self::$registry->request->getController() . 'Controller';\n return;\n }\n\n self::$registry->request->go(\"error\", \"notFound\", \"controller\");\n }", "title": "" } ]
c1d269bf5acff669f260139f71915141
Looks through all available sources for the first that can handle this key, then returns the value from that source.
[ { "docid": "6f8019e37918aef1a940fe164fab1d02", "score": "0.6666744", "text": "public function get(string $key)\n {\n foreach ($this->sources as $source) {\n if ($source->hasKey($key)) {\n $value = $source->get($key);\n break;\n }\n }\n\n if (! isset($value)) {\n return null;\n }\n\n if (array_key_exists($key, $this->coercions)) {\n $value = $this->coercions[$key]->coerce($value);\n }\n\n return $value ?? null;\n }", "title": "" } ]
[ { "docid": "0c0418f5b7558869118f8c15fa5e5178", "score": "0.6218476", "text": "public function get( $key ) {\n\t\t$target = $this->targets->get( (string)$key );\n\t\tif ( $target ) {\n\t\t\treturn $target;\n\t\t}\n\n\t\tif ( isset( $this->lookups[ $key ] ) ) {\n\t\t\t// Resolve the lookup batch and store results in the cache\n\t\t\t$targets = $this->resolve( array_keys( $this->lookups ) );\n\t\t\tforeach ( $targets as $id => $val ) {\n\t\t\t\t$this->targets->set( $id, $val );\n\t\t\t}\n\t\t\t$this->lookups = [];\n\t\t\t$target = $this->targets->get( (string)$key );\n\t\t\tif ( $target ) {\n\t\t\t\treturn $target;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "e796f7cfe9a4c15bb976715848b82fc6", "score": "0.61057645", "text": "public function __get(\n $key\n ) {\n\n //find the number of data sets in the list\n $num_data = count( $this->m_data );\n\n //scan the list for a matching entry from newest to oldest\n for( $i = ( $num_data - 1 ); $i >= 0; --$i ) {\n\n //see if this array contains the property name as a key\n if( isset( $this->m_data[ $i ][ $key ] ) == true ) {\n return $this->m_data[ $i ][ $key ];\n }\n }\n\n //key not found in any data source\n return null;\n }", "title": "" }, { "docid": "77296c538ab3daae759d1d11b425913b", "score": "0.6043285", "text": "function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Popularize_source',$k,$v); }", "title": "" }, { "docid": "1e02d2dff164f1862e0eb4c2c7aef544", "score": "0.60353446", "text": "public function get($key) {\n foreach ($this->caches as $n => $cache) {\n $res = $cache->get($key);\n\n // Short-circuit if we find a value.\n if (isset($res)) return $res;\n }\n }", "title": "" }, { "docid": "e608283210562cda13e8830c806b2362", "score": "0.59657913", "text": "public function get($key)\n {\n return $this->source->get($key);\n }", "title": "" }, { "docid": "1daec698972a2b872d4139070d5b5adf", "score": "0.5841746", "text": "public function getPropertyForSourceKey($sourceKey);", "title": "" }, { "docid": "04a5bf2002570a1891a1a4d089ff7400", "score": "0.57874876", "text": "function fetch($source, $key, $default = NULL) {\n return isset($source[$key]) ? $source[$key] : $default;\n}", "title": "" }, { "docid": "eca3b7641772fbf662cbe07aeb540469", "score": "0.5607593", "text": "public static function findSource(string $elementType, string $sourceKey, string $context = null)\n {\n /** @var string|ElementInterface $elementType */\n $path = explode('/', $sourceKey);\n $sources = $elementType::sources($context);\n\n while (!empty($path)) {\n $key = array_shift($path);\n $source = null;\n\n foreach ($sources as $testSource) {\n if (isset($testSource['key']) && $testSource['key'] === $key) {\n $source = $testSource;\n break;\n }\n }\n\n if ($source === null) {\n return null;\n }\n\n // Is that the end of the path?\n if (empty($path)) {\n // If this is a nested source, set the full path on it so we don't forget it\n if ($source['key'] !== $sourceKey) {\n $source['keyPath'] = $sourceKey;\n }\n\n return $source;\n }\n\n // Prepare for searching nested sources\n $sources = $source['nested'] ?? [];\n }\n\n return null;\n }", "title": "" }, { "docid": "57de1098e3196c3ccfc71fe9c997228c", "score": "0.5547651", "text": "public function first(string $key);", "title": "" }, { "docid": "a563822891112037861d87da28041c75", "score": "0.5497986", "text": "public static function getSettingItem(string $key)\n {\n $settingsRegister = self::getInstance();\n $groups = $settingsRegister->getGroups();\n $items = new Collection();\n foreach ($groups as $group) {\n $items = $items->merge($group->getItems());\n }\n foreach ($items as $item) {\n if ($item->getKey() === $key) {\n return $item;\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "30bba85bb9f1ec2c45455e84e038658e", "score": "0.5461253", "text": "public final function get($key) {\n if (!empty($this->cfg[\"prefix\"]))\n $key = $this->cfg[\"prefix\"] . \".\" . $key;\n if ($this->localcacheenabled && isset($this->localcache[$key])) {\n //Logger::Debug(\"Found cache entry '$key' in local cache, skipping lookup\");\n $ret = $this->localcache[$key];\n } else {\n $ret = $this->getData($key);\n if ($this->localcacheenabled)\n $this->localcache[$key] = $ret;\n }\n return $ret;\n }", "title": "" }, { "docid": "65f6c526e05750deb06d2a874797d043", "score": "0.5454626", "text": "public static function source($id) \r\n {\r\n $sources = (array) \\Base::instance()->get('dsc.search.sources');\r\n \r\n if (array_key_exists($id, $sources))\r\n {\r\n return $sources[$id];\r\n }\r\n \r\n return false;\r\n }", "title": "" }, { "docid": "45e3eae663311ef39d91b21e3c943439", "score": "0.5438821", "text": "public function get($key)\n {\n return $this->find($key);\n }", "title": "" }, { "docid": "a3fa081a859b85eb3c1204d0c3557999", "score": "0.5378669", "text": "function source() {\n $keys = array_keys($this->facts);\n return $keys[0];\n }", "title": "" }, { "docid": "a8a97e36f2bce874ff61166ac5d83a9c", "score": "0.53624856", "text": "static public function getValue(string $sKey)\n\t{\n\t\tif(array_key_exists($sKey,config::$_aConfigCache)){\n\t\t\treturn config::$_aConfigCache[$sKey];\n\t\t}\n\n\t\t$mDefinesValue=config::_getDefinedValue($sKey);\n\t\t$mFileValue=config::_getConfigFileValue($sKey);\n\t\t\n\t\t$mReturn = NULL;\n\t\t//Start with the lowest precedence source and overwrite with higher precedence sources\n\t\tif (!is_null($mDefinesValue)){\n\t\t\t$mReturn = $mDefinesValue;\n\t\t}\n\t\tif (!is_null($mFileValue)){\n\t\t\t$mReturn = $mFileValue;\n\t\t}\n\t\t\n\t\tconfig::$_aConfigCache[$sKey]=$mReturn;\n\t\treturn $mReturn;\n\t}", "title": "" }, { "docid": "08187944dae640f1b0cf9db80f2d67f0", "score": "0.53582674", "text": "public function get($key) \n { \n // Find head of chain for given key \n $bucketIndex = $this->getBucketIndex($key); \n $head = $bucketArray->get($bucketIndex); \n \n // Search key in chain \n while ($head != null) \n { \n if ($head->key == $key) \n return $head->value; \n $head = $head->next; \n } \n \n // If key not found \n return null; \n }", "title": "" }, { "docid": "7f24d324afe9b1324460cca2f1255cf3", "score": "0.5340237", "text": "public function find($key);", "title": "" }, { "docid": "598ce67d9056f7ef6786ba89762b5053", "score": "0.5327453", "text": "protected function getEntry($key)\n {\n return $this->cache->where('key', $key)->first();\n }", "title": "" }, { "docid": "58345e57c3a68f343e64fe7ca2e0d669", "score": "0.5326578", "text": "public function get ( $key );", "title": "" }, { "docid": "e0e63399ed12deaa4b1d5e33bf9da52a", "score": "0.5318609", "text": "public function __get($key) {\n $found = $this->get($key);\n\n if ($found) {\n return $found;\n } else {\n return parent::__get($key);\n }\n }", "title": "" }, { "docid": "5992b41be2a9ebc4f3c5d3c465a55d99", "score": "0.5312998", "text": "public function findByKey($key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.5294993", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.5294993", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.5294993", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.5294993", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.5294993", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.5294993", "text": "public function get(string $key);", "title": "" }, { "docid": "dc15a9864eef7ed9b9040df863a72138", "score": "0.5273699", "text": "public function Get ( $key );", "title": "" }, { "docid": "fc380f6bc46a9bfa94340e76cb77e6c5", "score": "0.5234321", "text": "public function find($key)\n {\n $query = $this->newQuery()\n ->where($this->getKeyName(), '=', $key);\n\n return $this->fetchSingle($query);\n }", "title": "" }, { "docid": "ae1d1d6d48a60d30f800f1f0ae2cb5d2", "score": "0.5233842", "text": "public function findByKey($key)\n {\n $id_obj = $this->getIdObject();\n $id_obj->where(\"`key`\", \"=\", \":key\");\n $id_obj->params(\":key\", $key);\n\n $collection = parent::find($id_obj);\n if (count($collection) > 0) {\n return $collection->current();\n }\n\n return null;\n }", "title": "" }, { "docid": "3b1a46d4ad5cf53747b39a76076e5a6b", "score": "0.5231324", "text": "public function resolve($key);", "title": "" }, { "docid": "0fd4931470c31b06598ee4290f3a036e", "score": "0.5221003", "text": "public function readSourceData(){\n $source = $this->getSourceGUID();\n if($source){\n $value = unserialize($this->JACKED->MySQL->get(\n 'data',\n $this->config->dbt_sources,\n 'guid = \"' . $source . '\"'\n ));\n }else{\n $value = false;\n }\n return $value;\n }", "title": "" }, { "docid": "385ca5ca526a47c0a767c58a30f593ca", "score": "0.52137643", "text": "public function retrieve($key = null)\n\t{\n\t\t$query = \\DB::table($this->table)->select('*');\n\t\tif (!$key) {\n\t\t\t$results = $query->get();\n\t\t\t$data_stream_templates = \\App::make('Illuminate\\Database\\Eloquent\\Collection');\n\t\t\tforeach ($results as &$result) {\n\t\t\t\t$data_stream_templates->add($this->decodeFromStorage($result));\n\t\t\t}\n\t\t\treturn $data_stream_templates;\n\t\t} else {\n\t\t\tif ($result = $query->find($key)) {\n\t\t\t\treturn $this->decodeFromStorage($result);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "dcec2f9d8f20db5fef496e2c4339a65b", "score": "0.52024025", "text": "function resolveSourceIdentifier($source_identifier, array $arr_dict_filter = null, \n\t\t\t$flags = MCL_SOURCE_TYPE_ALL)\n\t{\n\t\tif ( ( $flags & MCL_SOURCE_TYPE_LIST ) && \n\t\t\t $css = $this->getConceptList($source_identifier) )\n\t\t{\n\t\t\treturn $css;\n\t\t}\n\t\tif ( $flags & MCL_SOURCE_TYPE_MAP ) \n\t\t{\n\t\t\tif ($arr_dict_filter) {\n\t\t\t\tforeach ($arr_dict_filter as $css_dict) {\n\t\t\t\t\tif ( $css = $this->getMapSource($source_identifier, $css_dict) ) {\n\t\t\t\t\t\treturn $css;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if ( $css = $this->getMapSource($source_identifier, null) ) {\n\t\t\t\treturn $css;\n\t\t\t}\n\t\t}\n\t\tif ( ( $flags & MCL_SOURCE_TYPE_DICTIONARY ) && \n\t\t\t $css = $this->getDictionary($source_identifier) ) \n\t\t{\n\t\t\treturn $css;\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.51963747", "text": "public function get($key);", "title": "" }, { "docid": "d86f5dbbebf4efacd06c2e3cccd22195", "score": "0.5194275", "text": "private static function loadValueFromExternalTable($source_table, $key_field, $value_field, $key_value) {\n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n\n $query\n ->select($value_field)\n ->from($source_table)\n ->where($key_field . ' = ' . $db->quote($key_value));\n\n\n $db->setQuery($query);\n return $db->loadResult();\n }", "title": "" }, { "docid": "1b637f6619e485e852ecaf1e186794e9", "score": "0.5194099", "text": "public function get($key)\r\n {\r\n\t\tif (is_null($key))\r\n\t\t{\r\n\t\t\tthrow new TechDivision_Lang_Exceptions_NullPointerException(\r\n\t\t\t\t'Passed key is null'\r\n\t\t\t);\r\n\t\t}\r\n\t\tif (!is_object($key))\r\n\t\t{\r\n\t\t\tthrow new TechDivision_Collections_Exceptions_InvalidKeyException(\r\n\t\t\t\t'Passed key has to be an object'\r\n\t\t\t);\r\n\t\t}\r\n\t\t// run over all keys and check if one is equal to the passed one\r\n\t\tforeach ($this->keys as $id => $value) {\r\n\t\t\t// if the actual is equal to the passed key ..\r\n\t\t\tif ($key === $value) {\r\n\t\t\t\t// return the item with the passed key\r\n\t\t\t\tif (array_key_exists($id, $this->items)) {\r\n\t\t\t\t\treturn $this->items[$id];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// if no value is found throw an exception\r\n\t\tthrow new TechDivision_Collections_Exceptions_IndexOutOfBoundsException(\r\n\t\t\t'Index out of bounds'\r\n\t\t);\r\n }", "title": "" }, { "docid": "57c7e2d26285b37a4b139e610a33f886", "score": "0.51919025", "text": "public static function get( $key );", "title": "" }, { "docid": "9d51ab82efb9b10758244103750af363", "score": "0.51907456", "text": "public function getFirstBy($key, $value)\n {\n return $this->table()->where($key, '=', $value)->first();\n }", "title": "" }, { "docid": "40553f28a304cac6371735b0281f56eb", "score": "0.51843786", "text": "public function get($source)\n {\n list(, $paths, $path) = $this->_parse($source);\n return $this->_find($paths, $path);\n }", "title": "" }, { "docid": "6f104f2d5d2d997cb50d9f962613b51b", "score": "0.5178454", "text": "public function fetch($key, $value)\n\t{\n\t\tforeach ($this->_data as $data)\n\t\t{\n\t\t\tif ($data->get($key) == $value)\n\t\t\t{\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "4e4827fc54795580b8bc68496033a1c4", "score": "0.5157501", "text": "public function get($key): Maybe\n {\n return $this->implementation->get($key);\n }", "title": "" }, { "docid": "9860c0452fe83b2dd18e8e644b8e7a4a", "score": "0.51559776", "text": "public static function get($key);", "title": "" }, { "docid": "a6df9e27f404e861a0989309962f8451", "score": "0.51521254", "text": "public static function get(string $key);", "title": "" }, { "docid": "f7a8fcffb37a8bedb547d8513a92f369", "score": "0.5136001", "text": "public function find(string $identifier, callable $source): CacheItemInterface;", "title": "" }, { "docid": "34ce3617ddde1100a8170176a6d5be1d", "score": "0.5129021", "text": "public function getValue(string $key);", "title": "" }, { "docid": "34ce3617ddde1100a8170176a6d5be1d", "score": "0.5129021", "text": "public function getValue(string $key);", "title": "" }, { "docid": "34ce3617ddde1100a8170176a6d5be1d", "score": "0.5129021", "text": "public function getValue(string $key);", "title": "" }, { "docid": "2f637a3f4d2158693382f9393715503c", "score": "0.5124439", "text": "public function hasSourceKey($sourceKey);", "title": "" }, { "docid": "3afa507885ff373efeaf61f2b430c858", "score": "0.51234823", "text": "abstract public static function findByKey($key);", "title": "" }, { "docid": "e3af4d89bab5a3edd8359982dfb2b941", "score": "0.5117223", "text": "abstract public function get($key);", "title": "" }, { "docid": "e3af4d89bab5a3edd8359982dfb2b941", "score": "0.5117223", "text": "abstract public function get($key);", "title": "" }, { "docid": "949e57f225227f2ca8861397c1f36494", "score": "0.51151544", "text": "function get($key)\n\t{\n\t\t//-------------------------------------------------\n\t\t//\tDid we got array with keys or only one key?\n\t\t//-------------------------------------------------\n\t\t\n\t\tif ( is_array( $key ) )\n\t\t{\n\t\t\t//-------------------------------------------------\n\t\t\t//\tSet up vars\n\t\t\t//-------------------------------------------------\n\t\t\t\t\n\t\t\t$packetsToLoad\t\t\t=\tarray();\n\t\t\t$cachedValues\t\t\t=\tarray();\n\t\t\t\t\n\t\t\t//-------------------------------------------------\n\t\t\t//\tGo through what we got\n\t\t\t//-------------------------------------------------\n\t\t\t\t\n\t\t\tforeach ( $key as $cache )\n\t\t\t{\n\t\t\t\t//-------------------------------------------------\n\t\t\t\t//\tDo we have that cache loaded?\n\t\t\t\t//-------------------------------------------------\n\t\t\n\t\t\t\tif ( ! array_key_exists( $cache, $this->cacheStore ) )\n\t\t\t\t{\n\t\t\t\t\t//\tMark is to load it later\n\t\t\t\t\t$packetsToLoad[] = $cache;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//\tWe already loaded it, so only add it's value\n\t\t\t\t\t$cachedValues[ $cache ] = $this->cacheStore[ $cache ];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t//-------------------------------------------------\n\t\t\t//\tGot something to load?\n\t\t\t//-------------------------------------------------\n\t\t\n\t\t\tif ( count( $packetsToLoad ) > 0 )\n\t\t\t{\n\t\t\t\t//-------------------------------------------------\n\t\t\t\t//\tLoad th'm and update the array\n\t\t\t\t//-------------------------------------------------\n\t\t\n\t\t\t\t$this->loadCaches( $packetsToLoad );\n\t\t\n\t\t\t\tforeach ( $packetsToLoad as $cache )\n\t\t\t\t{\n\t\t\t\t\t//-------------------------------------------------\n\t\t\t\t\t//\tGot something now?\n\t\t\t\t\t//-------------------------------------------------\n\t\t\t\t\t\t\n\t\t\t\t\tif ( isset( $this->cacheStore[ $cache ] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$cachedValues[ $cache ] = $this->cacheStore[ $cache ];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//\tSet a blank value\n\t\t\t\t\t\t$cachedValues[ $cache ] = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\n\t\t\treturn $cachedValues;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//-------------------------------------------------\n\t\t\t//\tIt's only one cache key to load, check if we have it\n\t\t\t//-------------------------------------------------\n\t\t\t\t\t\t\n\t\t\tif ( ! array_key_exists($key, $this->cacheStore) )\n\t\t\t{\n\t\t\t\t//\tTry to load it\n\t\t\t\t$this->load($key);\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t//-------------------------------------------------\n\t\t\t//\tGot something?\n\t\t\t//-------------------------------------------------\n\t\t\t\t\n\t\t\tif (! isset( $this->cacheStore[ $key ] ) )\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\t\t\n\t\t\treturn $this->cacheStore[ $key ];\n\t\t}\n\t}", "title": "" }, { "docid": "d4dea8032548ec5978a3dc21cda577e5", "score": "0.5105473", "text": "abstract public function get( $key );", "title": "" }, { "docid": "0d8e830c49c7483e74a0d6ff9e15839f", "score": "0.5093878", "text": "public function fetch($key) {\n\t\treturn $this->cacheInstance->getItem ( $this->getRealKey ( $key ) )->get ();\n\t}", "title": "" }, { "docid": "1e5cff81402964887d89ae54f321201d", "score": "0.50906336", "text": "function get( $key ) {\n\n\t\treturn wp_cache_get( $key, $this->parent->slug_ );\n\n\t}", "title": "" }, { "docid": "3bc1a3d023f13aa0e25ae08890c05edd", "score": "0.50893986", "text": "public function find($key, $type)\n {\n return $this->findBy(array(\n \"key\" => $key,\n \"source\" => $type,\n ));\n }", "title": "" }, { "docid": "f5d2a16e4287d5d84d9555da02678a5f", "score": "0.5070906", "text": "public function findByKey($key, $value) {\n\t\t$query\t= $this->defaultQuery.\" WHERE \".$key.\" IN ('\".$value.\"') LIMIT 1\";\n\t\t$list\t= $this->get($query);\n\t\tif (count($list) > 0) {\n\t\t\treturn $list[0];\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "ee05397a36c2af57f2938a963b8417f1", "score": "0.506693", "text": "public function getValue($key)\n {\n if (isset($this->_localCache[$key]))\n {\n // local cache hit\n return $this->_localCache[$key];\n }\n\n $this->_localCache = $this->_store->getObj($this->_id);\n return $this->_localCache[$key];\n }", "title": "" }, { "docid": "992d029bec45a16ec7bbefa7bf236a02", "score": "0.5064507", "text": "public function findKey($key);", "title": "" }, { "docid": "b674388c2bf6407decf2cbb425d48b97", "score": "0.5053158", "text": "public function get(string $key): mixed;", "title": "" }, { "docid": "b674388c2bf6407decf2cbb425d48b97", "score": "0.5053158", "text": "public function get(string $key): mixed;", "title": "" }, { "docid": "87c239db33166bb190faea52950facd0", "score": "0.5050089", "text": "public function get(string $key)\n {\n $firstLevel = $this->getFirstLevelRegion();\n\n return $firstLevel->get($key, function ($key) use ($firstLevel) {\n $root = $this->getKeyRoot($key);\n\n $result = $this->getSecondLevelRegion()->get($root, function ($key) {\n return $this->store->get($key);\n });\n\n if (! is_null($result) && ! $firstLevel->has($root)) {\n $firstLevel->put($root, $result);\n }\n\n return Arr::get([$root => $result], $key);\n });\n }", "title": "" }, { "docid": "9ae6c4d001cb828313687a62207f5fd0", "score": "0.5048255", "text": "abstract public function getValue($key);", "title": "" }, { "docid": "6df34e9905404fa599b00aec40920b30", "score": "0.5045799", "text": "public function get(string $key): mixed\n {\n return $this->items[$key] ?? null;\n }", "title": "" }, { "docid": "a2eca9f85b9e241ca01b1e9c0d92aad0", "score": "0.504219", "text": "public function __get($source) {\n\t\tif($source === 'noscan') {\n\t\t\t$this->scan = false;\n\t\t\treturn $this;\n\t\t}\n\n\t\telse if($this->scan && !$this->scanned) {\n\t\t\t$scanner = new Scanner($this->sources->all);\n\t\t\t$scanner->scan();\n\t\t\t$this->scanned = true;\n\t\t}\n\n\t\t$this->scan = true;\n\t\treturn $this->sources->$source;\n\t}", "title": "" }, { "docid": "3330dfab4715b6ebfda6a054d176894f", "score": "0.5042086", "text": "public function getValueByKey($key);", "title": "" }, { "docid": "57372f1c5d106afd3a3c1817b7ed1fdf", "score": "0.50419086", "text": "public function resolve($key, $default = null)\n {\n if (!sizeof($this->items)) {\n $this->items = $this->call();\n }\n\n if (isset($this->items[$key])) {\n return $this->items[$key];\n }\n\n return $default;\n }", "title": "" }, { "docid": "a60fbe731467f0ad58106919bbf99fb5", "score": "0.5037937", "text": "public function get(string $key)\n {\n return array_get($this->resource, $key);\n }", "title": "" }, { "docid": "6a61a7343ef20f6fe96ee84251c42619", "score": "0.50261104", "text": "public abstract function Get($key);", "title": "" }, { "docid": "42f4d9648e76655659ca176f34db05c9", "score": "0.5025392", "text": "public function get(mixed $key): mixed;", "title": "" }, { "docid": "df04cf5119e01a144ec0af3db73f5e93", "score": "0.5017889", "text": "public function find($key)\n {\n // sort server when find\n if (!$this->sorted) {\n asort($this->serverList);\n $this->sorted = true;\n }\n $hash = crc32($key);\n $len = sizeof($this->serverList);\n if ($len == 0) {\n return false;\n }\n $keys = array_keys($this->serverList);\n $values = array_values($this->serverList);\n // not between first and last ,then return the last server\n if ($hash <= $keys[0] || $hash >= $keys[$len - 1]) {\n return $values[$len - 1];\n }\n foreach ($keys as $key => $pos) {\n $nextPos = null;\n if (isset($keys[$key + 1])) {\n $nextPos = $keys[$key + 1];\n }\n // net node is null\n if (is_null($nextPos)) {\n return $values[$key];\n }\n // get server\n if ($hash >= $pos && $hash <= $nextPos) {\n return $values[$key];\n }\n }\n\n }", "title": "" } ]
27e1564deae6150d3d0a448bcdcb025f
Set the value of quantityAdvice
[ { "docid": "05d662d6e65cd569909f3ad244f5c6c0", "score": "0.70610946", "text": "public function setQuantityAdvice(int $quantityAdvice): self\n {\n $this->quantityAdvice = $quantityAdvice;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "278bff04c3dfdc5b322eaafca35d7e2e", "score": "0.663153", "text": "public function getQuantityAdvice(): int\n {\n return $this->quantityAdvice;\n }", "title": "" }, { "docid": "cf792a2c3383af4d7894290322f62eaf", "score": "0.6433444", "text": "public function setQty($qty);", "title": "" }, { "docid": "61394500d55ef7e849cb6d527ce5f286", "score": "0.62967145", "text": "public function setQuantity( $quantity )\n {\n $this->quantity = $quantity;\n }", "title": "" }, { "docid": "0fb1da60e4cafb29cda783f96a62fda0", "score": "0.6273885", "text": "public function setQuantity($quantity)\n {\n $this->quantity = $quantity;\n }", "title": "" }, { "docid": "5b2e4e105ceefb7a75c89d76b4325b14", "score": "0.6227547", "text": "public function setQuantity($quantity)\n {\n if(is_int($quantity)) {\n $this->quantity = $quantity;\n }\n }", "title": "" }, { "docid": "152383fb6f33dad54b7d7488e6b3c4b8", "score": "0.59535295", "text": "public function setQuantityAttribute($quantity)\n {\n $this->attributes['quantity'] = $quantity > 0\n ? $quantity\n : 0;\n }", "title": "" }, { "docid": "4c27540742949b3b0bb3d7a9e9ac9ab9", "score": "0.59494764", "text": "protected function setOfferValue ()\n {\n $this->request->coupon_benefits[ $this->offerNature ] = $this->offer->rate;\n }", "title": "" }, { "docid": "bd3db5f55f4978f89babfb5fb42112bc", "score": "0.59309006", "text": "public function setQuantityAttribute($quantity)\n {\n if ($quantity < 0)\n $quantity = 0;\n if ($quantity > $this->inventory->quantity)\n $quantity = $this->inventory->quantity;\n $this->attributes['quantity'] = $quantity;\n }", "title": "" }, { "docid": "98f94293e0b350686e546262a74fed1e", "score": "0.5904911", "text": "function update_item($quantity) {\n $this->quantity = (int)$quantity;\n $this->refresh_item();\n $this->update_claimed_stock();\n\n\n }", "title": "" }, { "docid": "36476d08dc9a138f6083d95145816e27", "score": "0.5778873", "text": "public function setAmount()\n {\n $exact = $this->getOriginalPurgeValue('amount_exact');\n $percentage = $this->getOriginalPurgeValue('amount_percentage');\n\n $this->amount = $this->is_percentage\n ? $percentage\n : $exact;\n }", "title": "" }, { "docid": "d2b1dd6198f8bfe0d2a9e95a0df53a6e", "score": "0.5746811", "text": "public function setQuantityAttribute($value) {\n\n $this->attributes['quantity'] = empty($value) ? 0 : $value;\n\n $this->attributes['totalPrice'] = $value * $this->price;\n }", "title": "" }, { "docid": "6da4c89efae870f8b51edfe28ee2cd98", "score": "0.5651732", "text": "function setQuantity($quantity)\n {\n if (mb_strlen($quantity) == 0) {\n return \"Product quantity could not be NULL or Empty\";\n } elseif ((int) $quantity < 1 || (int) $quantity > 99) {\n return 'The quantity cannot conatin more than 100 and less than 1';\n } else {\n $this->quantity = $quantity;\n return \" \";\n }\n }", "title": "" }, { "docid": "139db1622956caa8a4d0f40b7f16488f", "score": "0.5642848", "text": "public function setQuantity(float $quantity)\n\t{\n\t\t$this->addKeyValue('quantity', $quantity); \n\n\t}", "title": "" }, { "docid": "205b24b5014a702ab37b6d69856be63b", "score": "0.5582608", "text": "public function setFabricQuantity($quantity) {\r\n \r\n $this->quantity = intVal(100*$quantity);\r\n }", "title": "" }, { "docid": "6b0b2806d70b31b3621ecacc9d68bdfd", "score": "0.5546217", "text": "function setQuantity($id, $quantity)\n {\n if($quantity == 0) {\n return $this->remove($id);\n }\n $this->quantity[$id] = $quantity;\n }", "title": "" }, { "docid": "4d0186e22045a59dc541e1ffedf96ad5", "score": "0.5477272", "text": "function set_quantity( $cart_item_key, $quantity = 1 ) {\n\t\t\tif ($quantity==0 || $quantity<0) :\n\t\t\t\tunset($this->cart_contents[$cart_item_key]);\n\t\t\telse :\n\t\t\t\t$this->cart_contents[$cart_item_key]['quantity'] = $quantity;\n\t\t\tendif;\n\t\n\t\t\t$this->set_session();\n\t\t}", "title": "" }, { "docid": "6cb36e97c4daa8d088e2fd2f4ba3f6e4", "score": "0.5468396", "text": "public function setQuantite($_quantite) { $this->quantite = $_quantite; }", "title": "" }, { "docid": "6d2b059d175e7600f9879574f4bbf1d6", "score": "0.54610527", "text": "public function setStock(string $productId, float $quantity): void;", "title": "" }, { "docid": "aee0ee27c9172ffadb676f5b46a60c2c", "score": "0.5434462", "text": "public function setItemQuantity($productId, $quantity) {\n Doctrine_Query::create()\n ->update('Orderdetail od')\n ->where('od.Product = ?', $productId)\n ->andWhere('od.Order = ?', $this->getOrderId())\n ->set('quantity', $quantity)\n ->execute();\n }", "title": "" }, { "docid": "a447ab8bb7a9fedfbf51afa5a4911d25", "score": "0.54196316", "text": "function setExperience($experience) { $experience = (int) $experience;\r\n if ($experience >= 1 && $experience <= 100) {\r\n $this->_experience = $experience;\r\n }\r\n }", "title": "" }, { "docid": "46968e5c78fc2d09750b9a90dced6a09", "score": "0.5406943", "text": "public function setInstallment($quantity, $value = null, $noInterestInstallmentQuantity = null)\n {\n $param = $quantity;\n if (isset($param) && is_array($param) || is_object($param)) {\n $this->setQuantity($param['quantity']);\n $this->setValue($param['value']);\n $this->setNoInterestInstallmentQuantity($param[\"noInterestInstallmentQuantity\"]);\n } else {\n $this->setQuantity($quantity);\n $this->setValue($value);\n $this->setNoInterestInstallmentQuantity($noInterestInstallmentQuantity);\n }\n }", "title": "" }, { "docid": "eb8663fd763f072c0ee37d2428f7c3d9", "score": "0.54022956", "text": "public function setQuantityAttribute($quantity = null)\n\t{\n\t\t$this->attributes['quantity'] = intval($quantity);\n\t}", "title": "" }, { "docid": "b272475f472c77d32ee14c64a3ff02fc", "score": "0.53951657", "text": "public function testSetGetQuantity()\n {\n $this->item->setQuantity(2);\n $this->assertEquals($this->item->getQuantity(), 2);\n }", "title": "" }, { "docid": "8c7fbcc44b6be17c123350213ef99c8f", "score": "0.53504163", "text": "public function setQuantity($val)\n {\n $val = $val < 1 ? 1 : $val;\n $this->setField('Quantity', $val);\n }", "title": "" }, { "docid": "6b55300ae4b694467caf524da956f515", "score": "0.5337734", "text": "public function testGetAndSetStockQuantityFunction()\n {\n $stock = 15;\n $this->assertEquals($stock, $this->product->setStockQuantity($stock)->getStockQuantity());\n }", "title": "" }, { "docid": "70432e1585564b73b9e4fc532b7bc181", "score": "0.5319401", "text": "public function setQuantity($quantity){\n $this->quantity = $quantity;\n return $this;\n }", "title": "" }, { "docid": "d68df97494a4c9875bb77a3f2c0eca1c", "score": "0.5315291", "text": "public function __set($key = NULL, $value = NULL)\n\t{\n\t\tif($key == 'quantity')\n\t\t{\n\t\t\t// Make sure that we always have a positive integer\n\t\t\t$value = max(1, (int) $value);\n\t\t}\n\t\t\n\t\tparent::__set($key, $value);\n\t}", "title": "" }, { "docid": "0c95a1cf2678c1eaa32604c5a977dcb6", "score": "0.5305638", "text": "public function setQuantityAttribute($input)\n {\n if ($input != '') {\n $this->attributes['quantity'] = $input;\n } else {\n $this->attributes['quantity'] = null;\n }\n }", "title": "" }, { "docid": "b3228771e2e70eb91ba00101246c406e", "score": "0.5302808", "text": "public function __set($name, $value){\n if($name == 'discount_percent' && is_numeric($value)){\n $this->discount_percent = $value;\n $this->discount_amount = ($value * $this->price) / 100;\n } else if($name == 'discount_condition' && is_array($value)){\n $this->discount_condition = $value;\n } else {\n log_message('error', 'wrong way to set product discount'.PHP_EOL);\n throw new \\CodeIgniter\\Exceptions\\ConfigException();\n }\n }", "title": "" }, { "docid": "5d8d24ed7af1ff971788b8d4d175d099", "score": "0.52967244", "text": "public function getQuantity(){\n return $this->quantity;\n }", "title": "" }, { "docid": "67d8ef737b37cc24fc0683a06f6c36fc", "score": "0.5274288", "text": "public function setAmount($amount){\n\n $this->amount = $amount;\n\n }", "title": "" }, { "docid": "573feda69dc6088e737f4452450962f6", "score": "0.52566224", "text": "public function addToQuantity($quantity)\n {\n if(is_int($quantity)) {\n $this->quantity += $quantity;\n }\n }", "title": "" }, { "docid": "33f3f64d2b030b6a9ce420679ab4c439", "score": "0.5255067", "text": "public function setQuantity($value)\n\t{\n\t\t$this->searchFilters[$this->ref_quantity] = $value;\n\t}", "title": "" }, { "docid": "21c24f7923b25aca65b1d01cf5ce4369", "score": "0.5249722", "text": "public function setAmount($amount);", "title": "" }, { "docid": "21c24f7923b25aca65b1d01cf5ce4369", "score": "0.5249722", "text": "public function setAmount($amount);", "title": "" }, { "docid": "21c24f7923b25aca65b1d01cf5ce4369", "score": "0.5249722", "text": "public function setAmount($amount);", "title": "" }, { "docid": "63409488074bcc9cf9a93eba11149208", "score": "0.52483976", "text": "protected function setQoQuantity($qoQuantity)\r\n {\r\n $this->qoQuantity = $qoQuantity;\r\n }", "title": "" }, { "docid": "9eb9affd511664accee104e8c96e849b", "score": "0.52454346", "text": "public function hookactionUpdateQuantity($params)\n {\n $id_product = (int)$params['id_product'];\n $id_product_attribute = (int)$params['id_product_attribute'];\n \n $context = Context::getContext();\n $id_shop = (int)$context->shop->id;\n $id_lang = (int)$context->language->id;\n $product = new Product($id_product, false, $id_lang, $id_shop, $context);\n \n if (empty($product)) {\n return;\n }\n \n $product_name = Product::getProductName($id_product, $id_product_attribute, $id_lang);\n $product_has_attributes = $product->hasAttributes();\n $productInfo = array(\n 'product_name' => $product_name,\n 'product_id' => $id_product\n );\n $check_oos = ($product_has_attributes && $id_product_attribute)\n || (!$product_has_attributes && !$id_product_attribute);\n $product_quantity = (int)$params['quantity'];\n if (Module::isInstalled('mailalerts')) {\n // For out of stock notification to admin\n $isActivate = $this->isRulesetActive('out_of_stock_alerts');\n if ($check_oos\n && $product->active == 1\n && $isActivate != null\n && $isActivate != ''\n && $this->smsAPI != null\n && $this->smsAPI != ''\n && $product_quantity <= $this->outStock) {\n $legendstemp = $this->replaceProductLegends(\n $isActivate[0]['template'],\n $productInfo\n );\n // Use send SMS API here\n $legendstemp = preg_replace('/<br(\\s+)?\\/?>/i', \"\\n\", $legendstemp);\n $postAPIdata = array(\n 'label' => $isActivate[0]['label'],\n 'sms_text' => $legendstemp,\n 'source' => '21000',\n 'sender_id' => $isActivate[0]['senderid'],\n 'mobile_number' => $this->adminMobile\n );\n \n $this->sendSMSByAPI($postAPIdata);\n Onehopsmsservice::onehopSaveLog('OutStock', $legendstemp, $this->adminMobile);\n }\n \n // For back in stock\n $isActivate = $this->isRulesetActive('back_of_stock_alerts');\n if ($isActivate != null\n && $isActivate != ''\n && $this->smsAPI != null\n && $this->smsAPI != ''\n && $product_quantity > 0) {\n $bosSql = 'SELECT DISTINCT adr.phone_mobile, oos.id_customer';\n $bosSql .= ' FROM '._DB_PREFIX_. 'mailalert_customer_oos as oos';\n $bosSql .= ' INNER JOIN '._DB_PREFIX_. 'address as adr ON oos.id_customer = adr.id_customer';\n $bosSql .= ' WHERE oos.id_product = \"' . (int)$id_product . '\" AND deleted = 0';\n $bosResults = Db::getInstance()->ExecuteS($bosSql);\n \n if ($bosResults) {\n foreach ($bosResults as $customerVal) {\n $customerInfo = array(\n 'id_customer' => $customerVal['id_customer'],\n 'phone_mobile' => $customerVal['phone_mobile']\n );\n $legendstemp = $this->replaceProductCustomerLegends(\n $isActivate[0]['template'],\n $customerInfo,\n $productInfo\n );\n $legendstemp = preg_replace('/<br(\\s+)?\\/?>/i', \"\\n\", $legendstemp);\n // Use send SMS API here\n $postAPIdata = array(\n 'label' => $isActivate[0]['label'],\n 'sms_text' => $legendstemp,\n 'source' => '21000',\n 'sender_id' => $isActivate[0]['senderid'],\n 'mobile_number' => $customerVal['phone_mobile']\n );\n $this->sendSMSByAPI($postAPIdata);\n $delQuery = 'DELETE FROM ' . _DB_PREFIX_ . 'mailalert_customer_oos';\n $delQuery .= ' WHERE id_customer = \"' . (int)$customerVal['id_customer'] . '\"';\n Db::getInstance()->execute($delQuery);\n Onehopsmsservice::onehopSaveLog('BackStock', $legendstemp, $customerVal['phone_mobile']);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "15c66049a32a51081350cb0a19c9898c", "score": "0.5226255", "text": "public function setQuantity($quantity)\n {\n if(empty($quantity) || ! is_numeric($quantity))\n throw new \\InvalidArgumentException('Please pass a valid quantity.');\n\n $this->quantity = $quantity;\n }", "title": "" }, { "docid": "19efa10b6edf5de1648dc06bdc1e0c72", "score": "0.5193481", "text": "public function update():void {\n if($this->isExpired()) {\n $this->item->quality = 0;\n }\n // increases by 3 when there are 5 days or less \n else if($this->item->sell_in <=5) {\n $this->item->quality = $this->item->quality +3 >= 50 ?\n $this->item->quality = 50 : $this->item->quality +3;\n }\n // increases by 2 when there are 10 days or less\n else if($this->item->sell_in <=10) {\n $this->item->quality = $this->item->quality +2 >= 50 ?\n $this->item->quality = 50 : $this->item->quality +2;\n } else {\n $this->item->quality = $this->item->quality +1 >= 50 ?\n $this->item->quality = 50 : $this->item->quality +1;\n }\n\n $this->updateSellIn();\n }", "title": "" }, { "docid": "255c7f7f48c39393cc2c92417bcf66fc", "score": "0.51771444", "text": "public function setQuantity(?int $quantity): self\n {\n $this->quantity = $quantity;\n\n return $this;\n }", "title": "" }, { "docid": "f89b9ad778e0248f2b39ae73cebdf550", "score": "0.51664335", "text": "public function changeQuantityAction()\r\n {\r\n if ($this->Request()->getParam('sArticle') && $this->Request()->getParam('sQuantity')) {\r\n $this->View()->sBasketInfo = $this->basket->sUpdateArticle($this->Request()->getParam('sArticle'), $this->Request()->getParam('sQuantity'));\r\n }\r\n $this->forward($this->Request()->getParam('sTargetAction', 'index'));\r\n }", "title": "" }, { "docid": "e5596622536ada0ff38574c85e015c4f", "score": "0.5162824", "text": "public function setQuantity($qty)\n {\n if (empty($qty) || !is_numeric($qty)) {\n throw new \\InvalidArgumentException('Please supply a valid quantity.');\n }\n\n $this->qty = $qty;\n }", "title": "" }, { "docid": "53da92e77a3ad3a3c0fd2daabc72f6db", "score": "0.51574934", "text": "public function update_quantity()\n\t{\n\t\t$item = ORM::factory('cart_item', $this->input->post('id'));\n\t\t$quantity = $this->input->post('quantity');\n\t\t$this->cart->update_quantity($item->product, $item->variant, $quantity);\n\t\t\n\t\turl::redirect('cart');\n\t}", "title": "" }, { "docid": "8cfc5e7d129744e800141dbd495e6313", "score": "0.5146447", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "512620eef0201528015ef3328b799d3b", "score": "0.51263756", "text": "public function update_quantity(){\n\t\t\n\t\tApp::import('Model','Master');\n\t\t\n\t\t$master = new Master();\n\t\t\n\t\t$master->run_update();\n\t}", "title": "" }, { "docid": "24804fc770f66597f86ee06d3499abef", "score": "0.5112801", "text": "protected function setValue()\n {\n $value = $this->liveData->units_held * $this->liveData->sell_price;\n if($this->investment->currency->value !== 'GBP') {\n $convertor = new CurrencyConverter($this->investment->currency,'GBP');\n $value = $convertor->convert($value);\n }\n\n // Normalise the output based on knowing what units to expect\n $this->liveData->value = $value / $this->investment->priceUnits;\n }", "title": "" }, { "docid": "0687f4def66130c79ba334a9e8d41fcb", "score": "0.5075255", "text": "private function updateQty($object)\n\t{\n\t\t$common = new Qss_Model_Extra_Extra();\n $MaLenhSX = @(string)$object->getFieldByCode('MaLenhSX')->szValue;\n $mSanXuat = Qss_Model_Db::Table('OSanXuat');\n $mSanXuat->where(sprintf(' MaLenhSX = \"%1$s\"', $MaLenhSX));\n $oSanXuat = $mSanXuat->fetchOne();\n//\t\t$ThaoDo = @(int)$common->getDataset(array('module'=>'OSanXuat'\n//\t\t\t\t\t, 'where'=>array('MaLenhSX'=>$MaLenhSX), 'return'=>1))->ThaoDo;\n $ThaoDo = @(int)$oSanXuat->ThaoDo;\n\n\t\tif($ThaoDo == 1)\n\t\t{\n\t\t\t// Neu thao do, set so luong ve disabled\n\t\t\t// Cong don so luong phu pham, hoac set ve 0 neu khong co phu pham\n//\t\t\t$PhuPham = $common->getDataset(array('module'=>'OSanLuong'\n//\t\t\t\t\t\t, 'where'=>array('IFID_M717'=>$object->i_IFID)));\n $mPhuPham = Qss_Model_Db::Table('OSanLuong');\n $mPhuPham->where(sprintf('IFID_M717 = %1$d', $object->i_IFID));\n\n\t\t\t$SoLuongPhuPham = 0;\n\t\t\t$insert = array();\n\t\t\t\n\t\t\tforeach($mPhuPham->fetchAll() as $p)\n\t\t\t{\n\t\t\t\t$SoLuongPhuPham += $p->SoLuong;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$insert['OThongKeSanLuong'][0]['SoLuong'] = $SoLuongPhuPham;\n\t\t\t\n\t\t\t$service = $this->services->Form->Manual('M717',$object->i_IFID,$insert,false);\n\t\t\tif($service->isError())\n\t\t\t{\n\t\t\t\t$this->setError();\n\t\t\t\t$this->setMessage($service->getMessage(Qss_Service_Abstract::TYPE_TEXT));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9665ccd6e4ba8688433e73087bb2d1a5", "score": "0.5071442", "text": "public function set_item($product_id, $quantity=false, $variety=false, $update=false, $new_variety=false)\n {\n if(!$new_variety)\n { \n // validace vstupnich dat\n $validation_error=array();\n\n // 1. validace zadaneho formatu dat TODO: pridat volbu na desetinne cislo do databaze\n if(!is_numeric($quantity)) $validation_error[]=\"Zadané množství musí být celé číslo\";\n if(strpos($quantity, \".\") || strpos($quantity, \"-\")) $validation_error[]=\"Zadané množství musí být celé číslo\";\n\n // 2. validace mnozstvi na sklade\n // $product=orm::factory(\"product\",$product_id);\n // if($product->pocet_na_sklade < $quantity) $validation_error=\"Zadali jste větší množství než máme momentálně na skladě\";\n\n if(empty($validation_error))\n {\n $this->cart_products=$this->session->get($this->cart_name.\"_products\");\n\n if(!$variety)\n {\n if($this->incermental_adding && !$update) $quantity=$this->get_item($product_id)+$quantity;\n $this->cart_products[$product_id]=$quantity;\n }\n else\n {\n if($this->incermental_adding && !$update) $quantity=$this->get_item($product_id, $variety)+$quantity;\n $this->cart_products[$product_id][$variety]=$quantity;\n }\n //die(print_r($this->cart_products));\n $this->session->set($this->cart_name.\"_products\", $this->cart_products);\n \n // po vlozeni prepocitat kosik\n $this->populate_cart();\n\n $this->messages=array(Hana_Response::MSG_PROCESSED=>__(\"Zboží bylo vloženo do košíku\"));\n return true;\n }\n else\n {\n \n $this->messages=$validation_error;\n return false;\n }\n }\n elseif($variety && $new_variety)\n {\n // upravujeme pouze variantu produktu\n $this->cart_products=$this->session->get($this->cart_name.\"_products\");\n if(!($quantity && is_numeric($quantity) && !(strpos($quantity, \".\") || strpos($quantity, \"-\")))) $quantity=$this->cart_products[$product_id][$variety];\n if($variety!=$new_variety) unset($this->cart_products[$product_id][$variety]);\n $this->cart_products[$product_id][$new_variety]=$quantity;\n \n $this->session->set($this->cart_name.\"_products\", $this->cart_products);\n \n //$this->populate_cart();\n $this->messages=array(Hana_Response::MSG_PROCESSED=>__(\"Varianta byla upravena\")); // TODO jazykova tabulka\n return true; \n }\n }", "title": "" }, { "docid": "9aa76fc2a9db8a72ceac14d4616a8798", "score": "0.5059637", "text": "public function getQuantity(){\n\t\treturn $this->quantity;\n\t}", "title": "" }, { "docid": "5605c6d14597183e3b30e7bb9269456b", "score": "0.5049144", "text": "public function getQuantity()\r\n {\r\n return $this->quantity;\r\n }", "title": "" }, { "docid": "5605c6d14597183e3b30e7bb9269456b", "score": "0.5049144", "text": "public function getQuantity()\r\n {\r\n return $this->quantity;\r\n }", "title": "" }, { "docid": "66d72e4b3a99ee483531d907d33ce6fe", "score": "0.5044751", "text": "public function inputQuantity($id,$data) {\n DB::table('tbl_products')->where('id',$id)->update(['remain'=>$data]);\n }", "title": "" }, { "docid": "de063e8a715e21af0bb322438e898f39", "score": "0.5027838", "text": "public function setQuantity(int $quantity): self\n {\n $this->quantity = $quantity;\n\n return $this;\n }", "title": "" }, { "docid": "b00766c5dc5c4b5c9738a582ff45a22b", "score": "0.50194997", "text": "public function setQty($prod_id, $newQty)\n {\n // if the item already exists\n if (array_key_exists($prod_id, $this->items)) {\n $this->items[$prod_id] = $newQty;\n } else {\n $this->items = $this->items + array($prod_id => $newQty);\n }\n\n if ($this->items[$prod_id] <= 0) {\n unset($this->items[$prod_id]);\n }\n $this->calcTotal();\n }", "title": "" }, { "docid": "c99b02b2c7aeb852c3209022c6642506", "score": "0.5010099", "text": "public function setDiscount($discount)\n {\n $this->discount = $discount * 100;\n }", "title": "" }, { "docid": "c6568e4402bec2077f0097ba8959b547", "score": "0.4987039", "text": "public function getQuantity(): int\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "adb17b77f39e867fea7e7158dda6f01d", "score": "0.49802876", "text": "public function setAssurance($value)\r\n\t{\r\n\t\t$this->assurance = $value;\r\n\t}", "title": "" }, { "docid": "a54504ff87c5ddc999baa0310338e1e8", "score": "0.4979322", "text": "public function getQuantity()\n {\n return parent::getQuantity();\n }", "title": "" }, { "docid": "70a189eff2488c5328e6e5c1fee411c2", "score": "0.4976673", "text": "public function setAmount($amount)\n {\n $this->amount = $amount;\n }", "title": "" }, { "docid": "73dd17f8b2a13905c2507d5f017687d3", "score": "0.49743193", "text": "function editStockQuantity($supplementID, $quantity) {\r\n global $db;\r\n $query = \"UPDATE `tblsupplements` \r\n SET Current_stock_levels = Current_stock_levels - '{$quantity}' \r\n WHERE Supplement_id = '{$supplementID}'\";\r\n return mysqli_query($db, $query) or die(mysqli_error($db));\r\n}", "title": "" }, { "docid": "973def5e79bb0679c93da41bb495a572", "score": "0.49672502", "text": "public function updateQuantity() {\n\t\t$count = 0;\n\t\tforeach ($_SESSION['cart'] as $cartRow) {\n\t\t\tif ($cartRow['id'] == $this->productId) {\n\t\t\t\t$_SESSION['cart'][$count]['quantity'] = $this->quantity;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$count += 1;\n\t\t}\n\t}", "title": "" }, { "docid": "90c5b85ac7d478045053576b4d81bf00", "score": "0.4947724", "text": "protected function setOfferNature ()\n {\n $this->offerNature = $this->offer->rate_nature->value;\n }", "title": "" }, { "docid": "95e80465387da6216754d3c4895fdda5", "score": "0.49463513", "text": "public function setQuantity($quantity)\r\n {\r\n $this->quantity = $quantity;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "c95799e7a5a2cff2ccc2d160a5399e38", "score": "0.4945524", "text": "public function setQty($qty)\n\t{\n\t\tif(!is_numeric($qty))\n\t\t\tthrow new Exception('Quantity must be numeric');\n\n\t\t$this->qty = $qty;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "6cf168b9810bf2cba6f14da6186ed802", "score": "0.4934054", "text": "public function testUpdateQuantity()\n {\n $cart = new Cart(['foo']);\n $this->assertEquals(['foo'], $cart->getItems());\n\n $cart->updateQuantity('foo', 6);\n $this->assertEquals(['foo', 'foo', 'foo', 'foo', 'foo', 'foo'], $cart->getItems());\n\n $cart->updateQuantity('foo', 4);\n $this->assertEquals(['foo', 'foo', 'foo', 'foo'], $cart->getItems());\n\n $cart = new Cart(['foo', 'bar', 'foobar']);\n $cart->updateQuantity('foo', 4);\n $this->assertEquals(['bar', 'foo', 'foo', 'foo', 'foo', 'foobar'], $cart->getItems());\n }", "title": "" }, { "docid": "d428ec68fc6cfa7c964692d9d99cb031", "score": "0.49337685", "text": "public function setQuantity($quantity)\n {\n $this->quantity = $quantity;\n return $this;\n }", "title": "" }, { "docid": "c25911937da8c35b7de037c432dbda2e", "score": "0.49332854", "text": "protected function updateInvent($quantity,$product_id ,$name_size){\n $sql = 'UPDATE `tbl_detail_size` SET `quantity`=:quantity WHERE `product_id`=:product_id AND `name_size`=:name_size';\n $result = $this->pdo->prepare($sql);\n $result->bindParam(\":quantity\", $quantity);\n $result->bindParam(\":product_id\", $product_id);\n $result->bindParam(\":name_size\", $name_size);\n $result->execute();\n }", "title": "" }, { "docid": "55e2975ea5802d73e1284c8ed5003fed", "score": "0.4932788", "text": "public function setPurchasePriceAttribute($value)\n {\n $this->attributes['purchase_price'] = $value* 100;\n }", "title": "" }, { "docid": "04aa0ea8ae3f55490d18edb72adebf5b", "score": "0.49324173", "text": "public function setQuantity(int $quantity)\n {\n $this->quantity = $quantity;\n\n return $this;\n }", "title": "" }, { "docid": "34e0415224a11e82aeb7ba04b4ca9563", "score": "0.49318057", "text": "public function setQuantity($quantity)\n {\n $this->quantity = (int) $quantity;\n\n return $this;\n }", "title": "" }, { "docid": "007409c94b8713b5ced235c73680ac85", "score": "0.49245718", "text": "function setItem_price($price){\n $this->item_price = $price;\n }", "title": "" }, { "docid": "495ecb078ba156c9b347c4cc653c491e", "score": "0.49202713", "text": "public function updateQuantity()\n {\n $this->load('itemAddressFiles');\n $quantity = 0;\n foreach ($this->itemAddressFiles as $addressFileLink) {\n $quantity += $addressFileLink->count;\n }\n $quantity += $this->mail_to_me;\n $this->quantity = $quantity;\n $this->save();\n $this->_calculateTotal();\n }", "title": "" }, { "docid": "fd6cf3b7111129dcc182ba8da18b0c45", "score": "0.4918611", "text": "public function set_bonus($bonus) {\n\t\t$this->_bonus = $bonus;\n\t}", "title": "" }, { "docid": "c5cb76a89ea1437d01819650c38e3a3e", "score": "0.4917006", "text": "public function arbitrage($quantity, $pair, $buyExchange, $buyLimit, $sellExchange, $sellLimit)\n {\n }", "title": "" }, { "docid": "d6b46fdd2d76e520f2340cd1b330b5f2", "score": "0.49163345", "text": "public function getQuantity();", "title": "" }, { "docid": "d6b46fdd2d76e520f2340cd1b330b5f2", "score": "0.49163345", "text": "public function getQuantity();", "title": "" }, { "docid": "d6b46fdd2d76e520f2340cd1b330b5f2", "score": "0.49163345", "text": "public function getQuantity();", "title": "" }, { "docid": "d6b46fdd2d76e520f2340cd1b330b5f2", "score": "0.49163345", "text": "public function getQuantity();", "title": "" }, { "docid": "d6b46fdd2d76e520f2340cd1b330b5f2", "score": "0.49163345", "text": "public function getQuantity();", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.49159396", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.49159396", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.49159396", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.49159396", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.49159396", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.49159396", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.49159396", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.49159396", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.49159396", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.49159396", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.49159396", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.49159396", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.49159396", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.49159396", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "071cf3274fb59c3a5b98092102c04652", "score": "0.49148476", "text": "public static function setQuantity($user_id = 0, $product_id = 0, $quantity = 1){\n return self::where('user_id', '=', $user_id)->where('product_id', '=', $product_id)->update(array('quantity' => $quantity));\n }", "title": "" }, { "docid": "9f02c85180072780894bbbbbedb9bbd2", "score": "0.49128252", "text": "function update_item($key, $quantity) {\n $quantity = (int) $quantity;\n if (isset($_SESSION['cart13'][$key])) {\n if ($quantity <= 0) {\n unset($_SESSION['cart13'][$key]);\n } else {\n $_SESSION['cart13'][$key]['qty'] = $quantity;\n $total = $_SESSION['cart13'][$key]['cost'] *\n $_SESSION['cart13'][$key]['qty'];\n $_SESSION['cart13'][$key]['total'] = $total;\n }\n }\n }", "title": "" }, { "docid": "8436e41ea347504b8adcd13c4998f19a", "score": "0.48932782", "text": "public function updateQuantity($id, $reduced_quantity) {\n\t\tif ($this->items[$id]['qty'] == 0) {\n\t\t\tunset($this->items[$id]);\n\t\t\treturn;\n\t\t}\n\n\t\tif ($reduced_quantity == 0) {\n\t\t\tunset($this->items[$id]);\n\t\t\treturn;\n\t\t}\n\n\t\t$this->items[$id]['qty'] = $reduced_quantity;\n\t\t$this->items[$id]['price'] = $this->items[$id]['item']['price'] * $reduced_quantity;\n\t\t$this->totalQty-=$reduced_quantity;\n\n\n\t\tif ($this->totalQty == 0) {\n\t\t\tSession::forget('cart');\n\t\t}\n\t}", "title": "" }, { "docid": "fad601d1251b182f1e62f0508ee7b974", "score": "0.48911107", "text": "public function updateQuantityById($quantity, $id){\n $conn = new db();\n $conn = $conn->connexion();\n $actualStock = $this->getArticleById($id);\n $newStock = $actualStock[0][\"stock\"] + $quantity;\n $req = $conn->prepare(\"UPDATE article SET stock = \" . $newStock . \" WHERE id = \". $id);\n $req->execute();\n }", "title": "" }, { "docid": "78bbb03aa80dbf973161851219f1c692", "score": "0.4866523", "text": "public function testUpdateQty() {\n $requestData = [\n 'items' => [\n [\n 'qty' => '1',\n 'entity_id' => '19'\n ], [\n 'qty' => '1',\n 'entity_id' => '21'\n ], [\n 'qty' => '1',\n 'entity_id' => '22'\n ], [\n 'qty' => '1',\n 'entity_id' => '23'\n ], [\n 'qty' => '1',\n 'entity_id' => '25'\n ]\n ],\n 'order_id' => 'WP11513743849738'\n ];\n\n $serviceInfo = [\n 'rest' => [\n 'resourcePath' => self::RESOURCE_PATH . 'updateqty?',\n 'httpMethod' => RestRequest::HTTP_METHOD_POST,\n ]\n ];\n\n $results = $this->_webApiCall($serviceInfo, $requestData);\n \\Zend_Debug::dump($results);\n $this->assertNotNull($results);\n $this->assertGreaterThanOrEqual(\n '1',\n $results['total_count'],\n 'The results doesn\\'t have items.'\n );\n }", "title": "" }, { "docid": "610c26a9eb8e431bbcf65b25c1a86dd4", "score": "0.48642024", "text": "public function add($product) {\n $ajout = false;\n if ($this->products_id) {\n if (array_key_exists($product->id,$this->products_id)) {\n if ($product->quantity >= $this->products_id[\"$product->id\"]++){\n $this->products_id[\"$product->id\"]++;\n $ajout = true;\n }\n }else {\n if($product->quantity >= 1){\n $this->products_id += [\"$product->id\"=>1];\n $ajout = true;\n }\n }\n }else {\n if($product->quantity >= 1){\n $this->products_id = [\"$product->id\"=>1];\n $ajout = true;\n }\n }\n if($ajout){\n $this->total_product ++;\n if($this->discountisused){\n $this->total_price += ($product->price - $product->price * $this->discounts[$this->discountused]/100);\n $this->discountamount += $product->price*$this->discounts[$this->discountused]/100;\n }\n\n else\n $this->total_price += $product->price;\n }\n}", "title": "" } ]
ab7b826ab1ebe01281ef292e19516b5b
Generates an URLfriendly slug from the given string.
[ { "docid": "ca96a10c253ff36c6df8a814d4557be1", "score": "0.0", "text": "public static function slug($str, $separator = '-')\n\t\t{\n\t\t\t$str = static::toAscii($str);\n\n\t\t\t// Remove all characters that are neither alphanumeric, nor the separator nor a whitespace.\n\t\t\t$str = preg_replace('![^'.preg_quote($separator).'\\pL\\pN\\s]+!u', '', mb_strtolower($str));\n\n\t\t\t// Standardize the separator.\n\t\t\t$flip = $separator == '-' ? '_' : '-';\n\t\t\t$str = preg_replace('!['.preg_quote($flip).']+!u', $separator, $str);\n\n\t\t\t// Replace all separator characters and whitespace by a single separator.\n\t\t\t$str = preg_replace('!['.preg_quote($separator).'\\s]+!u', $separator, $str);\n\n\t\t\treturn trim($str, $separator);\n\t\t}", "title": "" } ]
[ { "docid": "e4861c03f94a5f392ab1b47f2cc2539d", "score": "0.8306309", "text": "public static function slug($string)\r\n {\r\n $slug = SlugGenerator::cleanurl($string);\r\n \r\n return $slug;\r\n }", "title": "" }, { "docid": "be705ab1e4d03dee8ca5529bb1438533", "score": "0.81704813", "text": "public function generateSlug($string) {\r\n $slug = preg_replace('/[^A-Za-z0-9\\-]/', '', str_replace(' ', '-', $string)); // Removes special chars.\r\n return $slug.'-'.time();\r\n }", "title": "" }, { "docid": "91b1dc22912f208caccfd4040802b1ee", "score": "0.7905768", "text": "function SlugsCreator($string)\n {\n $string = str_replace(' ', '-', $string);\n $string = strtolower($string);\n $string = preg_replace('/[^A-Za-z0-9-]/', '', $string);\n $string = trim(preg_replace(\"![^a-z0-9]+!i\", \"-\", $string), '-');\n return $string;\n }", "title": "" }, { "docid": "7f1320e74fe74efd1dfd61c48f79e1a8", "score": "0.78971523", "text": "function create_slug($string){\n $string = $this->remove_accents($string);\n $string = $this->symbols_to_words($string);\n $string = strtolower($string);\n $string = str_replace('�',\"'\",$string);\n $space_chars = array(\n \" \" , \"�\" , \"�\" , \"�\" , \"/\", \"\\\\\" , \":\" , \";\" , \".\" , \"+\" , \"#\" , \"~\" , \"_\" , \"|\"\n );\n foreach($space_chars as $char){\n $string = str_replace($char, '-', $string);\n }\n $string = preg_replace('/([^a-zA-Z0-9\\-]+)/', '', $string);\n $string = preg_replace('/-+/', '-', $string); \n if(substr($string, -1)==='-'){ \n $string = substr($string, 0, -1);\n }\n if(substr($string, 0, 1)==='-'){\n $string = substr($string, 1);\n }\n return $string;\n }", "title": "" }, { "docid": "e13e199b2173854789e483016ee8c11b", "score": "0.7819292", "text": "public static function MakeSlug($str)\n\t{\n\t\t$from = array(\n\t\t\t'/'\n\t\t);\n\t\t$to = array(\n\t\t\t'-'\n\t\t);\n\t\treturn str_replace($from, $to, $str);\n\t}", "title": "" }, { "docid": "4ea9b4170d0534bead743ca77705adf5", "score": "0.78066015", "text": "function to_slug($string)\n{\n return strtolower(trim(preg_replace('/[^A-Za-z0-9-]+/', '-', $string)));\n}", "title": "" }, { "docid": "47f46ceb4ac684e64cc177f490daf63b", "score": "0.7784091", "text": "function makeSlug($str) {\n\n $str = safeString($str);\n\n $str = str_replace(\" \", \"-\", $str);\n $str = strtolower(preg_replace(\"/[^a-zA-Z0-9_-]/i\", \"\", $str));\n $str = preg_replace(\"/[-]+/i\", \"-\", $str);\n\n $str = substr($str,0,64); // 64 chars ought to be long enough.\n\n return $str;\n\n}", "title": "" }, { "docid": "656d18704842950fd2cc0ec7e1d36039", "score": "0.77734333", "text": "function str_slug(string $string): string {\n $string = filter_var(mb_strtolower($string), FILTER_SANITIZE_STRIPPED);\n $formats = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜüÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿRr\"!@#$%&*()_-+={[}]/?;:.,\\\\\\'<>°ºª';\n $replace = 'aaaaaaaceeeeiiiidnoooooouuuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRr ';\n\n $slug = str_replace([\"-----\", \"----\", \"---\", \"--\"], \"-\",\n str_replace(\" \", \"-\",\n trim(strtr(utf8_decode($string), utf8_decode($formats), $replace))\n )\n );\n return $slug;\n}", "title": "" }, { "docid": "84a7f00693ab1ab6453bbc3f96ef01ae", "score": "0.77386624", "text": "protected function slug($string)\n {\n return filter_var(str_replace(' ', '-', strtolower(trim($string))), FILTER_SANITIZE_URL);\n }", "title": "" }, { "docid": "0b311bf25bed5724305d331959743514", "score": "0.77137285", "text": "public static function slug(string $string): string\n\t{\n\t\treturn rawurlencode(mb_strtolower(preg_replace('/\\s{1,}/', '-', trim(preg_replace('/[\\x0-\\x1F\\x21-\\x2C\\x2E-\\x2F\\x3A-\\x40\\x5B-\\x60\\x7B-\\x7F]/', '', $string)))));\n\t}", "title": "" }, { "docid": "9fed21831eca1d6a6b6a2be54c5c5387", "score": "0.76832205", "text": "public function generateSlug($input):string;", "title": "" }, { "docid": "7c27620b1345ba70ae18ec5e42142cea", "score": "0.7661866", "text": "protected function slug($string)\n {\n $str = strtolower(trim($string));\n $str = preg_replace('/[^a-z0-9-]/', '-', $str);\n\n return preg_replace('/-+/', \"-\", $str);\n }", "title": "" }, { "docid": "3176459556f34a13de6ff88bb8c46198", "score": "0.7626808", "text": "public static function generate_slug($str, $limit = NULL)\n\t{\n\t\t// Convert all to ascii first\n\t\t$slug = UTF8::transliterate_to_ascii(trim($str));\n\t\t\n\t\t// Lower case and slug style\n\t\t$slug = strtolower($slug);\n\t\t\n\t\t$slug = str_replace(array(' ', '+', '.'), array('-', '-plus', '-'), $slug);\n\t\t$slug = preg_replace('/[^0-9a-zA-Z-_]/', '', $slug);\n\t\t\n\t\tif ($limit)\n\t\t{\n\t\t\treturn Text::limit_chars($slug, $limit, '');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $slug;\n\t\t}\n\t}", "title": "" }, { "docid": "43ce8368e4528ae8cac9dc7a3b593f58", "score": "0.7614613", "text": "function generateSlug($str)\n {\n setlocale(LC_ALL, 'en_US.UTF8');\n $r = '';\n $str = iconv('UTF-8', 'ASCII//TRANSLIT', $str);\n for ($i = 0; $i < strlen($str); $i++) {\n $ch1 = $str[$i];\n $ch2 = mb_substr($str, $i, 1);\n $r .= $ch1 == '?' ? $ch2 : $ch1;\n }\n $str = str_replace(\n array('&auml;', '&ouml;', '&uuml;', '&szlg', '&amp;', ' & ', '&', ' - ', '/', ' / ', ' ', '='),\n array('ae', 'oe', 'ue', 'ss', '-and-', '-and-', '-and-', '-', '-', '-', '-', '-'),\n strtolower($r)\n );\n $chars = \"abcdefghijklmnopqrstuvwxyz0123456789_-\";\n $replace = '';\n for ($i=0; $i<strlen($str); $i++) {\n if (false !== strpos($chars, $str{$i})) {\n $replace .= $str{$i};\n }\n }\n return $replace;\n }", "title": "" }, { "docid": "2a35050beaa73a4f6e151648b933fafd", "score": "0.75681144", "text": "private function generateSlug($str)\n {\n $str = preg_replace('~[^\\\\pL\\d]+~u', '_', $str);\n // trim\n $str = trim($str, '_');\n // transliterate\n $str = iconv('utf-8', 'us-ascii//TRANSLIT', $str);\n // lowercase\n $str = strtolower($str);\n // remove unwanted characters\n $str = preg_replace('~[^-\\w]+~', '', $str);\n if (empty($str)) {\n return 'n-a';\n }\n\n return $str;\n }", "title": "" }, { "docid": "e967d63e86062e65ec058c429126578c", "score": "0.7491431", "text": "protected function slug($string)\n {\n return strtolower(trim(preg_replace('/[^A-Za-z0-9-]+/', '-', $string)));\n }", "title": "" }, { "docid": "34c285a2d3788b742abf234f69329d23", "score": "0.744637", "text": "public static function slug(string $string): string\n {\n return strtolower(str_replace([' ', '_', '.', '/', '\\\\'], '-', $string));\n }", "title": "" }, { "docid": "6c85a02d29e11884db8d14d4f5705454", "score": "0.7443216", "text": "public static function slug($string)\n\t{\n\t\treturn mb_strtolower(preg_replace('/\\s{1,}/', '-', trim(preg_replace('/[\\x21-\\x2F\\x3A-\\x40\\x5B-\\x60\\x7B-\\x7E]/', '', $string))));\n\t}", "title": "" }, { "docid": "9564277090d8bdaa9c1ad9d5b3d89f90", "score": "0.74388224", "text": "public function slug($str)\n {\n $str = strtolower(trim($str));\n $str = preg_replace('/[^a-z0-9-]/', '-', $str);\n $str = preg_replace('/-+/', \"-\", $str);\n\n return $str;\n }", "title": "" }, { "docid": "39bfd6f3ce55c50473fb33e090fe973d", "score": "0.74329585", "text": "public static function generateSlug($string, $charset = null) {\r\n if (!isset($charset)) {\r\n $charset = App::getInstance()->getDefaultCharset();\r\n }\r\n return strtolower(trim(preg_replace('~[^0-9a-z]+~i', '-', html_entity_decode(preg_replace('~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities($string, ENT_QUOTES, $charset)), ENT_QUOTES, $charset)), '-'));\r\n }", "title": "" }, { "docid": "d17b989d272f348a13cf181eb82306e9", "score": "0.7330358", "text": "public static function slug($string) {\n\n\t\t$table = array(\n\t\t\t'Š'=>'S', 'š'=>'s', 'Đ'=>'Dj', 'đ'=>'dj', 'Ž'=>'Z', 'ž'=>'z', 'Č'=>'C', 'č'=>'c', 'Ć'=>'C', 'ć'=>'c',\n\t\t\t'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',\n\t\t\t'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O',\n\t\t\t'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss',\n\t\t\t'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e',\n\t\t\t'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o',\n\t\t\t'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b',\n\t\t\t'ÿ'=>'y', 'Ŕ'=>'R', 'ŕ'=>'r', '/'=>'-', ' '=>'-',\n\t\t);\n\n\t\t// -- Remove duplicated spaces\n\t\t$stripped = preg_replace(array('/\\s{2,}/', '/[\\t\\n]/'), ' ', $string);\n\n\t\t// -- Returns the slug\n\t\treturn strtolower(strtr($string, $table));\n\t}", "title": "" }, { "docid": "4651767cf1ca7e28daf7934f264aad51", "score": "0.73277384", "text": "function slugify(string $string): string\n{\n return strtolower(trim(preg_replace('/[^A-Za-z0-9-]+/', '-', $string)));\n}", "title": "" }, { "docid": "11c147c7ba4f5b43dfe066faa2d58c24", "score": "0.72611403", "text": "public static function slugify($string): string\n {\n // Filter\n $string = mb_strtolower($string, 'UTF-8');\n $string = strip_tags($string);\n $string = preg_replace('/\\s/', '-', $string);\n $string = preg_replace('/[-]+/', '-', $string);\n\n // Sanitise\n $string = filter_var($string, FILTER_SANITIZE_URL);\n\n // Replace anything that isn't a unicode letter, number or dash -\n $string = preg_replace('/[^\\p{L}\\p{N}-]+/', '', $string);\n\n return $string;\n }", "title": "" }, { "docid": "3ff97bd6c7714024eee80d903f235a40", "score": "0.72323865", "text": "public function slug($input)\n {\n // Remove punctuation, but leave hyphens\n $input = preg_replace('/[^\\w\\s-]/', '', $input);\n\n // Change underscores and spaces to hyphens\n $input = str_replace([' ', '_'], '-', $input);\n\n // Remove double hyphens\n while (strpos($input, '--') !== false) {\n $input = str_replace('--', '-', $input);\n }\n\n // Remove leading and trailing hyphens\n $input = ltrim($input, '-');\n $input = rtrim($input, '-');\n\n // Return the generated slug with all lower case letters\n return strtolower($input);\n }", "title": "" }, { "docid": "efd151948097bfb9e191da4a3742e68d", "score": "0.72137076", "text": "public static function slugify(string $string) {\n $string = preg_replace('~[^\\pL\\d]+~u', '_', $string);\n\n // transliterate\n $string = iconv('utf-8', 'us-ascii//TRANSLIT', $string);\n\n // remove unwanted characters\n $string = preg_replace('~[^-\\w]+~', '', $string);\n\n // trim\n $string = trim($string, '-');\n\n // remove duplicate -\n $string = preg_replace('~-+~', '-', $string);\n\n // lowercase\n $string = strtolower($string);\n\n if (empty($string)) {\n return 'n-a';\n }\n\n return $string;\n }", "title": "" }, { "docid": "3ad6f5a77a5425065aff8f7ac849f729", "score": "0.71812344", "text": "public static function generateSafeSlug($slug)\n {\n // transform url\n $slug = preg_replace('/[^a-zA-Z0-9]/', '-', $slug);\n $slug = strtolower(trim($slug, '-'));\n\n //Removing more than one dashes\n $slug = preg_replace('/\\-{2,}/', '-', $slug);\n\n return $slug;\n }", "title": "" }, { "docid": "e48e7372e4348fb3a0046d0049192265", "score": "0.7177385", "text": "public static function camelcaseToSlug($string){\n return strtolower(preg_replace( '/([a-z0-9])([A-Z])/', \"$1-$2\", $string ));\n }", "title": "" }, { "docid": "91bc0b5bda271aea2332a0fb6f8cff4d", "score": "0.7159474", "text": "function wpsctSlug($str) {\r\n $str = strtolower(trim($str));\r\n $str = preg_replace('/[^a-z0-9-]/', '_', $str);\r\n $str = preg_replace('/-+/', \"_\", $str);\r\n return $str;\r\n }", "title": "" }, { "docid": "2a94428e37e71fe937e154b351e7fa93", "score": "0.7143225", "text": "function getSlug( $url ) {\n # Prep string with some basic normalization\n $url = strtolower($url);\n $url = strip_tags($url);\n $url = stripslashes($url);\n $url = html_entity_decode($url);\n # Remove quotes (can't, etc.)\n $url = str_replace('\\'', '', $url);\n # Replace non-alpha numeric with hyphens\n $match = '/[^a-z0-9]+/';\n $replace = '-';\n $url = preg_replace($match, $replace, $url);\n $url = trim($url, '-');\n return $url;\n}", "title": "" }, { "docid": "248fd8a525a4382561937aece17b4404", "score": "0.7127265", "text": "public static function to_slug($str)\n\t{\n\t if($str !== mb_convert_encoding( mb_convert_encoding($str, 'UTF-32', 'UTF-8'), 'UTF-8', 'UTF-32') )\n\t\t\t$str = mb_convert_encoding($str, 'UTF-8', mb_detect_encoding($str));\n\t\t\t$str = htmlentities($str, ENT_NOQUOTES, 'UTF-8');\n\t\t\t$str = preg_replace('`&([a-z]{1,2})(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig);`i', '\\\\1', $str);\n\t\t\t$str = html_entity_decode($str, ENT_NOQUOTES, 'UTF-8');\n\t\t\t$str = preg_replace(array('`[^a-z0-9]`i','`[-]+`'), '-', $str);\n\t\t\t$str = strtolower( trim($str, '-') );\n\n\t \treturn $str;\n\t}", "title": "" }, { "docid": "f132937986fee8ef637eba16894c2b0c", "score": "0.71251786", "text": "function slugify($string)\n{\n return strtolower(trim(preg_replace(array('~[^0-9a-z]~i', '~-+~'), '-', preg_replace('~&([a-z]{1,2})(acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities($string, ENT_QUOTES, 'UTF-8'))), '-'));\n}", "title": "" }, { "docid": "26c941711d77a56bef4b62f22c9c7fd9", "score": "0.7124458", "text": "function pods_create_slug( $orig, $strict = true ) {\n\n\t$str = preg_replace( '/([_ \\\\/])/', '-', trim( $orig ) );\n\n\tif ( $strict ) {\n\t\t$str = preg_replace( '/([^0-9a-z\\-])/', '', strtolower( $str ) );\n\t} else {\n\t\t$str = urldecode( sanitize_title( strtolower( $str ) ) );\n\t}\n\n\t$str = preg_replace( '/(\\-){2,}/', '-', $str );\n\t$str = trim( $str, '-' );\n\t$str = apply_filters( 'pods_create_slug', $str, $orig );\n\n\treturn $str;\n}", "title": "" }, { "docid": "65103164b1a5bd5a78c0cb66a62764d2", "score": "0.70814097", "text": "public static function getUrlSlug($free_string) {\n $free_string = strtolower($free_string);\n $free_string = mb_ereg_replace ( '[^a-z]' , '-' , $free_string);\n return $free_string;\n }", "title": "" }, { "docid": "f607280d2528ce89218113e34a895cf0", "score": "0.70745647", "text": "function build_slug($str)\n {\n $result = '';\n $isSpace = 0;\n $arr_unicode = getArraycompositeUnicodeToLatin();\n\n $str = mb_strtolower($str,'utf-8');\n $len = mb_strlen($str,'utf-8');\n for($i=0;$i<$len;$i++)\n {\n $char =mb_substr($str, $i, 1,'utf-8');\n if($char==' '||$char=='-')\n {\n if($isSpace==0)\n {\n $result.=\"-\";\n }\n $isSpace = 1;\n }\n else if(array_key_exists($char,$arr_unicode))\n {\n\n $result.=$arr_unicode[$char];\n $isSpace = 0;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "269da3e08be2a5f5edb008ba23d7801b", "score": "0.70450354", "text": "public function stringURLUnicodeSlug($string)\n\t{\n\t\treturn JFilterOutput::stringURLUnicodeSlug($string);\n\t}", "title": "" }, { "docid": "5fe2b5622c49eed8027b5ced457156da", "score": "0.70446277", "text": "protected function simpleSlug($str)\n {\n $slug = preg_replace('@[\\s!:;_\\?=\\\\\\+\\*/%&#]+@', '-', $str);\n if (true === $this->toLower) {\n $slug = mb_strtolower($slug, Yii::app()->charset);\n }\n $slug = trim($slug, '-');\n return $slug;\n }", "title": "" }, { "docid": "da81a58119a5c2eabcb5a5fbf95d75d1", "score": "0.70265687", "text": "public function slug($str)\n {\n if (is_array($str)) {\n $str = implode(\" \", $str);\n }\n\n return $this->app['slugify']->slugify($str);\n }", "title": "" }, { "docid": "72fc38deb57460085d2b75f627592b87", "score": "0.7009975", "text": "public static function generateSlug($text){\n\t\t$text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\n\t\t// transliterate\n\t\t$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\t\t// remove unwanted characters\n\t\t$text = preg_replace('~[^-\\w]+~', '', $text);\n\t\t// trim\n\t\t$text = trim($text, '-');\n\t\t// remove duplicate -\n\t\t$text = preg_replace('~-+~', '-', $text);\n\t\t// lowercase\n\t\t$text = strtolower($text);\n\t\tif (empty($text)) {\n\t\t\treturn 'n-a';\n\t\t}\n\t\treturn $text.\"-\".rand(1111,9999);\t\t\n\t}", "title": "" }, { "docid": "c752c982d17ac46b2de4c3826c850714", "score": "0.7004004", "text": "protected function generateSlug()\r\n {\r\n // Generate a slug\r\n $slug = $this->generateString(8);\r\n \r\n // Check if slug is unique\r\n if (empty($this->getMediaMapper()->selectRowBySlug($slug))) {\r\n // Return slug\r\n return $slug;\r\n }\r\n \r\n // Generate a new slug\r\n return $this->generateSlug();\r\n }", "title": "" }, { "docid": "832d86c705827ff0121efe434ca6c892", "score": "0.6995474", "text": "function create_slug($text) {\n $text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n // trim\n $text = trim($text, '-');\n // remove duplicate -\n $text = preg_replace('~-+~', '-', $text);\n // lowercase\n $text = strtolower($text);\n if (empty($text)) {\n return 'n-a';\n }\n return $text;\n}", "title": "" }, { "docid": "eceda68198fd4d2c6e3d8f1bcadf4ab0", "score": "0.6976325", "text": "public static function generateSlug($text){\n\t\t\t$text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\n\t\t\t// transliterate\n\t\t\t$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\t\t\t// remove unwanted characters\n\t\t\t$text = preg_replace('~[^-\\w]+~', '', $text);\n\t\t\t// trim\n\t\t\t$text = trim($text, '-');\n\t\t\t// remove duplicate -\n\t\t\t$text = preg_replace('~-+~', '-', $text);\n\t\t\t// lowercase\n\t\t\t$text = strtolower($text);\n\t\t\tif (empty($text)) {\n\t\t\t\treturn 'n-a';\n\t\t\t}\n\t\t\treturn $text.\"-\".rand(1111,9999);\t\t\n\t\t}", "title": "" }, { "docid": "bb7ee67597492ee62adbf6ce49fdb2ae", "score": "0.6975171", "text": "protected function makeSlug($text)\n\t{\n\t\t$text = preg_replace('~[^\\\\pL\\d]+~u', '-', $text);\n\n\t\t// trim\n\t\t$text = trim($text, '-');\n\n\t\t// transliterate\n\t\t$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\n\t\t// lowercase\n\t\t$text = strtolower($text);\n\n\t\t// remove unwanted characters\n\t\t$text = preg_replace('~[^-\\w]+~', '', $text);\n\n\t\tif (empty($text))\n\t\t{\n\t\t\treturn 'n-a';\n\t\t}\n\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "abc7ddb3b5dd62f93dd2729f6acc1e72", "score": "0.6956095", "text": "function slugify($slug)\n{\n $slug = preg_replace('~[^\\pL\\d]+~u', '-', $slug);\n\n // transliterate\n if (function_exists('iconv')){\n $slug = iconv('utf-8', 'us-ascii//TRANSLIT', $slug);\n }\n\n // remove unwanted characters\n $slug = preg_replace('~[^-\\w]+~', '', $slug);\n\n // trim\n $slug = trim($slug, '-');\n\n // remove duplicate -\n $slug = preg_replace('~-+~', '-', $slug);\n\n // lowercase\n $slug = strtolower($slug);\n\n if (empty($slug)) {\n return 'n-a';\n }\n\n return $slug;\n}", "title": "" }, { "docid": "764b7be3268e463eece6e96519640ab6", "score": "0.6948543", "text": "public static function Slug($str)\r\n {\r\n $phpSlugger = new PhpSlugger();\r\n return mb_strtolower($phpSlugger->slugit($str));\r\n }", "title": "" }, { "docid": "5d8f2702feb3fdd392aa8281e0e2d7b3", "score": "0.6938941", "text": "public function generate_slug($i = 1)\n {\n $slug = url_title($this->title, 'underscore', TRUE);\n $cur = $this->slug;\n if ($slug == $cur)\n {\n return;\n }\n // check if slug exists\n if ( $i > 1)\n {\n $slug .= $i;\n }\n if (self::exists($slug))\n {\n return $this->generate_slug(++$i);\n }\n else\n {\n $this->slug = $slug;\n }\n }", "title": "" }, { "docid": "51c2c8eb53171c58bc002780a6e4e32f", "score": "0.6937083", "text": "function generateSlug($phrase, $maxLength) {\n\t$result = strtolower($phrase);\n\t\n\t\n\t$result = preg_replace(\"/[^a-z0-9\\s-]/\", \"\", $result);\n\t$result = trim(preg_replace(\"/[\\s-]+/\", \" \", $result));\n\t$result = trim(substr($result, 0, $maxLength));\n\t$result = preg_replace(\"/\\s/\", \"-\", $result);\n\t\n\t\n\treturn $result;\n}", "title": "" }, { "docid": "0e9bfb50843ca4db63f1419add4c74a4", "score": "0.69298655", "text": "public function toSlug(): static;", "title": "" }, { "docid": "ef7f94d56966dfc4db38d661a019f40a", "score": "0.69201857", "text": "function makeSlug($text) {\n $text = preg_replace('~[^\\\\pL\\d]+~u', '-', $text);\n // trim\n $text = trim($text, '-');\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n // lowercase\n $text = strtolower($text);\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n if (empty($text)) {\n return 'n-a';\n }\n return $text;\n}", "title": "" }, { "docid": "89ffe7f1f9f7481a576c7970e05666e7", "score": "0.6918278", "text": "static public function de_slug( $string ) {\n return ucwords( str_replace( \"_\", \" \", $string ) );\n }", "title": "" }, { "docid": "1d92651e6ff297dca3cb787f58380e6f", "score": "0.6908095", "text": "public function makeSlug(){\n while(true){\n $slug = Str::random(20);\n if($this->isUnique($slug)){\n return $slug;\n break;\n }\n }\n\n }", "title": "" }, { "docid": "c33952095224d41ac070f09a6fa3d869", "score": "0.6880674", "text": "public function slugify($string)\n {\n $rule = 'NFD; [:Nonspacing Mark:] Remove; NFC';\n $transliterator = \\Transliterator::create($rule);\n $string = $transliterator->transliterate($string);\n\n return preg_replace(\n '/[^a-z0-9]/',\n '-',\n strtolower(trim(strip_tags($string)))\n );\n }", "title": "" }, { "docid": "0261d0cf8f3c6820438ee26bff1d20cb", "score": "0.6869884", "text": "function slug($url){\n\n$url = strtolower($url);\n\n$url = strip_tags($url);\n\n$url = stripslashes($url);\n\n$url = html_entity_decode($url);\n\n# Remove quotes (can't, etc.)\n\n$url = str_replace('\\'', '', $url);\n\n# Replace non-alpha numeric with hyphens\n\n$match = '/[^a-z0-9]+/';\n\n$replace = '-';\n\n$url = preg_replace($match, $replace, $url);\n\n$url = trim($url, '-');\n\nreturn $url;\n\n}", "title": "" }, { "docid": "cc59adbca20991796f61cf3ab017d7d7", "score": "0.6863857", "text": "protected function generateSlug()\n\t{\n\t\t$this->attributes['slug'] = Str::slug($this->name);\n\t}", "title": "" }, { "docid": "906f02660866c3426b0e90fe674423c5", "score": "0.6841732", "text": "static public function getSlug($string, $length = 0) {\n $string = transliterator_transliterate(\"Any-Latin; NFD; [:Nonspacing Mark:] Remove; NFC; [:Punctuation:] Remove; Lower();\", $string);\n\n if ($length > 0 && strlen($string) > $length) {\n $string = substr($string, 0, $length);\n }\n\n $string = trim(str_replace(' ', '-', $string));\n\n return $string;\n }", "title": "" }, { "docid": "d8d1e8aa5eb4a340b423a6fd036b8b28", "score": "0.6824249", "text": "public static function slugify($string)\n {\n return \\Tools::strtolower(str_replace(array(' ', '.'), '-', \\Tools::replaceAccentedChars($string)));\n }", "title": "" }, { "docid": "cf3fd041246bfb91588735da91a2d9a8", "score": "0.6806409", "text": "function slug($string, $length = -1, $separator = '-') {\n // transliterate\n $string = transliterate($string);\n\n // lowercase\n $string = strtolower($string);\n\n // replace non alphanumeric and non underscore charachters by separator\n $string = preg_replace('/[^a-z0-9]/i', $separator, $string);\n\n // replace multiple occurences of separator by one instance\n $string = preg_replace('/'. preg_quote($separator) .'['. preg_quote($separator) .']*/', $separator, $string);\n\n // cut off to maximum length\n if ($length > -1 && strlen($string) > $length) {\n $string = substr($string, 0, $length);\n }\n\n // remove separator from start and end of string\n $string = preg_replace('/'. preg_quote($separator) .'$/', '', $string);\n $string = preg_replace('/^'. preg_quote($separator) .'/', '', $string);\n\n return $string;\n}", "title": "" }, { "docid": "e419697a9d7e46ae3ae03ff97f6c5889", "score": "0.67970806", "text": "function pinyin_slug(\n $string, array $options = []\n ) {\n return app(Pinyin::class)->slug($string, $options);\n }", "title": "" }, { "docid": "5f2ea8fc4b0155be9a50d0c5bffa6712", "score": "0.6797001", "text": "function str_slug($string, $separator = '-') {\n\t\treturn xpl\\Utility\\Inflector::title($string, $separator);\n\t}", "title": "" }, { "docid": "d501cd96b8a66a1960c5b2cc6a18ba5f", "score": "0.6790055", "text": "public function slug($identifier): Slug;", "title": "" }, { "docid": "83296f1244d25ee07e3e40940e8c205d", "score": "0.6789753", "text": "function slug($s, $spaces='-'){\n\t$s = strtolower($s);\n\t$s = preg_replace('/[-_\\s\\.]/', $spaces, $s);\n\treturn $s;\n}", "title": "" }, { "docid": "dc410491666f0f438c674a59676dd74d", "score": "0.678482", "text": "function slugify($slug) {\n\t$slug = strtolower(trim($slug));\n \n\t// adding - for spaces and union characters\n\t$find = array(' ', '&', '\\r\\n', '\\n', '+',',');\n\t$slug = str_replace($find, '-', $slug);\n \n\t//delete and replace rest of special chars\n\t$find = array('/[^a-z0-9\\-<>]/', '/[\\-]+/', '/<[^>]*>/');\n\t$repl = array('', '-', '');\n\t$slug = preg_replace($find, $repl, $slug);\n \n\t//return the URL-friendly slug\n\treturn $slug; \n}", "title": "" }, { "docid": "03c98a3fd9ba3cd92ce9b39fca3b221f", "score": "0.67779565", "text": "function generate_url($str) {\n $str = str_replace(' ', '-', $str);\n return urlencode(clean_string($str));\n}", "title": "" }, { "docid": "1a93672fbde36b6581411bce228a03ba", "score": "0.6772104", "text": "public static function urlAmigavel($string){\r\r\r\n\t\t\t\t$slug = '-';\r\r\r\n\t\t\t\t$string = strtolower($string);\r\r\r\n\t\t\t\r\r\r\n\t\t\t\t// Código ASCII das vogais\r\r\r\n\t\t\t\t$ascii['a'] = range(224, 230);\r\r\r\n\t\t\t\t$ascii['e'] = range(232, 235);\r\r\r\n\t\t\t\t$ascii['i'] = range(236, 239);\r\r\r\n\t\t\t\t$ascii['o'] = array_merge(range(242, 246), array(240, 248));\r\r\r\n\t\t\t\t$ascii['u'] = range(249, 252);\r\r\r\n\t\t\t \r\r\r\n\t\t\t\t// Código ASCII dos outros caracteres\r\r\r\n\t\t\t\t$ascii['b'] = array(223);\r\r\r\n\t\t\t\t$ascii['c'] = array(231);\r\r\r\n\t\t\t\t$ascii['d'] = array(208);\r\r\r\n\t\t\t\t$ascii['n'] = array(241);\r\r\r\n\t\t\t\t$ascii['y'] = array(253, 255);\r\r\r\n\t\t\t \r\r\r\n\t\t\t\tforeach ($ascii as $key=>$item) {\r\r\r\n\t\t\t\t\t$acentos = '';\r\r\r\n\t\t\t\t\tforeach ($item AS $codigo) $acentos .= chr($codigo);\r\r\r\n\t\t\t\t\t$troca[$key] = '/['.$acentos.']/i';\r\r\r\n\t\t\t\t}\r\r\r\n\t\t\t \r\r\r\n\t\t\t\t$string = preg_replace(array_values($troca), array_keys($troca), $string);\r\r\r\n\t \r\r\r\n\t\t\t\t// Slug?\r\r\r\n\t\t\t\tif ($slug) {\r\r\r\n\t\t\t\t\t// Troca tudo que não for letra ou número por um caractere ($slug)\r\r\r\n\t\t\t\t\t$string = preg_replace('/[^a-z0-9]/i', $slug, $string);\r\r\r\n\t\t\t\t\t// Tira os caracteres ($slug) repetidos\r\r\r\n\t\t\t\t\t$string = preg_replace('/' . $slug . '{2,}/i', $slug, $string);\r\r\r\n\t\t\t\t\t$string = trim($string, $slug);\r\r\r\n\t\t\t\t}\r\r\r\n\t\t\t\t\r\r\r\n\t\t\t\treturn $string;\r\r\r\n\t\t\t\t\r\r\r\n\t\t\t}", "title": "" }, { "docid": "3f645652fe84a46963f35a910b0f0db3", "score": "0.6770556", "text": "function slugify($str) {\n $str = preg_replace('~[^\\pL\\d]+~u', '-', $str);\n // transliterate\n $str = iconv('utf-8', 'us-ascii//TRANSLIT', $str);\n // remove unwanted characters\n $str = preg_replace('~[^-\\w]+~', '', $str);\n // trim\n $str = trim($str, '-');\n // remove duplicate -\n $str = preg_replace('~-+~', '-', $str);\n // lowercase\n $str = strtolower($str);\n if (empty($str)) {\n return 'n-a';\n }\n return $str;\n}", "title": "" }, { "docid": "237488dfda55cd1d4037df3ca6ab3736", "score": "0.67599005", "text": "public static function getSlug();", "title": "" }, { "docid": "5d285f8d03ce00f54292f725f92b0111", "score": "0.6752575", "text": "function url_slug($original){\n $str = strtolower($original);\n //convert dollar sign to S\n #remove special characters\n\n str_replace(array(\".\",\",\",\"'\"), \"\" , $str);\n str_replace(array(\"'s\",\"$\"), \"s\" , $str);\n $str = preg_replace('/[^a-zA-Z0-9]/i',' ', $str);\n #remove white space characters from both side\n $str = trim($str);\n #remove double or more space repeats between words chunk\n $str = preg_replace('/\\s+/', ' ', $str);\n #fill spaces with hyphens\n $str = preg_replace('/\\s+/', '-', $str);\n # check if final string contains data or not \n $str = (empty($str) || $str == \"\") ? substr(md5($original), 0, 12) : $str;\n \n return $str;\n }", "title": "" }, { "docid": "b10250f5e46615a3870c62caff833b3b", "score": "0.6751154", "text": "public static function getUrlFriendlyString($str) \n {\n // or a '-', combine multiple dashes (i.e., '---') into one dash '-'.\n $_str = preg_replace(\"/-+/\", \"-\", preg_replace(\"/[^a-z0-9-]/\", \"\",\n strtolower(str_replace(\" \", \"-\", $str))));\n return substr($_str, 0, 40);\n }", "title": "" }, { "docid": "c4fb39a94b5733ef35968a1ce4e8a0c5", "score": "0.6745343", "text": "function utf8_url_slug($str = '', $maxl = -1, $trns = false)\n{\n $str = utf8_clean($str, true); //True == $remove_bom\r\n\n\n $str = utf8_strtolower($str);\n\n if ($trns && iconv_loaded())\n {\n $str = iconv('UTF-8', 'US-ASCII//TRANSLIT//IGNORE', $str);\n }\n\n if (pcre_utf8_support())\n {\n $str = preg_replace('/[^\\\\p{L}\\\\p{Nd}\\-_]+/u', '-', $str);\n }\n else\n {\n $str = preg_replace('/[\\>\\<\\+\\?\\&\\\"\\'\\/\\\\\\:\\s\\-\\#\\%\\=]+/', '-', $str);\n }\n\n if ($maxl > 0)\n {\n $maxl = (int) $maxl;\n\n $str = utf8_substr($str, 0, $maxl);\n }\n\n $str = trim($str, '_-');\n\n if (!strlen($str))\n {\n $str = substr(md5(microtime(true)), 0, ($maxl == -1 ? 32 : $maxl));\n }\n\n return $str;\n}", "title": "" }, { "docid": "41b055a6a6b5a360a9dccf9540822e6d", "score": "0.67385566", "text": "function bfilter_create_slug($slug, $hyphenate = true){\r\n\t$slug = str_replace(array(\"'\", '\"'), \"\", strtolower($slug));\r\n\r\n\tif($hyphenate){\r\n\t\t$slug = preg_replace(\"/[-\\s\\W]/\",\"-\",$slug);\r\n\t}\r\n\r\n\treturn preg_replace(\"/[^a-z0-9-_]/\", \"\", $slug);\r\n}", "title": "" }, { "docid": "26a782c71d7220de6783937e5fa794ec", "score": "0.6720169", "text": "public function stringToSlug($str) {\n // turn into slug\n $str = Inflector::slug($str);\n // to lowercase\n $str = strtolower($str);\n return $str;\n }", "title": "" }, { "docid": "d36752d533b4022555c7f7f14b8ccc31", "score": "0.6715299", "text": "final public static function slug($slug){\n\t\t$slug = strtolower($slug);\n\t\t$slug = str_replace(['á', 'é', 'í', 'ó', 'ú', 'ñ'],['a', 'e', 'i', 'o', 'u', 'n'], $slug);\n\t\t$slug = str_replace([' ', '\\r\\n', '\\n', '+', '%', '\\r', '&'], '-', $slug);\n\n\t\treturn preg_replace(['/[^a-z0-9\\-<>]/', '/[\\-]+/', '/<[^>]*>/'], ['', '-', ''], $slug);\n\t}", "title": "" }, { "docid": "1cbef4e94e8a19a6948b912da4b0a244", "score": "0.6702689", "text": "static public function slugGenerator($text) {\n $text = preg_replace('~[^\\pL\\d]+~u', '_', $text);\n\n // transliterate\n $text = iconv('UTF-8', 'UTF-16BE', $text);\n\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n\n // trim\n $text = trim($text, '-');\n\n // remove duplicate -\n $text = preg_replace('~-+~', '_', $text);\n\n // lowercase\n $text = strtolower($text);\n\n if (empty($text)) {\n return '';\n }\n\n return $text;\n }", "title": "" }, { "docid": "8ad34464a4d8a409977f57bafd7d0fde", "score": "0.67002606", "text": "public function toSlug() {\r\n $value = strtolower( trim( $this->_base ) );\r\n\r\n $chars = array( 'ä', 'ö', 'ü', 'ß' );\r\n $replacements = array( 'ae', 'oe', 'ue', 'ss' );\r\n $value = str_replace( $chars, $replacements, $value );\r\n\r\n $pattern = array( '/(é|è|ë|ê)/', '/(ó|ò|ö|ô)/', '/(ú|ù|ü|û)/' );\r\n $replacements = array( 'e', 'o', 'u' );\r\n $value = preg_replace( $pattern, $replacements, $value );\r\n\r\n $value = preg_replace( \"/[:!?\\.\\/']+/\", '', $value );\r\n\r\n $pattern = array( '/[^a-z0-9-]/', '/-+/' );\r\n $value = preg_replace( $pattern, \"-\", $value );\r\n\r\n return $value;\r\n }", "title": "" }, { "docid": "7b1381a574391d9c938d922428d03325", "score": "0.66941005", "text": "public function createSlug($input)\n {\n $url = '';\n if (isset($input['url'])) {\n $url = $input['url'];\n }\n return $this->slugsModel->createSlug($url);\n }", "title": "" }, { "docid": "3510051fd608ecfb95f5783f687feb63", "score": "0.6687353", "text": "function sluggify($url)\n {\n $url = strtolower($url);\n $url = strip_tags($url);\n $url = stripslashes($url);\n $url = html_entity_decode($url);\n\n # Remove quotes (can't, etc.)\n $url = str_replace('\\'', '', $url);\n\n # Replace non-alpha numeric with hyphens\n $match = '/[^a-z0-9]+/';\n $replace = '-';\n $url = preg_replace($match, $replace, $url);\n\n $url = trim($url, '-');\n\n return $url;\n }", "title": "" }, { "docid": "e737ff8dbea95474ffad15be86fb8953", "score": "0.66864514", "text": "public function new_slug(){\n\t\t$this->slug = substr( str_shuffle( URL_CHARSET ), 0, URL_LENGTH );\n\t}", "title": "" }, { "docid": "082b0460592176b0ca64ba5dc4d6926f", "score": "0.6639702", "text": "function slug($value) {\n $value = preg_replace('![^'.preg_quote('_').'\\pL\\pN\\s]+!u', '', mb_strtolower($value));\n\n // regular-expression.info\n //replace underscore with a dash\n $value = preg_replace('!['.preg_quote('-').'\\s]+!u', '-', $value);\n\n return trim($value,'-');\n}", "title": "" }, { "docid": "455c499b7206de6663afd650f6a0b8bf", "score": "0.6627542", "text": "function slugify($string) {\n $string = iconv('UTF-8', 'ASCII//TRANSLIT', $string);\n $string = strtolower($string);\n $string = preg_replace(\"/\\W/\", \"-\", $string);\n $string = preg_replace(\"/-+/\", '-', $string);\n $string = trim($string, '-');\n return $string;\n}", "title": "" }, { "docid": "498e28336abe8b3f6c5035d4c62af9dc", "score": "0.66172975", "text": "function slug(string $title) {\n\n\t$slug = preg_replace('/[^\\w]/', '-', $title);\n $slug = strtolower(preg_replace('/(-+)/', '-', $slug));\n\n\treturn $slug;\n}", "title": "" }, { "docid": "b9c3a6c2d99c5751b2887eaeee38c98f", "score": "0.66166425", "text": "function slug($value){\n\t//pL letters ; pN numbers; s whitespace ; !u this should be treated as utf-8\n\t$value = preg_replace('![^'.preg_quote('_').'\\pL\\pN\\s]+!u', '', mb_strtolower($value));\n\n\t//replace underscore and whitespace with a dash\n\t$value = preg_replace('!['.preg_quote('-').'\\s]+!u', '-', $value);\n\n\t//remove whitespace\n\treturn trim($value,'-');\n\n}", "title": "" }, { "docid": "2680162f9503ed4e478df2d9bff092cd", "score": "0.66101956", "text": "public function slugify($str) : string\n {\n $str = mb_strtolower(trim($str));\n $str = str_replace(['å','ä'], 'a', $str);\n $str = str_replace('ö', 'o', $str);\n $str = preg_replace('/[^a-z0-9-]/', '-', $str);\n $str = trim(preg_replace('/-+/', '-', $str), '-');\n return $str;\n }", "title": "" }, { "docid": "51706e536af7dc2146aeee9703e3a6b9", "score": "0.66038805", "text": "public function slug($name)\n {\n $name = preg_replace('#[^\\\\pL\\d]+#u', '-', $name);\n // trim\n $name = trim($name, '-');\n // transliterate\n if (function_exists('iconv'))\n {\n $name = iconv('utf-8', 'us-ascii//TRANSLIT', $name);\n }\n // lowercase\n $name = strtolower($name);\n // remove unwanted characters\n $slug = preg_replace('#[^-\\w]+#', '', $name);\n if (empty($name))\n {\n return 'n-a';\n }\n return $slug;\n }", "title": "" }, { "docid": "1ea0aeb6405a8868a17f423e67e34767", "score": "0.6603417", "text": "protected static function create_slug($name)\n\t{\n\t\t$name = convert_accented_characters($name);\n\n\t\treturn strtolower(preg_replace('/-+/', '-', preg_replace('/[^a-zA-Z0-9]/', '-', $name)));\n\t}", "title": "" }, { "docid": "91c9882451290783aac2e79bd19d5ba4", "score": "0.66031283", "text": "public function slugify($str) {\r\n $str = mb_strtolower(trim($str));\r\n $str = str_replace(array('å','ä','ö'), array('a','a','o'), $str);\r\n $str = preg_replace('/[^a-z0-9-]/', '-', $str);\r\n $str = trim(preg_replace('/-+/', '-', $str), '-');\r\n return $str;\r\n }", "title": "" }, { "docid": "e951e23168f6e9c47f1cdaa1dd965038", "score": "0.657406", "text": "function string_slugify($text)\n{\n $text = preg_replace('~[^\\\\pL\\d]+~u', '-', $text);\n\n // trim\n $text = trim($text, '-');\n\n // transliterate\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\n // lowercase\n $text = strtolower($text);\n\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n\n if (empty($text))\n {\n return 'n-a';\n }\n\n return $text;\n}", "title": "" }, { "docid": "37f107c2a26b8163c43bff15879e56fe", "score": "0.65638375", "text": "function slugify ($str, $replace=\"-\") {\n $str = preg_replace('/\\W+/', $replace, $str);\n $str = strtolower(trim($str, $replace));\n return $str;\n}", "title": "" }, { "docid": "6430e84725cbaf5805e4da1b58607698", "score": "0.6558389", "text": "public function slug($value)\n {\n require_once 'FrontZend/Filter/Slug.php';\n $filter = new FrontZend_Filter_Slug();\n $slug = $filter->filter($value);\n\n return $slug;\n }", "title": "" }, { "docid": "5d50708f7052b824960269b454296e06", "score": "0.6551594", "text": "public static function slug($string, $flags = 0) {\n $string = trim($string);\n $string = self::latinizeAndRemoveDiacritics($string);\n $string = strtolower($string);\n\n // Hiphenize.\n $patterns = array(\n '/ /i',\n '/\\'/i',\n );\n $replacements = array(\n '-',\n '-',\n );\n $string = preg_replace($patterns, $replacements, $string);\n\n $string = self::simpleChars($string, '', $flags);\n\n return $string;\n }", "title": "" }, { "docid": "ee9c60cacbf7020daa31827d44c46b72", "score": "0.6549065", "text": "public static function alias(string $string): string\n {\n $cleaned = self::strip($string);\n\n return Str::slug($cleaned);\n }", "title": "" }, { "docid": "dd29918d8dcfbb53316940fed3883655", "score": "0.654741", "text": "static public function slug($string, $replacement = '-') {\n\t\t//$quotedReplacement=preg_quote($replacement, '/');\n\n\t\t$string=self::transliterate($string);\n\t\t$string=preg_replace('/[^\\s\\p{Ll}\\p{Lm}\\p{Lo}\\p{Lt}\\p{Lu}\\p{Nd}]/mu', ' ', $string);\n\t\t$string=preg_replace('/\\s+/',$replacement,$string);\n\t\t//return preg_replace('/^['.$quotedReplacement.']+|['.$quotedReplacement.']+$/','',$string);\n\t\treturn trim($string,$replacement);\n\t}", "title": "" }, { "docid": "846a86bba1aaf03d5d20895223c4bda0", "score": "0.6544385", "text": "function _s_get_ID_slug( $text ) {\n $slug = urlencode( strtolower( preg_replace( '/[^a-z]+/i', '', $text ) ) );\n return $slug;\n}", "title": "" }, { "docid": "f50243159f9dc19c4dd7be2866e7334b", "score": "0.6527821", "text": "private function slugify($str) {\n $str = mb_strtolower(trim($str));\n $str = str_replace(array('å', 'ä', 'ö'), array('a', 'a', 'o'), $str);\n $str = preg_replace('/[^a-z0-9-]/', '-', $str);\n $str = trim(preg_replace('/-+/', '-', $str), '-');\n return $str;\n }", "title": "" }, { "docid": "8bcee74308e201d706dfb19f34bfcadf", "score": "0.65180373", "text": "function slug($value) {\n $value = strtr($value, array('ą' => 'a', 'ć' => 'c', 'ę' => 'e', 'ł' => 'l', 'ń' => 'n', 'ó' => 'o', 'ś' => 's', 'ź' => 'z', 'ż' => 'z', 'Ą' => 'A', 'Ć' => 'C', 'Ę' => 'E', 'Ł' => 'L', 'Ń' => 'N', 'Ó' => 'O', 'Ś' => 'S', 'Ź' => 'Z', 'Ż' => 'Z'));\n $value = str_replace(' ', '-', trim($value));\n $value = preg_replace('/[^a-zA-Z0-9\\-_]/', '', (string) $value);\n $value = preg_replace('/[\\-]+/', '-', $value);\n $value = stripslashes($value);\n return urlencode(strtolower($value));\n }", "title": "" }, { "docid": "8bcee74308e201d706dfb19f34bfcadf", "score": "0.65180373", "text": "function slug($value) {\n $value = strtr($value, array('ą' => 'a', 'ć' => 'c', 'ę' => 'e', 'ł' => 'l', 'ń' => 'n', 'ó' => 'o', 'ś' => 's', 'ź' => 'z', 'ż' => 'z', 'Ą' => 'A', 'Ć' => 'C', 'Ę' => 'E', 'Ł' => 'L', 'Ń' => 'N', 'Ó' => 'O', 'Ś' => 'S', 'Ź' => 'Z', 'Ż' => 'Z'));\n $value = str_replace(' ', '-', trim($value));\n $value = preg_replace('/[^a-zA-Z0-9\\-_]/', '', (string) $value);\n $value = preg_replace('/[\\-]+/', '-', $value);\n $value = stripslashes($value);\n return urlencode(strtolower($value));\n }", "title": "" }, { "docid": "a14a8af76962e93b16b6adee48fd4abb", "score": "0.65035456", "text": "function slugify($str)\n{\n $str = mb_strtolower(trim($str));\n $str = str_replace(array('å','ä','ö'), array('a','a','o'), $str);\n $str = preg_replace('/[^a-z0-9-]/', '-', $str);\n $str = trim(preg_replace('/-+/', '-', $str), '-');\n return $str;\n}", "title": "" }, { "docid": "ed10c252a59c9ea87995f59989c3b09e", "score": "0.64920735", "text": "function slugify($str)\n{\n return strtolower(preg_replace('/\\s+/', '', $str));\n}", "title": "" }, { "docid": "c4085810322ab991cf3e59981a7f6a06", "score": "0.64872074", "text": "public function getSlug();", "title": "" }, { "docid": "c4085810322ab991cf3e59981a7f6a06", "score": "0.64872074", "text": "public function getSlug();", "title": "" }, { "docid": "c4085810322ab991cf3e59981a7f6a06", "score": "0.64872074", "text": "public function getSlug();", "title": "" }, { "docid": "855c844db20748db3f11953c32f7a225", "score": "0.6472722", "text": "public function slug($slug = null);", "title": "" }, { "docid": "98422c4d8f477f238f4fa556da264195", "score": "0.6462387", "text": "abstract public function slug($slug = null);", "title": "" } ]
30ff8fc0767f84ca66468123dfe4ea25
Flat list of all files in the directory (recursive)
[ { "docid": "04a029df3c53a5c904f2544663d96739", "score": "0.0", "text": "protected static function get_dir_contents($dir, &$results = []) {\n $files = scandir($dir);\n\n foreach ($files as $key => $value) {\n $path = realpath($dir.DIRECTORY_SEPARATOR.$value);\n if (!is_dir($path)) {\n $results[] = $path;\n } else if ($value != \".\" && $value != \"..\") {\n self::get_dir_contents($path, $results);\n $results[] = $path;\n }\n }\n\n return $results;\n }", "title": "" } ]
[ { "docid": "a8bfeae2eaf5ab0f2e8051f059a31895", "score": "0.75418884", "text": "public function getAllFilesFromDir(){\r\n if(empty($this->allFiles)){\r\n $this->rescanFilesInDir();\r\n }\r\n return $this->allFiles;\r\n }", "title": "" }, { "docid": "de430a9d3049d06fdd30f52e95763e84", "score": "0.7388586", "text": "public function allFiles($directory);", "title": "" }, { "docid": "d3adaceaa7f4d8a921c7f0ddda3ffff7", "score": "0.7336287", "text": "function file_list($dir)\n{\n\t$files = array();\n\t//lol, php\n\tforeach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir)) as $path)\n\t{\n\t\tif(is_file($path) and !is_dir($path))$files[] = $path;\n\t}\n\treturn $files;\n}", "title": "" }, { "docid": "2c90d787bfef9ba7dac736afc9dc5ec3", "score": "0.7229875", "text": "public function fileList()\n {\n $result = [];\n\n $dirContent = opendir( $this->_dirPath );\n while (($file = readdir($dirContent)) !== false) {\n if (($file == '..')||($file == '.')) continue;\n\n if( !is_dir($this->_dirPath . '/' . $file) ) {\n $result[] = $file;\n }\n }\n closedir($dirContent);\n\n return $result;\n }", "title": "" }, { "docid": "5f548d06977ee05b356e022dcef3fae2", "score": "0.7189634", "text": "abstract public function getAllFiles();", "title": "" }, { "docid": "694eba34c62d21127afa992a2cc3c6e2", "score": "0.7141153", "text": "public function listFiles()\n {\n if ($this->getValue('__uid')) {\n try {\n $vfs = $this->vfsInit();\n if ($vfs->exists(Turba::VFS_PATH, $this->getValue('__uid'))) {\n return $vfs->listFolder(Turba::VFS_PATH . '/' . $this->getValue('__uid'));\n }\n } catch (Turba_Exception $e) {}\n }\n\n return array();\n }", "title": "" }, { "docid": "fb1ffccfa5b12d10b2003efa01e6573c", "score": "0.7056522", "text": "public function getList()\n {\n $fileList = [];\n\n foreach ($this->fileIterator as $file) {\n $fileList[] = str_replace($this->rootPath, '', $file);\n }\n\n return $fileList;\n\n }", "title": "" }, { "docid": "35324d7851ac9ea07c838c5cc5073984", "score": "0.70485044", "text": "public function getAllFiles() {\n $future = $this->buildLocalFuture(array('list -R'));\n return new PhutilCallbackFilterIterator(\n new LinesOfALargeExecFuture($future),\n array($this, 'filterFiles'));\n }", "title": "" }, { "docid": "596183e2a3e2632807c14cb3cf8b40f3", "score": "0.7034087", "text": "public function getFileList()\n {\n $output = null;\n $retval = null;\n $command = 'cd /files';\n\n exec('cd /files; ls -a', $output, $retval);\n return $output;\n }", "title": "" }, { "docid": "3cee22fd7d3f039c7ba8a758260f74d4", "score": "0.7018755", "text": "function find_all_files($dir)\n{\n $root = scandir($dir);\n foreach($root as $value)\n {\n if($value === '.' || $value === '..') {continue;}\n if(is_file(\"$dir/$value\")) {$result[]=\"$dir/$value\";continue;}\n foreach(find_all_files(\"$dir/$value\") as $value)\n {\n $result[]=$value;\n }\n }\n return $result;\n}", "title": "" }, { "docid": "6bb0d20305b905016e14e68082235ad4", "score": "0.69816417", "text": "public function listFiles()\n\t{\n\t\tif($this->isDirectory())\n\t\t{\n\t\t\t$files = array();\n\t\t\t$dir = dir($this->getAbsoluteName());\n\t\t\twhile($filename = $dir->read())\n\t\t\t{\n\t\t\t\tif($filename !== \".\" && $filename !== \"..\")\n\t\t\t\t{\n\t\t\t\t\t$tmpfile = $this->join($filename);\n\t\t\t\t\t$files[] = $tmpfile;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dir->close();\n\t\t\treturn $files;\t\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "6b5b17a54ae29fb8a67bc89c95dafd20", "score": "0.6970861", "text": "public function dir() {\n\t\t$this->list = array();\n\t\t$this->recurseDir('', 0, '', false);\n\t}", "title": "" }, { "docid": "6f84200614ce1f710db738c5a9f6004e", "score": "0.6934727", "text": "function scandirRecursive($dir) {\r\n $files = array();\r\n foreach (scandir($dir) as $file) {\r\n if ($file == '.' || $file == '..' || $file == '.svn' || $file == 'temp.php' || !preg_match('/.xml|.html/', $file))\r\n continue;\r\n if (is_dir($file))\r\n $files = array_merge($files, scandirRecursive($file));\r\n else\r\n $files[] = \"$dir/$file\";\r\n }\r\n return $files;\r\n }", "title": "" }, { "docid": "885d431a8a289acc7618487bb92b2662", "score": "0.6871449", "text": "public function dir_readdir();", "title": "" }, { "docid": "885d431a8a289acc7618487bb92b2662", "score": "0.6871449", "text": "public function dir_readdir();", "title": "" }, { "docid": "0eb4fa43229833db35ea9fb5fcfff5ec", "score": "0.68629605", "text": "function list_directories_and_files ($rootdir) {\n\n $results = \"\";\n \n $dir = opendir($rootdir);\n while (false !== ($file=readdir($dir))) {\n if ($file==\".\" || $file==\"..\") {\n continue;\n }\n $results[$file] = $file;\n }\n closedir($dir); \n return $results;\n }", "title": "" }, { "docid": "7b39e5dd55a9e13db3a967c5a57f5e8c", "score": "0.6800512", "text": "public function get_files() {\n\n\t\tif ( ! empty( $this->files ) )\n\t\t\treturn $this->files;\n\n\t\t$this->files = array();\n\n\t\tif ( defined( 'RecursiveDirectoryIterator::FOLLOW_SYMLINKS' ) )\n\t\t\t$this->files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $this->get_root(), RecursiveDirectoryIterator::FOLLOW_SYMLINKS ), RecursiveIteratorIterator::SELF_FIRST, RecursiveIteratorIterator::CATCH_GET_CHILD );\n\n\t\telse\n\t\t\t$this->files = $this->get_files_fallback( $this->get_root() );\n\n\t\treturn $this->files;\n\n\t}", "title": "" }, { "docid": "339041d44d0358e6c8a0bc19993b720f", "score": "0.67935735", "text": "protected function getFiles() {\n $structure = [\n 'edde12.html' => \"test1\",\n 'test-tester(1980-2010)_1221.html' => \"test2\",\n ];\n /** @var vfsStream root */\n $this->root = vfsStream::setup('root',777, $structure);\n $handle = opendir($this->root->url());\n\n $files = [];\n while ($a = readdir($handle)){\n $files[] = $a;\n }\n return $files;\n }", "title": "" }, { "docid": "41519395943ca9dc2cace62846566bdb", "score": "0.6774335", "text": "function find_all_files($dir){\n $scan = scandir($dir);\n foreach ($scan as $value) {\n if($value === '.' || $value === '..'){continue;}\n if(is_file(\"$dir/$value\")){$result[]=str_replace(\"../../..\",\"\",\"$dir/$value\");continue;}\n foreach(find_all_files(\"$dir/$value\") as $value){\n $result[]=str_replace(\"../../..\",\"\",$value);;\n }\n }\n return $result;\n}", "title": "" }, { "docid": "b8ef58e1b59fc5f064918d58cba57701", "score": "0.6760866", "text": "function getFiles($dir_name)\n{\n $dir_files = scandir($dir_name);\n $file_list = array();\n foreach ($dir_files as $file_name) {\n $file = \"$dir_name/$file_name\";\n if (is_file($file)) {\n $file_list[] = $file;\n } elseif (($file_name[0] != '.') && is_dir($file)) {\n $file_list = array_merge(getFiles($file), $file_list);\n }\n }\n return $file_list;\n}", "title": "" }, { "docid": "f4cb3f0569164efe07dbdc6837113c93", "score": "0.67390573", "text": "protected function get_all_files() {\n\t$f_list = $this->admin_filemanager->get_file_list();\n\t$files = array();\n\tforeach($f_list as $file) {\n\t $sa = explode(';', $file);\n\t $files[] = $sa[0];\n\t}\n\n\treturn $files;\n }", "title": "" }, { "docid": "d5de84f40083613af9efc1577e6cd2a7", "score": "0.6716366", "text": "public function allFiles(string $directory, bool $showHiddenFiles = false): Iterator;", "title": "" }, { "docid": "3ab1ca12f8880b81e32c2259c708db23", "score": "0.67150074", "text": "function get_file_list($dir) {\r\n\r\n\tif ($handle = opendir($dir)) {\r\n\t\t$files = '';\r\n\t\twhile (false !== ($file = readdir($handle))) {\r\n\t\t\tif ($file != \".\" && $file != \"..\" && substr($file, -4) == '.xml') {\r\n\t\t\t\t$files .= \"<file>$file</file>\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tclosedir($handle);\r\n\t\treturn $files;\r\n\t}\r\n}", "title": "" }, { "docid": "4981f61d6a38c87eae271db84f86610f", "score": "0.67095155", "text": "function files($list, $recursive=1) {\r\n foreach ($list as &$fn) {\r\n $fn = is_dir($fn) && $recursive /*should actually mask the recdiriterator below*/\r\n ? new RegexIterator(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($fn)), '/\\.(php[345]?|phtml)$/')\r\n : new ArrayIterator(file_exists($fn) ? array($fn) : glob($fn));\r\n }\r\n //@bug: https://bugs.php.net/bug.php?id=49104\r\n $l = new AppendIterator();\r\n $l->append($workaround = new ArrayIterator(array(1))); foreach ($list as $i) { if ($i) { $l->append($i); } } unset($workaround[0]);\r\n return($l);\r\n}", "title": "" }, { "docid": "bb22a06ffff1087e2662a17f9d3c8642", "score": "0.67019284", "text": "public static function allFiles($directory){\n\t\treturn Illuminate\\Filesystem\\Filesystem::allFiles($directory);\n\t }", "title": "" }, { "docid": "8e1e353ee9a914d019ed02326942e2c2", "score": "0.66989577", "text": "public function getFiles($directory = '');", "title": "" }, { "docid": "444859100b0de0219a80a70444907da7", "score": "0.66908985", "text": "public function listContents($directory = '', $recursive = false) {\n // TODO: Implement listContents() method.\n }", "title": "" }, { "docid": "e75626130d48c4a9cb7786ad6973022d", "score": "0.66865057", "text": "public function getFiles() : array\n\t{\n\t\t$files = [];\n\t\t$this->app->file->listDir($this->path, $dirs, $files);\n\n\t\tif ($files) {\n\t\t\t$files = array_fill_keys($files, true);\n\t\t}\n\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "b7bd902628a3dfb50a56036a196a2496", "score": "0.66518986", "text": "function get_file_list($path) {\n $files = array();\n if (!is_dir($path)) { return $files; }\n\n $items = scandir($path);\n foreach ($items as $item) {\n $item_path = $path . DIRECTORY_SEPARATOR . $item;\n if (is_file($item_path)) {\n $files[] = $item_path;\n }\n }\n return $files;\n }", "title": "" }, { "docid": "6a3d186d7872b882ced36fc16d03de0e", "score": "0.6649224", "text": "function scanFiles($path)\n{\n $results = [];\n foreach (glob($path . DIRECTORY_SEPARATOR . '*') as $filename) {\n $results[] = $filename;\n if (is_dir($filename)) {\n $results = array_merge($results, scanFiles($filename));\n }\n }\n return $results;\n}", "title": "" }, { "docid": "74d9bd12b98550bf534d9e66f9475334", "score": "0.66129017", "text": "function _fileList($directory,$options)\n {\n $ret = false;\n if (@is_dir($directory) && (!in_array(strtolower($directory),$options['ignore_dirs']))) {\n $ret = array();\n $d = @dir($directory);\n while($d && $entry=$d->read()) {\n if ($entry{0} != '.') {\n if (is_file($directory . DIRECTORY_SEPARATOR . $entry)) {\n $ret[] = $directory . DIRECTORY_SEPARATOR . $entry;\n }\n if (is_dir($directory . DIRECTORY_SEPARATOR . $entry) && ($options['recurse_dir'] != false)) {\n $tmp = $this->_fileList($directory . DIRECTORY_SEPARATOR . $entry,$options);\n if (is_array($tmp)) {\n foreach($tmp as $ent) {\n $ret[] = $ent;\n }\n }\n }\n }\n }\n if ($d) {\n $d->close();\n }\n } else {\n return false;\n }\n\n return $ret;\n }", "title": "" }, { "docid": "7e7d47eb8e496310ba818765831a6612", "score": "0.66072357", "text": "function get_files($directory, $extensionfilter = null)\n{\n $filelist = array();\n if ($handle = opendir($directory)) {\n while (false !== ($entry = readdir($handle))) {\n $entry_fullpath = $directory.DIRECTORY_SEPARATOR . $entry;\n if (is_dir($entry_fullpath)) {\n // Directories are recursed into\n if ($entry !=\".\" && $entry != \"..\") {\n $filelist = array_merge($filelist, get_files($entry_fullpath, $extensionfilter));\n }\n }\n if (is_file($entry_fullpath)) {\n // Files are appended to array\n if (empty($extensionfilter) || endsWith($entry, \".{$extensionfilter}\")) {\n $filelist[$entry_fullpath] = $entry;\n }\n }\n }\n closedir($handle);\n }\n return $filelist;\n}", "title": "" }, { "docid": "952389f94184f6e90fd55b3c3a8e4fee", "score": "0.66058284", "text": "function getFileList($dir) {\n\t\t$retval = array();\n\t\n\t\t# add trailing slash if missing\n\t\tif(substr($dir, -1) != \"/\") $dir .= \"/\";\n\t\n\t\t# open pointer to directory and read list of files\n\t\t$d = @dir($dir) or die(\"getFileList: Failed opening directory $dir for reading\");\n\t\twhile(false !== ($entry = $d->read())) {\n\t\t # skip some files\n\t\t if($entry[0] == \".\" || $entry == 'skins_admin.php') continue;\n\t\t if(is_dir(\"$dir$entry\")) { // Only directories.\n\t\t\t$retval[] = array(\n\t\t\t \"name\" => \"$entry/\",\n\t\t\t \"type\" => filetype(\"$dir$entry\"),\n\t\t\t \"size\" => 0,\n\t\t\t);\n\t\t }\n\t\t}\n\t\t$d->close();\n\treturn $retval;\n \t}", "title": "" }, { "docid": "acb853ef1e5b0f211682f65b5936ed7d", "score": "0.66055185", "text": "function scanAllDir($path)\n{\n $allFiles = scandir($path);\n $files = array_diff($allFiles, array('.', '..'));\n $subfiles = array(); \n\n foreach ($files as $key => $element) {\n if ($element == \".\" || $element == \"..\" || $element == \".git\") {\n continue;\n }\n\n $el = $path . DIRECTORY_SEPARATOR . $element . DIRECTORY_SEPARATOR;\n if (is_dir($el)) {\n $elfiles = scanAllDir($el);\n //$elfiles = preg_filter('/^/', $el, $elfiles);\n $subfiles = array_merge($subfiles, $elfiles);\n\n //$files[$key] = $path . DIRECTORY_SEPARATOR . $element;\n unset($files[$key]);\n continue;\n } else {\n $files[$key] = trim($path, DIRECTORY_SEPARATOR) .\n DIRECTORY_SEPARATOR . $element;\n }\n }\n\n $files = array_merge($files, $subfiles);\n\n return $files;\n}", "title": "" }, { "docid": "9780bc9fa86312763e0ea4703f796975", "score": "0.65967786", "text": "public function getFiles();", "title": "" }, { "docid": "9780bc9fa86312763e0ea4703f796975", "score": "0.65967786", "text": "public function getFiles();", "title": "" }, { "docid": "9780bc9fa86312763e0ea4703f796975", "score": "0.65967786", "text": "public function getFiles();", "title": "" }, { "docid": "9780bc9fa86312763e0ea4703f796975", "score": "0.65967786", "text": "public function getFiles();", "title": "" }, { "docid": "9252a3702d23d2b75098a1bf2921a296", "score": "0.6588832", "text": "abstract function listDir($path);", "title": "" }, { "docid": "7e31eb539fb294cecee47ca936e3d368", "score": "0.65844184", "text": "function dirList ($directory) \n{\n $results = array();\n\n // create a handler for the directory\n $handler = opendir($directory);\n\n // keep going until all files in directory have been read\n while ($file = readdir($handler)) {\n\n // if $file isn't this directory or its parent, \n // add it to the results array\n if ($file != '.' && $file != '..')\n $results[] = $file;\n }\n\n // tidy up: close the handler\n closedir($handler);\n return $results;\n}", "title": "" }, { "docid": "a490d82fbb003b70d9295f6dd5a71b89", "score": "0.6578689", "text": "function get_files($dir) {\n\tif ($handle = opendir($dir)) {\n\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\tif ($file != '.' && $file != '..') {\n\t\t\t\t$files[] = $file;\n\t\t\t}\n\t\t}\n\t}\n\tclosedir($handle);\n\treturn $files;\n}", "title": "" }, { "docid": "7dc1fe7d061bd4b2ff70479dac71d189", "score": "0.6571576", "text": "public static function listFileRecursively($directory)\n {\n $result = [];\n foreach (scandir($directory) as $file) {\n if ($file != '.' && $file != '..') {\n $path = \"$directory/$file\";\n if (is_file($path)) {\n $result[] = $path;\n } else {\n $result = array_merge($result, self::listFileRecursively($path));\n }\n }\n }\n return $result;\n }", "title": "" }, { "docid": "23776fe9941619c163e51144c81bd653", "score": "0.6561348", "text": "function scanAllDir($dir) {\n $result = [];\n foreach(scandir($dir) as $filename) {\n if ($filename[0] === '.'){\n continue;\n } \n\n $filePath = $dir . '/' . $filename;\n if (is_dir($filePath)) {\n foreach (scanAllDir($filePath) as $childFilename) {\n $result[] = $filename . '/' . $childFilename;\n }\n continue;\n }\n\n $result[] = $filename;\n \n }\n return $result;\n }", "title": "" }, { "docid": "19f7a3098cd5e07442adf1f2a034ab09", "score": "0.65411973", "text": "public function rescanFilesInDir(){\r\n $allFiles = scandir($this->dir);\r\n\r\n $helper = array();\r\n\r\n foreach($allFiles AS $fileentry){\r\n $helper[] = realpath($this->dir.\"/\".$fileentry);\r\n }\r\n\r\n $this->allFiles = $helper;\r\n return $helper;\r\n }", "title": "" }, { "docid": "eddd7bb14740811a1b923891078c7f1f", "score": "0.6529244", "text": "protected function recurseFileTree($dir)\r\n\t{\t\t\r\n\t\t$view_list = array();\r\n\t\t\r\n\t\t$handle = opendir($dir);\r\n\t\twhile ($file = readdir($handle)) {\r\n\t\t\tif ($file[0] == '.') {\r\n\t\t\t\t\r\n\t\t\t} else if (is_dir($dir . $file)) {\r\n\t\t\t\t$view_list = array_merge($view_list, $this->recurseFileTree($dir . $file. \"/\"));\r\n\t\t\t} else {\r\n\t\t\t\t$extension = strrchr(trim($file, \"/\"), '.');\r\n\t\t\t\tif ($extension === \".php\") {\r\n\t\t\t\t\t$view_list[] = $dir . $file;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tclosedir($handle);\r\n\t\t\t\t\r\n\t\treturn $view_list;\r\n\t}", "title": "" }, { "docid": "5711e39dc43c040b21657e14a261e8f3", "score": "0.6515816", "text": "public function files($directory);", "title": "" }, { "docid": "ec9f74deba419ec373d27e7af5731e67", "score": "0.65046924", "text": "private function getFileList(): array\n {\n $files = [];\n\n foreach ($this->paths as $path) {\n $directory = new RecursiveDirectoryIterator($path);\n $iterator = new RecursiveIteratorIterator($directory);\n\n /** @var SplFileInfo $info */\n foreach ($iterator as $info) {\n if (!$info->isFile()) {\n continue;\n }\n\n $files[] = $info->getRealPath();\n }\n }\n\n return $files;\n }", "title": "" }, { "docid": "9799ed22af30a7c6b1279da690a4c7b9", "score": "0.6496929", "text": "function get_readme_file_list($dirpath = '', $subdirectory = true)\n\t{\n\t\t// Load readme file list\n\t\tif ($dirpath == '')\n\t\t\t$dirpath = $this->mod_dir;\n\n\t\t$result = array();\n\t\t$dir = dir($dirpath);\n\t\twhile ($file = $dir->read())\n\t\t{\n\t\t\tif (substr($file, 0, 1) != '.')\n\t\t\t{\n\t\t\t\tif (is_dir($dirpath.'/'.$file))\n\t\t\t\t{\n\t\t\t\t\tif ($subdirectory)\n\t\t\t\t\t\t$result = array_merge($result, $this->get_readme_file_list($dirpath.'/'.$file, false));\n\t\t\t\t}\n\t\t\t\telse if ((strpos(strtolower($file), 'read') !== false && strpos(strtolower($file), 'me') !== false || strpos(strtolower($file), 'lisezmoi') !== false) && strpos(strtolower($file), '.txt') !== false)\n\t\t\t\t\t$result[] = ltrim(str_replace($this->mod_dir, '', $dirpath.'/'.$file), '/');\n\t\t\t}\n\t\t}\n\t\t$dir->close();\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "0ebfa49b23ada09b1324be126aaa2ff3", "score": "0.64737475", "text": "function list_directory($directory) {\n $results = array();\n $handler = opendir($directory);\n while ($file = readdir($handler)) {\n if ($file != '.' && $file != '..')\n $results[] = $file;\n }\n closedir($handler);\n return $results;\n }", "title": "" }, { "docid": "e3418493372d9c79f993fb967505f991", "score": "0.646087", "text": "function scan($dir){\n $files = array();\n $_dir = $dir;\n $dir = FM_ROOT_PATH.'/'.$dir;\n // Is there actually such a folder/file?\n if(file_exists($dir)){\n foreach(scandir($dir) as $f) {\n if(!$f || $f[0] == '.') {\n continue; // Ignore hidden files\n }\n\n if(is_dir($dir . '/' . $f)) {\n // The path is a folder\n $files[] = array(\n \"name\" => $f,\n \"type\" => \"folder\",\n \"path\" => $_dir.'/'.$f,\n \"items\" => scan($dir . '/' . $f), // Recursively get the contents of the folder\n );\n } else {\n // It is a file\n $files[] = array(\n \"name\" => $f,\n \"type\" => \"file\",\n \"path\" => $_dir,\n \"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n );\n }\n }\n }\n return $files;\n}", "title": "" }, { "docid": "db0352d57677791199b0b822cc53709a", "score": "0.6456926", "text": "static function get_file_list( $path, $recursive = false, $allowed_extensions = null ) {\n\n\t\t\t// Validate and prep received parameters\n\t\t\tif( !is_bool( $recursive ) ) {\n\t\t\t\t$recursive = false;\n\t\t\t}\n\n\t\t\t$ext_string = 'all';\n\t\t\t$allowed_extensions = self::prep_allowed_exts( $allowed_extensions );\n\t\t\tif( isset( $allowed_extensions ) ) {\n\t\t\t\t$ext_string = implode( '_', $allowed_extensions );\n\t\t\t}\n\n\t\t\t// Retrieve the file list if not in cache yet\n\t\t\tif( !isset( self::$cache[$path][$recursive][$ext_string] ) ) {\n\n\t\t\t\tif( count( $allowed_extensions ) > 0 ) {\n\t\t\t\t\tself::$cache[$path][$recursive][$ext_string] = self::traverse_directory( $path, $recursive, $allowed_extensions );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tself::$cache[$path][$recursive][$ext_string] = self::traverse_directory( $path, $recursive );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn self::$cache[$path][$recursive][$ext_string];\n\t\t}", "title": "" }, { "docid": "4d7b3dcc1d887bb20873897d5a0167c8", "score": "0.6456386", "text": "function dirList ($directory){\n $results = array();\n // create a handler for the directory\n $handler = opendir($directory);\n // keep going until all files in directory have been read\n while ($file = readdir($handler)) {\n // if $file isn't this directory or its parent, \n // add it to the results array\n if ($file != '.' && $file != '..' && strpos($file, \"Thumbs\")===false)\n $results[] = $file;\n }\n // tidy up: close the handler\n closedir($handler);\n // done!\n return $results;\n }", "title": "" }, { "docid": "66a5ca311ef248eeb611071c89dd7683", "score": "0.64536566", "text": "static function fileList($root, $find = null)\n\t{\n\t\t$dirs = self::subdirectoryList($root);\n\t\t$files = array();\n\t\t\n\t\tif (count($dirs) > 0)\n\t\t\tforeach ($dirs as $dir)\n\t\t\t{\n\t\t\t\t$fileList = self::dirList($dir, $find);\n\t\t\t\t\n\t\t\t\tif (count($fileList) > 0)\n\t\t\t\t\tforeach ($fileList as $file)\n\t\t\t\t\t\tif (is_file($dir . \"/\" . $file))\n\t\t\t\t\t\t\t$files[] = $dir . \"/\" . $file;\n\t\t\t}\n\n\t\t$v = self::dirList($root, $find);\n\t\t\n\t\tif (count($v) > 0)\n\t\t\tforeach ($v as $last)\n\t\t\t\tif (is_file($root . \"/\" . $last))\n\t\t\t\t\t$files[] = $root . \"/\" . $last;\n\t\t\t\t\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "d57c869fe3344db83f81006a0e41691f", "score": "0.6432694", "text": "public function scan(){\n $all = [];\n foreach(scandir($this->path) as $file){\n if(is_file($this->path.$file)){\n $all[] = $file;\n }\n }\n return $all;\n }", "title": "" }, { "docid": "7cce8c0c365e26cae66616cc007beb00", "score": "0.64195734", "text": "public function getListFiles() {\n $tab = [];\n $tabFiles = scandir($this->dirname);\n foreach ($tabFiles as $file) {\n if($file != '.' and $file != '..') {\n if(is_readable($this->dirname.'/'.$file)) {\n $tab[] = $this->dirname.'/'.$file;\n }\n }\n }\n return $tab;\n }", "title": "" }, { "docid": "56aa4487901f1e3c057c3a9b8e7c9d2b", "score": "0.6405253", "text": "public function listFiles()\n {\n $url = $this->api . '/files';\n return $this->sendRequest($url, 'GET');\n }", "title": "" }, { "docid": "8fc84e51bae116b2607a5e1aa0c8fd54", "score": "0.64024776", "text": "public function getFileList()\n {\n return $this->parse()['files'];\n }", "title": "" }, { "docid": "20474073a87a13a4bcb910d1df150f38", "score": "0.6388509", "text": "function get_file_list($path)\n{\n $list = array();\n if (substr($path, -1) != '/') {\n $path .= '/';\n }\n $handle=opendir($path);\n if (!$handle) {\n return false;\n }\n\n while (false !== ($file = readdir($handle))) {\n if (is_file($path.$file)) {\n $list[] = $file;\n }\n }\n\n closedir($handle);\n\n return $list;\n}", "title": "" }, { "docid": "cc3430a0bdc735daed6277d23cedd559", "score": "0.6383023", "text": "public function listDir(): array\n {\n $files = scandir($this->downloadPath);\n $files = array_filter($files, function ($file) {\n return $this->endsWith($file, $this->extension);\n });\n return array_values($files);\n }", "title": "" }, { "docid": "4a897566ea3be7991a630fb0b2fcff5a", "score": "0.63716644", "text": "protected function filesInDir($path) {\n $d = dir($path);\n $out = array();\n while (FALSE !== ($entry = $d->read())) {\n // Exclude . and ..\n if ($entry == '.' || $entry == '..') {\n continue;\n }\n $out[] = $entry;\n }\n $d->close();\n return $out;\n }", "title": "" }, { "docid": "2f31c1ea47735b0bebd0291b21af69c3", "score": "0.6364075", "text": "public function find_all_files($dir) {\r\n $dir = trim($dir);\r\n if (!is_dir($dir)) {\r\n return array(\"result\" => FALSE, \"error\" => \"Not a valid directory\", \"errorcode\" => 1);\r\n }\r\n $iterator1 = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS));\r\n $full_path = array();\r\n $full_path = array_keys(iterator_to_array($iterator1));\r\n if (!empty($full_path)) {\r\n return array(\"result\" => TRUE, \"data\" => $full_path, \"message\" => \"File found\");\r\n } else {\r\n return array(\"result\" => FALSE, \"error\" => \"Files not found\", \"errorcode\" => 2);\r\n }\r\n }", "title": "" }, { "docid": "1ec8ab428f2b1f2dfb04afc7500412f0", "score": "0.6360348", "text": "private function getAllFilesPaths()\n\t{\n\t\tif ($this->allFilesPaths)\n\t\t{\n\t\t\treturn $this->allFilesPaths;\n\t\t}\n\n\t\t$this->allFilesPaths = $this->createAllFilesPaths();\n\t\treturn $this->allFilesPaths;\n\t}", "title": "" }, { "docid": "ebed4ca09c1a9d7709e5c7b3c28668af", "score": "0.63599485", "text": "function scan($dir){\n\n $files = array();\n\n // Is there actually such a folder/file?\n\n if(file_exists($dir)){\n\n foreach(scandir($dir) as $f) {\n\n if(!$f || $f[0] == '.') {\n\n continue; // Ignore hidden files\n\n }\n\n if(is_dir($dir . '/' . $f)) {\n\n // The path is a folder\n\n $files[] = array(\n\n \"name\" => $f,\n\n \"type\" => \"folder\",\n\n \"path\" => $f,\n\n \"times\" => date(\"Y-m-d\",filemtime($dir . '/' . $f)),\n\n \"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\n );\n\n }\n\n else {\n\n // It is a file\n\n $files[] = array(\n\n \"name\" => $f,\n\n \"type\" => substr($f,strrpos($f,\".\")+1),\n\n \"path\" => $f,\n\n \"times\" => date(\"Y-m-d\",filemtime($dir . '/' . $f)),\n\n \"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\n );\n\n }\n\n }\n\n }\n\n return $files;\n\n}", "title": "" }, { "docid": "5d8840c1314acc2e3e8f5a4d1d7ba7e3", "score": "0.6344446", "text": "function vsp_list_files( $path, $levels = 100, $exclusions = array() ) {\n\t\tif ( ! function_exists( 'list_files' ) ) {\n\t\t\trequire_once ABSPATH . 'wp-admin/includes/file.php';\n\t\t}\n\t\treturn list_files( $path, $levels, $exclusions );\n\t}", "title": "" }, { "docid": "4766592275f8f92aa90ca36d44b55573", "score": "0.6338001", "text": "public function execDirectoryList()\n\t{\n\t\t$searchPath = (getVar('searchPath')=='') ? '' : getVar('searchPath');\n\t\t$aHasContent = $this->_oExecCore->execCommand(\"ls -alt 'files/$searchPath' | grep '^d'\");\n\t\t$aDirectoryList = $this->_oExecCore->execCommand(\"ls -lt 'files/$searchPath' | grep '^d'\");\n\t\t$aDirectoryResult = array();\n\t\t$aResult = array();\n\t\t$sFileName = '';\n\t\t\n\t\tforeach($aDirectoryList as $key=>$sDirectory)\n\t\t{\t\n\t\t\t$aResultDirectory = preg_split('/ / ',$sDirectory,-1, PREG_SPLIT_NO_EMPTY);\n\t\t\t$sFileConcat = '';\t\t\n\t\t\t\n\t\t\tif( count( $aResultDirectory ) > 9 )\n\t\t\t{\n\t\t\t\tfor( $i = 8 ; $i <= ( count ( $aResultDirectory ) - 1 ) ; $i++ )\n\t\t\t\t{\n\t\t\t\t\t$sFileConcat .= ' ' . $aResultDirectory[$i];\n\t\t\t\t}\t\n\t\t\t\t$sFileName = $sFileConcat;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sFileName = $aResultDirectory[8];\n\t\t\t}\n\t\t\t\n\t\t\t$aDirectoryResult[] = array(\"directory_name\"=>$sFileName,\"directory_size\"=>$aResultDirectory[4],\"date\"=>$aResultDirectory[5] . ' ' . $aResultDirectory[6] . ' ' . $aResultDirectory[7]);\n\t\t}\n\t\t\n\t\t$aResult['has_folder'] = count($aHasContent);\n\t\t$aResult['folder_list'] = $aDirectoryResult;\n\t\t$aResult['has_back'] = $searchPath;\n\t\t$aResult['action_type'] = getVar('actionType');\n\t\treturn $aResult;\n\t}", "title": "" }, { "docid": "7faa67dc2e76411c0cfe42151075e5cb", "score": "0.6336185", "text": "protected function getFiles() {\n\n\t\t$files = array();\n\n\t\t// Get all reST files\n\t\t$directory = new RecursiveDirectoryIterator(\"$this->directory\");\n\t\t$filter = new DirectoryFilter($directory, '/^(?!\\..*|_.*)/'); // Filter out folders\n\t\t$filter = new FileFilter($filter, '/\\.(?:rst)$/'); // Filter files\n\t\t$iterator = new RecursiveIteratorIterator($filter);\n\t\tforeach ($iterator as $key => $file) {\n\t\t\t$files[] = $key;\n\t\t}\n\n\t\t// Get all images\n\t\t$directory = new RecursiveDirectoryIterator(realpath(\"$this->directory/Documentation\"));\n\t\t$filter = new DirectoryFilter($directory, '/^(?!\\..*|_.*)/'); // Filter out folders\n\t\t$filter = new FileFilter($filter, '/\\.(?:jpg|gif|png|jpeg)$/'); // Filter files\n\t\t$iterator = new RecursiveIteratorIterator($filter);\n\t\tforeach ($iterator as $key => $file) {\n\t\t\t$files[] = $key;\n\t\t}\n\n\t\t// Add also ext_emconf.php to use as source of information on the server\n\t\tif (is_file(\"$this->directory/ext_emconf.php\")) {\n\t\t\t$files[] = \"$this->directory/ext_emconf.php\";\n\t\t}\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "2149cfd5a711c9669416bb7f7084331b", "score": "0.6335605", "text": "function glob_recursive( $pattern, $flags = 0 ) {\n\t$files = glob( $pattern, $flags );\n\n\tforeach ( glob( dirname( $pattern ).'/*', GLOB_ONLYDIR|GLOB_NOSORT ) as $dir ) {\n\t\t$files = array_merge( $files, glob_recursive( $dir.'/'.basename( $pattern ), $flags ) );\n\t}\n\n\treturn $files;\n}", "title": "" }, { "docid": "81cd68ca550751c3960f8f723d8f652b", "score": "0.6334913", "text": "function getAnArrayOfAllFilesInADirectory($directory=\".\") {\n\t// in a directory. It is used in showAllFormsInDirectoryAsLinks. \n\n\tglobal $controller; \n\n\t$arrayOfAllFilesInDirectory = array(); \n\tif ($handle = opendir($directory)) {\n\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t$arrayOfAllFilesInDirectory[] = $file;\n\t\t\t}\n\t\t}\n\t\tclosedir($handle);\n\t\treturn $arrayOfAllFilesInDirectory;\n\t} else {\n\t\t$controller->error(\"In getAnArrayOfAllFilesInADirectory we were unable to open the directory: '$directory'.\"); \n\t}\n}", "title": "" }, { "docid": "7e7ecec5cd78ee4cc5afc8b53aed0014", "score": "0.633327", "text": "function listDirFiles($dir, $prefix = '') {\n $dir = rtrim($dir, '\\\\/');\n $result = array();\n\n foreach (scandir($dir) as $f) {\n if (strpos($f, '.') !== 0) {\n if (is_dir(\"$dir/$f\")) {\n $result = array_merge($result, listDirFiles(\"$dir/$f\", \"$prefix$f/\"));\n } else {\n $result[] = $prefix.$f;\n }\n }\n }\n\treturn $result;\n}", "title": "" }, { "docid": "9b2201de5e45db1af3d071cd990fa6c6", "score": "0.6330723", "text": "function getFileList($directory)\n {\n $files = array();\n $dir = @opendir($directory);\n while ($item = @readdir($dir)) {\n if (($item == '.') || ($item == '..') || ($item == 'CVS') || ($item == 'SCCS')) {\n continue;\n }\n $files[] = $item;\n }\n return $files;\n }", "title": "" }, { "docid": "0b9110b42448dc50d3d6710c68b1c62f", "score": "0.63268816", "text": "public function listContents ($directory = '', $recursive = false)\n {\n $list = [];\n $directory = '/' == substr ($directory, -1) ? $directory : $directory . '/';\n $result = $this->listDirObjects ($directory, $recursive);\n\n if (!empty($result['objects'])) {\n foreach ($result['objects'] as $files) {\n if ('oss.txt' == substr ($files['Key'], -7) || !$fileInfo = $this->normalizeFileInfo ($files)) {\n continue;\n }\n $list[] = $fileInfo;\n }\n }\n\n // prefix\n if (!empty($result['prefix'])) {\n foreach ($result['prefix'] as $dir) {\n $list[] = [\n 'type' => 'dir',\n 'path' => $dir,\n ];\n }\n }\n\n return $list;\n }", "title": "" }, { "docid": "0867b9d2695b272f746f7c16df154cba", "score": "0.63251895", "text": "public static function get_All_paths(){\n return scandir(self::ROOT_PATH(). 'src');\n }", "title": "" }, { "docid": "3a2164ad4cd5be038f9ed1e5648b50cf", "score": "0.6324388", "text": "static function getListFiles(){\n\n $dir_name = Utils::getValue('dir_name');\n $postListFiles = Utils::getFiles($dir_name);\n \n return $postListFiles;\n }", "title": "" }, { "docid": "0df470dbd4428013b4546e0a570ddefa", "score": "0.6324134", "text": "protected function _getMemberFiles($recurse = true)\n\t{\n\t\t// Check path format\n\t\t$subdir = trim($this->subdir, DS);\n\t\t$fullpath = $subdir ? $this->_path . DS . $subdir : $this->_path;\n\n\t\t$get = Filesystem::files($fullpath);\n\n\t\t$files = array();\n\t\tif ($get)\n\t\t{\n\t\t\tforeach ($get as $file)\n\t\t\t{\n\t\t\t\tif (substr($file, 0, 1) != '.' && strtolower($file) !== 'index.html')\n\t\t\t\t{\n\t\t\t\t\t$file = str_replace($this->_path . DS, '', $file);\n\t\t\t\t\t$entry = new \\Components\\Projects\\Models\\File(trim($file), $this->_path);\n\t\t\t\t\t$files[] = $entry;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "d389e751c39885002c48ddf87d7cec89", "score": "0.6321138", "text": "function dirTree($dir) {\n $d = dir($dir);\n $results = array();\n while (false !== ($entry = $d->read())) {\n if($entry != '.' && $entry != '..' && is_file($dir.'/'.$entry))\n array_push($results, $entry);\n }\n $d->close();\n return $results;\n}", "title": "" }, { "docid": "e2d91f381b448d695e1727c33bc30273", "score": "0.63151604", "text": "function iphorm_list_files( $folder = '', $levels = 100 ) {\n if ( empty($folder) )\n return false;\n\n if ( ! $levels )\n return false;\n\n $files = array();\n if ( $dir = @opendir( $folder ) ) {\n while (($file = readdir( $dir ) ) !== false ) {\n if ( in_array($file, array('.', '..') ) )\n continue;\n if ( is_dir( $folder . '/' . $file ) ) {\n $files2 = iphorm_list_files( $folder . '/' . $file, $levels - 1);\n if ( $files2 )\n $files = array_merge($files, $files2 );\n else\n $files[] = $folder . '/' . $file . '/';\n } else {\n $files[] = $folder . '/' . $file;\n }\n }\n }\n @closedir( $dir );\n return $files;\n}", "title": "" }, { "docid": "7f91e2bf164d487dd70033ab3dd84d24", "score": "0.6309745", "text": "function getFiles($dir=\"\", $getSubs=false){\n\t\n\t\t$files= array();\n\t\t\n\t\tif($dir == \"\"){ $dir= $this->dirName; }\n\t\t$fd= opendir($dir);\n\t\n\t\twhile($read= readdir($fd)){\n\t\t\tif ($read!= \".\" && $read!= \"..\"){\n\t\t\t\t\n\t\t\t\tif($getSubs && is_dir($dir.\"/\".$read)){\n\t\t\t\t\t$files[]= $read;\n\t\t\t\t}else if(!$getSubs && !is_dir($dir.\"/\".$read)){\n\t\t\t\t\t$files[]= $read;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn $files;\t\n\t}", "title": "" }, { "docid": "f4b2d9b1e222ec28baf3bacde725a9f5", "score": "0.63043815", "text": "function glob_recursive($pattern, $flags = 0)\n{\n $files = glob($pattern, $flags);\n foreach (glob(dirname($pattern) . '/*', GLOB_ONLYDIR | GLOB_NOSORT) as $dir) {\n $files = array_merge($files, glob_recursive($dir . '/' . basename($pattern), $flags));\n }\n return $files;\n}", "title": "" }, { "docid": "e8610c58298c3a2d4edbeaaeb50a6ac6", "score": "0.6299897", "text": "function getDirContents($dir)\n{\n\t$FILEEXTTOSCAN = array('mkv','webm','MKV','WEBM');\n\t$DIRSNOTTOSCAN = array('.','..','fileNice');\n\t$handle = opendir($dir);\n\tif ( !$handle ) return array();\n\t$contents = array();\n\twhile ( $entry = readdir($handle) )\n\t{\n\t\tif ( in_array($entry, $DIRSNOTTOSCAN)) continue;\n\t\t$entry = $dir.DIRECTORY_SEPARATOR.$entry;\n\t\tif ( is_file($entry) )\n\t\t{\n\t\tif (!in_array(pathinfo($entry,PATHINFO_EXTENSION), $FILEEXTTOSCAN)) continue;\n\t\t$contents[] = $entry;\n\t\t}\n\t\telse if ( is_dir($entry) )\n\t\t{\n\t\t\t$contents = array_merge($contents, getDirContents($entry));\n\t\t}\n\t}\n closedir($handle);\n return $contents;\n}", "title": "" }, { "docid": "bcb737be9f5ddee1b64b5e536d1885ad", "score": "0.629863", "text": "static function get_files();", "title": "" }, { "docid": "c2ad87ec8366a50c8633208281b192a0", "score": "0.6282638", "text": "function listFiles($path)\n {\n\n }", "title": "" }, { "docid": "996b5f7ffb1bab6dc5546ca7b11e0724", "score": "0.6282224", "text": "private function list_files($directory){\n\t\t$files = array();\n\t\t$handler = opendir($directory);\n\t\twhile ($file = readdir($handler)) {\n\t\t\tif ($file != '.' && $file != '..'){\n\t\t\t\tif(is_file($directory.DIRECTORY_SEPARATOR.$file)){$files[] = $file;}\n\t\t\t}\n\t\t}\n\t\tclosedir($handler);\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "c3c6836dae88eae8be96283caa7c5485", "score": "0.6269256", "text": "protected function files()\n {\n return array_merge(\n ...array_map(\n [$this, 'glob'], $this->paths\n )\n );\n }", "title": "" }, { "docid": "c558b09b364adef8e74234889a0e1991", "score": "0.6263929", "text": "function dirList ($directory) \n {\n\n // create an array to hold directory list\n $results = array();\n\n // create a handler for the directory\n $handler = opendir($directory);\n\n // Initialize loop flag\n $go = true;\n\n // Never enter loop if no data to deal with....\n $file = readdir($handler);\n if (!file) $go = false; \n\n // keep going until all files in directory have been read\n while ($go == true) {\n\n // if $file isn't this directory or its parent, \n // add it to the results array\n\n if ($file != '.' && $file != '..')\n $results[] = $file;\n\n // get next file and set flag if we shoudl quit\n $file = readdir($handler);\n if (!$file) $go = false; \n }\n\n // tidy up: close the handler\n closedir($handler);\n\n // done!\n return $results;\n\n }", "title": "" }, { "docid": "9f4eb639b4e2d9a50acca87b71c38012", "score": "0.62582624", "text": "public static function listFile($directory)\n {\n $result = array();\n foreach (scandir($directory) as $file) {\n if ($file != '.' && $file != '..') {\n $path = \"$directory/$file\";\n if (is_file($path)) {\n $result[$file] = $path;\n }\n }\n }\n return $result;\n }", "title": "" }, { "docid": "8f4e06eaf14c4bb13039a0532d938e8f", "score": "0.6255715", "text": "function get_directory_contents($path, $rel_path = '', $special_too = false, $recurse = true, $files_wanted = true)\n{\n $out = array();\n\n require_code('files');\n\n $d = @opendir($path);\n if ($d === false) {\n return array();\n }\n while (($file = readdir($d)) !== false) {\n if (!$special_too) {\n if (should_ignore_file($rel_path . (($rel_path == '') ? '' : '/') . $file, IGNORE_ACCESS_CONTROLLERS)) {\n continue;\n }\n } elseif (($file == '.') || ($file == '..')) {\n continue;\n }\n\n $is_file = is_file($path . '/' . $file);\n if (($is_file) || (!$recurse)) {\n if (($files_wanted) || (!$is_file)) {\n $out[] = $rel_path . (($rel_path == '') ? '' : '/') . $file;\n }\n } elseif (is_dir($path . '/' . $file)) {\n if (!$files_wanted) {\n $out[] = $rel_path . (($rel_path == '') ? '' : '/') . $file;\n }\n $out = array_merge($out, get_directory_contents($path . '/' . $file, $rel_path . (($rel_path == '') ? '' : '/') . $file, $special_too, $recurse, $files_wanted));\n }\n }\n closedir($d);\n\n return $out;\n}", "title": "" }, { "docid": "94003455e65ac744a8394de8c56b6602", "score": "0.62522984", "text": "public function getFileList()\n {\n $fileList = array();\n\n foreach ($this->paths as $path) {\n $directoryIterator = new DirectoryIterator($path);\n\n /** @var $file DirectoryIterator */\n foreach ($directoryIterator as $file) {\n if (!$file->isDir()) {\n $fileList[] = $file->getPathname();\n }\n }\n }\n\n return $fileList;\n }", "title": "" }, { "docid": "7667cec8d4bdf505165ed4062e568b73", "score": "0.6251818", "text": "function listDirectory($dir){\n\t\t$l=scandir($dir);\n\t\treturn $l;\n\t}", "title": "" }, { "docid": "3e2063329daceabde46de47926b1d900", "score": "0.6249177", "text": "function glob_recursive($pattern, $flags = 0) {\n\t\t$files = glob ( $pattern, $flags );\n\t\tforeach ( glob ( dirname ( $pattern ) . '/*', GLOB_ONLYDIR | GLOB_NOSORT ) as $dir ) {\n\t\t\t$files = array_merge ( $files, glob_recursive ( $dir . '/' . basename ( $pattern ), $flags ) );\n\t\t}\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "31651d91badf17e4834a157e3fd3b2f6", "score": "0.624647", "text": "function getFilesFromDir($dir){\n $files = array();\n $handler = opendir($dir);\n while ($file = readdir($handler)) {\n if ($file != \".\" && $file != \"..\") {\n array_push($files,$file);\n }\n }\n return $files;\n}", "title": "" }, { "docid": "2fc288005322249faef26d0223400133", "score": "0.6239211", "text": "function glob_recursive($pattern, $flags = 0) {\n $files = glob($pattern, $flags);\n foreach (glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir) {\n $files = array_merge($files, glob_recursive($dir.'/'.basename($pattern), $flags));\n }\n return $files;\n}", "title": "" }, { "docid": "96fe8b560f0cbad30d5fb0bfe24bc3e5", "score": "0.6237712", "text": "public function openAll(){\n $all = scandir($this->path);\n foreach($all as $file){\n if(is_file($this->path.$file)){\n $this->open($file, false);\n }\n }\n return $this->files;\n }", "title": "" }, { "docid": "091b965a2bdb77ab690fb8ccf0a09bc5", "score": "0.6237244", "text": "private function list_dir_contents($dir, $opt)\r\n\t{\r\n\t\t$list = array();\r\n\t\tif (is_dir($dir))\r\n\t\t{\r\n\t\t\tif($dh = opendir($dir))\r\n\t\t\t{\r\n\t\t\t\twhile (($file = readdir($dh)) !== false)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($file != \".\" && $file != \"..\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tswitch ($opt)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcase 0:\r\n\t\t\t\t\t\t\t\tif (is_dir($dir. \"/\" . $file)) { $list[] = $file; }\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\t\tif (!is_dir($dir . \"/\". $file)) { $list[] = $file; }\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\t\t$list[] = $file;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tclosedir($dh);\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\treturn $list;\r\n\t}", "title": "" }, { "docid": "0ff805b6a7847970346ae1b533e2f400", "score": "0.6236124", "text": "private function getDirContent()\n\t{\n\t\t$content = array();\n\n\t\tif ($handle = opendir($this->absPath)) {\n\t\t while (false !== ($item = readdir($handle))) {\n\t\t if ($item != \".\" && $item != \"..\") {\n\t\t \tarray_push($content, array(\n\t\t \t\t'name' => $item,\n\t\t \t\t'path' => str_replace('//', '/', $this->givenPath.'/'.$item),\n\t\t \t\t'publicUrl' => is_file($this->absPath.'/'.$item)\n\t\t \t\t\t? $this->getPublicUrl($this->givenPath.'/'.$item)\n\t\t \t\t\t: false,\n\t \t\t));\n\t\t }\n\t\t }\n\t\t closedir($handle);\n\t\t}\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "4d31bab31f4662ac90769021004929e0", "score": "0.6235665", "text": "static function getFiles() {\n\t\t\t$files = array();\n\t\t\t// Iterate through files and choose only the ones we need\n\t\t\t$directory = new DirectoryIterator(self::$settingsPath);\n\t\t\tforeach ($directory as $directoryItem) {\n\t\t\t\t// If this is not an actual file continue with the next file\n\t\t\t\tif(!$directoryItem->isFile()) continue;\n\n\t\t\t\t$filename = $directoryItem->getFilename();\n\t\t\t\t$fileExtension = pathinfo($filename, PATHINFO_EXTENSION);\n\n\t\t\t\t// If the extension is not '.json' continue with the next file\n\t\t\t\tif($fileExtension !== 'json') continue;\n\n\t\t\t\t$files[] = $filename;\n\t\t\t}\n\n\t\t\t// Sort the files alphabetically\n\t\t\tif(count($files) > 0) asort($files);\n\n\t\t\treturn $files;\n\t\t}", "title": "" }, { "docid": "6990f4f91345fd0b085598c69bdd5980", "score": "0.6225839", "text": "function glob_recursive($pattern, $flags = 0)\n {\n $files = glob($pattern, $flags);\n \n foreach (glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir)\n {\n $files = array_merge($files, glob_recursive($dir.'/'.basename($pattern), $flags));\n }\n \n return $files;\n }", "title": "" }, { "docid": "b7b55d7c04d12aa4154645223fdedebe", "score": "0.62221104", "text": "function dir_scan(string $dir) {\n $items = scandir($dir);\n $items = array_filter($items, function ($item) {\n return $item[0] !== '.';\n });\n $items = array_map(function ($item) use ($dir) {\n return path_join($dir, $item);\n }, $items);\n return $items;\n}", "title": "" }, { "docid": "587fa90cacabb64498eecd5f2ba67bdb", "score": "0.62209296", "text": "function vpb_goten_file($dir) \r\n{\r\n if($dh = opendir($dir)) \r\n\t{\r\n $files = Array();\r\n $inner_files = Array();\r\n while($file = readdir($dh)) \r\n\t\t{\r\n if($file != \".\" && $file != \"..\" && $file[0] != '.') \r\n\t\t\t{\r\n if(is_dir($dir . \"/\" . $file)) \r\n\t\t\t\t{\r\n $inner_files = vpb_goten_file($dir . \"/\" . $file);\r\n if(is_array($inner_files)) $files = array_merge($files, $inner_files); \r\n } \r\n\t\t\t\telse \r\n\t\t\t\t{\r\n array_push($files, $dir . \"/\" . $file);\r\n }\r\n }\r\n }\r\n closedir($dh);\r\n return $files;\r\n }\r\n}", "title": "" }, { "docid": "86cfae1df6a223b35c8bfb3f8065dede", "score": "0.6214246", "text": "function glob_recursive($pattern, $flags = 0) {\r\t\t$files = glob($pattern, $flags);\r\t\tforeach (glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir) {\r\t\t\t$files = array_merge($files, glob_recursive($dir.'/'.basename($pattern), $flags));\r\t\t}\r\t\treturn $files;\r\t}", "title": "" }, { "docid": "dc41b86798053387ff9b72baadb1a625", "score": "0.62123406", "text": "public function allDirectories($directory);", "title": "" }, { "docid": "fb918d6406edd537c6a8716f6a506944", "score": "0.6212239", "text": "static function convert($dir, $recursive = false, $expanded = false){\n $files = array();\n $it = new RecursiveDirectoryIterator(realpath($dir));\n if ($recursive){\n $it = new RecursiveIteratorIterator($it);}\n while ($it->valid()){\n if (!$it->isDot() && $it->isFile()\n && pathinfo($it->key(), PATHINFO_EXTENSION) == 'lady'){\n $phpFile = substr($it->key(), 0, -5) . '.php';\n if (!is_file($phpFile) || filemtime($phpFile) < filemtime($it->key())){\n file_put_contents($phpFile, self::parseFile($it->key(), $expanded));\n $files[] = $phpFile;}}\n $it->next();}\n return $files;}", "title": "" } ]
2ca4b4ce5c8cc4b16dbb5e9f107a5e7e
connect to my database
[ { "docid": "e6af660de51628206fd2d27644c6748b", "score": "0.0", "text": "public function mysqlconnect(){\n\n\n\n\n\n//login to people table\n\t$this->databaseUsername = \"root\";\n\t$this->password = \"root\";\n\t$this->databaseName = \"cs460\";\n\t$this->mySQLServerName = \"localhost\";\n\n\t$this->mysqli = new mysqli($this->mySQLServerName, $this->databaseUsername,\n\t\t$this->password, $this->databaseName);\n\n\tif ($this->mysqli->connect_error)\n\t{\n\t print(\"PHP unable to connect to MySQL server; error (\" . $this->mysqli->connect_errno . \"): \"\n\t\t . $this->mysqli->connect_error);\n\n\t\texit();\n\t}\n\n\n\t}", "title": "" } ]
[ { "docid": "a1614fef44d539059a7d8bf33f8c6a8c", "score": "0.81373566", "text": "function connectToDatabase() {\r\n // Connect to your MySQL database here\r\n }", "title": "" }, { "docid": "5af139fe77d4f91577173c7cec8dc8b2", "score": "0.8131196", "text": "abstract protected function connectDB();", "title": "" }, { "docid": "a441d9a601dffe19c7a69520a05a3c86", "score": "0.81011134", "text": "function connect() {\n\t\t//kataMakeTmpPath('db');\n\t\t$db = str_replace('KATATMP/',KATATMP.'db'.DS,$this->dbconfig['database']);\n\t\t//$this->link = new PDO($db,null,null,!empty($this->dbconfig['options'])?$this->dbconfig['options']:null);\n\t\t//$dsn = 'mysql:dbname=outlet;host=127.0.0.1';\n $dsn = sprintf('%s:dbname=%s;host=%s;charset=%s',\n 'mysql',\n $this->dbconfig['database'],\n $this->dbconfig['host'],\n empty($this->dbconfig['encoding'])?$this->dbconfig['encoding']:'utf8'\n );\n $user = $this->dbconfig['login'];\n $pass = $this->dbconfig['password'];\n $this->link = new PDO($dsn, $user, $pass, null);\n if (!$this->link) {\n\t\t\tthrow new DatabaseConnectException(\"Could not open database \" . $db);\n\t\t}\n\t\t$this->getLink()->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n\n\t\t/*\n if (!empty ($this->dbconfig['encoding'])) {\n\t\t\t$this->setEncoding($this->dbconfig['encoding']);\n\t\t}*/\n\t}", "title": "" }, { "docid": "67861b1d78efc8123620df854b980c36", "score": "0.8023689", "text": "public function connectDatabase(){\r\n\t\t$this->con = mysql_connect($this->servername, $this->username, $this->password) or\r\n\t\tdie(LoggerService::error(\"Could not connect to database: \" . mysql_error()));\r\n\t\t\r\n\t\tmysql_select_db($this->dbname);\r\n\t}", "title": "" }, { "docid": "6e5b1ae26017ce5a2e20326ef8c9deb0", "score": "0.79073554", "text": "public function connect()\r\n {\r\n require_once('/home/bskargre/config.php');\r\n\r\n try {\r\n //instantiate a database object\r\n $GLOBALS['dbh'] = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);\r\n } catch (PDOException $e) {\r\n echo $e->getMessage();\r\n }\r\n }", "title": "" }, { "docid": "0a7fb9007fcc966025264175a9e9c272", "score": "0.79056865", "text": "function dbConnect()\n\t{\n\t}", "title": "" }, { "docid": "a6033f0617dda5a0a22608298c94f2f8", "score": "0.78766793", "text": "private function connect() {\r\n //\r\n //Formulate the full database name string, as required by MySql. Yes, this\r\n //assumed this model is for MySql database systems\r\n $dbname = \"mysql:host=localhost;dbname=$this->name\";\r\n //\r\n //Initialize the PDO property. The server login credentials are maintained\r\n //in a config file.\r\n $this->pdo = new PDO($dbname, config::username, config::password);\r\n //\r\n //Throw exceptions on database errors, rather thn returning\r\n //false on querying the dabase -- which can be tedious to handle for the \r\n //errors \r\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n //\r\n //Prepare variables (e.g., current and userialised) to support the \r\n //schema::open_databes() functionality. This is designed to open a database\r\n //without having to use the information schema which is terribly slow.\r\n //(Is is slow wor badly written? Revisit the slow issue with fewer \r\n //querying of the information schema)\r\n //Save this database in a ready, i.e., unserialized, form\r\n database::$current[$this->name] = $this;\r\n //\r\n //Add support for transaction rolling back, if valid. See the \r\n //\\capture record->export() method\r\n if (isset(schema::$roll_back_on_fatal_error) && schema::$roll_back_on_fatal_error) {\r\n $this->pdo->beginTransaction();\r\n }\r\n }", "title": "" }, { "docid": "a6a2a1cbbd1c3e2e358996aa7d7b4b9c", "score": "0.78402287", "text": "private function connect()\n {\n $dsn = 'mysql:dbname=' . self::$dbConfig['database'] . ';host=' . self::$dbConfig['host'];\n $user = self::$dbConfig['user'];\n $password = self::$dbConfig['password'];\n\n try {\n $this->db = new \\PDO($dsn, $user, $password);\n $this->db->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n } catch (\\PDOException $e) {\n $this->error('Connection failed: ' . $e->getMessage());\n }\n }", "title": "" }, { "docid": "aa9ab184c256d8cbc385c411bb1dbc8d", "score": "0.77965945", "text": "private function connect()\n\t{\n\t\t$config['hostname'] = $this->config['forum_database_hostname'];\n\t\t$config['username'] = $this->config['forum_database_username'];\n\t\t$config['password'] = $this->config['forum_database_password'];\n\t\t$config['database'] = $this->config['forum_database_name'];\n\t\t\n\t\tmysql_connect($config['hostname'], $config['username'], $config['password']);\n\t\tmysql_select_db($config['database']);\n\t}", "title": "" }, { "docid": "654e6974de78a293e0391e64ea4ca7f2", "score": "0.7793055", "text": "public function dbConnect() {\n try {\n $this->database = new PDO(\n 'mysql:host=' . App::$config->database->host .\n ';port=' . App::$config->database->port .\n ';dbname=' . App::$config->database->dbname,\n App::$config->database->username,\n App::$config->database->password\n );\n } catch(PDOException $e){\n die('Database error: '.$e->getMessage());\n }\n }", "title": "" }, { "docid": "ce04845a66fb22145ef3c1798f1d721e", "score": "0.77839905", "text": "private function connect()\n {\n $this->connection = mysqli_init();\n $this->connection->real_connect(DB_HOST, DB_USER, DB_PASS);\n\n if(!$this->connection)\n {\n\tdie(\"Could not connect to the database: <br />\".mysql_error());\n }\n\n $db_select = $this->connection->select_db(DB_NAME);\n\n if(!$db_select)\n {\n\tdie(\"Could not select the database: <br />\".mysql_error());\n }\n\n \n }", "title": "" }, { "docid": "7a1c971ab6a126d27829ba966bde1fab", "score": "0.7771468", "text": "function connect() {\r\n\t\t$this->dbcon = mysql_connect($this->hostname,$this->username,$this->password);\r\n\t\tmysql_select_db($this->database,$this->dbcon);\r\n\t}", "title": "" }, { "docid": "ffc7fdcf699eeac8af1e061df95377f8", "score": "0.77262056", "text": "public static function connectToDB() {\n DBHelper::$identifier_db = mysql_select_db(\"blog1\", DBHelper::$connection_identifier) or die(\"Could not select `calendar` database!\");\n }", "title": "" }, { "docid": "a7cbf70f43b2c9f28d3f261a38584c95", "score": "0.7700228", "text": "protected function connect()\n\t{\n\t\tif ($this->oDb == null) {\n\t\t\t$aDsn = parse_url($this->sDsn);\n\t\t\t$sScheme = $aDsn['scheme'];\n\t\t\t$sHost = $aDsn['host'];\n\t\t\t$sPort = isset($aDsn['port']) ? $aDsn['port'] : 3306;\n\t\t\t$sDbName = trim($aDsn['path'], '/');\n\t\t\t$sUser = $aDsn['user'] ? $aDsn['user'] : '';\n\t\t\t$sPass = isset($aDsn['pass']) ? $aDsn['pass'] : '';\n\t\t\n\t\t\t$sConnDsn = \"{$sScheme}:host={$sHost};port={$sPort};dbname={$sDbName}\";\n\t\t\t$this->oDb = new PDO($sConnDsn, $sUser, $sPass);\n\t\t\t$this->oDb->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t}\n\t}", "title": "" }, { "docid": "1e2ade84377d53c11f856cb27ac7159c", "score": "0.7687661", "text": "public static function connect()\n {\n if (!self::$db instanceof AbstractSqlDriver) {\n self::$db = App::getDriver();\n }\n }", "title": "" }, { "docid": "dcee8337c310212a0b2a384d183e1e52", "score": "0.76455194", "text": "public function connect_to_db(){\n\t\t\n\t\t// Create connection\n\t\t$this->conn = new mysqli($this->servername, $this->db_username, $this->db_password, $this->db_name );\n\t\n\t\t// Check connection\n\t\tif ($this->conn->connect_error) {\n\t\t\t\n\t\t\tdie(\"Connection failed: \" . $this->conn->connect_error);\n\t\t\t\n\t\t} \n\t\t\n\t}", "title": "" }, { "docid": "bdd53494725aa51b70e84a610885ec31", "score": "0.7637614", "text": "public function connect(){\n\t\t// Include Database Settings File\n\t\tinclude dirname(__FILE__).\"/config.php\";\n\n\t\t// Assign the table prefix\n\t\t$this->prefix = $prefix;\n\n\t\t// Assign the connection\n\t\t$this->connection = @mysql_connect($sqlhost, $sqluser, $sqlpass);\n\n\t\tif (!$this->connection){\n\t\t\tdie(\"Could not connect to MySQL Server '{$sqlhost}'<br />\".mysql_error());\n\t\t}\n\t\t\n\n\t\t// Select the MySQL Database\n\t\t@mysql_select_db($db, $this->connection)\n\t\tor die(\"Could not select MySQL database '{$db}'<br />\".mysql_error());\n\n\t}", "title": "" }, { "docid": "89ee9afdd25fa5780e4d3e746b713a05", "score": "0.76317364", "text": "public function open_db_connect(){\n try {\n $this->con = new PDO(dsn, user, pass, array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',));\n $this->con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n \n catch(PDOException $e) {\n echo 'Failed To Connect' . $e->getMessage();\n } \n }", "title": "" }, { "docid": "4a62028b7b7d34283ae090ae449e05a5", "score": "0.7613235", "text": "public function connect(){\n\t\t$this->conString = 'host=' . $this->host . ' port=' . $this->port . ' dbname=' . $this->database . \n\t\t' user=' . $this->user . ' password=' . $this->password;\n\t\t$this->link = pg_connect ($this->conString);\n\t\tif (!$this->link)\n\t\t{\n\t\t\tdie('Error: Could not connect: ' . pg_last_error());\n\t\t}\n\t}", "title": "" }, { "docid": "6c8069d8c9229fb552b12a1cd9f6c4af", "score": "0.76118016", "text": "public function dbConnect () {\r\n\t\t\t$this->link = mysql_connect('gsmaalap45.corp.lan',$this->username,$this->password);\r\n\t\t\tif ($this->link) {\r\n\t\t\t\t// Select the DB\r\n\t\t\t\tmysql_select_db($this->database);\r\n\t\t\t} else {\r\n\t\t\t\tdie(\"DB connection error\".mysql_error().\"<br>\");\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "5ea9818aed67661eb2eabc2bfadef29a", "score": "0.7603435", "text": "function connect()\r\n {\r\n try {\r\n // Instantiate a db object\r\n $this->_dbh = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);\r\n $this->_dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n } catch (PDOException $e) {\r\n //echo $e->getMessage();\r\n }\r\n }", "title": "" }, { "docid": "de1d643d0d95a19929be104c966eb81e", "score": "0.7589966", "text": "function connect_db(){\n\t\t$this->db = set_db();\n\t\t$this->pw = set_pw();\n\t\t$this->user = set_user();\n\t\t$this->conn = mysql_pconnect('localhost', $this->user, $this->pw) or trigger_error(mysql_error(),E_USER_ERROR);\n\t}", "title": "" }, { "docid": "48cd6ddc55bda32924f3436192e81ea1", "score": "0.7579427", "text": "function connectToDB() {\n $con = mysql_connect(\"localhost\", \"myurli5_urlife\", \"urlife2011\");\n if (!$con) {\n echo \"could not connect to db\";\n die('Could not connect: ' . mysql_error());\n }\n mysql_select_db(\"myurli5_urlife\");\n $connection = $con;\n\n $this->connection = $con;\n }", "title": "" }, { "docid": "0935962423443d7c34c19e807682ce22", "score": "0.75759804", "text": "public function connect_db(){\n $this->con = mysqli_connect($this->dbhost, $this->dbuser, $this->dbpass, $this->dbname);\n if (mysqli_connect_error()){\n die (\"conexion a la base de datos fallida\".mysqli_connect_error());\n }\n }", "title": "" }, { "docid": "a62150b7689a844e4211ba3973bbff7e", "score": "0.75657606", "text": "private function connect() {\n try {\n $this->_db = new PDO('mysql:host=localhost;dbname=chesfnpg_alaska_jf;charset=utf8', 'chesfnpg', 'OCV7b9h632F#', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n //$this->_db = new PDO('mysql:host=localhost;dbname=jfalaska;charset=utf8', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n }\n catch (Exception $e) {\n die('Erreur : ' . $e->getMessage());\n }\n }", "title": "" }, { "docid": "74c1e875212636f94115a233f40d3a2d", "score": "0.7564384", "text": "function connect()\n\t\t{\n\t\t\t$this->db = mysql_connect(\n\t\t\t\t$this->host, \n\t\t\t\t$this->user, \n\t\t\t\t$this->password) \n\t\t\tor die(\"Database Connection Access Error..\".mysql_error());\n\t\t\t\n\t\t\tif($this->db == false) return false;\n\t\t\tmysql_select_db($this->dbname, $this->db);\n\t\t}", "title": "" }, { "docid": "b0ee08bffbb9d36b80a7dc518fed3e49", "score": "0.7560849", "text": "public function connect()\n {\n $this->databaseConnection = new PDO(\n 'mysql:host=' . $this->host . ';dbname=' . $this->database,\n $this->username,\n $this->password\n );\n }", "title": "" }, { "docid": "bf71769c0ee269600604c1f21045bfa4", "score": "0.7553066", "text": "function connect(){\n\t\n\tmysql_connect(DB_SERVER, DB_USER, DB_PASS) or err(\"failure connecting to database...\");\n\t\t\n \tif(!@mysql_select_db(DB)){\n\t\terr(\"failure selecting the database <strong>\" . DB . \"</strong>...\");\n\t}\n}", "title": "" }, { "docid": "5f4c5d80892967d61d597962e90d03b8", "score": "0.75516087", "text": "private function connect()\n {\n try {\n// error_reporting(0);\n $this->pdo = new \\PDO($this->getDsn(), $this->settings->getUsername(), $this->settings->getPassword());\n $this->pdo->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n $this->pdo->query('USE `' . $this->settings->getDatabaseName() . '`');\n $this->connected = true;\n } catch (\\Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "0fbb6545454399395e801fade12a7c94", "score": "0.75511366", "text": "public function connect() {\n\t\t\t\n\t\t\t//Connect to the database\n\t\t\t$this -> link = new mysqli($this -> db_host, $this -> db_user, $this -> db_password, $this -> db_database);\n\t\t\t\n\t\t\t//Check if any errors are occuring\n\t\t\tif($this -> link -> connect_errno > 0) {\n\t\t\t\tdie(\"Error: [\" .$this -> link -> connect_errno . \"] \" . $this -> link -> connect_error);\n\t\t\t}\n\t\t\t\n\t\t\t//Set default charset to utf-8\n\t\t\t$this -> link -> set_charset(\"utf8\");\t\n\t\t}", "title": "" }, { "docid": "bcc8deb9cf94bc9d7976b958e8ef3f7b", "score": "0.7541923", "text": "public function connect() {\n $this->m_DBConnection = mysql_connect($this->Context->getConfigValue(\"DBServer\"), $this->Context->getConfigValue(\"DBUser\"), $this->Context->getConfigValue(\"DBPass\"));\n mysql_select_db($this->Context->getConfigValue(\"DBName\"));\n $this->Context->Log->addMessage(get_class($this), __FUNCTION__, LogMessage::NOTIFY, \"Verbindung mit der Datenbank geöffnet!\");\n $this->isConnected = true;\n }", "title": "" }, { "docid": "bc1d82d6982f85173140f5407a3008a3", "score": "0.75137115", "text": "public function open_db() {\n $this -> connect = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);\n\n if($this -> connect -> connect_errno) {\n die($this -> connect -> connect_error);\n }\n }", "title": "" }, { "docid": "ab634afa60a8583dcbeb0a843edaf304", "score": "0.7513058", "text": "public function connect()\r\n {\r\n //$link=pg_connect($datos_bd);\r\n if ( !$this->db_connection = pg_connect('127.0.0.1', 'LBRG', 'junior', 'junior') ) {\r\n throw new RunTimeException(\"Couldn't connect to the database server\");\r\n }\r\n //if ( !@mysql_select_db($this->db_name, $this->db_connection) ) {\r\n // throw new RunTimeException(\"Couldn't connect to the given database\");\r\n // }\r\n //$this->executeQuery(\"SET CHARACTER SET 'utf8'\");\r\n }", "title": "" }, { "docid": "d658de24bdecdb3eafa94269352ca3a5", "score": "0.75058043", "text": "public function databaseConnect()\n {\n $servername = \"localhost\";\n $username = \"scudsbo2_chenye\";\n $password = \"chenye\";\n\n // Create connection\n $this->conn = new mysqli($servername, $username, $password);\n\n // Check connection\n if ($this->conn->connect_error) {\n $this->conn_state = false;\n die(\"Connection failed: \" . $this->conn->connect_error);\n exit;\n } else {\n $this->conn_state = true;\n }\n\n $er = mysqli_select_db($this->conn, $this->_database_name);\n if (!$er) {\n $query = \"CREATE DATABASE IF NOT EXISTS $this->_database_name\";\n if (!mysqli_query($this->conn, \"$query\")) {\n print \"Error- Could not create database\";\n exit;\n }\n }\n }", "title": "" }, { "docid": "ea1978569fd7797661c36059947cb780", "score": "0.7500361", "text": "private function openDatabaseConnection()\n {\n\n $host = 'localhost'; // адрес сервера\n $database = 'MyImages'; // имя базы данных\n $user = 'root'; // имя пользователя\n $password = ''; // пароль\n $type = 'mysql';\n\n // set the (optional) options of the PDO connection. in this case, we set the fetch mode to\n // \"objects\", which means all results will be objects, like this: $result->user_name !\n // For example, fetch mode FETCH_ASSOC would return results like this: $result[\"user_name] !\n // @see http://www.php.net/manual/en/pdostatement.fetch.php\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n\n // generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n $this->db = new PDO($type . ':host=' . $host . ';dbname=' . $database, $user, $password, $options);\n }", "title": "" }, { "docid": "2217b65032807ae77a0ad381e8bc6f1d", "score": "0.7492026", "text": "public function connectDatabase(){\n\t\t//LLAMAR A LA CLASE PADRE PARENT:: \n\t\t parent::__construct($this->urlServerDatabase,$this->userDatabase,$this->passwordDatabase,$this->nameDatabase);\n\t\t//SE ASIGNA PARA RECOCER LOS VALORES\n\t\t$this->set_charset(\"utf8\");\n\t\t//RETURN TRUE SI LA CONEXIÓN FALLA\n\t\t$this->connection = $this->connect_errno ? die('ERROR EN LA CONEXIÓN') : $message = \"CONECTADO A LA BASE DE DATOS= $this->nameDatabase\";\t\n\t\t//echo $message;\n\t\tunset($message);\n\t}", "title": "" }, { "docid": "20e765f64d4f83d25f9ca8482534a9b1", "score": "0.748341", "text": "public function connectDB() {\n \n try {\n $this->db = new PDO('mysql:host=localhost;dbname=xing_contacts',\n $this->db_username, $this->db_password);\n } catch (PDOException $e) {\n echo \"Fehler: \".$e->getMessage();\n die();\n }\n }", "title": "" }, { "docid": "80f6d6792b55653892e45ad7f9017514", "score": "0.74794996", "text": "public function connect(){\n\t\t$this->con = new mysqli($this->host, $this->username, $this->password, $this->db); \n\t\tif (mysqli_connect_errno()) {\n\t\t\tprintf(\"Connect failed: %s\\n\", mysqli_connect_error());\n\t\t} \n\t}", "title": "" }, { "docid": "e3027c314fcdac93bde4012935d733ce", "score": "0.74652034", "text": "public function db_connect() \n {\n }", "title": "" }, { "docid": "8ffaf584e357da10d0e94ab83e6b262c", "score": "0.7464301", "text": "public static function connect(){\n try {\n self::$dbConnection = new PDO('mysql:host='.self::$dbHost.';dbname='.self::$dbName,self::$dbUser,self::$dbPass);\n self::$dbConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n self::$dbConnection->exec(\"set character set UTF8\");\n } catch (PDOException $e) {\n die(\"¡Error!: \" . $e->getMessage());\n }\n }", "title": "" }, { "docid": "0cff46114f398ff2acfdc486e03d4997", "score": "0.7456918", "text": "public static function connect(){\n\t\tif( !self::$link ){\n\t\t\tself::$link = mysqli_connect( self::$host, self::$username, self::$password );\n\t\t\tmysqli_select_db( self::$link, self::$dbname );\n\t\t\tmysqli_set_charset( self::$link, 'utf8' );\n\t\t}\n\t}", "title": "" }, { "docid": "f213db80d765f4aac12547febd839553", "score": "0.7453438", "text": "function conectaDB() {\n\n $dsn = $this->getDSN();\n\n\t\tMainGama::getApp()->addConnection('-',$dsn);\n\n\t\t@ADOdb_Active_Record::SetDatabaseAdapter(MainGama::getApp()->getCon('-'));\n\n\t\tif (is_null(MainGama::getApp()->getConfig('db_debug'))) {\n\t\t\tMainGama::getApp()->getCon()->debug = MainGama::getApp()->getConfig('db_debug');\n\t\t} else {\n\t\t\tMainGama::getApp()->getCon()->debug = false;\n\t\t}\n\t\tMainGama::getApp()->getCon()->SetFetchMode(ADODB_FETCH_ASSOC);\n\n\t}", "title": "" }, { "docid": "f7548a24fcd4ab14665edc30cff230de", "score": "0.7453053", "text": "function connect() {\n // importar variaveis de coneccao\n require_once __DIR__ . '/db_config.php';\n\n // Concetar a base de dados \n //$con = mysql_connect(DB_SERVER, DB_USER, DB_PASSWORD) or die(mysql_error());\n $con=\"host=\".DB_SERVER.\" port=\".DB_PORT.\" dbname=\".DB_DATABASE.\" user=\".DB_USER.\" password=\".DB_PASSWORD.\"\";\n $db=pg_connect($con) or die('connection failed');\n\n // selecionar base de dados\n //$db = mysql_select_db(DB_DATABASE) or die(mysql_error()) or die(mysql_error());\n\n // retorna o cursor da coneccao\n return $db;\n }", "title": "" }, { "docid": "eff211a986900dbc4cca86f3e6b0124b", "score": "0.7450858", "text": "public function open_connection(){\n \t\n \t$conn = mysql_connect(self::$host,self::$user,self::$pwd);\n\n \tif(!$conn){\n \t\tdie('ERROR DE CONEXION');\n \t}\n \telse{\n \t\tmysql_select_db(self::$db);\n \t\t\n \t}\n }", "title": "" }, { "docid": "b38a78eba311aeb898c6134dad21ceb4", "score": "0.74453276", "text": "private function _connect() {\n $func = $this->config['persistent'] == 1 ? 'mysql_pconnect' : 'mysql_connect';\n if (!$this->dbh = @$func($this->config['hostname'] . \":\" . $this->config['port'], $this->config['username'], $this->config['password'], 1)) {\n throw new KantException(sprintf('Can not connect to MySQL server or cannot use database.%s', mysql_error()));\n }\n if ($this->version() > '4.1') {\n $charset = isset($this->config['charset']) ? $this->config['charset'] : '';\n $serverset = $charset ? \"character_set_connection='$charset',character_set_results='$charset',character_set_client=binary\" : '';\n $serverset .= $this->version() > '5.0.1' ? ((empty($serverset) ? '' : ',') . \" sql_mode='' \") : '';\n $serverset && mysql_query(\"SET $serverset\", $this->dbh);\n }\n\n if ($this->config['database'] && !@mysql_select_db($this->config['database'], $this->dbh)) {\n throw new KantException(sprintf('Can not use MySQL server or cannot use database.%s', mysql_error()));\n }\n $this->database = $this->config['database'];\n }", "title": "" }, { "docid": "fd16dba027622dac2a964deef2a43791", "score": "0.7443976", "text": "function connect(){\n\t\t\t$this -> mysqli = new mysqli($this -> indirizzo, $this -> username, $this -> password, $this -> database);\n\t\t\tif(mysqli_connect_errno()){\n //echo \"Errore numero: \".mysqli_connect_errno();\n die(\"Errore di connessione\");\n }\n else{\n \t//echo 'Connesso al database: '.$this -> indirizzo.' - '.$this -> database;\n }\n\t\t}", "title": "" }, { "docid": "739dc3e9f536a9e9bb99e7491e1f582e", "score": "0.744397", "text": "public static function connect()\n\t\t{\n\t\t\t// debug: avvio timer\n\t\t\tDebug::start(\"apertura database\");\n\n\t\t\tswitch (Configure::read(\"database.library\")) {\n\t\t\t\tcase 'pdo':\n\n\t\t\t\t\t// imposta il dsn per la connessione\n\t\t\t\t\t$dsn = sprintf(\"%s:host=%s;dbname=%s\", Configure::read(\"database.pdo_driver\"), Configure::read(\"database.host\"), Configure::read(\"database.name\"));\n\n\t\t\t\t\t// esegue la connessione al server mysql\n\t\t\t\t\ttry {\n\t\t\t\t\t\tself::$db = new PDO($dsn, Configure::read(\"database.username\"), Configure::read(\"database.password\"));\n\t\t\t\t\t} catch (PDOException $e) {\n\t\t\t\t\t\tdie (__(\"system.pdo_connect_fail\", array(\":server\" => Configure::read(\"database.host\"), \":database\" => Configure::read(\"database.name\"), \":errore\" => $e->getMessage())));\n\t\t\t\t\t}\n\n\t\t\t\t\tself::$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\t\t\t\t\t// imposto il charset a utf-8\n\t\t\t\t\t$charset = Configure::read(\"database.charset\", \"\");\n\t\t\t\t\tif ($charset != \"\") {\n\t\t\t\t\t\t// imposta il charset\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tself::$db->query(\"SET CHARACTER SET \" . $charset);\n\t\t\t\t\t\t} catch (PDOException $e) {\n\t\t\t\t\t\t\t// mostra un messaggio di errore in caso non riesca a connettersi al database\n\t\t\t\t\t\t\tdie (__(\"system.pdo_set_charset_fail\", array(\":server\" => Configure::read(\"database.host\"), \":database\" => Configure::read(\"database.name\"), \":errore\" => $e->getMessage())));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'mysql':\n\n\t\t\t\t\t// eseguo la connessione al server mysql\n\t\t\t\t\tif (!mysql_connect(Configure::read(\"database.host\"), Configure::read(\"database.username\"), Configure::read(\"database.password\"))) {\n\t\t\t\t\t\t// se non riesco, mostro un messaggio di errore\n\t\t\t\t\t\tdie (__(\"system.mysql_server_connect_fail\", array(\":server\" => Configure::read(\"database.host\"), \":errore\" => mysql_error())));\n\t\t\t\t\t}\n\t\t\t\t\t// eseguo la connessione al database\n\t\t\t\t\tif (!mysql_select_db(Configure::read(\"database.name\"))) {\n\t\t\t\t\t\t// se non riesco, verifico se devo tentarne la creazione\n\t\t\t\t\t\t// se la creazione non è abilitata\n\t\t\t\t\t\tif (Configure::read(\"database.create\") == false) {\n\t\t\t\t\t\t\t// mostro un messaggio di errore\n\t\t\t\t\t\t\tdie (__(\"system.mysql_database_connect_fail\", array(\":database\" => Configure::read(\"database.name\"), \":errore\" => mysql_error())));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (!mysql_query(\"CREATE DATABASE \" . Configure::read(\"database.name\"))) {\n\t\t\t\t\t\t\t\t// mostro un messaggio di errore\n\t\t\t\t\t\t\t\tdie (__(\"system.mysql_database_create_fail\", array(\":database\" => Configure::read(\"database.name\"), \":errore\" => mysql_error())));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (!mysql_select_db(Configure::read(\"database.name\"))) {\n\t\t\t\t\t\t\t\t\t// mostro un messaggio di errore\n\t\t\t\t\t\t\t\t\tdie (__(\"system.mysql_database_connect_fail\", array(\":database\" => Configure::read(\"database.name\"), \":errore\" => mysql_error())));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// imposto il charset a utf-8\n\t\t\t\t\t$charset = Configure::read(\"database.charset\", \"\");\n\t\t\t\t\tif ($charset != \"\") {\n\t\t\t\t\t\tif (!mysql_query(\"SET CHARACTER SET \" . $charset)) {\n\t\t\t\t\t\t\t// se non riesco, mostro un messaggio di errore\n\t\t\t\t\t\t\tdie (__(\"system.mysql_set_charset_fail\", array(\":database\" => Configure::read(\"database.name\"), \":errore\" => mysql_error())));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tDebug::stop(\"apertura database\");\n\t\t}", "title": "" }, { "docid": "86ce019030a8839ee11aee8017af0195", "score": "0.7440436", "text": "public function connect(){\n if(!$this->connection = mysqli_connect($this->host, $this->user, $this->password, $this->db))\n die(mysqli_error());\n }", "title": "" }, { "docid": "60d02ad3e14f60e7cd4303a42b50cae1", "score": "0.74299806", "text": "function connect()\n {\n global $gsod, $config, $core;\n\n try\n {\n // Set the DB prefix\n $this->prefix = $config->db_prefix;\n\n // Build the connection string\n switch ($config->db_type)\n {\n case 'mysql':\n case 'pgsql':\n case 'mssql':\n case 'sybase':\n $port_str = $config->db_port ? \";port={$config->db_port}\" : \"\";\n $conn_str = \"{$config->db_type}:host={$config->db_host}{$port_str};dbname={$config->db_name}\";\n $this->pdo = new PDO($conn_str, $config->db_username, $config->db_password);\n break;\n\n case 'sqlite':\n $this->pdo = new PDO(\"{$config->db_type}:{$config->db_name}\");\n break;\n }\n\n if ($this->pdo != null)\n {\n $this->pdo->exec(\"SET NAMES 'utf8'\");\n }\n else\n {\n throw new PDOException(\"Unable to connect to the database. Please check your DB settings.\");\n }\n }\n catch (PDOException $e)\n {\n $message = '<b>Sticky Notes DB error</b><br /><br />';\n $message .= 'Error: ' . $e->getMessage();\n $gsod->trigger($message);\n }\n }", "title": "" }, { "docid": "bf3cf04043873af30d4606fc1f42240d", "score": "0.74234", "text": "protected function connect()\n {\n $this->db = new \\mysqli($this->hostname, $this->username, $this->password, $this->db_name);\n }", "title": "" }, { "docid": "5744573cc5599b19b9e9d70747180581", "score": "0.7420803", "text": "public function connect( ) {\r\n\t\t$fname = \"connect()\";\r\n\t\t$this->database_connection = mysql_connect($this->getHostName().\":\".$this->getHostPort(), $this->getUserName(), $this->getPassword());\r\n\r\n\t\tif (!$this->database_connection)\r\n\t\t\t$this->addMessage(get_class($this), $fname, MB_ERROR, MB_HIDDEN, LOC_EMSG_DB_MYSQL_CONNECT, mysql_error());\r\n\t\telse\r\n\t\t\tif (!mysql_select_db($this->getDatabase(), $this->database_connection))\r\n\t\t\t\t$this->addMessage(get_class($this), $fname, MB_ERROR, MB_HIDDEN, LOC_EMSG_DB_MYSQL_SELECT, mysql_error());\r\n\t}", "title": "" }, { "docid": "ec832481dc1ee68f0775d33d24615eb5", "score": "0.74175566", "text": "public function connect(){\n $this->conn = null;\n try{\n $this->conn=new PDO('mysql:host='.$this->host.';dbname='.$this->db_name,\n $this->username,$this->pass);\n $this->conn->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n\n }catch(PDOException $e){\n echo 'Connection Error: ' . $e->getMessage();\n }\n }", "title": "" }, { "docid": "cfdca908417228e295a1e7f6f30bc081", "score": "0.7414063", "text": "public function conexion() {\n\t\t$this->conexion = mysql_connect('127.0.0.1:3306', 'cni', '2c0n1i3');\n\t\tmysql_select_db('cni', $this->conexion);\n\t}", "title": "" }, { "docid": "980f6cfabd534fa8a5064567ab4c85dd", "score": "0.74136317", "text": "public function open_connection() {\n\t $this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS);\n\t if(!$this->connection) {\n\t\t die(\"Database connection failed : \". mysql_error());\n\t\t \n\t\t } else {\n\t\t $db_select = mysql_select_db(DB_NAME, $this->connection);\n\t\t\t if(!$db_select){ //si pas de bdd...\n\t\t\t die(\"Database connection failed : \". mysql_error());\n\t\t\t }\n\t\t }\n \n }", "title": "" }, { "docid": "bb0acf3ab55ac6d2eec7ed1ca013eebe", "score": "0.74085015", "text": "public function connectToDB(){\r\n\t\t$dns='mysql:host='.self::$hostname.';dbname='.self::$dbname;\r\n\t\tself::$instance = new PDO($dns, self::$username, self::$password);\r\n\t\tself::$instance->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t\t$this->db = self::$instance;\r\n\t}", "title": "" }, { "docid": "c889498bf0c04eff4b9e132a64eb7161", "score": "0.74039346", "text": "public function getConnect()\n {\n $this->conn = Registry::get('db');\n }", "title": "" }, { "docid": "3129df6174aac2ba819e5b714bf3eb71", "score": "0.7403517", "text": "public function connect () {\n\t\t\t$this->dbConnection = mysqli_connect($this->servername, $this->username, $this->password, $this->dbName);\n\n\t\t\tif($this->dbConnection == false)\n\t\t\t{\n\t\t\t die(mysqli_connect_error());\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "a13842dac5ac47f7408551248e2012e0", "score": "0.7395827", "text": "protected function dbConnect()\n {\n try {\n $db = new \\PDO('mysql:host='. $this->_host.';dbname='. $this->_dbName.';charset='. $this->_charset.';port='. $this->_port, $this->_username, $this->_password);\n $this->_db= $db;\n }\n catch(\\Exception $e) {\n throw new \\Exception('Connexion to database has failed.');\n }\n\n }", "title": "" }, { "docid": "9fd71d9574db9959122638e6bf96363c", "score": "0.73905236", "text": "public function getConnection()\n {\n\t\t$host = 'localhost';\n $db = 'mc';\n $user = 'root';\n $pass = '';\n\n\t\ttry { \n\t\t\t$this->db = new mysqli($host,$user,$pass,$db); \n\t\t} catch (Exception $e) { \n\t\t\texit ($e->getMessage());\n\t\t} \n }", "title": "" }, { "docid": "07f4b0a2d31eee914449503513dc68fb", "score": "0.7389474", "text": "private function db() {\n\t\t\n\t\t//private constructor\n\t\t\n\t\tglobal $config;\n\t\t\t\n\t\t$this->db_link = mysql_connect($config[\"server\"],$config[\"username\"],$config[\"password\"]) or die(\"Could not connect\");\n\t\tmysql_select_db($config[\"catelog\"],$this->db_link) or die(\"Could not Select DatabBase\");\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "eccfb8ef862d6561a56f4935e46d974d", "score": "0.7388287", "text": "public function open_connection()\n\n\t\t {\n\t\t\t\t\n\t\t\t\t\t$hostname = \"listingpockets1.db.7579755.hostedresource.com\";\n\t\t\t\t\t$username = \"listingpockets1\";\n\t\t\t\t\t$password = \"a123456A\";\n\t\t\t\t\t$database = \"listingpockets1\";\n\n\t\t\t\t\t\n\n\t\t\t\t\t\n\n\t\t\t\t\t$connect = mysql_connect($hostname,$username,$password);\n\n\t\t\t\t\t$select_db = mysql_select_db($database);\n\n\t\t\t \n\n\t\t }", "title": "" }, { "docid": "e0fd37aa0644bc2baf4f6ba0c87271a4", "score": "0.73857105", "text": "private function connect()\r\n {\r\n $db = $this->config['database'];\r\n $this->pdo = new \\PDO(\"mysql:host={$db['server']};dbname={$db['dbname']}\", $db['user'], $db['password']);\r\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n }", "title": "" }, { "docid": "b6e6e7792ecd79d32510dde3b44a803a", "score": "0.7379852", "text": "public function connect()\n {\n try \n {\n $this->connection = new PDO(\"mysql:host=$this->_servername;dbname=$this->_dbname\", $this->_username, $this->_password);\n // set the PDO error mode to exception\n $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n //echo 'connected';\n }\n catch(PDOException $e)\n {\n echo \"Connection failed: \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "d7f3250458cfb4f72f17f6dea90d21a7", "score": "0.7376754", "text": "public function connectToDatabase(){\n $conn = mysqli_connect($this->host, $this->username, $this->password, $this->database); // por objetos\n if (mysqli_connect_errno() && !$conn) {\n printf(\"Connect failed: %s\\n\", mysqli_connect_error());\n exit();\n } else {\n $this->myconn = $conn;\n return $conn;\n //$this->selectDatabase($conn);\n }\n }", "title": "" }, { "docid": "21631031b44567d13075917c7eb13b72", "score": "0.73766136", "text": "public function connectToDatabase() {\n\n $this->connection = new mysqli($this->dbServername, $this->dbUsername, $this->dbPassword, $this->dbName); \n\n if ($this->connection->connect_errno) {\n echo \"Datenbank-Verbindung funktioniert nicht: \" . $this->connection->connect_error;\n }\n\n $this->connection->set_charset(\"utf8\");\n\n }", "title": "" }, { "docid": "1a46cf54d69c0c6d21c6f2fcf0026e30", "score": "0.73748696", "text": "private function openConnection()\n {\n $userDb = require __DIR__.'/../../../config/db.php';\n $this->db = new PDO(\"mysql:host = $userDb[0]; dbname = $userDb[1]\", $userDb[2], $userDb[3]);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }", "title": "" }, { "docid": "a8e7b98721e38efd348be86b82b6f8f1", "score": "0.7373826", "text": "public function connect() {\n\t\n\t\t$this->link = new mysqli( $this->db_host, $this->db_user, $this->db_pass, $this->db_name );\t\n\t}", "title": "" }, { "docid": "cbaa5288f2cbc9ab6cf7b5ef22629b95", "score": "0.73728067", "text": "function database() {\n\t\tif(!empty($this->host)&&!empty($this->user)&&!empty($this->password)&&!empty($this->database)) {\n\t\t\t$this->connect();\n\t\t}\n\t}", "title": "" }, { "docid": "060433197429e7226bbbdab97f4e2965", "score": "0.7360139", "text": "function connect()\n {\n $this->database = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n }", "title": "" }, { "docid": "753c18337b1baacd43dbd3ba898023a8", "score": "0.7355237", "text": "private static function connect()\n {\n// echo \"Abriendo la conexión a la BBDD...\";\n $db_host = \"localhost\";\n $db_user = \"root\";\n $db_pass = \"\";\n $db_name = \"proximafecha\";\n $db_dsn = \"mysql:host=\" . $db_host . \";dbname=\" . $db_name . \";charset=utf8\";\n self::$db = new PDO($db_dsn, $db_user, $db_pass);\n }", "title": "" }, { "docid": "204d6c15248783e049f87044999ce750", "score": "0.73547924", "text": "public function connect(){\n\t\tif (!is_resource(self::$dblink)) {\n\t\t\tif ($this->pconnect===TRUE) {\n\t\t\t\tself::$dblink = @mysql_pconnect($this->host,$this->user,$this->pass) or die($this->error());\n\t\t\t} else if ($this->pconnect===FALSE) {\n\t\t\t\tself::$dblink = @mysql_connect($this->host,$this->user,$this->pass) or die($this->error());\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e5efebc8fbd832f69010c10266e0ac84", "score": "0.73546666", "text": "static function open_connection(){\n if(is_null(db::$db)){\n db::$db = new db();\n db::$con = mysql_connect(db::$dblocation, db::$dbuser, db::$dbpw) or die(mysql_error());\n mysql_select_db(db::$database,db::$con);\n }\n }", "title": "" }, { "docid": "12e0771a3f6480280f955d78df307bdc", "score": "0.735087", "text": "function dbi_connect($as__servername,$as__username,$as__password,$as__dbname)\n\t\t{ \t \n\t\t\t$this->o__i_con = mysqli_connect($as__servername,$as__username,$as__password);\n\t\t\t$this->dbi_selection($as__dbname);\n\t\t}", "title": "" }, { "docid": "8d9a8732c5299b78a2d51e7a0c2bb749", "score": "0.73481053", "text": "public function db_connect()\r\n {\r\n // Create DB connection\r\n $dsn = 'mysql:dbname='.$this->db_name.';host=127.0.0.1;charset=UTF8';\r\n $options = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \\'UTF8\\'',\r\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION);\r\n $this->pdo = new PDO( $dsn, $this->db_user, $this->db_password, $options );\r\n }", "title": "" }, { "docid": "7da5af3c6d142495e9de1562245358a5", "score": "0.73479617", "text": "protected function connect(){\n try\n {\n $this->pdo = new \\PDO( 'mysql:host=' . MYSQL_HOST . ';dbname=' . MYSQL_DB_NAME, MYSQL_USER, MYSQL_PASSWORD, array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"));\n // Alerta de erro, se ocorrer algum problema\n $this->pdo->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n }\n catch ( PDOException $e )\n {\n echo 'Erro ao conectar com o MySQL: ' . $e->getMessage();\n }\n }", "title": "" }, { "docid": "9173fa39f524a55167084eb112d808d3", "score": "0.7342712", "text": "public function connectToDatabase()\n\t{\n\t\t$this->mySQLLink = mysql_connect($this->host, $this->username, $this->password);\n\t\t$this->selectDB();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tif(!$this->mySQLLink)\n\t\t\t{\t\t\n\t\t\t\tthrow new Exception('MySQL error: '.mysql_error($this->mySQLLink));\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\terrorHandler::processError($e);\n\t\t}\n\t}", "title": "" }, { "docid": "98d575d7e1064d8206901afae902c7e5", "score": "0.7340926", "text": "function connect_to_database() {\n\t\treturn pg_connect('host=dbhost-pgsql.cs.missouri.edu user=ctr9rc password=LDG74VGc');\n\t}", "title": "" }, { "docid": "61a0fd50bbf0c3db04925b9305b800fc", "score": "0.7339403", "text": "function ConnectDB(){\n\t\t\t$this->db_host = DB_HOST;\n\t\t\t$this->db_password = DB_PASS;\n\t\t\t$this->db_username = DB_USER;\n\t\t\t$this->db_name = DB_NAME;\n\t\t}", "title": "" }, { "docid": "1332a36dc5443296cb110c479a043063", "score": "0.73304695", "text": "public function connect(){\n //$this->connection=mysql_connect(DBHOST, DBUSER, DBPWD);\n //mysql_select_db(DBNAME, $this->connection);\n \n $this->connection = mysqli_connect( $this->host, $this->user, $this->password, $this->database);\n if($this->connection) $this->connected = 1;\n }", "title": "" }, { "docid": "a974921150522130140ad933d00f5998", "score": "0.73288304", "text": "public function open_db()\n\t\t{\n\t\t\t$this->condb=new mysqli($this->host,$this->user,$this->pass,$this->db);\n\t\t\tif ($this->condb->connect_error) \n\t\t\t{\n\t\t\t\tdie(\"Erron in connection: \" . $this->condb->connect_error);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "03c12db47b6e9ce11a285239cef015a8", "score": "0.7325366", "text": "protected function connect()\r\r\n\t{\r\r\n\t\tif ($GLOBALS['TL_CONFIG']['dbPconnect'])\r\r\n\t\t{\r\r\n\t\t\t$this->resConnection = @oci_connect($GLOBALS['TL_CONFIG']['dbUser'], $GLOBALS['TL_CONFIG']['dbPass'], '', $GLOBALS['TL_CONFIG']['dbCharset']);\r\r\n\t\t}\r\r\n\r\r\n\t\telse\r\r\n\t\t{\r\r\n\t\t\t$this->resConnection = @oci_connect($GLOBALS['TL_CONFIG']['dbUser'], $GLOBALS['TL_CONFIG']['dbPass'], '', $GLOBALS['TL_CONFIG']['dbCharset']);\r\r\n\t\t}\r\r\n\t}", "title": "" }, { "docid": "dc4a98e4d6f5baa41ab24e1f95b9792a", "score": "0.73234874", "text": "private function conn(){\n\t\t// You may edit the /etc/mysql/my.cnf file to configure the basic settings such as TCP/IP port, IP address binding, and other options. However, The MySQL database server configuration file on the Ubuntu 16.04 LTS is located at /etc/mysql/mysql.conf.d/mysqld.cnf and one can edit using a text editor such as vi or nano:\n\t\t// $ sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf\n\t\t// Then comment the line: \n\t\t//\t\tbind-address = 127.0.0.1\n\t\t\n\t\t// How do I start MySQL server?\n\t\t// sudo systemctl start mysql.service\n\t\t\n\t\t// How do I create a new MySQL server database and user account?\n\t\t// CREATE DATABASE DATABASE-NAME-HERE;\n\t\t// GRANT ALL ON DATABASE-NAME-HERE.* TO 'DATABASE-USERNAME-HERE' IDENTIFIED BY 'DATABASE-PASSWORD-HERE';\n\t\t// \n\t\t// $ mysql -u root -p\n\t\t// SHOW DATABASES;\n\t\t// CREATE USER 'phpapp'@'%' IDENTIFIED BY 'phpapp'; oppure per maggior sicurezza CREATE USER 'phpapp'@'localhost' IDENTIFIED BY 'phpapp';\n\t\t// CREATE DATABASE login;\t\t\n\t\t// GRANT ALL ON login.* TO 'phpapp' IDENTIFIED BY 'phpapp';\n\t\t// FLUSH PRIVILEGES;\n\t\t// EXIT;\n\t\t// $ sudo systemctl restart mysql.service\n\t\t\n\t\t// How do I reset the mysql root account password?\n\t\t// $ sudo dpkg-reconfigure mysql-server\n\t\t\n\t\t$this->say('---------------------------------');\n\t\t$this->say('Mysql host: ' . $this->db_host);\n\t\t$this->say('User: ' . $this->db_user);\n\t\t$this->say('Db name: ' . $this->db_name);\n\t\t\n\t\t$charset = 'charset=utf8mb4';\n\t\t$db_dsn = 'mysql:host=' . $this->db_host . ';port=3306;dbname=' . $this->db_name . ';' . $charset;\n\t\t$this->say('Dsn: ' . $db_dsn);\n\t\t\n\t\ttry{\t\t\t\t\n\t\t\t$this->dbh = new PDO(\n\t\t\t\t$db_dsn,\n\t\t\t\t$this->db_user,\n\t\t\t\t$this->db_pass,\n\t\t\t\tarray(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n\t\t\t// echo json_encode(array(\t'outcome' => true));\n\t\t}catch(\\PDOException $ex){\n\t\t\t$this->say(json_encode(array(\n\t\t\t\t'outcome' => false, \n\t\t\t\t'message' => 'Unable to connect',\n\t\t\t\t'detail' => $ex->getMessage())\n\t\t\t));\n\t\t\tdie('Quit' . PHP_EOL);\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "7b57f675fab10a567aaf6d5b9e546bd9", "score": "0.7322891", "text": "function connectDb()\n {\n $this->dbLink = new mysqli($this->host, $this->user, $this->password, $this->database);\n }", "title": "" }, { "docid": "b633b7bd38738c057267fa8358bb159b", "score": "0.7317048", "text": "public function getConnectDB()\n {\n echo var_dump($this->connectDB());\n }", "title": "" }, { "docid": "33a9451caabb4f03114ffa585643961c", "score": "0.73169726", "text": "public function conexion() {\n\t\t$this->conexion = pg_connect('host=127.0.0.1 port=5432 dbname=sadmincom user=sadmincom password=sa2dm0in1co4m');\n\t}", "title": "" }, { "docid": "c204ab3be46fa7b21b1b48dc4e925bcc", "score": "0.731652", "text": "private function connectDB(){\r\n\t\t$this->link = new mysqli($this->host, $this->user, $this->pass, $this->dbname);\r\n\t\t// jodi mysql ta connect na hoy then 1ta error message show korbe\r\n\t\tif (!$this->link) {\r\n\t\t\t$this->error = \"Connection faild\".$this->link->connect_error;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ef51aecc54575d5b24aa9828df732d03", "score": "0.7315935", "text": "public static function connectToDb() {\n if (!(self::$link = mysqli_connect('localhost', 'u351977120_admin', \"65366536\")))\n ErrorHandler::newError(1, 'Connection failed: ' . mysqli_connect_error());\n\n if (mysqli_select_db(self::$link, self::$db_name) == 0)\n ErrorHandler::newError(2, 'Failed to select database');\n }", "title": "" }, { "docid": "a822406de6f56492127f854c17d1d090", "score": "0.73114604", "text": "public function connect(){ \n $this->connection = pg_connect(\"host=$this->host dbname=$this->dbname user=$this->user password=$this->password\");\n if(!$this->connection){\n die(\"Could not connect to server!\".PHP_EOL);\n } \n }", "title": "" }, { "docid": "333e0df877b667450c318c6e9bc2869d", "score": "0.7310975", "text": "private function openDatabaseConnection()\n {\n // set the (optional) options of the PDO connection. in this case, we set the fetch mode to\n // \"objects\", which means all results will be objects, like this: $result->user_name !\n // For example, fetch mode FETCH_ASSOC would return results like this: $result[\"user_name] !\n // @see http://www.php.net/manual/en/pdostatement.fetch.php\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n\n // generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET, DB_USER, DB_PASS, $options);\n }", "title": "" }, { "docid": "540fbae438d63ba73ec7fdfbba57c808", "score": "0.7305411", "text": "public static function dbConnect()\n\t {\n\t if (!self::$dbc)\n\t {\n\t // Create SQL dbc\n\t require \"../db_connect.php\";\n\t self::$dbc = $dbc;\n\t }\n\t if (!self::$mysqlDbc)\n\t {\n\t // Create MySQL dbc\n\t require \"../mysql_connect.php\";\n\t self::$mysqlDbc = $mysqlDbc;\n\t }\n\t }", "title": "" }, { "docid": "1e9585c20811f7ba71c933ccca27adfa", "score": "0.7302534", "text": "public function connectDB() {\n $this->connection = new mysqli($this->servername, $this->username, $this->password, $this->database);\n\n if(mysqli_connect_error()) { // if connection not successful\n die(\"Connection Failed : \".mysqli_error());\n }\n\n // FOR TESTING \n if(!$this->connection)\n echo \"Database not connected\";\n // else\n // echo \"Connected successfully\";\n }", "title": "" }, { "docid": "93bfafc61f0c09d75e1352c72065f52b", "score": "0.7297226", "text": "private function connectDB()\n {\n // create a database connection\n $this->db_connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n // change character set to utf8 and check it\n // if (!$this->db_connection->set_charset(\"utf8\")) {\n //return $this->db_connection->error;\n //return false;\n // }\n // if no connection errors (= working database connection)\n if (!$this->db_connection->connect_errno) {\n $db_connection = true;\n } else {\n die(\"Sorry, no database connection.\");\n }\n }", "title": "" }, { "docid": "b8bdd4bffbc0bb7660cef968228acb78", "score": "0.72970384", "text": "private function connect(){\n\n $this->link= mysqli_connect($this->server, $this->username, $this->password,$this->db);\n mysqli_select_db($this->link,$this->db);\n /* check connection */\n if (mysqli_connect_errno()) {\n echo \"Connect failed: \". mysqli_connect_error();\n exit();\n }\n\n }", "title": "" }, { "docid": "eeff9c1657bfd911b6a8b167b258dec3", "score": "0.7295619", "text": "private function connect()\n {\n\n $this->dbInstance = new PDO('mysql:host=' . ConfigurationDB::HOST . ';dbname=' . ConfigurationDB::NAME_DB . ';charset=utf8mb4', ConfigurationDB::USERNAME, ConfigurationDB::PASSWORD);\n\n }", "title": "" }, { "docid": "77e45663baf6ceeabe25382256fca39a", "score": "0.7294097", "text": "protected function connect(){\n\t\ttry {\n\t\t\t$this->pdo=new PDO($this->connString,$this->user, $this->passWord);\n\t\t\t$this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "d2f2b5f691cc2f7e53545ca41bb8b31f", "score": "0.72916394", "text": "public function dbConnect() {\n try {\n $this->conn = new PDO('mysql:host='.$this->dbServer.';dbname='.$this->dbName, $this->dbUser, $this->dbPass);\n $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e) {\n die('Error:' . $e->getMessage());\n }\n }", "title": "" }, { "docid": "2141650d5436c05ec2230eeac50b42b0", "score": "0.728651", "text": "private function connection () {\n $this->db = new PDO('mysql:host=localhost;dbname=charityPets;charset=utf8', 'hassan', 'sharigan60');\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n }", "title": "" }, { "docid": "d6964632f5e8817e6f7a82717ff89d39", "score": "0.72764385", "text": "public static function connect() {\n\t\tif(self::isConnected()) return;\n\t\t\n\t\ttry {\n\t\t\tself::$dbh = new PDO(\"mysql:host=\".DB_HOSTNAME.\";port=\".DB_PORT.\";dbname=\".DB_NAME, DB_USERNAME, DB_PASSWORD,\n\t\t\t\t\tarray(PDO::ATTR_PERSISTENT => true));\n\t\t\tself::$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t\n\t\t\t// force utf-8 encoding on database\t\t\t\n\t\t\tself::$dbh->exec(\"SET NAMES utf8; SET CHARACTER SET utf8;\");\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{\n\t\t\tself::disconnect();\n \t\tthrow $e;\n\t\t}\n\t}", "title": "" }, { "docid": "db0e82044f87544c28efc8b19759a9b5", "score": "0.72724795", "text": "function db_connect()\n\t{\n\t\tmysql_connect(DB_HOST, DB_USER, DB_PASS);\t\t\n\t\tmysql_select_db(DB_NAME);\n\t}", "title": "" }, { "docid": "f24a52b900be6753af53def72798ab8e", "score": "0.72717786", "text": "protected function connect(){\n\t\t\n\t\t$servername\t\t= 'localhost';\n\t\t$username\t\t= 'root';\n\t\t$password\t\t= '';\n\t\t$database\t\t= 'inventorysol';\n\t\t\t\t\n\t\t$db=null;\n\t\ttry{\n\t\t\t$db = new PDO('mysql:host='.$servername.';dbname='.$database, $username, $password);\n\t\t\t$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\techo $e->getMessage();\n\t\t}\n\t\treturn $db;\n\t}", "title": "" }, { "docid": "175e55aa05e38f2df76dd172423c4d65", "score": "0.72683287", "text": "function dbs_connect() {\n\t\t$username = \"mywebz\";\n\t\t$password = \"\";\n\t\t$hostname = \"localhost\";\n\t\t$database = \"my_mywebz\";\n\t\t\n\t\t//connection to the database\n\t\t$dbhandle = mysql_connect($hostname, $username, $password) \n\t\t\tor die(\"Unable to connect to MySQL\");\n\t\t\n\t\t$selected = mysql_select_db($database, $dbhandle) \n\t\t\tor die(\"Could not select database: '$database'\");\n\t}", "title": "" } ]
0791758b066b3f7655e87d3ce6d1d834
removeSecGroup Retrieves an user record.
[ { "docid": "8eefffc655ad8602213009d2a55a9647", "score": "0.0", "text": "public function getUser($userid)\n {\n return $this->_userDao->getUser($userid);\n }", "title": "" } ]
[ { "docid": "fbebb0f90141dabb04fc8677515949f2", "score": "0.68657386", "text": "public function removeSecGroup($groupId)\n {\n $result = new Dto_FormResult();\n $result = $this->allowedToEditGroup($result, $groupId);\n\n if ($result->isSuccess()) {\n $this->_userDao->removeSecurityGroup($groupId);\n } // else\n\n return $result;\n }", "title": "" }, { "docid": "ed0132c6027e2133fa0bec5a42296614", "score": "0.65584755", "text": "function actionRemove() {\r\n global $user;\r\n $model = new Group();\r\n $mode_user = new Users();\r\n if (!$user->isSuperAdmin()) {\r\n YiiMessage::raseNotice(\"Your account not have permission to add/edit group\");\r\n $this->redirect(Router::buildLink(\"users\", array('view' => 'group')));\r\n }\r\n\r\n $cids = Request::getVar(\"cid\", 0);\r\n if (count($cids) > 0) {\r\n $obj_table = YiiUser::getInstance();\r\n for ($i = 0; $i < count($cids); $i++) {\r\n $cid = $cids[$i];\r\n $list_user = $mode_user->getUsers($cid, null, true);\r\n $list_group = $model->getItems($cid);\r\n if (empty($list_user) AND empty($list_group)) {\r\n $obj_table->removeGroup($cid);\r\n } else {\r\n YiiMessage::raseNotice(\"Group user have something account/sub group\");\r\n $this->redirect(Router::buildLink(\"users\", array('view' => 'group')));\r\n return false;\r\n }\r\n }\r\n }\r\n YiiMessage::raseSuccess(\"Successfully delete GroupUser(s)\");\r\n $this->redirect(Router::buildLink(\"users\", array(\"view\" => \"group\")));\r\n }", "title": "" }, { "docid": "be21bbc80d428f41d9d232434aa36de1", "score": "0.6507658", "text": "public function remove_user_from_group($user_to_remove, $group){\n\t\t// Create object for user invoking the script:\n\t\t$curr_user = new User();\n\t\t// Ensure all parties involved actually exists:\n\t\tif($curr_user->exists() && $user_to_remove->exists() && $group->exists()){\n\t\t\t// If current user is trying to remove themself then redirect to leave group:\n\t\t\tif($curr_user->profile_link()===$user_to_remove->profile_link())\n\t\t\t\treturn ['status'=>false, 'msg'=>'Cannot remove yourself from a group'];\n\t\t\t\t\n\t\t\t// Ensure current user has sufficient access rights:\n\t\t\tif($this->user_access_level($curr_user, $group) < OWNER)\n\t\t\t\treturn ['status'=>false, 'msg'=>'You do not have sufficient Access Rights for '.$group->name()];\n\t\t\t\t\n\t\t\tif(!$this->is_user_active_member($user_to_remove, $group))\n\t\t\t\treturn ['status'=>false, 'msg'=>$user_to_remove->name().' is not a member of '.$group->name()];\n\t\t\t\n\t\t\tif($this->remove_from_intermediary_table($user_to_remove->data()->id, $group->data()->id))\n\t\t\t\treturn ['status'=>true, 'msg'=>'User removed'];\n\t\t\telse\n\t\t\t\treturn ['status'=>false, 'msg'=>'Could not remove'];\n\t\t}\n\t\treturn ['status'=>false, 'msg'=>'Unable to remove '.$user_to_remove->exists() ? $user_to_remove->name() : 'Invalid User'.' from '.$group->exists() ? $group->name() : 'Invalid Group'];\n\t}", "title": "" }, { "docid": "dea4ab696cf881fe2f5c3b977d56ee73", "score": "0.6398974", "text": "function removeUserFromGroup($user_id, $group_id){\n // This block automatically checks this action against the permissions database before running.\n if (!checkActionPermissionSelf(__FUNCTION__, func_get_args())) {\n addAlert(\"danger\", \"Sorry, you do not have permission to access this resource.\");\n return false;\n }\n $userGroups = fetchUserGroups($user_id);\n\n // Only try to remove if the user is already part of this group\n if (isset($userGroups[$group_id])) {\n if ($deletion_count = dbRemoveUserFromGroups($user_id, $group_id)){\n if ($deletion_count > 0)\n addAlert(\"success\", lang(\"ACCOUNT_GROUP_REMOVED\", array ($userGroups[$group_id]['name'])));\n return true;\n } else {\n return false;\n }\n }\n}", "title": "" }, { "docid": "9ad343bd2b4dd2b0bd5a9974d993ccc7", "score": "0.63804114", "text": "public function remove($group)\n {\n }", "title": "" }, { "docid": "ac9b57cec5b8e943e68a2cacd074ef48", "score": "0.62999326", "text": "public function removeUserFromGroup($groupCode, $user = null)\n {\n return UserGroupManager::with($user)->removeGroup($groupCode);\n }", "title": "" }, { "docid": "aa7d00f79a4735e839e3e75fabc5a81e", "score": "0.62659013", "text": "public function remove($id) {\n\n \t$actor \t\t= PlatformUser::instanceBySession();\n \t$collection = new PlatformUserGroupCollection();\n $dao = $collection->dao;\n if($dao->transaction()) {\n try {\n\n $this->movePlatformUserGroupId( $id, UserGroupController::ORTER_GROUP_ID, $dao );\n\n $model = $collection->getById($id);\n $model->setActor($actor);\n $rowCount = $model->destroy();\n if(count($rowCount) == 0) {\n throw new DbOperationException(\"Delete user group fail.\", 1);\n }\n\n $dao->commit();\n return array( \"effectRow\"=>$rowCount );\n }\n catch(Exception $e) {\n $dao->rollback();\n throw $e;\n }\n }\n else {\n throw new DbOperationException(\"Begin transaction fail.\");\n }\n\t\n }", "title": "" }, { "docid": "02eccc78a933486c2bcf6abf5ce0177e", "score": "0.62626606", "text": "function removeFromGroup($db, $session, $adminfunctions, $functions){\n \n // Stop Check\n if (isset($_GET['stop'])) {\n $stop = $_GET['stop'];\n } else {\n $stop = '';\n }\n \n if ($adminfunctions->verifyStop($session->username, 'delete-groupmembership', $stop) == '2') {\n \n $userid = $_GET['remove'];\n $group_id = $_GET['group_id'];\n \n if($group_id == '1') { \n $username = $functions->getUserInfoSingularFromId('username', $userid); \n $adminfunctions->demoteUserFromAdmin($username);\n }\n \n $delete_user_from_group = $db->prepare(\"DELETE FROM users_groups WHERE group_id = :group_id AND user_id = :userid\");\n $delete_user_from_group->execute(array(':group_id' => $group_id, ':userid' => $userid));\n\n header(\"Location: ../usergroups.php\");\n \n } else {\n header(\"Location: process.php\");\n }\n}", "title": "" }, { "docid": "475affc56fbaa26db0530275dad8f085", "score": "0.6197593", "text": "function removeUserFromGroup ($user) {\n\t\t$isInGroup = $this->isUserInGroup ($user); \n\t\tif (! isError ($isInGroup)) {\n\t\t\tif ($isInGroup == true) {\n\t\t\t\t$prefix = $this->_db->getPrefix();\n\t\t\t\t$groupID = $this->getID ();\n\t\t\t\t$userID = $user->getID ();\n\t\t\t\tif (! is_numeric ($groupID)) {\n\t\t\t\t\treturn new Error ('DATABASEOBJECT_SQL_INJECTION_ATTACK_FAILED', __FILE__, __LINE__);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! is_numeric ($userID)) {\n\t\t\t\t\treturn new Error ('DATABASEOBJECT_SQL_INJECTION_ATTACK_FAILED', __FILE__, __LINE__);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$sql = \"DELETE FROM \".$prefix.\"groupUsers WHERE group_id='$groupID' AND user_id='$userID'\";\n\t\t\t\t$q = $this->_db->query ($sql);\n\t\t\t\tif (isError ($q)) {\n\t\t\t\t\treturn $q;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn new Error ('GROUP_USER_NOT_IN_GROUP');\n\t\t\t}\n\t\t} else {\n\t\t\treturn $isInGroup;\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "c709e1cb602d9d7a83e6498a3d73d040", "score": "0.61550176", "text": "public function removeGroup(array $opt = array())\n {\n $this->action('group.remove');\n return $this->request($opt);\n }", "title": "" }, { "docid": "7f5338ad189b8f172c027d239e5a6407", "score": "0.6143395", "text": "public function removeUserGroup(UserGroup $group) {\n\n\t\t$this->getUserGroups();\n\t\tif (isset($this->userGroups[$group->getID()])) {\n\t\t\tunset($this->userGroups[$group->getID()]);\n\t\t}\n\t}", "title": "" }, { "docid": "bfc2a89e93e1653d0a4dcb99d4373a9d", "score": "0.6074797", "text": "function removeUserFromGroup($uid, $sid)\n{\n global $databaseURI;\n\n $newGroupSettings = Group::encodeGroup(Group::createGroup($uid, $uid, $sid));\n $URI = $databaseURI . \"/group/user/{$uid}/exercisesheet/{$sid}\";\n http_put_data($URI, $newGroupSettings, true, $message);\n\n if ($message == \"201\") {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "baf0386dd3ec311911f979a0b9de78e9", "score": "0.60609066", "text": "public function groupRemove($group_id){\n $group = NewsletterGroup::find($group_id);\n if($group){\n $group->delete();\n }\n \n \\Session::flash('success', trans('newsletter::admin.msg_group_removed'));\n \n return response()->json(['status' => 'ok']);\n }", "title": "" }, { "docid": "03db888fa03148c73c29b52ed8343673", "score": "0.6044773", "text": "private function delGroupFromGroup($groupToDel, $group) {\r\n\t\treturn $this->delAttribute($this->groupDN($group), array('member' => $this->groupDN($groupToDel)));\r\n\t}", "title": "" }, { "docid": "216780d2e89ef859c891153072ee962d", "score": "0.6035671", "text": "private function delUserFromGroup($user, $group) {\r\n\t\tif(!ldap_mod_del($this->res, $this->groupDN($group), array('member' => $this->userDN($user)))) {\r\n\t\t\tLog_Control::writeLog(\"ldapConnector.php\", \"delUserFromGroup: \" . ldap_error($this->res));\r\n\t\t\treturn $this->error();\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "1f88d1f9df34ae9649372120e145d44b", "score": "0.60138166", "text": "public function admin_remove(){\n \n $this->set(\"title_for_layout\",\"Remove a Group\");\n \n // Load the group in question\n $group = $this->Group->find('first', array('conditions' => array('Group.id' => $this->params->id)));\n if($group){\n $this->set('group', $group);\n } else {\n $this->Session->setFlash('That group could not be found.', 'default', array('class' => 'alert alert-error'));\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n }\n }", "title": "" }, { "docid": "08e9d9c830f7af7e5e86ed308af30bd8", "score": "0.59673065", "text": "function delete_user_group($group_id)\n {\n return $this->db->delete('groups',array('gro_id'=>$group_id));\n }", "title": "" }, { "docid": "126118c499dbdbd83e8cf0305fa2a81b", "score": "0.5946603", "text": "function _removeUserFromGroup($groupId, $userId){\n $R_user = & JUser::getInstance((int) $userId);\n\n echo \"UserId = \".$userId.\"<br>\";\n echo \"GroupId = \".$groupId.\"<br>\";\n $key = array_search($groupId, $R_user->groups);\n echo \"key = \".$key.\"<br>\";\n //print(\"<pre>\".print_r($R_user->groups, TRUE).\"</pre>\");\n\n //Remove the user from the group if necessary.\n if (array_key_exists($key, $R_user->groups)) {\n // Remove the user from the group.\n unset($R_user->groups[$key]);\n\n // Store the user object.\n if (!$R_user->save()) {\n return new JException($R_user->getError());\n }\n }\n\n // Set the group data for any preloaded user objects.\n $temp = & JFactory::getUser((int) $userId);\n $temp->groups = $R_user->groups;\n\n // Set the group data for the user object in the session.\n $temp = & JFactory::getUser();\n if ($temp->id == $userId) {\n $temp->groups = $R_user->groups;\n }\n\n return TRUE;\n }", "title": "" }, { "docid": "b28ba57d6c45bf4a12198007d28dd3f4", "score": "0.59303105", "text": "function ml_remove_group($group_id)\n{\n\tglobal $cfg, $db_auth, $db_groups, $db_groups_users, $db_modlist;\n\t$count = 0;\n\tsed_sql_query(\"DELETE FROM $db_groups WHERE grp_id=$group_id\");\n\t$count += sed_sql_affectedrows();\n\tsed_sql_query(\"DELETE FROM $db_auth WHERE auth_groupid=$group_id\");\n\t$count += sed_sql_affectedrows();\n\tsed_sql_query(\"DELETE FROM $db_groups_users WHERE gru_groupid=$group_id\");\n\t$count += sed_sql_affectedrows();\n\tsed_sql_query(\"DELETE FROM $db_modlist WHERE ml_gid=$group_id\");\n\t$count += sed_sql_affectedrows();\n\treturn $count;\n}", "title": "" }, { "docid": "8a3ebb0fd352cf17bafe24a372e8fcb4", "score": "0.5887275", "text": "public function removeMember(Group $group, User $user)\n {\n $user->joiningGroups()->detach($group);\n\n return back();\n }", "title": "" }, { "docid": "4001d635dbf20388587958286fc6cb88", "score": "0.58791274", "text": "function remove($group_id)\n {\n $group = $this->Group_model->get_group($group_id);\n\n // check if the group exists before trying to delete it\n if(isset($group['group_id']))\n {\n $this->Group_model->delete_group($group_id);\n $this->session->set_flashdata('msg', 'The group is deleted');\n redirect('group/index');\n }\n else\n show_error('The group you are trying to delete does not exist.');\n }", "title": "" }, { "docid": "71f8092ca884ee9e8091af6e5871c0bd", "score": "0.58448535", "text": "function removeGroup($group, $force = false)\n {\n return PEAR::raiseError(_(\"Unsupported\"));\n }", "title": "" }, { "docid": "1f9e71f1862fb88baee96842c5a81ba4", "score": "0.58283", "text": "public function del_userTask() {\n\t\tif (!$this->permissions['associate_user']) {\n\t\t\t$output = array('success' => false, 'message' => $this->_getErrorMessage('no permission'));\n\t\t\techo $this->json->encode($output);\n\t\t\treturn;\n\t\t}\n\n\t\t//read input and validate it\n\t\t$id_group = Get::req('id_group', DOTY_INT, 0);\n\t\t$id_user = Get::req('id_user', DOTY_INT, 0);\n\t\tif (!$id_group || !$id_user) {\n\t\t\t$output = array('success' => false, 'message' => $this->_getErrorMessage('invalid input'));\n\t\t\techo $this->json->encode($output);\n\t\t\treturn;\n\t\t}\n\n\t\t$output = array();\n\t\t$res = $this->model->removeUsersFromGroup($id_group, $id_user);\n\n\t\t$output['success'] = $res ? true : false;\n\t\tif (!$res) $output['message'] = $this->_getErrorMessage ('server error');\n\t\techo $this->json->encode($output);\n\t}", "title": "" }, { "docid": "e55a7f85c2d8e16efac875a84c212af5", "score": "0.5770739", "text": "public function group_del_user($group,$user,$isGUID=false){\n \n // Find the parent dn\n $group_info=$this->group_info($group,array(\"cn\"));\n if ($group_info[0][\"dn\"]===NULL){ return (false); }\n $group_dn=$group_info[0][\"dn\"];\n \n // Find the users dn\n $user_dn=$this->user_dn($user,$isGUID);\n if ($user_dn===false){ return (false); }\n\n $del=array();\n $del[\"member\"] = $user_dn;\n \n $result=@ldap_mod_del($this->_conn,$group_dn,$del);\n if ($result==false){ return (false); }\n return (true);\n }", "title": "" }, { "docid": "1f7ab8b24aa64df5a1afbc24a0f71b55", "score": "0.57570416", "text": "public function unbind_user_group( $user_id, $group ){\n\t\t$group_id = $this->driver->get_group_by_name( $group );\n\t\treturn $this->driver->unbind_user_group( $user_id, $group_id );\n\t}", "title": "" }, { "docid": "9c323518f2a06c5c8af193d7a749dced", "score": "0.5744823", "text": "public function delete() {\n\t\t// Get list of passwords of this group\n\t\t$passwordList = t3lib_div::makeInstance('tx_passwordmgr_model_passwordList');\n\t\t$passwordList->init($this['groupUid']);\n\n\t\t// Delete sslData of member of passwords in this group\n\t\tforeach ( $passwordList as $password ) {\n\t\t\t$sslDataOfMember = t3lib_div::makeInstance('tx_passwordmgr_model_ssldata');\n\t\t\t$sslDataOfMember->init($password['uid'], $this['beUserUid']);\n\t\t\t$sslDataOfMember->delete();\n\t\t}\n\n\t\t// Delete membership\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_DELETEquery(\n\t\t\t'tx_passwordmgr_group_be_users_mm',\n\t\t\t'group_uid='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this['groupUid'], 'tx_passwordmgr_group_be_users_mm') .\n\t\t\t\t' AND be_users_uid='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this['beUserUid'], 'tx_passwordmgr_group_be_users_mm')\n\t\t);\n\t\t$this->checkAffectedRows('deleteGroupMember', 1);\n\t\ttx_passwordmgr_helper::addLogEntry(1, 'deleteGroupMember', 'Removed user '.$this['beUserUid'].' from group '.$groupUid);\n\t}", "title": "" }, { "docid": "8cac650e77520d95345798b88dee2efd", "score": "0.5714748", "text": "function testRemoveUser() \n {\n global $webUrl;\n global $SUPER_USER_NAME;\n global $POWER_USER_NAME;\n global $NORMAL_USER_NAME;\n global $lang, $SERVER;\n \n // Turn to the group properties page.\n $this->assertTrue($this->get(\"$webUrl/groups.php\", array('server' => $SERVER)));\n\t\t$this->assertTrue($this->get(\"$webUrl/groups.php\",\n\t\t\tarray('action' => 'properties',\n\t\t\t\t'group' => $this->_groupName,\n\t\t\t\t'server' => $SERVER))\n\t\t);\n \n // Drop users from the group and verify it.\n $this->assertTrue($this->clickLink($lang['strdrop']));\n $this->assertTrue($this->clickSubmit($lang['strdrop']));\n $this->assertWantedText($lang['strmemberdropped']);\n \n return TRUE;\n }", "title": "" }, { "docid": "2ddfa724e5e04c10c6491875db3a0841", "score": "0.5697146", "text": "function delGroup($group_id)\n {\n $db = Database::getinstance();\n\n $db->addBound($this->deviceCode);\n $db->addParam('aktor_id');\n $db->addBound($this->houseCode);\n $db->addParam('housecode');\n $db->addBound($group_id);\n $db->addParam('group_id');\n\n $string = \"DELETE FROM group_member WHERE group_id = :group_id AND actuator_id = (SELECT id FROM actuator WHERE devicecode = :aktor_id AND housecode = :housecode) LIMIT 1\";\n// $string = \"UPDATE group_member SET inuse = 0 WHERE group_id = :group_id , actuator_id = (SELECT id FROM actuator WHERE devicecode = :aktor_id AND housecode = :housecode) \";\n\n $db->query($string);\n }", "title": "" }, { "docid": "54ea2cf8243f8df09c5059495f0dcbba", "score": "0.5688", "text": "public function del() {\n\t\t//check permissions: we should have add privileges to create groups\n\t\tif (!$this->permissions['del']) {\n\t\t\t$output = array('success' => false, 'message' => $this->_getErrorMessage('no permission'));\n\t\t\techo $this->json->encode($output);\n\t\t\treturn;\n\t\t}\n\n\t\t$id = Get::req('id', DOTY_INT, -1);\n\t\t$output['success'] = ($id > 0 ? $this->model->deleteGroup($id) : false);\n\t\techo $this->json->encode($output);\n\t}", "title": "" }, { "docid": "3730eacdc91627d0ea5342d734503853", "score": "0.56836706", "text": "public function getRemoveFromGroup()\n {\n return $this->_removeFromGroup;\n }", "title": "" }, { "docid": "169d3b19e78285b6d996ebeedb862044", "score": "0.5680862", "text": "public static function removeUserFromGroup($group_id, $user_id): bool\n {\n return AffinityGroupDAO::removeUserFromAffinityGroup($group_id, $user_id);\n }", "title": "" }, { "docid": "2d8c1286ee2932e74fb2f4c2c68ec2b3", "score": "0.56605065", "text": "private function deleteGroup()\n {\n try\n {\n $request = $_REQUEST;\n\n if( !isset($request['group_id']) || $request['group_id']==\"\" )\n throw_error_msg(\"group id not provided\");\n \n if( !is_numeric($request['group_id']) )\n throw_error_msg(\"invalid group id\");\n\n $id = (int)$request['group_id'];\n\n if(!userid())\n throw_error_msg(lang(\"you_not_logged_in\"));\n\n global $cbgroup;\n\n $cbgroup->delete_group($id);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'group deleted successfully', \"data\" => array());\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "title": "" }, { "docid": "cee418234daad21070721ba209fe5adc", "score": "0.5656924", "text": "function deleterace_group($race_group_id) \n\t{\n\t\t$sQuery = \"DELETE FROM \".DB_PREFIX.\"race_group WHERE race_group_id =\".$race_group_id;\n\t\treturn $this->runquery($sQuery);\n\t}", "title": "" }, { "docid": "979f256c05b14e4784984aa37a370fc3", "score": "0.56419694", "text": "public function actionRemovefromgroup($userid, $groupid)\r\n {\r\n\r\n\r\n\t\t\t\t$user = TaoUriMap::find()->andWhere(['type' => 'user'])\r\n\t\t\t\t->andWhere(['id' => $userid])\r\n\t\t\t\t->One();\r\n\r\n\r\n\t\t\t\t$group = TaoUriMap::find()->andWhere(['type' => 'group'])\r\n\t\t\t\t->andWhere(['id' => $groupid])\r\n\t\t\t\t->One();\r\n\r\n\r\n\t\t\t\t\t\t\t\t$useruri = urlencode($user->uri);\r\n\t\t\t\t\t\t\t\t$groupuri = urlencode($group->uri);\r\n\t\t\t\t$urlstring = Yii::$app->params['TAO_ROOT'] .\"tao/Pao/paoremovefromgroup?useruri=\".$useruri.\"&groupuri=\" . $groupuri;\r\n\t\t\t\t\t\t\t$ch = curl_init($urlstring);\r\n\t\t\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\r\n\t\t\t\t curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n\t\t\t\t$useruri = curl_exec($ch);\r\n\t\t\t\tcurl_close($ch);\r\n\r\n\r\n\r\n\r\n }", "title": "" }, { "docid": "c8b6653f330c51db0044337f1a6da4de", "score": "0.56223184", "text": "public function removeGroup(GroupInterface $group);", "title": "" }, { "docid": "a863875291808c18c6935404a170f0a8", "score": "0.56171435", "text": "public function delete()\n\t{\n\t\t// make sure a user id is set\n\t\tif (empty($this->group['id']))\n\t\t{\n\t\t\tthrow new SentryGroupException(__('sentry::sentry.no_group_selected'));\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tDB::connection(static::$db_instance)->pdo->beginTransaction();\n\n\t\t\t// delete users groups\n\t\t\t$delete_user_groups = DB::connection(static::$db_instance)\n\t\t\t\t->table(static::$join_table)\n\t\t\t\t->where(static::$group_identifier, '=', $this->group['id'])\n\t\t\t\t->delete();\n\n\t\t\t// delete GROUP\n\t\t\t$delete_user = DB::connection(static::$db_instance)\n\t\t\t\t->table(static::$table)\n\t\t\t\t->where('id', '=', $this->group['id'])\n\t\t\t\t->delete();\n\n\t\t\tDB::connection(static::$db_instance)->pdo->commit();\n\t\t}\n\t\tcatch(\\Database_Exception $e) {\n\n\t\t\tDB::connection(static::$db_instance)->pdo->rollBack();\n\t\t\treturn false;\n\t\t}\n\n\t\t// update user to null\n\t\t$this->group = array();\n\t\treturn true;\n\n\t}", "title": "" }, { "docid": "35ae164fcf3cbb0e3954a39cc0c5dea9", "score": "0.5591962", "text": "public function removefromgroupAction()\n {\n \t//Don't display a new view\n\t\t$this->_helper->viewRenderer->setNoRender();\n\t\t\n\t\t$itemid = $this->getRequest()->getParam('itemID');\n\t\t\n\t\t$group = GroupNamespace::getCurrentGroup();\n\t\tif (isset($itemid) && isset($group))\n\t\t{\n\t\t\t$item = $group->removeRecord($itemid);\n\t\t\t$item->setGroupID(NULL);\n\t\t\tItemDAO::getItemDAO()->saveItemIdentification($item, $item);\n\t\t}\n }", "title": "" }, { "docid": "b64e0d84fcbc49dfb07915743209a560", "score": "0.5558318", "text": "private function removeVideoFromGroup()\n {\n try\n {\n $request = $_REQUEST;\n\n if(!isset($request['group_id']) || $request['group_id']==\"\" )\n throw_error_msg('provide group id');\n else if(!is_numeric($request['group_id'])) \n throw_error_msg('invalid group id'); \n else\n $gid = (int)$request['group_id'];\n\n if(!isset($request['videoid']) || $request['videoid']==\"\" )\n throw_error_msg('provide video id');\n else if(!is_numeric($request['videoid'])) \n throw_error_msg('invalid video id'); \n else\n $vid = (int)$request['videoid'];\n\n if(!userid())\n throw_error_msg(lang(\"you_not_logged_in\")); \n \n global $cbgroup; \n $id = $cbgroup->remove_group_video($vid,$gid,true);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg())\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'video removed from group', \"data\" => array());\n $this->response($this->json($data));\n }\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }", "title": "" }, { "docid": "54fc5c9285c9711a06e08821ed456e3b", "score": "0.55473065", "text": "public function removeTeamFromCourseGroup(CourseGroup $courseGroup, User $user)\n {\n $reference = $this->courseGroupOffice365ReferenceService->getCourseGroupReference($courseGroup);\n\n if (!$reference instanceof CourseGroupOffice365Reference)\n {\n return;\n }\n\n// try\n// {\n// $group = $this->groupService->getGroup($reference->getOffice365GroupId());\n// if ($group instanceof Group)\n// {\n// $this->groupService->removeAllMembersFromGroup($reference->getOffice365GroupId());\n//\n// try\n// {\n// $this->groupService->addOwnerToGroup($reference->getOffice365GroupId(), $user);\n// }\n// catch (AzureUserNotExistsException $ex)\n// {\n//\n// }\n// }\n// }\n// catch (GroupNotExistsException $groupNotExistsException)\n// {\n//\n// }\n\n $this->courseGroupOffice365ReferenceService->unlinkCourseGroupReference($reference);\n }", "title": "" }, { "docid": "9b0d2a59975b42d00a49900ac3865235", "score": "0.5510538", "text": "public static function revokeMod( $usr, $user, $group ) {\n\t\t\tif( !Group::isMod( $group, $usr ) ) return false;\n\t\t\tif(!($db = new DB()) ) return false;\n\t\t\t$result = $db->query( \"UPDATE `group_participants` SET `mod`=0 WHERE `group_id` Like '§0' AND `user_id` Like '§1'\",[$group,$user]);\n\t\t\tLog::msg( \"Groups\", \"$usr revoked $user moderator rights in $group\" );\n\t\t\treturn true;\n\t}", "title": "" }, { "docid": "d4caaed96d90faeeb165d43c23f76750", "score": "0.55088276", "text": "function TeamspeakServerClientRemoveServerGroup($sgid, $clid, $port, $instanz)\n\t{\n\t\tglobal $ts3_server;\n\t\t\n\t\t// Teamspeak Daten eingeben\n\t\t$tsAdmin = new ts3admin($ts3_server[$instanz]['ip'], $ts3_server[$instanz]['queryport']);\n\t\t\n\t\t// Verbindung erfolgreich\n\t\tif($tsAdmin->getElement('success', $tsAdmin->connect()))\n\t\t{\n\t\t\t// Im Teamspeak Einloggen\n\t\t\t$tsAdmin->login($ts3_server[$instanz]['user'], $ts3_server[$instanz]['pw']);\n\t\t\t\n\t\t\t// Server Select\n\t\t\t$tsServerID = $tsAdmin->serverIdGetByPort($port);\n\t\t\t$tsAdmin->selectServer($tsServerID['data']['server_id'], 'serverId', true);\n\t\t\t\n\t\t\t// Server Name setzen\n\t\t\t$tsAdmin->setName(TS3_CHATNAME);\n\t\t\t\n\t\t\t$client_sgroup = $tsAdmin->serverGroupDeleteClient($sgid, $clid);\n\t\t\tif($client_sgroup['success'] === false)\n\t\t\t{\n\t\t\t\tfor($i = 0; $i+1 == count($client_sgroup['errors']); $i++)\n\t\t\t\t{\n\t\t\t\t\t$status .= $client_sgroup['errors'][$i].\"<br />\";\n\t\t\t\t};\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twriteInLog(4, $_SESSION['user']['benutzer'].\": Teamspeak Client Remove Servergroup Sgroup: \".$sgid.\" Client: \".$clid.\" Instanz: \".$instanz.\" Port: \".$port, true);\n\t\t\t\t\n\t\t\t\t$status .= \"done\";\n\t\t\t};\n\t\t\t\n\t\t\t$tsAdmin->logout();\n\t\t\t\n\t\t\treturn $status;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"No Connection\";\n\t\t};\n\t}", "title": "" }, { "docid": "e88efe6ffe6be9957f8783fdfa01c4bf", "score": "0.54961896", "text": "public function removeMember(array $opt = array())\n {\n $this->action('group.memberremove');\n return $this->request($opt);\n }", "title": "" }, { "docid": "eb87c99d08e52bcfc1502d9120c48136", "score": "0.5460154", "text": "public function getSecGroup($groupId)\n {\n $tmpGroup = $this->_userDao->getSecurityGroup($groupId);\n if (!empty($tmpGroup)) {\n return $tmpGroup[0];\n } else {\n return false;\n } // else\n }", "title": "" }, { "docid": "5cd948a1686da3904a004768801c8f31", "score": "0.5454833", "text": "public function removeCustomerGroup(CustomerGroupInterface $customerGroup);", "title": "" }, { "docid": "b87cc20d287a454a3486e5af0da20ae1", "score": "0.54371864", "text": "public function removeFromGroupAction(Request $request, User $user, $groupid)\n {\n $em = $this->getDoctrine()->getManager();\n $group = $em->getRepository('BenUserBundle:Group')->find($groupid);\n $user->groupRemove($group);\n $em->persist($group);\n $em->flush();\n $this->get('session')->getFlashBag()->add('success', \"ben.flash.success.general\");\n return $this->redirect($this->generateUrl('group_show', array('id' => $groupid)));\n }", "title": "" }, { "docid": "02d2c6233c0d4b821dcf32832563a23d", "score": "0.543605", "text": "public function remove_group_from_user($gid, $uid) {\n\t\t# get old groups\n\t\t$user = $this->fetch_object (\"users\", \"id\", $uid);\n\n\t\t# remove group\n\t\t$g = json_decode($user->groups, true);\n\t\tunset($g[$gid]);\n\t\t$g = json_encode($g);\n\n\t\t# update\n\t\tif(!$this->update_user_groups($uid, $g)) \t{ return false; }\n\t\telse\t\t\t\t\t\t\t\t\t\t{ return true; }\n\t}", "title": "" }, { "docid": "2a4d8902a486f432f54569305551639d", "score": "0.54347354", "text": "public function deleteGroup($id_group)\r\n {\r\n $query = \"DELETE FROM \".$this->passwords_table.\" WHERE id_passwords_group = '$id_group'\";\r\n mysqli_query($this->db->getDb(), $query);\r\n\r\n // delete groups in this group\r\n $query = \"DELETE from \".$this->groups_table.\" WHERE id_super_group = '$id_group'\";\r\n mysqli_query($this->db->getDb(), $query);\r\n\r\n // delete this group\r\n $query = \"DELETE FROM \".$this->groups_table.\" WHERE id_group = '$id_group'\";\r\n mysqli_query($this->db->getDb(), $query);\r\n\r\n $json['success'] = 1;\r\n $json['message'] = \"You have successfully deleted a passwords group.\";\r\n\r\n return $json;\r\n }", "title": "" }, { "docid": "c70896ab3f7873afd48d574a06208f5e", "score": "0.5411809", "text": "function tool_sync_group_remove_member($grouporid, $userorid, $component = null) {\n global $DB;\n\n if (is_object($userorid)) {\n $userid = $userorid->id;\n } else {\n $userid = $userorid;\n }\n\n if (is_object($grouporid)) {\n $groupid = $grouporid->id;\n $group = $grouporid;\n } else {\n $groupid = $grouporid;\n $group = $DB->get_record('groups', array('id' => $groupid), '*', MUST_EXIST);\n }\n\n if (!tool_sync_groups_is_member($groupid, $userid, $component)) {\n return true;\n }\n\n $params = array('groupid' => $groupid,\n 'userid' => $userid);\n if ($component) {\n $params['component'] = $component;\n }\n $DB->delete_records('groups_members', $params);\n\n // Update group info.\n $time = time();\n $DB->set_field('groups', 'timemodified', $time, array('id' => $groupid));\n $group->timemodified = $time;\n\n // Trigger group event.\n $params = array(\n 'context' => context_course::instance($group->courseid),\n 'objectid' => $groupid,\n 'relateduserid' => $userid\n );\n $event = \\core\\event\\group_member_removed::create($params);\n $event->add_record_snapshot('groups', $group);\n $event->trigger();\n\n return true;\n}", "title": "" }, { "docid": "80be73694c1ecec731c2203c6929d1a7", "score": "0.5396623", "text": "public function removeGroupRole($rid);", "title": "" }, { "docid": "38a981df06463e12aa36c8d479ac213c", "score": "0.53896683", "text": "public function removePermFromSecGroup($groupId, $perm)\n {\n $result = new Dto_FormResult();\n $result = $this->allowedToEditGroup($result, $groupId);\n\n if ($result->isSuccess()) {\n $this->_userDao->removePermFromSecGroup($groupId, $perm);\n } // if\n\n return $result;\n }", "title": "" }, { "docid": "5a1311f2f370fc3ff87b698820a2eddb", "score": "0.5388056", "text": "public function removeGroupMember($_groupId, $_userId, $_removeFromList = true)\n {\n $this->checkRight('MANAGE_ACCOUNTS');\n\n $transactionId = TransactionManager::getInstance()->startTransaction(Core::getDb());\n try {\n GroupbaseGroup::getInstance()->removeGroupMember($_groupId, $_userId);\n\n if (true === $_removeFromList && Application::getInstance()->isInstalled('Addressbook') === true) {\n $group = $this->get($_groupId);\n $user = User::getInstance()->getUserById($_userId);\n\n if (!empty($user->contact_id) && !empty($group->list_id)) {\n try {\n $aclChecking = ControllerList::getInstance()->doContainerACLChecks(FALSE);\n ControllerList::getInstance()->removeListMember($group->list_id, $user->contact_id, false);\n ControllerList::getInstance()->doContainerACLChecks($aclChecking);\n } catch (NotFound $tenf) {\n if (Core::isLogLevel(LogLevel::WARN))\n Core::getLogger()->warn(__METHOD__ . '::' . __LINE__ . ' catched exception: ' . get_class($tenf));\n if (Core::isLogLevel(LogLevel::WARN))\n Core::getLogger()->warn(__METHOD__ . '::' . __LINE__ . ' ' . $tenf->getMessage());\n if (Core::isLogLevel(LogLevel::INFO))\n Core::getLogger()->info(__METHOD__ . '::' . __LINE__ . ' ' . $tenf->getTraceAsString());\n }\n }\n }\n\n $event = new RemoveGroupMember();\n $event->groupId = $_groupId;\n $event->userId = $_userId;\n Event::fireEvent($event);\n\n TransactionManager::getInstance()->commitTransaction($transactionId);\n $transactionId = null;\n } finally {\n if (null !== $transactionId) {\n TransactionManager::getInstance()->rollBack();\n }\n }\n }", "title": "" }, { "docid": "be20c5a67d6b13268b59b0aa39084a0b", "score": "0.5384868", "text": "function deleteGroup($groupName)\n{\n\n $groupName=normalizeName($groupName);\n\n\n $error = new OSAError();\n $error->setHttpStatus(200);\n\n\n if ($groupName== null || $groupName == \"\") {\n $error->setHttpLabel(\n \"Bad request for method \\\"\" . \n $_SERVER[\"REQUEST_METHOD\"] . \n \"\\\" for resource \\\"group\\\"\"\n );\n $error->setHttpStatus(400);\n $error->setFunctionalCode(1);\n $error->setFunctionalLabel(\n $error->getFunctionalLabel() . \n \"groupName is required\\n\"\n );\n throw new Exception($error->GetFunctionalLabel(), $error->getHttpStatus());;\n } else if ($groupName==ADMIN_GROUP || $groupName == VALID_USER_GROUP) {\n $error->setHttpStatus(403);\n $error->setFunctionalCode(3);\n $error->setFunctionalLabel(ADMIN_GROUP . \" group can't be suppressed\");\n throw new Exception($error->GetFunctionalLabel(), $error->getHttpStatus());\n }\n\n $rc=getGroup($groupName);\n\n try{\n $db=openDBConnection();\n\n $strSQL=\"DELETE FROM `groups` WHERE groupName=?\";\n $stmt=$db->prepare($strSQL);\n $stmt->execute(array(cut($groupName, GROUPNAME_LENGTH)));\n \n\n $strSQL=\"DELETE FROM counters WHERE counterName like ?\";\n $stmt=$db->prepare($strSQL);\n $stmt->execute(array(\"%U=\" . cut($groupName, GROUPNAME_LENGTH) . \"%\"));\n\n }catch(Exception $e) {\n if (strpos(strtolower($e->getMessage()), \"foreign key constraint fail\")>=0) {\n $error->setFunctionalLabel(\n \"The group \" . $groupName .\n \" is used by some services. Please remove subscribtions/user's \" .\n \"quotas and services referencing it first\"\n );\n $error->setHttpStatus(403);\n } else {\n $error->setHttpStatus(500);\n $error->setFunctionalLabel($e->getMessage());\n }\n $error->setFunctionalCode(3);\n throw new Exception($error->GetFunctionalLabel(), $error->getHttpStatus());;\n }\n\n\n return $rc;\n}", "title": "" }, { "docid": "943fb2ef34d303cf54e5bf6d175d433b", "score": "0.53808814", "text": "public function actionLeft_from_group() {\n if (isset($_REQUEST['groupId']) && isset($_REQUEST['userToRemove'])) {\n $group = Group::findGroup(intval($_REQUEST['groupId']));\n $thisUser = Yii::$app->user->identity;\n $userId = intval($_REQUEST['userToRemove']);\n $userToRemove = User::findIdentity($userId);\n\n if( $thisUser->id == $group->owner) {\n Group::removeGroupById($group->id);\n return json_encode(['success'=>true]);\n }\n elseif($thisUser->id == $userId){\n if($userToRemove != null){\n $group->removeUserFromGroupById($userId);\n return json_encode(['success'=>true]);\n }\n }\n }\n return json_encode(['success'=>false]);\n }", "title": "" }, { "docid": "91be2b2fe20b614e90c7af455171b297", "score": "0.5370213", "text": "function removeTranslationFromDatabase ($translatedGroup) {\n\t\tif ($this->existsTranslatedGroup ($translatedGroup->getLanguageCode ())) {\n\t\t\treturn $translatedGroup->removeFromDatabase ();\n\t\t} else {\n\t\t\treturn new Error ('GROUP_TRANSLATION_DOESNT_EXISTS', $translatedGroup->getLanguageCode ());\n\t\t}\n\t}", "title": "" }, { "docid": "94b467cfb84254c7f82da2786eec7ad6", "score": "0.53640777", "text": "public function remove($id, $group)\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "5a96d43b0b156a9d352d4382a61b15ba", "score": "0.53445446", "text": "private function delGroupAttribute($group, $attribute, $value) {\r\n\t\treturn $this->delAttribute($this->groupDN($group), array($attribute => $value));\r\n\t}", "title": "" }, { "docid": "89af108d074ff38bfdf6b5562b461c83", "score": "0.5339288", "text": "function mumiemodule_students_unsubscribe($userid, $mumiemoduleid, $groupid){\n \t\n if (!record_exists(\"mumiemodule_students\", \"mumiemodule\", $mumiemoduleid, \"userid\", $userid, \"groupid\", $groupid)) {\n return true;\n }\n \t\n \treturn delete_records(\"mumiemodule_students\", \"userid\", $userid, \"mumiemodule\", $mumiemoduleid, \"groupid\", $groupid);\n }", "title": "" }, { "docid": "12533e353eae417cf5aa913b9cd0184e", "score": "0.5323291", "text": "function delete_group($group_id)\n {\n return $this->db->delete('groups',array('group_id'=>$group_id));\n }", "title": "" }, { "docid": "5f85259ea8bc6900e67f2a63e3f37d17", "score": "0.5322313", "text": "function socialCircleMemberRemove($opt){\n\n\t$id_socialcircle\t= $opt['id_socialcircle'];\n\t$user\t\t\t\t= $opt['user'];\n\n\t$user = is_array($user) ? $user : array($user);\n\n\t$this->dbQuery(\"DELETE FROM k_socialcircleuser WHERE id_socialcircle=\".$id_socialcircle.\" AND id_user IN(\".implode(',', $user).\")\");\n\tif($opt['debug']) $this->pre($this->db_query, $this->db_error);\n\n\t$this->socialCircleMemberCount(array(\n\t\t'debug'\t\t\t\t=> $opt['debug'],\n\t\t'id_socialcircle'\t=> $id_socialcircle\n\t));\n\t\n\t$this->socialCircleMemberFix(array(\n\t\t'debug'\t\t\t\t=> $opt['debug'],\n\t\t'users'\t\t\t\t=> $user\n\t));\n\n}", "title": "" }, { "docid": "c65ade407ccd0d2a539bfa24c8e82f7f", "score": "0.53174645", "text": "public function removeUserGroups($userid, $groups) {\r\n return $this->storeOrRemoveUserGroups('remove', $userid, $groups);\r\n }", "title": "" }, { "docid": "d35a5f1fddfb579c04f1025b8ffeb579", "score": "0.53029966", "text": "public function setRemoveFromGroup($removeFromGroup)\n {\n $this->_removeFromGroup = $removeFromGroup;\n }", "title": "" }, { "docid": "f6d8b895ba6929064e275e26e05e7cd5", "score": "0.53025204", "text": "public function leaveGroup(int $group_id, int $user_id) {\r\n $this->verifySystemIsActive();\r\n $group = Group::getById($group_id);\r\n $user = User::getByUserID($user_id);\r\n $user->exitGroup($group);\r\n if ($group->getGroupMembersNum() == 0) {\r\n $group->delete();\r\n }\r\n }", "title": "" }, { "docid": "84bcb948f97138abc0864dad879f1c44", "score": "0.5299263", "text": "public function removeMembersFromGroup($group_id, $user_ids) {\n return $this->get('remove_members_from_group', ['group_id' => $group_id, 'user_ids' => $this->toArray($user_ids)]);\n }", "title": "" }, { "docid": "23b31992bb23b7147ec01884a4355d9b", "score": "0.5293836", "text": "function rmUser($user){\n\tglobal $dbLink;\n\t\n\t$sqlgetInfo = \"SELECT main_group FROM users WHERE uid='$user'\";\n\t\n\tif($getInfo = $dbLink->query($sqlgetInfo)){\n\t\twhile($getResult = $getInfo->fetch_assoc()){\n\t\tif($getResult['main_group'] != 'student'){\n\t\t\n\t\t\t$sqlSelectClass = \"SELECT c_id FROM classes WHERE t_uid='$user'\";\n\t\t\tif($SelectClass = $dbLink->query($sqlSelectClass)){\n\t\t\t\twhile($ArrayClass = $SelectClass->fetch_assoc()){\n\t\t\t\t\tforeach($ArrayClass as $class){\n\t\t\t\t\t\t$sqlDeleteReg = \"DELETE FROM registrar WHERE c_id='$class'\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!$dbLink->query($sqlDeleteReg)){\n\t\t\t\t\t\t\t$_SESSION['error_message'] = \"Could not delete the class\";\n\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$sqlSelectFiles = \"SELECT fid FROM file_registrar WHERE c_id='$class'\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($getFid = $dbLink->query($sqlSelectFiles)){\n\t\t\t\t\t\t\twhile($ArrFid = $getFid->fetch_assoc()){\n\t\t\t\t\t\t\t\tforeach($ArrFid as $fid){\n\t\t\t\t\t\t\t\t\t$sqlDeleteFiles = \"DELETE FROM edu_files WHERE fid='$fid'\";\n\t\t\t\t\t\t\t\t\tif(!$dbLink->query($sqlDeleteFiles)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$_SESSION['error_message'] = \"Could not delete files\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t\t\t\t}//delete files where the fid is stated\n\t\t\t\t\t\t\t\t}//end of foreach($ArrFid\n\t\t\t\t\t\t\t}//end of while loop to get FID's\n\t\t\t\t\t\t}//end of if statement to select file ID's\n\t\t\t\t\t\t$sqlDeleteFReg = \"DELETE FROM file_registrar WHERE c_id='$class'\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!$dbLink->query($sqlDeleteFReg)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$_SESSION['error_message'] = \"Could not delete from File Registrar\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdie();\n\t\t\t\t\t\t}\n\t\t\t\t\t}//end of foreach($Array\n\t\t\t\t}//end of while\n\t\t\t}//end of if to remove class data\n\t\t\t$sqlDeleteClass = \"DELETE FROM classes WHERE t_uid='$user'\";\n\t\t\tif(!$dbLink->query($sqlDeleteClass)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$_SESSION['error_message'] = \"Could not delete from the classes table\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdie();\n\t\t\t}//end of if to remove class from the classes table\t\n\t\t\t\n\t\t\t$sqlrmStudent = \"DELETE FROM users WHERE uid='$user'\";\n\t\t\t$sqlrmTorrent = \"DELETE FROM `xbt_users` WHERE uid='$user'\";\n\t\t\tif(!$dbLink->query($sqlrmStudent)){\n\t\t\t\t\t\t\t\n\t\t\t}//end of remove student if statement\n\n\t\t\tif(!$dbLink->query($sqlrmTorrent)){\n\t\t\t\t\t\t\t$_SESSION['error_message'] = \"The user has not been deleted\";\n\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\tdie();\n\t\t\t}//end of remove student if statement\n\t\t\telse{\n\t\t\t\t\t\t\t$_SESSION['error_message'] = \"The user has been deleted\";\n\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\tdie();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif($getResult['main_group'] == 'student'){\n\t\t\t$sqlrmStudent = \"DELETE FROM users WHERE uid='$user'\";\n\t\t\t$sqlrmTorrent = \"DELETE FROM `xbt_users` WHERE uid='$user'\";\n\t\t\tif(!$dbLink->query($sqlrmStudent)){\n\t\t\t\t\t\t\t\n\t\t\t}//end of remove student if statement\n\t\t\t\n\t\t\tif(!$dbLink->query($sqlrmTorrent)){\n\t\t\t\t\t\t\t$_SESSION['error_message'] = \"The user has not been deleted\";\n\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\tdie();\n\t\t\t}//end of remove student if statement\n\t\t\telse{\n\t\t\t\t\t\t\t$_SESSION['error_message'] = \"The user has been deleted\";\n\t\t\t\t\t\t\theader(\"Location: ../admin.php\");\n\t\t\t\t\t\t\tdie();\n\t\t\t}\n\t\t}\n\t\t\n\t\t}//end of while getInfo Array\n\t}//end of if(sqlgetInfo\n}", "title": "" }, { "docid": "bb1f4012a29bb2b7633b5d0cf7221ff7", "score": "0.5292577", "text": "public function destroy(Request $request, Group $group, User $user)\n {\n $user->group()->dissociate();\n $this->response()->accepted();\n return $user;\n }", "title": "" }, { "docid": "a7fa49a961490f83085598f46df022ea", "score": "0.52915245", "text": "public function deleteGroup($groupID)\n {\n $result = $this->sdb->query(\n 'select email from appuser, appuser_group_link as agl where agl.gid=$1 and agl.uid=appuser.id',\n array($groupID));\n $email = \"\";\n while($row = $this->sdb->fetchrow($result))\n {\n $email .= $row['email'] . \" \";\n }\n if ($email)\n {\n throw new \\snac\\exceptions\\SNACDatabaseException(\"Tried to delete group still used by user(s): $email\");\n }\n else\n {\n $this->sdb->query(\n 'delete from appuser_group where id=$1 and id not in (select distinct(gid) from appuser_group_link)',\n array($groupID));\n }\n }", "title": "" }, { "docid": "11ee8b65fae17bcce70b78f13442af2e", "score": "0.5281001", "text": "function DeleteSubjectGroup($group_id){\r\n\r\n\t\t\t$result = false;\r\n\r\n\t\t\tif($this->conn == null){\r\n\t\t\t\t$error = \"No defined connection.\";\r\n\t\t\t\treturn null;\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$conn = $this->conn;\r\n\r\n\t\t\t\t$query = \"DELETE FROM `sch-subject_group` \";\r\n\t\t\t\t$query .= \"WHERE SubjectGroupID=\";\r\n\t\t\t\t$query .= $group_id;\r\n\r\n\t\t\t\t$conn->query($query);\r\n\r\n\t\t\t\tif($conn->affected_rows > 0){\r\n\r\n\t\t\t\t\t$result = true;\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(strpos($conn->error, \"a foreign key constraint fails\") !== false){\r\n\t\t\t\t\t\t$this->error = \"Error deleting subject group. Information in use.\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn $result;\r\n\r\n\t\t}", "title": "" }, { "docid": "698e4b249d0453cec486a212a6e5a142", "score": "0.527201", "text": "public function deleteGroupAction()\n {\n $serviceId = $this->_request->getParam( 'group_id', null );\n if ( $serviceId )\n {\n $model = new Application_Model_ServiceGroup();\n $service = $model->fetchRow( 'id = ' . $serviceId );\n $result = $service->delete();\n if ( $result )\n {\n $this->_flash->addMessage( array( 'notice' => 'Service group deleted' ) );\n }\n else\n {\n $this->_flash->addMessage( array( 'error' => 'Unable to delete service group' ) );\n }\n }\n else\n {\n $this->_flash->addMessage( array( 'error' => 'Unable to find service group' ) );\n }\n $url = $this->view->url( array( 'controller' => 'services', 'action' => 'groups'), null, true );\n $this->_redirect( $url, array( 'prependBase' => false ) );\n }", "title": "" }, { "docid": "91519d254a3eec480db27b7400ea497b", "score": "0.52717614", "text": "public function deleteGroup() {\r\n try {\r\n $this->logger->info(\"Entering AdminController.deleteGroup()\");\r\n //GET method for user id\r\n $id = $_GET['id'];\r\n //call user business service\r\n $service = new AdminBusinessService();\r\n $delete = $service->removeGroup($id);\r\n \r\n //render a success or fail view\r\n if($delete) {\r\n return redirect()->action('AdminController@displayAllGroups');\r\n }\r\n \r\n else {\r\n return view('deleteFail');\r\n }\r\n }\r\n \r\n catch (Exception $e){\r\n //best practice: call all exceptions, log the exception, and display a common error page (or use a global exception handler)\r\n //log exception and display exception view\r\n $this->logger->error(\"Exception: \", array(\"message\" => $e->getMessage()));\r\n $data = ['errorMsg' => $e->getMessage()];\r\n return view('exception')->with($data);\r\n }\r\n }", "title": "" }, { "docid": "ff2d1c79b4df1077fa8e17d365c554aa", "score": "0.5260247", "text": "function deleteUserGroup($options = array())\r\n{\r\n // required values\r\n if(!_required(array('gid'), $options)) return false;\r\n\r\n $this->db->where('gid', $options['gid']);\r\n $this->db->delete('user_groups');\r\n}", "title": "" }, { "docid": "5c2287e0845c56a80af4349d86fcb996", "score": "0.52585447", "text": "public function removeSecondUser() {\n $this->autoRender = false;\n if ($this->request->is('post')) {\n $secondUserId = $this->request->data['SecondaryUser']['id'];\n $sql = \"UPDATE secondary_users SET excluded = 1 where id = {$secondUserId};\";\n $params = array('User' => array('query' => $sql));\n $delete = $this->AccentialApi->urlRequestToGetData('users', 'query', $params);\n if (is_null($delete)) {\n return 1;\n }\n }\n return 0;\n }", "title": "" }, { "docid": "21f04e30a6a9abc4849c530bb76e9ad0", "score": "0.5247148", "text": "public function deluser($dbuser){\n $this->cpanel_api_ver = 'api1';\n return $this->_check_result($this->api1_query($this->user, 'Mysql', __FUNCTION__, array($dbuser)));\n }", "title": "" }, { "docid": "6094cd5ff63920287273d464d7b5fc38", "score": "0.52451867", "text": "public function destroy(student_group $student_group)\n {\n //\n }", "title": "" }, { "docid": "599738ead018809a17b11f0b811c3293", "score": "0.524213", "text": "public function destroy(Group $group)\n {\n $group->delete();\n\n return $this->showOne($group);\n }", "title": "" }, { "docid": "61958d92af8cc85d39b4adc6e8299dca", "score": "0.52326214", "text": "public function RemoveGroupNotice($group, $notice){\n\t\t\tif($group instanceof WebUI\\GroupRecord){\n\t\t\t\t$group = $group->GroupID();\n\t\t\t}\n\n\t\t\tif(is_string($group) === false){\n\t\t\t\tthrow new InvalidArgumentException('Group ID must be specified as string.');\n\t\t\t}else if(preg_match(static::regex_UUID, $group) != 1){\n\t\t\t\tthrow new InvalidArgumentException('Group ID must be specified as UUID.');\n\t\t\t}else if(is_string($notice) === false){\n\t\t\t\tthrow new InvalidArgumentException('NoticeID must be specified as string.');\n\t\t\t}else if(preg_match(static::regex_UUID, $notice) != 1){\n\t\t\t\tthrow new InvalidArgumentException('NoticeID must be a valid UUID.');\n\t\t\t}\n\n\t\t\treturn $this->makeCallToAPI('RemoveGroupNotice', false, array(\n\t\t\t\t'GroupID' => $group,\n\t\t\t\t'NoticeID' => $notice\n\t\t\t), array(\n\t\t\t\t'Success' => array('boolean'=>array())\n\t\t\t))->Success;\n\t\t}", "title": "" }, { "docid": "04fb81205535b0e719359207833e4f5c", "score": "0.5232071", "text": "public function detachGroup($group);", "title": "" }, { "docid": "39b74f4787332a493bc2f00b0d01ab3d", "score": "0.52298266", "text": "public function remove_group_from_users($gid) {\n\t\t# get all users\n\t\t$users = $this->fetch_all_objects(\"users\");\n\t\t# check if $gid in array\n\t\tforeach($users as $u) {\n\t\t\t$g = json_decode($u->groups, true);\n\t\t\t$go = $g;\n\t\t\t$g = $this->groups_parse($g);\n\t\t\t# check\n\t\t\tif(sizeof($g)>0) {\n\t\t\t\tforeach($g as $gr) {\n\t\t\t\t\tif(in_array($gid, $gr)) {\n\t\t\t\t\t\tunset($go[$gid]);\n\t\t\t\t\t\t$ng = json_encode($go);\n\t\t\t\t\t\t$this->update_user_groups($u->id,$ng);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "46f8a2257625076fc20bf8a81f4b69e2", "score": "0.5225839", "text": "public function deleteGroup()\n {\n $this->jsonHeader();\n $adminId = (int)$_GET['adminId'];\n if ($adminId) {\n define('IN_ADMIN', 1);\n $_COOKIE['classified_session'] = $_COOKIE['admin_classified_session'];\n }\n\n $session = geoSession::getInstance();\n $session->initSession();\n\n $cart = geoCart::getInstance();\n //start up the cart\n $userId = ($adminId) ? (int)$_GET['userId'] : null;\n $cart->init(true, $userId);\n\n if (!$this->_validateCartStep()) {\n //invalid it seems?\n return;\n }\n\n //data to be returned\n $data = array();\n\n $session_variables = $cart->item->get('session_variables');\n $tpl_vars = $cart->getCommonTemplateVars();\n if (!$session_variables) {\n //failsafe\n return $this->_error($this->messages[502221]);\n }\n\n $group_id = (int)$_POST['groupId'];\n\n $cost_options = $session_variables['cost_options'];\n if (!$cost_options || !isset($cost_options[$group_id])) {\n //failsafe, selection to remove not found\n return $this->_error($this->messages[502222]);\n }\n\n unset($cost_options[$group_id]);\n\n //reset cost option keys... since they do NOT go to the actual saved value\n $cost_options = array_values($cost_options);\n $session_variables['cost_options'] = $cost_options;\n //reset combined quantities\n unset($session_variables['cost_options_quantity']);\n\n $cart->item->set('session_variables', $session_variables);\n $cart->save();\n\n //selection removed\n $data['msg'] = $this->messages[502223];\n\n $tpl_vars = $cart->getCommonTemplateVars();\n\n $tpl_vars['session_variables'] = $session_variables;\n $tpl_vars['ajax'] = true;\n\n $tpl = new geoTemplate(geoTemplate::SYSTEM, 'order_items');\n $tpl->assign($tpl_vars);\n\n $data['cost_options_box'] = $tpl->fetch('shared/cost_options/index.tpl');\n\n echo $this->encodeJSON($data);\n }", "title": "" }, { "docid": "2a40e39a40a82b1fdccbfa3488710232", "score": "0.5225798", "text": "public static function delete($groupID){\r\n//QUERY: DD-Not a huge fan of deleting without archiving, consider archiving this informatinon or implementing soft delete?\r\n\t$sql = \"DELETE FROM wv_studentgroups WHERE IntGroupID = \".$groupID;\r\n\t//TODO: DD-Remove student group links with the group ID we are removing.\r\n\tmysql_query($sql) or die('Error: '.mysql_error ());\r\n}", "title": "" }, { "docid": "5efefeff2030b661f9a21c6270cf20cd", "score": "0.5218043", "text": "public function deleteGroup($group)\n {\n // TODO: Implement deleteGroup() method.\n }", "title": "" }, { "docid": "82a6429b76a7cd7a4a053ff100581e42", "score": "0.5207243", "text": "public function deleteGroup()\n {\n $stmt = self::connectToDb()->prepare('DELETE * FROM groups WHERE id = :id ');\n $stmt->bindParam(':id',$this->id);\n return $stmt->execute();\n }", "title": "" }, { "docid": "67ae5439d132204e71baf465523fe530", "score": "0.5199705", "text": "public static function deleteGroup() {\n $result = array();\n $deleted = lC_Administrators_Admin::deleteGroup($_GET['gid']);\n if ($deleted) {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }", "title": "" }, { "docid": "80ccefee911dbbebc88e3854b170acf7", "score": "0.51910627", "text": "public function removeRecord();", "title": "" }, { "docid": "fbd666f8f157a50f0b87699f04c41365", "score": "0.5189632", "text": "public function deleteGroup($group)\n {\n $id = is_numeric($group) ? $group : $this->getGroupId($group);\n $this->addParam('group_id', $id);\n\n $this->request->post($this->requestUrl('delete_group'), $this->params);\n }", "title": "" }, { "docid": "ee15d4ffd6d5726e74658f010bd6771d", "score": "0.5180291", "text": "private static function groupDelete($userId, $tsVirtualServer, $currentTSGroup, $tsCurrentDbId)\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\t// Grab groupInfo\r\n\t\t\t$groupInfo = $tsVirtualServer->serverGroupGetById($currentTSGroup);\r\n\r\n\t\t\t// Skip if a group is NOT set as a 'permanent' group\r\n\t\t\tif(!$groupInfo->savedb) \r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// Actually remove the user from this group\r\n\t\t\t$tsVirtualServer->serverGroupClientDel($currentTSGroup, $tsCurrentDbId);\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t} \r\n\t\tcatch (TeamSpeak3_Exception $e) \r\n\t\t{\r\n\t\t\tLynx_Log::addToLog($userId, \"TeamSpeak 3\", $e->getCode(), $e->getMessage());\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "8f5f04abf29823c614f0b279ad496c8b", "score": "0.5169749", "text": "public function delete() {\r\n\r\n // Does the Group object have an ID?\r\n if ( is_null( $this->id ) ) trigger_error ( \"Group::delete(): Attempt to delete a Group object that does not have it's ID property set.\", E_USER_ERROR );\r\n\r\n // Delete the Group\r\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD ); \r\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\r\n $st = $conn->prepare ( \"DELETE FROM \" . DB_PREFIX . \"groups WHERE id = :id LIMIT 1\" );\r\n \r\n $st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n $st->execute();\r\n \r\n $conn = null;\r\n }", "title": "" }, { "docid": "833aa9399c794a2b966a977209d33300", "score": "0.51554066", "text": "public function removeUser($u_id,Request $request){\n \tif($request->session()->get('type') == 'admin'){\n\n$facultySlideList\t= DB::table('t_users')->where('u_id', $u_id)\n->delete();\n\n\n/*$CourseNotice\t= DB::table('t_course_notice')->where('n_course_id', $c_faculty_id)->orderBy('n_id', 'desc')\n->get();*/\n\n\n\t\t return back()->with('msg', \"✔ USER REMOVED\");\n\t\t}\n\t\n\telse{\n\t\t$request->session()->flash('msg', \"UNAUTHORIZED\");\n return redirect()->route('login.index');\n }\n\t}", "title": "" }, { "docid": "7cb51bf35c3a3c5fea3c9f218d694415", "score": "0.51539963", "text": "public function removeUser()\n\t{\n\t\tif(isset($this->primarySearchData[$this->ref_user]))\n\t\t{\n\t\t\tunset($this->primarySearchData[$this->ref_user]);\n\t\t}\n\t}", "title": "" }, { "docid": "ead2e0aa6c23d221e68859f2e30dbe0f", "score": "0.5152658", "text": "public function deletegroupAction()\n {\n \t$this->_helper->viewRenderer->setNoRender();\n \t\n \t$group = GroupNamespace::getCurrentGroup();\n \tif (isset($group))\n \t{\n \t\tGroupDAO::getGroupDAO()->deleteGroup($group);\n \t}\n \tGroupNamespace::clearCurrentGroup();\n \t$this->_helper->redirector('index', 'user');\n }", "title": "" }, { "docid": "850cd4a777bf8fde089cde091c488da7", "score": "0.51508594", "text": "public function deleteUser($delUsr)\n\t{\t\t \n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n\n\t\t$fields = array($db->quoteName('status').' = '.$db->quote('0'));\n\t\t$conditions = array($db->quoteName('id') . ' = '.$delUsr);\n\t\t\n\t\t$query\n\t\t\t->update($db->quoteName('registration'))\n\t\t\t->set($fields)\n\t\t\t->where($conditions);\n\n\t\t$db->setQuery($query);\n\t\t$db->query();\n\n\t\t$result = JFactory::getApplication()->enqueueMessage('Workshop/Seminar Deleted Successfully','message');\n\n\t\treturn $result;\n\n\t}", "title": "" }, { "docid": "249e31eca83b8d06058b0eb40b37287c", "score": "0.5148535", "text": "function removeUserFromGroup($userId, $groupId) {\n // make sure user is authorized to do this\n die ('unimplemented: '.__CLASS__.'::'.__FUNCTION__.' ('.__LINE__.':'.__FILE__.')');\n }", "title": "" }, { "docid": "f5b0d64c3e4442cd40400ca7e32f7ac0", "score": "0.51471597", "text": "public function ADStaff_Del_Group_Memner($User='',$GroupCode=''){\n\t \n\t $result_key = parent::Initial_Result();\n\t $result = &$this->ModelResult[$result_key];\n\t \n\t try{\n\t\t\n\t\t// 檢查參數\n\t if(!strlen($User)){\n\t\t throw new Exception('_SYSTEM_ERROR_PARAMETER_FAILS');\n\t\t}\n\t\t\n\t\t// 查詢使用者\n\t\t$DB_OBJ = $this->DBLink->prepare(SQL_AdStaff::CHECK_MEMBER_ACCOUNT());\n\t\t$DB_OBJ->bindValue(':uno'\t,$User);\n\t\t$DB_OBJ->bindValue(':user_id'\t,$User);\n\t\t$DB_OBJ->bindValue(':user_name'\t,$User);\n\t\t$DB_OBJ->bindValue(':user_mail'\t,$User);\n\t\tif(!$DB_OBJ->execute()){\n\t\t throw new Exception('_SYSTEM_ERROR_DB_ACCESS_FAIL'); \n\t\t}\n\t\t\n\t\t$user = array();\n\t if(!$user = $DB_OBJ->fetch(PDO::FETCH_ASSOC)){\n\t\t throw new Exception('_LOGIN_INFO_ACCOUNT_UNFOUND'); \n\t }\n\t\t\t\n\t\t// 執行移除\n\t\t$DB_DEL\t= $this->DBLink->prepare(parent::SQL_Permission_Filter(SQL_AdStaff::DELETE_MEMBER_FROM_GROUP()));\n\t\t$DB_DEL->bindValue(':uid' , $user['uno']);\n\t\t$DB_DEL->bindValue(':gid' , $GroupCode);\n\t\tif(!$DB_DEL->execute()){\n\t\t throw new Exception('_SYSTEM_ERROR_DB_ACCESS_FAIL'); \n\t\t}\n\t\t\n\t\t// 確定執行數量 \n\t\tif(!$DB_DEL->rowCount()){\n\t\t throw new Exception('_STAFF_ERROR_MASTER_MEMBER_CANT_REMOVE'); \t\n\t\t}\n\t\t\n\t\t$result['data'] = $User;\n\t\t$result['action'] = true;\n\t\t\n\t } catch (Exception $e) {\n $result['message'][] = $e->getMessage();\n }\n\t return $result;\n\t}", "title": "" }, { "docid": "f6b58f95b7299979ce5b9827c7914a38", "score": "0.5145459", "text": "public function removeUser($uid) {\n// $this->db->where('id', $uid);\n// $res = $this->db->update('user', $data);\n\n $query = $this->db->delete('user', array('id' => $uid)); // Produces: // DELETE FROM mytable // WHERE id = $id\n return $query;\n }", "title": "" }, { "docid": "434d8e084bbdc54e96009b916fd2b8b4", "score": "0.5141037", "text": "function deleteGroup($group_id) {\n // This block automatically checks this action against the permissions database before running.\n if (!checkActionPermissionSelf(__FUNCTION__, func_get_args())) {\n addAlert(\"danger\", \"Sorry, you do not have permission to access this resource.\");\n return false;\n }\n\n if ($name = dbDeleteGroup($group_id)){\n addAlert(\"success\", lang(\"PERMISSION_DELETION_SUCCESSFUL_NAME\", array($name)));\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "eb516209088e8f288ae86a8eee0a506f", "score": "0.513454", "text": "public function removeUsers($id, $data) {\n\t\t// find\n\t\t$model = $this->get($id);\n\n\t\tif ($model === null) {\n\t\t\treturn new NotFound(['message' => 'Group not found.']);\n\t\t}\n\n\t\t// pass remove to internal logic\n\t\ttry {\n\t\t\t$this->doRemoveUsers($model, $data);\n\t\t} catch (ErrorsException $e) {\n\t\t\treturn new NotValid(['errors' => $e->getErrors()]);\n\t\t}\n\n\t\t// save and dispatch events\n\t\t$this->dispatch(GroupEvent::PRE_USERS_REMOVE, $model, $data);\n\t\t$this->dispatch(GroupEvent::PRE_SAVE, $model, $data);\n\t\t$rows = $model->save();\n\t\t$this->dispatch(GroupEvent::POST_USERS_REMOVE, $model, $data);\n\t\t$this->dispatch(GroupEvent::POST_SAVE, $model, $data);\n\n\t\tif ($rows > 0) {\n\t\t\treturn Updated(['model' => $model]);\n\t\t}\n\n\t\treturn NotUpdated(['model' => $model]);\n\t}", "title": "" }, { "docid": "67fedfadc88453341cda5252a7ec077a", "score": "0.5131845", "text": "public function removeAction() {\n $this->_helper->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n \n $session_user = new Zend_Session_Namespace('user');\n if ($session_user->loginType == \"administrator\") {\n $andrewId = $this->getRequest()->getParam('andrewid');\n $program = $this->getRequest()->getParam('program');\n\n $dbUsers = new Application_Model_DbTable_Users();\n if ($program == 'admin')\n $studentId = $dbUsers->getId($andrewId, null);\n else\n $studentId = $dbUsers->getId($andrewId, $program);\n $dbUsers->deleteById($studentId);\n\n $dbCourses = new Application_Model_DbTable_Courses();\n $dbCourses->deleteByStudentId($studentId);\n\n $dbChats = new Application_Model_DbTable_Chats();\n $dbChats->deleteByStudentId($studentId);\n\n $dbForcedValues = new Application_Model_DbTable_ForcedValues();\n $dbForcedValues->deleteByStudentId($studentId);\n }\n }", "title": "" }, { "docid": "c337a9c139b0a2b43f69c60f44c8c881", "score": "0.512945", "text": "public function destroy($id)\n\t{\n\t\t$group = Group::find($id);\n\n\t\tif (Auth::user()->getUsername() == $group->creator) {\n\n\t\t\t$group->delete();\n\n\t\t\t// Redirect\n\t\t\tSession::flash('message', 'Group deleted!');\n\t\t\treturn redirect(route('users.show', [$group->creator]));\n\n\t\t} else {\n\t\t\tSession::flash('info_message', 'You do not have that permission!');\n\t\t\treturn redirect(route('groups.show', [$group->id]));\n\t\t}\n\t}", "title": "" }, { "docid": "b3ec0e6c42cb58112bc63af9f014a062", "score": "0.51291203", "text": "public function deleteGroup(Groupe $group) {\n\t\t$instruction = 'DELETE';\n\t\t$parametres = array(':id' => $group->getId());\n\t\t$className = Utilitaires::className($group);\n\t\t$chaineSql = $this->buidRequest($instruction, $parametres, self::TABLE_SQL);\n\t\techo '---DELETE----';\n\t\tvar_dump($chaineSql);\n\n\t\t// $this->ADO($chaineSql, $parametres, $className);\n\t}", "title": "" }, { "docid": "5375c9c8d3cbada0896c362e857aff68", "score": "0.51249844", "text": "public function removeFromGroup($user_id, $group_id, GroupRepository $groupRepository)\n {\n try {\n $user = $this->repository->find($user_id);\n if (!$user)\n return $this->respondError(['message' => 'User not found'], 404);\n\n $group = $groupRepository->find($group_id);\n if (!$group)\n return $this->respondError(['message' => 'Group not found'], 404);\n\n if (!$user->groups->contains($group->id))\n return $this->respondError(['message' => 'User not assigned to this group']);\n\n $user->groups()->detach($group);\n\n return $this->respondSuccess(['message' => 'User removed from group successfully']);\n } catch (\\Exception $exception) {\n return $this->respondError(['message' => $exception->getMessage()]);\n }\n }", "title": "" }, { "docid": "b7ecb2814ab97b1ec658365656cdc711", "score": "0.5117288", "text": "public function removeGroup(\\Sinett\\MLAB\\BuilderBundle\\Entity\\Group $group)\n {\n $this->removeTemplateGroup($group);\n return $this;\n }", "title": "" }, { "docid": "9ddbd9efae506439d42255e85459c942", "score": "0.50981236", "text": "public function actionDeleteGroup()\n\t{\n\t\t$this->requirePostRequest();\n\t\t$this->requireAjaxRequest();\n\n\t\t$groupId = craft()->request->getRequiredPost('id');\n\t\t$success = craft()->fields->deleteGroupById($groupId);\n\n\t\tcraft()->userSession->setNotice(Craft::t('Group deleted.'));\n\n\t\t$this->returnJson(array(\n\t\t\t'success' => $success,\n\t\t));\n\t}", "title": "" } ]
49ab8624f478bab573967300a081db57
Vertically mirror (flip) the image
[ { "docid": "bcb1aabcd459697bd2c7e2528b031a72", "score": "0.6056232", "text": "function __flip(&$tmp) {\r\r\n\t\treturn $tmp->target->flipImage();\r\r\n\t\t}", "title": "" } ]
[ { "docid": "3f1d3c5a4fb419c856d449b2e5b299b8", "score": "0.7206328", "text": "public function verticalFlip()\r\n {\r\n $this->setParam('flip', 1);\r\n return true;\r\n }", "title": "" }, { "docid": "8ba501d220747a1b6de6ece1ed5b6585", "score": "0.675668", "text": "public function flipVertically()\n {\n return $this->add(new FlipVertically());\n }", "title": "" }, { "docid": "e296279579389288aafe47c9182753fb", "score": "0.6756319", "text": "function imageflip($resource, $mode) {\n \n if($mode == IMG_FLIP_VERTICAL || $mode == IMG_FLIP_BOTH)\n $resource = imagerotate($resource, 180, 0);\n \n if($mode == IMG_FLIP_HORIZONTAL || $mode == IMG_FLIP_BOTH)\n $resource = imagerotate($resource, 90, 0);\n \n return $resource;\n \n }", "title": "" }, { "docid": "8b408f278a8b2bd2c7c9a99afc00c290", "score": "0.6668286", "text": "public function mirror():void{\n\t\t$this->bitMatrix->mirror();\n\t}", "title": "" }, { "docid": "cceddf1b0cd4f4ddf2d4624b56600d0c", "score": "0.6533754", "text": "function flip($horizontal)\r\n {\r\n if(!$horizontal) {\r\n $this->rotate(180);\r\n }\r\n\r\n $width = imagesx($this->imageHandle); \r\n $height = imagesy($this->imageHandle); \r\n\r\n for ($j = 0; $j < $height; $j++) { \r\n $left = 0; \r\n $right = $width-1; \r\n\r\n\r\n while ($left < $right) { \r\n //echo \" j:\".$j.\" l:\".$left.\" r:\".$right.\"\\n<br>\";\r\n $t = imagecolorat($this->imageHandle, $left, $j); \r\n imagesetpixel($this->imageHandle, $left, $j, imagecolorat($this->imageHandle, $right, $j)); \r\n imagesetpixel($this->imageHandle, $right, $j, $t); \r\n $left++; $right--; \r\n } \r\n \r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "43921e6826be92402cf94986c132c1fe", "score": "0.6364398", "text": "function flip_pic_by_orient($origpic,$destpic,$orient)\n {\n if ($orient == 'horizon')\n {\n $op = '-flop';\n }\n else if ($orient == 'vertical')\n {\n $op = '-flip';\n }\n else\n {\n $op = '';\n }\n\n if ($op != '')\n {\n $cmdtmb=$this->ImageMagick_DIR.\"/convert \".$op.\" \".$origpic.\" \".$destpic.\" 2>&1\";\n $rettmb=shell_exec($cmdtmb);\n return $rettmb;\n } else {\n return \"orient is not horizon or vertical\";\n }\n\n }", "title": "" }, { "docid": "da52a61efce2449056ace999d057614d", "score": "0.63459575", "text": "public function flip($direction){ }", "title": "" }, { "docid": "b978288fbacda7cc947d954ae110b8a8", "score": "0.62532616", "text": "function __flip(&$tmp) {\n\t\t\n\t\t$t = imageCreateTrueColor($tmp->image_width, $tmp->image_height);\n\t\timageAlphaBlending($t, true);\n\n\t\tfor ($y = 0; $y < $tmp->image_height; ++$y) {\n\t\t\timageCopy(\n\t\t\t\t$t, $tmp->target,\n\t\t\t\t0, $y,\n\t\t\t\t0, $tmp->image_height - $y - 1,\n\t\t\t\t$tmp->image_width, 1\n\t\t\t\t);\n\t\t\t}\n\t\timageAlphaBlending($t, false);\n\n\t\t$this->__destroy_target($tmp);\n\t\t$tmp->target = $t;\n\n\t\treturn true;\n\t\t}", "title": "" }, { "docid": "457f78053ada2a2f76feba651872b8bb", "score": "0.62335974", "text": "function Mirror($horizontally=true){}", "title": "" }, { "docid": "dfa2d1cc855f2d12eb6fa46a73256195", "score": "0.6084318", "text": "public function flipAction() {\n if (!$this->_helper->requireSubject('sesblog_photo')->isValid())\n return;\n\t\t$blog_id = $this->_getParam('blog_id');\n\t\t$blog = Engine_Api::_()->getItem('sesblog_blog', $blog_id);\n if (!$this->_helper->requireAuth()->setAuthParams($blog, null, 'edit')->isValid())\n return;\n if (!$this->getRequest()->isPost()) {\n $this->view->status = false;\n $this->view->error = $this->view->translate('Invalid method');\n return;\n }\n $viewer = Engine_Api::_()->user()->getViewer();\n $photo = Engine_Api::_()->core()->getSubject('sesblog_photo');\n $direction = $this->_getParam('direction');\n if (!in_array($direction, array('vertical', 'horizontal'))) {\n $this->view->status = false;\n $this->view->error = $this->view->translate('Invalid direction');\n return;\n }\n // Get file\n $file = Engine_Api::_()->getItem('storage_file', $photo->file_id);\n if (!($file instanceof Storage_Model_File)) {\n $this->view->status = false;\n $this->view->error = $this->view->translate('Could not retrieve file');\n return;\n }\n // Pull photo to a temporary file\n $tmpFile = $file->temporary();\n // Operate on the file\n $image = Engine_Image::factory();\n $image->open($tmpFile)\n ->flip($direction != 'vertical')\n ->write()\n ->destroy()\n ;\n // Set the photo\n $db = $photo->getTable()->getAdapter();\n $db->beginTransaction();\n try {\n $photo->setPhoto($tmpFile,false,'flip');\n @unlink($tmpFile);\n $db->commit();\n } catch (Exception $e) {\n @unlink($tmpFile);\n $db->rollBack();\n throw $e;\n }\n $this->view->status = true;\n $this->view->href = $photo->getPhotoUrl();\n }", "title": "" }, { "docid": "d8258372f81f2b6586733bfca2784ec3", "score": "0.59807485", "text": "public function flipAction() {\n\n //CHECKING IF THE PHOTO SUBJECT IS THERE OR NOT\n if (!$this->_helper->requireSubject('sitepagenote_photo')->isValid())\n return;\n\n //IF NOT POST OR FORM NOT VALID, RETURN \n if (!$this->getRequest()->isPost()) {\n $this->view->status = false;\n $this->view->error = $this->view->translate('Invalid method');\n return;\n }\n\n //GET PHOTO SUBECJT\n $photo = Engine_Api::_()->core()->getSubject('sitepagenote_photo');\n\n //GET DIRECTION\n $direction = $this->_getParam('direction');\n if (!in_array($direction, array('vertical', 'horizontal'))) {\n $this->view->status = false;\n $this->view->error = $this->view->translate('Invalid direction');\n return;\n }\n\n $file = Engine_Api::_()->getItem('storage_file', $photo->file_id);\n if (!($file instanceof Storage_Model_File)) {\n $this->view->status = false;\n $this->view->error = $this->view->translate('Could not retrieve file');\n return;\n }\n\n $tmpFile = $file->temporary();\n\n $image = Engine_Image::factory();\n $image->open($tmpFile)\n ->flip($direction != 'vertical')\n ->write()\n ->destroy();\n\n //PROCESS\n $db = $photo->getTable()->getAdapter();\n $db->beginTransaction();\n\n try {\n $photo->setPhoto($tmpFile);\n @unlink($tmpFile);\n $db->commit();\n } catch (Exception $e) {\n @unlink($tmpFile);\n $db->rollBack();\n throw $e;\n }\n\n $this->view->status = true;\n $this->view->href = $photo->getPhotoUrl();\n }", "title": "" }, { "docid": "0bbb60f61009533bff24a0417353a4c3", "score": "0.5916777", "text": "public function flip(): Base;", "title": "" }, { "docid": "49cbebe2ed1b6521788db5d5fe88aa1e", "score": "0.5893163", "text": "public function flipImage($axis)\n {\n if (in_array($axis, [self::FLIP_HORIZONTAL, self::FLIP_VERTICAL, self::FLIP_BOTH])) {\n\n $this->driver->flip($axis);\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "fc534524f32d23d42da66b1ab3faefe1", "score": "0.5757758", "text": "public function horizontalFlip()\r\n {\r\n $this->setParam('flop', 1);\r\n return true;\r\n }", "title": "" }, { "docid": "8d770e1e4bcbf13038c21cf9d63d1abf", "score": "0.55664545", "text": "public function flip($mode) {\n $result = clone $this;\n $result->resource = $result->resource->coalesceImages();\n\n foreach ($result->resource as $frame) {\n switch ($mode) {\n case self::MODE_HORIZONTAL:\n $frame->flopImage();\n\n break;\n case self::MODE_VERTICAL:\n $frame->flipImage();\n\n break;\n case self::MODE_BOTH:\n $frame->flopImage();\n $frame->flipImage();\n\n break;\n default:\n throw new ImageException('Could not flip the image: invalid mode provided');\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "685fc1dcf4d1809e339e13261d899fd7", "score": "0.54153836", "text": "public function flipImage($image,$mode=IMG_FLIP_BOTH,$name=''){\n //get image type\n $imagetype = explode('.',$image);\n $type = strtolower(end($imagetype));\n // create image based on type\n switch($type){\n case \"png\":\n $im = imagecreatefrompng ($image);\n break;\n case \"jpg\":\n $im = imagecreatefromjpeg ($image);\n break;\n case \"jpeg\":\n $im = imagecreatefromjpeg ($image);\n break;\n case \"gd2\":\n $im = imagecreatefromgd2 ($image);\n break;\n case \"gif\":\n $im = imagecreatefromgif ($image);\n break;\n default:\n $im = imagecreatefromgd ($image);\n }\n\n // create flip method\n $im2 = imageflip ($im,$mode);\n // create new image based on type\n if($im2 !== FALSE){\n switch($type){\n case \"png\":\n $newImage = imagepng ($im,$name);\n break;\n case \"jpg\":\n $newImage = imagejpeg ($im,$name);\n break;\n case \"jpeg\":\n $newImage = imagejpeg ($im,$name);\n break;\n case \"gd2\":\n $newImage = imagegd2 ($im,$name);\n break;\n case \"gif\":\n $newImage = imagegif ($im,$name);\n break;\n default:\n $newImage = imagegd ($im,$name);\n }\n\n return $newImage;\n }\n imagedestroy ($im);\n }", "title": "" }, { "docid": "b182d38642c44436d42611fb05cb9609", "score": "0.535543", "text": "public function reverse(): void\n\t{\n\t\t$this->vector->reverse();\n\t}", "title": "" }, { "docid": "c2865a3f00341ce2b75a3b311e2931ea", "score": "0.5202879", "text": "protected function _flip(string $direction)\n {\n $angle = $direction === 'horizontal' ? '-flop' : '-flip';\n\n $source = ! empty($this->resource) ? $this->resource : $this->image()->getPathname();\n $destination = $this->getResourcePath();\n\n $action = ' ' . $angle . ' ' . escapeshellarg($source) . ' ' . escapeshellarg($destination);\n\n $this->process($action);\n\n return $this;\n }", "title": "" }, { "docid": "717fb65dd395ec2b29edc78d53513f42", "score": "0.51903695", "text": "public function flip($direction)\n\t{\n\t\tif ($direction !== self::HORIZONTAL AND $direction !== self::VERTICAL)\n\t\t\tthrow new CException('image invalid flip');\n\n\t\t$this->actions['flip'] = $direction;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "60b6e0d85c84a164fe8c1b33f2b46f41", "score": "0.51630104", "text": "public function flip()\n {\n $this->resulsts = array_flip($this->resulsts);\n\n return $this;\n }", "title": "" }, { "docid": "752e317edc1b1cdb8d0759fd5bfc3f62", "score": "0.5162858", "text": "public function reverse();", "title": "" }, { "docid": "8126eda49f9cbf58ee7944b1f4634fd6", "score": "0.51479656", "text": "public function flip(): Stream {\n return $this->bind( array_flip );\n }", "title": "" }, { "docid": "1e9298934edb0c01437688748029d791", "score": "0.509068", "text": "function reverse() {}", "title": "" }, { "docid": "5edbe5a58fab05262ec97e061af82e42", "score": "0.5001267", "text": "function flipn($fe){\n\tfor ($j = 0; $j < count($fe[0]); ++$j){\n\t\t$v = $fe[0][$j];\n\t\tfor ($i = 1; $i < count($fe); ++$i) $o[$v][$i - 1] = $fe[$i][$j];\n\t}\n\treturn $o;\n}", "title": "" }, { "docid": "456aeab25c8f04cbb02728b2febcfdd2", "score": "0.49974278", "text": "public static function mirrorPointV($x=100,$y=100,$y1=100) {\r\n//point($x,$y); line($x1,$y1,$x2,$y2);\r\n$dy=$y1-$y; \r\n$ys=$y1+$dy; $xs=$x;\r\n//point($xs,$ys);\r\nreturn array($xs,$ys);\r\n\t}", "title": "" }, { "docid": "a8e643d7dbc88c3747261a6207dc1273", "score": "0.4984532", "text": "function flipBack(&$cards)\n {\n for ($i = 0; $i < 18; $i++)\n if ($cards[$i] % 11 == 0)\n $cards[$i] /= -11;\n }", "title": "" }, { "docid": "d613dd153212f1453542b5e9c982a0a6", "score": "0.49576333", "text": "function wxMirrorDC(wxDC &$dc, $mirror){}", "title": "" }, { "docid": "559b68dd1e79bc2be9458b887bfe72c5", "score": "0.4925309", "text": "public function flipHorizontally()\n {\n return $this->add(new FlipHorizontally());\n }", "title": "" }, { "docid": "df89edbf4e618748bfc55c7ef546dd77", "score": "0.4846974", "text": "public static function mirrorPointH($x=100,$y=100,$x1=100) {\r\n$dx=$x1-$x; \r\n$xs=$x1+$dx; $ys=$y;\r\nreturn array($xs,$ys);\r\n}", "title": "" }, { "docid": "8cfa3dbb137f7532c0d9358b3adf4211", "score": "0.4846109", "text": "public static function mirrorPoint($x=100,$y=100,$x1=100,$y1=200,$x2=200,$y2=100) {\r\n$arrP=fm::lineLinePerpendicular($x1, $y1, $x2, $y2, $x, $y);\r\n$px=$arrP[2]; $py=$arrP[3];\r\n$dx=$px-$x; $dy=$py-$y;\r\n$xs=$px+$dx; $ys=$py+$dy;\r\nreturn array($xs,$ys);\r\n}", "title": "" }, { "docid": "00de1769cd3ac2719bcbdf937fddd415", "score": "0.4793709", "text": "public function write_invert(){\n echo $this->invert;\n }", "title": "" }, { "docid": "e488f4fbbf8fc2c66ea68c2e780c4fbf", "score": "0.4787995", "text": "public function invert(): self\n {\n return new static(\\array_flip($this->data));\n }", "title": "" }, { "docid": "efb5b2b403f831346362e8ea1167c397", "score": "0.47696328", "text": "function IsVertical(){}", "title": "" }, { "docid": "efb5b2b403f831346362e8ea1167c397", "score": "0.47696328", "text": "function IsVertical(){}", "title": "" }, { "docid": "9bae5e51fedcbab0645525444d8ef674", "score": "0.4729392", "text": "function rotateImage($dir = 'CW')\n {\n\t\t$angle = ($dir == 'CW') ? 90 : -90;\n\n \t\t$this->imageMagickExec .= \" -rotate $angle \";\n\t\t\n\t\t$newWidth = $this->currentDimensions['height'];\n\t \t$newHeight = $this->currentDimensions['width'];\n\t\t$this->currentDimensions['width'] = $newWidth;\n\t\t$this->currentDimensions['height'] = $newHeight;\n\t}", "title": "" }, { "docid": "c7cef3e3d6468151fe19460ea3d035f5", "score": "0.4701895", "text": "function fix_orientation($fileandpath) {\n // Does the file exist to start with?\n if(!file_exists($fileandpath))\n return false;\n \n // Get all the exif data from the file\n $exif = read_exif_data($fileandpath, 'IFD0');\n \n // If we dont get any exif data at all, then we may as well stop now\n if(!$exif || !is_array($exif))\n return false;\n \n // I hate case juggling, so we're using loweercase throughout just in case\n $exif = array_change_key_case($exif, CASE_LOWER);\n \n // If theres no orientation key, then we can give up, the camera hasn't told us the \n // orientation of itself when taking the image, and i'm not writing a script to guess at it!\n if(!array_key_exists('orientation', $exif)) \n return false;\n \n // Gets the GD image resource for loaded image\n $img_res = get_image_resource($fileandpath);\n \n // If it failed to load a resource, give up\n if(is_null($img_res))\n return false;\n \n // The meat of the script really, the orientation is supplied as an integer, \n // so we just rotate/flip it back to the correct orientation based on what we \n // are told it currently is \n switch($exif['orientation']) {\n \n // Standard/Normal Orientation (no need to do anything, we'll return true as in theory, it was successful)\n case 1: return true; break;\n \n // Correct orientation, but flipped on the horizontal axis (might do it at some point in the future)\n case 2: \n $final_img = imageflip($img_res, IMG_FLIP_HORIZONTAL);\n break;\n \n // Upside-Down\n case 3: \n $final_img = imageflip($img_res, IMG_FLIP_VERTICAL);\n break;\n \n // Upside-Down & Flipped along horizontal axis\n case 4: \n $final_img = imageflip($img_res, IMG_FLIP_BOTH);\n break;\n \n // Turned 90 deg to the left and flipped\n case 5: \n $final_img = imagerotate($img_res, -90, 0);\n $final_img = imageflip($img_res, IMG_FLIP_HORIZONTAL);\n break;\n \n // Turned 90 deg to the left\n case 6: \n $final_img = imagerotate($img_res, -90, 0);\n break;\n \n // Turned 90 deg to the right and flipped\n case 7: \n $final_img = imagerotate($img_res, 90, 0);\n $final_img = imageflip($img_res,IMG_FLIP_HORIZONTAL);\n break;\n \n // Turned 90 deg to the right\n case 8: \n $final_img = imagerotate($img_res, 90, 0); \n break;\n \n }\n \n // If theres no final image resource to output for whatever reason, give up\n if(!isset($final_img))\n return false;\n \n //-- rename original (very ugly, could probably be rewritten, but i can't be arsed at this stage)\n $parts = explode(\"/\", $fileandpath);\n $oldname = array_pop($parts);\n $path = implode('/', $parts);\n $oldname_parts = explode(\".\", $oldname);\n $ext = array_pop($oldname_parts);\n $newname = implode('.', $oldname_parts).'.orig.'.$ext;\n \n rename($fileandpath, $path.'/'.$newname);\n \n // Save it and the return the result (true or false)\n $done = save_image_resource($final_img,$fileandpath);\n \n return $done;\n}", "title": "" }, { "docid": "034e307428bd08bf88ec0bb448602054", "score": "0.46868148", "text": "private function getPairListFlipped()\n\t{\n\t\t$pairList = $this->getPairList();\n\t\treturn array_flip($pairList);\n\t}", "title": "" }, { "docid": "3be21481ae2d2671b9e975e1a4d795eb", "score": "0.46466047", "text": "function Rotate180(){}", "title": "" }, { "docid": "bd0bbc2472c3767e3a847d2d6f6aa566", "score": "0.4637897", "text": "public function revise(): void;", "title": "" }, { "docid": "6b69744eba7d1648d594f1f9e1d1340f", "score": "0.46064955", "text": "public function flip()\n {\n return new static(array_flip($this->items));\n }", "title": "" }, { "docid": "3dffd2e3945b6d7ca043776abbb0565c", "score": "0.45997754", "text": "public static function flipMatrix(array $array): array\n {\n $new = [];\n\n foreach ($array as $k => $v) {\n foreach ($v as $k2 => $v2) {\n $new[$v2] = $k;\n }\n }\n\n return $new;\n }", "title": "" }, { "docid": "544d4e91f86ae970e62f17ed9dc484d5", "score": "0.4595502", "text": "public function invert($axis) {\n\t\tif ($this->isHeightless()) {\n\t\t\t\treturn $this;\n\t\t}\n\t\t$interval = $this->interval($axis);\n\t\t$stepDistance = $this->stepUpDistance($axis->step);\n\t\t$newstep = self::stepUp($axis->step, $stepDistance);\n\t\t$this->transpose($interval);\n\t\t$this->transpose($interval);\n\t\t$this->enharmonicizeToStep($newstep);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "8d37fa2cd67b803b43731876abd76740", "score": "0.4577577", "text": "function RotatedImage($file,$x,$y,$w,$h,$angle)\n {\n $this->Rotate($angle,$x,$y);\n $this->Image($file,$x,$y,$w,$h);\n $this->Rotate(0);\n }", "title": "" }, { "docid": "9665b9f1c6808241a89cd133a536ff8c", "score": "0.45534465", "text": "function __flop(&$tmp) {\n\n\t\t$t = imageCreateTrueColor($tmp->image_width, $tmp->image_height);\n\t\timageAlphaBlending($t, true);\n\n\t\tfor ($x = 0; $x < $tmp->image_width; ++$x) {\n\t\t\timageCopy(\n\t\t\t\t$t,\n\t\t\t\t$tmp->target,\n\t\t\t\t$x, 0,\n \t\t$tmp->image_width - $x - 1, 0,\n \t\t1, $tmp->image_height\n \t\t);\n\t\t\t}\n\t\timageAlphaBlending($t, false);\n\n\t\t$this->__destroy_target($tmp);\n\t\t$tmp->target = $t;\n\n\t\treturn true;\n\t\t}", "title": "" }, { "docid": "ca6ea3a549df7446cd7e180b1325cc33", "score": "0.45455605", "text": "function imagetranstowhite($trans) {\n $w = imagesx($trans);\n $h = imagesy($trans);\n $white = imagecreatetruecolor($w, $h);\n\n// Fill the new image with white background\n $bg = imagecolorallocate($white, 255, 255, 255);\n imagefill($white, 0, 0, $bg);\n\n// Copy original transparent image onto the new image\n imagecopy($white, $trans, 0, 0, 0, 0, $w, $h);\n return $white;\n}", "title": "" }, { "docid": "439e9015d9818380d54387454cd25a91", "score": "0.454069", "text": "function swap_channels($img, $c1, $c2){\n\t$width = imagesx($img);\n\t$height = imagesy($img);\n\t$c1 = strtolower($c1);\n\t$c2 = strtolower($c2);\n\n\t$result = imagecreatetruecolor($width, $height);\n\timagesavealpha($result, TRUE);\n\timagealphablending($result, FALSE);\n\n\t$not_alpha = ($c1 !== 'alpha' && $c2 !== 'alpha');\n\n\tfor($x = 0; $x < $width; ++$x){\n\t\tfor($y = 0; $y < $height; ++$y){\n\t\t\t$colour = imagecolorsforindex($img, imagecolorat($img, $x, $y));\n\n\t\t\tif(!$not_alpha)\n\t\t\t\t$colour['alpha'] = round(255 - (255 * ($colour['alpha'] / 127)));\n\n\t\t\t$swap = $colour[$c1];\n\t\t\t$colour[$c1] = $colour[$c2];\n\t\t\t$colour[$c2] = $swap;\n\n\t\t\tif(!$not_alpha)\n\t\t\t\t$alpha = 127 - ((abs($alpha) / 100) * 127);\n\n\n\t\t\t$red = $colour['red'];\n\t\t\t$green = $colour['green'];\n\t\t\t$blue = $colour['blue'];\n\t\t\t$alpha = $colour['alpha'];\n\n\t\t\timagesetpixel($result, $x, $y, imagecolorallocatealpha($result, $red, $green, $blue, $alpha));\n\t\t}\n\t}\n\n\treturn $result;\n}", "title": "" }, { "docid": "65cc37802de6d08d0b2fe807351878e7", "score": "0.4519618", "text": "function auto_orient($origpic,$destpic) {\n\n $cmdtmb = $this->ImageMagick_DIR.\"/convert -auto-orient \" . $origpic . \" \" . $destpic . \" 2>&1\";\n\n $rettmb = shell_exec($cmdtmb);\n return $rettmb;\n }", "title": "" }, { "docid": "f1df85dd5bfd617f93e7935713a6ca8d", "score": "0.44594494", "text": "public static function vertical()\n {\n return self::VERTICAL;\n }", "title": "" }, { "docid": "f90cd991186a3867bd9a45980c415c56", "score": "0.444662", "text": "function flip_(callable $f)\n{\n return fn($a,$b,$c) => $f($b,$a,$c);\n}", "title": "" }, { "docid": "31b51078bc22c55c6a949b73efd6f67d", "score": "0.4435222", "text": "function flip3($fe){\n\twhile (list($k, $zei) = each($fe)) $z1[0][] = $k;\n\t$fe = array_values($fe);\n\tfor ($i = 0; $i < count($fe[0]); ++$i) {\n\t\tfor ($j = 0; $j < count($fe); ++$j) $o[$i][$j] = $fe[$j][$i];\n\t}\n\tarray_unshift($o, $z1[0]);\n\treturn $o;\n}", "title": "" }, { "docid": "474ab679d92fe1b4a32168f761bf1148", "score": "0.44347048", "text": "function ResetTransformMatrix(){}", "title": "" }, { "docid": "caee0dc39bbc34345ad7ae6db5aae771", "score": "0.4423759", "text": "private function autoRotate(): void\n\t{\n\t\ttry {\n\t\t\t$orientation = $this->imImage->getImageOrientation();\n\n\t\t\t$needsFlop = match ($orientation) {\n\t\t\t\t\\Imagick::ORIENTATION_TOPRIGHT, \\Imagick::ORIENTATION_BOTTOMLEFT, \\Imagick::ORIENTATION_LEFTTOP, \\Imagick::ORIENTATION_RIGHTBOTTOM => true,\n\t\t\t\t\\Imagick::ORIENTATION_TOPLEFT, \\Imagick::ORIENTATION_BOTTOMRIGHT, \\Imagick::ORIENTATION_RIGHTTOP, \\Imagick::ORIENTATION_LEFTBOTTOM, \\Imagick::ORIENTATION_UNDEFINED => false\n\t\t\t};\n\n\t\t\t$angle = match ($orientation) {\n\t\t\t\t\\Imagick::ORIENTATION_TOPLEFT, \\Imagick::ORIENTATION_TOPRIGHT, \\Imagick::ORIENTATION_UNDEFINED => 0,\n\t\t\t\t\\Imagick::ORIENTATION_BOTTOMRIGHT, \\Imagick::ORIENTATION_BOTTOMLEFT => 180,\n\t\t\t\t\\Imagick::ORIENTATION_LEFTTOP, \\Imagick::ORIENTATION_LEFTBOTTOM => -90,\n\t\t\t\t\\Imagick::ORIENTATION_RIGHTTOP, \\Imagick::ORIENTATION_RIGHTBOTTOM => 90\n\t\t\t};\n\n\t\t\tif ($needsFlop && !$this->imImage->flopImage()) {\n\t\t\t\tthrow new \\ImagickException('Failed to flop image');\n\t\t\t}\n\n\t\t\tif ($angle !== 0 && !$this->imImage->rotateImage(new \\ImagickPixel(), $angle)) {\n\t\t\t\tthrow new \\ImagickException('Failed to rotate image');\n\t\t\t}\n\n\t\t\tif (!$this->imImage->setImageOrientation(\\Imagick::ORIENTATION_TOPLEFT)) {\n\t\t\t\tthrow new \\ImagickException('Failed to set orientation');\n\t\t\t}\n\t\t} catch (\\ImagickException $exception) {\n\t\t\tthrow new ImageProcessingException('Failed to auto-rotate image', $exception);\n\t\t}\n\t}", "title": "" }, { "docid": "024fe37614434a0cda86906280b799f7", "score": "0.4420377", "text": "public function can_flip( $key ) \n\t\t{\n\t\t\t$shape = $this->get_shapes( $key );\n\t\t\t\n\t\t\tif( false === $shape )\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\treturn isset( $shape['has_flip'] ) && true === $shape['has_flip'];\n\t\t}", "title": "" }, { "docid": "7af61fa848fe808bec7bec2fdd76f6db", "score": "0.4392836", "text": "function my_array_flip( $array )\n{\n\t$flipped = array();\n\n\tforeach ( $array as $key => $value )\n\t{\n\t\t$flipped[ $value ][] = $key;\n\t}\n\n\treturn $flipped;\n}", "title": "" }, { "docid": "0d544748df07157855991c8e69e9bf7f", "score": "0.4386674", "text": "function RotatedImage($file,$x,$y,$w,$h,$angle)\n{\n $this->Rotate($angle,$x,$y);\n $this->Image($file,$x,$y,$w,$h);\n $this->Rotate(0);\n}", "title": "" }, { "docid": "ab0fe5a8d62e0a7ed647eadd91b5f1a7", "score": "0.43666577", "text": "public function getReverseHelmertTransform(): self\n {\n return new HelmertTransform(\n -$this->translationX,\n -$this->translationY,\n -$this->translationZ,\n -$this->rotationX,\n -$this->rotationY,\n -$this->rotationZ,\n -$this->scaleFactor\n );\n }", "title": "" }, { "docid": "1ec196ef9f97fd5e094d69cb0e3e6229", "score": "0.43628702", "text": "public function image_alignment();", "title": "" }, { "docid": "26a389499da69746054404ac448f1229", "score": "0.4355698", "text": "public function flip_properties()\n {\n $properties = get_object_vars($this);\n\n foreach ($properties as $property => $values) {\n if (preg_match('~_(attributes|type)$~', $property)) {\n // this is an attribute or type property, flips the property\n $this->$property = array_flip($values);\n }\n }\n }", "title": "" }, { "docid": "586d7767a85b1fb925d896996e784d46", "score": "0.43474513", "text": "function zhou()\n {\n return 2*($this->width+$this->height);\n }", "title": "" }, { "docid": "d112df4c7d6f051934ca454904b75edc", "score": "0.4346531", "text": "function Rotate90($clockwise=true){}", "title": "" }, { "docid": "deb66771940d4d718d5f126f7f5d92e4", "score": "0.4330568", "text": "function flip(callable $f): callable\n{\n return static function ($a) use ($f) {\n return static fn ($b) => $f($b)($a);\n };\n}", "title": "" }, { "docid": "8bcae6fc889136687f71a90f69140958", "score": "0.43273506", "text": "function image_fix_orientation($filename) {\n\tif (is_file($filename)) {\n\t\t$exif = exif_read_data($filename);\n\n\t\tif (!empty($exif['Orientation'])) {\n\t\t\tswitch ($exif['Orientation']) {\n\t\t\t\tcase 3:\n\t\t\t\t\t$image = imagerotate($filename, 180, 0);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 6:\n\t\t\t\t\t$image = imagerotate($filename, -90, 0);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 8:\n\t\t\t\t\t$image = imagerotate($filename, 90, 0);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// replicate and overwrite image to remove exif data\n\t\t\t$img = imagecreatefromjpeg ($filename);\n\t\t\timagejpeg ($img, $filename, 100);\n\t\t\timagedestroy ($img);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "05f84f21c00e86cadccf0c23e023ae34", "score": "0.4313403", "text": "public function swapSides()\n\t{\n\t\t$tmp = $this->getHeight();\n\t\t$this->setHeight($this->getWidth())\n\t\t\t->setWidth($tmp);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "fcacfb747425cf366c26bd31f6283524", "score": "0.4300049", "text": "public function reverse(): void {\n $current = $this->getHead();\n $prev = null;\n $next = null;\n\n while ($current !== null) {\n $next = $current->getNext();\n $current->setNext($prev);\n $prev = $current;\n $current = $next;\n }\n\n $this->setHead($prev);\n }", "title": "" }, { "docid": "0fcffd8b4943ca0861c618fd1b30bb4a", "score": "0.42956161", "text": "public function vertical($row, $col, $player) {\n\n $lenG = sizeof($this->grid); // tamaño de la matriz\n $count=0; // contador d efichas a pintar \n $inicioCol = $col; // valores de reserva\n $inicioRow = $row; // de columna y fila original\n\n //ARRIBA\n if ($row >= 0 && $col >= 0) { // no se salga de matriz tamaño\n\n if ($player ==1){\n while($row-1 >=0){\n if ($this->grid[$row-1][$col] == 2) { // si la ficha arriba es del rival\n ++$count; // incrementa contador\n }\n if ($this->grid[$row-1][$col] == 1 && $count>0) { // si encuentra pieza de jugador , pero posee piezas intermedias\n while( $row < $inicioRow){ // retrocede hacia atras para marcar el resto de fichas \n $this->grid[$row][$col] = 1; \n $this->crearPiece($row,$col);\n //$this->score(10);\n ++$row; // hasta el origen inicial\n }\n break; //x\n }\n --$row;\n }\n\n }\n if ($player ==2){\n while($row-1 >=0){\n if ($this->grid[$row-1][$col] == 1) { // si la ficha arriba es del rival\n ++$count; // incrementa contador\n }\n if ($this->grid[$row-1][$col] == 2 && $count>0) { // si encuentra pieza de jugador , pero posee piezas intermedias\n while( $row < $inicioRow){ // retrocede hacia atras para marcar el resto de fichas \n $this->grid[$row][$col] = 2; \n $this->crearPiece($row,$col);\n //$this->score(10);\n ++$row; // hasta el origen inicial\n }\n break;\n }\n --$row;\n }\n\n }\n\n }\n $col= $inicioCol; // setaer variables originales\n $row = $inicioRow; // de col y row\n $count =0; // reseteo de contador\n\n //AABAJO\n if ($row <= $lenG - 1 && $col <= $lenG - 1) { // no se salga de matriz tamaño\n\n if ($player ==1){\n while($row + 1 <= $lenG - 1){\n\n if ($this->grid[$row+1][$col] == 2) { // si la ficha arriba es del rival\n ++$count; // incrementa contador\n }\n if ($this->grid[$row+1][$col] == 1 && $count>0) { // si encuentra pieza de jugador , pero posee piezas intermedias\n while( $row > $inicioRow){ // retrocede hacia atras para marcar el resto de fichas \n $this->grid[$row][$col] = 1; \n $this->crearPiece($row,$col);\n //$this->score(10);\n --$row; // hasta el origen inicial\n }\n break; //x\n }\n ++$row;\n }\n\n }\n if ($player ==2){\n while($row + 1 <= $lenG - 1){\n\n if ($this->grid[$row+1][$col] == 1) { // si la ficha arriba es del rival\n ++$count; // incrementa contador\n }\n if ($this->grid[$row+1][$col] == 2 && $count>0) { // si encuentra pieza de jugador , pero posee piezas intermedias\n while( $row > $inicioRow){ // retrocede hacia atras para marcar el resto de fichas \n $this->grid[$row][$col] = 2; \n $this->crearPiece($row,$col);\n //$this->score(10);\n --$row; // hasta el origen inicial\n }\n break; //x\n }\n ++$row;\n }\n\n }\n\n }\n\n }", "title": "" }, { "docid": "5e7385ea7d2154029106c4ce58c73422", "score": "0.42801794", "text": "abstract public function getVertical();", "title": "" }, { "docid": "fd0d4e8c02d66571e68fb210e7f120b5", "score": "0.4270414", "text": "public function isInvert()\n {\n return $this->invert;\n }", "title": "" }, { "docid": "4c96644f44523389454e3cca833a82a3", "score": "0.4267311", "text": "public function flipValence() {\n\t\t$generalValence = $this->generalValence * (-1);\n\t\t$temp = $this->happinessWeight;\n\t\t$this->happinessWeight = max(max($this->sadnessWeight, $this->angerWeight), max($this->fearWeight, $this->disgustWeight));\n\t\t$this->sadnessWeight = $temp;\n\t\t$this->angerWeight = $temp / 2;\n\t\t$this->fearWeight = $temp / 2;\n\t\t$this->disgustWeight = $temp / 2;\n\t}", "title": "" }, { "docid": "74228d3cb77a01a2caf5ec2b9ab69762", "score": "0.42480576", "text": "function SwapColor($image, $originalColor, $color){\n $r = $color[0];\n $g = $color[1];\n $b = $color[2];\n $or = $originalColor[0];\n $og = $originalColor[1];\n $ob = $originalColor[2];\n //Transverse image by each row\n for($x = 0; $x < imagesx($image); $x++){\n for($y = 0; $y < imagesx($image); $y++){\n $pixel = imagecolorat($image, $x, $y);\n $pa = ($pixel & 0x7F000000) >> 24;\n $pr = ($pixel >> 16) & 0xFF;\n $pg = ($pixel >> 8) & 0xFF;\n $pb = $pixel & 0xFF;\n\n //Allocate new color using the alpha of the current pixel\n $newColor = imagecolorallocatealpha($image, $r, $g, $b, $pa);\n if($pr == $or & $pg == $og & $pb == $ob){\n imagesetpixel($image, $x, $y, $newColor);\n }\n }\n }\n }", "title": "" }, { "docid": "ce6b9fb1bd8627839675126a69919ff4", "score": "0.42440695", "text": "function RotatedImage($file,$x,$y,$w,$h,$angle)\n\t{\n\t\t$this->Rotate($angle,$x,$y);\n\t\t$this->Image($file,$x,$y,$w,$h);\n\t\t$this->Rotate(0);\n\t}", "title": "" }, { "docid": "ff21ad6a99daaf4ad1aff3f41b9d9ea0", "score": "0.4237567", "text": "function RightSideImage(){\n\t\t $RightSideImage\t\t= \tnew Imagick($this->$userDp);\n\t\t $RightSideImage \t\t->\tsetImageFormat(\"png\"); \n\t\t $RightSideImage \t\t->\troundCorners(20,20);\n\t\t $RightSideImage \t\t->\tresizeImage(160,200,Imagick::FILTER_LANCZOS,1);\n\t\t $RightSideImage \t\t->\tsetBackgroundColor(new ImagickPixel('transparent')); \n\t\t $RightSideImage\t\t->\twriteImage(\"RightSideImage.png\");\n\t\t \n\t\t $CreateRightSideImage\t= \timagecreatefrompng(\"RightSideImage.png\"); \n\t}", "title": "" }, { "docid": "2fd87b0b1cdc4f1233b8c77637f649bc", "score": "0.42000312", "text": "function Vert($height,$theight,$lheight)\n {\n if($this->vert==\"center\")$ynew=($height/2)-($theight/2)+$lheight;\n if($this->vert==\"top\")$ynew=$lheight+8;\n if($this->vert==\"bottom\")$ynew=$height-$theight+$lheight-8;\n return $ynew;\n }", "title": "" }, { "docid": "d326c85c74937a68b793045cc234578a", "score": "0.41980508", "text": "public function reverseTransform($array)\n {\n return $array[$this->key];\n }", "title": "" }, { "docid": "d50aa6c25535e1d8a9000d12b0f9afeb", "score": "0.41863325", "text": "function autoRotateImage($image) {\n $orientation = $image->getImageOrientation();\n\n switch ($orientation) {\n case imagick::ORIENTATION_BOTTOMRIGHT:\n $image->rotateimage(\"#000\", 180); // rotate 180 degrees \n break;\n\n case imagick::ORIENTATION_RIGHTTOP:\n $image->rotateimage(\"#000\", 90); // rotate 90 degrees CW \n break;\n\n case imagick::ORIENTATION_LEFTBOTTOM:\n $image->rotateimage(\"#000\", -90); // rotate 90 degrees CCW \n break;\n }\n\n // Now that it's auto-rotated, make sure the EXIF data is correct in case the EXIF gets saved with the image! \n $image->setImageOrientation(imagick::ORIENTATION_TOPLEFT);\n}", "title": "" }, { "docid": "28270d2b27b0c4eb4d4ad6bba44a9050", "score": "0.4184424", "text": "public function reverseLabel();", "title": "" }, { "docid": "a402b226465f29e66dc2052de151fddd", "score": "0.41640577", "text": "public function transposition($array,$key){\n\t# one dimensional array \n\t$array_count = count($array);\n\n\t# create new array\n\t$key_array = array\n \t\t(\n \t\t\tarray()\n \t\t);\n\n \t$row_count = 0;\n \t$j = 0; \t\t\n \twhile($j < $array_count){\n\t\tfor($i = 0 ; $i<strlen($key); $i++){\n\t\t\tif($j >= $array_count ){\n\t\t\t\t// medium for gray color :P :P :P \n\t\t\t\t// i have no idea about that color\n\t\t\t\t// hay , we update the value 125 to 0 \n\t\t\t\t// for just black \n\t\t\t\t$key_array[$row_count][$i] = 0;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$key_array[$row_count][$i] = $array[$j];\t\t\t\t\n\t\t\t}\n\t\t\t$j++;\n\t\t\t# no , we don't stop the row \n\t\t\t/*\n\t\t\tif($j == $array_count){\n\t\t\t\t// just stop inner for loop\n\t\t\t\t$i = strlen($key);\n\t\t\t}\n\t\t\t*/\n\t\t}\n\t\t$row_count++;\n\t\t// while loop automatically while $j => array_count\n\t}\n\n\t// so we get key array ( 2 d table)\n\t// sort the key string\n\t$sorted_str = $this->sort_string($key);\n\t$changes = $this->index_changes($key,$sorted_str);\n\t# create new array\n\t$transform_array = array\n \t\t(\n \t\t\tarray()\n \t\t);\n\n\t$array_index = 0 ;\n \t$row_count = 0;\n \t$j = 0;\n\n \twhile($j < $array_count){\n\t\tfor($i = 0 ; $i<strlen($key); $i++){\n\t\t\t# we have to choose which column to insert current colum \n\t\t\t# current column is $i \n\t\t\t$new_column = $changes[$i];\n\t\t\t$transform_array[$row_count][$i] = $key_array[$row_count][$new_column];\n\t\t\t$j++;\n\t\t\tif($j == $array_count){\n\t\t\t\t// just stop inner for loop\n\t\t\t\t$i = strlen($key);\n\t\t\t}\n\t\t}\n\t\t$row_count++;\n\t\t// while loop automatically while $j => array_count\n\t}\n\n\t# so we get transform array ( the sorted table )\n\t# we need to convert to one dimensional array\n\t$transported_array = array();\n\tfor($j = 0 ; $j < $row_count ; $j++){\n\t\t# it's just column count \n\t\tfor($i = 0; $i<count($transform_array[$j]) ; $i++){\n\t\t\t$transported_array[count($transported_array)] = $transform_array[$j][$i];\n\t\t}\n\t}\n\t# finally we get transported one dimensionaal array \n\treturn $transported_array;\n}", "title": "" }, { "docid": "ee2bd28e53710ce0f9c48c09116cf76b", "score": "0.41587484", "text": "function Resort(){}", "title": "" }, { "docid": "ee2bd28e53710ce0f9c48c09116cf76b", "score": "0.41587484", "text": "function Resort(){}", "title": "" }, { "docid": "633ebc3389053f08bbcb223a98235fc2", "score": "0.41443372", "text": "public function verticalAlign($valign_mode = null)\n {\n }", "title": "" }, { "docid": "7285ccf235a115d364363fea061223e3", "score": "0.41191497", "text": "public \tfunction picResize() {\n\t\tlist($width, $height) = getimagesize($this->logo);\n\t\t$side = 250;\n\n\t\t$ratio = $width / $height;\n\t\t\n\t\tif ($ratio < 1) {\n\t\t\t//height is the longer side\n\t\t\t$new_y = $side;\n\t\t\t$new_x = $new_y * ($width / $height);\n\t\t}\n\t\telseif ($ratio > 1) {\n\t\t\t//width is the longer side\n\t\t\t$new_x = $side;\n\t\t\t$new_y = $new_x * ($height / $width);\n\t\t}\n\t\telse {\n\t\t\t//same size (square)\n\t\t\t$new_x = $side;\n\t\t\t$new_y = $side;\n\t\t}\n\t\t\t$this->newWidth = $new_x;\n\t\t\t$this->newHeight = $new_y;\n\t}", "title": "" }, { "docid": "24012f4197ebfef614bebe1ba6cfbe5f", "score": "0.41091767", "text": "public function MirrorL($angle=0, $x=null,$y=null) {\n\t\t$this->Scale(-100, 100, $x, $y);\n\t\t$this->Rotate(-2*($angle-90), $x, $y);\n\t}", "title": "" }, { "docid": "bce5ec8233f113a7e2480de6caf2c0b4", "score": "0.4101992", "text": "public function turnRight()\n {\n }", "title": "" }, { "docid": "67651b0a2a4c67823eae2b823f10987c", "score": "0.40965742", "text": "function RotatedImage($file, $x, $y, $w, $h, $angle) {\n $this->Rotate($angle, $x, $y);\n $this->Image($file, $x, $y, $w, $h);\n $this->Rotate(0);\n }", "title": "" }, { "docid": "b0b708c35e83a027e29dc3288cf4c7e8", "score": "0.40928438", "text": "public function setYInverted($inverted = false)\n {\n $this->ensureY();\n $this->data['y']['inverted'] = $inverted;\n }", "title": "" }, { "docid": "e7ea5c6946f73a4a6c8bed48d83386e2", "score": "0.4085255", "text": "static function reverseStatus($id){\n\t\t$command=Yii::app()->db->createCommand()\n\t\t->select('status')\n\t\t->from('tbl_order')\n\t\t->where('id=:id',array(':id'=>$id))\n\t\t->queryRow();\n\t\tswitch ($command['status']){\n\t\t\tcase self::STATUS_PENDING:\n\t\t\t\t $status=self::STATUS_ACTIVE;\n\t\t\t\t break;\n\t\t\tcase self::STATUS_ACTIVE:\n\t\t\t\t$status=self::STATUS_PENDING;\n\t\t\t\tbreak;\n\t\t}\n\t\t$sql='UPDATE tbl_order SET status = '.$status.' WHERE id = '.$id;\n\t\t$command=Yii::app()->db->createCommand($sql);\n\t\tif($command->execute()) {\n\t\t\tswitch ($status) {\n \t\t\tcase self::STATUS_ACTIVE: \n \t\t\t\t$src=Yii::app()->request->baseUrl.'/images/admin/enable.png';\n \t\t\t\tbreak;\n \t\t\tcase self::STATUS_PENDING:\n \t\t\t\t$src=Yii::app()->request->baseUrl.'/images/admin/disable.png';\n \t\t\t\tbreak;\n \t\t}\t\n\t\t\treturn $src;\n\t\t}\n\t\telse return false;\n\t}", "title": "" }, { "docid": "2e643547fcff2ddf97ba6fd657f94131", "score": "0.4078183", "text": "function fgallery_rotate_by_id($id, $direction) {\n //$path = $_SERVER['DOCUMENT_ROOT']. EXTRA_DIR;\n $image = fgallery_get_image($id);\n $img_path = ABSPATH.$image['img_path'];\n if (FGALLERY_PHP4_MODE){\n $thumb = new Thumbnail($img_path, 0);\n } else {\n $thumb = PhpThumbFactory::create($img_path, array(), false, 0);\n }\n $thumb->rotateImage($direction);\n $thumb->save($img_path);\n if ($image['img_preview_path'] != '') {\n $img_path = ABSPATH.$image['img_preview_path'];\n if (FGALLERY_PHP4_MODE){\n $thumb_prev = new Thumbnail($img_path, 0);\n } else {\n $thumb_prev = PhpThumbFactory::create($img_path, array(), false, 0);\n }\n $thumb_prev->rotateImage($direction);\n $thumb_prev->save($img_path);\n }\n if ($image['img_full_view_path'] != '') {\n $img_path = ABSPATH.$image['img_full_view_path'];\n if (FGALLERY_PHP4_MODE){\n $thumb_full = new Thumbnail($img_path, 0);\n } else {\n $thumb_full = PhpThumbFactory::create($img_path, array(), false, 0);\n }\n $thumb_full->rotateImage($direction);\n $thumb_full->save($img_path);\n }\n}", "title": "" }, { "docid": "2e323a72cb857f4fc749c282161e7a46", "score": "0.40769047", "text": "function reverse($parameters);", "title": "" }, { "docid": "b6f155f9b9feb46c4b6927d080faab9d", "score": "0.4073984", "text": "public function can_invert( $key ) \n\t\t{\n\t\t\t$shape = $this->get_shapes( $key );\n\t\t\t\n\t\t\tif( false === $shape )\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\treturn isset( $shape['has_negative'] ) && true === $shape['has_negative'];\n\t\t}", "title": "" }, { "docid": "5b7ee096392b9470f8e20d0b5a27795e", "score": "0.4067729", "text": "protected function orientate(Image $image)\n {\n return $image->orientate();\n }", "title": "" }, { "docid": "e4139955db7b12989ccdf6198fba6603", "score": "0.40646732", "text": "public function testReverseComperator() {\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "title": "" }, { "docid": "6b168886ea819252fd85c55ebb6bc088", "score": "0.40600932", "text": "public function reverse() {\n $left = 0;\n $right = $this->_size - 1;\n $arr = &$this->_elements;\n while ($left < $right) {\n $temp = $arr[$left];\n $arr[$left] = $arr[$right];\n $arr[$right] = $temp;\n $left++;\n $right--;\n }\n $this->on_change();\n return $this;\n }", "title": "" }, { "docid": "34fb951a4383b9b085030b705bb3baa7", "score": "0.40596744", "text": "protected function invert() {\n if ($this->isPostMethod()) {\n $matrix = $this->matrixFromUnaryOperation();\n\n try {\n $matrix->invert();\n\n $result = array_merge(\n $this->successResponseWithMessage(\"Invert operation is successfully completed.\"),\n array(MatrixAPIConstant::OPERATION_RESULT_KEY => $matrix->getData())\n );\n\n return $result;\n } catch (Exception $exception) {\n return $this->failResponseWithMessage(\"Failed to process the invert operation.\"\n . \" \"\n . $exception->getMessage()\n . \".\");\n }\n } else {\n return $this->sendWrongMethodResponse();\n }\n }", "title": "" }, { "docid": "d897c29b708463ebff7b7443f34ed342", "score": "0.4055174", "text": "function RGBAImageSetHeight($height){}", "title": "" }, { "docid": "fcc88f12f81d430ac99d4f2079fa76c1", "score": "0.40452394", "text": "public function setY2Inverted($inverted = false)\n {\n $this->ensureY2();\n $this->data['y2']['inverted'] = $inverted;\n }", "title": "" }, { "docid": "ca9dda4800a70d684e5bebb282b396a9", "score": "0.40303606", "text": "public function displayReverse()\n {\n $temp = $this->tail;\n while ($temp != null) {\n echo $temp->data . \" \";\n $temp = $temp->prev;\n }\n }", "title": "" }, { "docid": "e1a747ef4431514b3724e2586fcc8770", "score": "0.40191972", "text": "public function Binaryzation($image, $width, $height)\r\n\t{\r\n\t\tfor ($i = 0; $i < $width; $i++)\r\n\t\t{\r\n\t\t\tfor ($j = 0; $j < $height; $j++)\r\n\t\t\t{\r\n\t\t\t\t$rgb = imagecolorat($image, $i, $j);\r\n\t\t\t\t$r = ($rgb >> 16) & 0xFF;\r\n\t\t\t\t$g = ($rgb >> 8) & 0xFF;\r\n\t\t\t\t$b = $rgb & 0xFF;\r\n\t\t\t\t//echo(\"$i,$j=>$r,$g,$b<br/>\");\r\n\t\t\t\tif ($r < 170 || $g < 170 || $b < 170)\r\n\t\t\t\t{\r\n\t\t\t\t\t$color = imagecolorallocate($image, 0, 0, 0);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$color = imagecolorallocate($image, 255, 255, 255);\r\n\t\t\t\t}\r\n\r\n\t\t\t\timagesetpixel($image, $i, $j, $color);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $image;\r\n\t}", "title": "" }, { "docid": "213d5811b924660cec6d31fd66339cee", "score": "0.40174064", "text": "public function flip(): Collection\n\t{\n\t\treturn new static(array_flip($this->items));\n\t}", "title": "" }, { "docid": "cec0a89c7131ed763da9882e317d6c3d", "score": "0.40156525", "text": "public function transformImage($oldimage)\r\n\t{\r\n\t\t$old_width = imagesx($oldimage);\r\n\t\t$old_height = imagesy($oldimage);\r\n\t\t\r\n\t\tif ($old_width > $old_height) \r\n\t\t{\r\n\t\t\t$new_width = $this->width;\r\n\t\t\t$new_height = floor($old_height * ($this->width / $old_width));\r\n } \r\n else if ($old_width < $old_height) \r\n {\r\n\t\t\t$new_height = $this->height;\r\n\t\t\t$new_width = floor($old_width * ($this->height / $old_height));\r\n } \r\n else \r\n {\r\n\t\t\t$new_height = $this->height;\r\n\t\t\t$new_width = $this->width;\r\n }\r\n \r\n $newimg = $this->createResource($new_width, $new_height);\r\n \r\n\t\timagecopyresampled($newimg, $oldimage, 0, 0, 0, 0, $new_width, $new_height, $old_width, $old_height);\r\n\t\t\r\n\t\timagedestroy($oldimage);\r\n\t\t\r\n\t\treturn $newimg;\r\n\t}", "title": "" }, { "docid": "670d2acb85c840a48b03c9d9d3b2616f", "score": "0.4015162", "text": "public function isVertical()\r\n {\r\n return ($this->isNorth() || $this->isSouth());\r\n }", "title": "" }, { "docid": "f2a32793eb37d534ad2a5f5f9f259f82", "score": "0.4010981", "text": "public function inverse(Matrix $matrix)\n {\n\t$newmatrix = $this->adjoint($matrix);\n $mutliply = (1 / $this->determinant($newmatrix));\n\n return $this->scalarMultiply($newmatrix,$mutliply);\n }", "title": "" } ]
5bf4eb8921e4cce6ba58ea62c54615a6
Actualiza los datos de un usuario en funcion de su niu y tipo usuario
[ { "docid": "99364e582359ea58880cc3ed1625bd99", "score": "0.6149872", "text": "public static function updateStudentByNiu($conn, $niu, $nombre, $apellido, $telefono, $email, $id_tipo_usuario){\n $student = null;\n \n if(isset($conn)){\n try{\n include_once '../entities/User.inc.php';\n $sql = \"UPDATE usuarios SET nombre=:nombre, apellido=:apellido, email=:email, telefono=:telefono WHERE niu = :niu AND id_tipo_usuario=:id_tipo_usuario\";\n $stmt = $conn -> prepare($sql);\n $stmt ->bindParam(':niu', $niu, PDO::PARAM_STR);\n $stmt ->bindParam(':nombre', $nombre, PDO::PARAM_STR);\n $stmt ->bindParam(':apellido', $apellido, PDO::PARAM_STR);\n $stmt ->bindParam(':email', $email, PDO::PARAM_STR);\n $stmt ->bindParam(':telefono', $telefono, PDO::PARAM_STR);\n $stmt ->bindParam(':id_tipo_usuario', $id_tipo_usuario, PDO::PARAM_STR);\n $stmt -> execute();\n \n }catch (PDOException $ex){\n echo \"<div class='container'>ERROR\". $ex->getMessage().\"</div><br>\";\n }\n }\n \n \n }", "title": "" } ]
[ { "docid": "1c01765c5df10051e8e99cc3af8a9f77", "score": "0.71565145", "text": "public function actualizar_usuario_controlador()\n {\n //Recibiendo el id \n $id = mainModel2::decryption($_POST['usu_id_up']);\n $id = mainModel2::limpiar_cadena($id);\n\n //comprobar el usuarioen la bd\n $check_user = mainModel2::ejecutar_consulta_simple(\"SELECT * FROM tbl_usuarios WHERE usuario_id=$id\");\n if ($check_user->rowCount() <= 0) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO HEMOS ENCONTRADO EL USUARIO EN EL SISTEMA\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n } else {\n $campos = $check_user->fetch();\n }\n\n $rol = mainModel2::limpiar_cadena($_POST['usu_rol_up']);\n $nombres = strtoupper(mainModel2::limpiar_cadena($_POST['usu_nombres_up']));\n $apellidos = strtoupper(mainModel2::limpiar_cadena($_POST['usu_apellidos_up']));\n $dni = mainModel2::limpiar_cadena($_POST['usu_identidad_up']);\n $puesto = mainModel2::limpiar_cadena($_POST['usu_puesto_up']);\n \n $unidad = mainModel2::limpiar_cadena($_POST['usu_unidad_up']);\n $celular = mainModel2::limpiar_cadena($_POST['usu_celular_up']);\n $usuario = strtolower(mainModel2::limpiar_cadena($_POST['usu_usuario_up']));\n $email = $usuario . '@didadpol.gob.hn';\n\n $estado = mainModel2::limpiar_cadena($_POST['usu_estado_up']);\n /*verificando datos vacios*/\n if ($nombres == \"\" || $apellidos == \"\" || $usuario == \"\" || $email == \"\" || $rol == \"\" || $estado == \"\" || $dni == \"\" || $puesto == \"\") {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO HAS COMPLETADO TODOS LOS CAMPOS QUE SON OBLIGATORIOS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if (mainModel2::verificar_datos(\"[A-ZÁÉÍÓÚáéíóúñÑ ]{3,35}\", $nombres)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO NOMBRES SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 3 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if (mainModel2::verificar_datos(\"[A-ZÁÉÍÓÚáéíóúñÑ ]{3,35}\", $apellidos)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO APELLIDOS SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 3 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if ($celular != \"\") {\n if (mainModel2::verificar_datos(\"[0-9]{8}\", $celular)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CELULAR NO COINCIDE CON EL FORMATO SOLICITADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n }\n\n if (mainModel2::verificar_datos(\"[a-z]{3,15}\", $usuario)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL CAMPO NOMBRE DE USUARIO SOLO DEBE INCLUIR LETRAS Y DEBE TENER UN MÍNIMO DE 5 Y UN MAXIMO DE 15 LETRAS\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n if (mainModel2::verificar_datos(\"[0-9]{13}\", $dni)) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL DNI NO COINCIDE CON EL FORMATO SOLICITADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n /*validar DNI*/\n if ($dni != $campos['identidad']) {\n $check_dni = mainModel2::ejecutar_consulta_simple(\"SELECT identidad FROM tbl_usuarios WHERE identidad='$dni'\");\n if ($check_dni->rowCount() > 0) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL DNI YA ESTÁ REGISTRADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n }\n /*validar usuario*/\n if ($usuario != $campos['nom_usuario']) {\n $check_user = mainModel2::ejecutar_consulta_simple(\"SELECT nom_usuario FROM tbl_usuarios WHERE nom_usuario='$usuario'\");\n if ($check_user->rowCount() > 0) {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"EL USUARIO YA ESTÁ REGISTRADO\",\n \"Tipo\" => \"error\"\n ];\n echo json_encode($alerta);\n exit();\n }\n }\n \n\n $datos_usuario_up = [\n \"rol\" => $rol,\n \"puesto\" => $puesto,\n \"unidad\" => $unidad,\n \"usuario\" => $usuario,\n \"nombres\" => $nombres,\n \"apellidos\" => $apellidos,\n \"dni\" => $dni,\n \"estado\" => $estado,\n \"email\" => $email,\n \"celular\" => $celular,\n \"id\" => $id\n ];\n\n if (usuarioModelo2::actualizar_usuario_modelo($datos_usuario_up)) {\n $alerta = [\n \"Alerta\" => \"recargar\",\n \"Titulo\" => \"ACTUALIZADO CON ÉXITO\",\n \"Texto\" => \"LOS DATOS SE ACTUALIZARON CON ÉXITO\",\n \"Tipo\" => \"success\"\n ];\n } else {\n $alerta = [\n \"Alerta\" => \"simple\",\n \"Titulo\" => \"OCURRIÓ UN ERROR INESPERADO\",\n \"Texto\" => \"NO SE HA PODIDO ACTUALIZAR LOS DATOS\",\n \"Tipo\" => \"error\"\n ];\n }\n echo json_encode($alerta);\n }", "title": "" }, { "docid": "7f51dbd5cb16abe9dd6a41d6e02a3b4a", "score": "0.706858", "text": "final public function update_peril_usuario() {\n try {\n global $http;\n\n $id_user = $http->request->get('id_user');\n\n $this->db->query(\"Delete from tblperfilesuser\n WHERE id_user='$id_user';\");\n\n $p = $this->getAllMenu();\n foreach ($p as $value => $data) {\n\n $a = $http->request->get('check-'.$data['id_menu'].'-'.$data['id_submenu']);\n if (true == $a){\n $id_menu = $data['id_menu'];\n $id_submenu = $data['id_submenu'];\n $this->db->query(\"Insert tblperfilesuser(id_user,id_menu,id_submenu) value($id_user,$id_menu,$id_submenu);\");\n }\n\n }\n\n $this->db->update('users',array(\n 'perfil' => 'DEFINIDO'\n ),\"id_user='$id_user'\",'LIMIT 1');\n\n return array('success' => 1, 'message' => 'Registrado con éxito.');\n } catch (ModelsException $e) {\n return array('success' => 0, 'message' => $e->getMessage());\n }\n }", "title": "" }, { "docid": "7461cd2b26a20e767c3b82cf224e6d99", "score": "0.7009791", "text": "public function misdatos_usuario() {\n\n\t\t$espass = $this -> input -> post(\"change_pass\");\n\t\t$esuser = $this -> input -> post(\"change_user\");\n\n\t\t$idu = $_SESSION[\"idu\"];\n\n\t\tif ($_SESSION[\"uva\"] == 1 || $_SESSION[\"uva\"] == 0) {\n\t\t\t// Si quiere cambiar el password\n\t\t\tif ($espass==1) {\n\t\t\t\t$password = $this -> input -> post(\"password\");\n\t\t\t\t$this -> usuarios_model -> cambia_campo(\"password\", $password, $idu);\n\n\t\t\t\t// Recuperamos los datos del usuario para el correo\n\t\t\t\t$datos[\"datos_usuario\"] = $this -> usuarios_model -> devuelve_datos_usuario_id($idu);\n\n\t\t\t\t$this -> load -> view(\"cabecera\");\n\t\t\t\t$this -> load -> view(\"mis/misdatos_ok\");\n\t\t\t\t$this -> load -> view(\"footer\");\n\t\t\t}\n\n\t\t\t// Si quiere cambiar datos del usuarios\n\t\t\tif ($esuser==1) {\n\t\t\t\t$nombre = $this -> input -> post(\"nombre\");\n\t\t\t\t$this -> usuarios_model -> cambia_campo(\"nombre\", $nombre, $idu);\n\t\t\t\t$apellidos = $this -> input -> post(\"apellidos\");\n\t\t\t\t$this -> usuarios_model -> cambia_campo(\"apellidos\", $apellidos, $idu);\n\t\t\t\t$direccion = $this -> input -> post(\"direccion\");\n\t\t\t\t$this -> usuarios_model -> cambia_campo(\"direccion\", $direccion, $idu);\n\t\t\t\t$tlf = $this -> input -> post(\"tel\");\n\t\t\t\t$this -> usuarios_model -> cambia_campo(\"tlf\", $tlf, $idu);\n\t\t\t\t$email = $this -> input -> post(\"email\");\n\t\t\t\t$this -> usuarios_model -> cambia_campo(\"email\", $email, $idu);\n\t\t\t\t$dni = strtoupper($this -> input -> post(\"dni\"));\n\t\t\t\t$this -> usuarios_model -> cambia_campo(\"dni\", $dni, $idu);\n\n\t\t\t\t// Recuperamos los datos del usuario para el correo\n\t\t\t\t$datos[\"datos_usuario\"] = $this -> usuarios_model -> devuelve_datos_usuario_id($idu);\n\n\t\t\t\t$this -> load -> view(\"cabecera\");\n\t\t\t\t$this -> load -> view(\"mis/misdatos_ok\", $datos);\n\t\t\t\t$this -> load -> view(\"footer\");\n\t\t\t}\n\n\t\t} else {\n\t\t\t// Error\n\t\t\theader(\"location:\".base_url().\"index.php/principal/error\");\n\t\t}\n\t}", "title": "" }, { "docid": "736ade26d0155f6210c46736494a1819", "score": "0.6899922", "text": "public function actualizar($usuario){\n $con_db = Conexion::conectar();\n $actualizar = $con_db->prepare('UPDATE usuarios SET codigo=:codigo , nombres=:nombres, apellidos=:apellidos, telefono=:telefono, puesto=:puesto, correo=:correo, contrasena=:contrasena WHERE codigo=:codigo');\n $actualizar->bindValue('codigo', $usuario->getCodigo());\n $actualizar->bindValue('nombres', $usuario->getNombre());\n $actualizar->bindValue('apellidos', $usuario->getApellido());\n $actualizar->bindValue('telefono', $usuario->getTelefono());\n $actualizar->bindValue('puesto', $usuario->getPuesto());\n $actualizar->bindValue('correo', $usuario->getCorreo());\n $actualizar->bindValue('contrasena', $usuario->getContrasena());\n //ejecutamos la consulta\n $actualizar->execute();\n }", "title": "" }, { "docid": "2e6284dc1100433fd07b5a9023730cc9", "score": "0.68979603", "text": "private function alteraUsuario() {\n $this->discenteModel = $this->usuarioView->recebeDadosDaEntrada();\n\n //II - validar dados\n //III - se dados ok então continua\n // senão mensagem de erro e sai\n if (is_null($this->discenteModel->getDsceCpf()) || trim($this->discenteModel->getDsceCpf()) == '') {\n $this->usuarioView->addMensagem(\"Você deve informar o cpf\");\n return;\n }\n //IV - buscar dados do discente no BD\n\n $alterou = $this->discenteModel->alteraObjeto();\n //V - se incluiu então mensagem de ok\n // senão mensagem de erro\n if ($alterou) {\n $this->usuarioView->addMensagem(\"Alteração bem sucedida!\");\n $this->discenteModel = new DiscenteModel();\n } else {\n $this->usuarioView->addMensagem(\"Alteração mal sucedida! Contate o responsável.\");\n }\n }", "title": "" }, { "docid": "9ac9470640b87f78bc73ff3655625f4a", "score": "0.68832374", "text": "function atualizarUsuario()\n {\n $pf = new PessoaFisica();\n\n \n // t_endereco \n $pf->__set('cep', $_POST['n_cep_editado']);\n $pf->__set('logradouro', $_POST['n_logradouro_editado']);\n $pf->__set('numeroF', $_POST['n_numero_editado']);\n $pf->__set('complemento', $_POST['n_complemento_editado']);\n $pf->__set('endereco', $_POST['n_logradouro_editado']);\n $pf->__set('bairroF', $_POST['n_bairro_editado']);\n $pf->__set('cidadeF', $_POST['n_cidade_editado']);\n $pf->__set('estado', $_POST['n_estado_editado']);\n $pf->__set('idtEndereco', $_POST['n_idtEndereco_editado']);\n\n // pessoa fisica\n $pf->__set('categoria', $_POST['n_categoria_editado']);\n $pf->__set('cpf', $_POST['n_cpf_editado']);\n $pf->__set('sexo', $_POST['n_sexo_editado']);\n $pf->__set('nascimento', $_POST['n_nascimento_editado']);\n $pf->__set('idtPF', $_POST['n_idtPF_editado']);\n $pf->__set('fkIdtEndereco', $_POST['n_fkEndereco_editado']);\n\n // t_pessoa\n $pf->__set('nome', $_POST['n_nome_editado']);\n $pf->__set('email', $_POST['n_email_editado']);\n $pf->__set('telefoneF', $_POST['n_telefone_editado']);\n $pf->__set('idtPessoa', $_POST['n_idtPessoa_editado']);\n $pf->__set('fkIdtPessoa', $_POST['n_fkIdtPessoa_editado']);\n \n \n if($_FILES['imagem']['error'] == 4) {\n $arquivo = str_replace(\"../\", \"\", $_POST['manterImg']);\n $arquivo = $arquivo;\n \n } else {\n $arquivo = $this->caminhoImagem($_FILES);\n \n }\n \n $pf->__set('arquivo', $arquivo);\n \n // setta os valores \n $resultado = $pf->atualizarM($pf);\n if($resultado) {\n header('location: /view/pessoas/listar?atualizar=sucesso');\n } else {\n header('location: /view/pessoas/listar?atualizar=erro');\n }\n\n }", "title": "" }, { "docid": "7629dcb553581185da44918fe3869c6c", "score": "0.6880532", "text": "public function set($user_data = array()) { \n if (sizeof($this->get($user_data['usuario'])) == 1) {\n $this->mensaje = 'El usuario ya existe';\n return;\n }else {\n $this->query = \"INSERT INTO usuarios\n (nombre, usuario, passwd, perfil)\n VALUES\n (:nombre, :usuario, :passwd, :perfil)\";\n $this->parametros['nombre'] = $user_data[\"nombre\"];\n $this->parametros['usuario'] = $user_data[\"usuario\"];\n $this->parametros['passwd'] = $user_data[\"passwd\"];\n $this->parametros['perfil'] = \"rol1\";\n $this->get_results_from_query();\n $this->close_connection();\n $this->mensaje = 'Usuario agregado exitosamente';\n }\n }", "title": "" }, { "docid": "aedbfa4106f19efbbb350f475b183e25", "score": "0.6873317", "text": "public function actualizarUsuario(Usuario $user)\n {\n $usuarioDB = $this->obtenerUsuarioPorDni($user->getDni());\n\n if($usuarioDB)\n {\n $query = \"UPDATE $this->tabla_db1 SET\n Nombre = '$user->nombre',\n Direccion = '$user->direccion',\n Telefono = '$user->telefono'\n WHERE DNI ='{$user->getDni()}'\";\n \n $exito = mysqli_query($this->conexion, $query);\n\n if($exito){\n echo \"Se actualizo correctamente el usuario<br>\";\n }\n else{\n echo \"Hubo un error al actualizar el usuario: \".mysqli_error($this->conexion);\n }\n }\n }", "title": "" }, { "docid": "d3a3ab1deb48899755194448443dcb24", "score": "0.68441856", "text": "public static function editarUsuario($idUsuario, $nombreUsuario, $correoUsuario, $phoneUsuario, $ocupacionUsuario, $rolUsuario, $estatusUsuario, $contraseniaUsuario)\n {\n try {\n $preguntarSiExiste =\n \"SELECT *FROM users WHERE `user_id` = '\" . $idUsuario . \"'\";\n $stmt = Connection::connect()->prepare($preguntarSiExiste);\n $stmt->execute();\n $contador = $stmt->fetchAll();\n if (count($contador) != 0) {\n $editarUsuario = \"\";\n if ($contraseniaUsuario != \"\" && $contraseniaUsuario != null) {\n $passwordUsuario = password_hash($contraseniaUsuario, PASSWORD_DEFAULT);\n $editarUsuario =\n \"UPDATE users\n SET\n `user_name` = '\" . $nombreUsuario . \"',\n `user_password_hash` = '\" . $passwordUsuario . \"',\n `user_email` = '\" . $correoUsuario . \"',\n `user_phone` = '\" . $phoneUsuario . \"',\n `user_tipe` = '\" . $rolUsuario . \"',\n `user_status` = '\" . $estatusUsuario . \"',\n `user_dirge` = '\" . $ocupacionUsuario . \"'\n WHERE `user_id` = '\" . $idUsuario . \"'\";\n } else {\n $editarUsuario =\n \"UPDATE users\n SET\n `user_name` = '\" . $nombreUsuario . \"',\n `user_email` = '\" . $correoUsuario . \"',\n `user_phone` = '\" . $phoneUsuario . \"',\n `user_tipe` = '\" . $rolUsuario . \"',\n `user_status` = '\" . $estatusUsuario . \"',\n `user_dirge` = '\" . $ocupacionUsuario . \"'\n WHERE `user_id` = '\" . $idUsuario . \"'\";\n }\n $stmt = Connection::connect()->prepare($editarUsuario);\n if ($stmt->execute()) {\n return [\"success\", \"Usuario actualizado !\"];\n } else {\n return [\"error\", \"Imposible actualizar usuario !\"];\n }\n } else {\n return [\"error\", \"El usuario no existe !\"];\n }\n } catch (Exception $e) {\n return [\"warn\", \"Error en el servidor ! \" . $e];\n }\n }", "title": "" }, { "docid": "043b264b56f66dde4a8a2847ef28ffea", "score": "0.68303126", "text": "function actualizarUsuario() {\n\n extract($_POST);\n $arrayData = array();\n $arrayData[0] = $cedula;\n $arrayData[1] = $correo;\n $arrayData[2] = $usuario;\n\n $this->Pgsql->SELECTPLSQL('modificar_usuario_cedula', $arrayData);\n }", "title": "" }, { "docid": "fa93086366890117002a9dc50b7af0e8", "score": "0.6820725", "text": "public function actualizarRolUsuario()\n {\n\n $emailUsuario = $_POST['usrEmail'];\n $rolUsuario = $_POST['rolUsuario'];\n\n App::get('database')->updateOne('usuario', ['rol' => $rolUsuario], ['email' => $emailUsuario]);\n\n $this->listarUsuarios();\n\n }", "title": "" }, { "docid": "53aa8f6d4abbe09a77005e6c74654596", "score": "0.67728394", "text": "private function usrsave() {\r\n $id = 0;\r\n $resultado = 0;\r\n $pass = '';\r\n if ($this->UTILITY->validate_email($this->email)) {\r\n $arrjson = $this->UTILITY->error_wrong_email();\r\n } else {\r\n if ($this->id > 0) {\r\n //se verifica que el email está disponible\r\n $q = \"SELECT usr_id FROM dhc_usuario WHERE usr_email = '\" . $this->email . \"' AND usr_id != $this->id \";\r\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\r\n $resultado = mysql_num_rows($con);\r\n if ($resultado == 0) {\r\n //actualiza la informacion\r\n $q = \"SELECT usr_id FROM dhc_usuario WHERE usr_id = \" . $this->id;\r\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\r\n while ($obj = mysql_fetch_object($con)) {\r\n $id = $obj->usr_id;\r\n if (strlen($this->pass) > 2) {\r\n $pass = $this->UTILITY->make_hash_pass($this->email, $this->pass);\r\n }\r\n $table = \"dhc_usuario\";\r\n $arrfieldscomma = array(\r\n 'usr_nombre' => $this->nombre,\r\n 'usr_apellido' => $this->apellido,\r\n 'usr_email' => $this->email,\r\n 'usr_pass' => $pass,\r\n 'usr_cargo' => $this->cargo,\r\n 'usr_identificacion' => $this->identificacion,\r\n 'usr_celular' => $this->celular,\r\n 'usr_telefono' => $this->telefono,\r\n 'usr_pais' => $this->pais,\r\n 'usr_departamento' => $this->departamento,\r\n 'usr_ciudad' => $this->ciudad,\r\n 'usr_direccion' => $this->direccion);\r\n $arrfieldsnocomma = array('dhc_institucion_ins_id' => $this->idins,'usr_dtcreate' => $this->UTILITY->date_now_server(), 'usr_habilitado' => $this->habilitado);\r\n $q = $this->UTILITY->make_query_update($table, \"usr_id = '$id'\", $arrfieldscomma, $arrfieldsnocomma);\r\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\r\n $arrjson = array('output' => array('valid' => true, 'id' => $id));\r\n }\r\n } else {\r\n $arrjson = $this->UTILITY->error_user_already_exist();\r\n }\r\n } else {\r\n //se verifica que el email está disponible\r\n $q = \"SELECT usr_id FROM dhc_usuario WHERE usr_email = '\" . $this->email . \"'\";\r\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\r\n $resultado = mysql_num_rows($con);\r\n if ($resultado == 0) {\r\n if (strlen($this->pass) > 2) {\r\n $pass = $this->UTILITY->make_hash_pass($this->email, $this->pass);\r\n }\r\n $this->pass = $pass;\r\n $q = \"INSERT INTO dhc_usuario (usr_dtcreate, dhc_institucion_ins_id, usr_habilitado, usr_nombre, usr_apellido, usr_cargo, usr_email, usr_pass, usr_identificacion, usr_celular, usr_telefono, usr_pais, usr_departamento, usr_ciudad, usr_direccion) VALUES (\" . $this->UTILITY->date_now_server() . \", $this->idins, $this->habilitado, '$this->nombre', '$this->apellido', '$this->cargo', '$this->email', '$this->pass', '$this->identificacion', '$this->celular', '$this->telefono', '$this->pais', '$this->departamento', '$this->ciudad', '$this->direccion')\";\r\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\r\n $id = mysql_insert_id();\r\n $arrjson = array('output' => array('valid' => true, 'id' => $id));\r\n } else {\r\n $arrjson = $this->UTILITY->error_user_already_exist();\r\n }\r\n }\r\n }\r\n $this->response = ($arrjson);\r\n }", "title": "" }, { "docid": "27c27b6c8d8237a5875a6ed0376af049", "score": "0.67587316", "text": "static public function mdlEditarUsuario($tabla,$datos){\n //estructura PDO de php para REGISTRAR un usuario \n $stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET nombre = :nombre,\n password = :password, perfil = :perfil, foto = :foto WHERE usuario = :usuario\");\n\n $stmt->bindParam(\":nombre\", $datos[\"nombre\"], PDO::PARAM_STR);\n $stmt->bindParam(\":usuario\", $datos[\"usuario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":password\", $datos[\"password\"], PDO::PARAM_STR);\n $stmt->bindParam(\":perfil\", $datos[\"perfil\"], PDO::PARAM_STR);\n $stmt->bindParam(\":foto\", $datos[\"ruta\"], PDO::PARAM_STR);\n\n if ($stmt->execute()) {\n return \"ok\";\n }else {\n return \"error\";\n }\n $stmt -> close();\n\n $stmt -> null;\n\n }", "title": "" }, { "docid": "e0ca1276bb4f02977f5314a35d4d9783", "score": "0.6732593", "text": "public function actualizar_usuario($data,$data2,$data3,$data4,$data5,$data6,$data7)\n {\n $query = $this->db->query(\"\n UPDATE\n usuario\n SET\n nombres = '$data2',\n apellidos = '$data3',\n rol = '$data4',\n num_contacto = '$data5',\n email = '$data6',\n contrasena = '$data7'\n WHERE\n id_usuario = '$data'\n \");\n }", "title": "" }, { "docid": "e2ce02c774ca202fe4b4d17b1a53f68d", "score": "0.6728653", "text": "public function userEdit()\n {\n require_once 'models/UsersModel.php';\n require_once 'vo/UserVO.php';\n\n $session = FR_Session::singleton();\n $model = new UsersModel();\n $user = new UserVO();\n $id_user = filter_input(INPUT_POST, 'id_user');\n $user->setIdUser($id_user);\n $pdoUser = $model->getUserById($user);\n $dataUser = $pdoUser->fetch(PDO::FETCH_ASSOC);\n $user->setCodeUser($dataUser['code_user']);\n $user->setIdTenant($dataUser['id_tenant']);\n $user->setNameUser(filter_input(INPUT_POST, 'name_user'));\n $user->setIdProfile(filter_input(INPUT_POST, 'cboprofiles')) ;\n //$user->setPasswordUser($dataUser[password_user]);\n $user->setPasswordUser('');\n //$pass1 = filter_input(INPUT_TYPE, 'pass_user_1');\n //$pass2 = filter_input(INPUT_TYPE, 'pass_user_2');\n $pass1 = $_POST['pass_user_1'];\n $pass2 = $_POST['pass_user_2'];\n\n /* Obtiene nombre de usuario original para comparar al momento de validar si nombre de\n usuario existe o no */\n $original_name_user = filter_input(INPUT_POST, 'original_name_user');\n\n\n if($original_name_user != $user->getNameUser())\n {\n $result_val= $model->getBoolUsername($user);\n $boolean_name_user = $result_val->fetch(PDO::FETCH_ASSOC);\n $boolean_name_user_result = $boolean_name_user['result'];\n }\n else\n {\n $boolean_name_user_result = 'false';\n }\n\n\n\n //if(isset($_POST['pass_user_1']) && isset($_POST['pass_user_2']))\n if($pass1 !='' && $pass2 !='')\n {\n if($pass1 == $pass2)\n {\n $user->setPasswordUser($pass1);\n $validacion = $this->validarDatosUsuario($user, 'normal', $boolean_name_user_result);\n }\n else\n {\n $user->setPasswordUser('');\n $validacion = $this->validarDatosUsuario($user, 'distintos', $boolean_name_user_result);\n }\n }\n else if ($pass1 =='' && $pass2 =='')\n {\n $user->setPasswordUser($dataUser['password_user']);\n $validacion = $this->validarDatosUsuario($user, 'md5', $boolean_name_user_result);\n }\n\n if($validacion[\"estado\"] == true )\n {\n if($pass1 == $user->getPasswordUser()){\n $user->setPasswordUser(md5($user->getPasswordUser()));\n }\n else {\n $user->setPasswordUser($dataUser[password_user]);\n }\n\n $result = $model->editUser($user);\n $error = $result->errorInfo();\n $rows_n = $result->rowCount();\n\n if($error[0] == 00000 && $rows_n > 0){\n #$this->projectsDt(1);\n header(\"Location: \".$this->root.\"?controller=Panel&action=usersDt&error_flag=1\");\n }\n elseif($error[0] == 00000 && $rows_n < 1){\n #$this->projectsDt(10, \"Ha ocurrido un error grave!\");\n header(\"Location: \".$this->root.\"?controller=Panel&action=usersDt&error_flag=10&message='Ha ocurrido un error grave: '\".$error[2].\" ___ \".$id_user.\"'\");\n }\n else{\n #$this->projectsDt(10, \"Ha ocurrido un error: \".$error[2]);\n header(\"Location: \".$this->root.\"?controller=Panel&action=usersDt&error_flag=10&message='Ha ocurrido un error: \".$error[2].\" ___ \".$id_user.\"'\");\n }\n }\n else {\n //$pdoUser = $model->getUserById($user);\n header(\"Location: \".$this->root.\"?controller=Panel&action=editUserForm&error_flag=10&user_id=\".$id_user.\"&message='Ha ocurrido un error: \".$validacion['error'].\"'\");\n }\n\n }", "title": "" }, { "docid": "630dd5e9e9a5648df55047eded1e3515", "score": "0.67147493", "text": "public function actUsuario($ArregloDatos){\r\n \t\trequire(\"../../mc/Modelo/Conexion.php\"); //Llama al archivo que contiene la variable de conexion\r\n \t\tglobal $enlace; //Llama la variable global conexion\r\n\r\n \t\t//Establece estas variables ($this) con las que se obtuvo en el arreglo\r\n \t\t$this->User=$ArregloDatos[0];\r\n \t\t$this->nombreUsuario=$ArregloDatos[1];\r\n \t\t$this->ApellidoUsuario=$ArregloDatos[2];\r\n \t\t$this->TipoDocumentoUsuario=$ArregloDatos[3];\r\n \t\t$this->DocumentoUsuario=$ArregloDatos[4];\r\n \t\t$this->EspecialidadUsuario=$ArregloDatos[5];\r\n \t\t$this->idUsuario=$ArregloDatos[6];\r\n \t\t$query = \"update usuario set `User` = '$this->User', nombreUsuario = '$this->nombreUsuario', apellidoUsuario = '$this->ApellidoUsuario', tipoDocUsuario = '$this->TipoDocumentoUsuario', docUsuario = $this->DocumentoUsuario, especialidadUsuario = '$this->EspecialidadUsuario' WHERE (`idUsuario` = $this->idUsuario)\"; //Establece la variable (query) como un query que actualiza\r\n \t\tif(mysqli_query($enlace, $query)){ //Determina si el query da true, es decir se ejecuta el query satisfactoriamente\r\n \t\t\tprint(\"<script>alert('Usuario modificado correctamente');;window.location.href='../../Inicio.php';</script>\"); //Alerta que redirige y anuncia que se modifico\r\n \t\t} else {\r\n \t\t\techo mysqli_error($enlace); //Muestra el error de sql\r\n \t\t}\r\n\r\n \t}", "title": "" }, { "docid": "dd0dbf285a7a19342ae2b275f8e6927f", "score": "0.66954184", "text": "public function save_user() {\n $id = 0;\n //consulta la existencia del usuario\n $q = \"SELECT idUSUARIO FROM tedi_usuario WHERE email = '\" . $this->email . \"' \";\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $resultado = mysql_num_rows($con);\n if (($this->id) > 0) {\n //actualiza la informacion\n if (strlen($this->email) > 3) {\n $q = \"SELECT idUSUARIO FROM tedi_usuario WHERE idUSUARIO = $this->id \";\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n while ($obj = mysql_fetch_object($con)) {\n $id = $obj->idUSUARIO;\n if (strlen($this->pass) > 0) {\n $pass = $this->make_hash_pass($this->email, $this->pass);\n } else {\n $pass = '';\n }\n $table = \"tedi_usuario\";\n $arrfieldscomma = array('nombre' => $this->nombre,\n 'pass' => $pass,\n 'nickname' => $this->nickname,\n 'email' => $this->email,\n 'sexo' => $this->sexo,\n 'peso_actual' => $this->peso_actual,\n 'objetivo_dieta' => $this->objetivo_dieta,\n 'nivel_actividad' => $this->nivel_actividad,\n 'pais_residencia' => $this->pais_residencia);\n $arrfieldsnocomma = array('edad' => $this->edad,\n 'estatura' => $this->estatura);\n $q = $this->UTILITY->make_query_update($table, \"idUSUARIO = '$id'\", $arrfieldscomma, $arrfieldsnocomma);\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n }\n } else {\n $arrjson = array('output' => array('valid' => false, 'response' => array('code' => '2001', 'content' => ' Faltan datos.')));\n }\n } else {\n if ($resultado == 0) {\n //crea el nuevo usuario\n $pass = $this->make_hash_pass($this->email, $this->pass);\n $q = \"INSERT INTO tedi_usuario (nombre, pass, nickname, email, sexo, edad, pais_residencia, estatura, nivel_actividad, objetivo_dieta) VALUES ('$this->nombre', '$pass', '$this->nickname', '$this->email', '$this->sexo', $this->edad, '$this->pais_residencia', $this->estatura, '$this->nivel_actividad', '$this->objetivo_dieta')\";\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $id = mysql_insert_id();\n } else {\n $arrjson = array('output' => array('valid' => false, 'response' => array('code' => '3002', 'content' => 'ya existe.')));\n }\n }\n $arrjson = array('output' => array('valid' => true, 'id' => $id));\n echo json_encode($arrjson);\n }", "title": "" }, { "docid": "0d005a26d50c7a57951c900f46d8cd23", "score": "0.6691135", "text": "public function editUsuario(){\n\t\t$sql = \"UPDATE usuario u SET u.nombre_usuario = :nombreUser, u.contrasena = :password , u.estado_usu= :estado where u.ci_persona = :ci_per;\";\n\t\t$con = Database::getConexion();\n\n\t \t$stmt = $con->prepare($sql); \n\t\t$stmt->bindValue(\":nombreUser\", $this->nombre_usuario,PDO::PARAM_STR);\n\t \t$stmt->bindValue(\":password\", $this->contrasena,PDO::PARAM_STR);\n\t \t$stmt->bindValue(\":estado\", $this->estado_usu,PDO::PARAM_STR);\n\t \t$stmt->bindValue(\":ci_per\", $this->ci_persona,PDO::PARAM_STR);\n\n\t \tif ($stmt->execute()){\n\t \t\techo '<pre>'; print_r(\"exito edit\"); echo '</pre>';\n\t\t\treturn true;\n\t \t}\t\t\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "b7b4c4dc7b4bf3fbe12360561d122639", "score": "0.66878164", "text": "function updateUsuario($usercod, $userName, $userEmail,\n $password, $userType, $userEst ){\n //-----------------------------------------------------------------\n\n\n $strsql = \"UPDATE `usuario` set\n `usuarioemail` = '%s', `usuarionom` = '%s', `usuariopswd` = '%s',\n `usuarioest` = '%s',\n `usuariotipo` = '%s' where `usuariocod` = %d;\";\n $strsql = sprintf($strsql, valstr($userEmail),\n valstr($userName),\n $password,\n $userEst,\n $userType, $usercod);\n\n $affected = ejecutarNonQuery($strsql);\n return ($affected > 0);\n }", "title": "" }, { "docid": "f067c644f265268706072dd4a3f7b493", "score": "0.66170603", "text": "function realizarModificacion(){\r\n\t$user = new User();\r\n\tif($user->modifyUser($_POST['usuario_id'],$_POST['name'],$_POST['username'],$_POST['password'],$_POST['role'],$_POST['phone'])){\r\n\t\taddNotificacion(\"Usuario modificado\",\"succcess\");\r\n\t\tredirecionarWithParams($GLOBALS['CONTROLLER_URL'].'adminController.php',array(array('action','gestionarUsuario')));\r\n\t}\r\n\telse{\r\n\t\taddNotificacion(\"Usuario no modificado\",\"danger\");\r\n\t\tredirecionarWithParams($GLOBALS['CONTROLLER_URL'].'adminController.php',array(array('action','gestionarUsuario')));\r\n\t}\t\r\n}", "title": "" }, { "docid": "1e5b3697488e08509f8b6f55a7b2372c", "score": "0.66098756", "text": "function actualizar(){\n $nombre=$_POST[\"nombre\"];\n $apellido=$_POST[\"apellido\"]; \n $telefono = $_POST[\"telefono\"];\n $usuario = new Usuario();\n $usuario= $usuario->getSesion();\n $userNew= new Usuario($usuario->getIdUsuario(), $nombre, $apellido, $usuario->getUserName()\n ,null, $usuario->getGenero(), $telefono ,1,null);\n $resultado=$userNew->updateUsuario();\n\n if ($resultado==\"Exito\") {\n echo \"Exito\";\n } else {\n echo $resultado;\n }\n }", "title": "" }, { "docid": "8a7da8498406d937f53b8c8d49193a46", "score": "0.6608254", "text": "private function almacenar_usuario(){ $this->db->consultas('SELECT * FROM usuarios WHERE uid = \"'. $this->datos['uid'].'\"');\n $GG = $this->db->obtener_datos();\n $cont = count($GG);\n if ($cont>0){\n return $this->respuesta = ['ya existe'];\n }\n else{\n $this->db->consultas('INSERT INTO usuarios (uid, displayname, email, fechanacimiento, tipocuenta) VALUES(\"'.$this->datos['uid'].'\", \"'.$this->datos['displayname'].'\", \"'.$this->datos['email'].'\", \"'.$this->datos['fechanacimiento'].'\", \"'.$this->datos['tipocuenta'].'\")');\n return $this->respuesta = ['guardado'];\n }\n \n /* \n $this->db->consultas('IF EXISTS (SELECT * FROM usuarios WHERE uid = '.$this->datos['uid'].')\n BEGIN\n Set @existeUsuario=1\n END\n IF @existeUsuario=1 \n BEGIN\n DELETE FROM usuarios WHERE usuarios.uid = '.$this->datos['uid'].'\n end\n else\n begin\n INSERT INTO usuarios (uid, displayname, email, fechanacimiento, tipocuenta) VALUES(\"'.$this->datos['uid'].'\", \"'.$this->datos['displayname'].'\", \"'.$this->datos['email'].'\", \"'.$this->datos['fechanacimiento'].'\", \"'.$this->datos['tipocuenta'].'\")\n end'); */\n \n }", "title": "" }, { "docid": "dac2f52d5e69bda37988572ed6a27cd2", "score": "0.6598088", "text": "public function crearUsuarioGestor($infoUser, $data, $id_moodle){\n\n //validamos primero que la variable $infoUser\n //traiga informacion del DNI de la RENIEC\n if($infoUser == null){\n $nombre = ''; $apellido_paterno = ''; $apellido_materno = ''; $pais_domicilio = ''; $sexo = '';\n $direccion = ''; $urbanizacion = ''; $distrito = ''; $city = ''; $provincia = ''; $pais = '';\n\n }else{\n $nombre = $infoUser[0]->nombres;\n $apellido_paterno = $infoUser[0]->apellido_paterno;\n $apellido_materno = $infoUser[0]->apellido_materno;\n $pais_domicilio = $infoUser[0]->pais_domicilio;\n $sexo = $infoUser[0]->sexo;\n\n $direccion = $infoUser[0]->direccion;\n $urbanizacion = $infoUser[0]->localidad_domicilio;\n $distrito = $infoUser[0]->distrito_domicilio;\n $city = $infoUser[0]->departamento_domicilio;\n $provincia = $infoUser[0]->provincia_domicilio;\n $pais = $infoUser[0]->pais_domicilio;\n }\n\n //Guardamos en variables la informacion que viene \n $apellido_paterno = $apellido_paterno;\n $apellido_materno = $apellido_materno;\n $nombres = $nombre;\n $pais_domicilio = $pais_domicilio;\n $sexo = $sexo;\n \n $direccion = $direccion;\n $urbanizacion = $urbanizacion;\n $distrito = $distrito;\n $city = $city;\n $provincia = $provincia;\n $pais = $pais;\n \n if($sexo == 1){\n $avatar = 'avatar_man.png';\n }else{\n $avatar = 'avatar_woman.png';\n }\n\n //Aqui registramos el usuario en la tbala user del gestor\n $user = User::create([\n 'document' => $data['document'],\n 'email' => $data['email'],\n 'status' => 1,\n 'password' => Hash::make($data['password']),\n ]);\n\n\n //Aqui registramos el uuario en la tabla usermoodle del gestor\n $userMoodle = new UserMoodle();\n $userMoodle->user_id = $user->id;\n\n $userMoodle->document = $data['document'];\n $userMoodle->user_moodle_id = $id_moodle;\n\n \n $userMoodle->user = $data['email'];\n $userMoodle->password = bcrypt($data['password']);\n\n $userMoodle->name = $nombres;\n $userMoodle->last_name = $apellido_paterno;\n $userMoodle->mothers_last_name = $apellido_materno;\n $userMoodle->sexo = $sexo;\n $userMoodle->avatar = $avatar;\n\n $userMoodle->address = $direccion;\n $userMoodle->urbanizacion = $urbanizacion;\n $userMoodle->distrito = $distrito;\n $userMoodle->city = $city;\n $userMoodle->provincia = $provincia;\n $userMoodle->country = $pais;\n \n\n $userMoodle->save();\n \n $user->roles()->attach(7);\n\n //aqui se genera un Log\n $log = Log::create([\n //return User::create([\n 'user_id' => $user->id,\n 'section' => 'Usuarios',\n 'action' => 'Creación',\n 'feedback' => 'self',\n 'ip' => 'ip',\n 'device' => 'device',\n 'system' => 'system'\n ]);\n\n return $user;\n\n }", "title": "" }, { "docid": "dccb012d221ae726f1969a192ae02a62", "score": "0.65852326", "text": "static public function mdlIngresarUsuario($tabla, $datos){\n\n \t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla (codusuario, apepatusuario, nomusuario, clave, codperfil, fecingreso, correo, fecexpiracion, nrointentos, bloqueado, codgrupo) \n\t\t VALUES (:nombre , '', :usuario, :password , :perfil, now(), '', now(), 0, 0, 1 )\");\n\n \t\t$stmt -> bindParam(\":nombre\" , $datos[\"nombre\"], PDO::PARAM_STR);\n \t\t$stmt -> bindParam(\":usuario\" , $datos[\"usuario\"], PDO::PARAM_STR);\n \t\t$stmt -> bindParam(\":password\" , $datos[\"password\"], PDO::PARAM_STR);\n \t\t$stmt -> bindParam(\":perfil\" , $datos[\"perfil\"], PDO::PARAM_STR);\n\n \t\tif( $stmt -> execute()) \n \t\t\treturn \"ok\";\n \t\telse \n \t\t\treturn \"error\";\n\n \t\t$stmt-> close();\n \t\t$stmt= null;\n \t}", "title": "" }, { "docid": "b30b5d10e8782ac6b8e3e123c019e800", "score": "0.6567179", "text": "function update() {\n $oAccesoDatos = new AccesoDatos();\n $sQuery = \"\";\n $nAfectados = -1;\n if ($this -> id == \"\")\n throw new Exception(\"User->update(): error de codificaci&oacute;n, faltan datos\");\n else {\n if ($oAccesoDatos -> conectar()) {\n $sQuery = \"UPDATE app_user \n\t\t\t\t\tSET username = '\" . $this -> username . \"', \n\t\t\t\t\t password = '\" . $this -> password . \"' , \n\t\t\t\t\t last_access = '\" . $this -> lastAccess . \"' , \n\t\t\t\t\t salt = '\" . $this -> salt . \"',\n\t\t\t\t\t fb_id = '\" . $this -> fb_id . \"',\n\t\t\t\t\t tw_id = '\" . $this -> tw_id . \"',\n\t\t\t\t\t type = '\" . $this -> type . \"',\n\t\t\t\t\t status = '\" . $this -> status . \"',\n\t\t\t\t\t email = '\" . $this -> email . \"'\n\t\t\t\t\tWHERE id = '\" . $this -> id . \"'\";\n $nAfectados = $oAccesoDatos -> ejecutarComando($sQuery);\n $oAccesoDatos -> desconectar();\n }\n }\n return $nAfectados;\n }", "title": "" }, { "docid": "2286b24f3f9ac41bcb5216b3125970fe", "score": "0.65546376", "text": "public function up_usuario($id){\n\t\t$dados = array();\t\n\t\t$u = new Usuarios();\n\t\t$post = filter_input_array(INPUT_POST, FILTER_DEFAULT);\n\t\t$get = filter_input_array(INPUT_GET, FILTER_DEFAULT);\n\t\t//verifificar se é o usuario que esta alterando os proprios dados\n\t\tif ($_SESSION['cLogin'] <> $id) {\n\t\t\theader('Location: '.BASE.'admin/up_usuario/'.$_SESSION['cLogin']);\n\t\t}\n\t\t//atualizar\n\t\tif(!empty($post)){\n\t\t\t$post['id'] = $id;\n\t\t\tif (empty($post['senha'])) {\n\t\t\t\tunset($post['senha']);\n\t\t\t} else {\n\t\t\t\t$post['senha'] = md5($post['senha']);\n\t\t\t}\n\t\t\t$u->up($post);\n\t\t\theader('Location: '.BASE.'admin/up_usuario/'.$id);\n\t\t}\n\t\t\n\t\t$dados['value'] = $u->get($id);\n\t\t$this->loadAdmin('admin_usuario_up', $dados);\n\t}", "title": "" }, { "docid": "a86299cc011a5b0a089a0920bc347379", "score": "0.6541776", "text": "static public function mdlEditarUsuario($tabla, $datos){\n\t\t$sql =\"UPDATE $tabla SET nomusuario = :nombre , clave = :clave ,codperfil = :perfil WHERE codusuario = :usuario\";\n \t\t$stmt = Conexion::conectar()->prepare(\"$sql\");\n\n \t\t$stmt -> bindParam(\":nombre\" , $datos[\"nombre\"], PDO::PARAM_STR);\n \t\t$stmt -> bindParam(\":usuario\" , $datos[\"usuario\"], PDO::PARAM_STR);\n \t\t$stmt -> bindParam(\":clave\" , $datos[\"password\"], PDO::PARAM_STR);\n \t\t$stmt -> bindParam(\":perfil\" , $datos[\"perfil\"], PDO::PARAM_STR);\n\n \t\tif( $stmt -> execute()) \n \t\t\treturn \"ok\";\n \t\telse \n \t\t\treturn \"error\";\n\n \t\t$stmt-> close();\n \t\t$stmt= null;\n \t}", "title": "" }, { "docid": "414308f67d624115ddf77cc7b3ccb5df", "score": "0.6523612", "text": "final public function update_estado_user() {\n global $config;\n\n # Actualiza Estado\n $this->db->query(\"UPDATE users SET estado=if(estado=0,1,0)\n WHERE id_user='$this->id' LIMIT 1;\");\n\n # Redireccionar a la página principal del controlador\n $this->functions->redir($config['site']['url'] . 'administracion/usuario');\n }", "title": "" }, { "docid": "2d03cb39cd468ecce69d79834f9ab6e1", "score": "0.6516375", "text": "public function actualizar(){\n\t if($this->imagen){\n\t $consulta = \"UPDATE usuarios SET user=?, password=?, \n nombre=?, privilegio=?, admin=?, email=?, imagen=? WHERE id=?\";\n\t return DBPS::update($consulta,[$this->user,$this->password,\n\t $this->nombre,$this->privilegio,$this->admin,$this->email,$this->imagen,$this->id]);\n\t }else{\n\t $consulta = \"UPDATE usuarios SET user=?, password=?,\n nombre=?, privilegio=?, admin=?, email=? WHERE id=?\";\n\t return DBPS::update($consulta,[$this->user,$this->password,\n\t $this->nombre,$this->privilegio,$this->admin,$this->email,$this->id]);\n\t }\t\t\n\t}", "title": "" }, { "docid": "d0b6f1f1b0864ae559ef34834bf9ae24", "score": "0.65141", "text": "public function actualizar(){\n\t\t\tif ($_POST) {\n\t\t\t\t$type = $_POST['tipo'];\n\n\t\t\t\t$data = [\n\t\t\t\t\t\"id\" => $_POST['id'],\n\t\t\t\t\t\"name\" => $_POST['nombre'],\n\t\t\t\t\t\"lastName\" => $_POST['apellido'],\n\t\t\t\t\t\"job\" => $_POST['oficio'],\n\t\t\t\t\t\"status\" => 1\n\t\t\t\t];\n\n\t\t\t\tif ($type == \"personal\") {\n\t\t\t\t\t$update = $this->personalModel->update($data);\n\t\t\t\t}else{\n\t\t\t\t\t$update = $this->medicoModel->update($data);\n\t\t\t\t}\n\n\t\t\t\tif ($update) {\n\n\t\t\t\t\t@session_start();\n\n\t\t\t\t\t$description = \"Actualizo los datos de un personal\";\n\t\t\t\t\t$user = $_SESSION[\"user_id\"];\n\n\t\t\t\t\t$bitacora = [\n\t\t\t\t\t\"description\" => $description,\n\t\t\t\t\t\"user_id\" => $user,\n\t\t\t\t\t];\n\n\n\t\t\t\t\t$save = $this->bitacoraModel->save($bitacora);\n\t\t\t\t\tif ($save) {\n\t\t\t\t\t\techo 1;\n\t\t\t\t\t}else\n\t\t\t\t\t\techo 0;\n\n\t\t\t\t}else{\n\t\t\t\t\techo 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "dd9ab019fac712ab1e60c642492801b4", "score": "0.65118146", "text": "public function update($data = null) \n\t{\n\t\t// ES NECESARIO EL ID\n\t\tif (empty($this->id) || !is_numeric($this->id)) {\n\t\t\tthrow new DentalException('ERROR AL ACTUALIZAR LOS DATOS DEL USUARIO.');\n\t\t}\n\t\t// VAR FIELDS GUARDA LOS SETS PARA LA QUERY\n\t\t$fields = array();\n\t\t// EL UPDATE LO PUEDE HACER CON LOS DATOS DE LA MISMA INSTANCIA\n\t\tif (empty($data) || !is_array($data)) {\n\t\t\t$data = (array) $this;\n\t\t}\n\t\t// VALIDO Y SETEO LOS CAMPOS\n\t\tforeach ($data as $k => $v) {\n\t\t\tif (self:: valid_field($k)) {\n\t\t\t\t// EL CAMPO clave_seguridad TIENE QUE SER HASHEADO\n\t\t\t\t$value = $k == 'clave_seguridad' ? md5($v) : utf8_decode($v);\n\t\t\t\t// AGERGO EL CAMPO\n\t\t\t\t$fields[$k] = \"{$k} ='{$v}'\";\n\t\t\t} \n\t\t}\n\t\t// SI HAY ALGUN CAMPO PARA HACER EL UPDATE\n\t\tif (!empty($fields)) {\n\t\t\t// IMPLODE SOBRE LOS CAMOS\n\t\t\t$implode = implode(\",\", $fields);\n\t\t\t// QUERY FINALE\n\t\t\t$q = \"UPDATE usuarios SET {$implode} WHERE id_usuario = '{$this->id}'\";\n\t\t\t// EJECUTO\n\t\t\tself::DB()->query($q);\n\t\t}\n\t\t// SINC EN LA INSTANCIA\n\t\t$this->select();\n\t}", "title": "" }, { "docid": "40f45aed83fd11a174c72036f0c3cfb2", "score": "0.6498734", "text": "function changeInfoGenerali($nome, $luogoOrigine, $luogoPreferito, $dataNascita, $usernameUtente){\r\n global $eTravelDb;\r\n\r\n $idUser = getIdUser($usernameUtente);\r\n\r\n $queryText = \"UPDATE user SET \";\r\n\r\n if($nome != null){\r\n $nome = $eTravelDb->sqlInjectionFilter($nome);\r\n $queryText = $queryText.\"`name`='\".$nome.\"'\";\r\n } \r\n if($luogoOrigine != null){\r\n $idLuogoOrigine = getIdLuogo($luogoOrigine);\r\n if($idLuogoOrigine == \"Errore di connessione\")\r\n return $idLuogoOrigine;\r\n $queryText = $queryText.\", `luogoOrigine`='\".$idLuogoOrigine.\"'\";\r\n }\r\n if($luogoPreferito != null){\r\n $idLuogoPreferito = getIdLuogo($luogoPreferito);\r\n if($idLuogoPreferito == \"Errore di connessione\")\r\n return $idLuogoPreferito;\r\n $queryText = $queryText.\", `luogoPreferito`='\".$idLuogoPreferito.\"'\";\r\n }\r\n if($dataNascita != null){\r\n $dataNascita = getCorrectDate($dataNascita);\r\n if($dataNascita == \"Inserire una data valida\")\r\n return $dataNascita;\r\n $queryText = $queryText.\", `dataNascita`='\".$dataNascita.\"'\";\r\n }\r\n\r\n $queryText = $queryText.\" WHERE `idUser`='\".$idUser.\"'\";\r\n\r\n $result = $eTravelDb->performQuery($queryText); \r\n\r\n if(!$result)\r\n return \"Errore di connessione\";\r\n\r\n $eTravelDb->closeConnection();\r\n\r\n return null;\r\n }", "title": "" }, { "docid": "f94eff31cfe0aeef3578f649d1b1831d", "score": "0.64849716", "text": "public function save()\n {\n $user = $this->valores();\n unset($user['idUser']);\n if (empty($this->idUser)) {\n $this->insert($user);\n $this->idUser = self::$conn->lastInsertId();\n } else {\n $this->update($this->idUser, $user);\n }\n }", "title": "" }, { "docid": "a76d5d96adac00c66f129e2ca5343b97", "score": "0.6484702", "text": "function alta($nombre,$apellidos,$dni,$email,$fecha,$pas){\n\t$con= ConectaBD::getInstance();\n\t$dni=strtoupper($dni);\n\t//comprueba si el usuario ya existe\n\tif ( !( $query = $con->prepare( \"select nombre from Usuarios where dni=:dni \" ) ) ){\n\t\t\techo \"Falló la preparacioón: \" . $con->errno . \" - \" . $con->error; \n\t\t}elseif ( ! $query->bindParam( \":dni\", $dni) ) { \n\t\t\techo \"Falló la ejecución: \" . $query->errno . \"- \" . $query->error;\n\t\t}else{\n\t\t\t$query->execute();\n\t\t\t$resultado= $query ->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t//si no esiste\n\t\t\tif(empty($resultado)){\n\t\t\t\t$pass=Password::hashs($pas);\n\t\t\t\t//inserta el usuario en la tabla Usuarios\n\t\t\t\tif ( !( $query = $con->prepare( \"INSERT INTO Usuarios(nombre, apellidos, dni, email, fecha_nacimiento, contraseña) VALUES (:nombre,:apellidos,:dni,:email,:fecha,:pass)\" ) ) ){\n\t\t\t\t\techo \"Falló la preparacioón: \" . $con->errno . \" - \" . $con->error; \n\t\t\t\t}elseif ( ! $query->bindParam( \":nombre\", $nombre) ) { // Vincula parámetros con variables echo \"Falló la vinculación de parámetros: \" . $orden->errno . \"- \" . $orden->error; }\n\t\t\t\t\t\techo \"Falló la ejecución: \" . $query->errno . \"- \" . $query->error;\n\t\t\t\t}elseif ( ! $query->bindParam( \":apellidos\", $apellidos) ) { // Vincula parámetros con variables echo \"Falló la vinculación de parámetros: \" . $orden->errno . \"- \" . $orden->error; }\n\t\t\t\t\t\techo \"Falló la ejecución: \" . $query->errno . \"- \" . $query->error;\n\t\t\t\t}elseif ( ! $query->bindParam( \":dni\", $dni) ) { // Vincula parámetros con variables echo \"Falló la vinculación de parámetros: \" . $orden->errno . \"- \" . $orden->error; }\n\t\t\t\t\t\techo \"Falló la ejecución: \" . $query->errno . \"- \" . $query->error;\n\t\t\t\t}elseif ( ! $query->bindParam( \":email\", $email) ) { // Vincula parámetros con variables echo \"Falló la vinculación de parámetros: \" . $orden->errno . \"- \" . $orden->error; }\n\t\t\t\t\t\techo \"Falló la ejecución: \" . $query->errno . \"- \" . $query->error;\n\t\t\t\t}elseif ( ! $query->bindParam( \":fecha\", $fecha) ) { // Vincula parámetros con variables echo \"Falló la vinculación de parámetros: \" . $orden->errno . \"- \" . $orden->error; }\n\t\t\t\t\t\techo \"Falló la ejecución: \" . $query->errno . \"- \" . $query->error;\n\t\t\t\t}elseif ( ! $query->bindParam( \":pass\", $pass) ) { // Vincula parámetros con variables echo \"Falló la vinculación de parámetros: \" . $orden->errno . \"- \" . $orden->error; }\n\t\t\t\t\t\techo \"Falló la ejecución: \" . $query->errno . \"- \" . $query->error;\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t$query->execute();\n\t\t\t\t\tif($query->rowCount()>0){\n\t\t\t\t\t\techo json_encode(\"Usuario registrado\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo json_encode(\"Error al registrar\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo json_encode(\"El usuario ya existe\");\t\n\t\t\t}\n\t\t\t\n\t\t}\n}", "title": "" }, { "docid": "60a73c0798513648730f2ceabb7ca47d", "score": "0.6480529", "text": "static public function mdlIngresarUsuario($tabla,$datos){\n\n //estructura PDO de php para REGISTRAR un usuario \n $stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla(nombre, usuario, password, perfil, foto) \n values (:nombre, :usuario, :password, :perfil, :foto)\"); \n\n $stmt->bindParam(\":nombre\", $datos[\"nombre\"], PDO::PARAM_STR);\n $stmt->bindParam(\":usuario\", $datos[\"usuario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":password\", $datos[\"password\"], PDO::PARAM_STR);\n $stmt->bindParam(\":perfil\", $datos[\"perfil\"], PDO::PARAM_STR);\n $stmt->bindParam(\":foto\", $datos[\"ruta\"], PDO::PARAM_STR);\n\n if ($stmt->execute()) {\n return \"ok\";\n }else {\n return \"error\";\n }\n $stmt -> close();\n\n $stmt -> null;\n\n }", "title": "" }, { "docid": "7a4d4eeb85d5a504ffda27b2f93b1cab", "score": "0.64674294", "text": "function UpdateUser($name, $Apellido, $fecha, $email, $nom, $id){\n $con=ConnectDB();\n // Codigo de la consulta a la base de datos:\n $UpdateUser = \"update usuarios set Name='$name', Surname='$Apellido', Birthdate='$fecha', Email='$email', User='$nom' where id='$id'\";\n $resultat3 = mysqli_query($con,$UpdateUser) or die('Consulta fallida: ' . mysqli_error($con));\n \n // tancar cx amb la db\n CloseDB($con);\n }", "title": "" }, { "docid": "2866a3940b7cc632aea728bea9f13bd7", "score": "0.6467197", "text": "function EDIT()\n{\n\t//Añado una opcion vacia en el select que devuelve un 0 en el sexo, de modo que cuando el usuario se esta editando y no se quiere cambiar el sexo, exista por defecto la opción de dejarlo como esta sin tener que escoger la opción necesaria\n\t/*if($this->sexo==0){ \n\t\t$sql=\"SELECT sexo\n\t\t\tFROM USUARIOS\n\t\t\tWHERE (\n\t\t\t\t(login = '$this->login') \n\t\t\t)\";\n\t\t$resultado = $this->mysqli->query($sql);\n\t\t$tupla = $resultado->fetch_array();\n\t\t$this->sexo=$tupla['sexo'];\n\t}*/\n\t$this->formatear_telefono();\n\t$ctrl=$this->comprobar_atributos();\n\tif(!is_array($ctrl)){\n\n\n\n\t\t$sql1 = \"select * from USUARIOS where login = '\".$this->login.\"'\";\n\t\tif (!$result1 = $this->mysqli->query($sql1)) //Error en la construcción de la sentencia SQL\n\t\t{\n\t\t\treturn 'Error de gestor de base de datos';\n\t\t}\n\t\t$result2=$result1->fetch_array();\n\t\t\n\t\tif ($result2['DNI'] != $this->dni){ // existe el dni\n\t\t\t\treturn 'Inserción fallida: el dni ya existe';\n\t\t\t}\n\n\t\tif($result2['email'] != $this->email){ // existe el email\n\t\t\t\treturn 'Inserción fallida: el email ya existe';\n\t\t\t}\n\n\n\n\t if($this->fotopersonal==\"\"){\n\n\t \t$sql = \"UPDATE USUARIOS\n\t\t\tSET \n\t\t\t\tpassword = '$this->password',\n\t\t\t\tnombre = '$this->nombre',\n\t\t\t\tapellidos = '$this->apellidos',\n\t\t\t\temail = '$this->email',\n\t\t\t\tDNI = '$this->dni',\n\t\t\t\ttelefono = '$this->telefono',\n\t\t\t\tFechaNacimiento = '$this->FechaNacimiento',\n\t\t\t\tsexo = '$this->sexo'\n\t\t\tWHERE (\n\t\t\t\tlogin = '$this->login'\n\t\t\t)\n\t\t\t\";\n\t }else{\n\t$sql = \"UPDATE USUARIOS\n\t\t\tSET \n\t\t\t\tpassword = '$this->password',\n\t\t\t\tnombre = '$this->nombre',\n\t\t\t\tapellidos = '$this->apellidos',\n\t\t\t\temail = '$this->email',\n\t\t\t\tDNI = '$this->dni',\n\t\t\t\ttelefono = '$this->telefono',\n\t\t\t\tFechaNacimiento = '$this->FechaNacimiento',\n\t\t\t\tfotopersonal = '$this->fotopersonal',\n\t\t\t\tsexo = '$this->sexo'\n\t\t\tWHERE (\n\t\t\t\tlogin = '$this->login'\n\t\t\t)\n\t\t\t\";\n\t\t}\t\n\tif ($this->mysqli->query($sql))\n\t{\n\t\t$resultado = 'Actualización realizada con éxito';\n\t}\n\telse\n\t{\n\t\t$resultado = 'Error de gestor de base de datos'; //Error en la construcción de la sentencia SQL\n\t}\n\treturn $resultado;\n\t}else{\n\t\treturn $ctrl;\n\t}\n}", "title": "" }, { "docid": "77eff34865f7d64a670c4245855f0314", "score": "0.64612174", "text": "public function setSegUsuariosUpdate($datos)\n {\n $user = $this->getSession('usuario');\n $roles = $datos->roles;\n $this->segUsuariosPerfilModel->setSegPerfilRelacionUserUpdate($roles,$datos->id);\n unset($datos->roles);\n $this->fijarValores($datos);\n $this->fijarValor('updated_usuario_id',$user->id);\n $this->fijarValor('updated_at',All::now());\n $val = $this->guardar();\n // Setear log de registro de acciones\n $this->segLogAccionesModel->cargaAcciones($this->tabla, $datos->id,'', json_encode($datos), $user->id,Constant::LOG_MODI);\n return $val;\n }", "title": "" }, { "docid": "6020acdb412b0d69473669aa93e87e30", "score": "0.646013", "text": "function modificarInfoUsuario($nombre, $apellido, $pass, $idUsuario){\n\t\t\ttry {\n\t\t\t\t$password = $this->getMD5($pass);\n\t\t\t\t$result = $this->db->ExecutePersonalizado(\"UPDATE USUARIO SET nombre='$nombre', apellido='$apellido', password='$password' WHERE idUSUARIO='$idUsuario'\");\n\t\t\t\treturn $result;\n\t\t\t} catch (Exception $e) {\n\t\t\t\techo 'Error: ' .$e->getMessage();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "2253f0d76b2632d6ae537fd8279bebbc", "score": "0.64546114", "text": "function fcUsu($usuario)\n {\t$this->_usua=$usuario;\t}", "title": "" }, { "docid": "0229d666712878d23673eacd2feec6a8", "score": "0.6439285", "text": "public function changeData($user_id)\n {\n if (intval($user_id) > 0) {\n $new_data = array(\n 'email' => $_POST['email'],\n 'login' => $_POST['login'],\n 'name' => $_POST['name']\n );\n\n if (!$this->utils->matchPattern($new_data['email'], 'email')) {\n return array(\n 'status' => false,\n 'message' => 'E-mail указан неправильно'\n );\n }\n\n if ($this->db->checkRowExistance('public_users', 'email', mb_strtolower($new_data['email'], \"UTF-8\"), array($user_id)) === true) {\n return array(\n 'status' => false,\n 'message' => 'E-mail <span>' . $new_data['email'] . '</span> уже занят'\n );\n }\n\n if (strlen($new_data['login']) < 3) {\n return array(\n 'status' => false,\n 'message' => 'Логин должен состоять не менее, чем из 3 символов'\n );\n }\n\n if (preg_match('/[^0-9a-zA-Z_-]/', $new_data['login'])) {\n return array(\n 'status' => false,\n 'message' => 'Логин может состоять только из литинских символов алфавита, цифр и знаков «-» и «_»'\n );\n }\n\n if ($this->db->checkRowExistance('public_users', 'login', mb_strtolower($new_data['login'], \"UTF-8\"), array($user_id)) === true) {\n return array(\n 'status' => false,\n 'message' => 'Пользователь с логином <span>' . $new_data['login'] . '</span> уже зарегистрирован'\n );\n }\n\n $query = \"\n UPDATE\n `public_users`\n SET\n `email` = '\" . $this->db->quote($new_data['email']) . \"',\n `name` = '\" . $this->db->quote($new_data['name']) . \"'\n WHERE\n `id` = \" . intval($user_id) . \"\n \";\n\n $this->db->query($query);\n\n $this->user['data']['email'] = $new_data['email'];\n $this->user['data']['login'] = $new_data['login'];\n $this->user['data']['name'] = $new_data['name'];\n\n return array(\n 'status' => true,\n 'message' => 'Данные успешно сохранены'\n );\n } else {\n return array(\n 'status' => false,\n 'message' => 'Пользователь не авторизован'\n );\n }\n }", "title": "" }, { "docid": "0e4e5f6ea13bd06349470c7305cfc943", "score": "0.6423091", "text": "private function carga_usuario($id_cliente){\n\n $this->id_cliente =$id_cliente;\n $this->nombre =\"José Luis\";\n $this->apellidos =\"Ferrete\";\n $this->email =\"JoséLuis@Ferrete.com\";\n $this->telefono =\"555111222\";\n\n }", "title": "" }, { "docid": "21a11e96d57d57497a2c6d7b90ae30ab", "score": "0.64176166", "text": "function editProfile($id_usuario,$datos){\r\n\t\t\r\n\t\tglobal $oBD;\r\n\t\t\r\n\t\t$error=0;\r\n\t\tif($datos['nombre']==\"\"){\r\n\t\t\t$error = 1;\r\n\t\t}\r\n\t\tif($datos['email']==\"\"){\r\n\t\t\t$error= 2;\r\n\t\t}\r\n\t\tif($datos['password']!=\"\"){\r\n\t\t\tif($datos['password2']!=$datos['password'] ){\r\n\t\t\t\t$error=3;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif($error==0){\r\n\t\t\t\r\n\t\t\t$contrasena=\"\";\r\n\t\t\tif($datos['password2']!=\"\"){\r\n\t\t\t\t$contrasena=md5($datos['password2']);\r\n\t\t\t}\r\n\t\t\t$sql=\"UPDATE \".TB_USUARIO.\" SET nombre='\".$datos['nombre'].\"',apellidos='\".$datos['apellidos'].\"',telefono='\".$datos['telefono'].\"', empresa='\".$datos['empresa'].\"', web='\".$datos['web'].\"'\";\r\n\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\r\n\t\t\tif($contrasena!=\"\"){\r\n\t\t\t\t$sql.=\",clave='$contrasena' \";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$sql.=\" WHERE id_usuario=$id_usuario\";\r\n\t\t\t$oBD->Execute($sql);\r\n\t\t\t\r\n\t\t\t//if($datos['email']!=\"\"){\r\n\t\t\t\t\r\n\t\t\t//\t$sql=\"SELECT email FROM \".TB_USUARIO.\" WHERE id=$id_usuario\";\r\n\t\t\t\t\r\n\t\t\t//\t$rs=$oBD->Execute($sql);\r\n\t\t\t//\t$datos_perfil_actual=$rs->GetRows();\r\n\t\t\t\t\r\n\t\t\t//\t$email_anterior=$datos_perfil_actual[0]['email'];\r\n\t\t\t\t\r\n\t\t\t\t//if($email_anterior!=$datos['email']){\r\n\t\t\t\t\t\t\r\n\t\t\t\t//\t$sql=\"DELETE FROM \".TB_CAMBIO_EMAIL.\" WHERE id_usuario=$id_usuario\";\r\n\t\t\t\t\t\r\n\t\t\t\t//\t$oBD->Execute($sql);\r\n\t\t\t\t//\t$codigo=\"\";\r\n\t\t\t\t//\tfor ($i=0; $i<40; $i++) {\r\n\t\t\t\t//\t $d=rand(1,30)%2;\r\n\t\t\t\t//\t $codigo.=$d ? chr(rand(65,90)) : chr(rand(48,57));\r\n\t\t\t\t//\t} \r\n\t\t\t\t\t\r\n\t\t\t\t//\t$sql=\"INSERT INTO \".TB_CAMBIO_EMAIL.\" (id_usuario,email,codigo,fecha) \r\n\t\t\t\t//\t\t\t\tVALUES ($id_usuario,'\".$datos['email'].\"','$codigo','\".date('Y-m-d').\"')\";\r\n\t\t\t\t\t\r\n\t\t\t\t//\t$oBD->Execute($sql);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//$this->enviar_confirmacion_cambio_email($id_usuario);\r\n\t\t\t\t\t\r\n\t\t\t\t//\t$error='email';\r\n\t\t\t\t//}\r\n\t\t\t//}\r\n\t\t}\r\n\t\t\r\n\t\treturn $error;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "769748e34577a4c06d46c91225edeb0f", "score": "0.6416404", "text": "public function actualizarUsuario(array $datos, int $id){\n return $this->modelo->where('id', $id)->update($datos);\n\n }", "title": "" }, { "docid": "b2ae44ba35ff9e3cc53b01ece88157c5", "score": "0.6400222", "text": "public function update()\n {\n $query = \"call updateUser(:idUsuario, :idEstado, :idRol, :username, :password, :nombres, :apellidos, :genero, :fecNac, :tipoDocumento, :numDocumento, :correoElectronico, :direccion, :telefono, :imagen, :estadoCivil)\";\n\n // prepare the query\n $stmt = $this->conn->prepare($query);\n\n // sanitize\n $this->idUsuario = htmlspecialchars(strip_tags($this->idUsuario));\n $this->idEstado = htmlspecialchars(strip_tags($this->idEstado));\n $this->idRol = htmlspecialchars(strip_tags($this->idRol));\n $this->username = htmlspecialchars(strip_tags($this->username));\n $this->nombres = htmlspecialchars(strip_tags($this->nombres));\n $this->apellidos = htmlspecialchars(strip_tags($this->apellidos));\n $this->genero = htmlspecialchars(strip_tags($this->genero));\n $this->fecNac = htmlspecialchars(strip_tags($this->fecNac));\n $this->estadoCivil = htmlspecialchars(strip_tags($this->estadoCivil));\n $this->tipoDocumento = htmlspecialchars(strip_tags($this->tipoDocumento));\n $this->numDocumento = htmlspecialchars(strip_tags($this->numDocumento));\n $this->correoElectronico = htmlspecialchars(strip_tags($this->correoElectronico));\n $this->direccion = htmlspecialchars(strip_tags($this->direccion));\n $this->telefono = htmlspecialchars(strip_tags($this->telefono));\n $this->imagen = htmlspecialchars(strip_tags($this->imagen));\n\n // bind the values from the form\n $stmt->bindParam(':idUsuario', $this->idUsuario);\n $stmt->bindParam(':idEstado', $this->idEstado);\n $stmt->bindParam(':idRol', $this->idRol);\n $stmt->bindParam(':username', $this->username);\n $stmt->bindParam(':nombres', $this->nombres);\n $stmt->bindParam(':apellidos', $this->apellidos);\n $stmt->bindParam(':genero', $this->genero);\n $stmt->bindParam(':fecNac', $this->fecNac);\n $stmt->bindParam(':estadoCivil', $this->estadoCivil);\n $stmt->bindParam(':tipoDocumento', $this->tipoDocumento);\n $stmt->bindParam(':numDocumento', $this->numDocumento);\n $stmt->bindParam(':correoElectronico', $this->correoElectronico);\n $stmt->bindParam(':direccion', $this->direccion);\n $stmt->bindParam(':telefono', $this->telefono);\n $stmt->bindParam(':imagen', $this->imagen);\n\n // hash the password before saving to database\n if (!empty($this->password)) {\n $this->password = htmlspecialchars(strip_tags($this->password));\n $password_hash = password_hash($this->password, PASSWORD_BCRYPT);\n $stmt->bindParam(':password', $password_hash);\n } else {\n $stmt->bindParam(':password', $this->password);\n }\n\n\n // execute the query\n if ($stmt->execute()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "50318d620182f5b8910babaf7e033921", "score": "0.63984686", "text": "private function setData($data)\n\t\t{\n\t\t\t$this->setIdUsuario($data['idusuario']);\n\t\t\t$this->setDesLogin ($data['deslogin']);\n\t\t\t$this->setDesSenha ($data['dessenha']);\n\t\t\t$this->setDtCadastro(new DateTime($data['dtcadastro']));\n\t\t}", "title": "" }, { "docid": "8859622a3b44e89ab0af75eab6c8e1b1", "score": "0.6393239", "text": "public function actualizar(Usuario $usuario)\n {\n }", "title": "" }, { "docid": "64d7eaa22d6217696aab4db39e87ccab", "score": "0.63875717", "text": "public function actionPerfilUsuario() {$this->usuarioEditado = $this->getDbUser()->usuario;}", "title": "" }, { "docid": "bcedd217e5538bd41ce1610c4159ec2e", "score": "0.63874435", "text": "public function setSegUsuariosCreate($datos)\n {\n //print_r();\n $roles = $datos->roles;\n unset($datos->roles);\n\n $user = $this->getSession('usuario');\n\n $this->fijarValores($datos);\n $this->fijarValor('created_usuario_id',$user->id);\n $this->fijarValor('created_at',All::now());\n $this->guardar();\n $val = $this->lastId();\n $this->segUsuariosPerfilModel->getSegPerfilRelacionUserCreate($roles,$val);\n\n // Registra log de auditoria de registro de acciones\n $user = $this->getSession('usuario');\n $this->segLogAccionesModel->cargaAcciones($this->tabla, 'id', serialize($datos),'',$user->id,Constant::LOG_ALTA);\n\n return $val;\n }", "title": "" }, { "docid": "0b5cc9128d07e9bc8db3f8852c5dc80a", "score": "0.6385519", "text": "public function actualizarUsuario ($id) {\n\t\t$this->form_validation->set_error_delimiters('<div class=\"error\">&nbsp;&nbsp;&nbsp;*** ', '</div>');\n\t\tif ($this->form_validation->run() == FALSE) {\n\t\t\t$this->pageActualizarUsuario($id);\n\t\t} else {\n\t\t\t$data = $_POST;\n\t\t\tunset($data['Password2']);\n\t\t\tif($data['Password'] === '') {\n\t\t\t\tunset($data['Password']);\n\t\t\t}\n\t\t\t$where = array('idUsuario' => $id);\n\t\t\tif($this->object_model->actualizar('usuario',$data,$where)) {\n\t\t\t\tif ($this->upload->do_upload('Imagen')) {\n\t\t\t\t\t$data['file_uploaded'] = array('upload_data' => $this->upload->data());\n\t\t\t\t} else {\n\t\t\t\t\t$data['file_uploaded'] = \"NO SUBIO\";\n\t\t\t\t}\n\t\t\t\t$this->index();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "158a2a959618c01711676896ba733225", "score": "0.6382534", "text": "function setidusuario($val) {$this->idusuario=$val;}", "title": "" }, { "docid": "19553fca634c87de662b3380055c38c3", "score": "0.6373659", "text": "public function usuario($metodo,$argumentos = array()){\n require_once ROOT . DEFAULT_CORE; \n require_once ROOT . DEFAUL_FUNCTION;\n require_once ROOT . 'modules/sistema/model/sistemaModel.php';\n require_once ROOT . VIEW_PACH . DS . 'view.php';\n $sistema = new ModeloSistema();\n $Objvista = new view;\n $dataFormGeneral=array();\n if(!Session::get('usuario')){\n $data = array('ERR'=>3,\n 'MSJ'=>'No ha iniciado Sesi&oacute;n');\n $cadenaSql= fbRetornaConfigForm();\n $sistema->get_datos($cadenaSql, 'head_formulario_config=\"login\"', 'sys_formulario_config');\n $dataFormGeneral=$sistema->_data;\n $Objvista->retornar_vista(DEFAULT_CONTROLLER,'sistema','login','login',$data,$dataFormGeneral);\n }else{\n $met= isset($argumentos[6]) ? $argumentos[6] : \"N\";\n $data=array();$camposCombo=array();$campoChek=array();\n if(!empty($argumentos[3])){\n $sistema->get_datos('*',\"cod_usuario=\".$argumentos[3],$argumentos[4]); $data=$sistema->_data;\n $arrayChek = array(\"ind_ayuda\"=>$data[0][\"ind_ayuda\"],\"ind_helpdesk\"=>$data[0][\"ind_helpdesk\"],\"ind_app\"=>$data[0][\"ind_app\"],\n \"ind_datolee_lider\"=>$data[0][\"ind_datolee_lider\"],\"ind_datolee_sublider\"=>$data[0][\"ind_datolee_sublider\"]); \n foreach($arrayChek as $llave=>$valorChek){\n if($valorChek==1){\n $campoChek[]=$llave; \n }\n }\n $sistema->get_datos('cod_perfil',\"cod_usuario=\".$argumentos[3],'sys_usuario_perfil'); !empty($sistema->_data) ? $data[0][\"cod_perfil\"]=$sistema->_data[0][\"cod_perfil\"] : $data[0][\"cod_perfil\"]=array();\n $sistema->get_datos('cod_menu',\"cod_usuario=\".$argumentos[3],'sys_usuario_menu');!empty($sistema->_data) ? $data[0][\"cod_menu\"]=$sistema->_data : $data[0][\"cod_menu\"]=array();\n $sistema->get_datos('cod_menu_sub',\"cod_usuario=\".$argumentos[3],'sys_usuario_menu_sub');!empty($sistema->_data) ? $data[0][\"cod_menu_sub\"]=$sistema->_data : $data[0][\"cod_menu_sub\"]=array();\n $sistema->get_datos('cod_empresa',\"cod_usuario=\".$argumentos[3],'sys_usuario_empresa'); !empty($sistema->_data) ?$data[0][\"cod_empresa\"]=$sistema->_data : $data[0][\"cod_empresa\"]=array(); \n $camposCombo=array(\"cod_perfil\"=>$data[0][\"cod_perfil\"],\"cod_menu\"=>$data[0][\"cod_menu\"],\n \"cod_menu_sub\"=>$data[0][\"cod_menu_sub\"],\"cod_empresa\"=>$data[0][\"cod_empresa\"]); \n }\n $cadenaSql= fbRetornaConfigForm();\n $sistema->get_datos($cadenaSql, 'head_formulario_config=\"'.devuelveString($argumentos[2],'*',1).'\"', 'sys_formulario_config');\n $dataFormGeneral=$sistema->_data;\n $sistema->get_datos('fbTraeEmpresa('. Session::get('cod') .') as result');\n $cadEmp = $sistema->_data;\n setVariables($sistema,$Objvista,$metodo,$argumentos[1],$argumentos[0],'sys_view_usuario',' cod_empresa in('.$cadEmp[0]['result'].')',$camposCombo,$campoChek,1,'',devuelveString($argumentos[2],'*',2),$met);\n $Objvista->retornar_vista(DEFAULT_CONTROLLER,'sistema','index',devuelveString($argumentos[2],'*',1),$data,$dataFormGeneral);\n }\t\n }", "title": "" }, { "docid": "33fb3d4539797bb700c5e4aae4d84321", "score": "0.6366804", "text": "static public function ctrIngresoUsuario()\n {\n # Validamos si existe una peticion Post...\n if (isset($_POST[\"ingUsuario\"])) {\n # si es así, validamos los caracteres...\n\n #Pregmatch Usuario y Password para evitar SQL Injection\n if (preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingUsuario\"]) &&\n preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"])){\n\n /* NOTE Desencriptamos la Contraseña */\n #crypt(CampoAencriptar, SALT)\n $capsula = '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$';\n $encriptar = crypt($_POST[\"ingPassword\"], $capsula);\n\n # Si se cumple la condicion...\n # Enviamos los datos a la Tabla Usuarios\n\n $tabla = \"usuarios\";\n $item = \"usuario\";\n $valor = strtolower ($_POST[\"ingUsuario\"]);\n\n $respuesta = ModeloUsuarios::MdlMostrarUsuarios($tabla, $item, $valor);\n\n \n # FIXME Validacion\n # Se comparan los valores de la DB y del Formulario..\n if($respuesta[\"usuario\"] == $valor && $respuesta[\"password\"] == $encriptar)\n {\n\n\n # FIXME Validacion Si el usuario esta activo\n \n if ($respuesta[\"estado\"] == 1) {\n\n # Puede Iniciar...\n \n # Si paso la validacion..\n # VARIABLES DE SESSION...\n $_SESSION[\"iniciarSesion\"] = \"ok\";\n $_SESSION[\"id\"] = $respuesta[\"id\"];\n $_SESSION[\"nombre\"] = $respuesta[\"nombre\"];\n $_SESSION[\"usuario\"] = $respuesta[\"usuario\"];\n $_SESSION[\"fecha\"] = $respuesta[\"fecha\"];\n $_SESSION[\"foto\"] = $respuesta[\"foto\"];\n $_SESSION[\"perfil\"] = $respuesta[\"perfil\"];\n $_SESSION[\"puesto\"] = $respuesta[\"puesto\"];\n $_SESSION[\"area\"] = $respuesta[\"area\"];\n $_SESSION['start'] = time();\n $_SESSION['expire'] = $_SESSION['start'] + (60 * 60);\n\n \n /* REVIEW REGISTRAR FECHA Y HORA DE LOGIN */\n \n date_default_timezone_set('America/Chihuahua');\n # Capturamos fecha Actual\n $fecha = date('Y-m-d');\n # Capturamos Hora Actual\n $hora = date('H:i:s');\n\n $fechaActual = $fecha.' '.$hora;\n \n # Mandamos al modelo los parametros para guardar los datos en la DB\n $item1 = \"ultimo_login\";\n $valor1 = $fechaActual;\n\n $item2 = \"id\";\n $valor2 = $respuesta[\"id\"];\n # Se hace la llamada al Modelo\n $ultimoLogin = ModeloUsuarios::mdlActualizarUsuario($tabla, $item1, $valor1, $item2, $valor2);\n \n if ($ultimoLogin == \"ok\") {\n # Podemos Iniciar...\n # Redireccionamos con un JS..\n echo '<script> window.location = \"Admin-inicio\"; </script>';\n /* echo '<script> window.location = \"Admin\"; </script>'; */\n \n\n }\n \n \n \n \n \n else {\n # Error Inesperado...\n echo '<script> \n swal({\n type: \"error\",\n title: \"¡Error Desconocido!\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\",\n closeOnConfirm: false\n\n });\n </script>';\n }\n \n\n\n \n\n } else {\n # Usuario Desactivado...\n echo '<script> \n swal({\n type: \"error\",\n title: \"¡Usuario Desactivado!\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\",\n closeOnConfirm: false\n\n });\n </script>'; \n }\n \n\n\n\n }else{\n # De lo Contrario..\n echo '<br><div class=\"alert alert-danger\">Error al Ingresar, Vuelve a Intentarlo</div>';\n }\n \n\n }\n\n }\n\n }", "title": "" }, { "docid": "cdcd9c2c0d7f02982db4f6c44449d890", "score": "0.6357623", "text": "function autentificar_usuario(){\n //si hay una coincidencia inicia la sesion\n global $pdo;\n\n /*\n buscar usuario y passwd en DB y comparar con $_POST\n según el resultado fijar la variable de sesion of mostar error\n\n $_SESSION[\"usuario\"] = role\n */\n $datos = $_REQUEST;\n if (count($_REQUEST) < 2) {\n $data[\"error\"] = \"No has rellenado el formulario correctamente\";\n return;\n }\n\n #recogemos el usuario y la contraseña\n $usuario = $_REQUEST['username'];\n $contrasenya = $_REQUEST['passwd'];\n $usuario_comillas = \"'\" .$usuario .\"'\"; \n\n global $pdo;\n $table = 'usuario';\n $query = \"SELECT username, passwd, tipo FROM $table WHERE username = $usuario_comillas;\";\n\t$atributos = $pdo->query($query)->fetchAll(\\PDO::FETCH_ASSOC);\n $cadena = '';\n foreach ($atributos as $row) {\n\n foreach ($row as $key => $val) {\n $cadena.= $val.\"#\";\n }\n }\n \n $atributos = explode( '#', $cadena );\n $aux = array_pop($atributos);\n if($usuario == null || $usuario == ''){\n $data[\"error\"] = \"No has introducido usuario\";\n print \"No has introducido usuario\";\n return;\n }\n\n else if($contrasenya == null || $contrasenya == ''){\n $data[\"error\"] = \"No has introducido contraseña\";\n print \"No has introducido contraseña\";\n return;\n }\n \n else if(count($atributos) == 0){\n print \"El usuario no está\";\n return;\n }\n\n\n else if(strcmp($usuario, $atributos[0])==0 && strcmp($contrasenya,$atributos[1])==0){\n print \"Bienvenido\";\n $_SESSION['username']=$usuario;\n $_SESSION['tipo']=$atributos[2];\n return;\n }\n\n\n \n \n\n //Comprobar que el usuario no existe\n print \"El usuario no está\";\n\n\n\n}", "title": "" }, { "docid": "413a91c39614a4673b6ae64b3cd44bc3", "score": "0.6350821", "text": "function Modificar($codigo,$nombre,$apellido,$tipodocu,$documento,$email,$telefono,$direccion,$centro,$cargo,$cifrar){\n\t\t$pdo= Conexion::Abrirbd();\n\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\n\n\n\t\t$sql=\"UPDATE usuario set usu_nom=?, usu_ape=?,usu_tipodocu=?,usu_docu=?,usu_email=?,usu_tel=?,usu_direc=?,usu_centro=?,usu_cargo=?, usu_pass=? where usu_cod=?\";\n\t\t$query=$pdo->prepare($sql);\n\t\t$query->execute(array($nombre,$apellido,$tipodocu,$documento,$email,$telefono,$direccion,$centro,$cargo,$cifrar,$codigo));\n\n\t\tConexion::Cerrarbd();\n\n\t}", "title": "" }, { "docid": "42c0b04456e0b6c16426b410299f995b", "score": "0.6339131", "text": "public function actualizarUsuario($email,$nombre,$apellidos,$rol){\r\n\r\n $update=\"UPDATE usuarios SET nombre='\".$nombre.\"',apellidos='\".$apellidos.\"',rol='\".$rol.\"' WHERE email='\".$email.\"'\";\r\n $this->realizarConsulta($update);\r\n $mostrar=\"SELECT * FROM usuarios WHERE email='\".$email.\"'\";\r\n $resultado=$this->realizarConsulta($mostrar);\r\n if ($resultado!=null) {\r\n $tabla=[];\r\n while ($fila=$resultado->fetch_assoc()) {\r\n $tabla[]=$fila;\r\n }\r\n return $tabla;\r\n }\r\n else{\r\n return null;\r\n }\r\n }", "title": "" }, { "docid": "90d40f3d0b9091521659733080dddb09", "score": "0.63364613", "text": "public function iniciarSesion(){\n \n //Tomamos esta variable para el control y funcionamiento de la uncion\n $estado_inicio_sesion = 0;\n /* 0->nada\n * 1->correcto\n * 2->contraseña incorrecta\n * 3->dato de acceso no existe\n * 4->Esta en los Preusuarios\n * \n */\n //Esta variable indica de que forma accedio el usuario, si por correo o por telefono\n $tipo_acceso = 0;\n \n //Esta variable indicara si el usuario se encuentra registrado\n $usuario_registrado = false;\n\n //Tomamos las variables recibidas desde el usuario\n $usuario_dato_acceso = $this->usuario[\"a\"];\n $usuario_contra_acceso = $this->usuario[\"c\"];\n $usuario_lenguaje_acceso = $this->usuario[\"l\"];\n \n //Dato usado para el inicio de sesion\n $acceso = \"\";\n \n //Definimos el objeto lenguaje\n $lenguaje_db = new Idiomas($usuario_lenguaje_acceso);\n \n\n //Creamos las consultas para obtener la forma de acceso\n $sql_correo = \"SELECT contrasenia, id_usuario, id_persona FROM usuario WHERE correo ='$usuario_dato_acceso';\";//sentencia de la consulta\n $sql_telefono = \"SELECT contrasenia, id_usuario, id_persona FROM usuario WHERE telefono ='$usuario_dato_acceso' OR telefono_con_codigo = '$usuario_dato_acceso'\";\n \n //Primero comprobamos para el correo\n //Ejecutamnos la consulata y comprobamos que haya sido exitosa\n $resultado_buscar_usuario_correo = mysql_query($sql_correo) or die (\"No pudo buscar el correo en la tabla usuario: \" . mysql_error());\n \n //Si el numero de filas es mayor a 0, quiere decir que si existe en la tabla usuario un correo como el recibido\n if (mysql_num_rows($resultado_buscar_usuario_correo) > 0){\n //Indicamos que el ipo de acceso fue el correo\n $tipo_acceso = 1; \n \n //obtnrmos los datos de la consulta y los almacenamos en esta variable\n $datos = mysql_fetch_assoc($resultado_buscar_usuario_correo);\n //separamos los datos de la consulta\n $usuPass = $datos[\"contrasenia\"];\n $usuID = $datos[\"id_usuario\"];\n $this->ID = $datos[\"id_persona\"];\n \n //Cambiomos el valor de esta variable para indicar que el usuario si esta registrado\n $usuario_registrado = true;\n \n //Desencriptamos la contraseña sacada para comprobarla con la recibida desde el usuario\n $contra = desencriptarContraParaBaseDatos($usuPass);\n \n //Ahora compramos que las contraseñas sean iguales\n if(strcmp($usuario_contra_acceso, $contra) == 0){\n //Puede acceder con su correo\n $estado_inicio_sesion = 1;\n \n }else{\n //contraseña incorrecta\n $estado_inicio_sesion = 2;\n }\n }else{\n //si ese correo no existe como correo en la tabla usuarios\n }\n \n \n \n //Después comprobamos para el telefono\n if($tipo_acceso == 0){\n //Ejecutamnos la consulata y comprobamos que haya sido exitosa\n $resultado_buscar_usuario_telefono = mysql_query($sql_telefono) or die (\"No pudo buscar al usuario por su telefono: \" . mysql_error());\n \n //Si el numero de filas es mayor a 0, quiere decir que si existe en la tabla usuario un telefono como el recibido\n if (mysql_num_rows($resultado_buscar_usuario_telefono) > 0){\n //Indicamos que el ipo de acceso fue el telefono\n $tipo_acceso = 2;\n \n //obtnrmos los datos de la consulta y los almacenamos en esta variable\n $datos = mysql_fetch_assoc($resultado_buscar_usuario_telefono);\n //separamos los datos de la consulta\n $usuPass = $datos[\"contrasenia\"];\n $usuID = $datos[\"id_usuario\"];\n $this->ID = $datos[\"id_persona\"];\n \n //Cambiomos el valor de esta variable para indicar que el usuario si esta registrado\n $usuario_registrado = 1;\n \n \n //Desencriptamos la contraseña sacada para comprobarla con la recibida desde el usuario\n $contra = desencriptarContraParaBaseDatos($usuPass);\n \n //Ahora compramos que las contraseñas sean iguales\n if(strcmp($usuario_contra_acceso, $contra) == 0){\n //Puede acceder con su telefono\n $estado_inicio_sesion = 1;\n }else{\n //contraseña incorrecta\n $estado_inicio_sesion = 2;\n }\n }else{\n //si ese telefono no existe como tal en la tabla usuarios\n }\n }//Fin de la comprobacion ed que no entro en el correo\n \n //Ahora hacemos esta comprobacion para saber si el usuario trato de ingresar pero no estaba registrado en la tabla}\n //usuario sino en la preusuario\n if($usuario_registrado == false){\n //Esta consulta verificara si el usuario esta en la tabla preusuarios\n $sql_veriica_preusuario = \"SELECT * FROM preusuario WHERE correo = '$usuario_dato_acceso' OR telefono = '$usuario_dato_acceso' OR telefono_con_codigo = '$usuario_dato_acceso'\";\n \n //Ejecutamos la anterior consulta\n $resultado_saber_esta_preregistrado = mysql_query($sql_veriica_preusuario) or die (\"No puedo verificar en preusuario: \". mysql_error());\n \n //Preguntamos si la consulta trajo algunas filas\n if (mysql_num_rows($resultado_saber_esta_preregistrado) > 0){\n //Si entra aqui quiere decir que esa cuenta esta preregistrada aunque no aparexca en los usuarios\n $estado_inicio_sesion = 3;\n }else{\n //Estos datos no aparecen en ninguna parte, no se ha preregistrado, o no ha confirmado ese correo o telefono en su perdil\n $estado_inicio_sesion = 4;\n }\n \n \n }\n \n switch ($estado_inicio_sesion){\n \n //Antes de imprimir se debe manejar el IDIOMA\n \n case 0:\n //No ingreso a ninguna parte no se cambio el valor de esta varibale\n echo darCodigoDeAlerta1() . $lenguaje_db->ini_alg_sal_mal . darCodigoDeAlerta2();\n break;\n case 1:\n //Fue exitoso el inicio de sesion y puede ingresar al sistema\n //echo darCodigoDeAlerta1() . $lenguaje_db->ini_adelante. darCodigoDeAlerta2();\n //Redireccionamos a la pagina principal de la aplicacion\n $_SESSION[\"ID\"] = $this->ID;\n echo \"<script>\";\n //Guardar los datos del usuario en la memoria interna...\n //Guardamos el dato de acceso\n echo \"localStorage.setItem('dus', '\".$usuario_dato_acceso .\"');\";\n //La contraseña\n echo \"localStorage.setItem('cus', '\".$usuario_contra_acceso .\"');\";\n //Guardamos el indicador de inicio de sesion\n echo \"localStorage.setItem('sav', '1');\";\n echo \"location.href = 'chat/';\";\n echo \"</script>\";\n \n //Bien, ahora lo añadimos o cambiemos su estado en la tabla de los que estan enlinea\n $this->enlinea($this->ID, 1);\n break;\n case 2:\n //La contraseña del usuario es incorrecta\n echo darCodigoDeAlerta1() . $lenguaje_db->ini_cont_incorrecta. darCodigoDeAlertaAceptar_permanecer(). darCodigoDeAlerta2();\n break;\n case 3:\n //Esta preregistrado, no ha activado la cuenta\n echo darCodigoDeAlerta1() . $lenguaje_db->ini_no_act_cuenta. darCodigoDeAlertaAceptar_permanecer() . darCodigoDeAlerta2();\n break;\n case 4:\n //Ese dato con el que quizo acceder no esta en nuestra base de datos\n echo darCodigoDeAlerta1() . $lenguaje_db->ini_cor_tel_no_existe. darCodigoDeAlertaAceptar_permanecer(). darCodigoDeAlerta2();// if($tipo_acceso == 1){echo \"Correo \";}else{echo \"Telefono\";}\n break;\n default :\n echo darCodigoDeAlerta1() . $lenguaje_db->ini_alg_sal_mal. darCodigoDeAlerta2();\n break;\n \n }\n \n \n }", "title": "" }, { "docid": "416abc49b717429c393a084612bd995b", "score": "0.6331854", "text": "public function preparaUsuario($post)\n\t\t{\n\t\t\tif( $post[\"userName\"]!=null && $post[\"userFullName\"] != null && $post[\"mail\"] != null && $post[\"password\"] != null && $post[\"password2\"] != null && $post[\"level\"] > 0 )\n\t\t\t{\n\t\t\t\tif (controlUsuario::getIdUsuario($post[\"userFullName\"]) == null ) // PREGUNTA SI EL NOMBRE DE USUARIO NO ESTA EN LA BD \n\t\t\t\t{\t\n\t\t\t\t\tif($post[\"password\"] == $post[\"password2\"] ){\n\t\t\t\t\t\t$data =array($post[\"userName\"], $post[\"userFullName\"], $post[\"mail\"],md5($post[\"password\"]), $post[\"level\"]);\n\t\t\t\t\t\t//print_r($post); die();\n\t\t\t\t\t\tcontrolUsuario::insertUsuario($data); // INSERTA EL USUARIO EN LA BD.\n\t\t\t\t\t\t$id = controlUsuario::getIdUsuario($post[\"userFullName\"]);\n\t\t\t\t\t\tif($id != null){\n\t\t\t\t\t\t\tswitch($post[\"level\"]){\n\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\t$privileges = array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"verPropiedades\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Gestion\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_download\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscar_download\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_deleteFiles\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscar_deleteFiles\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_load\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscar_load\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscarPropiedad\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Estadistica\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"rolesReport\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_print\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscar_print\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Est_print\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_exportar_excel\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Est_exportar_excel\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_exportar_pdf\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Est_exportar_pdf\"=>false\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\t$privileges = array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"verPropiedades\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Gestion\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_download\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscar_download\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_deleteFiles\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscar_deleteFiles\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_load\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscar_load\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscarPropiedad\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Estadistica\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"rolesReport\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_print\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscar_print\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Est_print\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_exportar_excel\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Est_exportar_excel\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_exportar_pdf\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Est_exportar_pdf\"=>true\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t\t$privileges = array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"verPropiedades\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Gestion\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_download\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscar_download\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_deleteFiles\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscar_deleteFiles\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_load\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscar_load\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscarPropiedad\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Estadistica\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"rolesReport\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_print\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscar_print\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Est_print\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_exportar_excel\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Est_exportar_excel\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_exportar_pdf\"=>true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Est_exportar_pdf\"=>true\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t$privileges = array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"verPropiedades\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Gestion\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_download\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscar_download\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_deleteFiles\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscar_deleteFiles\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_load\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscar_load\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscarPropiedad\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Estadistica\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"rolesReport\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_print\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"buscar_print\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Est_print\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_exportar_excel\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Est_exportar_excel\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"prop_exportar_pdf\"=>false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Est_exportar_pdf\"=>false\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcontrolUsuario::setPermisos($id, $privileges);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn -3;\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\treturn -4;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "61d1c66d33801b8c983b272e2819f408", "score": "0.6322286", "text": "public static function modificarUser() : array {\n\n\t\t$return = [\n\t\t\t\"code\" => 500,\n\t\t\t\"data\" => \"Builder not done\"\n\t\t];\n\n\t\t$data = [\n\t\t\t\"id\" => isset($_POST[\"id\"]) ? strval($_POST[\"id\"]) : \"\",\n\t\t\t\"estatus\" => isset($_POST[\"estatus\"]) ? intval($_POST[\"estatus\"]) : 2,\n\t\t\t\"access\" => isset($_POST[\"access\"]) && is_array($_POST[\"access\"]) ? $_POST[\"access\"] : []\n\t\t];\n\n\t\t$user = new User(strval($data[\"id\"]));\n\n\t\tif ($user->hasError()) {\n\n\t\t\t$return[\"data\"] = \"Error: \".$user->get(\"error\")[\"data\"];\n\t\t\t$user->cleanError();\n\t\t\treturn $return;\n\t\t}\n\n\t\t$return = $user->update($data);\n\t\t$return[\"code\"] = $return[\"rsp\"] ? 200 : 500;\n\t\tunset($return[\"rsp\"]);\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "e6599d4e191b54f45481b7f67c743feb", "score": "0.6316022", "text": "function saveUseracces() {\n\tinclude('ge_connexion.php');\n\t$id_user = clean($_POST['id_user']);\n\t$id_role = clean($_POST['id_role']);\n\t$id_acces = clean($_POST['id_acces']);\n\t\n\t// 1. GE_USER\n\tif($id_acces>0) {\n\t\t// A. Mise à jour\n\t\t$sql = \"UPDATE ge_useracces SET id_role='$id_role' WHERE id_user='$id_user' AND id_acces='$id_acces'\";\n\t\t$result = mysqli_query($connexion, $sql) or die(mysqli_error());\n\t\t\n\t} else {\n\t\t// A. Insertion d'un nouveau role\n\t\t$sql = \"INSERT INTO ge_useracces (id_user, id_role)\n\t\t\t\tVALUES ('$id_user', '$id_role')\";\n\t\t$result = mysqli_query($connexion, $sql) or die(mysqli_error());\n\t}\n}", "title": "" }, { "docid": "ffdae0768e488c58486027f16970dc2c", "score": "0.63085663", "text": "public function edit($user){ \r\n $sql = \"UPDATE usuarios SET pass=:pass,nombre_user=:nombre_user,fecha_nac=:fecha_nac,id_rol1=:id_rol1 WHERE email = :email\";\r\n $parameters[\"nombre_user\"]=$user->getName();\r\n $parameters[\"fecha_nac\"]=$user->getBirthdate(); \r\n $parameters[\"pass\"]=$user->getPassword();\r\n $parameters[\"id_rol1\"]= intval($user->getRoleLevel());\r\n $parameters[\"email\"]=$user->getEmail();\r\n try\r\n {\r\n $this->connection = Connection::getInstance();\r\n return $this->connection->ExecuteNonQuery($sql, $parameters);\r\n }\r\n catch(PDOException $ex)\r\n {\r\n throw $ex;\r\n }\r\n }", "title": "" }, { "docid": "d9036fe02278f83f12259b4fa79ac964", "score": "0.6308235", "text": "public static function mdlEditarInformacionUsuario($tabla, $datos){\n $stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET name = :name, lastname = :lastname, avatar = :avatar, birthday = :date WHERE id = :id\");\n\n $stmt->bindParam(\":id\", $datos['id'], PDO::PARAM_INT);\n $stmt->bindParam(\":name\", $datos['nombre'], PDO::PARAM_STR);\n $stmt->bindParam(\":lastname\", $datos['apellido'], PDO::PARAM_STR);\n $stmt->bindParam(\":avatar\", $datos['avatar'], PDO::PARAM_STR);\n $stmt->bindParam(\":date\", $datos['fecha'], PDO::PARAM_STR);\n\n if($stmt->execute()){\n return \"ok\";\n }else{\n return ($stmt->errorInfo());\n }\n $stmt = null;\n }", "title": "" }, { "docid": "cb9058b78032633a728aaf97f03c7d2d", "score": "0.6304217", "text": "function setUserSesssionData($oUser=false) {\n\n\n\t\tif ( $oUser ) {\n\n\t\t\t$session_data \t= array (\n\n \t'ACCOUNT_NO'\t=> $oUser->account_no,\n \t'USERNAME'\t\t=> $oUser->username,\n \t'FULL_NAME' \t=> $oUser->full_name,\n \t'EMAIL' \t=> $oUser->email_id,\n \t'USER_TYPE' => $oUser->type,\n \t'USER_ROLES' => getUserRoles( $oUser->account_no ),\n \t'ONLINE_VIA'\t=> $oUser->online_via,\n );\n\n\t\t\t$this->CI->session->set_userdata($session_data);\n\n\n\t\t\t$data = array('last_login' => date('Y-m-d H:i:s'));\n\t\t\t$this->CI->db->where('account_no', $oUser->account_no);\n\t\t\t$this->CI->db->update('users', $data);\n\t\t}\n\t}", "title": "" }, { "docid": "71e81f4e04639c4176af89c9d977cf71", "score": "0.63028246", "text": "function EditarU(){\n\n include('../config/db.php');\n $msj=\"\";\n\n if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {\n\n $usuario = $_POST['editarUsuario'];\n $clave = $_POST['editarPassword'];\n $estatus = $_POST['editarEstatus'];\n $empleado = $_POST['editarPerfil'];\n $idu = $_POST['iden'];\n\n // if(!empty($_POST['editarFoto2'])){\n\n // $imagen = $_POST['editarFoto2'];\n //}\n if($_POST['foto'] == \"\"){\n $imagen = $_POST['editarFoto2'];\n\n }else{\n $imagen = 'img/'.$_POST['foto'];\n }\n\n\n if( !empty( $usuario ) ){\n\n $usuario = htmlspecialchars( $usuario );\n $usuario = trim( $usuario );\n $user = filter_var( $usuario, FILTER_SANITIZE_STRING );\n $user = strtolower( $user );\n\n }else {\n\n $msj .= \"<li>El campo usuario no puede estar vacio</li>\";\n\n }\n\n if( !empty( $clave ) ){\n\n $clave = htmlspecialchars( $clave );\n $clave = trim( $clave );\n\n\n }else {\n\n $msj .= \"<li>El campo password no puede estar vacio</li>\";\n\n }\n\n if ( empty( $estatus ) ) {\n\n $msj .= \"<li>El usuario no se puede crear sin perfil</li>\";\n\n }\n\n if ( empty( $empleado ) ) {\n\n $msj .= \"<li>No ha seleccionado el empleado</li>\";\n\n }\n\n $statement = $conexion->prepare(\"update Usuarios set Id_empleado = ($empleado), Nombre = ('$user'),Clave =('$clave'), Nivel = ($estatus),img = ('$imagen')\n where Id_usuario = $idu\");\n $statement->execute();\n\n }\n\n\n}", "title": "" }, { "docid": "f4211ebe547db8fc4a91dcbd61922a0a", "score": "0.63015777", "text": "public function crear_usuario($nombre, $contrasena, $privilegios) {\n $sql = \"select * from usuario where nombre='\" . $nombre . \"'\";\n $resultado = $this->conexion->query($sql);\n $corrida = mysqli_fetch_array($resultado);\n//condicion para meter, o no, al usuario\n if ($corrida[0] == \"\") {\n\n date_default_timezone_set('America/Mexico_city');\n $momento = getdate();\n $momento = $momento['year'] . \"-\" . $momento['mon'] . \"-\" . $momento['mday'] . \" \" . $momento['hours'] . \":\" . $momento['minutes'] . \":\" . $momento['seconds'];\n $sql = \"INSERT INTO `usuario` (`nombre`, `creador`, `contrasena`, `momento_creacion`, `privilegios`) VALUES ('$nombre','\" . $_SESSION['id_usuario'] . \"','$contrasena', '$momento', '$privilegios')\";\n\n if ($this->conexion->query($sql)) {\n return \"Usuario creado con exito.\";\n } else {\n return \"Hubo problemas al crear el usuario, favor de intentar de nuevo.\";\n }\n } else {\n return \"Nombre de usuario ya existente.\";\n }\n }", "title": "" }, { "docid": "7eef8fd3db09d78469562b8f67c15fcf", "score": "0.63014615", "text": "public function changeuser($data = array()){\n\t\t$uid = $data['id'];\n\t\t$type = $data['type'];\n\t\t$result = array('error' => 0,'msg' => '更新失败');\n\t\t$sqlstr = 'update user_userlogin ';\n\t\t$set = \" \";\n\t\t$where = ' where 1 and id = '.$uid;\n\t\tswitch($type){\n\t\t\tcase 'freeze':\n\t\t\t\t$set = \" set status = \".$this->common_conf['userstatu']['freeze']['v'];\n\t\t\t\tbreak;\n\t\t\tcase 'unfreeze':\n\t\t\t\t$set = \" set status = \".$this->common_conf['userstatu']['normal']['v'];\n\t\t\t\tbreak;\n\t\t\tcase 'delete':\n\t\t\t\t$set = \" set status = \".$this->common_conf['userstatu']['delete']['v'];\n\t\t\t\tbreak;\n\t\t\tcase 'teacher':\n\t\t\t\t$set = \" set type = \".$this->common_conf['usertype']['teacher']['v'];\n\t\t\t\tbreak;\n\t\t\tcase 'unteacher':\n\t\t\t\t$set = \" set type = \".$this->common_conf['usertype']['student']['v'];\n\t\t\t\tbreak;\n\t\t\tcase 'master':\n\t\t\t\t$set = \" set type = \".$this->common_conf['usertype']['master']['v'];\n\t\t\t\tbreak;\n\t\t\tcase 'unmaster':\n\t\t\t\t$set = \" set type = \".$this->common_conf['usertype']['teacher']['v'];\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tdefault :\n\t\t\t\t$set = \" set type = \".$this->common_conf['usertype'][$type]['v'];\n\t\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t$sqlstr .= $set.$where;\n\t\tif($this->dbr->query($sqlstr)){\n\t\t\t$result = array('error' => 0,'msg' => '更新成功');\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "d3fc35a809bfa97c87ace1900a509be1", "score": "0.63003224", "text": "public function actualizar()\n\t{\n\t\t$registros_afectados = 0;\n\t\t//Defino el arreglo de los valores a actualizar\n\t\t$sql_update=array();\n\t\t//Descripcion para la auditoria\n\t\t$descripcion=array();\n\t\t$descripcion_antigua=\"\";//Descripcion antigua\n\t\t$descripcion_nueva=\"\";//Descripcion nueva\n\t\t\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> not_id) and !is_null($this -> not_id))\n\t\t{\n\t\t\t//Lo agrego a los campos a actualizar\n\t\t\tif(isset($this -> not_id_tipo) and !empty($this -> not_id_tipo))\n\t\t\t{\n\t\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\t\tswitch($this -> not_id_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_update[]=\"not_id = \".$this -> not_id;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el update sea efectivo\n\t\t\telse\n\t\t\t\t$sql_update[]=\"not_id = '\".$this -> not_id.\"'\";\n\t\t\t\t\n\t\t}\n\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> not_fecha) and !is_null($this -> not_fecha))\n\t\t{\n\t\t\t//Lo agrego a los campos a actualizar\n\t\t\tif(isset($this -> not_fecha_tipo) and !empty($this -> not_fecha_tipo))\n\t\t\t{\n\t\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\t\tswitch($this -> not_fecha_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_update[]=\"not_fecha = \".$this -> not_fecha;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el update sea efectivo\n\t\t\telse\n\t\t\t\t$sql_update[]=\"not_fecha = '\".$this -> not_fecha.\"'\";\n\t\t\t\t\n\t\t}\n\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> not_titulo) and !is_null($this -> not_titulo))\n\t\t{\n\t\t\t//Lo agrego a los campos a actualizar\n\t\t\tif(isset($this -> not_titulo_tipo) and !empty($this -> not_titulo_tipo))\n\t\t\t{\n\t\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\t\tswitch($this -> not_titulo_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_update[]=\"not_titulo = \".$this -> not_titulo;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el update sea efectivo\n\t\t\telse\n\t\t\t\t$sql_update[]=\"not_titulo = '\".$this -> not_titulo.\"'\";\n\t\t\t\t\n\t\t}\n\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> not_lead) and !is_null($this -> not_lead))\n\t\t{\n\t\t\t//Lo agrego a los campos a actualizar\n\t\t\tif(isset($this -> not_lead_tipo) and !empty($this -> not_lead_tipo))\n\t\t\t{\n\t\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\t\tswitch($this -> not_lead_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_update[]=\"not_lead = \".$this -> not_lead;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el update sea efectivo\n\t\t\telse\n\t\t\t\t$sql_update[]=\"not_lead = '\".$this -> not_lead.\"'\";\n\t\t\t\t\n\t\t}\n\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> not_texto) and !is_null($this -> not_texto))\n\t\t{\n\t\t\t//Lo agrego a los campos a actualizar\n\t\t\tif(isset($this -> not_texto_tipo) and !empty($this -> not_texto_tipo))\n\t\t\t{\n\t\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\t\tswitch($this -> not_texto_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_update[]=\"not_texto = \".$this -> not_texto;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el update sea efectivo\n\t\t\telse\n\t\t\t\t$sql_update[]=\"not_texto = '\".$this -> not_texto.\"'\";\n\t\t\t\t\n\t\t}\n\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> not_activo) and !is_null($this -> not_activo))\n\t\t{\n\t\t\t//Lo agrego a los campos a actualizar\n\t\t\tif(isset($this -> not_activo_tipo) and !empty($this -> not_activo_tipo))\n\t\t\t{\n\t\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\t\tswitch($this -> not_activo_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_update[]=\"not_activo = \".$this -> not_activo;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el update sea efectivo\n\t\t\telse\n\t\t\t\t$sql_update[]=\"not_activo = '\".$this -> not_activo.\"'\";\n\t\t\t\t\n\t\t}\n\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> not_nts_id) and !is_null($this -> not_nts_id))\n\t\t{\n\t\t\t//Lo agrego a los campos a actualizar\n\t\t\tif(isset($this -> not_nts_id_tipo) and !empty($this -> not_nts_id_tipo))\n\t\t\t{\n\t\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\t\tswitch($this -> not_nts_id_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_update[]=\"not_nts_id = \".$this -> not_nts_id;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el update sea efectivo\n\t\t\telse\n\t\t\t\t$sql_update[]=\"not_nts_id = '\".$this -> not_nts_id.\"'\";\n\t\t\t\t\n\t\t}\n\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> not_usu_id) and !is_null($this -> not_usu_id))\n\t\t{\n\t\t\t//Lo agrego a los campos a actualizar\n\t\t\tif(isset($this -> not_usu_id_tipo) and !empty($this -> not_usu_id_tipo))\n\t\t\t{\n\t\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\t\tswitch($this -> not_usu_id_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_update[]=\"not_usu_id = \".$this -> not_usu_id;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el update sea efectivo\n\t\t\telse\n\t\t\t\t$sql_update[]=\"not_usu_id = '\".$this -> not_usu_id.\"'\";\n\t\t\t\t\n\t\t}\n\n\n\n\t\t//Si el arreglo tiene posiciones\n\t\tif(sizeof($sql_update))\n\t\t{\n\t\t\t//Si se encuentra habilitado el log entonces registro la auditoria\n\t\t\tif(isset($this -> auditoria_tabla) and $this -> auditoria_tabla)\n\t\t\t{\n\t\t\t\t//Consulto la informacion actual antes de la actualizacion\n\t\t\t\t$noticia = $this -> consultarId($this -> getNotId());\n\t\t\t\t\t$descripcion[]=\"not_id = \".$noticia -> getNotId();\n\t\t\t\t\t$descripcion[]=\"not_fecha = \".$noticia -> getNotFecha();\n\t\t\t\t\t$descripcion[]=\"not_titulo = \".$noticia -> getNotTitulo();\n\t\t\t\t\t$descripcion[]=\"not_lead = \".$noticia -> getNotLead();\n\t\t\t\t\t$descripcion[]=\"not_texto = \".$noticia -> getNotTexto();\n\t\t\t\t\t$descripcion[]=\"not_activo = \".$noticia -> getNotActivo();\n\t\t\t\t\t$descripcion[]=\"not_nts_id = \".$noticia -> getNotNtsId();\n\t\t\t\t\t$descripcion[]=\"not_usu_id = \".$noticia -> getNotUsuId();\n\t\t\t\t$descripcion_antigua = implode(\", \", $descripcion);\n\t\t\t}\n\t\t\t\n\t\t\t//Armo el SQL para actualizar\n\t\t\t$sql=\"UPDATE noticia SET \".implode($sql_update, \", \").\" WHERE not_id = \".$this -> getNotId();\n\t\n\t\t\t//Si la ejecucion es exitosa entonces devuelvo el numero de registros afectados\n\t\t\tif($this -> getConexion() -> Execute($sql))\n\t\t\t{\n\t\t\t\t$registros_afectados=$this -> getConexion() -> Affected_Rows();\n\t\t\t\t\n\t\t\t\t//Si se actualizaron registros de la tabla\n\t\t\t\tif(isset($this -> auditoria_tabla) and $this -> auditoria_tabla and $registros_afectados)\n\t\t\t\t{\n\t\t\t\t\t//Consulto la informacion que se registro luego de la actualizacion\n\t\t\t\t\t$descripcion=array();\n\t\t\t\t\t$noticia = $this -> consultarId($this -> getNotId());\n\t\t\t\t\t\t$descripcion[]=\"not_id = \".$noticia -> getNotId();\n\t\t\t\t\t$descripcion[]=\"not_fecha = \".$noticia -> getNotFecha();\n\t\t\t\t\t$descripcion[]=\"not_titulo = \".$noticia -> getNotTitulo();\n\t\t\t\t\t$descripcion[]=\"not_lead = \".$noticia -> getNotLead();\n\t\t\t\t\t$descripcion[]=\"not_texto = \".$noticia -> getNotTexto();\n\t\t\t\t\t$descripcion[]=\"not_activo = \".$noticia -> getNotActivo();\n\t\t\t\t\t$descripcion[]=\"not_nts_id = \".$noticia -> getNotNtsId();\n\t\t\t\t\t$descripcion[]=\"not_usu_id = \".$noticia -> getNotUsuId();\n\t\t\t\t\t$descripcion_nueva = implode(\", \", $descripcion);\n\t\t\t\t\t/**\n\t\t\t\t\t * instanciacion de la clase auditoria_tabla para la creacion de un nuevo registro\n\t\t\t\t\t */\n\t\t\t\t\t$objAuditoriaTabla = new AuditoriaTabla();\n\t\t\t\t\t$objAuditoriaTabla->crearBD(\"sisgot_adodb\");\n\t\t\t\t\t$objAuditoriaTabla->setAutTabla(\"noticia\");\n\t\t\t\t\t$objAuditoriaTabla->setAutTablaId($this -> getNotId());\n\t\t\t\t\t$objAuditoriaTabla->setAutUsuId($objAuditoriaTabla -> obtenerUsuarioActual());\n\t\t\t\t\t$objAuditoriaTabla->setAutFecha(\"NOW()\", \"sql\");\n\t\t\t\t\t$objAuditoriaTabla->setAutDescripcionAntigua($descripcion_antigua);\n\t\t\t\t\t$objAuditoriaTabla->setAutDescripcionNueva($descripcion_nueva);\n\t\t\t\t\t$objAuditoriaTabla->setAutTransaccion(\"ACTUALIZAR\");\n\t\t\t\t\t$aut_id=$objAuditoriaTabla->insertar();\n\t\t\t\t\t\n\t\t\t\t\tif(!$aut_id)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"<b>Error al almacenar informacion en la tabla de auditoria_tabla</b><br/>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//return $registros_afectados;\n\t\t\t}\n\t\t\t//Sino imprimo el mensaje de error\n\t\t\telse\n\t\t\t{\n\t\t\t\techo $this -> getConexion() -> ErrorMsg().\" <strong>SQL: \".$sql.\"<br/>En la linea \".__LINE__.\"<br/></strong>\";\n\t\t\t\t$registros_afectados = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $registros_afectados;\n\t}", "title": "" }, { "docid": "0a05c85cc10be5d945e480ef22dbac67", "score": "0.62955445", "text": "public function actualizarUserController(){\n \tif (isset($_POST[\"nusuariotxtEditar\"])) {\n \t\t$_POST[\"contratxtEditar\"]=password_hash($_POST[\"ucontratxtEditar\"],PASSWORD_DEFAULT);\n\n \t\t$datosController = array(\"nusuario\"=>$_POST[\"nusuariotxtEditar\"],\"ausuario\"=>$_POST[\"ausuariotxtEditar\"],\"usuario\"=>$_POST[\"usuariotxtEditar\"],\"contra\"=>$_POST[\"ucontratxtEditar\"],\"email\"=>$_POST[\"uemailtxtEditar\"],\"id\"=>$_POST[\"iduserEditar\"],\"tipo\"=>$_POST[\"tipo\"]);\n\n\t\t\t\t$respuesta = Datos::actualizarUserModel($datosController,\"users\");\n\n\t\t\t\tif ($respuesta == \"success\") {\n\t\t\t\t\techo '\n\t\t\t\t\t\t<div class=\"col-md-6 mt-3\">\n\t\t\t\t\t\t\t<div class=\"alert alert-success alert-dismissible\">\n\t\t\t\t\t\t\t\t<h5>\n\t\t\t\t\t\t\t\t\t<i class=\"icon\">\n\t\t\t\t\t\t\t\t\tExito\n\t\t\t\t\t\t\t\t</h5>\n\t\t\t\t\t\t\t\tUsuario actualizado con exito\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t';\n\t\t\t\t}else{\n\t\t\t\t\techo '\n\t\t\t\t\t\t<div class=\"col-md-6 mt-3\">\n\t\t\t\t\t\t\t<div class=\"alert alert-danger alert-dismissible\">\n\t\t\t\t\t\t\t\t<h5>\n\t\t\t\t\t\t\t\t\t<i class=\"icon\">\n\t\t\t\t\t\t\t\t\tError\n\t\t\t\t\t\t\t\t</h5>\n\t\t\t\t\t\t\t\tSe ha producido un error al momento de actualizar un usuario\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t';\n\t\t\t\t}\n \t}\n }", "title": "" }, { "docid": "b2ff816e33f10b11c110020d820e4aec", "score": "0.6284517", "text": "function userMetaClasseSave($userId) {\n if (!current_user_can('edit_user', $userId)) {\n return;\n }\n \n update_user_meta($userId, 'classe', $_REQUEST['user_classe']);\n }", "title": "" }, { "docid": "e65c133e7f0b997ca8c7fdb2d152a85d", "score": "0.6283804", "text": "private function updateUser(): void\n {\n if (!$this->user) {\n $this->user = new Student();\n }\n $this->user->setName(Util::mbUcfirst(trim(strval($_POST['name']))));\n $this->user->setSurname(Util::mbUcfirst(trim(strval($_POST['surname']))));\n $this->user->setGroupNumber(trim(strval($_POST['groupNumber'])));\n $this->user->setExamPoints(intval($_POST['examPoints'], 10));\n $this->user->setGender(strval($_POST['gender']));\n $this->user->setEmail(trim(strval($_POST['email'])));\n $this->user->setYear(intval($_POST['year'], 10));\n $this->user->setResidence(strval($_POST['residence']));\n }", "title": "" }, { "docid": "96e3ac5920393aec7a6e6bb8f23cf2c7", "score": "0.62550193", "text": "public function datos_usuario_controlador($tipo, $id)\n {\n $tipo = mainModel2::limpiar_cadena($tipo);\n $id = mainModel2::decryption($id);\n $id = mainModel2::limpiar_cadena($id);\n\n return usuarioModelo2::datos_usuario_modelo($tipo, $id);\n }", "title": "" }, { "docid": "2ff735edfcef1b2fa44c4eedee957611", "score": "0.6251057", "text": "public function editarUsuario($dni,$nombre,$apellidos,$telefono,$email,$idRestaurante,$idUsuario){\n $bd = BD::getConexion();\n $select = \"UPDATE usuarios SET dni = :dni\"\n . \",nombre = :nombre\"\n . \",apellidos = :apellidos\"\n . \",telefono = :telefono\"\n . \",email = :email\"\n . \",idRestaurante = :idRestaurante\"\n . \" WHERE idUsuario = :idUsuario\";\n $sentencia = $bd->prepare($select);\n $sentencia->execute([\":dni\" => $dni, \":nombre\" => $nombre, \":apellidos\" => $apellidos,\n \":telefono\" => $telefono, \":email\" => $email, \":idRestaurante\" => $idRestaurante,\n \":idUsuario\" => $idUsuario]);\n //recupero el usuario para mantener la sessión del mismo\n $bd2 = BD::getConexion();\n $sentencia2 = $bd2->prepare(\"SELECT * FROM usuarios WHERE idUsuario = \".$idUsuario);\n $sentencia2->execute();\n $sentencia2->setFetchMode(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'usuarios');\n $usuario = $sentencia2->fetch();\n return $usuario;\n }", "title": "" }, { "docid": "ad9a59e651895680bb6372f78596c373", "score": "0.62501186", "text": "public function editarUser($id,$datos){\n\t\t$this->_db->query(\"UPDATE usuarios SET `pass` = '\".Hash::getHash('sha1', $datos['password'], HASH_KEY).\"' WHERE `id` = \".$id);\n\t}", "title": "" }, { "docid": "5908aaa1599ea63955f4e35ee46d00e0", "score": "0.6238849", "text": "function opcion__cambiar_clave_usuario($datos=\\NULL)\n {\n if (! isset($datos)) {\n $datos = $this->get_parametros();\n }\n\n if (! isset($datos['-u']) || trim($datos['-u']) == '') {\n $this->consola->mensaje('No se especifico usuario, use el parametro -u');\n exit(-1);\n }\n $usuario = trim($datos['-u']);\n if (\\strtolower($usuario) == 'toba') {\n $this->consola->mensaje('No se puede cambiar la clave del usuario administrador');\n toba::logger()->debug('Se intento modificar la clave del usuario \"toba\"');\n exit(-1);\n }\n\n $clave = $this->definir_clave_usuario_admin($datos); //Reuso metodo para leer archivo de clave\n if (is_null($clave)) {\n $this->consola->mensaje('Ohh wait, no se procede...clave no valida!', true);\n exit(-1);\n }\n\n define('apex_pa_proyecto', 'toba_usuario'); //Define arbritrariamente para poder acceder al runtime\n if (! toba_usuario::existe_usuario($usuario)) {\n $this->consola->mensaje('Usuario inexistente!', true);\n exit(-1);\n }\n\n toba_usuario::set_clave_usuario($clave, $usuario);\n }", "title": "" }, { "docid": "cb5b078c917ff1fe816b5c49d5789df4", "score": "0.6236628", "text": "function ModificaUsuario($registro, $cod)\r\n{\r\n\t$bd = Db::getInstance();\r\n\r\n\t/* Ejecutamos la query */\r\n\t$bd->Modificar('usuarios', $registro, $cod);\r\n}", "title": "" }, { "docid": "4cf70831eb4b3b809d4e2c13933b9716", "score": "0.62288517", "text": "function AlteraUsuario($id)\n{\n\t$user = new Usuarios();\n\t\n\t$_nome = null;\n\t$_login = null;\n\t$_grupo = null;\n\t$_email = null;\n\t\n\tif (isset($_POST['USR_NAME']))\n\t{\n\t\t$_nome = $_POST['USR_NAME'];\t\n\t}\n\tif (isset($_POST['USR_GRUPO']))\n\t{\n\t\t$_grupo = $_POST['USR_GRUPO'];\t\n\t}\n\tif (isset($_POST['USR_MAIL']))\n\t{\n\t\t$_email = $_POST['USR_MAIL'];\t\n\t}\n\t\n\t$result = $user->AlteraUsuario($id, $_nome, $_email, $_grupo);\n\t\n\tif ($result == TRUE)\n\t{\n\t\theader(\"location: ../usuarios.php?status=success\");\t\n\t}\n\telse\n\t{\n\t\theader(\"location: ../usuarios.php?status=error\");\t\t\n\t}\n\t\n\treturn;\n}", "title": "" }, { "docid": "d5e7b79873edee3f223054c4c2badfa0", "score": "0.622876", "text": "public function updateVentaPriv($datos){\n //print_r($datos);\n $util = new Utilitarios();\n date_default_timezone_set('America/La_Paz');\n $fecha_actual = date(\"y-m-d H:i:s\");\n $valores['vent_prof_cab_usr_baja'] = $_SESSION['login'];\n $valores['vent_prof_cab_fech_hr_baja'] = $fecha_actual;\n $id_unico=$datos['cod_unico_cot_det'];\n $condicion = \"vent_prof_cab_cod_unico='\".$id_unico.\"'\";\n $this->mysql->update('vent_prof_cab', $valores, $condicion);\n \n $login=$_SESSION['login']; \n $valor['vent_prof_cab_cod_unico']=$datos['cod_unico_cot_det'];\n $valor['vent_prof_cab_cod_prof']=$datos['cod_cot_det']; \n $valor['vent_prof_cab_cod_cliente']=$datos['cod_unico_cliente_det']; \n $valor['vent_prof_cab_cod_operador']=$datos['cod_unico_op_det']; \n $valor['vent_prof_cab_tipo_cot']=2; \n $valor['vent_prof_cab_nit_cliente']=$datos['nit'];\n $valor['vent_prof_cab_forma_pago']=$datos['forma_pago_det'];\n $valor['vent_prof_cab_fech_cot']=$util->cambiaf_a_mysql($datos['txt_vent_fch_inc_proforma_det']);\n $valor['vent_prof_cab_fech_entrega_cot']=$util->cambiaf_a_mysql($datos['txt_vent_fch_entr_proforma_det']);\n $valor['vent_prof_cab_nom_cotizado']=$datos['txt_vent_cotizador_proforma_det'];\n $valor['vent_prof_cab_usr_alta']=$_SESSION['login'];\n $valor['vent_prof_cab_fech_hr_alta']=$util->cambiaf_a_mysql($_SESSION['fec_proc']);\n\n if($this->mysql->insert('vent_prof_cab', $valor)){\n $json_res['completo'] = true;\n $json_res['id_prof'] = $valor['vent_prof_cab_cod_unico'];\n }else{\n $json_res['completo'] = false;\n }\n print_r(json_encode($json_res));\n \n }", "title": "" }, { "docid": "23eed6aa852db1bc07ff2f3f243fc1ce", "score": "0.62257206", "text": "public function guardar()\n\t{\n\t\t// Crear una instancia de la conexion\n\t\t$conexion = new Conexion;\n\n\t\t// Comprobar si es un registro nuevo o uno ya existente\n\t\tif ($this->update) {\n\n\t\t\t// Preparar la sentencia para actualizar el usuario en la bd\n\t\t\t$sentencia = $conexion->conn->prepare(\"UPDATE usuarios SET apellido= ?, cedula= ?, celular= ?, ciudad= ?, contrasena= ?, correo= ?, direccion= ?, nombre= ?, rol_id= ? WHERE id= ?\");\n\n\t\t\t// Pasar los campos del objecto a la sentencia\n\t\t\t$sentencia->bind_param(\n\t\t\t\t\t'sissssssii',\n\t\t\t\t\t$this->apellido,\n\t\t\t\t\t$this->cedula,\n\t\t\t\t\t$this->celular,\n\t\t\t\t\t$this->ciudad,\n\t\t\t\t\t$this->contrasena,\n\t\t\t\t\t$this->correo,\n\t\t\t\t\t$this->direccion,\n\t\t\t\t\t$this->nombre,\n\t\t\t\t\t$this->rol_id,\n\t\t\t\t\t$this->id\n\t\t\t);\n\n\t\t} else {\n\n\t\t\t// Preparar la sentencia para isertar el usuario en la bd\n\t\t\t$sentencia = $conexion->conn->prepare(\"INSERT INTO usuarios VALUES (null, ?, ?, ?, ?, ?, ?, ?, ?, ?)\");\n\n\t\t\t// Pasar los campos del objecto a la sentencia\n\t\t\t$sentencia->bind_param(\n\t\t\t\t\t'sissssssi',\n\t\t\t\t\t$this->apellido,\n\t\t\t\t\t$this->cedula,\n\t\t\t\t\t$this->celular,\n\t\t\t\t\t$this->ciudad,\n\t\t\t\t\t$this->contrasena,\n\t\t\t\t\t$this->correo,\n\t\t\t\t\t$this->direccion,\n\t\t\t\t\t$this->nombre,\n\t\t\t\t\t$this->rol_id\n\t\t\t);\n\t\t}\n\n\t\t\n\t\t// Ejecutar la sentencia\n\t\tif ( $sentencia->execute() ) {\n\n\t\t\t// Devolver un uno si fue un exito\n\t\t\treturn 1;\n\t\t} else {\n\n\t\t\t// Devolver un 0 si ocurrio un error\n\t\t\treturn 0;\n\t\t}\n\n\t}", "title": "" }, { "docid": "b06b15d3f1e4cec20e721f82e5811bc2", "score": "0.62211293", "text": "public function actualizar() {\r\n $sql = \"select nombre_grupo from grupo where id = :id\";\r\n $query = $this->getDb()->prepare($sql);\r\n $query->execute(array(':id' => $this->getRol()));\r\n $rol_name = $query->fetch(PDO::FETCH_ASSOC);\r\n $sql = 'UPDATE usuario '\r\n . 'SET username = :username, clave = :clave, rol = :rol '\r\n . 'WHERE id = :id';\r\n $query = $this->getDb()->prepare($sql);\r\n return $query->execute(array(\":username\" => $this->getUsername(),\r\n \":clave\" => $this->getClave(),\r\n \":rol\" => $rol_name['nombre_grupo'],\r\n \":id\" => $this->getId()));\r\n }", "title": "" }, { "docid": "2182ca45031e9885b49202fbc81cb6d7", "score": "0.62136346", "text": "public function guardarUsuario()\n {\n try{\n $query = $this->con->prepare('INSERT INTO users (usu_nombre,usu_usuario, usu_password,usu_direccion,usu_tipo) VALUES (?,?,?,?,?)');\n $query->bindParam(1, $this->nombre, PDO::PARAM_STR);\n $query->bindParam(2, $this->username, PDO::PARAM_STR);\n $query->bindParam(3, $this->password, PDO::PARAM_STR);\n $query->bindParam(4, $this->direccion, PDO::PARAM_STR);\n $query->bindParam(5, $this->tipo, PDO::PARAM_STR);\n $query->execute();\n $this->con->close();\n }\n catch(PDOException $e)\n {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "c276a2afcf9cdd889c30ece36791bc42", "score": "0.6211247", "text": "function editarUsuarioPost($conn, $UserId)\n{ /* Recogemos todas las variables enviadas por POST */\n $name = $_POST['name'];\n $email = $_POST['email'];\n $password = $_POST['password'];\n $address = $_POST['address'];\n $city = $_POST['city'];\n $state = $_POST['state'];\n $postalCode = $_POST['postalCode'];\n $lastAccess = date('Y-m-d');\n\n if ($_POST['birthDate']) {/* Si se ha enviado una fecha de nacimiento */\n $birthDate = $_POST['birthDate'];\n $query = \"UPDATE user SET \n BirthDate='$birthDate', \n Email='$email', \n Address='$address', \n PostalCode='$postalCode', \n Password='$password', \n City='$city', \n State='$state', \n FullName='$name', \n LastAccess = '$lastAccess' \n WHERE UserId = $UserId \";\n } else {/* Si no se ha enviado fecha de nacimiento */\n $query = \"UPDATE user SET \n BirthDate=null, \n Email='$email', \n Address='$address', \n PostalCode='$postalCode', \n Password='$password', \n City='$city', \n State='$state', \n FullName='$name', \n LastAccess = '$lastAccess' \n WHERE UserId = $UserId \";\n };\n\n if (mysqli_query($conn, $query)) {/* Si se actualiza correctamente el usuario mostramos este mensaje*/\n $_SESSION['message'] = 'Usuario Actualizado.';\n $_SESSION['message_type'] = 'info';\n header(\"Location: ListaUsuario.php\");\n die();\n } else {/* Si no se actualiza correctamente el usuario mostramos este mensaje */\n $_SESSION['message'] = 'Error en la actualización.';\n $_SESSION['message_type'] = 'danger';\n header(\"Location: ListaUsuario.php\");\n die();\n }\n}", "title": "" }, { "docid": "a2b87e5a2e6fa13457fda7eccc50a614", "score": "0.6209771", "text": "function crearUpdateUser($condicion, $_POST , $HTTP_POST_FILES )\n {\n global $BaseDatos, $link;\n #Insertar el usuario en la base de datos MySQL\n $this->OptieneUserLink($condicion);\n $this->OptieneUserMy($_POST);\n /*if($this->user_exists($this->UsuarioMy) and $this->UsuarioMy!=$this->_UsuarioMy){\n mensaje(\"El usuario ya existe\");\n location(\"?0=0\");\n exit();\n }*/\n mysql_select_db(\"mysql\");\n// $sqlUser = \" UPDATE user SET Host='%',User='$this->UsuarioMy',Select_priv='N',Insert_priv='N',Update_priv='N',Delete_priv='N',Password=PASSWORD('$this->PassMy') WHERE Host='%' AND User='$this->_UsuarioMy' \";\n $sqlUser = \"INSERT INTO user (Host,User,Password,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Reload_priv,Shutdown_priv,Process_priv,File_priv,Grant_priv,References_priv,Index_priv,Alter_priv,Show_db_priv,Super_priv,Create_tmp_table_priv,Lock_tables_priv,Execute_priv,Repl_slave_priv,Repl_client_priv,Create_view_priv,Show_view_priv,Create_routine_priv,Alter_routine_priv,Create_user_priv,ssl_type,ssl_cipher,x509_issuer,x509_subject,max_questions,max_updates,max_connections,max_user_connections)\n VALUES ('%', '$this->UsuarioMy' , PASSWORD('$this->PassMy') , 'Y' , 'Y' , 'Y' , 'Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','','','','','') ON DUPLICATE KEY UPDATE User='$this->_UsuarioMy' ,Password=PASSWORD('$this->PassMy') ,Select_priv='Y',Insert_priv='Y',Update_priv='Y',Delete_priv='Y' \";\n \n mysql_query($sqlUser);\n mysql_query(\"FLUSH PRIVILEGES;\");\n\n $sqlGrant = \"GRANT SELECT , INSERT , UPDATE , DELETE ON `$BaseDatos` . * TO '$this->UsuarioMy'@'%' IDENTIFIED BY '$this->PassMy' \" ;\n mysql_query($sqlGrant);\n mysql_query(\"FLUSH PRIVILEGES;\");\n\n if($_POST['sIdGrupo']=='INTEL-CODE'){\n $sql = \"GRANT SELECT , INSERT , UPDATE , DELETE ON `mysql` . * TO '$this->UsuarioMy'@'%' IDENTIFIED BY '$this->PassMy' ;\" ;//IDENTIFIED BY '$this->PassMy'\n mysql_query($sql);\n mysql_query(\"FLUSH PRIVILEGES;\");\n }\n ##LLamar a la funcion de la clase base\n \n #mysql_select_db(\"intelcode\");\n #$this->crearUpdate($condicion, $_POST , $HTTP_POST_FILES );\n \n #mysql_select_db(\"inteligent\");\n\n mysql_query(\"update usersdb.usersdb set sIdUsuario='$this->UsuarioMy' where sIdUsuario='$this->_UsuarioMy'\");\n mysql_select_db($BaseDatos,$link);\n $this->crearUpdate($condicion, $_POST , $HTTP_POST_FILES );\n }", "title": "" }, { "docid": "390134db2b18b0e4e12880992686f6f7", "score": "0.6205738", "text": "function modificar($alumnoNuevo){\n\n $this->mysqli = conectarBD(); \n if($alumnoNuevo->getApellidos() != null){\n $sql= \"UPDATE Alumno SET Apellidos='\".$alumnoNuevo->getApellidos().\"' WHERE DNI='\".$alumnoNuevo->getDni().\"';\";\n $this->mysqli->query($sql);\n }\n if($alumnoNuevo->getNombre() != null){\n $sql= \"UPDATE Alumno SET Nombre='\".$alumnoNuevo->getNombre().\"' WHERE DNI='\".$alumnoNuevo->getDni().\"';\";\n $this->mysqli->query($sql);\n }\n\n if($alumnoNuevo->getDireccion() != null){\n $sql= \"UPDATE Alumno SET Direccion='\".$alumnoNuevo->getDireccion().\"' WHERE DNI='\".$alumnoNuevo->getDni().\"';\";\n $this->mysqli->query($sql);\n }\n if($alumnoNuevo->getEmail() != null){\n $sql= \"UPDATE Alumno SET Email='\".$alumnoNuevo->getEmail().\"' WHERE DNI='\".$alumnoNuevo->getDni().\"';\";\n $this->mysqli->query($sql);\n }\n if($alumnoNuevo->getNacimiento() != null){\n $sql= \"UPDATE Alumno SET Fecha_Nacimiento='\".$alumnoNuevo->getNacimiento().\"' WHERE DNI='\".$alumnoNuevo->getDni().\"';\";\n $this->mysqli->query($sql);\n }\n if($alumnoNuevo->getProfesion() != null){\n $sql= \"UPDATE Alumno SET Profesion='\".$alumnoNuevo->getProfesion().\"' WHERE DNI='\".$alumnoNuevo->getDni().\"';\";\n $this->mysqli->query($sql);\n }\n if($alumnoNuevo->getObservaciones() != null){\n $sql= \"UPDATE Alumno SET Observaciones='\".$alumnoNuevo->getObservaciones().\"' WHERE DNI='\".$alumnoNuevo->getDni().\"';\";\n $this->mysqli->query($sql);\n }\n\n return \"modificacion exito\";\n }", "title": "" }, { "docid": "27ae6b5da36d2dd34f1b761f81fe5571", "score": "0.6203689", "text": "public function setUser(){\n $session = \\Singleton::Session();\n if($session->isLogged()){ // solo se l'utente e' loggato fa queste cose\n $userType = $session->getUser()->getRuolo(); // restituisce UtenteRegistrato, Amministratore,Gestore, Corriere, ecc\n $this->smarty->assign('logged', $session->getUser()->getRuolo());\n $this->smarty->assign('username', $session->getUser()->getUsername());\n }else\n $this->smarty->assign('logged', FALSE);\n }", "title": "" }, { "docid": "16dd71d2bf17be61e1d1e54b1452a61e", "score": "0.61984783", "text": "public function setlogado() {\n if (isset($_SESSION['dmrlogin']) && (!empty($_SESSION['dmrlogin']))) {\n $id = $_SESSION['dmrlogin'];\n $sql = \"SELECT * FROM corretores WHERE id = :id \";\n $sql=$this->db->prepare($sql);\n $sql->bindValue(':id',$id);\n \n $sql->execute();\n if ($sql->rowCount() > 0) {\n $this->userInfo = $sql->fetch();\n }\n }\n }", "title": "" }, { "docid": "610bd35945e50e376a6527df9575606d", "score": "0.6197756", "text": "static public function ctrIngresoUsuario(){\n\n\t\tif(isset($_POST[\"ingUsuario\"])){\n\n\t\t\tif(preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingUsuario\"])){\n\n\t\t\t \t$encriptar = crypt($_POST[\"ingPassword\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\n\t\t\t\t$tabla = \"usuarios\";\n\n\t\t\t\t$item = \"usuario\";\n\t\t\t\t$valor = $_POST[\"ingUsuario\"];\n\n\t\t\t\t$respuesta = ModeloUsuarios::MdlMostrarUsuarios($tabla, $item, $valor);\n\t\t\t\t//var_dump($respuesta);\n\n\n\t\t\t\tif($respuesta[\"usuario\"] == $_POST[\"ingUsuario\"] && $respuesta[\"password\"] == $encriptar){\n\n\t\t\t\t\tif($respuesta[\"estado\"] == 1){\n\n\t\t\t\t\t\t$_SESSION[\"iniciarSesion\"] = \"ok\";\n\t\t\t\t\t\t$_SESSION[\"id\"] = $respuesta[\"id\"];\n\t\t\t\t\t\t$_SESSION[\"nombre\"] = $respuesta[\"nombre\"];\n\t\t\t\t\t\t$_SESSION[\"usuario\"] = $respuesta[\"usuario\"];\n\t\t\t\t\t\t$_SESSION[\"foto\"] = $respuesta[\"foto\"];\n\t\t\t\t\t\t$_SESSION[\"rol\"] = $respuesta[\"rol\"];\n\t\t\t\t\t\t$_SESSION[\"sucursal\"] = $respuesta[\"sucursal\"];\n\n\t\t\t\t\t\t\t\t/*=============================================\n\t\t\t\t\t\tREGISTRAR FECHA PARA SABER EL ÚLTIMO LOGIN\n\t\t\t\t\t\t=============================================*/\n\n\t\t\t\t\t\tdate_default_timezone_set('America/Bogota');\n\n\t\t\t\t\t\t$fecha = date('Y-m-d');\n\t\t\t\t\t\t$hora = date('H:i:s');\n\n\t\t\t\t\t\t$fechaActual = $fecha.' '.$hora;\n\n\t\t\t\t\t\t$item1 = \"ultimo_login\";\n\t\t\t\t\t\t$valor1 = $fechaActual;\n\n\t\t\t\t\t\t$item2 = \"id\";\n\t\t\t\t\t\t$valor2 = $respuesta[\"id\"];\n\n\t\t\t\t\t\t$ultimoLogin = ModeloUsuarios::mdlActualizarUsuario($tabla, $item1, $valor1, $item2, $valor2);\n\n\t\t\t\t\t\tif($ultimoLogin == \"ok\"){\n\n\t\t\t\t\t\t\t\n\t\t \t echo'<script>\n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t title: \"¡Bienvenido '.$_POST[\"ingUsuario\"].'\",\n\t\t\t\t\t\t\t text: \"¡Vamos a trabajar!\",\n\t\t\t\t\t\t\t type: \"success\",\n\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\n\t\t\t\t\t </script>';\n\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\t\n\t\t\t\t\techo'<script>\n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t icon:\"error\",\n\t\t\t\t\t\t\t\t title: \"¡El usuario aún no está activado!\",\n\t\t\t\t\t\t\t\t type: \"error\",\n \t\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n \t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t</script>';\n\n\t\t\t\t\t}\n\n\t\t\t\t}else{\n\n\t\t\t\t\t\n\t\t\t\t\techo'<script>\n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t icon:\"error\",\n\t\t\t\t\t\t\t\t title: \"¡ERROR AL INGRESAR!\",\n\t\t\t\t\t\t\t\t text: \"¡Por favor revise que el email exista o la contraseña coincida con la registrada!\",\n\t\t\t\t\t\t\t\t type: \"error\",\n \t\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t</script>';\n\n\t\t\t\t}\n\n\n\n\t\t\t}\t\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "e730a4d91378bfc8a08b70c48b37c84f", "score": "0.61940444", "text": "public function ValUser($usuario, $password)\r\n {\r\n $query=mysqli_query($this->db, \"SELECT * FROM usuarios WHERE usuario = '$usuario' AND contrasena = SHA1('$password') ;\");\r\n\r\n if($query== FALSE)\r\n {\r\n echo \"<center> Sentencia incorrecta, datos no encontrados </center>\";\r\n }\r\n else{\r\n while($fila=mysqli_fetch_assoc($query))\r\n { \r\n $date = date(\"Y-m-d H:i:s\");\r\n $usuarios[]=$fila;\r\n foreach($usuarios as $dato) {\r\n $id = $dato['id_usuario'];\r\n $queryupd=mysqli_query($this->db, \"UPDATE usuarios SET ultima_sesion_usuario = '$date' WHERE id_usuario = '$id';\");\r\n }\r\n return 1;\r\n }\r\n return 0;\r\n }\r\n }", "title": "" }, { "docid": "52f38207173635173cc0060601ca919e", "score": "0.61931914", "text": "public function crearUsuario($User,$nombreUsuario,$claveUsuario,$ApellidoUsuario,$TipoDocumentoUsuario,$DocumentoUsuario,$TipoUsuario,$EspecialidadUsuario){\r\n \t\t\r\n \t\trequire(\"../../mc/Modelo/Conexion.php\"); //Llama al archivo que contiene la variable de conexion\r\n \t\tglobal $enlace; //Llama la variable global conexion\r\n \t\t\r\n \t\t$this->User = $User;\r\n \t\t$this->nombreUsuario = $nombreUsuario;\r\n \t\t$this->claveUsuario = $claveUsuario;\r\n \t\t$this->ApellidoUsuario=$ApellidoUsuario; \r\n \t\t$this->TipoDocumentoUsuario=$TipoDocumentoUsuario;\r\n \t\t$this->DocumentoUsuario=$DocumentoUsuario;\r\n \t\t$this->TipoUsuario = $TipoUsuario;\r\n \t\t$this->EspecialidadUsuario=$EspecialidadUsuario;\r\n \t\t\r\n \t\t$resultado = mysqli_query($enlace,\"select * from usuario\") or die(mysqli_error($enlace)); /*Declara la variable \r\n \t\tresultado como un query de mysql */\r\n \t\t$query = \"Insert into usuario (User, Password, nombreUsuario, apellidoUsuario, tipoDocUsuario, docUsuario, estadoUsuario, tipoUsuario, especialidadUsuario) values ('$this->User', '$this->claveUsuario', '$this->nombreUsuario', '$this->ApellidoUsuario', '$this->TipoDocumentoUsuario', $this->DocumentoUsuario, 1, '$this->TipoUsuario', '$this->EspecialidadUsuario');\"; //Establece la variable (query) como un query que registra\r\n \t\t\r\n \t\tif(mysqli_query($enlace, $query)){ //Determina si el query da true, es decir se registra correctamente\r\n \t\t\tprint(\"<script>alert('Usuario creado correctamente');;window.location.href='../../Inicio.php';</script>\"); //Alerta en JavaScript que anunca que se creo\r\n \t\t} else {\t\t\t\r\n \t\t\techo mysqli_error($enlace); //Muestra el error de sql \r\n \t\t}\r\n\r\n \t}", "title": "" }, { "docid": "952a30f05e415226748677c28375b582", "score": "0.61926347", "text": "public function modificar ($pk, $objeto) {\n $db = new Database();\n //Array de los datos de $pk\n $modRol = $objeto->consultar($pk);\n \n $oldName = $modRol['rolName'];\n $newName = $objeto->rolName;\n $oldDesc = $modRol['descripcion'];\n $newDesc = $objeto->descripcion;\n \n $newDesc = $objeto->descripcion;\n if ($oldDesc != $newDesc){\n $sql = 'UPDATE Rol SET DescRol= \\''. $newDesc . '\\' WHERE NombreRol = \\'' . $oldName . '\\'' ;\n\n $db->consulta($sql) or die('Error al modificar la descripcion');\n }\n \n //Actualizar usuarios asociados al rol\n //Array asociativo con los usuarios antes de modificar\n $arrayOldUsu = $this->getUsu($pk);\n \n //Crear el array con los usuarios modificados\n $arrayNewUsu = $objeto->usuarios;\n \n //Comparar si hay nuevos usuarios recorriendo $newUsuarios\n foreach ($arrayNewUsu as $new){\n $resultado = $db->consulta('SELECT Login FROM Usu_Rol WHERE Login = \\'' . $new . '\\' AND NombreRol = \\'' . $pk . '\\'');\n //Si las filas es igual a 0, no existe, por lo tanto es nuevo\n if( mysqli_num_rows($resultado) == 0 ){\n $db->consulta('INSERT INTO Usu_Rol (Login, NombreRol) VALUES (\\''. $new .'\\',\\''. $pk .'\\')');\n }\n }\n \n //Comparar si hay usuarios a eliminar recorriendo $arrayOldUsu\n foreach ($arrayOldUsu as $old){\n //Comprobar si el usuario está en $arrayNewUsu\n $cont=0;\n foreach($arrayNewUsu as $new){\n if($new == $old['Login']) $cont++;\n }\n //Si las filas(cont) es igual a 0, no existe, por lo tanto hay que eliminarlo\n if( $cont == 0 ){\n $db->consulta('DELETE FROM Usu_Rol WHERE Login = \\'' . $old['Login'] . '\\' AND NombreRol = \\'' . $pk . '\\'');\n }\n }\n \n //Actualizar funcionalidades asociadas al rol\n //Crear un array asociativo con las funcionalidades sin modificar\n $arrayOldFunc = $this->getFunc($pk);\n \n //Crear el array asociativo con las nuevas funcionalidades\n $arrayNewFunc = $objeto->funcionalidades;\n \n //Comparar si hay nuevas funcionalidades recorriendo $arrayNewFunc\n foreach ($arrayNewFunc as $new){\n $resultado = $db->consulta('SELECT NombreFun FROM Rol_Fun WHERE NombreFun = \\'' . $new . '\\' AND NombreRol = \\'' . $pk . '\\'');\n //Si las filas es igual a 0, no existe, por lo tanto es nueva\n if( mysqli_num_rows($resultado) == 0 ){\n $db->consulta('INSERT INTO Rol_Fun (NombreRol, NombreFun) VALUES (\\''. $pk .'\\',\\''. $new .'\\')');\n }\n }\n \n //Comparar si hay funcionalidades a eliminar recorriendo $arrayOldFunc\n foreach ($arrayOldFunc as $old){\n //Comprobar si la funcionalidad está en $arrayNewFunc\n $cont=0;\n foreach($arrayNewFunc as $new){\n if($new == $old['NombreFun']) $cont++;\n }\n //Si las filas(cont) es igual a 0, no existe, por lo tanto hay que eliminarla\n if( $cont == 0 ){\n $db->consulta('DELETE FROM Rol_Fun WHERE NombreFun = \\'' . $old['NombreFun'] . '\\' AND NombreRol = \\'' . $pk . '\\'');\n }\n }\n \n $result = true;\n \n $existeNombre = $this->exists($newName);\n //Si el nombre nuevo no esta vacio y no existe en la BD\n if(strcmp($newName, \"\")!== 0 && $existeNombre == false){\n $result = false;\n $sql = 'UPDATE Rol SET NombreRol= \\'' . $newName . '\\' WHERE Rol.NombreRol = \\'' . $oldName . '\\'';\n $result = $db->consulta($sql) or trigger_error(mysqli_error().\" in \".$sql);\n }\n $db->desconectar();\n \n if ($result == TRUE)\n return true;\n else return false;\n }", "title": "" }, { "docid": "ee2738c21a10bbe5d3b46794bbc62734", "score": "0.6190993", "text": "public function cadastrarUsuario($usuario) {\n \n if($usuario->{'email'} == '' || $usuario->{'email'} == null){\n return'Erro: Preencha um Email!!';\n }\n if($usuario->{'fullname'} == '' || $usuario->{'fullname'} == null){\n return'Erro: Preencha o Nome Completo!!';\n }\n if($usuario->{'username'} == '' || $usuario->{'username'} == null){\n return'Erro: Preencha o usuário!!';\n }\n if($usuario->{'password'} == '' || $usuario->{'password'} == null){\n return'Erro: Preencha a Senha!!';\n }\n if (!preg_match('/^[a-z\\d_]{4,28}$/i', $usuario->{'username'})) {\n return \"Usuario invalido: De 4 a 28 caracteres, alfanuméricos e acentuados:!\";\n }\n if (!preg_match(\n '/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/',\n $usuario->{'email'})) {\n return \"Email Inválido.\";\n }\n if(!preg_match( '/[0-9]/' , $usuario->{'password'}) || !preg_match( '/[^A-Z]/' , $usuario->{'password'}) || !preg_match( '/[a-z]/' , $usuario->{'password'}) ) {\n return \"Senha Invalida: Pelo menos uma letra minúscula, uma letra maiúscula e números.\";\n }\n \n $this->setEmail($usuario->{'email'});\n $this->setNomeCompleto($usuario->{'fullname'});\n $this->setUsuario($usuario->{'username'});\n $this->setSenha($usuario->{'password'});\n \n if($this->getUsuario()){\n $where = \"and user = '\".$this->getUsuario().\"'\";\n $result = $this->contarLinhas($where);\n if($result != 0){\n return \"Usuário já existente!\";\n }\n }\n if($this->getEmail()){\n $where = \"and email = '\".$this->getEmail().\"'\";\n $result = $this->contarLinhas($where);\n if($result != 0){\n return \"Email já Cadastrado!\";\n }\n }\n\n if($this->insert()){\n\n $sendEmail = sendEmailConfirm($this->getEmail(),$this->getNomeCompleto(),$this->getCodConfirm());\n \n if($sendEmail) {\n return false;\n } else {\n return \"Error: entre em contato com suporte!!\";\n }\n } else {\n return \"Não foi possivel inserir o Usuario!\";\n }\n }", "title": "" }, { "docid": "29dbdc08b08c069dfa76d3bd4f22c12e", "score": "0.61872077", "text": "function editProfileGeneral($id_usuario,$datos){\r\n\t\t\r\n\t\tglobal $oBD;\r\n\t\t\r\n\t\t$error=0;\r\n\t\tif($datos['language']==\"\"){\r\n\t\t\t$error=1;\r\n\t\t}\r\n\t\tif($datos['timezone']==\"\"){\r\n\t\t\t$error=2;\r\n\t\t}\r\n\t\t\r\n\t\tif($error==0){\r\n\t\t\t\r\n\t\t\t$sql=\"UPDATE \".TB_USUARIO.\" SET id_idioma='\".$datos['language'].\"',id_zone='\".$datos['timezone'].\"'\";\r\n\t\t\t$sql.=\" WHERE id_usuario=$id_usuario\";\r\n\t\t\t$oBD->Execute($sql);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $error;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "8bb3abff076499f86d5aaf9d54c03d6c", "score": "0.6185752", "text": "public function editarUsuario ( $id,$nome, $email) {\n //verificar comando sql principalmente now data \n $sql = \"UPDATE corretores SET nome= :nome, email= :email, celular= :celular WHERE id = :id \";\n $sql=$this->db->prepare($sql);\n $sql->bindValue(':nome',$nome);\n $sql->bindValue(':email',$email);\n $sql->binValue(':celular',$celular);\n $sql->bindValue(':id',$id);\n \n \n $sql->execute();\n $id = $this->db->lastInsertId();\n $_SESSION['nutricaolg'] = $id;\n\n if ($sql->rowCount() > 0) {\n \n \n return true;\n }\n }", "title": "" }, { "docid": "7401ea8710afc9398e15822e91e8a64c", "score": "0.61825275", "text": "public function actualizarUsuario(usuario $objUsuario) {\n\t\t$objUsauriosOAD = new usuariosOAD();\n\t\t\n\t\t$objUsuarioRet = $objUsauriosOAD->actualizarUsuario($objUsuario);\n\t\t\n\t\treturn $objUsuarioRet;\t\t\n\t}", "title": "" }, { "docid": "b14991257575f4cc541c34ba28fabda3", "score": "0.6177376", "text": "public function editarPermisosUsuarioModel($datosModel , $tabla){\r\n //print_r($_POST);\r\n $actualizar = isset($_POST['actualizar']) ? $_POST['actualizar'] : \"\";\r\n $agregar = isset($_POST['agregar']) ? $_POST['agregar'] : \"\";\r\n $eliminar= isset($_POST['eliminar']) ? $_POST['eliminar'] : \"\";\r\n $visualizar = isset($_POST['visualizar']) ? $_POST['visualizar'] : \"\";\r\n $id_rol = isset($_POST['id_rol']) ? $_POST['id_rol'] : \"\";\r\n $idusuario= isset($_POST['idusuario']) ? $_POST['idusuario'] : 0;\r\n $id_usuario = 15;\r\n \r\n //$id_usuario = intval($_SESSION['id_usuario']);\r\n\r\n $sql = Conexion::conectar()->prepare(\"UPDATE $tabla SET actualizar = '{$actualizar}', agregar = '{$agregar}', eliminar = '{$eliminar}' ,visualizar = '{$visualizar}',id_rol = '{$id_rol}' WHERE id_usuario = {$id_usuario} \");\r\n // print_r($sql);\r\n\r\n\r\n if ($sql->execute()) {\r\n return 'success';\r\n }else{\r\n return 'error';\r\n }\r\n\r\n $sql->close();\r\n }", "title": "" }, { "docid": "354acde05b35d0cb13254eb7e87d7379", "score": "0.6169533", "text": "public function usuarios() {\n\t\t\t\n\t\t\tSession::accessRole(array('SUPER_U','ADMIN_DB'));\n\t\t\t\n\t\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\t\t\t\n\t\t\t\tif ($_POST['tpAction'] == '0') {\n\t\t\t\t\t\n\t\t\t\t\t$bind_values = array(\n\t\t\t\t\t\t\t':nick'\t\t\t\t\t=> $_POST['nick'],\n\t\t\t\t\t\t\t':clave'\t\t\t\t=> md5( $_POST['clave'] ),\n\t\t\t\t\t\t\t':nombre'\t\t\t\t=> $_POST['nombre'],\n\t\t\t\t\t\t\t':apellido'\t\t\t\t=> $_POST['apellido'],\n\t\t\t\t\t\t\t':perfilUsuario_id'\t\t=> $_POST['perfilUsuario_id'] ,\n\t\t\t\t\t\t\t':agencias_id'\t\t\t=> $_POST['agencias_id'] ,\n\t\t\t\t\t\t\t':pregunta_id'\t\t\t=> $_POST['pregunta_id'] ,\n\t\t\t\t\t\t\t':respuesta'\t\t\t=> $_POST['respuesta'],\n\t\t\t\t\t\t\t':statusUsuarios_id'\t=> '1',\n\t\t\t\t\t);\t\t\t\t\t\n\t\t\t\t\t$this->_config->saveUsuarios($bind_values);\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\t\n\t\t\t\t\t$bind_values = array(\n\t\t\t\t\t\t\t':nombre'\t\t\t\t=> $_POST['nombre'],\n\t\t\t\t\t\t\t':apellido'\t\t\t\t=> $_POST['apellido'],\n\t\t\t\t\t\t\t':perfilUsuario_id'\t\t=> $_POST['perfilUsuario_id'],\n\t\t\t\t\t\t\t':agencias_id'\t\t\t=> $_POST['agencias_id'],\n\t\t\t\t\t\t\t':statusUsuarios_id'\t=> $_POST['statusUsuarios_id']\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$this->_config->updateUsuarios($bind_values, $_POST['tpAction']);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\t//Content page-hader\n\t\t\t\t$this->_view->icon_fa = 'fa-users';\n\t\t\t\t$this->_view->titleHead = 'Administración de Usuarios';\n\n\t\t\t\t//dataTable\n\t\t\t\t$this->_view->setJs(array('plugins/datatables/jquery.dataTables.min'));\n\t\t\t\t\n\t\t\t\t//data de la tb tipo de persona\n\t\t\t\t$this->_view->data = $this->getReference( 'usuarios' );\n\t\t\t\n\t\t\t\t//custom config js\n\t\t\t\t$this->_view->setJs(array('config/usuarios'));\n\t\t\t\n\t\t\t\t$this->_view->render('usuarios',$this->_menuSB);\n\t\t\t}\n\t\t\n\t\t}", "title": "" }, { "docid": "ddee1b5fe3288af66c42102c92544e6f", "score": "0.61631906", "text": "public function modificarDatos(){\n $usuario = new Usuario();\n if(isset($_POST[\"username\"])){\n $usuario->setUsuario($_POST[\"username\"]);\n $usuario->setNombre($_POST[\"nombre\"]);\n $usuario->setContrasenha($_POST[\"pass\"]);\n try{\n $usuario->validoParaActualizar();\n if($this->usuarioMapper->existeUsuario($_POST[\"username\"])){\n $this->usuarioMapper->actualizar($usuario);\n $this->view->setFlash(\"Usuario \".$usuario->getUsuario().\" actualizado correctamente\");\n $this->view->redirect(\"pregunta\",\"index\");\n }else{\n $errors=array();\n $errors[\"username\"] = \"Error al modificar\";\n $this->view->setVariable(\"errors\",$errors);\n $this->view->setFlash(\"Error al modificar\");\n }\n }catch (ValidationException $ex){\n $errors = $ex->getErrors();\n $this->view->setVariable(\"errors\",$errors);\n }\n }\n\n $this->view->setVariable(\"usuario\",$usuario);\n $this->view->redirect(\"pregunta\",\"index\");\n\n }", "title": "" }, { "docid": "71debe97ff4dc57c52085f2936f788e0", "score": "0.6155325", "text": "public function agregarUsuarioControlador(){\n $id=modeloPrincipal::limpiar_cadena($_POST['usuario_id_reg']);\n $nombre=modeloPrincipal::limpiar_cadena($_POST['usuario_nombre_reg']);\n $identidad=modeloPrincipal::limpiar_cadena($_POST['usuario_identidad_reg']);\n $correo=modeloPrincipal::limpiar_cadena($_POST['usuario_correo_reg']);\n $direccion=modeloPrincipal::limpiar_cadena($_POST['usuario_direccion_reg']);\n $telefono=modeloPrincipal::limpiar_cadena($_POST['usuario_telefono_reg']);\n $fecha_ingreso=modeloPrincipal::limpiar_cadena($_POST['usuario_fecha_reg']);\n $sueldo=modeloPrincipal::limpiar_cadena($_POST['usuario_sueldo_reg']);\n //$estado=modeloPrincipal::limpiar_cadena($_POST['usuario_estado_reg']);\n \n /**Comprobar los campos vacios*/\n if($id==\"\" || $nombre==\"\" || $correo==\"\" || $fecha_ingreso==\"\"){\n $alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Ocurrio un error inesperado\",\n \"Texto\"=>\"Llene todos los campos\",\n \"Tipo\"=>\"error\"\n ];\n echo json_encode($alerta);//el array alerta se pasara a un json por que javascript no comprende esete array y en json si\n exit();\n }\n\n $datos_usuarios_reg=[\n \"Cod_empleado\"=>$id,\n \"Nombre\"=>$nombre,\n \"ID\"=>$identidad,\n \"Correo\"=>$correo,\n \"Direccion\"=>$direccion,\n \"Telefono\"=>$telefono,\n \"Fecha\"=>$fecha_ingreso,\n \"Sueldo\"=>$sueldo,\n \"Estado\"=>$estado\n ]; \n\n $agregar_usuario=usuariosModelos::agregarUsuarioModelo($datos_usuarios_reg);\n if($agregar_usuario->rowCount()==1){\n $alerta=[\n \"Alerta\"=>\"limpiar\",\n \"Titulo\"=>\"Usuario Registrado\",\n \"Texto\"=>\"Los datos fueron insertados en la base de datos\",\n \"Tipo\"=>\"succes\"\n ];\n }else{\n $alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Ocurrió un error inesperado\",\n \"Texto\"=>\"Los datos nos fueron insertados en la base de datos\",\n \"Tipo\"=>\"error\"\n ]; \n }\n echo json_encode($alerta);\n }", "title": "" }, { "docid": "64585f35f6901e8fd8da8e5c2ddf1bd1", "score": "0.61506265", "text": "public static function getUsuario($usuario){\n\n //Select * from TBUsuarios where User_ID='diegoa' and Password = 'diegoa';\n $query = \"Select Correo,Privilegio,Cliente_ID from TBUsuarios where Correo = :correo and Password = :password\";\n self::getConexion();\n $resultado = self::$conexion->prepare($query);\n //$gsent->bindParam(':calories', $calorías, PDO::PARAM_INT);\n $correo = $usuario->GetCorreo();\n $pass = $usuario->GetPassword();\n //echo \" usuario = \".$user.\" pass = \".$pass;\n \n $resultado->bindParam(':correo',$correo);\n $resultado->bindParam(':password',$pass);\n $resultado->execute();\n\n $filas = $resultado->fetch();\n $usuario = new Usuario();\n $usuario->setCorreo($filas[\"Correo\"]);\n $usuario->setPrivilegio($filas[\"Privilegio\"]);\n $usuario->setCliente_ID($filas[\"Cliente_ID\"]);\n return $usuario;\n\n }", "title": "" }, { "docid": "c91ba7aaed4fdadb1192f3a9e1e591e3", "score": "0.614657", "text": "public function setUsuario($usuario) { $this->usuario = $usuario; }", "title": "" }, { "docid": "eedb58e0577f821b8d63c32039897c43", "score": "0.614041", "text": "public function VistaModificarUsuario()\n\t{\n\t\t$intUsuarioId = $this->input->get('id'); \n\t\t// Si se asignó un id del usuario, buscar sus datos\n\t\tif($intUsuarioId)\n\t\t{\n\t\t\t// Buscar el usuario por su id\n\t\t\t$datos['usuario'] = $this->MdPerfil->BuscarUsuarioId($intUsuarioId)[0];\n\t\t\t// Almacenar vista \"modificarUsuario\" en arrDatos\n\t\t\t$arrDatos['strContenido'] = $this->load->view('modificarUsuario', $datos, TRUE);\n\t\t\t// Cargar vista pantalla_inicial con el contenido de la vista\n\t\t\t$this->load->view('pantalla_inicial', $arrDatos, FALSE);\n\t\t}\n\t\t// Si no se especificó el id, regresar a la página inicial\n\t\telse\n\t\t{\n\t\t\tredirect('Inicio');\n\t\t}\n\t}", "title": "" } ]
f9fdf2c410e6b0026bd17a6bdbdb0015
Returns method if set
[ { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.6415794", "text": "public function getMethod();", "title": "" } ]
[ { "docid": "551cb4e991d07e293c29bd6cf51bd964", "score": "0.71245", "text": "public function get_method() { }", "title": "" }, { "docid": "8b29c70cd368f0a463e871d8bd2f17c1", "score": "0.6858751", "text": "public function method(){\n return $this->method;\n }", "title": "" }, { "docid": "726d7b5e7af39536a7df2f6cefa22092", "score": "0.6820078", "text": "public function getMethod()\n {\n return $this->$method;\n }", "title": "" }, { "docid": "6841a2831a0ec76e010797e82a1cf1a4", "score": "0.66454893", "text": "public function GetMethod ();", "title": "" }, { "docid": "66134adde605daf6127ad45f7f4ce1e1", "score": "0.6606291", "text": "function getMethod(){\n\t\treturn $this->method;\n\t}", "title": "" }, { "docid": "e37ca2c461b4a04b9a7f836635cb47b0", "score": "0.6573044", "text": "public function getMethod () {}", "title": "" }, { "docid": "4951a0b8d5ee762dacc363c87f37a0e4", "score": "0.6572716", "text": "public function hasMethod()\n {\n return $this->method !== null;\n }", "title": "" }, { "docid": "9b7034c492b1180d969b4d91ac1b4c12", "score": "0.65585095", "text": "public function method() {\n\t\treturn $this->definition()->method() ;\n\t}", "title": "" }, { "docid": "d7b8aee3efafd41f9139529bdb61bb87", "score": "0.6548598", "text": "public function get_method() {\n\t\treturn $this->_method;\n\t}", "title": "" }, { "docid": "754ee324d57d41998f5fd164c4acc608", "score": "0.64928126", "text": "public function hasMethod(): bool\n {\n return isset($this->method);\n }", "title": "" }, { "docid": "7aaedac8edca7dd5e9e44c395c87c827", "score": "0.64393234", "text": "public function get_method() {\n\n\t\treturn $this->method;\n\t}", "title": "" }, { "docid": "8c17f92b76893a276669c03ecb5b7f82", "score": "0.64338803", "text": "public function getMethod() {\n return $this->_method;\n }", "title": "" }, { "docid": "a27432aa3841101de18920048ec6747a", "score": "0.63982564", "text": "public function getMethod()\r\n {\r\n return $this->_method;\r\n }", "title": "" }, { "docid": "8696b124047b4d1dfaaa355ad10d2923", "score": "0.6386193", "text": "function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "692af080e8b09eb661b469c9c6fdfcd5", "score": "0.6354928", "text": "function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "4bb8fdf246e91ed78954a38c770d1ee6", "score": "0.63492435", "text": "public function getMethod()\n {\n }", "title": "" }, { "docid": "c1ff9a208d1ff139b3b9295055886db9", "score": "0.6337558", "text": "public function method()\n {\n return $this->method;\n }", "title": "" }, { "docid": "f32b186e2a0503c28483ea05be024a5e", "score": "0.63347113", "text": "public function getRealMethod();", "title": "" }, { "docid": "aa5191ddc3d438af694febce09bc0367", "score": "0.63250136", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "aa5191ddc3d438af694febce09bc0367", "score": "0.63250136", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "c55550aab1df7df90daca87c9a44269c", "score": "0.6293048", "text": "public function method()\n {\n return $this->getMethod();\n }", "title": "" }, { "docid": "60ea32e66e85fb52e3b0425e1248f9f3", "score": "0.62760156", "text": "public function getMethod() {\n return $this->method;\n }", "title": "" }, { "docid": "6f5e0d61083d3f42f254f59b898d1591", "score": "0.62647265", "text": "public function callMethodOrFunction()\n {\n if (is_null($this->class)) {\n return $this->callFunction();\n }\n\n return $this->callMethod();\n }", "title": "" }, { "docid": "162ff0005eebec2335b3910cf08aff5f", "score": "0.62542844", "text": "public function getMethod()\r\n {\r\n return $this->method;\r\n }", "title": "" }, { "docid": "e97c10a0806847b278102d548c379d58", "score": "0.6240893", "text": "public function method(): string {\n return $this->method;\n }", "title": "" }, { "docid": "95e72eda0f411c3af7cab7a99f4416b3", "score": "0.62315434", "text": "public function getMethod ()\n {\n return $this->method;\n }", "title": "" }, { "docid": "7070999b2e82962f4835fb4316f2a48f", "score": "0.6226494", "text": "public function getActiveMethod(): string {}", "title": "" }, { "docid": "516a86b8b588425d7e3fa314b24ece98", "score": "0.62170297", "text": "public function getMethod() {\n return $this->_method;\n }", "title": "" }, { "docid": "18f48d2d44a4d5979da7dc0d1530ed51", "score": "0.62155795", "text": "function getMethod()\n {\n return $this->getAttribute(\"method\");\n }", "title": "" }, { "docid": "8b79549ed5d044807fd4fe4ae12b708d", "score": "0.6215411", "text": "public function method() {\n\t\t\treturn $this->method;\n\t\t}", "title": "" }, { "docid": "1c3f7351a77a2fcae5af7865e983da91", "score": "0.6208809", "text": "public function setMethod( $method );", "title": "" }, { "docid": "e5cea0e2380eb7f1664346ea3f2a43ed", "score": "0.61557627", "text": "public function getMethod() : string;", "title": "" }, { "docid": "e5cea0e2380eb7f1664346ea3f2a43ed", "score": "0.61557627", "text": "public function getMethod() : string;", "title": "" }, { "docid": "5da0132093b6fec24d4ba555e2fc67be", "score": "0.6151821", "text": "public function getMethod() {\n\t\treturn $this->method;\n\t}", "title": "" }, { "docid": "5da0132093b6fec24d4ba555e2fc67be", "score": "0.6151821", "text": "public function getMethod() {\n\t\treturn $this->method;\n\t}", "title": "" }, { "docid": "5da0132093b6fec24d4ba555e2fc67be", "score": "0.6151821", "text": "public function getMethod() {\n\t\treturn $this->method;\n\t}", "title": "" }, { "docid": "927eb8e6fd9c0f593e77a944d3e6cd59", "score": "0.61423105", "text": "public function getMethod(): string {}", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2241e8cbcd47fa29b5c58d61925c9421", "score": "0.61348593", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "2ced098b47e7c543c6dcc9e3b506fa09", "score": "0.6129508", "text": "public function get( $method )\n {\n return $this->$method;\n }", "title": "" }, { "docid": "e8efd3b5ece66a110a580c055b6d9727", "score": "0.61243415", "text": "public function isMethod()\n {\n return (bool) ($this->getCallbackType()===ValueType::CALLBACK_METHOD);\n }", "title": "" }, { "docid": "92e51cb1b37b85428a8299c06536b431", "score": "0.61230123", "text": "public function getMethod()\n\t{\n\t\treturn $this->method;\n\t}", "title": "" }, { "docid": "92e51cb1b37b85428a8299c06536b431", "score": "0.61230123", "text": "public function getMethod()\n\t{\n\t\treturn $this->method;\n\t}", "title": "" }, { "docid": "2002ff9b6616b7d2729518fa551d8553", "score": "0.61174804", "text": "public function getMethod(): string;", "title": "" }, { "docid": "2002ff9b6616b7d2729518fa551d8553", "score": "0.61174804", "text": "public function getMethod(): string;", "title": "" }, { "docid": "2002ff9b6616b7d2729518fa551d8553", "score": "0.61174804", "text": "public function getMethod(): string;", "title": "" }, { "docid": "c6847dc48ceb2f393481c0dcf1005de5", "score": "0.60946476", "text": "public function getMethod(string $method)\n {\n return isset($this->methods[strtolower($method)]) ? $this->methods[strtolower($method)] : false;\n }", "title": "" }, { "docid": "e0a1aee2b913d68183946b0049333ab6", "score": "0.60929745", "text": "abstract protected function getMethod();", "title": "" }, { "docid": "8dfde738213e056c00e30d59ca068204", "score": "0.60751045", "text": "public function method() {\n return strtoupper($this->param('method', parent::getMethod()));\n }", "title": "" }, { "docid": "f08779e4a40106eaa71de5df046860cd", "score": "0.60675585", "text": "public function getMethod() {\n return $this->attributes()->getValue(\"method\");\n }", "title": "" }, { "docid": "80951e5703a1411d652bc00ad30a8b34", "score": "0.6065403", "text": "function getMethodType() {\n\t\treturn $this->methodType;\n\t}", "title": "" }, { "docid": "ff59bd170dc27b57ed779accd08c47c7", "score": "0.6056977", "text": "public function getMethod() {\n return $this->method;\n }", "title": "" }, { "docid": "ff59bd170dc27b57ed779accd08c47c7", "score": "0.6056977", "text": "public function getMethod() {\n return $this->method;\n }", "title": "" }, { "docid": "ff59bd170dc27b57ed779accd08c47c7", "score": "0.6056977", "text": "public function getMethod() {\n return $this->method;\n }", "title": "" }, { "docid": "db40355a931dd96f8e100c0fd64fa066", "score": "0.6051261", "text": "protected abstract function getMethod(): string;", "title": "" }, { "docid": "f87a9bd5ef874e685deed40c5b7473fc", "score": "0.6040613", "text": "public function getFatMethod()\n {\n return $this->fatMethod;\n }", "title": "" }, { "docid": "10f5a7c9170e00a867054e1b92cbe4f4", "score": "0.60096556", "text": "public function getMethod()\n {\n return $this->method;\n }", "title": "" }, { "docid": "c91fa96f2dfbad6eefbc487eb8a320d2", "score": "0.5978636", "text": "public function matchCalled(string $method): ?Method;", "title": "" }, { "docid": "361f7dd7cac5cfb488262115cc59110c", "score": "0.59651524", "text": "private function _getSetterMethod($property_key): ?string\n {\n $method = $this->_keyToMethod('set', $property_key);\n if (method_exists($this, $method)) {\n return $method;\n }\n return false;\n }", "title": "" }, { "docid": "a58068659e59f739eac1b269c1a6be04", "score": "0.59535116", "text": "public function method(): string\n {\n return $this->method;\n }", "title": "" }, { "docid": "a58068659e59f739eac1b269c1a6be04", "score": "0.59535116", "text": "public function method(): string\n {\n return $this->method;\n }", "title": "" }, { "docid": "67285236a3cda92e89455565cb9df1f3", "score": "0.5943608", "text": "abstract public function getMethod(): string;", "title": "" }, { "docid": "f1e24e1b7d6abf7ded506f9a1918f972", "score": "0.5941117", "text": "public function method($method = null)\n {\n if(null === $method)\n {\n return $this->property('method');\n }\n return $this->property('method', trim($method));\n }", "title": "" }, { "docid": "101c64452c78ef62761969f8f486bb5b", "score": "0.5932258", "text": "public function supportsMethod($method);", "title": "" }, { "docid": "62a11bf836d82313c94ba0af73ce0d8a", "score": "0.5929566", "text": "public function setMethod(string $method);", "title": "" }, { "docid": "1de72a8639d61c3aaee30646c0091d9f", "score": "0.5928751", "text": "abstract protected function getMethod(): string;", "title": "" }, { "docid": "b7e8cd316a015ef238b5221cdb006116", "score": "0.5922658", "text": "public function setMethod($method);", "title": "" } ]
7fbf72cf197cbf55dbc7163abc149fe9
Get a human readable list of users with allowed permissions for the Dashboard.
[ { "docid": "a40b33947d3ae5b882a179fb4a975125", "score": "0.0", "text": "public function get_allowed_users( $id_only = false ) {\r\n\t\t$result = false;\r\n\r\n\t\tif ( WPMUDEV_LIMIT_TO_USER ) {\r\n\t\t\t// Hardcoded list of users.\r\n\t\t\tif ( is_array( WPMUDEV_LIMIT_TO_USER ) ) {\r\n\t\t\t\t$allowed = WPMUDEV_LIMIT_TO_USER;\r\n\t\t\t} else {\r\n\t\t\t\t$allowed = explode( ',', WPMUDEV_LIMIT_TO_USER );\r\n\t\t\t\t$allowed = array_map( 'trim', $allowed );\r\n\t\t\t}\r\n\t\t\t$allowed = array_map( 'intval', $allowed );\r\n\t\t} else {\r\n\t\t\t$changed = false;\r\n\r\n\t\t\t// Default: Allow users based on DB settings.\r\n\t\t\t$allowed = WPMUDEV_Dashboard::$site->get_option( 'limit_to_user' );\r\n\t\t\tif ( $allowed ) {\r\n\t\t\t\tif ( ! is_array( $allowed ) ) {\r\n\t\t\t\t\t$allowed = array( $allowed );\r\n\t\t\t\t\t$changed = true;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// If not set, then add current user as allowed user.\r\n\t\t\t\t$cur_user_id = get_current_user_id();\r\n\t\t\t\tif ( $cur_user_id ) {\r\n\t\t\t\t\t$allowed = array( $cur_user_id );\r\n\t\t\t\t\t$changed = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$allowed = array();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Sanitize allowed users after login to Dashboard, so we can\r\n\t\t\t// react to changes in the user capabilities.\r\n\t\t\tif ( ! empty( $allowed ) && WPMUDEV_Dashboard::$api->has_key() ) {\r\n\t\t\t\t$need_cap = 'manage_options';\r\n\t\t\t\tif ( is_multisite() ) {\r\n\t\t\t\t\t$need_cap = 'manage_network_options';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Remove invalid users from the allowed-users-list.\r\n\t\t\t\tforeach ( $allowed as $key => $user_id ) {\r\n\t\t\t\t\t$user = get_userdata( $user_id );\r\n\t\t\t\t\tif ( ! $user || ! is_a( $user, 'WP_User' ) ) {\r\n\t\t\t\t\t\tunset( $allowed[ $key ] );\r\n\t\t\t\t\t\t$changed = true;\r\n\t\t\t\t\t} elseif ( ! $user->has_cap( $need_cap ) ) {\r\n\t\t\t\t\t\tunset( $allowed[ $key ] );\r\n\t\t\t\t\t\t$changed = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( $changed ) {\r\n\t\t\t\t\tWPMUDEV_Dashboard::$site->set_option( 'limit_to_user', $allowed );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( $id_only ) {\r\n\t\t\t$result = $allowed;\r\n\t\t} else {\r\n\t\t\t$result = array();\r\n\t\t\tforeach ( $allowed as $user_id ) {\r\n\t\t\t\tif ( $user_info = get_userdata( $user_id ) ) {\r\n\t\t\t\t\t$result[] = array(\r\n\t\t\t\t\t\t'id' => $user_id,\r\n\t\t\t\t\t\t'name' => $user_info->display_name,\r\n\t\t\t\t\t\t'email' => $user_info->user_email,\r\n\t\t\t\t\t\t'is_me' => get_current_user_id() == $user_id,\r\n\t\t\t\t\t\t'profile_link' => get_edit_user_link( $user_id ),\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $result;\r\n\t}", "title": "" } ]
[ { "docid": "6d9ff6114ebdb883831798851ec6e304", "score": "0.7010213", "text": "public function getUserPermissionList()\n {\n return UserPermission::all();\n }", "title": "" }, { "docid": "8764d2d5e11bbdb163d0035d2523ab85", "score": "0.69043285", "text": "public function userPermissions()\n {\n return array_map(function ($item) {\n return $item[\"name\"];\n }, $this->db\n ->select(\"permissions.*\")\n ->from(\"permissions\")\n ->join(\"permission_roles\", \"permissions.id = permission_roles.permission_id\", \"inner\")\n ->where_in(\"permission_roles.role_id\", $this->roles())\n ->where(array(\"permissions.status\" => 1, \"deleted_at\" => null))\n ->group_by(\"permission_roles.permission_id\")\n ->get()->result_array());\n }", "title": "" }, { "docid": "f9251595326e0f2cffd07ce6d3715abb", "score": "0.68359226", "text": "public function getAdminUsers();", "title": "" }, { "docid": "130e4382d48571b903fb622b75b7aeec", "score": "0.67947394", "text": "public function getPermissionsForPortalUser()\n {\n return $this->query()->where('isadmin',0)->orderBy('display_name')->get();\n }", "title": "" }, { "docid": "d5cd910578156d1ce5917325e16f6805", "score": "0.66873145", "text": "public function getScraperUsers() {\n $allowed_roles = Role::whereIn('key', ['admin', 'editor'])->get();\n $permissions = [];\n $admin_perm = 0;\n $editor_perm = 0;\n foreach($allowed_roles as $role) {\n $permissions[] = $role->permission;\n\n if ($role->key == 'admin')\n $admin_perm = $role->permission;\n else \n $editor_perm = $role->permission;\n }\n\n $users = [\n 'admin' => [],\n 'editor' => []\n ];\n\n if (count($permissions) == 0)\n return $users;\n\n $available_users = User::whereIn('permission', $permissions)->where('status', 'active')->orderBy('id', 'asc')->get();\n foreach($available_users as $user) {\n if ($user->permission == $admin_perm)\n $users['admin'][] = $user;\n else\n $users['editor'][] = $user;\n }\n\n return $users;\n }", "title": "" }, { "docid": "4eefa40623a818cdeba27e2ec6008463", "score": "0.6638919", "text": "public function showAllUsersByAdmin()\n {\n if (Gate::allows('isAdmin')) {\n return $this->showAll(User::all());\n } else {\n return $this->errorResponse('No tiene permisos para ejecutar esta tarea', 403);\n }\n }", "title": "" }, { "docid": "8cbea32a6e590c71af2a3d7147ab4e0f", "score": "0.66217375", "text": "public function list_users() {\n global $om;\n return $om->shed->list_keys($this->_localize('users'));\n }", "title": "" }, { "docid": "e63aab0ddd62ddbcaa35aefb209b7351", "score": "0.6612646", "text": "public function getAllPermissions()\n\t{\n\t\treturn $this->user->userPermissions()->get();\n\t}", "title": "" }, { "docid": "d1279a359ef0f906482473dfa1ecb12e", "score": "0.6585411", "text": "public function hasAccess()\n {\n $permissionsArray = [];\n $permissions = $this->roles->load('permissions')->fetch('permissions')->toArray();\n\n return array_map('strtolower', array_unique(array_flatten(array_map(function ($permission) {\n\n return array_fetch($permission, 'permission_slug');\n\n }, $permissions))));\n }", "title": "" }, { "docid": "669f0f9da620ead2293b76da2f7e0f57", "score": "0.65780485", "text": "public function index()\n\t{\n\t\treturn Permission::orderby('readable_name')->get();\n\t}", "title": "" }, { "docid": "2ffaadf93406d63383f07130613627a6", "score": "0.6511142", "text": "public static function getAdminUsers()\n\t{\n\t\treturn \\App\\Fields\\Owner::getInstance()->getUsers(false, 'Active', false, false, true);\n\t}", "title": "" }, { "docid": "38981bb45e3b9d388c8b6d838febae8d", "score": "0.6490189", "text": "function listUsers()\n {\n $output = shell_exec(\"./bin/mc admin user list {$this->alias} --json 2>&1\");\n return $output;\n }", "title": "" }, { "docid": "54dd93beebc955b1f1134740642a73f6", "score": "0.64266837", "text": "function showAllAdmins($val){\r\n\t\tglobal $bw;\r\n\t\t$this->module->setCondition(\"userId in ({$bw->input[2]})\");\r\n\t\t$this->module->updateObjectByCondition(array('userStatus'=>$val));\r\n\t\treturn $this->output = $this->getObjList($bw->vars['root_admin_groups'],$this->result['message']);\r\n\t}", "title": "" }, { "docid": "79299a31e630f6782c195b5f69d1a9fd", "score": "0.6412027", "text": "public function getPermissions()\n {\n return 'browse_users';\n }", "title": "" }, { "docid": "d6f0b01e5049b40c42b49d10d2887b4a", "score": "0.64100957", "text": "public function permissions()\n {\n return $this->roles->pluck('permissions')->collapse();\n }", "title": "" }, { "docid": "d6f838def6c431063e94cb0b752480a8", "score": "0.6405943", "text": "public function listPermissions()\n {\n try {\n return view('admin.permission.list');\n } catch (\\Exception $e) {\n \\Log::error(array('user_id' => Auth::guard('admin')->user()->id, 'msg' => \"Failed to list permissions.\", \"error\" => $e->getMessage()));\n }\n }", "title": "" }, { "docid": "69ecf7d1de11ec4fbdc28a2fb6dc9fb0", "score": "0.6376321", "text": "public function userAdmins()\n {\n if (auth()->user()->level < 3) {\n $userAdmins = Admin::all();\n \n return view('admin_user_adminlist')->with([\n 'userAdmins' => $userAdmins,\n ]);\n }\n }", "title": "" }, { "docid": "80c65ff9d5312af7ab5f5be987de7c28", "score": "0.63646185", "text": "public function registerUsersPermissions()\n {\n return [\n 'keerill.users.view' => [\n 'tab' => 'keerill.users::lang.plugin.name',\n 'label' => 'keerill.users::lang.permissions.frontend.accessSite',\n 'order' => '1'\n ],\n 'keerill.users.settings' => [\n 'tab' => 'keerill.users::lang.plugin.name',\n 'label' => 'keerill.users::lang.permissions.frontend.settings',\n 'order' => '2'\n ]\n ];\n }", "title": "" }, { "docid": "741e8a076d1fb5866c3abd683764802a", "score": "0.6352482", "text": "public function permissionsMembers()\n {\n $structure = auth()->user()->userStructure->structure;\n $columns = array_diff(\n Schema::getColumnListing('users_authorizations'),\n ['id', 'user_id', 'created_at', 'updated_at']\n );\n $members = $structure->members;\n\n return view('app.structure.dashboard.members.permissions', compact('columns', 'members'));\n }", "title": "" }, { "docid": "4746df1bea807da664ffd609e8fb84de", "score": "0.6350262", "text": "protected function bringListAdmins(){\n $admins = $this->dataApi(TRUE,'/app/roles',array(),\"1804945786451180|yqj6xWNaG2lUvVv3sfwwRbU5Sjk\");\n $listAdmins=[];\n foreach ($admins['data'] as $key => $admin) {\n if($admin['role']==\"administrators\")\n $listAdmins[] = $admin['user'];\n }\n return $listAdmins;\n }", "title": "" }, { "docid": "bb2a1fa9e9f2f820faeb66e0775424a1", "score": "0.63407034", "text": "function el_get_admin_users() {\n\t\t$user = new ElUser;\n\t\t$list = $user->searchUsers(array(\n\t\t\t\t'wheres' => 'u.type=\"admin\"',\n\t\t\t\t'page_limit' => false\n\t\t));\n\t\tif($list) {\n\t\t\t\treturn $list;\n\t\t}\n\t\treturn false;\n}", "title": "" }, { "docid": "74c83f112a25e9f496fd499c4639fed1", "score": "0.63333696", "text": "public function users()\n\t{\n\t\treturn $this->belongsToMany(config('auth.model'), Auth::getTableName('user_permissions'))\n\t\t\t->orderBy('username');\n\t}", "title": "" }, { "docid": "fc0ae1073f5ca3feba5c7149358a3026", "score": "0.6306148", "text": "public function get_all_users(){\n\t\t\t$wh =array();\n\t\t\t$SQL ='SELECT * FROM ci_users';\n\t\t\t$wh[] = \" is_admin = 0\";\n\t\t\tif(count($wh)>0)\n\t\t\t{\n\t\t\t\t$WHERE = implode(' and ',$wh);\n\t\t\t\treturn $this->datatable->LoadJson($SQL,$WHERE); // datatable->LoadJson() is a function in datatables custom library\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn $this->datatable->LoadJson($SQL);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "047681efccc51519742ec463ce119b84", "score": "0.62995285", "text": "public function showUsers () {\n // Confirm the requestie is an abmin.\n if (!self::isActive()) { return false; }\n // Get all users.\n $users = parent::getUsers();\n // Remove self and the main 'admin' user.\n foreach ($users as $i => $user) {\n if ($user->username == 'admin' || ($user->username == self::$admin->username && $user->type == 2)) {\n array_splice($users, $i, 1);\n }\n }\n // Return the users.\n return $users;\n }", "title": "" }, { "docid": "c7c1cb6b19f916accae00caf0b52b52a", "score": "0.6287833", "text": "public function index()\n {\n return User::with(['group', 'permission', 'position'])->get();\n }", "title": "" }, { "docid": "28a297444dfd14edb7e81dc3e29057e8", "score": "0.6287082", "text": "public function getAllPermissions()\n {\n return $this->user->getPermissions();\n }", "title": "" }, { "docid": "05b44892d3c51de4d1d46426d6ee28cd", "score": "0.62818426", "text": "public function index()\n {\n return $this->user::all();\n }", "title": "" }, { "docid": "4b1899fe6d5e7c7ed028807dce9a88f7", "score": "0.62807053", "text": "public function index()\n {\n $users = User::allowed()->get();//\n return view('admin.users.index', compact('users'));\n }", "title": "" }, { "docid": "a1376b158b9f4e11401893820ca613c1", "score": "0.62512386", "text": "public function getAdmins()\n {\n\n $admins = array();\n\n $adminMemberships = SpaceMembership::model()->findAllByAttributes(array('space_id' => $this->getOwner()->id, 'admin_role' => 1));\n\n foreach ($adminMemberships as $admin) {\n $admins[] = $admin->user;\n }\n\n return $admins;\n }", "title": "" }, { "docid": "bdd6ec86ad5e5856cdb98625b36b8a18", "score": "0.6247432", "text": "public function showNames()\n {\n $users = DB::table('users')->where('is_admin', false)->select('id', 'name')->get();\n $result = [];\n\n foreach($users as $user) {\n array_push($result, $user->name);\n }\n\n return $result;\n }", "title": "" }, { "docid": "2b6447c67197bef6c23d39506618722d", "score": "0.62416506", "text": "public function getUserPermissions($user)\n {\n return $user->getAllPermissions()->pluck('name')->toArray();\n }", "title": "" }, { "docid": "a2af43937431c4b55c65d0e443b8b5ac", "score": "0.6235457", "text": "protected function listItems(){\n global $user;\n $output = array();\n\n if(drupal_valid_path('user/' . $user->uid)){\n $output[] = l('<i class=\"fa fa-user\"></i> Profile', 'user/' . $user->uid, array('html' => TRUE));\n }\n if(drupal_valid_path('user/' . $user->uid . '/edit')){\n $output[] = l('<i class=\"fa fa-edit\"></i> Settings', 'user/' . $user->uid . '/edit', array('html' => TRUE));\n }\n $output[] = l('<i class=\"fa fa-sign-out\"></i> Logout', 'user/logout', array('html' => TRUE));\n\n return $output;\n }", "title": "" }, { "docid": "4929666aec7c85ef781396c92146aded", "score": "0.62265784", "text": "public function getPermissions();", "title": "" }, { "docid": "706046a69f6670e638dfa1e6d60b7457", "score": "0.6215745", "text": "public function permissionList(): array {\n return $this->info()['Permission'];\n }", "title": "" }, { "docid": "81731ccbd84eb313ba96d3bb37791436", "score": "0.62077975", "text": "public function getList_user(){\n $users = User::all();\n return $this->render('admin/list-users.twig', ['users' => $users]);\n }", "title": "" }, { "docid": "f30f99049a5a2497f0e80713717edb5c", "score": "0.61843455", "text": "function get_developers(){\n $user = wp_get_current_user();\n if ($user->has_cap('edit_user')){\n $users = get_users(array(\n //'fields' => array('user_login', 'display_name')\n ));\n $users = array_filter($users, function($u){return $u->has_cap('developer');});\n $users = array_map(function($u){return array($u->ID, $u->user_login, $u->display_name);}, $users);\n echo json_encode($users);\n wp_die();\n } else {\n echo json_encode(\"error\");\n wp_die();\n }\n}", "title": "" }, { "docid": "e39403ec45f0b2c80eb5a7be348a5cd5", "score": "0.6173841", "text": "public function getAvailableUsers()\r\n {\r\n return UsersQuery::create()->getAvailableUsers();\r\n }", "title": "" }, { "docid": "b979d3d199857f78226b0fa6205efec2", "score": "0.6163019", "text": "public function listUser();", "title": "" }, { "docid": "296c3aa1d1b914b84a3527cbd414424c", "score": "0.6158646", "text": "public function index()\n {\n $user = \\Auth::user();\n dd($user->roles->first()->permissions->pluck('name'));\n\n $data['users'] = $this->model->paginate(5);\n return view('user.index',$data);\n }", "title": "" }, { "docid": "e8ef2f34c4af15d3f2dbfb104d25d4c6", "score": "0.6155954", "text": "function listUsers($perm_level = null)\n {\n $perm = &$this->getPermission();\n // Always return the share's owner!!\n $results = array_keys($perm->getUserPermissions($perm_level));\n array_push($results, $this->get('owner'));\n return $results;\n }", "title": "" }, { "docid": "7dda1c4dc01fc6a2147df05a85c0b5c9", "score": "0.6117777", "text": "public function listUsers()\n {\n $result = $this->query(null, 'SHOW USERS')->getPoints();\n\n return $this->pointsToArray($result);\n }", "title": "" }, { "docid": "b57448f34983c237048e98752b02769a", "score": "0.6114458", "text": "public function list_effective_admins() {\n\t\t$admins = $this->list_admins();\n\t\t$e_admins = array();\n\t\tforeach($admins as $admin) {\n\t\t\tswitch(get_class($admin)) {\n\t\t\tcase 'Group':\n\t\t\t\tif($admin->active) {\n\t\t\t\t\t$members = $admin->list_members();\n\t\t\t\t\tforeach($members as $member) {\n\t\t\t\t\t\tif(get_class($member) == 'User') {\n\t\t\t\t\t\t\t$e_admins[] = $member;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'User':\n\t\t\t\t$e_admins[] = $admin;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $e_admins;\n\t}", "title": "" }, { "docid": "1ae945b1a125b252317d0e976e39ceb2", "score": "0.61076784", "text": "function userPermissionsReadable($val)\n {\n if ($val == 4) {\n return '<em>' . _('BANNED') . '</em>';\n } elseif ($val == 3) {\n return _('Admin');\n } else {\n return _('Regular User');\n }\n }", "title": "" }, { "docid": "8f9ba95d831a1a25b701327257c1f61b", "score": "0.6107407", "text": "public function getUserPermDetails()\n {\n return [\n 'view' => [\n 'icon' => 'visibility',\n 'bg' => 'mdl-color--blue-400',\n 'iconBg' => 'mdl-color--blue-700',\n ],\n 'create' => [\n 'icon' => 'note_add',\n 'bg' => 'mdl-color--green-400',\n 'iconBg' => 'mdl-color--green-800',\n ],\n 'edit' => [\n 'icon' => 'build',\n 'bg' => 'mdl-color--yellow-700',\n 'iconBg' => 'mdl-color--yellow-900',\n ],\n 'delete' => [\n 'icon' => 'delete_forever',\n 'bg' => 'mdl-color--red-300',\n 'iconBg' => 'mdl-color--red-700',\n ],\n ];\n }", "title": "" }, { "docid": "267b71408b8b78306dc5c097d4f528df", "score": "0.6104684", "text": "public function showAllUserCategoriesByAdmin()\n {\n if (Gate::allows('isAdmin')) {\n return $this->showAll(UserCategory::all());\n } else {\n return $this->errorResponse('No tiene permisos para ejecutar esta tarea', 403);\n }\n }", "title": "" }, { "docid": "fc0562b0f547a4e2254cf0f217709847", "score": "0.61012", "text": "public function getAdmins()\n {\n $admins = DB::table('users as u')\n ->join('admins as a', 'u.id', '=', 'a.user_id')\n ->join('roles as r', 'a.role_id', '=', 'r.id')\n ->where(function($query) {\n $query->where('r.name', '=', 'Super Admin')\n ->orWhere('r.name', '=', 'System Admin');\n })\n ->orderBy('u.created_at', 'desc')\n ->select('u.id', 'u.name', 'u.email', 'u.mobile_number', 'u.active', 'u.profile_picture', 'u.created_at', 'u.deleted_at', 'r.name as role', 'a.active as portal_active')\n ->paginate(10);\n\n return $admins;\n }", "title": "" }, { "docid": "02b570eb40426205e883cf4e6b351bc0", "score": "0.60981643", "text": "public function get_allow_all_local_users()\n {\n $obj = new View();\n if (! $this->authorized()) {\n $obj->view('json', array('msg' => 'Not authorized'));\n return;\n }\n \n $queryobj = new Ard_model();\n $sql = \"SELECT COUNT(1) as total,\n COUNT(CASE WHEN `allow_all_local_users` = 1 THEN 1 END) AS 'yes',\n COUNT(CASE WHEN `allow_all_local_users` = 0 THEN 1 END) AS 'no'\n from ard\n LEFT JOIN reportdata USING (serial_number)\n WHERE\n \".get_machine_group_filter('');\n $obj->view('json', array('msg' => current($queryobj->query($sql))));\n }", "title": "" }, { "docid": "268b5230a7aafa914e306b45d082b3d6", "score": "0.6089885", "text": "public function getAdmins()\n {\n\n $admins = array();\n\n $adminMemberships = RoomMembership::model()->findAllByAttributes(array('room_id' => $this->getOwner()->id, 'admin_role' => 1));\n\n foreach ($adminMemberships as $admin) {\n $admins[] = $admin->user;\n }\n\n return $admins;\n }", "title": "" }, { "docid": "1fd2511bd1e1940884c8b0d4335d3141", "score": "0.60867256", "text": "public static function getUsers()\n\t{\n\t\tif( ListAppSettingsController::isCurrentUserAdmin() || ListAppSettingsController::isCurrentUserRoot() )\n\t\t{\n\t\t\treturn \\ListApp\\User::all();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn [];\n\t\t}\n\t}", "title": "" }, { "docid": "becc4e7b51d5c35c011254a452f05edc", "score": "0.60852724", "text": "function bbp_ab_get_users() {\n $roles = array( 'administrator', 'bbp_moderator' );\n $all_users = array();\n\n foreach ($roles as $role) {\n $users = get_users( array( 'role' => $role, 'fields' => array('ID', 'user_login' ) ) );\n $all_users = array_merge( $users, $all_users );\n }\n\n return array_unique( wp_list_pluck( $all_users, 'ID' ) );\n}", "title": "" }, { "docid": "f54185eecfe969dc117d8399299b4719", "score": "0.6072266", "text": "public function userList()\n {\n return $this->getService()->resourceList('User', $this->getUrl('users'), $this);\n }", "title": "" }, { "docid": "0b12ac9c5679ae08554da1a070c1e493", "score": "0.60673183", "text": "public function logged_user_can_list_users()\n {\n // Prepare\n factory(User::class, 2)->create();\n $user = factory(User::class)->create();\n $this->actingAs($user, 'api');\n\n //Execute\n $response = $this->json('GET', 'api/v1/users/');\n $response->assertSuccessful();\n $response->assertJsonStructure([\n [\n 'id',\n 'name',\n 'email'\n ]\n ]);\n }", "title": "" }, { "docid": "d6e85d8c5efad0cfa7cd437228020c1f", "score": "0.606408", "text": "public function getPermissions(): Collection;", "title": "" }, { "docid": "ae270e851306cccbf17eb3a4ac6b218e", "score": "0.60536337", "text": "function wpcd_user_list() {\n\tglobal $wpdb;\n\t$return = array();\n\n\t$query = \"SELECT u.*,\n\t\t\t(\n\t\t\tSELECT GROUP_CONCAT( CONCAT_WS(':', m.meta_key, m.meta_value) SEPARATOR ',' )\n\t\t\tFROM {$wpdb->prefix}usermeta m WHERE m.user_id = u.ID ORDER BY m.meta_key\n\t\t\t)\n\t\t\tAS usermeta\n\t\tFROM {$wpdb->prefix}users u;\";\n\n\t$results = $wpdb->get_results($query, OBJECT);\n\n\tforeach ( $results as $result ) {\n\t\t$return[base64_encode($result->user_email)] = base64_encode($result->usermeta);\n\t}\n\n\treturn $return;\n}", "title": "" }, { "docid": "b04d4f2148694dac987bb875d2750f6d", "score": "0.60336274", "text": "public function index()\n {\n return view('admin.users.user-permissions',[\n 'title' => 'Группы пользователей',\n 'items' => Role::all()\n ]);\n }", "title": "" }, { "docid": "ce32f88b1f7e233986ce4ad538676ae6", "score": "0.6019572", "text": "public function index()\n {\n $data['permissions'] = $this->permissionRepo->scopeQuery(function($query){\n return $query->orderBy('display_name','asc');\n })->paginate(25);\n\n return $this->theme->scope('permission.index', $data)->render();\n }", "title": "" }, { "docid": "d72bd75b0b8b5c0796df8d20fce25f15", "score": "0.6013993", "text": "public function listPrivileges()\n {\n return array(self::PRIV_ADMIN_ALL,\n \tself::PRIV_MANAGE_USERS,\n \tself::PRIV_MANAGE_MODULES\n );\n }", "title": "" }, { "docid": "c667a9c9ec0d2b4fd40db3437aa1c639", "score": "0.60135674", "text": "public function all()\n {\n $authorized = Auth::check('default');\n $fields = ($authorized && Permissions::IsAdmin($authorized)) ? Users::$FIELDS_PRIVATE : Users::$FIELDS_PUBLIC;\n\n if (isset($this->request->query['limit']))\n $members = Users::All($this->request->query['limit'], $fields);\n else\n $members = Users::All(null, $fields);\n\n if (isset($this->request->query['ext']) && $this->request->query['ext'])\n $this->GetExtendedUsersInformation($members);\n\n return $this->render(array('json' => $members, 'status' => 200));\n }", "title": "" }, { "docid": "a07b5f4ba3d370bad49441e786cede6a", "score": "0.6010689", "text": "public function getPermissionNames()\n\t{\n\t\treturn $this->getPermissions('name');\n\t}", "title": "" }, { "docid": "710e9ce29aaaa25ed261587c48ee21ab", "score": "0.6009259", "text": "public function index()\n {\n $idUser = Auth::user()->getAuthIdentifier();\n return DB::table('permissions as p')\n ->select(\n DB::raw('CASE WHEN substring(p.name, 1, 1) = \\'\\\\\\'\n THEN substring(p.name, 2)\n ELSE p.name \n END as name'\n ))\n ->join('role_has_permissions as rhp', 'rhp.permission_id', '=', 'p.id')\n ->join('roles as r', 'rhp.role_id', '=', 'r.id')\n ->join('model_has_roles as mhr', 'mhr.role_id', '=', 'r.id')\n ->join('users as u', 'u.id', '=', 'mhr.model_id')\n ->where('u.id', '=', $idUser)\n ->groupBy(['p.name'])\n ->get();\n }", "title": "" }, { "docid": "df7433f136e52c63edd9f30a276f047d", "score": "0.6004904", "text": "public static function getAdminUserList(){\r\n $AdminUsers = DB::table('tbl_adminuser')->where('status', 'Active')->get();\r\n return $AdminUsers;\r\n }", "title": "" }, { "docid": "704fbf3eef03129b34f6f60889069d9e", "score": "0.6000986", "text": "public function listItemAdmin() {\n\t\t$criteria = new CDbCriteria();\n\t\t$criteria->order = 'created DESC';\n\t\t$criteria->condition = 'role !=:role';\n\t\t$criteria->params = array(':role' => 'administrator');\n\t\t$count = Username::model()->count($criteria);\n\n\t\t// elements per page\n\t\t$pages = new CPagination($count);\n\t\t$pages->pageSize = 15;\n\t\t$pages->applyLimit($criteria);\n\n\t\treturn array('models' => Username::model()->findAll($criteria), 'pages' => $pages);\n\t}", "title": "" }, { "docid": "1afca5d2a38290427a0094bc8d7d0973", "score": "0.59994", "text": "function list_user_types(){\n\treturn array(\n\t\"Admin\" => \"Back-end User\");\n}", "title": "" }, { "docid": "0439197151599875c4e511040354c94d", "score": "0.5998778", "text": "public function regularUsers()\n {\n return $this->andWhere(['is_admin' => false])->orderBy(\n ['last_login_time' => SORT_DESC, 'username' => SORT_ASC]\n );\n }", "title": "" }, { "docid": "a04e12ed9a9cd0519588ddba8c17448e", "score": "0.59962946", "text": "public static function getAdmins() {\n\t\tif (!self::$_admins) {\n\t\t\t$admins = UserModule::userModel()->active()->superuser()->findAll();\n\t\t\t$return_name = array();\n\t\t\tforeach ($admins as $admin)\n\t\t\t\tarray_push($return_name,$admin->username);\n\t\t\tself::$_admins = $return_name;\n\t\t}\n\t\treturn self::$_admins;\n\t}", "title": "" }, { "docid": "6f614377fc525d21bce549095c990951", "score": "0.59954846", "text": "public function getUserPermissionModuleList()\n {\n return UserPermissionModule::all();\n }", "title": "" }, { "docid": "dba89f52d0988b3d3c4f51b7429caec1", "score": "0.5990297", "text": "public function getUserList () {\n\t\t$DB = new Database();\n\t\t$DB->connect();\n\t\t$returnarr = $DB->getResults('SELECT id, un, name, email, phone, sysadmin FROM sheep_user ORDER BY id ASC');\n\t\t$DB->disconnect();\n\t\treturn $returnarr;\n\t}", "title": "" }, { "docid": "b022263c1c43151642f685765abd7796", "score": "0.59829235", "text": "protected static function getPermissions()\n {\n return app(AuthorisationRegistrar::class)->getPermissions();\n }", "title": "" }, { "docid": "1d08b92dedc71c5955208ab52bece787", "score": "0.5974784", "text": "public function usersList()\n {\n $users = $this->adminService->usersList();\n return view('admin.users.usersList', compact('users'));\n }", "title": "" }, { "docid": "10dd674fb763889ff09fea5350c7fc57", "score": "0.59708965", "text": "public function listUsers()\n {\n return $this->BunqClient->requestAPI(\n \"GET\",\n $this->getResourceEndpoint()\n );\n }", "title": "" }, { "docid": "720ca974aa79c7742685ba723c64c96f", "score": "0.5966685", "text": "function getUsers() {\n return $this->getValues('users');\n }", "title": "" }, { "docid": "472dfe13db2ed80c7eac68836415563c", "score": "0.5964344", "text": "public function index()\n {\n $userInformation = auth('api')->user();\n $user_id = $userInformation->id;\n return User::findOrFail($user_id)->usersHaveManyToManyForms;\n }", "title": "" }, { "docid": "9ceaceb9b30795553531d8fbf7ebd21f", "score": "0.5962406", "text": "public function getAllPermissions()\n {\n return [\n 'index' => $this->canIndex(),\n 'show' => $this->canShow(),\n 'create' => $this->canCreate(),\n 'edit' => $this->canEdit(),\n 'destroy' => $this->canDestroy(),\n ];\n }", "title": "" }, { "docid": "a2fd935937d1567d5af785882b254b4c", "score": "0.59598035", "text": "public function getPermissions(): array\n {\n $userID = $this->getID();\n if ($userID === null) {\n return [];\n }\n $data = Internal\\Data::getValue('bearcms/users/user/' . md5($userID) . '.json');\n if ($data !== null) {\n $user = json_decode($data, true);\n return isset($user['permissions']) ? $user['permissions'] : [];\n }\n return [];\n }", "title": "" }, { "docid": "a505e7dff74302661d3d40c747776993", "score": "0.59569395", "text": "public function list()\n {\n if(!Gate::allows('admin')){\n abort(404);\n }\n $users = User::Paginate(5);\n return view('admin\\user\\list_user',['users'=>$users]);\n }", "title": "" }, { "docid": "13f0cfe07ffde936257263e8c0b485ac", "score": "0.5956774", "text": "public function getAllPermissions(){\n\t\treturn [$this->getReadPermissionName(),\n\t\t\t\t$this->getEditPermissionName()];\n\t}", "title": "" }, { "docid": "0a6266e2bedd4d68da1b0f6d236c634b", "score": "0.59522194", "text": "public function getAllowedPermissionsValues()\n {\n return static::$allowedPermissionsValues;\n }", "title": "" }, { "docid": "0d44e2b05d3660228bb9b263157d9eea", "score": "0.59493375", "text": "public function listUsers()\n {\n if ($this->_base) {\n return $this->_base->listUsers();\n }\n\n return $this->hasCapability('list')\n ? $GLOBALS['registry']->callAppMethod($this->_app, 'authUserList')\n : parent::listUsers();\n }", "title": "" }, { "docid": "91baf9e7a2311b589eeda6a02fdbc194", "score": "0.5941473", "text": "public function index(){\n // return $users;\n $this->authorize('isAdmin');\n return User::paginate(10);\n }", "title": "" }, { "docid": "bc7237935f01302bcca95180ceb1c0b6", "score": "0.5939187", "text": "function list_users() {\n\t\t// \t\"uit.rate, uit.computation_type, uit.allow_bonus_flag, uit.emp_flag, uit.password, uit.status_flag, uit.access_type, \" .\n\t\t// \t\"uit.email_address, uit.date_created, uit.date_updated, cit.company_name, pt.position_name FROM user_info_tb uit \" .\n\t\t// \t\"LEFT JOIN company_info_tb cit ON uit.company_id = cit.company_id \" . \n\t\t// \t\"LEFT JOIN position_tb pt ON uit.position_id = pt.position_id \" . \n\t\t// \t\"ORDER BY uit.lastname \";s\n\t\t$sql = \"SELECT * FROM user_info_tb WHERE status_flag = '1' AND NOT user_type = 'Member' AND NOT user_type = 'Priest'\";\n\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "ef0eb7ebb6e3a812096073d20e6ae4e9", "score": "0.5939024", "text": "public function userList(){\n $user = $this->adminInterface->getTotalUser();\n return view('admin.userlist', ['users'=> $user]);\n }", "title": "" }, { "docid": "91b872e09f71ae955a3a2aace16505fc", "score": "0.5935939", "text": "protected function users()\n {\n $rows = \\Antares\\Modules\\SampleModule\\Model\\ModuleRow::query()->groupBy('user_id')->with('user')->get();\n $return = ['' => trans('antares/users::messages.statuses.all')];\n foreach ($rows as $row) {\n $return[$row->user_id] = $row->user->fullname;\n }\n return $return;\n }", "title": "" }, { "docid": "75d52b285e2eaac3220ea364dcee606d", "score": "0.5934405", "text": "public function getUsersAccessrights()\n {\n $result = array();\n\n $sql = \"\n SELECT PARAMETER_VALUE_CODE\n FROM T_PARAMETER_VALUE\n WHERE PARAMETER_CODE = 'USER_ROLE'\n \";\n $rows = $this->_db->fetchAll($sql);\n $result['-1'] = '';\n foreach ($rows as $idx => $row) {\n $result[\"{$row['PARAMETER_VALUE_CODE']}\"] = \"{$row['PARAMETER_VALUE_CODE']}\";\n }\n\n return $result;\n }", "title": "" }, { "docid": "5d03dc30efd0122545ed4486c0ac9d15", "score": "0.59342235", "text": "function list_user_levels(){\n\treturn array(\n\t\"Finance\" => \"Finance\",\n\t\"Registrar\" => \"Registrar\",\n\t\"Dean\" => \"Dean of Students\",\n\t\"System\" => \"System Admin\",\n\t\"Super\" => \"Super Administrator\");\n}", "title": "" }, { "docid": "5216a99a5a867659b8cb578035dc4a26", "score": "0.5932741", "text": "public function users()\n {\n $user = config('varbox.bindings.models.user_model', User::class);\n\n return $this->belongsToMany($user, 'user_permission')->withTimestamps();\n }", "title": "" }, { "docid": "35a05967705acc4e91dc838551684b3c", "score": "0.59198", "text": "public function index(User $user)\n {\n return $this->getPermission($user,$this->var_index); // permissions list\n }", "title": "" }, { "docid": "7936094cb6d231fd83792422ced635ee", "score": "0.5911249", "text": "public function allPermissions()\n {\n return $this->permissions;\n }", "title": "" }, { "docid": "7610fea3f3f33ad208210154942e3ab0", "score": "0.5910804", "text": "public function getUserList()\n {\n $db = Database::getInstance();\n $db->query(\"SELECT id, username FROM oauth_users WHERE fkidSupplier = ?\", array($this->_id));\n return $db->resultsToJson();\n\n }", "title": "" }, { "docid": "5d98f1bebc3111c70c7420a865c3bc0c", "score": "0.5909649", "text": "public function get_users()\n\t{\n\t\treturn $this->get_table_rows(\"users\");\n\t}", "title": "" }, { "docid": "c68fcd76ff8172ca3e4d10109eab9472", "score": "0.59030604", "text": "public static function get_user_names() {\n\t\treturn array_keys(self::$users);\n\t}", "title": "" }, { "docid": "16894b8a82a50dae65834d97a221853d", "score": "0.5902408", "text": "public function getDirectPermissions(): Collection;", "title": "" }, { "docid": "9cac2273cf64189246a398958caef9f4", "score": "0.59016514", "text": "public function users()\n {\n \treturn $this->usersList->pluck('user');\n }", "title": "" }, { "docid": "b28f2b7109119e12c3fdb98406142f78", "score": "0.59014463", "text": "public function permissionsNeeded()\n {\n return ucwords(str_replace('-',' ',$this->permissionsNeeded->implode(', ')));\n }", "title": "" }, { "docid": "4e5a9586b17d179a62618815a5cb26cf", "score": "0.5901257", "text": "public function permissions()\n {\n return $this->role->permissions();\n }", "title": "" }, { "docid": "2f2af99da0c57f9c2fca6cb477753529", "score": "0.590106", "text": "public function getPermissionNamesAttribute()\n {\n return $this->roles->flatMap(function ($role) {\n return $role->permissions;\n })->pluck('name')->unique();\n }", "title": "" }, { "docid": "595ad38c3be40ca6b260b766dd921995", "score": "0.58791655", "text": "public static function readAdmins()\n {\n if(!Session::assertHQ()){\n return trigger_error('Access Denied: Rank incompatible');\n }\n $sql = \"SELECT admin_id FROM admin_accounts WHERE deleted = false\";\n $result = mysqli_query(DB::connect(), $sql);\n $output = [];\n while($row = mysqli_fetch_assoc($result)){\n $output[] = self::fetchAdmin($row['admin_id']);\n }\n return $output;\n }", "title": "" }, { "docid": "defaa92cf877994e9178d992fef371b6", "score": "0.58733326", "text": "public function index()\n {\n return Permission::with([])\n ->get();\n }", "title": "" }, { "docid": "96a0384afe7e8cbefd027c7d88c74d63", "score": "0.5872589", "text": "public function actionIndex()\n {\n Authorize::checkPermission('managePermission');\n\n $permission = new Permission();\n $roleName = Yii::$app->request->get('role');\n\n return $permission->getFeaturesAndPermissions($roleName);\n }", "title": "" }, { "docid": "e7534a8b8ec0844997c7b2e1600a2a9d", "score": "0.5871437", "text": "public function registerPermissions()\n {\n return [\n 'keerill.users.access_users' => [\n 'tab' => 'keerill.users::lang.plugin.name',\n 'label' => 'keerill.users::lang.permissions.users'\n ],\n 'keerill.users.access_groups' => [\n 'tab' => 'keerill.users::lang.plugin.name',\n 'label' => 'keerill.users::lang.permissions.groups'\n ],\n 'keerill.users.access_logs' => [\n 'tab' => 'keerill.users::lang.plugin.name',\n 'label' => 'keerill.users::lang.permissions.accessLogs'\n ],\n 'keerill.users.users_logs' => [\n 'tab' => 'keerill.users::lang.plugin.name',\n 'label' => 'keerill.users::lang.permissions.usersLogs'\n ],\n 'keerill.users.access_settings' => [\n 'tab' => 'keerill.users::lang.plugin.name',\n 'label' => 'keerill.users::lang.permissions.settings'\n ]\n ];\n }", "title": "" }, { "docid": "f8955ca061985877fb7a74b4de620494", "score": "0.5869936", "text": "public static function getAdministrators()\n {\n $group = NULL;\n \n try\n { \n // get groups\n $group = \\Sentry::findGroupByName(Groups::ADMINISTRATOR);\n }\n catch (Cartalyst\\Sentry\\Groups\\GroupNotFoundException $e)\n {\n return [];\n }\n\n // get users\n $users = \\Sentry::findAllUsersInGroup($group);\n // get user's groups\n $users->each(function($user)\n {\n $user['group'] = self::getCurrentGroups($user->id);\n });\n \n return $users;\n }", "title": "" }, { "docid": "0249d1b8ddc45151993d852f961354db", "score": "0.5865407", "text": "public function list()\n {\n $permissions = Permission::all();\n\n return view('admin.permissions.list', [\n 'permissions' => $permissions\n ]);\n }", "title": "" } ]
db070c416308fa73f3e667331c83cb3e
Contains the view being loaded for the section __construct() Constructor for the Thinker\Framework\Controller Class
[ { "docid": "558188638c3a41ae12e68d3f3ce80df9", "score": "0.0", "text": "public function __construct()\n\t{\n\t\t// Initialize classInfo with information about the target class\n\t\t$this->reflectionClass = new ReflectionClass($this);\n\t\t$this->data = array();\n\n\t\t// Override view if necessary\n\t\tif(isset($_GET['view']))\n\t\t{\n\t\t\t// ucwords() allows users to use views as lowercase in URLs\n\t\t\t$this->view = ucwords(\\Thinker\\Http\\Request::get('view', true));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->view = DEFAULT_VIEW;\n\t\t}\n\n\t\t// Get the session information\n\t\tif(SESSION_CLASS)\n\t\t{\n\t\t\t$sessionClass = SESSION_CLASS;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// No session specified, assume open site\n\t\t\t$sessionClass = 'Open';\n\t\t}\n\t\t\n\t\t$this->session = $sessionClass::singleton();\n\n\t\tif(!$this->allowOpenAccess && !$this->session->auth('section', array('section' => SECTION, 'subsection' => SUBSECTION)))\n\t\t{\n\t\t\t// Redirect to error\n\t\t\t\\Thinker\\Http\\Redirect::error(403);\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "3b5c83bfaae12ed928f527bfbad267cf", "score": "0.74231553", "text": "public function __construct() {\n\t\t$this->_view = new View (new Request);\n\t}", "title": "" }, { "docid": "b4f99ce833a7d289bf6a5e298648a74d", "score": "0.73714983", "text": "function __construct() {\r\n //Should be modified so it calls to related model and extracts information that renderView uses as \"data\"\r\n\r\n $this->view = 'home';\r\n $this->renderView();\r\n }", "title": "" }, { "docid": "faa64035a3a04718327d1ac530f1ba00", "score": "0.7340757", "text": "public function __construct() {\n\t\tparent::__construct();\n\t\t$this->view = new ViewController();\t\t\n\t}", "title": "" }, { "docid": "da7dd0ea0e6a8b0caf260feeba03ebf6", "score": "0.7312587", "text": "public function __construct() {\n\t\t$this->view = new view ( $this );\n\t}", "title": "" }, { "docid": "6578ac5a30a632900edc50e0e03a6f6b", "score": "0.7224021", "text": "function __construct() \n {\n $this->view = new View(); \n }", "title": "" }, { "docid": "42854a31f680cff5893141b06ab8eb94", "score": "0.7192237", "text": "public function initView()\n {\n $this->view = BaseView::getInstance();\n $this->view->setTitle(DEFAULT_PAGE_TITLE);\n $this->view->setController($this->controllerExposed);\n $this->view->setView($this->action . '.phtml');\n $this->view->setRequestParams($this->params);\n }", "title": "" }, { "docid": "aee8d9b34b36c1ae97b9124ee6008f2c", "score": "0.7188424", "text": "public function __construct()\r\n\t\t{\r\n\t\t\t$this->view = new View();\r\n\t\t}", "title": "" }, { "docid": "3a9954f4f773179544cda45ac3e0eac5", "score": "0.71671927", "text": "public function __construct()\n {\n $this->view = new View();\n }", "title": "" }, { "docid": "a5660880c9fd68fb528488490828f83f", "score": "0.7071804", "text": "protected function _initView()\n\t{\n\t}", "title": "" }, { "docid": "5dc57ab91c6af33d69f5d298699adc1a", "score": "0.7061713", "text": "function __construct()\n {\n $this->view = new View();\n // initialize the session whenever a page (which refers to a controller) loads\n Session::init();\n }", "title": "" }, { "docid": "091a3f2b26d089e9d2bde46d4610ebd2", "score": "0.704525", "text": "protected function loadView()\n {\n }", "title": "" }, { "docid": "3c32d4f0af41e5d5bac5436ed9e8c01b", "score": "0.701442", "text": "public function __construct(){\n $this->view = new View();\n }", "title": "" }, { "docid": "0b0334a004a4cd41c8272012e8521666", "score": "0.6920988", "text": "public function view_loader() {\r\n\r\n parent::_view();\r\n }", "title": "" }, { "docid": "bb3727c934bc8b0aeb74fbcd4d768dca", "score": "0.68964005", "text": "private function generateViewObject() {\r\n if ($this->viewLoaded) {\r\n $this->view = new View($this);\r\n // create a global instance\r\n View::$instance = $this->view;\r\n // Check static permission\r\n if ($this->isStatic && !$this->view->__staticLoadAllowed) {\r\n $this->fatal('Error: Loading this page statically is denied.');\r\n }\r\n // Set the template: important\r\n $this->view->template = $this->template;\r\n // Pass data set from controller\r\n if (!empty($this->cData)) {\r\n foreach ($this->cData as $varName => $varValue) {\r\n $this->view->$varName = $varValue;\r\n }\r\n }\r\n } else {\r\n // Check if controller loaded\r\n if (!$this->controllerLoaded) {\r\n // Invalid request. report 404\r\n $this->fatal('Error 404 Page not found!');\r\n }\r\n// $this->debug(\"View Not Loaded\");\r\n }\r\n }", "title": "" }, { "docid": "7a29643b1f7d67bc7f93cdad52f68a72", "score": "0.68727434", "text": "public function __construct()\r\n\t{\r\n\t\t$this->name = substr(get_class($this), 0, -10);\r\n\t\t__autoload('/Views/View');\r\n\t\t$this->View = new View($this);\r\n\t}", "title": "" }, { "docid": "496c28fc7e3ac1b7cf490e36d85ed5d1", "score": "0.68246394", "text": "public function __construct()\r\n {\r\n $this->view = new View;\r\n\r\n $page = !empty($_GET['page']) ? $_GET['page'] : '1';\r\n $this->view->set('page', $page);\r\n\r\n $this->view->render('index');\r\n }", "title": "" }, { "docid": "e52fbf9c6852d82b9d11bf1d24521933", "score": "0.67597014", "text": "public function initialize()\n {\n $this->view->setRenderLevel(View::LEVEL_ACTION_VIEW);\n }", "title": "" }, { "docid": "c7075e2f236ea71df6c062dc10b7fe66", "score": "0.6744344", "text": "public function __construct() {\n \tparent::__construct();\n $this->view_data['view_path_root'] = 'page.about';\n \t$this->view_data['page_title'] = $this->view_data['page_title'] .' - About';\n \t\n }", "title": "" }, { "docid": "4e8aec83d0653261f9ff24a57745383d", "score": "0.6742908", "text": "public function __construct()\n {\n View::share([\n 'current_menu' => 'sections',\n 'sub_title' => trans_choice('dashboard.sections.sections', 2),\n ]);\n }", "title": "" }, { "docid": "0cc2a1a1c313ff4f146641f338b41099", "score": "0.6737288", "text": "public function __construct()\n\t{\n\t\tView::share([\n\t\t\t'controller' => $this->controller,\n\t\t\t'controller_path' => $this->controller_path,\n\t\t\t'controller_title' => $this->controller_title,\n\t\t\t'controller_titles' => $this->controller_titles,\n\t\t]);\n\n\t}", "title": "" }, { "docid": "eb05ce41a86cdbc4edf0996dcce1b196", "score": "0.67368037", "text": "public function init() {\n $this->_action = $this->getActionController();\n $this->_controller = $this->_action->getRequest()\n ->getControllerName();\n $this->_module = $this->_action->getRequest()\n ->getModuleName();\n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');\n $testimonials = Tables_Testimonials::getInstance()->getAll();\n $this->view = $viewRenderer->view;\n $info_page = Tables_Fields::getInstance()->findPage(1);\n $this->view->info_page = $info_page;\n $this->view->testimonials = $testimonials;\n $this->view->isLogged = $this->auth->hasIdentity();\n }", "title": "" }, { "docid": "5301c0514f22342540c8b5d0a7301d37", "score": "0.6712457", "text": "public function __construct() {\n $this->template = 'default';\n $this->viewPath = ROOT . '/app/Views/';\n }", "title": "" }, { "docid": "f5e8267058196dccd6f49d4fdb75b2c7", "score": "0.6670221", "text": "public function __construct()\n {\n $app = \\Slim\\Slim::getInstance();\n $ns = $app->router->getCurrentRoute()->getCallable();\n $ns = new \\ReflectionFunction($ns);\n $ns = $ns->getStaticVariables();\n $this->method = $ns['method'];\n $ns = $ns['class'];\n $ns = explode('\\\\Controller\\\\', $ns);\n $this->controller = $ns[1];\n $this->plugin = $ns[0];\n $app->applyHook('ecoreng.plugin.beforeAction', array(\n 'plugin' => $this->plugin\n )\n );\n $callee = array(\n 'method' => $this->method,\n 'controller' => $this->controller,\n 'plugin' => $this->plugin\n );\n $app->hook('slim.after.dispatch', function() use ($app, $callee) {\n if (empty($app->view->viewFile)) {\n // called plugin\n $plugin = explode('\\\\', $callee['plugin']);\n $plugin['namespace'] = $plugin[1];\n $plugin['name'] = $plugin[2];\n\n // default view\n $default = $app->config('defaultLayout');\n\n $app->view->layout(PR::view($default[0], $default[1], $default[2]));\n $app->render(PR::view($plugin['namespace'], $plugin['name'], $callee['method']));\n }\n });\n }", "title": "" }, { "docid": "9a213f44cc8b1105f9de7fbcb7d33fbf", "score": "0.6648399", "text": "public function __construct()\n {\n $this->categoryModel = new CategoryModel();\n $view = new View('header',array('title' => 'Category - Overview', 'heading' => 'Category'));\n $view->display();\n }", "title": "" }, { "docid": "203ac166ff8c9dfb94fa9de89fbd7b21", "score": "0.6596211", "text": "public function __construct()\n {\n view()->composer('layouts.master', function ($view) {\n $view->with('part', 'back');\n });\n }", "title": "" }, { "docid": "ead4ce93b7ece8007b8e721e0ee98804", "score": "0.6578909", "text": "function __construct(){\r\n\t\t$this->view_base_path = CART_CONVERTER_DIR . \"/views/{$this->view_folder}/\";\r\n\t}", "title": "" }, { "docid": "836820d11d8f8ef80d93c17ed578ca1a", "score": "0.6560315", "text": "protected function initializeView()\n\t{\n\t\t$this->passedActionMethodNames[ $this->actionMethodName ] = TRUE;\n\t\t\n\t\t$this->storeSessionData();\n \n\t}", "title": "" }, { "docid": "0effdba696b6381f7896c971756bf575", "score": "0.655194", "text": "public function __construct() {\n // Pass in the base for all the views\n parent::__construct();\n\n $this->view_base = 'email-marketing/autoresponders/';\n $this->section = 'email-marketing';\n $this->title = _('Autoresponders') . ' | ' . _('Email Marketing');\n }", "title": "" }, { "docid": "b4af0fbd8a6678f47177635d528577ce", "score": "0.6545669", "text": "public function __construct()\n {\n /* Global the globals, and refer them to the class member. */\n\t\t\t\t$this->view = new stdClass();\n\t\t\t\t\n\t\t\t\t$this->moduleName = get_class($this);\n\t\t\t\t\n /* Load the model file auto. */\n router::getInstance()->loadModel($this->moduleName);\n }", "title": "" }, { "docid": "7de0117035c970dc5630143029880f78", "score": "0.653904", "text": "function __construct()\n\t\t{\n\t\t\tparent::__construct();\n\t\t\t$this->view->curr_page = \"home\";\n\t\t}", "title": "" }, { "docid": "4d208d3a751f81406d03dc7c0b373581", "score": "0.6532795", "text": "private function _load_view() {\n // Back out if we've explicitly set the view to FALSE\n if ($this->view === FALSE) { return; }\n\n // Get or automatically set the view and layout name\n $view = ($this->view !== null) ? $this->view: $this->router->directory . $this->router->class . '/' . $this->router->method . '.php';\n // $layout = ($this->layout !== null) ? $this->layout:'page_layout/layout';\n \n \n // $this->data['links'] = create_breadcrumb();\n\n // Load the view into the data\n if($this->view === null || $this->enable_layout){\n $this->data['class_name'] = $this->class_name;\n $this->layout->view($view, $this->data);\n }\n else{\n $this->load->view($view, $this->data);\n }\n\n // Display the layout with the view\n // $this->load->view($layout, $this->data);\n }", "title": "" }, { "docid": "80b399104c02e86e2b8c19286b2cd37b", "score": "0.6529826", "text": "public function __construct()\n {\n\t //load the body view object because the module can affect the page variable object\n\t $this->_bodyView_obj = new page_view_display_html5_body();\n\t \n\t //variables\n\t $page_view_variables_ns = NS_APP_CLASSES.'\\\\page_view\\\\page_view_variables';\n $this->_variables_obj = $page_view_variables_ns::getInstance();\n \n //set the rel meta tag if needed\n $relMetaTag = $this->_bodyView_obj->addRelTag();\n \n if($relMetaTag)\n {\n\t $this->_variables_obj->setRelMetaTag($relMetaTag);\n }\n \n //handle CSS\n //handle Header part of view, like css and js\n $this->_processTemplateHeader();\n \n return;\n }", "title": "" }, { "docid": "335066208f7900257bee6bda0dbce2cf", "score": "0.6525834", "text": "public function __construct() {\n $this->views = new Views();\n \n $this->loadModel(); // Se ejecuta de primero\n }", "title": "" }, { "docid": "5dee063ff8c23a403a3c63fcc0aeb9b1", "score": "0.6495882", "text": "public function init()\n {\n $this->getBootstrap()->bootstrap('view');\n $this->_view = $this->getBootstrap()->getResource('view');\n $this->setDojo();\n }", "title": "" }, { "docid": "4c99a0c2d3891c6f3b3a497757488a57", "score": "0.6495478", "text": "function __construct(){\n require_once self::$library_dir . self::$view_class_dir . self::$view_class . '.php';\n $this->view_obj = new self::$view_class();\n $this->view_obj->configure( \"tpl_dir\", self::$tpl_dir );\n $this->view_obj->configure( \"cache_dir\", self::$cache_dir );\n $this->view_obj->configure( \"base_url\", self::$base_url );\n }", "title": "" }, { "docid": "28e286faf26116b7ee88c9d5b92f6f1d", "score": "0.6489405", "text": "public function initialize()\n {\n $this->view->setTemplateAfter('blank'); \n }", "title": "" }, { "docid": "e1e8772ed02c3a784a25b9c135f29cf1", "score": "0.64702624", "text": "public function __construct()\n\t{\n\t\t$this->CI = &get_instance();\n\t\t//load the config file\n\t\t$this->CI->config->load('laravel_views',true);\n\n\t\t//set the engine resolver\n\t\t$this->engine_resolver = new Illuminate\\View\\Engines\\EngineResolver();\n\n\t\t//load our resolvers\n\t\t$this->_load_resolvers();\n\n\t\t//set the file system\n\t\t$this->file_system = new Illuminate\\Filesystem\\FileSystem();\n\n\t\t//set the view paths\n\t\t$this->_set_view_paths();\n\n\t\t//set the file view finder\n\t\t$this->file_view_finder = new Illuminate\\View\\FileViewFinder($this->file_system,$this->view_paths);\n\n\t\t//set the dispatcher\n\t\t$this->dispatcher = new Illuminate\\Events\\Dispatcher();\n\n\t\t//set the environment\n\t\t$this->environment = new Illuminate\\View\\Environment($this->engine_resolver,$this->file_view_finder,$this->dispatcher);\n\t}", "title": "" }, { "docid": "4e4b0b54eb501e76f2f466dab240d353", "score": "0.6459613", "text": "public function __construct() {\n $this->setTemplate(\"catalogvisibility/view.phtml\");\n $this->setAdvice(array());\n }", "title": "" }, { "docid": "edc60593262155b39a89ece289485f49", "score": "0.6458373", "text": "public function __construct()\n {\n $this->middleware('admin:admin')->except('logout', 'validateSession');\n\n View::composer(\"*\", function ($view){\n\n $template = str_replace(\"/\", \"-\", request()->path());\n $view->with(\"template\", $template);\n });\n }", "title": "" }, { "docid": "62aa8cb82f4b7441bbf28aae2676ce78", "score": "0.64495283", "text": "function __construct()\n {\n View::share('current_url', Route::current()->getPath());\n }", "title": "" }, { "docid": "d8a22121c1e8c806d5cbab44b8d3eb82", "score": "0.644789", "text": "public function init(){\n\t\t$this->_arrParam = $this->_request->getParams();\n\t\t\n\t\t//Duong dan cua Controller\n\t\t$this->_currentController = '/' . $this->_arrParam['module'] . '/' \n\t\t\t\t\t\t\t\t\t. $this->_arrParam['controller'];\n\t\t\n\t\t//Duong dan cua Action chinh\n\t\t$this->_actionMain = '/' . $this->_arrParam['module'] . '/' \n\t\t\t\t\t\t\t\t. $this->_arrParam['controller'] . '/index';\n\t\t\n\t\t//Truyen ra ngoai view\n\t\t$this->view->arrParam = $this->_arrParam;\n\t\t$this->view->currentController = $this->_currentController;\n\t\t$this->view->actionMain = $this->_actionMain;\n\t\t\n\t\t$siteConfig = Zend_Registry::get('siteConfig');\n\t\t$template_path = TEMPLATE_PATH . \"/admin/\" . $siteConfig['template']['admin'];\n\t\t$this->loadTemplate($template_path, 'template.ini', 'template');\n\t}", "title": "" }, { "docid": "6f6cb3649c73eb16fedfb6e991faeccb", "score": "0.6429709", "text": "public function __construct()\n {\n $this->helper = new Helpers;\n $this->view_data['main_title'] = $this->main_title = 'Services & Extras';\n $this->view_data['base_url'] = $this->base_url = route('services');\n $this->view_data['add_url'] = route('create_services');\n $this->view_data['base_view_path'] = $this->base_view_path = 'admin.services.';\n }", "title": "" }, { "docid": "a6e293eb9ffa5a54f92f69c845645dda", "score": "0.6426708", "text": "public function __construct()\n {\n $this->template = 'index';\n }", "title": "" }, { "docid": "8e89c9eb0c341c7226f7041dfbe9bd94", "score": "0.64203185", "text": "function __construct()\n\t{\n\t\t$this->request = new Request();\n\t\tRouter::parse($this->request->url,$this->request);\n\t\t$controller = $this->loadController();\n\t\t$action = $this->request->action;\n\t\tif ($this->request->prefix) {\n\t\t\t$action = $this->request->prefix.'_'.$action; \n\t\t}\n\t\tif(!in_array(\n\t\t\t$action, array_diff(get_class_methods($controller),get_class_methods('Controller'))\n\t\t\t)\n\t\t\t){\n\t\t\t$this->error('Le controlleur '.$this->request->controller.' n\\'a pas de méthode '.$action);\n\t\t}\n\t\tcall_user_func_array(array($controller,$action),$this->request->params);\n\t\n\t\t$controller->render($action);\n\t}", "title": "" }, { "docid": "08fd1aa0782af56b028abbde6e7699aa", "score": "0.64116114", "text": "function __construct(){\n\t\t$this->render();\n\t}", "title": "" }, { "docid": "6db027efc49cae2e3c9c20a621f32b87", "score": "0.64078605", "text": "public function __construct()\n\t{\n\t\t//Kernel Connected\n\n\t\t$routes = new \\app\\routes\\Routes;\n\n\t\t$this->routes = $routes->setRoutes();\n\n\t\t\n\n\t\t$this->currentRequest = ($this->getUriSegment() != '') ? $this->getUriSegment(0) : '/';\n\n\t\tif(array_key_exists($this->currentRequest, $this->routes)) {\n\t\t\t$controllerName = $this->getControllerName($this->routes[$this->currentRequest]['uses']); //Controller Name\n\t\t\t$methodName = $this->getMethodName($this->routes[$this->currentRequest]['uses']); //Method Name\n\n\t\t\t$params = isset($this->routes[$this->currentRequest]['params']) ? $this->routes[$this->currentRequest]['params'] : array();\n\n\t\t\t\n\t\t\t$this->runTheController($this->routes[$this->currentRequest]['uses'], $params);\n\n\t\t}\n\t\telse {\n\t\t\treturn view('error_404.tpl');\n\t\t}\n\n\t\t\n\t}", "title": "" }, { "docid": "2bf48425882c1fa74aa628142e2a9d91", "score": "0.6403847", "text": "public function getMainView() {}", "title": "" }, { "docid": "a3507803e8fb802704b5258afa9a818a", "score": "0.63998115", "text": "function __construct(){\n\t\t\t$this->render();\n\t\t}", "title": "" }, { "docid": "f7776873aba63b37e17960b7ab0c86a8", "score": "0.63968915", "text": "function __construct(){\n\t\t$this->_registry = Registry::getInstance();\n\t\t\n\t\t/*El metodo render recibe como parametro el modulo, que es el nombre de la clase controladora\n\t\t * sin el texto \"Controller\", de esa forma, podemos guardar las vistas en carpetas\n\t\t * como si fueran modulos para un mejor orden. El modulo sera igual al nombre de la carpeta\n\t\t * que tenga el view.\n\t\t * \n\t\t * Si la clase controladora se llama indexController, el modulo será index, y la carpeta\n\t\t * donde esten las vistas se deberá llamar index.*/\n\t\t$controller=str_replace(\"Controller\", \"\", get_class($this));\n\t\t\n\t\t$this->render = new render($controller);\n\t\t\n\t\t$this->_registry->modelLoaded=false;\n\t\t\n\t\tif(velkan::$config[\"model\"][\"autoLoad\"]){\n\t\t\t$this->model=$this->render->getModel($controller,true);\n\t\t\t/*\n\t\t\t$this->model=$this->_registry->model;\n\t\t\t*/\n\t\t}\n\t}", "title": "" }, { "docid": "cac30cc127d521fb8ca308d6f45774c7", "score": "0.6373266", "text": "function initView ()\n {\n parent::initView ();\n echo \"\\n<!-- Final build finished...-->\\n\";\n }", "title": "" }, { "docid": "192dad50d0565e8782d38074284af3b1", "score": "0.6367292", "text": "function __construct() \n {\n parent::__construct();\n \n \n /**\n * Template \n **/\n $this->tmpl = config('app.be_template');\n \n /**\n * Current Path\n **/\n $this->currentPath = $this->_getCurrentPage();\n\n /**\n * Template Public URL \n **/\n $this->dataView = [\n 'title' => 'Dashboard',\n 'notif' => $this->_buildNotification(),\n 'path' => $this->currentPath,\n 'pub_url'=> url(str_replace('.', '/', config('app.be_template')))\n ];\n \n\n /**\n * Check Login \n **/\n $this->_checkLogin();\n\n /**\n * Box to build main Page \n **/\n if ( Session::has('ses_userid') )\n {\n $this->isLogin = true;\n $this->_setMenu(); \n /**\n * Access Menu ID\n **/\n $this->accessmenuID = json_decode(Session::get('ses_access_id'),true);\n\n $this->activeState = val(session::get('ses_switch_to'), session::get('ses_switch_active'));\n \n $this->dataView['header'] = $this->_buildHeader();\n $this->dataView['Lmenu'] = $this->_buildLMenu();\n $this->dataView['footer'] = $this->_buildFooter();\n $this->dataView['control'] = $this->_buildControl();\n $this->dataView['breadcrumb'] = $this->rowBreadcrumbs ? array_reverse($this->rowBreadcrumbs) : [];\n $this->dataView['active_state'] = val(session::get('ses_switch_to'), session::get('ses_switch_active'));\n }\n }", "title": "" }, { "docid": "d1e2e36189d48cb610cd3ba6ead6e4f0", "score": "0.635271", "text": "function __construct(){\t\n\t\t\t$this->render();\n\t\t}", "title": "" }, { "docid": "d1e2e36189d48cb610cd3ba6ead6e4f0", "score": "0.635271", "text": "function __construct(){\t\n\t\t\t$this->render();\n\t\t}", "title": "" }, { "docid": "15b07396e59d8992813ca41f51d16f83", "score": "0.63354105", "text": "public function init()\n {\n $this->view->activePage = 'index';\n }", "title": "" }, { "docid": "364ff26e89c5abc4ca09b896b22cfd42", "score": "0.63263625", "text": "public function __construct()\n {\n parent::__construct();\n parent::controller();\n }", "title": "" }, { "docid": "604611b99332c78fb5fc3ffc5693b8c9", "score": "0.63196707", "text": "public function __construct() {\n parent::__construct();\n \n // Verify user login\n if(!$this->session->gets('adminuser_id')) \n $this->redirect('index');\n $this->LoadHelper('Seo'); // Load email helper\n $this->LoadHelper('ImageUpload'); // Load thumbnail helper \n // Set meta data\n $metaData = array();\n $metaData['title'] = \"Manage Banners\"; \n $this->view->meta = $metaData;\n }", "title": "" }, { "docid": "e4314bb07198a243c9f6eafde5759627", "score": "0.6317642", "text": "function __construct() {\r\n \r\n //**********************************************************************\r\n // [ BUSINESS - LOGIC - LYER ]\r\n User_business::iniciarSession();\r\n //**********************************************************************\r\n $this->view = new View();\r\n }", "title": "" }, { "docid": "fee8e6c2cd564eb5012e666522db92a7", "score": "0.63007486", "text": "public function __construct($view = null)\n {\n $this->view = $view;\n }", "title": "" }, { "docid": "9b3993e5b33b7647a33c36f523009b55", "score": "0.62961906", "text": "protected function _construct()\n {\n $this->setTemplate('analytics/success_page_js.phtml');\n }", "title": "" }, { "docid": "236a1f9ab48221ed0ecdf5f644763f04", "score": "0.6294585", "text": "public function load($view) {\n\n\n\t}", "title": "" }, { "docid": "236a1f9ab48221ed0ecdf5f644763f04", "score": "0.6294585", "text": "public function load($view) {\n\n\n\t}", "title": "" }, { "docid": "bcfa1cb2107cfc0f1bc2c213da3e19c7", "score": "0.62922704", "text": "public function __construct()\n {\n view()->share('page_title', 'NOTICE MANAGEMENT');\n }", "title": "" }, { "docid": "54ae8eb0dbb44243f7217bb3112ff9d9", "score": "0.6291072", "text": "public function __construct()\r\n {\r\n parent::__construct();\r\n\r\n //preset the variables needed in the templates\r\n $this->data = base_vars();\r\n \r\n $this->config->load('app');\r\n }", "title": "" }, { "docid": "1b3dbb5ade1489825819ee509c98f98a", "score": "0.62905926", "text": "function __construct() {\n\t\t//echo \"Controlador Principal<br>\";\n\t\t$this->vista=new view();\n\t}", "title": "" }, { "docid": "c09ea7b13837399b73fa9ab5a546bc4f", "score": "0.62781054", "text": "public function __construct()\n\t{\n\t\t$this->viewBag = array(\n\t\t\t'title'\t\t => 'Hayden Lee - Blog and Developer Projects',\n\t\t\t'description' => 'Hayden Lee\\'s personal website, blog, and developer projects',\n\t \t'url'\t\t => Request::url(),\n\t \t'pageClass' => '',\n\t \t'created_at' => '',\n\t \t'updated_at' => ''\n\t );\n\t}", "title": "" }, { "docid": "341d33025c6251b8a52535b411e1f2c2", "score": "0.62688625", "text": "function __construct() {\n // $this->controller = new Controller();\n }", "title": "" }, { "docid": "e75b2297246bc50f4bc4495fff01353a", "score": "0.62683374", "text": "public function getView() {}", "title": "" }, { "docid": "12277e6063c5ea59a6786df52838de71", "score": "0.626493", "text": "public function __construct() {\r\n parent::__construct();\r\n $this->controller = $this->router->fetch_class();\r\n $this->method = $this->router->fetch_method();\r\n $this->cm = $this->controller . '/' . $this->method;\r\n $this->c_m = $this->controller . '_' . $this->method;\r\n\r\n $data = $this->config->item('data');\r\n $this->module = new Module;\r\n // add css & js\r\n $this->tplUrl = base_url() . $data['url_theme'];\r\n $this->_mainAssets();\r\n }", "title": "" }, { "docid": "14500018809bd613db1ddc76194bdfef", "score": "0.6259505", "text": "function __construct()\n {\n $this->setView(Utils::config('renderer.list_view'));\n }", "title": "" }, { "docid": "a4ed5a6e7e9adaf976cb5c27bd0359ab", "score": "0.62574226", "text": "function __construct()\n {\n $this->common = Common::get_instance();\n $this->section = get_class($this);\n }", "title": "" }, { "docid": "4b854eefc5f5bd7be05c6766c24b554a", "score": "0.62514496", "text": "public function __construct()\n {\n $this->middleware('auth');\n\n View::share('page',[\n 'title' => '系统面板',\n 'subTitle' => '',\n 'breadcrumb' => [\n ['url' => '#','label' => '系统面板' ]\n ]\n ]);\n }", "title": "" }, { "docid": "cf6c2f0d0e7e8d464aa76c2858a2c6fe", "score": "0.6249169", "text": "public function __construct($view = null)\n {\n $this->_view = $view;\n }", "title": "" }, { "docid": "4cdd2da37ed4dd39c8178b1afec89692", "score": "0.62432545", "text": "protected function initializeView(): void\n {\n $this->view = GeneralUtility::makeInstance(StandaloneView::class);\n $this->view->setTemplate($this->templateName);\n $this->view->setTemplateRootPaths(['EXT:tk_cache/Resources/Private/Templates/Widgets']);\n $this->view->setLayoutRootPaths(['EXT:dashboard/Resources/Private/Layouts/Widgets']);\n }", "title": "" }, { "docid": "53017ca9159d7a0ac5022174816c0c7f", "score": "0.62411773", "text": "public function __construct() {\n parent::__construct();\n // Verify user login\n if(!$this->session->gets('ameriaa_user_id')) \n $this->redirect('index');\n $this->LoadHelper('seo');\n $this->LoadHelper('ImageUpload');\n // Set meta data\n $metaData = array();\n $metaData['title'] = \"Members\";\n $metaData['description'] = \"Members\";\n $this->view->meta = $metaData; \n }", "title": "" }, { "docid": "93f2f1e5082ed2ddfc03cabba063429a", "score": "0.6233428", "text": "public function init()\n {\n \t$this->view->layout = array();\n }", "title": "" }, { "docid": "0f886372f40eb61c1cdf4071496ea4da", "score": "0.62253135", "text": "protected function loadController()\r {\r }", "title": "" }, { "docid": "edf711ba03ff8ea691921387211d5da1", "score": "0.6219578", "text": "protected function _init() {\n\t\t$this->_render['renderer'] = 'File';\n\t\t$this->_render['paths']['template'] = '{:library}/views/{:controller}/';\n\t\t$this->_render['paths']['template'] .= '{:template}.{:type}.php';\n\t\t$this->_render['paths']['layout'] = '{:library}/views/layouts/default.{:type}.php';\n\t\t$this->_render['paths']['element'] = '{:library}/views/elements/{:template}.html.php';\n\t\tparent::_init();\n\t}", "title": "" }, { "docid": "ab93df3cdb7d204c5b9d528963db571a", "score": "0.6217273", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t// this array inject in views manually \n\t\t$this->data['c_data'] = array() ; \n\t\t$this->data['site_url'] = site_url() ;\n\n\n\t}", "title": "" }, { "docid": "07076d6a5231158054875fe1f11d8bf2", "score": "0.62164795", "text": "public function init()\n\t{\n\t\t// instance of CI.\n\t\t$CI =& get_instance();\n\t\t\n\t\t// defining base url\n\t\t$this->base_url = $CI->config->slash_item('base_url');\n\t\t\n\t\t// geting the CI output\n\t\t$output = $CI->output->get_output();\n\t\t\n\t\t// getting the page title is set in the controller\n\t\t$title = (isset($CI->title)) ? $CI->title : '';\n\t\t\t\t\n\t\t// setting the default layout or a custom layout defined in controller\n\t\tif (isset($CI->layout) && !preg_match('/(.+).php$/', $CI->layout)) {\n\t\t\t$CI->layout .= '.php';\n\t\t} else {\n\t\t\t$CI->layout = 'default.php';\n\t\t}\n\t\t\n\t\t// defining the complete path of layout file\n\t\t$layout = LAYOUTPATH . $CI->layout;\n\t\t\n\t\t// layout does not exists\n\t\tif ($CI->layout !== 'default.php' && !file_exists($layout)) {\n\t\t\t// show the message\n\t\t\tif ($CI->layout != '.php')\n\t\t\t\tshow_error(\"You have specified a invalid layout: \" . $CI->layout);\n\t\t}\n\t\t\n\t\tif (file_exists($layout)) {\n\t\t\t$layout = $CI->load->file($layout, true);\n\t\t\t\n\t\t\t// replacing layout variables\n\t\t\t$view = str_replace('{content_for_layout}', $output, $layout);\n\t\t} else {\n\t\t\t$view = $output;\n\t\t}\n\t\t\n\t\techo $view;\n\t}", "title": "" }, { "docid": "9959d4846f6c09c0ce52eb406b2e36a4", "score": "0.62113816", "text": "protected function _initView()\r\n {\r\n \ttry {\r\n \t Zend_Registry::set('options', $this->getOptions());\r\n \t \r\n \t\t// Initialize View\r\n \t\t$view = new Zend_View();\r\n \t\t \r\n \t\t$rs = $this->getOption('resources');\r\n \t\t \r\n \t\t$view->doctype( $rs['layout']['doctype'] );\r\n \t\t$view->headTitle( $rs['layout']['web_site_title'] );\r\n \t\t#echo Zend_Version::VERSION;\r\n \t\t\r\n \t\t// Add it to the ViewRenderer\r\n \t\t$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');\r\n \t\t$viewRenderer->setView($view);\r\n \t\t\r\n \t\t$moduleDirectory = $rs['frontController']['moduleDirectory'];\r\n \t\t$view->addHelperPath( $moduleDirectory.'/default/views/helpers/', 'Zend_View_Helper_FlashMessages');\r\n \t\t$view->addHelperPath( $moduleDirectory.'/default/views/helpers/', 'Zend_View_Helper_Thumbnail');\r\n \t\t$view->addHelperPath( $moduleDirectory.'/default/views/helpers/', 'Zend_View_Helper_TemplateHelper');\r\n \t\t\r\n \t\t$view->addScriptPath( APPLICATION_PATH.\"/modules/default/views/scripts/partials/\");\r\n \t\t$view->addScriptPath( APPLICATION_PATH.\"/modules/default/views/scripts/\");\r\n \t\t\r\n \t\t// Return it, so that it can be stored by the boostrap\r\n \t\treturn $view;\r\n \t} catch (Exception $e) {\r\n \t}\r\n \r\n }", "title": "" }, { "docid": "a9a063ed6ca31405f266ac479986b431", "score": "0.6207998", "text": "public function __construct() {\n \n $this->request = new Request();\n \n Router::parse($this->request->url, $this->request);\n \n $controller = $this->loadController();\n \n if($this->request->isApiUrl){\n $controller->_activeAPI = true;\n }\n \n if(!in_array($this->request->action, get_class_methods($controller))){\n $this->error();\n }\n \n call_user_func_array( array($controller, $this->request->action), $this->request->params);\n \n //$controller->render($this->request->action);\n \n }", "title": "" }, { "docid": "c951e53c68e5b28e26fb41c6d08c565e", "score": "0.6165858", "text": "public function __construct() {\n\t\tparent::__construct();\n\t\t$this->model = new IndexModel();\n\t\t$this->view->setVar('title', 'HiG-eebs');\n\t\t$this->view->addViewFile('blogPosts');\n\t\t$this->view->renderSideBar = true;\n\t}", "title": "" }, { "docid": "519d14f016149c629d28a468a480ff86", "score": "0.61633325", "text": "private function _View() {\n\t \n // $this->_View;\n\t\t\t//$View = ClassRegistry::getObject('');\n\t\treturn $this->_View;\n\t}", "title": "" }, { "docid": "98724afcc8717e81a69016de0d5c9071", "score": "0.6157531", "text": "public function init()\n {\n $this->translate = Zend_Registry::get('translate');\n $this->view->pageID = 'setup';\n\n $this->_db = Zend_Db_Table::getDefaultAdapter();\n\n $this->view->mainRightRail .= \" \"; // to display main rail\n\n $this->view->moduleName = $this->getRequest()->getModuleName();\n $this->view->controllerName = $this->getRequest()->getControllerName();\n $this->view->actionName = $this->getRequest()->getActionName();\n\n }", "title": "" }, { "docid": "c7c66d529239f49d51078b071034c32c", "score": "0.6156734", "text": "public function __construct()\n {\n $this->args = $this->getTemplateArgs();\n $this->clientService = new MonitorApiClientService($this->args);\n $this->routerService = new RouterService();\n parent::controller($this->eg, $this->routerService, basename(__FILE__));\n }", "title": "" }, { "docid": "54a974e2119517a2d29fda38bae91c39", "score": "0.6153148", "text": "private function loadView(){\n extract($this->getAll(), EXTR_SKIP); //load all variables into local scope (dont overwrite variables in scope)\n\n if(Config::get('view')){\n $template_file = 'view/' . Config::get('view') . '/' . Config::get('method') . '.stp';\n if(is_file($template_file)){\n include $template_file;\n }\n else {\n include 'view/missingview.stp'; //no such view error\n }\n }\n else {\n Config::set('template', 'blank');\n include 'view/missingfunction.stp'; //no such function error\n }\n \n }", "title": "" }, { "docid": "f70357311a5632bd2e852884eceb4aca", "score": "0.61450523", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->view(\"header\");\n $this->load->helper(\"form\");\n }", "title": "" }, { "docid": "027d0df7052ca5d80b9023ead31cb167", "score": "0.6134607", "text": "public function __construct() {\n\n $this->component = Request::segment(1);\n }", "title": "" }, { "docid": "ec29273dc5fcbc69ec1a6bc5365fca9e", "score": "0.61338097", "text": "public function init() {\n parent::init();\n\n $this->document = $this->createDocument();\n $this->layout = $this->createLayout();\n $this->view = $this->createView();\n\n // register urlFor callback to view, layout and document\n $this->getDocument()->setCallback('urlFor', array($this, 'urlFor'));\n $this->getDocument()->setCallback('urlForDefault', array($this, 'urlForDefault'));\n $this->getLayout()->setCallback('urlFor', array($this, 'urlFor'));\n $this->getLayout()->setCallback('urlForDefault', array($this, 'urlForDefault'));\n $this->getView()->setCallback('urlFor', array($this, 'urlFor'));\n $this->getView()->setCallback('urlForDefault', array($this, 'urlForDefault'));\n }", "title": "" }, { "docid": "064f97c2a755cc276548ab7c6af86f93", "score": "0.6133233", "text": "protected function assembleView(){\n\t\t\n\t\t$r_head = $this->getRegionHead();\n\t\t$r_regions = $this->getRegions();\n\t\t\n\n\t\t$xmlf = dirname($_SERVER[\"SCRIPT_FILENAME\"]).\"/xml/core.xml\";\n\t\tif(file_exists($xmlf)){\n\t\t\t//echo 'XML FILE EXISTS: '.$xmlf;\n\t\t\t$xml = simplexml_load_file($xmlf);\n\t\t\t//echo $xml->location->body;\n\t\t\t$this->dcreg->corexml = $xml;\n\t\t}\n\t\t\n\t\t\n\t\t$xmlf = dirname($_SERVER[\"SCRIPT_FILENAME\"]).\"/xml/\".$this->controller.'.xml';\n\t\tif(file_exists($xmlf)){\n\t\t\t//echo 'XML FILE EXISTS: '.$xmlf;\n\t\t\t$xml = simplexml_load_file($xmlf);\n\t\t\t//echo $xml->location->body;\n\t\t\t$this->dcreg->xml = $xml;\n\t\t}\n\t\t\n\n\t\t\n\t\t\n\t\t/**\n\t\t * yep, pretty weird, but it's the only way to access the registry from within the view\n\t\t */\n\t\t$dcreg = $this->dcreg;\n\t\t\n\t\tif(file_exists('templates/page--'.$this->controller.'.php'))\n\t\t\tinclude 'templates/page--'.$this->controller.'.php';\n\t\telse\n\t\t\tinclude 'templates/page.php';\n\t\n\t}", "title": "" }, { "docid": "9a0030ac4cac59f029c4a64be489b12d", "score": "0.6129621", "text": "public function __construct()\n {\n $this->args = $this->getTemplateArgs();\n $this->clientService = new SignatureClientService($this->args);\n $this->routerService = new RouterService();\n parent::controller($this->eg, $this->routerService, basename(__FILE__));\n }", "title": "" }, { "docid": "b9ed23bd871ad5396c7301e043407b42", "score": "0.611676", "text": "public function __construct()\n {\n // Store module path\n $this->module_path = dirname(__FILE__);\n $this->view_path = dirname(__FILE__) . '/views/';\n }", "title": "" }, { "docid": "cb70ac378a51b445397b9ca52bcf1cf1", "score": "0.61167157", "text": "public function __construct($request){\n\t\t$this->view = new View();\n\t\t$this->request = $request;\n\t\t$this->template = !empty($request['view']) ? $request['view'] : 'default';\n\t}", "title": "" }, { "docid": "6456f44449b4d51dfcf17dc627faa876", "score": "0.6116264", "text": "public function __construct($_controller,$_args = array()){\n\t\t\n\t\t\n\t\t$this->dcreg = DynamicContentRegistry::instantiate();\n\t\t//$this->dcreg = new DynamicContentRegistry;\n\t\t\n\t\t$this->dcreg->args = $_args;\n\t\t\n\t\t\n\t\t\n\t\t$this->controller = $_controller;\n\t\t$this->regionHead = 'templates/head.php';\n\t\t\n\t\t$this->regions['header'] = 'templates/header.php';\t\n\t\t$this->regions['content'] = 'view/'.$_controller.'.php';\n\t\t$this->regions['footer'] = 'templates/footer.php';\n\t\t\n\t}", "title": "" }, { "docid": "ee677107e6c446e6a062ca81e1249dd8", "score": "0.61125344", "text": "public function __construct() {\n parent::__construct(self::TEMPLATE);\n }", "title": "" }, { "docid": "2362ef36bb4518937a919bf04afec9a1", "score": "0.6104653", "text": "protected function Chunk_Init()\n {\n $this->View = new Zero_View(__CLASS__);\n }", "title": "" }, { "docid": "8a11557a6f50e4d3de2ea19ec559a56f", "score": "0.61021394", "text": "public function index() {\n\t\t$this->view = new View();\n\t\t$this->view->renderHeaderOrFooter(dirname(__FILE__).'/../views/HTMLComponents/header.php');\n\t\t$this->view->renderView($this->viewFileName);\n\t\t$this->view->renderHeaderOrFooter(dirname(__FILE__).'/../views/HTMLComponents/footer.php');\n\t}", "title": "" }, { "docid": "7a1cdb0ac7a2cd2b51fe34a544bbb48a", "score": "0.61013925", "text": "protected function _initView()\n {\n \t// carregando a view \n $view = new Zend_View();\n\n // setando o caminho dos scripts\n $view->setScriptPath(BASICO_VIEW_SCRIPTS_PATH);\n\n // Localiza os helpers dos modulos e adiciona os paths caso eles existam\n if (file_exists(BASICO_VIEW_HELPERS_PATH))\n $view->addHelperPath(BASICO_VIEW_HELPERS_PATH, 'Basico_View_Helper');\n\n // setando helper path do ZendX\n $view->addHelperPath(\"ZendX/JQuery/View/Helper\", \"ZendX_Jquery_View_Helper\");\n\n // inicializando a view\n $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();\n Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);\n $viewRender = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');\n $viewRender->setView($view);\n\n // retornando a view\n return $view;\n }", "title": "" }, { "docid": "bdee03d4f26d3a3add27e44f0e5cdf04", "score": "0.60982215", "text": "public function View() {\n $this->Render();\n }", "title": "" }, { "docid": "31bb883c3fa0558ff256c1a1edb5d9f7", "score": "0.60937816", "text": "public function __construct(){\n parent::__construct();\n View::share('page_title', 'Manage Account');\n }", "title": "" }, { "docid": "a7bfbda3b31caa7fc6718bbce8753278", "score": "0.6093009", "text": "public function render(): void\n\t{\n\t\tif ($this->controllerView) {\n\t\t\textract($this->data);\n\t\t\trequire($this->controllerView);\n\t\t}\n\t}", "title": "" } ]
1d7f35e73a2abadad0d684defc1c5265
Finds the Clientes model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
[ { "docid": "e2c05bd45dfed31cfe81837e97df22f7", "score": "0.65759", "text": "protected function findModel($id)\n {\n if (($model = Clientes::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" } ]
[ { "docid": "bea7dd06933a1bdaaba8c8d95cb75e5d", "score": "0.6850645", "text": "protected function findModel($id)\n {\n if (($model = clients::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "8c3b4629163b5796be2f38d2f399a8c8", "score": "0.6421681", "text": "public function loadModel($id)\n\t{\n\t\t$model = Clientes::model()->findByAttributes(array(\n\t\t 'id'=>$id\n ), array());\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "bcdaeea7155e01908ca5753e589faeb4", "score": "0.64142704", "text": "protected function findModel($id)\n {\n if (($model = SysClient::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "7c84366dbda447003c47f2687db4f637", "score": "0.6379849", "text": "protected function findModel($id)\n {\n if (($model = ClientContact::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "a87e7588a7ed2e3fc8a7a93d95a41e53", "score": "0.62881756", "text": "protected function findModel($id)\n{\nif (($model = IcsrVersionResponse::findOne($id)) !== null) {\nreturn $model;\n} else {\nthrow new HttpException(404, 'The requested page does not exist.');\n}\n}", "title": "" }, { "docid": "fe5402a8a7df67f57ce1103ae825816f", "score": "0.6271767", "text": "public function testFind() {\n $id = 789;\n\n $this->mockModelClient([\n $response = new GuzzleHttp\\Psr7\\Response(200, [], json_encode(['id' => $id]))\n ]);\n\n $model = $this->modelStub->find($id);\n\n $this->assertInstanceOf(get_class($this->modelStub), $model);\n $this->assertEquals($id, $model->id);\n }", "title": "" }, { "docid": "916fc7fd6b26696b5ab1b88655a32e5c", "score": "0.62286127", "text": "public function loadModel() {\r\n if ($this->_model === null) {\r\n if (isset($_GET['id']))\r\n $this->_model = Servidor::model()->with('endereco.cidades')->findbyPk($_GET['id']);\r\n if ($this->_model === null)\r\n throw new CHttpException(404, 'The requested page does not exist.');\r\n }\r\n return $this->_model;\r\n }", "title": "" }, { "docid": "930dadb2a3592fa3c1453e6efd1f12e8", "score": "0.62083364", "text": "protected function findModel($id)\n {\n if (($model = Cluster::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "f89080a8b0c1db7722e374a4b00cc04f", "score": "0.6206212", "text": "public function findByKey(string $key): ?Model;", "title": "" }, { "docid": "f89080a8b0c1db7722e374a4b00cc04f", "score": "0.6206212", "text": "public function findByKey(string $key): ?Model;", "title": "" }, { "docid": "5db74a3e5e3a3d946dba09ee5731bcf6", "score": "0.6197466", "text": "protected function findModel($key)\n {\n if (null === $key) {\n throw new BadRequestHttpException('Key parameter is not defined in findModel method.');\n }\n\n $modelObject = $this->getNewModel();\n\n if (!method_exists($modelObject, 'findOne')) {\n $class = (new\\ReflectionClass($modelObject));\n throw new UnknownMethodException('Method findOne does not exists in ' . $class->getNamespaceName() . '\\\\' .\n $class->getShortName().' class.');\n }\n\n $result = call_user_func([\n $modelObject,\n 'findOne',\n ], $key);\n\n if ($result !== null) {\n return $result;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "ab57040a8116019485d65ca0e1b2b252", "score": "0.6127151", "text": "public function testStaticFind() {\n $id = 789;\n\n $this->mockModelClient([\n $response = new GuzzleHttp\\Psr7\\Response(200, [], json_encode(['id' => $id]))\n ]);\n\n $modelClass = get_class($this->modelStub);\n $model = $modelClass::find($id);\n\n $this->assertInstanceOf(get_class($this->modelStub), $model);\n }", "title": "" }, { "docid": "f3a4c7ebc9dbb89aeefbd744ccbaf9f7", "score": "0.6120974", "text": "public static function find($model, $key)\n\t{\n\t\tif ( ! $key)\n\t\t\tthrow new Jam_Exception_Invalidargument(':model - no id specified', $model);\n\n\t\t$collection = Jam::all($model);\n\t\t$collection->where_key($key);\n\t\treturn is_array($key) ? $collection : $collection->first();\n\t}", "title": "" }, { "docid": "902eaf145a061f24f3f5fdf04444ee36", "score": "0.6092646", "text": "public function get($primaryKey, $options = []) {\n\t\t$query = new MongoFinder($this->__getCollection(), $options);\n\t\t$mongoCursor = $query->get($primaryKey);\n\n\t\t//if find document, convert to cake entity\n\t\tif ($mongoCursor->count()) {\n\t\t\t$document = new Document(current(iterator_to_array($mongoCursor)), $this->alias()); // This obviously refers to Hayko's Document class in /src/ORM, because if not, I'm buying airfare to strangle someone.\n\t\t\treturn $document->cakefy();\n\t\t}\n\n\t\tthrow new InvalidPrimaryKeyException(sprintf(\n 'Record not found in table \"%s\" with primary key [%s]',\n $this->_table->table(),\n $primaryKey\n ));\n\t}", "title": "" }, { "docid": "cad1d6fd6b5b5729a2cf125f71d3b878", "score": "0.60812014", "text": "protected function findModel($id)\n {\n if (($model = ClientData::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "c7adbf8a80d7e2674a2af24c3dd62dee", "score": "0.60743785", "text": "public function loadModel($id)\n {\n $model=Documentos::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "118a478c0503ba5cee84f5e0b3525dad", "score": "0.60706055", "text": "public function loadModel($id) {\n\t\t$model = CActiveRecord::model('Contacts')->findByPk((int) $id);\n\t\tif ($model === null)\n\t\t\tthrow new CHttpException(404, Yii::t('app','The requested page does not exist.'));\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "60874956cd1d84b64725947c5903321e", "score": "0.606052", "text": "protected function findModel($id) {\n\t\tif (($model = Complaint::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t\t}\n\t}", "title": "" }, { "docid": "fcd21a90c4eab033ef655f94ca65fadc", "score": "0.6058604", "text": "public function loadModel($id) {\n $model = Wharehouses::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "4069d5f275c6a907902d35dd2487662e", "score": "0.6046042", "text": "public function loadModel($id) {\n $model = Documento::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "8c09ad2441c56502759eff2dd097a9b6", "score": "0.6042055", "text": "protected function findModel($id)\n {\n if (($model = Key::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "7dceaf08a74e31fce62f681495c0e2e8", "score": "0.5996003", "text": "protected function findModel($id)\n {\n if (($model = AdvertPosition::findOne($id)) !== null) {\n return $model;\n }\n\n throw new HttpException(200,Yii::t('base',40001));\n }", "title": "" }, { "docid": "a5169f156306fb23a21ce68ac86b99c9", "score": "0.5986462", "text": "protected function findModel($id)\n\t{\n\t\tif (($model = WiRequest::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}", "title": "" }, { "docid": "347e4a5d6825484b31267f85914d3e61", "score": "0.5973858", "text": "protected function findModel($id){\n\t\tif (($model = JobApplication::findOne($id)) !== NULL){\n\t\t\treturn $model;\n\t\t}\n\n\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t}", "title": "" }, { "docid": "b743c8cab107623c0a1e9510380680c8", "score": "0.5964796", "text": "public function loadModel($id) {\n $model = Supplier::model()->findByAttributes(array('supplier_id' => $id, 'company_id' => Yii::app()->user->company_id));\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n\n return $model;\n }", "title": "" }, { "docid": "d1ab9beb99eb8a5e97e103eaf8a95fe1", "score": "0.59571517", "text": "public function find(int $id){\n $model = $this->model->find($id);\n if ($model) return $model;\n else throw new ModelNotFoundException(class_basename($this->model).\" not found\");\n }", "title": "" }, { "docid": "63bb1b15458b6d460a17b0d8d8f6c085", "score": "0.5947551", "text": "public function loadModel($id)\n\t{\n\t\t$model=Callees::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "47696382e4266513e26fbb7a8f33d3b7", "score": "0.5937212", "text": "public function find($primaryKey);", "title": "" }, { "docid": "47696382e4266513e26fbb7a8f33d3b7", "score": "0.5937212", "text": "public function find($primaryKey);", "title": "" }, { "docid": "6771640a70b546d177b2c073bfb7e85a", "score": "0.59329724", "text": "public function loadModel($id)\n\t{\n\t\t$model=AdClient::model() // ->with('adClientStates','adClientCities','adClientCounties','adClientZipcodes')\n ->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "d1eff803fd7b45088f09d0f4d7c48ba8", "score": "0.5932822", "text": "protected function findModel($id) {\n if (($model = ClientCampaigns::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "7815139b8da524ae7c24a37726b63818", "score": "0.5915086", "text": "public function loadModel() {\n if ($this->_model === null) {\n if (isset($_GET['id']))\n $this->_model = Entry::model()->findbyPk($_GET['id']);\n if ($this->_model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n }\n return $this->_model;\n }", "title": "" }, { "docid": "a8f4ad3ad6892bdf1d3e8f95170e5859", "score": "0.59081376", "text": "public function loadModel($id) {\n $model = Offshelfsale::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "ac327980f1abd585cae96a2b03eecebf", "score": "0.5908062", "text": "protected function findModel($id)\n {\n\n if (($model = ContractMaster::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n\n }", "title": "" }, { "docid": "d4cefbf133b7b5b71f6178b478abf5e0", "score": "0.5905565", "text": "public function requireById($id)\n\t{\n\t\t$model = $this->getById($id);\n\t\tif ( ! $model )\n\t\t\tthrow new EntityNotFoundException($id, $this->model->getTable());\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "71c543b6c07dfd0d75ebee9b817e5688", "score": "0.5902309", "text": "protected function findModel($id)\n {\n $model = Compra::findOne($id);\n if ($model) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "ed007414e20daa540fd7c454d24464d6", "score": "0.59019405", "text": "public function loadModel($id)\n{\n$model=SoOffhiredOrder::model()->findByPk($id);\nif($model===null)\nthrow new CHttpException(404,'The requested page does not exist.');\nreturn $model;\n}", "title": "" }, { "docid": "0f5f246877313e2bd00e23371300d4f2", "score": "0.58870524", "text": "protected function findModel($id)\r\n {\r\n if (($model = PredefinedJiecaoCoin::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }", "title": "" }, { "docid": "45e45077c4dca49cb9685425d982ae44", "score": "0.5879909", "text": "public function loadModel($id)\n\t{\n\t\t$model=Customers::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "45e45077c4dca49cb9685425d982ae44", "score": "0.5879909", "text": "public function loadModel($id)\n\t{\n\t\t$model=Customers::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "a0bba8855c1ea788917655d2516b1116", "score": "0.58539814", "text": "public function loadModel($id)\n{\n$model=JugadorPosicionTorneo::model()->findByPk($id);\nif($model===null)\nthrow new CHttpException(404,'The requested page does not exist.');\nreturn $model;\n}", "title": "" }, { "docid": "c028c48f5852ce5f17750dcb21cf5480", "score": "0.5850774", "text": "protected function findModel($id)\n {\n if (($model = Counteragents::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('Запрошенная страница не может быть найдена.');\n }\n }", "title": "" }, { "docid": "9b8fa3b4b387d4c606c48f556a8abcec", "score": "0.5834877", "text": "public function loadModel($id)\n {\n $model = Companies::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "8e408bf2452e2f7eb5ea83599d6accdd", "score": "0.5830709", "text": "public function loadModel($id)\n\t{\n\t\t$model=CustomerInfo::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "4b80e27e1fa1c01689aeb541d70261fd", "score": "0.58273077", "text": "public abstract function findById();", "title": "" }, { "docid": "caf8e99bda24311c89e167ade53ecf75", "score": "0.5821571", "text": "public static function find($primary_key_value)\n {\n if (!static::$_booted) {\n static::_boot();\n }\n static::$_ci->db->where(static::PRIMARY_KEY_NAME, $primary_key_value);\n // we must add limit 1 to avoid ci to get more result\n static::$_ci->db->limit(1);\n $record = static::get()->row_array();\n if (empty($record)) {\n throw new NotFound($primary_key_value);\n }\n\n return new static($record);\n }", "title": "" }, { "docid": "1aaba1420779de518558a8aab49c5a66", "score": "0.5819123", "text": "public function loadModel($id)\n\t{\n\t\t$model=Cadre::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "d60d70a3ae934b73367758d22ccefdf0", "score": "0.5812944", "text": "protected function findModel($id)\r\n {\r\n if (($model = Project::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new HttpException(404, 'The requested page does not exist.');\r\n }\r\n }", "title": "" }, { "docid": "ee3d6c4d651aa61e6db5d009d7c0fcf7", "score": "0.5809612", "text": "public function loadModel($id)\n {\n $model=Services::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "9a2bdeb549d0681f452fac603245bbaa", "score": "0.58087385", "text": "protected function findModel( $id ) {\n\t\tif ( ( $model = Document::findOne( $id ) ) !== null ) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException( 'The requested page does not exist.' );\n\t\t}\n\t}", "title": "" }, { "docid": "4e339bc24049265356389dcab94a463c", "score": "0.580669", "text": "public function loadModel($id)\n\t{\n\t\t$model=KlinikCustom::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "73b5b7d7cbf45b44dcb5ee5257a95ef1", "score": "0.5805087", "text": "public function loadModel($id)\n\t{\n\t\t$model=Company::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "fe8c9ed06da78999f217854e62a30983", "score": "0.5804964", "text": "public function loadModel() {\n if ($this->_model === null) {\n if (isset($_GET['id']))\n $this->_model = Mensaje::model()->findbyPk($_GET['id']);\n if ($this->_model === null)\n throw new CHttpException(404, Yii::t('App', 'The requested page does not exist.'));\n }\n return $this->_model;\n }", "title": "" }, { "docid": "88629be9f91f91944002c427e1e8b178", "score": "0.58040464", "text": "public function loadModel($id) {\n $model = Clans::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "9d3507b3e0df5d9147230dc70c0ab897", "score": "0.58040166", "text": "public function loadModel($id) {\n $model = Authitem::model()->findByAttributes(array('name' => $id));\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n\n return $model;\n }", "title": "" }, { "docid": "4d99af6cff97ef6935d3520ec4c0bb35", "score": "0.5802185", "text": "public function findModel($id) {\n if (($model = Envelope::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "3ad3021ad8cec442e06541f72ed10aac", "score": "0.58000225", "text": "public function loadModel($id)\n {\n $model=Orders::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,Yii::t('admin', 'The requested page does not exist'));\n return $model;\n }", "title": "" }, { "docid": "425b34429be6a6aa26b9dfaed9355e1b", "score": "0.5796628", "text": "public function find(string|int $key): ?Resource\n {\n return $this->all()->filter(function ($resource) use ($key) {\n return $resource->{$resource->primaryKey} == $key;\n })\n ->first();\n }", "title": "" }, { "docid": "32db51d964ef04e8b92e357a959c19d6", "score": "0.5793861", "text": "public function loadModel($id) {\n $model = Solicitudeskit::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "fa4556a3c5d8168de4aeccbc16cf1acf", "score": "0.5792154", "text": "public function loadModel($id) {\n $model = EmailNotificacion::model()->findByPk(new MongoID($id));\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "ccac0709b9c720034497b81cdfd98e98", "score": "0.57887256", "text": "public function findByKey(string $key, string $value): ?Model;", "title": "" }, { "docid": "3537b8261698d79c9da3639c09955941", "score": "0.5786884", "text": "public function getOne($primaryKey)\n {\n return $this->findByPk($primaryKey);\n }", "title": "" }, { "docid": "673ecca2aa68bfc31fcc0e09bc5c5a18", "score": "0.5780971", "text": "public function loadModel($id)\n\t{\n\t\t$model=SBServer::model()->with('game')->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "1ed927b1a6c3b39044f0bf21ece351d6", "score": "0.57761395", "text": "public function loadModel($id)\n\t{\n\t\t$model=MsCompany::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "184fafa6c2f8aa3034ddd5e94d9b09a9", "score": "0.57742965", "text": "public function get()\n {\n $key = func_get_args();\n $records = $this->filterOrExclude($this->getKeyConditions($key))->all();\n if (count($records) == 0) {\n throw new RecordNotFound;\n }\n return $records[0];\n }", "title": "" }, { "docid": "038fe570696d92c3520c1b40988b7838", "score": "0.57708925", "text": "protected function findModel($id)\n {\n if ($id == 0) {\n return new Server();\n }\n if (($model = Server::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "12ecb34ecadf52e1be05e29bd4310a3a", "score": "0.57680196", "text": "protected function findModel($id)\n {\n if (($model = Compra::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "ee8b887c02354de140b5ba3990ab79a3", "score": "0.5760971", "text": "public function loadModel($id)\n {\n $model = Empresa::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "a43707695154e2f998a2264cf7eb49c4", "score": "0.57589275", "text": "public function loadModel($id)\n\t{\n\t\t$model=Carrier::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "65bb847fde979776157c479f317c05d2", "score": "0.5758888", "text": "public function getPk()\n {\n $id = \\DataHandle\\Get::get('e');\n\n if ($id)\n {\n $model = static::$modelClass::findOneByPK($id);\n\n if ($model)\n {\n return static::getBrigdeOut($model);\n }\n else\n {\n throw new \\UserException('Impossível encontrar registro ' . $this->getPageUrl() . ' id ' . $id);\n }\n }\n\n throw new \\UserException('Impossível encontrar registro ' . $this->getPageUrl() . ' id ' . $id);\n }", "title": "" }, { "docid": "6ef735c77f84e8869c3b1285f8282eac", "score": "0.57567406", "text": "public function loadModel()\n {\n if ( $this->_model === NULL )\n {\n if ( isset($_GET['id']) )\n $this->_model = User::model()->notsafe()->findByPk($_GET['id']);\n if ( $this->_model === NULL )\n throw CHttpException(404, KUserModule::t(\n 'The requested page does not exist.'));\n }\n return $this->_model;\n }", "title": "" }, { "docid": "c14ed14d1d77c683e48b07243a70d9b1", "score": "0.5756042", "text": "public function loadModel($id)\n {\n $model=ExternalSources::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "df6119b3fa55238b0caaf9810a7538e8", "score": "0.5748383", "text": "public function loadModel($id)\n\t\t{\n\t\t\t$model=ParaCobrar::model()->findByPk($id);\n\t\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t\treturn $model;\n\t\t}", "title": "" }, { "docid": "e1e38a1a34391a204174c376d3584bb5", "score": "0.57447493", "text": "public function loadModel($id)\n\t{\n\t\t$model=Coti::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "328d325e0885e0fb13bcb272a8d7c608", "score": "0.5743498", "text": "public function loadModel($id)\n\t{\n\t\t$model=Cloth::model()->findByPk($id);\n\t\tif ($model===null) {\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "175f2424d081c317c1a42f813e3458f0", "score": "0.573715", "text": "protected function findModel($id)\n {\n if (($model = Comentarios::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }", "title": "" }, { "docid": "31de83c8991a346ae53e4f964975c656", "score": "0.5736839", "text": "public function loadModel($id)\r\n\t{\r\n\t\t$model=Voucher::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}", "title": "" }, { "docid": "51d635066e733846e62450aa2146c4fb", "score": "0.57359374", "text": "public function loadModel($id) {\n $model = Articles::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "b1a283a482bb42e2627eee1f43bf2382", "score": "0.5733871", "text": "public function loadModel($id)\n {\n $model = Company::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "81eb2596e0a9c71cb0c0dd7fb5c0654f", "score": "0.57337177", "text": "public function findBy(string $key, $value)\n {\n return $this->model::where($key, $value)->firstOrFail();\n }", "title": "" }, { "docid": "1598f3c64eee151b909b8f963a4c8520", "score": "0.5733587", "text": "protected function findModel($id)\n {\n if (($model = Customers::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "1598f3c64eee151b909b8f963a4c8520", "score": "0.5733587", "text": "protected function findModel($id)\n {\n if (($model = Customers::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "37814a8e15a8fabb9d5203601753d113", "score": "0.5730247", "text": "protected function findModel($id)\n {\n if (($model = Cashier::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('app/menu', 'The requested page does not exist.'));\n }", "title": "" }, { "docid": "e34709144154834e3b6498b99c9d7d0f", "score": "0.57271403", "text": "public function loadModel($id)\n {\n $model = Equipe::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, Yii::t('smith', 'A página não existe.'));\n return $model;\n }", "title": "" }, { "docid": "d38e25ecf190ec0da261d435bda0ebdb", "score": "0.5724341", "text": "public function loadModel($id)\n\t{\n\t\t$model=Kepindahan::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "0feba88c3d261da8cc7bcecc30b6114c", "score": "0.5721315", "text": "protected function findModel($id)\n {\n if (($model = CsIndustries::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "f9c5139d66ba2b67044c50dc46873e24", "score": "0.57212985", "text": "public function loadModel($id)\n\t{\n\t\t$model=Templatecatalogue::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "2cc1d4061c719e32e138682595ab4486", "score": "0.5720819", "text": "protected function fetchClient() {\n return Client::first();\n }", "title": "" }, { "docid": "c833b0c091f8bf131920013173307220", "score": "0.572078", "text": "public function loadModel($id)\n\t{\n\t\t$model=Wholesale::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "149c70be1ddce999ce282b21ae40af90", "score": "0.5717135", "text": "protected function findModel($id)\n {\n if (($model = DocumentLine::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "74dfbf03b23af1573b6dde7890f9aa12", "score": "0.57171196", "text": "protected function findModel($id)\n {\n if (($model = Document::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }\n }", "title": "" }, { "docid": "08e2af8345005807136ca013e483e520", "score": "0.57161146", "text": "protected function findModel($id)\n {\n if (($model = Seccion::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "297a489df39937cec54ffb05c8e2ddd0", "score": "0.57135224", "text": "public function loadModel($id) {\n\t\t$model = ChildDocumentDetails::model()->findByPk($id);\n\t\tif ($model === null)\n\t\t\tthrow new CHttpException(404, 'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "d4027bba1e57e631c6d096fe0e4994e4", "score": "0.5710865", "text": "protected function findModel($id)\n\t{\n\t\tif (($model = Kus::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t\t}\n\t}", "title": "" }, { "docid": "1b380277a04641ae8a28acebdb9b5421", "score": "0.5709012", "text": "public function loadModel($id){\n\t\t$model = Quote::model()->findByPk($id);\n\t\tif($model === null) throw new CHttpException(404, 'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "bd4a0b9ec963348f16a8ed6e6d789a2a", "score": "0.5705601", "text": "public function loadModel($id)\n\t\t{\n\t\t\t$model=Gastos::model()->findByPk($id);\n\t\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t\treturn $model;\n\t\t}", "title": "" }, { "docid": "a27d6da515a8e93b5c75f75cfa8a80c7", "score": "0.57024246", "text": "protected function get_object() {\n\t\tstatic $object = null;\n\n\t\tif (!isset($_GET['id']))\n\t\t\tthrow new HttpException(400, 'Please provide an ID!');\n\n\t\tif ($object !== null)\n\t\t\treturn $object;\n\n\t\t$object = $this->get_model()->get_by_id($_GET['id']);\n\n\t\tif (empty($object))\n\t\t\tthrow new HttpException(404, 'No object found for id');\n\n\t\treturn $object;\n\t}", "title": "" }, { "docid": "3670a5c98f847e4d0cd513cd930ae800", "score": "0.56975836", "text": "protected function findModel($id)\r\n {\r\n if (($model = Company::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }", "title": "" }, { "docid": "aed0f1fb1948c393aed64c7423337595", "score": "0.5695914", "text": "public function loadModel($id)\n\t{\n\t\t$model=Reservation::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "88ab1cb73be99bd9c800c1092737f533", "score": "0.56939536", "text": "protected function findModel($id)\n {\n\t\tif (($model = AdminSheet::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t}\n\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" } ]
1cafac7939f6f582105de4a715501546
Store a local image copy to a destination path.
[ { "docid": "a0342d3e46a1cad5cd2474608d114d63", "score": "0.76849097", "text": "public function storeLocalSource($localCopy, $destination)\n\t{\n\t\t$maxCachedImageSize = $this->getCachedCloudImageSize();\n\n\t\t// Resize if constrained by maxCachedImageSizes setting\n\t\tif ($maxCachedImageSize > 0)\n\t\t{\n\t\t\tcraft()->images->loadImage($localCopy)->scaleToFit($maxCachedImageSize, $maxCachedImageSize)->setQuality(100)->saveAs($destination);\n\t\t\tIOHelper::deleteFile($localCopy);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tIOHelper::move($localCopy, $destination);\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "3f2ea45d51b6559050b0985d5dc4546c", "score": "0.64612854", "text": "private function _storeRemoteImage($remote_image, $local_image) {\n\t\treturn JFile::write($local_image, JFile::read($remote_image));\n\t}", "title": "" }, { "docid": "e0ed68c18d6c3bfc9d76eb2b75358c9a", "score": "0.6252579", "text": "public function copy(PathInterface $source, PathInterface $destination): void;", "title": "" }, { "docid": "3a1415471f21c4c616142fc6b9a4d63d", "score": "0.61546594", "text": "public function put($src, $dst);", "title": "" }, { "docid": "2d37145a7b0c41d0d48f128dd9fcce7b", "score": "0.61051226", "text": "public function copy($targetSource,$destinationPath);", "title": "" }, { "docid": "c0891eab1b300137ef057f5a79839435", "score": "0.60477495", "text": "public function copyFileToLocalFS ( $destPath, $toFilePath );", "title": "" }, { "docid": "6d6afe05ab44b7c5e8c47cc7f69df8f8", "score": "0.6021769", "text": "function saveImage($imageName, $destinationName){\n\treturn (new App\\ImageSaver($imageName, $destinationName))->save();\n}", "title": "" }, { "docid": "3c7501533050ea16b95305a40053095c", "score": "0.6001831", "text": "public function save($destination = null, $newName = null) {\n\t\t$fileName = (! isset ( $destination )) ? $this->_fileName : $destination;\n\t\t\n\t\tif (isset ( $destination ) && isset ( $newName )) {\n\t\t\t$fileName = $destination . \"/\" . $fileName;\n\t\t} elseif (isset ( $destination ) && ! isset ( $newName )) {\n\t\t\t$info = pathinfo ( $destination );\n\t\t\t$fileName = $destination;\n\t\t\t$destination = $info ['dirname'];\n\t\t} elseif (! isset ( $destination ) && isset ( $newName )) {\n\t\t\t$fileName = $this->_fileSrcPath . \"/\" . $newName;\n\t\t} else {\n\t\t\t$fileName = $this->_fileSrcPath . $this->_fileSrcName;\n\t\t}\n\t\t\n\t\t//$destinationDir = (isset ( $destination )) ? $destination : $this->_fileSrcPath;\n\t\t\n\t\tswitch ( $this->_fileType) {\n\t\t\tcase IMAGETYPE_GIF :\n\t\t\t\timagegif ( $this->_imageHandler, $fileName );\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase IMAGETYPE_JPEG :\n\t\t\t\timagejpeg ( $this->_imageHandler, $fileName);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase IMAGETYPE_PNG :\n\t\t\t\t$this->_saveAlpha ( $this->_imageHandler );\n\t\t\t\timagepng ( $this->_imageHandler, $fileName);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase IMAGETYPE_XBM :\n\t\t\t\timagexbm ( $this->_imageHandler, $fileName );\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase IMAGETYPE_WBMP :\n\t\t\t\timagewbmp ( $this->_imageHandler, $fileName );\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault :\n\t\t\t\tthrow new Exception ( \"Unsupported image format.\" );\n\t\t\tbreak;\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "4b88c866c57715b9dd9ac7ba39fe6311", "score": "0.59397954", "text": "public function storageImageByUploadFile($file, $destination_path = '', $srcFolder = '', $disk = 'local')\n {\n $destination_path = DESTINATION_FOLDER_UPLOAD_IMAGE . $destination_path;\n $srcFolder = SOURCE_FOLDER_UPLOAD_IMAGE . $srcFolder;\n\n $extension = $file->getClientOriginalExtension();\n $filename = date('mdYHis') . uniqid() . '.'. $extension;\n \\Storage::disk($disk)->put($destination_path .'/'. $filename, \\File::get($file));\n return $srcFolder . $filename;\n }", "title": "" }, { "docid": "0a2c4807d52bcf883f436dd9c28147c9", "score": "0.5939412", "text": "function setDestination(File $destination);", "title": "" }, { "docid": "7410cc591e00e84374ad34ed8b31578d", "score": "0.59241843", "text": "public function store(string $localPath, string $remotePath): void {\n $fh = fopen($localPath, 'rb');\n\n try {\n $success = $this->filesystem->writeStream($remotePath, $fh);\n\n if (!$success) {\n throw new \\RuntimeException(\"Couldn't store file\");\n }\n } catch (FileExistsException $e) {\n // do nothing\n } finally {\n \\is_resource($fh) and fclose($fh);\n }\n }", "title": "" }, { "docid": "67326d30fc5d1b151ac3eb7815e9cc26", "score": "0.58801603", "text": "function uploadImg(){\n // copy file to storer\n if($this->_is_uploaded('gtrwebsite_question_img')) {\n \n $this->_uploadImg($_FILES['gtrwebsite_question_img']['name']);\n }\n }", "title": "" }, { "docid": "6140b75bfa2e7254f9bb481ae102c42c", "score": "0.5877608", "text": "public function copyFile ( $sourcePath, $destPath );", "title": "" }, { "docid": "7dba8265313577617ce991014e27732d", "score": "0.58579004", "text": "public function remote_upload($link, $destination){\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $link);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t$data = curl_exec ($ch);\n\t\tcurl_close ($ch);\n\t\t$file = fopen($destination, \"w+\");\n\t\tfputs($file, $data);\n\t\tfclose($file);\n\t}", "title": "" }, { "docid": "9bc2363729ff14afae0d9b20df426eb4", "score": "0.5847687", "text": "public function copyTo($destination)\n {\n foreach ($this as $source_path => $asset_path) {\n if (!is_readable($source_path)) {\n if ($this->logger) {\n $this->logger->error('Asset \"' . $source_path . '\" could not be found or is not readable');\n }\n\n continue;\n }\n\n $destination_path = $destination.'/'.$asset_path;\n if (!file_exists(dirname($destination_path))) {\n mkdir(dirname($destination_path), 0777, true);\n }\n\n copy($source_path, $destination_path);\n }\n }", "title": "" }, { "docid": "c54f95afd8c370b30a2e6d46e066df4f", "score": "0.58307934", "text": "public function save_orig() {\n if (!(@move_uploaded_file($this->temp_name, $this->orig_dir . $this->new_name . '.' . $this->file_type))) {\n echo 'Problem moving photo';\n }\n }", "title": "" }, { "docid": "91d3ed9a1c534c597302b0f8bb5c4de9", "score": "0.5805084", "text": "public static function copy($src, $dest);", "title": "" }, { "docid": "aca6da7024951b0bc24c27bc9e4a3ece", "score": "0.57923424", "text": "public function save($imageResource, $destination) {\n\t\timagejpeg($imageResource, $destination, 88);\n\n\t\treturn $destination;\n\t}", "title": "" }, { "docid": "29f3a1b1f5016e2c02e3db5e7aea9ff6", "score": "0.5776529", "text": "public function put($dest_path, $filename = '') {\n\t\tif (is_dir($dest_path)) {\n\t\t\tif (!$filename) $filename = $this->name;\n\t\t\treturn move_uploaded_file($this->tmp_name, $dest_path.'/'.$filename);\n\t\t} return false;\n\t}", "title": "" }, { "docid": "ff52b8db62bb237ce2644f92158cfb3d", "score": "0.57679427", "text": "function imagetransfer($src_im, $dst_im) {\n if (is_resource($dst_im)) imagedestroy($dst_im);\n $dst_im = & $src_im;\n return $dst_im;\n }", "title": "" }, { "docid": "056f1cda658a98668e10feebe97a8829", "score": "0.57384485", "text": "protected function upload()\n\t{\n\t\t$file = Yii::app()->file->set(ucfirst($this->owner->tableName()).'['.$this->uploadColumn.']');\n\n\t\tif (!$file->isUploaded)\n\t\t\t$file = Yii::app()->file->set('images/'.$this->emptyImage);\n\n\t\t$this->owner->image = md5(uniqid(rand(), true)).'.'.$file->extension;\n\t\t$file->copy($this->_tmpDir.$this->owner->image);\n\t}", "title": "" }, { "docid": "2214e10d409c146eae33319e366f909d", "score": "0.57356656", "text": "public function copyToLocalTemporaryFile($path);", "title": "" }, { "docid": "7aab8bcb4743177e4dc1b96eec9bd5e4", "score": "0.5729357", "text": "private function _save()\n {\n $this->_image->save($this->_path);\n }", "title": "" }, { "docid": "a06cbef4e4256adece2fd2d372ab1eb2", "score": "0.5703736", "text": "public function copy(string $source, string $destination, Config $config): void\n {\n\n try {\n // $url = cloudinary_url_internal($source);\n $url = $this->getUrl($source);\n $this->uploadApi->upload($url, ['public_id' => $destination]);\n } catch (Throwable $exception) {\n throw UnableToCopyFile::fromLocationTo($source, $destination, $exception);\n }\n }", "title": "" }, { "docid": "9e5e918929b47a3d2cd3c2b340108f98", "score": "0.5677201", "text": "private function copyToTempIfNeeded()\n {\n if ( ! is_resource($this->tempImage)) {\n // create a temp based on new dimensions\n $this->tempImage = imagecreatetruecolor($this->width, $this->height);\n\n // check it\n if ( ! is_resource($this->tempImage)) {\n $this->setError('Unable to create temp image sized ' . $this->width . ' x ' . $this->height);\n\n return false;\n }\n\n // copy image to temp workspace\n imagecopy($this->tempImage, $this->mainImage, 0, 0, 0, 0, $this->width, $this->height);\n }\n }", "title": "" }, { "docid": "59f678bf82c5f3e63fc4423d1563b359", "score": "0.5668807", "text": "public function testPutResource_withImage() {\r\n\t\t$folder = JasperTestUtils::createFolder();\r\n\t\t$image = JasperTestUtils::createImage($folder);\r\n\t\t$this->jc->putResource('', $folder);\r\n\t\t$test = $this->jc->putResource('', $image, $this->image_location);\r\n\t\t$image_data = $this->jc->getResource($image->getUriString(), true);\r\n\t\t$this->jc->deleteResource($image->getUriString());\r\n\t\t$this->jc->deleteResource($folder->getUriString());\r\n\t\t$this->assertEquals(filesize($this->image_location), strlen($image_data));\r\n \t}", "title": "" }, { "docid": "46847b68fe3cc105dda5a40f3a6e7f9e", "score": "0.564867", "text": "function copy_file($file_source, $file_target) {\n global $chmod;\n // wait incase it is being re-uploaded\n if (!file_exists($Imagefilename) || !is_readable($Imagefilename)) sleep(3);\n copy($file_source, $file_target) or errorIMG('011');\n if ($chmod) chmod($file_target, 0644) or errorIMG('012');\n // No error\n return false;\n}", "title": "" }, { "docid": "9ff712305c044762f1b3cbca43d0ac25", "score": "0.5638664", "text": "function imagecopy($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h) {}", "title": "" }, { "docid": "6a9773680823e44b2909d785419e0edb", "score": "0.56140965", "text": "protected function storeImage($image,$filename){\n\n //path of file by user name. Because test so username = users.\n $origin_path = public_path('/uploads/users/origin/');\n $thumb_path = public_path(\"uploads/users/thumbs/$this->width_thumb/$this->height_thumb/\");\n\n if(!file_exists($origin_path)){\n File::makeDirectory($origin_path,0777,true,true); \n }\n\n $image->save($origin_path . $filename);\n\n if(!file_exists($thumb_path)){\n File::makeDirectory($thumb_path,0777,true,true);\n }\n\n $image->fit($this->width_thumb,$this->height_thumb)->save($thumb_path . $filename); \n\n }", "title": "" }, { "docid": "9ae3f605b3d70457a89ff2fcf8fa74a7", "score": "0.55985403", "text": "public function storeFile(string $localPath, string $storagePath, bool $move = true, bool $overwrite = false): void;", "title": "" }, { "docid": "1ff4c1316348154aeb7fde038c2ec71d", "score": "0.5552734", "text": "function placeGeneratedFile( $src, $dest, $copy )\n\t{\n\t\t$paths = dirname($dest);\n\t\tTYPO3\\CMS\\Core\\Utility\\GeneralUtility::mkdir_deep(self::pathSite(), $paths);\n\n\t\tif ($copy) {\n\t\t\t$ok = copy(self::pathSite() . $src, self::pathSite() . $dest);\n\t\t} else {\n\t\t\t$ok = rename(self::pathSite() . $src, self::pathSite() . $dest);\n\t\t}\n\t\t\n\t\treturn $ok;\n\t}", "title": "" }, { "docid": "0dc4652310498bb6237377f81a158dc6", "score": "0.55523807", "text": "function _saveImage($fileName, $the_file) {\n $picture_location = \"/uploads\".\"/\".$fileName;\n $picture_server_location = $_SERVER['DOCUMENT_ROOT'].$picture_location;\n move_uploaded_file($the_file, $picture_server_location);\n }", "title": "" }, { "docid": "9c4fa4c6240bded83caa71ba4fda2e65", "score": "0.55382633", "text": "public function testSaveToPath()\n {\n $originalImage = app('image.imagine')->open(public_path('image.jpg'));\n $this->source->saveToPath($originalImage, 'image-test.jpg');\n $image = app('image.imagine')->open(public_path('image-test.jpg'));\n $this->assertEquals($originalImage->getSize(), $image->getSize());\n }", "title": "" }, { "docid": "e94b2cda9dc87539b27b877949eac307", "score": "0.55249673", "text": "public static function paste($file,$destination){\r\n $check = getimagesize($file[\"tmp_name\"]);\r\n if($check !== false) {\r\n //echo \"File is an image - \" . $check[\"mime\"] . \".\";\r\n } else {\r\n echo toJson('false',E_FILE_NOT_IMAGE,\"File is not an image.\");\r\n return;\r\n }\r\n\r\n // Check file size\r\n if ($file[\"size\"] > 500000) {\r\n echo toJson('false',E_FILE_TOO_LARGE,\"Sorry, your file is too large.\");\r\n return;\r\n }\r\n //get destination image name\r\n /*\r\n print_r(pathinfo(\"/testweb/test.txt\"));\r\n ->Array(\r\n [dirname] => /testweb\r\n [basename] => test.txt\r\n [extension] => txt\r\n )*/\r\n //TODO can using get random name but not now\r\n $destination.=basename($file['name']);\r\n $desPathInfo=pathinfo($destination);\r\n // Allow certain file formats\r\n if(!in_array(strtolower($desPathInfo['extension']),self::$ALLOW_FILE)) {\r\n echo toJson('false',E_FILE_NOT_ALLOW,\"Sorry, only JPG, JPEG, PNG & GIF files are allowed.\");\r\n return;\r\n }\r\n // Check if file already exists\r\n if (file_exists($destination)) {\r\n if (!unlink($destination)){\r\n echo toJson('false',E_FILE_ALREADY_EXITS,\"Sorry, file already exists.\");\r\n return;\r\n }\r\n }else{\r\n //if not have folder then create\r\n if (!is_dir($desPathInfo['dirname'])) {\r\n mkdir($desPathInfo['dirname']);\r\n }\r\n }\r\n // begin to upload\r\n if (move_uploaded_file($file[\"tmp_name\"], $destination)) {\r\n echo json_encode(array(\r\n 'status' => true,\r\n 'file_path' => $destination,\r\n 'message' => 'The file '. $desPathInfo['basename'].' has been uploaded.'\r\n ));\r\n } else {\r\n echo toJson('false',E_NI,'Sorry, there was an error uploading your file.');\r\n }\r\n\r\n }", "title": "" }, { "docid": "f4d01299becaca2d9be12549e5525414", "score": "0.5516604", "text": "function upload($destino , $nome , $larguraimg , $pasta) {\r\n\t\t\t\t\r\n\t\t\t\t\t$img = imagecreatefromjpeg($destino); //cria uma imagem jpeg da variavel destino(onde esta armazenada a imagem)\r\n\t\t\t\t\t\r\n\t\t\t\t\t$x = imagesx($img);\r\n\t\t\t\t\t$y = imagesy($img);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//variaveis x e y são as coordenadas da imagem\r\n\t\t\t\t\t\r\n\t\t\t\t\t$alturaimg = ($larguraimg * $y) / $x; //calcular a altura da imagem de acordo com a largura (proporcional)\r\n\t\t\t\t\t\r\n\t\t\t\t\t$novaImagem = imagecreatetruecolor($larguraimg, $alturaimg); \r\n\t\t\t\t\timagecopyresampled($novaImagem,$img,0, 0, 0, 0,$larguraimg, $alturaimg,$x , $y);\r\n\t\t\t\t\t// criar e duplica uma nova imagem\r\n\t\t\t\t\t\r\n\t\t\t\t\t$novo_nome_img = \"$nome\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\timagejpeg($novaImagem,\"$pasta/$novo_nome_img\"); //salvar uma nova imagem no diretorio indicado na variavel\r\n\t\t\t\t\t\r\n\t\t\t\t\timagedestroy($img);\r\n\t\t\t\t\timagedestroy($novaImagem);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//destroi as variaveis utilizadas acima para upload de novas no diretorio\r\n\t\t\t\t\t\r\n// -------------------------------------------------------------------------------------------------------------------------------------\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t}", "title": "" }, { "docid": "a7381bfe79eb1bb3134c578d97e0c9ea", "score": "0.5500955", "text": "function saveToDir(){\n $target = '/home/ud8462avu8pk/public_html/app/uol-walking-tour/images/tour/'.$_FILES['photoFile']['name']; \n //Save image to directory (if it isn't there already)\n if(!file_exists($target)) move_uploaded_file( $_FILES['photoFile']['tmp_name'], $target);\n}", "title": "" }, { "docid": "ade690b13467113141a07865930f57c9", "score": "0.54887503", "text": "private function saveImage($image, $dir, $name, $copy = false)\n { \n if(!file_exists($dir))\n {\n // Create the directory.\n if (!mkdir($dir, 0755, true)) {\n $this->setError('error', 'Failed to create image directory.');\n return false;\n }\n chmod($dir, 0755);\n }\n if($copy) File::copy($image, $dir . '/' . $name);\n else File::move($image, $dir . '/' . $name);\n chmod($dir . '/' . $name, 0755);\n \n return true;\n }", "title": "" }, { "docid": "cbdf075e04ac5ae4361c0fb6448483d2", "score": "0.54744047", "text": "private function createImageFile() {\n $this->prepareSaveToPath($this->imageSaveToPath);\n $extension = pathinfo($this->imageUrl, PATHINFO_EXTENSION);\n $name = md5($this->imageUrl);\n $this->imageName = $name . '.' . $extension;\n $this->imageResource = fopen($this->imageSaveToPath . $this->imageName, 'w');\n }", "title": "" }, { "docid": "34eb5f5a568ff813a9638b951409a881", "score": "0.54670703", "text": "public function setDestinationPath(string $destinationPath);", "title": "" }, { "docid": "fec44ef294320b0974fd0c4b990177ed", "score": "0.54614145", "text": "public function storeImage(Image $image);", "title": "" }, { "docid": "9d3d304a33ef2ac86f80d62fbc9c17e3", "score": "0.54505575", "text": "public function upload()\n {\n if (null === $this->getImage()) {\n return;\n }\n\n $imageName = md5(uniqid(rand(), true)) . '.' . $this->getImage()->guessExtension();\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getImage()->move(\n $this->getUploadRootDir(),\n $imageName\n );\n\n // set the path property to the filename where you've saved the file\n //$this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n\n $this->image = $imageName;\n }", "title": "" }, { "docid": "66af19b40432fb6f8f4c428c4a9ecc97", "score": "0.54490006", "text": "public function put($local_filename, $remote_filename)\n {\n // convert to windows-style backslashes\n $remote_filename = str_replace(DIRECTORY_SEPARATOR, '\\\\', $remote_filename);\n\n $cmd = \"put \\\"$local_filename\\\" \\\"$remote_filename\\\"\";\n\n $retval = $this->execute($cmd);\n return $retval;\n }", "title": "" }, { "docid": "d3fb585b92850b932b2ace3f92a1857c", "score": "0.54411316", "text": "public function uploadPhoto(\\Entity\\Salle $salle){\r\n $dirPhoto = $this->racineServer.$salle->getPhoto();\r\n copy($this->files['photo']['tmp_name'], $dirPhoto);\r\n }", "title": "" }, { "docid": "52760a7344b69a39359d19e1f9e45f47", "score": "0.54264593", "text": "public function moveTo($destination){ }", "title": "" }, { "docid": "44d9be329963cf8968e187a7edd490e2", "score": "0.5424161", "text": "public function store() {\n\t\t// first remove old cache image\n\t\t$this->removeImage(); \n\t\t\n\t\t// replace blanks with %20\n\t\t$this->url = str_replace(' ', '%20', $this->url);\n\t\t\n\t\ttry {\n\t\t\t$proxy = new \\wcf\\util\\HTTPRequest($this->url);\n\t\t\t$proxy->execute(); \n\t\t\t$reply = $proxy->getReply(); \n\t\t\t$imagestring = $reply['body']; \n\t\t\t\n\t\t\t// $img = getimagesizefromstring($imagestring); <- only in 5.4 or higher\n\t\t\t// workaround: https://gist.github.com/t-cyrill/6109550#file-getimagesizefromstring-php\n\t\t\t$uri = 'data://application/octet-stream;base64,' . base64_encode($imagestring);\n\t\t\t$img = getimagesize($uri);\n\t\t\t\n\t\t\tif (!in_array($img[2], self::$validImageTypes)) {\n\t\t\t\tthrow new \\wcf\\system\\exception\\SystemException('not valid image-type');\n\t\t\t}\n\t\t} catch (\\Exception $e) {\n\t\t\t$imagestring = self::NOT_FOUND_TEXT; \n\t\t}\n\t\t\n\t\t\\wcf\\util\\FileUtil::makePath($this->getLocalPath());\n\t\t\n\t\tif (@file_put_contents($this->getLocalLink(), $imagestring) === false) {\n\t\t\tthrow new \\wcf\\system\\exception\\SystemException('cannot store proxyimage');\n\t\t}\n\t\tEventHandler::getInstance()->fireAction($this, 'imageStored');\n\t}", "title": "" }, { "docid": "32830f138ddc31beafe435fcf4738478", "score": "0.5417418", "text": "function uploadLocalToHost($source,$destPath,$destName,&$fileObj){\n\t\tglobal $vsStd;\n\t\t$uploadDirectory = ltrim (trim(date(\"Y/m/d\"),\"/\"),\"/\").\"/\";\n\t\t$destPath =rtrim($destPath,\"/\").\"/\". $uploadDirectory;\n\t\tif(!is_dir($destPath)){\n\t\t\t\t@mkdir ($this->rootPath.$destPath, 0777, true );\n\t\t\t\t$flist=explode(\"/\", $destPath);\n\t\t\t\t$f=ltrim($this->rootPath,\"/\");\n\t\t\t\tforeach ($flist as $index => $value) {\n\t\t\t\t\t$f.=\"/\".$value;\n\t\t\t\t\tchmod( $f,0777);\n\t\t\t\t}\n\t\t\t\tunset($f);\n\t\t\t\tunset($flist);\n\t\t\t\t\n\t\t}\n\t\t$fileinfo=pathinfo(strtolower( $destName) );\n\t\t\t/**\n\t\t\t *$fileinfo['dirname'] => .\n\t\t *$fileinfo['basename'] => Sunset.jpg\n\t\t *$fileinfo['extension'] => jpg\n\t\t *$fileinfo['filename'] => Sunset \n\t\t\t */\n\t\t\t if(!$fileinfo['filename']){\n\t\t\t\t $tmp=explode(\".\",$fileinfo['basename']);\n\t\t\t\t $fileinfo['filename']=$tmp[0];\n\t\t\t }\n\t\t\t\n\t\tif(!$this->filter_extension($fileinfo['extension'])){\n\t\t\t$this->message=\"Extension '{$fileinfo['extension']}' not allowed!\";\n\t\t\treturn false;\n\t\t}\n\t\t//$objName = str_replace ( substr ( $_FILES [$uploadName] ['name'], strrpos ( $_FILES [$uploadName] ['name'], '.' ) ), \"\", $_FILES [$uploadName] ['name'] );\n\t\t$vsStd->requireFile ( UTILS_PATH . \"TextCode.class.php\" );\n\t\t$fileName=$fileinfo['filename'] ;\n\t\t$fileinfo['filename'] = str_replace ( \"/\", \" \", $fileinfo['filename'] );\n\t\t$fileinfo['filename'] = VSFTextCode::removeAccent ( trim ( $fileinfo['filename'] ), \"_\" );\n\t\t$destFile=$destPath.$fileinfo['filename'];\n\t\t$upladedName=$fileinfo['filename'];\n\t\tif(file_exists( $this->rootPath.$destFile.\".\".$fileinfo['extension'])){\n\t\t\t$i=0;\n\t\t\twhile(file_exists( $this->rootPath.$destFile.\"_$i.\".$fileinfo['extension'])){\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$destFile=$destFile.\"_$i\";\n\t\t\t$upladedName=$fileinfo['filename'].\"_$i\";\n\t\t}\n\t\t$destFile.=\".\".$fileinfo['extension'];\n\t\t//$vsStd->requireFile ( UTILS_PATH . \"class_upload.php\" );\n\t\t$ok=true;\n\t\tif(!move_uploaded_file($source,$this->rootPath.$destFile)){\n\t\t\tif(file_exists($source)){\n\t\t\t\tif(!copy($source, $this->rootPath.$destFile)){\n\t\t\t\t\t$this->message=sprintf(VSFactory::getLangs()->getWords ( 'Can_not_copy', 'Can not copy file from %s to %s' ),\n\t\t\t\t\t\t$source,$this->rootPath.$destFile\n\t\t\t\t\t);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}elseif($source=='php://input'){\n\t\t\t\t$input = @fopen($source, \"r\");\n\t\t\t\tif(!$input) {\n\t\t\t\t\t$ok=false;\n\t\t\t\t}else{\n\t\t\t \t\t$target = fopen($this->rootPath.$destFile, \"w\");\n\t\t\t\t\t$fileSize = stream_copy_to_stream($input, $target);\n\t\t\t\t\tif(!$fileSize){\n\t\t\t\t\t\t$ok=false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t\t$ok=false;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif(!$ok){\n\t\t\t$this->message=sprintf(VSFactory::getLangs()->getWords ( 'Can_not_copy', 'Can not copy file from %s to %s' ),\n\t\t\t\t$source,$this->rootPath.$destFile\n\t\t\t);\n\t\t\treturn false;\n\t\t}\n\t\t//$fileObj->convertToObject ( $bw->input );\n\t\t\t$fileObj->setPath ( rtrim ( $destPath, '/' ) . \"/\" );\n\t\t\t//$fileObj->setModule ( $bw->input ['table'] );\n\t\t\t$fileObj->setSize ( filesize($this->rootPath.$destFile) );\n\t\t\t\t\n\t\t\tif ($fileObj->getTitle () == \"\" or $fileObj->getTitle () == \"undefined\")\n\t\t\t\t\t$fileObj->setTitle ( str_replace(array('_','-'), \" \", $fileName) );\n\t\t\tif ($fileObj->getIntro () == \"\" || $fileObj->getIntro () == \"undefined\"){\n\t\t\t\t\t$fileObj->setIntro ( str_replace(array('_','-'), \" \", $fileName) );\n\t\t\t}\n\t\t\t$fileObj->setName ($upladedName);\n\t\t\t$fileObj->setType ( $this->getFileExtension ( $fileinfo['extension'] ) );\n\t\t\t$fileObj->setUploadTime ( time() );\n\t\t\t@chmod ( $fileObj->getPathView ( 0 ), 0775 );\n\t\t\tif (stristr ( \"wmv mpg mpeg avi mp4 flv\", $fileObj->getType () )) {\n\t\t\t\t$desFile = UPLOAD_PATH . \"{$fileObj->getPath()}{$fileinfo['filename']}.flv\";\n\t\t\t\t\t\n\t\t\t\tif ($this->convertVideoToFlv ( $fileObj->getPathView ( 0 ), $desFile, $fileObj->getType () )) {\n\t\t\t\t\t\t@unlink ( $fileObj->getPathView ( 0 ) );\n\t\t\t\t\t\t$fileObj->setType ( \"flv\" );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->insertObject ($fileObj);\n\t\treturn $destFile;\n\t\t\t\n\t}", "title": "" }, { "docid": "4129a40fe50a73117db9d5394fd30064", "score": "0.5385845", "text": "function storeImage($name, $path, $req){\n $f = pathinfo($req->file($name)->store($path, 'public'));\n $file = $req->file($name)->move(appStoragePath($path), $f['basename']);\n\n if($f['extension'] !== 'webp')\n imgCompress($file);\n\n return $path.'/'.$f['filename'].'.webp';\n}", "title": "" }, { "docid": "99c06c3039578e02941839eab833e72f", "score": "0.5383243", "text": "function publish()\r\n {\r\n file_put_contents($this->image_path(), $this->image);\r\n }", "title": "" }, { "docid": "0cb9aebcd9462c1975c8c5fcb62b131f", "score": "0.5376819", "text": "public function saveImage($file,$destination)\n\t{\n \t\t$newfile = Image::make($file)->resize(300,null, function ($constraint) {\n \t\t\t $constraint->aspectRatio();\n \t\t\t $constraint->upsize();\n\t\t\t})->save($destination);\n\n\t\t\treturn;\n\n\t}", "title": "" }, { "docid": "ac622dea49d68318224b1bfb822e57bc", "score": "0.53762645", "text": "public function saveProtectedImgToTemp($imgUrl, $sender_id)\n { \n if (!is_dir($this->temp_location)) {\n mkdir($this->temp_location);\n }\n\n $filename = \"$this->temp_location$sender_id.png\";\n $oauth = new OAuth($this->consumer_key, $this->api_secret, OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_AUTHORIZATION);\n $oauth->setToken($this->token, $this->token_secret);\n\n $oauth->disableSSLChecks();\n $oauth->enableDebug();\n $oauth->fetch($imgUrl);\n\n file_put_contents($filename, $oauth->getLastResponse());\n }", "title": "" }, { "docid": "13b5d4f16203e16e095b0c3cdd8c6106", "score": "0.5357822", "text": "public function copyImages() {\n try {\n $this->workingDirectory->copyImages();\n \\Event::fire('video.copy-images.success');\n } catch (WorkingDirectoryException $e) {\n \\Event::fire('video.copy-images.fail');\n }\n }", "title": "" }, { "docid": "7917a540d7bbd1fc9032f9da7955670c", "score": "0.5348759", "text": "function uploadImages($folder,$image){\n// $image -> store('/',$folder) ;\n $newName = $image -> hashName();\n $path = 'assets/images/'.$folder;\n $image -> move($path,$newName);\n return $path .'/'.$newName ;\n}", "title": "" }, { "docid": "c7c79c0dacb1a7c36ef273a684b43b1a", "score": "0.5342999", "text": "public function lien_public_image(){\n \n if(file_exists($this->url) && copy($this->url, \"tmp/{$this->document->reference}_{$this->user_id}\")){\n return \"/tmp/{$this->document->reference}_{$this->user_id}\";\n \n }\n }", "title": "" }, { "docid": "5d5eabcb7810ac0276e03c1320e9fbcf", "score": "0.5340735", "text": "public function storeImage()\n {\n $t = explode(\"x\" , $this->resolution);\n $newImageWidth = $t[0];\n $newImageHeight = $t[1];\n\n try {\n\n if ($newImageHeight > self::MAX_HEIGHT or $newImageWidth > self::MAX_WIDTH) {\n throw new Exception(\"The requested image could not be bigger than \" . self::MAX_WIDTH . \"x\" . self::MAX_HEIGHT);\n }\n\n $originalImage = new LocalOriginalImage($this->originalFileName);\n $imagickOriginalImage = new Imagick();\n\n $getLocalImage = fopen($originalImage->getImageFullPath(), 'a+');\n $imagickOriginalImage->readImageFile($getLocalImage);\n fclose($getLocalImage);\n\n\n $fileHandleConvertedImage = fopen($this->getImageFullPath(), 'a+');\n\n $imagick_converted = clone $imagickOriginalImage;\n $imagick_converted->setFormat($this->format);\n $imagick_converted->setImageFormat($this->format);\n\n $imagick_converted->resizeImage($newImageWidth, $newImageHeight, Imagick::FILTER_CATROM, 1, true);\n $imagick_converted->setCompressionQuality(SELF::COMPRESSION_RATE);\n\n $imagick_converted->writeImageFile($fileHandleConvertedImage);\n\n fclose($fileHandleConvertedImage);\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }", "title": "" }, { "docid": "50240662d5c2c96c2e869cf720c8287f", "score": "0.531984", "text": "public function save($branchPath) {\n if ($this->imageName AND $branchPath AND File::exists($this->imageSaveToPath . $this->imageName)) {\n $branchPath = $this->imageSaveToPath . '../' . trim($branchPath, '\\/') . '/';\n $this->prepareSaveToPath($branchPath);\n File::move($this->imageSaveToPath . $this->imageName, $branchPath . $this->imageName);\n }\n }", "title": "" }, { "docid": "9b2f006ba5fbdf0e2f507459d383d831", "score": "0.53135246", "text": "public function upload() {\n if (null === $this->image) {\n return;\n }\n// On garde le nom original du fichier de l'internaute\n $name = $this->getImage()->getClientOriginalName();\n// On déplace le fichier envoyé dans le répertoire de notre choix\n $this->image->move($this->getUploadRootDir(), $name);\n// On sauvegarde le nom de fichier dans notre attribut $url\n $this->setImage($name);\n }", "title": "" }, { "docid": "93f1b95ac2f454bac08eaa215d529868", "score": "0.5313379", "text": "public function store(string $destination, $origin, $options = []): string\n {\n $destination = $this->path($destination);\n\n if ($this->filesystem()->disk($this->disk)->writeStream($destination, $origin, $options)) {\n event(new MergeAdded($destination));\n\n return $destination;\n }\n\n return false;\n }", "title": "" }, { "docid": "c12eb9c0a5ba40bc6b02eb5db2b436cf", "score": "0.5303841", "text": "public function upsertResource($targetName, $imgRsrc)\n {\n $path = $this->getStoragePath($targetName);\n\n Image::fromResource($imgRsrc)\n ->setCacheDir($this->cacheDir)\n ->cropResize($this->sizeConfig[self::MAX_RES], $this->sizeConfig[self::MAX_RES])\n ->save($path);\n }", "title": "" }, { "docid": "85630162936c36b803e2726f360c5ff7", "score": "0.5285726", "text": "function clone_image ($dst_filename, $width, $height)\r\n\t{\r\n\t\t$this->size_width_height($width,$height);\r\n\t\t$this->save($this->dst_dir.'/'.$dst_filename);\r\n\t\treturn (str_replace(DIR_APLI.'/', '', $this->dst_dir).'/'.$dst_filename);\r\n\t}", "title": "" }, { "docid": "ae350937351d2b2871985a63d92646fb", "score": "0.5284124", "text": "private function copyFile($destinationFilePath): void\n {\n $driver = $this->varDirectory->getDriver();\n $absolutePath = $this->varDirectory->getAbsolutePath($destinationFilePath);\n\n $driver->createDirectory(dirname($absolutePath));\n $driver->filePutContents($absolutePath, file_get_contents($this->sourceFilePath));\n }", "title": "" }, { "docid": "da4c2612bfec33b7f901bc5017d1fe13", "score": "0.5283913", "text": "public function store(\\App\\Http\\Requests\\DestinationStore $request)\n {\n \n //insert url image in DB\n \n $image = $request->file('image');\n $extension = $image->getClientOriginalExtension();\n Storage::disk('public')->put($image->getFilename().'.'.$extension, File::get($image));\n \n $image1 = $request->file('image1');\n $extension1 = $image1->getClientOriginalExtension();\n Storage::disk('public')->put($image1->getFilename().'.'.$extension1, File::get($image1));\n \n $image2 = $request->file('image2');\n $extension2 = $image2->getClientOriginalExtension();\n Storage::disk('public')->put($image2->getFilename().'.'.$extension2, File::get($image2));\n \n $destination = new Destination($request->all()); //optimiser pour recuperer ts les input ds formulaire\n $destination->mime = $image->getClientMimeType();\n $destination->original_filename = $image->getClientOriginalName();\n $destination->filename = $image->getFilename().'.'.$extension;\n \n $destination->mime_un = $image1->getClientMimeType();\n $destination->original_filename_un = $image1->getClientOriginalName();\n $destination->filename_un = $image1->getFilename().'.'.$extension1;\n \n $destination->mime_deux = $image2->getClientMimeType();\n $destination->original_filename_deux = $image2->getClientOriginalName();\n $destination->filename_deux = $image2->getFilename().'.'.$extension2;\n \n $destination->user_id = $request->user()->id;//associer 1 article a 1 auteur\n //dd($destination);\n $destination->save();//je dis a laravel de sauvegarder \n //$destination = $request->destinations()->create($request->all());\n return redirect('/destinations');\n }", "title": "" }, { "docid": "99009c81acc68b892c9b4e716c8f1926", "score": "0.5281658", "text": "public function __setLocalData( $options )\n {\n\t $error = 0;\n\n\t /* определяем папку для заливки */\t \n\t $dst_path = pathinfo($this->targetPath, PATHINFO_DIRNAME);\n $this->__checkDirectory($dst_path);\n \n\t /* создаем временный файл */\n $tmpFile = tempnam($dst_path, 'file_'); \n \n $handle = fopen($tmpFile, \"w\");\n $src_img = @file_get_contents($options['srcPath']);\n if(empty($src_img)) $error = 4;\n \n fwrite($handle, $src_img);\n fclose($handle);\n\t\t\n\t\t$this->clientFilename = $this->__translit(pathinfo($this->targetPath, PATHINFO_BASENAME), $tmpFile);\n\t\tif(!$this->clientUploadOptions['overwrite']) $this->clientFilename = $this->__renameFile($this->clientFilename);\n\t\t$this->targetPath = str_replace(pathinfo($this->targetPath, PATHINFO_BASENAME), $this->clientFilename, $this->targetPath);\t\t\n \n unlink($tmpFile);\n\t\t\n $new_file = fopen( $this->targetPath, \"w\" );\n fwrite( $new_file, $src_img );\n fclose($new_file); \n \n $file = new UploadedFile($this->targetPath, filesize($this->targetPath), $error, $this->clientFilename, mime_content_type($this->targetPath));\n\t\t\n return $file;\n\n }", "title": "" }, { "docid": "d1fa8a0e4ba6d18f06b7700b1b52fc81", "score": "0.52751315", "text": "private static function wp_copy_file($source_filename, $destination_filename) {\n $contents = @file_get_contents( $source_filename );\n\n if ( $contents )\n @file_put_contents( $destination_filename, $contents );\n\n if (\n @file_exists( $destination_filename )\n && @file_get_contents( $destination_filename ) === $contents\n )\n return;\n\n global $wp_filesystem;\n if ( isset( $wp_filesystem ) )\n $wp_filesystem->put_contents( $destination_filename, $contents, FS_CHMOD_FILE );\n }", "title": "" }, { "docid": "703682b51b050e341400fcbe75f3f6b8", "score": "0.52689976", "text": "function uploadImage($local = null, $name = null, $dir = \".\")\r\n {\r\n if ($local == null)\r\n {\r\n $this->_error(\"No local file passed.\");\r\n }\r\n \r\n // If no name is passed, get it from the local file\r\n if ($name == null)\r\n {\r\n $temp = $local;\r\n \r\n // In case there are double-backshlases\r\n while (preg_match('/\\\\\\\\/', $temp))\r\n {\r\n $temp = preg_replace('/\\\\\\\\/', \"\\\\\", $temp);\r\n }\r\n \r\n // In case there are any backslashes\r\n while (preg_match(\"/\\\\\\/\", $temp))\r\n {\r\n $temp = preg_replace('/\\\\\\/', \"/\", $temp);\r\n }\r\n \r\n $temp_array = preg_split(\"/\\//\", $temp);\r\n \r\n $name = $temp_array[count($temp_array) - 1];\r\n }\r\n \r\n if ($dir != \".\")\r\n {\r\n $this->chdir($dir);\r\n }\r\n \r\n $res = @ftp_put($this->conn_id, $name, $local, FTP_BINARY);\r\n \r\n if ($res == false)\r\n {\r\n $this->_error($name . \" was not uploaded.\");\r\n }\r\n \r\n return true;\r\n }", "title": "" }, { "docid": "c3997e612ae60819731d98f47c6898ca", "score": "0.5263972", "text": "function _putFile($aSrc, $aDest)\r\n\t{\n\t\t// Transfert du fichier\n\t\tforeach($this->_ftp as $ftp)\n\t\t\t$ftp->put($aSrc, $aDest);\n\t}", "title": "" }, { "docid": "3c9b27b64b96b48e507cf0e7f6bfb792", "score": "0.5262861", "text": "public function addImage($source_path, $destination_path, $file_name){\r\n\r\n\t\t$this->_client->setUri(Zend_Registry::get(\"configuration\")->images->url . \"/image_upload_handler.php\");\r\n\t\t$this->_client->setParameterPost('handler', \"add\");\r\n\t\t$this->_client->setParameterPost('destination_path', $destination_path);\r\n\t\t$this->_client->setParameterPost('file_name', $file_name);\r\n\r\n\t\t$this->_client->setFileUpload($source_path, 'UploadedImage');\r\n\t\t$response = $this->_client->request('POST');\r\n\t\tif($response->getStatus() == 200){\r\n\t\t\treturn $response->getBody();\r\n\t\t}else{\r\n\t\t\treturn json_encode(array(\"code\" => 0, \"msg\" => $response->getStatus() . \" : \" . $response->getMessage()));\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6e1b53f4ac6d7591fa08f4845e284531", "score": "0.5256251", "text": "public function set($source_path, $destination_path)\n {\n $this[$source_path] = $destination_path;\n }", "title": "" }, { "docid": "813f8c22655f9bfb74047b6663c88d7a", "score": "0.52527654", "text": "function SaveImageToDrive(){\n global $Directory;\n\n $target_Path = $Directory;\n $temp_nam = tempnam($target_Path,'');\n unlink($temp_nam);\n $target_Path = $temp_nam.\".jpg\";\n move_uploaded_file($_FILES['mainImageUpload']['tmp_name'], $target_Path );\n\n $src_img = imagecreatefromjpeg($target_Path);\n image_fix_orientation($src_img, $target_Path);\n imagejpeg($src_img, $target_Path, 100);\n\n return $target_Path;\n}", "title": "" }, { "docid": "0d2b3e74546204d1de26b0ab5442f4eb", "score": "0.52449495", "text": "public static function upload_copy_move($source, $destination)\n {\n\n $result = false;\n if (is_uploaded_file($source)) {\n // Return the value of move_uploaded_file, and if FALSE the temporary $source is still\n // around so the user can use unlink to delete it:\n $result = move_uploaded_file($source, $destination);\n } else {\n @copy($source, $destination);\n }\n // Change the permissions of the file\n self::fixPermissions($destination);\n // If here the file is copied and the temporary $source is still around,\n // so when returning FALSE the user can try unlink to delete the $source\n return $result;\n }", "title": "" }, { "docid": "87fb0ec2cf489bffd0d4fc25e632efb5", "score": "0.52389354", "text": "public function upload()\n {\n if (null === $this->imgFile) {\n return;\n }\n\n $name = $this->imgFile->getClientOriginalName();;\n $this->imgFile->move($this->getUploadRootDir(), $name);\n $this->imageUrl = $name;\n }", "title": "" }, { "docid": "aa7ab350e57e8f0b413c13ae949ac22a", "score": "0.5234738", "text": "function copyPicture($path)\r\n\t\t/* Photo Import */\r\n\t\t{\t\t\tif(is_file($path))\r\n\t\t\t{\r\n\t\t\t\t// Yes, get the image size\r\n\t\t\t\t$imgsize = getimagesize($path);\r\n\t\t\t\t\r\n\t\t\t\t// If the image is not larger than 185x185?\r\n\t\t\t\tif($imgsize[0] <= 185 && $imgsize[1] <= 185)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Yes, calculate base64 code and set\r\n\t\t\t\t\t$this->fields[\"picture\"] = base64_encode(file_get_contents ($path));\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// No, it's too big\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// No, file does not exist\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "4ed198203ae277b32a7abd5962dbf466", "score": "0.52337587", "text": "public static function put($local_full_path, $server_full_path){\n $dirname = dirname($server_full_path);\n\n \\Illuminate\\Support\\Facades\\SSH::into('production')->run(array(\n 'mkdir -p 777 ' . $dirname,\n ));\n\n $status = \\Illuminate\\Support\\Facades\\SSH::into('production')->put($local_full_path, $server_full_path);\n\n return $status;\n }", "title": "" }, { "docid": "39b4cabddccd1548830989accfbf7c4e", "score": "0.52236444", "text": "function yz_copy_image_to_youzer_directory( $bp_path ) {\n\n\tglobal $YZ_upload_url, $YZ_upload_dir;\n\n\t// Get File Name\n\t$filename = basename( $bp_path );\n\n // Get File New Name.\n $new_name = $filename;\n\n\t// Get Unique File Name for the file.\n while ( file_exists( $YZ_upload_dir . $new_name ) ) {\n\t\t$new_name = uniqid( 'file_' ) . '.' . $ext;\n\t}\n\n\t// Get Files Path.\n\t$old_file = $bp_path;\n\t$new_file = $YZ_upload_dir . $new_name;\n\n\t// Move File From Buddypress Directory to the Youzer Directory.\n if ( copy( $old_file, $new_file ) ) {\n \treturn $YZ_upload_url . $filename;\n }\n\n return false;\n\n}", "title": "" }, { "docid": "335f07d2febe4da4f4bda45d832e2173", "score": "0.5210331", "text": "public function sendFile($local, $remote)\n\t{\n\t\tif (!isset($this->connection)) $this->makeConnection(); # Auto reconnect\n\t\t\n\t\t$sftp = ssh2_sftp($this->connection);\n\t\tif (!copy($local, \"ssh2.sftp://{$sftp}{$remote}\")) trigger_error(\"Copying file '$local' to '\" . $this->about() . \"' as '$remote' failed.\", E_WARNING);\n\t}", "title": "" }, { "docid": "bf61adbdeb3a33e42fede118b5a61302", "score": "0.5202433", "text": "private function upload()\n {\n $this->img_name = Tools::slugFile($this->img_name);\n $this->move = new \\Lib\\MoveUploadedFile($this->img_temp, $this->img_name);\n $this->move->folder($this->diretorio);\n }", "title": "" }, { "docid": "ba5eb07ccba9abf060d350f10c483058", "score": "0.5201094", "text": "public function storeFiles()\n {\n $storage = $this->getStorage();\n $filename = $this->filename;\n $derivativeFilename = $this->getDerivativeFilename();\n $storage->store($this->getPath('original'), $this->getStoragePath('original'));\n if ($this->has_derivative_image) {\n $types = array_keys(self::$_pathsByType);\n foreach ($types as $type) {\n if ($type != 'original') {\n $storage->store($this->getPath($type), $this->getStoragePath($type));\n }\n }\n }\n $this->stored = '1';\n $this->save();\n }", "title": "" }, { "docid": "50910e8c4b6f53a660d7bac1ee104332", "score": "0.51911366", "text": "public function copyUploadedFile($source, $destination=\"\")\n\n {\n\n //Destino completo\n\n $this->path = $this->path . $destination . DS;\n\n //Cabeçalho de log de erro\n\n $logMsg = '=============== UPLOAD LOG ===============<br />';\n\n $logMsg .= 'Pasta destino: ' . $this->path . '<br />';\n\n $logMsg .= 'Nome do arquivo: ' . $source[\"name\"] . '<br />';\n\n $logMsg .= 'Tamanho do arquivo: ' . $source[\"size\"] . '\n\nbytes<br />';\n\n $logMsg .= 'Tipo de arquivo: ' . $source[\"type\"] . '<br />';\n\n $logMsg .=\n\n '---------------------------------------------------------------<br />';\n\n $this->setLog($logMsg);\n\n //Verifica se arquivo é permitido\n\n if($this->verifyUpload($source))\n\n {\n\n $novo_arquivo = $this->verifyFileExists($source[\"name\"]);\n\n if(move_uploaded_file($source[\"tmp_name\"], $this->path . $novo_arquivo))\n\n return $novo_arquivo;\n\n else\n\n {\n\n $this->setLog(\"-> Erro ao enviar arquivo<br />\");\n\n $this->setLog(\" Obs.: \".$this->getErrorUpload($source[\"error\"]).\"<br />\");\n\n return false;\n\n }\n\n }else\n\n {\n\n $this->setLog(\"-> O arquivo que você está tentando enviar\n\nnão é permitido pelo administrador<br />\");\n\n $this->setLog(\" Obs.: Apenas as extensões \".$this->viewExt().\" são permitidas.<br />\");\n\n return false;\n\n }\n\n }", "title": "" }, { "docid": "aff9d29485ebd0c492b7af9cc885df40", "score": "0.5187907", "text": "public function storeToAmazonS3($sourceImage)\n\t{\n\t\t$source = BaseTinify\\fromFile($sourceImage);\n\t\t$source->store(array(\n\t\t\t'aws_access_key_id' => $this->amazon_access_key_id,\n\t\t\t'aws_secret_access_key' => $this->amazon_secret_access_key,\n\t\t\t'headers' => $this->amazon_headers,\n\t\t\t'path' => $this->amazon_path,\n\t\t\t'region' => $this->amazon_region,\n\t\t\t'service' => 's3'\n\t\t));\n\t}", "title": "" }, { "docid": "85bb9d0de7bdfa5464c883e372bf4929", "score": "0.51748973", "text": "public function moveTo($dest){\n\t\t$fileName = $this->info[\"name\"]; \n\t\t$fileTmpLoc = $this->info[\"tmp\"];\n\t\t// Path and file name\n\t\t$pathAndName = \"uploads\".$this::DS.$fileName;\n\t\t// Run the move_uploaded_file() function here\n\t\t$moveResult = move_uploaded_file($fileTmpLoc, $pathAndName);\n\t\t// Evaluate the value returned from the function if needed\n\t\tif ($moveResult == true) {\n\t\t echo \"File has been moved from \" . $fileTmpLoc . \" to\" . $pathAndName;\n\t\t} else {\n\t\t echo \"ERROR: File not moved correctly\";\n\t\t}\n\t\t\t\n\t}", "title": "" }, { "docid": "8d3feb2539db0bd94d70cefab9368eb5", "score": "0.51715463", "text": "private function copy_directory($source, $destination) {\n\t\t\tif (is_dir($source)) {\n\t\t\t\t@mkdir($destination);\n\t\t\t\t$directory = dir($source);\n\t\t\t\twhile (FALSE !== ( $readdirectory = $directory->read() )) {\n\t\t\t\t\tif ($readdirectory == '.' || $readdirectory == '..') {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$PathDir = $source . '/' . $readdirectory;\n\t\t\t\t\tif (is_dir($PathDir)) {\n\t\t\t\t\t\t$this->copy_directory($PathDir, $destination . '/' . $readdirectory);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tcopy($PathDir, $destination . '/' . $readdirectory);\n\t\t\t\t}\n\n\t\t\t\t$directory->close();\n\t\t\t} else {\n\n\t\t\t\t//if file with key then create file\n\t\t\t\tif ($source == \"{$plugin_folder}/{$plugin_file}\") {\n\t\t\t\t\t$fp = fopen($destination, \"w\");\n\t\t\t\t\tfwrite($fp, $file);\n\t\t\t\t\tfclose($fp);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcopy($source, $destination);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f19f399aa8330517d4baa36884a95e93", "score": "0.51707196", "text": "public function copy($data){\n\t\t\t\n\t\t\t// Verify file and path\n\t\t\tif (!isset($data['file']) || !isset($data['path']) || !is_array($data['file'])){\n\t\t\t\t$this->errors[] = 'Name or path not found!';\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (!is_writable($data['path'])){\n\t\t\t\t$this->errors[] = 'Destination path is not writable!';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\tif (!$this->_verifyMime($data['file']['name'])){\n\t\t\t\t$this->errors[] = 'The file must be an jpg, gif or png image!';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// Generate filename and move file to destination path\n\t\t\t//$filename_array = explode('.', $data['file']['name']);\n\t\t\t//$ext = end($filename_array);\n\t\t\t//$ext = strtolower($ext);\n\t\t\t//$name = uniqid() . date('dmYHis') . '.' . $ext;\n\t\t\t$name = $data['file']['name'];\n\t\t\t$complete_path = $data['path'] . DIRECTORY_SEPARATOR . $name;\n\t\t\t\n\t\t\tif (!move_uploaded_file($data['file']['tmp_name'], $data['path'] . $name)){\n\t\t\t\t$this->errors[] = 'Error while upload the image!';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// Return image $complete_path\n\t\t\treturn $complete_path;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "1e81ee52e15284aec052b6927daec2dc", "score": "0.51687217", "text": "public static function upload()\n {\n $gs_filename = $_FILES['imagem']['tmp_name'];\n $filename = $_FILES['imagem']['name']; \n\n move_uploaded_file($gs_filename, $url = self::getUrl($filename)); \n\n printf('<a href=\"%s\">Link</a>', \n CloudStorageTools::getImageServingUrl($url));\n }", "title": "" }, { "docid": "5a540735f2aaf73057988f41738bd689", "score": "0.5168587", "text": "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n\n $this->getFile()->move(\n __DIR__ . self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n $this->nomImage = $this->getFile()->getClientOriginalName();\n $this->setFile(null);\n }", "title": "" }, { "docid": "c8ef323bd9a207dde6cd7c1648c54d4e", "score": "0.5166604", "text": "function do_remote($img) {\n\n\t\t$src = (!$this->EE->TMPL->fetch_param('image')) ? (!$this->EE->TMPL->fetch_param('src') ? '' : $this->EE->TMPL->fetch_param('src')):$this->EE->TMPL->fetch_param('image');\n\t\t$src = str_replace(SLASH, \"/\", $src); // clean up passed src param\n\t\t$refresh = (!$this->EE->TMPL->fetch_param('refresh')) ? '1440' : $this->EE->TMPL->fetch_param('refresh');\n\n\t\t$remote_user = (!$this->EE->TMPL->fetch_param('remote_user')) ? '' : $this->EE->TMPL->fetch_param('remote_user');\n\t\t$remote_pass = (!$this->EE->TMPL->fetch_param('remote_pass')) ? '' : $this->EE->TMPL->fetch_param('remote_pass');\n\n\t\t$url_filename = parse_url($img['src']);\n\t\t$url_filename = pathinfo($url_filename['path']);\n\n\t\t$base_cache = reduce_double_slashes($img['base_path'] . \"/images/sized/\");\n\t\t$base_cache = (!$this->EE->TMPL->fetch_param('base_cache')) ? $base_cache : $this->EE->TMPL->fetch_param('base_cache');\n\t\t$base_cache = reduce_double_slashes($base_cache);\n\n\t\t$save_mask = str_replace('/', '-', $url_filename['dirname']);\n\t\t$save_name = $img['url_host_cache_dir'] . $save_mask . \"-\" . $url_filename['basename'];\n\n\t\t$save_root_folder = $base_cache . \"remote\";\n\t\t$save_root_path = $save_root_folder . \"/\" . $save_name;\n\n\t\t$save_rel_path = $base_cache . \"/remote/\" . $save_name;\n\t\t$save_rel_path = \"/\" . str_replace($img['base_path'], '', $save_rel_path);\n\t\t$save_rel_path = reduce_double_slashes($save_rel_path);\n\n\t\t$save_dir = reduce_double_slashes($base_cache . \"/remote/\");\n\n\t\tif (!is_dir($save_dir)) {\n\t\t\t// make the directory if we can\n\t\t\tif (!mkdir($save_dir, 0777, true)) {\n\t\t\t\t$this->EE->TMPL->log_item(\"Error: could not create cache directory! Please manually create the cache directory \" . $save_dir . \"/remote/ with 777 permissions\");\n\t\t\t\treturn $this->EE->TMPL->no_results();\n\t\t\t}\n\t\t}\n\n\t\t// check the sorce and the cache file\n\t\t//error_reporting(0);\n\n\t\t$remote_diff = round((time() - filectime($save_root_path)) / 60) - 9;\n\t\t//$this->EE->TMPL->log_item($remote_diff);\n\n\t\tif ($remote_diff > $refresh) {\n\n\t\t\t$ch = curl_init();\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $src);\n\t\t\tif ($remote_pass) {\n\t\t\t\tcurl_setopt($ch, CURLOPT_USERPWD, $remote_user . \":\" . $remote_pass);\n\t\t\t}\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\tcurl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);\n\t\t\tcurl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);\n\t\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);\n\t\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30);\n\t\t\t$file_contents = curl_exec($ch);\n\t\t\t$curl_info = curl_getinfo($ch);\n\n\t\t\tif (curl_errno($ch)) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tcurl_close($ch);\n\t\t\t}\n\n\t\t\tdefine(\"FILE_PUT_CONTENTS_ATOMIC_TEMP\", $save_dir);\n\t\t\tdefine(\"FILE_PUT_CONTENTS_ATOMIC_MODE\", 0777);\n\t\t\t$this->file_put_contents_atomic($save_root_path, $file_contents);\n\n\t\t\t$this->EE->TMPL->log_item(\"imgsizer.remote.did_fetch: yes\");\n\t\t\tforeach ($curl_info as $key => $value) {\n\t\t\t\t$this->EE->TMPL->log_item(\"imgsizer.remote.curl.\" . $key . \": \" . $value);\n\t\t\t}\n\n\t\t}\n\n\t\t/*debug*/\n\t\t$this->EE->TMPL->log_item(\"imgsizer.remote.save_src_path: \" . $save_rel_path);\n\t\treturn $save_rel_path;\n\n\t}", "title": "" }, { "docid": "c0a2fb4129bb01610a526741844e37c6", "score": "0.51583093", "text": "function copyFile($source, $destination) {\n\n return copy($source, $destination);\n\n }", "title": "" }, { "docid": "7c3b31cd587de8bd53c4163f757cc940", "score": "0.51541585", "text": "function _uploadImg($name)\n {\n // STEP 1. Copy file to storer.\n $base_image_path = SHIN_Core::$_config['core']['base_path'] . SHIN_Core::$_runned_application .DIRECTORY_SEPARATOR. SHIN_Core::$_config['store']['questions_images'] . DIRECTORY_SEPARATOR;\n\n SHIN_Core::$_libs['upload']->process_upload(SHIN_Core::$_config['store']['questions_images'], 'gtrwebsite_question_img');\n \n // STEP 2. Generate thumbnail.\n $this->_genThumbnail($base_image_path, $name);\n }", "title": "" }, { "docid": "893167615b78fa6b3ea8541f7293df2e", "score": "0.51453227", "text": "public function move($targetSource,$destinationPath);", "title": "" }, { "docid": "106d4eaf1e26207114b86ceb7adfce57", "score": "0.5131685", "text": "private function uploadImg($fileName, $realPath){\n \n $key = $fileName;\n $local_path = $realPath;\n\n $cosClient = new Client(array('region' => $this->QCLOUD_REGION,\n 'credentials'=> array(\n 'appId' => $this->QCLOUD_APPID,\n 'secretId' => $this->QCLOUD_SECRETID,\n 'secretKey' => $this->QCLOUD_SECRETKEY)));\n\n try {\n $result = $cosClient->putObject(array(\n 'Bucket' => $this->QCLOUD_BUCKET,\n 'Key' => $key,\n 'Body' => fopen($local_path, 'rb')\n ));\n } catch (\\Exception $e) {\n echo($e);\n }\n }", "title": "" }, { "docid": "ac8273bf7632e8b78cc88b80b4af620d", "score": "0.512673", "text": "public function copyToContainer($source, $destination, $service)\n {\n $this->exec('docker cp ' . $source . ' ' . $this->getContainerId($service) . ':' . $destination);\n }", "title": "" }, { "docid": "6b47b05111da48a879c60fbd7198a389", "score": "0.51250446", "text": "public static function copyImage(\n $src_image_type,\n $src_image,\n $dst_image,\n $src_x,\n $src_y,\n $src_w,\n $src_h,\n $dst_x,\n $dst_y,\n $dst_w,\n $dst_h\n ) {\n \n // Un fondo blanco en general\n imagefill($dst_image, 0, 0, imagecolorallocate($dst_image, 255, 255, 255));\n\n // Conservar la transparencia para PNG y GIF\n if ($src_image_type == IMAGETYPE_PNG || $src_image_type == IMAGETYPE_GIF) {\n $transparent = imagecolorallocatealpha($dst_image, 255, 255, 255, 127);\n imagealphablending($dst_image, false);\n imagesavealpha($dst_image, true);\n imagecolortransparent($dst_image, $transparent);\n imagefilledrectangle($dst_image, 0, 0, $dst_w, $dst_h, $transparent);\n }\n\n /* Para preservar la transparencia en GIF se necesita utilizar imagecopyresized()\n * en lugar de imagecopyresampled() */\n if ($src_image_type == IMAGETYPE_GIF) {\n imagecopyresized(\n $dst_image, $src_image,\n $dst_x, $dst_y,\n $src_x, $src_y,\n $dst_w, $dst_h,\n $src_w, $src_h\n );\n } else {\n imagecopyresampled(\n $dst_image, $src_image,\n $dst_x, $dst_y,\n $src_x, $src_y,\n $dst_w, $dst_h,\n $src_w, $src_h\n );\n }\n }", "title": "" }, { "docid": "57778466a9ed17b3a4aab0f690e70214", "score": "0.51236945", "text": "public function extract(string $storagePath, string $localPath, bool $overwrite = false): void;", "title": "" }, { "docid": "e20062ff15554e9333c02e9557473dbc", "score": "0.51232773", "text": "private function writeThumb($dst_path, ImageManipulator $image) {\n $parts = explode('/', $dst_path);\n array_pop($parts);\n $path = implode('/', $parts);\n\n if (!file_exists($path)) {\n if (!mkdir($path, 0775)) {\n return false;\n }\n }\n\n return $image->save($dst_path);\n }", "title": "" }, { "docid": "79e17732299c3fac3b4e63f5d329c7b7", "score": "0.5121967", "text": "public function imageToFile($destCropFile, $image)\r\n\t{\r\n\t\t$ext = strtolower(JFile::getExt($destCropFile));\r\n\t\tob_start();\r\n\t\tswitch ($ext) {\r\n\t\t\tcase 'jpg':\r\n\t\t\tcase 'jpeg':\r\n\t\t\t\t$source = imagejpeg($image, null, 100);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'png':\r\n\t\t\t\t$source = imagepng($image, null);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'gif':\r\n\t\t\t\t$source = imagegif($image, null);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t$image_p = ob_get_contents();\r\n\t\tob_end_clean();\r\n\t\tJFile::write($destCropFile, $image_p);\r\n\t}", "title": "" }, { "docid": "431f8b7309413ca0b86ae25c26ca70ca", "score": "0.5118541", "text": "protected function move()\n\t{\n\t\t$paths = array(\n\t\t\t$this->_tmpDir => $this->_dir,\n\t\t\t$this->_tmpThumbDir => $this->_thumbDir,\n\t\t);\n\n\t\tforeach ($paths as $tmpPath => $path)\n\t\t{\n\t\t\t$file = Yii::app()->file->set($tmpPath.$this->owner->image);\n\t\t\tif ($file->isFile)\n\t\t\t\t$file->rename($path.$this->owner->image);\n\t\t}\n\t}", "title": "" }, { "docid": "92343ee3eb6eba76bdbc35add7fa7e26", "score": "0.5117906", "text": "public static function copy($path, $target){\n\t\t Illuminate\\Filesystem\\Filesystem::copy($path, $target);\n\t }", "title": "" }, { "docid": "a824425ddc90ac18c1d53ab31b4d129e", "score": "0.5110574", "text": "public function moveFile($dest)\n\t{\n\t\t// get new image name\n\t\tif ($this->uploadName) {\n\t\t\t$this->fileName = $this->getFilename($this->uploadName, $dest);\n\t\t} else {\n\t\t\t$this->error = 'no upload filename';\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// make sure we have the image name\n\t\tif (!$this->fileName) {\n\t\t\t$this->error = 'no file name';\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// make sure we have the temp image name\n\t\tif (!$this->tempName) {\n\t\t\t$this->error = 'no temp image';\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// set the path\n\t\t$path = $dest.$this->fileName;\n\t\t\n\t\t// move the uploaded file to the new location\n\t\tif (!move_uploaded_file($this->tempName, $path)) {\n\t\t\t$this->error = 'error moving uploaded image to '.$path;\n\t\t} else {\n\t\t\treturn $this->fileName;\n\t\t}\n\t\techo filesize($dest.$this->fileName);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "9e010b6b9b72492bc35862a2991d0d66", "score": "0.5110023", "text": "function insertImage($fileName, $tempName, $directory = \"/public/upload/img/\")\n{\n // Check file extension validity\n if (!preg_match(\"/.*(\\.(?:(?:jpeg)|(?:jpg)|(?:png)|(?:gif)|(?:svg)))$/i\", $fileName, $extension)) {\n throw new Exception(\"Invalid filename filename => $fileName\");\n }\n\n // Generate an unique filename\n do {\n $uniqueId = uniqId();\n } while (file_exists($_SERVER[\"DOCUMENT_ROOT\"] . $directory . $uniqueId . $extension[1]));\n\n // Create directory if it doesn't exist\n if (!file_exists($_SERVER[\"DOCUMENT_ROOT\"] . $directory)) {\n mkdir($_SERVER[\"DOCUMENT_ROOT\"] . $directory, 0777, TRUE);\n }\n // Move image in upload\n move_uploaded_file($tempName, $_SERVER[\"DOCUMENT_ROOT\"] . $directory . $uniqueId . $extension[1]);\n\n // Add entry to the database\n require_once(\"model/database.php\");\n $query = \"INSERT INTO images (path) VALUES (:path)\";\n\n $res = executeQueryInsert($query, createBinds([[\":path\", $directory . $uniqueId . $extension[1]]]));\n return $res;\n}", "title": "" }, { "docid": "95c9b6302ab750fa004262321ad47741", "score": "0.51086307", "text": "private function saveImage($image)\n {\n\n }", "title": "" }, { "docid": "9294c132ad2a9dbc6fa62bdcd1558c20", "score": "0.51052886", "text": "public function put ( string $local_file, $remote_path = '', $randomize_filename = false ) {\n\n if ( !$remote_path || empty ($remote_path) ) {\n throw new EmptyPathException (\"Remote path cannot be blank. String given: \" . $remote_path);\n }\n\n if ( !$local_file\n || empty ($local_file)\n || !file_exists ($local_file)\n || !filesize ($local_file)\n || !is_readable ($local_file)\n ) {\n throw new InaccessibleLocalFileException ( $local_file . \" does not exist, is not readable, or is not valid.\" );\n }\n\n try {\n\n $this->stream = Psr7\\stream_for (file_get_contents ($local_file));\n\n $response = $this->guzzle->put ($this->storage_url . env('BUNNYCDN_PULLZONE') . '/' . ($remote_path ?? ''), [\n 'headers' => [\n 'accesskey' => env ('BUNNYCDN_STORAGE_KEY'), // NB: uses storage zone key/password, NOT the global API key\n ],\n 'body' => $this->stream,\n ]\n );\n\n if ( $response->getStatusCode() >= 400) {\n throw new UploadFailureException (\"Upload failed with HTTP status: \".$response->getStatusCode());\n return false;\n }\n\n if ( $response->getStatusCode() == 201 ) {\n return true;\n }\n\n } catch ( RequestException $e ) {\n throw new UploadFailureException ($e->getMessage ());\n return false;\n }\n\n return false;\n\n }", "title": "" }, { "docid": "fb26c010ea20d48343799025507d1d49", "score": "0.50959694", "text": "function wpw_auto_poster_get_image_path( $image_src ) {\r\n\r\n\t$image_path = '';\r\n\r\n\t//Check Folder created if not then first creatiing it\r\n\tif (!file_exists(WPW_AUTO_POSTER_SAP_UPLOADS_DIR)) {\r\n\t\twp_mkdir_p(WPW_AUTO_POSTER_SAP_UPLOADS_DIR);\r\n\t}\r\n\r\n $image = file_get_contents( $image_src );\r\n $filename = basename ( $image_src );\r\n $isUploaded = file_put_contents( WPW_AUTO_POSTER_SAP_UPLOADS_DIR.$filename, $image);\r\n \r\n if( $isUploaded !== false){\r\n $image_path = WPW_AUTO_POSTER_SAP_UPLOADS_DIR.$filename;\r\n }\r\n\r\n\treturn $image_path;\r\n\r\n}", "title": "" }, { "docid": "3e30e077b00c5ce8b175a029559b009e", "score": "0.50947464", "text": "function copy_file($src, $dst) {\n \tif (file_exists($src)) {\n\t \tif (DEBUG_SCRIPT) echo \"Copying file: {$src} to {$dst}...\\n\";\n\t\t\tsystem(\"cp {$src} {$dst}\");\n\t\t}\n }", "title": "" } ]
3bc38897c1a63b6e3727357f166e4f7e
Pending password change added
[ { "docid": "cb04e316767f45ed777408e35c300485", "score": "0.6588416", "text": "public function pendingPasswordChange(ArmorUserInterface $user):void\n {\n\n }", "title": "" } ]
[ { "docid": "15e6862740c91afb0cc0de26ae217636", "score": "0.74337715", "text": "public function changePassword() {}", "title": "" }, { "docid": "9389d4bbd1cfe76f716d92c08a06e2a0", "score": "0.692679", "text": "public function getNewPassword();", "title": "" }, { "docid": "ce1acef78f50a4d56bcd42b1cbd4a6ed", "score": "0.6867298", "text": "public function canChangePasswords();", "title": "" }, { "docid": "0b0a5d3bd124f49a5d2794ab8ae21d31", "score": "0.6854937", "text": "public function checkPasswordChanges()\n {\n $output = new stdClass();\n $output->module = 'im';\n $output->method = 'checkpasswordchanges';\n $output->result = 'success';\n $output->data = $this->im->getKickList();\n die($this->app->encrypt($output));\n }", "title": "" }, { "docid": "b417aacf15e0f8a46162fdb72fc50e79", "score": "0.6673504", "text": "public function pendingPasswordChange(ArmorUserInterface $user):void;", "title": "" }, { "docid": "28a1ee8b6187edaad697a6602bf4201c", "score": "0.6571503", "text": "public function isAbleToChangePassword(): bool;", "title": "" }, { "docid": "be5dfd4614435b616d3d08b8b29c1738", "score": "0.65628535", "text": "public function changePassword()\n {\n if (!$this->isRestore()) {\n $this->addError('error', Yii::t('activeuser_general', 'User not request restore procedure'));\n return false;\n }\n if ($this->isRestoreTokenExpired()) {\n $this->addError('token', Yii::t('activeuser_general', 'You token was expired'));\n return false;\n }\n if (empty($this->password) && !$this->module->generatePassOnRestore) {\n $this->addError('password', Yii::t('activeuser_general', 'Password cannot be blank'));\n return false;\n }\n $this->status = self::STATUS_ACTIVE;\n $this->newPassword();\n return true;\n }", "title": "" }, { "docid": "0eb011423d58d23fd50149567c70583d", "score": "0.6562463", "text": "public function change_password() {\n\t\t$flash = Flash::Instance();\n\t\tif(!$this->is_post) {\n\t\t\tsendTo();\n\t\t}\n\t\t$changer = new PasswordChanger();\n\t\t$success = $changer->changePassword(CurrentlyLoggedInUser::Instance(), $this->_data);\n\t\tsendTo('preferences','index','tactile');\n\t}", "title": "" }, { "docid": "9c381fae963b03e69e022f57e5f843f9", "score": "0.6561527", "text": "public function beforeUpdate()\n {\n // Save new password if user filled in the field\n if (!empty($this->new_password)) {\n $this->setPassword($this->new_password);\n }\n }", "title": "" }, { "docid": "a4618568571d3d5c80694218daa7f7a6", "score": "0.6550116", "text": "public function updatePassAction()\n {\n $passNew = isset($_POST['passNew']) ? $_POST['passNew'] : NULL;\n\n $settings = new SettingsData();\n $settings->updatePassword($passNew);\n }", "title": "" }, { "docid": "ba214c69f7306956a123245daa1795ec", "score": "0.65493315", "text": "public function isAbleToChangePassword(): bool\n {\n return true;\n }", "title": "" }, { "docid": "5e8b1f9cb70d96a2a6af28d999b715f1", "score": "0.654266", "text": "public function update_pass()\n {\n }", "title": "" }, { "docid": "375e19122cc5835b4b9036e64c0bde29", "score": "0.65361285", "text": "public function onPasswordSave()\n {\n $data = post();\n $user = $this->getUser();\n\n if (Hash::check($data['old_password'], $user->password)) {\n $user->password = $data['password'];\n $user->password_confirmation = $data['password_confirm'];\n \n if ($user->save()) {\n\n // Re-authenticate the user\n $user = Auth::authenticate([\n 'email' => $user->email,\n 'password' => $data['password'],\n ], true);\n\n Flash::info(Lang::get('dma.friends::lang.user.passwordSave'));\n } else {\n Flash::error(Lang::get('dma.friends::lang.user.passwordFail'));\n }\n } else {\n Flash::error(Lang::get('dma.friends::lang.user.passwordFail'));\n }\n\n return [\n '#flashMessages' => $this->renderPartial('@flashMessages'),\n '.modal-body' => \"<script type='text/javascript'>$('button.close').click();</script>\",\n ];\n\n }", "title": "" }, { "docid": "91067f22c05932e8d57055775c5d1e68", "score": "0.6527093", "text": "function can_change_password() {\n return true;\n }", "title": "" }, { "docid": "232747e573668651cd6c495e2172f075", "score": "0.64919996", "text": "public function password_update()\n\t{\n\t\t$this->custom_model->check_login_session();\n\n\t\tprint $data = $this->admin->password_update();\n\t}", "title": "" }, { "docid": "6a6728cc0862bcd306bfbc0119ce23c3", "score": "0.6483812", "text": "public function setActiveUserPassword() {\n\t\t\n\t\t// authorize call\n\t\t$this->authorize(Permissions::USERS_SET_OWN_PASSWORD);\n\t\t\t\t\t\t\t\t\n\t\t// get reference to active user\n\t\t$activeUser = $this->getCtx()->getUser();\n\t\t\n\t\t// get ref to managers needed\n\t\t$userManager = $this->getCtx()->getUserManager();\n\t\t$userManager->setUserPassword($activeUser, $this->input->post('password'));\n\n\t\t// prepare view data\n\t\t$data[\"component\"] = \"components/component_other_notification.php\";\n\t\t$data[\"component_title\"] = \"Change Password\";\n\t\t$data[\"component_message\"] = \"<p>Your password has been changed.</p><p>The change will take effect at the time of your next login.</p>\";\n\t\t$data[\"component_mode\"] = \"info\";\n\t\t$data[\"component_target\"] = \"/\";\n\t\t\n\t\t// render view\n\t\t$this->renderView($data);\n\t\t\n\t}", "title": "" }, { "docid": "ed212514c6c888facf90491c9194dfa1", "score": "0.64667624", "text": "public function canUpdatePassword()\n\t\t{\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "984fb87b9c9bb31bd046dad460b5f66a", "score": "0.646493", "text": "function actionPasswordReset( $user, $new_pass ) {\n}", "title": "" }, { "docid": "cc48de2366c2cb8e04b43f018ae3bef3", "score": "0.6430953", "text": "public function modifyPassword()\n {\n helper(['pass']);\n\n $fields = ['id', 'old_pass', 'new_pass'];\n\n $json = $this->request->getJSON();\n if ($json) {\n $data = [\n $fields[0] => $json->username,\n $fields[1] => $json->old_pass,\n $fields[2] => $json->new_pass\n ];\n } else {\n $input = $this->request->getRawInput();\n $data = [\n $fields[0] => $input['username'],\n $fields[1] => $input['old_pass'],\n $fields[2] => $input['new_pass']\n ];\n }\n // empty parameters check\n if (strlen($data['id']) < 0 || $data['id'] == null) {\n return $this->failValidationErrors(\"Username must be defined!\");\n }\n if (strlen($data['old_pass']) < 0 || $data['old_pass'] == null) {\n return $this->failValidationErrors(\"Old Password must be defined!\");\n }\n if (strlen($data['new_pass']) < 0 || $data['new_pass'] == null) {\n return $this->failValidationErrors(\"New Password must be defined!\");\n }\n\n // verify that the data exists\n $result = $this->builder->getWhere([\n 'id' => $data['id']\n ])->getRow();\n \n if (!$result) {\n return $this->failNotFound(\"Username is not recognized: \" . $data['id']);\n } else {\n if (!pass_check($data['old_pass'], $result->password)) {\n return $this->failUnauthorized(\"Wrong password!\");\n } else {\n if (strlen($data['new_pass']) > 72) {\n return $this->failValidationErrors(\"Username must be no longer than 72 characters!\");\n } else {\n $new_pass = pass_create($data['new_pass']);\n $this->builder->update(\n ['password' => $new_pass],\n ['id' => $data['id']]\n );\n return $this->respondUpdated(\"Password has been modified successfully!\");\n }\n }\n }\n }", "title": "" }, { "docid": "dab5a38e6509282326eb2ea65d10f05c", "score": "0.6418383", "text": "public function changepw() {\n $this->password = UserIdentity::saltPassword($this->password, $this->salt);\n $this->scenario = 'changepw';\n return $this->save();\n }", "title": "" }, { "docid": "3e45f5e40bea4edc0368771981b71903", "score": "0.64177805", "text": "public function changePass()\n {\n\n $mdp = $this->request->getParameter( 'pass' );\n $verifPass = $this->request->getParameter( 'verifPass' );\n\n if ($mdp !== false && $verifPass !== false) {\n if ($mdp === $verifPass) {\n if (preg_match( \"#^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*\\W)(?!.*[<>]).{8,30}$#\", $mdp )) {\n $this->user->updateMdp( $mdp, $this->request->getSession()->getAttribut( 'idUser' ) );\n $this->rediriger( \"admin\", \"index\" );\n $this->request->getSession()->setFlash( 'Le mot de passe a été modifié' );\n } else {\n\n $this->request->getSession()->setFlash( 'mots de passe non autorisé' );\n }\n\n } else {\n $this->request->getSession()->setFlash( 'Les mots de passe ne sont pas identiques' );\n }\n } else {\n $this->request->getSession()->setFlash( 'Action non autorisée' );\n }\n $this->rediriger( \"admin\", \"index\" );\n\n\n }", "title": "" }, { "docid": "1b6abd08d054a01d7f98f19ee02f161b", "score": "0.6398419", "text": "public function changepassword() {\n $data['parent'] = \"password\";\n $data['error'] = \"\";\n $data['message'] = \"\";\n $this->template->load('default', 'auth/changepassword', $data);\n }", "title": "" }, { "docid": "1352a14f71e94d4b160fc19b8b782358", "score": "0.63695073", "text": "public function RenewPassword($request) {}", "title": "" }, { "docid": "e3e725a9ec209e28e75332106dc0cd82", "score": "0.6309741", "text": "function wpwebapp_form_pw_change() {\n\n\tif ( is_user_logged_in() ) {\n\n\t\t// Variables\n\t\t$alert = stripslashes( wpwebapp_get_alert_message( 'wpwebapp_alert', 'wpwebapp_alert_pw_change' ) );\n\t\t$submit_text = stripslashes( wpwebapp_get_pw_change_text() );\n\t\t$submit_class = esc_attr( wpwebapp_get_form_button_class_pw_change() );\n\t\t$pw_requirements = stripslashes( wpwebapp_get_pw_requirements_text() );\n\t\t$custom_layout = stripslashes( wpwebapp_get_pw_change_custom_layout() );\n\n\t\tif ( wpwebapp_get_disable_pw_confirm_field() === 'off' ) {\n\t\t\t$field_pw_confirm = wpwebapp_form_field_text_input_plus( 'password', 'wpwebapp-pw-new-2', __( 'Confirm New Password', 'wpwebapp' ) );\n\t\t} else {\n\t\t\t$field_pw_confirm = '';\n\t\t}\n\n\t\tif ( $custom_layout === '' ) {\n\t\t\t$form =\n\t\t\t\t$alert .\n\t\t\t\t'<form class=\"form-wpwebapp\" id=\"wpwebapp-form-pw-change\" name=\"wpwebapp-form-pw-change\" action=\"\" method=\"post\">' .\n\t\t\t\t\twpwebapp_form_field_text_input_plus( 'password', 'wpwebapp-pw-current', __( 'Current Password', 'wpwebapp' ) ) .\n\t\t\t\t\twpwebapp_form_field_text_input_plus( 'password', 'wpwebapp-pw-new-1', sprintf( __( 'New Password %s', 'wpwebapp' ), $pw_requirements ) ) .\n\t\t\t\t\t$field_pw_confirm .\n\t\t\t\t\twpwebapp_form_field_submit_plus( 'wpwebapp-change-pw-submit', $submit_class, $submit_text, 'wpwebapp-change-pw-process-nonce', 'wpwebapp-change-pw-process' ) .\n\t\t\t\t'</form>';\n\t\t} else {\n\t\t\t$add_fields = array(\n\t\t\t\t'%alert' => $alert,\n\t\t\t\t'%pw-current' => wpwebapp_form_field_text_input( 'password', 'wpwebapp-pw-current', __( 'Current Password', 'wpwebapp' ) ),\n\t\t\t\t'%pw-new' => wpwebapp_form_field_text_input( 'password', 'wpwebapp-pw-new-1', sprintf( __( 'New Password %s', 'wpwebapp' ), $pw_requirements ) ),\n\t\t\t\t'%pw-confirm' => wpwebapp_form_field_text_input( 'password', 'wpwebapp-pw-new-2', __( 'Confirm New Password', 'wpwebapp' ) ),\n\t\t\t\t'%submit' => wpwebapp_form_field_submit( 'wpwebapp-change-pw-submit', $submit_class, $submit_text, 'wpwebapp-change-pw-process-nonce', 'wpwebapp-change-pw-process' ),\n\t\t\t);\n\t\t\t$custom_layout = strtr( $custom_layout, $add_fields );\n\t\t\t$form =\n\t\t\t\t'<form class=\"form-wpwebapp\" id=\"wpwebapp-form-pw-change\" name=\"wpwebapp-form-pw-change\" action=\"\" method=\"post\">' .\n\t\t\t\t\t$custom_layout .\n\t\t\t\t'</form>';\n\t\t}\n\n\t} else {\n\t\t$form = '<p>' . __( 'You must be logged in to change a password.', 'wpwebapp' ) . '</p>';\n\t}\n\n\treturn $form;\n\n}", "title": "" }, { "docid": "c7522741d2b2b0b5680582f34e3f9801", "score": "0.62991077", "text": "private function _createPasswordChangeToken() {\r\n\t\r\n\t\tDebugLogger::write(\"Password change token will be created from now.\");\r\n\t\r\n\t\t// DB connect\r\n\t\t$db_connection = GalaxyDbConnector::getConnection();\r\n\t\r\n\t\tif ($db_connection == null) {\r\n\t\t\tErrorLogger::write(\"DB connect failed.\");\r\n\t\t\treturn OutputUtil::getErrorOutput(array(SRV_SYSTEM_ERROR_NONE));\r\n\t\r\n\t\t} else {\r\n\t\t}\r\n\t\r\n\t\t$passwordChangeToken = md5($this->_user->getEmail() . strval(time()) . PASSWORD_CHANGE_SALT_WORD);\r\n\t\r\n\t\t// Email+ SALT+TIME\r\n\t\t// prepare SQL statement\r\n\t\t$stmt = $db_connection->prepare(REGISTER_PASSWORD_CHANGE_TOKEN);\r\n\t\t$stmt->bindValue(\":PCREQUESTCODE\",\t$passwordChangeToken,\t PDO::PARAM_STR);\r\n\t\t$stmt->bindValue(\":EMAIL\",\t\t\t\t $this->_user->getEmail(), PDO::PARAM_STR);\r\n\t\t$stmt->bindValue(\":PCREQUESTTIME\", date(\"Y-m-d H:i:s\"),\t PDO::PARAM_STR);\r\n\t\t\r\n\t\t// execute SQL\r\n\t\ttry {\r\n\t\t\t$stmt->execute();\r\n\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\tErrorLogger::write(\"Exception has thrown DB update.\", $e);\r\n\t\t\treturn OutputUtil::getErrorOutput(array(SRV_SYSTEM_ERROR_NONE));\r\n\t\t}\r\n\t\r\n\t\tDebugLogger::write(\"DB update succeeded.\");\r\n\t\r\n\t\t// close prepared statement\r\n\t\t$stmt = null;\r\n\t\r\n\t\t$this->_user->setPcrequestcode($passwordChangeToken);\r\n\t\treturn OutputUtil::getSuccessOutput();\r\n\t}", "title": "" }, { "docid": "b24d19adb538b4282dff62b307058fef", "score": "0.62841386", "text": "public function changePassword()\n {\n $id = $this->session->id;\n $data['agents'] = $this->App_model->get_onces($id, 'tb_doc_assets', 'id_asset');\n\n $data['title'] = \"Modification du mot de passe utilisateur\";\n $this->load->view('includes/header', $data);\n $this->load->view('app/profil/change_password', $data);\n $this->load->view('includes/footer', $data);\n }", "title": "" }, { "docid": "9375aebd0286e4857e2f32c181d3233d", "score": "0.62824446", "text": "function edit_password() {\n if($this->request->isAsyncCall() || $this->request->isMobileDevice()) {\n if($this->active_user->isLoaded()) {\n if($this->active_user->canChangePassword($this->logged_user)) {\n $user_data = $this->request->post('user');\n $this->response->assign('user_data', $user_data);\n \n if($this->request->isSubmitted(true, $this->response)) {\n try {\n $errors = new ValidationErrors();\n\n $password = array_var($user_data, 'password');\n $repeat_password = array_var($user_data, 'repeat_password');\n\n if(empty($password)) {\n $errors->addError(lang('Password value is required'), 'password');\n } // if\n\n if(empty($repeat_password)) {\n $errors->addError(lang('Repeat Password value is required'), 'repeat_password');\n } // if\n\n if(!$errors->hasErrors() && ($password !== $repeat_password)) {\n $errors->addError(lang('Inserted values does not match'));\n } // if\n\n if($errors->hasErrors()) {\n throw $errors;\n } // if\n\n\t $password_expired = $this->active_user->isPasswordExpired();\n\t /*pre_var_dump($password_expired);\n\t exit*/;\n\n\t if ($password_expired) {\n\t\t $this->active_user->history()->alsoRemoveFields(array('password'));\n\t } // if\n\n $this->active_user->setPassword($user_data['password']);\n $this->active_user->save();\n\n\t if ($password_expired) {\n\t\t $field = 'expired_password';\n\t\t $modified_fields = array($field => array($user_data['password'], $user_data['password']));\n\t\t $this->active_user->history()->alsoTrackFields($field);\n\t\t $this->active_user->history()->commitModifications($modified_fields, $this->logged_user);\n\t } // if\n\n if($this->request->isPageCall()) {\n $this->response->redirectToUrl($this->active_user->getViewUrl());\n } else {\n $this->response->respondWithData($this->active_user, array(\n 'as' => 'user',\n 'detailed' => true,\n ));\n } // if\n } catch(Exception $e) {\n AngieApplication::revertCsfrProtectionCode();\n $this->response->exception($e);\n } // try\n } // if\n } else {\n $this->response->forbidden();\n } // if\n } else {\n $this->response->notFound();\n } // if\n } else {\n $this->response->badRequest();\n } // if\n }", "title": "" }, { "docid": "b747bcd24a5a1c4ca988b8b623bf884f", "score": "0.6275536", "text": "function changePassword($p, $e) {\n\t\t$p = $this->getPasswordHash( $this->getPasswordSalt(), $p );\n\t\t\n\t\t$res = $this->db->query(\"UPDATE \".TBL_USERS.\" SET `{$this->table['pass']}` = '{$this->escape($p)}',\n\t\t\t\t\t`{$this->table['active']}` = 1, `{$this->table['session']}` = ''\n\t\t\t\t\tWHERE sha1({$this->table['email']}) = '{$this->escape($e)}'\");\n\t\treturn $this->db->affected_rows;\n\t}", "title": "" }, { "docid": "6dcce95207b21dc983defcd4127f9b8a", "score": "0.6273456", "text": "function wpwebapp_process_pw_change() {\n\tif ( isset( $_POST['wpwebapp-change-pw-process'] ) ) {\n\t\tif ( wp_verify_nonce( $_POST['wpwebapp-change-pw-process'], 'wpwebapp-change-pw-process-nonce' ) ) {\n\n\t\t\t// Password change variables\n\t\t\tglobal $current_user;\n\t\t\tget_currentuserinfo();\n\t\t\t$referer = esc_url_raw( wpwebapp_get_url() );\n\t\t\t$user_id = $current_user->ID;\n\t\t\t$user_pw = $current_user->user_pass;\n\t\t\t$disable_pw_confirm = wpwebapp_get_disable_pw_confirm_field();\n\t\t\t$pw_current = wp_filter_nohtml_kses( $_POST['wpwebapp-pw-current'] );\n\t\t\t$pw_new_1 = wp_filter_nohtml_kses( $_POST['wpwebapp-pw-new-1'] );\n\t\t\t$pw_new_2 = wp_filter_nohtml_kses( $_POST['wpwebapp-pw-new-2'] );\n\t\t\t$pw_test = wpwebapp_password_meets_requirements( $pw_new_1 );\n\n\t\t\t// Alert Messages\n\t\t\t$alert_empty_fields = wpwebapp_get_alert_empty_fields();\n\t\t\t$alert_pw_incorrect = wpwebapp_get_alert_pw_incorrect();\n\t\t\t$alert_pw_match = wpwebapp_get_alert_pw_match();\n\t\t\t$alert_pw_requirements = wpwebapp_get_alert_pw_requirements();\n\t\t\t$alert_pw_change_success = wpwebapp_get_alert_pw_change_success();\n\n\t\t\t// Validate and authenticate passwords\n\t\t\tif ( $pw_current === '' || $pw_new_1 === '' || ( $disable_pw_confirm === 'off' && $pw_new_2 === '' ) ) {\n\t\t\t\twpwebapp_set_alert_message( 'wpwebapp_alert', 'wpwebapp_alert_pw_change', $alert_empty_fields );\n\t\t\t\twp_safe_redirect( $referer, 302 );\n\t\t\t\texit;\n\t\t\t} else if ( !wp_check_password( $pw_current, $user_pw, $user_id ) ) {\n\t\t\t\twpwebapp_set_alert_message( 'wpwebapp_alert', 'wpwebapp_alert_pw_change', $alert_pw_incorrect );\n\t\t\t\twp_safe_redirect( $referer, 302 );\n\t\t\t\texit;\n\t\t\t} else if ( $disable_pw_confirm === 'off' && $pw_new_1 !== $pw_new_2 ) {\n\t\t\t\twpwebapp_set_alert_message( 'wpwebapp_alert', 'wpwebapp_alert_pw_change', $alert_pw_match );\n\t\t\t\twp_safe_redirect( $referer, 302 );\n\t\t\t\texit;\n\t\t\t} else if ( !$pw_test ) {\n\t\t\t\twpwebapp_set_alert_message( 'wpwebapp_alert', 'wpwebapp_alert_pw_change', $alert_pw_requirements );\n\t\t\t\twp_safe_redirect( $referer, 302 );\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\t// If no errors exist, change the password\n\t\t\twp_update_user( array( 'ID' => $user_id, 'user_pass' => $pw_new_1 ) );\n\t\t\twpwebapp_set_alert_message( 'wpwebapp_alert', 'wpwebapp_alert_pw_change', $alert_pw_change_success );\n\t\t\twp_safe_redirect( $referer, 302 );\n\t\t\texit;\n\n\t\t} else {\n\t\t\tdie( 'Security check' );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "505eec501b372d75d0c09914f2b71b46", "score": "0.62543625", "text": "function can_change_password() {\n return false;\n }", "title": "" }, { "docid": "1d03f5101249bbfe153cc894070a5361", "score": "0.62408864", "text": "public function newPassword()\n {\n $errorMsg= '';\n $this->view->setTemplate('userAuth/newPassword');\n if (isset($_POST['submitNewPw'])) {\n $errorMsg = $this->newPasswordStage2();\n if (is_null($errorMsg)) {\n $this->showSuccessMessage(tr('newpw_info_send'));\n }\n }\n $username = (isset($_POST['email'])) ? $_POST['email'] : '';\n $username = ($this->isUserLogged()) ? $this->loggedUser->getUserName() : '';\n $this->view->setVar('username', $username);\n $this->view->setVar('errorMsg', $errorMsg);\n $this->view->loadJQuery();\n $this->view->addLocalCss(\n Uri::getLinkWithModificationTime('/tpl/stdstyle/userAuth/userAuth.css'));\n $this->view->buildView();\n }", "title": "" }, { "docid": "81c7725dd7f87f1f0139f2226e6bb77b", "score": "0.62394744", "text": "public function changePassword()\r\n\t{\r\n\t\tDebugLogger::write(\"Password will be changed from now.\");\r\n\t\r\n\t\t$result = array();\r\n\t\r\n\t\t// encode password using MD5\r\n\t\t$modifiedPassword = (md5($this->_user->getPassword() . USER_PASSWORD_SALT_WORD));\r\n\t\r\n\t\t// DB connect\r\n\t\t$db_connection = GalaxyDbConnector::getConnection();\r\n\t\r\n\t\tif ($db_connection == null) {\r\n\t\t\tErrorLogger::write(\"DB connect failed.\");\r\n\t\t\treturn OutputUtil::getErrorOutput(array(SRV_SYSTEM_ERROR_NONE));\r\n\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t}\r\n\t\r\n\t\t// prepare SQL statement\r\n\t\t$stmt = $db_connection->prepare(CHANGE_PASSWORD_QUERY);\r\n\t\t$stmt->bindValue(\":PCREQUESTCODE\", $this->_user->getPcrequestcode(), PDO::PARAM_STR);\r\n\t\t$stmt->bindValue(\":PASSWORD\",\t $modifiedPassword,\t\t\t\tPDO::PARAM_STR);\r\n\t\r\n\t\t// execute SQL\r\n\t\ttry {\r\n\t\t\t$stmt->execute();\r\n\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\tErrorLogger::write(\"Exception has thrown DB insertion.\", $e);\r\n\t\t\treturn OutputUtil::getErrorOutput(array(SRV_SYSTEM_ERROR_NONE));\r\n\t\t}\r\n\t\r\n\t\tDebugLogger::write(\"DB insertion succeeded.\");\r\n\t\r\n\t\t// close prepared statement\r\n\t\t$stmt = null;\r\n\t\r\n\t\treturn OutputUtil::getSuccessOutput();\r\n\t}", "title": "" }, { "docid": "7a0033a2501dd9434f3cb047e99f1e0f", "score": "0.623041", "text": "function changePass()\n{\n\tglobal $lang, $Account;\n\t$newpass = trim($_POST['password']);\n\tif(strlen($newpass)>3)\n\t{\n\t\tif($Account->setPassword($_GET['id'], $newpass) == TRUE)\n\t\t{\n\t\t\toutput_message('success','<b>Password set successfully! Please wait while your redirected...</b>\n\t\t\t<meta http-equiv=refresh content=\"3;url=?p=admin&sub=users&id='.$_GET['id'].'\">');\n\t\t}\n\t\telse\n\t\t{\n\t\t\toutput_message('error', '<b>Change Password Failed!');\n\t\t}\n\t}\n\telse\n\t{\n\t\toutput_message('error','<b>'.$lang['change_pass_short'].'</b>\n\t\t<meta http-equiv=refresh content=\"3;url=?p=admin&sub=users&id='.$_GET['id'].'\">');\n\t}\n}", "title": "" }, { "docid": "5aa3a37e82a4785b66d255ef7d2706ba", "score": "0.62248486", "text": "public function testAllowPasswordChange() {\n $result = $this->_guzzleJsonAuth->allowPasswordChange();\n $this->assertFalse($result);\n }", "title": "" }, { "docid": "5f57c140bbab0de1e899e4ea09b6ab7e", "score": "0.62124705", "text": "public function setPassword()\n {\n }", "title": "" }, { "docid": "303d29bb28d2d6abb4fd04008f07058c", "score": "0.6212028", "text": "private function checkForNewPassword(array &$data) {\n if (!$data['password']) {\n unset($data['password']);\n return;\n }\n $data['password'] = Hash::make($data['password']);\n }", "title": "" }, { "docid": "c4266607a96e6117b94c8bb9e2cb6e50", "score": "0.62030154", "text": "private function passwd() {\n\t\t$username = mysql_real_escape_string($this->in('Username: '));\n\n\t\t$id = $this->Administrator->find('first', array(\n\t\t\t'conditions' => array('username' => $username),\n\t\t\t'fields' => array('id')\n\t\t));\n\n\t\tif(isset($id['Administrator']['id'])) {\n\t\t\t$id = $id['Administrator']['id'];\n\n\t\t\twhile(empty($new)) {\n\t\t\t\t$new = mysql_real_escape_string($this->in('New Password: '));\n\t\t\t\tif(empty($new))\n\t\t\t\t\t$this->out('Password cannot be empty!');\n\t\t\t}\n\n\t\t\t$confirm = mysql_real_escape_string($this->in('Confirm Password: '));\n\t\t\tif($new === $confirm) {\n\t\t\t\t$hash = mysql_real_escape_string(Security::hash($new, null, Configure::read('Security.salt')));\n\t\t\t\t$query = \"UPDATE administrators SET `password`='$hash' WHERE `id`='$id'\";\n\t\t\t\t$this->Administrator->query($query);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->out(\"Administrator '$username' not found.\");\n\t\t}\n\t}", "title": "" }, { "docid": "72461f30773819d84a591978fec3b6b8", "score": "0.6171946", "text": "function initalizePasswordForcedChangeSettings() {\r\n\r\n }", "title": "" }, { "docid": "706bc148f9c73ba784b584a0f9f6955b", "score": "0.61702627", "text": "public function passwordChangeRequested()\n {\n return (bool)$GLOBALS['session']->get('horde', 'auth/change');\n }", "title": "" }, { "docid": "c41697bf87ba85eeced204a9dfc94cd6", "score": "0.616644", "text": "public function confirmUserChanges() {\n if (isset($_POST[\"changePassword\"])) {\n $this->db->changePassword(htmlspecialchars($_POST[\"newPass\"]));\n }\n \n if (isset($_POST[\"changeNick\"])) {\n $this->db->changeGameNick(htmlspecialchars($_POST[\"gameNick\"]));\n }\n }", "title": "" }, { "docid": "c7065637f8957e80dd6b270f906b09d5", "score": "0.61654365", "text": "public function changePassword()\n {\n $user = \\Sentinel::findById(\\Request::get('id'));\n\n if (\\Reminder::complete($user, \\Request::get('code'), \\Request::get('password'))) {\n $this->success('passwords.reset');\n return $this->json();\n } else {\n return $this->abort('passwords.fail');\n }\n }", "title": "" }, { "docid": "75587164eeff42e4e378fde5bfbb438c", "score": "0.61590284", "text": "public function updatePassword()\n {\n if (!UserUtil::isLoggedIn()) {\n return LogUtil::registerPermissionError();\n }\n\n if (!SecurityUtil::confirmAuthKey('Users')) {\n return LogUtil::registerAuthidError(ModUtil::url('Users', 'user', 'changePassword'));\n }\n\n $uservars = $this->getVars();\n if ($uservars['changepassword'] <> 1) {\n return System::redirect('Users', 'user', 'main');\n }\n\n $currentPassword = FormUtil::getPassedValue('oldpassword', '', 'POST');\n $newPassword = FormUtil::getPassedValue('newpassword', '', 'POST');\n $newPasswordAgain = FormUtil::getPassedValue('newpasswordconfirm', '', 'POST');\n $newPasswordReminder= FormUtil::getPassedValue('passreminder', '', 'POST');\n\n $userObj = UserUtil::getVars(UserUtil::getVar('uid'), true);\n\n if (empty($currentPassword) || !UserUtil::passwordsMatch($currentPassword, $userObj['pass'])) {\n return LogUtil::registerError($this->__('Sorry! The current password you entered is not correct. Please correct your entry and try again.'),\n null, ModUtil::url('Users', 'user', 'changePassword'));\n }\n\n $passwordErrors = ModUtil::apiFunc('Users', 'registration', 'getPasswordErrors', array(\n 'uname' => $userObj['uname'],\n 'pass' => $newPassword,\n 'passagain' => $newPasswordAgain,\n 'passreminder' => $newPasswordReminder\n ));\n\n if (!empty($passwordErrors)) {\n foreach ($passwordErrors as $field => $errorList) {\n foreach ($errorList as $errorMessage) {\n LogUtil::registerError($errorMessage);\n }\n }\n return System::redirect(ModUtil::url('Users', 'user', 'changePassword'));\n }\n\n // set the new password\n if (UserUtil::setPassword($newPassword)) {\n if (!UserUtil::setVar('passreminder', $newPasswordReminder)) {\n LogUtil::registerError($this->__('Warning! Your new password was saved, however there was a problem saving your new password reminder.'));\n }\n } else {\n LogUtil::registerError($this->__('Sorry! There was a problem saving your new password.'));\n return System::redirect(ModUtil::url('Users', 'user', 'main'));\n }\n\n // Force reload of user vars\n $userObj = UserUtil::getVars(UserUtil::getVar('uid'), true);\n\n LogUtil::registerStatus($this->__('Done! Saved your new password.'));\n return System::redirect(ModUtil::url('Users', 'user', 'main'));\n }", "title": "" }, { "docid": "7e6ab6959b4d6ce50df2e9c11d4ce03f", "score": "0.6147784", "text": "public function isPasswordChanged()\n {\n return $this->_blPasswordChanged;\n }", "title": "" }, { "docid": "645ae165cfca197229d3e627f759693b", "score": "0.6142087", "text": "public function testCheckWhenChangePasswordDataIsCorrect()\n {\n $this->actingAs($this->user)\n ->visit('/user/change-password')\n ->type('pass', 'current_password')\n ->type('pass', 'new_password')\n ->type('pass', 'confirm_new_password')\n ->press('Save')\n ->see('Password changed.');\n }", "title": "" }, { "docid": "66ab6de0dc2a67bcf0a8c3d459851780", "score": "0.6141713", "text": "public function changePassword(array $params):WebfleetResponse;", "title": "" }, { "docid": "a113ebc50b3c0ebaa36d93cd863b86c2", "score": "0.6141663", "text": "public function new_password()\n\t{\n\t\t$this->load->model('users/m_users');\n\t\t$data['email'] \t\t\t\t= $this->input->get('e');\n\t\t$data['remember_token'] \t= $this->input->get('t');\n\t\t\n\t\t$user = $this->m_users->get_user_bytoken($data['email'], $data['remember_token']);\n\n\t\tif (!empty($user)) {\n\t\t\tparent::display_no_theme('confirm_reset_pass',$data);\n\t\t}\n\t\treturn;\n\t}", "title": "" }, { "docid": "116c6a263d48cda26d4e08cbf07c7a1e", "score": "0.6139698", "text": "public function userPasswordUpdate()\n {\n $password = Hash::make($this->request->input(\"new_password\"));\n $updateArray = [\n \"password\" => $password\n ];\n $whereArray = [\n [\"user_id\", '=', $this->request->input(\"user_id\")]\n ];\n $this->usersModel->setTableName(\"users\");\n $this->usersModel->setInsertUpdateData($updateArray);\n $this->usersModel->setWhere($whereArray);\n $this->usersModel->updateData();\n }", "title": "" }, { "docid": "0a9772c4dd6e3436e90bfa922e73ae44", "score": "0.6137314", "text": "public function editPasswordProcess() {\n\t\t$user = User::loadById($_GET['userid']);\n\n\t\tif ($user->get('password')==$_POST['oldpassword']) {\n\t\t\t$user->set('password',$_POST['password']);\n\t\t\t$user->save();\n\t\t\t$this->viewAccount();\n\t\t} else {\n\t\t\t$pageName = 'Edit Password';\n\n\t\t\tinclude_once SYSTEM_PATH.'/view/header.tpl';\n\n\t\t\techo '<h3 id=\"resign_text\" > Error: Your Current Password is incorrect </h3>\n\t\t\t\t\t\t<br><br>';\n\n\t\t\t$this->editPassword();\n\t\t}\n\t}", "title": "" }, { "docid": "50fe167a2693ac67b1b03bad74ae5422", "score": "0.6133216", "text": "function _init_change_password_details() {\n\t\t\n\t\t$this->old_password = $this->Common_model->safe_html($this->input->post(\"old_password\"));\n\t\t$this->new_password = $this->Common_model->safe_html($this->input->post(\"new_password\"));\n\t\t\n\t}", "title": "" }, { "docid": "1eb1859a7430833706b954422a3502eb", "score": "0.61315453", "text": "function changePassword($data) {\n\t\t$selPassword =\n\t\t\t\"UPDATE users\n\t\t\t\tSET password = \\\"\" . sha1($data['NewPassword'].SALT) . \"\\\" WHERE id = \" . $data['UserId'];\n\t\t$resPassword = $this->fireQuery($selPassword);\n\n\t\t// If everything goes well, return 1\n\t\tif ($resPassword) {\n\t\t\treturn 1;\n\t\t\n\t\t// Otherwise return 0\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "19206c5db129d413e73541bea091e4a7", "score": "0.6130473", "text": "private function _change_user_password(){\n\t\t\t$result_of_all_processing = array();\n\t\t\t\n\t\t\t//CHECK FOR OLD PASSWORD\n\t\t\tif( isset( $_POST[ $this->table_fields['oldpassword'] ] ) ){\n\t\t\t\t\n\t\t\t\tif( $_POST[ $this->table_fields['oldpassword'] ] ){\n\t\t\t\t\n\t\t\t\t\t//TEST OLD PASSWORD TO ENSURE IT MATCHES STORED PASSWORD\n\t\t\t\t\t$query = \"SELECT * FROM `\" . $this->class_settings['database_name'] . \"`.`\" . $this->table_name . \"` WHERE `\".$this->table_name.\"`.`id`='\" . $this->class_settings['user_id'] . \"' AND `\" . $this->table_name . \"`.`\".$this->table_fields['oldpassword'].\"`='\" . md5( $_POST[ $this->table_fields['oldpassword'] ] . get_websalter() ) . \"' AND `\" . $this->table_name . \"`.`record_status`='1' \";\n\t\t\t\t\t$query_settings = array(\n\t\t\t\t\t\t'database' => $this->class_settings['database_name'] ,\n\t\t\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t\t\t'query' => $query,\n\t\t\t\t\t\t'query_type' => 'SELECT',\n\t\t\t\t\t\t'set_memcache' => 1,\n\t\t\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t\t\t);\n\t\t\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\t\t\n\t\t\t\t\tif( isset( $sql_result[0] ) && is_array( $sql_result[0] ) && ! empty ( $sql_result[0] ) ){\n\t\t\t\t\t\t//DESTROY OLD PASSWORD FIELD\n\t\t\t\t\t\tunset( $_POST[ $this->table_fields['oldpassword'] ] );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$processing_status = $this->_save_changes();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( is_array( $processing_status ) && !empty( $processing_status ) ){\n\t\t\t\t\t\t\t$result_of_all_processing = $processing_status;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( isset( $result_of_all_processing['typ'] ) && $result_of_all_processing['typ'] == 'saved' ){\n\t\t\t\t\t\t\t\t//TRANSFORM SUCCESS MESSAGE\n\t\t\t\t\t\t\t\t$err = new cError(010008);\n\t\t\t\t\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\t\t\t\t$err->class_that_triggered_error = 'cSite_users.php';\n\t\t\t\t\t\t\t\t$err->method_in_class_that_triggered_error = '_change_user_password';\n\t\t\t\t\t\t\t\t$err->additional_details_of_error = 'successful password change';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$result_of_all_processing = $err->error();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//RETURN NON-MATCHING OLD PASSWORD ERROR\n\t\t\t\t$err = new cError(000103);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t$err->class_that_triggered_error = 'cSite_users.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_change_user_password';\n\t\t\t\t\n\t\t\t\tif( isset( $query ) && $query ){\n\t\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 138';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$result_of_all_processing = $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t//SET VARIABLES FOR EDIT MODE\n\t\t\t$_POST['id'] = $this->class_settings['user_id'];\n\t\t\t$_POST['mod'] = 'edit-'.md5( $this->table_name );\n\t\t\t\n\t\t\t//GENERATE REGISTRATION FORM WITH USER DETAILS\n\t\t\t//Disable appearance of all headings on forms\n\t\t\t$this->class_settings['do_not_show_headings'] = true;\n\t\t\t\t\n\t\t\t//Hide certain form fields\n\t\t\t$this->class_settings[ 'hidden_records' ] = array(\n\t\t\t\t'site_users001' => 1,\n\t\t\t\t'site_users002' => 1,\n\t\t\t\t'site_users006' => 1,\n\t\t\t\t'site_users007' => 1,\n\t\t\t\t'site_users008' => 1,\n\t\t\t\t'site_users009' => 1,\n\t\t\t\t'site_users010' => 1,\n\t\t\t\t'site_users011' => 1,\n\t\t\t\t'site_users012' => 1,\n\t\t\t\t'site_users013' => 1,\n\t\t\t\t'site_users014' => 1,\n\t\t\t\t'site_users015' => 1,\n\t\t\t\t'site_users016' => 1,\n\t\t\t\t'site_users017' => 1,\n\t\t\t\t'site_users018' => 1,\n\t\t\t\t'site_users019' => 1,\n\t\t\t\t'site_users020' => 1,\n\t\t\t\t'site_users021' => 1,\n\t\t\t);\n\t\t\t\n\t\t\t//Hide certain form fields\n\t\t\t$this->class_settings[ 'hidden_records_css' ] = array(\n\t\t\t\t'site_users016' => 1,\n\t\t\t);\n\t\t\t\n\t\t\t//Form button caption\n\t\t\t$this->class_settings[ 'form_submit_button' ] = 'Change Password';\n\t\t\t\n\t\t\t$returned_data = $this->_generate_new_data_capture_form();\n\t\t\t\n\t\t\tif( ! empty ( $result_of_all_processing ) && isset( $result_of_all_processing['html'] ) ){\n\t\t\t\t$result_of_all_processing['html'] = $returned_data['html'];\n\t\t\t\t\n\t\t\t\treturn $result_of_all_processing;\n\t\t\t}\n\t\t\t\n\t\t\treturn $returned_data;\n\t\t}", "title": "" }, { "docid": "f420d03a8fe5ff07fbd37871a3da9bce", "score": "0.6130166", "text": "public function testPasswordCanBeChanged()\n {\n $admin = factory(User::class)->states('admin')->create();\n $user = factory(User::class)->create();\n\n $response = $this->actingAs($admin)->put('users/'.$user->id, [\n 'email' => $user->email,\n 'name' => $user->name,\n 'password' => 'new-password',\n 'password_confirmation' => 'new-password',\n ]);\n\n $user->refresh();\n\n $response->assertRedirect();\n $this->assertTrue(Hash::check('new-password', $user->password));\n }", "title": "" }, { "docid": "96296d25bc0ca25e589b77b18c08cdf4", "score": "0.6120917", "text": "public function setExistingPassword($password);", "title": "" }, { "docid": "3a44c2c35e7b0bc2d7b9b537cf15709a", "score": "0.6117833", "text": "public function post_resetpassword()\n\t{\n $input = Input::all();\n\n $user = User::find(Auth::user()->userid);\n\n if (Hash::check($input['oldpassword'], $user->password) && $input['password'] == $input['repassword']) {\n $user->password = Hash::make($input['password']);\n $user->save();\n\n Log::write('User', 'Reset Password User '.$user->userprofile->icno);\n }\n }", "title": "" }, { "docid": "3399bb0c9557fbe758b4c2bd7558f696", "score": "0.6116568", "text": "private function changePassword($new_password){\n\t\t\t\t\n\t\t\t\t$this->updateValue('password',$new_password);\n\t\t\t\t\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "e7013162e6d72e143433459af7e6ebdd", "score": "0.6096451", "text": "public function changepasswordAction() {\n\t\ttry{\t\t\t\n\t\t\t$config = Zend_Registry::get('config');\n $this->view->reusepassword = $config->user->reusepassword;\n $this->view->title = Title_Change_password;\n \n\t\t\t$fields = $this->_getAllParams();\n\t\t\tif(isset($fields['signup']) && isset($fields['new_password'])) {\n\t\t\tif($this->users->savechangepassword($fields)){\n\t\t\t\t$this->_redirect('admin/index/logout');\n\t\t\t} else {\n\t\t\t\t//$this->_redirect('usermanagement/index/changepassword');\n\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch(Exception $e) {\n\t\t\tApplication_Model_Logging::lwrite($e->getMessage());\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "df4c929b6a0dc53bafa77a1903b448fe", "score": "0.60924625", "text": "function p_change_password()\n\t{\n\t\t$this->db->trans_start();\n\t\n\t\t//$data['p_password'] = md5($this->input->post('new_password'));\t\n\t\t$data['p_password'] = encrypt($this->input->post('new_password'));\t\n\t\t\n\t\t$this->db->where('pk',$this->session->userdata('userid'));\n\t\t$this->db->update('contact_list', $data);\n\t\t\n\t\tif ($this->db->trans_status() === FALSE)\n\t\t{\n\t\t\t$this->db->trans_rollback();\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->db->trans_commit();\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "ea1d0066acc900589581750938b1c737", "score": "0.60921496", "text": "public function changePassword()\n\t{\t\t\n\t\treturn view('changePassword');\n\t}", "title": "" }, { "docid": "fe9915cbdc5d91f885777a1fbc945808", "score": "0.60869867", "text": "public function testSetPassword()\n {\n $user = $this->testAddUser();\n\n $this->_backend->setPassword($user, Tinebase_Record_Abstract::generateUID());\n \n $testUser = $this->_backend->getUserById($user, 'Tinebase_Model_FullUser');\n \n $this->assertNotEquals($user->accountLastPasswordChange, $testUser->accountLastPasswordChange);\n }", "title": "" }, { "docid": "141db7b824a019bf69acc39ca925a44d", "score": "0.6078484", "text": "public function actionPasswordChange()\n {\n $passChange = new PasswordChange();\n\n if ($passChange->load(Yii::$app->request->post()) && $passChange->validate())\n {\n $user = User::findOne(Yii::$app->user->id);\n $user->setPassword(Yii::$app->request->post()['PasswordChange']['password_new']);\n if ($user->save())\n {\n Yii::$app->session->setFlash('success', \"ПАРОЛЬ ИЗМЕНЕН\");\n return $this->redirect(['change-password']);\n }\n }\n\n return $this->render('password-change', [\n 'model' => $passChange\n ]);\n }", "title": "" }, { "docid": "bad4fddac32aee4394f88d812dd5d031", "score": "0.6077149", "text": "public function changePassword()\n\t{\n\t\t$this->auth();\n\t\t$this->load->view('admin/change-password');\n\t}", "title": "" }, { "docid": "ad3dece02b9a30c99a3dee29ecf28902", "score": "0.60746044", "text": "function actionChangepwd() {\n if (!isset(Yii::app()->getSession()->get('wsuser')->id) && !isset(Yii::app()->getSession()->get('wsadvisor')->id)) {\n $this->sendResponse(200, CJSON::encode(array(\"status\" => \"ERROR\", \"message\" => \"Session Expired.\")));\n }\n\n $oldpassword = Yii::app()->request->getParam('oldpassword');\n $password1 = Yii::app()->request->getParam('password1');\n $password2 = Yii::app()->request->getParam('password2');\n\n if (!isset($oldpassword) || empty($oldpassword) || !isset($password1) || empty($password1) || !isset($password2) || empty($password2)) {\n $this->sendResponse(200, CJSON::encode(array('status' => 'ERROR', 'message' => 'Mandatory fields left blank.')));\n return;\n }\n\n /* Check that passwords match */\n if ($password1 != $password2) {\n $this->sendResponse(200, CJSON::encode(array(\"status\" => \"ERROR\", 'message' => 'The passwords you entered don\\'t match.')));\n }\n\n /* Check password requirements, including 8 or more characters, at least 1 number,\n * at least 1 symbol, at least upper and one lower case letter */\n $passwordErrorExists = false;\n if (preg_match('/\\s/', $password1 ) || strlen($password1) < 8) {\n $passwordErrorExists = true;\n }\n else if (!preg_match('@[a-z]@', $password1)) {\n $passwordErrorExists = true;\n }\n else if (!preg_match('@[A-Z]@', $password1)) {\n $passwordErrorExists = true;\n }\n else if (!preg_match('@[0-9]@', $password1)) {\n $passwordErrorExists = true;\n }\n else if (!preg_match('@[\\W]@', $password1)) {\n $passwordErrorExists = true;\n }\n if ($passwordErrorExists == true) {\n $this->sendResponse(200, CJSON::encode(array(\"status\" => \"ERROR\", 'message' => \"Passwords must be at least eight characters in length with no spaces and include at least one uppercase letter, lowercase letter, symbol, and number.\")));\n }\n\n // if the user is a Client\n if (Yii::app()->getSession()->get('wsadvisor')) {\n $advisorId = Yii::app()->getSession()->get('wsadvisor')->id;\n $advisorDetails = Advisor::model()->find(\"id=:advisor_id\", array(\"advisor_id\" => $advisorId));\n if ($advisorDetails) {\n $advisorModel = new Advisor();\n $advisorModel->email = $advisorDetails->email;\n $advisorModel->password = $oldpassword;\n $advisorModel->urole = Advisor::USER_IS_ADVISOR;\n if ($advisorModel->authenticateIdentity()) {\n if ($oldpassword == $password1) {\n $this->sendResponse(200, CJSON::encode(array(\"status\" => \"ERROR\", \"type\" => \"password1\", \"message\" => 'Please enter a password you haven\\'t previously <br /> used with this account.')));\n } else {\n $hasher = PasswordHasher::factory();\n $advisorDetails->password = $hasher->HashPassword($password1);\n $advisorDetails->save();\n unset($hasher);\n $this->sendResponse(200, CJSON::encode(array(\"status\" => \"OK\", \"success\" => 'Password was successfully changed.')));\n }\n } else {\n $this->sendResponse(200, CJSON::encode(array(\"status\" => \"ERROR\", 'message' => 'The password you entered is invalid.')));\n }\n } else {\n $this->sendResponse(200, CJSON::encode(array(\"status\" => \"ERROR\", 'message' => 'User does not exist.')));\n }\n } elseif (Yii::app()->getSession()->get('wsuser')) {\n $userId = Yii::app()->getSession()->get('wsuser')->id;\n $userDetails = User::model()->find(\"id=:user_id\", array(\"user_id\" => $userId));\n if ($userDetails) {\n $userModel = new User();\n $userModel->email = $userDetails->email;\n $userModel->password = $oldpassword;\n $userModel->urole = User::USER_IS_CONSUMER;\n if ($userModel->authenticateIdentity()) {\n if ($oldpassword == $password1) {\n $this->sendResponse(200, CJSON::encode(array(\"status\" => \"ERROR\", \"type\" => \"password1\", \"message\" => 'Please enter a password you haven\\'t previously <br /> used with this account.')));\n } else {\n $hasher = PasswordHasher::factory();\n $userDetails->password = $hasher->HashPassword($password1);\n $userDetails->save();\n unset($hasher);\n $this->sendResponse(200, CJSON::encode(array(\"status\" => \"OK\", \"success\" => 'Password was successfully changed.')));\n }\n } else {\n $this->sendResponse(200, CJSON::encode(array(\"status\" => \"ERROR\", 'message' => 'The password you entered is invalid.')));\n }\n } else {\n $this->sendResponse(200, CJSON::encode(array(\"status\" => \"ERROR\", 'message' => 'User does not exist.')));\n }\n // if the user is an Advisor\n } else {\n $this->sendResponse(200, CJSON::encode(array(\"status\" => \"ERROR\", \"message\" => 'Session Expired.')));\n }\n }", "title": "" }, { "docid": "af55464c427ae40304d0e64976feaed3", "score": "0.607394", "text": "public function setpasswordAction() {\n\t\ttry{\n\t\t\t\n\t\t\t$this->_helper->layout->setLayout($this->session->emptylayout);\n\t\t\t\n\t\t\t$config = Zend_Registry::get('config');\n\t\t\t\n $this->view->reusepassword = $config->user->reusepassword;\n\t\t\t$fields = $this->_getAllParams();\n\t\t\t\n\t\t\tif(isset($fields['signup']) && isset($fields['new_password'])) {\n\t\t\t\tif($this->users->savechangepassword($fields)){\n\t\t\t\t\t$this->_redirect('admin/index/logout');\n\t\t\t\t} else {\n\t\t\t\t\t//$this->_redirect('usermanagement/index/success');\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch(Exception $e) {\n\t\t\tApplication_Model_Logging::lwrite($e->getMessage());\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "f86dd6411e2e40a3802912678aa39c09", "score": "0.607103", "text": "public function admin_changePassword(){\r\n\t\t$this->layout='admin';\r\n\t\t$this->set(\"expand_menu_links\",\"admins\");\r\n\t\tApp::import('Model', 'User');\r\n\t\t$this->User = & new User();\r\n\t\t$adminId = $this->Session->read(\"AdminId\");\r\n\t\tif(!empty($this->data)){ \r\n\t\t // create hash string of old password\r\n\t\t\t$hashstring = $this->Common->CreateHashString(trim($this->data['User']['old_password']));\r\n\t\t\t// match enter old password with database password\r\n\t\t\t$userExists = $this->User->findById($adminId);\r\n\t\t\tif($hashstring == $userExists['User']['password']){\r\n\t\t\t\t// create hash string of new password\r\n\t\t\t\t$newpassword = $this->Common->CreateHashString(trim($this->data['User']['password']));\r\n\t\t\t\t$this->User->id = $adminId;\r\n\t\t\t\t$this->data['User']['password'] = $newpassword;\r\n\t\t\t\t$this->User->save($this->data);\r\n\t\t\t\t$this->Session->setFlash(PASWORD_CHANGE);\r\n\t\t\t\t$this->redirect(array('controller'=>'users','action'=>'home'));\r\n\t\t\t}else{\r\n\t\t\t\t$this->Session->setFlash(OLD_PASSWOD_NOT_MATCH);\r\n\t\t\t}\r\n\t\t }\r\n\t }", "title": "" }, { "docid": "4222c0ac47ef83f071ea110c6f72524d", "score": "0.60677063", "text": "public function requestNewPasswordAction() {\n $this->view->assign('title', 'Neues Passwort anfordern');\n $this->view->render();\n }", "title": "" }, { "docid": "cfa07e01fdfea8aa3a9e5a3c05bb1304", "score": "0.60666", "text": "private function newPasswordStage2()\n {\n if (!isset($_POST['userName'])) { // Check POST params\n return tr('page_error');\n }\n $username = strip_tags(trim($_POST['userName']));\n if (($user = User::fromUsernameFactory($username, User::AUTH_COLLUMS)) ||\n ($user = User::fromEmailFactory($username, User::AUTH_COLLUMS))) {\n if (! $user->isActive()) {\n return tr('newpw_err_notact');\n }\n UserAuthorization::sendPwCode($user);\n return null;\n } else {\n return tr('newpw_err_notusr');\n }\n return null;\n }", "title": "" }, { "docid": "5b7256e893b7df2ac86f771afe6964cf", "score": "0.6064888", "text": "function isPasswordChanged(&$acountInfo)\n {\n if ($acountInfo['password']!=$acountInfo['old_password'])\n {\n modApiFunc(\"Users\", \"setPasswordUpdate\");\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "e84bba6a4cdabf87b6dc955d11e5e2f1", "score": "0.60516876", "text": "public function updatePassword(){\n $r = Admin::find(1);\n $r->password=Hash::make('123');\n $r->save();\n }", "title": "" }, { "docid": "1a40b2814e9005bc5d5a604fdee57643", "score": "0.60440034", "text": "public function testPasswordAging()\n {\n verify('Check that the advanced directory exists', is_dir(Commons::ADVANCED_MIGRATIONS_DIR))->true();\n\n $files = scandir(Commons::ADVANCED_MIGRATIONS_DIR);\n $result = preg_grep('/'. self::ATTR_PASSWORD_CHANGED_AT .'/', $files);\n verify('Check that the migration exists', $result)->notEmpty();\n\n verify('Check that the field is added to the table (the migration is run)',\n (new User())->hasAttribute(self::ATTR_PASSWORD_CHANGED_AT))->true();\n\n // Behavior validations\n $behavior = Yii::$app->user->attachBehavior('passwordAging', 'nkostadinov\\user\\behaviors\\PasswordAgingBehavior');\n verify('Check that the behavior exists', $behavior)->notNull();\n\n verify('Check that passwordChangeInterval field exists', isset($behavior->passwordChangeInterval))->true();\n verify('Check that the default value of passwordChangeInterval is set to two months (in seconds)',\n $behavior->passwordChangeInterval)->equals(60 * 60 * 24 * 30 * 2);\n\n // Create one user\n $identity = Commons::createUser();\n verify('Asure that the password_changed_at field is empty', $identity->password_changed_at)->null();\n\n // Login for a first time\n Yii::$app->user->login($identity);\n verify('After the first login, the password_changed_at field must be automaticaly set', $identity->password_changed_at)->notNull();\n Yii::$app->user->logout();\n \n // Set the password_changed_at value to a value older than two months\n $identity->setAttribute(self::ATTR_PASSWORD_CHANGED_AT, strtotime('-3 months'));\n $identity->save('false');\n\n verify('The login is unsuccessful', Yii::$app->user->login($identity))->false();\n\n // Now set the value of password_changed_at field to 1 month\n $identity->setAttribute(self::ATTR_PASSWORD_CHANGED_AT, strtotime('-1 month'));\n $identity->save('false');\n\n verify('The login is successful', Yii::$app->user->login($identity))->true();\n }", "title": "" }, { "docid": "cc459f3feb1a5e54d85ef7f15a9a6107", "score": "0.60358137", "text": "public function addAction()\n {\n $password = new Password();\n /*change to your favorite login_name and passord*/\n //$password->login_name = \"adminuser\";// should be [a-zA-Z0-9] ('min' => 4, 'max' => 20)\n //$password->password = \"adminpassword\";// should be [a-zA-Z0-9] ('min' => 8, 'max' => 16)\n $this->getPasswordTable()->savePassword( $password );\n }", "title": "" }, { "docid": "ae962296fbcde4b51c1689d05d73383d", "score": "0.6034764", "text": "public function pwdchange()\n {\n\n try\n {\n\n $form =new UserPwdChangeForm($this->request->getPost());\n\n\n if($this->request->hasPost()) {\n $this->pwdChangeAfterPost($form);\n }\n\n $this->pwdChangeView($form);\n }\n catch(\\InvalidArgumentException $e)\n {\n $this->errorCatchView($e->getMessage(),true);\n\n }\n\n }", "title": "" }, { "docid": "0759d2f8558e11c95a7718998b7f32a9", "score": "0.60326", "text": "public function actionChangePassword() {\n $model = new ChangePasswordForm();\n #Yii::log('POST CHANGES '.print_r($_POST,true));\n if (array_key_exists('yt0', $_POST) && $_POST['yt0'] == \"Change Password?\") {\n $model->attributes = $_POST['ChangePasswordForm'];\n if ($model->validate()) {\n $model->unsetAttributes();\n $model->msg = \"Password updated successfully.\";\n }\n }\n $this->render('changePassword', array('model' => $model));\n }", "title": "" }, { "docid": "4ea17e42303624bd0e2d6df1eb5601aa", "score": "0.6032184", "text": "function change_pass($content,$conf)\t{\n\t\t$this->conf=$conf;\n\t\t$this->pi_setPiVarDefaults();\n\t\t$this->pi_loadLL();\n\n\t\t#$param = t3lib_div::_POST('mmf-pw');\n\n\t\t// Check parameters\n\t\tif (isset($this->piVars['newpass1']) OR isset($this->piVars['newpass2']) OR isset($this->piVars['oldpass'])) {\n\t\t\t$error = 0;\n\n\t\t\t// Old password is not set\n\t\t\tif (empty($this->piVars['oldpass'])) {\n\t\t\t\t$error = 1;\n\t\t\t\t$errormessage .= $this->pi_getLL('errorInsertOldPw');\n\t\t\t}\n\t\t\t// New password is not set\n\t\t\tif (empty($this->piVars['newpass1'])) {\n\t\t\t\t$error = 1;\n\t\t\t\t$errormessage .= $this->pi_getLL('errorInsertNewPw');\n\t\t\t}\n\t\t\t// New password is not repeated\n\t\t\tif (empty($this->piVars['newpass2'])) {\n\t\t\t\t$error = 1;\n\t\t\t\t$errormessage .= $this->pi_getLL('errorInsertNewPw2');\n\t\t\t}\n\t\t\t// New password is not repeated correctly\n\t\t\tif (($this->piVars['newpass1'] AND $this->piVars['newpass2']) AND ($this->piVars['newpass1'] <> $this->piVars['newpass2'])) {\n\t\t\t\t$error = 1;\n\t\t\t\t$errormessage .= $this->pi_getLL('errorNewPwRepeat');\n\t\t\t}\n\t\t\t// Old password is not correct\n\t\t\telse {\n\t\t\t\t$saltedSv = null;\n \t\t\t\tif (t3lib_extMgm::isLoaded('t3sec_saltedpw')) {\n\t\t\t\t\trequire_once(t3lib_extMgm::extPath('t3sec_saltedpw', 'sv1/class.tx_t3secsaltedpw_sv1.php'));\n\t\t\t\t\tif (tx_t3secsaltedpw_div::isUsageEnabled()) {\n\t\t\t\t\t\t$saltedSv = t3lib_div::makeInstance('tx_t3secsaltedpw_sv1');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!$saltedSv && t3lib_extMgm::isLoaded('saltedpasswords')) {\n\t\t\t\t\tif (tx_saltedpasswords_div::isUsageEnabled()) {\n\t\t\t\t\t\t$saltedSv = t3lib_div::makeInstance('tx_saltedpasswords_sv1');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($saltedSv) {\n\t\t\t\t\t$saltedSv->init();\n\t\t\t\t\tif (!$saltedSv->compareUident($GLOBALS['TSFE']->fe_user->user, array('uident_text' => $this->piVars['oldpass']))) {\n\t\t\t\t\t\t$error = 1;\n\t\t\t\t\t\t$errormessage .= $this->pi_getLL('errorOldPw');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif(t3lib_extMgm::isLoaded('kb_md5fepw')) {\n\t\t\t\t\t\t$this->piVars['oldpass'] = md5($this->piVars['oldpass']);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($this->piVars['oldpass'] <> $GLOBALS['TSFE']->fe_user->user['password']) {\n\t\t\t\t\t\tif (md5($this->piVars['oldpass']) <> $GLOBALS['TSFE']->fe_user->user['tx_mmforum_md5']) {\n\t\t\t\t\t\t\t$error = 1;\n\t\t\t\t\t\t\t$errormessage .= $this->pi_getLL('errorOldPw');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Password too short\n\t\t\tif (($this->piVars['newpass1'] == $this->piVars['newpass2']) AND (strlen($this->piVars['newpass1']) < $conf['minPasswordLength']) AND (strlen($this->piVars['newpass2']) < $conf['minPasswordLength'])) {\n\t\t\t\t$error = 1;\n\t\t\t\t$errormessage .= sprintf($this->pi_getLL('errorPwLength'),$conf['minPasswordLength']);\n\t\t\t}\n\n\t\t\t// Save new password to database\n\t\t\tif ($error == 0) {\n\t\t\t\t$where = 'uid = '.$GLOBALS['TSFE']->fe_user->user['uid'];\n\t\t\t\t$val = Array(\n\t\t\t\t\t'password' => $this->piVars['newpass1'],\n\t\t\t\t\t'tx_mmforum_md5' => md5($this->piVars['newpass1'])\n\t\t\t\t);\n\n\t\t\t\t$objPHPass = null;\n\t\t\t\tif (t3lib_extMgm::isLoaded('t3sec_saltedpw')) {\n\t\t\t\t\trequire_once(t3lib_extMgm::extPath('t3sec_saltedpw').'res/staticlib/class.tx_t3secsaltedpw_div.php');\n\t\t\t\t\tif (tx_t3secsaltedpw_div::isUsageEnabled()) {\n\t\t\t\t\t\trequire_once(t3lib_extMgm::extPath('t3sec_saltedpw').'res/lib/class.tx_t3secsaltedpw_phpass.php');\n\t\t\t\t\t\t$objPHPass = t3lib_div::makeInstance('tx_t3secsaltedpw_phpass');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!$objPHPass && t3lib_extMgm::isLoaded('saltedpasswords')) {\n\t\t\t\t\tif (tx_saltedpasswords_div::isUsageEnabled()) {\n\t\t\t\t\t\t$objPHPass = t3lib_div::makeInstance(tx_saltedpasswords_div::getDefaultSaltingHashingMethod());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ($objPHPass) {\n\t\t\t\t\t$val['password'] = $objPHPass->getHashedPassword($val['password']);\n\n\t\t\t\t} else if(t3lib_extMgm::isLoaded('kb_md5fepw')) {\t//if kb_md5fepw is installed, crypt password\n\t\t\t\t\t$val['password']=md5($val['password']);\n\t\t\t\t}\n\n\t\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery('fe_users',$where,$val);\n\n\t\t\t\t$errormessage .= $this->pi_getLL('pwChanged');\n\t\t\t}\n\t\t}\n\n\t\t$marker['###ERROR_MSG###'] = $errormessage;\n\t\t$template = $this->cObj->fileResource($conf['template']);\n\t\t$template = $this->cObj->getSubpart($template, \"###ERROR###\");\n\n\t\t$content .= $this->cObj->substituteMarkerArrayCached($template, $marker);\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "b23efb0bb123805c14373e823e668fad", "score": "0.602989", "text": "public function checkPassAction()\n {\n $passOld = isset($_POST['passOld']) ? $_POST['passOld'] : NULL;\n\n $settings = new SettingsData();\n $passOldFromDB = $settings->getPassword();\n\n if (password_verify($passOld, $passOldFromDB[0][0])) {\n echo 'poprawne';\n } else {\n echo 'niepoprawne';\n }\n }", "title": "" }, { "docid": "0f21ce408d763ba5e72448a02c04d444", "score": "0.601906", "text": "static public function save_password() {\n \n extract(doArray(array(\n 'old_pass' => ps('mck_password_old'),\n 'new_pass' => ps('mck_password_new'),\n 'confirm_pass' => ps('mck_password_confirm'),\n 'token' => ps('mck_login_token'),\n 'form' => ps('mck_password_form'),\n ), 'trim'));\n \n if(!$form || mck_login(true) === false)\n return false;\n \n self::$action = 'password';\n \n callback_event('mck_login.save_password');\n \n if(self::error())\n return false;\n \n if(!$old_pass || !$new_pass || !$confirm_pass) {\n self::error('all_fields_required');\n return false;\n }\n \n if($token != mck_login_token()) {\n self::error('invalid_csrf_token');\n return false;\n }\n \n $length = function_exists('mb_strlen') ? \n mb_strlen($new_pass, 'UTF-8') : strlen($new_pass);\n \n if(6 > $length)\n self::error('password_too_short');\n \n if($new_pass !== $old_pass)\n self::error('passwords_do_not_match');\n \n $name = mck_login(array('name' => 'name'));\n \n include_once txpath . '/include/txp_auth.php';\n \n if(txp_validate($name, $old_pass, false) === false) {\n self::error('old_password_incorrect');\n sleep(3);\n }\n \n if(self::error())\n return false;\n \n $hash = txp_hash_password($new_pass);\n \n if(\n safe_update(\n 'txp_users',\n \"pass='\".doSlash($hash).\"'\",\n \"name='\".doSlash($name).\"'\"\n ) === false\n ) {\n self::error('saving_failed');\n return false;\n }\n \n callback_event('mck_login.password_saved');\n }", "title": "" }, { "docid": "6e4b904516e3b3f693ea72557a55a758", "score": "0.6012088", "text": "public function setNotificationChangePassword()\n\t\t{\n\t\t\t$this->load->database();\n\t\t\t$query = $this->db->query\n\t\t\t(\"\n\t\t\t\tINSERT INTO notifikasi (Nama, TahunLulus, Lembaga, LinkFoto, User, Notifikasi, Waktu, Tanggal)\n\t\t\t\tSELECT alumni.NamaLengkap, alumni.TahunLulus, alumni.Lembaga, alumni.LinkFoto, 'Alumni' ,'Telah Ganti Password', NOW(), NOW() \n\t\t\t\tFROM alumni\n\t\t\t\tWHERE alumni.Username='$this->Username'\n\t\t\t\t\");\n\t\t\t$this->db->close();\n\t\t\treturn $query;\n\t\t}", "title": "" }, { "docid": "ab48feef25d41a96aaeaa2a06372d63e", "score": "0.601182", "text": "public function changePassword ($userID, $password);", "title": "" }, { "docid": "52bdff07d71bf8f9bdda42508c225832", "score": "0.60091054", "text": "public function checkExistingPassword(UserInterface $account_unchanged);", "title": "" }, { "docid": "b5ca08074f77ddd17965a5dba4c7063a", "score": "0.60034156", "text": "function custom_user_password_update_callback($uid, $pass, $old_pass) {\n module_load_include('inc', 'custom', 'includes/custom.user');\n return custom_user_password_update($uid, $pass, $old_pass);\n}", "title": "" }, { "docid": "e2aab0168623d9424cc4cf461fc19837", "score": "0.5991163", "text": "protected function markChangedDataInRegistry() {\n\t\tif ($this->dataWasChanged); {\n\t\t\t/** @var $registry t3lib_Registry */\n\t\t\t$registry = t3lib_div::makeInstance('t3lib_Registry');\n\t\t\t$registry->set('tx_caretaker_password_cracker', 'changedPasswordData', TRUE);\n\t\t}\n\t}", "title": "" }, { "docid": "cdd1cf13527e890fd3189a8b06b13626", "score": "0.5979914", "text": "public function testChangePasswordWithShortPassword ()\r\n\t{\r\n\r\n\t\t$username = 'john';\r\n\t\t$newPassword = 'N3wpa'; // N3wpass!9 changed to N3wpa\r\n\r\n\t\t$this->db->expects($this->never())->method('update');\r\n\r\n\t\tChangePassword ($this->db, $username, $newPassword);\r\n\t}", "title": "" }, { "docid": "e4cf71b0e22394cb96b83e2a5802f19a", "score": "0.5971207", "text": "function passwordAction() {\n $q = $this->q;\n $_token = defaultHelper::page_hash_get('api,user,list');\n if ($q['_token'] == $_token && $q['id']) {\n _factory('sitemin_api_model_user')->setpassword($q);\n }\n die('done');\n }", "title": "" }, { "docid": "c9587a32dc8bbacc025f5a5ce978f30c", "score": "0.59679276", "text": "public function changePassword() {\n if ($this->request->is(array('post', 'put'))) {\n if ($this->User->save($this->request->data)) {\n $this->setFlash('Password changed Successfully.', AppController::$SUCCESS);\n return $this->redirect(array('action' => 'index'));\n } else {\n $this->setFlash(AppController::$errorMessage, AppController::$DANGER);\n }\n } else {\n $options = array('conditions' => array('User.' . $this->User->primaryKey => $this->Auth->user('id')));\n $this->request->data = $this->User->find('first', $options);\n //removing existing password from request, not to be displayed on UI\n $this->request->data['User']['secret'] = '';\n }\n }", "title": "" }, { "docid": "58ef28fcf08903cf9d016bb6a1deffa1", "score": "0.59591615", "text": "public function change_password() {\n $data['parent'] = \"Password\";\n $data['title'] = \"Password\";\n $this->form_validation->set_rules('old', $this->lang->line('change_password_validation_old_password_label'), 'required');\n $this->form_validation->set_rules('new', $this->lang->line('change_password_validation_new_password_label'), 'required|min_length[6]|max_length[12]');\n $this->form_validation->set_rules('new_confirm', $this->lang->line('change_password_validation_new_password_confirm_label'), 'required|matches[new]');\n\n if ($this->form_validation->run() == false) {\n $this->template->load('default', 'auth/changepassword', $data);\n } else {\n if ($this->session->userdata('id') != '' && $this->session->userdata('role') == 'admin') {\n $results = $this->Common_model->getsingle(ADMIN, array('password' => md5($this->input->post('old'))));\n } else if($this->session->userdata('id') != '' && $this->session->userdata('role') == 'agent'){\n $results = $this->Common_model->getsingle(AGENTS, array('password' => md5($this->input->post('old'))));\n }else if($this->session->userdata('id') != '' && $this->session->userdata('role') == 'store'){\n $results = $this->Common_model->getsingle(STORE, array('password' => md5($this->input->post('old'))));\n }\n if (empty($results)) {\n $this->session->set_flashdata('error', lang('password_change_invalid_old'));\n redirect('admin/changepassword');\n }\n $pswdArr = array('password' => md5($this->input->post('new')));\n $where = array('id' => $this->session->userdata(\"id\"));\n if ($this->session->userdata('id') != '' && $this->session->userdata('role') == 'admin') {\n if ($this->Common_model->updateFields(ADMIN, $pswdArr, $where)) {\n $this->session->set_flashdata('success', lang('password_change_successful'));\n redirect('admin/changepassword');\n } else {\n $this->session->set_flashdata('error', lang('password_change_unsuccessful'));\n redirect('admin/changepassword');\n }\n } else if($this->session->userdata('id') != '' && $this->session->userdata('role') == 'agent') {\n if ($this->Common_model->updateFields(AGENTS, $pswdArr, array('id' => $this->session->userdata('id')))) {\n $this->session->set_flashdata('success', lang('password_change_successful'));\n redirect('admin/changepassword');\n } else {\n $this->session->set_flashdata('error', lang('password_change_unsuccessful'));\n redirect('admin/changepassword');\n }\n }else if($this->session->userdata('id') != '' && $this->session->userdata('role') == 'store'){\n if ($this->Common_model->updateFields(AGENTS, $pswdArr, array('id' => $this->session->userdata('id')))) {\n $this->session->set_flashdata('success', lang('password_change_successful'));\n redirect('admin/changepassword');\n } else {\n $this->session->set_flashdata('error', lang('password_change_unsuccessful'));\n redirect('admin/changepassword');\n }\n }\n }\n }", "title": "" }, { "docid": "4dd5f5deb4adaaef4c78f0f5e6df6cb1", "score": "0.5958093", "text": "function oci_password_change ($connection, $username, $old_password, $new_password) {}", "title": "" }, { "docid": "4d8b511b35faf3f935c0ad8ca7af78e0", "score": "0.5954493", "text": "public function testPasswordChanges()\n {\n $passwordsHistory = [];\n //user already created from setUp's method\n\n $numPasswordChangesBeforeRepeat = UserPasswordChange::MAX_PASSWORD_CHANGES_BEFORE_REUSE;\n $previousPassword = $this->valid_test_password;\n $passwordsHistory[] = $previousPassword;\n $user = new User();\n\n //use a wrong password\n try {\n $user->changePassword($this->valid_test_email, 'incorrect', User::generateRandomPassword());\n $this->fail(\"Password changed successfully even when previous password was wrong\");\n } catch (Exception $e) {\n $this->assertInstanceOf('UserAuth\\Exceptions\\PasswordChangeException', $e);\n }\n\n $i = 1;\n while ($numPasswordChangesBeforeRepeat > 1) {\n $newPassword = User::generateRandomPassword();\n $i++;\n $response = $user->changePassword($this->valid_test_email, $previousPassword, $newPassword);\n //just to ensure seconds value for timestamp is different\n sleep(1);\n //check that password change was successful\n $this->assertTrue($response);\n\n //attempt to login with new password\n $response = $user->authenticate($this->valid_test_email, $newPassword);\n $this->assertNotEmpty($response);\n\n //Set new password to previous password\n $previousPassword = $newPassword;\n $passwordsHistory[] = $previousPassword;\n $numPasswordChangesBeforeRepeat--;\n }\n\n //at this point password change should fail if we use any of the last $max passwords\n foreach ($passwordsHistory as $newPassword) {\n try {\n $user->changePassword($this->valid_test_email, $previousPassword, $newPassword);\n $this->fail(\"Password changed successfully even when a previously used password {$newPassword} was used\");\n } catch (Exception $e) {\n $this->assertInstanceOf('UserAuth\\Exceptions\\PasswordChangeException', $e);\n }\n }\n\n //Change password one more time , then use the first used password and all should go well\n $newPassword = User::generateRandomPassword();\n $response = $user->changePassword($this->valid_test_email, $previousPassword, $newPassword);\n $this->assertTrue($response);\n\n $response = $user->authenticate($this->valid_test_email, $newPassword);\n $this->assertNotEmpty($response);\n\n $previousPassword = $newPassword;\n $newPassword = $passwordsHistory[0];\n $response = $user->changePassword($this->valid_test_email, $previousPassword, $newPassword);\n $this->assertTrue($response);\n\n $response = $user->authenticate($this->valid_test_email, $newPassword);\n $this->assertNotEmpty($response);\n\n //finally , try to change the password of a user that has an inactive account\n try {\n $user->changePassword($this->valid_test_email_2, $this->valid_test_password, User::generateRandomPassword());\n $this->fail(\"Password changed successfully even when it is an inactive account\");\n } catch (Exception $e) {\n $this->assertInstanceOf('UserAuth\\Exceptions\\UserAuthenticationException', $e);\n }\n }", "title": "" }, { "docid": "418a9d3b05f38fab21ae30e86a38db13", "score": "0.5937013", "text": "public function modifyAccount(){\r\n // get all user's infos \r\n $user = $this->model->getUserInfos($_SESSION[\"user_password\"], $_SESSION[\"id\"]);\r\n $userPass = $user[0]->user_password;\r\n\r\n // if user click on the submit btn \r\n if(isset($_POST['submitCurrentPassword'])){\r\n $passwordTried = $_POST['currentPassword'];\r\n $encryptedPasswordTried = md5($passwordTried);\r\n // if user write the correct password \r\n if($encryptedPasswordTried == $userPass){\r\n require ROOT.\"/App/View/ProfilView.php\";\r\n // if the two password are different\r\n }else{\r\n echo('Password incorrect');\r\n }\r\n }\r\n\r\n\r\n // user update his personnal informations\r\n if(isset($_POST['submitProfilChanges'])){\r\n $newUserName = htmlspecialchars($_POST['newUsername']);\r\n $newUserPassword = md5($_POST['newPassword']);\r\n $confirmedNewUserPassword = md5($_POST['newPasswordConfirmed']);\r\n // if user write a new username \r\n if(!empty($newUserName)){\r\n // if user write a new password \r\n if(!empty($_POST['newPassword'])){\r\n // if the confirmed password macth with the password \r\n if($newUserPassword == $confirmedNewUserPassword){\r\n $userUpt = $this->model->updateUserInfos($newUserName, $newUserPassword, $_SESSION['user_password'], $_SESSION['id']);\r\n header(\"Location: ../public/index.php?page=MyPolls\");\r\n }else{\r\n echo('Les deux mots de passe sont différents');\r\n }\r\n }else{\r\n echo('Merci de choisir un nouveau password');\r\n }\r\n }else{\r\n echo('Merci de choisir un nouveau username');\r\n }\r\n }\r\n require ROOT.\"/App/View/ProfilSecurityView.php\";\r\n\r\n }", "title": "" }, { "docid": "6bdb0361b402f0cc7fc8664d1a0e9740", "score": "0.5931117", "text": "public function edit_user_password()\n {\n $this->timeControl();\n $new_password = password_hash($this->input->post(\"new_password\"), PASSWORD_DEFAULT);\n\n $query = $this->user_data->get_user_details($_SESSION['username']);\n if ($new_password != $query['password']) {\n $this->user_data->change_password($_SESSION['username'], $new_password);\n session_destroy();\n $this->load->view('message/success_change_password');\n } else {\n $this->load->view('message/failure_edit_password');\n }\n\n\n }", "title": "" }, { "docid": "a4efd24cd7cde78c1ea5d2c049edf090", "score": "0.59300476", "text": "public function changePassword(NewPasswordRequest $request){\n $authenticatedUser = Auth::guard('sanctum')->user();\n // take instance from user to handle with property of password inside it\n $user = User::find($authenticatedUser->id);\n // check if new password equal old password\n if(Hash::check($request->password, $user->password)){\n return $this->returnErrorMessage('You Have Entered Your Old Password');\n }\n $user->password = Hash::make($request->password);\n $user->save(); // save new password in db\n $user->token = $request->header('Authorization');\n return $this->returnData(compact('user'),'password changed successfully');\n }", "title": "" }, { "docid": "bd6b68b1b6232bc9abb4de983493977d", "score": "0.5929944", "text": "public function changepassword()\n {\n $request = $this->getRequest();\n\n // Extract the member from the URL.\n /** @var Member $member */\n $member = null;\n if ($request->getVar('m') !== null) {\n $member = Member::get()->filter(['ID' => (int)$request->getVar('m')])->first();\n }\n $token = $request->getVar('t');\n\n // Check whether we are merely changing password, or resetting.\n if ($token !== null && $member && $member->validateAutoLoginToken($token)) {\n $this->setSessionToken($member, $token);\n\n // Redirect to myself, but without the hash in the URL\n return $this->redirect($this->link);\n }\n\n $session = $this->getRequest()->getSession();\n if ($session->get('AutoLoginHash')) {\n $message = DBField::create_field(\n 'HTMLFragment',\n '<p>' . _t(\n 'SilverStripe\\\\Security\\\\Security.ENTERNEWPASSWORD',\n 'Please enter a new password.'\n ) . '</p>'\n );\n\n // Subsequent request after the \"first load with hash\" (see previous if clause).\n return [\n 'Content' => $message,\n 'Form' => $this->changePasswordForm()\n ];\n }\n\n if (Security::getCurrentUser()) {\n // Logged in user requested a password change form.\n $message = DBField::create_field(\n 'HTMLFragment',\n '<p>' . _t(\n 'SilverStripe\\\\Security\\\\Security.CHANGEPASSWORDBELOW',\n 'You can change your password below.'\n ) . '</p>'\n );\n\n return [\n 'Content' => $message,\n 'Form' => $this->changePasswordForm()\n ];\n }\n // Show a friendly message saying the login token has expired\n if ($token !== null && $member && !$member->validateAutoLoginToken($token)) {\n $message = DBField::create_field(\n 'HTMLFragment',\n _t(\n 'SilverStripe\\\\Security\\\\Security.NOTERESETLINKINVALID',\n '<p>The password reset link is invalid or expired.</p>'\n . '<p>You can request a new one <a href=\"{link1}\">here</a> or change your password after'\n . ' you <a href=\"{link2}\">log in</a>.</p>',\n [\n 'link1' => Security::lost_password_url(),\n 'link2' => Security::login_url(),\n ]\n )\n );\n\n return [\n 'Content' => $message,\n ];\n }\n\n // Someone attempted to go to changepassword without token or being logged in\n return Security::permissionFailure(\n Controller::curr(),\n _t(\n 'SilverStripe\\\\Security\\\\Security.ERRORPASSWORDPERMISSION',\n 'You must be logged in in order to change your password!'\n )\n );\n }", "title": "" }, { "docid": "362e02c3ce7ef05ae5ef68ddea983907", "score": "0.5928178", "text": "public function changePassword()\n {\n if (!oxRegistry::getSession()->checkSessionChallenge()) {\n return;\n }\n\n $oUser = $this->getUser();\n if (!$oUser) {\n return;\n }\n\n $sOldPass = oxRegistry::getConfig()->getRequestParameter('password_old', true);\n $sNewPass = oxRegistry::getConfig()->getRequestParameter('password_new', true);\n $sConfPass = oxRegistry::getConfig()->getRequestParameter('password_new_confirm', true);\n\n /** @var oxInputValidator $oInputValidator */\n $oInputValidator = oxRegistry::get('oxInputValidator');\n if (($oExcp = $oInputValidator->checkPassword($oUser, $sNewPass, $sConfPass, true))) {\n switch ($oExcp->getMessage()) {\n case 'ERROR_MESSAGE_INPUT_EMPTYPASS':\n case 'ERROR_MESSAGE_PASSWORD_TOO_SHORT':\n return oxRegistry::get(\"oxUtilsView\")->addErrorToDisplay(\n 'ERROR_MESSAGE_PASSWORD_TOO_SHORT',\n false,\n true\n );\n default:\n return oxRegistry::get(\"oxUtilsView\")->addErrorToDisplay(\n 'ERROR_MESSAGE_PASSWORD_DO_NOT_MATCH',\n false,\n true\n );\n }\n }\n\n if (!$sOldPass || !$oUser->isSamePassword($sOldPass)) {\n /** @var oxUtilsView $oUtilsView */\n $oUtilsView = oxRegistry::get(\"oxUtilsView\");\n\n return $oUtilsView->addErrorToDisplay('ERROR_MESSAGE_CURRENT_PASSWORD_INVALID', false, true);\n }\n\n // testing passed - changing password\n $oUser->setPassword($sNewPass);\n if ($oUser->save()) {\n $this->_blPasswordChanged = true;\n // deleting user autologin cookies.\n oxRegistry::get(\"oxUtilsServer\")->deleteUserCookie($this->getConfig()->getShopId());\n }\n }", "title": "" }, { "docid": "17fd7194d265973ff817167fb8d76bed", "score": "0.5923152", "text": "public function update()\n\t{\n\t\t$this->_user->password = $this->_encrypter->encrypt($this->newpassword);\n\t\t$this->_user->save();\n\t}", "title": "" }, { "docid": "7fc7242ef6e18fa8656fea39b8f5d40d", "score": "0.5918091", "text": "function changePwdState($changeUser)\n{\n $newpassw = substr(md5(rand()),0,6);\n $hash = password_hash($newpassw, PASSWORD_DEFAULT);\n execute(\"UPDATE users SET firstconnect= :firstconnect, password = :hash WHERE id= :id\", ['firstconnect' => 1, 'id' => $changeUser, 'hash' => $hash]);\n return $newpassw;\n}", "title": "" }, { "docid": "869d2c163eb0616640ead42ec3aa202b", "score": "0.591716", "text": "function ChangePassword($usuario,$oldpass,$newpass)\r\n {\r\n $verificar = SegUsuario::verificarpass($usuario);\r\n if($verificar[0]->contrasenna == $oldpass)\r\n {\r\n if($this->verificarpass($newpass))\r\n {\r\n $objusuario = Doctrine::getTable('SegUsuario')->find($verificar[0]->idusuario);\r\n $objusuario->contrasenna = $newpass;\r\n $objusuario->contrasenabd = $newpass;\r\n $objusuario->save();\r\n return 1;\r\n }\r\n }\r\n else\r\n return 0;\r\n }", "title": "" }, { "docid": "a783cd87937fc25d7d9d2597fc74fc84", "score": "0.591437", "text": "public function changePasswordAction()\n {\n $form = new \\Shop\\Forms\\ChangePasswordForm();\n\n if ($this->request->isPost()) {\n\n if (!$form->isValid($this->request->getPost())) {\n\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n } else {\n\n $user = $this->auth->getUser();\n\n $user->password = $this->security->hash($this->request->getPost('password'));\n $user->mustChangePassword = 'N';\n\n $passwordChange = new \\Shop\\Models\\PasswordChanges();\n $passwordChange->user = $user;\n $passwordChange->ipAddress = $this->request->getClientAddress();\n $passwordChange->userAgent = $this->request->getUserAgent();\n\n if (!$passwordChange->save()) {\n $this->flash->error($passwordChange->getMessages());\n } else {\n\n $this->flashSession->success('Пароль был успешно изменен.');\n\n $this->tag->resetInput();\n return $this->response->redirect(\"profile/index\");\n }\n\n }\n\n }\n\n $this->view->form = $form;\n $this->view->auth = $this->identity;\n $this->view->breadcrumbs = array('Общая информация' => '/profile/index', 'Сменить пароль');\n }", "title": "" }, { "docid": "a5a96a05e6bc5fbfe06eecab05645df9", "score": "0.5901471", "text": "public function changedPW($name,$pw){\n $db=$this->dbConnect();\n $req=$db->prepare('UPDATE Passwordtable SET passwords=? where logins=?');\n $req->execute(array($pw,$name));\n $message='le mot de passe a bien été modifié';\n return $message;\n }", "title": "" }, { "docid": "ba87e274c1e9f91393342b2f663c9e85", "score": "0.5901151", "text": "public function passwordAction() {\n\t\t$this->view->changeMessage = \"\";\n\t\t$passForm = new My_Form_AccountPassword ();\n\t\t$this->view->passForm = $passForm;\n\t\t$request = $this->getRequest ();\n\t\tif ($request->isPost ()) {\n\t\t\tif ($passForm->isValid ( $_POST )) {\n\t\t\t\t$data = $passForm->getValues ();\n\t\t\t\t$id = $this->identity->id;\n\t\t\t\t$salt = $this->identity->salt;\n\t\t\t\t$user = new Common_Model_DbTable_User ();\n\t\t\t\tif (! $user->validatePass ( $id, $salt, $data ['password1'] )) {\n\t\t\t\t\t$this->view->changeMessage = \"密码错误鸟~\";\n\t\t\t\t} else {\n\t\t\t\t\t$user->updatePass ( $id, $salt, $data ['password2'] );\n\t\t\t\t\t$this->view->changeMessage = \"密码修改成功鸟~\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8f97ad49e947a92a88802ebe09124bc8", "score": "0.58976257", "text": "public function edit_pass()\n\t{\n\t\t$this->_auth_verification();\n\n\t\t$data['page'] = \"change_password_v\";\n\t\t$this->load->view('template/template', $data);\n\t}", "title": "" }, { "docid": "6c88fbb7d37e1cc4524958a38c3c7434", "score": "0.58955306", "text": "private function _wpResetPassword() {\n $db = $this->_getDBConnection();\n $password = $this->getNewPassword();\n $query = \"UPDATE wp_users SET user_pass = MD5('\" . $password . \"') WHERE user_login ='\" . $this->SITE_CONFIG[ 'wp_users' ][ 'user_login' ] . \"' LIMIT 1\";\n $result = $db->exec( $query );\n\n $this->SITE_CONFIG[ 'wp_users' ][ 'user_pass' ] = $password;\n }", "title": "" }, { "docid": "733c0dbf6d52549cf797f20efaf53739", "score": "0.58950984", "text": "public function changePassword(){\n $params = array(\n 'id' => 'update-password-form',\n 'fieldsets' => array(\n 'form' => array(\n new PasswordInput(array(\n 'name' => 'current-password',\n 'label' => Lang::get($this->_plugin . '.update-password-current-password-label'),\n 'required' => true,\n 'pattern' => PasswordInput::LEAK_PATTERN\n )),\n\n new PasswordInput(array(\n 'name' => 'new-password',\n 'required' => true,\n 'label' => Lang::get($this->_plugin . '.update-password-new-password-label'),\n )),\n\n new PasswordInput(array(\n 'name' => 'password-confirm',\n 'required' => true,\n 'label' => Lang::get($this->_plugin . '.update-password-new-password-confirm-label'),\n 'compare' => 'new-password'\n ))\n ),\n\n '_submits' => array(\n new SubmitInput(array(\n 'name' => 'valid',\n 'value' => Lang::get($this->_plugin . '.valid-button'),\n )),\n\n new ButtonInput(array(\n 'name' => 'cancel',\n 'value' => Lang::get($this->_plugin . '.cancel-button'),\n 'onclick' => 'app.dialog(\"close\")'\n ))\n ),\n\n ),\n 'onsuccess' => 'app.dialog(\"close\")'\n );\n\n $form = new Form($params);\n\n if(!$form->submitted()) {\n return View::make(Theme::getSelected()->getView(\"dialogbox.tpl\"), array(\n 'title' => Lang::get($this->_plugin . '.update-password-title'),\n 'icon' => 'lock',\n 'page' => $form\n ));\n }\n else{\n if($form->check()) {\n $me = App::session()->getUser();\n if(!$me->checkPassword($form->getData('current-password'))) {\n return $form->response(Form::STATUS_ERROR, Lang::get($this->_plugin . '.update-password-bad-current-password'));\n }\n try{\n $me->set('password', Crypto::hashPassword($form->getData('new-password')));\n $me->save();\n\n return $form->response(Form::STATUS_SUCCESS, Lang::get($this->_plugin . '.update-password-success'));\n }\n catch(Exception $e){\n return $form->response(Form::STATUS_ERROR, DEBUG_MODE ? $e->getMessage() : Lang::get($this->_plugin . '.update-password-error'));\n }\n\n }\n }\n\n }", "title": "" } ]
17bf374678e1e0113e632fd9f1ab4dd3
Update the specified MasterEducations in storage.
[ { "docid": "91057b3426b9b208410dc6777f1b93f2", "score": "0.6164342", "text": "public function update($id, UpdateMasterEducationsRequest $request)\n {\n $masterEducations = $this->masterEducationsRepository->find($id);\n\n if (empty($masterEducations)) {\n Flash::error('Master Educations not found');\n\n return redirect(route('masters.masterEducations.index'));\n }\n\n $masterEducations = $this->masterEducationsRepository->update($request->all(), $id);\n\n Flash::success('Master Educations updated successfully.');\n\n return redirect(route('masters.masterEducations.index'));\n }", "title": "" } ]
[ { "docid": "e6f02b6ba68332510224c9c7c0422b65", "score": "0.5785154", "text": "public function update(Request $request, Master $master)\n {\n access([\"can-owner\", \"can-host\", \"can-manager\"]);\n\n $data = $request->validate([\n 'team_id' => 'required|exists:teams,id',\n 'user' => 'required|array',\n 'user.account' => 'required|string|min:3',\n 'user.password' => 'nullable|string|min:3',\n 'user.email' => 'nullable|email',\n 'user.phone' => 'nullable|string',\n 'services' => 'required|array',\n 'services.*.comission' => 'required|numeric',\n 'services.*.conversion' => 'required|in:0,1',\n ]);\n\n $master->update(['team_id' => intval($data['team_id'])]);\n\n $master = $master->fresh();\n\n $userData = [\n 'account' => $data['user']['account'],\n 'email' => $data['user']['email'],\n 'phone' => $data['user']['phone'],\n ];\n\n if (!empty($data['user']['password'])) {\n $userData['password'] = bcrypt(trim($data['user']['password']));\n $userData['open_password'] = $data['user']['password'];\n }\n\n $master->user->update($userData);\n\n foreach ($data['services'] as $serviceId => $serviceData) {\n $service = Service::find($serviceId);\n\n if (!empty($service)) {\n $service->update([\n 'comission' => $serviceData['comission'],\n 'conversion' => $serviceData['conversion'],\n ]);\n }\n }\n\n note(\"info\", \"master:update\", \"Обновлен мастер {$master->name}\", Master::class, $master->id);\n\n return back()->with(['success' => __('common.saved-success')]);\n }", "title": "" }, { "docid": "f7de0f45936c9698d6194c009baa3c01", "score": "0.56448627", "text": "public function update(Request $request, Master $master)\n {\n $this->validate($request,[\n 'name'=>'required',\n 'surname'=>'required', \n ]);\n if($request->has('image')) {\n \n $image=$request->file('image');\n $imageName=$request->name.'-'.time().\".\".$image->getClientOriginalExtension();\n $path=public_path().'/'.'images'.'/';\n $image->move($path, $imageName);\n $master->update([\n 'avatar_url'=>$imageName\n ]);\n }\n if ($master->avatar_url) {\n if((public_path() . '/' . 'images' . '/'.$master->avatar_url)) {\n unlink(public_path() . '/' . 'images' . '/'.$master->avatar_url); // unlink PHP funkcija\n }\n }\n $master->update([\n 'name'=>$request->name,\n 'surname'=>$request->surname,\n \n ]);\n return redirect()->route('master.index')->with('storeStatus', 'successfully updated');\n }", "title": "" }, { "docid": "0b015e62d0c0ce132ea137411e1a6b7c", "score": "0.5638337", "text": "public function update(Request $request, ProductMaster $productMaster)\n {\n //\n }", "title": "" }, { "docid": "7740ffc30b8c158a28c870f6ef50bfc6", "score": "0.56027955", "text": "public function update(Request $request, Master_Category $master_Category)\n {\n //\n }", "title": "" }, { "docid": "23977ed2cf546b351e08a96c5e2a2c26", "score": "0.5593516", "text": "public function update_student_info_master_table($masterid, $masterUpdateArray)\n\t{\n\t\t$this->db->where('cms_id', $masterid);\n\t\t$this->db->update('cms_users', $masterUpdateArray);\n\t\treturn $masterid;\n\t}", "title": "" }, { "docid": "b7bdbb605e20b9f1f471c7bd40754602", "score": "0.5498091", "text": "public function update(Request $request, MasterClass $masterClass) {\n //\n }", "title": "" }, { "docid": "ff1383fd9f26f25808762058b73863d6", "score": "0.5463372", "text": "public function update(Request $request, SaleMaster $saleMaster)\n {\n //\n }", "title": "" }, { "docid": "6e2e9f4a55771877259652a2e6142ab9", "score": "0.54139704", "text": "public function update(Request $request, MasterVendor $vendor)\n {\n // MasterVendor::where('id',$vendor->id)\n // ->update([\n // 'nama'=> $request->nama,\n // 'kode'=> $request->kode,\n // 'harga_katering_dasar'=> $request->harga_katering_dasar,\n // 'add_on'=> $request->add_on,\n // 'harga_add_on'=> $request->harga_add_on,\n // ]);\n $vendor->update($request->all());\n return redirect()->route('vendor.index')->with('status', 'Update successful');\n }", "title": "" }, { "docid": "38c564fcaf16b7d5ea8da0ec47f3e2ac", "score": "0.5329331", "text": "public function update(Request $request, StockMaster $stockMaster)\n {\n $this->validate($request,[\n 'jan_code' => 'required',\n 'type' => 'required'\n ]);\n\n $stockMaster->jan_code = $request->jan_code;\n $stockMaster->code = $request->code;\n $stockMaster->brand = $request->brand;\n $stockMaster->version = $request->version;\n $stockMaster->size = $request->size;\n \n if (preg_match('/^[0-9]+\\/[0-9]+[R][0-9]+/', $request->size)) {\n $explode = explode('/', $request->size);\n $stockMaster->section = $explode[0];\n \n $explode = explode('R', $explode[1]);\n $stockMaster->series = $explode[0];\n $stockMaster->rim = preg_replace('/\\ [A-Z0-9]+/', '', $explode[1]);\n }\n\n\n $stockMaster->launch = $request->launch;\n $stockMaster->price = $request->price;\n $stockMaster->type = $request->type;\n\n $stockMaster->save();\n\n return back();\n }", "title": "" }, { "docid": "a4883a89acceee9bb06ca7e00e277639", "score": "0.5289032", "text": "public function edit(Master $master)\n {\n //\n }", "title": "" }, { "docid": "fe309a8bed1341f3fcea2722b33c5a76", "score": "0.5216764", "text": "public function update(MasterTemplatesRequest $mastertemplaterequest, $id) {\n \n }", "title": "" }, { "docid": "ba9164d5387cb702cfcafece8ad8a0bd", "score": "0.5177739", "text": "public function massUpdate()\n {\n $audienceIds = explode(',', request()->input('indexes'));\n $updateOption = request()->input('update-options');\n\n foreach ($audienceIds as $audienceId) {\n $audience = $this->audience->find($audienceId);\n\n $audience->update([\n 'status' => $updateOption\n ]);\n }\n\n session()->flash('success', trans('admin::app.audiences.audiences.mass-update-success'));\n\n return redirect()->back();\n }", "title": "" }, { "docid": "a0bc3b102136100976bd03d6d79b192f", "score": "0.5174828", "text": "public function acoUpdate()\n {\n $this->AclExtras->acoUpdate($this->params);\n }", "title": "" }, { "docid": "8df59a54b90b692aca0e5dce5fb6c62e", "score": "0.51613975", "text": "public function update(Request $request, $id)\n {\n $master = Master::whereId($id)->firstOrFail();\n //set data dari field form ke objek kategori\n $master->nama = $request->get('nama_master');\n $master->jenis = $request->get('jenis_master');\n $master->timestamps = false;\n $master->save();\n // return redirect()->route('masters.index',['user_id' => $request->get('user')])->with('pesan','data master dengan nama '.$request->get('nama_master').' telah berhasil diubah');\n return redirect()->route('masters.index',['user_id' => $request->get('user')])->with('pesan','selamat anda berhasil merubah master dengan nama '. $request->get('nama_master'));\n }", "title": "" }, { "docid": "4e8d4f3d1f5111f8d63d536d4505f164", "score": "0.5158275", "text": "public function edit(Master_Category $master_Category)\n {\n //\n }", "title": "" }, { "docid": "dbab7cd39403e48c93bd00c66ace5025", "score": "0.5150096", "text": "public function update_by_id($update_details,$chemical_id){\n $this->db->where('id',$chemical_id);\n $this->db->update('chemical_storage',$update_details);\n }", "title": "" }, { "docid": "3953dcd304db315615dd2bc725e9fe92", "score": "0.51246417", "text": "public function update(MasterFarePackingRequest $request, MasterFarePacking $masterFarePacking)\n {\n $input = $request->all();\n $input['user_id'] = $request->user()->id;\n $input['company_id'] = $request->user()->company_id;\n $masterFarePacking->update($input);\n return $masterFarePacking;\n }", "title": "" }, { "docid": "e20b362334c744219bd49021703530f8", "score": "0.50805074", "text": "public function store(CreateMasterEducationsRequest $request)\n {\n $input = $request->all();\n\n $masterEducations = $this->masterEducationsRepository->create($input);\n\n Flash::success('Master Educations saved successfully.');\n\n return redirect(route('masters.masterEducations.index'));\n }", "title": "" }, { "docid": "8246255c2d2d4f11137f9366eb321902", "score": "0.50198466", "text": "public function update(Request $request, $id_mr){\n\n $medical_records = Medical_record::find($id_mr);\n\n $medical_records->id_tindakan = $request->id_tindakan;\n $medical_records->resep = $request->resep;\n $medical_records->id_pasien = $request->id_pasien;\n $medical_records->diagnosa = $request->diagnosa;\n $medical_records->keluhan = $request->keluhan;\n $medical_records->tgl_periksa = $request->tgl_periksa;\n $medical_records->ket = $request->ket;\n $medical_records->riwayat = $request->riwayat;\n $medical_records->check = $request->check;\n\n\n $medical_records->save();\n $medical_records->medicines()->sync($request->medicines);\n\n return redirect('medical_record')->with('pesan', 'Data berhasil di update');\n }", "title": "" }, { "docid": "f73aff832712ff605fb8b209dbaa4247", "score": "0.49804297", "text": "public function edit(MasterClass $masterClass) {\n //\n }", "title": "" }, { "docid": "c775955a867b80ed5b9527a4a913053b", "score": "0.49423927", "text": "public function updateAccentMeleeStones()\n {\n $keys = array(\"bp_tal_id\",\"design_brief_id\",\"accent_melee_stone_id\",\"approx_price\",\"carat_from\",\"carat_to\",\"clarity\",\"color\",\"cut\",\"shape\");\n\n $data = check_api_keys($keys,$this->mydata);\n\n $checkUpdate = $this->model->update_melee_stone($data);\n\n // $getRes = $this->common->getData('design_brief_accent_melee_stones',\" id='\".$data['accent_melee_stone_id'].\"'\");\n if($checkUpdate)\n respond_success_to_api(\"success\", $designData);\n else\n respond_error_to_api(\"error\", \"try after some time.\");\n\n }", "title": "" }, { "docid": "df0ad1f68aa2df562878b57282d573a2", "score": "0.49333242", "text": "public function update()\r\n {\r\n try\r\n {\r\n if (empty($this->sectionID))\r\n {\r\n die(\"error: the Section ID is not provided\");\r\n }\r\n else\r\n {\r\n $dbh = DatabaseConnection::getInstance();\r\n $stmtHandle = $dbh->prepare(\r\n \"UPDATE `Materials` \r\n SET `pencilType`= :textbookName,\r\n `penType`= :textbookAuthor,\r\n `paperType`= :optTextbookName,\r\n `calculatorType`= :optTextbookAuthor,\r\n `other1`= :other1,\r\n `other2`= :other2\r\n WHERE `sectionID` = :sectionID\");\r\n\r\n $stmtHandle->bindValue(\":sectionID\", $this->sectionID);\r\n $stmtHandle->bindValue(\":pencilType\", $this->pencilType);\r\n $stmtHandle->bindValue(\":penType\", $this->penType);\r\n $stmtHandle->bindValue(\":paperType\", $this->paperType);\r\n $stmtHandle->bindValue(\":calculatorType\", $this->calculatorType);\r\n $stmtHandle->bindValue(\":other1\", $this->other1);\r\n $stmtHandle->bindValue(\":other2\", $this->other2);\r\n\r\n $success = $stmtHandle->execute();\r\n\r\n if (!$success) {\r\n throw new \\PDOException(\"Materials full update operation failed\");\r\n }\r\n }\r\n }\r\n catch (\\PDOException $e)\r\n {\r\n throw $e;\r\n }\r\n }", "title": "" }, { "docid": "c81e36cf15d78450c6a7f0295b9b4f1b", "score": "0.49028933", "text": "public function edit(ProductMaster $productMaster)\n {\n //\n }", "title": "" }, { "docid": "ad8929a8ddb3648688c7f25a33a318ec", "score": "0.48136282", "text": "public function update(Request $request, $id)\n {\n $submaster = Submaster::whereId($id)->firstOrFail();\n //set data dari field form ke objek kategori\n $submaster->nama = $request->get('nama_submaster');\n $submaster->pembayaran = $request->get('jenis_pembayaran');\n $submaster->timestamps = false;\n $submaster->save();\n \n return redirect()->route('masters.index',['user_id' => $request->get('user')])->with('pesan','selamat anda berhasil merubah submaster dengan nama '. $request->get('nama_master'));\n\n }", "title": "" }, { "docid": "7901a873f37fd8ea1ac57c386d51d012", "score": "0.48041517", "text": "public function update(Request $request, $id)\n {\n $formulaSize=sizeof($request->FormulaList);\n if(count(array_unique($request->FormulaList))<count($request->FormulaList))\n {\n return redirect()->back()->withInput()->withErrors(['Duplicate' => 'Duplicate Material Name']);// Array has duplicates\n }\n else{\n $productionData=Production::findOrFail($id);\n $this->validateEditInput($request,$productionData);\n $this->SaveEditProduction($request,$productionData);\n $sync_data = [];\n for($i = 0; $i < $formulaSize;$i++)\n {\n $sync_data[$request->FormulaList[$i]] = ['quantity' => $request->QuantityList[$i]];\n }\n if($productionData->save())\n {\n \n Session::flash('notice','Production was successfully Edited');\n \n $productionData->products()->sync($sync_data);\n return redirect('/Production');\n }\n else\n {\n Session::flash('alert','Production was not successfully Edited');\n return redirect('/Production');\n } //\n }\n }", "title": "" }, { "docid": "e6f0c51e61b761487e6a9adb89c33d40", "score": "0.4788321", "text": "public function updateSectors(Sectors $sectors)\n {\n $this->sectors = $sectors;\n }", "title": "" }, { "docid": "c18531f32db518b936e0d453e1c6d5b0", "score": "0.47739723", "text": "public function update(Request $request, $id)\n {\n \n \n $medicine = Medicine::update([\n 'b_id'=> $request['b_id'],\n \n 'd_id' => $request['d_id'],\n 'm_id' => $request['m_id'],\n 'price' => $request['price'],\n 'strips_per_packet' => $request['price'],\n 'sku_productCode' => $request['sku_productCode'],\n 'packaging' => $request['packaging']\n ]);\n \n /* subarray named med_generics e.g med_generics:[\n ['id'['1'],'strength'['200mg'] ],\n ['id'['2'],'strength'['500mg'] ] ]; */\n \n //attach in med_generic table along with strength \n $medigenerics = $request->input('med_generics');\n\n // foreach( $medigenerics as $med_generic) {\n // $med_generic = DB::table('med_generic')->create([\n // 'med_id' => $medicine->id,\n // 'g_id' => $med_generic['id'],\n // 'strength' => $med_generic['strength']\n // ]);\n // }\n\n //detach old ones\n $medigenericdelete = DB::table('med_generic')->where('med_id',$id)->get();\n foreach($medigenericdelete as $mgd)\n {\n $mgd->delete();\n }\n\n foreach($medigenerics as $medigeneric){\n \n $medgen = Generic::find($medigeneric['id']);\n $medicine->genericnames()->save($medgen,['med_id'=>$medicine->id,\n 'strength'=>$medigeneric['strength'] \n ]);\n }\n\n return response()->json('Medicine Added');\n \n \n \n }", "title": "" }, { "docid": "16484d8715fd183ca4b1fdb811c0cda8", "score": "0.47567433", "text": "public function update(iterable $updateParam)\n {\n $sql = 'UPDATE `vending_machines` SET `vending_machine_rows` = ?, `vending_machine_columns` = ?, ' .\n '`vending_machine_size` = ?,`vending_machine_status_id` = ?,`vending_machine_name` = ?, `vending_machine_desc` = ?, `vending_machine_date_updated` = now()' .\n ' WHERE `vending_machines`.`vending_machine_id` = ?';\n $db = new DbConnector();\n $db->executeQuery($sql, $updateParam);\n $db->closeConnection();\n }", "title": "" }, { "docid": "69a73fbdbc2a70213f9f5edf3207673d", "score": "0.47415018", "text": "public static function updatesector($request,$id)\n {\n $districts=$request->get('district_id');\n $sectors=$request->get('sector_id');\n foreach($districts as $district)\n {\n foreach($sectors as $sector)\n {\n $save['partner_id']=$id;\n $save['district_id']=$district;\n $save['sector_id']=$sector;\n PartnerDistrict::create($save);\n unset($save);\n }\n }\n }", "title": "" }, { "docid": "e2a72c795c40689c5aa89d279aa2e03a", "score": "0.47347745", "text": "public function update($supplier);", "title": "" }, { "docid": "25384de7216d3ce1a7b7c2aebc8cecb8", "score": "0.47328666", "text": "public function testUpdateStore() {\n $store_id = 'MC001';\n $name = \"Freddie's Merchandise\";\n $currency_code = 'USD';\n\n $mc = new MailchimpEcommerce();\n $mc->updateStore($store_id, $name, $currency_code);\n\n $this->assertEquals('PATCH', $mc->getClient()->method);\n $this->assertEquals($mc->getEndpoint() . '/ecommerce/stores/' . $store_id, $mc->getClient()->uri);\n\n $this->assertNotEmpty($mc->getClient()->options['json']);\n\n $request_body = $mc->getClient()->options['json'];\n\n $this->assertEquals($name, $request_body->name);\n $this->assertEquals($currency_code, $request_body->currency_code);\n }", "title": "" }, { "docid": "d16d32440e89b8f31c0ca259c26f0400", "score": "0.47327638", "text": "public function update() {\r\n\t\t$this->_update();\r\n\t}", "title": "" }, { "docid": "79651b83c2be226d3e7e0216a3796d43", "score": "0.47243178", "text": "public function update(){\r\n $ch = curl_init(\"http://fipeapi.appspot.com/api/1/carros/marcas.json\");\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n $response = json_decode(curl_exec($ch), true);\r\n curl_close($ch);\r\n\r\n // Insert FIPE API Brands\r\n $data_array = null;\r\n\r\n foreach($response as $value){\r\n $data_array = array(\r\n 'id' => $value['id'],\r\n 'fipe_key' => $value['key'],\r\n 'name' => $value['name'],\r\n );\r\n $this->Brand_model->insert($data_array);\r\n $this->countBrands++;\r\n\r\n $this->insertModel($value['id']);\r\n\r\n }\r\n\r\n echo \"Inserido (\".$this->countBrands.\") Marcas\";\r\n echo \"Inserido (\".$this->countModels.\") Modelos\";\r\n echo \"Inserido (\".$this->countVersions.\") Versoes\";\r\n \r\n\r\n }", "title": "" }, { "docid": "bb08efab451f1d654c7c751a12addc9c", "score": "0.47205147", "text": "public function update($variant, $childArray) {\n $product = $this->_objectManager->create ( 'Magento\\Catalog\\Model\\Product' )->load ( $variant );\n $product->setPrice ( $childArray [$variant] ['price'] );\n $product->save ();\n $assignproductStockData ['quantity_and_stock_status'] ['qty'] = $childArray [$variant] ['qty'];\n $stockData = $this->_objectManager->get ( 'Magento\\CatalogInventory\\Api\\Data\\StockItemInterface' )->load ( $variant, 'product_id' );\n $stockData->setQty ( $assignproductStockData ['quantity_and_stock_status'] ['qty'] );\n $stockData->save ();\n }", "title": "" }, { "docid": "6041f77b6454fc25db5df6b5cacafe99", "score": "0.47177222", "text": "public function update($adminCoa);", "title": "" }, { "docid": "73293123458627ed0bae7442dbd20351", "score": "0.47172526", "text": "public function update($params)\n {\n if (empty($params)){\n return;\n }\n \n foreach ($params as $item){\n if($item['id']){\n $updateSupplier = Supplier::findOrFail($item['id']);\n $updateSupplier->code = $item['code'];\n $updateSupplier->name = $item['name'];\n $updateSupplier->phone = $item['phone'];\n $updateSupplier->address = $item['address'];\n $updateSupplier->prefecture = $item['prefecture'];\n $updateSupplier->save();\n }\n }\n }", "title": "" }, { "docid": "c6a6c4e94297c57d1e0d427f5d144ec8", "score": "0.47040617", "text": "public function masterserviceUpdate(Request $request){\n $serviceofshop_id = $request->id;\n $total_price = $request->total_price;\n $item_price = $request->item_price;\n\n $data = [\n 'serviceofshop_id' => $serviceofshop_id,\n 'total_price' => $total_price,\n 'item_price' => $item_price\n ];\n Serviceofshop::where('serviceofshop_id', $serviceofshop_id)->update(['total_price' => $total_price]);\n $prices = Price::where('serviceofshop_id', $serviceofshop_id)->get();\n $price_id = array();\n foreach($prices as $price) {\n array_push($price_id, $price->price_id);\n }\n $count = 0;\n foreach($price_id as $id) {\n Price::where('price_id', $id)->update(['price' => $item_price[$count]]);\n $count++;\n }\n\n }", "title": "" }, { "docid": "c0d7048b9713944fb51e7923f2ac3cfb", "score": "0.46991938", "text": "public function centralStoreUpdate(Request $request){\n\n $storeUpdate = $request->all();\n \n //print_r($storeUpdate); die('up');\n\n $addedStock = IssueDetail::where('id', $storeUpdate['CentralId'])\n ->update([\n 'material_date' => $storeUpdate['material_date'],\n 'uom' => $storeUpdate['uom'],\n 'vehicle_no' => $storeUpdate['vehicle_number'],\n 'issue_place' => $storeUpdate['issue_place'],\n 'add_quantity' => $storeUpdate['init_qty'],\n 'stock' => $storeUpdate['stock'],\n 'alert_Quantity' => $storeUpdate['alert_Quantity'],\n 'type' => 'Add'\n ]);\n\n $updateMaterialId = MaterialDetail::where('material_id', $storeUpdate['material_id'])\n ->update([\n 'material_description' => $storeUpdate['material_description'],\n 'material_netweight' => $storeUpdate['material_netweight'],\n 'material_location' => $storeUpdate['material_location'],\n 'material_group' => $storeUpdate['material_group'],\n 'material_tare' => $storeUpdate['material_tare'],\n 'material_gross' => $storeUpdate['material_gross'],\n 'material' => $storeUpdate['material']\n ]);\n \n return redirect()\n ->back()\n ->withErrors('Central store update successfully');\n }", "title": "" }, { "docid": "cec7e782e4d11a3b84548f8ad49c4c42", "score": "0.46965113", "text": "public function onSave()\n {\n try\n {\n // open a transaction with database\n TTransaction::open('sisacad');\n \n $data = $this->form->getData();\n $master = new avaliacao_resultado;\n $master->fromArray( (array) $data);\n $this->form->validate(); // form validation\n \n $master->store(); // save master object\n // delete details\n $old_items = avaliacao_resultadoaluno::where('avaliacao_resultado_id', '=', $master->id)->load();\n \n $keep_items = array();\n \n // get session items\n $items = TSession::getValue(__CLASS__.'_items');\n \n if( $items )\n {\n foreach( $items as $item )\n {\n if (substr($item['id'],0,1) == 'X' ) // new record\n {\n $detail = new avaliacao_resultadoaluno;\n }\n else\n {\n $detail = avaliacao_resultadoaluno::find($item['id']);\n }\n $detail->nota = $item['nota'];\n $detail->tipo_avaliacao = $item['tipo_avaliacao'];\n $detail->aluno_id = $item['aluno_id'];\n $detail->recuperado = $item['recuperado'];\n $detail->avaliacao_resultado_id = $master->id;\n $detail->store();\n \n $keep_items[] = $detail->id;\n }\n }\n \n if ($old_items)\n {\n foreach ($old_items as $old_item)\n {\n if (!in_array( $old_item->id, $keep_items))\n {\n $old_item->delete();\n }\n }\n }\n TTransaction::close(); // close the transaction\n \n // reload form and session items\n $this->onEdit(array('key'=>$master->id));\n \n new TMessage('info', TAdiantiCoreTranslator::translate('Record saved'));\n }\n catch (Exception $e) // in case of exception\n {\n new TMessage('error', $e->getMessage());\n $this->form->setData( $this->form->getData() ); // keep form data\n TTransaction::rollback();\n }\n }", "title": "" }, { "docid": "c39334ef256657c3c48e55c01b4fe99b", "score": "0.4696208", "text": "public function update(Request $request, CareerDetail $careerDetail)\n {\n //\n }", "title": "" }, { "docid": "5f479a4183c3f4c372987079d6d9dbfe", "score": "0.46829385", "text": "public function edit(SaleMaster $saleMaster)\n {\n //\n }", "title": "" }, { "docid": "e24809f8058ea965cb379a6308ac4ca6", "score": "0.4681225", "text": "public function update($id, UpdateMasterProductSavingsRequest $request)\n {\n $masterProductSavings = $this->masterProductSavingsRepository->find($id);\n\n if (empty($masterProductSavings)) {\n Flash::error('Master Product Savings not found');\n\n return redirect(route('masters.masterProductSavings.index'));\n }\n\n $masterProductSavings = $this->masterProductSavingsRepository->update($request->all(), $id);\n\n Flash::success('Master Product Savings updated successfully.');\n\n return redirect(route('masters.masterProductSavings.index'));\n }", "title": "" }, { "docid": "617963b08b3f64e768d11cf6816bc4be", "score": "0.4680806", "text": "function update() {\n\t\t$sql = \"UPDATE \".$this->eqs_db.\".eqs_room \n\t\t\t\tSET\trm_name=?, rm_capacity=?, rm_area=?, rm_fmst_id=?, rm_bd_id=?, rm_dpid=? \n\t\t\t\tWHERE rm_id=?\";\t\n\t\t$this->eqs->query($sql, array($this->rm_name, $this->rm_capacity, $this->rm_area, $this->rm_fmst_id, $this->rm_bd_id, $this->rm_dpid, $this->rm_id));\t\n\t}", "title": "" }, { "docid": "86a4082816908091d31bac84af269bd5", "score": "0.46673146", "text": "public function update(Request $request, Materiales $material)\n {\n \n }", "title": "" }, { "docid": "ca91c6ea1fcc111c98959d4c13c58959", "score": "0.46625814", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set barcode=\\\"$this->barcode\\\",name=\\\"$this->name\\\",price_in=\\\"$this->price_in\\\",price_out=\\\"$this->price_out\\\",unit=\\\"$this->unit\\\",presentation=\\\"$this->presentation\\\",category_id=$this->category_id,inventary_min=\\\"$this->inventary_min\\\",description=\\\"$this->description\\\",is_active=\\\"$this->is_active\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "1eabba104777beb30223ab7e2d72730f", "score": "0.46375957", "text": "public function update(Request $request)\n {\n \n \n $selisih = $request->berat_barang - $request->berat_sekarang ;\n $kapasitas_tersedia = $request->kapasitas_tersedia_k - $selisih;\n \n $datakontainer = KontainerModel::where('id_kontainer',$request->id_kontainer)->get();\n foreach ($datakontainer as $datap) {\n $kapasitas = $datap['kapasitas_tersedia'];\n }\n $datakontainerl = KontainerModel::where('id_kontainer',$request->id_lama)->get();\n foreach ($datakontainerl as $datal) {\n $kapasitasl = $datal['kapasitas_tersedia'];\n }\n\n if ($kapasitas_tersedia < 0) {\n return redirect('/pengiriman')->with('error','Gagal mengubah pengiriman kapal, kapasitas tersedia < 0 ');\n }\n else{\n $data = [\n 'nama_barang' => $request->nama_barang,\n 'berat_barang' => $request->berat_barang,\n 'pelabuhan_asal' => $request->pelabuhan_asal,\n 'pelabuhan_tujuan' => $request->pelabuhan_tujuan,\n 'status_pengiriman' => $request->status_pengiriman,\n 'id_kontainer' => $request->id_kontainer,\n \n ];\n KontainerModel::where('id_kontainer',$request->id_kontainer)->update([\n 'kapasitas_tersedia_k' => $kapasitas_tersedia,\n ]);\n PengirimanModel::where('id_pengiriman',$request->id_pengiriman)->update($data);\n return redirect('/pengiriman')->with('pesan','Berhasil mengubah data pengiriman ');\n }\n }", "title": "" }, { "docid": "f41926ea5d5eebbec226cba17f2431e3", "score": "0.46364105", "text": "public function update(){\n //TODO\n }", "title": "" }, { "docid": "8fb50c555955d7ecb56d0c9a637e9b93", "score": "0.46326628", "text": "public function update(Request $request, $id)\n { \n $datos=[];\n $datos['accion_id']=$request->accion;\n $datos['horas']=$request->horas;\n $datos['equipo_id']=json_decode($request->equiposT, true);\n $datos['material_id']=json_decode($request->materialesT, true);\n try {\n $actividad= Actividades::findOrFail($id);\n $actividad->update(['horas'=>$datos['horas']]);\n $actividad->equipos()->detach();\n $actividad->materiales()->detach();\n //si se esta agregando un equipo a la actividad\n if(isset($datos['equipo_id'])&& $datos['equipo_id']!=''){\n foreach ($datos['equipo_id'] as $equipo) {\n $Equipo=Equipos::findOrFail($equipo['equipo']);\n $actividad->equipos()->where(\"actividad_id\",$actividad->id)\n ->save($Equipo,['cantidad'=>$equipo['cantidad']]);\n }\n }\n //si se esta agregando un meterial a la actividad\n if(isset($datos['material_id'])&& $datos['material_id']!=''){\n foreach ($datos['material_id'] as $Material) {\n $material=Materiales::findOrFail($Material['material_id']);\n if(isset($Material['metros']) && $Material['metros']!=''){\n $actividad->materiales()->where(\"actividad_id\",$actividad->id)\n ->save($material,['metros'=>$Material['metros']]);\n }\n if(isset($Material['cantidad']) && $Material['cantidad']!=''){\n $actividad->materiales()->where(\"actividad_id\",$actividad->id)\n ->save($material,['cantidad'=>$Material['cantidad']]);\n }\n }\n }\n\n return response()->json(['update' => true], 200);\n }\n catch(Exeption $e){\n return response()->json(['update' => false,\"mensaje\"=>$e->getMessage()], 404);\n }\n catch(ModelNotFoundException $e){\n return response()->json(['update' => false,\"mensaje\"=>$e->getMessage()], 500);\n }\n\n }", "title": "" }, { "docid": "655bfa05744d677a30a4a4049511273f", "score": "0.46267626", "text": "private function _update(): void\n {\n $data = [];\n $id = $this->getPrimaryValue();\n\n foreach ($this->fillable as $value) {\n $data[$value] = $this->{$value};\n }\n\n $update = new Update($this->getTable(), $data);\n $update->where($this->getPrimaryKey(), $id);\n $update->exec();\n }", "title": "" }, { "docid": "eb6ef47fc4112c1f4f429a9e6ca0649f", "score": "0.46232614", "text": "public function update($id,Request $request)\n {\n $rules = [\n 'sector'=>'',\n 'updating_reason'=>'required',\n\n ];\n $data = $this->validate(request(),$rules,[],[\n 'sector'=>trans('admin.sector'),\n ]);\n $data['updating_reason']=$request->updating_reason;\n\n sector::find($id)->update($data);\n //sector:: find($id)->update($data);\n\n session()->flash('success',trans('admin.updated'));\n return redirect(aurl('sectors'));\n }", "title": "" }, { "docid": "241902c7e2970c9f9fe5b5c8fed99809", "score": "0.461895", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",price_in=\\\"$this->price_in\\\",price_out=\\\"$this->price_out\\\",unit=\\\"$this->unit\\\",category_id=$this->category_id,talla_id=$this->talla_id,color_id=$this->color_id,inventary_min=\\\"$this->inventary_min\\\",description=\\\"$this->description\\\" where id=$this->id\";\n\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "df44da15243a681f4ecbac37c1285933", "score": "0.4603928", "text": "public function updateAllProducts()\n {\n /** @var OnTap_Merchandiser_Model_Resource_Merchandiser $merchandiserResourceModel */\n $merchandiserResourceModel = Mage::getResourceModel('merchandiser/merchandiser');\n\n // Full reindex: rebuild all categories.\n $categoryIds = $this->getSmartCategoryIds();\n foreach ($categoryIds as $categoryId) {\n /** @var SomethingDigital_EnterpriseIndexPerf_Model_Merchandiser_Indexer $merchandiser */\n $merchandiser = Mage::getModel('sd_enterpriseindexperf/merchandiser_indexer');\n $changed = $merchandiser->reindexCategory($categoryId);\n\n if ($changed) {\n $merchandiserResourceModel->applySortAction($categoryId);\n }\n }\n }", "title": "" }, { "docid": "f655bf3bf0415661054ce9896c0309a3", "score": "0.4597453", "text": "public function update(StoreTenantRequest $request)\n { \n $id = $request->id;\n\n $payload = [\n 'name' => $request->name,\n 'meter_number' => $request->meterNumber,\n 'meter_initial_reading'=> $request->meterInitialReading,\n 'updated_at' => \\Carbon\\Carbon::now()\n ];\n\n\n $tenant = $this->tenantRepository->update($id, $payload);\n\n if ($tenant) {\n return response()->json([\n 'success' => true,\n 'tenant' => new TenantResource($this->tenantRepository->findById($id)),\n ]);\n } else{\n return response()->json([\n 'success' => false,\n 'message' => 'Encountered an error.',\n ], Response::HTTP_BAD_REQUEST);\n }\n }", "title": "" }, { "docid": "c9fd79d2cd8c2588ca40957dd75968a3", "score": "0.45846468", "text": "public function store_update (Request $request)\n\t{\n\t\t// Check if the user is logged in\n\t\tif (Auth::check())\n\t\t{\n\t\t\t// find the corresponding diary\n\t\t\t$id = $request->id;\n\t\t\t$medicine = Medicine::findOrFail($id);\n\t\t\t$medicinenumber = $medicine->id;\n\t\t\t$updated_medicine = Medicine::where('id', $id)->update(request([\n\t\t\t\t'medicine',\n\t\t\t\t'dose',\n\t\t\t\t'purpose',\n\t\t\t\t'side_effect',\n\t\t\t\t'price',\n\t\t\t\t'comment'\n\t\t\t]));\n\t\t}\n\t\treturn redirect()->action('MedicineController@home');\n\t}", "title": "" }, { "docid": "3823389cef5d8ec55fdeb0ab2ce8c241", "score": "0.45816907", "text": "public function update() {\n \t$sql = \"UPDATE $this->table_name SET \" . $this->make_set_list()\n . \" WHERE \" . $this->key_values();\n sql($sql, $return_msg);\n return $return_msg;\n }", "title": "" }, { "docid": "6e49f176d4faf556bc7a9ba5d92ec5da", "score": "0.45767105", "text": "public function update()\n {\n // them caught by the index.php catch statements\n PermissionCheck::validate('allow_edit_employees', '/employee/' . $this->props->id);\n try {\n $update = new UpdateEmployment((array) $this->props);\n $update->commit();\n $this->message('Employee data has been updated', 'success');\n } catch (\\Exception $e) {\n $this->message($e->getMessage(), 'danger');\n } finally {\n $this->show();\n }\n }", "title": "" }, { "docid": "34dad1168aafd4caa2093a5500b24328", "score": "0.4570587", "text": "public function update(Request $request, $id)\n {\n $request->validate(Masterclass::$VALIDATION_RULES);\n $requestData = $request->all();\n $masterclasses= Masterclass::findOrFail($id);\n $masterclasses->update($requestData);\n\n return redirect('admin/masterclasses')->with('flash_message', 'Masterclass updated!');\n }", "title": "" }, { "docid": "1f0b33d73cbea6a87c071faef2ef69ce", "score": "0.45701897", "text": "public function updating(Specialization $Specialization)\n {\n //code...\n }", "title": "" }, { "docid": "a1668c4d8b0e3884865e2b93356169dc", "score": "0.45653057", "text": "public function updateToDb()\n\t{\n\t\t$saved_db = DbUtil::switchToGlobal();\n\t\t$query_string =\n\t\t\t\"UPDATE global_measures SET name='$this->name', range='$this->range', unit='$this->unit' \".\n\t\t\t\"WHERE measure_id=$this->measureId\";\n\t\tquery_blind($query_string);\n\t\tDbUtil::switchRestore($saved_db);\n\t}", "title": "" }, { "docid": "c12963e9956f658fc708f027d94782e5", "score": "0.45623165", "text": "public function update(Party $raid){\n }", "title": "" }, { "docid": "90eaf91aa0f5be276c39f2454c9aa068", "score": "0.45593193", "text": "public function update(Request $request, $id)\n {\n DB::beginTransaction();\n try {\n // dd( $request->all(), $id);\n $award = award::findOrFail($id);\n $award->award_cardbrand = $request['carbrand'];\n $award->award_carmodel = $request['carmodel'];\n $award->save();\n\n if ($request['cover'] != null) {\n $getAllImg = award_img::where('award_img_f', $id)->update([\"award_cover\" => 0,]);\n $getImgData = award_img::where('award_img_id', $request['cover'])->update([\"award_cover\" => 1,]);\n }\n\n if ($request->file('img') !== null) {\n $img = $request->file('img');\n foreach($img as $key => $item) {\n $name = rand().time().'.'.$item->getClientOriginalExtension();\n $item->storeAs('award', $name);\n $award_img = new award_img();\n $award_img->award_img_name = $name;\n $award_img->award_img_f = $id;\n $award_img->save();\n }\n }\n\n if (isset($request->edit_img))\n {\n $imgads = $request->edit_img;\n foreach($imgads as $key => $item) {\n $dataimgset = award_img::where('award_img_id', $key)->first();\n unlink('local/storage/app/award/'.$dataimgset->award_img_name);\n $name = rand().time().'.'.$item->getClientOriginalExtension();\n $item->storeAs('award', $name);\n $dataimgset->award_img_name = $name;\n $dataimgset->save();\n }\n }\n\n if ($request['edit_productbrand'] != null || $request['edit_productselect'] != null) {\n foreach ($request['edit_productbrand'] as $key => $value) {\n $dataimgprobrand = award_probrand::where('award_probrand_id', $key)->first();\n $dataimgprobrand->award_brand_id = $request['edit_productbrand'][$key];\n $dataimgprobrand->award_product_id = $request['edit_productselect'][$key];\n $dataimgprobrand->save();\n }\n }\n\n if ($request['productbrand'] != null || $request['productselect'] != null) {\n foreach ($request['productbrand'] as $number => $value) {\n $award_probrand = new award_probrand();\n $award_probrand->award_img_id = $request['img_id'][$number];\n $award_probrand->award_brand_id = $request['productbrand'][$number];\n $award_probrand->award_product_id = $request['productselect'][$number];\n $award_probrand->save();\n }\n }\n\n DB::commit();\n return back()->with('success','Award Has Been Updated!');\n } catch (\\Throwable $th) {\n DB::rollback();\n return back()->with('error','Something Wrong. Award Can Not Updated!');\n }\n }", "title": "" }, { "docid": "178d288f8eedd4140e55a07143e04605", "score": "0.45591936", "text": "public function actionUpdate($id)\n {\n \n $modelSmHead = $this->findModel($id);\n $modelsSmDetail = $modelSmHead->smDetails;\n\n $modelSmHead->scenario = 'create';\n\n if ($modelSmHead->load(Yii::$app->request->post())) {\n\n $oldIDs = ArrayHelper::map($modelsSmDetail, 'id', 'id');\n $modelsSmDetail = Model::createMultiple(SmDetail::classname(), $modelsSmDetail);\n Model::loadMultiple($modelsSmDetail, Yii::$app->request->post());\n $deletedIDs = array_diff($oldIDs, array_filter(ArrayHelper::map($modelsSmDetail, 'id', 'id')));\n\n // validate all models\n $valid = $modelSmHead->validate();\n $valid = Model::validateMultiple($modelsSmDetail) && $valid;\n\n if ($valid) {\n $transaction = \\Yii::$app->db->beginTransaction();\n try {\n\n if($modelSmHead->doc_type == 'sales'){\n $modelSmHead->sign = '1';\n }\n\n if($modelSmHead->doc_type == 'receipt'){\n $modelSmHead->sign = '-1';\n }\n\n if ($flag = $modelSmHead->save(false)) {\n if (!empty($deletedIDs)) {\n SmDetail::deleteAll(['id' => $deletedIDs]);\n }\n foreach ($modelsSmDetail as $modelSmDetail) {\n $modelSmDetail->sm_head_id = $modelSmHead->id;\n $modelSmDetail->uom_quantity = '0';\n $modelSmDetail->bonus_quantity = '0';\n $modelSmDetail->row_amount = $modelSmDetail->quantity * $modelSmDetail->rate;\n\n if (! ($flag = $modelSmDetail->save(false))) {\n $transaction->rollBack();\n break;\n }\n }\n }\n if ($flag) {\n $transaction->commit();\n\n // Update SM Head prime amount & net amount\n SmHead::update_sale_invoice_amount($modelSmHead->id);\n\n // Set success data\n \\Yii::$app->getSession()->setFlash('success', 'Successfully Updated');\n\n return $this->redirect(['view', 'id' => $modelSmHead->id]);\n }\n } catch (\\Exception $e) {\n\n // Set success data\n \\Yii::$app->getSession()->setFlash('error', $e->getMessage());\n\n $transaction->rollBack();\n }\n }\n }\n\n return $this->render('update', [\n 'modelSmHead' => $modelSmHead,\n 'modelsSmDetail' => (empty($modelsSmDetail)) ? [new SmDetail] : $modelsSmDetail\n ]);\n\n }", "title": "" }, { "docid": "d621d35d3501f4f5160c0d20dec5dd40", "score": "0.45525718", "text": "public function UpdateEntity() {\r\n\t\t\t$this->load->model('MdlEntity');\r\n\t\t\t$this->MdlEntity->UpdateEntity(); // update\r\n\t\t\t$this->data['entity'] = $this->MdlEntity->getEntity(); // réaffichage contenu data\r\n\t\t\t$this->middle = 'adminLayout';\r\n\t\t\t$this->layout();\r\n\t\t}", "title": "" }, { "docid": "03e503130aaedfa173b1c6f8120b855a", "score": "0.45499688", "text": "public function Update()\n\t{\n\t\t\n\t\ttry\n\t\t{\n\t\t\tSqlManager::GetInstance ()->Update ( 'modagendatermin', array ('state' => 1 ), '(end < NOW() OR end is NULL) AND begin < NOW() AND state = \\'2\\'' );\n\t\t\n\t\t} catch ( SqlManagerException $ex )\n\t\t{\n\t\t\tthrow new CMSException ( 'Update der Termin-Datenbank fehlgeschlagen!', CMSException::T_MODULEERROR, $ex );\n\t\t}\n\t}", "title": "" }, { "docid": "1af469134f391600aa3207ce2c63e359", "score": "0.45461994", "text": "public function updateToDb()\n\t{\n\t\t$saved_db = DbUtil::switchToLabConfigRevamp();\n\t\t$query_string =\n\t\t\t\"UPDATE measure SET name='$this->name', range='$this->range', unit='$this->unit' \".\n\t\t\t\"WHERE measure_id=$this->measureId\";\n\t\tquery_blind($query_string);\n\t\tDbUtil::switchRestore($saved_db);\n\t}", "title": "" }, { "docid": "01e7fcec9745f8f526016e3d55045576", "score": "0.45427868", "text": "public function updateManufacture(Request $request)\n {\n $manufacture = manufacture::find($request->manufactureId);\n $manufacture->manufactureName=$request->manufactureName;\n $manufacture->manufactureDescription=$request->manufactureDescription;\n $manufacture->publicationStatus=$request->publicationStatus;\n $manufacture->save();\n return redirect('/manageManufacture')->with('message','Manufacture Information Update Successfully');\n }", "title": "" }, { "docid": "4aa0a0d00427fe5e94bc298b49eac545", "score": "0.45362476", "text": "public function update(Request $request, Edc $Edc)\n {\n //\n }", "title": "" }, { "docid": "024af3ed8455d7d1361e9e6918b37051", "score": "0.45361072", "text": "public function setEducationalAlignment($value)\n {\n $this->educationalAlignment = $value;\n }", "title": "" }, { "docid": "6948e944ecaebd53d1fa5160950b8808", "score": "0.4535378", "text": "public function update(Request $request)\n {\n // return $request;\n try {\n \n $Sections = Sections::findOrFail($request->idupdate);\n // return $Sections;\n $Sections->Name_Section = ['ar' => $request->Name_Section_Ar, 'en' => $request->Name_Section_En];\n $Sections->Grade_Id = $request->Grade_id;\n $Sections->Class_Id = $request->Class_id;\n\n if(isset($request->Status)) {\n $Sections->Status = 1;\n } else {\n $Sections->Status = 2;\n }\n\n $Sections->save();\n toastr()->success(trans('messages.Update'));\n\n return redirect()->route('Sections.index');\n }\n catch\n (\\Exception $e) {\n return redirect()->back()->withErrors(['error' => $e->getMessage()]);\n }\n }", "title": "" }, { "docid": "b5f5e547d692e015e01e377425561530", "score": "0.45302954", "text": "public function update(Request $request)\n {\n // @dd($request->all());\n $update = TotalCash::where(\"id\", $request->id)->update([\n \"paiker_id\" => $request->paiker_id,\n \"address\" => $request->address,\n \"due_amount_today\" => $request->due_amount_today,\n \"hal\" => $request->hal,\n \"total\" => $request->total,\n \"paid\" => $request->paid,\n \"total_due\" => $request->total_due,\n ]);\n if($update){\n /*return response()->json(\"success\");*/\n return redirect('/due/show');\n }else{\n return response()->json(\"error\");\n }\n /*$list = $this->sellRepo->findSellById($id);\n $update = new SellsRepository($list);\n $update->updateSell($request->except('_token', '_method'));\n\n return redirect('/sell/show')->with('msg', 'Sells Data Updated successfully');*/\n }", "title": "" }, { "docid": "7f12d3264623ca8dd1007fb6cd43708c", "score": "0.4529684", "text": "public function testSupplierRightUpdate()\n {\n $kernel = static::createKernel();\n $kernel->boot();\n\n $supplier = new Supplier();\n $updater = $kernel->getContainer()->get('supplier.updater');\n $data = [\n 'code' => 'bosch',\n 'name' => 'Bosch',\n 'users' => 'admin,julia',\n // Fake data is tested here because it should be ignore & is not consider as an error;\n 'fake_data' => 'fake_data_value',\n ];\n $updater->update($supplier, $data);\n\n self::assertEquals('bosch', $supplier->getCode());\n self::assertEquals('Bosch', $supplier->getName());\n self::assertEquals(2, count($supplier->getUsers()));\n\n $data = [\n 'code' => 'bosch',\n 'name' => 'Bosch',\n 'userIds' => '1,2,3'\n ];\n $updater->update($supplier, $data);\n\n self::assertEquals(3, count($supplier->getUsers()));\n\n $data = [\n 'code' => 'bosch',\n 'name' => 'Bosch',\n 'userIds' => ''\n ];\n $updater->update($supplier, $data);\n\n self::assertEquals(0, count($supplier->getUsers()));\n }", "title": "" }, { "docid": "f719aa868d74ad0355a596fe9cc82221", "score": "0.45268288", "text": "public function updateMantenimientoEQ($formData, $dataBaseName='KAO_wssp'){\n $this->instanciaDB->setDbname($dataBaseName); // Indicamos a que DB se realizará la consulta por defecto sera KAO_wssp\n $this->db = $this->instanciaDB->getInstanciaCNX();\n\n $codEmpresa = trim($_SESSION[\"codEmpresaAUTH\"]); //Codigo de la empresa seleccionada en login\n $codMNT = $formData->codMantenimiento;\n $codOrdenFisica = str_pad($formData->product_ordenFisica, 8, \"0\", STR_PAD_LEFT);\n $responsable = $formData->product_edit_tecnico;\n $fechaInicio = date('Ymd H:i:s', strtotime(\"$formData->uk_dp_fecha\"));\n $fechaFinal = date('Ymd H:i:s', strtotime(\"$formData->uk_dp_fecha\"));\n\n $query = \"\n UPDATE \n DBO.mantenimientosEQ\n SET \n codOrdenFisica = '$codOrdenFisica',\n responsable = '$responsable',\n fechaInicio = '$fechaInicio',\n fechaFin = '$fechaFinal'\n WHERE \n codMantenimiento = '$codMNT' \n AND codEmpresa ='$codEmpresa'\n \";\n\n\n try{\n $stmt = $this->db->prepare($query); \n $stmt->execute();\n \n return array('status' => 'ok', 'mensaje' => $codMNT. ' actualizada' ); \n \n }catch(PDOException $exception){\n return array('status' => 'error', 'mensaje' => 'Error en mantenimientosEQ' . $exception->getMessage() );\n }\n\n\n \n }", "title": "" }, { "docid": "605ded6d345785088f992e77be833715", "score": "0.45220912", "text": "public function update(Request $request)\n {\n $this->validate($request, [\n 'kode_akun' => 'required',\n 'nama' => 'required',\n 'modul' => 'required',\n 'jenis' => 'required',\n 'kode_curr' => 'required',\n 'block' => 'required',\n 'status_gar' => 'required',\n 'normal' => 'required'\n ]);\n\n DB::connection($this->sql)->beginTransaction();\n \n try {\n if($data = Auth::guard($this->guard)->user()){\n $nik= $data->nik;\n $kode_lokasi= $data->kode_lokasi;\n }else if($data = Auth::guard($this->guard2)->user()){\n $nik= $data->id_satpam;\n $kode_lokasi= $data->kode_lokasi;\n }\n\n $del = DB::connection($this->sql)->table('masakun')->where('kode_lokasi', $kode_lokasi)->where('kode_akun', $request->kode_akun)->delete();\n\n $ins = DB::connection($this->sql)->insert(\"insert into masakun (kode_akun,kode_lokasi,nama,modul,jenis,kode_curr,block,status_gar,normal,kode_gar) values ('$request->kode_akun','$kode_lokasi','$request->nama','$request->modul','$request->jenis','$request->kode_curr','$request->block','$request->status_gar','$request->normal','$request->kode_akun') \");\n\n DB::connection($this->sql)->commit();\n $success['status'] = true;\n $success['kode'] = $request->kode_akun;\n $success['message'] = \"Data Master akun berhasil diubah\";\n return response()->json($success, $this->successStatus); \n } catch (\\Throwable $e) {\n DB::connection($this->sql)->rollback();\n $success['status'] = false;\n $success['kode'] = '-';\n $success['message'] = \"Data Master akun gagal diubah \".$e;\n return response()->json($success, $this->successStatus); \n }\t\n }", "title": "" }, { "docid": "9655acf169069d196eb4a3cc3d1a385d", "score": "0.45205393", "text": "public function updating(Manufacturer $manufacturer)\n {\n $manufacturer->setTitle()->setSlug()->attachSingleImage()->setEditor();\n }", "title": "" }, { "docid": "0b0f3575b385917abe2642d35e128711", "score": "0.45202836", "text": "public function update(Request $request)\n {\n $token = $request->get(\"token\");\n $merchantId = $user = User::where('token',$token)->first()->merchant->id;\n\n $id = $request->input('id');\n $dish = Dish::find($id);\n // Need check this dish belong to this login merchent (via token)\n\n $dish->name = $request->input('name');\n $dish->description = $request->input('description');\n $dish->spicy_levels = $request->input('spicy_level');\n $dish->online_order_inventory = $request->input('online_order_inventory');\n\n try {\n if($dish->save()) {\n //$categories = json_decode($request->input('category_id'));\n $dishCategories = DishCategory::where('dish_id',$dish->id);\n if($dishCategories->count())\n $dishCategories->delete();\n\n $categories = explode(\",\",urldecode($request->input('category_id')));\n foreach($categories as $category) {\n $dishCategory = new DishCategory;\n $dishCategory->dish_id = $dish->id;\n $dishCategory->category_id = $category;\n $dishCategory->save();\n }\n\n //$addons = json_decode($request->input('addons'));\n $dishAddons = DishAddon::where('dish_id',$dish->id);\n if($dishAddons->count())\n $dishAddons->delete();\n\n $addons = explode(\",\",urldecode($request->input('addons')));\n foreach($addons as $addon) {\n $dishAddon = new DishAddon;\n $dishAddon->dish_id = $dish->id;\n $dishAddon->addon_id = $addon;\n $dishAddon->save();\n }\n\n $dishSizes = DishSize::where('dish_id',$dish->id);\n if($dishSizes->count())\n $dishSizes->delete();\n\n $sizes = json_decode(urldecode($request->input('sizes')));\n\n foreach($sizes->records as $size) {\n $dishSize = new DishSize;\n $dishSize->dish_id = $dish->id;\n $dishSize->size = $size->size;\n $dishSize->price = $size->price;\n $dishSize->save();\n }\n\n if(count($_FILES)) {\n //if($request->hasFile('image')){\n $dishImages = DishImage::where('dish_id',$dish->id);\n if($dishImages->count())\n $dishImages->delete();\n // Need remove old images first\n foreach($_FILES as $file)\n {\n $uploaddir = config('app.uploadfolder'). $dish->dishFolder;\n if (!is_dir($uploaddir)) {\n //mkdir($uploaddir, 0777);\n if (!mkdir($uploaddir, 0777, true)) {\n return response()->json([\n 'result' => 0,\n 'messages' => 'Failed to create folders'\n ],200);\n }\n }\n\n if(move_uploaded_file($file['tmp_name'], $uploaddir .basename($file['name'])))\n {\n //$files[] = $uploaddir .$file['name'];\n $path = $uploaddir .$file['name'];\n $dishImage = new DishImage;\n $dishImage->dish_id = $dish->id;\n $dishImage->name = rtrim($file['name'], '.jpg');\n $dishImage->path = $path;\n $dishImage->name_origin = $file['name'];\n $dishImage->save();\n }\n else\n {\n return response()->json([\n 'result' => 0,\n 'messages' => 'Failed to upload file'\n ],200);\n }\n }\n }\n\n return response()->json([\n 'result' => 1,\n 'id' => $dish->id\n ],200);\n } else {\n return response()->json([\n 'result' => 0\n ],200);\n }\n } catch(\\Exception $e){\n return response()->json([\n 'result' => 0,\n 'messages' => $e->getMessage()\n ],200);\n }\n }", "title": "" }, { "docid": "2622f6a6c579dd09cd3163b6cfd1386b", "score": "0.45192316", "text": "protected function update(){\n\t\tUserAccountDAM::update($this);\n\t}", "title": "" }, { "docid": "8c6d325deb7c334404082e37cfbc24d9", "score": "0.4519043", "text": "protected function updateManufacturerAndModel(array $values)\n {\n if ($manufacturerName = $values['ull_ventory_item_manufacturer_id_create'])\n {\n $manufacturer = Doctrine::getTable('UllVentoryItemManufacturer')->findOneByName($manufacturerName);\n \n if (!$manufacturer)\n {\n $manufacturer = new UllVentoryItemManufacturer;\n $manufacturer->name = $manufacturerName;\n $manufacturer->save(); \n }\n }\n else\n {\n $manufacturer = Doctrine::getTable('UllVentoryItemManufacturer')->findOneById($values['ull_ventory_item_manufacturer_id']);\n }\n \n if ($modelName = $values['ull_ventory_item_model_id_create'])\n {\n $model = Doctrine::getTable('UllVentoryItemModel')->findOneByName($modelName);\n \n if (!$model)\n {\n $model = new UllVentoryItemModel;\n $model->name = $modelName;\n }\n }\n else\n {\n $model = Doctrine::getTable('UllVentoryItemModel')->findOneById($values['ull_ventory_item_model_id']);\n }\n\n $model->ull_ventory_item_type_id = $values['ull_ventory_item_type_id'];\n $model->ull_ventory_item_manufacturer_id = $manufacturer->id;\n $model->save();\n \n $this->object->UllVentoryItemModel = $model; \n }", "title": "" }, { "docid": "41bc3a249a1fa57527ed1e86f9b4dc43", "score": "0.45158505", "text": "public function update(Request $request, $id)\n\t{\n\t\t// \t\t\t\t'name' => 'required|max:200',\n\t\t// \t\t\t\t'state' => 'required',\n\t\t// \t\t\t\t'area' => 'required',\n\t\t// \t\t\t\t'price' => 'required',\n\t\t// \t\t\t\t'campground' => 'required',\n\t\t// \t\t\t\t'capacity' => 'required',\n\t\t// \t\t\t\t'location' => 'required'\n\t\t// \t\t\t]);\n\n\t\t// if($validate->fails())\n\t\t// {\n\t\t// \treturn ['error' => $validate->errors()];\n\t\t// }\n\n\t\t$mountain = Mountain::find($id);\n\t\t$mountain->name = (!empty($request->name) ? $request->name : '');\n\t\t$mountain->price = (!empty($request->price) ? $request->price : '');\n\t\t$mountain->other_price = (!empty($request->other_price) ? $request->other_price : '');\n\t\t$mountain->campground = (!empty($request->campground) ? $request->campground : '');\n\t\t$mountain->capacity = (!empty($request->capacity) ? $request->capacity : '0');\n\t\t$mountain->location = (!empty($request->location) ? $request->location : '');\n\t\t$mountain->state_id = (!empty($request->state) ? $request->state : '');\n\t\t$mountain->area_id = (!empty($request->area) ? $request->area : '');\n\t\t$mountain->travel_day = (!empty($request->travel_day) ? $request->travel_day : '0');\n\t\t$mountain->travel_night = (!empty($request->travel_night) ? $request->travel_night : '0');\n\t\t$mountain->active = (!empty($request->active) ? $request->active : '0');\n\t\t$mountain->save();\n\n\n\n\t\tif(!empty($request->campgrounds))\n\t\t{\n\t\t\t$oldcamp = MountainCampground::where('mountain_id', $mountain->id);\n\t\t\t$oldcamp->forceDelete();\n\n\t\t\tforeach($request->campgrounds as $key => $value)\n\t\t\t{\n\t\t\t\tif(!empty($value['name']))\n\t\t\t\t{\n\t\t\t\t\t$campground = new MountainCampground;\n\t\t\t\t\t$campground->name = $value['name'];\n\t\t\t\t\t$campground->capacity = $value['capacity'];\n\t\t\t\t\t$campground->mountain_id = $mountain->id;\n\t\t\t\t\t$campground->save();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(!empty($request->related_state))\n\t\t{\n\t\t\t$oldrelated = MountainRelated::where('mountain_id', $mountain->id);\n\t\t\t$oldrelated->forceDelete();\n\n\t\t\tforeach($request->related_state as $k => $v)\n\t\t\t{\n\t\t\t\tif($k != 0)\n\t\t\t\t{\n\t\t\t\t\t$related = new MountainRelated;\n\t\t\t\t\t$related->mountain_id = $mountain->id;\n\t\t\t\t\t$related->state_id = $v;\n\t\t\t\t\t$related->save();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$oldrelated = MountainRelated::where('mountain_id', $mountain->id);\n\t\t\t\n\t\t\tif(!empty($oldrelated->get()))\n\t\t\t{\n\t\t\t\t$oldrelated->forceDelete();\n\t\t\t}\n\t\t}\n\n\t\tactivityLog('Update Gunung ' . $mountain->name);\n\n\t\tFlash::success(sprintf('Anda telah berjaya mengemaskini maklumat %s.', $mountain->name));\n\n // return ['errors' => false];\n\t}", "title": "" }, { "docid": "ab188923891627eba98b016eca2d934c", "score": "0.45156765", "text": "public function update(Request $request)\n {\n $result = Distributors::where('id', $request->id)->update($request->all());\n }", "title": "" }, { "docid": "89952b7fced1aa242fcf2e13ff542913", "score": "0.4515444", "text": "public function update(Request $request, Maestro $maestro)\n {\n if ($image = request()->file('foto')) {\n $upload = $image->store('fotos', 'public');\n }\n else {\n $upload = 'empty';\n }\n $data = request()->validate([\n 'ci' => 'required',\n 'nombre' => '',\n 'colegio_id' => 'required',\n 'materia' => '',\n 'experiencia' => '',\n 'image' => ''\n ]);\n $maestro->update([\n 'ci' => $data['ci'],\n 'nombre' => $data['nombre'],\n 'colegio_id' => $data['colegio_id'],\n 'materia' => $data['materia'],\n 'experiencia' => $data['experiencia'],\n 'image' => $upload\n ]);\n //data_set($data, 'foto', $upload);\n //$data['foto'] = $image->store('fotos', 'public');\n //$maestro->update($data);\n return redirect(route('maestro.index'));\n }", "title": "" }, { "docid": "1acaaec50ece7b688b3b924ec5c24e33", "score": "0.4514595", "text": "public function actionUpdateEducationInfo(){\n $model = \\frontend\\models\\Student::findOne(Yii::$app->user->identity->student_id);\n \n if($model){\n $model->scenario = \"updateEducationInfo\";\n $model->populateMajorsSelected();\n \n if(!Yii::$app->params['isDemo']){\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->getSession()->setFlash('success', Yii::t('register', 'Updated your education information'));\n return $this->redirect(['setting/index']);\n }\n }\n }\n \n return $this->render('updateEducationInfo', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "555a727e2e2fda146355317c87e48643", "score": "0.4514034", "text": "public function testUpdateKekosInitialMass()\n {\n }", "title": "" }, { "docid": "7328f6b5b2b01cb3181b7daef066006c", "score": "0.45060688", "text": "public function update(Request $request, Examination $examination)\n {\n $request->validate($examination->rules,$examination->messages);\n\n $course = $examination->unity->course;\n\n foreach($course->unities as $unity){\n if (isset($unity->examination->sequence)){\n if ($unity->examination->sequence==$request->sequence && $examination->id!=$unity->examination->id){\n return back()->with('problems',['O número de sequência de avaliação ( '.$request->sequence.' ) já existe neste curso!']);\n }\n }\n }\n\n $examination->sequence = $request->sequence;\n $examination->unity_id = $request->unity_id;\n\n if ($examination->save()){\n return redirect('unity/'.$examination->unity_id)->with('informations',['Os dados da avaliação foram salvos com sucesso!']);\n } else {\n return back()->with('problems',['Ocorreu um erro ao salvar os dados da avaliação!']);\n }\n }", "title": "" }, { "docid": "9e56d911da1cd1003cab29b168938118", "score": "0.45046473", "text": "public function updateStorageType($value);", "title": "" }, { "docid": "25b6f6b5054762d14badabaad1628859", "score": "0.4503478", "text": "public function update($midia);", "title": "" }, { "docid": "9645c605260fd5d674073e32fa5acae4", "score": "0.45025447", "text": "public function updateData()\n {\n $data = array(\n 'category' => $this->category,\n 'owner' => $this->owner,\n 'description' => $this->description,\n 'publishable' => $this->status,\n 'location' => $this->location,\n );\n $this->db->where('id', $this->id);\n $this->db->update($this->tablename, $data);\n }", "title": "" }, { "docid": "51d42f65ff958f942736059010c53273", "score": "0.45013222", "text": "public function update(Request $request, $slug)\n {\n\n $record = Academic::where('slug', $slug)->get()->first();\n if (is_array($request->semester_start_date) and is_array($request->semester_end_date)) {\n $start_end = array_combine($request->semester_start_date, $request->semester_end_date);\n }else\n {\n $start_end=array();\n }\n $this->validate($request, [\n 'academic_year_title' => 'bail|required|max:20|unique:academics,academic_year_title,' . $record->id,\n 'academic_start_date' => 'required',\n 'academic_end_date' => 'required',\n /*'current_semester' => 'required',*/\n ]);\n //set current semester for all child courses of academic year\n $coursesInAcademic = App\\AcademicCourse::where('academic_id', $record->id)->select(['course_id'])->get();\n $courses = array();\n foreach ($coursesInAcademic as $item) {\n $courses[] = $item->course_id;\n }\n $coursesToUpdate = App\\CourseSemister::whereIn('course_id', $courses)->get();\n foreach ($coursesToUpdate as $item) {\n $item->total_semisters = count($start_end) > 0 ? count($start_end) : 1;\n $item->update_stamp($request);\n $item->save();\n }\n //end\n $name = $request->academic_year_title;\n\n /**\n * Check if the title of the record is changed,\n * if changed update the slug value based on the new title\n */\n\n if ($name != $record->academic_year_title) {\n $record->slug = $record->makeSlug($name);\n }\n\n $record->academic_year_title = $name;\n $record->academic_start_date = $request->academic_start_date;\n $record->academic_end_date = $request->academic_end_date;\n $record->show_in_list = $request->show_in_list;\n /*$record->current_semester = $request->has('current_semester') ? (int)$request->current_semester : 1;*/\n $record->total_semesters = count($start_end) > 0 ? count($start_end) : 1;\n $record->update_stamp($request);\n $record->save();\n\n $academicToDelete=App\\AcademicSemester::where('academic_id',$record->id)->delete();\n if (count($start_end) > 0) {\n $toBeDeleted = DB::delete('Delete from academics_semesters where academic_id = ?', [$record->id]);\n $start_end = array_combine($request->semester_start_date, $request->semester_end_date);\n $i = 1;\n foreach ($start_end as $start => $end) {\n $recordAcadSem = new App\\AcademicSemester();\n $recordAcadSem->academic_id = $record->id;\n $recordAcadSem->sem_num = $i;\n $recordAcadSem->sem_start_date = $start;\n $recordAcadSem->sem_end_date = $end;\n $recordAcadSem->user_stamp($request);\n $recordAcadSem->save();\n $i++;\n }\n } else {\n $recordAcadSem = new App\\AcademicSemester();\n $recordAcadSem->academic_id = $record->id;\n $recordAcadSem->sem_num = 1;\n $recordAcadSem->sem_start_date = $request->academic_start_date;\n $recordAcadSem->sem_end_date = $request->academic_end_date;\n $recordAcadSem->user_stamp($request);\n $recordAcadSem->save();\n }\n flash(getPhrase('success'), getPhrase('record_updated_successfully'), 'success');\n return redirect(URL_MASTERSETTINGS_ACADEMICS_EDIT.$record->slug);\n }", "title": "" }, { "docid": "2da2b39a538d23cc89af87d8d1af69a1", "score": "0.44986257", "text": "function update()\n\t{\n\t // make updates\n\t\t$this->set_users_cork_id();\n\t\t$this->update_existing_user_account();\n\t\t\t\n\t}", "title": "" }, { "docid": "2459fa6b8cc3d1d5be2d3c8ad06c19aa", "score": "0.4495733", "text": "public function bulkUpdate(Request $request)\n {\n // dd($request->input());\n if (!auth()->user()->can('product.update')) {\n abort(403, 'Unauthorized action.');\n }\n\n $request->validate([\n 'supplier' => ['required', Rule::notIn(0)],\n 'category' => ['required', Rule::notIn(0)],\n // 'sub_category' => [Rule::notIn(0)],\n 'product_name' => 'required',\n 'refference' => 'required',\n 'unit_price' => 'required',\n 'custom_price' => 'required',\n 'sku' => 'required',\n 'color' => ['required', Rule::notIn(0)],\n 'quantity' => 'required',\n 'size' => ['required', Rule::notIn(0)],\n ]);\n\n try {\n DB::beginTransaction();\n $product = Product::find($request->input('product_id'));\n\n $product_image = $product->image;\n\n if ($request->hasFile('file')) {\n $file = $request->file();\n $file['file'];\n $product_image = $this->productUtil->uploadFileArr($request, 'file', config('constants.product_img_path'), 0);\n }\n $size = Size::find($request->input('size'));\n // $product->name = $request->input('product_name');\n $product->image = $product_image;\n // if ($request->input('supplier_id') == 0) {\n // $product->supplier_id = $request->input('supplier');\n // } else {\n // $product->supplier_id = $request->input('supplier');\n // }\n $product->supplier_id = $request->input('supplier');\n $product->category_id = $request->input('category');\n if ($request->input('sub_category') != 0) {\n $product->sub_category_id = $request->input('sub_category');\n }\n $product->refference = $request->input('refference');\n $product->color_id = $request->input('color');\n $product->size_id = $size->parent_id;\n $product->sub_size_id = $request->input('size');\n $product->sku = $request->input('sku');\n $product->description = $request->input('description');\n $product->product_updated_at = Carbon::now();\n\n $product->save();\n\n $variation = Variation::where('product_id', '=', $request->input('product_id'))->first();\n // $unit = str_replace($request->input('unit_price'),'.',',');\n // dd($this->productUtil->num_uf($request->input('unit_price')));\n // dd($unit);\n $variation->sub_sku = $product->sku;\n $variation->dpp_inc_tax = $this->productUtil->num_uf($request->input('unit_price'));\n $variation->sell_price_inc_tax = $this->productUtil->num_uf($request->input('custom_price'));\n $variation->save();\n\n $location = 1;\n if ($request->input('location_id')) {\n $location = $request->input('location_id');\n }\n session()->put('location_id', $location);\n $purchase_line = VariationLocationDetails::where('product_id', '=', $request->input('product_id'))->where('location_id', $request->input('location_id'))->first();\n\n if ($request->input('new_quantity')) {\n $purchase_line->qty_available = $request->input('quantity') + $request->input('new_quantity');\n $purchase_line->printing_qty = $request->input('new_quantity');\n $purchase_line->product_updated_at = Carbon::now();\n } else {\n $purchase_line->qty_available = $request->input('quantity');\n }\n\n $purchase_line->save();\n\n $message = 'Product Updated Successfully. ';\n // Adding Product In Purchase Line\n if ($request->input('new_quantity') && $purchase_line->location_id != 1) {\n $location_transfer_detail = new LocationTransferDetail();\n $location_transfer_detail->variation_id = $purchase_line->variation_id;\n $location_transfer_detail->product_id = $purchase_line->product_id;\n $location_transfer_detail->product_refference = $product->refference;\n $location_transfer_detail->location_id = $purchase_line->location_id;\n $location_transfer_detail->transfered_from = 1;\n\n $location_transfer_detail->product_variation_id = $purchase_line->product_variation_id;\n\n $location_transfer_detail->quantity = $purchase_line->quantity;\n $location_transfer_detail->transfered_on = Carbon::now();\n\n $location_transfer_detail->save();\n\n $message .= 'Product added into Purchase Table as well for Location: ' . $location_transfer_detail->location_id;\n }\n\n DB::commit();\n $output = [\n 'success' => 1,\n 'msg' => $message\n ];\n } catch (\\Exception $e) {\n DB::rollBack();\n // dd($e->getMessage());\n \\Log::emergency(\"File:\" . $e->getFile() . \"Line:\" . $e->getLine() . \"Message:\" . $e->getMessage());\n\n $output = [\n 'success' => 0,\n 'msg' => __(\"messages.something_went_wrong\" . ' ' . \"File:\" . $e->getFile() . \"Line:\" . $e->getLine() . \"Message:\" . $e->getMessage())\n ];\n }\n // dd($location);\n return redirect(url('products/' . $product->id . '/edit'))->with('status', $output)->with('location_id_set', $location);\n\n $business_id = $request->session()->get('user.business_id');\n $product_details = $request->only(['name', 'brand_id', 'unit_id', 'category_id', 'tax', 'barcode_type', 'sku', 'alert_quantity', 'tax_type', 'weight', 'product_custom_field1', 'product_custom_field2', 'product_custom_field3', 'product_custom_field4', 'product_description']);\n\n $product = Product::where('business_id', $business_id)\n ->where('id', $id)\n ->with(['product_variations'])\n ->first();\n try {\n DB::beginTransaction();\n\n $product = Product::where('business_id', $business_id)\n ->where('id', $id)\n ->with(['product_variations'])\n ->first();\n\n $module_form_fields = $this->moduleUtil->getModuleFormField('product_form_fields');\n if (!empty($module_form_fields)) {\n foreach ($module_form_fields as $column) {\n $product->$column = $request->input($column);\n }\n }\n\n $product->name = $product_details['name'];\n $product->brand_id = $product_details['brand_id'];\n $product->unit_id = $product_details['unit_id'];\n $product->category_id = $product_details['category_id'];\n $product->tax = $product_details['tax'];\n $product->barcode_type = $product_details['barcode_type'];\n $product->sku = $product_details['sku'];\n $product->alert_quantity = $product_details['alert_quantity'];\n $product->tax_type = $product_details['tax_type'];\n $product->weight = $product_details['weight'];\n $product->product_custom_field1 = $product_details['product_custom_field1'];\n $product->product_custom_field2 = $product_details['product_custom_field2'];\n $product->product_custom_field3 = $product_details['product_custom_field3'];\n $product->product_custom_field4 = $product_details['product_custom_field4'];\n $product->product_description = $product_details['product_description'];\n\n if (!empty($request->input('enable_stock')) && $request->input('enable_stock') == 1) {\n $product->enable_stock = 1;\n } else {\n $product->enable_stock = 0;\n }\n if (!empty($request->input('sub_category_id'))) {\n $product->sub_category_id = $request->input('sub_category_id');\n } else {\n $product->sub_category_id = null;\n }\n\n $expiry_enabled = $request->session()->get('business.enable_product_expiry');\n if (!empty($expiry_enabled)) {\n if (!empty($request->input('expiry_period_type')) && !empty($request->input('expiry_period')) && ($product->enable_stock == 1)) {\n $product->expiry_period_type = $request->input('expiry_period_type');\n $product->expiry_period = $this->productUtil->num_uf($request->input('expiry_period'));\n } else {\n $product->expiry_period_type = null;\n $product->expiry_period = null;\n }\n }\n\n if (!empty($request->input('enable_sr_no')) && $request->input('enable_sr_no') == 1) {\n $product->enable_sr_no = 1;\n } else {\n $product->enable_sr_no = 0;\n }\n\n //upload document\n $file_name = $this->productUtil->uploadFile($request, 'image', config('constants.product_img_path'));\n if (!empty($file_name)) {\n $product->image = $file_name;\n }\n $product->product_updated_at = Carbon::now();\n\n $product->save();\n\n if ($product->type == 'single') {\n $single_data = $request->only(['single_variation_id', 'single_dpp', 'single_dpp_inc_tax', 'single_dsp_inc_tax', 'profit_percent', 'single_dsp_inc_tax']);\n $variation = Variation::find($single_data['single_variation_id']);\n\n $variation->sub_sku = $product->sku;\n $variation->default_purchase_price = $this->productUtil->num_uf($single_data['single_dpp_inc_tax']);\n $variation->dpp_inc_tax = $this->productUtil->num_uf($single_data['single_dpp_inc_tax']);\n $variation->profit_percent = $this->productUtil->num_uf($single_data['profit_percent']);\n $variation->default_sell_price = $this->productUtil->num_uf($single_data['single_dsp_inc_tax']);\n $variation->sell_price_inc_tax = $this->productUtil->num_uf($single_data['single_dsp_inc_tax']);\n $variation->save();\n } elseif ($product->type == 'variable') {\n //Update existing variations\n $input_variations_edit = $request->get('product_variation_edit');\n if (!empty($input_variations_edit)) {\n $this->productUtil->updateVariableProductVariations($product->id, $input_variations_edit);\n }\n\n //Add new variations created.\n $input_variations = $request->input('product_variation');\n if (!empty($input_variations)) {\n $this->productUtil->createVariableProductVariations($product->id, $input_variations);\n }\n }\n\n //Add product racks details.\n $product_racks = $request->get('product_racks', null);\n if (!empty($product_racks)) {\n $this->productUtil->addRackDetails($business_id, $product->id, $product_racks);\n }\n\n $product_racks_update = $request->get('product_racks_update', null);\n if (!empty($product_racks_update)) {\n $this->productUtil->updateRackDetails($business_id, $product->id, $product_racks_update);\n }\n\n DB::commit();\n $output = [\n 'success' => 1,\n 'msg' => __('product.product_updated_success')\n ];\n } catch (\\Exception $e) {\n DB::rollBack();\n \\Log::emergency(\"File:\" . $e->getFile() . \"Line:\" . $e->getLine() . \"Message:\" . $e->getMessage());\n\n $output = [\n 'success' => 0,\n 'msg' => __(\"messages.something_went_wrong\")\n ];\n }\n\n if ($request->input('submit_type') == 'update_n_edit_opening_stock') {\n return redirect()->action(\n 'OpeningStockController@add',\n ['product_id' => $product->id]\n );\n } elseif ($request->input('submit_type') == 'submit_n_add_selling_prices') {\n return redirect()->action(\n 'ProductController@addSellingPrices',\n [$product->id]\n );\n } elseif ($request->input('submit_type') == 'save_n_add_another') {\n return redirect()->action(\n 'ProductController@create'\n )->with('status', $output);\n }\n\n return redirect('products')->with('status', $output);\n }", "title": "" }, { "docid": "e4a1ea319933914b4841c961ea6d524d", "score": "0.44946817", "text": "public function testUpdateAgency()\n {\n\n }", "title": "" }, { "docid": "6a5b3be697c47d8a389a4072b1239464", "score": "0.44925678", "text": "public function update(Request $request, $id)\n {\n \n $engineers = $request->get('engineers');\n $courses = $request->get('course');\n\n try{\n $request->slug = str_replace(' ', '-', $request->slug);\n $client = client::where('id',$id)->first();\n\n $this->authorize('update', $client);\n\n\n $client->name = $request->name;\n $client->slug = strtolower($request->slug);\n $client->status = $request->status;\n $client->contact = htmlentities($request->contact);\n $client->save(); \n\n /* If image is given upload and store path */\n if(isset($request->all()['file_'])){\n $file = $request->all()['file_'];\n $filename = $request->get('slug').'_header.'.$file->getClientOriginalExtension();\n $path = Storage::disk('public')->putFileAs('companies', $request->file('file_'),$filename);\n\n }\n\n /* If image is given upload and store path */\n if(isset($request->all()['file2_'])){\n $file = $request->all()['file2_'];\n $filename = $request->get('slug').'_banner.'.$file->getClientOriginalExtension();\n $path = Storage::disk('public')->putFileAs('companies', $request->file('file2_'),$filename);\n\n }\n\n\n $course_list = Course::all()->pluck('id')->toArray();\n //update tags\n if($courses)\n foreach($course_list as $course){\n if(in_array($course, $courses)){\n if(!$client->courses->contains($course))\n $client->courses()->attach($course,['visible' => 0]);\n }else{\n if($client->courses->contains($course))\n $client->courses()->detach($course);\n }\n \n } else{\n $client->courses()->detach();\n }\n\n\n unset($client->courses);\n \n $param = \"?\";\n foreach($client->toArray() as $key=>$value){\n $param = $param.$key.\"=\".$value.\"&\";\n }\n \n $filename = $this->cache_path.$client->slug.'.json';\n file_put_contents($filename, json_encode($client));\n\n flash('client (<b>'.$request->name.'</b>) Successfully updated!')->success();\n return redirect()->route('client.show',$request->slug);\n }\n catch (QueryException $e){\n $error_code = $e->errorInfo[1];\n if($error_code == 1062){\n flash('The slug(<b>'.$request->slug.'</b>) is already taken. Kindly use a different slug.')->error();\n return redirect()->back()->withInput();\n }\n }\n }", "title": "" }, { "docid": "4226316e1335779765467c6ba0b81698", "score": "0.44914702", "text": "public function destroy(Master $master)\n {\n try {\n // Jeigu autorius turejo nuotrauka ja istriname\n \n $master->delete();\n if ($master->avatar_url) {\n if((public_path() . '/' . 'images' . '/'.$master->avatar_url)) {\n unlink(public_path() . '/' . 'images' . '/'.$master->avatar_url); // unlink PHP funkcija\n }\n }\n return redirect()->route('master.index')->with('storeStatus', 'successfully updated');\n } \n catch (\\Illuminate\\Database\\QueryException $e) {\n return redirect()->back()->withErrors(['Master has standing job']);\n \n }\n\n\n\n }", "title": "" }, { "docid": "b5505d4311a25cc0de3ff3099362ef67", "score": "0.4487186", "text": "public function update_data($data){\n\n\t\t$countStore = $this->employee_model->get_latest_insert();\n\t $Lastid = $countStore[0]->emp_udf_store_id;\n\t $this->db->where('emp_udf_store_id',$Lastid);\n\t\t$query = $this->db->update('employee_udf_store', $data);\n\n\n\t}", "title": "" }, { "docid": "c0d9972d25703f500704a87ff4ba04f2", "score": "0.44869906", "text": "public function update_info($data){\n $user_id = $data->user_id;\n $first_name = $data->first_name;\n $last_name = $data->last_name;\n $mobile = $data->mobile;\n $gender = $data->gender;\n $organization = $data->organization;\n\n $sql = \"UPDATE `user_master` SET `fname`='$first_name',`lname`='$last_name',`mobile`='$mobile',`gender`='$gender',`college_name`='$organization' WHERE `user_id` = '$user_id' \";\n $res = mysqli_query($this->conn, $sql);\n if($res){\n echo \"SUCCESS\";\n }\n else{\n echo mysqli_error($this->conn);\n echo \"FAILED\";\n }\n \n }", "title": "" }, { "docid": "5fe487ac1dc81ffcbd81c6cc61a9a1cd", "score": "0.44866988", "text": "public function updateMantenimientoExterno($formData, $dataBaseName='KAO_wssp'){\n $this->instanciaDB->setDbname($dataBaseName); // Indicamos a que DB se realizará la consulta por defecto sera KAO_wssp\n $this->db = $this->instanciaDB->getInstanciaCNX();\n\n $codEmpresa = trim($_SESSION[\"codEmpresaAUTH\"]); //Codigo de la empresa seleccionada en login\n $codMNT = $formData->codMantenimiento;\n $codOrdenFisica = str_pad($formData->product_ordenFisica, 8, \"0\", STR_PAD_LEFT);\n \n $query = \"\n UPDATE \n DBO.mantExternosEQ_CAB\n SET \n codOrdenFisica = '$codOrdenFisica'\n WHERE \n codMantExt = '$codMNT' \n AND empresa ='$codEmpresa'\n \";\n\n\n try{\n $stmt = $this->db->prepare($query); \n $stmt->execute();\n \n return array('status' => 'ok', 'mensaje' => $codMNT. ' actualizada' ); \n \n }catch(PDOException $exception){\n return array('status' => 'error', 'mensaje' => 'Error en mantenimientosEQ' . $exception->getMessage() );\n }\n\n\n \n }", "title": "" }, { "docid": "80ebb561e3be60458214f8cf297ce7ca", "score": "0.44778985", "text": "public function update(array $updatable, bool $returnUpdatedDocuments = false)\n {\n $this->setRetrieveOneDocument(false);\n $this->setReduceResultAndJoinPossible(false);\n $results = $this->findStoreDocuments();\n\n $primaryKey = $this->primaryKey;\n\n // If no documents found return false.\n if (empty($results)) {\n return false;\n }\n foreach ($results as $data) {\n $filePath = $this->_getStoreDataPath() . $data[$primaryKey] . '.json';\n if(!file_exists($filePath)){\n return false;\n }\n }\n\n $updateNestedValue = static function (array $keysArray, $oldData, $newValue, int $originalKeySize) use (&$updateNestedValue){\n if(empty($keysArray)){\n return $newValue;\n }\n $currentKey = $keysArray[0];\n $result[$currentKey] = $oldData;\n if(!is_array($oldData) || !array_key_exists($currentKey, $oldData)){\n $result[$currentKey] = $updateNestedValue(array_slice($keysArray, 1), $oldData, $newValue, $originalKeySize);\n if(count($keysArray) !== $originalKeySize){\n return $result;\n }\n }\n foreach ($oldData as $key => $item){\n if($key !== $currentKey){\n $result[$key] = $oldData[$key];\n } else {\n $result[$currentKey] = $updateNestedValue(array_slice($keysArray, 1), $oldData[$currentKey], $newValue, $originalKeySize);\n }\n }\n return $result;\n };\n\n foreach ($results as $key => $data){\n $filePath = $this->_getStoreDataPath() . $data[$primaryKey] . '.json';\n foreach ($updatable as $value) {\n // Do not update the primary key reserved index of a store.\n if ($key !== $primaryKey) {\n $fieldNameArray = explode(\".\", $key);\n if(count($fieldNameArray) > 1){\n if(array_key_exists($fieldNameArray[0], $data)){\n $oldData = $data[$fieldNameArray[0]];\n $fieldNameArraySliced = array_slice($fieldNameArray, 1);\n $value = $updateNestedValue($fieldNameArraySliced, $oldData, $value, count($fieldNameArraySliced));\n } else {\n $oldData = $data;\n $value = $updateNestedValue($fieldNameArray, $oldData, $value, count($fieldNameArray));\n $data = $value;\n continue;\n }\n }\n $data[$fieldNameArray[0]] = $value;\n }\n }\n self::writeContentToFile($filePath, json_encode($data));\n $results[$key] = $data;\n }\n $this->cache->deleteAllWithNoLifetime();\n return ($returnUpdatedDocuments === true) ? $results : true;\n }", "title": "" }, { "docid": "a65ba5aeb7bf31033b79968fb8a98896", "score": "0.44759053", "text": "protected function update(): void\n {\n $this->parent?->update();\n }", "title": "" }, { "docid": "31f347f6949669a26ce13d4aa2d3208b", "score": "0.44757047", "text": "public function update(){\n \n //$companyId = Auth::user()->companyId ;\n\n $companyId = 1;\n\n $storageLocation = StorageLocation::find( Input::get('id') );\n \n $storageLocation->companyId = $companyId;\n $storageLocation->label = ( !empty(Input::get('label')) ) ? Input::get('label') : $storageLocation->label;\n $storageLocation->address1 = ( !empty(Input::get('address1')) ) ? Input::get('address1') : $storageLocation->address1;\n $storageLocation->address2 = ( !empty(Input::get('address2')) ) ? Input::get('address2') : $storageLocation->address2;\n $storageLocation->city = ( !empty(Input::get('city')) ) ? Input::get('city') : $storageLocation->city;\n $storageLocation->state = ( !empty(Input::get('state')) ) ? Input::get('state') : $storageLocation->state;\n $storageLocation->country = ( !empty(Input::get('country')) ) ? Input::get('country') : $storageLocation->country;\n $storageLocation->zipCode = ( !empty(Input::get('zipCode')) ) ? Input::get('zipCode') : $storageLocation->zipCode;\n $storageLocation->updated_at = date('Y-m-d H:i:s');\n \n if($storageLocation->save()){\n //return '<font color=\"green\" align=\"center\">Storage Location updated successfully</font>';\n return response()->json(['message' => 'Storage Location Updated Successfully']);\n }else{\n //return '<font color=\"red\" align=\"center\">Storage Location is not ceated successfully.. something is wrong!</font>';\n return response()->json(['errors' => 'Storage Location is not ceated successfully.. something is wrong!']);\n } \n /*if($storageLocation->save()){\n return Redirect::route('storagelocation.index');\n } */ \n }", "title": "" }, { "docid": "5d60827604ec80993a97898c8d85769e", "score": "0.44707736", "text": "public function edit($id)\n {\n $masterEducations = $this->masterEducationsRepository->find($id);\n\n if (empty($masterEducations)) {\n Flash::error('Master Educations not found');\n\n return redirect(route('masters.masterEducations.index'));\n }\n\n return view('masters.master_educations.edit')->with('masterEducations', $masterEducations);\n }", "title": "" }, { "docid": "1fc7ff41b62020f266925c1d4d0429db", "score": "0.44680762", "text": "public function update()\n {\n $this->objectWriteNot(\"update\");\n }", "title": "" } ]
5dfd0a6d7870aa31401bab99f65b8255
Executes the SQL statement provided
[ { "docid": "f0fe593b37a5e12a2a5b948ecaad551b", "score": "0.0", "text": "function executeSQL($sql,$getRecords = false){\n if ($rs = $this->query($sql)) {\n if ($getRecords){\n $records = array();\n while ($record = $this->fetch_array($rs)) {\n $records[] = $record;\n }\n $out = (count($records)) ? $records : 0;\n } else {\n $out = true;\n }\n $this->free($rs); \n } else {\n $out = false;\n }\n return $out;\n }", "title": "" } ]
[ { "docid": "b4984b52343116fff00bf7dade8d8e03", "score": "0.7926138", "text": "abstract public function execute($sql);", "title": "" }, { "docid": "561479b81a6e67873eebab7f76545980", "score": "0.7744639", "text": "function executeSQL($sql);", "title": "" }, { "docid": "b54796f509d1f9be1e393f942b85b4d7", "score": "0.76423", "text": "abstract function statement_execute( $statement );", "title": "" }, { "docid": "5e2e0fe28dd4e9cd0c08ef9cd2b0f6ec", "score": "0.75956416", "text": "abstract protected function execute(string $sql);", "title": "" }, { "docid": "dd9952f298fe8ca0b81c01a29b00a9ae", "score": "0.7573632", "text": "public function exec ($statement) {}", "title": "" }, { "docid": "3b57048569939bef27452228ba3dbea4", "score": "0.7567486", "text": "protected abstract function executeSQL($query);", "title": "" }, { "docid": "6a25b508e3507dfe4884e8426a6cc033", "score": "0.7496486", "text": "public function exec($sql);", "title": "" }, { "docid": "01507a79f377b99458ed5167c783e410", "score": "0.7448188", "text": "public abstract function exec( $sql );", "title": "" }, { "docid": "26b8145f6252c9527b9f39c6462eaf51", "score": "0.7414481", "text": "public function executeQuery($sqlCommand);", "title": "" }, { "docid": "bdd8d9f794570afb84eff21a843b0368", "score": "0.7319709", "text": "public function query($statement);", "title": "" }, { "docid": "43161f4717f232a562f7a9c3e4684dce", "score": "0.7290444", "text": "abstract public function execute(SqlCommand $command);", "title": "" }, { "docid": "68a4748edf4e41c4a8c30f473aadbc31", "score": "0.72878575", "text": "function Execute($sql, $params = array());", "title": "" }, { "docid": "fd7a6488b3f1089f13c531c0c02c0b54", "score": "0.7232756", "text": "public static function execution($sql){\n\t\t\t try{\n\t\t\t\t //get the connection variable\n\t\t\t\t $rec=SELF::connection();\n\t\t\t \t $record=$rec->prepare($sql);\n\t\t\t\t $record->execute();\n\t\t\t\t\t}catch(PDOEXCEPTION $err){\n\t\t\t //close the database and echo the error\n\t\t\t SELF::dbclose();\n\t\t\t echo'sorry can\\'t execute demand because '.$err->getmessage();}\n\t\t\t }", "title": "" }, { "docid": "3a1930932429cad0687976fe611d7858", "score": "0.7220122", "text": "private function executeSql() {\n if (!$this->result = $this->query($this->sql)) {\n $this->setError(\"Failed to execute SQL:\" . $this->sql . \" error (\" . $this->errno - \") \" . $this->error);\n $this->log->error(\"Failed to execute SQL:\" . $this->sql . \" error (\" . $this->errno - \") \" . $this->error);\n }\n return $this->result;\n }", "title": "" }, { "docid": "a4a17d6d247d831ea20aa9a147988dec", "score": "0.71952295", "text": "private function executeQuery() {\n\t\tif (!$this->stmt->execute() || $this->stmt->rowCount() != 1) {\n\t\t\t$this->error_msg = \"Failed to execute query\";\n\t\t\t$this->success = false;\n\t\t}\n\t}", "title": "" }, { "docid": "a3d92466bd513158f239690e6313e1c3", "score": "0.7191722", "text": "function executeSQL($statement)\n {\n $this->pdo->query($statement);\n }", "title": "" }, { "docid": "74bd8cab6ebb0cf352d3bff0318587fe", "score": "0.7189335", "text": "public function execute($statement, $options) {}", "title": "" }, { "docid": "f905d63a96a0603f745c59638a7437a3", "score": "0.71881443", "text": "public function execute(){\n\t\t\tswitch($this->type){\n\t\t\t\tcase \"update\" :\n\t\t\t\t\t$query = \"UPDATE \".$this->table.\" SET \".implode(\",\",$this->updates).$this->conditions;\n\t\t\t\t\treturn $this->update($query,$this->params);\n\t\t\t\tcase \"delete\" :\n\t\t\t\t\t$query = \"DELETE FROM \".$this->table.$this->conditions.$this->limit;\n\t\t\t\t\treturn $this->delete($query,$this->params);\n\t\t\t\tcase \"insert\" :\n\t\t\t\t\t$query = \"INSERT INTO \".$this->table. \" (\".implode(\",\",$this->columns).\") VALUES (\";\n\t\t\t\t\t\n\t\t\t\t\t//populate values with placeholders according to number of insertions\n\t\t\t\t\tfor($i = 0;$i<count($this->columns);$i++){\n\t\t\t\t\t\t$values[] = \"?\";\n\t\t\t\t\t}\n\t\t\t\t\t$query .= implode(\",\",$values) . \")\";\n\t\t\t\t\treturn $this->insert($query,$this->params);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "36940e3446dba049ce0fe3c0398f2ab2", "score": "0.7133788", "text": "abstract public function execute($query);", "title": "" }, { "docid": "2027d2ddca0657f2ca9149ca38afa3cb", "score": "0.71289146", "text": "public function execute($query);", "title": "" }, { "docid": "2acde685c495edced0012113c92af601", "score": "0.709814", "text": "function Execute($connection,$sql);", "title": "" }, { "docid": "123995f5c5755aaec729be1bcc090801", "score": "0.709292", "text": "function execute_sql($sql)\n\t{\n\t\tdebug_out(\"SQL statement: \" . $sql, false);\n\n\t\tif (!$this->sqli->query($sql))\n\t\t\texit(\"Executing SQL statement failed: \" . $sql . \"<br>Error \" . $this->sqli->errno . \": \" . $this->sqli->error);\n\t}", "title": "" }, { "docid": "d181c9ad39760297a0b09f31c02b870c", "score": "0.70460975", "text": "public function execute($statement, $options);", "title": "" }, { "docid": "117534f512672832245de81f5139eb72", "score": "0.70183563", "text": "public function execute ()\n\t{\n\t\t$args = func_get_args ();\t//get all user arguments\n\t\tif (!empty ($args[0]) && is_array ($args[0]))\t//If the argument contains an array that contains all the parameters, then execute the statement with all those parameters\n\t\t\treturn $this->statement->execute ($args[0]);\n\t\telse\n\t\t\treturn $this->statement->execute ();\t//If the argument does not contain any parameter, then execute the statement without any parameters\n\t}", "title": "" }, { "docid": "587ccd85f3fd093a1ddb5fc0a5866308", "score": "0.69986856", "text": "public function query(string $statement);", "title": "" }, { "docid": "0a85e71f9af2f3440e1b4976f0dcd8a9", "score": "0.6992841", "text": "public function execute()\n\t{\n\t\t$statement = (string)$this;\n\t\treturn $this->Connection->query($statement);\n\t}", "title": "" }, { "docid": "d4b459688867f2f9bf53ad82d54030b8", "score": "0.6973608", "text": "function ExecuteQuery($exec);", "title": "" }, { "docid": "4b9f8c5c8ceac77a7349a0e8de120fdf", "score": "0.6956661", "text": "public function exec($sql)\n {\n }", "title": "" }, { "docid": "b27e78fda61979f4801725ffefd5ca76", "score": "0.6946804", "text": "public function execute()\n\t{\n\t\t\n\t\t$then = microtime();\t\n\t\treturn $this->statement->execute();\n\t\t$now = microtime();\t\n\n\t\t$error = $this->statement->errorInfo();\n\n \tif ( !empty( $error[1] ) )\n\t\t{\n\t throw new RuntimeException( $error[2], $error[1] );\n\t }\n\t\t\n\t\t}", "title": "" }, { "docid": "f48d509968631272740cc428b5001e89", "score": "0.69398856", "text": "final public function execute($sql) {\n $return = $this->dbo->executeUpdate($sql);\n\n if ($this->debug) {\n $this->addSQLDebug($sql, 'EXECUTE');\n }\n\n return $return;\n }", "title": "" }, { "docid": "59975eb604de2d56098ca2a8645f2da0", "score": "0.69246477", "text": "public function statement($query);", "title": "" }, { "docid": "d35a022ea9b0909f8e8e85c9a30e04d0", "score": "0.6924274", "text": "function executeQuery($sql, $options = []){\n $stmt = $this->setStatement($sql,$options);\n return $stmt->execute();\n }", "title": "" }, { "docid": "c4a54f0316dd15683475267894028944", "score": "0.69146514", "text": "public function execute($sql, ...$arguments);", "title": "" }, { "docid": "e74a8957c76a1f2de816c9372000ed05", "score": "0.6906742", "text": "function execute($sql){\n\n\t\t$result = pg_query($sql) or false;\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "82a7cdf35ef0e96ef101629662d7e07a", "score": "0.6898379", "text": "public function queryExecute($sql){\n\t\t\t$this->db->query($sql);\n\t\t\treturn $this->db->execute();\n\t\t}", "title": "" }, { "docid": "07ff0f617650717851cb5aea90aacadf", "score": "0.6897132", "text": "function execute(Statement $stmt)\n\t{\n\t\tdebug_out(\"SQL statement: \" . $stmt->sql(true), false);\n\n\t\t$stmt->execute($this->sqli)->close();\n\t}", "title": "" }, { "docid": "d0acc0d7b166a8c0e5872b3e1f1c007f", "score": "0.68950987", "text": "public function execute(){\n $this->_debugBacktrace();\n switch ($this->queryType){\n case \"insert\":\n return $this->_insert();\n break;\n case \"update\":\n return $this->_update();\n break;\n case \"delete\":\n return $this->_delete();\n break;\n }\n }", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.6874243", "text": "abstract public function execute();", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.6874243", "text": "abstract public function execute();", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.6874243", "text": "abstract public function execute();", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.6874243", "text": "abstract public function execute();", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.6874243", "text": "abstract public function execute();", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.6874243", "text": "abstract public function execute();", "title": "" }, { "docid": "f20edd409a3d2272c23b74376abaaf23", "score": "0.6874243", "text": "abstract public function execute();", "title": "" }, { "docid": "99b1b181b8904aa4744d111a442f79b5", "score": "0.68588054", "text": "function Execute($sql, $params = array())\n\t{\n\t\t$this->CheckValidConnection();\n\n\t\treturn $this->conn->Execute($sql, $params);\n\t}", "title": "" }, { "docid": "8aa50edb4dbcaf76c3854f9bc92852c0", "score": "0.6855328", "text": "function execute($sql) {\n\t\t$this->connect();\n\t\t$query = mysql_query($sql, $this->connection);\n\t\tEventLog::info(\"Executed [$sql]\");\n\t\treturn (mysql_error() != '') ? $this->raiseError() : $query;\n\t}", "title": "" }, { "docid": "e3c2c3a24c463a837169af520efec734", "score": "0.6852489", "text": "function execute() {\n //\n $ok = $this->stmt->execute();\n //\n if (!$ok) {\n throw new Exception($this->stmt->error);\n }\n }", "title": "" }, { "docid": "0dfc9f638b11f3f0ea58859d4545c260", "score": "0.68440366", "text": "function ExecuteSQL($sql)\n {\n $this->logger->Log(date(\"Y-m-d H:i:s: \") . $sql );\n $result = $this->getConnection()->query($sql);\n\n return $result;\n }", "title": "" }, { "docid": "188e956b72802d6d8591dd08fddb75cc", "score": "0.6842043", "text": "public function execute() {\n $start = microtime(true);\n $result = $this->statement->execute();\n $time = microtime(true) - $start;\n LoggedPDO::$log[] = array('query' => '[PS] ' . $this->statement->queryString,\n 'time' => round($time * 1000, 3));\n return $result;\n }", "title": "" }, { "docid": "62c2264bea4e5f37588d3bd92c8ba747", "score": "0.68359643", "text": "abstract public function executeTable(SqlCommand $command);", "title": "" }, { "docid": "166e198155828099b268b9bd746a6ba0", "score": "0.68358505", "text": "public function execute() {\n\t\tif (empty($this->statement)) {\n\t\t\treturn false;\n\t\t}\n\t\t# If the query if found is then executed to the database using the mysqli object mentioned above\n\t\t# To ensure that no more than one statement is fired the variable is then initialized as an empty string\n\t\t# Next step is to get the result using the fetch_records function\n\t\t$this->result = $this->link->query($this->statement);\n\t\t$this->statement = '';\n\t\treturn $this->fetch_records();\n\t}", "title": "" }, { "docid": "80175537f98069154a3f42432b9da657", "score": "0.68254733", "text": "function execute($stmnt)\n\t{\n\t\t$this->setLastQuery($stmnt);\n\t\t$result = 0;\n\t\t\n\t\tif($this->typeIs(self::db_type_mysql))\n\t\t\t$result = $this->db_handle->query($stmnt);\n\t\telse if($this->typeIs(self::db_type_postgre))\n\t\t\t$result = pg_query($stmnt);\n\t\t\n\t\tif(!$result)\n\t\t{\n\t\t\t$this->error_message = $this->getSQLError();\n\t\t\treturn 1;\n\t\t}\n\t\t\t\n\t\t$this->lastResult = $result;\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "3bd20761b0b19f1517adbfe98eff1520", "score": "0.6810082", "text": "public function executeQuery($sql, $params = []) {\n\t\t\t$con = Propel::getWriteConnection($this->dbName);\n\t\t\t$stmt = $con->prepare($sql);\n\n\t\t\tif (empty($params)){\n\t\t\t\treturn $stmt->execute();\n\t\t\t}\n\t\t\treturn $stmt->execute($params);\n\t\t}", "title": "" }, { "docid": "bdfd06e09eaeb3df2194394ab3c72098", "score": "0.6798193", "text": "public function Execute($query);", "title": "" }, { "docid": "fcc98c29b60dfa594e96d7e6c259b74b", "score": "0.6793823", "text": "public function execute(){}", "title": "" }, { "docid": "fcc98c29b60dfa594e96d7e6c259b74b", "score": "0.6793823", "text": "public function execute(){}", "title": "" }, { "docid": "fef9b9e5041e6de022b0e1ed7274b3a4", "score": "0.6793017", "text": "public function execute($sql) {\n\t\tif ( ! $this->is_connected()) {\n\t\t\tthrow new Throwable_SQL_Exception('Message: Failed to execute SQL statement. Reason: Unable to find connection.');\n\t\t}\n\t\t$command = @drizzle_query($this->resource, $sql);\n\t\tif ($command === FALSE) {\n\t\t\tthrow new Throwable_SQL_Exception('Message: Failed to execute SQL statement. Reason: :reason', array(':reason' => @drizzle_con_error($this->resource)));\n\t\t}\n\t\t$this->insert_id = (preg_match(\"/^\\\\s*(insert|replace)\\\\s+/i\", $sql))\n\t\t\t? @drizzle_result_insert_id($command)\n\t\t\t: FALSE;\n\t\t$this->sql = $sql;\n\t\t@drizzle_result_free($command);\n\t}", "title": "" }, { "docid": "340ecf02298641f99712f6b02989e221", "score": "0.6782796", "text": "abstract public function executeRow(SqlCommand $command);", "title": "" }, { "docid": "8bc333ee662835608b2fe757bfc5b86c", "score": "0.6776059", "text": "public function execute($sql){\n global $link;\n mysqli_query($link,$sql);\n }", "title": "" }, { "docid": "a3efb1326e6fa23c464f95448eec3bd3", "score": "0.67716", "text": "public function executed(): PDOStatementInterface;", "title": "" }, { "docid": "c4241ec9b15c4fd3bfe7a1796882957b", "score": "0.6766191", "text": "private function executeQuery($sql)\n {\n $stmt = $this->connection->prepare($sql);\n \n $stmt->execute(); \n \n if(!$resource){\n return $stmt;\n }\n \n throw new DBException($this->connection->errorCode(), $this->connection->errorInfo(), $sql);\n }", "title": "" }, { "docid": "ee209e55549c08b9b860c0d3aa2e0e8e", "score": "0.67622787", "text": "protected function ExecuteQuery()\n {\n $this->handle = $this->db->query($this->query, false);\n }", "title": "" }, { "docid": "c050c604062d78f85d5664d1295ef8a3", "score": "0.67617124", "text": "abstract function execute();", "title": "" }, { "docid": "57c6b8625f775763d975cb6290f2f468", "score": "0.6750443", "text": "final protected function execute($sql)\n {\n error_log(\"SQL: \" . $sql);\n return $this->db->query($sql);\n }", "title": "" }, { "docid": "c058fb1aca16f9869101431512f866e8", "score": "0.6745329", "text": "function statement_execute( $statement )\n {\n // protect the user from executing deletes or updates on\n // a statement without a where value set\n $type = $statement->get_type();\n if( ($type == MySQLStatement::UPDATE || \n $type == MySQLStatement::DELETE ) &&\n $statement->count_where() == 0 \n ){\n \n // fail this execute\n return false;\n }\n \n // get query and parameters\n $query = $statement->get_query();\n $params = $statement->get_params();\n \n \n // prepare the statement \n $this->prepare( 'db_generated_stmt', $query );\n \n // generate argument list for bind_param\n $args = array( 'db_generated_stmt', '' );\n \n $param_types = '';\n \n // loop and set in args\n for($i=0; $i<count($params); $i++ )\n {\n $param_types .= $params[$i]['type'];\n $args[$i+2] = $params[$i]['value'];\n }\n \n // set param types string\n $args[1] = $param_types;\n \n \n // finally call the bind_result method\n call_user_func_array(\n array(\n $this,\n 'bind_param'\n ),\n $args\n );\n \n // return execution status\n return $this->prepped_execute('db_generated_stmt');\n }", "title": "" }, { "docid": "cdaeef5a84b20518ac5cc7af988ad6eb", "score": "0.6741432", "text": "function executeStatement($statement,$values){\r\n $db=openDBConnexion();\r\n try {\r\n $db->beginTransaction();\r\n $statement->execute($values);\r\n $result = $statement->fetchAll();\r\n $db->commit();\r\n return $result;\r\n } catch (Exception $e) {\r\n $db->rollback();\r\n throw new databaseError();\r\n }\r\n\r\n\r\n}", "title": "" }, { "docid": "8bd9ac58d6e600598a7fe1ab88256e70", "score": "0.67360836", "text": "private function executeStatement($query, $type = \"Query\") {\n\t\t$statement\t= new Statement($query);\n\t\ttry {\n\t\t\t$statement->executeUpdate();\n\t\t}\n\t\tcatch (SQLException $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "title": "" }, { "docid": "bc53c3f8171ccfa6f95c8202ad90da11", "score": "0.67357785", "text": "function &execute_sql($sql) {\n\t$conn = &get_connection();\n\n\t//Prepare sql using conn and returns the statement identifier\n\t$statement = oci_parse($conn, $sql);\n\n\t//Execute a statement returned from oci_parse()\n\t$res=oci_execute($statement);\n\n\t//Release the connection\n\toci_close($conn);\n\t\n\tif ($res) {\n\t\t//Return the query results\n\t\treturn $statement;\n\t} else {\n\t\t$err = oci_error($statement); \n\t\techo htmlentities($err['message']);\n\t}\n}", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.67207444", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.67207444", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.67207444", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.67207444", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.67207444", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.67207444", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.67207444", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.67207444", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.67207444", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.67207444", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.67207444", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.67207444", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.67207444", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.67207444", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.67207444", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.67207444", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.67207444", "text": "public function execute();", "title": "" }, { "docid": "ca815cf53a2ff2dec9e53436ab345b73", "score": "0.6703326", "text": "public function sql ( $statement )\n\t{\n\t\t__manila_sql($this, $statement);\n\t}", "title": "" }, { "docid": "2b339134c9244ff3edf5b194fd463b05", "score": "0.6701051", "text": "public function execute($ddl){\n $sql = new Sql($this->getAdapter());\n\n $this->getAdapter()->query(\n $sql->buildSqlString($ddl),\n $this->getAdapter()::QUERY_MODE_EXECUTE\n );\n }", "title": "" }, { "docid": "bd5c2dd15c1133768a5c2de93a27494f", "score": "0.66937786", "text": "public function execSql($sql){\r\n $this->sql = $sql;\r\n return $this->exec();\r\n }", "title": "" }, { "docid": "1398c110dab8b5094a51300661a0cde9", "score": "0.66801804", "text": "function statement_execute( $statement )\n {\n // get query and parameters\n $query = $statement->get_query();\n $params = $statement->get_params();\n \n $this->prepare( 'db_generated_stmt', $query );\n \n // generate argument list for bind_param\n $args = array( 'db_generated_stmt', '' );\n \n $param_types = '';\n \n // loop and set in args\n for($i=0; $i<count($params); $i++ )\n {\n $param_types .= $params[$i]['type'];\n $args[$i+2] = $params[$i]['value'];\n }\n \n // set param types string\n $args[1] = $param_types;\n \n // finally call the bind_result method\n call_user_func_array(\n array(\n $this,\n 'bind_param'\n ),\n $args\n );\n \n // return execution status\n return $this->prepped_execute('db_generated_stmt');\n }", "title": "" }, { "docid": "4c41e2830bcd1c4d60a439f7365dbea6", "score": "0.6676874", "text": "public function execute($statement)\r\n\t{\r\n\t\tif ( empty($this->instance) )\r\n\t\t\t$this->connect($this->host, $this->database, $this->username, $this->password);\r\n\r\n \t\tif ( !$this->result = $this->instance->query($statement) )\r\n\t\t{\r\n\t\t\tthrow new SQLException('Error in completing your request: <strong>' . $statement . \"</strong>\\n\" .\r\n\t\t\t\t'Error: ' . $this->instance->error, $this->instance->errno);\r\n\t\t}\r\n\r\n\t\tif ( isset($this->instance->insert_id) )\r\n\t\t\t$this->last_id = $this->instance->insert_id;\r\n\r\n\t\tif ( isset($this->result->num_rows) )\r\n\t\t\t$this->num_rows = $this->result->num_rows;\r\n\r\n\t\t$this->affected_rows = $this->instance->affected_rows;\r\n\r\n\t\t$this->incrementQueries();\r\n\t\treturn $this->result;\r\n\t}", "title": "" }, { "docid": "e688221741ff3712aff89fb2c341af49", "score": "0.66740125", "text": "function execute($statement){\n\t\treturn oci_execute($statement, OCI_DEFAULT);\n\t}", "title": "" }, { "docid": "48cbe94b3cfa35187030d9196005ecdc", "score": "0.6668719", "text": "public function query($sqlStatement, array $binds = []);", "title": "" }, { "docid": "b9dd4165ce3f5c8f9d16a337d1d62850", "score": "0.6668317", "text": "function perform_sql($sql) {\n\t$stmnt = &execute_sql($sql);\n\toci_free_statement($stmnt);\n}", "title": "" }, { "docid": "4b8f377834a3aefd87bb0599d1507da7", "score": "0.6665924", "text": "public abstract function execute();", "title": "" }, { "docid": "4b8f377834a3aefd87bb0599d1507da7", "score": "0.6665924", "text": "public abstract function execute();", "title": "" }, { "docid": "4b8f377834a3aefd87bb0599d1507da7", "score": "0.6665924", "text": "public abstract function execute();", "title": "" }, { "docid": "4d19bd6576c2cff15d5bfe3543ec4ec9", "score": "0.6663919", "text": "public function execute() {\n\t\t\t// Select is the default - maybe it shouldn't be ?\n\t\t\t$this->queryString = \"SELECT * FROM \".$this->table.\" \";\n\t\t\t$this->appendWhereClause();\n\n\t\t\tif ($this->orderBy) {\n\t\t\t\t$this->queryString .= $this->orderBy->getClauseString();\n\t\t\t}\n\n\t\t\tif ($this->limit || $this->offset) {\n\t\t\t\t$this->addOffsetAndLimit();\n\t\t\t}\n\n\t\t\t$rawResults = $this->executeRawQuery(true);\n\t\t\treturn $this->hydrate($rawResults);\n\t\t}", "title": "" }, { "docid": "c798fb509a58de633d9d4f4cf3d0041a", "score": "0.66628647", "text": "private function execute($params = []) {\n\t\t$this->stmt->execute($params);\n\t}", "title": "" }, { "docid": "14d497bb30d7fc8178452a393ae2bc98", "score": "0.6652194", "text": "public function execute(){\n\t\t\tglobal $prepare, $preparedInsert, $preparedDelete, $preparedUpdate;\n\t\t\tif($prepare != null && ($preparedInsert != null || $preparedUpdate != null || $preparedDelete != null)){\n\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\t$db = $this->createDB();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif($preparedInsert != null){\n\t\t\t\t\t\t$preparedInsert = substr_replace($preparedInsert,\";\",strlen($preparedInsert)-1);\n\t\t\t\t\t\t$result = $db->exec($preparedInsert);\n\t\t\t\t\t}\n\t\t\t\t\tif($preparedUpdate != null){\n\t\t\t\t\t\t$preparedUpdate = substr_replace($preparedUpdate,\";\",strlen($preparedUpdate)-1);\n\t\t\t\t\t\t$result = $db->exec($preparedUpdate);\n\t\t\t\t\t}\n\t\t\t\t\tif($preparedDelete != null){\n\t\t\t\t\t\t$preparedDelete = substr_replace($preparedDelete,\";\",strlen($preparedDelete)-3);\n\t\t\t\t\t\t$result = $db->exec($preparedDelete);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$preparedInsert = null;\n\t\t\t\t\t$preparedUpdate = null;\n\t\t\t\t\t$preparedDelete = null;\n\t\t\t\t\t\n\t\t\t\t\treturn $result;\n\t\t\t\t}catch(Exception $e){\n\t\t\t\t\t\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "6bd1b37e0ce7e574091d1b3591ecd776", "score": "0.66521126", "text": "public function execute()\n\t{\n\t\treturn $this->engine()->execute();\n\t}", "title": "" }, { "docid": "bca3a8ce7af1282c0e197bdb77aa46d6", "score": "0.66432965", "text": "function execQueryStmt($statement)\n{\n\tmysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);\n\n\tmysqli_stmt_execute($statement);\n\t$result = mysqli_stmt_get_result($statement);\n\tmysqli_stmt_close($statement);\n\treturn $result;\n}", "title": "" } ]
75290a5d8d5caf78750dedd0519e4d30
Get the unique identifier for the user.
[ { "docid": "74e39e5bd6ce25501a8a3852c1211103", "score": "0.0", "text": "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "title": "" } ]
[ { "docid": "ea6b0d548017a2fb1186a22fc49140e5", "score": "0.89545506", "text": "public function getUserUniqueIdentifier()\n\t{\n\t\t$info = $this->getUserInfo();\n\t\t//return (int) $info['id'];\n\t\treturn $info['id'];\n\t}", "title": "" }, { "docid": "8961acd9bee05da345df85f2bd8271c6", "score": "0.82401884", "text": "public function userGetID()\n {\n $user = $this->get('security.token_storage')->getToken()->getUser();\n return $user->getId();\n }", "title": "" }, { "docid": "c9b23136bc610dde3ee0130d697ac329", "score": "0.8176658", "text": "public function getUserID() {\n\t\treturn $this->credentials->getUserID();\n\t}", "title": "" }, { "docid": "c03035d2d298a1442e370dd1c80412fc", "score": "0.816969", "text": "public function getUserIdentifier()\n {\n return $this->user->codigoPessoa;\n }", "title": "" }, { "docid": "de9c4eecef111555cd74e266666ddb24", "score": "0.81394655", "text": "public function getUserID() {\n\t\treturn $this->GetField(DotCoreUserDAL::USER_ID);\n\t}", "title": "" }, { "docid": "1ba34748382c000569ca7eb118c95c62", "score": "0.8074643", "text": "public function getUserUniqueId()\n {\n return $this->getParameter('userUniqueId');\n }", "title": "" }, { "docid": "31ad1ce7fd64ddf69c768660091256f4", "score": "0.80711776", "text": "public static function UserId()\r\n\t{\r\n\t\t\r\n\t\t$ret = Yii::app()->user->getId();\r\n\t\treturn $ret;\r\n\t}", "title": "" }, { "docid": "944cfe506ae85a8600cf72078e975f92", "score": "0.8027651", "text": "public function getUserID() {\n return $this->_getField(\"userID\", -1, 2);\n }", "title": "" }, { "docid": "b67d49ef81eacd6a9919ecfb20351b61", "score": "0.8024118", "text": "public function getUserIdentifier() {\n return $this->userIdentifier;\n }", "title": "" }, { "docid": "b67d49ef81eacd6a9919ecfb20351b61", "score": "0.8024118", "text": "public function getUserIdentifier() {\n return $this->userIdentifier;\n }", "title": "" }, { "docid": "6d4428f4cf866e2b6e66b896c4bdd941", "score": "0.80218", "text": "public function getUserId() {\n $authData = $this->getAuthData();\n\n if (isset($authData[$this->pIdField])) {\n return $authData[$this->pIdField];\n } else {\n return $this->getUserName();\n }\n }", "title": "" }, { "docid": "5861f4443c383e957007482f2ed24cc3", "score": "0.8007228", "text": "public function getIdUser()\n {\n $token = $this->getToken(3);\n \n return $token['id'];\n }", "title": "" }, { "docid": "f973beeaf9b19ee5c68d04d2dc2ee57e", "score": "0.79890084", "text": "public static function id()\n {\n $user = get_instance()->auth->get_user();\n return $user ? $user->id : 0;\n }", "title": "" }, { "docid": "6aafc43f0f02737eb52001c247d064e1", "score": "0.7968721", "text": "public function id()\n {\n if ($this->user()) {\n return $this->user()->getAuthIdentifier();\n }\n }", "title": "" }, { "docid": "ef71eabca2b858465751a16baf116300", "score": "0.7942448", "text": "function user_id()\r\n\t{\r\n\t\t$authenticate = service('authentication');\r\n\t\t$authenticate->check();\r\n\t\treturn $authenticate->id();\r\n\t}", "title": "" }, { "docid": "bf124b5c3beea314245ddf9e2dafde0c", "score": "0.79351974", "text": "public function getUserIdentifier(): string\n {\n return (string) $this->username;\n }", "title": "" }, { "docid": "bf124b5c3beea314245ddf9e2dafde0c", "score": "0.79351974", "text": "public function getUserIdentifier(): string\n {\n return (string) $this->username;\n }", "title": "" }, { "docid": "bf124b5c3beea314245ddf9e2dafde0c", "score": "0.79351974", "text": "public function getUserIdentifier(): string\n {\n return (string) $this->username;\n }", "title": "" }, { "docid": "16f4ef956cdf4813096904844074a0ac", "score": "0.79150146", "text": "public function getId()\n {\n return $this->user->uid;\n }", "title": "" }, { "docid": "cab4239c645e5fbccbb903fc6fb5c4c6", "score": "0.7910551", "text": "public function getUserId()\n {\n $value = $this->get(self::user_id);\n return $value === null ? (integer)$value : $value;\n }", "title": "" }, { "docid": "cab4239c645e5fbccbb903fc6fb5c4c6", "score": "0.7910551", "text": "public function getUserId()\n {\n $value = $this->get(self::user_id);\n return $value === null ? (integer)$value : $value;\n }", "title": "" }, { "docid": "74de7559cd52236def2c10f5741a7cee", "score": "0.79045767", "text": "public function getUserIdentifier(): string\n {\n return (string)$this->username;\n }", "title": "" }, { "docid": "d32eec9e849ebc1c5b4025b2babec6c7", "score": "0.7885795", "text": "public function getUserID()\r\n {\r\n return $this->getState('UserID');\r\n }", "title": "" }, { "docid": "7334ff7c58fc9aa55a9fd6074d496ce8", "score": "0.78502715", "text": "public function id()\n {\n if (! is_null($this->user)) {\n return $this->user->id;\n }\n }", "title": "" }, { "docid": "40f7610ff17033ea4a3c6261f9f64ea9", "score": "0.7849634", "text": "public function getUserId()\n {\n //get user id from session\n $user_id = \\Session::get('user_id');\n if ($user_id) {\n return $user_id;\n } else {\n return '';\n }\n }", "title": "" }, { "docid": "aa7ffeb811ae707a27ab595802ab81f0", "score": "0.78449404", "text": "public function getUserID()\n\t{\n\t\treturn $this->user_id;\n\t}", "title": "" }, { "docid": "c91e70e890c9950db27a98bb24617981", "score": "0.78448266", "text": "function get_user_id();", "title": "" }, { "docid": "f6ef1fd4aaee5c8639ec69e3ed7c0b71", "score": "0.7840806", "text": "public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "f6ef1fd4aaee5c8639ec69e3ed7c0b71", "score": "0.7840806", "text": "public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "f6ef1fd4aaee5c8639ec69e3ed7c0b71", "score": "0.7840806", "text": "public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "f6ef1fd4aaee5c8639ec69e3ed7c0b71", "score": "0.7840806", "text": "public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "f6ef1fd4aaee5c8639ec69e3ed7c0b71", "score": "0.7840806", "text": "public function getUserIdentifier(): string\n {\n return (string) $this->email;\n }", "title": "" }, { "docid": "4c7b999613fcf8fdd66f4e56167270fd", "score": "0.7811839", "text": "public function getUserId()\n {\n return empty($this->user) ? -1 : $this->user->getUid();\n }", "title": "" }, { "docid": "8b7e00decf4137fd19f1c435cd7b3211", "score": "0.78039217", "text": "public function getUserIdentifier(): string\n {\n return (string)$this->email;\n }", "title": "" }, { "docid": "be2427c1c3f906c7f0eb271dd9f72e68", "score": "0.7800686", "text": "public function getUserId() {\n return $this->user->getId();\n }", "title": "" }, { "docid": "858c7e1667243ec25cfb30e2338e4fd1", "score": "0.77972543", "text": "public function getUserId();", "title": "" }, { "docid": "858c7e1667243ec25cfb30e2338e4fd1", "score": "0.77972543", "text": "public function getUserId();", "title": "" }, { "docid": "858c7e1667243ec25cfb30e2338e4fd1", "score": "0.77972543", "text": "public function getUserId();", "title": "" }, { "docid": "19d1d31c5e4726e60b338c620ce0166a", "score": "0.77868694", "text": "public function getUserId() {\n\t\treturn $this->user->getId();\n\t}", "title": "" }, { "docid": "486bbb908965d2444150f7915eb1cabe", "score": "0.7777419", "text": "public function getUid() {\n return $this->get(self::UID);\n }", "title": "" }, { "docid": "dc5cc5c1144bf87c053c871e90a4ef53", "score": "0.7766838", "text": "public function getUserId()\n\t{\n\t\t$this->loadUser();\n\n\t\treturn $this->_user === null ? null : $this->_user->id;\n\t}", "title": "" }, { "docid": "ef61a99b8f508776de03e23bbfa45156", "score": "0.77656436", "text": "function getUserId() {\n return $this->getFieldValue('user_id');\n }", "title": "" }, { "docid": "c6624c5afb67162f1695546bf4c3f9d0", "score": "0.776533", "text": "public function id()\n {\n if (!$this->check()) {\n return null;\n }\n\n return $this->user->ID;\n }", "title": "" }, { "docid": "373f42905472402d3fec4d83ea04aae8", "score": "0.7764924", "text": "public function getUserID()\n {\n return $this->UserID;\n }", "title": "" }, { "docid": "135b34654e15db7296c1422c3e53a17c", "score": "0.7750807", "text": "public function getUid();", "title": "" }, { "docid": "183bac1606d82fefbeadc451318ccd83", "score": "0.7733075", "text": "public function getIdentifier(): string\n {\n return $this->identifier ?: $this->uid;\n }", "title": "" }, { "docid": "5b958d303047f0bfaba6e328e7133069", "score": "0.7727475", "text": "public static function user_id()\n {\n return self::is_logged_in() ? self::get_user()->pk() : null;\n }", "title": "" }, { "docid": "49c8c5d8714cadb56911820591ef2cdc", "score": "0.77190965", "text": "public function getUserId()\n {\n $rtn = $this->data['user_id'];\n\n return $rtn;\n }", "title": "" }, { "docid": "2faf66488b2a3af110c7ec0018ee0075", "score": "0.77081156", "text": "public function getUserID()\n {\n return $this->userID;\n }", "title": "" }, { "docid": "2faf66488b2a3af110c7ec0018ee0075", "score": "0.77081156", "text": "public function getUserID()\n {\n return $this->userID;\n }", "title": "" }, { "docid": "2faf66488b2a3af110c7ec0018ee0075", "score": "0.77081156", "text": "public function getUserID()\n {\n return $this->userID;\n }", "title": "" }, { "docid": "2be08731eacd63754f7dc3695742deb7", "score": "0.77064073", "text": "public function getUserId()\n {\n $this->checkToken();\n return $this->userId;\n }", "title": "" }, { "docid": "777498440173678852d13d1fcf1f6c5d", "score": "0.7695303", "text": "public function user_id()\n\t{\n\t\tglobal $current_user;\n\t\tget_current_user();\n\t\treturn $current_user->ID;\n\t}", "title": "" }, { "docid": "1c35a77b6b6d096a4ef2f9c2c85c538e", "score": "0.7686513", "text": "public function getUId(): string\n {\n return $this->uid;\n }", "title": "" }, { "docid": "5c9c5fa3cf75752b1fbd58d553e92699", "score": "0.76795876", "text": "public function getUserId() {\n\t\treturn $this->session->read('Auth.User.id');\n\t}", "title": "" }, { "docid": "ad91d6d9796ccea9b327ec9bf0d97ba5", "score": "0.767308", "text": "public function getUniqueIdentifier();", "title": "" }, { "docid": "ad91d6d9796ccea9b327ec9bf0d97ba5", "score": "0.767308", "text": "public function getUniqueIdentifier();", "title": "" }, { "docid": "7e6594bc5785415e926ee2882074052e", "score": "0.7666774", "text": "public function getUserIdentifier(): string\n {\n return $this->getNickname();\n }", "title": "" }, { "docid": "b88fd7fd84462183ccd3cbf376c932a9", "score": "0.7665174", "text": "public function getUserId() {\r\n\t\t$this->userId = getUserId($this->user);\r\n\t}", "title": "" }, { "docid": "69dc9964406d154bdf88ab314092ddd6", "score": "0.7663947", "text": "public function UserID() {\r\n\t return nullInt($this->settings['id']);\r\n }", "title": "" }, { "docid": "aca9440306a50f1b64e6b0b6e3da3dc3", "score": "0.76591843", "text": "public function getUserID()\n\t{\n\t\treturn $this->userID;\n\t}", "title": "" }, { "docid": "9e8f9fae5c20a6d131aed439c13cf35d", "score": "0.765484", "text": "private function getUserId() {\n\t\t// Do we have a user id?\n\t\tif (!empty($this->server->post['ext_d2l_username'])) {\n\t\t\treturn strip_tags($this->server->post['ext_d2l_username']);\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "b735c7cc7df54861053ce50dba1315a6", "score": "0.7649425", "text": "public function getId()\n {\n return $this->user->getId();\n }", "title": "" }, { "docid": "d975eea6b7686819354f4aceb4462cc0", "score": "0.7645179", "text": "public function getCustomUserId();", "title": "" }, { "docid": "95af68e559209c196193d20a299c17fc", "score": "0.7629438", "text": "public function getAuthIdentifierName()\n {\n return 'user_id';\n }", "title": "" }, { "docid": "5744346b0263a7aa6d9b418081f3c2af", "score": "0.76286024", "text": "function getUserId() {\n\t\treturn $this->getData('userId');\n\t}", "title": "" }, { "docid": "e3851b6cf3c67a80fafa7e706c412f05", "score": "0.7625021", "text": "function getUid()\n\t{\n\t\t$this->uid = $this->getUser();\n\t\treturn $this->uid;\n\t}", "title": "" }, { "docid": "07cd0976fa572378f67ee46d8d0717a3", "score": "0.76236284", "text": "public function getUserId() : Uuid\n\t{\n\t\treturn($this->userId);\n\t}", "title": "" }, { "docid": "f7665548af33a0f088e9647112f23fe1", "score": "0.7609752", "text": "public function getUserID() {\r\n\t\treturn ($this->crLoginCredentials->getUserID());\r\n\t}", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.76062983", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.76062983", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.76062983", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.76062983", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.76062983", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.76062983", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.76062983", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.76062983", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.76062983", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.76062983", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.76062983", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.76062983", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.76062983", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "a43359afff53785bc17ad17a9d1674a5", "score": "0.76021445", "text": "public function userId()\n {\n return $this->get(\"user/id\");\n }", "title": "" }, { "docid": "79918e153d521f050341beb565cc2661", "score": "0.7597198", "text": "public function getUserId() {\n\t\treturn $this->user_id;\n\t}", "title": "" }, { "docid": "954f261e78656e36eda7812b7fe03451", "score": "0.7595004", "text": "public function getUserId(){\n $resultJson = json_decode($this->apiRequest($this->userUri.'/me'));\n return $resultJson->data->id;\n }", "title": "" }, { "docid": "ecac22f3db5e41f47d5fda9a2a606f2b", "score": "0.759461", "text": "public function getUserId()\n {\n try {\n return users('id', $this->getGuard());\n } catch (\\Exception $e) {\n return;\n }\n\n }", "title": "" }, { "docid": "9cb330191d5b2afb7ec05c19b6d00333", "score": "0.759419", "text": "public function getId() {\n return $this->systemUser->user_id;\n }", "title": "" }, { "docid": "03f0714c9ee8316618507dddc12e8b18", "score": "0.758623", "text": "public function getUserId()\n {\n $user = $this->getModel()->getUser();\n return $this->user_id = $user['id'];\n }", "title": "" }, { "docid": "110f3f0eb71f3dea9fb07dfd82e6ce9e", "score": "0.7571489", "text": "abstract public function get_user_id();", "title": "" }, { "docid": "6335525e0ddeb36f83a597eaab5dc49e", "score": "0.75703984", "text": "protected function getUserId()\n {\n return $this->applicationSession->get('UserID');\n }", "title": "" }, { "docid": "29d84da426627c7136e268bbf8a4d98e", "score": "0.7568885", "text": "public function getUID() {\n\t\tif (!isset($this->uid)) {\n\t\t\t$this->fetchDetails();\n\t\t}\n\t\treturn $this->uid;\n\t}", "title": "" }, { "docid": "91d6d9b8fddcbfdc71fb28a6ed30e8d0", "score": "0.7558009", "text": "public function getUserId()\n\t{\n\t\treturn $this->user_id;\n\t}", "title": "" }, { "docid": "91d6d9b8fddcbfdc71fb28a6ed30e8d0", "score": "0.7558009", "text": "public function getUserId()\n\t{\n\t\treturn $this->user_id;\n\t}", "title": "" }, { "docid": "3789f52a1e79af95fb6ee7e6db757808", "score": "0.75528914", "text": "public static function uid()\n\t{\n\t\t$uid = Uuid::uuid1();\n\n \treturn str_replace('-', '', $uid->toString());\n\t}", "title": "" }, { "docid": "92dca826bb293e7813383d7a85dfb407", "score": "0.7550069", "text": "public function GetUserId() {\n return $this->_user_id;\n }", "title": "" }, { "docid": "f73823d026183fd601fe168a61d62e7e", "score": "0.7540982", "text": "public function getId()\n {\n return (property_exists($this->_user, 'id')) ? $this->_user->id : 0;\n }", "title": "" }, { "docid": "2b3cd741011ee41bafade76eb4e717c3", "score": "0.75360566", "text": "public function getUserid()\n {\n return $this->userid;\n }", "title": "" }, { "docid": "2b3cd741011ee41bafade76eb4e717c3", "score": "0.75360566", "text": "public function getUserid()\n {\n return $this->userid;\n }", "title": "" }, { "docid": "58bb3388657f13e5e73f0c5e8d135b6b", "score": "0.7530283", "text": "public static function getUid() {\n return \\Drupal::currentUser()->id();\n }", "title": "" }, { "docid": "cb0534d74a5e4c4a8feda3cbbae55568", "score": "0.75272924", "text": "public function getUser_id()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "cb0534d74a5e4c4a8feda3cbbae55568", "score": "0.75272924", "text": "public function getUser_id()\n {\n return $this->user_id;\n }", "title": "" } ]
9b49e3cab20531a66b9b5ee18d7f43e2
Displays a single LicensesDocumentsPage model.
[ { "docid": "e1db9d8c78d52b65de8b8c7ea57830a1", "score": "0.0", "text": "public function actionView($id)\n {\n return $this->render('view', [\n 'model' => $this->findModel($id),\n ]);\n }", "title": "" } ]
[ { "docid": "b42a0928e7ebb3da47b060b2c91abd48", "score": "0.779068", "text": "public function actionIndex()\n {\n $searchModel = new LicensesDocumentsPageSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "1535e67b130040c74fd193505b63ddce", "score": "0.747015", "text": "public function actionCreate()\n {\n $model = new LicensesDocumentsPage();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "b4438e8217080c6e657ef439770f0ce2", "score": "0.71958566", "text": "public function show()\n {\n return view('admin.company.document.list');\n }", "title": "" }, { "docid": "ec1df94b6f71402f088229fcbf6981f9", "score": "0.6657291", "text": "public function index()\n\t{\n\t\t$data = Documents::orderBy('id', 'desc')->paginate(PAGINATE);\n\t\treturn View::make('admin.document.index')->with(compact('data'));\n\t}", "title": "" }, { "docid": "4659bbf49d23509fe759a9bdaeebeb77", "score": "0.65868497", "text": "public function index() {\n $documents = Documento::orderByDesc('updated_at')->paginate(10);\n\n return view('professor.documents.index', ['documents' => $documents]);\n }", "title": "" }, { "docid": "94407cbfdb6483098a0aed4d4311e65f", "score": "0.657383", "text": "public function index()\n {\n $docs = Document::all();\n return view('admin.document.index', ['docs' => $docs]);\n }", "title": "" }, { "docid": "523e21ae1cf6a8f4e3d9e82a13992f89", "score": "0.65553445", "text": "public function show(Document $document)\n {\n //\n }", "title": "" }, { "docid": "523e21ae1cf6a8f4e3d9e82a13992f89", "score": "0.65553445", "text": "public function show(Document $document)\n {\n //\n }", "title": "" }, { "docid": "523e21ae1cf6a8f4e3d9e82a13992f89", "score": "0.65553445", "text": "public function show(Document $document)\n {\n //\n }", "title": "" }, { "docid": "523e21ae1cf6a8f4e3d9e82a13992f89", "score": "0.65553445", "text": "public function show(Document $document)\n {\n //\n }", "title": "" }, { "docid": "523e21ae1cf6a8f4e3d9e82a13992f89", "score": "0.65553445", "text": "public function show(Document $document)\n {\n //\n }", "title": "" }, { "docid": "523e21ae1cf6a8f4e3d9e82a13992f89", "score": "0.65553445", "text": "public function show(Document $document)\n {\n //\n }", "title": "" }, { "docid": "523e21ae1cf6a8f4e3d9e82a13992f89", "score": "0.65553445", "text": "public function show(Document $document)\n {\n //\n }", "title": "" }, { "docid": "523e21ae1cf6a8f4e3d9e82a13992f89", "score": "0.65553445", "text": "public function show(Document $document)\n {\n //\n }", "title": "" }, { "docid": "523e21ae1cf6a8f4e3d9e82a13992f89", "score": "0.65553445", "text": "public function show(Document $document)\n {\n //\n }", "title": "" }, { "docid": "2e1fec0022af798fe74d1119186d72dc", "score": "0.6497996", "text": "public function indexAction()\n {\n\t\tif(!Engine_Api::_()->core()->hasSubject()) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\n\t\t//GET DOCUMENT SUBJECT\n\t\t$this->view->document = $document = Engine_Api::_()->core()->getSubject();\n\t\tif(empty($document)) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\n\t\t//GET VIEWER DETAIL\n\t\t$viewer = Engine_Api::_()->user()->getViewer();\n\t\t$this->view->viewer_id = $viewer_id = $viewer->getIdentity();\n\n //GET USER LEVEL ID\n if (!empty($viewer_id)) {\n $level_id = $viewer->level_id;\n } else {\n $level_id = Engine_Api::_()->getDbtable('levels', 'authorization')->fetchRow(array('type = ?' => \"public\"))->level_id;\n }\n\n\t\t//GET WIDGET SETTINGS\n\t\t$this->view->documentViewerHeight = $this->_getParam('documentViewerHeight', 600);\n\t\t$this->view->documentViewerWidth = $this->_getParam('documentViewerWidth', 730);\n\n //SET SCRIBD API AND SCECRET KEY\n $scribd_api_key = Engine_Api::_()->getApi('settings', 'core')->document_api_key;\n $scribd_secret = Engine_Api::_()->getApi('settings', 'core')->document_secret_key;\n $scribd = new Scribd($scribd_api_key, $scribd_secret);\n\n\t\t//INCREMENT DOCUMENT VIEWS IF VIEWER IS NOT OWNER\n\t\tif (!$document->getOwner()->isSelf($viewer)) {\n\t\t\t$document->views++;\n\t\t}\n\n //CHECK THAT VIEWER CAN RATE THE DOCUMENT OR NOT\n $this->view->can_rate = Engine_Api::_()->getApi('settings', 'core')->getSetting('document.rating', 1);\n\n //WHICH TYPE OF DOCUMENT READER WE HAVE TO SHOW TO USER\n $this->view->document_viewer = Engine_Api::_()->getApi('settings', 'core')->getSetting('document.viewer', 1);\n\n //GET CATEGORY TABLE\n\t\t$this->view->categoryTable = $categoryTable = Engine_Api::_()->getDbtable('categories', 'document');\n\n\t\t//GET CATEGORIES DETAIL\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n $categoriesNmae = $categoryTable->getCategory($document->category_id);\n if (!empty($categoriesNmae->category_name)) {\n $this->view->category_name = $categoriesNmae->category_name;\n }\n $subcategory_name = $categoryTable->getCategory($document->subcategory_id);\n if (!empty($subcategory_name->category_name)) {\n $this->view->subcategory_name = $subcategory_name->category_name;\n }\n //GET SUB-SUB-CATEGORY\n $subsubcategory_name = $categoryTable->getCategory($document->subsubcategory_id);\n if (!empty($subsubcategory_name->category_name)) {\n $this->view->subsubcategory_name = $subsubcategory_name->category_name;\n }\n\n //SET SCRIBD USER ID\n $scribd->my_user_id = $document->owner_id;\n\n\t\t$this->view->doc_full_text = '';\n\t\t$document_include_full_text = Engine_Api::_()->getApi('settings', 'core')->getSetting('document.include.full.text', 1);\n\t\tif(!empty($viewer_id)) {\n\t\t\tif ($document->download_allow) {\n\t\t\t\tif($document_include_full_text == 1) {\n\t\t\t\t\t$this->view->doc_full_text = $document->fulltext;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif($document->status == 1 && $document->download_allow) {\n\t\t\t$document_visitor_fulltext = Engine_Api::_()->getApi('settings', 'core')->getSetting('document.visitor.fulltext', 1);\n\t\t\tif ($document_include_full_text == 1 && $document_visitor_fulltext == 1) {\n\t\t\t\t$this->view->doc_full_text = $document->fulltext;\n\t\t\t}\n\t\t}\n\n\t\t$stat = null;\n\t\tif(!empty($document->doc_id)) {\n\t\t\ttry {\n\t\t\t\t$stat = trim($scribd->getConversionStatus($document->doc_id));\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$this->view->excep_message = $message = $e->getMessage();\n\t\t\t\t$this->view->excep_error = 1;\n\t\t\t}\n\t\t}\n\n if ($stat == 'DONE') {\n try {\n //GETTING DOCUMENT'S FULL TEXT\n $texturl = $scribd->getDownloadUrl($document->doc_id, 'txt');\n if ($document->status != 1) {\n $texturl = trim($texturl['download_link']);\n $file_contents = file_get_contents($texturl);\n if (empty($file_contents)) {\n $site_url = $texturl;\n $ch = curl_init();\n $timeout = 0; // set to zero for no timeout\n curl_setopt($ch, CURLOPT_URL, $site_url);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n\n ob_start();\n curl_exec($ch);\n curl_close($ch);\n $file_contents = ob_get_contents();\n ob_end_clean();\n }\n $full_text = $file_contents;\n\n $setting = $scribd->getSettings($document->doc_id);\n $thumbnail_url = trim($setting['thumbnail_url']);\n\n //UPDATING DOCUMENT STATUS AND FULL TEXT\n $document->fulltext = $full_text;\n $document->thumbnail = $thumbnail_url;\n $document->status = 1;\n\n\t\t\t\t\t//ADD ACTIVITY ONLY IF DOCUMENT IS PUBLISHED\n\t\t\t\t\tif ($document->draft == 0 && $document->approved == 1 && $document->status == 1 && $document->activity_feed == 0) {\n\n\t\t\t\t\t\t//GET DOCUMENT OWNER OBJECT\n\t\t\t\t\t\t$creator = Engine_Api::_()->getItem('user', $document->owner_id);\n\n\t\t\t\t\t\t//GET ACTIVITY TABLE\n\t\t\t\t\t\t$activityTable = Engine_Api::_()->getDbtable('actions', 'activity');\n\n\t\t\t\t\t\t$action = $activityTable->addActivity($creator, $document, 'document_new');\n\n\t\t\t\t\t\t//MAKE SURE ACTION EXISTS BEFORE ATTACHING THE DOUCMENT TO THE ACTIVITY\n\t\t\t\t\t\tif($action != null) {\n\t\t\t\t\t\t\t$activityTable->attachActivity($action, $document);\n\t\t\t\t\t\t\t$document->activity_feed = 1;\n\t\t\t\t\t\t\t$document->save();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n }\n } catch (Exception $e) {\n if ($document->status != 3 && $e->getCode() == 619) {\n $document->status = 3;\n\t\t\t\t\t$document->save();\n\n\t\t\t\t//SEND EMAIL TO DOCUMENT OWNER IF DOCUMENT HAS BEEN DELETED FROM SCRIBD\n\t\t\t\tEngine_Api::_()->document()->emailDocumentDelete($document);\n }\n }\n $document->save();\n } elseif ($stat == 'ERROR') {\n if ($document->status != 2) {\n $document->status = 2;\n $document->save();\t\t\t\n }\n } else {\n $document->save();\n }\n\n\t\tif(Engine_Api::_()->getApi('settings', 'core')->getSetting('document.thumbs', 0) && empty($document->photo_id) && $document->status == 1 && !empty($document->thumbnail)) {\n\t\t\t$document->photo_id = $document->setPhoto();\n\t\t\t$document->save();\n\t\t}\n\n\t\t//DELETE DOCUMENT FROM SERVER IF ALLOWED BY ADMIN AND HAS STATUS ONE OR TWO\n\t\t$document_save_local_server = Engine_Api::_()->getApi('settings', 'core')->getSetting('document.save.local.server', 1);\n\t\tif($document_save_local_server == 0 && ($document->status == 1 || $document->status == 2)) {\n\t\t\tEngine_Api::_()->document()->deleteServerDocument($document->document_id);\n\t\t}\n\n //SETTING PARAMETERS FOR SECURE DOCUMENT\n if ($viewer_id == 0) {\n $uid = mt_rand(1000, 100000);\n } else {\n $uid = $viewer_id;\n }\n $scribd_secret = Engine_Api::_()->getApi('settings', 'core')->document_secret_key;\n $sessionId = session_id();\n $signature = md5($scribd_secret . 'document_id' . $document->doc_id . 'session_id' . $sessionId . 'user_identifier' . $uid);\n $this->view->uid = $uid;\n $this->view->sessionId = $sessionId;\n $this->view->signature = $signature;\n\t\t\n //FIND DOCUMENT OWNER TAGS\n $this->view->documentTags = $document->tags()->getTagMaps();\n\n\t\t//SAVE THUMBNAILS ON SITE SERVER\n\t\tif(Engine_Api::_()->getApi('settings', 'core')->getSetting('document.thumbs', 0)) {\n\t\t\tEngine_Api::_()->getDbtable('documents', 'document')->updateThumbs();\n\t\t}\n\n\t\t//GET RATING TABLE\n\t\t$tableRating = Engine_Api::_()->getDbTable('ratings', 'document');\n $this->view->rating_count = $tableRating->countRating($document->getIdentity());\n $this->view->document_rated = $tableRating->previousRated($document->getIdentity(), $viewer_id);\n\n $view = $this->view;\n $view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($document);\n }", "title": "" }, { "docid": "55e31528244d072a2a181e78478c81a5", "score": "0.64811444", "text": "public function index()\n {\n \n $documents = Documents::active()->get();\n \n $packets = SysDeposit::active()->get();\n \n return view('cabinet.documents.show', compact(['documents','packets']));\n }", "title": "" }, { "docid": "65fe42a6f5245377f02870bfff167d6c", "score": "0.645888", "text": "public function indexAction() {\r\n try {\r\n $pageHeading = \"Documents\";\r\n $this->view->page_heading = $pageHeading;\r\n $this->view->data_page = \"tables\";\r\n \r\n // get all the document information...\r\n $sharedUserId = $this->getStaffUserId();\r\n $objDocumentEntity = new Base_Model_ObtorLib_App_Core_Doc_Entity_Document();\r\n $objDocumentService = new Base_Model_ObtorLib_App_Core_Doc_Service_Document();\r\n $objDocumentEntity->setSharedUserId($sharedUserId);\r\n $objDocumentService->document = $objDocumentEntity;\r\n \r\n $objPaggination = new Base_Model_ObtorLib_Base_Lib_Paggination();\r\n $page = $this->_getParam('page', 1);\r\n $objPaggination->CurrentPage = $page;\r\n $objPaggination->TotalResults = $objDocumentService->searchCountSharedDoc();\r\n $paginationData = $objPaggination->getPaggingData();\r\n $pageLimit1 = $paginationData['MYSQL_LIMIT1'];\r\n $pageLimit2 = $paginationData['MYSQL_LIMIT2'];\r\n\r\n $limit = \" LIMIT $pageLimit1,$pageLimit2\";\r\n\r\n\r\n $objDocumentService->document = $objDocumentEntity;\r\n $documentsInfo = $objDocumentService->searchSharedDoc($limit);\r\n $this->view->documentInformation = $documentsInfo;\r\n \r\n $this->view->pageNum = $page;\r\n $this->view->rowsPerPage = $objPaggination->ResultsPerPage;\r\n $this->view->paggination = $objPaggination;\r\n \r\n \r\n } catch (Exception $ex) {\r\n throw new Exception('<ERROR>' . $ex->getMessage() . \"\\n\");\r\n }\r\n }", "title": "" }, { "docid": "b7686ddfecb4878c929e64061aab230f", "score": "0.64582056", "text": "public function index()\n {\n $documents = $this->customerDocument->getDocuments(auth()->guard('customer')->user()->id);\n\n $productDocument = $marketingDocument = [];\n\n foreach($documents as $document) {\n if ($document->type == 'marketing') {\n $marketingDocument[] = $document;\n } else if ($document->type == 'product') {\n $productDocument[] = $document;\n } else if ($document->type == 'other') {\n $otherDocument[] = $document;\n }\n }\n\n return view($this->_config['view'], compact('productDocument', 'marketingDocument', 'otherDocument'));\n }", "title": "" }, { "docid": "8e650c7937002419ef1b8862b4fa9c36", "score": "0.6458012", "text": "public function index()\n {\n $documents = Document::all();\n return view('document.index',compact('documents'));\n }", "title": "" }, { "docid": "5d616fe981bcdd8c666e383d8389dd11", "score": "0.64568824", "text": "public function index()\n {\n $document = Document::select('id','agency_id','document_name')->with('agency:id,agency_code');\n\n return view('document.index', ['documents' => $document->paginate(15)]);\n }", "title": "" }, { "docid": "11dfc57eddbf8102b1c71615e8396956", "score": "0.6449882", "text": "public function index(){\n $companyId = Auth::user()->companyId ;\n $cargoDocuments = CargoDocument::all();\n return View::make('cargodocument.index')->with('cargoDocuments', $cargoDocuments);\n }", "title": "" }, { "docid": "88d2406e9a28e0254e63fa2b4fceefff", "score": "0.6443941", "text": "public function index()\n {\n $documents = Document::all();\n\n return view('documents.index', compact('documents'));\n }", "title": "" }, { "docid": "66e205e08193d8da6720c31fe8775a4f", "score": "0.6434877", "text": "public function index()\n {\n $docs = \\App\\Doc::all();\n return View('Doc.index',compact('docs'));\n }", "title": "" }, { "docid": "3fcfb06dd594aa368ba613f56322274d", "score": "0.6406933", "text": "public function index()\n {\n $no = 1;\n $documents = Document::all();\n // dd($document);\n return view ('documents.index',compact('documents','no'));\n }", "title": "" }, { "docid": "5b5056368458727e53b10c6acc4538f8", "score": "0.64046454", "text": "public function index1()\n {\n // if(!Gate::allows('isAdmin')){\n // abort(401);\n // }\n $admindocs = Document::all();\n return view('admin.document.index1',compact('admindocs'));\n }", "title": "" }, { "docid": "5f40e864463eaae85ac08ca85d958907", "score": "0.6379937", "text": "function index()\n {\n if (!$this->ion_auth->is_admin()) {\n // redirect them to the login page\n redirect('/', 'refresh');\n } else {\n\n $data['documents'] = $this->Document_model->get_all_documents();\n $data['_view'] = 'document/index';\n $this->load->view('layouts/main', $data);\n }\n }", "title": "" }, { "docid": "18c609218d574a4ba715a7dc8b723861", "score": "0.63738936", "text": "function view() {\n if($this->active_document->isLoaded()) {\n if ($this->active_document->canView($this->logged_user)) {\n\n // Single or quick view\n if($this->request->isSingleCall() || $this->request->isQuickViewCall()) {\n $this->wireframe->print->enable();\n\n if (Documents::canManage($this->logged_user)) {\n $this->wireframe->actions->add('add_text_document', lang('New Text Document'), Router::assemble('documents_add_text'), array(\n 'onclick' => new FlyoutFormCallback('document_created', array(\n 'success_message' => lang('Text document has been created')\n )),\n 'icon' => AngieApplication::getImageUrl('layout/button-add.png', ENVIRONMENT_FRAMEWORK, AngieApplication::getPreferedInterface()),\n ));\n\n $this->wireframe->actions->add('upload_document', lang('Upload File'), Router::assemble('documents_upload_file'), array(\n 'onclick' => new FlyoutFormCallback('document_created', array(\n 'success_message' => lang('File has been uploaded')\n )),\n 'icon' => AngieApplication::getImageUrl('layout/button-add.png', ENVIRONMENT_FRAMEWORK, AngieApplication::getPreferedInterface()),\n ));\n } // if\n\n $this->wireframe->setPageObject($this->active_document, $this->logged_user);\n \n // Mobile device\n } elseif($this->request->isMobileDevice()) {\n $this->wireframe->breadcrumbs->remove('documents');\n\n // Print\n } elseif($this->request->isPrintCall()) {\n // Just render view\n\n // Direct access\n } else {\n if ($this->active_document->getState() == STATE_ARCHIVED) {\n $this->__forward('archive', 'archive');\n } else {\n $this->__forward('index', 'index');\n } // if\n } // if\n \n } else {\n $this->response->forbidden();\n } // if\n } else {\n $this->response->notFound();\n } // if\n }", "title": "" }, { "docid": "99c02d32c3646c334e0b8709ea07c0f2", "score": "0.6373547", "text": "public function index()\n {\n $documents = Document::paginate();\n\n return view('documents.index', compact('documents'));\n }", "title": "" }, { "docid": "c69453650972b1c28fea2ff002275643", "score": "0.6340132", "text": "public function index()\n {\n return view('documents.documents');\n }", "title": "" }, { "docid": "e2703c5e5fc3ae89bdd137b0bccff9dc", "score": "0.6309472", "text": "public function show(Document $document)\n {\n $users = User::all();\n $equipment = Equipment::query()->available()->get();\n $items = $document->items;\n $content_header = \"Document details\";\n $breadcrumbs = [\n [ 'name' => 'Home', 'link' => '/' ],\n [ 'name' => 'Document list', 'link' => '/documents' ],\n [ 'name' => 'Document details', 'link' => '/users/'.$document->id ],\n ];\n return view('documents.show', compact(['content_header', 'breadcrumbs', 'document', 'users', 'items', 'equipment']));\n }", "title": "" }, { "docid": "1243d216983c3f1582937783db590f55", "score": "0.63031715", "text": "public function show(){\n\n return view('createDocumentos');\n }", "title": "" }, { "docid": "19fd9ccf30e9f561f710e08a57cb94d3", "score": "0.6295566", "text": "public function index()\n {\n $documents = Document::all();\n $content_header = \"Documents list\";\n $breadcrumbs = [\n [ 'name' => 'Home', 'link' => '/' ],\n [ 'name' => 'Documents list', 'link' => '/documents' ],\n ];\n return view('documents.index', compact(['documents', 'content_header', 'breadcrumbs']));\n }", "title": "" }, { "docid": "2b277b8b747b95a40ee23ac3cc0be060", "score": "0.6273187", "text": "public function view_add_document() {\n\t\t$this->load->view(\"add_document\",$this->PAGE);\n\t}", "title": "" }, { "docid": "351cae255f1ec0a3918ef65eb2fcdb8f", "score": "0.6265909", "text": "public function index()\n {\n //\n return view('admin.documents');\n }", "title": "" }, { "docid": "47dfe09d63e2db0134814a603c35b516", "score": "0.6265429", "text": "public function index()\n {\n $documents = Document::orderBy('id','desc')->paginate(10);\n $agents = Agent::orderBy('id','desc')->get();\n return view('dashboard.document', compact('documents', 'agents'));\n }", "title": "" }, { "docid": "91dfb4abffb37701d9feb877748c703e", "score": "0.6247595", "text": "public function document()\n\t{ \n\t\t$data['title'] = display('document_list');\n\t\t$data['documents'] = $this->document_model->read($this->session->userdata('user_id'));\n\t\t$data['content'] = $this->load->view('dashboard_nurse/patient/document',$data,true);\n\t\t$data['count'] = $this->dashboard_model->getAlertCount(); \n\t\t$this->load->view('dashboard_nurse/main_wrapper',$data);\n\t}", "title": "" }, { "docid": "8e91da3363f86645eb1475958520ae55", "score": "0.62231123", "text": "public function view_document_list() {\n\t\t$this->router->class;\n\t\t$this->PAGE['alert'] = $this->session->flashdata('msg');\n\t\t$this->load->view(\"document_list\",$this->PAGE);\n\t}", "title": "" }, { "docid": "6364706d91c2474804a811c068a89f17", "score": "0.62217975", "text": "public function show(Document $document)\n {\n // return $document;\n $document = Document::where('id', $document->id)->first();\n $documentType = DocumentType::where('id', $document->type_id)->first();\n return view('backend.document.show', compact('document', 'documentType'));\n }", "title": "" }, { "docid": "a002eb0bf08a3d7e9e175a103f150c8c", "score": "0.62114674", "text": "public function actionIndex()\n {\n $searchModel = new DocumentSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "a5d7b099382bd67ef195d93929a4e94f", "score": "0.62005687", "text": "protected function show(){\n \t$documentsCategories = DocumentsCategory::paginate();\n \treturn view('documentsCategory.list', compact('documentsCategories'));\n }", "title": "" }, { "docid": "378c2f7e66d5cf2d21b6b0c5310ab5ad", "score": "0.6200417", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $internalDocs = $em->getRepository('AppBundle:InternalDoc')->findAll();\n\n return $this->render('internaldoc/index.html.twig', array(\n 'internalDocs' => $internalDocs,\n ));\n }", "title": "" }, { "docid": "e9616815883a8b79118ac9538d4d395a", "score": "0.6174082", "text": "public function show(Document $document)\n {\n $document->versions = $document->versions->sortByDesc('version');\n\n return view('documents.show', compact('document'));\n }", "title": "" }, { "docid": "363b9816a93471ba81a345cfa0d90f51", "score": "0.61573637", "text": "public function show(Document $document)\n {\n // return $document;\n $document = Document::where('id', $document->id)->first();\n $documentType = DocumentType::where('id', $document->type_id)->first();\n // return view('backend.document.show')\n // ->withDocument($document);\n return view('backend.document.show', compact('document', 'documentType'));\n }", "title": "" }, { "docid": "20890a0921683b30228781234f648c43", "score": "0.61423486", "text": "public function show(Document $document)\n {\n $getUserId= Auth::user()->id;\n $getDocuments= $document->all()->where('user_id', '=', $getUserId);\n\n return view('home', [\n 'getDocuments' => $getDocuments\n ]);\n }", "title": "" }, { "docid": "7622db08c9c54c233d5dcabc68838330", "score": "0.61173415", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $documentations = $em->getRepository('MyControlerBundle:documentation')->findAll();\n\n return $this->render('documentation/index.html.twig', array(\n 'documentations' => $documentations,\n ));\n }", "title": "" }, { "docid": "b7b0ee01cead0eb3ef8f139267926f0c", "score": "0.61167175", "text": "public function show($id){\n $cargoDocument = CargoDocument::find($id);\n return View::make('cargodocument.show')\n ->with('cargoDocument', $cargoDocument);\n }", "title": "" }, { "docid": "db34bed214d0eaf1002e940dd513c8d5", "score": "0.6105291", "text": "public function index($id)\n {\n $id=$id;\n return view('admin.company.document.list2',['id'=>$id]);\n }", "title": "" }, { "docid": "50bade721340bb96622f72b89eb018eb", "score": "0.60788345", "text": "public function show($id)\n\t{\n return View::make('documentos.show');\n\t}", "title": "" }, { "docid": "ac7481b2c02345862dc532e7f6de6927", "score": "0.6075695", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $documentos = $em->getRepository('AppBundle:Documento')->findAll();\n\n return $this->render('AppBundle:documento:index.html.twig', array(\n 'documentos' => $documentos,\n ));\n }", "title": "" }, { "docid": "2512ab4086eea35456334f289d22c99b", "score": "0.60686713", "text": "public function index()\n {\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n $documents = $this->repository->all();\n\n if (request()->wantsJson()) {\n\n return response()->json([\n 'data' => $documents,\n ]);\n }\n\n return view('documents.index', compact('documents'));\n }", "title": "" }, { "docid": "ff8262f794e545e94cf0f4feb899347a", "score": "0.6051005", "text": "public function show(Document $document)\n {\n $agency = Agency::all();\n return view('document.show', ['agencies' => $agency, 'document' => $document]);\n }", "title": "" }, { "docid": "a8bdf6f350553e7e0854d71da444b74f", "score": "0.60461044", "text": "public function index()\n {\n $arr = \\App\\Document::all();\n\n return view('review.index')->withListing($arr);\n }", "title": "" }, { "docid": "2a2d2588d07c0dc83164996ac377bdb4", "score": "0.6044452", "text": "public function index()\n {\n $docs = 'active';\n $viewDocs = 'active';\n\n $listDocs = Pdf::get();\n return view('dashboard.body.docs.list', compact('docs', 'viewDocs', 'listDocs'));\n }", "title": "" }, { "docid": "bd2579b35c5ee188231afcd2019f9e99", "score": "0.6039551", "text": "public function docs($id)\n {\n $arrTabs = ['General'];\n $active = \"active\";\n\n $documents=Document::where('user_id',$id)->orderBy('id')->paginate(10);\n return view('dashboard::office.documents.index', compact('arrTabs', 'active','documents'));\n }", "title": "" }, { "docid": "fe38e47edb1a1e00d92391cb5d9f9232", "score": "0.60176164", "text": "public function listdocumentAction()\n {\n\n\t\t$sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublic');\n\t\t\n\tif (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $document = new Application_Model_EuDocumentMapper();\n $this->view->entries = $document->fetchAll50($sessionutilisateur->code_source_create, $sessionutilisateur->code_monde_create, $sessionutilisateur->code_zone_create, $sessionutilisateur->id_pays, $sessionutilisateur->id_region, $sessionutilisateur->code_secteur_create, $sessionutilisateur->code_agence_create);\n\n $this->view->tabletri = 1;\n\n }", "title": "" }, { "docid": "b2b3ade294c1e3043b335fd7e1222e05", "score": "0.6004854", "text": "function index() {\n \n // API call\n if($this->request->isApiCall()) {\n $this->response->respondWithData(Documents::findAll(STATE_VISIBLE, $this->logged_user->getMinVisibility()), array(\n 'as' => 'documents', \n ));\n \n // Mass edit\n } elseif($this->request->isSubmitted()) {\n if (!$this->request->isAsyncCall()) {\n $this->response->badRequest();\n } // if\n\n $this->mass_edit(Documents::findByIds($this->request->post('selected_item_ids'), STATE_VISIBLE, $this->logged_user->getMinVisibility()));\n \n // Print interface\n } elseif($this->request->isPrintCall()) {\n $group_by = strtolower($this->request->get('group_by', null));\n \n $page_title = lang('All documents');\n \n // find invoices\n $documents = Documents::findForPrint($group_by);\n \n // maps\n if ($group_by == 'category_id') {\n $map = Categories::getIdNameMap('','DocumentCategory');\n \n if(empty($map)) {\n $map = null;\n } // if\n \n $map[0] = lang('Unknown Category');\n $getter = 'getCategoryId';\n $page_title.= ' ' . lang('Grouped by Category'); \n \n } else if ($group_by == 'first_letter') {\n $map = get_letter_map();\n $getter = 'getFirstLetter';\n $page_title.= ' ' . lang('Grouped by First Letter');\n } // if \n \n $this->smarty->assignByRef('documents', $documents);\n $this->smarty->assignByRef('map', $map);\n $this->response->assign(array(\n 'page_title' => $page_title,\n 'getter' => $getter\n ));\n \n // Regular web browser request\n } elseif($this->request->isWebBrowser()) {\n $this->wireframe->list_mode->enable();\n\n $can_add_documents = false;\n if (Documents::canManage($this->logged_user)) {\n $can_add_documents = true;\n $this->wireframe->actions->add('add_text_document', lang('New Text Document'), Router::assemble('documents_add_text'), array(\n 'onclick' => new FlyoutFormCallback('document_created', array(\n 'success_message' => lang('Text document has been created')\n )),\n 'icon' => AngieApplication::getImageUrl('layout/button-add.png', ENVIRONMENT_FRAMEWORK, AngieApplication::getPreferedInterface()),\n ));\n \n $this->wireframe->actions->add('upload_document', lang('Upload File'), Router::assemble('documents_upload_file'), array(\n 'onclick' => new FlyoutFormCallback('document_created', array(\n 'success_message' => lang('File has been uploaded')\n )),\n 'icon' => AngieApplication::getImageUrl('layout/button-add.png', ENVIRONMENT_FRAMEWORK, AngieApplication::getPreferedInterface()), \n ));\n } // if\n \n $this->response->assign(array(\n 'can_add_documents' => $can_add_documents,\n 'can_manage_documents' => Documents::canManage($this->logged_user),\n 'documents' => Documents::findForObjectsList($this->logged_user, STATE_VISIBLE),\n 'letters' => get_letter_map(),\n 'categories' => Categories::getIdNameMap(null, 'DocumentCategory'),\n 'manage_categories_url' => $can_add_documents ? Router::assemble('document_categories') : null,\n 'in_archive' => false\n ));\n \n // mass manager\n if ($this->logged_user->isAdministrator()) {\n $mass_manager = new MassManager($this->logged_user, $this->active_document); \n $this->response->assign('mass_manager', $mass_manager->describe($this->logged_user));\n } // if\n } // if\n }", "title": "" }, { "docid": "10bf0dc74d02d853faefe733f3b69094", "score": "0.59954995", "text": "public function show()\n {\n $book = Book::getInstance();\n $form_data = array(\n 'data' => ($book->error)?$book->form_data:null,\n 'error_msg' => $book->error_msg,\n 'error' => $book->error\n );\n\n $messages = $book->getMessages();\n $page_atts = array(\n 'form' => $this->getView('form', $form_data),\n 'messages' => $messages,\n 'pagination' => $this->pagination()\n );\n\n $view = $this->getView('page', $page_atts);\n echo $view;\n }", "title": "" }, { "docid": "dd3655dca307d2f461719f0d8808f443", "score": "0.59936625", "text": "public function index()\n {\n if(!$GLOBALS['infodocument_permission']['view'] && !$GLOBALS['infodocument_permission']['view_own']){\n access_denied('infodocument');\n }\n\n $data['title'] = lang('page_infodocuments');\n $this->load->view('admin/infodocuments/manage', $data);\n }", "title": "" }, { "docid": "9ec923dfcf7662995f5e7626c0641982", "score": "0.59687155", "text": "public function index()\n {\n // $licensees = Licensee::latest()->paginate(5);\n // $licenseeProducts=$licensees->products();\n $licensees = Licensee::with('products')->get();\n\n return view('licensees.index', array('licensees' => $licensees));\n }", "title": "" }, { "docid": "a858cdac37e7153897f8324a62364585", "score": "0.5968415", "text": "public function index()\n {\n $licenses = License::paginate(Setting::paginacao());\n return view('licenses.index', ['licenses' => $licenses]);\n }", "title": "" }, { "docid": "107d2b5d8a0e1c6c8e151da72e815f03", "score": "0.594405", "text": "public function verdocumentales() {\n \n $this->load->model('documental_model');\n \n //consulta las ciudades\n $data['documentales'] = $this->documental_model->get_documentales();\n $this->load->view('template/header');\n $this->load->view('template/aside');\n $this->load->view('listarDocumentales', $data);\n $this->load->view('template/footer');\n }", "title": "" }, { "docid": "5085d37da8c8b3fbb54e7b92141277e2", "score": "0.59296453", "text": "public function index($repositoryId)\n\t{\n\n $documents=$this->document->listDocuments($repositoryId);\n return View::make('documents.index',['documents'=>$documents,'repositoryId'=>$repositoryId]);\n\t}", "title": "" }, { "docid": "929bcdc0143da2632eadf6b690f5cf23", "score": "0.59074974", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n $paginator = $this->get('knp_paginator');\n $request = $this->getRequest();\n\t\t\t\t$form = $this->getForm();\n \n $form->bindRequest($request);\n $repository = $em->getRepository('AcmeFmpsBundle:Document');\n $entities = $paginator->paginate($repository->findBySearchCriteria($form->getData()), $this->get('request')->query->get('page', 1),15);\n \n return $this->render('AcmeFmpsBundle:Document:index.html.twig', array( 'entities' => $entities, 'form' => $form->createView() ));\n\n }", "title": "" }, { "docid": "ca155a5d24b3e89bc32c8610bd51a7f0", "score": "0.58915144", "text": "public function documents()\n {\n return view('dashboard.documents', [\n 'documents' => Document::orderBy('created_at', 'desc')->get(),\n 'trashes' => Document::onlyTrashed()->orderBy('created_at', 'desc')->get(),\n ]);\n }", "title": "" }, { "docid": "4118a0dd2189ee390894fa4ebe1ef7ca", "score": "0.5884468", "text": "public function show(SickLeaveDocument $sickLeaveDocument)\n {\n //\n }", "title": "" }, { "docid": "ab759a00901fa057b03f42d3fde91609", "score": "0.5864401", "text": "public function view()\n {\n $key_doc_categories = DB::table('key_doc_categories')->get();\n \n $key_documents = DB::table('key_documents')\n ->join('language_lines', 'key_documents.title_lao', '=', 'language_lines.key')\n ->select(\n 'key_documents.id','key_documents.title_lao','key_documents.title_en','key_documents.file','key_documents.key_cate',\n 'language_lines.group','language_lines.key',\n )\n ->where('language_lines.group', '=', 'key_doc')->orderBy('id', 'asc')\n ->get();\n return view('key_document.index', compact('key_documents','key_doc_categories'))->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "7c00a963b1f3387e252edbf35f0ddbdb", "score": "0.58631736", "text": "public function index()\n {\n return view ('bastdocument.index');\n }", "title": "" }, { "docid": "9c90b7b827e21643e452b16678af42ef", "score": "0.5861824", "text": "public function show($Doc_ID)\n {\n $documentaciones = Documentacion::FindOrFail($Doc_ID);\n if (!Auth::check())\n\n return view('auth.login');\n return view('layer.Documentacion.show')->with('documentaciones',$documentaciones);\n }", "title": "" }, { "docid": "5f08dcaa39f731111108002bc5326928", "score": "0.58579487", "text": "public function list() {\n return view('docs.list');\n }", "title": "" }, { "docid": "e1e98f1b99696182f8e20aec16b5ca81", "score": "0.5857359", "text": "public function show($id)\n {\n \n $data = Documents::find($id);\n\n return view('admin.documents.details',compact('data'));\n }", "title": "" }, { "docid": "b9eaf2ec93246bf30fa0166dd227cdc9", "score": "0.58474797", "text": "public function index()\n\t{\n return View::make('admin.cadastrar-documento');\n\t}", "title": "" }, { "docid": "1b7f7ce909b3bcf1e9c73af914298409", "score": "0.58462775", "text": "public function show($id)\n {\n $document = ConsentDocument::findOrFail($id);\n return view('admin.consent-documents.show', compact('document'));\n }", "title": "" }, { "docid": "e7d2341154e5e6325c894f64199e6b41", "score": "0.58415675", "text": "public function show($id)\n {\n $documents = $this->documentsRepository->find($id);\n\n if (empty($documents)) {\n Flash::error('Documents not found');\n\n return redirect(route('documents.index'));\n }\n\n return view('documents.show')->with('documents', $documents);\n }", "title": "" }, { "docid": "98d259c85a3aaa7685847f461e659b0f", "score": "0.58374596", "text": "protected function getDocumentView()\n {\n $filters = $this->getDocumentFilters();\n\n $table = $this->getDocumentsTable($filters);\n\n return $this->getView(['table' => $table]);\n }", "title": "" }, { "docid": "cfd3910fdac3092039de07d88b648595", "score": "0.58308333", "text": "public function DocumentosIndexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $documentos = $em->getRepository('AppBundle:ProcedimientoDocumento')->findAll();\n return $this->render('AppBundle:documento:documentosMaestros.html.twig', array(\n 'procedimientosDocumentos' => $documentos,\n ));\n }", "title": "" }, { "docid": "85aa1bc3584b7bac6da9ddde0226738f", "score": "0.5815802", "text": "public function index()\n {\n //$file = Documents::all();\n \n $file = Documents::\n join('Levels', 'Documents.level_id', '=', 'Levels.id')\n ->join('Lessons', 'Documents.lesson_id', '=', 'Lessons.id')\n ->select('Documents.id', 'Lessons.lesson_number', 'Documents.title', 'Documents.description', 'Documents.file', 'Levels.level', 'Levels.course')\n ->get();\n \n //dd($file);\n\n /*DB::table('users')\n ->join('contacts', 'users.id', '=', 'contacts.user_id')\n ->join('orders', 'users.id', '=', 'orders.user_id')\n ->select('users.id', 'contacts.phone', 'orders.price')\n ->get();\n */\n\n $levels = Level::all();\n \n $levelId =null;\n $lessons =null;\n $title = null;\n\n return view('admin.documents.view',compact('file','levels','lessons','levelId','title'));\n }", "title": "" }, { "docid": "e432554827901f31f38ae12931c683fb", "score": "0.58039284", "text": "public function show($id)\n {\n $documents = Document::where('organization_id', $id)->get();\n return view('organizations.show', compact('documents'));\n }", "title": "" }, { "docid": "e714f998925883c9acd79dd7fdd56357", "score": "0.5799478", "text": "public function displayDocumentsAction(Request $request){\n $em = $this->getDoctrine()->getManager();\n $documentRepository = $em->getRepository('ExtendedDocument\\APIBundle\\Entity\\Document');\n\n $documents = $documentRepository->findAll();\n\n $html = '<style>table, th, td {\n border: 1px solid black;\n}</style>';\n\n $html.='<table><thead><td>IdDocument</td>';\n\n $metadataMetadata = $em->getClassMetadata('ExtendedDocument\\APIBundle\\Entity\\Metadata');\n\n foreach ($metadataMetadata->getFieldNames() as $key =>$value){\n if($value != 'id' && $value != 'document')\n $html.='<td>'.$value.'</td>';\n }\n\n $metadataVisualization = $em->getClassMetadata('ExtendedDocument\\APIBundle\\Entity\\Visualization');\n\n foreach ($metadataVisualization->getFieldNames() as $key =>$value){\n if($value != 'id' && $value != 'document')\n $html.='<td>'.$value.'</td>';\n }\n\n $html.='</thead>';\n\n foreach ($documents as $document){\n $html.= \"<tr>\";\n $html.=\"<td>\".$document->getId().\"</td>\";\n foreach ($document->getMetadata()->jsonSerialize() as $keyMD => $valueMD ){\n if($keyMD != 'id' && $keyMD != 'document'){\n $html.= '<td>'.$valueMD.'</td>';\n }\n }\n foreach ($document->getVisualization()->jsonSerialize() as $keyMD => $valueMD ){\n if($keyMD != 'id' && $keyMD != 'document'){\n $html.= '<td>'.$valueMD.'</td>';\n }\n }\n $html.= \"</tr>\";\n }\n\n $html.= '</table>';\n\n return new Response($html);\n }", "title": "" }, { "docid": "ed62b8f941c34f055a1d21a7d115fcfb", "score": "0.5794416", "text": "public function viewAction()\n {\n $isbn = filter_var($this->route_params['isbn'], FILTER_SANITIZE_STRING);\n $book = Book::getBookByISBN($isbn);\n $files = Book::getBookFiles($isbn);\n $chapters = Book::getBookChapters($isbn);\n View::renderTemplate('Books/view.html.twig',\n [\n 'book' => $book,\n 'files' => $files,\n 'chapters' => $chapters,\n ]);\n }", "title": "" }, { "docid": "3163056a36bc6db2840d3c52646621f3", "score": "0.57939816", "text": "public function show($id)\n {\n $documents = Document::find($id);\n $documents->each(function($documents){\n $documents->image;\n });\n return view('admin.documents.document')->with('documents', $documents);\n }", "title": "" }, { "docid": "db1dd8b81f34c1e4cfa34fbd852b305b", "score": "0.5791126", "text": "public function show(License $license)\n {\n }", "title": "" }, { "docid": "f99bd16de40f754471b4dfc1d2df491b", "score": "0.57846767", "text": "public function index()\n {\n $documento=Documento::all();\n return view('admin.documento.index',['documento' => $documento]);\n }", "title": "" }, { "docid": "a4f51c82ad752fd47758130efe880185", "score": "0.5770649", "text": "public function show()\n {\n if (!isset($_GET['page'])) {\n $_GET['page'] = 1;\n $_GET['offset'] = $this->limit;\n }\n\n $data = $this->paginator->getBooks($_GET['page']);\n $pages = $this->paginator->getPages($_GET['page']);\n $bodyData = ['data' => $data, 'pagesData' => ['labels' => $pages, 'currentPage' => $_GET['page'], 'offset' => $_GET['offset']]];\n $this->view->generateView('books', 'books', $bodyData);\n }", "title": "" }, { "docid": "d8154c20dadbd67dfa7d8bc65f5db438", "score": "0.57518506", "text": "public function index()\n {\n \n $merchant = Merchant::find(1);\n $home = Ad::homeAds();\n $documents = $merchant->documents()->limit(8)->get();\n \n return view('site.site', ['documents' => $documents,'home' => $home,]);\n \n }", "title": "" }, { "docid": "b7ff8c77b909e52ea4b14a26a5df1cb5", "score": "0.57445985", "text": "public function index()\n {\n $user = auth()->user();\n // $officer = Officer::count();\n $document = Document::with('officer', 'prisioner')->get();\n // $prisioner = Prisioner::count();\n\n return view('document.index', [\n // 'officer' => $officer,\n 'document' => $document,\n // 'prisioner' => $prisioner,\n 'user' => $user,\n ]);\n }", "title": "" }, { "docid": "b2e4677cac7e24fb999e3233393230d0", "score": "0.57279164", "text": "public function index()\n {\n $user = auth()->user();\n $documentTypes = DB::table('document_types')\n ->select('users.id as userId','document_types.id',\n 'document_types.name','record_types.name as recordTypeName')\n ->join('record_types', 'record_types.id', '=', 'document_types.record_type_id')\n ->join('users', 'users.id', '=', 'document_types.created_by_id')\n ->where('users.organization_id', $user->organization_id)\n ->paginate(10);\n return view('documentType.index',compact('documentTypes'));\n }", "title": "" }, { "docid": "a56da85e842668bf5a10f8e98e715a3d", "score": "0.57277006", "text": "public function adcionarDocumento()\n {\n if (isset($this->view))\n $this->view->render(SUPER,'cadastro/documento');\n }", "title": "" }, { "docid": "0dd4907b0e02bbd1fc3da2476bb008d5", "score": "0.5722209", "text": "public function listdocument3Action()\n {\n\n\t\t$sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublic');\n\t\t\n\tif (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $document = new Application_Model_EuDocumentMapper();\n $this->view->entries = $document->fetchAll50($sessionutilisateur->code_source_create, $sessionutilisateur->code_monde_create, $sessionutilisateur->code_zone_create, $sessionutilisateur->id_pays, $sessionutilisateur->id_region, $sessionutilisateur->code_secteur_create, $sessionutilisateur->code_agence_create);\n\n $this->view->tabletri = 1;\n\n }", "title": "" }, { "docid": "aa6e9fa505752a50175179ff42ad5dc3", "score": "0.57172185", "text": "public function doc()\n {\n return view('docs.api.v1', ['view' => 'backend']);\n }", "title": "" }, { "docid": "58afbfce774a3d2c3f1269bedc4fcb5f", "score": "0.57050985", "text": "public function view()\n {\n $viewDocs = Document::where([['active', '=', '1'], ['title', 'like', '%ViewDoc%']])\n ->orderBy('hierarchy', 'asc')\n ->get();\n\n $images = [\n \"media/images/aMainFront-1.jpg\",\n \"media/images/aInteriorSpace-1.jpg\",\n \"media/images/aBreakfastBuffetRoom.jpg\",\n \"media/images/aBreakfastBuffetContinental.jpg\",\n \"media/images/aBreakfastBuffetBakery.jpg\",\n \"media/images/aMainFront-2.jpg\",\n \"media/images/aInteriorSpace-2.jpg\",\n ];\n\n return view('public.view', ['images' => $images, 'viewDocs' => $viewDocs]);\n }", "title": "" }, { "docid": "b9174515528d78c3945ab9d4792ddde9", "score": "0.5655845", "text": "public function index()\n {\n $studentCollection = Student::all();\n return view('admin.pages.student.index', ['studentCollection' => $studentCollection]);\n }", "title": "" }, { "docid": "c057129101d7adcdffbb3803ad727e56", "score": "0.5649145", "text": "public function view() {\n\t\t$with = array('Books');\n\t\t$conditions = array('Authors.id' => $this->request->id);\n\t\t$author = Authors::find('first', compact('conditions', 'with'));\n\n\t\t// Check Author existence\n\t\tif (!$author) {\n\t\t\t$this->redirect('Authors::index');\n\t\t}\n\t\treturn compact('author');\n\t}", "title": "" }, { "docid": "34e4e983a5aa6b2186f7ce756bb3f0a9", "score": "0.5648493", "text": "public function index()\n {\n return view('modules.document_flow.journal.index');\n }", "title": "" }, { "docid": "6ddb17f85101bd2cafe2587495ff1bbb", "score": "0.5645811", "text": "public function show($id)\n {\n $document = Document::find($id);\n\n $user_name = User::find($document->user_id);\n $full_name = $user_name->first_name.' '.$user_name->last_name;\n $downloads = $document->downloads()->count();\n\n return view('document.show',compact('document','full_name','downloads'));\n }", "title": "" }, { "docid": "810a711458149e8b95cc26617c9df233", "score": "0.5644608", "text": "public function documentsAction(Request $request, $id)\n {\n if (false === $this->get('security.context')->isGranted('ROLE_USER')) {\n throw new AccessDeniedException();\n }\n\n $em = $this->getDoctrine()->getManager();\n\n $content = $em->getRepository('ManhattanContentBundle:Content')\n ->findOneByIdJoinDocuments($id);\n\n if (!$content) {\n throw $this->createNotFoundException('Unable to find Content entity.');\n }\n\n $document = new Document();\n $document->addContent($content);\n $form = $this->createForm(new DocumentType(), $document);\n\n return $this->render('ManhattanContentBundle:Document:documents.html.twig', array(\n 'entity' => $content,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "5e5fa09ed0303c1c776fc6486a399127", "score": "0.5642594", "text": "public function show($id)\n {\n $document = $this->repository->find($id);\n\n if (request()->wantsJson()) {\n\n return response()->json([\n 'data' => $document,\n ]);\n }\n\n return view('documents.show', compact('document'));\n }", "title": "" }, { "docid": "5213afbea5567a8c4257f639d1030180", "score": "0.56398815", "text": "public function show(key_document $key_document)\n {\n //\n }", "title": "" }, { "docid": "f8655fa54ccf8a36312bf4c139c3ca9a", "score": "0.56398785", "text": "public function show($id)\n {\n $inv_documento = inv_documento::findOrFail($id);\n\n return view('inv_documentos.show', compact('inv_documento'));\n }", "title": "" }, { "docid": "468fe22b628774e5a77740a3bd78237b", "score": "0.5626989", "text": "public function publicationsViewAction()\n {\n if(!$this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY'))\n {\n throw $this->createAccessDeniedException();\n }\n else {\n return $this->render('@app_backend_template_directory/Publication/index.html.twig');\n }\n\n }", "title": "" }, { "docid": "0e080a6b0e23fcd9887c80fdd5fa9fb7", "score": "0.561956", "text": "public function viewAction()\n {\n $this->model = new Books([$this->route['alias']]);\n $book = $this->model->getBook();\n $this->view->getView('default', $book);\n }", "title": "" } ]
ddfdb63b51a2244698db79cb274f037f
Allows to query the first record that match the specified conditions
[ { "docid": "361be28d716f103971af9dc4edc9a9c2", "score": "0.0", "text": "public static function findFirst($parameters = null)\n {\n return parent::findFirst($parameters);\n }", "title": "" } ]
[ { "docid": "5e783e53ec651e64392efc5c94d89835", "score": "0.6867269", "text": "public function first(){\r\n $sql = 'SELECT ';\r\n $sql.= $this->param['field'] ? $this->param['field'] : '*';\r\n $sql.= ' FROM '.$this->table;\r\n $sql.= $this->param['join'] ? ' '.$this->param['join'] : '';\r\n $sql.= $this->param['where'] ? ' WHERE '.$this->param['where'] : '';\r\n $sql.= $this->param['group'] ? ' GROUP BY '.$this->param['group'] : '';\r\n $sql.= $this->param['having'] ? ' HAVING '.$this->param['having'] : '';\r\n $sql.= $this->param['order'] ? ' ORDER BY '.$this->param['order'] : '';\r\n $sql.=' LIMIT 1';\r\n return $this->_query($sql)->fetch( PDO::FETCH_ASSOC );\r\n }", "title": "" }, { "docid": "a758feb137e799afdbc2fef03bf6c11c", "score": "0.67033726", "text": "abstract public function queryFirst($sql);", "title": "" }, { "docid": "5c1ab01da9cea26f7220b0d868e21bfa", "score": "0.6585563", "text": "public function findOne($conditions, $params = array()){\n $row = $this->db->command()->select()->from($this->table)->where($conditions, $params)->limit(1)->queryRow();\n if(false === $row){\n return false;\n }\n \n return $this->map($row);\n }", "title": "" }, { "docid": "a9f487343fc4173dccebbb2545c15bbf", "score": "0.6584706", "text": "protected static function DO_FIRST()\n\t{\n\t\t$builder = self::$thiss::BUILDER();\n\n\t\tif (self::$tempUseSoftDeletes)\n\t\t{\n\t\t\t$builder->where(self::$thiss::$table . '.' . self::$thiss::$deletedField, '');\n\t\t}\n\t\telseif (self::$useSoftDeletes && empty($builder->QBGroupBy) && self::$thiss::$primaryKey)\n\t\t{\n\t\t\t$builder->groupBy(self::$thiss::$table . '.' . self::$thiss::$primaryKey);\n\t\t}\n\n\t\t// Some databases, like PostgreSQL, need order\n\t\t// information to consistently return correct results.\n\t\tif ($builder->QBGroupBy && empty($builder->QBOrderBy) && self::$thiss::$primaryKey)\n\t\t{\n\t\t\t$builder->orderBy(self::$thiss::$table . '.' . self::$thiss::$primaryKey, 'asc');\n\t\t}\n\n\t\treturn $builder->limit(1, 0)->get()->getFirstRow(self::$thiss::$tempReturnType);\n\t}", "title": "" }, { "docid": "04bb2cbf22faf2e1d088a75029025741", "score": "0.6578761", "text": "public function first($criteria = [], $columns = ['*']);", "title": "" }, { "docid": "32f031c4ff8c88826aedcb7036d217df", "score": "0.6573942", "text": "abstract public function queryObjectFirst($sql);", "title": "" }, { "docid": "2b1d86c0e45f7616b18114a51acb39f5", "score": "0.65393287", "text": "abstract function loadFirstRecord($where = '', $order = '', $joins = '', \n $limitOffset = false, $tableAlias = false);", "title": "" }, { "docid": "8b458fb0af693cb388ed30528fd4ba10", "score": "0.65245324", "text": "public function getFirstRecordByWhere($where)\n {\n return $this->model->where($where)->first();\n }", "title": "" }, { "docid": "0723f27a1389cb182a995dbf5bae0a02", "score": "0.64997786", "text": "public function first() {\n\t\tif (!is_object($this)) trigger_error('db::select must be called in object context');\n\t\t$fields = a::arguments(func_get_args());\n\t\t$result = $this->select($fields);\n\t\tif (!count($result)) return false;\n\t\treturn array_shift($result);\n\t}", "title": "" }, { "docid": "2c3f80e5f13e64494528ba364b490d53", "score": "0.64519364", "text": "final function findFirst($conditions=[])\n {\n return $this->find($conditions)[0];\n }", "title": "" }, { "docid": "f61df907bca456f75e200f32af69473f", "score": "0.6371126", "text": "function first($filters)\n {\n\n $query = $this->model;\n foreach ($filters as $key => $value) {\n $query = $query->where($key, $value);\n }\n\n return $query->first();\n }", "title": "" }, { "docid": "702c7e252ce118c2f14146ce5ea04d03", "score": "0.63605094", "text": "private function queryBasedOnKey() {\n\t\t$query = NVPModel::where('key', $this->filterKey);\n\n\t\tif($this->filterTimestamp) {\n\t\t\t$query->where('timestamp', $this->filterTimestamp); \n\t\t}\n\n\t\t$query->orderBy('timestamp', 'desc');\n\n\t\treturn $query->first();\n\t}", "title": "" }, { "docid": "eb67ed6bdf52e809e3471cf3d9ef613e", "score": "0.63024175", "text": "protected function getFirstByConditions(array $conditions)\n {\n $account = $this->getNew();\n\n foreach ($conditions as $condition => $value) {\n $account = $account->where($condition, $value);\n }\n\n return $account->first();\n }", "title": "" }, { "docid": "149181023d501ad52fe1f75466d57117", "score": "0.62905085", "text": "function getRecord($criteria = NULL,$mode = 'brief') {\r\n\t\tif(is_null($criteria))\t$criteria = array();\r\n\t\tif(is_int($criteria))\t$criteria = array($this->primaryKey => $criteria);\r\n\t\t$criteria['LIMIT'] = 1;\r\n\t\t$result = $this->getRecords($criteria,$mode);\r\n\t\tif($result) $result = $result[0];\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "ac73defb93ab3adac03dd30ce0c41975", "score": "0.62215483", "text": "public function firstWhere($column, $operator = null, $value = null, $boolean = 'and');", "title": "" }, { "docid": "c22e98f0cc1c77207eae83b12236712b", "score": "0.6211468", "text": "function getByCondition($table, $params, $conditions, $manyrecords)\n{\n //$table = \"users\" OR \"competences\" ...\n //$conditions need the complete where condition with AND / OR write in SQL\n //Example for $conditions => id=:id AND name=:name\n //$params = [\"id\"=>$id,\"name\"=>$name,\"NPA\"=>94654]\n //$manyrecords = if the query will return more than 1 item (true/false)\n\n $query = \"SELECT * FROM `$table` WHERE \" . $conditions;\n return Query($query, $params, $manyrecords);\n}", "title": "" }, { "docid": "1753932006cb3df255b3a5d845317982", "score": "0.6134949", "text": "public function one($conditions = null): ?object;", "title": "" }, { "docid": "78a2f072bf8890cb125ce0d29165ee55", "score": "0.6133061", "text": "public function findOne(array $conditions=array()){\n\t\t$results=$this->find($conditions);\n\t\treturn reset($results);\n\t}", "title": "" }, { "docid": "1131d668c5a340bd87c538ece8e799f0", "score": "0.6109936", "text": "abstract protected function findOneBy(array $criteria);", "title": "" }, { "docid": "c144ab4a40688ee069ce69552f61bb6a", "score": "0.60951036", "text": "function loadFirstRecord($where = '', $order = '', $joins = '', $limitOffset = false, $tableAlias = false) {\n return parent::loadFirstRecord($where, $order, $joins, $limitOffset, $tableAlias);\n }", "title": "" }, { "docid": "49ea77a55765a34e900a06bba7761d82", "score": "0.60585636", "text": "public static function first($conditions = NULL, array $options = NULL) {\n\t\t$options = array_merge(array(\n\t\t\t\tself::OPTION_ORDER => implode(\",\", array_map(function($key) {return sprintf(\"%s ASC\", Record::__escapeIdentifier($key));}, static::__getPrimaryKeys()))\n\t\t\t), (array) $options);\n\n\t\treturn static::findOne($conditions, $options);\n\t}", "title": "" }, { "docid": "75d3a2a134dff0a4e884c543cd32ec84", "score": "0.60342205", "text": "public function getQueryOne($sql, $params = [])\n {\n $db = $this->modelClass::getConnection();\n return $db->fetchOne($sql, \\Phalcon\\Db::FETCH_ASSOC, $params);\n }", "title": "" }, { "docid": "435f404825c82261d41873eff099e6be", "score": "0.6029715", "text": "function consult_sucursal($condition)\r\n {\r\n if($condition == \"\")\r\n {\r\n $query = $this->db->query(\"SELECT * FROM \".$this->table_name.\";\"); \r\n }\r\n else\r\n {\n $query = $this->db->query(\"SELECT * FROM \".$this->table_name.\" WHERE \".$condition.\";\"); \n } \r\n return $query;\r\n }", "title": "" }, { "docid": "00c943bff7e03386e36de28ba388ece4", "score": "0.59938085", "text": "abstract protected static function getFromStorageWhereFirst(&$storage, callable $condition);", "title": "" }, { "docid": "50b980d531962f1efd99938311d297b4", "score": "0.5986238", "text": "public function firstOrFail($criteria = [], $columns = ['*']);", "title": "" }, { "docid": "32016b99900169934e35abace04c1969", "score": "0.59854776", "text": "public function findOne()\r\n {\r\n $this->setClauses();\r\n\r\n $query = \"SELECT * FROM `$this->_table` $this->_where $this->_order LIMIT 1\";\r\n\r\n $result = $this->_connection->query($query);\r\n \r\n $this->conError();\r\n\r\n if(!$result) {\r\n $this->init();\r\n return false;\r\n }\r\n\r\n $this->init();\r\n return $result->fetch_assoc();\r\n }", "title": "" }, { "docid": "e5574fa691da7ba87226f35d5ef9781d", "score": "0.597996", "text": "public function firstBy(array $where = [])\n {\n return $this->model->findFirst([$where]);\n }", "title": "" }, { "docid": "62b4fcbc0e7383c0edef5e9ab6f71f02", "score": "0.5977126", "text": "public function findFirst($filter=[],$forUpdate=false) {\n //Calls base find function above.\n $data = $this->find($filter,$forUpdate);\n //If a selection results in many objects being fetched, only the first one will be returned.\n return count($data) ? $data[0] : null;\n }", "title": "" }, { "docid": "f9a9d22d5fcc8b6be14b9e68a9ab7f5f", "score": "0.5969066", "text": "public function first(): Model\n {\n $this->checkSelect();\n $this->bind($this->query, $this->param ?? []);\n return $this->build($this->db->first());\n }", "title": "" }, { "docid": "a5f8c16177b412c38b6dd232ce5b31d4", "score": "0.5950667", "text": "public static function findFirst( $sub_sql = null, $params = null )\r\n {\r\n $params[\"find_first\"] = true;\r\n \r\n return self::find( $sub_sql, $params );\r\n }", "title": "" }, { "docid": "fa6c3f98d459047051b3e5d8381134fb", "score": "0.59470457", "text": "public function get_one() {\n\t\t// save the current limits\n\t\t$limit = $this->limit;\n\t\t$rows_limit = $this->rows_limit;\n\t\t\n\t\tif ($this->rows_limit !== null) {\n\t\t\t$this->limit = null;\n\t\t\t$this->rows_limit = 1;\n\t\t} else {\n\t\t\t$this->limit = 1;\n\t\t\t$this->rows_limit = null;\n\t\t}\n\t\t\n\t\t// get the result using normal find\n\t\t$result = $this->get ();\n\t\t\n\t\t// put back the old limits\n\t\t$this->limit = $limit;\n\t\t$this->rows_limit = $rows_limit;\n\t\t\n\t\treturn $result ? reset ( $result ) : null;\n\t}", "title": "" }, { "docid": "cd44684083117b56fb80745e817f58e4", "score": "0.59452903", "text": "public function first() {\r\n // build query\r\n $query = \"SELECT `{$this->table}`.*\\n\" .\r\n \"FROM `{$this->table}`\\n\" .\r\n \"LIMIT 0, 1\";\r\n // prepare statement\r\n $sql = $this->prepare($query);\r\n $sql->execute();\r\n // get result\r\n $result = $sql->fetch(PDO::FETCH_OBJ);\r\n // check result\r\n if ($result === false) {\r\n throw new Error('Could not find record to read', 404);\r\n }\r\n // return\r\n return $result;\r\n }", "title": "" }, { "docid": "312f7e7057776af23db7b7b4471efa01", "score": "0.59315675", "text": "function find($where, $one = 1)\n {\n }", "title": "" }, { "docid": "14f86911cab70cbf5039e480b43abe27", "score": "0.5926694", "text": "public function find(array $condition);", "title": "" }, { "docid": "187abf22ab55e941daed143aaf4b81ef", "score": "0.5922602", "text": "function FindOne($conditions = [], $fields = [], $order = [], $recursive = -1){\r\n\t\t$this->_CreateAssociatedModelsRekursive(($recursive - 1));\r\n\t\t$dbo = $this->_createDBObject($conditions, $fields, $order, [], $recursive);\r\n\t\t/* tady budou joiny atd has many atd */\r\n\t\tif($data = $this->fetchOneDBO($dbo)){\r\n\t\t\t$this->data = $data;\r\n\t\t\tif($data = $this->FindAssociateData($data[$this->name], $fields, ($recursive - 1))){\r\n\t\t\t\t$this->data = array_merge($this->data, $data);\r\n\t\t\t}\r\n\t\t\t$this->_clearCache();\r\n\t\t\treturn $this->data;\r\n\t\t}\r\n\t\t$this->_clearCache();\r\n\t\treturn NULL;\r\n\t}", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.5919895", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.5919895", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.5919895", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.5919895", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.5919895", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.5919895", "text": "public function first();", "title": "" }, { "docid": "ab97bd3ed6e8eac3a4f753dc49c37dc7", "score": "0.590659", "text": "public function findFirstWhere($where, $columns = ['*'])\n {\n }", "title": "" }, { "docid": "b70fec434c074e9a549571dfefe832b3", "score": "0.5902414", "text": "public static function queryWhere( ){\n\t}", "title": "" }, { "docid": "c57c8264f054d57c6158a423fb0782ae", "score": "0.58997965", "text": "public function getBy($condition);", "title": "" }, { "docid": "8f1f622e1d1949dca3222e378142bcbb", "score": "0.58837026", "text": "public function fetchOneBy($criteria);", "title": "" }, { "docid": "c71583d30ce8da46d2ad86bcb517c254", "score": "0.588348", "text": "public static function select_records($column,$value)\n {\n return Content::where('status',1)->where($column,$value)->first(); \n }", "title": "" }, { "docid": "4a6d5535cf02a17bde49db2968c25f4f", "score": "0.587952", "text": "public static function first()\r\n {\r\n return ORM::factory(get_class(new static))->find();\r\n }", "title": "" }, { "docid": "9f4546f4fb7719656167aa26c5b814a8", "score": "0.5861806", "text": "public function get_by($where, $single = FALSE){ \n\t\t$this->db->where($where);\n\t/*Calls the above function BUT according to active records, will filter using the where command*/\n\t\treturn $this->get(NULL, $single);\n\t}", "title": "" }, { "docid": "9227f26dd814bd32f3fcd73372353934", "score": "0.5854381", "text": "public function first(callable $predicate): Option;", "title": "" }, { "docid": "1f4b3c6b817ada4472bb9258d6f54153", "score": "0.5825675", "text": "public function find_by($conditions)\n\t{\n\n\t\t//echo $this->table->connection->getAdapter()->adapterName();\n\t\t//var_dump($this->table->connection->getAdapter()->verify(120));\t\n\t\t// $this->table->connection->query($this->table->getBuilder()->build($conditions));\n\t\t// echo $this->table->humanName();\n\n\t\tvar_dump($this->table->connection->initQueryWithConditions($conditions)->exec());\n\t\tvar_dump($this->table->connection->initQueryWithSQL(SQLSyntax::get('sql.front.news_list'))->getAll());\n\t\t// var_dump($conditions);\n\n\t}", "title": "" }, { "docid": "2f77ff2ba7b4abd1b790864f28d45549", "score": "0.58238524", "text": "abstract public function queryOne($sql);", "title": "" }, { "docid": "560e9a6e4945000f598d790f6035900d", "score": "0.58041316", "text": "public function SelectFirst($field = null, $value = null) {\n $ret = $this->getRequest()\n ->Select()\n ->Where();\n if (!is_null($field)) {\n $ret->Cond($field, '=', $value);\n }\n $ret = $ret->Limit(0, 1)->Run();\n if (sizeof($ret) == 1) {\n return $ret->current();\n } else return null;\n }", "title": "" }, { "docid": "a4398b4685b405e3a0ac0aa08c690743", "score": "0.579106", "text": "public function query_retrieve_one($query);", "title": "" }, { "docid": "f1c719ca1ea4685b5bb207fdc4586dee", "score": "0.5787453", "text": "public function queryFirstRow($format) {\n $argv = func_get_args();\n $sql = call_user_func_array(array($this, 'buildSqlStr'), $argv);\n return $this->__doSelectQuery($format, $sql, 2);\n }", "title": "" }, { "docid": "2062a8ae3a5e799b32c4ad0fbdb9b9ca", "score": "0.57848316", "text": "public function RunQuery()\n\t{\n\t\treturn ($this->filterKey !== '')? $this->queryBasedOnKey():$this->queryAll();\n\t}", "title": "" }, { "docid": "11974bd57e51febe124c4e1bda825b09", "score": "0.5767778", "text": "private function searchRow() {\n\t\t$search = \"SELECT * FROM $this->table WHERE \";\n\t\t\n\t\tforeach ($this->row as $key => $value) {\n\t\t\t$search .= \" $key = :$key AND\";\n\t\t}\n\t\t\n\t\t$search = rtrim($search, \"AND\") . \";\";\n\t\ttry {\n\t\t\t$sth = $this->db->prepare($search);\n\t\t\t$sth->execute($this->row);\n\t\t\t$row = $sth->fetch(PDO::FETCH_ASSOC);\n\t\t\tif ($row) {\n\t\t\t\t$this->row = $row;\n\t\t\t\t$this->uptodate = 1;\n\t\t\t\t$this->id = $row[$this->id_field];\n\t\t\t}\n\t\t} catch (PDOException $ex) {\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "c1eb8c928bcde4907cf18390db27b492", "score": "0.5766284", "text": "public function find(){\r\n $data = $this->limit(1)->select();\r\n return isset($data[0]) ? $data[0] : false;\r\n }", "title": "" }, { "docid": "a2cfc052c570246143874a3a874c9f7b", "score": "0.57597053", "text": "public function test_query_first_with_simple_table()\n {\n $this->assertEquals(array(\"PersonID\" => 475144), $this->alfa_instance->query_first($this->sql_read));\n\n }", "title": "" }, { "docid": "31c7307e9e950e717b6dce95a7b0caf2", "score": "0.5747501", "text": "private function baseGetFind()\n {\n $baseSql = 'SELECT * FROM %s';\n $sprintfValues = [$this->table];\n $sqlValues = [];\n\n // perform object filtering for wheres\n if (count($this->wheres) > 0) {\n $baseSql .= ' WHERE %s';\n $sprintfValues[] = '1=1';\n\n var_dump($this->wheres);\n\n // first where\n foreach ($this->wheres as $column => $value) {\n $baseSql .= ' %s';\n $sqlValues[] = $value;\n $sprintfValues[] = 'AND ' . $column . '=?';\n }\n }\n\n $sql = vsprintf($baseSql, $sprintfValues);\n\n $statement = self::$connection->prepare($sql);\n if (!$statement) {\n echo self::$connection->errorInfo();\n }\n $statement->execute($sqlValues);\n\n return $statement;\n }", "title": "" }, { "docid": "5a46c6266736d8ba90cbc8a6a54fb492", "score": "0.5736127", "text": "public function find_one($where = array(), $order_by = NULL, $return_method = NULL)\n\t{\n\t\t$where = $this->_safe_where($where);\n\t\tif (!empty($where)) $this->db->where($where);\n\t\tif (!empty($order_by)) $this->db->order_by($order_by);\n\t\t$this->db->limit(1);\n\t\t$query = $this->get(FALSE, $return_method);\n\t\tif ($return_method == 'query') return $query;\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "03b6bb76674ab4791948ecbe0e1562cc", "score": "0.5732902", "text": "public function getFirstSoft($conditions = null, $values = [], $options = []);", "title": "" }, { "docid": "4e95c2c6793b2381eb5d3aa2234f6a8f", "score": "0.5728565", "text": "protected function first($criteria = [], $columns = ['*'])\n {\n\n return $this->matching($criteria)->first($columns);\n }", "title": "" }, { "docid": "5fd4e9b472a2f40e9b0413dcc0f6df3d", "score": "0.5728038", "text": "protected abstract function query();", "title": "" }, { "docid": "4905bf2b5cefe47c5789c19ada2b9a1c", "score": "0.5726063", "text": "public function findOneBy(array $criteria);", "title": "" }, { "docid": "840b1a9e54464c38228a617f0b3299f8", "score": "0.57194495", "text": "public static function find($params) {\n $params = self::handle_params($params);\n $results = self::from_self('select *', $params, 'LIMIT 1');\n\n if (is_array($results) && array_key_exists(0, $results)) {\n return $results[0];\n }\n return $results;\n }", "title": "" }, { "docid": "29cae7c97a3b76bbfb910c6433415c12", "score": "0.570353", "text": "function query() {\n $this->ensure_my_table();\n $value = $this->value['value'] * 100; // This field is stored as an integer, because that's what Amazon gives us.\n $this->query->add_where($this->options['group'], \"$this->table_alias.$this->real_field \" . $this->operator . \" '%s'\", $value);\n }", "title": "" }, { "docid": "9344105aa84976c5295a61736289cced", "score": "0.5700226", "text": "public function findFirstBy($field, $value, $columns = ['*'])\n {\n }", "title": "" }, { "docid": "7b44094ab0061d91676b618d199135ed", "score": "0.568741", "text": "public function firstOrCreate(array $where);", "title": "" }, { "docid": "b546d20beb331b5d4f4bdcb889268b6f", "score": "0.56795526", "text": "public function first() {}", "title": "" }, { "docid": "b546d20beb331b5d4f4bdcb889268b6f", "score": "0.56795526", "text": "public function first() {}", "title": "" }, { "docid": "b546d20beb331b5d4f4bdcb889268b6f", "score": "0.56795526", "text": "public function first() {}", "title": "" }, { "docid": "b546d20beb331b5d4f4bdcb889268b6f", "score": "0.56795526", "text": "public function first() {}", "title": "" }, { "docid": "44253b2ea18b570b936ac4b3ce0c0841", "score": "0.5677918", "text": "public function firstWhere($column, $operator = null, $value = null, $boolean = 'and')\n {\n }", "title": "" }, { "docid": "9a5b45e0420e2c578291589f957be267", "score": "0.5667243", "text": "public function queryFirstField($query){\n $row = $this->queryFirstRow($query, MYSQLI_NUM);\n if(!$row)\n return false;\n else\n return reset($row);\n }", "title": "" }, { "docid": "72a9a6d7cea12ab6ba7604fe9eff399a", "score": "0.56664073", "text": "public function find_one($where = array(), $order_by = NULL, $return_method = NULL)\n\t{\n\t\t$where = $this->_safe_where($where);\n\t\t$this->_handle_where($where);\n\t\tif (!empty($order_by)) $this->db->order_by($order_by);\n\t\t$this->db->limit(1);\n\t\t$query = $this->get(FALSE, $return_method);\n\t\tif ($return_method == 'query') return $query;\n\n\t\t$data = $query->result();\n\n\t\t// unserialize any data\n\t\tif ($return_method == 'array')\n\t\t{\n\t\t\t$data = $this->unserialize_field_values($data);\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "0dbddbcdd069460cbc824981b1c7c8d1", "score": "0.56126124", "text": "public function findFirst() {\r\n\t\t$aux = $this->fetchAllPg(1);\r\n\t\tif($aux == null)\r\n\t\t\treturn null;\r\n\t\treturn $aux[0];\r\n\t}", "title": "" }, { "docid": "1c6d68379dba02e813bcd3558fc64308", "score": "0.55964655", "text": "public function getSingleRow($table, $condition)\n {\n $this->db->select('*');\n $this->db->from($table);\n $this->db->where($condition);\n $query = $this->db->get();\n //echo $this->db->last_query();\n return $query->row(); \n }", "title": "" }, { "docid": "b767c0245844c3d46db245e09ab66062", "score": "0.55883586", "text": "public function query() {\n $this->ensureMyTable();\n $this->query->addWhere($this->options['group'], \"$this->tableAlias.$this->realField\", $this->value, $this->operator);\n }", "title": "" }, { "docid": "33d808b49cc0d4afd1ac7a6cc72579bb", "score": "0.556862", "text": "public static function QuerySingle(QQCondition $objConditions, $objOptionalClauses = null, $mixParameterArray = null) {\n\t\t\t// Get the Query Statement\n\t\t\ttry {\n\t\t\t\t$strQuery = Restaurant::BuildQueryStatement($objQueryBuilder, $objConditions, $objOptionalClauses, $mixParameterArray, false);\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\n\t\t\t// Perform the Query, Get the First Row, and Instantiate a new Restaurant object\n\t\t\t$objDbResult = $objQueryBuilder->Database->Query($strQuery);\n\n\t\t\t// Do we have to expand anything?\n\t\t\tif ($objQueryBuilder->ExpandAsArrayNodes) {\n\t\t\t\t$objToReturn = array();\n\t\t\t\twhile ($objDbRow = $objDbResult->GetNextRow()) {\n\t\t\t\t\t$objItem = Restaurant::InstantiateDbRow($objDbRow, null, $objQueryBuilder->ExpandAsArrayNodes, $objToReturn, $objQueryBuilder->ColumnAliasArray);\n\t\t\t\t\tif ($objItem)\n\t\t\t\t\t\t$objToReturn[] = $objItem;\n\t\t\t\t}\n\t\t\t\tif (count($objToReturn)) {\n\t\t\t\t\t// Since we only want the object to return, lets return the object and not the array.\n\t\t\t\t\treturn $objToReturn[0];\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No expands just return the first row\n\t\t\t\t$objDbRow = $objDbResult->GetNextRow();\n\t\t\t\tif(null === $objDbRow)\n\t\t\t\t\treturn null;\n\t\t\t\treturn Restaurant::InstantiateDbRow($objDbRow, null, null, null, $objQueryBuilder->ColumnAliasArray);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0cfa619f077c863bd8af929a55b7fb71", "score": "0.5557144", "text": "public function find()\n {\n // convert to criteria.\n $criteria = call_user_func_array(array($this, 'argsToCriteria'), func_get_args());\n $criteria->limit(1);\n\n // find.\n $entities = $this->findAll($criteria);\n return $entities->first();\n }", "title": "" }, { "docid": "51c34ba1c57626e4640ab72b811fad10", "score": "0.5551623", "text": "public static function getFirstQuery($sql, $params = null)\n {\n self::init();\n return self::$dbDriver->getFirstQuery($sql, $params);\n }", "title": "" }, { "docid": "9da527e8790f85669c8991759b647c8a", "score": "0.5538323", "text": "abstract function loadSingleRecord($where = '', $order = '', $joins = '', \n $limitOffset = false, $limitCount = false, $tableAlias = false);", "title": "" }, { "docid": "dbcbdc378485310062e3e3624adac7ec", "score": "0.5537648", "text": "abstract public function queryObjectFirstSlave($sql);", "title": "" }, { "docid": "a90965d5b4c31a466347082866e20c84", "score": "0.5536168", "text": "abstract public function Query();", "title": "" }, { "docid": "c6a1400a99865e23b6c44f667c491795", "score": "0.55256534", "text": "public function first()\n {\n $this->parameters['pageSize'] = 1;\n $this->parameters['page'] = 0;\n return $this->get();\n }", "title": "" }, { "docid": "28a3ea228cf73d626e12e04d344c0cf1", "score": "0.5523998", "text": "public function first(){\n $temp = $this->queryResult[0];\n $this->queryResult = [];\n return $temp;\n }", "title": "" }, { "docid": "49030f874897c3605f8c4c8de4382378", "score": "0.5520759", "text": "function query() {\n\n // make sure base table is included in the query\n $this->ensure_my_table();\n // retrieve real filter name from view options\n // this requires 'real field' filter option to be set (see code above)\n $real_field_name = $this->real_field;\n\n // get the value of the submitted filter\n $value = $this->view->exposed_data[$real_field_name];\n\n $field_value = $this->view->exposed_data[$this->field];\n\n $breakpoint = strtotime($this->options['breakpoint']);\n\n if($this->value[0] == 'before'){\n $this->query->add_where('AND', $this->options['date_field'], $breakpoint, '<');\n } else {\n $this->query->add_where('AND', $this->options['date_field'], $breakpoint, '>=');\n }\n\n }", "title": "" }, { "docid": "0b4fee71ef163e794895e7b9c3cbc42c", "score": "0.5514196", "text": "public function firstOrFail();", "title": "" }, { "docid": "d87c7a54f4c12d216ea0d81f8b436895", "score": "0.550956", "text": "public static function findFirst(Filter ...$filters)\n {\n $results = static::find(...$filters);\n\n if (sizeof($results) == 0) {\n throw new RecordNotFoundException(get_called_class(), 0);\n }\n\n return $results[0];\n }", "title": "" }, { "docid": "bd315b5a65a14d0be4e42b193afced9a", "score": "0.5508861", "text": "public function testSelectOne()\n {\n $criteria = new Criteria();\n $criteria->setTableName('actor');\n $criteria->whereEquals('actor_id', 14);\n $this->assertEquals(null, $this->object->selectOne($criteria));\n }", "title": "" }, { "docid": "d3388063c7340b59a3d55e6b5bad697a", "score": "0.5505346", "text": "function fetchSingle($tblName,$optCondition=\"\"){\n\t\tif(trim($optCondition) != \"\"){\n\t\t\t$condition = \" WHERE \" . $optCondition;\n\t\t}else{\n\t\t\t$condition = \"\";\n\t\t}\t\t\n\t\t$sql=\"SELECT * FROM \" . $tblName . $condition; //print $sql;\n\t\t$result = mysql_query($sql);\n\t\t//return mysql_fetch_array($result);\n\t\treturn mysql_fetch_assoc($result);\n\t}", "title": "" }, { "docid": "89571ebd257cc3540eda72e9bc626e53", "score": "0.55021185", "text": "static function select($table, $condition,$call_pos=''){\n\t\tif($result = self::select_id($table, $condition,$call_pos='')){\n\t\t\treturn $result;\n\t\t}\n\t\telse{\n\t\t\treturn self::exists('SELECT * FROM `'.$table.'` WHERE '.$condition.' LIMIT 0,1',$call_pos);\n\t\t}\n\t}", "title": "" }, { "docid": "ac389f823ff202f6010c4883506274b6", "score": "0.54984677", "text": "function getOneRecord($sql, $data=NULL){\n global $db;\n // Prepare SQL statement\n $stm = $db->prepare($sql);\n // Execute SQL statement\n $stm->execute($data);\n // Fetch all the records\n $result = $stm->fetch(PDO::FETCH_ASSOC);\n // return values\n return $result;\n}", "title": "" }, { "docid": "85adc7bd7e7929cb069bde7dd6429169", "score": "0.5492852", "text": "protected function query_one ( $sql )\n\t{\n\t\tlist($sql, $args) = $this->sql_args(func_get_args());\n\t\treturn any_db_query_one($sql, $args);\n\t}", "title": "" }, { "docid": "a7348f80f97efc854bd9582a3e356083", "score": "0.5490394", "text": "protected function _first($where = array(), $fields = array(\"*\"), $joins = array(), $order = null, $direction = null) {\n\n\t\t\t$query = Database::query()\n\t\t\t\t->from($this->table, $fields);\n \t\t\n\t\t\tforeach ($where as $i) {\n\t\t\t\tlist($clause, $operator, $value) = $i;\n\t\t\t\t$query->where($clause, $operator, $value);\n\t\t\t}\n\n\t\t\tif (!empty($joins)) {\n\t\t\t\tforeach ($joins as $i) {\n\t\t\t\t\tlist($join, $on, $fields) = $i;\n\t\t\t\t\t$query->join($join, $on, $fields);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($order != null) {\n\t\t\t\t$query->order($order, $direction);\n\t\t\t}\n\n\t\t\t$first = $query->first();\n\n\t\t\t$class = get_class($this);\n\t\n\t\t\tif ($first) {\n\t\t\t\treturn new $class(\n\t\t\t\t\t$first\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "title": "" }, { "docid": "8088d1a01d59444d03eb7eee840b03c4", "score": "0.5489557", "text": "public static function findOne($criteria = null);", "title": "" }, { "docid": "f7e44567e4a09b8aa4523beaadf12562", "score": "0.5488192", "text": "public static function find_by_id($id_num=0) {\n //$sql = \"SELECT * from {static::$table_name} WHERE id = {$id_num}\";\n $sql = \"SELECT * from \".static::$table_name.\" WHERE id = {$id_num}\";\n $record = self::find_by_sql($sql);\n // return $record;\n $record= array_shift($record);\n return !empty($record) ? $record : FALSE;\n //$this->full_name();\n }", "title": "" }, { "docid": "abbf7a12e6b51865eeaf5dbbada396d2", "score": "0.5487888", "text": "public function queryFirst($query, $params = array(), $use_master = false) {\r\n\t\t$result = $this->query ( $query, $params, $use_master );\r\n\t\tif (empty ( $result )) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn $result [0];\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "86665f4eb02c2caa2883c47c5d652211", "score": "0.5481084", "text": "public function query()\n {\n $props = $this->getSetMemberVariables();\n \n if (empty($props))\n {\n $columns = '*';\n $conditions = '1=1';\n }\n else\n {\n $columns = '';\n $columnSep = '';\n $conditions = '';\n $conditionSep = '';\n foreach ($props as $col => $value)\n {\n $columns .= $columnSep.$col;\n $columnSep = ',';\n $conditions .= $conditionSep.$col.' = \\''.mysql_real_escape_string($value).'\\'';\n $conditionSep = ' and ';\n }\n }\n \n $this->sql_query(\"select $columns from {$this->getTable()} where $conditions\");\n \n return mysql_num_rows($this->queryHandle);\n }", "title": "" }, { "docid": "d4108fcc440387aa85dabf87805be9a6", "score": "0.54805094", "text": "public function singleQuery($sql, ...$args ){\n\t\t$this->prepare($sql);\n\n for($i = 0; $i < count($args); $i++){\n $this->bind($i+1,$args[$i]);\n }\n \n return $this->getSingle();\n\t}", "title": "" }, { "docid": "fb7977f122afbfcb1ec4e970e31cce12", "score": "0.54789305", "text": "function record_exists($table, $field1=null, $value1=null, $field2=null, $value2=null, $field3=null, $value3=null) {\n\n global $CFG;\n\n $select = where_clause_prepared($field1, $field2, $field3);\n\n $values = where_values_prepared($value1, $value2, $value3);\n \n return record_exists_sql('SELECT * FROM '. $CFG->prefix . $table .' '. $select .' LIMIT 1',$values);\n}", "title": "" } ]
753b3dbc8309ff2be6ddf4ef2071c92a
goes through tables 'fk' rules and builds ['tableName' => 'depth'] which will be used for consistent model mapping
[ { "docid": "b73caec9aa86723be22c21991ab4911e", "score": "0.6091626", "text": "public static function DEPTH_BUILDER($table, &$depth) {\n if ($depth-- > 0 && isset(Config::get('TABLES')[$table]['fk']) === true) {\n foreach (Config::get('TABLES')[$table]['fk'] as $column => $referenceRule) {\n if (isset(Moedoo::$DEPTH[$referenceRule['table']]) === false) {\n Moedoo::$DEPTH[$referenceRule['table']] = $depth;\n } elseif (isset(Moedoo::$DEPTH[$referenceRule['table']]) === true && Moedoo::$DEPTH[$referenceRule['table']] < $depth) {\n Moedoo::$DEPTH[$referenceRule['table']] = $depth;\n }\n\n $d = $depth;\n Moedoo::DEPTH_BUILDER($referenceRule['table'], $d);\n }\n }\n\n return Moedoo::$DEPTH;\n }", "title": "" } ]
[ { "docid": "071b54ff7da802386c272c101389a1d7", "score": "0.62919194", "text": "public static function referenceFK($table, $rows, &$depth = 1) {\n if (isset(Config::get('TABLES')[$table]['fk']) === true) {\n //-> fk rules exist for the table\n if ($depth > 0) {\n $d = $depth;\n Moedoo::MAPPER($table, $d);\n $d = $depth;\n Moedoo::DEPTH_BUILDER($table, $d);\n\n // passing to cache builder --------------------------------------------------------------\n foreach (Moedoo::$MAPPER as $t => $id) {\n Moedoo::CACHE_BUILDER($t, $id);\n }\n // ./ passing to cache builder -----------------------------------------------------------\n\n // mapping -------------------------------------------------------------------------------\n foreach ($rows as $i => &$row) {\n foreach (Config::get('TABLES')[$table]['fk'] as $column => $referenceRule) {\n if (isset(Moedoo::$included[$referenceRule['table']]) === false) {\n //-> initiating $included...\n Moedoo::$included[$referenceRule['table']] = [];\n }\n\n if (preg_match('/^[a-z].+$/', $column) === 1) {\n //-> column\n // we need to *preserve* depth so other\n // FK rules get a chance to do their thing with depth\n $d = Moedoo::$DEPTH[$referenceRule['table']] - 1;\n\n if (isset(Moedoo::$CACHE_MAP[$referenceRule['table']][$row[$column]]) === true) {\n //-> reference has been cached\n Moedoo::$included[$referenceRule['table']][$row[$column]] = Moedoo::FK($referenceRule['table'], Moedoo::$CACHE_MAP[$referenceRule['table']][$row[$column]], $d);\n } else {\n //-> column has not been cached\n $columns = Moedoo::buildReturn($referenceRule['table']);\n $query = \"SELECT $columns FROM {$referenceRule['table']} WHERE {$referenceRule['references']} = :1;\";\n\n try {\n $includeRows = Moedoo::executeQuery($referenceRule['table'], $query, [$row[$column]]);\n\n if (count($includeRows) === 0) {\n //-> reference no longer exits\n // setting cache to null...\n Moedoo::$CACHE_MAP[$referenceRule['table']][$row[$column]] = null;\n } else {\n $includeRows = Moedoo::cast($referenceRule['table'], $includeRows);\n // setting cache to the first row...\n Moedoo::$CACHE_MAP[$referenceRule['table']][$row[$column]] = $includeRows[0];\n Moedoo::$included[$referenceRule['table']][$row[$column]] = Moedoo::FK($referenceRule['table'], $includeRows[0], $d);\n }\n } catch (Exception $e) {\n throw new Exception($e->getMessage(), 1);\n }\n }\n } elseif (preg_match('/^\\[.+\\]$/', $column) === 1) {\n //-> [column]\n $column = trim($column, '[]');\n\n foreach ($row[$column] as $j => $fkId) {\n if (isset(Moedoo::$CACHE_MAP[$referenceRule['table']][$fkId]) === true) {\n $d = Moedoo::$DEPTH[$referenceRule['table']] - 1;\n Moedoo::$included[$referenceRule['table']][$fkId] = Moedoo::FK($referenceRule['table'], Moedoo::$CACHE_MAP[$referenceRule['table']][$fkId], $d);\n }\n }\n } elseif (preg_match('/^\\{.+\\}$/', $column) === 1) {\n //-> {column}\n $column = trim($column, '{}');\n $row[Config::get('RELATIONSHIP_KEY')][$column] = [];\n $pk = Config::get('TABLES')[$referenceRule['table']]['pk'];\n\n if ((isset(Config::get('TABLES')[$referenceRule['table']]['[int]']) && in_array($referenceRule['referencing_column'], Config::get('TABLES')[$referenceRule['table']]['[int]'])) || (isset(Config::get('TABLES')[$referenceRule['table']]['[string]']) && in_array($referenceRule['referencing_column'], Config::get('TABLES')[$referenceRule['table']]['[string]']))) {\n //-> reverse fk []\n foreach (Moedoo::$CACHE_MAP[$referenceRule['table']] as $id => $rRow) {\n if (in_array($row[$referenceRule['referenced_by']], $rRow[$referenceRule['referencing_column']]) === true) {\n array_push($row[Config::get('RELATIONSHIP_KEY')][$column], $rRow[$pk]);\n $d = Moedoo::$DEPTH[$referenceRule['table']] - 1;\n Moedoo::$included[$referenceRule['table']][$rRow[$pk]] = Moedoo::FK($referenceRule['table'], $rRow, $d);\n }\n }\n } else {\n //-> single reverse fk\n foreach (Moedoo::$CACHE_MAP[$referenceRule['table']] as $id => $rRow) {\n if ($rRow[$referenceRule['referencing_column']] === $row[$referenceRule['referenced_by']]) {\n array_push($row[Config::get('RELATIONSHIP_KEY')][$column], $rRow[$pk]);\n //-> include check\n $d = Moedoo::$DEPTH[$referenceRule['table']] - 1;\n Moedoo::$included[$referenceRule['table']][$rRow[$pk]] = Moedoo::FK($referenceRule['table'], $rRow, $d);\n }\n }\n }\n }\n }\n }\n // ./ mapping ----------------------------------------------------------------------------\n }\n }\n\n return $rows;\n }", "title": "" }, { "docid": "56e73ee302c54774bc01d8b2e1efe56f", "score": "0.6081996", "text": "public function loadForeignKeyConstrains() {\r\n\r\n try {\r\n $stm = $this->dbh->prepare('SELECT k.COLUMN_NAME, i.TABLE_NAME, i.CONSTRAINT_TYPE, i.CONSTRAINT_NAME, k.REFERENCED_TABLE_NAME, k.REFERENCED_COLUMN_NAME \r\n FROM information_schema.TABLE_CONSTRAINTS i \r\n LEFT JOIN information_schema.KEY_COLUMN_USAGE k ON i.CONSTRAINT_NAME = k.CONSTRAINT_NAME \r\n WHERE i.CONSTRAINT_TYPE = \"FOREIGN KEY\" \r\n AND i.TABLE_SCHEMA = DATABASE()\r\n AND i.TABLE_NAME = \"' . $this->table . '\"');\r\n $stm->execute();\r\n } catch (PDOException $e) {\r\n $this->HandleDBError($e);\r\n }\r\n\r\n\r\n $ii = 0;\r\n while ($row = $stm->fetch(PDO::FETCH_ASSOC)) {\r\n $this->tableConstraints[$row['CONSTRAINT_NAME']]['type'] = $row['CONSTRAINT_TYPE'];\r\n $this->tableConstraints[$row['CONSTRAINT_NAME']]['column'] = $row['COLUMN_NAME'];\r\n $this->tableConstraints[$row['CONSTRAINT_NAME']]['refernce_column'] = $row['REFERENCED_COLUMN_NAME'];\r\n $this->tableConstraints[$row['CONSTRAINT_NAME']]['refernce_table'] = $row['REFERENCED_TABLE_NAME'];\r\n $this->tableDescription[$row['COLUMN_NAME']]['fk_name'] = $row['CONSTRAINT_NAME'];\r\n $ii++;\r\n }\r\n }", "title": "" }, { "docid": "964f44cb226255ec95e5528f198a24f0", "score": "0.6062545", "text": "protected function _find_foreign_keys()\n\t{\n\t\tif ( ! empty($this->_foreign_keys))\n\t\t{\n\t\t\t// Only process foreign keys once\n\t\t\treturn;\n\t\t}\n\n\t\t// Pull out relationship data\n\t\tforeach (array('has_many', 'belongs_to', 'has_one') as $type)\n\t\t{\n\t\t\t// The foreign keys are prepended with \"_\"\n\t\t\t$var = '_'.$type;\n\n\t\t\tforeach ($this->$var as $field_name => $val)\n\t\t\t{\n\t\t\t\t// Se the foreign key as the key and the field name as the value\n\t\t\t\t$key = Arr::get($val, 'far_key') ?: $val['foreign_key'];\n\t\t\t\t$this->_foreign_keys[$type][$key] = $field_name;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d8d359134f49f61051bd11d1dcd40ad7", "score": "0.5938445", "text": "public function getTableForeignKeys($tableName);", "title": "" }, { "docid": "08f9254f554c3c347a7a25d15d8e9a01", "score": "0.5914316", "text": "function getParentTableNames($tableName) {\n // get foreign key field name\n $fields = $this->getFieldNames($tableName);\n $foreignKeyFieldName = $this->getForiegnKeyFieldName($fields);\n // split up to get parent table name\n foreach ($foreignKeyFieldName as $fkeyName) {\n $k = rtrim($fkeyName, $this->priKeyName);\n if (!empty($k)){\n $tbls[] = $k;\n }\n }\n return $tbls;\n }", "title": "" }, { "docid": "cf4a54ed50798bcb4e85eea97af1860d", "score": "0.5798604", "text": "function getChildTableNames($tableName) {\n // concat with prikeyname\n $childForeignKeyName = $tableName. $this->priKeyName;\n //check for other tables have a field with resulting name\n $tables = $this->getTables($this->db);\n foreach ($tables as $tbl) {\n $fields = $this->getFieldNames($tbl);\n if (in_array($childForeignKeyName, $fields)) {\n // add to array\n $childTables[] = $tbl;\n }\n }\n return $childTables;\n }", "title": "" }, { "docid": "fbd925b30d8d2f98859ef673ce9cf8d5", "score": "0.5766162", "text": "protected function initForeignKeys()\r\n {\r\n // columns have to be loaded first\r\n if (!$this->colsLoaded) $this->initColumns();\r\n include_once 'creole/metadata/ForeignKeyInfo.php';\r\n \r\n if (!@mssql_select_db($this->dbname, $this->conn->getResource())) {\r\n throw new SQLException('No database selected');\r\n } \r\n \r\n $res = mssql_query(\"SELECT ccu1.TABLE_NAME, ccu1.COLUMN_NAME, ccu2.TABLE_NAME AS FK_TABLE_NAME, ccu2.COLUMN_NAME AS FK_COLUMN_NAME\r\n FROM INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE ccu1 INNER JOIN\r\n INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc1 ON tc1.CONSTRAINT_NAME = ccu1.CONSTRAINT_NAME AND \r\n CONSTRAINT_TYPE = 'Foreign Key' INNER JOIN\r\n INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS rc1 ON rc1.CONSTRAINT_NAME = tc1.CONSTRAINT_NAME INNER JOIN\r\n INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE ccu2 ON ccu2.CONSTRAINT_NAME = rc1.UNIQUE_CONSTRAINT_NAME\r\n WHERE (ccu1.table_name = '\".$this->name.\"')\", $this->conn->getResource());\r\n \r\n while($row = mssql_fetch_array($res)) {\r\n $name = $row['COLUMN_NAME'];\r\n $ftbl = $row['FK_TABLE_NAME'];\r\n $fcol = $row['FK_COLUMN_NAME'];\r\n\r\n if (!isset($this->foreignKeys[$name])) {\r\n $this->foreignKeys[$name] = new ForeignKeyInfo($name);\r\n\r\n if ($this->database->hasTable($ftbl)) {\r\n $foreignTable = $this->database->getTable($ftbl);\r\n } else { \r\n $foreignTable = new TableInfo($ltbl);\r\n $this->database->addTable($foreignTable);\r\n }\r\n\r\n if ($foreignTable->hasColumn($fcol)) {\r\n $foreignCol = $foreignTable->getColumn($fcol);\r\n } else { \r\n $foreignCol = new ColumnInfo($foreignTable, $fcol);\r\n $foreignTable->addColumn($foreignCol);\r\n }\r\n \r\n $this->foreignKeys[$name]->addReference($this->columns[$name], $foreignCol);\r\n }\r\n }\r\n \r\n $this->fksLoaded = true;\r\n }", "title": "" }, { "docid": "cb1531a4c6574e517fc307b866b72782", "score": "0.57081157", "text": "public function populateFK()\n\t{\n\t\tforeach ($this -> fk as $key => $value)\n\t\t{\n\t\t\t$order = (isset($this -> orderby[$key])) ? \"ORDER BY \" . $this -> orderby[$key] : \"\";\n\t\t\t$dados[$key] = $this -> consulta(\"SELECT * FROM `{$key}` {$order}\");\n\t\t}\n\n\t\treturn $dados;\n\t}", "title": "" }, { "docid": "b12a6375f83bbfdb5dc3acada749eae0", "score": "0.5704977", "text": "protected function _build_dynamic_relations()\n {\n\n // Retrieve fields configuration\n $st = $this->db->select('field_config_instance', 'fi');\n\n $st->join('field_config', 'fc', 'fc.id = fi.field_id');\n $st->condition('fi.bundle', $this->bundle, '=')\n ->condition('fi.entity_type', $this->entity->info()['entity'], '=')\n ->condition('fi.deleted', 0, '=')\n ->condition('fc.active', 1, '=')\n ->condition('fc.deleted', 0, '=');\n\n $st->addField('fi', 'field_name');\n $st->addField('fc', 'data');\n $st->addField('fc', 'cardinality');\n $st->addField('fc', 'type');\n\n $fields_ref = $st->execute()->fetchAll();\n\n $dynamic_relations = array('children' => array());\n\n foreach ($fields_ref as $field)\n {\n\n $schema = unserialize($field->data);\n\n // Ignore fields with storage different than sql\n if ($schema['storage']['type'] != 'field_sql_storage')\n continue;\n\n\n // Ignore fields without current fields\n if (!empty($schema['storage']['details']['sql']['FIELD_LOAD_CURRENT'])) {\n\n // Get table name\n $table = array_keys($schema['storage']['details']['sql']['FIELD_LOAD_CURRENT'])[0];\n\n $dynamic_relations['children'][$field->field_name]['table'] = $table;\n $dynamic_relations['children'][$field->field_name]['type'] = $field->type;\n\n $dynamic_relations['children'][$field->field_name]['cardinality'] = $field->cardinality;\n\n // Build key relations\n $dynamic_relations['children'][$field->field_name]['keys'][] = \"{$this->entity->info()['keys']['id']}:entity_id\";\n $dynamic_relations['children'][$field->field_name]['keys'][] = \"#{$this->entity->info()['entity']}:entity_type\";\n $dynamic_relations['children'][$field->field_name]['keys'][] = \"#{$this->bundle}:bundle\";\n\n\n // Copy value fields\n $dynamic_relations['children'][$field->field_name]['fields'] = $schema['storage']['details']['sql']['FIELD_LOAD_CURRENT'][$table];\n }\n\n\n if (!empty($schema['storage']['details']['sql']['FIELD_LOAD_REVISION'])) {\n\n // Get table name\n $table = array_keys($schema['storage']['details']['sql']['FIELD_LOAD_REVISION'])[0];\n\n $dynamic_relations['revision'][$field->field_name]['table'] = $table;\n $dynamic_relations['revision'][$field->field_name]['type'] = $field->type;\n\n $dynamic_relations['revision'][$field->field_name]['cardinality'] = $field->cardinality;\n\n // Build key relations\n $dynamic_relations['revision'][$field->field_name]['keys'][] = \"{$this->entity->info()['keys']['id']}:entity_id\";\n $dynamic_relations['revision'][$field->field_name]['keys'][] = \"#{$this->entity->info()['entity']}:entity_type\";\n $dynamic_relations['revision'][$field->field_name]['keys'][] = \"#{$this->bundle}:bundle\";\n\n\n // Copy value fields\n $dynamic_relations['revision'][$field->field_name]['fields'] = $schema['storage']['details']['sql']['FIELD_LOAD_REVISION'][$table];\n }\n\n }\n\n\n if (!empty($dynamic_relations))\n {\n $new_dynamic_relations = $this->entity->dynamic_relations();\n $new_dynamic_relations = $new_dynamic_relations + $dynamic_relations;\n $this->entity->dynamic_relations($new_dynamic_relations);\n }\n\n }", "title": "" }, { "docid": "f64bef51dc0d47a50c4e2905048341ad", "score": "0.56879693", "text": "public function getForeignKeyNames($table_name);", "title": "" }, { "docid": "ce2dc3da338bf9ba0799e3c8299157e9", "score": "0.5644064", "text": "public static function tableForeignKeys($tableName)\n {\n $result = ['inner' => [], 'outer' => []];\n foreach (Yii::$app->db->schema->tableSchemas as $table) {\n $foreignKeys = static::findConstraints($table);\n /** @var TableSchema $table */\n if ($table->name == $tableName) {\n $result['inner'] = $foreignKeys;\n continue;\n }\n foreach ($foreignKeys as $foreignKey) {\n if ($foreignKey['ftable'] == $tableName) {\n $result['outer'][] = $foreignKey;\n }\n }\n }\n return $result;\n }", "title": "" }, { "docid": "5932038464f127a647f4f07ca304e569", "score": "0.562455", "text": "protected function getForeignKeys()\n\t{\n\t\t$this->loadClassFileList();\n\n\t\t$tmp = array();\n\t\t\n\t\tforeach( $this->classList as $obj )\n\t\t{\n\t\t\t$list = $obj->metadata()->getRelations();\n\t\t\t\n\t\t\tforeach( $list as $fk )\n\t\t\t{\n\t\t\t\tif( $fk['type'] == Lumine_Metadata::MANY_TO_ONE )\n\t\t\t\t{\n\t\t\t\t\t$foreign = $this->classList[ $fk['class'] ];\n\t\t\t\t\t$field = $foreign->metadata()->getField( $fk['linkOn'] );\n\t\t\t\t\t\n\t\t\t\t\t$this->foreignKeys[] = array(\n\t\t\t\t\t\t'table' => $obj->metadata()->getTablename(),\n\t\t\t\t\t\t'column' => $fk['column'],\n\t\t\t\t\t\t'reftable' => $foreign->metadata()->getTablename(),\n\t\t\t\t\t\t'refcolumn' => $field['column'],\n\t\t\t\t\t\t'onUpdate' => $fk['onUpdate'],\n\t\t\t\t\t\t'onDelete' => $fk['onDelete']\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9a340f3a8ecf5935d3fcabd0745ba202", "score": "0.5621507", "text": "protected function addForeignKeyConstraints()\n {\n \n \n }", "title": "" }, { "docid": "caa32e4f824542fc32c4b348205b426a", "score": "0.5592987", "text": "private function findRelationships()\n\t{\n\t\t$this->relationships = array();\n\t\t$tables = $this->getTables();\n\t\t\n\t\tforeach ($tables as $table) {\n\t\t\t$this->relationships[$table]['one-to-one'] = array();\n\t\t\t$this->relationships[$table]['many-to-one'] = array();\n\t\t\t$this->relationships[$table]['one-to-many'] = array();\n\t\t\t$this->relationships[$table]['many-to-many'] = array();\n\t\t}\n\t\t\n\t\t// Calculate the relationships\n\t\tforeach ($this->merged_keys as $table => $keys) {\n\t\t\t$this->findManyToManyRelationships($table);\n\t\t\t\n\t\t\t//if ($this->isJoiningTable($table)) {\n\t\t\t//\tcontinue;\n\t\t\t//}\n\t\t\t\n\t\t\t$this->findStarToOneRelationships($table);\n\t\t\t$this->findOneToManyRelationships($table);\n\t\t}\n\t\t\n\t\tif ($this->cache) {\n\t\t\t$this->cache->set($this->makeCachePrefix() . 'relationships', $this->relationships);\t\n\t\t}\n\t}", "title": "" }, { "docid": "a0967cb0283ac132ddce56ca59760fa5", "score": "0.5583775", "text": "public static function getForeignKeys() {\n\t\t$keys = array();\n\n\t\t$std = new \\stdClass();\n\t\t$std->table = \"person\";\n\t\t$std->field = \"id\";\n\t\t\n\t\t$keys['opened_actor'] = $std;\t\n\t\t$std = new \\stdClass();\n\t\t$std->table = \"task_category\";\n\t\t$std->field = \"id\";\n\t\t\n\t\t$keys['category'] = $std;\t\n\t\t$std = new \\stdClass();\n\t\t$std->table = \"person\";\n\t\t$std->field = \"id\";\n\t\t\n\t\t$keys['closed_actor'] = $std;\t\n\t\t$std = new \\stdClass();\n\t\t$std->table = \"thread\";\n\t\t$std->field = \"id\";\n\t\t\n\t\t$keys['thread'] = $std;\t\n\t\treturn $keys;\n\t}", "title": "" }, { "docid": "ced895ac1dd6dfdd42e4c73b6d35b97c", "score": "0.5582725", "text": "private function getDependentFkColumns($tableName)\n {\n\n $dbName = env('DB_DATABASE');\n $fkColumns = DB::select(\"SELECT *\nFROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE\nWHERE\n REFERENCED_TABLE_NAME = '$tableName' \n AND TABLE_SCHEMA = '$dbName' \n AND CONSTRAINT_NAME != 'PRIMARY'\");\n\n return $fkColumns;\n }", "title": "" }, { "docid": "b80da95e3cb671f443b02a773bd2e9f5", "score": "0.5545877", "text": "private function rewriteSpec() {\n foreach($this->tables2 as $table=>$tdetails) {\n # KFD 1/29/11 If a child table has only foreign keys,\n # then there will be no columns, this is ok\n #$cols1 = $this->arr($tdetails,'columns',array());\n #foreach($cols as $column=>$cdetails) {\n if(!isset($tdetails['columns'])) continue;\n \n foreach($tdetails['columns'] as $column=>$cdetails) {\n $this->rfRewriteType($table,$column,$cdetails);\n $this->rfExpandType($table,$column,$cdetails);\n $this->rwExpandAuto($table,$column,$cdetails);\n }\n }\n }", "title": "" }, { "docid": "278a5807a992826db11d59263c8a9f70", "score": "0.55117273", "text": "private static function _generate_foreign_tables( $resource_info, &$key_mapping )\n\t\t{\n\n\t\t\t// Loop through each key.\n\t\t\t$key_index = 1;\n\t\t\t$table_join = '';\n\t\t\tforeach ( $resource_info['foreign_keys'] as $key => $reference )\n\t\t\t{\n\n\t\t\t\t// Make sure the information has been populated for the referenced resource.\n\t\t\t\tif ( !self::$resource_info[$reference] )\n\t\t\t\t\tnew $reference();\n\n\t\t\t\t// Find out which table this key belongs to.\n\t\t\t\t$key_table = $resource_info['fields'][$key];\n\n\t\t\t\t// Add to the key mapping array.\n\t\t\t\t$key_mapping[$key] = array( 'reference' => $reference );\n\n\t\t\t\t// Loop through each table for the referenced resource.\n\t\t\t\tforeach ( self::$resource_info[$reference]['tables'] as $table_name => $table_info )\n\t\t\t\t{\n\n\t\t\t\t\t// Add to the table join.\n\t\t\t\t\t$table_join .= ' LEFT JOIN ' . $table_name . ' AS f' . $key_index . ' ON f' . $key_index . '.' . $table_info['id'] . ' = ' . $key_table . '.' . $key;\n\n\t\t\t\t\t// Add to the key mapping array.\n\t\t\t\t\t$key_mapping[$key]['tables'][$table_name] = $key_index;\n\t\t\t\t\t++$key_index;\n\n\t\t\t\t} // Next table.\n\n\t\t\t} // Next key.\n\n\t\t\treturn $table_join;\n\n\t\t}", "title": "" }, { "docid": "aec837ddea5e443f99d1a5b3ce0313df", "score": "0.55011845", "text": "protected function findConstraints($table)\n {\n $row=$this->getDbConnection()->createCommand('SHOW CREATE TABLE '.$table->rawName)->queryRow();\n $matches=array();\n $regexp='/FOREIGN KEY\\s+\\(([^\\)]+)\\)\\s+REFERENCES\\s+([^\\(^\\s]+)\\s*\\(([^\\)]+)\\)/mi';\n foreach($row as $sql)\n {\n if(preg_match_all($regexp,$sql,$matches,PREG_SET_ORDER))\n break;\n }\n foreach($matches as $match)\n {\n $keys=array_map('trim',explode(',',str_replace(array('`','\"'),'',$match[1])));\n $fks=array_map('trim',explode(',',str_replace(array('`','\"'),'',$match[3])));\n foreach($keys as $k=>$name)\n {\n $table->foreignKeys[$name]=array(str_replace(array('`','\"'),'',$match[2]),$fks[$k]);\n if(isset($table->columns[$name]))\n $table->columns[$name]->isForeignKey=true;\n }\n }\n }", "title": "" }, { "docid": "b77a454957dba559e4f8d45084e2eed9", "score": "0.54835755", "text": "private function getTableFK($tableName, $fkRealName) {\n\t\t$fkRealName = $this->removeQuoting($fkRealName);\n\n \t$q = $this->db->query(\"SHOW CREATE TABLE $tableName\");\n \t\n \t$foreignKeys = (array)$q->row(); \t\n \t$regexp='/CONSTRAINT\\s+([^\\)]+)\\s+FOREIGN KEY\\s+\\(([^\\)]+)\\)\\s+REFERENCES\\s+([^\\(^\\s]+)\\s*\\(([^\\)]+)\\)/mi';\n \tpreg_match_all($regexp,$foreignKeys['Create Table'],$matches,PREG_SET_ORDER);\n \t\n \t$result = false;\n \t\n \tif (!empty($matches)) {\n\t \tforeach ($matches as $item) {\n\t \t\t$item[2] = $this->removeQuoting($item[2]);\n\t \t\t\n\t \t\tif ($item[2] == $fkRealName) {\n\t \t\t\t$result = $this->removeQuoting($item[1]);\n\t \t\t\tbreak;\n\t \t\t}\n\t \t}\n \t}\n \t\n \treturn $result;\n\t}", "title": "" }, { "docid": "6816343c1a2e0db2e7d62dfabcf530d8", "score": "0.5474112", "text": "protected function addForeignKeyConstraints()\n {\n \n }", "title": "" }, { "docid": "8d09cdc591775ed9cf48bc4f140b5b30", "score": "0.5467126", "text": "private function makeModelRelationships($tableName)\n {\n $out = '';\n\n if(!empty($this->relationships[$tableName])) {\n\n $singularSelf = strtolower($this->data[$tableName]['singular']);\n\n foreach($this->relationships[$tableName] as $relationship) {\n\n $pluralForeign = $relationship['on'];\n $singularForeign = strtolower($this->data[$pluralForeign]['singular']);\n $SingularForeign = ucfirst($singularForeign);\n\n $path = __DIR__ . '/templates/modelRelationship/' . $relationship['type'] . '.stub';\n $template = file_get_contents($path);\n\n $search = [\n '{{singularForeign}}',\n '{{SingularForeign}}',\n '{{singularSelf}}',\n '{{pluralForeign}}'\n ];\n $replace = [\n $singularForeign,\n $SingularForeign,\n $singularSelf,\n $pluralForeign\n ];\n\n $out .= str_replace($search, $replace, $template) . PHP_EOL . PHP_EOL;\n\n }\n }\n\n return $out;\n\n }", "title": "" }, { "docid": "c867272fdcf8a78ba4eadba6a569f257", "score": "0.5456827", "text": "private function getFkColumns($tableName)\n {\n $fkColumns = DB::select(\"SELECT DISTINCT\n TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME, REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME\n FROM\n INFORMATION_SCHEMA.KEY_COLUMN_USAGE\n WHERE\n TABLE_NAME = '$tableName' AND CONSTRAINT_NAME != 'PRIMARY' and REFERENCED_TABLE_NAME is not null\");\n\n return $fkColumns;\n }", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5437446", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5437446", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5437446", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5437446", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5437446", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.54230964", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.54230964", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.54230964", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.54230964", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.54230964", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.54230964", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.54230964", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.54230964", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.54230964", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.54230964", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "8bd5ffa23e5b9742bf2e06fe601431ec", "score": "0.5414403", "text": "function resolveJoins(&$tables)\n\t{\n\t\tforeach ($tables as $tablename => $discard)\n\t\t{\n\t\t\t// PHP4 compatible: can't do : foreach ($tables as $tablename => &$tabledef)\n\t\t\t// and strangely, if we do \n\t\t\t// foreach ($tables as $tablename => &$tabledef)\n\t\t\t// \t$tabledef =& $tables[$tablename];\n\t\t\t// then we get bugs\n\t\t\t$tabledef =& $tables[$tablename]; \n\t\t\tforeach ($tabledef as $colname => $discard)\n\t\t\t{\n\t\t\t\t$coldef =& $tabledef[$colname]; // PHP4 compatible\n\t\t\t\tif (is_a($coldef, 'JoinColumn') or is_subclass_of($coldef, 'JoinColumn'))\n\t\t\t\t{\n\t\t\t\t\tTableUtils::resolveColumnJoin($coldef, $tables);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t}", "title": "" }, { "docid": "1ad214a4262276c086f00ea91fb6cfe3", "score": "0.5406652", "text": "private function _processForeignKeys()\n {\n $relationTables = $this->_model->getForeignKeys($this->_tableName);\n\n if (count($relationTables) > 0) {\n\n $this->_relationTables = $relationTables;\n $tables = Zrad_Db::getInstance()->getAdapter()->listTables();\n $error = false;\n\n foreach ($relationTables['name'] as $table) {\n if (!in_array($table, $tables)) {\n $message = array('La tabla \"' . $table . '\" no existe en la bd \"' . $this->_model->getDb()->getDbName() . '\"');\n $this->_util->output($message);\n $error = true;\n break;\n }\n }\n\n if ($error) {\n throw new Exception('Error al encontrar tablas relacionadas');\n }\n }\n }", "title": "" }, { "docid": "a88bbb72f0a2de66e69f2161d62f8c16", "score": "0.53944457", "text": "protected function findConstraints($table)\n\t{\n\t\t$foreignKeys=array();\n\t\t$sql=\"PRAGMA foreign_key_list({$table->rawName})\";\n\t\t$keys=$this->getDbConnection()->createCommand($sql)->queryAll();\n\t\tforeach($keys as $key)\n\t\t{\n\t\t\t$column=$table->columns[$key['from']];\n\t\t\t$column->isForeignKey=true;\n\t\t\t$foreignKeys[$key['from']]=array($key['table'],$key['to']);\n\t\t}\n\t\t$table->foreignKeys=$foreignKeys;\n\t}", "title": "" }, { "docid": "693b15ef37eb1f524dee169ecbe9527f", "score": "0.5391858", "text": "protected function _extractForeignKeys()\n {\n foreach ($this->_constraints as $name => $attrs) {\n if ($attrs['type'] === static::CONSTRAINT_FOREIGN) {\n $this->_foreignKeys[$name] = $attrs;\n unset($this->_constraints[$name]);\n }\n }\n }", "title": "" }, { "docid": "f2b5ca8c47802d685bb19ba1f6ad9bc7", "score": "0.5389128", "text": "public static function FK($tFK, $rFK, &$dFK) {\n if ($dFK-- >= 0) {\n if (isset(Config::get('TABLES')[$tFK]['fk']) === true) {\n foreach (Config::get('TABLES')[$tFK]['fk'] as $column => $referenceRule) {\n if (isset(Moedoo::$CACHE_MAP[$referenceRule['table']]) === false) {\n //-> the column table to be checked in cache is not of [table] or {table}\n //-> `$CACHE_MAP` will be built per request\n // booting `$CACHE_MAP` table...\n Moedoo::$CACHE_MAP[$referenceRule['table']] = [];\n }\n\n if (preg_match('/^[a-z].+/', $column) === 1 && isset(Moedoo::$CACHE_MAP[$referenceRule['table']][$rFK[$column]]) === false) {\n //-> `$column` not found in `$CACHE_MAP`, adding...\n $columns = Moedoo::buildReturn($referenceRule['table']);\n $query = \"SELECT $columns FROM {$referenceRule['table']} WHERE {$referenceRule['references']} = :1;\";\n\n try {\n $includeRows = Moedoo::executeQuery($referenceRule['table'], $query, [$rFK[$column]]);\n\n if (count($includeRows) === 0) {\n //-> reference no longer exits\n // setting cache to null...\n Moedoo::$CACHE_MAP[$referenceRule['table']][$rFK[$column]] = null;\n } else {\n $includeRows = Moedoo::cast($referenceRule['table'], $includeRows);\n // setting cache to the first row...\n Moedoo::$CACHE_MAP[$referenceRule['table']][$rFK[$column]] = $includeRows[0];\n\n if ($dFK === -1 && Moedoo::$DEPTH[$referenceRule['table']] > 0) {\n Moedoo::$included[$referenceRule['table']][$rFK[$column]] = Moedoo::FKRelationship($referenceRule['table'], $includeRows[0]);\n } else {\n $d = $dFK;\n Moedoo::$included[$referenceRule['table']][$rFK[$column]] = Moedoo::FK($referenceRule['table'], $includeRows[0], $d);\n }\n }\n } catch (Exception $e) {\n throw new Exception($e->getMessage(), 1);\n }\n } elseif (preg_match('/^[a-z].+/', $column) === 1 && isset(Moedoo::$CACHE_MAP[$referenceRule['table']][$rFK[$column]]) === true && Moedoo::$CACHE_MAP[$referenceRule['table']][$rFK[$column]] !== null) {\n //-> column - cached\n if ($dFK === -1 && Moedoo::$DEPTH[$referenceRule['table']] > 0) {\n Moedoo::$included[$referenceRule['table']][$rFK[$column]] = Moedoo::FKRelationship($referenceRule['table'], Moedoo::$CACHE_MAP[$referenceRule['table']][$rFK[$column]]);\n } else {\n $d = $dFK;\n Moedoo::$included[$referenceRule['table']][$rFK[$column]] = Moedoo::FK($referenceRule['table'], Moedoo::$CACHE_MAP[$referenceRule['table']][$rFK[$column]], $d);\n }\n } elseif (preg_match('/^\\[.+\\]$/', $column) === 1) {\n //-> [column]\n $column = trim($column, '[]');\n\n foreach ($rFK[$column] as $j => $fkId) {\n if (isset(Moedoo::$CACHE_MAP[$referenceRule['table']][$fkId]) === true && Moedoo::$CACHE_MAP[$referenceRule['table']][$fkId] !== null) {\n if ($dFK === -1 && Moedoo::$DEPTH[$referenceRule['table']] > 0) {\n Moedoo::$included[$referenceRule['table']][$fkId] = Moedoo::FKRelationship($referenceRule['table'], Moedoo::$CACHE_MAP[$referenceRule['table']][$fkId]);\n } else {\n $d = $dFK;\n Moedoo::$included[$referenceRule['table']][$fkId] = Moedoo::FK($referenceRule['table'], Moedoo::$CACHE_MAP[$referenceRule['table']][$fkId], $d);\n }\n }\n }\n } elseif (preg_match('/^\\{.+\\}$/', $column) === 1) {\n //-> {column}\n $column = trim($column, '{}');\n $rFK[Config::get('RELATIONSHIP_KEY')][$column] = [];\n $pk = Config::get('TABLES')[$referenceRule['table']]['pk'];\n\n if ((isset(Config::get('TABLES')[$referenceRule['table']]['[int]']) && in_array($referenceRule['referencing_column'], Config::get('TABLES')[$referenceRule['table']]['[int]'])) || (isset(Config::get('TABLES')[$referenceRule['table']]['[string]']) && in_array($referenceRule['referencing_column'], Config::get('TABLES')[$referenceRule['table']]['[string]']))) {\n //-> reverse fk []\n foreach (Moedoo::$CACHE_MAP[$referenceRule['table']] as $id => $rRow) {\n if (in_array($rFK[$referenceRule['referenced_by']], $rRow[$referenceRule['referencing_column']]) === true) {\n array_push($rFK[Config::get('RELATIONSHIP_KEY')][$column], $rRow[$pk]);\n\n if ($dFK === -1 && Moedoo::$DEPTH[$referenceRule['table']] > 0) {\n Moedoo::$included[$referenceRule['table']][$rRow[$pk]] = Moedoo::FKRelationship($referenceRule['table'], $rRow);\n } else {\n $d = $dFK;\n Moedoo::$included[$referenceRule['table']][$rRow[$pk]] = Moedoo::FK($referenceRule['table'], $rRow, $d);\n }\n }\n }\n } else {\n //-> single reverse fk\n foreach (Moedoo::$CACHE_MAP[$referenceRule['table']] as $id => $rRow) {\n if ($rRow[$referenceRule['referencing_column']] === $rFK[$referenceRule['referenced_by']]) {\n array_push($rFK[Config::get('RELATIONSHIP_KEY')][$column], $rRow[$pk]);\n\n if ($dFK === -1 && Moedoo::$DEPTH[$referenceRule['table']] > 0) {\n Moedoo::$included[$referenceRule['table']][$rRow[$pk]] = Moedoo::FKRelationship($referenceRule['table'], $rRow);\n } else {\n $d = $dFK;\n Moedoo::$included[$referenceRule['table']][$rRow[$pk]] = Moedoo::FK($referenceRule['table'], $rRow, $d);\n }\n }\n }\n }\n }\n }\n }\n }\n\n return $rFK;\n }", "title": "" }, { "docid": "fd66880d5ff29dc074aaccbf203db969", "score": "0.5383504", "text": "final public static function getSqlCreateTable()\n\t{\n\t\t$createDefinitions = array();\n\t\t\n\t\tforeach( static::$fields as $field => $options )\n\t\t\t$createDefinitions[] = static::getSqlFieldDefinition( $field, $options );\n\t\t\n\t\tif( count( (array) static::$keys[\"primary\"] ) > 0 )\n\t\t\t$createDefinitions[] = \"CONSTRAINT `pk_\". static::$table. \"` PRIMARY KEY ( `\". implode( \"`, `\", (array) static::$keys[\"primary\"] ). \"` )\";\n\t\t\t\n\t\tif( array_key_exists( \"foreign\", static::$keys ) )\n\t\t{\n\t\t\t// This array is used to handle multiple foreign keys that reference the same table\n\t\t\t// If tables or schemas have too long name or if there is more than ten foreign keys\n\t\t\t// that reference the same table, the generated key name may be invalid.\n\t\t\t$fkCount = array();\n\t\t\t\n\t\t\tforeach( static::$keys[\"foreign\"] as $foreign )\n\t\t\t{\n\t\t\t\tif( !array_key_exists( \"table\", $foreign ) && !is_null( $foreign[\"table\"] ) )\n\t\t\t\t\tdie( \"Invalid foreign key for \". get_called_class(). \" class. No reference table has been specified.\" );\n\t\t\t\t\n\t\t\t\t// Generating foreign key and its index name\n\t\t\t\t$fkName = \"fk_\". static::$table. \"_\". ( array_key_exists( \"schema\", $foreign ) && !is_null( $foreign[\"schema\"] ) && $foreign[\"schema\"] != static::$schema ? $foreign[\"schema\"]. \"_\" : \"\" ). $foreign[\"table\"];\n\t\t\t\t\n\t\t\t\tif( strlen( $fkName ) > 63 )\n\t\t\t\t\t$fkName = substr( $fkName, 0, 63 );\n\t\t\t\t\t\n\t\t\t\t// Handle multiple foreign key on the same table\n\t\t\t\tif( array_key_exists( $fkName, $fkCount ) )\n\t\t\t\t\t$fkName .= $fkCount[$fkName]++;\n\t\t\t\telse\n\t\t\t\t\t$fkCount[$fkName] = 1;\n\t\t\t\t\n\t\t\t\t// Check for origin fields definition\n\t\t\t\tif( !array_key_exists( \"fields\", $foreign ) && !is_null( $foreign[\"fields\"] ) )\n\t\t\t\t\tdie( \"Invalid foreign key `\". $fkName. \"` for \". get_called_class(). \" class. No origin fields have been specified.\" );\n\t\t\t\t\t\n\t\t\t\t// Check for referenced fields definition\n\t\t\t\tif( !array_key_exists( \"references\", $foreign ) && !is_null( $foreign[\"references\"] ) )\n\t\t\t\t\tdie( \"Invalid foreign key `\". $fkName. \"` for \". get_called_class(). \" class. No reference fields have been specified.\" );\n\t\t\t\t\n\t\t\t\t// Check for fields count egality\n\t\t\t\tif( count( (array) $foreign[\"fields\"] ) != count( (array) $foreign[\"references\"] ) )\n\t\t\t\t\tdie( \"Invalid foreign key `\". $fkName. \"` for \". get_called_class(). \" class. Origin and referenced fields count does not match.\" );\n\t\t\t\t\n\t\t\t\t// Check for fields types\n\t\t\t\t$foreignFields = (array) $foreign[\"fields\"];\n\t\t\t\t$foreignReferences = (array) $foreign[\"references\"];\n\t\t\t\tfor( $i = 0 ; $i < count( $foreignFields ) ; $i++ )\n\t\t\t\t{\n\t\t\t\t\t$referencedClass = static::getClassName( $foreign[\"table\"] );\n\n\t\t\t\t\tif( static::getSqlFieldDefinition( \"\", static::$fields[$foreignFields[$i]], true ) != static::getSqlFieldDefinition( \"\", $referencedClass::$fields[$foreignReferences[$i]], true ) )\n\t\t\t\t\t\tdie( \"Invalid foreign key `\". $fkName. \"` for \". get_called_class(). \" class. Fields `\". static::$table. \"`.`\". $foreignFields[$i]. \"` and `\". $foreign[\"table\"]. \"`.`\". $foreignReferences[$i]. \"` do not have the same type.\" );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Constraint\n\t\t\t\t$fk = \"CONSTRAINT `\". $fkName. \"` FOREIGN KEY ( `\". implode( \"`, `\", (array) $foreign[\"fields\"] ). \"` ) REFERENCES `\". ( array_key_exists( \"schema\", $foreign ) && !is_null( $foreign[\"schema\"] ) ? $foreign[\"schema\"] : static::$schema ) . \"`.`\". $foreign[\"table\"]. \"` ( `\". implode( \"`, `\", (array) $foreign[\"references\"] ). \"` )\";\n\t\t\t\t\n\t\t\t\t// Foreign key update & delete events\n\t\t\t\tif( array_key_exists( \"onUpdate\", $foreign ) && in_array( $foreign[\"onUpdate\"], array( \"cascade\", \"set null\", \"restrict\" ) ) )\n\t\t\t\t\t$fk .= \" ON UPDATE \". strtoupper( $foreign[\"onUpdate\"] );\n\t\t\t\telse\n\t\t\t\t\t$fk .= \" ON UPDATE NO ACTION\";\n\t\t\t\t\n\t\t\t\tif( array_key_exists( \"onDelete\", $foreign ) && in_array( $foreign[\"onDelete\"], array( \"cascade\", \"set null\", \"restrict\" ) ) )\n\t\t\t\t\t$fk .= \" ON DELETE \". strtoupper( $foreign[\"onDelete\"] );\n\t\t\t\telse\n\t\t\t\t\t$fk .= \" ON DELETE NO ACTION\";\n\t\t\t\t\t\n\t\t\t\t$createDefinitions[] = $fk;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn \"CREATE TABLE `\". static::$schema. \"`.`\". static::$table. \"` ( \". implode( \", \", $createDefinitions ). \" ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;\";\n\t}", "title": "" }, { "docid": "b019ed4d73ad2797fc3f0dcc2b41d651", "score": "0.53726643", "text": "public function buildRelations()\n\t{\n\t\t$this->addRelation('TeamUser', 'TeamUser', RelationMap::ONE_TO_MANY, array('id' => 'user_id', ), null, null, 'TeamUsers');\n\t\t$this->addRelation('UserProject', 'UserProject', RelationMap::ONE_TO_MANY, array('id' => 'user_id', ), null, null, 'UserProjects');\n\t\t$this->addRelation('Tag', 'Tag', RelationMap::ONE_TO_MANY, array('id' => 'user_id', ), 'CASCADE', null, 'Tags');\n\t\t$this->addRelation('Entry', 'Entry', RelationMap::ONE_TO_MANY, array('id' => 'user_id', ), 'CASCADE', null, 'Entrys');\n\t\t$this->addRelation('AuditEvent', 'AuditEvent', RelationMap::ONE_TO_MANY, array('id' => 'user_id', ), 'CASCADE', null, 'AuditEvents');\n\t\t$this->addRelation('OOBooking', 'OOBooking', RelationMap::ONE_TO_MANY, array('id' => 'user_id', ), 'CASCADE', null, 'OOBookings');\n\t\t$this->addRelation('RegularEntry', 'RegularEntry', RelationMap::ONE_TO_MANY, array('id' => 'user_id', ), 'CASCADE', null, 'RegularEntrys');\n\t\t$this->addRelation('ProjectEntry', 'ProjectEntry', RelationMap::ONE_TO_MANY, array('id' => 'user_id', ), 'CASCADE', null, 'ProjectEntrys');\n\t\t$this->addRelation('OOEntry', 'OOEntry', RelationMap::ONE_TO_MANY, array('id' => 'user_id', ), 'CASCADE', null, 'OOEntrys');\n\t\t$this->addRelation('AdjustmentEntry', 'AdjustmentEntry', RelationMap::ONE_TO_MANY, array('id' => 'user_id', ), 'CASCADE', null, 'AdjustmentEntrys');\n\t\t$this->addRelation('Team', 'Team', RelationMap::MANY_TO_MANY, array(), null, null, 'Teams');\n\t\t$this->addRelation('Project', 'Project', RelationMap::MANY_TO_MANY, array(), null, null, 'Projects');\n\t}", "title": "" }, { "docid": "f212f07fded2b3ea158033f846f055d4", "score": "0.5362438", "text": "protected function createAllFK(Blueprint $table)\n {\n foreach ($this->getDataForForeignKey() as $columnName => $value) {\n\n $table->foreign($columnName)\n ->references($value[self::FOREIGN_TABLE_ID])->on($value[self::FOREIGN_TABLE])\n ->onDelete($value[self::ON_DELETE])\n ->onUpdate($value[self::ON_UPDATE]);\n }\n\n }", "title": "" }, { "docid": "f80f63796c27799fa80dcb6ef50f0e67", "score": "0.53585136", "text": "private function joinManyMany($joinTable,$fks,$parent)\n\t{\n\t\t$schema=$this->_builder->getSchema();\n\t\t$joinAlias=$schema->quoteTableName($this->relation->name.'_'.$this->tableAlias);\n\t\t$parentCondition=array();\n\t\t$childCondition=array();\n\n\t\t$fkDefined=true;\n\t\tforeach($fks as $i=>$fk)\n\t\t{\n\t\t\tif(!isset($joinTable->columns[$fk]))\n\t\t\t\tthrow new CDbException(Yii::t('yii','The relation \"{relation}\" in active record class \"{class}\" is specified with an invalid foreign key \"{key}\". There is no such column in the table \"{table}\".',\n\t\t\t\t\tarray('{class}'=>get_class($parent->model), '{relation}'=>$this->relation->name, '{key}'=>$fk, '{table}'=>$joinTable->name)));\n\n\t\t\tif(isset($joinTable->foreignKeys[$fk]))\n\t\t\t{\n\t\t\t\tlist($tableName,$pk)=$joinTable->foreignKeys[$fk];\n\t\t\t\tif(!isset($parentCondition[$pk]) && $schema->compareTableNames($parent->_table->rawName,$tableName))\n\t\t\t\t\t$parentCondition[$pk]=$parent->getColumnPrefix().$schema->quoteColumnName($pk).'='.$joinAlias.'.'.$schema->quoteColumnName($fk);\n\t\t\t\telseif(!isset($childCondition[$pk]) && $schema->compareTableNames($this->_table->rawName,$tableName))\n\t\t\t\t\t$childCondition[$pk]=$this->getColumnPrefix().$schema->quoteColumnName($pk).'='.$joinAlias.'.'.$schema->quoteColumnName($fk);\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$fkDefined=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$fkDefined=false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(!$fkDefined)\n\t\t{\n\t\t\t$parentCondition=array();\n\t\t\t$childCondition=array();\n\t\t\t$pkCount=is_array($parent->_table->primaryKey)?count($parent->_table->primaryKey):1;\n\t\t\tforeach($fks as $i=>$fk)\n\t\t\t{\n\t\t\t\tif($i<$pkCount)\n\t\t\t\t{\n\t\t\t\t\t$pk=is_array($parent->_table->primaryKey) ? $parent->_table->primaryKey[$i] : $parent->_table->primaryKey;\n\t\t\t\t\t$parentCondition[$pk]=$parent->getColumnPrefix().$schema->quoteColumnName($pk).'='.$joinAlias.'.'.$schema->quoteColumnName($fk);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$j=$i-$pkCount;\n\t\t\t\t\t$pk=is_array($this->_table->primaryKey) ? $this->_table->primaryKey[$j] : $this->_table->primaryKey;\n\t\t\t\t\t$childCondition[$pk]=$this->getColumnPrefix().$schema->quoteColumnName($pk).'='.$joinAlias.'.'.$schema->quoteColumnName($fk);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($parentCondition!==array() && $childCondition!==array())\n\t\t{\n\t\t\t$join=$this->relation->joinType.' '.$joinTable->rawName.' '.$joinAlias;\n\n\t\t\tif(is_array($this->relation->joinOptions) && isset($this->relation->joinOptions[0]) &&\n\t\t\t\tis_string($this->relation->joinOptions[0]))\n\t\t\t\t$join.=' '.$this->relation->joinOptions[0];\n\t\t\telseif(!empty($this->relation->joinOptions) && is_string($this->relation->joinOptions))\n\t\t\t\t$join.=' '.$this->relation->joinOptions;\n\n\t\t\t$join.=' ON ('.implode(') AND (',$parentCondition).')';\n\t\t\t$join.=' '.$this->relation->joinType.' '.$this->getTableNameWithAlias();\n\n\t\t\tif(is_array($this->relation->joinOptions) && isset($this->relation->joinOptions[1]) &&\n\t\t\t\tis_string($this->relation->joinOptions[1]))\n\t\t\t\t$join.=' '.$this->relation->joinOptions[1];\n\n\t\t\t$join.=' ON ('.implode(') AND (',$childCondition).')';\n\t\t\tif(!empty($this->relation->on))\n\t\t\t\t$join.=' AND ('.$this->relation->on.')';\n\t\t\treturn $join;\n\t\t}\n\t\telse\n\t\t\tthrow new CDbException(Yii::t('yii','The relation \"{relation}\" in active record class \"{class}\" is specified with an incomplete foreign key. The foreign key must consist of columns referencing both joining tables.',\n\t\t\t\tarray('{class}'=>get_class($parent->model), '{relation}'=>$this->relation->name)));\n\t}", "title": "" }, { "docid": "c668369a7f4187937d56223ecfd8ca87", "score": "0.53504443", "text": "private function _set_relationships()\n {\n if(empty($this->_relationships))\n {\n $options = array('has_one','has_many','has_many_pivot');\n foreach($options as $option)\n {\n if(isset($this->{$option}) && !empty($this->{$option}))\n {\n foreach($this->{$option} as $key => $relation)\n {\n $single_query=false;\n if(!is_array($relation))\n {\n $foreign_model = $relation;\n $model = $this->_parse_model_dir($foreign_model);\n $foreign_model = $model['foreign_model'];\n //$model_dir = $model['model_dir'];\n $foreign_model_name = $model['foreign_model_name'];\n\n $this->load->model($foreign_model, $foreign_model_name);\n $foreign_table = $this->{$foreign_model_name}->table;\n $foreign_key = $this->{$foreign_model_name}->primary_key;\n $local_key = $this->primary_key;\n $pivot_local_key = $this->table.'_'.$local_key;\n $pivot_foreign_key = $foreign_table.'_'.$foreign_key;\n $get_relate = FALSE;\n\n }\n else\n {\n if($this->is_assoc($relation))\n {\n $foreign_model = $relation['foreign_model'];\n $model = $this->_parse_model_dir($foreign_model);\n $foreign_model = $model['model_dir'].$model['foreign_model'];\n $foreign_model_name = $model['foreign_model_name'];\n\n if(array_key_exists('foreign_table',$relation))\n {\n $foreign_table = $relation['foreign_table'];\n }\n else\n {\n $this->load->model($foreign_model, $foreign_model_name);\n $foreign_table = $this->{$foreign_model_name}->table;\n }\n\n $foreign_key = $relation['foreign_key'];\n $local_key = $relation['local_key'];\n if($option=='has_many_pivot')\n {\n $pivot_table = $relation['pivot_table'];\n $pivot_local_key = (array_key_exists('pivot_local_key',$relation)) ? $relation['pivot_local_key'] : $this->table.'_'.$this->primary_key;\n $pivot_foreign_key = (array_key_exists('pivot_foreign_key',$relation)) ? $relation['pivot_foreign_key'] : $foreign_table.'_'.$foreign_key;\n $get_relate = (array_key_exists('get_relate',$relation) && ($relation['get_relate']===TRUE)) ? TRUE : FALSE;\n }\n if($option=='has_one' && isset($relation['join']) && $relation['join']===true)\n {\n $single_query=true;\n }\n }\n else\n {\n $foreign_model = $relation[0];\n $model = $this->_parse_model_dir($foreign_model);\n $foreign_model = $model['model_dir'].$model['foreign_model'];\n $foreign_model_name = $model['foreign_model_name'];\n\n $this->load->model($foreign_model);\n $foreign_table = $this->{$foreign_model}->table;\n $foreign_key = $relation[1];\n $local_key = $relation[2];\n if($option=='has_many_pivot')\n {\n $pivot_local_key = $this->table.'_'.$this->primary_key;\n $pivot_foreign_key = $foreign_table.'_'.$foreign_key;\n $get_relate = (isset($relation[3]) && ($relation[3]===TRUE())) ? TRUE : FALSE;\n }\n }\n\n }\n\n if($option=='has_many_pivot' && !isset($pivot_table))\n {\n $tables = array($this->table, $foreign_table);\n sort($tables);\n $pivot_table = $tables[0].'_'.$tables[1];\n }\n\n $this->_relationships[$key] = array('relation' => $option, 'relation_key' => $key, 'foreign_model' => strtolower($foreign_model), 'foreign_model_name'=>strtolower($foreign_model_name), 'foreign_table' => $foreign_table, 'foreign_key' => $foreign_key, 'local_key' => $local_key);\n if($option == 'has_many_pivot')\n {\n $this->_relationships[$key]['pivot_table'] = $pivot_table;\n $this->_relationships[$key]['pivot_local_key'] = $pivot_local_key;\n $this->_relationships[$key]['pivot_foreign_key'] = $pivot_foreign_key;\n $this->_relationships[$key]['get_relate'] = $get_relate;\n }\n if($single_query===true)\n {\n $this->_relationships[$key]['joined'] = true;\n }\n }\n }\n }\n }\n\n }", "title": "" }, { "docid": "8595c0f930c0c37adef5c78db711e70a", "score": "0.53348315", "text": "public static function getForeignKeys() {\n\t\t$keys = array();\n\n\t\t$std = new \\stdClass();\n\t\t$std->table = \"person\";\n\t\t$std->field = \"id\";\n\t\t\n\t\t$keys['person'] = $std;\t\n\t\t$std = new \\stdClass();\n\t\t$std->table = \"thread_post\";\n\t\t$std->field = \"id\";\n\t\t\n\t\t$keys['reply'] = $std;\t\n\t\t$std = new \\stdClass();\n\t\t$std->table = \"thread\";\n\t\t$std->field = \"id\";\n\t\t\n\t\t$keys['thread'] = $std;\t\n\t\treturn $keys;\n\t}", "title": "" }, { "docid": "e7f39a03a7343c59757eae4ffaa300df", "score": "0.52778935", "text": "public function buildRelations()\n {\n $this->addRelation('CiUsuariosRelatedByIdUserCreated', '\\\\CiUsuarios', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, null, false);\n $this->addRelation('CiUsuariosRelatedByIdUserModified', '\\\\CiUsuarios', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, null, false);\n $this->addRelation('HbfClubs', '\\\\HbfClubs', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_club',\n 1 => ':id_club',\n ),\n), null, null, null, false);\n $this->addRelation('CiUsuariosRelatedByIdAsociado', '\\\\CiUsuarios', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_asociado',\n 1 => ':id_usuario',\n ),\n), null, null, null, false);\n $this->addRelation('HbfTurnos', '\\\\HbfTurnos', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_turno',\n 1 => ':id_turno',\n ),\n), null, null, null, false);\n $this->addRelation('CiOptions', '\\\\CiOptions', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_opcion_sesion',\n 1 => ':id_option',\n ),\n), null, null, null, false);\n $this->addRelation('CiSessions', '\\\\CiSessions', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_hbf_sesion',\n 1 => ':id_sesion',\n ),\n), null, null, 'CiSessionss', false);\n $this->addRelation('CiUsuariosRelatedByIdSesion', '\\\\CiUsuarios', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_sesion',\n 1 => ':id_sesion',\n ),\n), null, null, 'CiUsuariossRelatedByIdSesion', false);\n $this->addRelation('HbfComandas', '\\\\HbfComandas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_sesion',\n 1 => ':id_sesion',\n ),\n), null, null, 'HbfComandass', false);\n $this->addRelation('HbfEgresos', '\\\\HbfEgresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_sesion',\n 1 => ':id_sesion',\n ),\n), null, null, 'HbfEgresoss', false);\n $this->addRelation('HbfPrepagos', '\\\\HbfPrepagos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_sesion',\n 1 => ':id_sesion',\n ),\n), null, null, 'HbfPrepagoss', false);\n $this->addRelation('HbfVentas', '\\\\HbfVentas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_sesion',\n 1 => ':id_sesion',\n ),\n), null, null, 'HbfVentass', false);\n }", "title": "" }, { "docid": "f5f7e0e3c508b8766aa0492af30415de", "score": "0.527707", "text": "public static function getDefName() {\n return [\n\t\t 'idtablaparentPKFK',\n\t\t 'idcategoryPKFK'\n\t\t];\n }", "title": "" }, { "docid": "7156c7e4d41dcfc46cbee90caaef02d1", "score": "0.52647996", "text": "public function buildRelations()\n\t{\n $this->addRelation('WatchInfo', 'WatchInfo', RelationMap::MANY_TO_ONE, array('watch_info_id' => 'id', ), 'CASCADE', null);\n $this->addRelation('WatchCode', 'WatchCode', RelationMap::MANY_TO_ONE, array('watch_code_id' => 'id', ), 'CASCADE', null);\n $this->addRelation('WatchVisibility', 'WatchVisibility', RelationMap::MANY_TO_ONE, array('watch_visibility_id' => 'id', ), 'CASCADE', null);\n $this->addRelation('Specie', 'Specie', RelationMap::MANY_TO_ONE, array('specie_id' => 'id', ), 'CASCADE', null);\n $this->addRelation('Behaviour', 'Behaviour', RelationMap::MANY_TO_ONE, array('behaviour_id' => 'id', ), 'CASCADE', null);\n $this->addRelation('Direction', 'Direction', RelationMap::MANY_TO_ONE, array('direction_id' => 'id', ), 'CASCADE', null);\n $this->addRelation('Vessel', 'Vessel', RelationMap::MANY_TO_ONE, array('vessel_id' => 'id', ), null, null);\n\t}", "title": "" }, { "docid": "24e337a26ab5946c0a1fec963740ba89", "score": "0.525316", "text": "public function getForeignKeys($tableName)\n {\n $dbName = $this->_db->getDbName();\n $db = $this->_db->getAdapter();\n\n $select = $db->select()\n ->from(array('i' => 'information_schema.KEY_COLUMN_USAGE'), array('TABLE_NAME', 'CONSTRAINT_NAME', 'COLUMN_NAME', 'REFERENCED_TABLE_NAME', 'REFERENCED_COLUMN_NAME'))\n ->where('CONSTRAINT_SCHEMA = ?', $dbName)\n ->where('REFERENCED_TABLE_NAME IS NOT NULL')\n ->where('TABLE_NAME = ?', $tableName);\n $results = $db->query($select)->fetchAll(Zend_Db::FETCH_ASSOC);\n\n $tables = array();\n foreach ($results as $result) {\n $tables['referenced_field'][] = $result['REFERENCED_COLUMN_NAME'];\n $tables['name'][] = $result['REFERENCED_TABLE_NAME'];\n $tables['field'][] = $result['COLUMN_NAME'];\n }\n return $tables;\n }", "title": "" }, { "docid": "8e9310145707f831a78b4a6a7b9d7148", "score": "0.5227277", "text": "protected function addForeignKeyConstraints()\n {\n $sMemberTableName = $this->tablePrefix .'bm_schedule_membership';\n $sTeamTableName = $this->tablePrefix .'bm_schedule_team';\n \n $this->table->addForeignKeyConstraint($sMemberTableName, ['membership_id'], ['membership_id'], [], null);\n $this->table->addForeignKeyConstraint($sTeamTableName, ['team_id'], ['team_id'], [], null);\n \n }", "title": "" }, { "docid": "7a76ed17a7c2671a1a6c02e255964f1c", "score": "0.5210032", "text": "public function generateAll( $appName ) {\r\n \t\t\r\n \t\tLogger::getInstance()->pm_log(\"PersistentManager::generateAll ======\");\r\n $dalForApp = $this->dal; //\r\n \r\n\t\t// Todas las clases del primer nivel del modelo.\r\n\t\t$A = ModelUtils::getSubclassesOf( 'PersistentObject', $appName ); // FIXME> no es recursiva!\r\n\t\t\r\n\t\t// Se utiliza luego para generar FKs.\r\n $generatedPOs = array();\r\n $dalForApp = $this->dal;\r\n \r\n foreach( $A as $clazz )\r\n {\r\n $struct = MultipleTableInheritanceSupport::getMultipleTableInheritanceStructureToGenerateModel( $clazz );\r\n \r\n // struct es un mapeo por clave las clases que generan una tabla y valor las clases que se mapean a esa tabla.\r\n foreach ($struct as $class => $subclassesOnSameTable)\r\n {\r\n // Instancia que genera tabla\r\n $c_ins = new $class(); // FIXME: supongo que ya tiene withTable, luego veo el caso que no se le ponga WT a la superclase...\r\n // FIXME: como tambien tiene los atributos de las superclases y como van en otra tabla, hay que sacarlos.\r\n \r\n // Para cara subclase que se mapea en la misma tabla\r\n foreach ( $subclassesOnSameTable as $subclass )\r\n {\r\n $sc_ins = new $subclass(); // Para setear los atributos.\r\n \r\n $props = $sc_ins->getAttributeTypes();\r\n $hone = $sc_ins->getHasOne();\r\n $hmany = $sc_ins->getHasMany();\r\n \r\n // FIXME: si el artibuto no es de una subclase parece que tambien pone nullable true...\r\n \r\n // Agrega constraint nullable true, para que los atributos de las subclases\r\n // puedan ser nulos en la tabla, para que funcione bien el mapeo de herencia de una tabla.\r\n //Logger::getInstance()->pm_log( \"Para cada attr de: $subclass \" . __FILE__ . \" \" . __LINE__);\r\n foreach ($props as $attr => $type)\r\n {\r\n // FIXME: esta parte seria mas facil si simplemente cuando la clase tiene la constraint \r\n // y le seteo otra del mismo tipo para el mismo atributo, sobreescriba la anterior.\r\n \r\n $constraint = $sc_ins->getConstraintOfClass( $attr, 'Nullable' );\r\n if ($constraint !== NULL)\r\n {\r\n //Logger::getInstance()->log( \"CONTRAINT NULLABLE EXISTE!\");\r\n // Si hay, setea en true\r\n $constraint->setValue(true);\r\n }\r\n else\r\n {\r\n // Si no hay, agrega nueva\r\n //Logger::getInstance()->log( \"CONTRAINT NULLABLE NO EXISTE!, LA AGREGA\");\r\n $sc_ins->addConstraints($attr, array(Constraint::nullable(true)));\r\n }\r\n }\r\n \r\n //Logger::getInstance()->pm_log( \"Termina con las constraints ======= \" . __FILE__ . \" \" . __LINE__);\r\n \r\n // Se toma luego de modificar las restricciones\r\n $constraints = $sc_ins->getConstraints();\r\n \r\n foreach( $props as $name => $type ) $c_ins->addAttribute($name, $type);\r\n foreach( $hone as $name => $type ) $c_ins->addHasOne($name, $type);\r\n foreach( $hmany as $name => $type ) $c_ins->addHasMany($name, $type);\r\n \r\n // Agrego las constraints al final porque puedo referenciar atributos que todavia no fueron agregados.\r\n foreach( $constraints as $attr => $constraintList ) $c_ins->addConstraints($attr, $constraintList);\r\n }\r\n \r\n $parent_class = get_parent_class($c_ins);\r\n if ( $parent_class !== 'PersistentObject' ) // Si la instancia no es de primer nivel\r\n {\r\n // La superclase de c_ins se mapea en otra tabla, saco esos atributos...\r\n $suc_ins = new $parent_class();\r\n $c_ins = PersistentObject::less($c_ins, $suc_ins); // Saco los atributos de la superclase\r\n }\r\n \r\n $tableName = YuppConventions::tableName( $c_ins );\r\n\r\n // FIXME: esta operacion necesita instanciar una DAL por cada aplicacion.\r\n // La implementacion esta orientada a la clase, no a la aplicacion, hay que modificarla.\r\n \r\n // Si la tabla ya existe, no la crea.\r\n if ( !$dalForApp->tableExists( $tableName ) )\r\n {\r\n // FIXME: c_ins no tiene las restricciones sobre los atributos inyectados.\r\n $this->generate( $c_ins, $dalForApp );\r\n \r\n // Para luego generar FKs.\r\n $generatedPOs[] = $c_ins;\r\n }\r\n } // foreach ($struct as $class => $subclassesOnSameTable)\r\n } // foreach( $A as $clazz )\r\n \r\n \r\n // ======================================================================\r\n // Crear FKs en la base.\r\n \r\n //Logger::struct( $generatedPOs, \"GENERATED OBJS\" );\r\n \r\n foreach ($generatedPOs as $ins)\r\n {\r\n $tableName = YuppConventions::tableName( $ins );\r\n $fks = array();\r\n \r\n // FKs hasOne\r\n $ho_attrs = $ins->getHasOne();\r\n foreach ( $ho_attrs as $attr => $refClass )\r\n {\r\n // Problema: pasa lo mismo que pasaba en YuppConventions.relTableName, esta tratando\r\n // de inyectar la FK en la tabla incorrecta porque la instancia es de una superclase\r\n // de la clase donde se declara la relacion HasOne, entonces hay que verificar si una\r\n // subclase no tiene ya el atributo hasOne declarado, para asegurarse que es de la\r\n // instancia actual y no intentar generar la FK si no lo es.\r\n \r\n $instConElAtributoHasOne = NULL;\r\n $subclasses = ModelUtils::getAllAncestorsOf( $ins->getClass() );\r\n \r\n foreach ( $subclasses as $aclass )\r\n {\r\n $ains = new $aclass();\r\n if ( $ains->hasOneOfThis( $refClass ) )\r\n {\r\n //Logger::getInstance()->log( $ains->getClass() . \" TIENE UNO DE: $refClass\" );\r\n $instConElAtributoHasOne = $ains; // EL ATRIBUTO ES DE OTRA INSTANCIA!\r\n break;\r\n }\r\n }\r\n \r\n // Si el atributo de FK hasOne es de la instancia actual, se genera:\r\n if ( $instConElAtributoHasOne === NULL )\r\n {\r\n // Para ChasOne esta generando \"chasOne\", y el nombre de la tabla que aparece en la tabla es \"chasone\".\r\n $refTableName = YuppConventions::tableName( $refClass );\r\n $fks[] = array(\r\n 'name' => DatabaseNormalization::simpleAssoc($attr), // nom_id, $attr = nom\r\n 'table' => $refTableName,\r\n 'refName' => 'id' // Se que esta referencia es al atributo \"id\".\r\n );\r\n }\r\n }\r\n \r\n // FKs tablas intermedias HasMany\r\n $hasMany = $ins->getHasMany();\r\n \r\n foreach ( $hasMany as $attr => $assocClassName )\r\n {\r\n //Logger::getInstance()->pm_log(\"AssocClassName: $assocClassName, attr: $attr\");\r\n \r\n if ( $ins->isOwnerOf( $attr ) ) // VERIFY, FIXME, TODO: Toma la asuncion de que el belongsTo es por clase. Podria generar un problema si tengo dos atributos de la misma clase pero pertenezco a uno y no al otro porque el modelo es asi.\r\n {\r\n $hm_fks = array();\r\n $hasManyTableName = YuppConventions::relTableName( $ins, $attr, new $assocClassName() );\r\n \r\n // \"owner_id\", \"ref_id\" son FKs.\r\n \r\n // ===============================================================================\r\n // El nombre de la tabla owner para la FK debe ser el de la clase \r\n // donde se declara el attr hasMany,\r\n // no para el ultimo de la estructura de MTI (como pasaba antes).\r\n $classes = ModelUtils::getAllAncestorsOf( $ins->getClass() );\r\n \r\n //Logger::struct( $classes, \"Superclases de \" . $ins1->getClass() );\r\n \r\n $instConElAtributoHasMany = $ins; // En ppio pienso que la instancia es la que tiene el atributo masMany.\r\n foreach ( $classes as $aclass )\r\n {\r\n $_ins = new $aclass();\r\n if ( $_ins->hasManyOfThis( $assocClassName ) )\r\n {\r\n //Logger::getInstance()->log(\"TIENE MANY DE \" . $ins2->getClass());\r\n $instConElAtributoHasMany = $_ins;\r\n break;\r\n }\r\n \r\n //Logger::struct( $ins, \"Instancia de $aclass\" );\r\n }\r\n // ===============================================================================\r\n \r\n $hm_fks[] = array(\r\n 'name' => \"owner_id\",\r\n 'table' => YuppConventions::tableName( $instConElAtributoHasMany->getClass() ), // FIXME: Genera link a gs (tabla de G1) aunque el atributo sea declarado en cs (tabla de C1). Esto puede generar problemas al cargar (NO PASA NADA AL CARGAR, ANDA FENOMENO!), aunque la instancia es la misma, deberia hacer la referencia a la tabla correspondiente a la instancia que declara el atributo, solo por consistencia y correctitud.\r\n 'refName' => 'id' // Se que esta referencia es al atributo \"id\".\r\n );\r\n \r\n $hm_fks[] = array(\r\n 'name' => \"ref_id\",\r\n 'table' => YuppConventions::tableName( $assocClassName ),\r\n 'refName' => 'id' // Se que esta referencia es al atributo \"id\".\r\n );\r\n \r\n // Genera FKs\r\n $dalForApp->addForeignKeys($hasManyTableName, $hm_fks);\r\n }\r\n } // foreach hasMany\r\n \r\n // Genera FKs\r\n $dalForApp->addForeignKeys($tableName, $fks);\r\n \r\n } // foreach PO\r\n\t\t\r\n \r\n }", "title": "" }, { "docid": "8e9fc5e1c4e2322c6c286c5efff7fd67", "score": "0.5198671", "text": "function get_relation_map_for_table($table)\n{\n $relation_map = get_relation_map();\n $new_relation_map = array();\n foreach ($relation_map as $from => $to) {\n if ($to !== null) {\n list($from_table, $from_field) = explode('.', $from, 2);\n if ($table == $from_table) {\n list($to_table, $to_field) = explode('.', $to, 2);\n $new_relation_map[$from_field] = array($to_table, $to_field);\n }\n }\n }\n return $new_relation_map;\n}", "title": "" }, { "docid": "d5b855438313b400f9b65b9dc8a893ff", "score": "0.51968", "text": "public function buildRelations()\n {\n $this->addRelation('Ptk', 'DataDikdas\\\\Model\\\\Ptk', RelationMap::MANY_TO_ONE, array('ptk_id' => 'ptk_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('Sekolah', 'DataDikdas\\\\Model\\\\Sekolah', RelationMap::MANY_TO_ONE, array('sekolah_id' => 'sekolah_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('TahunAjaran', 'DataDikdas\\\\Model\\\\TahunAjaran', RelationMap::MANY_TO_ONE, array('tahun_ajaran_id' => 'tahun_ajaran_id', ), 'RESTRICT', 'RESTRICT');\n }", "title": "" }, { "docid": "0f1afefb0f73eac4c201dfaeada5eac8", "score": "0.518844", "text": "public function turnOnForeignKeyChecks();", "title": "" }, { "docid": "80dba0c1a76259633992ad67b9dbb7a0", "score": "0.51713246", "text": "public function buildRelations()\n {\n $this->addRelation('Admision', 'Admision', RelationMap::MANY_TO_ONE, array('idadmision' => 'idadmision', ), null, null);\n $this->addRelation('Consulta', 'Consulta', RelationMap::MANY_TO_ONE, array('idconsulta' => 'idconsulta', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Pacientefacturacion', 'Pacientefacturacion', RelationMap::MANY_TO_ONE, array('iddatosfacturacion' => 'idpacientefacturacion', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Venta', 'Venta', RelationMap::MANY_TO_ONE, array('idventa' => 'idventa', ), null, null);\n }", "title": "" }, { "docid": "d96705c7d07e4a91078486285f3d1a77", "score": "0.51628655", "text": "public function buildRelations()\n {\n $this->addRelation('Ptk', 'DataDikdas\\\\Model\\\\Ptk', RelationMap::MANY_TO_ONE, array('ptk_id' => 'ptk_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('JenisPenghargaan', 'DataDikdas\\\\Model\\\\JenisPenghargaan', RelationMap::MANY_TO_ONE, array('jenis_penghargaan_id' => 'jenis_penghargaan_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('TingkatPenghargaan', 'DataDikdas\\\\Model\\\\TingkatPenghargaan', RelationMap::MANY_TO_ONE, array('tingkat_penghargaan_id' => 'tingkat_penghargaan_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('VldPenghargaan', 'DataDikdas\\\\Model\\\\VldPenghargaan', RelationMap::ONE_TO_MANY, array('penghargaan_id' => 'penghargaan_id', ), 'RESTRICT', 'RESTRICT', 'VldPenghargaans');\n }", "title": "" }, { "docid": "0f7f534d3ee712c1bf7854ce12d83ccb", "score": "0.5162601", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['farm_id'], 'Farms'));\n $rules->add($rules->existsIn(['breedType_id'], 'BreedTypes'));\n $rules->add($rules->existsIn(['animalType_id'], 'AnimalTypes'));\n $rules->add($rules->existsIn(['animalWeight_id'], 'AnimalWeights'));\n // $rules->add($rules->existsIn(['maleParentBreedType_id'], 'MaleParentBreedTypes'));\n // $rules->add($rules->existsIn(['femaleParentBreedType_id'], 'FemaleParentBreedTypes'));\n $rules->add($rules->existsIn(['status_id'], 'Statuses'));\n\n return $rules;\n }", "title": "" }, { "docid": "229d5f7a4517c0d71dc0db13c0621f0e", "score": "0.5160926", "text": "public function buildRelations()\n {\n $this->addRelation('Operations', 'Operations', RelationMap::MANY_TO_ONE, array('op_id' => 'op_id', ), null, null);\n $this->addRelation('RScenarios', 'RScenarios', RelationMap::MANY_TO_ONE, array('op_r_scenario_id' => 'r_scenario_id', ), null, null);\n $this->addRelation('OperationPrimes', 'OperationPrimes', RelationMap::MANY_TO_ONE, array('op_r_prime_id' => 'op_prime_id', ), null, null);\n $this->addRelation('OperationPrestations', 'OperationPrestations', RelationMap::ONE_TO_MANY, array('op_scenario_id' => 'op_prest_scena_id', ), null, null, 'OperationPrestationss');\n $this->addRelation('OperationScenariiParentsRelatedByOpsNumero', 'OperationScenariiParents', RelationMap::ONE_TO_MANY, array('op_scenario_numero' => 'ops_numero', ), null, null, 'OperationScenariiParentssRelatedByOpsNumero');\n $this->addRelation('OperationScenariiParentsRelatedByOpsParentNumero', 'OperationScenariiParents', RelationMap::ONE_TO_MANY, array('op_scenario_numero' => 'ops_parent_numero', ), null, null, 'OperationScenariiParentssRelatedByOpsParentNumero');\n }", "title": "" }, { "docid": "0ed0107a110dbad075769be98381a9e4", "score": "0.5123246", "text": "abstract protected function compileEnableForeignKeyConstraints();", "title": "" }, { "docid": "2d832ca090c804496c266dfaa51fad0f", "score": "0.5118448", "text": "public function create($definition) {\n $sql=[$this->sql_switchFKs(false)];\n foreach($definition as $tableName=>$fields) {\n $sql=array_merge($sql,self::_create($tableName,$fields));\n }\n $sql[]=$this->sql_switchFKs(true);\n return $sql;\n }", "title": "" }, { "docid": "4e96ef28615120fcde8096296c953296", "score": "0.51023704", "text": "public function getRelationshipsMaps()\n {\n \treturn $this->hasMany(RelationshipsMap::className(), ['userid'=>'id']);\n \t//->where(['model_type'=>$this->modelType(),'parent_id'=>0]);\n \t//->all();\n }", "title": "" }, { "docid": "c49878abf5f407c64b19a6fc6da79855", "score": "0.51011264", "text": "public function buildRelations()\n {\n $this->addRelation('SchoolClassRelatedByAncestorClassId', 'SchoolClass', RelationMap::MANY_TO_ONE, array('ancestor_class_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('DocumentRelatedByClassPortraitId', 'Document', RelationMap::MANY_TO_ONE, array('class_portrait_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('Subject', 'Subject', RelationMap::MANY_TO_ONE, array('subject_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('DocumentRelatedByClassScheduleId', 'Document', RelationMap::MANY_TO_ONE, array('class_schedule_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('DocumentRelatedByWeekScheduleId', 'Document', RelationMap::MANY_TO_ONE, array('week_schedule_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('SchoolBuilding', 'SchoolBuilding', RelationMap::MANY_TO_ONE, array('school_building_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('School', 'School', RelationMap::MANY_TO_ONE, array('school_id' => 'id', ), 'CASCADE', null);\n $this->addRelation('UserRelatedByCreatedBy', 'User', RelationMap::MANY_TO_ONE, array('created_by' => 'id', ), 'SET NULL', null);\n $this->addRelation('UserRelatedByUpdatedBy', 'User', RelationMap::MANY_TO_ONE, array('updated_by' => 'id', ), 'SET NULL', null);\n $this->addRelation('ClassStudent', 'ClassStudent', RelationMap::ONE_TO_MANY, array('id' => 'school_class_id', ), 'CASCADE', null, 'ClassStudents');\n $this->addRelation('ClassTeacher', 'ClassTeacher', RelationMap::ONE_TO_MANY, array('id' => 'school_class_id', ), 'CASCADE', null, 'ClassTeachers');\n $this->addRelation('SchoolClassSubjectClassesRelatedBySchoolClassId', 'SchoolClassSubjectClasses', RelationMap::ONE_TO_MANY, array('id' => 'school_class_id', ), 'CASCADE', null, 'SchoolClassSubjectClassessRelatedBySchoolClassId');\n $this->addRelation('SchoolClassSubjectClassesRelatedBySubjectClassId', 'SchoolClassSubjectClasses', RelationMap::ONE_TO_MANY, array('id' => 'subject_class_id', ), 'CASCADE', null, 'SchoolClassSubjectClassessRelatedBySubjectClassId');\n $this->addRelation('SchoolClassRelatedById', 'SchoolClass', RelationMap::ONE_TO_MANY, array('id' => 'ancestor_class_id', ), 'SET NULL', null, 'SchoolClasssRelatedById');\n $this->addRelation('SchoolClassUnitOriginalID', 'SchoolClassUnitOriginalID', RelationMap::ONE_TO_MANY, array('id' => 'school_class_id', ), 'CASCADE', null, 'SchoolClassUnitOriginalIDs');\n $this->addRelation('ClassLink', 'ClassLink', RelationMap::ONE_TO_MANY, array('id' => 'school_class_id', ), 'CASCADE', null, 'ClassLinks');\n $this->addRelation('ClassDocument', 'ClassDocument', RelationMap::ONE_TO_MANY, array('id' => 'school_class_id', ), 'CASCADE', null, 'ClassDocuments');\n $this->addRelation('Event', 'Event', RelationMap::ONE_TO_MANY, array('id' => 'school_class_id', ), 'CASCADE', null, 'Events');\n $this->addRelation('News', 'News', RelationMap::ONE_TO_MANY, array('id' => 'school_class_id', ), 'CASCADE', null, 'Newss');\n }", "title": "" }, { "docid": "fe6292f30951bea882db0137fa6e9228", "score": "0.5095391", "text": "private function makeMigrationRelationships()\n {\n foreach($this->migrations as $tableName => &$migration) {\n $relationships = '';\n if(array_key_exists($tableName, $this->relationships)) {\n foreach($this->relationships[$tableName] as $relationship) {\n $relationships .= $this->makeMigrationRelationship($relationship);\n }\n\n }\n $migration = str_replace('{{relationships}}', $relationships, $migration);\n }\n }", "title": "" }, { "docid": "b945bafddb230e1040cfb923ae7ed14c", "score": "0.5095106", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['student_id'], 'Students'));\n //$rules->add($rules->existsIn(['fee_type_role_id'], 'FeeTypeRoles'));\n //$rules->add($rules->existsIn(['vehicle_station_id'], 'VehicleStations'));\n //$rules->add($rules->existsIn(['reservation_category_id'], 'ReservationCategories'));\n //$rules->add($rules->existsIn(['state_id'], 'States'));\n //$rules->add($rules->existsIn(['city_id'], 'Cities'));\n $rules->add($rules->existsIn(['session_year_id'], 'SessionYears'));\n //$rules->add($rules->existsIn(['caste_id'], 'Castes'));\n //$rules->add($rules->existsIn(['religion_id'], 'Religions'));\n $rules->add($rules->existsIn(['student_class_id'], 'StudentClasses'));\n $rules->add($rules->existsIn(['medium_id'], 'Mediums'));\n //$rules->add($rules->existsIn(['section_id'], 'Sections'));\n /* $rules->add($rules->existsIn(['stream_id'], 'Streams'));\n $rules->add($rules->existsIn(['house_id'], 'Houses'));\n $rules->add($rules->existsIn(['student_parent_profession_id'], 'StudentParentProfessions'));\n $rules->add($rules->existsIn(['vehicle_id'], 'Vehicles'));\n $rules->add($rules->existsIn(['hostel_id'], 'Hostels'));\n $rules->add($rules->existsIn(['room_id'], 'Rooms'));*/\n\n return $rules;\n }", "title": "" }, { "docid": "25c6d0da62559a2ea8d583758cbc017f", "score": "0.50870746", "text": "public static function factory($recursivePrefix='') {\n $recursive=static::getRecursive();\n return [\n\t\t'idtablaparentPKFK'=>0,\n\t\t'_idtablaparentPKFK'=>(in_array($recursivePrefix.'_idtablaparentPKFK',$recursive,true)) \n\t\t ? TableParentRepo::factory($recursivePrefix.'_idtablaparentPKFK') \n\t\t : null, /* ONETOONE!! */\n\t\t'idcategoryPKFK'=>0,\n\t\t'_idcategoryPKFK'=>(in_array($recursivePrefix.'_idcategoryPKFK',$recursive,true)) \n\t\t ? TableCategoryRepo::factory($recursivePrefix.'_idcategoryPKFK') \n\t\t : null, /* MANYTOONE!! */\n\t\t];\n }", "title": "" }, { "docid": "f322888635f0217f2b4bc73ec58300e4", "score": "0.50859934", "text": "public function GetRelationalParentColumns();", "title": "" }, { "docid": "8565b34de96328a681a3f595d284a440", "score": "0.5066557", "text": "public function buildRelations()\n {\n $this->addRelation('ClientSites', 'ClientSites', RelationMap::MANY_TO_ONE, array('cl_site_id' => 'cl_site_id', ), null, null);\n $this->addRelation('ClientsRelatedByClId', 'Clients', RelationMap::MANY_TO_ONE, array('cl_id' => 'cl_id', ), null, null);\n $this->addRelation('ClientsRelatedByClCtFacturation', 'Clients', RelationMap::ONE_TO_MANY, array('ct_id' => 'cl_ct_facturation', ), null, null, 'ClientssRelatedByClCtFacturation');\n $this->addRelation('ClientsRelatedByClCtGestion', 'Clients', RelationMap::ONE_TO_MANY, array('ct_id' => 'cl_ct_gestion', ), null, null, 'ClientssRelatedByClCtGestion');\n $this->addRelation('Factures', 'Factures', RelationMap::ONE_TO_MANY, array('ct_id' => 'ct_id', ), null, null, 'Facturess');\n $this->addRelation('LnkOperationsContactsMail', 'LnkOperationsContactsMail', RelationMap::ONE_TO_MANY, array('ct_id' => 'ct_id', ), null, null, 'LnkOperationsContactsMails');\n $this->addRelation('OperationsRelatedByOpCtId', 'Operations', RelationMap::ONE_TO_MANY, array('ct_id' => 'op_ct_id', ), null, null, 'OperationssRelatedByOpCtId');\n $this->addRelation('OperationsRelatedByOpCtFactId', 'Operations', RelationMap::ONE_TO_MANY, array('ct_id' => 'op_ct_fact_id', ), null, null, 'OperationssRelatedByOpCtFactId');\n $this->addRelation('OperationsRelatedByOpCtFactAddrId', 'Operations', RelationMap::ONE_TO_MANY, array('ct_id' => 'op_ct_fact_addr_id', ), null, null, 'OperationssRelatedByOpCtFactAddrId');\n $this->addRelation('Relances', 'Relances', RelationMap::ONE_TO_MANY, array('ct_id' => 'rel_ct_facturation', ), null, null, 'Relancess');\n $this->addRelation('FactureEditionHistory', 'FactureEditionHistory', RelationMap::ONE_TO_MANY, array('ct_id' => 'ct_id', ), null, null, 'FactureEditionHistorys');\n }", "title": "" }, { "docid": "634ecd193ee11177a7caf81909529318", "score": "0.5028409", "text": "public static function getForeignKeys() {\n\t\t$keys = array();\n\n\t\t$std = new \\stdClass();\n\t\t$std->table = \"team\";\n\t\t$std->field = \"id\";\n\t\t\n\t\t$keys['team'] = $std;\t\n\t\treturn $keys;\n\t}", "title": "" }, { "docid": "150e74d52de6fecc7197d1809ba0d574", "score": "0.50144804", "text": "public function buildRelations()\n\t{\n $this->addRelation('PaypalCartInfo', 'PaypalCartInfo', RelationMap::ONE_TO_MANY, array('txnid' => 'txnid', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('Transactions', 'Transactions', RelationMap::ONE_TO_MANY, array('txnid' => 'transactions_paypal_txnid', ), 'RESTRICT', 'RESTRICT');\n\t}", "title": "" }, { "docid": "0e72dc6806337c202005957719cb219b", "score": "0.500144", "text": "public function buildRelations()\n {\n $this->addRelation('Cuestionario', '\\\\beans\\\\beans\\\\Cuestionario', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':Cuestionario_idCuestionario',\n 1 => ':idCuestionario',\n ),\n), null, null, null, false);\n $this->addRelation('Direccion', '\\\\beans\\\\beans\\\\Direccion', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':Direccion_idDireccion',\n 1 => ':idDireccion',\n ),\n), null, null, null, false);\n $this->addRelation('Factura', '\\\\beans\\\\beans\\\\Factura', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':factura_idfactura',\n 1 => ':idfactura',\n ),\n), null, null, null, false);\n $this->addRelation('Tipo', '\\\\beans\\\\beans\\\\Tipo', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':tipo_idtipo',\n 1 => ':idtipo',\n ),\n), null, null, null, false);\n }", "title": "" }, { "docid": "9585730fe67c1a935b4d4cb9bf44d665", "score": "0.4993208", "text": "public function buildRelations()\n {\n $this->addRelation('Actividad', '\\\\Actividad', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':dict_c_actividad',\n 1 => ':acti_codigo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('Comuna', '\\\\Comuna', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':dict_c_comuna',\n 1 => ':comu_codigo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('EDictacion', '\\\\EDictacion', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':dict_e_dictacion',\n 1 => ':edi_estado',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('TCalificacion', '\\\\TCalificacion', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':dict_t_calificacion',\n 1 => ':tcal_tipo',\n ),\n), null, null, null, false);\n $this->addRelation('TCertificado', '\\\\TCertificado', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':dict_t_certificado',\n 1 => ':tce_tipo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('TEvaluacion', '\\\\TEvaluacion', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':dict_t_evaluacion',\n 1 => ':tev_tipo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('TMoneda', '\\\\TMoneda', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':dict_t_moneda',\n 1 => ':tmon_tipo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('EvaluacionAplicada', '\\\\EvaluacionAplicada', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':evap_c_actividad',\n 1 => ':dict_c_actividad',\n ),\n 1 =>\n array (\n 0 => ':evap_numero_dictacion',\n 1 => ':dict_numero',\n ),\n), null, 'CASCADE', 'EvaluacionAplicadas', false);\n $this->addRelation('Facilitador', '\\\\Facilitador', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':faci_c_actividad',\n 1 => ':dict_c_actividad',\n ),\n 1 =>\n array (\n 0 => ':faci_numero_dictacion',\n 1 => ':dict_numero',\n ),\n), null, 'CASCADE', 'Facilitadors', false);\n $this->addRelation('Inscripcion', '\\\\Inscripcion', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':insc_c_actividad',\n 1 => ':dict_c_actividad',\n ),\n 1 =>\n array (\n 0 => ':insc_numero_dictacion',\n 1 => ':dict_numero',\n ),\n), null, null, 'Inscripcions', false);\n }", "title": "" }, { "docid": "c1d52c6dbf23b6a4da3030a02511d028", "score": "0.49781886", "text": "public function buildRelations()\n\t{\n $this->addRelation('UsersRelatedByUserId', 'Users', RelationMap::MANY_TO_ONE, array('user_id' => 'id', ), null, null);\n $this->addRelation('UsersRelatedByModifiedUserId', 'Users', RelationMap::MANY_TO_ONE, array('modified_user_id' => 'id', ), null, null);\n $this->addRelation('FilmLinks', 'FilmLinks', RelationMap::ONE_TO_MANY, array('id' => 'film_id', ), 'CASCADE', null);\n $this->addRelation('FilmRaiting', 'FilmRaiting', RelationMap::ONE_TO_MANY, array('id' => 'film_id', ), 'CASCADE', null);\n $this->addRelation('FilmTotalRating', 'FilmTotalRating', RelationMap::ONE_TO_MANY, array('id' => 'film_id', ), 'CASCADE', null);\n $this->addRelation('FilmGallery', 'FilmGallery', RelationMap::ONE_TO_MANY, array('id' => 'film_id', ), 'CASCADE', null);\n $this->addRelation('FilmFilmTypes', 'FilmFilmTypes', RelationMap::ONE_TO_MANY, array('id' => 'film_id', ), 'CASCADE', null);\n $this->addRelation('FilmTrailer', 'FilmTrailer', RelationMap::ONE_TO_MANY, array('id' => 'film_id', ), 'CASCADE', null);\n $this->addRelation('Comments', 'Comments', RelationMap::ONE_TO_MANY, array('id' => 'film_id', ), 'CASCADE', null);\n\t}", "title": "" }, { "docid": "f438fd6f8826ead115192db734956c3f", "score": "0.4969268", "text": "private function foreignMigration()\n {\n $migrationTexts = [];\n\n foreach ($this->relations as $tableName => $relations) {\n foreach ($relations as $relation) {\n $createForeign = sprintf(\n '->foreign(\\'%s\\')->references(\\'%s\\')->on(\\'%s\\')',\n array_get($relation, 'foreign'),\n array_get($relation, 'references'),\n array_get($relation, 'on')\n );\n\n if (array_get($relation, 'onDelete')) {\n $createForeign .= sprintf(\"->onDelete('%s')\", array_get($relation, 'onDelete'));\n }\n\n $dropForeign = sprintf(\n '->dropForeign([\\'%s\\'])',\n array_get($relation, 'foreign')\n );\n\n $migrationTexts[$tableName]['up'][] = '$table' . $createForeign . ';';\n $migrationTexts[$tableName]['down'][] = '$table' . $dropForeign . ';';\n }\n }\n\n foreach ($migrationTexts as $tableName => $migrationText) {\n $fileName = $this->makeForeignMigrationFileName($tableName);\n $className = $this->makeClassName($fileName);\n $template = $this->templateConstraintText;\n\n $start = 'Schema::table($this->table, function (Blueprint $table) {';\n $end = PHP_EOL . ' ' . '});';\n\n $upText = '';\n foreach ($migrationText['up'] as $text) {\n $upText .= PHP_EOL . ' ' . $text;\n }\n\n $downText = '';\n foreach (array_reverse($migrationText['down']) as $text) {\n $downText .= PHP_EOL . ' ' . $text;\n }\n\n $upText = $start . $upText . $end;\n $downText = $start . $downText . $end;\n\n $template = str_replace('_CLASS_NAME_', $className, $template);\n $template = str_replace('_TABLE_NAME_', $tableName, $template);\n $template = str_replace('_UP_', $upText, $template);\n $template = str_replace('_DROP_', $downText, $template);\n\n $filePath = $this->getPath($fileName, 2);\n $this->writeMigration($filePath, $template);\n }\n }", "title": "" }, { "docid": "a6acd802417b80d32bd6c4d611a039ed", "score": "0.49646696", "text": "public function tables()\n {\n return array(\n 'c.clients' => array(),\n 'l.log' => array('leftJoin', 'l.id = c.log_id'),\n 'e.emails' => array('leftJoin', 'e.client_id = c.id'),\n 'o.offices' => array('leftJoin', 'o.id = c.office_id'),\n 'ord.orders' => array('leftJoin', 'ord.client_id = c.id'),\n 'p.products' => array(\n 'leftJoin',\n 'p.id = ord.product_id'\n ),\n );\n }", "title": "" }, { "docid": "82fac4f1a3ba97fb13b1434392d778a7", "score": "0.49604094", "text": "public function buildRules(RulesChecker $rules)\n { \n $rules->add($rules->existsIn(['service_id'], 'Services'));\n //$rules->add($rules->existsIn(['car_type_id'], 'CarTypes'));\n //$rules->add($rules->existsIn(['car_id'], 'Cars'));\n $rules->add($rules->existsIn(['customer_id'], 'Customers'));\n //$rules->add($rules->existsIn(['employee_id'], 'Employees'));\n $rules->add($rules->existsIn(['login_id'], 'Logins'));\n $rules->add($rules->existsIn(['counter_id'], 'Counters')); \n return $rules;\n }", "title": "" }, { "docid": "00385d8252f32a8808704fe6bce190fd", "score": "0.49600607", "text": "private function joinOneMany($fke,$fks,$pke,$parent)\n\t{\n\t\t$schema=$this->_builder->getSchema();\n\t\t$joins=array();\n\t\tif(is_string($fks))\n\t\t\t$fks=preg_split('/\\s*,\\s*/',$fks,-1,PREG_SPLIT_NO_EMPTY);\n\t\tforeach($fks as $i=>$fk)\n\t\t{\n\t\t\tif(!is_int($i))\n\t\t\t{\n\t\t\t\t$pk=$fk;\n\t\t\t\t$fk=$i;\n\t\t\t}\n\n\t\t\tif(!isset($fke->_table->columns[$fk]))\n\t\t\t\tthrow new CDbException(Yii::t('yii','The relation \"{relation}\" in active record class \"{class}\" is specified with an invalid foreign key \"{key}\". There is no such column in the table \"{table}\".',\n\t\t\t\t\tarray('{class}'=>get_class($parent->model), '{relation}'=>$this->relation->name, '{key}'=>$fk, '{table}'=>$fke->_table->name)));\n\n\t\t\tif(is_int($i))\n\t\t\t{\n\t\t\t\tif(isset($fke->_table->foreignKeys[$fk]) && $schema->compareTableNames($pke->_table->rawName, $fke->_table->foreignKeys[$fk][0]))\n\t\t\t\t\t$pk=$fke->_table->foreignKeys[$fk][1];\n\t\t\t\telse // FK constraints undefined\n\t\t\t\t{\n\t\t\t\t\tif(is_array($pke->_table->primaryKey)) // composite PK\n\t\t\t\t\t\t$pk=$pke->_table->primaryKey[$i];\n\t\t\t\t\telse\n\t\t\t\t\t\t$pk=$pke->_table->primaryKey;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$joins[]=$fke->getColumnPrefix().$schema->quoteColumnName($fk) . '=' . $pke->getColumnPrefix().$schema->quoteColumnName($pk);\n\t\t}\n\t\tif(!empty($this->relation->on))\n\t\t\t$joins[]=$this->relation->on;\n\n\t\tif(!empty($this->relation->joinOptions) && is_string($this->relation->joinOptions))\n\t\t\treturn $this->relation->joinType.' '.$this->getTableNameWithAlias().' '.$this->relation->joinOptions.\n\t\t\t\t' ON ('.implode(') AND (',$joins).')';\n\t\telse\n\t\t\treturn $this->relation->joinType.' '.$this->getTableNameWithAlias().' ON ('.implode(') AND (',$joins).')';\n\t}", "title": "" }, { "docid": "46aeeebe5a16db1abd183c367644a610", "score": "0.4958615", "text": "public function buildRelations()\n {\n $this->addRelation('Vendor', '\\\\Vendor', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':ApveVendId',\n 1 => ':ApveVendId',\n ),\n), null, null, null, false);\n $this->addRelation('VendorShipfrom', '\\\\VendorShipfrom', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':ApveVendId',\n 1 => ':ApveVendId',\n ),\n 1 =>\n array (\n 0 => ':ApfmShipId',\n 1 => ':ApfmShipId',\n ),\n), null, null, null, false);\n $this->addRelation('Shipvia', '\\\\Shipvia', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':ArtbSviaCode',\n 1 => ':ArtbShipVia',\n ),\n), null, null, null, false);\n $this->addRelation('ApInvoice', '\\\\ApInvoice', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':ApihPoNbr',\n 1 => ':PohdNbr',\n ),\n), null, null, 'ApInvoices', false);\n $this->addRelation('PurchaseOrderDetail', '\\\\PurchaseOrderDetail', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':PohdNbr',\n 1 => ':PohdNbr',\n ),\n), null, null, 'PurchaseOrderDetails', false);\n $this->addRelation('PurchaseOrderDetailReceipt', '\\\\PurchaseOrderDetailReceipt', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':PohdNbr',\n 1 => ':PohdNbr',\n ),\n), null, null, 'PurchaseOrderDetailReceipts', false);\n $this->addRelation('PurchaseOrderDetailReceiving', '\\\\PurchaseOrderDetailReceiving', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':PothNbr',\n 1 => ':PohdNbr',\n ),\n), null, null, 'PurchaseOrderDetailReceivings', false);\n $this->addRelation('PoReceivingHead', '\\\\PoReceivingHead', RelationMap::ONE_TO_ONE, array (\n 0 =>\n array (\n 0 => ':PothNbr',\n 1 => ':PohdNbr',\n ),\n), null, null, null, false);\n $this->addRelation('PurchaseOrderDetailLotReceiving', '\\\\PurchaseOrderDetailLotReceiving', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':PothNbr',\n 1 => ':PohdNbr',\n ),\n), null, null, 'PurchaseOrderDetailLotReceivings', false);\n }", "title": "" }, { "docid": "6c136998d545e725c320d011091e3d26", "score": "0.49467975", "text": "public function buildRelations()\n\t{\n $this->addRelation('Tbperiodo', 'Tbperiodo', RelationMap::MANY_TO_ONE, array('id_periodo' => 'id_periodo', ), null, null);\n $this->addRelation('Tbturno', 'Tbturno', RelationMap::MANY_TO_ONE, array('id_turno' => 'id_turno', ), null, null);\n $this->addRelation('TbcursoRelatedByCodCurso', 'Tbcurso', RelationMap::MANY_TO_ONE, array('cod_curso' => 'cod_curso', ), null, null);\n $this->addRelation('TbcursoRelatedByCodCursoDestino', 'Tbcurso', RelationMap::MANY_TO_ONE, array('cod_curso_destino' => 'cod_curso', ), null, null);\n $this->addRelation('Tbdisciplina', 'Tbdisciplina', RelationMap::MANY_TO_ONE, array('cod_disciplina' => 'cod_disciplina', ), null, null);\n $this->addRelation('Tbsala', 'Tbsala', RelationMap::MANY_TO_ONE, array('id_sala' => 'id_sala', ), null, null);\n $this->addRelation('TbprofessorRelatedByIdMatriculaProf', 'Tbprofessor', RelationMap::MANY_TO_ONE, array('id_matricula_prof' => 'matricula_prof', ), null, null);\n $this->addRelation('TbprofessorRelatedByIdMatriculaProf2', 'Tbprofessor', RelationMap::MANY_TO_ONE, array('id_matricula_prof2' => 'matricula_prof', ), null, null);\n $this->addRelation('Tbsetor', 'Tbsetor', RelationMap::MANY_TO_ONE, array('id_setor' => 'id_setor', ), null, null);\n $this->addRelation('Tbofertasituacao', 'Tbofertasituacao', RelationMap::MANY_TO_ONE, array('id_situacao' => 'id_situacao', ), null, null);\n $this->addRelation('Tbpolos', 'Tbpolos', RelationMap::MANY_TO_ONE, array('id_polo' => 'id_polo', ), null, null);\n $this->addRelation('Tbfilacalouros', 'Tbfilacalouros', RelationMap::ONE_TO_MANY, array('id_oferta' => 'id_oferta', ), null, null);\n $this->addRelation('Tbfila', 'Tbfila', RelationMap::ONE_TO_MANY, array('id_oferta' => 'id_oferta', ), null, null);\n $this->addRelation('Tbofertacoordenador', 'Tbofertacoordenador', RelationMap::ONE_TO_MANY, array('id_oferta' => 'id_oferta', ), null, null);\n $this->addRelation('Tbofertahorario', 'Tbofertahorario', RelationMap::ONE_TO_MANY, array('id_oferta' => 'id_oferta', ), null, null);\n $this->addRelation('Tbturma', 'Tbturma', RelationMap::ONE_TO_MANY, array('id_oferta' => 'id_oferta', ), null, null);\n\t}", "title": "" }, { "docid": "7ba462b0c959bb96915a8e0a71fd3e3c", "score": "0.4946463", "text": "protected function initChildren() {\n foreach ($this->datas as $name => $data) {\n $fields = $data->getDefinition()->getFieldNames();\n foreach ($fields as $field) {\n if ($data->getDefinition()->getType($field) == 'reference') {\n $this->datas[$data->getDefinition()->getSubTypeField($field, 'reference', 'entity')]->getDefinition()->addChild($data->getDefinition()->getTable(), $field, $name);\n }\n }\n }\n }", "title": "" }, { "docid": "e6d4ca36e197ddc3a2445f11777507e8", "score": "0.49380428", "text": "private function _createForeignKeysFromRecords($records)\n\t{\n\t\tforeach ($records as $record)\n\t\t{\n\t\t\tBlocks::log('Adding foreign keys for record:'. get_class($record), \\CLogger::LEVEL_INFO);\n\t\t\t$record->addForeignKeys();\n\t\t}\n\t}", "title": "" }, { "docid": "c52e9f2e520d0768c1e3f1482d78e42e", "score": "0.49245214", "text": "protected function createTables(){\n\t\t$this->db->show_errors = false;\n\t\t$this->baseModel->init($this->models);\n\t\t$this->db->show_errors = true;\n\t}", "title": "" }, { "docid": "caf6eadf40d198d8238a855c42d9d5f7", "score": "0.4922231", "text": "public function addForeignKeys($tableName, $fks)\n {\n // TODO: Keys obligatorias: name, type, table, refName.\n \n // ALTER TABLE `prueba` ADD FOREIGN KEY ( `id` ) REFERENCES `carlitos`.`a` (`id`);\n //\n //$q_fks = \"\"; // Acumula consultas. ACUMULAR CONSULTAS ME TIRA ERROR, VOY A EJECUTARLAS INDEPENDIENTEMENTE, IGUAL PODRIAN ESTAR RODEADAS DE BEGIN Y COMMIT!\n foreach ( $fks as $fk )\n {\n // FOREIGN KEY ( `id` ) REFERENCES `carlitos`.`a` (`id`)\n $q_fks = \"ALTER TABLE $tableName \".\n \"ADD CONSTRAINT fk_\".$fk['table'].\"_\".$fk['name'].\"_\".$fk['refName'].\" \". // En Postgre las FK tienen nombre, usando table, name(nombre del atributo) y refName me aseguro de que es unico.\n \"FOREIGN KEY (\" . $fk['name'] . \") \".\n \"REFERENCES \" . $fk['table'] . \"(\". $fk['refName'] .\");\";\n \n // ALTER TABLE distributors\n // ADD CONSTRAINT distfk\n // FOREIGN KEY (address)\n // REFERENCES addresses (address) MATCH FULL;\n \n // ALTER TABLE editions\n // ADD CONSTRAINT foreign_book\n // FOREIGN KEY (book_id)\n // REFERENCES books (id);\n \n // ALTER TABLE SALESREPS\n // ADD CONSTRAINT\n // FOREIGN KEY (REP_OFFICE)\n // REFERENCES OFFICES;\n \n // ALTER TABLE alumnos\n // ADD CONSTRAINT alumnos_fk\n // FOREIGN KEY (codigo_tutor)\n // REFERENCES padres_tutores(DNI);\n \n $this->execute( $q_fks );\n }\n }", "title": "" }, { "docid": "74d1567e2799b731fc5d4b0dc4e6ba67", "score": "0.49195963", "text": "public static function getDefKey() {\n return [\n\t\t 'idtablaparentPKFK' => 'PRIMARY KEY',\n\t\t 'idcategoryPKFK' => 'KEY'\n\t\t];\n }", "title": "" }, { "docid": "db058bbee5f857ca00afe223402da84f", "score": "0.49138835", "text": "public function createTables() {\n\t\t\n\t\t$this->db->query(\"CREATE TABLE IF NOT EXISTS `\" . DB_PREFIX . \"giftteasor_related` (\n \t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n \t\t `giftteasor_id` int(11) NOT NULL,\n \t\t `parent_id` int(11) NOT NULL,\n \t\t `child_id` int(11) NOT NULL,\n \t\t `image` varchar(255) NOT NULL,\n \t\t `options` text,\n \t\t `option_name` text,\n \t\t `parent_options` text,\n \t\t `parent_options_name` text,\n \t\t PRIMARY KEY (`id`)\n \t ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1\");\n\n\t\t$this->db->query(\"CREATE TABLE IF NOT EXISTS `\".DB_PREFIX .\"upsell_related` (\n\t\t\t`id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t `upsell_id` int(11) NOT NULL,\n\t\t `parent_id` int(11) NOT NULL,\n\t\t `child_id` int(11) NOT NULL,\n\t\t `image` varchar(255) NOT NULL,\n\t\t\t`options` text,\n\t\t `option_name` text,\n\t\t\t`view_count` int(11) NOT NULL,\n\t\t\tPRIMARY KEY (`id`)\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1\");\n\n\t\t$this->db->query(\"CREATE TABLE IF NOT EXISTS `\".DB_PREFIX .\"vendor_upsell` (\n\t\t `upsell_id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t `vendor_id` int(11) NOT NULL,\n\t\t `countdown_status` tinyint(1) NOT NULL,\n\t\t `date_start` datetime NOT NULL,\n\t\t `date_end` datetime NOT NULL,\n\t\t `quantity_status` tinyint(1) NOT NULL,\n\t\t `quantity` int(11) NOT NULL,\n\t\t `parent_products` varchar(512) NOT NULL,\n\t\t `child_products` varchar(512) NOT NULL,\n\t\t `date_added` datetime NOT NULL,\n\t\t PRIMARY KEY (`upsell_id`)\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1\");\n\t}", "title": "" }, { "docid": "13a685f05b3b69c582a110fd9045d115", "score": "0.49128303", "text": "public function buildRelations()\n {\n $this->addRelation('FacturesRubriques', 'FacturesRubriques', RelationMap::MANY_TO_ONE, array('fact_rub_id' => 'fact_rub_id', ), null, null);\n $this->addRelation('RPrestations', 'RPrestations', RelationMap::MANY_TO_ONE, array('r_prestation_id' => 'r_prestation_id', ), null, null);\n }", "title": "" }, { "docid": "74e429d2990261aca5785390a17f0b1c", "score": "0.49088433", "text": "public function buildRelations()\n {\n $this->addRelation('Family', '\\\\ChurchCRM\\\\Family', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':per_fam_ID',\n 1 => ':fam_ID',\n ),\n), null, null, null, false);\n $this->addRelation('WhyCame', '\\\\ChurchCRM\\\\WhyCame', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':why_per_ID',\n 1 => ':per_ID',\n ),\n), null, null, 'WhyCames', false);\n $this->addRelation('PersonCustom', '\\\\ChurchCRM\\\\PersonCustom', RelationMap::ONE_TO_ONE, array (\n 0 =>\n array (\n 0 => ':per_ID',\n 1 => ':per_ID',\n ),\n), null, null, null, false);\n $this->addRelation('Note', '\\\\ChurchCRM\\\\Note', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':nte_per_ID',\n 1 => ':per_ID',\n ),\n), null, null, 'Notes', false);\n $this->addRelation('Person2group2roleP2g2r', '\\\\ChurchCRM\\\\Person2group2roleP2g2r', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':p2g2r_per_ID',\n 1 => ':per_ID',\n ),\n), null, null, 'Person2group2roleP2g2rs', false);\n $this->addRelation('EventAttend', '\\\\ChurchCRM\\\\EventAttend', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':person_id',\n 1 => ':per_ID',\n ),\n), null, null, 'EventAttends', false);\n $this->addRelation('PrimaryContactPerson', '\\\\ChurchCRM\\\\Event', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':event_type',\n 1 => ':per_ID',\n ),\n), null, null, 'PrimaryContactpeople', false);\n $this->addRelation('SecondaryContactPerson', '\\\\ChurchCRM\\\\Event', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':secondary_contact_person_id',\n 1 => ':per_ID',\n ),\n), null, null, 'SecondaryContactpeople', false);\n $this->addRelation('Pledge', '\\\\ChurchCRM\\\\Pledge', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':plg_EditedBy',\n 1 => ':per_ID',\n ),\n), null, null, 'Pledges', false);\n $this->addRelation('User', '\\\\ChurchCRM\\\\User', RelationMap::ONE_TO_ONE, array (\n 0 =>\n array (\n 0 => ':usr_per_ID',\n 1 => ':per_ID',\n ),\n), null, null, null, false);\n }", "title": "" }, { "docid": "1985d5705ddbedac5fcb99965954a7b2", "score": "0.4901649", "text": "public function buildRelations()\n\t{\n $this->addRelation('StudentCourse', 'StudentCourse', RelationMap::MANY_TO_ONE, array('student_course_id' => 'id', ), null, null);\n $this->addRelation('Subject', 'Subject', RelationMap::MANY_TO_ONE, array('subject_id' => 'id', ), null, null);\n $this->addRelation('Room', 'Room', RelationMap::MANY_TO_ONE, array('room_id' => 'id', ), null, null);\n\t}", "title": "" }, { "docid": "257747377f68f0b95e79088bec051a4b", "score": "0.48995855", "text": "public function buildRelations()\n\t{\n $this->addRelation('Organism', 'Organism', RelationMap::MANY_TO_ONE, array('id_organism' => 'id', ), null, null);\n $this->addRelation('Simulation', 'Simulation', RelationMap::MANY_TO_ONE, array('id_simulation' => 'id', ), 'CASCADE', 'CASCADE');\n\t}", "title": "" }, { "docid": "542d6576344a46753af86d43a41f0aff", "score": "0.48993254", "text": "public function buildRelations()\n {\n $this->addRelation('Client', '\\\\partner\\\\Client', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':clientId',\n 1 => ':clientId',\n ),\n), null, null, null, false);\n $this->addRelation('Utilisateur', '\\\\partner\\\\Utilisateur', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':utilisateurId',\n 1 => ':utilisateurId',\n ),\n), null, null, null, false);\n $this->addRelation('Prestationdevis', '\\\\partner\\\\Prestationdevis', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':deviId',\n 1 => ':deviId',\n ),\n), null, null, 'Prestationdeviss', false);\n }", "title": "" }, { "docid": "e503a565cec2ae73d545e0fba2be25a6", "score": "0.48980373", "text": "protected abstract function get_detail_table_definition();", "title": "" }, { "docid": "ee62096094aa6b1af1a04426d2622bd8", "score": "0.48879308", "text": "public function buildRelations()\n {\n $this->addRelation('Regions', 'Admin\\\\AdminBundle\\\\Model\\\\Regions', RelationMap::MANY_TO_ONE, array('region_id' => 'id', ), 'CASCADE', null);\n $this->addRelation('CouponsCategories', 'Admin\\\\AdminBundle\\\\Model\\\\CouponsCategories', RelationMap::MANY_TO_ONE, array('category_id' => 'id', ), 'CASCADE', null);\n $this->addRelation('UserCoupons', 'Admin\\\\AdminBundle\\\\Model\\\\UserCoupons', RelationMap::ONE_TO_MANY, array('id' => 'coupon_id', ), 'CASCADE', null, 'UserCouponss');\n $this->addRelation('CouponImages', 'Admin\\\\AdminBundle\\\\Model\\\\CouponImages', RelationMap::ONE_TO_MANY, array('id' => 'coupon_id', ), 'CASCADE', null, 'CouponImagess');\n $this->addRelation('CouponVideos', 'Admin\\\\AdminBundle\\\\Model\\\\CouponVideos', RelationMap::ONE_TO_MANY, array('id' => 'coupon_id', ), 'CASCADE', null, 'CouponVideoss');\n }", "title": "" }, { "docid": "b69204415cd0be660b887d632654286f", "score": "0.48828113", "text": "function getTables ()\n {\n static $tables;\n\n if (is_array($tables))\n {\n return $tables;\n }\n\n $tables = array ();\n\n $categories = 'categories';\n $tables[$categories] = array();\n $tables[$categories]['columns'] = array\n (\n 'id' => 'categories.category_id'\n ,'left' => 'categories.category_left'\n ,'right' => 'categories.category_right'\n ,'level' => 'categories.category_level'\n ,'status' => 'categories.category_status'\n ,'sort_order' => 'categories.category_sort_order'\n );\n $tables[$categories]['types'] = array\n (\n 'id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL auto_increment'\n ,'left' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 0'\n ,'right' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 0'\n ,'level' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 0'\n ,'status' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 1' //1 - online, 2 - offline\n ,'sort_order' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 0'\n );\n $tables[$categories]['primary'] = array\n (\n 'id'\n );\n $tables[$categories]['indexes'] = array\n (\n 'IDX_lrl' => 'left, right, level'\n ,'IDX_left' => 'left'\n ,'IDX_right' => 'right'\n ,'IDX_level' => 'level'\n ,'IDX_lr' => 'left, right'\n );\n\n $categories_descr = 'categories_descr';\n $tables[$categories_descr] = array();\n $tables[$categories_descr]['columns'] = array\n (\n 'id' => 'categories_descr.category_id'\n ,'name' => 'categories_descr.category_name'\n ,'descr' => 'categories_descr.category_descr'\n ,'image_file' => 'categories_descr.category_image_file'\n ,'image_small_file' => 'categories_descr.category_image_small_file'\n ,'image_descr' => 'categories_descr.category_image_descr'\n ,'page_title' => 'categories_descr.category_page_title'\n ,'meta_keywords' => 'categories_descr.category_meta_keywords'\n ,'meta_descr' => 'categories_descr.category_meta_descr'\n ,'show_prod_recurs' => 'categories_descr.category_show_prod_recurs'\n ,'seo_url_prefix' => 'categories_descr.category_seo_url_prefix'\n );\n $tables[$categories_descr]['types'] = array\n (\n 'id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 0'\n ,'name' => DBQUERY_FIELD_TYPE_CHAR255 .\" NOT NULL DEFAULT ''\"\n ,'descr' => DBQUERY_FIELD_TYPE_LONGTEXT\n ,'image_file' => DBQUERY_FIELD_TYPE_CHAR255\n ,'image_small_file' => DBQUERY_FIELD_TYPE_CHAR255\n ,'image_descr' => DBQUERY_FIELD_TYPE_CHAR255\n ,'page_title' => DBQUERY_FIELD_TYPE_CHAR255\n ,'meta_keywords' => DBQUERY_FIELD_TYPE_TEXT\n ,'meta_descr' => DBQUERY_FIELD_TYPE_TEXT\n ,'show_prod_recurs' => DBQUERY_FIELD_TYPE_INT . ' NOT NULL DEFAULT '.CATEGORY_DONOTSHOW_PRODUCTS_RECURSIVELY\n ,'seo_url_prefix' => DBQUERY_FIELD_TYPE_CHAR255\n );\n $tables[$categories_descr]['primary'] = array\n (\n 'id'\n );\n\n $products = 'products';\n $tables[$products] = array();\n $tables[$products]['columns'] = array\n (\n 'id' => 'products.product_id'\n ,'pt_id' => 'products.product_type_id'\n ,'name' => 'products.product_name'\n ,'date_added' => 'products.product_date_added'\n ,'date_updated' => 'products.product_date_updated'\n ,'date_available' => 'products.product_date_available'\n );\n $tables[$products]['types'] = array\n (\n 'id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL auto_increment'\n ,'pt_id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 0'\n ,'name' => DBQUERY_FIELD_TYPE_CHAR255\n ,'date_added' => DBQUERY_FIELD_TYPE_DATE . ' default \\'0000-00-00\\''\n ,'date_updated' => DBQUERY_FIELD_TYPE_DATE . ' default \\'0000-00-00\\''\n ,'date_available' => DBQUERY_FIELD_TYPE_DATE . ' default \\'0000-00-00\\''\n );\n $tables[$products]['primary'] = array\n (\n 'id'\n );\n $tables[$products]['indexes'] = array\n (\n 'IDX_pti' => 'pt_id'\n );\n\n $p_to_c = 'products_to_categories';\n $tables[$p_to_c] = array();\n $tables[$p_to_c]['columns'] = array(\n 'record_id' => $p_to_c.'.record_id'\n ,'product_id' => $p_to_c.'.product_id'\n ,'category_id' => $p_to_c.'.category_id'\n ,'sort_order' => $p_to_c.'.sort_order'\n );\n $tables[$p_to_c]['types'] = array(\n 'record_id' => DBQUERY_FIELD_TYPE_INT.' NOT NULL auto_increment'\n ,'product_id' => DBQUERY_FIELD_TYPE_INT.' NOT NULL DEFAULT 0'\n ,'category_id' => DBQUERY_FIELD_TYPE_INT.' NOT NULL DEFAULT 0'\n ,'sort_order' => DBQUERY_FIELD_TYPE_INT.' NOT NULL DEFAULT 0'\n );\n $tables[$p_to_c]['primary'] = array(\n 'record_id'\n );\n $tables[$p_to_c]['indexes'] = array(\n 'UNIQUE KEY IDX_pc' => 'product_id,category_id'\n ,'IDX_cp' => 'category_id,product_id'\n ,'IDX_sort_order' => 'sort_order'\n );\n\n $product_types = 'product_types';\n $tables[$product_types] = array();\n $tables[$product_types]['columns'] = array\n (\n 'id' => 'product_types.product_type_id'\n ,'name' => 'product_types.product_type_name'\n ,'descr' => 'product_types.product_type_descr'\n );\n $tables[$product_types]['types'] = array\n (\n 'id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL auto_increment'\n ,'name' => DBQUERY_FIELD_TYPE_CHAR255\n ,'descr' => DBQUERY_FIELD_TYPE_LONGTEXT\n );\n $tables[$product_types]['primary'] = array\n (\n 'id'\n );\n\n $attributes = 'attributes';\n $tables[$attributes] = array();\n $tables[$attributes]['columns'] = array\n (\n 'id' => 'attributes.attribute_id'\n ,'ag_id' => 'attributes.attribute_group_id'\n ,'it_id' => 'attributes.input_type_id'\n ,'ut' => 'attributes.unit_type'\n ,'view_tag' => 'attributes.attribute_view_tag'\n ,'name' => 'attributes.attribute_name'\n ,'descr' => 'attributes.attribute_descr'\n ,'type' => 'attributes.attribute_type'\n ,'allow_html' => 'attributes.attribute_allow_html'\n ,'min' => 'attributes.attribute_min_value'\n ,'max' => 'attributes.attribute_max_value'\n ,'size' => 'attributes.attribute_html_size'\n ,'multilang' => 'attributes.attribute_multilang'\n ,'sort_order' => 'attributes.attribute_sort_order'\n );\n $tables[$attributes]['types'] = array\n (\n 'id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL auto_increment'\n ,'ag_id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 0'\n ,'it_id' => DBQUERY_FIELD_TYPE_INT\n ,'ut' => DBQUERY_FIELD_TYPE_CHAR10\n ,'view_tag' => DBQUERY_FIELD_TYPE_CHAR100\n ,'name' => DBQUERY_FIELD_TYPE_CHAR255\n ,'descr' => DBQUERY_FIELD_TYPE_LONGTEXT\n ,'type' => DBQUERY_FIELD_TYPE_CHAR10\n ,'allow_html' => DBQUERY_FIELD_TYPE_INT\n ,'min' => DBQUERY_FIELD_TYPE_CHAR255\n ,'max' => DBQUERY_FIELD_TYPE_CHAR255\n ,'size' => DBQUERY_FIELD_TYPE_CHAR255\n ,'multilang' => DBQUERY_FIELD_TYPE_CHAR1\n ,'sort_order' => DBQUERY_FIELD_TYPE_INT\n );\n $tables[$attributes]['primary'] = array\n (\n 'id'\n );\n $tables[$attributes]['indexes'] = array\n (\n 'IDX_pagi' => 'ag_id'\n ,'IDX_iti' => 'it_id'\n ,'IDX_aso' => 'sort_order'\n );\n\n $attribute_groups = 'attribute_groups';\n $tables[$attribute_groups] = array();\n $tables[$attribute_groups]['columns'] = array\n (\n 'id' => 'attribute_groups.attribute_group_id'\n ,'name' => 'attribute_groups.attribute_group_name'\n ,'sort_order' => 'attribute_groups.attribute_group_sort_order'\n );\n $tables[$attribute_groups]['types'] = array\n (\n 'id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL auto_increment'\n ,'name' => DBQUERY_FIELD_TYPE_CHAR255\n ,'sort_order' => DBQUERY_FIELD_TYPE_INT\n );\n $tables[$attribute_groups]['primary'] = array\n (\n 'id'\n );\n $tables[$attribute_groups]['indexes'] = array\n (\n 'IDX_agso' => 'sort_order'\n );\n\n $product_type_attributes = 'product_type_attributes';\n $tables[$product_type_attributes] = array();\n $tables[$product_type_attributes]['columns'] = array\n (\n 'id' => 'product_type_attributes.product_type_attr_id'\n ,'pt_id' => 'product_type_attributes.product_type_id'\n ,'a_id' => 'product_type_attributes.attribute_id'\n ,'type_attr_visible' => 'product_type_attributes.product_type_attr_visibility'\n ,'type_attr_required'=> 'product_type_attributes.product_type_attr_required' //new field\n ,'type_attr_def_val' => 'product_type_attributes.product_type_attr_default_value'\n );\n $tables[$product_type_attributes]['types'] = array\n (\n 'id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL auto_increment'\n ,'pt_id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 0'\n ,'a_id' => DBQUERY_FIELD_TYPE_INT\n ,'type_attr_visible' => DBQUERY_FIELD_TYPE_BOOL\n ,'type_attr_required'=> DBQUERY_FIELD_TYPE_BOOL\n ,'type_attr_def_val' => DBQUERY_FIELD_TYPE_LONGTEXT\n );\n $tables[$product_type_attributes]['primary'] = array\n (\n 'id'\n );\n $tables[$product_type_attributes]['indexes'] = array\n (\n 'IDX_pti' => 'pt_id'\n ,'IDX_ai' => 'a_id'\n ,'IDX_aid_vis' => 'a_id, type_attr_visible'\n ,'IDX_ptid_aid_vis' => 'pt_id, a_id, type_attr_visible'\n ,'UNIQUE KEY IDX_ptid_aid' => 'pt_id, a_id'\n );\n\n $product_attributes = 'product_attributes';\n $tables[$product_attributes] = array();\n $tables[$product_attributes]['columns'] = array\n (\n 'id' => 'product_attributes.product_attr_id'\n ,'p_id' => 'product_attributes.product_id'\n ,'a_id' => 'product_attributes.attribute_id'\n ,'attr_value' => 'product_attributes.product_attr_value'\n /*\n ,'type_attr_visible' => 'product_attributes.product_type_attr_visibility'\n */\n );\n $tables[$product_attributes]['types'] = array\n (\n 'id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL auto_increment'\n ,'p_id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 0'\n ,'a_id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 0'\n ,'attr_value' => DBQUERY_FIELD_TYPE_LONGTEXT\n /*\n ,'type_attr_visible' => DBQUERY_FIELD_TYPE_CHAR1 . ' NOT NULL DEFAULT \"1\"'\n */\n );\n $tables[$product_attributes]['primary'] = array\n (\n 'id'\n );\n $tables[$product_attributes]['indexes'] = array\n (\n 'IDX_pi' => 'p_id'\n ,'IDX_ai' => 'a_id'\n ,'UNIQUE KEY IDX_pid_aid' => 'p_id, a_id'\n );\n\n $product_images = 'product_images';\n $tables[$product_images] = array();\n $tables[$product_images]['columns'] = array\n (\n 'id' => 'product_images.image_id'\n ,'pa_id' => 'product_images.product_attr_id'\n ,'name' => 'product_images.image_name'\n ,'width' => 'product_images.image_width'\n ,'height' => 'product_images.image_height'\n );\n $tables[$product_images]['types'] = array\n (\n 'id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL auto_increment'\n ,'pa_id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 0'\n ,'name' => DBQUERY_FIELD_TYPE_CHAR255 .\" NOT NULL DEFAULT ''\"\n ,'width' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 0'\n ,'height' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 0'\n );\n $tables[$product_images]['primary'] = array\n (\n 'id'\n );\n $tables[$product_images]['indexes'] = array\n (\n 'IDX_pi' => 'pa_id'\n );\n\n $input_types = 'input_types';\n $tables[$input_types] = array();\n $tables[$input_types]['columns'] = array\n (\n 'id' => 'input_types.input_type_id'\n ,'ut_id' => 'input_types.unit_type_id'\n ,'name' => 'input_types.input_type_name'\n );\n $tables[$input_types]['types'] = array\n (\n 'id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL auto_increment'\n ,'ut_id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 0'\n ,'name' => DBQUERY_FIELD_TYPE_CHAR50\n );\n $tables[$input_types]['primary'] = array\n (\n 'id'\n );\n $tables[$input_types]['indexes'] = array\n (\n 'IDX_uti' => 'ut_id'\n );\n\n $input_type_values = 'input_type_values';\n $tables[$input_type_values] = array();\n $tables[$input_type_values]['columns'] = array\n (\n 'id' => 'input_type_values.input_type_value_id'\n ,'it_id' => 'input_type_values.input_type_id'\n ,'value' => 'input_type_values.input_type_value'\n );\n $tables[$input_type_values]['types'] = array\n (\n 'id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL auto_increment'\n ,'it_id' => DBQUERY_FIELD_TYPE_INT\n ,'value' => DBQUERY_FIELD_TYPE_CHAR50\n );\n $tables[$input_type_values]['primary'] = array\n (\n 'id'\n );\n $tables[$input_type_values]['indexes'] = array\n (\n 'IDX_iti' => 'it_id'\n );\n\n $catalog_temp = 'catalog_temp';\n $tables[$catalog_temp] = array();\n $tables[$catalog_temp]['columns'] = array\n (\n 'id' => 'catalog_temp.catalog_temp_id'\n ,'form_id' => 'catalog_temp.catalog_temp_form_id'\n ,'value' => 'catalog_temp.catalog_temp_value'\n );\n $tables[$catalog_temp]['types'] = array\n (\n 'id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL auto_increment'\n ,'form_id' => DBQUERY_FIELD_TYPE_INT\n ,'value' => DBQUERY_FIELD_TYPE_LONGTEXT\n );\n $tables[$catalog_temp]['primary'] = array\n (\n 'id'\n );\n\n $products_search = 'products_search';\n $tables[$products_search] = array();\n $tables[$products_search]['columns'] = array\n (\n 'id' => 'products_search.products_search_id'\n ,'pattern' => 'products_search.products_search_pattern'\n ,'time' => 'products_search.products_search_time'\n ,'words' => 'products_search.products_search_words'\n );\n $tables[$products_search]['types'] = array\n (\n 'id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL auto_increment'\n ,'pattern' => DBQUERY_FIELD_TYPE_TEXT\n ,'time' => DBQUERY_FIELD_TYPE_DATETIME\n ,'words' => DBQUERY_FIELD_TYPE_TEXT\n );\n $tables[$products_search]['primary'] = array\n (\n 'id'\n );\n\n $products_search_result = 'products_search_result';\n $tables[$products_search_result] = array();\n $tables[$products_search_result]['columns'] = array\n (\n 'id' => 'products_search_result.products_search_id'\n ,'p_id' => 'products_search_result.product_id'\n ,'relevance' => 'products_search_result.relevance'\n );\n $tables[$products_search_result]['types'] = array\n (\n 'id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 0'\n ,'p_id' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 0'\n ,'relevance' => DBQUERY_FIELD_TYPE_INT .' NOT NULL DEFAULT 0'\n );\n $tables[$products_search_result]['primary'] = array\n (\n 'id', 'p_id'\n );\n $tables[$products_search_result]['indexes'] = array\n (\n 'IDX_relevance' => 'relevance'\n );\n\n\n global $application;\n return $application->addTablePrefix($tables);\n }", "title": "" }, { "docid": "479876c0c255209330b71264136b099b", "score": "0.48818806", "text": "public function findCases()\n {\n $bAllCasesSet = false;\n $sQuery = \"SET FOREIGN_KEY_CHECKS = 0;\";\n $this->oDB->query($sQuery);\n $this->oDB->query(\"TRUNCATE Cases\");\n $this->oDB->query('TRUNCATE eventlog');\n \n // Hierarchischer Array der Tabellen\n $aTables = array( \n array( 'table'=>'Bestellposition', 'idname'=>array('PosNr', 'BestellNr'),'fkname'=>array(), \n 'children'=>array(\n array('table'=>'Bestellung', 'histidname'=>'BestellNr', 'idname'=>array('BestellNr', 'KredNr'),'fkname'=>array('BestellNr'), 'children'=>array(\n array('table'=>'Kreditor', 'idname'=>array('KredNr'), 'fkname'=>array('KredNr'),'children'=>array())\n )),\n array('table'=>'Wareneingang', 'idname'=>array('ID'),'fkname'=>array('PosNr', 'BestellNr'), 'children'=>array()),\n array('table'=>'Rechnung', 'fkname'=>array('PosNr', 'BestellNr'),'idname'=>array('RechNr'),\n 'children'=>array(\n array('table'=>'Zahlung', 'idname'=>array('ID'), 'fkname'=>array('RechNr'), 'children'=>array())\n )) \n )) \n \n );\n foreach($aTables as $aTable)\n {\n $this->findCaseTable($aTable);\n }\n }", "title": "" }, { "docid": "e0cc3c6750f718816e0efd925956cc37", "score": "0.48798153", "text": "public function foreignKeyExists($table_name, $fk_name);", "title": "" }, { "docid": "126e8f3c60e6bb086037fcdab84666ed", "score": "0.4874137", "text": "public function restoreForeignKeys()\n {\n foreach ($this->_foreignKeys as $name => $attrs) {\n $this->_constraints[$name] = $attrs;\n }\n }", "title": "" }, { "docid": "3561579957d93031bcb54f414ee7f2fd", "score": "0.4870686", "text": "protected function EnabledForeignKeys(){\n \n }", "title": "" } ]
ddfdb63b51a2244698db79cb274f037f
Allows to query the first record that match the specified conditions
[ { "docid": "361be28d716f103971af9dc4edc9a9c2", "score": "0.0", "text": "public static function findFirst($parameters = null)\n {\n return parent::findFirst($parameters);\n }", "title": "" } ]
[ { "docid": "4763deda2fa14115aa661ff2889b9f92", "score": "0.7403492", "text": "public function first()\r\n {\r\n call_user_func_array( array(&$this, 'where'), func_get_args());\r\n $this->queryArgs['limit'] = 1;\r\n $this->queryArgs['offset'] = 0;\r\n return $this->run();\r\n }", "title": "" }, { "docid": "a554ef3f3736901626160d122fd000f1", "score": "0.7005742", "text": "function get_one_by( $conds = array()) {\n\t\t\n\t\t// where clause\n\t\t$this->custom_conds( $conds );\n\t\t// query the record\n\t\t$query = $this->db->get( $this->table_name );\n\t\n\n\t\tif ( $query->num_rows() == 1 ) {\n\t\t// if there is one row, return the record\n\t\t\t\n\t\t\treturn $query->row();\n\t\t} else {\n\t\t// if there is no row or more than one, return the empty object\n\t\t\t return $this->get_empty_object( $this->table_name );\n\t\t\t\n\t\t}\n\n\t}", "title": "" }, { "docid": "e1d92d27b2ea0939ff152c05577f632a", "score": "0.6997274", "text": "static public function _first( $conditions, $params = array() ) {\n\t\t$query = static::_query();\n\t\t$query['conditions'][] = array($conditions, $params);\n\t\t$query['limit'] = array(0, 1);\n\n\t\t$r = static::_byQuery($query, true);\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "ccadbe9a1b4d335220221ac4286e82ae", "score": "0.6868254", "text": "public function findFirst(array $conditions = [], $columns = ['*']);", "title": "" }, { "docid": "19fde66f2031925fcc5fbd8416778e38", "score": "0.6634618", "text": "public function findFirst(array $conditions) {\n return $this->_prepareDbCondition($conditions, 'firstObject');\n \n }", "title": "" }, { "docid": "170ae9a737934fa3d745b2efeb7e79cf", "score": "0.6599352", "text": "abstract public function find_one($where);", "title": "" }, { "docid": "95fa628683beaf86e8f8bbbe62a420de", "score": "0.6564934", "text": "public function findOneBy($conditions = [], $order = []);", "title": "" }, { "docid": "3edfb02bcdea87e6d1cd4a508b8d3242", "score": "0.65248144", "text": "public function first(array $conditions = array(), $field = '') {\n if ($field !== '') {\n return $this->_query->select($field)->from($this->_datasourceName())->where($conditions)->limit(1)->getResult();\n } else {\n return $this->_query->select($this->_datasourceFields())->from($this->_datasourceName())->where($conditions)->limit(1)->getResult();\n }\n }", "title": "" }, { "docid": "9097ade04e4d348b8b1560a836db2a04", "score": "0.64973", "text": "static public function _one( $conditions, $params = array() ) {\n//var_dump($conditions);\n\t\t$query = static::_query();\n\t\t$query['conditions'][] = array($conditions, $params);\n\t\t$query['limit'] = array(0, 2);\n\n\t\t/* experimental */\n\t\t$cacheKey = md5(serialize($query['conditions']));\n\t\tif ( false !== static::$_cache ) {\n\t\t\t$_c = get_called_class();\n\t\t\tif ( isset(static::$_cache[$_c][$cacheKey]) ) {\n\t\t\t\treturn static::$_cache[$_c][$cacheKey];\n\t\t\t}\n\t\t}\n\t\t/* experimental */\n\n\t\t$objects = static::_byQuery($query);\n\t\tif ( !isset($objects[0]) || isset($objects[1]) ) {\n\t\t\t$toomany = isset($objects[1]);\n\t\t\t$class = $toomany ? 'row\\database\\TooManyFoundException' : 'row\\database\\NotEnoughFoundException';\n\t\t\tthrow new $class('Found '.( $toomany ? '>' : '<' ).' 1 of '.get_called_class().'.');\n\t\t}\n\n\t\t$r = $objects[0];\n\n\t\t/* experimental */\n\t\tif ( false !== static::$_cache ) {\n\t\t\tstatic::$_cache[$_c][$cacheKey] = $r;\n\t\t}\n\t\t/* experimental */\n\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "4d973785af0fd366358ea2bab79468b4", "score": "0.6479586", "text": "public function queryFirstField($query);", "title": "" }, { "docid": "0a0a15002b74b25106d08b3c124626a4", "score": "0.6432261", "text": "function selectOne($table, $conditions)\r\n{\r\nglobal $conn;\r\n$sql = \"SELECT * FROM $table\";\r\n\r\n\r\n$i = 0;\r\nforeach ($conditions as $key => $value){\r\nif ($i === 0) {\r\n$sql = $sql . \" WHERE $key=?\";\r\n\r\n} else {\r\n$sql = $sql . \" AND $key=?\";\r\n\r\n}\r\n$i++;\r\n}\r\n\r\n//$sql= \"SELECT * FROM users WHERE admin=0 AND username='Osik'LIMIT=1\"\r\n$sql = $sql . \" LIMIT 1\";\r\n$stmt= executeQuery($sql, $conditions);\r\n$records = $stmt->get_result()->fetch_assoc();\r\nreturn $records; // it used to be 'return records' \r\n}", "title": "" }, { "docid": "46fb4b0a8f362423c3e80b9ad5351260", "score": "0.638427", "text": "public function findFirst($conditions = [], $fields = [])\n {\n // Setup Fields\n if (!empty($fields)) {\n $fields = '`' . implode('`, `', $fields) . '`';\n } else {\n $fields = '*';\n }\n // Setup WHERE clause\n $query = '';\n foreach ($conditions as $key => $val) {\n $query .= sprintf(\"`%s` = '%s' AND\", $key, $val);\n }\n\n if (empty($query)) { // Return all\n $sql = sprintf(\"SELECT %s FROM `%s` LIMIT 1\", $fields, $this->table);\n } else { // Return all WHERE\n $query = substr($query, 0, strlen($query) - 4);\n $sql = sprintf(\"SELECT %s FROM `%s` WHERE %s LIMIT 1\", $fields, $this->table, $query);\n }\n\n $stmt = $this->db->prepare($sql);\n $stmt->execute();\n\n return $stmt->fetch(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "0e31463ce11664277e4ca7565aa04a4b", "score": "0.63433385", "text": "function query_bound_first($query_string, $arr_parms)\n {\n // does a query and returns first row\n $query_id = $this -> query_bound($query_string, $arr_parms);\n $returnobj = $this -> fetch_object($query_id);\n $this -> free_result($query_id);\n return $returnobj;\n }", "title": "" }, { "docid": "5ccade417f992e253141de8293309035", "score": "0.63142145", "text": "static public function first()\n\t{\n\t\t$model = self::factory();\n\t\t$query = \"SELECT * FROM \".Model::sqlSanizite($model->tableName);\n\t\t$query .= \" LIMIT 1 \";\n\t\t$results = $model->db->inQuery($query);\n\t\t$r = array();\n\t\tif (count($results) == 0) {\n\t\t\treturn NULL;\n\t\t} else {\n\t\t\treturn $model->dumpResult($results[0]);\n\t\t}\n\t}", "title": "" }, { "docid": "5a985d942af31d29aa9c7a33b0f7650d", "score": "0.63085926", "text": "public function selectFirstRow($table_name, $fields = null, $conditions = null, $order_by_fields = null);", "title": "" }, { "docid": "766fd181a4ca7bfc5e28b9bf8404ed5d", "score": "0.62634575", "text": "public function first()\n {\n $this->first = true;\n $this->limit = 1;\n $sql = $this->pase();\n return $this->request($sql);\n }", "title": "" }, { "docid": "d596d4636d0fe394d542467f92461de5", "score": "0.62431335", "text": "public function get_first() {\n \t\t$this->limit(1);\n \t\t$records = $this->get();\n \t\tif (is_array($records) && count($records))\n \t\t{\n \t\t\treturn $records[0];\n \t\t}\n \t\treturn FALSE;\n \t}", "title": "" }, { "docid": "5addde23c684ce4cd30d419928bd12cf", "score": "0.6235247", "text": "public function first()\n {\n $where = \"\";\n if(count($this->where_array) > 0) {\n $where = implode(\" and \", $this->where_array);\n }\n \n $select = \"*\";\n if(count($this->select_array) > 0) {\n $select = implode(\" , \", $this->select_array);\n }\n \n global $wpdb;\n return $wpdb->get_row(\n $wpdb->prepare(\"SELECT $select FROM {$wpdb->prefix}{$this->table_name} WHERE \" . $where, $this->params_array)\n );\n return $this;\n }", "title": "" }, { "docid": "751d370c12b47a8952f43591ef26971f", "score": "0.62149125", "text": "public function first(): mixed\n {\n $query = $this->query()->clone();\n if(!is_null($this->criteria)) {\n $this->criteria->apply($query);\n }\n $query->with($this->getWith());\n $query->withCount($this->getWithCount());\n\n $this->resetQuery();\n\n return $query->first();\n }", "title": "" }, { "docid": "a8308f503116abfd54556824ccb83f25", "score": "0.6107795", "text": "abstract public function getOne( $sql_query );", "title": "" }, { "docid": "c144ab4a40688ee069ce69552f61bb6a", "score": "0.60951036", "text": "function loadFirstRecord($where = '', $order = '', $joins = '', $limitOffset = false, $tableAlias = false) {\n return parent::loadFirstRecord($where, $order, $joins, $limitOffset, $tableAlias);\n }", "title": "" }, { "docid": "c144ab4a40688ee069ce69552f61bb6a", "score": "0.60951036", "text": "function loadFirstRecord($where = '', $order = '', $joins = '', $limitOffset = false, $tableAlias = false) {\n return parent::loadFirstRecord($where, $order, $joins, $limitOffset, $tableAlias);\n }", "title": "" }, { "docid": "5f8f2e8dca45f376ea0a5033ee02103d", "score": "0.60938346", "text": "function getByCondition($table, $params, $conditions, $manyrecords)\n{\n //$criterions need the complete where condition with AND / OR write in SQL\n //Example for $criterions= id=:id AND name=:name\n //$params=[\"id\"=>$id,\"name\"=>$name]\n //$manyrecords=boolean (true/false)\n $query = \"SELECT * FROM `$table` WHERE \" . $conditions;\n return Query($query, $params, $manyrecords);\n}", "title": "" }, { "docid": "9cf227f4641cab48618af48ba89c6038", "score": "0.6047361", "text": "public static function getOne(){\n $sql='SELECT '. static::$column_field .' FROM '.static::$model_name.' WHERE '. static::$column_field .' = ?';\n $params=array(static::$value_filter);\n return Database::getRow($sql,$params);\n }", "title": "" }, { "docid": "e118dc55cc875a690d06a866618e3940", "score": "0.6042228", "text": "public function findOne()\n\t{\n\t\t$this->_executed = true;\n\t\t$query = \"SELECT * FROM \".Model::sqlSanizite($this->tableName);\n\t\tif (isset($this->_sql['where'])) {\n\t\t\t$query .= $this->_sql['where'];\n\t\t}\n\n\t\t$results = $this->db->inQuery($query);\n\t\t$this->_new = false;\n\t\t$r = array();\n\t\tforeach ($results as $result) {\n\t\t\t$r[] = $this->dumpResult($result);\n\t\t}\n\n\t\tif (count($r))\n\t\t\treturn $r[0];\n\t\telse\n\t\t\treturn NULL;\n\t}", "title": "" }, { "docid": "487f5e0399c619efd1b3cf5b3ddc4825", "score": "0.6015933", "text": "public function filterOne(array $condition)\n\t{\n\t\t$this->data_source->where($condition)->limit(1);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "09c2d560d2a1d0c4455d20b61995d8a8", "score": "0.6006224", "text": "function findOneBy(array $params = array());", "title": "" }, { "docid": "4c24200a0e16f517fd885f27721df490", "score": "0.59954405", "text": "public function testThatFirstItemMatchingPropertiesIsReturnedViaFindFirstWhere()\n\t{\n\t\t$items = [\n\t\t\t[\"a\" => 1],\n\t\t\t\"B\" => [\"a\" => 2]\n\t\t];\n\t\t$filtered = CollectionUtility::findFirstWhere($items, [\"a\" => 1]);\n\t\t$this->assertEquals([\"a\" => 1], $filtered);\n\n\t\tlist($key, $value) = CollectionUtility::findFirstWhere($items, [\"a\" => 2], null, true);\n\t\t$this->assertEquals(\"B\", $key);\n\t\t$this->assertEquals([\"a\" => 2], $value);\n\n\t\t//Null on no match\n\t\t$filtered = CollectionUtility::findFirstWhere($items, [\"a\" => 3]);\n\t\t$this->assertNull($filtered);\n\t}", "title": "" }, { "docid": "3559a52f2f2cfd1a6908a1a675d52d4d", "score": "0.5995313", "text": "function findone($filter=NULL,array $options=NULL,$ttl=0) {\n\t\tif (!$options)\n\t\t\t$options=[];\n\t\t// Override limit\n\t\t$options['limit']=1;\n\t\treturn ($data=$this->find($filter,$options,$ttl))?$data[0]:FALSE;\n\t}", "title": "" }, { "docid": "6cfdd0f1dc25b520f33ea2ed898d5467", "score": "0.5980447", "text": "public function GetRecordByID($conditions,$tbl_name){\r\n \t$db=$this->getAdapter();\r\n \t$sql=\"SELECT * FROM \".$tbl_name.\" WHERE \".$conditions.\" LIMIT 1\";\r\n \t$row = $this->fetchRow($sql);\r\n \treturn $row;\r\n \t$row= $db->fetchRow($sql);\r\n \treturn $row;\r\n }", "title": "" }, { "docid": "68cb77abd00bae4f93f230d3a0ddff5d", "score": "0.5967116", "text": "function getOne( $where = \"\", $order = \"\", $params = null ){\n $result = $this->getAll( $where, $order, \"0,1\", $params );\n if( is_array( $result ) ){\n return current( $result );\n }\n return false;\n }", "title": "" }, { "docid": "082ad6e6bf13892df1e882ccce1a3753", "score": "0.5955826", "text": "function query_first($query_string)\n {\n // does a query and returns first row\n $query_id = $this -> query($query_string);\n $returnobj = $this -> fetch_object($query_id);\n $this -> free_result($query_id);\n return $returnobj;\n }", "title": "" }, { "docid": "00f6a36fe004b2284fbc2c831588b3b5", "score": "0.59267914", "text": "protected function findFirst()\n {\n if (!is_bool($this->findAll()))\n {\n return $this->adapter->select($this->membersToString())->\n from($this->modelTableName)->limit(1)->send()[0];\n }\n }", "title": "" }, { "docid": "520cff347d37bcdc82c541001d50d7bf", "score": "0.5920417", "text": "public function first($fields = [])\n {\n if (!empty($fields)) {\n $this->query = $this->changeSelectStatementFields($fields);\n }\n\n // Limit to one row\n $this->query .= ' LIMIT 1';\n\n return $this->executeQuery('fetch');\n }", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.5919895", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.5919895", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.5919895", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.5919895", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.5919895", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.5919895", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.5919895", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.5919895", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.5919895", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.5919895", "text": "public function first();", "title": "" }, { "docid": "f0973ba34a9fbbeec02f7363ee308ed6", "score": "0.5919895", "text": "public function first();", "title": "" }, { "docid": "49882e799e6d0e239684a491c24e0c81", "score": "0.5916445", "text": "public function first()\n {\n // modify limit\n $this->take = 1;\n\n // return from search\n return Search::run($this);\n }", "title": "" }, { "docid": "7a57914d7355f7b02f056f16f51e1057", "score": "0.5902152", "text": "public static function findOne($condition)\n {\n return parent::findOne($condition);\n }", "title": "" }, { "docid": "754d8af2801a8cb8143f673be6b291f2", "score": "0.5890722", "text": "public function one()\n {\n $data = array_filter($this->getDataProvider(), [$this, 'whereFilter']);\n \n return (count($data) !== 0) ? $this->createItem(array_values($data)[0]): false;\n }", "title": "" }, { "docid": "599b3d458ecae5c515197741810dfb1b", "score": "0.58902746", "text": "public function first()\n\t{\n\t\t$dataQuery = $this->convertQuery();\n\t\treturn $this->select( $dataQuery )[0];\n\n\t}", "title": "" }, { "docid": "d18fccbb7f370a193684c10c71d85d3e", "score": "0.5886336", "text": "abstract public function first();", "title": "" }, { "docid": "558c6b6330f15c72b5334b3492154511", "score": "0.58736634", "text": "public function queryFirstRow($query, $fetchFunc = self::MYSQL_ASSOC, $class='stdClass');", "title": "" }, { "docid": "faa6d1db719c036edcfbf5169828a85e", "score": "0.5870919", "text": "public function getOne($fields = array(), $filter = array()) {\n\n $query = DB::table($this->_tableName);\n\n // If no params are parsed, return the first record from db with all columns\n if (!count($fields) && !count($filter)) {\n return $query->first();\n }\n\n // Build the select\n foreach ($fields as $field) {\n $query->addSelect($field);\n }\n\n // If no filter is parsed return first record with specified columns\n if (!count($filter) || !is_array($filter)) {\n return $query->first();\n }\n\n // Build where\n foreach ($filter as $key => $value) {\n $query->where($key, $value);\n }\n\n return $query->first();\n }", "title": "" }, { "docid": "3e3b57de95572f3e1117784c8e046795", "score": "0.5863562", "text": "public static function whereFirst($where, $params = [], $order = null)\n {\n $result = self::where($where, $params, $order, '0,1');\n return isset($result[0]) ? $result[0] : null;\n }", "title": "" }, { "docid": "c4e779e660a2dfe91e541c092c2689e3", "score": "0.58633786", "text": "public function first()\n {\n $result = $this->runQuery();\n \n $this->result = $result[0];\n\n return $this->result;\n }", "title": "" }, { "docid": "8dbcecf3dcb7cae17a452a143eb28e91", "score": "0.58218205", "text": "function findOne($key= false, $value=false){\n\t\t//prerequisites\n\t\tif(!$key || !$value) return null;\n\t\t// variables\n\t\t$filter = \"\";\n\t\tif( is_scalar( $value ) ){\n\t\t\t$filter = ( strpos($value, '%') !== FALSE ) ? $key .\" LIKE '\". $value .\"'\" : $key .\"='\". $value .\"'\";\n\t\t} else {\n\t\t\t// assume array?\n\t\t\t$filters = array();\n\t\t\tforeach( $value as $v ){\n\t\t\t\t$filters[] = $key .\" LIKE '%\". $v .\"%'\";\n\t\t\t}\n\t\t\t$filter = implode(\" AND \", $filters);\n\t\t}\n\t\t// execute query\n\t\t$results = $this->query( array(\n\t\t\t\"filters\" => $filter\n\t\t));\n\t\t// exit if there're no results\n\t\tif ( empty($results) ) return false;\n\t\t// the result is expected in a one item array\n\t\t// Why not use LIMIT 1 in the query instead?\n\t\t$rs = array_shift( $results );\n\n\t\t$this->merge($rs);\n\n\t\treturn $this->getAll();\n\t}", "title": "" }, { "docid": "7628ba31d152d3a2a7429f7b4c3523fb", "score": "0.58065313", "text": "public function get_one($sql) {\r\n return $this->query(func_get_args())->get_one();\r\n }", "title": "" }, { "docid": "560e9a6e4945000f598d790f6035900d", "score": "0.58041316", "text": "public function SelectFirst($field = null, $value = null) {\n $ret = $this->getRequest()\n ->Select()\n ->Where();\n if (!is_null($field)) {\n $ret->Cond($field, '=', $value);\n }\n $ret = $ret->Limit(0, 1)->Run();\n if (sizeof($ret) == 1) {\n return $ret->current();\n } else return null;\n }", "title": "" }, { "docid": "ede6136731cbb7b6d1a7017a883b7111", "score": "0.5793731", "text": "abstract function singleQuery($sql, $params = array());", "title": "" }, { "docid": "e6ce90a58da01a86a7bdc9b5cec7f626", "score": "0.578501", "text": "public function findFirst($params = [])\n {\n if (isset($params['return_mode']) && $params['return_mode'] == 'class') {\n if (!isset($params['class'])) {\n $params = array_merge($params, ['class' => get_class($this)]);\n }\n }\n $params = $this->set_deleted_Params($params);\n $resultQuery = $this->_db->findFirst($this->_table, $params);\n if (!$resultQuery) {\n return null;\n }\n $resultQuery->_count = $this->_db->count();\n $resultQuery = $this->afterFind($resultQuery);\n return $resultQuery;\n }", "title": "" }, { "docid": "dd1cdcb550426a3c4fc39256ac7082f0", "score": "0.5784184", "text": "public function findOneBy(array $data)\n {\n return $this->model->where($data)->first();\n }", "title": "" }, { "docid": "7cf4d7191cb125b46fa15fed508e8d61", "score": "0.5776685", "text": "public function firstOrFail()\n {\n $this->first = true;\n $this->isThrow = true;\n $this->limit = 1;\n $sql = $this->pase();\n return $this->request($sql);\n }", "title": "" }, { "docid": "6e99202c305dae0d62408c9068e1a4d0", "score": "0.5769673", "text": "public function find_by_id()\n {\n $args_list = func_get_args();\n $ss = DB::newSelect($this->__getMyTable());\n \n $primary_key_fields = $this->__getPrimaryKeyFields();\n\n $i = 0;\n foreach($args_list as $arg)\n {\n if ($arg!==null)\n $ss->addConditionEquals($primary_key_fields[$i],$arg);\n $i++;\n }\n\n $query_result = $ss->exec_fetch_assoc();\n\n //se non trovo l'oggetto con quell'id ritorno NULL\n if ($query_result===false)\n return null;\n else\n return $this->__load($query_result);\n }", "title": "" }, { "docid": "b98a017ef2de1855f7d5c15824dda44e", "score": "0.57459754", "text": "public function getSingle($table, $conditions = array()){\t\t\n try{\t\t\t\n $data = array();\n $sql = 'SELECT ';\n $sql .= array_key_exists(\"select\",$conditions) ? implode(\",\", $conditions['select']) : '*';\n $sql .= ' FROM '.$table;\n if(array_key_exists(\"where\",$conditions)){\n $sql .= ' WHERE ';\n $i = 0;\n foreach($conditions['where'] as $key => $value){\n $pre = ($i > 0)?' AND ':'';\n $sql .= $pre.$key.\" = :\".preg_replace('/\\(([^()]*+|(?R))*\\)\\s*/', '', $key).\"\";\n $i++;\n }\n }\n if(array_key_exists(\"order_by\",$conditions)){\n $sql .= ' ORDER BY '.$conditions['order_by']; \n } \n $query = $this->dbcon->prepare($sql);\n if(is_array(@$conditions['where']) && (count(@$conditions['where']) > 0)){ \n foreach($conditions['where'] as $key => $value){\t\t\t\t\t \n $query->bindValue(':'.preg_replace('/\\(([^()]*+|(?R))*\\)\\s*/', '', $key), $value);\n }\n }\n $query->execute();\n $data = $query->fetch();\n return $data;\n\n }catch(PDOException $e){\n $this->objDBLog->logNewSeperator();\n $this->objDBLog->log($e->getMessage(), 1);\n $this->objDBLog->log(\"Query : \".$sql.\"=== Condition : \".json_encode($conditions));\n $this->objDBLog->logNewSeperator();\n } \n }", "title": "" }, { "docid": "add925ab85f131e1961f7a6edd40d741", "score": "0.5744895", "text": "abstract protected function query();", "title": "" }, { "docid": "563809c0cc10a670dbb8dc75fd2942ff", "score": "0.57414025", "text": "public function findWhere($condition)\n {\n $model = $this->model->where($condition);\n return $model->first();\n }", "title": "" }, { "docid": "4905bf2b5cefe47c5789c19ada2b9a1c", "score": "0.5726063", "text": "public function findOneBy(array $criteria);", "title": "" }, { "docid": "4905bf2b5cefe47c5789c19ada2b9a1c", "score": "0.5726063", "text": "public function findOneBy(array $criteria);", "title": "" }, { "docid": "4905bf2b5cefe47c5789c19ada2b9a1c", "score": "0.5726063", "text": "public function findOneBy(array $criteria);", "title": "" }, { "docid": "4905bf2b5cefe47c5789c19ada2b9a1c", "score": "0.5726063", "text": "public function findOneBy(array $criteria);", "title": "" }, { "docid": "ea85b625eb9d24a1b6bb6f7bcd48b7bc", "score": "0.5717796", "text": "public function first ()\n {\n return $this->prepare()->first();\n }", "title": "" }, { "docid": "05f0d7303f74d14e8bf77339c13a0b4a", "score": "0.57176155", "text": "public function findOne(array $where, $columns = ['*']);", "title": "" }, { "docid": "5aad6e0cdb0924506be0bead204133c0", "score": "0.5710243", "text": "public function searchOne($param){\r\n\t\t$param['LIMIT']=1;\r\n\t\t$rs=$this->searchList($param);\r\n\t\t$rst=$rs['rst'];\r\n\t\tif($rst && count($rst)>0){\r\n\t\t\treturn $rst[0];\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "title": "" }, { "docid": "2178b38c49136899726f3ef79fb74da5", "score": "0.5697805", "text": "public function filterOneBy(array $params = array(), array $options = array())\r\n\t{\r\n\t\t$options['limit'] = 1;\r\n\t\t$result = $this->filterBy($params, $options);\r\n\t\treturn $result[0];\r\n\t}", "title": "" }, { "docid": "f958121557ae246a3c2b68c9a191a526", "score": "0.569778", "text": "public function findOne()\n {\n if ($this->definition->getDeletionTimestamp()) {\n $this->isNull($this->definition->getDeletionTimestamp());\n }\n\n $this->columns(...$this->buildColumns());\n $this->limit(1);\n $records = parent::findAll();\n\n if (empty($records)) {\n return null;\n }\n\n $mapped = $this->map($records);\n return array_shift($mapped);\n }", "title": "" }, { "docid": "bdfbf76b266b9c7d3adfbba97206135c", "score": "0.5697245", "text": "public abstract function query();", "title": "" }, { "docid": "662e4b31e4bae6c36418ce5cc12e5e03", "score": "0.56816477", "text": "public function loadOneFilter($filter) {\r\n\r\n $query = 'SELECT * FROM ' . $this->table . ' WHERE ';\r\n foreach ($filter as $key => $value) {\r\n $query .= ' ' . $key . ' =: ' . $key . ' AND';\r\n }\r\n $query = rtrim($query, 'AND');\r\n\r\n return $this->exafe($query, $filter, PDO::FETCH_OBJ);\r\n }", "title": "" }, { "docid": "a6178b06cbb788ee9a36d776c1988000", "score": "0.56744385", "text": "public function findOne($query,$fields) {}", "title": "" }, { "docid": "7eead88a5005bc8cf27e1be100aea9c0", "score": "0.56688917", "text": "public function select_single_row($table, $conditions, $sortby = null, $sortdesc = false){\n $sql = \"SELECT * FROM $table WHERE\";\n $bind = array();\n $delim = '';\n foreach ($conditions as $field => $value){\n $sql .= \"$delim $field=:$field\";\n $delim = ' AND';\n $bind[\":$field\"] = $value;\n }\n\n if ($sortby !== null){\n $sql .= \" ORDER BY $sortby\";\n if ($sortdesc){\n $sql .= \" DESC\";\n }\n }\n \n $sql .= ';';\n \n $stmt = $this->pdo->prepare($sql);\n $stmt->execute($bind);\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n \n return $stmt->fetch();\n }", "title": "" }, { "docid": "6d60314d17a83447549285fcf6290c0b", "score": "0.5667708", "text": "abstract public function singleQuery($sql, $params = []);", "title": "" }, { "docid": "a8e27d1cc4313833b46851e80fede8c4", "score": "0.5667101", "text": "public function queryRecord($type, $filter = null)\n {\n $records = $this->queryRecordsPage($type, $filter, 1)->getRecord();\n return count($records) > 0 ? $records[0] : false;\n }", "title": "" }, { "docid": "58b09179aa5cb42cacfeebbd2619a29a", "score": "0.5660755", "text": "public function get_one($condition)\n\t{\n\t\t$this->db->select('biaya_produksi.*, perangkat.name as perangkat_name');\n\t\t$this->db->join('perangkat', 'perangkat.id = biaya_produksi.id_perangkat');\n\t\t$query = $this->db->get_where($this->_table, $condition);\n\n\t\tif($query)\n\t\t{\n\t\t\treturn $query->row();\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "1d76b29c21a7b5be999c7a348c744c20", "score": "0.5656983", "text": "public function findOneWhere(array $where, array $columns = ['*']);", "title": "" }, { "docid": "76b1c4765975d0342a2e7a4138f62a17", "score": "0.5652653", "text": "public static function findOneBy(array $criteria);", "title": "" }, { "docid": "3945a07a2e058290adc55e174d9c2ea8", "score": "0.5646922", "text": "public function findFirst(callable $predicate = null);", "title": "" }, { "docid": "013827da44842a15d2bee0d3d88f3878", "score": "0.5638364", "text": "public function first($sql, $bindings = [])\n {\n if (count($results = $this->query($sql, $bindings)) > 0) {\n return $results[0];\n }\n }", "title": "" }, { "docid": "3a06898ab42c739f700d15d716f121d8", "score": "0.563091", "text": "protected function calculateFirstResult()\n {\n $maxPerPage = $this->getMaxPerPage();\n $page = $this->getPage();\n\n $this->query->setFirstResult($maxPerPage * ($page - 1));\n }", "title": "" }, { "docid": "07f8e184bdb4aca495b2229c2cd65300", "score": "0.5628292", "text": "public function firstWhere($key, $operator, $value = null)\n {\n return $this->first($this->getWhereFilterCallback(...func_get_args()));\n }", "title": "" }, { "docid": "1997688d0f93235c0d823cebc29a7f78", "score": "0.56175756", "text": "public function find() {\n\t\t$args = func_get_args();\n\t\t$result = $this->_query_builder($args ? array('where' => $args) : null)->get();\n\t\treturn $result ? (object)$result : new stdClass;\n\t}", "title": "" }, { "docid": "5ad68cec5f863a8d606c98a6a47b73b6", "score": "0.56151617", "text": "function getFirstRecord()\n {\n \treturn $this->_impl->getFirstRecord();\n }", "title": "" }, { "docid": "3541ba960d49992870c5e65da49e651a", "score": "0.56116307", "text": "public function findByFirst($key, $value, $operator = '=')\n {\n return $this->getModel()->where($key, $operator, $value)->first();\n }", "title": "" }, { "docid": "f25f811da6a0fd9fbc0e060e7b339b6f", "score": "0.56102014", "text": "public function where($params){\n $query='SELECT * FROM '.$this->table.' WHERE '.$params[0].'='.$params[1].';';\n $res=Database::query($query);\n return $res;\n }", "title": "" }, { "docid": "973a08fe76bc7618ca22d5a297dc0a63", "score": "0.5595381", "text": "public function firstRecordByDos() {\n $command = Yii::app()->db->createCommand('SELECT record_id, title' . LANG . ', content' . LANG . ', hit, description' . LANG . ' FROM ' . $this->tableName() . ' WHERE activated = 1 AND dos_usernames_username=\\'dos\\' ORDER BY record_order ASC, created ASC');\n $row = $command->queryRow();\n if ($row) {\n //Update hit\n $this->updateHit($row['hit'] + 1, $row['record_id']);\n return $row;\n }\n }", "title": "" }, { "docid": "cac7b039620f009a9785096ed8d3584b", "score": "0.5586968", "text": "public function executeFirstRow($sql, ...$arguments);", "title": "" }, { "docid": "022259d2cfb756824bc16209c8ee23d5", "score": "0.55856633", "text": "function getOne($sql,$table='',$where='') {\n\t\t//兼容以前直接$sql模式\n\t\tif($table && is_array($where)){\n\t\t\t$wherefield = '';\n\t\t\t$value = array();\n\t\t\t$num = 0;\n\t\t\t$sign = '';\n\t\t\tforeach ($where as $v) {\n\t\t\t\t//$vv = array(\"字段\",\"值\",\"符号,默认=\");\n\t\t\t\t$num ++;\n\t\t\t\t$new_key = \":where{$num}\";\n\t\t\t\t$sign = $v[2] ? $v[2] : '=';\n\t\t\t\t$wherefield .= $wherefield ? \" AND {$v[0]} {$sign} {$new_key}\" : \"{$v[0]} {$sign} {$new_key}\";\n\t\t\t\t$value[$new_key] = $v[1];\n\t\t\t}\n\t\t\t$sql = \"SELECT {$sql} FROM \" . $table . \" WHERE \".$wherefield;\n\t\t\t//dump($value);\n\t\t\t$result = $this->db->prepare($sql);\n\t\t\t$this->checkDebug($sql,$value);\n\t\t\t$rs = $result->execute($value);\n\t\t\t\n\t\t}else{\n\t\t\t$this->checkDebug($sql);\n\t\t\t$result = $this->db->prepare($sql);\n\t\t\t$rs = $result->execute();\n\t\t}\n\t\tif ($rs)\n\t\treturn $result->fetchColumn();\n\t\t\n }", "title": "" }, { "docid": "43df0df331a696f4eb6d8e6b2c8ef230", "score": "0.5580268", "text": "public function firstWhere($key, $operator, $value = null)\n {\n return $this->first($this->operatorForWhere(...func_get_args()));\n }", "title": "" }, { "docid": "3a2c80fbdcc4fdb4a6fd7259b4c9a104", "score": "0.55773735", "text": "public function find($condition)\n {\n $model = $this->getModel();\n\n if ( is_int($condition))\n return $this->getModel()->findOrFail($condition);\n\n foreach ( $condition as $field => $value) {\n $model = $this->createCondition($model, $field, $value);\n }\n\n return $model->firstOrFail();\n }", "title": "" }, { "docid": "8b757e43fb9a2b5b30c97c8dc9c2c8ca", "score": "0.55758417", "text": "function internalFirst()\r\n {\r\n if($row = $this->_stmt->fetch(PDO::FETCH_ASSOC, PDO::FETCH_ORI_FIRST))\r\n $this->_fields = $row;\r\n\r\n return $row != false;\r\n }", "title": "" }, { "docid": "ddee69912c7a0b28683105c3ca96f497", "score": "0.55742675", "text": "public function findOneBy(array $criteria)\n {\n return $this->model->where($criteria)->first();\n }", "title": "" }, { "docid": "954d33036570367227c8a800378d67d7", "score": "0.55663896", "text": "public static function findOne($condition, $debug = 0)\n {\n list($where, $params) = static::buildWhere($condition);\n $sql = 'select * from ' . static::tableName() . $where;\n $stmt = static::getDb()->prepare($sql);\n $rs = $stmt->execute($params);\n $debug ? static::lastSql($stmt) : '';\n\n if ($rs) {\n $row = $stmt->fetch(\\PDO::FETCH_ASSOC);\n if (!empty($row)) {\n $model = static::arr2Model($row);\n return $model;\n }\n }\n return null;\n }", "title": "" }, { "docid": "45282c88d7427491b2dd918eb874142c", "score": "0.5565483", "text": "public function findFirst()\n {\n }", "title": "" }, { "docid": "b9dae3db9e09e377eb9cb0db1d3c72a4", "score": "0.5538693", "text": "public function firstRecord() {\n $command = Yii::app()->db->createCommand('SELECT title' . LANG . ', content' . LANG . ', description' . LANG . ' FROM ' . $this->tableName() . ' WHERE dos_usernames_username=:user ORDER BY record_order DESC, created DESC');\n $command->bindParam(\":user\", $this->_subdomain, PDO::PARAM_STR);\n return $command->queryRow();\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "2a46fdbfc8cb01983bb03691388f0169", "score": "0.0", "text": "public function create()\n {\n //\n }", "title": "" } ]
[ { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "735e465640db5c659ac193ab8af1f08c", "score": "0.75663006", "text": "public function createAction ()\n\t{\n\t\t$this->view->form = $this->_form;\n\t}", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "1f9733369c1aaf55c73aa4d1a8a80882", "score": "0.74566424", "text": "public function create()\n {\n\n return view('resources.create');\n\n }", "title": "" }, { "docid": "1da53c4d224bfa3bc44c0fabd927bedd", "score": "0.7455584", "text": "public function create()\n {\n return view ('rol.form_create');\n }", "title": "" }, { "docid": "1b16c1f4677bd0ac799e087490d4d05b", "score": "0.73507345", "text": "public function create() {\n return view($this->className . '/form', [\n 'className' => $this->className,\n 'pageTitle' => $this->classNameFormatado . '- Cadastro de registro'\n ]);\n }", "title": "" }, { "docid": "edabb98341a0b5aadd47c2864942b8db", "score": "0.7339739", "text": "protected function create()\n {\n $form = Form::create($this->resource);\n $model = $form->model;\n\n $model->hasAccessOrFail('create');\n\n $model->fill($this->getOldInput());\n\n $form->fields()->each(function (Field $field) use (&$model) {\n $field->setValue($model);\n });\n\n return view('crud::form.create', compact('form'));\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "6ed61a57fb61b517537e754054cffc2f", "score": "0.7257705", "text": "public function create()\n {\n return view(\"stok.form\");\n }", "title": "" }, { "docid": "42de9969dbd16cbf3f496acd505422d8", "score": "0.7249422", "text": "public function create()\n {\n // shows a view to create a new resource\n return view('dashboard.admin.create');\n \n }", "title": "" }, { "docid": "d777482ca48a952bda74d0486cdad76a", "score": "0.7237927", "text": "public function create()\n {\n return \"Here is the creating form page.\";\n }", "title": "" }, { "docid": "8a257056a97a8ef04b6027c8bfb8cad1", "score": "0.723185", "text": "public function create()\n {\n\n $title = 'Add '. $this->getName();\n $form = $this->form($this->getFormClass(), [\n 'method' => 'POST',\n 'url' => route($this->getRouteFor('store')),\n ]);\n return view('.admin.form', compact('form', 'title'));\n }", "title": "" }, { "docid": "f5f050d80230f2f0b6313a13b65e7a0b", "score": "0.72228223", "text": "public function newAction()\n {\n $entity = new Faq();\n $form = $this->createCreateForm($entity);\n\n $form->add('question', 'text', array('label' => 'Ask Your Question :')); \n $form->add('answer', 'text', array('label' => 'Give an answer :'));\n $form->add('submit', 'submit', array('label' => 'Submit question'));\n\n return $this->render('FaqBundle:Faq:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "4b9c0332c0bc5feb4fa5c4c15ff4cda0", "score": "0.722023", "text": "public function create()\n {\n $this->authorize('create', $this->getResourceModel());\n\n $class = $this->getResourceModel();\n return view($this->getResourceCreatePath(), $this->filterCreateViewData([\n 'record' => new $class(),\n ] + $this->resourceData()));\n }", "title": "" }, { "docid": "29282129b8e24a976f037c589580f34b", "score": "0.7208537", "text": "public function create()\n {\n $this->page_title = trans('resource_sub_type.new');\n\n return view('resource_sub_type.new', $this->vdata);\n }", "title": "" }, { "docid": "85bc1c405768493e40df217a0040f018", "score": "0.7191366", "text": "function showCreateForm(){\n return view('admin.Direktori.Pendeta.create');\n }", "title": "" }, { "docid": "9493a84894964b34fd6021b3786bcc7a", "score": "0.71894634", "text": "public function create()\n {\n return view('crops.forms.create');\n }", "title": "" }, { "docid": "f6d3fc80bf700f89fa22e42e685b217d", "score": "0.7184248", "text": "public function create()\n {\n return view ('penilaiansmp.form');\n }", "title": "" }, { "docid": "68716ed8c8a7c02d13766dd274f478a3", "score": "0.718268", "text": "public function create()\n {\n return view('user_resources/create');\n }", "title": "" }, { "docid": "643073da4582f0c5ee209f1f696bb305", "score": "0.7166686", "text": "public function create()\n {\n return view('admin/records/forms/record-create-form');\n }", "title": "" }, { "docid": "86e44150333771a80ff3634ffc76f344", "score": "0.71529675", "text": "public function create()\n {\n return view('dashboard.form.create');\n }", "title": "" }, { "docid": "75889c35cd5f200bf02a5b21774293e1", "score": "0.7137003", "text": "public function create()\n {\n $this->data['titlePage'] = trans('admin.obj_new',['obj' => trans('admin.'.$this->titleSingle)]);\n $breadcrumbs = array();\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconNew ];\n $this->data['breadcrumbs'] = $breadcrumbs;\n $this->data['category'] = $this->getModelArray($this->modelCategory);\n $this->data['province'] = $this->getModelArray($this->modelProvince);\n $this->data['district'] = $this->getModelArray($this->modelDistrict);\n $this->data['ward'] = $this->getModelArray($this->modelWard);\n $this->data['direction'] = $this->getModelArray($this->modelDirection);\n\n return view(GetViewAdminResource($this->resourceView, 'create'))->with($this->data);\n }", "title": "" }, { "docid": "7e262dd36752e23255d5ea03566e8de7", "score": "0.7122985", "text": "public function create()\n {\n $model = $this->model;\n return view('pages.admin.graha.form', compact('model'));\n }", "title": "" }, { "docid": "0a067c68f8000d9eb913daf36e5e607c", "score": "0.712034", "text": "public function create()\n {\n return view('FullForm.create');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "c88daeaad1f2ef73dd9534351ceea67a", "score": "0.70962554", "text": "public function newAction()\n {\n $entity = new FormEntity();\n $entity->setTemplate('keltanasTrackingBundle:Form:form.html.twig');\n $form = $this->createCreateForm($entity);\n\n return $this->render('keltanasTrackingBundle:Form:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "a7352ebb77d0418eb30e8fe2e7bfb857", "score": "0.7087128", "text": "public function actionCreate()\n\t{\n\t\t$this->render('create');\n\t}", "title": "" }, { "docid": "c27004d00e3f9afb85f74623ec456ca9", "score": "0.708025", "text": "public function create()\n {\n //\n return view('form');\n }", "title": "" }, { "docid": "8e0fde88926c98fb2c54ba67ab5b36a7", "score": "0.7061749", "text": "public function create()\n\t{\n\t\treturn View::make('librarians.create');\n\t}", "title": "" }, { "docid": "345c70747deda30c3482e759c25c4d12", "score": "0.706081", "text": "public function create()\n {\n return view('passenger.forms.create');\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70571953", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "20ab9d62fc4da5013c56daa9183bfe28", "score": "0.70571035", "text": "public function create()\n {\n return view('admin.client.form');\n }", "title": "" }, { "docid": "c69f303d7cafa0864b25b452417d3c13", "score": "0.70510703", "text": "public function create()\n\t{\n\t\treturn view('actions.create');\n\t}", "title": "" }, { "docid": "b7f63db5c5ecb7bba494b8a81ce69874", "score": "0.70475084", "text": "public function create(AdminResource $resource)\n {\n $form = $resource->getForm();\n\n return view('admin::resource.form', compact('form'));\n }", "title": "" }, { "docid": "8f53ed51f8136e8e32a2c0525120a50f", "score": "0.7042422", "text": "public function create()\n {\n //\n\n \n return view('student/ResourceStd');\n\n }", "title": "" }, { "docid": "f1f40cbb0cad3cf320b4c0ec09b3b428", "score": "0.7040213", "text": "public function create()\n {\n return view('form');\n\n }", "title": "" }, { "docid": "607b994b80e66fe45602a00379ab7779", "score": "0.70308834", "text": "public function create()\n {\n //return the create view (form)\n return view('books.create');\n }", "title": "" }, { "docid": "643fd44e4ced88a8aac481ced428c5ca", "score": "0.70261294", "text": "public function create()\n {\n $title = 'CRIAR REGISTRO';\n return view('forms.create',['title' => $title]);\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.70147324", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "8074165780da4d1be303d3e9d8c535ba", "score": "0.7012196", "text": "public function create()\n {\n return view ('owner/form');\n }", "title": "" }, { "docid": "06af90c4292c136aaaf9329cfae0b3fc", "score": "0.70115083", "text": "public function create()\r\n {\r\n //mengarahkan ke form\r\n return view('rental.form');\r\n }", "title": "" }, { "docid": "248b476c0f07013b389c79c904231f2a", "score": "0.70046955", "text": "public function create()\n {\n return view('admin.car.add');\n }", "title": "" }, { "docid": "75fb4bc6a7a5df1f1f5cd380b0cd4aec", "score": "0.7000195", "text": "public function create()\n {\n //New Property form\n return view('properties.addproperty');\n }", "title": "" }, { "docid": "91dd937891cf552bdb6c058f3730d93b", "score": "0.6998989", "text": "public function newAction()\n {\n $entity = new foo();\n $form = $this->createForm(new fooType(), $entity);\n\n return $this->render('ScrunoBoardBundle:foo:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c6f4cc7fdd05567403f39d82ae477eb4", "score": "0.6994647", "text": "public function create()\n\t{\n\t\treturn view('kasus.create');\n\t}", "title": "" }, { "docid": "68eb563182e9ed0d6524bc0b6aac22af", "score": "0.69939756", "text": "public function create()\n\t{\n\t\t// load the create form (app/views/professor/create.blade.php)\n\t\t$this->layout->content = View::make('professor.create');\n\t}", "title": "" }, { "docid": "6c77fcad45300d9322c483f2cf6f0bf9", "score": "0.69900626", "text": "public function create()\n\t{\n\t\treturn view('proyek.create');\n\t}", "title": "" }, { "docid": "033dad9a04f818507b4dc909e40e2cca", "score": "0.6988088", "text": "public function create()\n {\n $data[\"action\"] = 'anggota.store';\n return view('anggota.form', $data);\n }", "title": "" }, { "docid": "355b502cb4384aeb8c0d1322a57b7677", "score": "0.69879013", "text": "public function create()\n {\n return view ('show.create', [\n ]); \n }", "title": "" }, { "docid": "afec885a1ddf009d317c5bca27be7983", "score": "0.6985705", "text": "public function create()\n {\n\t\treturn view('admin.pages.supplier-form-create', ['page' => 'supplier']);\n }", "title": "" }, { "docid": "93cdfcc841a0d10e976bbc17fe7020ec", "score": "0.6977717", "text": "public function create()\n {\n return view('rombel.create');\n }", "title": "" }, { "docid": "eb3ba5c68f25897de6ed50346b9959f7", "score": "0.6976043", "text": "public function create()\n {\n $crud = crud_entry(new \\App\\Employee);\n\n return view('crud::scaffold.bootstrap3-form', ['crud' => $crud]);\n }", "title": "" }, { "docid": "432a42bd0e4b7b7dd13b0343e81c9f33", "score": "0.6974407", "text": "public function create()\n {\n //\n return view('libros/libroForm');\n }", "title": "" }, { "docid": "27f66e57741013d1d7bd227b0a1ae6cc", "score": "0.6969905", "text": "public function create()\n {\n return view('radars/create');\n }", "title": "" }, { "docid": "db317dc07de792187038b7e4a5f863fd", "score": "0.69643784", "text": "public function newAction()\n {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ManuTfeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "58119c678c7b859b3d2fcb9d4e2544e9", "score": "0.69620776", "text": "public function create()\n {\n return view('forms.girders.create');\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6958075", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "cfb06a7f594e86d7fe22432b5bd18371", "score": "0.6957784", "text": "public function newAction()\n {\n $entity = new Ministro();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ParroquiaCertificadoBundle:Ministro:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "121c8c321a85cfc3184f64d92ecfca6c", "score": "0.6954882", "text": "public function create()\n\t{\n\t\treturn view ('oficinas.create');\n\t}", "title": "" }, { "docid": "9cc1ebbeb06fe2564e0fa603d2c72f75", "score": "0.69542176", "text": "public function create()\n {\n //\n return view('product.form');\n }", "title": "" }, { "docid": "ad86bd025139be91b2df85c83f79d4bd", "score": "0.69525295", "text": "public function create()\n {\n return view('syllabus.create');\n }", "title": "" }, { "docid": "1276876980c60661df1af9ecd3659454", "score": "0.6946296", "text": "public function create()\n\t{\n\t\treturn View::make('nssf.create');\n\t}", "title": "" }, { "docid": "29d1eb6a37de9bf5891c3b5b4ef4fa2d", "score": "0.69450635", "text": "public function newForm()\n {\n $this->pageTitle = \"Création d'une question\";\n\n //initialisation des selects list\n $this->initSelectList();\n\n parent::newForm();\n }", "title": "" }, { "docid": "7c12821aa5d613a86cc8ba0cf190e6fd", "score": "0.6930994", "text": "public function create()\n {\n return view('tutores.new');\n }", "title": "" }, { "docid": "07e409b45065624d003704ab3b447aec", "score": "0.69273114", "text": "public function create()\n {\n return view('admin.product.form');\n }", "title": "" }, { "docid": "60c9cc4899b058bc51c74601c8025ebe", "score": "0.6925751", "text": "public function create()\n {\n return view('adminCreateForm');\n }", "title": "" }, { "docid": "466006539e9b1da8c7c2e06a069c4e2e", "score": "0.6921871", "text": "public function create()\n {\n return view('layout_admin.thenew.create_new');\n }", "title": "" }, { "docid": "38a6849d5b56a77b178a1fc8297c2e4e", "score": "0.69218206", "text": "public function create()\n\t{\n\t\treturn view('information.create');\n\t}", "title": "" }, { "docid": "83ebdde393be7960c0a3149b40b830fa", "score": "0.69206", "text": "public function create()\n {\n //\n return view('guest.sample.submit-property2');\n }", "title": "" }, { "docid": "50d6adc18861a552fb9ddb0969a2630f", "score": "0.69202167", "text": "public function create()\n {\n return view('umbooks::admin.models.book.create');\n }", "title": "" }, { "docid": "1b49a8bc053be1715bbf5620cf797e18", "score": "0.69184965", "text": "public function create()\n\t{\n\t\treturn View::make('product.create'); //form to create new product \n\t}", "title": "" }, { "docid": "ce1853ac01959995d112bb4d44014367", "score": "0.6918359", "text": "public function create()\n {\n //\n return view('ijinkeluars.create');\n }", "title": "" }, { "docid": "87632e3ed9e4e251e3f5a4dfa4cc4e5e", "score": "0.69181925", "text": "public function create()\n {\n // Place here the initial data and show\n // Ahh screw it, Show Everything!!!\n\n return view('record.create');\n\n }", "title": "" }, { "docid": "27e5069596828984f14a92c012c1e448", "score": "0.6914329", "text": "public function newAction()\n {\n $entity = new Inicio();\n $form = $this->createForm(new InicioType(), $entity);\n\n return $this->render('SisafBundle:Inicio:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "98e3bff438d778b0a9ccaad60778cf09", "score": "0.69096565", "text": "public function create()\n {\n return view('admin/car/add-car');\n }", "title": "" }, { "docid": "51a5131df9fc2dcd5b65b5ca8aa614d0", "score": "0.69092304", "text": "public function create()\n {\n //To show the required create page when its clicked\n return view('admin.create');\n \n \n }", "title": "" }, { "docid": "4b3f5241c4a2f638b9ee19747079b7a2", "score": "0.69069797", "text": "public function create()\n {\n return view('stus.add');\n }", "title": "" }, { "docid": "eec374cbf73315b7af3e5f2b21f37d4d", "score": "0.69059855", "text": "public function create()\n {\n return view('linhvuc.create');\n }", "title": "" }, { "docid": "0b940b83fdd9503e0b64330c52106d41", "score": "0.69053364", "text": "public function create()\n {\n return view('inventariss.create');\n }", "title": "" }, { "docid": "ecc913c81504bfd8529f7b7feaef7080", "score": "0.69047576", "text": "public function create(){\n return view('person/form', ['action'=>'create']);\n }", "title": "" }, { "docid": "64d616e79a29573ea35b962756917c05", "score": "0.69007623", "text": "public function create()\n {\n\t\t$d['action'] = route('product.store');\n\t\treturn view('back.pages.product.form', $d);\n }", "title": "" }, { "docid": "61066352fa31a37b0f1d8bc9fd229ea9", "score": "0.6897235", "text": "public function create()\n {\n /* $this->authorize('create'); */\n return view('refugio.refugioForm');\n }", "title": "" }, { "docid": "70820d35b4d8e319baa89b6f91a3d029", "score": "0.6895603", "text": "public function newAction() {\n $entity = new Recommandation();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MyAppFrontBundle:Recommandation:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "27fad6d884340578087d232e3218a94d", "score": "0.68955874", "text": "public function create()\n {\n return view('backpages.formInfo');\n }", "title": "" }, { "docid": "619fa64afd3457bdc8d1c1a041acff47", "score": "0.68903565", "text": "public function create()\n {\n return View(\"$this->view_folder.form\", $this->data);\n }", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.6890337", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "09fab99adf688ea100aa90694eab5889", "score": "0.6888845", "text": "public function create()\n {\n return view(\"Amenity::add\");\n }", "title": "" }, { "docid": "985e9c7c0b741b5b1eb67c091e5ad371", "score": "0.6886975", "text": "public function create()\n\t{\n\t\t//\n\t\treturn View::make('oficinas.create');\n\t}", "title": "" }, { "docid": "9664795bf81cca0f3e65d94f0f595082", "score": "0.6880484", "text": "public function create()\n\t{\n\t\treturn view('questao.create');\n\t}", "title": "" }, { "docid": "623f899bed6c6f380a03ffc99508b73d", "score": "0.6879059", "text": "public function newAction()\n {\n $entity = new Candidato();\n $form = $this->createForm(new CandidatoType(), $entity);\n\n return $this->render('EleicaoAdmBundle:Candidato:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "6648fe4f8fd4df24b091c04829b92bbb", "score": "0.6878773", "text": "public function create()\n\t{\n\t\treturn View::make('powerful.create');\n\t}", "title": "" }, { "docid": "a3b3bbcce8f8a6239dadc2917240252b", "score": "0.6878254", "text": "public function showForm()\n {\n return view('AdminView.create');\n }", "title": "" }, { "docid": "06fe0499ccb2038bd9c25e7ef14289e2", "score": "0.68774086", "text": "public function create()\n {\n //Return item details form\n return view('home.create');\n }", "title": "" }, { "docid": "b3998fa6dce49f97902e942f97d98ede", "score": "0.687325", "text": "public function newAction()\n {\n $entity = new Escuelas();\n $form = $this->createForm(new EscuelasType(), $entity);\n\n return $this->render('QQiRecordappBundle:Escuelas:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "60ee9672a795f51a440ede1e68b26045", "score": "0.6870999", "text": "public function create()\n {\n return view('smp.create');\n }", "title": "" }, { "docid": "9f18b1b1a35a9af23eb1d4bbdba665f8", "score": "0.68696606", "text": "public function create()\n {\n return view('admin.car_com.create');\n }", "title": "" }, { "docid": "d14776cad1affd8d37756a185e7fe660", "score": "0.68665606", "text": "public function create()\n {\n return view('relasi.create');\n }", "title": "" }, { "docid": "96c76b820b73f95fa584de07ad04ad0a", "score": "0.6865675", "text": "public function create()\n {\n return view('nasabah/addnasabah');\n }", "title": "" }, { "docid": "e3cfac3178d9c5cb5ab322fa4785604c", "score": "0.6862222", "text": "public function create()\n {\n return view('Prenda.create');\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "3579799e4dc8ed4919ebe794082591f1", "score": "0.0", "text": "public function index()\n {\n //\n }", "title": "" } ]
[ { "docid": "d4a0ecd8566af1bfd9231147ca1e458f", "score": "0.7474345", "text": "public function list()\n {\n try {\n $result = $this->get_all();\n $this->response($result);\n } catch (Exception $e) {\n $this->response(array(\n \"message\" => $e->getMessage()\n ), ERROR_CODE);\n }\n }", "title": "" }, { "docid": "6126929dc3b0a4f22ee22cc3ad8d6a7b", "score": "0.742424", "text": "public function index() \n\t{ \n\t\t$this->listing();\t\n\t}", "title": "" }, { "docid": "4c31098007bd884125e38a924a90b409", "score": "0.7370675", "text": "public function index()\n {\n $resources = Resource::paginate(10);\n return view('admin.resource.index', [\n 'resources' => $resources\n ]);\n }", "title": "" }, { "docid": "8fa6c385e83466b77bd15a6b86ea32e2", "score": "0.7304379", "text": "public function index()\n {\n $this->_create_list();\n $this->_display();\n\n }", "title": "" }, { "docid": "dd0281461ff38e01dc7daaf263a98684", "score": "0.72688746", "text": "function index() {\n $this->getList();\n }", "title": "" }, { "docid": "0e6388aacce7838ee1c78178d8108829", "score": "0.7267135", "text": "public function index(){\n\t\t\t$this->list();\n\t\t}", "title": "" }, { "docid": "90f60a2d2b3c2500e55bda8c3ba362da", "score": "0.71897656", "text": "public function index()\n {\n $resources = $this->resourceRepository->all();\n\n return $this->sendResponse($resources->toArray(), \"Resources retrieved successfully\");\n }", "title": "" }, { "docid": "9af36ef65a801a9d1ba3b391202f1180", "score": "0.7119231", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(20);\n return view('resource.index')->withResources($resources);\n }", "title": "" }, { "docid": "43a0ac0c5c36c0a0b193022ebde4ce89", "score": "0.7083264", "text": "public function index()\n {\n $config['tableName'] = trans('app.Resources list');\n $config['ignore'] = ['id', 'count', 'created_at', 'updated_at', 'deleted_at'];\n $config['list'] = MBResources::get()->toArray();\n $config['delete'] = 'app.resources.destroy';\n return view('admin.adminList',$config);\n }", "title": "" }, { "docid": "19fc4ced7c3387dd13afa92c5a8afae5", "score": "0.7055708", "text": "public function do_list()\r\n\t{\r\n\t\t$sorter = array(\r\n\t\t\t'name' => \"sorter\",\r\n\t\t\t'default' => 'name ASC',\r\n\t\t\t'options' => array(\r\n\t\t\t\t\"name ASC\" => \"Name\",\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t$result = $this->model->get_records(array(\r\n\t\t\t'conditionset' => array(\r\n\t\t\t),\r\n\t\t\t'sorter' => $sorter,\r\n\t\t\t'limit' => 10\r\n\t\t\t));\r\n\r\n\t\tinclude($this->get_path(self::ACTION_TYPE_LIST));\r\n\t}", "title": "" }, { "docid": "1855faa3b08cf438cac0964b9903bf8a", "score": "0.7014775", "text": "public function index()\n {\n $this->getListingService()\n ->setOrder($this->getOrder())\n ->setPagination($this->getPagination())\n ->getFilters()->add($this->getSearchFilter());\n $this->set(\n [\n $this->getEntityNamePlural() => $this->getListingService()\n ->getList(),\n 'pagination' => $this->getListingService()->getPagination()\n ]\n );\n }", "title": "" }, { "docid": "2e0ed72eb13150f2559131309e8f93b1", "score": "0.7001344", "text": "public function listing ()\n {\n // Fetch all questions\n $cacheID = 'listing';\n if (!$this->data['questions'] = $this->zf_cache->load($cacheID)) {\n $this->data['questions'] = $this->question_model->get_with_users();\n $this->zf_cache->save($this->data['questions'], $cacheID, array('all_questions'));\n }\n \n // Load view\n $this->load_view('questions/listing');\n }", "title": "" }, { "docid": "03aab1a3d0f29df3c9c01f676da4d986", "score": "0.69908047", "text": "public function index()\n\t{\n\t\t$this->listing('recent');\n\t}", "title": "" }, { "docid": "c93e1e2d6b3b2e51a961fef1bdfbb734", "score": "0.69853497", "text": "public function index()\n {\n //\n $pagesize = 20;\n $query = DataResource::orderBy('listorder','desc');\n $list = $query->paginate($pagesize);\n return view('admin.resources',['data'=>$list,'url'=>$this->url]);\n }", "title": "" }, { "docid": "18cd5639adcca5b283e7352aa46af4de", "score": "0.69587684", "text": "public function index()\n {\n $this->userCollectListing('0', 'ALL');\n }", "title": "" }, { "docid": "e31e9a0c7b3d2a9b4bc1a2880b844a81", "score": "0.6921471", "text": "public function indexAction()\n {\n $resource = $this->repo->all();\n if (!$resource) {\n return $this->errorNotFound('Resource not found');\n }\n return $this->apiOk($resource);\n }", "title": "" }, { "docid": "eed18db8f9e2d6b6fa328a727bce13ea", "score": "0.6884484", "text": "public function listingAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SettingContentBundle:Page')->findBy(array(),array('name' => 'asc'));\n\n return $this->render('SettingContentBundle:Page:index.html.twig', array(\n 'pagination' => $entities,\n ));\n }", "title": "" }, { "docid": "a753301d8fa92e6902db5a211f69a62a", "score": "0.6880599", "text": "public function indexAction()\n {\n if($categoryId = $this->request->getQuery('categoryId')){\n $resource = $this->repo->all($categoryId);\n }else {\n $resource = $this->repo->all();\n }\n if (!$resource) {\n return $this->errorNotFound('Resource not found');\n }\n return $this->apiOk($resource);\n }", "title": "" }, { "docid": "22231d816d7e2f1e58fb69799b2104dc", "score": "0.68639404", "text": "public function index()\n {\n $resources = Resource::all();\n\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "060b373609f7e0db718e407076c66e1d", "score": "0.68629915", "text": "public function indexAction()\n {\n $this->tag->setTitle(__('Firewalls'));\n // Available sort to choose\n $this->filter->add('in_array', function($value) {\n return in_array($value, ['name', 'name DESC', 'status', 'status DESC']) ? $value : null;\n });\n\n // Get networks and prepare pagination\n $paginator = new Paginator([\n \"data\" => Firewalls::find(['order' => $this->request->getQuery('order', 'in_array', 'id', true)]),\n \"limit\" => $this->request->getQuery('limit', 'int', 20, true),\n \"page\" => $this->request->getQuery('page', 'int', 1, true)\n ]);\n\n $this->view->setVars([\n 'pagination' => $paginator->getPaginate(),\n ]);\n }", "title": "" }, { "docid": "06987da1b6d89d3d1c996205e8a37e46", "score": "0.6860631", "text": "public function index()\n {\n //$records = Category::paginate();\n $records = Category::all();\n //return CategoryResource::collection($records);\n return $this->showAll($records);\n }", "title": "" }, { "docid": "0473d264241dfecb205046df754f7ad1", "score": "0.6856284", "text": "public function index() {\n $resources = static::$resource::orderBy(static::$orderBy)->paginate(static::$pageSize);\n return view($this->getView('index'), [static::$varName[1] ?? $this->getResourcePluralName() => $resources]);\n }", "title": "" }, { "docid": "ac3d7b3949ed4508eaeabfca96b1ae5e", "score": "0.6819477", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $extFilters = $this->request->query->get('ext_filters');\n if(isset($extFilters['entity.gallery'])) {\n $dql = 'entity.gallery = ' . $extFilters['entity.gallery'];\n $this->entity['list']['dql_filter'] = $dql;\n }\n \n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, ['paginator' => $paginator]);\n\n $parameters = [\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'batch_form' => $this->createBatchForm($this->entity['name'])->createView(),\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ];\n\n return $this->executeDynamicMethod('render<EntityName>Template', ['list', $this->entity['templates']['list'], $parameters]);\n }", "title": "" }, { "docid": "e4a0d12ede1642140b2b2864bea7bde8", "score": "0.6817071", "text": "public function show_list();", "title": "" }, { "docid": "a63fe3d362e9ed8bdeb8c498c0f70dc8", "score": "0.68072224", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n //dump($todos);\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "title": "" }, { "docid": "8e473fb8d57781fcbb301d794e4638b7", "score": "0.68054026", "text": "public function listResources();", "title": "" }, { "docid": "ae6ac1129584c76c474a8718bca91c33", "score": "0.6780087", "text": "public function ListView() {\n $this->Render();\n }", "title": "" }, { "docid": "e33620f9e0602f70ef6cab4f1bdb2610", "score": "0.67710763", "text": "public function index()\n\t{\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "1791d7d351176ff2ce62051654642a7d", "score": "0.6743463", "text": "public function indexAction()\n {\n $this->render('lists/index', array(\n 'title' => 'Todo Lists',\n 'lists' => TodoList::all()\n ));\n }", "title": "" }, { "docid": "a62c8fb3c6a39b17143e4f99a44215eb", "score": "0.674278", "text": "public function index()\n {\n // Get Products\n $products = Product::paginate(15);\n\n // Return collection of products as a resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "3cb20d494ffa4e3923d82dc428173efe", "score": "0.67425853", "text": "public function listAction()\n {\n $date = array();\n $date['year'] = $this->_getParam('year', null);\n $date['month'] = $this->_getParam('month', null);\n $date['day'] = $this->_getParam('day', null);\n\n $model = $this->_getPhotoModel();\n\n $by = $this->_getParam('by', null);\n if ($by == 'taken_at') {\n $entries = $model->fetchEntriesByTakenAt($date, $this->_getParam('page', 1));\n } else {\n $entries = $model->fetchEntriesByCreated($date, $this->_getParam('page', 1));\n }\n $this->view->paginator = $entries;\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6742193", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "f1af362b177db60f1aa234951fb3dd26", "score": "0.67406327", "text": "public function listAction()\r\n {\r\n\r\n return array(\r\n 'items' => $this->getMapper()->findAll()\r\n );\r\n }", "title": "" }, { "docid": "1ad218b37000705f13503d05f42e31f8", "score": "0.6729927", "text": "public function listing(){\n //appelle constructeur produit\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "e875f9f43f0899fd4868233dc7733127", "score": "0.67253584", "text": "public function index()\n {\n //\n $loan = Loan::all();\n return LoanResource::collection($loan);\n }", "title": "" }, { "docid": "8bc383be0c0551987008cc1e903dfb3e", "score": "0.6717295", "text": "function listing(){ \n $data['title'] = 'Senarai Selenggaraan';\n $this->_render_page($data);\n }", "title": "" }, { "docid": "d5baeaa346c5c7d82493b224630a04fd", "score": "0.6693349", "text": "public function list()\n {\n return view('list', [\n 'component' => 'data-list',\n 'title' => 'Assets',\n 'create_url' => 'assets/create',\n 'count' => Asset::count(),\n 'columns' => [\n 'Path' => 'path',\n ],\n 'rows' => Asset::paginate(10)\n ]);\n }", "title": "" }, { "docid": "ec97d24c4e19a5128b0e53c5846b9bf5", "score": "0.669244", "text": "public function index()\n {\n return $this->getList();\n\n }", "title": "" }, { "docid": "ff020d8354464758e72e91a912f20d8e", "score": "0.66923076", "text": "public function actionList()\n {\n $list = $this->viewList('car');\n $imgs = ImageModel::load('img/car/logo/');\n return $this->render('list',compact('list','imgs'));\n }", "title": "" }, { "docid": "7ee6025c5609ac52b9b1dbb4db5ac2f3", "score": "0.6686426", "text": "public function index()\n\t{\n\t\tlist_details();\n\t}", "title": "" }, { "docid": "350cb7824776140ada3444d8b63c2b9a", "score": "0.66861296", "text": "public function actionList() {\n \n $allartists = array();\n $allartists = Artist::getArtistList();\n $role = Role::getRoles();\n \n require_once(ROOT . '/views/lists/artistlist.php');\n }", "title": "" }, { "docid": "ffb17c08a85c1385b784beb46e5b3ade", "score": "0.66860104", "text": "public function index()\n {\n $artists = Artist::orderBy('sort', 'asc')->get();\n\n return ArtistResource::collection($artists);\n }", "title": "" }, { "docid": "10a81357fb2912f13e91cd4d9b24c4d0", "score": "0.66837037", "text": "public function listAction()\n {\n $contentObject = $this->configurationManager->getContentObject();\n $header = $contentObject->data['header'];\n\n $this->view->assign('header', $header);\n $this->view->assign('plays', $this->playRepository->findAll());\n }", "title": "" }, { "docid": "e499e3e7f1a366ffebb6385468f3a0c5", "score": "0.6677873", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $lists = $em->getRepository('HunterBundle:Lists')->findAll();\n\n return $this->render('lists/index.html.twig', array(\n 'lists' => $lists,\n ));\n }", "title": "" }, { "docid": "b4ab065b5e289a80de47b28c29b12ba7", "score": "0.6668575", "text": "public function index()\n {\n /* authorization */\n $this->authorize('viewAny', Family::class);\n\n $families = Family::all();\n /* return resource collection */\n return FamilyResource::collection($families);\n }", "title": "" }, { "docid": "fc34d7bf0a8503064964866cc73ae555", "score": "0.66639954", "text": "function action_ResourceList()\n {\n\n $this->view = 'ResourceList';\n }", "title": "" }, { "docid": "91774d2a4f88a022706d4cc72b2fb4b9", "score": "0.66636354", "text": "public function _index() {\n\t\t$datas = DAO::getAll ( $this->model );\n\t\techo $this->_getResponseFormatter ()->get ( $datas );\n\t}", "title": "" }, { "docid": "473597c1b0826e1810587ecd7042a12d", "score": "0.6660131", "text": "public function actionIndex()\n {\n $searchModel = new ResourcemanagementSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "68a18d7d7744ddf6d10c85166d9a9672", "score": "0.6658018", "text": "public function listing($arguments);", "title": "" }, { "docid": "3768e67b371a22f226e966a98bb745f7", "score": "0.6653828", "text": "public static function list()\n {\n $data = [];\n $data[\"products\"] = DefaultModel::getProducts();\n\n View::createRoot(\"product-list\", $data)->render();\n }", "title": "" }, { "docid": "f186543d4e229fe60c320d197652a0ac", "score": "0.6648046", "text": "public function index()\n {\n return BookResource::collection(Book::paginate());\n }", "title": "" }, { "docid": "7fe029aedf53dcfabf4dbd68136e211f", "score": "0.6647669", "text": "public function index()\n {\n $items = Item::all();\n return ItemResource::Collection($items);\n }", "title": "" }, { "docid": "6e0e97799dea5e1f1424a0ed54835cae", "score": "0.6646619", "text": "public function index()\n {\n $products = Product::paginate();\n\t\treturn new ListCollection($products);\n }", "title": "" }, { "docid": "12d65a6c55f0fff8b933565f6365be6c", "score": "0.6637915", "text": "public function index() {\n return $this->showAll();\n }", "title": "" }, { "docid": "862f0847ab763608409837b536150716", "score": "0.66368043", "text": "public function indexAction()\r\n\t{\r\n\t\t$this->view->mainTitle = \"Listado de Plantillas\";\r\n\t\t$this->view->errors = $this->_helper->flashMessenger->getMessages();\r\n\t\t\r\n\t\t$nombre = $this->getParam(\"nombre\");\r\n\t\t$plantillas = $this->getRepository()->find($nombre);\r\n\t\t\r\n\t\t$this->view->plantillas = $plantillas;\r\n\t}", "title": "" }, { "docid": "a3074d45fbccf32cdbe6810d56d21449", "score": "0.6627834", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $projects =$this->service->retrieveAllInvestmentProjects($page);\n $this->view->projects = $projects;\n $this->view->paginator = $this->service->getPaginator($page);\n $this->view->role = Zend_Auth::getInstance()->getIdentity()->roleName;\n }", "title": "" }, { "docid": "39fb2eb38215d01e980796dd191b4bc2", "score": "0.6624286", "text": "public function index()\n {\n // needs to return multiple articles\n // so we use the collection method\n return ArticleListResource::collection(Article::all());\n }", "title": "" }, { "docid": "77b2fcb12774bae3c68bc3f546be203d", "score": "0.6624218", "text": "public function list ()\n {\n $products = Product::all();\n\n View::load('home', [\n 'products' => $products\n ]);\n\n }", "title": "" }, { "docid": "7eb3e9d73404c31d887de34e0e543165", "score": "0.66194737", "text": "public function index()\n {\n $streams = Streams::paginate(15);\n\n return StreamsResource::collection($streams);\n }", "title": "" }, { "docid": "c5562ea22267c67b7e362d148ab229b0", "score": "0.6613858", "text": "public function index ()\n {\n $data = Category::paginate(15);\n\n return $this->display( [ 'data' => $data ] );\n }", "title": "" }, { "docid": "a10012db405ad2f58017047d7c5955a3", "score": "0.66135347", "text": "public function index()\n {\n // get articles\n $articles = Article::paginate(15);\n\n // return collection of articles as a ressource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "4e546e7736c944aa032aaf9b866565c0", "score": "0.66128606", "text": "public function indexAction() {\n\t\t$this->view->assign('staticLists', $this->staticListService->listAll());\n\t}", "title": "" }, { "docid": "2d2195ebc523704e7f178bd9b4556f73", "score": "0.66104424", "text": "public function index()\n\t{\n\t\t//\n\t\t$resources = \\App\\Resource::with('category')->get();\n\t\treturn view('viewResource',['resources' => $resources ]);\n\t}", "title": "" }, { "docid": "a14d9338522a9ff2dff64321e93eddd2", "score": "0.6606226", "text": "public function listAction() {\n\t\t\t$this->view->assign('tags', $this->tagRepository->findAll());\n\t\t}", "title": "" }, { "docid": "8654188b350eeb0d720961a0f868517e", "score": "0.6602947", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n\n\t\t//GET SUBJECT AND OTHER SETTINGS\n $this->view->list = Engine_Api::_()->core()->getSubject('list_listing');\n\t\t$settings_api = Engine_Api::_()->getApi('settings', 'core');\n\t\t$this->view->show_featured = $settings_api->getSetting('list.feature.image', 1);\n\t\t$this->view->featured_color = $settings_api->getSetting('list.featured.color', '#0cf523');\n\t\t$this->view->show_sponsered = $settings_api->getSetting('list.sponsored.image', 1);\n\t\t$this->view->sponsored_color = $settings_api->getSetting('list.sponsored.color', '#fc0505');\n\t\t\n //GET VIEWER AND CHECK VIEWER CAN EDIT PHOTO OR NOT\n $viewer = Engine_Api::_()->user()->getViewer();\n\t\t$this->view->can_edit = $this->view->list->authorization()->isAllowed($viewer, \"edit\");\n }", "title": "" }, { "docid": "1fe94a4f4bf96984fb89ede920f77850", "score": "0.6602104", "text": "public function index()\n {\n \t$listings = Listing::orderBy( 'created_at', 'desc' )->get();\n return view( '/listings',compact( 'listings' ) );\n }", "title": "" }, { "docid": "c6630fa3ab4d194924045c2530a6eaf3", "score": "0.6595211", "text": "public function listAction()\n {\n $model = $this->_owApp->selectedModel;\n $translate = $this->_owApp->translate;\n $store = $this->_erfurt->getStore();\n $resource = $this->_owApp->selectedResource;\n $ac = $this->_erfurt->getAc();\n $params = $this->_request->getParams();\n $limit = 20;\n\n $rUriEncoded = urlencode((string)$resource);\n $mUriEncoded = urlencode((string)$model);\n $feedUrl = $this->_config->urlBase . \"history/feed?r=$rUriEncoded&mUriEncoded\";\n\n $this->view->headLink()->setAlternate($feedUrl, 'application/atom+xml', 'History Feed');\n\n // redirecting to home if no model/resource is selected\n if (\n empty($model) ||\n (\n empty($this->_owApp->selectedResource) &&\n empty($params['r']) &&\n $this->_owApp->lastRoute !== 'instances'\n )\n ) {\n $this->_abort('No model/resource selected.', OntoWiki_Message::ERROR);\n }\n\n // getting page (from and for paging)\n if (!empty($params['page']) && (int) $params['page'] > 0) {\n $page = (int) $params['page'];\n } else {\n $page = 1;\n }\n\n // enabling versioning\n $versioning = $this->_erfurt->getVersioning();\n $versioning->setLimit($limit);\n\n if (!$versioning->isVersioningEnabled()) {\n $this->_abort('Versioning/History is currently disabled', null, false);\n }\n\n $singleResource = true;\n // setting if class or instances\n if ($this->_owApp->lastRoute === 'instances') {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = $translate->_('Versions for elements of the list');\n\n $listHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('List');\n $listName = \"instances\";\n if ($listHelper->listExists($listName)) {\n $list = $listHelper->getList($listName);\n $list->setStore($store);\n } else {\n $this->_owApp->appendMessage(\n new OntoWiki_Message('something went wrong with the list of instances', OntoWiki_Message::ERROR)\n );\n }\n\n $query = clone $list->getResourceQuery();\n $query->setLimit(0);\n $query->setOffset(0);\n //echo htmlentities($query);\n\n $results = $model->sparqlQuery($query);\n $resourceVar = $list->getResourceVar()->getName();\n\n $resources = array();\n foreach ($results as $result) {\n $resources[] = $result[$resourceVar];\n }\n //var_dump($resources);\n\n $historyArray = $versioning->getHistoryForResourceList(\n $resources,\n (string) $this->_owApp->selectedModel,\n $page\n );\n //var_dump($historyArray);\n\n $singleResource = false;\n } else {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = sprintf($translate->_('Versions for %1$s'), $title);\n\n $historyArray = $versioning->getHistoryForResource(\n (string)$resource,\n (string)$this->_owApp->selectedModel,\n $page\n );\n }\n\n if (sizeof($historyArray) == ( $limit + 1 )) {\n $count = $page * $limit + 1;\n unset($historyArray[$limit]);\n } else {\n $count = ($page - 1) * $limit + sizeof($historyArray);\n }\n\n $idArray = array();\n $userArray = $this->_erfurt->getUsers();\n $titleHelper = new OntoWiki_Model_TitleHelper();\n // Load IDs for rollback and Username Labels for view\n foreach ($historyArray as $key => $entry) {\n $idArray[] = (int) $entry['id'];\n if (!$singleResource) {\n $historyArray[$key]['url'] = $this->_config->urlBase . \"view?r=\" . urlencode($entry['resource']);\n $titleHelper->addResource($entry['resource']);\n }\n\n if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->anonymousUser) {\n $userArray[$entry['useruri']] = 'Anonymous';\n } else if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->superAdmin) {\n $userArray[$entry['useruri']] = 'SuperAdmin';\n } else if (is_array($userArray[$entry['useruri']])) {\n if (isset($userArray[$entry['useruri']]['userName'])) {\n $userArray[$entry['useruri']] = $userArray[$entry['useruri']]['userName'];\n } else {\n $titleHelper->addResource($entry['useruri']);\n $userArray[$entry['useruri']] = $titleHelper->getTitle($entry['useruri']);\n }\n }\n }\n $this->view->userArray = $userArray;\n $this->view->idArray = $idArray;\n $this->view->historyArray = $historyArray;\n $this->view->singleResource = $singleResource;\n $this->view->titleHelper = $titleHelper;\n\n if (empty($historyArray)) {\n $this->_owApp->appendMessage(\n new OntoWiki_Message(\n 'No history for the selected resource(s).',\n OntoWiki_Message::INFO\n )\n );\n }\n\n if ($this->_erfurt->getAc()->isActionAllowed('Rollback')) {\n $this->view->rollbackAllowed = true;\n // adding submit button for rollback-action\n $toolbar = $this->_owApp->toolbar;\n $toolbar->appendButton(\n OntoWiki_Toolbar::SUBMIT,\n array('name' => $translate->_('Rollback changes'), 'id' => 'history-rollback')\n );\n $this->view->placeholder('main.window.toolbar')->set($toolbar);\n } else {\n $this->view->rollbackAllowed = false;\n }\n\n // paging\n $statusBar = $this->view->placeholder('main.window.statusbar');\n // the normal page_param p collides with the generic-list param p\n OntoWiki_Pager::setOptions(array('page_param'=>'page'));\n $statusBar->append(OntoWiki_Pager::get($count, $limit));\n\n // setting view variables\n $url = new OntoWiki_Url(array('controller' => 'history', 'action' => 'rollback'));\n\n $this->view->placeholder('main.window.title')->set($windowTitle);\n\n $this->view->formActionUrl = (string) $url;\n $this->view->formMethod = 'post';\n // $this->view->formName = 'instancelist';\n $this->view->formName = 'history-rollback';\n $this->view->formEncoding = 'multipart/form-data';\n }", "title": "" }, { "docid": "e16b7bcfc7e0c35a6d0ecf74b30d6a20", "score": "0.6588596", "text": "public function index()\n {\n $title = $this->title($this->modelName);\n $modelName = $this->modelName;\n $model = $this->model;\n $listStatus = $this->listStatus;\n $models = Bank::paginate(10);\n return view('bank.lists.index', compact('title', 'models', 'modelName', 'model', 'listStatus'));\n }", "title": "" }, { "docid": "c4bb31a9775a0e667ef62e4f3a23aeab", "score": "0.6563258", "text": "public function listAction() {\n $this->_datatable();\n return array();\n }", "title": "" }, { "docid": "b9b300aec37bbe88214d2c466b083d07", "score": "0.6560596", "text": "public function index()\n {\n // Obtengo los resultados\n $results = Result::all();\n\n // Lo devuelvo como un recurso\n return ResultResource::collection($results);\n }", "title": "" }, { "docid": "e840f12f97ea99ca01a90a9ec9cad7ca", "score": "0.65599096", "text": "public function index()\n {\n return BookResource::collection(Book::with('authors')->paginate(25));\n }", "title": "" }, { "docid": "19e51010afc5a8251ed229fa24e89b84", "score": "0.6555101", "text": "public function index()\n {\n $items = Item::search()->paginate(10);\n return view('item.list', compact('items'));\n }", "title": "" }, { "docid": "25bbf4f08be5c7ace0982ed3e61db475", "score": "0.6553109", "text": "public function list()\n {\n //\n }", "title": "" }, { "docid": "25bbf4f08be5c7ace0982ed3e61db475", "score": "0.6553109", "text": "public function list()\n {\n //\n }", "title": "" }, { "docid": "451b54ad54f4267a96a3c9a18faae916", "score": "0.6552225", "text": "function index()\n {\n $this->listArticles();\n }", "title": "" }, { "docid": "7335a64fbf88651c9293fc7e0bf1a4a1", "score": "0.6548072", "text": "public function getIndex()\r\n { \r\n $response = $this->modelService->getAll();\r\n //return resources listing view\r\n return view(\\OogleeBConfig::get('config.post_index.index'), compact('response'));\r\n }", "title": "" }, { "docid": "ea133c7a5d450c0580ac1c613df4b59d", "score": "0.65474623", "text": "public function index()\n {\n //Get Movies\n $movies = Movie::paginate(15);\n\n //return collection of movies as a resource\n return MovieResource::collection($movies);\n }", "title": "" }, { "docid": "83b5665a886532759f6d6fd3177eb43d", "score": "0.65461665", "text": "public function actionList()\n\t{\n\t\t$this->subLayout = \"@humhub/views/layouts/_sublayout\";\n\t\t$data = Desire::getAll(10);\n\t\t$articles = $data['articles'];\n\t\t$count = $data['count'];\n\n\n\n\t\treturn $this->render('list', [\n\t\t\t'articles' => $articles,\n\t\t\t'count' => $count,\n\t\t\t'ajaxUrl' => '/desire/desire/list-ajax?sort='.Yii::$app->request->get('sort'),\n\t\t]);\n\t}", "title": "" }, { "docid": "46a4b83443e6a7cb9ed2604a7ba376d3", "score": "0.6541433", "text": "public function viewList(): void\n {\n $model = self::fetchModel($this->request->get(self::PARAM_MODEL_NAME));\n $this->response->set(Mvc::TEMPLATE, 'manager');\n $this->response->set(Mvc::CONTEXT, $this->request->get(Mvc::CONTEXT));\n $this->response->set(Mvc::VIEW, $this->request->get(Mvc::VIEW));\n $this->response->set('config', $this->getCrudConfig($model));\n $content = FrontendHelper::parseFile('/var/www/_dev/vendor/noxkiwi/crud/frontend/view/crudfrontend/list.php');\n $this->response->set('content', $content);\n $this->response->set(self::PARAM_MODEL_NAME, $this->modelName);\n }", "title": "" }, { "docid": "bc892b43167344bb7550a0e63635634f", "score": "0.6540258", "text": "public function index()\n {\n $students = Student::all();\n return StudentResource::collection($students);\n \n }", "title": "" }, { "docid": "f0e979747234803271be38ea6cd3396e", "score": "0.65383667", "text": "public function index()\n\t{\n\t\t$categories = Category::paginate(5);\n\t\treturn CategoryResource::collection($categories);\n\t}", "title": "" }, { "docid": "e08fd6cadf8c20cad7196e73194fba35", "score": "0.65371203", "text": "public function index()\n {\n return $this->service->showAll();\n }", "title": "" }, { "docid": "2a2a07c1f7a2727a0de83a5fa87aabaa", "score": "0.65362406", "text": "public function index()\n {\n $books=Book::paginate(10);\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.65288365", "text": "public function list()\n {\n }", "title": "" }, { "docid": "de74480294a1123dacaf091a018a43f7", "score": "0.6526695", "text": "public function _index(){\n\t $this->_list();\n\t}", "title": "" }, { "docid": "68de2d9bace6b0d21d880e30663096bd", "score": "0.6525593", "text": "public function index()\n {\n return response([\n 'listas' => \\App\\Http\\Resources\\ListaResource::collection(\n Lista::where('user_id', auth()->id())->get()\n ),\n 'message' => 'Listado com sucesso.'\n ], 200);\n }", "title": "" }, { "docid": "3a2bf5049606c1975209783c9d992936", "score": "0.652094", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $recipes = $em->getRepository('AppBundle:Recipe')->findAll();\n\n return $this->render('@frontend/recipe/list.html.twig', array(\n 'recipes' => $recipes\n ));\n }", "title": "" }, { "docid": "976cbb5be4594e239e987a2fbcbe8b3a", "score": "0.6513086", "text": "public function index()\n {\n return FieldResource::collection(Field::paginate());\n }", "title": "" }, { "docid": "f2cedab0962de588e01c1716c1790aad", "score": "0.65068287", "text": "public function index()\n {\n // return Response::json(request()->route(), 200);\n $action = \"SHOW \" . $this->page;\n try {\n $search = request()->get(\"search\");\n $isPaging = request()->exists(\"page\");\n\n $model = $this->model::query();\n\n // If admin searches for any name\n if (!empty($search)) {\n $model = $model->whereName($search);\n }\n\n if (isset($this->loadParam['read'])) {\n if(isset($this->loadParam['read']['with'])) {\n $withs = explode(',', $this->loadParam['read']['with']);\n foreach ($withs as $with) {\n $model = $model->with($with);\n }\n }\n }\n\n // Provide based on paging or not\n if ($isPaging) {\n $model = $model\n ->orderBy('id', 'desc')->paginate();\n } else {\n $model = $model\n ->orderBy('id', 'desc')->get();\n }\n\n // If permission has data\n if ($model) {\n $this->lg($this->page . ' list shown', 'info', $action, 200);\n return response()->json($model);\n } else {\n $this->lg($this->page . ' list not found', 'warning', $action, 404);\n return response()->json(\"Not found\", 404);\n }\n } catch (\\Exception $e) {\n $this->lg($e, 'error', $action, 500);\n return response()->json($this->experDifficulties, 500);\n }\n }", "title": "" }, { "docid": "ef707fce78cb544fb65c0a4e38796dff", "score": "0.65030056", "text": "private function showList(): void\n {\n $msg = \"Welcome customer, to view the product list type: list\\n\";\n echo $msg;\n while ($command = $this->getInput() !== 'list') {\n echo $msg;\n };\n $products = Route::goTo('list');\n $this->products = $products;\n foreach ($this->products as $product) {\n echo $product->toString() . \"\\n\";\n }\n }", "title": "" }, { "docid": "1c0c0aefcfbef26445ad6c95b7c7f60c", "score": "0.6501281", "text": "public function index()\n {\n $listings = $this->listings->paginate(15);\n\n return view('backend.listings.index',compact('listings'));\n }", "title": "" }, { "docid": "a281ecc70e3d52bd2ee1e4bfba8e1724", "score": "0.6497771", "text": "public function index()\n {\n return SongResource::collection(Song::all()->sortByDesc('created_at'));\n }", "title": "" }, { "docid": "7f844292b4038bfed459f1130c7632dd", "score": "0.64967513", "text": "public function listAction()\n {\n $this->view->assign('articles', $this->repository->findForListPlugin($this->settings, $this->getData()));\n }", "title": "" }, { "docid": "228d685d5f1d86518c57ce853ccd52ef", "score": "0.64868814", "text": "public function listAction() {\n\t\t$literatures = $this->literatureRepository->findAll();\n\t\t$this->view->assign('literatures', $literatures);\n\t}", "title": "" }, { "docid": "9169a301a1e687b391dc420a75819c41", "score": "0.64856774", "text": "public function index()\n {\n $products = $this->allResources($this->productRepository);\n\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "e4ed0c12368721c8003fa5e2056a624b", "score": "0.6479523", "text": "public function indexAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n \n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BricksSiteBundle:ExternalResource')->findBy(\n array(),\n array('title' => 'ASC')\n );\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "d4e011bbb309b20dccd6a637cae8b802", "score": "0.64744496", "text": "public function index()\n {\n return response(TodoResource::collection(Todo::all()), 200);\n }", "title": "" }, { "docid": "32e9a450ea4cabeba3749d02f2ef99e6", "score": "0.6473708", "text": "public function actionIndex()\n\t{\n\t\t$theLists = Listt::find()\n\t\t\t->where(['account_id'=>0])\n\t\t\t->orderBy('grouping, sorder, name')\n\t\t\t->asArray()\n\t\t\t->all();\n\t\treturn $this->render('list_index', [\n\t\t\t'theLists'=>$theLists,\n\t\t]);\n\t}", "title": "" } ]
08174bc790a3e562cdfa1a5cc5a837ea
Asserts the given error summaries are present on the page. If an expected error is not found, or if an error not in the list is present, a fail is raised.
[ { "docid": "92a5c2e68f6623eb9a394e03b3f78b44", "score": "0.7809745", "text": "protected function assertErrorSummaries(array $summaries) {\n $this->assertRequirementSummaries($summaries, 'error');\n }", "title": "" } ]
[ { "docid": "f5c917ed0cf280eab0333085320abcd5", "score": "0.64553744", "text": "protected function assertWarningSummaries(array $summaries) {\n $this->assertRequirementSummaries($summaries, 'warning');\n }", "title": "" }, { "docid": "a6f50bf386d96d57c7933211089cebdb", "score": "0.6074366", "text": "protected function checkIfErrorsExist() {\n $errors = Session::instance()->get('errors');\n $this->assertNotEmpty($errors);\n }", "title": "" }, { "docid": "82a9da6fab5e9a0d71d5ad8340f5253e", "score": "0.5936444", "text": "public function iShouldSeeAnException()\n {\n $this->assertElementOnPage('.error-message');\n }", "title": "" }, { "docid": "3bc3b771ee5493de20e1a09c318b1019", "score": "0.5832035", "text": "public function test_errors_index()\n {\n // Create a log\n $this->actingAs(factory('App\\User')->create());\n for ($i = 0; $i < 5; $i++) {\n ApplicationLog::create([\n 'status' => 0,\n 'description' => $this->faker->sentence,\n 'value' => [\n 'one' => 'value one',\n 'two' => 'value two',\n 'three' => 'value three',\n 'errors' => [\n 'one' => ['value one is required'],\n 'two' => ['value two is required'],\n 'three' => ['value three is required'],\n ]],\n 'meta' => 'metadata',\n ]);\n }\n\n // Show the log index page\n $response = $this->get(route('errors.index'))->assertStatus(200);\n $this->assertEquals(5, ($response->original->getData()['errors'])->count());\n }", "title": "" }, { "docid": "fb4868eb1bb96a4b2604de0d355a1eab", "score": "0.57858497", "text": "public function iShouldSeeAnErrorBox()\n {\n $this->assertElementOnPage('.notification-1');\n }", "title": "" }, { "docid": "e79fefbc8bcb86194ceb0f71bc8db65b", "score": "0.56871563", "text": "protected function assertRequirementSummaries(array $summaries, string $type) {\n // The selectors are different for Seven and Claro.\n $is_claro = stripos($this->getSession()->getPage()->getContent(), 'claro/css/theme/maintenance-page.css') !== FALSE;\n\n $selectors = [];\n if ($is_claro) {\n // In Claro each requirement heading is present in a div with the class\n // system-status-report__status-title. There is one summary element per\n // requirement type and it is adjacent to a div with the class\n // claro-details__wrapper.\n $selectors[] = 'summary#' . $type . '+.claro-details__wrapper .system-status-report__status-title';\n }\n else {\n // Allow only details elements that are directly after the warning/error\n // header or each other. There is no guaranteed wrapper we can rely on\n // across distributions. When there are multiple warnings, the selectors\n // will be:\n // - h3#warning+details summary\n // - h3#warning+details+details summary\n // - etc.\n // For errors, the selectors are the same except that they are h3#error.\n // We add one more selector than expected requirements to confirm that\n // there isn't any other requirement message before clicking the link.\n // @todo Make this more reliable in\n // https://www.drupal.org/project/drupal/issues/2927345.\n for ($i = 0; $i <= count($summaries); $i++) {\n $selectors[] = 'h3#' . $type . implode('', array_fill(0, $i + 1, '+details')) . ' summary';\n }\n }\n $elements = $this->cssSelect(implode(', ', $selectors));\n\n // Confirm that there are only the expected requirements.\n $requirements = [];\n foreach ($elements as $requirement) {\n $requirements[] = trim($requirement->getText());\n }\n $this->assertEquals($summaries, $requirements);\n }", "title": "" }, { "docid": "4b346335a469ecd50dd168fbe0f1640d", "score": "0.5434038", "text": "private function assertInputExceptionMessages($e)\n {\n $this->assertEquals('One or more input exceptions have occurred.', $e->getMessage());\n $errors = $e->getErrors();\n $this->assertCount(2, $errors);\n $this->assertEquals('\"username\" is required. Enter and try again.', $errors[0]->getLogMessage());\n $this->assertEquals('\"password\" is required. Enter and try again.', $errors[1]->getLogMessage());\n }", "title": "" }, { "docid": "79e6c2ccde1152ef34b9f1ab22449210", "score": "0.541636", "text": "protected function checkIfNoErrorsExist() {\n $errors = Session::instance()->get('errors');\n $this->assertEmpty($errors);\n }", "title": "" }, { "docid": "5c7ca2ba92f0782b7e39f162262f63ec", "score": "0.5410476", "text": "public function testErrorCodes(): void\n {\n try {\n $constants = (new ReflectionClass(Error::class))->getConstants();\n $occurrence = array_count_values(array_column($constants, 'message'));\n unset($constants['CONTACT']);\n\n foreach ($constants as $key => $const) {\n if (!isset($const['code'], $const['message'], $const['statusCode'])) {\n echo \"\\033[31m** Error: \\033[0m$key must have a code, message and statusCode.\\n\";\n self::assertTrue(false); // to error\n }\n\n $code = $const['code'];\n $message = $const['message'];\n $statusCode = $const['statusCode'];\n\n $err = \"\\033[31m** Error: \\033[0m$key error code \";\n\n if ($key !== $code) {\n echo \"$err has an invalid code \\033[31m$code\\033[0m, they must match.\\n\";\n self::assertTrue(false); // to error\n }\n\n if ($occurrence[$message] > 1) {\n echo \"$err has message that already exist in another error code.\\n\";\n self::assertTrue(false); // to error\n }\n\n if (strlen($message) < 5) {\n echo \"$err has a short message, length must be greater than 5.\\n\";\n self::assertTrue(false); // to error\n }\n\n if (!is_int($statusCode) || strlen($statusCode) !== 3) {\n echo \"$err has an invalid statusCode \\033[31m$statusCode\\033[0m, it must be a 3 length integer.\\n\";\n self::assertTrue(false); // to error\n }\n }\n\n self::assertTrue(true);\n } catch (ReflectionException $e) {\n self::assertTrue(false); // to error\n }\n }", "title": "" }, { "docid": "c8be5346acfd6a1faf84bfb953ab7840", "score": "0.5374304", "text": "public function testContainsFailureMessage()\n {\n $message = 'Failed test';\n\n try {\n $this->expectedValue('b')\n ->setMessage($message)\n ->existsIn(\n array('a', 'c')\n );\n } catch (\\Exception $e) {\n if (!strstr($e->getMessage(), $message)) {\n throw new \\Exception('Failure. Message is not outputted.');\n }\n }\n }", "title": "" }, { "docid": "887fda005cc336d79aaa3939eec6a323", "score": "0.5338832", "text": "public function assertSessionHasErrors()\n\t{\n\t\treturn $this->assertSessionHas('errors');\n\t}", "title": "" }, { "docid": "29abb3d2f36802a83aefbd34c0254389", "score": "0.53360605", "text": "public function theResponseHasAErrorsPropertyAndContains($message) {\n $message = $this->dataContext->parseParameter($message, [], \"validators\");\n $errors = $this->getPropertyValue(\"errors\");\n $found = false;\n if (is_array($errors['errors'])) {\n foreach ($errors['errors'] as $error) {\n if ($error === $message) {\n $found = true;\n break;\n }\n }\n } else {\n throw new Exception(sprintf(\"The error property no contains error message. '%s' \\n \\n %s\", $message, var_export($errors['errors'], true), $this->echoLastResponse()));\n }\n if ($found === false) {\n throw new Exception(sprintf(\"The error response no contains error message '%s', response with '%s'\", $message, implode(\",\", $errors['errors'])));\n }\n }", "title": "" }, { "docid": "2fbe2afdc4da3fd72131110d3815b9a8", "score": "0.53260016", "text": "public function testGetErrors(): void\n {\n $form = new Form();\n $form->getValidator()\n ->add('email', 'format', [\n 'message' => 'Must be a valid email',\n 'rule' => 'email',\n ])\n ->add('body', 'length', [\n 'message' => 'Must be so long',\n 'rule' => ['minLength', 12],\n ]);\n\n $data = [\n 'email' => 'rong',\n 'body' => 'too short',\n ];\n $form->validate($data);\n $errors = $form->getErrors();\n $this->assertCount(2, $errors);\n $this->assertSame('Must be a valid email', $errors['email']['format']);\n $this->assertSame('Must be so long', $errors['body']['length']);\n }", "title": "" }, { "docid": "b3de3e59be0cb41cdc22bd6b5e69f594", "score": "0.5311758", "text": "protected function printFailures(): void\n {\n if ($this->getNumFailures() === 0) {\n return;\n }\n\n $this->cli->br();\n if ($this->config['colours']) {\n $this->cli->bold()->underline()->red()->out('Failures');\n } else {\n $this->cli->out('Failures');\n }\n $this->cli->br();\n\n $first = true;\n foreach ($this->getFailures() as $i => $details) {\n if ($first === false) {\n $this->cli->br();\n $this->cli->out('-----');\n $this->cli->br();\n }\n $first = false;\n\n // Find offending line\n $line = $this->getLine($details['errors'][0]['file'], $details['errors'][0]['line']);\n\n if ($this->config['colours']) {\n $this->cli->bold()->inline($details['suite'] . '::');\n $this->cli->out($details['test']);\n $this->cli->darkGray()->out($details['errors'][0]['file']);\n $this->cli->red()->out($details['errors'][0]['message']);\n $this->cli->br();\n $this->cli->out('Line ' . $details['errors'][0]['line'] . ' | ' . $line);\n\n if (isset($details['errors'][0]['diff'])) {\n $this->cli->green()->out('Expected: ' . $details['errors'][0]['diff']['expected']);\n $this->cli->red()->out('Actual: ' . $details['errors'][0]['diff']['actual']);\n }\n } else {\n $this->cli->inline($details['suite'] . '::');\n $this->cli->out($details['test']);\n $this->cli->out($details['errors'][0]['file']);\n $this->cli->out($details['errors'][0]['message']);\n $this->cli->br();\n $this->cli->out('Line ' . $details['errors'][0]['line'] . ' | ' . $line);\n\n if (isset($details['errors'][0]['diff'])) {\n $this->cli->out('Expected: ' . $details['errors'][0]['diff']['expected']);\n $this->cli->out('Actual: ' . $details['errors'][0]['diff']['actual']);\n }\n }\n }\n }", "title": "" }, { "docid": "410718f9f50ed44c7af7f185315c56b9", "score": "0.5293526", "text": "public function testThatPageErrorIsDisplayedIfNoBoardMembersSet()\n {\n $this->crawler = $this->client->getCrawler();\n $crawler= $this->crawler;\n $client = $this->client;\n\n $this->client->request('GET', '/about');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $text = $crawler->filter('h2')->eq(0)->text();\n $this->assertEquals($text, 'List of Board Members is not available at this time.');\n }", "title": "" }, { "docid": "c101e445cec9fa66b83e59427cead2be", "score": "0.5281311", "text": "public function test_errors_show()\n {\n // Create a log\n $this->actingAs(factory('App\\User')->create());\n $log = ApplicationLog::create([\n 'status' => 0,\n 'description' => $this->faker->sentence,\n 'value' => [\n 'one' => 'value one',\n 'two' => 'value two',\n 'three' => 'value three',\n 'errors' => [\n 'one' => ['value one is required'],\n 'two' => ['value two is required'],\n 'three' => ['value three is required'],\n ]],\n 'meta' => 'metadata',\n ]);\n\n // Show the log show page\n $response = $this->get(route('errors.show', $log));\n $this->assertEquals(($response->original->getData()['error'])->toArray(), $log->toArray());\n }", "title": "" }, { "docid": "ed2123f963445461cdb825394b29fe26", "score": "0.52557176", "text": "public function testErrorPage() {\n $site = kirby::setup(array(\n 'root.content' => root('test.content'),\n 'root.site' => root('test.site')\n ));\n\n $page = $site->find('projects');\n $this->assertFalse($page->isErrorPage());\n\n $page = $site->find('error');\n $this->assertTrue($page->isErrorPage());\n\n // default setup with home\n $site = kirby::setup(array(\n 'root.content' => root('test.content'),\n 'root.site' => root('test.site'),\n 'error' => 'projects'\n ));\n\n $page = $site->find('projects');\n $this->assertTrue($page->isErrorPage());\n\n $page = $site->find('error');\n $this->assertFalse($page->isErrorPage());\n\n }", "title": "" }, { "docid": "4458a9d35572f4dd15d1e1db8b122978", "score": "0.5247502", "text": "public function testValidationExceptionContainsMessages()\n {\n $profiles = ['default' => rand(0,10)];\n\n try {\n $v = GenericMiddleware::validateProfiles($profiles);\n } catch (CspValidationException $e) {\n $this->assertTrue(is_array($e->getMessages()));\n }\n }", "title": "" }, { "docid": "b1a1670a76ab7a16c4ebfb1f132773ef", "score": "0.521962", "text": "public function testGetInvalidRestaurantViolationByRestaurantViolationResults() : void {\n\t\t// grab a RestaurantViolation by results that does not exist\n\t\t$RestaurantViolation = RestaurantViolation::getRestaurantViolationByRestaurantViolationResults($this->getPDO(), \"no RestaurantViolationResults here\");\n\t\t$this->assertCount(0, $RestaurantViolation);\n\t}", "title": "" }, { "docid": "2e6fa68c2152bb472cdd93b3063992eb", "score": "0.5168005", "text": "private function checkValidation()\n {\n if (!$this->getConfirmation('Check for application rule / validation errors?')) {\n return;\n }\n\n $pauseOnError = $this->getConfirmation('Pause on error?');\n\n $start = time();\n $progress = $this->makeProgressBar($this->pageCount);\n $allErrors = [];\n for ($page = 1; $page <= $this->pageCount; $page++) {\n $stats = $this->getPaginatedStats($page);\n foreach ($stats as $stat) {\n $errors = $this->statsTable\n ->getValidator('default')\n ->errors($stat->toArray());\n $ruleViolation = !$this->statsTable->checkRules($stat, 'create');\n\n if ($errors || $ruleViolation) {\n $allErrors[$stat->id] = [\n 'errors' => $errors,\n 'ruleViolation' => $ruleViolation,\n ];\n if ($pauseOnError) {\n $this->io->error('Error with stat #' . $stat->id);\n print_r($stat->getErrors());\n $this->io->out('Stat values:');\n print_r($stat->toArray());\n $this->io->ask('Press enter to continue');\n }\n }\n unset($stat);\n }\n unset($stats);\n\n $progress->increment(1)->draw();\n }\n\n $this->io->out();\n $this->displayTimeElapsed($start);\n if ($allErrors) {\n $this->io->error(sprintf(\n '%s %s with errors found',\n number_format(count($allErrors)),\n __n('stat', 'stat', count($allErrors))\n ));\n foreach ($allErrors as $statId => $info) {\n $this->io->out('Stat #' . $statId);\n if ($info['ruleViolation']) {\n $this->io->out('Application rules failed');\n }\n if ($info['errors']) {\n $this->io->out();\n }\n if (!$this->getConfirmation('Continue?')) {\n break;\n }\n }\n }\n }", "title": "" }, { "docid": "e2cff8da5baf25dd0b9c7b928b789f59", "score": "0.5164916", "text": "public function hasErrors();", "title": "" }, { "docid": "e2cff8da5baf25dd0b9c7b928b789f59", "score": "0.5164916", "text": "public function hasErrors();", "title": "" }, { "docid": "2e03ac7f6f9709c1b3bc648b87a27ffd", "score": "0.51578134", "text": "public function testGeneric()\n {\n $exception = new Html2PdfException('My Message');\n $formatter = new ExceptionFormatter($exception);\n\n $messages = [\n $formatter->getMessage(),\n $formatter->getHtmlMessage()\n ];\n\n foreach ($messages as $message) {\n $this->assertContains('Html2Pdf Error ['.Html2PdfException::ERROR_CODE.']', $message);\n $this->assertContains('My Message', $message);\n }\n }", "title": "" }, { "docid": "02ba4ec180fee7a55b30e309faaf6bb7", "score": "0.5155323", "text": "function page_errors_list() {\n global $wpdb;\n\n $pager = $this->get_pager_limit( 20, $this->base_table_name.\"404\" );\n $list = $wpdb->get_results( \"SELECT id, date, request FROM \".$this->base_table_name.\"404 \". $pager['limit'] );\n\n echo $this->get_wrapper_start( __( '404 Errors list', $this->options['id'] ) );\n if ( empty( $list ) ) {\n echo '<p>'.__( 'No results yet', $this->options['id'] ).'</p>';\n }\n else {\n echo $this->get_admin_table( $list , array(\n 'columns' => array( 'id', __( 'Date', $this->options['id'] ), __( 'Request', $this->options['id'] ) ),\n 'pagenum' => $pager['pagenum'],\n 'max_pages' => $pager['max_pages']\n ) );\n }\n echo $this->get_wrapper_end();\n }", "title": "" }, { "docid": "09fa6c2d6330e1b7cde703cd6325ba7c", "score": "0.5145248", "text": "private function hasErrors() {\r\n if((int)$this->xpath->evaluate(\"count(/error)\") > 0) {\r\n $this->respError = true;\r\n return true;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "eb74f41b82b5afbc5549ebe226c35844", "score": "0.51388955", "text": "public function iShouldNotSeeAnErrorBox()\n {\n $this->assertElementNotOnPage('.notification-1');\n }", "title": "" }, { "docid": "abeeaab7c1f16971ad1e685c5025790a", "score": "0.5134258", "text": "public function assertHasErrors(Trick $user, int $number = 0)\n {\n self::bootKernel();\n $errors = self::$container->get('validator')->validate($user);\n $messages = [];\n foreach ($errors as $error) {\n $messages[] = $error->getPropertyPath() . '=>' . $error->getMessage();\n }\n $this->assertCount($number, $errors, implode(', ', $messages));\n }", "title": "" }, { "docid": "28e18ba977bd46e95502c48a48576f3e", "score": "0.51275986", "text": "protected function printErrors(): void\n {\n if ($this->getNumErrors() === 0) {\n return;\n }\n\n $this->cli->br();\n if ($this->config['colours']) {\n $this->cli->bold()->underline()->red()->out('Errors');\n } else {\n $this->cli->out('Errors');\n }\n $this->cli->br();\n\n $first = true;\n foreach ($this->getErrors() as $i => $details) {\n if ($first === false) {\n $this->cli->br();\n $this->cli->out('-----');\n $this->cli->br();\n }\n $first = false;\n\n // Find offending line\n $line = $this->getLine($details['errors'][0]->getFile(), $details['errors'][0]->getLine());\n\n if ($this->config['colours']) {\n $this->cli->bold()->inline($details['suite'] . '::');\n $this->cli->out($details['test']);\n $this->cli->darkGray()->out($details['errors'][0]->getFile());\n $this->cli->red()->out($details['errors'][0]->getMessage());\n $this->cli->br();\n $this->cli->out('Line ' . $details['errors'][0]->getLine() . ' | ' . $line);\n $this->cli->br();\n $this->cli->darkGray()->out($details['errors'][0]->getTraceAsString());\n } else {\n $this->cli->inline($details['suite'] . '::');\n $this->cli->out($details['test']);\n $this->cli->out($details['errors'][0]->getFile());\n $this->cli->out($details['errors'][0]->getMessage());\n $this->cli->br();\n $this->cli->out('Line ' . $details['errors'][0]->getLine() . ' | ' . $line);\n $this->cli->br();\n $this->cli->out($details['errors'][0]->getTraceAsString());\n }\n }\n }", "title": "" }, { "docid": "6b735668262dc7aa4b9a45a5ba736bab", "score": "0.5114884", "text": "protected static function assertApiProblemError(ApiOutput $apiOutput, int $expectedStatus, array $messages): void\n {\n static::assertEquals($expectedStatus, $apiOutput->getStatusCode());\n $error = $apiOutput->getData();\n static::assertArrayHasKey('errors', $error);\n array_walk($messages, static function (&$message) {\n $message = ApiProblem::PREFIX.$message;\n });\n static::assertArraysAreSimilar($messages, $error['errors']);\n }", "title": "" }, { "docid": "7657d5c8555046a989a3962fde1a470d", "score": "0.51041913", "text": "public function iShouldNotSeeAnExceptionBox()\n {\n $this->assertElementNotOnPage('.error-message');\n }", "title": "" }, { "docid": "5c6ed79090ba0777deb926514fbc8291", "score": "0.50838774", "text": "public function admin_login_form_validation_errors()\n {\n $response = $this->post('/login', []);\n\n $response->assertStatus(302);\n $response->assertSessionHasErrors('email');\n }", "title": "" }, { "docid": "d31bb25b03a1f32b2173949e39778bb4", "score": "0.5071144", "text": "public function testErrorCodes(): void\n {\n $exception = new ValidationFailedException([]);\n\n self::assertSame(BaseExceptionInterface::DEFAULT_ERROR_CODE_VALIDATION, $exception->getErrorCode());\n self::assertSame(BaseExceptionInterface::DEFAULT_ERROR_SUB_CODE, $exception->getErrorSubCode());\n }", "title": "" }, { "docid": "36b163473271294320abfd5efa849e4e", "score": "0.5067883", "text": "public function doWeHandleErrors()\n {\n // Assume.\n $expectedData = ['status' => 'error', 'message' => 'Your CSV is empty or the file does not exist.'];\n\n // Action.\n $csvData = $this->getSut()->process(\"i don't exist\");\n\n // Assert.\n $this->assertEquals($expectedData, $csvData, 'We have not handled errors correctly');\n }", "title": "" }, { "docid": "b3efccb03a579c904e9a0f20822c8726", "score": "0.5058904", "text": "public function testGetErrorsMessages()\n {\n $validator = new Date();\n $this->assertEquals([], $validator->errors());\n\n $validator->isValid('44');\n $this->assertCount(1, $validator->errors());\n }", "title": "" }, { "docid": "4e51ab8156f7ce82c2ce4f3a524c5d0b", "score": "0.50464636", "text": "function hasErrors();", "title": "" }, { "docid": "c4f1045beb53ec33805a5be526e1f922", "score": "0.5034226", "text": "protected function validateOutput(array $output, $htmlContains = '')\n {\n if (!empty($output))\n {\n foreach ($output as $v)\n {\n $this->assertArrayHasKey('service', $v);\n $this->assertArrayHasKey('type', $v);\n $this->assertArrayHasKey('resource', $v);\n $this->assertArrayHasKey('url', $v);\n $this->assertArrayHasKey('text', $v);\n $this->assertArrayHasKey('stamp', $v);\n $this->assertArrayHasKey('date', $v);\n $this->assertArrayHasKey('link', $v);\n $this->assertArrayHasKey('html', $v);\n $this->assertArrayHasKey('date_relative', $v);\n $this->assertTrue((bool) preg_match('~(ago|hace|just|ahora)~i', $v['date_relative']), 'Invalid date_relative string: ' . $v['date_relative']);\n\n if (!empty($htmlContains)) {\n $this->assertContains($htmlContains, $v['html']);\n }\n }\n }\n else\n $this->fail('Test: Empty Output on validation');\n }", "title": "" }, { "docid": "a74b335a545709f71958178a33cf4e3b", "score": "0.5031363", "text": "protected function assertViolations(array $test) {\n if (!array_key_exists('options', $test)) {\n $test['options'] = array();\n }\n $violations = $this->validatorsManager->violations($test['constraint'], $test['value'], $test['options']);\n $this->assertTrue(is_array($violations), $test['msg']);\n }", "title": "" }, { "docid": "ed6f9414569703f15c8e7e4e7d1a0683", "score": "0.4995747", "text": "public function testAddTotalInvalidData(): void\n {\n $datas = [\n 2 => 6,\n 1 => 6,\n 3 => 3\n ];\n $ArrayOrganize = new ArrayOrganize($datas);\n $this->expectException(\\Exception::class);\n $ArrayOrganize->addTotal(\"val\", \"<strong>Total :</strong> \");\n }", "title": "" }, { "docid": "a987412c18b79aaa0d74fe78b09fbae2", "score": "0.49876124", "text": "function haveErrors() {\n\t\treturn systemMessages::haveMessages('error');\n\t}", "title": "" }, { "docid": "2bab7d5bfc3866bb8a7033708895dfe1", "score": "0.4983979", "text": "protected function _printErrors($results) {\n\t\t\n\t\tforeach($results as $result) {\n\t\t\tif($result['result'] === 'fail') {\n\t\t\t\t$this->_command->hr();\n\t\t\t\t$this->_command->error('{:error}' . $result['message'] . '{:end}');\n\t\t\t}\n\t\t}\n\t\t$this->_command->hr();\n\t\t$this->_command->out();\n\t}", "title": "" }, { "docid": "921768850b370fbb39551ea34a6491f2", "score": "0.49680787", "text": "protected function validate($html) {\n $resource = curl_init($this->url);\n curl_setopt($resource, CURLOPT_USERAGENT, 'curl');\n curl_setopt($resource, CURLOPT_POST, true);\n curl_setopt($resource, CURLOPT_HTTPHEADER, array('Content-Type: text/html; charset=utf-8'));\n curl_setopt($resource, CURLOPT_POSTFIELDS, $html);\n curl_setopt($resource, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($resource, CURLOPT_RETURNTRANSFER, true);\n $response = json_decode(curl_exec($resource), TRUE);\n if ($response === NULL || !is_array($response)) {\n throw new ExpectationException('Could not parse W3C JSON API output', $this->getSession());\n }\n if (array_key_exists('messages', $response)) {\n foreach ($response['messages'] as $message) {\n switch ($message['type']) {\n case 'info':\n if (array_key_exists('subType', $message) && $message['subType'] === 'warning') {\n $this->warnings[] = \"\nmessage: {$message['message']}\nline: {$message['lastLine']}\ncolumn: {$message['lastColumn']}\nextract: {$message['extract']}\n\";\n }\n break;\n case 'error':\n $this->errors[] = \"\nmessage: {$message['message']}\nline: {$message['lastLine']}\ncolumn: {$message['lastColumn']}\nextract: {$message['extract']}\n\";\n break;\n default:\n }\n\n }\n }\n }", "title": "" }, { "docid": "496fc25871260ffcc8f60cd3540009af", "score": "0.49626878", "text": "public function testAddError()\n {\n Logger::getInstance()->clearErrors();\n\n $this->assertEquals(Logger::getInstance()->countErrors(), 0);\n\n $message = 'Message';\n $file = 'src';\n $lineNumber = 1;\n\n Logger::getInstance()->addError($message, $file, $lineNumber);\n $this->assertEquals(Logger::getInstance()->countErrors(), 1);\n\n Logger::getInstance()->addError($message, $file);\n $this->assertEquals(Logger::getInstance()->countErrors(), 2);\n\n Logger::getInstance()->addError($message);\n $this->assertEquals(Logger::getInstance()->countErrors(), 3);\n\n Logger::getInstance()->clearErrors();\n $this->assertEquals(Logger::getInstance()->countErrors(), 0);\n }", "title": "" }, { "docid": "0d9e10c28fa2de05f0a6e4854a906d3c", "score": "0.49618593", "text": "public function testParsing()\n {\n $exception = new HtmlParsingException('My Message');\n $exception->setInvalidTag('my_tag');\n $exception->setHtmlLine(42);\n\n $formatter = new ExceptionFormatter($exception);\n\n $messages = [\n $formatter->getMessage(),\n $formatter->getHtmlMessage()\n ];\n\n foreach ($messages as $message) {\n $this->assertContains('Html2Pdf Error ['.HtmlParsingException::ERROR_CODE.']', $message);\n $this->assertContains('My Message', $message);\n $this->assertContains('my_tag', $message);\n $this->assertContains('42', $message);\n }\n }", "title": "" }, { "docid": "c8d304b0a69385634dc8925bb870632f", "score": "0.49240166", "text": "public function testFindMultiErrorHandling()\n\t{\n\t\t$result = R::findMulti('a,b', array());\n\t\tasrt( is_array( $result ), TRUE );\n\t\tasrt( count( $result ), 2 );\n\t\tasrt( isset( $result['a'] ), TRUE );\n\t\tasrt( isset( $result['b'] ), TRUE );\n\t\tasrt( is_array( $result['a'] ), TRUE );\n\t\tasrt( is_array( $result['b'] ), TRUE );\n\t\tasrt( count( $result['a'] ), 0 );\n\t\tasrt( count( $result['b'] ), 0 );\n\t\tpass();\n\t\t$result = R::findMulti( 'book', array(\n\t\t\t\tarray( 'book__title' => 'The missing ID.' )\n\t\t) );\n\t\tasrt( is_array( $result ), TRUE );\n\t\tasrt( count( $result ), 1 );\n\t\tasrt( isset( $result['book'] ), TRUE );\n\t\tasrt( is_array( $result['book'] ), TRUE );\n\t\tasrt( count( $result['book'] ), 0 );\n\t\tpass();\n\t}", "title": "" }, { "docid": "f0ff5e322c80713597ef2896fd397327", "score": "0.4914759", "text": "function a_thread_requires_a_title()\n {\n $this->expectException('Illuminate\\Validation\\ValidationException');\n $this->publishThread(['title' => null])\n ->assertSessionHasErrors('title'); \n }", "title": "" }, { "docid": "1383f42b807f95aca4dc4f66e42de165", "score": "0.4913204", "text": "public function has_errors() {/*{{{*/\n foreach ($this->elementrefs as $element) {\n if (isset($element['error'])) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "7b3c21d0eb116e2b294961837f9489a8", "score": "0.49112022", "text": "public function testGetAllValidRestaurantViolations() : void {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"restaurantViolation\");\n\t\t// create a new RestaurantViolation and insert to into mySQL\n\t\t$RestaurantViolation = new RestaurantViolation(null, $this->restaurant->getRestaurantId(), $this->violation->getViolationId(), $this->VALID_RESTAURANTVIOLATIONCOMPLIANCE, $this->VALID_RESTAURANTVIOLATIONDATE, $this->VALID_RESTAURANTVIOLATIONMEMO, $this->VALID_RESTAURANTVIOLATIONRESULTS);\n\t\t$RestaurantViolation->insert($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = RestaurantViolation::getAllRestaurantViolations($this->getPDO());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"restaurantViolation\"));\n\t\t$this->assertCount(1, $results);\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\Foodquisition\\\\RestaurantViolation\", $results);\n\t\t// grab the result from the array and validate it\n\t\t$pdoRestaurantViolation = $results[0];\n\t\t$this->assertEquals($pdoRestaurantViolation->getRestaurantViolationRestaurantId(), $this->restaurant->getRestaurantId());\n\t\t$this->assertEquals($pdoRestaurantViolation->getRestaurantViolationViolationId(), $this->violation->getViolationId());\n\t\t$this->assertEquals($pdoRestaurantViolation->getRestaurantViolationCompliance(), $this->VALID_RESTAURANTVIOLATIONCOMPLIANCE);\n\t\t$this->assertEquals($pdoRestaurantViolation->getRestaurantViolationMemo(), $this->VALID_RESTAURANTVIOLATIONMEMO);\n\t\t$this->assertEquals($pdoRestaurantViolation->getRestaurantViolationResults(), $this->VALID_RESTAURANTVIOLATIONRESULTS);\n\t\t//format the date too seconds since the beginning of time to avoid round off error\n\t\t$this->assertEquals($pdoRestaurantViolation->getRestaurantViolationDate(), $RestaurantViolation->getRestaurantViolationDate());\n\t}", "title": "" }, { "docid": "eaa01c290887ba0ccbe6343fd966c03c", "score": "0.4901991", "text": "protected function errorTable(string $locale, string $file, Collection $errors): void\n {\n $table = new Table($this->output);\n\n $table->setHeaders([\n [new TableCell($locale.'/'.$file, ['colspan' => 2])],\n ]);\n\n $rows = [\n ['Key', 'Message'],\n new TableSeparator(),\n ];\n\n foreach ($errors as $error) {\n $rows[] = [\n 'key' => $error->key(),\n 'message' => $error->message(),\n ];\n }\n\n $table->setRows($rows);\n $table->render();\n }", "title": "" }, { "docid": "edb456fcf8064c6a5855a3c3deb9a556", "score": "0.4891981", "text": "public function testShouldGetError()\n {\n $response = $this->get('/api/words');\n\n $response\n ->assertStatus(400)\n ->assertJson(['error' => 'Not valid URL']);\n }", "title": "" }, { "docid": "99484928b904e9c9308ce4eb0752257d", "score": "0.48826692", "text": "private static function check_validation_exceptions(array $validation_exceptions): void\n {\n if (!count($validation_exceptions)) {\n throw new InvalidArgumentException(sprintf(t::_('No ValidationFailedExceptions provided.')));\n }\n if (array_keys($validation_exceptions) !== range(0, count($validation_exceptions) - 1)) {\n throw new InvalidArgumentException(sprintf(t::_('The provided $validation_exceptions array it not an indexed array.')));\n }\n\n foreach ($validation_exceptions as $ValidationException) {\n if (! ($ValidationException instanceof ValidationFailedException)) {\n throw new InvalidArgumentException(sprintf(t::_('An element of the provided $validation_exceptions is not an instance of %s.'), ValidationFailedException::class));\n }\n }\n }", "title": "" }, { "docid": "c4235ed5d86e1ee89276ca88d61c18d7", "score": "0.4878911", "text": "public function testMultipleValidationErrorsReturned()\n {\n $document1 = $this->objFromFixture('DMSDocument', 'limited_supply');\n $document2 = $this->objFromFixture('DMSDocument', 'very_limited_supply');\n\n $this->cart\n ->addItem(DMSRequestItem::create($document1))\n ->addItem(DMSRequestItem::create($document2));\n\n $input = array('ItemQuantity' => array(\n $document1->ID => 15000,\n $document2->ID => 12000\n ));\n\n $form = Form::create($this->controller, '', new FieldList, new FieldList);\n $result = $this->controller->updateCartItems($input, $form, new SS_HTTPRequest('POST', '/'));\n\n $this->assertContains('Maximum of 3 documents exceeded for \"Doc3\"', $form->Message());\n $this->assertContains('Maximum of 2 documents exceeded for \"Doc5\"', $form->Message());\n }", "title": "" }, { "docid": "9a198a660f20d8410d65160bece0b483", "score": "0.48770666", "text": "public static function hasAnyErrors();", "title": "" }, { "docid": "6fcb0fa1278b82e66ada569eb15b4180", "score": "0.4874187", "text": "protected function assertInvalidEntries(string $field_name, array $invalid_entries): void {\n foreach ($invalid_entries as $invalid_value => $error_message) {\n $edit = [\n \"{$field_name}[0][uri]\" => $invalid_value,\n ];\n $this->drupalGet('entity_test/add');\n $this->submitForm($edit, 'Save');\n $this->assertSession()->responseContains(strtr($error_message, ['@link_path' => $invalid_value]));\n }\n }", "title": "" }, { "docid": "580a1eeb9109d9565c7b4ff75d2554dc", "score": "0.48698816", "text": "public function check_for_errors();", "title": "" }, { "docid": "f83957bee54882e7bb8593173b9f86c3", "score": "0.486314", "text": "public function hasErrors() {\n\t\treturn count($this->getErrorStrings()) > 0 || count($this->customErrors) > 0;\n\t}", "title": "" }, { "docid": "e357063a2844e18a352be9cbd85af529", "score": "0.48624864", "text": "private function printOutValidationErrors()\n {\n echo $this->ansiFormat(\"\\n\\nthe following errors occurred:\\n\", Console::BOLD, Console::FG_RED);\n \n $inputs = [];\n \n foreach ($this->_admin->errors as $attributeName => $attribute) {\n $inputs[] = $attributeName;\n foreach ($attribute as $message) {\n $this->stdout(\"\\n\\t - \" . $message, Console::FG_RED);\n }\n }\n \n $this->stdout(\"\\n\\n\");\n \n $this->requestInputs($inputs);\n }", "title": "" }, { "docid": "465190241c7ed50bd546b5c4208cd6c3", "score": "0.48538053", "text": "public function testFailMixedSectionsAllEmpty(AcceptanceTester $I)\n {\n $this->loginAs($I, 'email1@gmail.com', 'password1'); //confirmed user\n\n $this->fillOutValidIntroSections($I);\n $I->click(['id' => 'add-text-section']); //id 1\n $I->click(['id' => 'add-image-section']); //id 2\n $I->click(['id' => 'add-youtube-section']); //id 3\n $I->click(['id' => 'add-list-number-section']); //id 4\n $I->click(['id' => 'add-source-section']); //id 5\n\n $I->click(['id' => 'add-text-section']); // id 6\n $I->click(['id' => 'add-image-section']); //id 7\n $I->click(['id' => 'add-youtube-section']); //id 8\n $I->click(['id' => 'add-list-number-section']); //id 9\n $I->click(['id' => 'add-source-section']); //id 10\n $I->wait(1);\n\n $I->click(['id' => 'submit-form']);\n\n $I->seeInPageSource('Section #1: Text content is required');\n $I->seeInPageSource('Section #2: Image is required');\n $I->seeInPageSource('Section #3: YouTube URL is required');\n //no error on #4\n $I->seeInPageSource('Source Section #1: Source is required');\n\n $I->seeInPageSource('Section #5: Text content is required');\n $I->seeInPageSource('Section #6: Image is required');\n $I->seeInPageSource('Section #7: YouTube URL is required');\n //no error on #8\n $I->seeInPageSource('Source Section #2: Source is required');\n }", "title": "" }, { "docid": "8591f7424b8f5a33289b2f31f0c62928", "score": "0.4836719", "text": "public function hasError()\n {\n return $this->_has(2);\n }", "title": "" }, { "docid": "8591f7424b8f5a33289b2f31f0c62928", "score": "0.4836719", "text": "public function hasError()\n {\n return $this->_has(2);\n }", "title": "" }, { "docid": "8591f7424b8f5a33289b2f31f0c62928", "score": "0.4836719", "text": "public function hasError()\n {\n return $this->_has(2);\n }", "title": "" }, { "docid": "8591f7424b8f5a33289b2f31f0c62928", "score": "0.4836719", "text": "public function hasError()\n {\n return $this->_has(2);\n }", "title": "" }, { "docid": "5af700b6551f350f88dbb0ba3751dcdc", "score": "0.48301816", "text": "public function testValidateWithFail()\n {\n /** @var Illuminate\\Validation\\Validator $validator */\n $validator = $this->requestManager->validate([]);\n\n /** @var MessageBag $errors */\n $errors = $validator->errors();\n\n $this->assertTrue($validator->fails());\n $this->assertFalse($validator->passes());\n\n $this->assertInstanceOf(MessageBag::class, $errors);\n $this->assertTrue($errors->has(['street', 'number', 'neighborhood', 'city', 'state', 'zipcode']));\n }", "title": "" }, { "docid": "7cd6deb832a38aaa6718f7ec057880b4", "score": "0.4825307", "text": "protected function checkForErrors(){\n // TODO: Implement checkForErrors() method.\n }", "title": "" }, { "docid": "7cd6deb832a38aaa6718f7ec057880b4", "score": "0.4825307", "text": "protected function checkForErrors(){\n // TODO: Implement checkForErrors() method.\n }", "title": "" }, { "docid": "7cd6deb832a38aaa6718f7ec057880b4", "score": "0.4825307", "text": "protected function checkForErrors(){\n // TODO: Implement checkForErrors() method.\n }", "title": "" }, { "docid": "959516d3b9849b73e1ca9cb9af397656", "score": "0.48176458", "text": "public function hasFailures(): bool\n {\n $hasFailure = false;\n foreach ($this->all() as $result) {\n if ($result->failed()) {\n $hasFailure = true;\n break;\n }\n }\n\n return $hasFailure;\n }", "title": "" }, { "docid": "f6a57b3909eee7b795d2312e91113741", "score": "0.48110676", "text": "function displayErrors($errors){\n if (count($errors) != 0) {\n echo(' <h5>Erreur(s) lors de la dernière soumission du formulaire : </h5>');\n foreach ($errors as $error) {\n echo('<div class=\"error m-2 badge badge-info\">' . $error . '</div>');\n }\n }\n}", "title": "" }, { "docid": "a185b7376e77d5078f74b5f5abb251b4", "score": "0.4806742", "text": "function hasErrorReports(): bool {\n\tglobal $REPORTS;\n\tif( empty($REPORTS) ) {\n\t\treturn false;\n\t}\n\tforeach( $REPORTS as $types ) {\n\t\tif( !empty($types['error']) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\t\n\treturn false;\n}", "title": "" }, { "docid": "5212c459d47033d9b321921f8f375682", "score": "0.48051983", "text": "public function errorAction() {\n\t\t$validationResults = $this->arguments->getValidationResults()->getFlattenedErrors();\n\t\t$result = array();\n\t\t/** @var \\Neos\\Error\\Messages\\Error $validationResult */\n\t\tforeach ($validationResults as $key => $validationResult) {\n\t\t\t/** @var \\Neos\\Flow\\Validation\\Error $error */\n\t\t\tforeach ($validationResult as $error) {\n\t\t\t\t// Check Current Package Validation Errors\n\t\t\t\t$translatedMessage = $this->translator->translateById($error->getCode(), $error->getArguments(), NULL, NULL, 'ValidationErrors', $this->request->getControllerPackageKey());\n\n\t\t\t\t// Check Flow Validation Errors\n\t\t\t\tif ($translatedMessage === $error->getCode()) {\n\t\t\t\t\t$translatedMessage = $this->translator->translateById($error->getCode(), $error->getArguments(), NULL, NULL, 'ValidationErrors', 'Neos.Flow');\n\t\t\t\t}\n\n\t\t\t\t// Use default error message\n\t\t\t\tif ($translatedMessage === $error->getCode()) {\n\t\t\t\t\t$translatedMessage = $error->render();\n\t\t\t\t}\n\n\t\t\t\t$result['errors'][$key][] = array(\n\t\t\t\t\t'code' => $error->getCode(),\n\t\t\t\t\t'message' => $translatedMessage\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t$result['success'] = FALSE;\n\t\t$this->view->assign('value', $result);\n\t\t$this->response->setStatus(400);\n\t}", "title": "" }, { "docid": "b73970e843a9744d41e96552caccee6e", "score": "0.47925305", "text": "private function displayErrors($errors)\n {\n foreach ($errors->all() as $error) {\n $this->error($error);\n }\n }", "title": "" }, { "docid": "391b9e4ce1b29e762571b384f70e6c6e", "score": "0.47922593", "text": "public function should_fail_when_snapshots_differ(): void\n {\n $htmlSnapshot = new HtmlSnapshot('<p>foo</p>');\n $htmlSnapshot->snapshotPutContents('<h2>bar</h2>');\n $snapshot = $htmlSnapshot->snapshotFileName();\n codecept_debug('Snapshot file: ' . $snapshot);\n $this->unlinkAfter[] = $snapshot;\n\n $this->expectException(AssertionFailedError::class);\n\n $htmlSnapshot->assert();\n }", "title": "" }, { "docid": "38900034a13e94876c375b5f52a2dfce", "score": "0.47907618", "text": "protected function assertFieldHasValidationError($field)\n {\n $this->response->assertStatus(422);\n $responseArray = collect($this->response->decodeResponseJson());\n $this->assertArrayHasKey('errors', $responseArray);\n\n foreach ($responseArray['errors'] as $error) {\n $this->assertEquals('422', $error['status']);\n $hasField = false;\n if (array_key_exists('source', $error) && array_key_exists('pointer', $error['source'])) {\n $pointerParts = explode('/', $error['source']['pointer']);\n $errorField = end($pointerParts);\n if ($field === $errorField) {\n $hasField = true;\n break;\n }\n }\n }\n if (!$hasField) {\n $this->fail('There is no errors array');\n }\n }", "title": "" }, { "docid": "43ccefb98cb04efb136c2c6fa9950ff5", "score": "0.4785818", "text": "public function thePageShouldBeSuccessfullyLoaded()\n {\n $this->assertResponseStatus(200);\n $this->iShouldNotSeeAnExceptionBox();\n $this->assertElementOnPage('#footer');\n $this->assertElementNotOnPage('table.xdebug-error');\n }", "title": "" }, { "docid": "1b0888b4154ec8828e4b9dbf4e910ba0", "score": "0.47819066", "text": "public static function assertKeyExists(array $value, ...$keys)\n {\n $errors = [];\n foreach ($keys as $key) {\n if (!isset($value[$key])) {\n $errors[$key] = true;\n continue;\n }\n }\n if (!empty($errors)) {\n throw AssertionException::keyExists($errors);\n }\n }", "title": "" }, { "docid": "ff121dd76560d1b15d53df5ba76fc195", "score": "0.47772485", "text": "public function testFailAndTakeScreenshot()\n {\n $this->url(\"/signup.html\");\n\n $this->fail(\"Failed on purpose. Check out folder reports/failures.\");\n }", "title": "" }, { "docid": "3df62891009d06e41fd1da174c1473ff", "score": "0.47728875", "text": "protected function checkErrors()\n\t{\n\t\t$errors = imap_errors();\n\t\tif ($errors)\n\t\t{\n\t\t\t$ev = new EIMapEvent();\n\t\t\tforeach ($errors as $e)\n\t\t\t{\n\t\t\t\t$ev->errorMessage .= $e . PHP_EOL;\n\t\t\t}\n\t\t\t$this->onIMapError($ev);\n\t\t}\n\t}", "title": "" }, { "docid": "f18d89dd34de1bf9d8342ba82cb6ba75", "score": "0.4771783", "text": "public function has_errors() {}", "title": "" }, { "docid": "16e6db0bea4c7a7c9ff1ce27bee71f1e", "score": "0.47682953", "text": "private function assert_failure() {\n global $DB;\n $record = $DB->get_record(this_db\\ratingallocate::TABLE, array());\n $ratingallocate = \\mod_ratingallocate_generator::get_ratingallocate_for_user($this, $record, $this->teacher);\n $this->assertEquals(\\mod_ratingallocate\\algorithm_status::FAILURE, $ratingallocate->get_algorithm_status());\n $this->assertEquals(0, $DB->count_records(this_db\\ratingallocate_allocations::TABLE,\n array(this_db\\ratingallocate_allocations::RATINGALLOCATEID => $this->mod->id)));\n }", "title": "" }, { "docid": "83dd1bc6bcc9e0056e283359d90c1d83", "score": "0.47561222", "text": "public function testGetRelatedToStudentFailure()\n {\n\n // Non existing Occupational Safety and Health course attendances\n $this->json('GET', '/students/2/osh_course_attendances')\n ->seeJsonEquals([\n 'status_code' => 404,\n 'status' => 'Not Found',\n 'message' => 'Resource(s) not found',\n ])\n ->seeStatusCode(404);\n\n // Non existing student\n $this->json('GET', '/students/999/osh_course_attendances')\n ->seeJsonEquals([\n 'status_code' => 404,\n 'status' => 'Not Found',\n 'message' => 'Resource(s) not found',\n ])\n ->seeStatusCode(404);\n\n // Invalid student ID\n $this->json('GET', '/students/abc/osh_course_attendances')\n ->seeJsonEquals([\n 'status_code' => 400,\n 'status' => 'Bad Request',\n 'message' => 'Request is not valid',\n 'data' => [\n 'id' => [\n 'code error_type',\n 'value abc',\n 'expected integer',\n 'used string',\n 'in path',\n ],\n ]\n ])\n ->seeStatusCode(400);\n\n }", "title": "" }, { "docid": "f26d4c6c574f94b58de25bac3ba38bbd", "score": "0.47442937", "text": "function _page_has_errors($zippy_page, &$p_error)\n\t{\n\t\t//check for error while curling the page\n\t\tif (($p_error !== '') || ($zippy_page === false))\n\t\t\t$p_error = \"Error fetching: $p_error\";\n\t\t\t\n\t\t//check for empty page\n\t\telseif (trim($zippy_page) == '')\n\t\t\t$p_error = 'Error: Page empty.';\n\t\t\t\n\t\t//check for title\n\t\telseif (!(preg_match('/<title>([^\\n\\<]*)<\\/title>/i', $zippy_page, $title)))\n\t\t\t$p_error = 'Error: No title. Wrong page? Stop.';\n\t\t\t\n\t\t//check if the title contains 'zippyshare.com -'\n\t\telseif (stripos($title[1],'Zippyshare.com - ') === false)\n\t\t\t$p_error = \"Error: Wrong page - title '$title' doesn't contain 'Zippyshare.com - '.\";\n\t\t\t\n\t\t\n\t\telseif (stripos($zippy_page,'File does not exist on this server') !== false)\n\t\t\t$p_error = 'Error: File removed/deleted from zippy share or wrong zippyshare link.';\n\t\t\n\t\tif ($p_error !== '')\n\t\t\t\treturn true;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "28b7562726ca8dbcfc488a8b3ca42f4c", "score": "0.4742553", "text": "public function hasErrors(): bool {}", "title": "" }, { "docid": "2ed61ae1ea9412d2928b01b0ad550353", "score": "0.47421265", "text": "public static function errorPage($title,$errmsg) {\n\t\tinclude 'errors/error.php';\n\t\texit();\n\t}", "title": "" }, { "docid": "f77b7e59f72c2876d60d0e5b76325f5c", "score": "0.47289592", "text": "public static function hasErrors(): bool {\n return self::has('errors');\n }", "title": "" }, { "docid": "7e1b37db99782ec53e043994853c819b", "score": "0.47173688", "text": "public function getMessage()\n {\n $e = new XPathNotFoundException('/name');\n\n $this->assertEquals('XPath not found: /name', $e->getMessage());\n }", "title": "" }, { "docid": "15bd55372aa955cada2cc8952e564661", "score": "0.47162503", "text": "function showErrors() {\n if (!empty($this->error)) {\n $error = $this->error;\n $regions = $this->regions;\n $this->error = '';\n $this->regions = array();\n throw new strata_exception($error, $regions);\n }\n }", "title": "" }, { "docid": "9aebd0f176db2a5998fe95b7ab24d159", "score": "0.47111446", "text": "private function checkImportedPages( array $expectedWikiPages ): void {\n\t\t$importedPages = [];\n\n\t\tforeach ( $expectedWikiPages as $title => $contentHash ) {\n\t\t\t// If there is just name title - it's \"Main\" namespace\n\t\t\t$ns = 0;\n\t\t\t$pageTitle = $title;\n\n\t\t\t// Otherwise we need to get namespace index\n\t\t\tif ( strpos( $title, ':' ) !== false ) {\n\t\t\t\tlist( $nsName, $pageTitle ) = explode( ':', $title );\n\n\t\t\t\t$ns = \\BsNamespaceHelper::getNamespaceIndex( $nsName );\n\t\t\t}\n\n\t\t\t$pageId = $this->db->selectField(\n\t\t\t\t'page',\n\t\t\t\t'page_id',\n\t\t\t\t[\n\t\t\t\t\t'page_title' => $pageTitle,\n\t\t\t\t\t'page_namespace' => $ns\n\t\t\t\t]\n\t\t\t);\n\n\t\t\tif ( $pageId ) {\n\t\t\t\t$titleObj = Title::newFromID( $pageId );\n\t\t\t\t$importedPages[$title] = $this->getContentHash( $titleObj );\n\t\t\t}\n\t\t}\n\n\t\t$this->assertArrayEquals( $expectedWikiPages, $importedPages, false, true );\n\t}", "title": "" }, { "docid": "91d273cb22d5f1f84a88437c73303d45", "score": "0.47073814", "text": "public function testValidateTable()\n {\n require_once dirname(dirname(__FILE__)).'/DALBaker.inc';\n $fileName = dirname(__FILE__).'/Files/ValidateSchemaUnitTest.xml';\n $schema = new DOMDocument();\n $schema->load($fileName);\n $schema = $schema->getElementsByTagName('schema')->item(0);\n $tables = $schema->getElementsByTagName('table');\n $msg = 'validateTable() should have thrown an exception for table ';\n $tc = 1;\n\n foreach ($tables as $table) {\n $caught = FALSE;\n try {\n DALSchemaParser::validateTable($table);\n } catch (DALParserException $e) {\n $caught = TRUE;\n }\n\n PHPUnit_Framework_Assert::assertTrue($caught, $msg.$tc.'.');\n $tc++;\n }\n\n }", "title": "" }, { "docid": "890ffc9c2dac4817c7b2851dd237f4cb", "score": "0.47032675", "text": "protected static function assertValidationError(callable $execution, string... $fieldNames)\n {\n try\n {\n $execution();\n }\n catch (\\Exception $e)\n {\n if (!($e instanceof InvalidFormException))\n {\n self::fail(\"Expected an '\" . InvalidFormException::class . \"', but instead got '\" . get_class($e) . \"'\");\n }\n\n /** @var ValidationError[] $errors */\n $errors = $e->getErrors();\n\n self::assertNotEmpty($errors, \"Expected to find validation errors\");\n\n /** @var string[] $errorFields */\n $errorFields = array_map(function (ValidationError $error) {\n return $error->getPropertyName();\n }, $errors);\n\n foreach ($fieldNames as $fieldName)\n {\n self::assertContains($fieldName, $errorFields, \"Expected to find a validation error on '$fieldName'\");\n }\n }\n }", "title": "" }, { "docid": "9a8a77ba5b7015df33bcddc233e05664", "score": "0.4695786", "text": "protected function verify_regions($regions) {\n foreach ($regions as $region) {\n $this->helper_context->minkContext->assertElementOnPage($region);\n }\n }", "title": "" }, { "docid": "154f69e3a0c6df22b4a18ce0e4081007", "score": "0.46833298", "text": "function hasErrors($errorArray) {\n\t\treturn count($errorArray) > 0;\n\t}", "title": "" }, { "docid": "66355d54852391ec409efbd63b7804c8", "score": "0.4681239", "text": "public function hasError()\n {\n return $this->_has(1);\n }", "title": "" }, { "docid": "d232d8a5976a55eec00b6ce32075dcaf", "score": "0.4676478", "text": "public function testGetAccessErrors(){\n\t\t$user = factory(User::class)->create();\n\t\t$token = JWTAuth::fromUser($user);\n\n\t\t$payload = [\n\t\t\t'first_name' => 'John',\n\t\t\t'last_name' => 'Wayne',\n\t\t\t'mobile' => '650-111-1234',\n\t\t\t'user_id' => $user->id+100 // resource owned by a different user\n\t\t];\n\n\t\t$contact = factory(Contact::class)->create($payload);\n\n\t\t$this->json('get', '/api/contacts/get/' . $contact->id . '?token=' . $token)\n\t\t\t->assertStatus(403)\n\t\t\t->assertJson([\n\t\t\t\t'message' => 'Access denied',\n\t\t\t]);;\n\t}", "title": "" }, { "docid": "d78e362855145d64ffbc6193d4ed9fa3", "score": "0.46754226", "text": "public function testValidateResponse()\n {\n foreach ($this->fixtures as $test) {\n $client = new SignatureClient(\n $this->API_BASE_URL,\n $test['signature_key'],\n $test['signature_version'],\n $test['timestamp']\n );\n $expectedSignature = hash_hmac(\n Signer::HASH_ALGORITHM,\n $test['response']['base_string'],\n $test['signature_key']\n );\n $response = new Response(\n 200,\n [ SignatureClient::SIGNATURE_HEADER => $expectedSignature ],\n $test['response']['body']\n );\n $isValid = $client->validateResponse($response);\n $this->assertTrue($isValid, \"Error in test {$test['testname']}:\");\n }\n }", "title": "" }, { "docid": "fa66bd5eeba00fad69ac26a230a833ff", "score": "0.4671909", "text": "public function test_show_error_invalid_id()\n {\n $this->actingAs($this->admin1)\n ->get('api/pages/108')\n ->assertStatus(404);\n }", "title": "" }, { "docid": "3dea93e4b044c7368495b5a954323688", "score": "0.46716928", "text": "public function testGetInvalidRestaurantViolationByRestaurantViolationMemo() : void {\n\t\t// grab a RestaurantViolation by memo that does not exist\n\t\t$RestaurantViolation = RestaurantViolation::getRestaurantViolationByRestaurantViolationMemo($this->getPDO(), \"no RestaurantViolationMemo here\");\n\t\t$this->assertCount(0, $RestaurantViolation);\n\t}", "title": "" }, { "docid": "25c541f311815b5fdcf249df663065c1", "score": "0.4670445", "text": "public function printErrors(){\r\n\t if (!empty($_GET[$this->_config->getMetaBoxErrorsParamName()])) { ?>\r\n\t\t <div class=\"notice notice-error\">\r\n\t\t <p>\r\n\t\t <?php\r\n\t\t /*switch($_GET[$this->_config->getMetaBoxErrorsParamName()]) {\r\n\t\t case self::ER_BAD_INPUT:\r\n\t\t echo esc_html($this->_errors[self::ER_BAD_INPUT]);\r\n\t\t break;\r\n\r\n\t\t default:\r\n\t\t echo esc_html($this->_errors[self::ER_UNKNOWN]);\r\n\t\t break;\r\n\t\t }*/\r\n\t\t echo esc_html($this->_getErrorMessage($_GET[$this->_config->getMetaBoxErrorsParamName()]));\r\n\t\t ?>\r\n\t\t </p>\r\n\t\t </div><?php\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "63c9b45b9296d79f1c037fef0f6e138c", "score": "0.46697268", "text": "public function hasErrors($results)\n\t{\n\t\ttry{\n\t\t\t$lyrdb = new \\SimpleXMLElement($results);\n\t\t}\n\t\tcatch (\\Exception $e){\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ($lyrdb->error->number == null) ? false : true;\n\t}", "title": "" }, { "docid": "4ce3d57044468caac38d8896d6bd0717", "score": "0.46677405", "text": "protected function assertResults(array $result) {\n $success = FALSE;\n foreach ($result as $node_type => $values) {\n foreach ($values as $nid => $label) {\n if (!$success = $this->nodes[$node_type][$nid] == trim(strip_tags($label))) {\n // There was some error, so break.\n break;\n }\n }\n }\n $this->assertTrue($success, 'Views selection handler returned expected values.');\n }", "title": "" }, { "docid": "127a6c8a6e2523d28bfceff8865226a9", "score": "0.46672103", "text": "public function testVerificationFailureBulkSigninOut()\n {\n $this->addRole(Role::ADMIN);\n $this->createBulkPeople();\n $person1 = $this->person1;\n $person2 = $this->person2;\n\n\n // Test for\n // - not held position\n // - end time before start time\n // - unknown position\n // - unknown callsign\n\n $response = $this->json('POST', 'timesheet/bulk-sign-in-out', [\n 'lines' => \"{$person1->callsign},hq window\\n{$person1->callsign},dirt,08/14,0400,08/13,0600\\n{$person2->callsign},rts at berlin\\nhubcap,dirt\\n\"\n ]);\n\n $response->assertStatus(200);\n $response->assertJson(['status' => 'error', 'commit' => false]);\n $this->assertCount(4, $response->json()['entries']);\n\n $response->assertJson([\n 'entries' => [\n [\n 'callsign' => $person1->callsign,\n 'errors' => [\"does not hold the position 'HQ Window'\"],\n 'action' => 'in',\n ],\n [\n 'callsign' => $person1->callsign,\n 'person_id' => $person1->id,\n 'action' => 'inout',\n 'position_id' => Position::DIRT,\n 'errors' => ['sign in time starts on or after sign out']\n ],\n [\n 'callsign' => $person2->callsign,\n 'person_id' => $person2->id,\n 'action' => 'in',\n 'errors' => [\"position 'rts at berlin' not found\"]\n ],\n [\n 'callsign' => 'hubcap',\n 'person_id' => null,\n 'action' => 'in',\n 'errors' => [\"callsign 'hubcap' not found\"]\n ]\n ]\n ]);\n }", "title": "" }, { "docid": "ff94db0a3b4ed5b684b0fc862ba7768c", "score": "0.46658567", "text": "public function validate_error()\n {\n foreach ($this->error as $error) \n {\n $errors .= '<p class=\"error\">'.$error.\"</p>\";\n }\n return $errors;\n }", "title": "" } ]
ef3338db9ea4251054d666970d028614
Filter the query on the holder column Example usage: $query>filterByHolder('fooValue'); // WHERE holder = 'fooValue' $query>filterByHolder('%fooValue%', Criteria::LIKE); // WHERE holder LIKE '%fooValue%'
[ { "docid": "947b592e0a138c592d569116205dc66e", "score": "0.65913045", "text": "public function filterByHolder($holder = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($holder)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(CreditCardTableMap::COL_HOLDER, $holder, $comparison);\n }", "title": "" } ]
[ { "docid": "689c865f14fccaa887c9714c65d2b294", "score": "0.50300276", "text": "public function filter($column, $value=NULL, $operator=\"=\") {\n \t if(is_string($column)) {\n \t //with a value passed in this confirms its a new method of filter \n \t if($value !== NULL) {\n \t //operator sniffing\n if(is_array($value))\n if(strpos($column, \"?\") === false) $operator = \"in\"; //no ? params so this is an old in check\n else $operator = \"raw\"; //otherwise its a raw operation, so substitue values\n \n $filter = array(\"name\"=>$column,\"operator\"=>$operator, \"value\"=>$value);\n if($operator == \"=\") $this->filters[$column] = $filter; //if its equal then overwrite the filter passed on col name\n else $this->filters[] = $filter;\n \t \n \t } else $this->filters[] = $column; //assume a raw query, with no parameters\n }else{ //if the column isn't a string, then we assume it's an array with multiple filter's passed in.\n foreach((array)$column as $old_column => $old_value) {\n $this->filter($old_column, $old_value);\n }\n }\n return $this;\n \t}", "title": "" }, { "docid": "8d23c6dd5d19e783df0ac97d76e0bc85", "score": "0.48673195", "text": "public function searchItems(sfParameterHolder $paramHolder = null) {\n\n }", "title": "" }, { "docid": "96a3b691eb2f5a1481fab21f5bfcf1fc", "score": "0.47653705", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'jenissupplier': \n\t\t\t\t return \"s.idjenissupplier = '$key'\";\n\t\t\t break;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b63a2a75f3c09a0720613d4616c43ac9", "score": "0.4751664", "text": "public function filter(DataDefinitionInterface $definition, $value, array $arguments, BubbleableMetadata $bubbleable_metadata = NULL);", "title": "" }, { "docid": "8b87e91ad672097f65b72a0e2c5f4567", "score": "0.4707335", "text": "public function filter($key, $op = '=', $val = null) {\n\n $num_args = func_num_args() ;\n \n # use arbitary style\n if ($num_args == 1) {\n $op = null;\n }\n \n # use '='\n if ($num_args == 2) {\n $val = $op;\n $op = '=';\n }\n \n # else use custom operator e.g. <, >\n $this->wheres[] = array('col' => $key, 'op' => $op, 'val' => $val);\n \n return $this;\n }", "title": "" }, { "docid": "fcbcf6944d00e41ec7340ec1d4989371", "score": "0.4664624", "text": "public function where_like($argument = null, $value = null);", "title": "" }, { "docid": "48f573d309026a857927bdefdc943eab", "score": "0.4625723", "text": "public static function criterionToContains(Criterion $criterion, $placeHolder, $fieldMap = array())\n {\n $op = false;\n $collate = false;\n $clause = new Clause;\n\n switch($criterion->op())\n {\n case 'inc': // includes\n $op = 'LIKE';\n $collate = 'utf8_bin';\n break;\n case 'ninc': // does not include\n $op = 'NOT LIKE';\n $collate = 'utf8_bin';\n break;\n case 'inci': // includes (case insensitive)\n $op = 'LIKE';\n $collate = 'utf8_general_ci';\n break;\n case 'ninci': // does not include (case insensitive)\n $op = 'NOT LIKE';\n $collate = 'utf8_general_ci';\n break;\n }\n\n if ($op && $collate) {\n if ($criterion->type() == Criterion::CRITERION_TYPE_VALUE) {\n $comparand = ':' . $placeHolder;\n // Add the static value as a parameter\n $clause->setParameter($placeHolder, $criterion->value());\n } elseif ($criterion->type() == Criterion::CRITERION_TYPE_FIELD) {\n $comparand = self::getSafeFieldName($criterion->value(), $fieldMap);\n }\n\n // Escape, quote and qualify the field name for security.\n $field = self::getSafeFieldName($criterion->key(), $fieldMap);\n\n // Build the final clause.\n // Use wild-card characters for \"contains\".\n $clause->setStatement($field . ' ' . $op . ' '\n . 'CONCAT(\"%\", ' . $comparand . ', \"%\")'\n . ' COLLATE ' . $collate);\n }\n }", "title": "" }, { "docid": "4f587a761ee400c8d5a723f0c4dcd86c", "score": "0.46150944", "text": "function getListFilter($col,$key) {\n\t\t\tif($col == 'unit') {\n\t\t\t\tglobal $conn, $conf;\n\t\t\t\trequire_once($conf['gate_dir'].'model/m_unit.php');\n\t\t\t\t\n\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\n\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t}\n\t\t\tif($col == 'semester')\n\t\t\t\treturn \"substring(r.periodeakreditasi,5,2) = '$key'\";\n\t\t\tif($col == 'tahun')\n\t\t\t\treturn \"substring(r.periodeakreditasi,1,4) = '$key'\";\n\t\t}", "title": "" }, { "docid": "9bc65fe8eafe921df34972d9b6d61ac9", "score": "0.46074286", "text": "public function filter(Builder $query, $value)\n {\n $query->where($this->fieldType->getColumnName(), 'LIKE', \"%{$value}%\");\n }", "title": "" }, { "docid": "2235ca57c90946571ca307c638ad32f5", "score": "0.45994782", "text": "public function filterByWhatYouSell($whatYouSell = null, $comparison = null)\n {\n if (null === $comparison)\n {\n if (is_array($whatYouSell))\n {\n $comparison = Criteria::IN;\n }\n elseif (preg_match('/[\\%\\*]/', $whatYouSell))\n {\n $whatYouSell = str_replace('*', '%', $whatYouSell);\n $comparison = Criteria::LIKE;\n }\n }\n return $this->addUsingAlias(CollectorPeer::WHAT_YOU_SELL, $whatYouSell, $comparison);\n }", "title": "" }, { "docid": "74642aa04ac4b17b613b9f6b20fbc1f0", "score": "0.45767137", "text": "function getListFilter($col,$key) {\n\t\t\tif($col == 'unit') {\n\t\t\t\tglobal $conn, $conf;\n\t\t\t\trequire_once($conf['gate_dir'].'model/m_unit.php');\n\t\t\t\t\n\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\n\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t}\n\t\t\tif($col == 'bulan')\n\t\t\t\treturn \"substring(((k.tgllembur::date)::character varying),6,2) = '$key'\";\n\t\t\tif($col == 'tahun')\n\t\t\t\treturn \"substring(((k.tgllembur::date)::character varying),1,4) = '$key'\";\n\t\t\tif($col == 'periode')\n\t\t\t\treturn \"substring(r.periode ,1,4) = '$key'\";\n\t\t\tif($col == 'tglpresensi')\n\t\t\t\treturn \"cast(tglpresensi as date) = '\".CStr::formatDate($key).\"'\";\t\t\t\n\t\t\tif($col == 'tipepeg')\n\t\t\t\treturn \"m.idtipepeg ='$key'\";\n\t\t\tif($col == 'blnpresensi')\n\t\t\t\treturn \"substring(r.periode ,5,2) = '$key'\";\n\t\t}", "title": "" }, { "docid": "9b03beeb76cf8c6b3878b1b213564d0c", "score": "0.45749658", "text": "public abstract function findHolderBy(array $criteria): ?HolderInterface;", "title": "" }, { "docid": "58e21de0d2b031a369d5fc364284e6d9", "score": "0.45510885", "text": "public function filterByAttributesValues()\n\t{\n\t\t/** @var CDbCriteria $criteria */\n\t\t$criteria = $this->owner->getDbCriteria();\n\n\t\t/** @var CDbColumnSchema $column */\n\t\tforeach($this->owner->safeAttributeNames as $attribute) {\n\t\t\t$column = $this->owner->tableSchema->getColumn($attribute);\n\t\t\tif($column !== null) {\n\t\t\t\t$searchName = $this->owner->tableAlias .'.' . $attribute;\n\t\t\t\t$searchValue = $this->owner->$attribute;\n\t\t\t\t$partialMatch = $column->type == 'string';\n\t\t\t\t$criteria->compare($searchName, $searchValue, $partialMatch);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->owner;\n\t}", "title": "" }, { "docid": "bb7a3d0b76a6eb1c7250c2810ff49815", "score": "0.45483714", "text": "function klippe_mikado_get_holder_params_search() {\n\t\t$params_list = array();\n\t\t\n\t\t$layout = klippe_mikado_options()->getOptionValue( 'search_page_layout' );\n\t\tif ( $layout == 'in-grid' ) {\n\t\t\t$params_list['holder'] = 'mkdf-container';\n\t\t\t$params_list['inner'] = 'mkdf-container-inner clearfix';\n\t\t} else {\n\t\t\t$params_list['holder'] = 'mkdf-full-width';\n\t\t\t$params_list['inner'] = 'mkdf-full-width-inner';\n\t\t}\n\t\t\n\t\t/**\n\t\t * Available parameters for holder params\n\t\t * -holder\n\t\t * -inner\n\t\t */\n\t\treturn apply_filters( 'klippe_mikado_search_holder_params', $params_list );\n\t}", "title": "" }, { "docid": "7d0a4b6b1fff1b84707aebd2aa303187", "score": "0.4545298", "text": "public function addFilterCriteria($criteria, array $placeholder_values = array()) {\n throw new \\Exception('This ResultSet does not support filter criteria.');\n }", "title": "" }, { "docid": "4d59f79e04d42b8587ef090050742660", "score": "0.4505684", "text": "function command_getFilter(){\n $filterParts = explode(\",\",$this->userVals[\"filter\"]);\n foreach($filterParts as &$f){\n $f = substr($f,1);\n }\n $this->sendMessage(\"Filter current set to exlude: \".implode(\", \",$filterParts));\n }", "title": "" }, { "docid": "04f5aed86d233545605f6cf5399396c1", "score": "0.44952855", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'jenislokasi': \n\t\t\t\t return \"l.idjenislokasi = '$key'\"; \n\t\t\t\tbreak;\n\t\t\t\tcase 'gedung': \n\t\t\t\t return \"l.idgedung = '$key'\"; \n\t\t\t\tbreak;\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once('m_unit.php');\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"(l.idunit is null or u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'].\")\";\n\t\t\t\tbreak;\n\t\t\t\tcase 'lantai': \n\t\t\t\t return \"l.lantai = '$key'\"; \n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "13192ca089e1cfd7c74bfd4ea5d2fc6e", "score": "0.44919038", "text": "public function getWhere($column, $value);", "title": "" }, { "docid": "afb430dd63821489456b36e9bb44af73", "score": "0.44733256", "text": "public function findBy($criteria = [], $columns = ['*']);", "title": "" }, { "docid": "dcd357b28cdc6ed2822bcfe0dad9feb3", "score": "0.44547537", "text": "public function findWhere($column, $value);", "title": "" }, { "docid": "df5775af439ca4f720718a8294890c86", "score": "0.44509602", "text": "public function applyFilter($query, $value);", "title": "" }, { "docid": "91dcc40154fb32726ed53fec77827101", "score": "0.4444498", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'kodeunit': return \"t.kodeunit = '$key'\";\t\t\t\t\n\t\t\t\tcase 'jalur': return \"jalurpenerimaan = '$key'\";\t\t\t\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c93d90f497cfce27d26a740b82a90885", "score": "0.44342777", "text": "public function filter($value);", "title": "" }, { "docid": "c93d90f497cfce27d26a740b82a90885", "score": "0.44342777", "text": "public function filter($value);", "title": "" }, { "docid": "c93d90f497cfce27d26a740b82a90885", "score": "0.44342777", "text": "public function filter($value);", "title": "" }, { "docid": "c93d90f497cfce27d26a740b82a90885", "score": "0.44342777", "text": "public function filter($value);", "title": "" }, { "docid": "d2dc163a277dae1630197b55ea620c6a", "score": "0.4429065", "text": "public function where(string $column, $value) : Collection;", "title": "" }, { "docid": "1b12c37e5c65c67df9735641c5235786", "score": "0.44081548", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'isasing':\n\t\t\t\t\tglobal $conn, $conf; \n\t\t\t\t\treturn \"m.isasing = \".$key;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "72886866afa6520fe20afd6d06fdd8db", "score": "0.44076782", "text": "public function filterByUsername($username = null, $comparison = null)\n {\n if (null === $comparison)\n {\n if (is_array($username))\n {\n $comparison = Criteria::IN;\n }\n elseif (preg_match('/[\\%\\*]/', $username))\n {\n $username = str_replace('*', '%', $username);\n $comparison = Criteria::LIKE;\n }\n }\n return $this->addUsingAlias(CollectorPeer::USERNAME, $username, $comparison);\n }", "title": "" }, { "docid": "4dbeef1db3f0d3effb0d0b4f05191dc2", "score": "0.4373399", "text": "private function set_get_filter_by_name($model , & $where){\n\t\t$selected = $this->get_value( $this->get_name_filter_name() );\n\t\t$where [ $this->get_name_filter_name()] = $selected;\n return $model->whereRaw(\" (first_name LIKE ? or second_name LIKE ? ) \" ,\n array( \"%\".$selected.\"%\" ,\n \"%\".$selected.\"%\" )\n );\t\t\t\t\n\t}", "title": "" }, { "docid": "5daf403bb51d5177acd73d5992f0d470", "score": "0.4371714", "text": "public function findBy(string $column, $value);", "title": "" }, { "docid": "eb8f293658efb3d85bfb1350cb9d88c4", "score": "0.43319532", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once('m_unit.php');\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3bd89bb0b6bca1f0200921b723174b26", "score": "0.4323943", "text": "public function filterBysnils($snils = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($snils)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $snils)) {\n $snils = str_replace('*', '%', $snils);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(ClientPeer::SNILS, $snils, $comparison);\n }", "title": "" }, { "docid": "38ed04c428a0a00254c2ed2647cfdaef", "score": "0.43117723", "text": "public function getFilterCondition($value,$operator){\r\n if ($operator == \"=\") {\r\n $value = \"'%\".$value.\"%'\";\r\n return \"`\".$this->name.\"` LIKE \".$value.\" \";\r\n }\r\n }", "title": "" }, { "docid": "3a2b0bdd3a853ef9f5c13f311e746da2", "score": "0.42905805", "text": "public function filterExp($key, $value);", "title": "" }, { "docid": "e4738fe361ebcb89033be5534d3c9dfd", "score": "0.42797688", "text": "public function filterByWhatYouSell($whatYouSell = null, $comparison = null)\n {\n if (null === $comparison)\n {\n if (is_array($whatYouSell))\n {\n $comparison = Criteria::IN;\n }\n elseif (preg_match('/[\\%\\*]/', $whatYouSell))\n {\n $whatYouSell = str_replace('*', '%', $whatYouSell);\n $comparison = Criteria::LIKE;\n }\n }\n return $this->addUsingAlias(CollectorArchivePeer::WHAT_YOU_SELL, $whatYouSell, $comparison);\n }", "title": "" }, { "docid": "56e9ce0a921b2554f4022fd0409bc6e2", "score": "0.4273019", "text": "public function filterByValeur($valeur = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($valeur)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $valeur)) {\n\t\t\t\t$valeur = str_replace('*', '%', $valeur);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(MSettingPeer::VALEUR, $valeur, $comparison);\n\t}", "title": "" }, { "docid": "a01b3e686d17ba3ad1c8ddb0169838fa", "score": "0.42717373", "text": "public function setFilter($key = null, $value = null);", "title": "" }, { "docid": "57091d0afe912249bb666a3532d9b947", "score": "0.42692664", "text": "public function filter()\n {\n $args = func_get_args();\n $callback = array($this, 'having');\n call_user_func_array($callback, $args);\n }", "title": "" }, { "docid": "a3b49e035691103892f25a6ee31cf87d", "score": "0.42584935", "text": "public function filter(Model $model);", "title": "" }, { "docid": "310093b56e8715e1cec6c5d8f4ba0c59", "score": "0.4256699", "text": "static function filter($request, $columns, $existe_where, &$bindings) {\n $globalSearch = array();\n $columnSearch = array();\n $dtColumns = self::pluck( $columns, 'dt');\n\n if(isset($request['search']) && $request['search']['value'] != '') {\n $str = $request['search']['value'];\n\n for($i = 0, $ien = count($request['columns']) ; $i < $ien ; $i++) {\n $requestColumn = $request['columns'][$i];\n $columnIdx = array_search( $requestColumn['data'], $dtColumns );\n $column = $columns[ $columnIdx ];\n\n if($requestColumn['searchable'] == 'true') {\n $binding = self::bind( $bindings, '%'.$str.'%', PDO::PARAM_STR);\n $globalSearch[] = $column['db'].\" LIKE \".$binding;\n }\n }\n }\n\n // Individual column filtering\n for($i = 0, $ien = count($request['columns']); $i < $ien ; $i++) {\n $requestColumn = $request['columns'][$i];\n $columnIdx = array_search( $requestColumn['data'], $dtColumns );\n $column = $columns[ $columnIdx ];\n\n $str = $requestColumn['search']['value'];\n\n if($requestColumn['searchable'] == 'true' && $str != '') {\n $binding = self::bind( $bindings, '%'.$str.'%', PDO::PARAM_STR);\n $columnSearch[] = $column['db'].\" LIKE \".$binding;\n }\n }\n\n // Combine the filters into a single string\n $where = '';\n\n if(count($globalSearch)) $where = '('.implode(' OR ', $globalSearch).')';\n\n if(count($columnSearch)) {\n $where = $where === '' ?\n implode(' AND ', $columnSearch) :\n $where .' AND '. implode(' AND ', $columnSearch);\n }\n \n if($existe_where == 'S') {//Como existe WHERE no SQL que foi passado por parâmetro, não posso ter 2 WHERE(s) ...\n if($where !== '') $where = 'AND '.$where;\n }else {//Não existe WHERE no SQL que foi passado por parâmetro ...\n if($where !== '') $where = 'WHERE '.$where;\n }\n return $where;\n }", "title": "" }, { "docid": "8609a93ad50cbbee65e154aab8044f0e", "score": "0.42522043", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'kodeposisi':\n\t\t\t\t\tif($key != 'all')\n\t\t\t\t\t\treturn \"r.kodeposisi = '$key'\";\n\t\t\t\t\telse\n\t\t\t\t\t\treturn \"(1=1)\";\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'statuslulus':\n\t\t\t\t\tif($key != 'all')\n\t\t\t\t\t\treturn \"statuslulus = '$key'\";\n\t\t\t\t\telse\n\t\t\t\t\t\treturn \"(1=1)\";\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'jenisrekrutmen':\n\t\t\t\t\treturn \"r.jenisrekrutmen = '$key'\";\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "1aef031d0a193c1538a3e342fccd3834", "score": "0.42513096", "text": "public function setCardholderName($value)\n {\n $cardholderName = trim($value);\n $cardholderName = strlen($cardholderName) > 0 ? $cardholderName : null;\n\n return $this->setParameter('cardholderName', $cardholderName);\n }", "title": "" }, { "docid": "12005ec5ffe809ce2286638517cb0950", "score": "0.42302993", "text": "protected function doFilterWithRepository(\n Collection $collection,\n Repository $repository,\n WhereExpressionCollector $whereExpressionCollector,\n &$params\n ) {\n return $this->createColumnWhereClauseExpression(\n \"LIKE\",\n \"%\".$this->endsWith,\n $collection,\n $repository,\n $whereExpressionCollector,\n $params);\n }", "title": "" }, { "docid": "eb4e8f4ea4092bc755119e2dc9ede6ef", "score": "0.42047945", "text": "public static function criterionToDirectClause(Criterion $criterion, $placeHolder, $fieldMap = array())\n {\n $op = false;\n $collate = false;\n $clause = new Clause;\n\n switch($criterion->op())\n {\n case 'eq':\n $op = '=';\n $collate = 'utf8_bin';\n break;\n case 'ne':\n $op = '!=';\n $collate = 'utf8_bin';\n break;\n case 'eqi':\n $op = '=';\n $collate = 'utf8_general_ci';\n break;\n case 'nei':\n $op = '!=';\n $collate = 'utf8_general_ci';\n break;\n }\n\n if ($op && $collate) {\n if ($criterion->type() == Criterion::CRITERION_TYPE_VALUE) {\n $comparand = ':' . $placeHolder;\n // Add the static value as a parameter\n $clause->setParameter($placeHolder, $criterion->value());\n } elseif ($criterion->type() == Criterion::CRITERION_TYPE_FIELD) {\n $comparand = self::getSafeFieldName($criterion->value(), $fieldMap);\n }\n\n // Escape, quote and qualify the field name for security.\n $field = self::getSafeFieldName($criterion->key(), $fieldMap);\n\n // Build the final clause.\n // We can't assume the value is text, so cast it to char and\n // use the relevant collation for the comparison.\n // Testing shows this doesn't affect use of keys on integer\n // fields, if they are used as part of a case sensitive filter\n $clause->setStatement(' ' . $criterion->logic(). ' ' . $field . ' ' . $op . ' '\n . 'CAST(' . $comparand . ' AS CHAR)' . ' COLLATE ' . $collate);\n }\n\n return $clause;\n }", "title": "" }, { "docid": "5baaec79b1a3c92066a24404a1983d1f", "score": "0.42011577", "text": "protected function applyFilterHandler($handler, $value)\n {\n if (is_callable($handler)) {\n call_user_func($handler, $this->queryBuilder, $value);\n } elseif ($handler instanceof DataProviderFilter) {\n $handler->apply($this->queryBuilder, $value);\n } else {\n throw new \\Exception(\"Filter handler {$handler} is invalid\");\n }\n }", "title": "" }, { "docid": "5fc608ebcd4298ed1dda7ae49cc2d912", "score": "0.42007476", "text": "public function getHolderName() {\n\t\treturn $this->holderName;\n\t}", "title": "" }, { "docid": "7724f2760dbb9ba1efce1ca6fc2a511f", "score": "0.4199329", "text": "public function like($column, $value)\n {\n return $this->where($column, 'LIKE', \"%$value%\");\n }", "title": "" }, { "docid": "5ca19486f95157f3106113238288f7bb", "score": "0.4196126", "text": "public function filter($value, $row = null);", "title": "" }, { "docid": "4a08ab419ddfe7a9b362dc4495af3cba", "score": "0.41485977", "text": "public function filterBysnils($snils = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($snils)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $snils)) {\n $snils = str_replace('*', '%', $snils);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(PersonPeer::SNILS, $snils, $comparison);\n }", "title": "" }, { "docid": "89a79cbf96c79052d5646827b7ebb209", "score": "0.41392177", "text": "public function scopeWhereContains(Builder $query, $column, $value)\n {\n return $query->where($column, 'LIKE', '%' . $value . '%');\n }", "title": "" }, { "docid": "7ae9548df25c0e54e0dfa9033ee88828", "score": "0.41360822", "text": "public function filterByDisplayName($displayName = null, $comparison = null)\n {\n if (null === $comparison)\n {\n if (is_array($displayName))\n {\n $comparison = Criteria::IN;\n }\n elseif (preg_match('/[\\%\\*]/', $displayName))\n {\n $displayName = str_replace('*', '%', $displayName);\n $comparison = Criteria::LIKE;\n }\n }\n return $this->addUsingAlias(CollectorPeer::DISPLAY_NAME, $displayName, $comparison);\n }", "title": "" }, { "docid": "03af1c03bbdf57e801d7c308ddc526c0", "score": "0.41271585", "text": "public function handleFiltering(&$query, $model)\n\t{\n\t\t$filters = $this->Input->get('dvs-filters', array());\n\n foreach ($filters as $filterName => $filterValue)\n\t\t{\n\t\t\t$query->where($filterName, 'LIKE', \"%{$filterValue}%\");\n\t\t}\n\t}", "title": "" }, { "docid": "8da25eaeb4bdac0e6fa5635e200a507c", "score": "0.41108617", "text": "public function onClick_Filter()\n {\n $nameFilter = \"nev LIKE '%:item%' OR \n leiras LIKE '%:item%' OR\n tartalom LIKE '%:item%' OR\n meta_kulcsszo LIKE '%:item%'\";\n \n $this->setWhereInput($nameFilter, 'FilterSzuro');\n \n \n \n // Státusz filter\n $filterStatus = $this->getItemValue('FilterStatus');\n switch ($filterStatus) {\n case 1:\n $this->setWhereInput('ceg_aktiv=1', 'FilterStatus');\n break;\n case 2:\n $this->setWhereInput('ceg_aktiv=0', 'FilterStatus');\n break;\n default:\n unset($_SESSION[$this->_name]['FilterStatus']);\n break;\n }\n }", "title": "" }, { "docid": "f6eea5a14b7bf6f15f94e41d975e156e", "score": "0.41033024", "text": "public function filterEmpty(){\n\t\t$this->removeValue(\"\");\n\t}", "title": "" }, { "docid": "34701ab20374528bc3b45d5464f04f12", "score": "0.41026703", "text": "public function bindFilterQuery(Model $model)\n {\n if ($this->filter) {\n $this->filter->addBinding($this->filter->value(), $model);\n }\n }", "title": "" }, { "docid": "8e977286174de0ff2727358afe1ab6a2", "score": "0.40894365", "text": "abstract protected function FilterItem($sValue);", "title": "" }, { "docid": "ee6a236a5943bd3ac5bc23e9a3255069", "score": "0.4088919", "text": "function retrieveWhereEqualTo( $column, $value ){\n $db = Cache::getModel( $this->dbclass );\n $db->retrieveWhereEqualTo( $this->tablename, $column, $value );\n $row = $db->fetchRow();\n $this->initFromRow( $row );\n return $this->id != \"\";\n \n }", "title": "" }, { "docid": "915ce3d4cc1e1c224280b9346b26f265", "score": "0.4088345", "text": "Function getFiltered($filter) {\n $filter_options = ['plaats', 'denominatie', 'stijl', 'type', 'monument', 'periode', 'gemeente', 'provincie'];\n $sql = 'SELECT * FROM '.DB_VIEW.' WHERE';\n foreach ($filter_options as $field) {\n if (isset($filter[$field])) {\n $s = implode('\\',\\'', $filter[$field]);\n $sql .= ' ' . $field . ' IN (\\'' . $s . '\\') AND';\n }\n }\n if (isset($filter['huidige_bestemming'])) {\n if ($filter['huidige_bestemming'] == ['kerk']) {\n $sql .= ' huidige_bestemming=\\'kerk\\' AND';\n } else {\n $sql .= ' huidige_bestemming<>\\'kerk\\' AND';\n }\n }\n\n $ids = array();\n if (isset($filter['architect'])) {\n $this->dbh->exec(\"SET CHARACTER SET utf8\");\n $a = str_replace('&amp;', '&', implode('\\',\\'', $filter['architect']));\n $sqla = 'SELECT \"ID\" from \"013_Architect\" WHERE \"Architect\" IN (\\'' . $a . '\\')';\n $sth = $this->dbh->prepare($sqla);\n $sth->execute();\n $id_s = $sth->fetchAll(PDO::FETCH_COLUMN, 0);\n $sql .= ' id IN (' . implode(',', $id_s) . ') AND';\n }\n\n if (isset($filter['naam'])) {\n $this->dbh->exec(\"SET CHARACTER SET utf8\");\n $a = implode('\\',\\'', $filter['naam']);\n $sqla = 'SELECT \"ID\" from \"011_Naam_Kerk\" WHERE \"Naam_Kerk\" IN (\\'' . $a . '\\')';\n $sth = $this->dbh->prepare($sqla);\n $sth->execute();\n $id_s = $sth->fetchAll(PDO::FETCH_COLUMN, 0);\n $sql .= ' id IN (' . implode(',', $id_s) . ') AND';\n }\n\n $sql = substr($sql, 0, -4) . ' ORDER BY plaats, naam';\n error_log($sql);\n $this->dbh->exec(\"SET CHARACTER SET utf8\");\n $sth = $this->dbh->prepare($sql);\n $sth->execute();\n $res = $sth->fetchAll(PDO::FETCH_ASSOC);\n return $res;\n }", "title": "" }, { "docid": "3b8235cc04e1f672ded0992b207bc6d2", "score": "0.40866736", "text": "public function addCriteria($column, $value, $compare=\"=\", $options=0, $subset=null);", "title": "" }, { "docid": "30811d44ac082905dc43ffe709e2065a", "score": "0.4085326", "text": "public function filterBy($builder)\n {\n $this->builder = $builder;\n\n foreach ($this->request->all() as $filter => $value) {\n if (method_exists(static::class, $filter)) {\n $this->{$filter}($value);\n }\n }\n\n return $this->builder;\n }", "title": "" }, { "docid": "96f675debcbd1a3139a1dfaa4221da7e", "score": "0.4076926", "text": "private function createStringFilter($filter)\n {\n $field = $filter['field'];\n $searchField = $this->getSearchField($field);\n $value = \"%\".$filter['value'].\"%\";\n \n $this->qb->andWhere($searchField.' LIKE :'.$field)\n ->setParameter($field, $value);\n \n }", "title": "" }, { "docid": "7d60ebd8ecc9d16dd2d259041b7a3b5d", "score": "0.4075964", "text": "public static function criterionToIn(Criterion $criterion, $placeHolder, $fieldMap = array())\n {\n $op = false;\n $collate = false;\n $clause = new Clause;\n\n switch($criterion->op())\n {\n case 'in':\n $op = 'IN';\n $collate = 'utf8_bin';\n break;\n case 'nin':\n $op = 'NOT IN';\n $collate = 'utf8_bin';\n break;\n case 'ini':\n $op = 'IN';\n $collate = 'utf8_general_ci';\n break;\n case 'nini':\n $op = 'NOT IN';\n $collate = 'utf8_general_ci';\n break;\n }\n\n if ($op && $collate) {\n if ($criterion->type() == Criterion::CRITERION_TYPE_VALUE) {\n // Values should be in a comma separated list.\n $values = explode(',', $criterion->value());\n\n // We must add a parameter and a placeholder for each value.\n $placeHolders = array();\n foreach ($values as $key => $value)\n {\n $clause->setParameter($placeHolder . '_' . $key, $value);\n $placeHolders[] = ':' . $placeHolder . '_' . $key\n . ' COLLATE ' . $collate;\n }\n\n // The comparand for this operation is the list of values.\n $comparand = '(' . implode(', ', $placeHolders) . ')';\n } elseif ($criterion->type() == Criterion::CRITERION_TYPE_FIELD) {\n // Field names should be in a comma separated list.\n $fList = explode(',', $criterion->value());\n\n foreach (array_keys($fList) as $key) {\n $fList[$key] = self::getSafeFieldName(\n $fList[$key], $fieldMap)\n . ' COLLATE ' . $collate;\n }\n\n // The comparand for this operation is the list of field names.\n $comparand = '(' . implode(', ', $fList) . ')';\n }\n\n // Escape, quote and qualify the field name for security.\n $field = self::getSafeFieldName($criterion->key(), $fieldMap);\n\n // Build the final clause.\n // Use end wild-card character for \"begins with\".\n $clause->setStatement($field . ' ' . $op . ' ' . $comparand);\n }\n }", "title": "" }, { "docid": "250d8cbff2a81580e2d24753fb5c5dbd", "score": "0.40726477", "text": "public function get($filter_params = [], $columns = []);", "title": "" }, { "docid": "53b6a020e2750451608abdeb90bd2f70", "score": "0.40659466", "text": "public function name($value){\n $this->builder->where('name','LIKE', \"%$value%\");\n }", "title": "" }, { "docid": "02ea9c6226cc812c3ed9a0b060b636bf", "score": "0.40579936", "text": "protected function applyFiltersFromModel()\n {\n if (method_exists($this->model, 'filterColumns')) {\n $this->model->filterColumns((object)$this->allColumns);\n }\n }", "title": "" }, { "docid": "3b7f7dfa4ea5e976546bb41c3d310edf", "score": "0.40574566", "text": "public function filter($Selector);", "title": "" }, { "docid": "c3d8d26c1524b8b9c0187f1df2273e70", "score": "0.40486336", "text": "public function filterByPercent($value, $operator = Rule::OP_EQ)\n\t{\n\t\treturn $this->filterBy('percent', $value, $operator);\n\t}", "title": "" }, { "docid": "c98fd5022ffd869ce3f1008768400971", "score": "0.40466", "text": "public function filterByOwner($owner = null, $comparison = null)\n {\n if (is_array($owner)) {\n $useMinMax = false;\n if (isset($owner['min'])) {\n $this->addUsingAlias(CharactersTableMap::COL_OWNER, $owner['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($owner['max'])) {\n $this->addUsingAlias(CharactersTableMap::COL_OWNER, $owner['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(CharactersTableMap::COL_OWNER, $owner, $comparison);\n }", "title": "" }, { "docid": "75c16ec26587a82d87578b6300d2749a", "score": "0.404267", "text": "public function where($column, $value, $operator = '=')\n {\n }", "title": "" }, { "docid": "fa2477955d700992067e03155126efd0", "score": "0.4042405", "text": "public function getHolderName(): string\n {\n return $this->holderName;\n }", "title": "" }, { "docid": "856e063aa3f757c05d225667992d2d20", "score": "0.4038891", "text": "public function testWhere(): void\n {\n //\n $bpm = new Select('test', 'name');\n $bpm->where('id', 1);\n $sql = $this->invokeMethod($bpm, 'buildWhere');\n $this->assertRegExp(\"/^`id` = :[0-9a-zA-Z]+$/\", $sql);\n preg_match('/(:[0-9a-zA-Z]+)$/', $sql, $matches);\n $holder = $matches[1];\n //$holders = $bpm->placeholders();\n $holders = $this->invokeProperty($bpm, 'holders');\n $this->assertSame(1, $holders[$holder]);\n }", "title": "" }, { "docid": "0f4cf6d3539304d991ea90b91caa38e4", "score": "0.40317503", "text": "abstract protected function applyFilter($orm);", "title": "" }, { "docid": "12f5b6074b25973719e75d8714c449ac", "score": "0.40274063", "text": "function vcex_grid_filter_url_param() {\n\treturn apply_filters( 'vcex_grid_filter_url_param', 'filter' );\n}", "title": "" }, { "docid": "fd306424fb9695926d38f003e0435bbe", "score": "0.4023515", "text": "public function setHolderName(string $holderName): void\n {\n $this->holderName = $holderName;\n }", "title": "" }, { "docid": "7725f31514de661c503c4d456d2b7262", "score": "0.402023", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(OwnerTableMap::COL_OWNER_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "69fcb4332097005f50b75dc0484522fc", "score": "0.4018703", "text": "public function filterByUser($user = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($user)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $user)) {\n\t\t\t\t$user = str_replace('*', '%', $user);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(EmpleadoPeer::USER, $user, $comparison);\n\t}", "title": "" }, { "docid": "3a9d2b326b0b6ccf5428a7e41d4d1e7c", "score": "0.40149406", "text": "public function where(string $column, string $operator = null, mixed $value = null, bool $setType = true): static;", "title": "" }, { "docid": "55ee6b32774bab3abfc41ae7ee241d4c", "score": "0.40149152", "text": "public function scopeWhereInColumn(Builder $query, $column, $value)\n {\n return $query->whereRaw('CONCAT(\\',\\', ' . $this->addTicks($column) . ', \\',\\') LIKE \\'%,' . $value . ',%\\'');\n }", "title": "" }, { "docid": "662bf9f5a1d9ee81c50c77591d34c6f3", "score": "0.40141004", "text": "public function or_where_like($argument = null, $value = null);", "title": "" }, { "docid": "2ac760d8f667ccc6dbd9014ff90f0402", "score": "0.40069044", "text": "public function where($field, $value, $wildcard = self::WILDCARD_NONE);", "title": "" }, { "docid": "6a648a0eeb15623f07134c146e6d738f", "score": "0.4005696", "text": "public function filterByDisplayName($displayName = null, $comparison = null)\n {\n if (null === $comparison)\n {\n if (is_array($displayName))\n {\n $comparison = Criteria::IN;\n }\n elseif (preg_match('/[\\%\\*]/', $displayName))\n {\n $displayName = str_replace('*', '%', $displayName);\n $comparison = Criteria::LIKE;\n }\n }\n return $this->addUsingAlias(wpUserPeer::DISPLAY_NAME, $displayName, $comparison);\n }", "title": "" }, { "docid": "e6ea4817dafcdf1fd7c2d75b327d9e9f", "score": "0.4003456", "text": "private function getSearchPlaceholder()\n {\n if (empty($this->searchableColumns)) {\n $placeholder = Str::plural(Str::slug($this->getName()));\n\n return sprintf('search %s ...', $placeholder);\n }\n\n $placeholder = collect($this->searchableColumns)->implode(',');\n\n return sprintf('search %s by their %s ...', Str::lower($this->getName()), $placeholder);\n }", "title": "" }, { "docid": "9a1e6231b7e53151bd1bb5ffe47b94eb", "score": "0.399856", "text": "public function and_where_like($argument = null, $value = null);", "title": "" }, { "docid": "1266e7d22f1498a9a84258ab43a2b143", "score": "0.3991367", "text": "public function dtPerformColumnFilter($columns)\n {\n foreach ($columns as $column) {\n if((strlen($column['search']['value'] > 0)) && (!in_array($column['name'], $this->dtUnsearchable))){\n $this->dtModel = $this->dtModel->where(DB::raw($column['name']), '%'. $column['search']['value'] .'%');\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "ee45a77164c7123b5c8b86ed5d21fbfe", "score": "0.39886275", "text": "function ignoreNonRealUsers(){\r\n\t\treturn $this->filterById(0, Criteria::GREATER_THAN);\r\n\t}", "title": "" }, { "docid": "e77beb6808f1773b8ee65ddcf3a008da", "score": "0.39814103", "text": "public function whereNotEmpty(string $param): self;", "title": "" }, { "docid": "68169889a480bd494598079f04845885", "score": "0.39794922", "text": "function formSimpleLike($str, $col) {\r\n $final = \"WHERE \" . $col . \" LIKE \" . \"'%\" . $str . \"%'\";\r\n return $final;\r\n}", "title": "" }, { "docid": "e7b6da0b2a35746ccc793dd5d080825c", "score": "0.39745152", "text": "public function findBy(array $criteria, array $columns, $single = true)\n {\n }", "title": "" }, { "docid": "d3bbc638123f78669f3303a6ce55e597", "score": "0.39738747", "text": "public function getSupplements($filter){\n $em = $this->getEntityManager();\n $qb = $em->createQueryBuilder();\n $qb->select('s')\n ->from('AppBundle:Supplement','s')\n ->innerJoin('s.contract','c')\n ->innerJoin('c.suplier','su')\n ;\n if($filter!=\"\"){\n $qb\n ->where($qb->expr()->like('s.consecutiveNumber','?1'))\n ->orWhere($qb->expr()->like('s.contractualObject','?1'))\n ->orWhere($qb->expr()->like('s.description','?1'))\n ->orWhere($qb->expr()->like('s.cucValue', '?1'))\n ->orWhere($qb->expr()->like('s.cupValue', '?1'))\n ->orWhere($qb->expr()->like('c.contractualObject', '?1'))\n ->setParameter(1, '%' . $filter . '%')\n ;\n }\n $result = $qb->getQuery()->getResult();\n return $result;\n }", "title": "" }, { "docid": "c8a917908a79d149f3f1f42a089c09e2", "score": "0.39667988", "text": "public function where_match($argument = null, $value = null);", "title": "" }, { "docid": "e498e816e571f365239c6a1fa0e58435", "score": "0.39667535", "text": "public function findBy($field, $value, $columns = ['*']);", "title": "" }, { "docid": "e498e816e571f365239c6a1fa0e58435", "score": "0.39667535", "text": "public function findBy($field, $value, $columns = ['*']);", "title": "" }, { "docid": "0c2697c3fabfbf5547964e0b4413db50", "score": "0.3966207", "text": "public function getColumnFilterTag($column, $params = array())\n {\n $user_params = $this->getParameterValue('list.fields.'.$column->getName().'.params');\n $user_params = is_array($user_params) ? $user_params : sfToolkit::stringToArray($user_params);\n $params = $user_params ? array_merge($params, $user_params) : $params;\n\n if ($column->isComponent())\n {\n return \"get_component('\".$this->getModuleName().\"', '\".$column->getName().\"', array('type' => 'list'))\";\n }\n else if ($column->isPartial())\n {\n return \"get_partial('\".$column->getName().\"', array('type' => 'filter', 'filters' => \\$filters))\";\n }\n\n $type = $column->getCreoleType();\n\n $default_value = \"isset(\\$filters['\".$column->getName().\"']) ? \\$filters['\".$column->getName().\"'] : null\";\n $unquotedName = 'filters['.$column->getName().']';\n $name = \"'$unquotedName'\";\n\n if ($column->isForeignKey())\n {\n $params = $this->getObjectTagParams($params, array('include_blank' => true, 'related_class'=>$this->getRelatedClassName($column), 'text_method'=>'__toString', 'control_name'=>$unquotedName));\n return \"object_select_tag($default_value, null, $params)\";\n\n }\n else if ($type == CreoleTypes::DATE)\n {\n // rich=false not yet implemented\n $params = $this->getObjectTagParams($params, array('rich' => true, 'calendar_button_img' => sfConfig::get('sf_admin_web_dir').'/images/date.png'));\n return \"input_date_range_tag($name, $default_value, $params)\";\n }\n else if ($type == CreoleTypes::TIMESTAMP)\n {\n // rich=false not yet implemented\n $params = $this->getObjectTagParams($params, array('rich' => true, 'withtime' => true, 'calendar_button_img' => sfConfig::get('sf_admin_web_dir').'/images/date.png'));\n return \"input_date_range_tag($name, $default_value, $params)\";\n }\n else if ($type == CreoleTypes::BOOLEAN)\n {\n $defaultIncludeCustom = '__(\"yes or no\")';\n\n $option_params = $this->getObjectTagParams($params, array('include_custom' => $defaultIncludeCustom));\n $params = $this->getObjectTagParams($params);\n\n // little hack\n $option_params = preg_replace(\"/'\".preg_quote($defaultIncludeCustom).\"'/\", $defaultIncludeCustom, $option_params);\n\n $options = \"options_for_select(array(1 => __('yes'), 0 => __('no')), $default_value, $option_params)\";\n\n return \"select_tag($name, $options, $params)\";\n }\n else if ($type == CreoleTypes::CHAR || $type == CreoleTypes::VARCHAR || $type == CreoleTypes::TEXT || $type == CreoleTypes::LONGVARCHAR)\n {\n $size = ($column->getSize() < 15 ? $column->getSize() : 15);\n $params = $this->getObjectTagParams($params, array('size' => $size));\n return \"input_tag($name, $default_value, $params)\";\n }\n else if ($type == CreoleTypes::INTEGER || $type == CreoleTypes::TINYINT || $type == CreoleTypes::SMALLINT || $type == CreoleTypes::BIGINT)\n {\n $params = $this->getObjectTagParams($params, array('size' => 7));\n return \"input_tag($name, $default_value, $params)\";\n }\n else if ($type == CreoleTypes::FLOAT || $type == CreoleTypes::DOUBLE || $type == CreoleTypes::DECIMAL || $type == CreoleTypes::NUMERIC || $type == CreoleTypes::REAL)\n {\n $params = $this->getObjectTagParams($params, array('size' => 7));\n return \"input_tag($name, $default_value, $params)\";\n }\n else\n {\n $params = $this->getObjectTagParams($params, array('disabled' => true));\n return \"input_tag($name, $default_value, $params)\";\n }\n }", "title": "" }, { "docid": "ce232c19cbc243867dc6668cf0d108e9", "score": "0.39655647", "text": "public static function filter ($filter, $value, $bind = null) {\n self::setWhere();\n self::$query.= \" $filter ? \";\n self::$bind[] = array ('value' => $value, 'bind' => $bind);\n return new self();\n }", "title": "" }, { "docid": "1cc1fed08d00a4fce9ab504c4fa34101", "score": "0.39635044", "text": "private static function filter($database, $criteria)\n {\n $fieldNames = array_shift($database);\n $criteriaNames = array_shift($criteria);\n\n // Convert the criteria into a set of AND/OR conditions with [:placeholders]\n $testConditions = $testValues = [];\n $testConditionsCount = 0;\n foreach ($criteriaNames as $key => $criteriaName) {\n $testCondition = [];\n $testConditionCount = 0;\n foreach ($criteria as $row => $criterion) {\n if ($criterion[$key] > '') {\n $testCondition[] = '[:' . $criteriaName . ']' . Functions::ifCondition($criterion[$key]);\n ++$testConditionCount;\n }\n }\n if ($testConditionCount > 1) {\n $testConditions[] = 'OR(' . implode(',', $testCondition) . ')';\n ++$testConditionsCount;\n } elseif ($testConditionCount == 1) {\n $testConditions[] = $testCondition[0];\n ++$testConditionsCount;\n }\n }\n\n if ($testConditionsCount > 1) {\n $testConditionSet = 'AND(' . implode(',', $testConditions) . ')';\n } elseif ($testConditionsCount == 1) {\n $testConditionSet = $testConditions[0];\n }\n\n // Loop through each row of the database\n foreach ($database as $dataRow => $dataValues) {\n // Substitute actual values from the database row for our [:placeholders]\n $testConditionList = $testConditionSet;\n foreach ($criteriaNames as $key => $criteriaName) {\n $k = array_search($criteriaName, $fieldNames);\n if (isset($dataValues[$k])) {\n $dataValue = $dataValues[$k];\n $dataValue = (is_string($dataValue)) ? Calculation::wrapResult(strtoupper($dataValue)) : $dataValue;\n $testConditionList = str_replace('[:' . $criteriaName . ']', $dataValue, $testConditionList);\n }\n }\n // evaluate the criteria against the row data\n $result = Calculation::getInstance()->_calculateFormulaValue('=' . $testConditionList);\n // If the row failed to meet the criteria, remove it from the database\n if (!$result) {\n unset($database[$dataRow]);\n }\n }\n\n return $database;\n }", "title": "" }, { "docid": "53ccb74834b58f909ef2eeba8e97cfb9", "score": "0.39574403", "text": "private function predicate(array $criteria): string {\n\n\t\tif( count($criteria) === 0) return '';\n\n\t\t$where = '';\n\t\tforeach($criteria as $field=>$value){\n\t\t\t$type = gettype($value);\n\t\t\tswitch($type) {\n\t\t\t\tcase 'integer':\n\t\t\t\tcase 'double':\n\t\t\t\tcase 'float':\n\t\t\t\t\t$where .= ($where === '') \n\t\t\t\t\t? $field . ' = ' . $value \n\t\t\t\t\t: ' AND ' . $field . ' = ' . $value;\n\t\t\t\tbreak;\n\t\t\t\tcase 'string':\n\t\t\t\t\t$value = $this->protectString($value);\n\t\t\t\t\t$where .= ($where === '') \n\t\t\t\t\t? $field . ' = \"' . $value .'\"' \n\t\t\t\t\t: ' AND ' . $field . ' = \"' . $value . '\"';\n\t\t\t\tbreak;\n\t\t\t\tcase 'boolean':\n\t\t\t\t\t$v = $value===true ? 1 : 0;\n\t\t\t\t\t$where .= ($where === '') \n\t\t\t\t\t? $field . ' = ' . $v \n\t\t\t\t\t: ' AND ' . $field . ' = ' . $v;\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new UnhandledDatatypeException($this->tablename, $field, $type);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn ' WHERE '.$where;\n\t}", "title": "" }, { "docid": "eee503ffc8c6d75481ccb5ee09c55c39", "score": "0.39530018", "text": "public function filterByUser($user = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($user)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $user)) {\n $user = str_replace('*', '%', $user);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(Table1Peer::USER, $user, $comparison);\n }", "title": "" }, { "docid": "628f1c9907bdd1f68aba018de36fab07", "score": "0.3952613", "text": "public function filter($value, $options = []);", "title": "" }, { "docid": "17ea95d63ef8ce70a1569fbd6c6a4019", "score": "0.3950097", "text": "function filter($connection, $sql) {\n return mysqli_real_escape_string($connection, $sql);\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "c86830fa3d26c78b687318957a62c2ad", "score": "0.0", "text": "public function store(Request $request)\n {\n $task = Task::create($request->only(['description', 'status','type','assigned_to','next_action_date']));\n return new TaskResource($task);\n }", "title": "" } ]
[ { "docid": "79da2146a3794a65b80951c7ea2a2404", "score": "0.6621547", "text": "public function save()\n {\n $this->storage->save();\n }", "title": "" }, { "docid": "f934191a4b4b75a1fb96952dd934d298", "score": "0.6508533", "text": "public function store()\n {\n $this->validate(\n $this->request,\n $this->validationRules('create'),\n [],\n $this->getLabelFields('create')\n );\n\n if ($new = $this->model()->create($this->request->all())) {\n return $this->afterStored($new);\n }\n\n return\n back()\n ->withInput()\n ->with(\n 'error',\n __(\n 'Error when creating :resource_name.',\n ['resource_name' => static::$title]\n )\n );\n\n }", "title": "" }, { "docid": "29b26d3072dbf3730f945274190fe8af", "score": "0.6508172", "text": "public function store(StoreResourceRequest $request)\n {\n abort_if(\n $request->user()->cannot('create', Resource::class),\n 403\n );\n\n // course not found\n Course::where('program_id', auth()->user()->program_id)->findOrFail($request->course_id);\n\n try {\n $batchId = Str::uuid();\n foreach ($request->file as $file) {\n $temporaryFile = TemporaryUpload::firstWhere('folder_name', $file);\n\n if ($temporaryFile) {\n $r = Resource::create([\n 'course_id' => $request->course_id,\n 'user_id' => auth()->id(),\n 'batch_id' => $batchId,\n 'description' => $request->description\n ]);\n\n $r->users()->attach($r->user_id, ['batch_id' => $batchId]);\n\n $r->addMedia(storage_path('app/public/resource/tmp/' . $temporaryFile->folder_name . '/' . $temporaryFile->file_name))\n ->toMediaCollection();\n rmdir(storage_path('app/public/resource/tmp/' . $file));\n\n // event(new ResourceCreated($r));\n\n $temporaryFile->delete();\n }\n }\n\n if ($request->check_stay) {\n return redirect()\n ->route('resources.create')\n ->with('success', 'Resource was created successfully');\n }\n\n return redirect()\n ->route('resources.index')\n ->with('success', 'Resource was created successfully');\n } catch (\\Throwable $th) {\n throw $th;\n }\n }", "title": "" }, { "docid": "195678750c701128998da1a792face59", "score": "0.64855534", "text": "public function store()\n\t{\n\t\t$input = Input::only('link', 'description', 'level', 'title', 'categorie_id');\n\t\t$rules = [\n\t\t\t'title' => 'required',\n\t\t\t'link' => 'required|url',\n\t\t\t'description' => 'required',\n\t\t\t'level' => 'required|integer',\n\t\t\t'categorie_id' => 'required|integer'\n\t\t];\n\t\t\n\t\t$validator = Validator::make($input, $rules);\n\n\t\tif($validator->passes())\n\t\t{\n\t\t\t$resource = new Resource($input);\n\t\t\t$user = Auth::user();\n\t\t\t$user->resources()->save($resource);\n\t\t\t$user->save();\n\t\t\treturn Redirect::route('resources.show', ['id' => $resource->id])->withFlashMessage('Your resource was successfully created!');\n\t\t}\n\t\t\n\t\treturn Redirect::back()->withInput()->withErrors($validator);\n\t}", "title": "" }, { "docid": "20369ffaffacb701b25ed702ed26d8a3", "score": "0.6440966", "text": "public function save(): void\n {\n $this->handler->write($this->getId(), $this->prepareForStorage(\n serialize($this->attributes)\n ));\n\n $this->started = false;\n }", "title": "" }, { "docid": "3d9eb044ff6d55a39b2aa1f967b0a444", "score": "0.6406951", "text": "public function store()\n {\n $this->beginAction('store');\n $this->applyHooks(AuthorizeAction::class);\n $this->gatherInput();\n $this->validateInput();\n $this->createResource();\n $this->formatResource();\n\n return $this->makeResponse();\n }", "title": "" }, { "docid": "ca58ec6302f4412d3ed2c815a424ff00", "score": "0.6401442", "text": "public function store()\n\t{\n\t\t// not yet required!\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
ad99a83b896a31cd0e320c4143447d52
Operation restAccountsAddressesOptionTypesPost Create address option type
[ { "docid": "f5c63189af9e004b99b1ab9e6f5bef0d", "score": "0.57237315", "text": "public function restAccountsAddressesOptionTypesPost($_rest_accounts_addresses_option_types = null)\n {\n list($response) = $this->restAccountsAddressesOptionTypesPostWithHttpInfo($_rest_accounts_addresses_option_types);\n return $response;\n }", "title": "" } ]
[ { "docid": "d16385f17606c78f81858fd13995a811", "score": "0.76164705", "text": "protected function restAccountsAddressesOptionTypesPostRequest($_rest_accounts_addresses_option_types = null)\n {\n\n $resourcePath = '/rest/accounts/addresses/option_types';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n if (isset($_rest_accounts_addresses_option_types)) {\n $_tempBody = $_rest_accounts_addresses_option_types;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "9c326883cc79b28fda6bb30b6f0d28cc", "score": "0.7015655", "text": "protected function restAccountsAddressesOptionTypesGetRequest()\n {\n\n $resourcePath = '/rest/accounts/addresses/option_types';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "9a5c9e51f4eb116147996ce7cf956986", "score": "0.65147", "text": "protected function restAccountsContactsOptionTypesPostRequest($_rest_accounts_contacts_option_types = null)\n {\n\n $resourcePath = '/rest/accounts/contacts/option_types';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n if (isset($_rest_accounts_contacts_option_types)) {\n $_tempBody = $_rest_accounts_contacts_option_types;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "be28f13d23c0bf72b3471cc825b48d79", "score": "0.6286031", "text": "public function restAccountsAddressesOptionTypesPostWithHttpInfo($_rest_accounts_addresses_option_types = null)\n {\n $request = $this->restAccountsAddressesOptionTypesPostRequest($_rest_accounts_addresses_option_types);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\AddressOptionType' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\AddressOptionType', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\AddressOptionType';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\AddressOptionType',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "da8d8da4db5bb4e4922653a0df5c2c31", "score": "0.6180672", "text": "public function restAccountsAddressesOptionTypesPostAsyncWithHttpInfo($_rest_accounts_addresses_option_types = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\AddressOptionType';\n $request = $this->restAccountsAddressesOptionTypesPostRequest($_rest_accounts_addresses_option_types);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "e4c79bb0b7599f0da1c3bf26bff2dcd7", "score": "0.61301845", "text": "public function restAccountsAddressesOptionTypesPostAsync($_rest_accounts_addresses_option_types = null)\n {\n return $this->restAccountsAddressesOptionTypesPostAsyncWithHttpInfo($_rest_accounts_addresses_option_types)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "9c88ccf6efe3432ca834fb5ab307a510", "score": "0.5893635", "text": "protected function restAccountsAddressesPostRequest($_rest_accounts_addresses = null)\n {\n\n $resourcePath = '/rest/accounts/addresses';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n if (isset($_rest_accounts_addresses)) {\n $_tempBody = $_rest_accounts_addresses;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "6533bdf7e72034f1ae27f14e48182056", "score": "0.5874381", "text": "public function setAddressType($addressType);", "title": "" }, { "docid": "d8fa4f99ba80205fa256b51bd7755c73", "score": "0.58435774", "text": "protected function restAccountsContactsOptionSubTypesPostRequest($_rest_accounts_contacts_option_sub_types = null)\n {\n\n $resourcePath = '/rest/accounts/contacts/option_sub_types';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n if (isset($_rest_accounts_contacts_option_sub_types)) {\n $_tempBody = $_rest_accounts_contacts_option_sub_types;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "fe05e1dc32b5410400cc5dfa94998a92", "score": "0.580714", "text": "protected function restAccountsAddressesRelationTypesGetRequest()\n {\n\n $resourcePath = '/rest/accounts/addresses/relation_types';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "b165dc0be32ba94356a7c39c504a6977", "score": "0.5750914", "text": "public function create()\n {\n return view('address_types.create');\n }", "title": "" }, { "docid": "cd3cf846c7872dd06827d36d3c7700fb", "score": "0.570457", "text": "public function restAccountsAddressesOptionTypesGet()\n {\n list($response) = $this->restAccountsAddressesOptionTypesGetWithHttpInfo();\n return $response;\n }", "title": "" }, { "docid": "1422bbf29b3c482827cb82c2775dfe6f", "score": "0.56587946", "text": "public function restAccountsAddressesOptionTypesGetWithHttpInfo()\n {\n $request = $this->restAccountsAddressesOptionTypesGetRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\AddressOptionType[]' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\AddressOptionType[]', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\AddressOptionType[]';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\AddressOptionType[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "7e66fc5ca01d162558cf89e941ed5f51", "score": "0.56384754", "text": "protected function restAccountsContactsTypesPostRequest($_rest_accounts_contacts_types = null)\n {\n\n $resourcePath = '/rest/accounts/contacts/types';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n if (isset($_rest_accounts_contacts_types)) {\n $_tempBody = $_rest_accounts_contacts_types;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "1fcf6bad6f4a3962c5365e608bd77c8c", "score": "0.56217223", "text": "public function restAccountsAddressesOptionTypesGetAsyncWithHttpInfo()\n {\n $returnType = '\\OpenAPI\\Client\\Model\\AddressOptionType[]';\n $request = $this->restAccountsAddressesOptionTypesGetRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "9f32d4eaaf36c95761d130dc778f338f", "score": "0.55756325", "text": "public function restAccountsAddressesOptionTypesGetAsync()\n {\n return $this->restAccountsAddressesOptionTypesGetAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "45028a115d8bcae0bf5626c3846f4dcd", "score": "0.55458957", "text": "protected function addAddress(Message $message, array $options, $type)\n {\n if (!array_key_exists($type, $options)) {\n return;\n }\n\n $address = $options[$type];\n $method = 'set' . ucfirst($type);\n if ($type === 'reply_to') {\n // Do not use the full blown underscore-to-camelcase converter\n // Simply replace the only type \"reply_to\"\n $method = 'setReplyTo';\n }\n\n // We only have a single address in the list\n if (!is_array($address)) {\n $key = $type . '_name';\n $name = array_key_exists($key, $options) ? $options[$key] : null;\n $message->$method($address, $name);\n return;\n }\n\n $message->$method($address);\n }", "title": "" }, { "docid": "f587c3208a3a26824fd91a55e6d4cd47", "score": "0.54501", "text": "protected function restAccountsContactsContactIdAddressesPostRequest($contact_id, $is_primary = null, $type_id = null, $_rest_accounts_contacts_contact_id_addresses = null)\n {\n // verify the required parameter 'contact_id' is set\n if ($contact_id === null || (is_array($contact_id) && count($contact_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $contact_id when calling restAccountsContactsContactIdAddressesPost'\n );\n }\n\n $resourcePath = '/rest/accounts/contacts/{contactId}/addresses';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($is_primary)) {\n $is_primary = ObjectSerializer::serializeCollection($is_primary, '', true);\n }\n if ($is_primary !== null) {\n $queryParams['isPrimary'] = $is_primary;\n }\n // query params\n if (is_array($type_id)) {\n $type_id = ObjectSerializer::serializeCollection($type_id, '', true);\n }\n if ($type_id !== null) {\n $queryParams['typeId'] = $type_id;\n }\n\n\n // path params\n if ($contact_id !== null) {\n $resourcePath = str_replace(\n '{' . 'contactId' . '}',\n ObjectSerializer::toPathValue($contact_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($_rest_accounts_contacts_contact_id_addresses)) {\n $_tempBody = $_rest_accounts_contacts_contact_id_addresses;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "bb636a1a1bfe6c8fe594497be3553800", "score": "0.5415543", "text": "protected function restAccountsAddressesAddressIdOptionsPostRequest($address_id, $_rest_accounts_addresses_address_id_options = null)\n {\n // verify the required parameter 'address_id' is set\n if ($address_id === null || (is_array($address_id) && count($address_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $address_id when calling restAccountsAddressesAddressIdOptionsPost'\n );\n }\n\n $resourcePath = '/rest/accounts/addresses/{addressId}/options';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($address_id !== null) {\n $resourcePath = str_replace(\n '{' . 'addressId' . '}',\n ObjectSerializer::toPathValue($address_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($_rest_accounts_addresses_address_id_options)) {\n $_tempBody = $_rest_accounts_addresses_address_id_options;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "392c2bd1921eb205c8d6dc10f905951b", "score": "0.54074025", "text": "protected function restAccountsAddressesPosRelationsPostRequest()\n {\n\n $resourcePath = '/rest/accounts/addresses/pos_relations';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "e22546eaf92c0a1b721b0acc1e378096", "score": "0.53984183", "text": "public static function optsAddressType()\n {\n return [\n self::ADDRESS_TYPE_TO => Yii::t('d3pop3', self::ADDRESS_TYPE_TO),\n self::ADDRESS_TYPE_CC => Yii::t('d3pop3', self::ADDRESS_TYPE_CC),\n self::ADDRESS_TYPE_BCC => Yii::t('d3pop3', self::ADDRESS_TYPE_BCC),\n self::ADDRESS_TYPE_REPLY => Yii::t('d3pop3', self::ADDRESS_TYPE_REPLY),\n ];\n }", "title": "" }, { "docid": "ce2a35868014d6ec6c5995ef7c49f9d4", "score": "0.5370171", "text": "function adress_post_type() {\n\n\t// Labels\n\t$labels = array(\n\t\t'name' => _x(\"Addressen\", \"post type general name\"),\n\t\t'singular_name' => _x(\"Addresse\", \"post type singular name\"),\n\t\t'menu_name' => 'Addressen',\n\t\t'add_new' => _x(\"Neue Addresse hinzufügen\", \"team item\"),\n\t\t'add_new_item' => __(\"Neue Addresse hinzufügen\"),\n\t\t'edit_item' => __(\"Addresse bearbeiten\"),\n\t\t'new_item' => __(\"Neue Addresse hinzufügen\"),\n\t\t'view_item' => __(\"Addresse ansehen\"),\n\t\t'search_items' => __(\"Addresse suchen\"),\n\t\t'not_found' => __(\"Keine Addresse gefunden\"),\n\t\t'not_found_in_trash' => __(\"Keine Addresse im Papierkorb gefunden\"),\n\t\t'parent_item_colon' => ''\n\t);\n\n\t// Register post type\n\tregister_post_type('adress' , array(\n\t\t'labels' => $labels,\n\t\t'public' => true,\n\t\t'has_archive' => true,\n\t\t/* icon from wordpress ressource */\n\t\t'menu_icon' => 'dashicons-location',\n\t\t'rewrite' => false,\n\t\t'supports' => array('title')\n\t) );\n}", "title": "" }, { "docid": "1a6f501da5d233e1bbce92eb0ddfb0b0", "score": "0.5369696", "text": "protected function restAccountsAddressesOptionTypesOptionTypeIdPutRequest($option_type_id, $_rest_accounts_addresses_option_types_option_type_id = null)\n {\n // verify the required parameter 'option_type_id' is set\n if ($option_type_id === null || (is_array($option_type_id) && count($option_type_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $option_type_id when calling restAccountsAddressesOptionTypesOptionTypeIdPut'\n );\n }\n\n $resourcePath = '/rest/accounts/addresses/option_types/{optionTypeId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($option_type_id !== null) {\n $resourcePath = str_replace(\n '{' . 'optionTypeId' . '}',\n ObjectSerializer::toPathValue($option_type_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($_rest_accounts_addresses_option_types_option_type_id)) {\n $_tempBody = $_rest_accounts_addresses_option_types_option_type_id;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "270ebf26b3f7e432fd04440d81d84c6f", "score": "0.53568363", "text": "public function creating(Address $address)\n {\n $address->setAttribute('address_type', 1);\n }", "title": "" }, { "docid": "28b0989b2d5d77f66367a19742066a2f", "score": "0.53542835", "text": "protected function restOrdersAddressesPostRequest()\n {\n\n $resourcePath = '/rest/orders/addresses';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "1a17d30aa76667c9ce5d77c14af876fb", "score": "0.532983", "text": "private function buildAddressesFields(): void\n {\n //====================================================================//\n // Address List\n $this->fieldsFactory()->create((string) self::objects()->Encode(\"Address\", SPL_T_ID))\n ->identifier(\"address\")\n ->inList(\"contacts\")\n ->name(Translate::getAdminTranslation(\"Address\", \"AdminCustomers\"))\n ->microData(\"http://schema.org/Organization\", \"address\")\n ->group(Translate::getAdminTranslation(\"Addresses\", \"AdminCustomers\"))\n ->isReadOnly()\n ;\n }", "title": "" }, { "docid": "aba74ac1c8904ac4e2fc0b9e2a050a13", "score": "0.52961755", "text": "public function getAddressType();", "title": "" }, { "docid": "aba74ac1c8904ac4e2fc0b9e2a050a13", "score": "0.52961755", "text": "public function getAddressType();", "title": "" }, { "docid": "97cc7ad23230de49e345c5781e0dcaa4", "score": "0.5261105", "text": "function dongustavo_addresses() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Addresses', 'Post Type General Name', 'dongustavo' ),\n\t\t'singular_name' => _x( 'Address', 'Post Type Singular Name', 'dongustavo' ),\n\t\t'menu_name' => __( 'Адреси', 'dongustavo' ),\n\t\t'name_admin_bar' => __( 'Адреси', 'dongustavo' ),\n\t\t'archives' => __( 'Item Archives', 'dongustavo' ),\n\t\t'attributes' => __( 'Item Attributes', 'dongustavo' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'dongustavo' ),\n\t\t'all_items' => __( 'All Items', 'dongustavo' ),\n\t\t'add_new_item' => __( 'Add New Item', 'dongustavo' ),\n\t\t'add_new' => __( 'Додати адресу', 'dongustavo' ),\n\t\t'new_item' => __( 'Нова адреса', 'dongustavo' ),\n\t\t'edit_item' => __( 'Редагувати', 'dongustavo' ),\n\t\t'update_item' => __( 'Оновити', 'dongustavo' ),\n\t\t'view_item' => __( 'Перегляд', 'dongustavo' ),\n\t\t'view_items' => __( 'View Items', 'dongustavo' ),\n\t\t'search_items' => __( 'Search Item', 'dongustavo' ),\n\t\t'not_found' => __( 'На знайдено', 'dongustavo' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'dongustavo' ),\n\t\t'featured_image' => __( 'Зображення', 'dongustavo' ),\n\t\t'set_featured_image' => __( 'Додати зображення', 'dongustavo' ),\n\t\t'remove_featured_image' => __( 'Видалити зображення', 'dongustavo' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'dongustavo' ),\n\t\t'insert_into_item' => __( 'Insert into item', 'dongustavo' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'dongustavo' ),\n\t\t'items_list' => __( 'Items list', 'dongustavo' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'dongustavo' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'dongustavo' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'Addresses', 'dongustavo' ),\n\t\t'description' => __( 'Post Type Description', 'dongustavo' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'custom-fields' ),\n\t\t'taxonomies' => array( 'category' ),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 5,\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => false,\n\t\t'can_export' => false,\n\t\t'has_archive' => false,\n\t\t'exclude_from_search' => true,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t\t'show_in_rest' => false,\n\t);\n\tregister_post_type( 'addresses', $args );\n\n}", "title": "" }, { "docid": "81333f7c8b2acf3e1ecf131ce3f4a74e", "score": "0.5243696", "text": "public function run()\n {\n $items = [\n ['name' => 'Home'],\n ['name' => 'Work'],\n ['name' => 'Other'],\n ];\n\n foreach ($items as $item) {\n \\App\\AddressType::create($item);\n }\n }", "title": "" }, { "docid": "57a40406b19afe942ce1abdbf68baff6", "score": "0.5216248", "text": "protected function restAccountsContactsOptionSubTypesGetRequest()\n {\n\n $resourcePath = '/rest/accounts/contacts/option_sub_types';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "4d9efef58ff04de2b25d5a1beafd78d3", "score": "0.51780367", "text": "public function createAddress(array $params);", "title": "" }, { "docid": "c0c2fc50f626d72b53f4387f954aa392", "score": "0.51462877", "text": "public function register_custom_post_types() {\n\t\t//$this->register_post_type_area_entrega_checkout();\n\t}", "title": "" }, { "docid": "8fc88c5311b38f2bf5500f7da5992d52", "score": "0.5093911", "text": "function cpt_create_custom_post_types() {\r\n\t$cpt_post_types = get_option('cpt_custom_post_types');\r\n\r\n\t//check if option value is an Array before proceeding\r\n\tif ( is_array( $cpt_post_types ) ) {\r\n\t\tforeach ($cpt_post_types as $cpt_post_type) {\r\n\t\t\t//set post type values\r\n\t\t\t$cpt_label = ( !empty( $cpt_post_type[\"label\"] ) ) ? esc_html( $cpt_post_type[\"label\"] ) : esc_html( $cpt_post_type[\"name\"] ) ;\r\n\t\t\t$cpt_singular = ( !empty( $cpt_post_type[\"singular_label\"] ) ) ? esc_html( $cpt_post_type[\"singular_label\"] ) : esc_html( $cpt_label );\r\n\t\t\t$cpt_rewrite_slug = ( !empty( $cpt_post_type[\"rewrite_slug\"] ) ) ? esc_html( $cpt_post_type[\"rewrite_slug\"] ) : esc_html( $cpt_post_type[\"name\"] );\r\n\t\t\t$cpt_rewrite_withfront = ( !empty( $cpt_post_type[\"rewrite_withfront\"] ) ) ? true : get_disp_boolean( $cpt_post_type[\"rewrite_withfront\"] ); //reversed because false is empty\r\n\t\t\t$cpt_menu_position = ( !empty( $cpt_post_type[\"menu_position\"] ) ) ? intval( $cpt_post_type[\"menu_position\"] ) : null; //must be null\r\n\t\t\t$cpt_menu_icon = ( !empty( $cpt_post_type[\"menu_icon\"] ) ) ? esc_attr( $cpt_post_type[\"menu_icon\"] ) : null; //must be null\r\n\t\t\t$cpt_taxonomies = ( !empty( $cpt_post_type[1] ) ) ? $cpt_post_type[1] : array();\r\n\t\t\t$cpt_supports = ( !empty( $cpt_post_type[0] ) ) ? $cpt_post_type[0] : array();\r\n\r\n\t\t\t//Show UI must be true\r\n\t\t\tif ( true == get_disp_boolean( $cpt_post_type[\"show_ui\"] ) ) {\r\n\t\t\t\t//If the string is empty, we will need boolean, else use the string.\r\n\t\t\t\tif ( empty( $cpt_post_type['show_in_menu_string'] ) ) {\r\n\t\t\t\t\t$cpt_show_in_menu = ( $cpt_post_type[\"show_in_menu\"] == 1 ) ? true : false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$cpt_show_in_menu = $cpt_post_type['show_in_menu_string'];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$cpt_show_in_menu = false;\r\n\t\t\t}\r\n\r\n\t\t\t//set custom label values\r\n\t\t\t$cpt_labels['name'] = $cpt_label;\r\n\t\t\t$cpt_labels['singular_name'] = $cpt_post_type[\"singular_label\"];\r\n\r\n\t\t\tif ( isset ( $cpt_post_type[2][\"menu_name\"] ) ) {\r\n\t\t\t\t$cpt_labels['menu_name'] = ( !empty( $cpt_post_type[2][\"menu_name\"] ) ) ? $cpt_post_type[2][\"menu_name\"] : $cpt_label;\r\n\t\t\t}\r\n\r\n\t\t\t$cpt_has_archive = ( !empty( $cpt_post_type[\"has_archive\"] ) ) ? get_disp_boolean( $cpt_post_type[\"has_archive\"] ) : '';\r\n\t\t\t$cpt_exclude_from_search = ( !empty( $cpt_post_type[\"exclude_from_search\"] ) ) ? get_disp_boolean( $cpt_post_type[\"exclude_from_search\"] ) : '';\r\n\t\t\t$cpt_labels['add_new'] = ( !empty( $cpt_post_type[2][\"add_new\"] ) ) ? $cpt_post_type[2][\"add_new\"] : 'Add ' .$cpt_singular;\r\n\t\t\t$cpt_labels['add_new_item'] = ( !empty( $cpt_post_type[2][\"add_new_item\"] ) ) ? $cpt_post_type[2][\"add_new_item\"] : 'Add New ' .$cpt_singular;\r\n\t\t\t$cpt_labels['edit'] = ( !empty( $cpt_post_type[2][\"edit\"] ) ) ? $cpt_post_type[2][\"edit\"] : 'Edit';\r\n\t\t\t$cpt_labels['edit_item'] = ( !empty( $cpt_post_type[2][\"edit_item\"] ) ) ? $cpt_post_type[2][\"edit_item\"] : 'Edit ' .$cpt_singular;\r\n\t\t\t$cpt_labels['new_item'] = ( !empty( $cpt_post_type[2][\"new_item\"] ) ) ? $cpt_post_type[2][\"new_item\"] : 'New ' .$cpt_singular;\r\n\t\t\t$cpt_labels['view'] = ( !empty( $cpt_post_type[2][\"view\"] ) ) ? $cpt_post_type[2][\"view\"] : 'View ' .$cpt_singular;\r\n\t\t\t$cpt_labels['view_item'] = ( !empty( $cpt_post_type[2][\"view_item\"] ) ) ? $cpt_post_type[2][\"view_item\"] : 'View ' .$cpt_singular;\r\n\t\t\t$cpt_labels['search_items'] = ( !empty( $cpt_post_type[2][\"search_items\"] ) ) ? $cpt_post_type[2][\"search_items\"] : 'Search ' .$cpt_label;\r\n\t\t\t$cpt_labels['not_found'] = ( !empty( $cpt_post_type[2][\"not_found\"] ) ) ? $cpt_post_type[2][\"not_found\"] : 'No ' .$cpt_label. ' Found';\r\n\t\t\t$cpt_labels['not_found_in_trash'] = ( !empty( $cpt_post_type[2][\"not_found_in_trash\"] ) ) ? $cpt_post_type[2][\"not_found_in_trash\"] : 'No ' .$cpt_label. ' Found in Trash';\r\n\t\t\t$cpt_labels['parent'] = ( $cpt_post_type[2][\"parent\"] ) ? $cpt_post_type[2][\"parent\"] : 'Parent ' .$cpt_singular;\r\n\r\n\t\t\tregister_post_type( $cpt_post_type[\"name\"], array(\t'label' => __($cpt_label),\r\n\t\t\t\t'public' => get_disp_boolean($cpt_post_type[\"public\"]),\r\n\t\t\t\t'singular_label' => $cpt_post_type[\"singular_label\"],\r\n\t\t\t\t'show_ui' => get_disp_boolean($cpt_post_type[\"show_ui\"]),\r\n\t\t\t\t'has_archive' => $cpt_has_archive,\r\n\t\t\t\t'show_in_menu' => $cpt_show_in_menu,\r\n\t\t\t\t'capability_type' => $cpt_post_type[\"capability_type\"],\r\n\t\t\t\t'map_meta_cap' => true,\r\n\t\t\t\t'hierarchical' => get_disp_boolean($cpt_post_type[\"hierarchical\"]),\r\n\t\t\t\t'exclude_from_search' => $cpt_exclude_from_search,\r\n\t\t\t\t'rewrite' => array( 'slug' => $cpt_rewrite_slug, 'with_front' => $cpt_rewrite_withfront ),\r\n\t\t\t\t'query_var' => get_disp_boolean($cpt_post_type[\"query_var\"]),\r\n\t\t\t\t'description' => esc_html($cpt_post_type[\"description\"]),\r\n\t\t\t\t'menu_position' => $cpt_menu_position,\r\n\t\t\t\t'menu_icon' => $cpt_menu_icon,\r\n\t\t\t\t'supports' => $cpt_supports,\r\n\t\t\t\t'taxonomies' => $cpt_taxonomies,\r\n\t\t\t\t'labels' => $cpt_labels\r\n\t\t\t) );\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "44d8fc27a53fd2bdd8b187398485c987", "score": "0.50873315", "text": "public function createAddress()\n {\n }", "title": "" }, { "docid": "f5af9076fbb6522630a2c321f006f4cc", "score": "0.50698376", "text": "function addresses_addressesfieldapi($op, $fields = array(), $values = array()) {\n if ($op == 'fields') {\n $items = array();\n\n $items['is_primary'] = array(\n 'type' => 'int',\n 'size' => 'tiny',\n 'title' => t('Primary Address Checkbox'),\n 'description' => t('Mark it as the primary address or not (default is not)'),\n 'default' => 0,\n 'display' => ADDRESSES_FIELD_NONE,\n 'theme' => array(\n 'plain' => t('\"False\" if the checkbox is not checked, otherwise \"True\".'),\n 'hcard' => t('An hcard/vcard html representation of the primary checkbox.'),\n ),\n 'token' => 'addresses_general',\n );\n\n $items['aname'] = array(\n 'type' => 'varchar',\n 'length' => 75,\n 'title' => t('Address Name'),\n 'description' => t('The nickname of this address, like \"Home\", \"Office\", \"Anna\\'s apartment.\"'),\n 'default' => '',\n 'display' => ADDRESSES_FIELD_NONE,\n 'theme' => array(\n 'plain' => t('The address name.'),\n 'hcard' => t('An hcard/vcard html representation of the address name.'),\n ),\n 'token' => 'addresses_general',\n );\n\n $items['country'] = array(\n 'type' => 'varchar',\n 'length' => 2,\n 'title' => t('Country'),\n 'description' => t('The ISO alpha 3 code of each country (its a 2-digit code).'),\n 'default' => variable_get('addresses_country_default', 'us'),\n 'display' => ADDRESSES_FIELD_SHOW,\n 'theme' => array(\n 'name' => t('The name of the country.'),\n 'code2' => t('The 2-digit country code.'),\n 'code3' => t('The 3-digit country code.'),\n 'name_hcard' => t('An hcard/vcard representation of the country name.'),\n 'code2_hcard' => t('An hcard/vcard representation of the 2-digit country code.'),\n 'code3_hcard' => t('An hcard/vcard representation of the 3-digit country code.'),\n ),\n 'token' => 'addresses_adr',\n );\n\n $items['province'] = array(\n 'type' => 'varchar',\n 'length' => 16,\n 'title' => t('Province'),\n 'description' => t('The name of the state, province, county or territory.'),\n 'default' => '',\n 'display' => ADDRESSES_FIELD_SHOW,\n 'theme' => array(\n 'name' => t('The province name.'),\n 'code' => t('The province code.'),\n 'name_hcard' => t('An hcard/vcard representation of the province name.'),\n 'code_hcard' => t('An hcard/vcard representation of the province code.'),\n ),\n 'token' => 'addresses_adr',\n );\n\n $items['city'] = array(\n 'type' => 'varchar',\n 'length' => 255,\n 'title' => t('City'),\n 'description' => t('The name of the city.'),\n 'default' => '',\n 'display' => ADDRESSES_FIELD_SHOW,\n 'theme' => array(\n 'plain' => t('The city.'),\n 'hcard' => t('An hcard/vcard representation of the city.'),\n ),\n 'token' => 'addresses_adr',\n );\n\n $items['street'] = array(\n 'type' => 'varchar',\n 'length' => 255,\n 'title' => t('Street'),\n 'description' => t('Street, number...'),\n 'default' => '',\n 'display' => ADDRESSES_FIELD_SHOW,\n 'theme' => array(\n 'plain' => t('The street, number, etc.'),\n 'hcard' => t('An hcard/vcard representation of the street.'),\n ),\n 'token' => 'addresses_adr',\n );\n\n $items['additional'] = array(\n 'type' => 'varchar',\n 'length' => 255,\n 'title' => t('Additional'),\n 'description' => t('Additional address information like apartment block, number or address reference.'),\n 'default' => '',\n 'display' => ADDRESSES_FIELD_SHOW,\n 'theme' => array(\n 'plain' => t('Additional address information.'),\n 'hcard' => t('An hcard/vcard representation of the additional address information.'),\n ),\n 'token' => 'addresses_adr',\n );\n\n $items['postal_code'] = array(\n 'type' => 'varchar',\n 'length' => 16,\n 'title' => t('Postal code'),\n 'description' => t('The address postal code (ZIP code for US people).'),\n 'default' => '',\n 'display' => ADDRESSES_FIELD_SHOW,\n 'theme' => array(\n 'plain' => t('The postal code.'),\n 'hcard' => t('An hcard/vcard representation of the postal code.'),\n ),\n 'token' => 'addresses_adr',\n );\n\n return $items;\n }\n elseif ($op == 'form') {\n // Are form field definitions placed in a separate file due to length?\n module_load_include('settings.inc', 'addresses');\n return _addresses_addressesfieldapi_form($fields, $values);\n }\n}", "title": "" }, { "docid": "9d71f4c176f5a6d9cc1eda0ac9143825", "score": "0.50322366", "text": "public function addAddress($address, $list, $type = 'list')\n {\n return $this->addAddresses([$address], $list, $type);\n }", "title": "" }, { "docid": "43f7c433e6bf7a7814ed457fb2dae735", "score": "0.50209403", "text": "public function register_post_types()\n {\n\n }", "title": "" }, { "docid": "cae15cbe63d0818545804cbd37c86046", "score": "0.5020476", "text": "protected function restAccountsAddressesContactRelationsPostRequest($_rest_accounts_addresses_contact_relations = null)\n {\n\n $resourcePath = '/rest/accounts/addresses/contact_relations';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n if (isset($_rest_accounts_addresses_contact_relations)) {\n $_tempBody = $_rest_accounts_addresses_contact_relations;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "c88b1de0d145f65bc30d001fab8eb4cb", "score": "0.49968165", "text": "public static function register($types, $options = []);", "title": "" }, { "docid": "5ead989cf9c951a51aa8f25e965323a4", "score": "0.49905533", "text": "function register_post_types() {\n }", "title": "" }, { "docid": "6986a8412a4de5d75215d28781c01ced", "score": "0.4976932", "text": "function addType($type_namespace_uri, $type_name, $options){}", "title": "" }, { "docid": "6f50d5864da4c7f7fb7052fba5d5bb75", "score": "0.4973451", "text": "protected function restAccountsAddressesOptionTypesOptionTypeIdGetRequest($option_type_id)\n {\n // verify the required parameter 'option_type_id' is set\n if ($option_type_id === null || (is_array($option_type_id) && count($option_type_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $option_type_id when calling restAccountsAddressesOptionTypesOptionTypeIdGet'\n );\n }\n\n $resourcePath = '/rest/accounts/addresses/option_types/{optionTypeId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($option_type_id !== null) {\n $resourcePath = str_replace(\n '{' . 'optionTypeId' . '}',\n ObjectSerializer::toPathValue($option_type_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "1f039aff6826187d8e0b13ef47238659", "score": "0.49697897", "text": "public function restOrdersAddressesPostWithHttpInfo()\n {\n $request = $this->restOrdersAddressesPostRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\AddressOrderRelation' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\AddressOrderRelation', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\AddressOrderRelation';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\AddressOrderRelation',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "d7e35b67b0065d2da5d273105c8d8e40", "score": "0.49678728", "text": "public function restAccountsContactsOptionTypesPostAsync($_rest_accounts_contacts_option_types = null)\n {\n return $this->restAccountsContactsOptionTypesPostAsyncWithHttpInfo($_rest_accounts_contacts_option_types)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "b1621b1036546dd20983ce29add32223", "score": "0.49661052", "text": "function register_post_types(){\n\t\t}", "title": "" }, { "docid": "17a97828c7afb03869b49ca234ec09c2", "score": "0.49606106", "text": "public function addAddresses($addresses, $list, $type = 'list')\n {\n return $this->sendRequest('/CMD_API_EMAIL_LIST', [\n 'action' => 'add',\n 'name' => $list,\n 'type' => $type,\n 'email' => implode(',', $addresses),\n ]);\n }", "title": "" }, { "docid": "2fe078bfb2e79ca941e192b78c3f5c45", "score": "0.4959083", "text": "protected function restAccountsContactsTypesGetRequest()\n {\n\n $resourcePath = '/rest/accounts/contacts/types';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "957a773cc313eb49ca22e7ec9f34f48d", "score": "0.49503025", "text": "function register_post_types() {\n\t}", "title": "" }, { "docid": "957a773cc313eb49ca22e7ec9f34f48d", "score": "0.49503025", "text": "function register_post_types() {\n\t}", "title": "" }, { "docid": "957a773cc313eb49ca22e7ec9f34f48d", "score": "0.49503025", "text": "function register_post_types() {\n\t}", "title": "" }, { "docid": "58f2f518c7bd76ce79c7e63d70d556d7", "score": "0.49305743", "text": "public function create($address, $type = null)\n {\n $data = [\n 'address' => $address,\n 'type' => $type,\n ];\n\n return $this->post('/user/load_balancers/notifiers', $data);\n }", "title": "" }, { "docid": "df79517ce69b77a238638dc5698db3a1", "score": "0.49285343", "text": "function register_post_types(){\n }", "title": "" }, { "docid": "eb20c1a9d0f840bc775f42d01ce0f166", "score": "0.4926164", "text": "public static function createPostType();", "title": "" }, { "docid": "4d736e670fa37a37779ca5137eca6b94", "score": "0.4925292", "text": "public function restAccountsContactsOptionTypesPostWithHttpInfo($_rest_accounts_contacts_option_types = null)\n {\n $request = $this->restAccountsContactsOptionTypesPostRequest($_rest_accounts_contacts_option_types);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\ContactOptionType' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\ContactOptionType', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\ContactOptionType';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ContactOptionType',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "ef650e19f46aa445f6a877594d8bcc50", "score": "0.4922318", "text": "protected function restAccountsAddressesOptionTypesOptionTypeIdDeleteRequest($option_type_id)\n {\n // verify the required parameter 'option_type_id' is set\n if ($option_type_id === null || (is_array($option_type_id) && count($option_type_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $option_type_id when calling restAccountsAddressesOptionTypesOptionTypeIdDelete'\n );\n }\n\n $resourcePath = '/rest/accounts/addresses/option_types/{optionTypeId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($option_type_id !== null) {\n $resourcePath = str_replace(\n '{' . 'optionTypeId' . '}',\n ObjectSerializer::toPathValue($option_type_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "4adda168083ec81239a7a5988bf82aaf", "score": "0.4918007", "text": "function register_post_types(){\n }", "title": "" }, { "docid": "d32b071e4f48d349c51ddb9df28260f5", "score": "0.49108496", "text": "public function store()\n {\n return AddressType::create([\n 'name' => $this->name,\n ]);\n }", "title": "" }, { "docid": "18b21b06ce0803fd052155006c650ae6", "score": "0.4910769", "text": "public function restAccountsContactsOptionTypesPostAsyncWithHttpInfo($_rest_accounts_contacts_option_types = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\ContactOptionType';\n $request = $this->restAccountsContactsOptionTypesPostRequest($_rest_accounts_contacts_option_types);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "f53f8a110e49edab1f782cacdf4a907f", "score": "0.49002284", "text": "protected function getOroAddress_Form_Type_AddressService()\n {\n return $this->services['oro_address.form.type.address'] = new \\Oro\\Bundle\\AddressBundle\\Form\\Type\\AddressType($this->get('oro_address.form.listener.address'));\n }", "title": "" }, { "docid": "107a22c67aba4eb4a4f66e6460cdc6ce", "score": "0.48959705", "text": "public function setType(AddressType $type): static\n {\n $this->type = $type;\n\n return $this;\n }", "title": "" }, { "docid": "ccce7df229ceb9816daa93800b5578e6", "score": "0.48948488", "text": "public function setAddressMultiOptions()\n {\n if ($this->_user instanceof UserModel) {\n $usersAddressBook = new UsersAddressBook();\n $addressMultiOptions = $usersAddressBook->getMultiOptions($this->_user, '<br>', true);\n\n if (count($addressMultiOptions) > 0) {\n\n $addressMultiOptions[0] = array(\n 'title' => $this->getTranslate()->_('New address'),\n 'locationId' => null,\n 'postCode' => null,\n );\n }\n\n $this->_addressMultiOptions = $addressMultiOptions;\n }\n\n return $this;\n }", "title": "" }, { "docid": "21510b496f5b28d06677696da585c049", "score": "0.4891525", "text": "protected function restAccountsAddressesWarehouseRelationsPostRequest()\n {\n\n $resourcePath = '/rest/accounts/addresses/warehouse_relations';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "69fd3ba9898c7af9b67824d5444a5459", "score": "0.48827398", "text": "public function addToAddress(\\Sabre\\UpdateReservation\\StructType\\AddressType $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\Sabre\\UpdateReservation\\StructType\\AddressType) {\n throw new \\InvalidArgumentException(sprintf('The Address property can only contain items of \\Sabre\\UpdateReservation\\StructType\\AddressType, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->Address[] = $item;\n return $this;\n }", "title": "" }, { "docid": "cfa9b555d277754a9c5e23fb35a8987a", "score": "0.48718876", "text": "function bporg_developer_register_rest_api( $post_types = array() ) {\n\t$post_types[] = 'bp-rest-api';\n\treturn $post_types;\n}", "title": "" }, { "docid": "e300ab586f4f6ebbf98808b396b5a006", "score": "0.4868071", "text": "public function store(CreateAddressesRequest $request)\n\t{\n\t \n\t\tAddresses::create($request->all());\n\n\t\treturn redirect()->route(config('quickadmin.route').'.addresses.index');\n\t}", "title": "" }, { "docid": "a4dd8f16ab4335717e9a18c18b5619dc", "score": "0.48672816", "text": "public function restOrdersAddressesPost()\n {\n list($response) = $this->restOrdersAddressesPostWithHttpInfo();\n return $response;\n }", "title": "" }, { "docid": "b5c9bec043efeb1090215a8e551d1f5e", "score": "0.48647863", "text": "public function create(array $data): Addresses\n {\n return $this->repository->create($data);\n }", "title": "" }, { "docid": "a7527319d55a41fedfc36dd3feaad42c", "score": "0.48485887", "text": "public function run()\n {\n $address_types_array = [\n [\n 'name' => 'Main Location'\n ],\n [\n 'name' => 'Shipping'\n ],\n [\n 'name' => 'Billing'\n ]\n ];\n\n foreach($address_types_array as $address_type) {\n AddressType::create([\n 'name' => $address_type['name']\n ]);\n }\n }", "title": "" }, { "docid": "a491f73b9b92dc0a226c2dd35d77734e", "score": "0.4846377", "text": "public function registerPostType();", "title": "" }, { "docid": "a491f73b9b92dc0a226c2dd35d77734e", "score": "0.4846377", "text": "public function registerPostType();", "title": "" }, { "docid": "b28f6b0a3676afd77ececb61f9c40f0a", "score": "0.4810831", "text": "function launchpad_register_post_types() {\n\t// Get the available post types provided by WordPress.\n\t$registered_post_types = get_post_types();\n\t\n\t// Get post types and modifications created by the developer.\n\t$post_types = launchpad_get_post_types();\n\t\n\t// If the developer didn't make any, return here.\n\tif(!$post_types) {\n\t\treturn;\n\t}\n\t\n\t// Loop the developer-related post types and modifications.\n\tforeach($post_types as $post_type => $post_type_details) {\n\t\t\n\t\t// If the current post type has custom taxonomies, put them in an array.\n\t\tif(isset($post_type_details['taxonomies']) && $post_type_details['taxonomies'] && is_array($post_type_details['taxonomies'])) {\n\t\t\t$taxonomies = $post_type_details['taxonomies'];\n\t\t\t\n\t\t// Otherwise, set the list to false.\n\t\t} else {\n\t\t\t$taxonomies = false;\n\t\t}\n\t\t\n\t\t// Remove the taxonomies in case they are applied directly to register_post_type.\n\t\tunset($post_type_details['taxonomies']);\n\t\t\n\t\t// If the developer sets a 'labels' key, it means the developer wants full control of the registration array.\n\t\tif(isset($post_type_details['labels'])) {\n\t\t\t$args = $post_type_details;\n\t\t\n\t\t// Otherwise, we need to create an array to send to register_post_type.\n\t\t} else if(isset($post_type_details['plural'])) {\n\t\t\n\t\t\t// Grab the values set by the developer.\n\t\t\t$post_type_plural = $post_type_details['plural'];\n\t\t\tif(isset($post_type_details['single'])) {\n\t\t\t\t$post_type_single = $post_type_details['single'];\n\t\t\t} else {\n\t\t\t\t$post_type_single = $post_type_details['plural'] . 's';\n\t\t\t}\n\t\t\tif(isset($post_type_details['slug'])) {\n\t\t\t\t$post_type_slug = $post_type_details['slug'];\n\t\t\t} else {\n\t\t\t\t$post_type_slug = false;\n\t\t\t}\n\t\t\tif(isset($post_type_details['menu_position'])) {\n\t\t\t\t$post_type_menu_options = $post_type_details['menu_position'];\n\t\t\t} else {\n\t\t\t\t$post_type_menu_options = null;\n\t\t\t}\n\t\t\tif(isset($post_type_details['menu_icon'])) {\n\t\t\t\t$post_type_menu_icon = $post_type_details['menu_icon'];\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$post_type_menu_icon = false;\n\t\t\t}\n\t\t\tif(isset($post_type_details['show_in_menu'])) {\n\t\t\t\t$post_type_show_in_menu = $post_type_details['show_in_menu'];\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$post_type_show_in_menu = true;\n\t\t\t}\n\t\t\t\n\t\t\t// If the developer set 'supports' values, use those.\n\t\t\tif(isset($post_type_details['supports'])) {\n\t\t\t\t$supports = $post_type_details['supports'];\n\t\t\t\n\t\t\t// If not, use the defaults.\n\t\t\t} else {\n\t\t\t\t$supports = array(\n\t\t\t\t\t\t'title',\n\t\t\t\t\t\t'editor',\n\t\t\t\t\t\t'thumbnail'\n\t\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\t// Apply the default values to the array.\n\t\t\t$args = array(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t\t'name' => $post_type_plural,\n\t\t\t\t\t\t'singular_name' => $post_type_single,\n\t\t\t\t\t\t'add_new' => 'Add New ' . $post_type_single,\n\t\t\t\t\t\t'add_new_item' => 'Add ' . $post_type_single,\n\t\t\t\t\t\t'edit_item' => 'Edit ' . $post_type_single,\n\t\t\t\t\t\t'new_item' => 'New ' . $post_type_single,\n\t\t\t\t\t\t'all_items' => 'All ' . $post_type_plural,\n\t\t\t\t\t\t'view_item' => 'View ' . $post_type_single,\n\t\t\t\t\t\t'search_items' => 'Search ' . $post_type_plural,\n\t\t\t\t\t\t'not_found' => 'No ' . strtolower($post_type_plural) . ' found',\n\t\t\t\t\t\t'not_found_in_trash' => 'No ' . strtolower($post_type_plural) . ' found in Trash', \n\t\t\t\t\t\t'parent_item_colon' => '',\n\t\t\t\t\t\t'menu_name' => $post_type_plural\n\t\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t'show_ui' => true, \n\t\t\t\t'show_in_menu' => $post_type_show_in_menu, \n\t\t\t\t'query_var' => true,\n\t\t\t\t'rewrite' => array(\n\t\t\t\t\t\t'slug' => $post_type_slug,\n\t\t\t\t\t\t'with_front' => false\n\t\t\t\t\t),\n\t\t\t\t'capability_type' => 'page',\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'hierarchical' => isset($post_type_details['hierarchical']) ? (bool) $post_type_details['hierarchical'] : false,\n\t\t\t\t'menu_position' => $post_type_menu_options,\n\t\t\t\t'supports' => $supports\n\t\t\t);\n\t\t\t\n\t\t\t\t\t\n\t\t\tif($post_type_menu_icon) {\n\t\t\t\t$args['menu_icon'] = $post_type_menu_icon;\n\t\t\t}\n\t\t\t\n\t\t\t// If the post type is false, make the post type \"private.\"\t\t\t\n\t\t\tif(!$post_type_slug) {\n\t\t\t\t$args['public'] = false;\n\t\t\t\t$args['publicly_queryable'] = false;\n\t\t\t\t$args['rewrite'] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If the post type is not a built-in post type, register it.\n\t\tif(!in_array($post_type, $registered_post_types)) {\n\t\t\tregister_post_type($post_type, $args);\n\t\t}\n\t\t\n\t\t// If the developer included taxonomies, deal with them.\n\t\tif($taxonomies) {\n\t\t\t\n\t\t\t// Loop the taxonomies.\n\t\t\tforeach($taxonomies as $taxonomy => $taxonomy_details) {\n\t\t\t\t// If the developer included 'labels', they want full control.\n\t\t\t\tif(isset($taxonomy_details['labels'])) {\n\t\t\t\t\tregister_taxonomy($taxonomy_details);\n\t\t\t\t\n\t\t\t\t// Otherwise, we have to build an array for the developer.\n\t\t\t\t} else {\n\t\t\t\t\t// Set the defaults.\n\t\t\t\t\t$taxonomy_plural = $taxonomy_details['plural'];\n\t\t\t\t\t$taxonomy_single = $taxonomy_details['single'];\n\t\t\t\t\t$taxonomy_slug = $taxonomy_details['slug'];\n\t\t\t\t\t\n\t\t\t\t\t// Register the taxonomy for the current post type.\n\t\t\t\t\tregister_taxonomy(\n\t\t\t\t\t\t\t$taxonomy, \n\t\t\t\t\t\t\tarray($post_type), \n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'labels' => array(\n\t\t\t\t\t\t\t\t\t'name' => $taxonomy_plural,\n\t\t\t\t\t\t\t\t\t'singular_name' => $taxonomy_single,\n\t\t\t\t\t\t\t\t\t'search_items' => 'Search ' . $taxonomy_plural,\n\t\t\t\t\t\t\t\t\t'all_items' => 'All ' . $taxonomy_plural,\n\t\t\t\t\t\t\t\t\t'parent_item' => 'Parent ' . $taxonomy_single,\n\t\t\t\t\t\t\t\t\t'parent_item_colon' => 'Parent ' . $taxonomy_single . ':',\n\t\t\t\t\t\t\t\t\t'edit_item' => 'Edit ' . $taxonomy_single,\n\t\t\t\t\t\t\t\t\t'update_item' => 'Update ' . $taxonomy_single,\n\t\t\t\t\t\t\t\t\t'add_new_item' => 'Add New ' . $taxonomy_single,\n\t\t\t\t\t\t\t\t\t'new_item_name' => 'New ' . $taxonomy_single,\n\t\t\t\t\t\t\t\t\t'menu_name' => $taxonomy_plural\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'query_var' => $taxonomy_slug,\n\t\t\t\t\t\t\t\t'hierarchical' => true,\n\t\t\t\t\t\t\t\t'rewrite' => array(\n\t\t\t\t\t\t\t\t\t'slug' => $taxonomy_slug, \n\t\t\t\t\t\t\t\t\t'hierarchical' => false, \n\t\t\t\t\t\t\t\t\t'with_front' => false\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\t\n\n}", "title": "" }, { "docid": "e71f2f6733e719b05f9c611a905745d4", "score": "0.4785008", "text": "public function add_post_types() {\n\n\t\t$types = $this->settings['add_post_types'];\n\n\t\t$defaults = [\n\t\t\t'plural' => '',\n\t\t\t'icon' => '',\n\t\t\t'supports' => '',\n\t\t\t'args' => '',\n\t\t\t'labels' => '',\n\t\t];\n\n\t\tif ( is_array( $types ) && count( $types ) > 0 ) {\n\t\t\tforeach ( $types as $type ) {\n\t\t\t\t$type = array_merge( $defaults, $type );\n\t\t\t\tif ( isset( $type['name'] ) ) {\n\t\t\t\t\t$this->register_post_type( $type['name'], $type['plural'], $type['icon'], $type['supports'], $type['args'], $type['labels'] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3dcfd5c49f3e99e017b51edebb8ba790", "score": "0.47607085", "text": "public function addAddressToOrder($order_id, $address_type, $address)\r\n {\r\n $this->startConditions()->insert([\r\n 'order_id' => $order_id,\r\n 'address_type' => $address_type,\r\n 'first_name' => $address['first_name'],\r\n 'last_name' => $address['last_name'],\r\n 'email' => $address['email'],\r\n 'phone' => $address['phone'],\r\n 'address' => $address['address'],\r\n 'city' => $address['city'],\r\n 'country' => $address['country'],\r\n 'state' => $address['state'],\r\n 'zip_code' => $address['zip_code'],\r\n 'created_at' => \\Carbon\\Carbon::now(),\r\n 'updated_at' => \\Carbon\\Carbon::now()\r\n ]);\r\n }", "title": "" }, { "docid": "e0c584479b5480bd3b6db79665579261", "score": "0.4747931", "text": "protected function restStockmanagementWarehousesAddressesPostRequest()\n {\n\n $resourcePath = '/rest/stockmanagement/warehouses/addresses';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "33614794679440f6dfef35201235b047", "score": "0.47467402", "text": "function create_origins() {\n\n register_post_type( 'origins',\n // CPT Options\n array(\n 'labels' => array(\n 'name' => __( 'Shipping origins' ),\n 'singular_name' => __( 'Origins' ),\n 'add_new_item' => __( 'Add New Shipping Origin' ),//TODO More labels\n ),\n 'public' => false,\n 'show_ui' => true,\n 'show_in_menu' => current_user_can( 'manage_woocommerce' ) ? 'woocommerce' : true,\n 'has_archive' => false,\n 'exclude_from_search' => true,\n 'rewrite' => array('slug' => 'origins'),\n )\n );\n\n\n\n\n}", "title": "" }, { "docid": "45626817702bd8aea04642ae591cef06", "score": "0.47342506", "text": "protected function getOroAddress_Type_AddressCollectionService()\n {\n return $this->services['oro_address.type.address_collection'] = new \\Oro\\Bundle\\AddressBundle\\Form\\Type\\AddressCollectionType();\n }", "title": "" }, { "docid": "674a3fbe5d256bc65e847604d38d009e", "score": "0.47165853", "text": "public function getAddressTypes()\n {\n return $this->_addressTypes;\n }", "title": "" }, { "docid": "84feb40e2b6c1d1a7bc56d8da64d175d", "score": "0.4708009", "text": "public function store(StoreAddressPostRequest $request)\n {\n\n $address= new Address(array(\n 'unit'=> $request->unit,\n 'street'=>$request->street,\n 'postCode'=>$request->postCode,\n 'city'=>$request->city,\n 'state'=>$request->state,\n 'country'=>$request->country,\n ));\n switch(Session::get('AddRole')){\n case \"tenant\":\n $client= Client::find(Session::get('ClientInsertedId'));\n $client->addresses()->save($address);\n Session::flash('flash_message', 'Address successfully added! ');\n return redirect()->action('ClientController@index');\n\n break;\n case \"owner\":\n $client= Client::find(Session::get('ClientInsertedId'));\n $client->addresses()->save($address);\n Session::flash('flash_message', 'Address successfully added! ');\n return redirect()->action('PropertyController@store',\n Session::get('ClientInsertedId'));\n break;\n case \"property\":\n $property=Property::find(Session::get('PropertyInsertedId'));\n $property->addresses()->save($address);\n return redirect()->action('OwnerController@index');\n\n break;\n }\n\n return redirect('home');\t}", "title": "" }, { "docid": "b5ce1853ac2d7c519357bb68c8abc498", "score": "0.47054848", "text": "public function addAddress($email, $name='', $addressType='To'){\n\t\t$email = [\n\t\t\t'name' => $name,\n\t\t\t'email' => $email,\n\t\t];\n\t\t\n\t\t$this->$addressType[] = $email;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1b243c18c07e2cd9df698af6169aa854", "score": "0.46977994", "text": "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n // Address data\n 'type' => 'required|string',\n 'street' => 'required|string',\n 'zip' => 'required|string',\n\n // City node\n 'city' => 'required|string', // City name\n\n // County node\n 'county' => 'required|string', // Name or UUID\n \n // Country node\n 'country' => 'required|string', // alpha2code or UUID\n\n // The owner node\n 'owner' => 'required|string', // uuid\n 'ownertype' => 'required|string', // Name of type\n \n // Attention field (optional)\n 'att' => 'string',\n ]);\n if ($validator->fails()) {\n $messages = [];\n foreach ($validator->errors()->all() as $message) {\n $messages[] = $message;\n }\n return response()->json([\n 'status' => 400,\n 'data' => null,\n 'heading' => 'Address',\n 'messages' => $messages\n ], 400);\n }\n\n $messages = [];\n\n $uuid4 = Uuid::uuid4();\n $addressData = [\n 'uuid' => $uuid4->toString(),\n 'type' => $request->input('type'),\n 'street' => $request->input('street'),\n //'city' => $request->input('city'),\n 'zip' => $request->input('zip'),\n 'att' => $request->input('att'),\n ];\n\n $address = Address::create($addressData);\n\n // Connect the address to a country\n if ($request->has('country') && Uuid::isValid($request->input('country'))) {\n $country = Country::where('uuid', $request->input('country'))->first();\n $rel = $country->addresses()->save($address);\n } else if ($request->has('country')) {\n $country = Country::where('iso', $request->input('country'))->first();\n \n if (!!$country) {\n $rel = $country->addresses()->save($address);\n } else {\n $countryData = [\n 'uuid' => Uuid::uuid4()->toString(),\n 'iso' => $request->input('country'),\n 'enabled' => 1\n ];\n $country = Country::create($countryData);\n $rel = $country->addresses()->save($address);\n }\n }\n\n\n // Connect the address to a city\n if ($request->has('city') && Uuid::isValid($request->input('city'))) {\n $city = City::where('uuid', $request->input('city'))->first();\n $rel = $city->addresses()->save($address);\n } else if ($request->has('city')) {\n $city = City::where('name', $request->input('city'))->first();\n\n if (!!$city) {\n $rel = $city->addresses()->save($address);\n } else {\n $cityData = [\n 'uuid' => Uuid::uuid4()->toString(),\n 'name' => $request->input('city'),\n ];\n $city = City::create($cityData);\n $rel = $city->addresses()->save($address);\n }\n }\n \n\n // Connect the address to a county\n if ($request->has('county') && Uuid::isValid($request->input('county'))) {\n $county = County::where('uuid', $request->input('county'))->first();\n $rel = $county->addresses()->save($address);\n } else if ($request->has('county')) {\n $county = County::where('name', $request->input('county'))->first();\n\n if (!!$county) {\n $rel = $county->addresses()->save($address);\n } else {\n $countyData = [\n 'uuid' => Uuid::uuid4()->toString(),\n 'name' => $request->input('county'),\n ];\n $county = County::create($countyData);\n $rel = $county->addresses()->save($address);\n }\n }\n\n\n if ($request->has('owner') && $request->has('ownertype') && Uuid::isValid($request->input('owner'))) {\n switch ($request->input('ownertype')) {\n case 'user':\n $user = User::where('uuid', $request->input('owner'))->first();\n $rel = $user->addresses()->save($address);\n $messages[] = 'Address was added to the user';\n break;\n\n case 'customer':\n $customer = Customer::where('uuid', $request->input('owner'))->first();\n $rel = $customer->addresses()->save($address);\n $messages[] = 'Address was added to the customer';\n break;\n\n case 'manufacturer':\n $manufacturer = Manufacturer::where('uuid', $request->input('owner'))->first();\n $rel = $manufacturer->addresses()->save($address);\n $messages[] = 'Address was added to the manufacturer';\n break;\n \n case 'chain':\n $chain = Chain::where('uuid', $request->input('owner'))->first();\n $rel = $chain->address()->save($address);\n $messages[] = 'Address was added to the chain';\n break;\n }\n }\n\n // Or if it was not one of the three accepted node types we'll simply send an error!\n else {\n // Remove the address if no owner node was found\n $address->forceDelete();\n\n return response()->json([\n 'status' => 400,\n 'data' => null,\n 'heading' => 'Address',\n 'messages' => [\"Invalid node type, can't attach an address.\"]\n ], 400);\n }\n\n // We made it! Send a success!\n return response()->json([\n 'status' => 201,\n 'data' => $address,\n 'heading' => 'Address',\n 'messages' => $messages\n ], 201);\n }", "title": "" }, { "docid": "80171271f25db7f84e9710cf74800922", "score": "0.46945783", "text": "public function restOrdersAddressesPostAsyncWithHttpInfo()\n {\n $returnType = '\\OpenAPI\\Client\\Model\\AddressOrderRelation';\n $request = $this->restOrdersAddressesPostRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "3938d6a283cb4bc23f817105883f3ff2", "score": "0.46945554", "text": "private function createAddressInput() {\n $item = new Item\\Text('address');\n $item->label = 'Address:';\n $item->wrap = TRUE;\n $item->attribute = array(\n 'maxlength' => 128,\n 'size' => 39,\n );\n $item->weight = 3;\n $this->addChild('address', $item);\n }", "title": "" }, { "docid": "2d88464267283f8cfc9d5f43b307bf91", "score": "0.46935445", "text": "protected function addAddress(array $params, array $options)\n {\n if ($address = Arr::get($options, 'address') ?: Arr::get($options, 'billing_address')) {\n $params['address']['street1'] = Arr::get($address, 'address1');\n if ($address2 = Arr::get($address, 'address2')) {\n $params['address']['street2'] = $address2;\n }\n if ($address3 = Arr::get($address, 'address3')) {\n $params['address']['street3'] = $address3;\n }\n if ($externalNumber = Arr::get($address, 'external_number')) {\n $params['address']['external_number'] = $externalNumber;\n }\n $params['address']['city'] = Arr::get($address, 'city');\n $params['address']['country'] = Arr::get($address, 'country');\n $params['address']['state'] = Arr::get($address, 'state');\n $params['address']['postal_code'] = Arr::get($address, 'zip');\n\n return $params;\n }\n }", "title": "" }, { "docid": "03323afd075fd8ad2d2eec399d2f7e28", "score": "0.4681863", "text": "public function add_types() {\t\n\t\t$labels = array(\n\t\t\t'name' => __('People', 'people'),\n\t\t\t'singular_name' => __('Person', 'people'),\n\t\t\t'add_new' => __('Add New', 'people'),\n\t\t\t'add_new_item' => __('Add New Person', 'people'),\n\t\t\t'edit_item' => __('Edit Person', 'people'),\n\t\t\t'new_item' => __('New Person', 'people'),\n\t\t\t'all_items' => __('All People', 'people'),\n\t\t\t'view_item' => __('View Person', 'people'),\n\t\t\t'search_items' => __('Search People', 'people'),\n\t\t\t'not_found' => __('No People found', 'people'),\n\t\t\t'not_found_in_trash' => __('No People found in Trash', 'people'),\n\t\t\t'parent_item_colon' => '',\n\t\t\t'menu_name' => __('People', 'people')\n\t\t);\n\t\n\t\t$args = array(\n\t \t'labels' => $labels,\n\t \t'public' => true,\n\t\t\t'supports' => array('title', 'editor', 'thumbnail', 'excerpt', 'post-formats'),\n\t\t\t'capability_type' => 'post',\n\t\t\t'rewrite' => array('slug' => apply_filters('people_rewrite_slug', $this->slug)),\n\t\t\t'menu_position' => 9,\n\t\t\t'has_archive' => true\n\t\t); \n\t\n\t\tregister_post_type(self::$post_type, $args);\n\t}", "title": "" }, { "docid": "f1a3dc28956e437f495a834622967767", "score": "0.46660176", "text": "public function restAccountsAddressesPost($_rest_accounts_addresses = null)\n {\n list($response) = $this->restAccountsAddressesPostWithHttpInfo($_rest_accounts_addresses);\n return $response;\n }", "title": "" }, { "docid": "b99b48d3d16d504b820b6947e74953f5", "score": "0.4659271", "text": "public function run()\n {\n \\App\\Models\\AddressType::create(['type' => 'Home Address', 'is_default' => '1', 'type_of' => 'home', 'created_by' => '0']);\n \\App\\Models\\AddressType::create(['type' => 'Company Address', 'is_default' => '1', 'type_of' => 'company', 'created_by' => '0']);\n \\App\\Models\\AddressType::create(['type' => 'Mailing Address', 'is_default' => '1', 'type_of' => 'mailing', 'created_by' => '0']);\n \\App\\Models\\AddressType::create(['type' => 'Future Address', 'is_default' => '1', 'type_of' => 'future', 'created_by' => '0']);\n }", "title": "" }, { "docid": "5fa2363d59a17d76f9b5e2d7415306d8", "score": "0.46539152", "text": "public function addPostType($configs = array())\n {\n $this->core->getCoreMenu()->getPosttype()->addPostType($configs);\n }", "title": "" }, { "docid": "ccbc2787282e01208a609388e376b3dc", "score": "0.4640212", "text": "public function restAccountsAddressesPostWithHttpInfo($_rest_accounts_addresses = null)\n {\n $request = $this->restAccountsAddressesPostRequest($_rest_accounts_addresses);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\Address' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\Address', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\Address';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\Address',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "be6e8eeee372f737b7215e8f0a55a23d", "score": "0.46401674", "text": "public static function registerPostType()\n {\n }", "title": "" }, { "docid": "d5b93caddf3aec217edbe25d7b7b35b0", "score": "0.4633744", "text": "protected function restAccountsContactsOptionTypesOptionTypeIdPutRequest($option_type_id, $_rest_accounts_contacts_option_types_option_type_id = null)\n {\n // verify the required parameter 'option_type_id' is set\n if ($option_type_id === null || (is_array($option_type_id) && count($option_type_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $option_type_id when calling restAccountsContactsOptionTypesOptionTypeIdPut'\n );\n }\n\n $resourcePath = '/rest/accounts/contacts/option_types/{optionTypeId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($option_type_id !== null) {\n $resourcePath = str_replace(\n '{' . 'optionTypeId' . '}',\n ObjectSerializer::toPathValue($option_type_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($_rest_accounts_contacts_option_types_option_type_id)) {\n $_tempBody = $_rest_accounts_contacts_option_types_option_type_id;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "de715976b55ce123033ee1f660c16085", "score": "0.46187803", "text": "protected function getOroAddress_Form_Type_TypedAddressService()\n {\n return $this->services['oro_address.form.type.typed_address'] = new \\Oro\\Bundle\\AddressBundle\\Form\\Type\\TypedAddressType();\n }", "title": "" }, { "docid": "933a4c1ecab2d20af678a4e4484c1a6d", "score": "0.46130648", "text": "public function addAddress($entity, Address $address, $isMain);", "title": "" }, { "docid": "606e46768832e4d54f09a5f132ca3a3e", "score": "0.46074128", "text": "function radius_put_addr($radius_handle, $type, $addr, $options, $tag){}", "title": "" }, { "docid": "4b82170386fb0863c311ea87b411d8f7", "score": "0.46022564", "text": "protected function restAccountsContactsOptionTypesGetRequest($with = null)\n {\n\n $resourcePath = '/rest/accounts/contacts/option_types';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($with)) {\n $with = ObjectSerializer::serializeCollection($with, '', true);\n }\n if ($with !== null) {\n $queryParams['with'] = $with;\n }\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "d960d9a754bb1c030b0b20a72eb4e2d6", "score": "0.45992416", "text": "public function addAddress($request)\n {\n try {\n return $this->userAddresses->create($request->all());\n } catch (\\Exception $e) {\n return self::catchExceptions($e->getMessage());\n }\n }", "title": "" }, { "docid": "f4c50d4584d84e525a2f37f9a2503e56", "score": "0.4575898", "text": "private function _addAddress($cid, $locationType = self::WORK) {\n $params = array(\n 'contact_id' => $cid,\n 'location_type_id' => $locationType,\n 'street_number' => mt_rand(1, 1000),\n 'street_number_suffix' => ucfirst($this->randomChar()),\n 'street_name' => $this->randomItem('street_name'),\n 'street_type' => $this->randomItem('street_type'),\n 'street_number_postdirectional' => $this->randomItem('address_direction'),\n 'city' => $this->randomItem('city'),\n 'state_province_id' => $this->randomItem('state_province'),\n 'country_id' => $this->randomItem('country'),\n 'postal_code' => $this->randomItem('postal_code')\n );\n\n $params['street_address'] = $params['street_number'] . $params['street_number_suffix'] . \" \" . $params['street_name'] . \" \" . $params['street_type'] . \" \" . $params['street_number_postdirectional'];\n\n\n if ($params['location_type_id'] == self::WORK) {\n $params['supplemental_address_1'] = $this->randomItem('supplemental_addresses_1');\n }\n\n\n $this->_addDAO('Address', $params);\n return $params;\n }", "title": "" }, { "docid": "85f3ef9d875b98baa4f360f3c2ec8e09", "score": "0.45758405", "text": "public function restAccountsAddressesPostAsyncWithHttpInfo($_rest_accounts_addresses = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\Address';\n $request = $this->restAccountsAddressesPostRequest($_rest_accounts_addresses);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "05c00d03d2c1ec11859fb2ed7051b9a9", "score": "0.45685497", "text": "public function userAddressCreate ()\n {\n $url = $this->_getUrl('user/address');\n $headers = $this->_genHeader();\n $response = Request::post($url, $headers);\n\n return $response->body;\n }", "title": "" }, { "docid": "1e033a861cc582ae7c92b40f35c781ed", "score": "0.45669818", "text": "public function handleCreateAddressFromGoogleMapApi()\n {\n $address = $this->getParameter('address');\n\n $entity = $this->repository->createAddressFromGoogleMapApi($address);\n\n $addressEntity = $this->repository->create($entity);\n\n if ($this->isAjax()) {\n $this->payload->addressId = $addressEntity->getId();\n $this->sendPayload();\n } else {\n $this->flashMessage(_('Address is successfully created.'), 'success');\n $this->redirect('this');\n }\n }", "title": "" } ]
618c4d145f964ad1822e0c21350e4ff9
Get the throttle key for the given request.
[ { "docid": "51f8ecd0778d4d5d4e408e2217628181", "score": "0.7362366", "text": "protected function throttleKey(Request $request)\n {\n return Str::lower($request->input($this->username())) . '|' . $request->ip();\n }", "title": "" } ]
[ { "docid": "13e3eeb7fe1bd3e25baa480f65db3b39", "score": "0.7485706", "text": "protected function throttleKey(Request $request): string\n {\n return Str::lower($request->input($this->username())) . '|' . $request->ip();\n }", "title": "" }, { "docid": "be72b79be2e7d6ffc485d006fb62d6d8", "score": "0.7300549", "text": "protected function throttleKey(Request $request)\n {\n $anonymous = \"anonymous\";\n return $anonymous.'|'.$request->ip();\n }", "title": "" }, { "docid": "914cfdee8489d7f5291e66569db1f92d", "score": "0.7277142", "text": "protected function throttleKey(Request $request): string\n {\n return Str::lower($request->session()->get('two-factor:auth')[$this->username()]).'|'.$request->ip();\n }", "title": "" }, { "docid": "dfec5da730c00e686f9651c7be09d06f", "score": "0.72581744", "text": "public function throttleKey(Request $request)\n {\n return Str::lower($request->input($this->username())).'|'.$request->ip();\n }", "title": "" }, { "docid": "7f48c26884021a1296c418a43d18ec41", "score": "0.70728487", "text": "public function throttleKey()\n {\n return strtolower(Str::extractName($this->request->getPost('email'))) . '_' . str_replace(\"::\", \"\", $this->request->getIPAddress());\n }", "title": "" }, { "docid": "02468c8c600732f4e8848c618d4ca39e", "score": "0.66104835", "text": "protected function getKey($request)\n {\n return $request->input('_key') ?: $request->header('X-API-KEY');\n }", "title": "" }, { "docid": "38ad8446487af3491c0c86ca151ac330", "score": "0.62622654", "text": "public function get() {\n\n // Generate a new request key\n $requestKey = str_random();\n\n // Cache it for 24 hours\n // Notice the value. This is the remaining 'uses' for the key, in the case\n // that there is a submission error. Each error occurrence will decrement the\n // value, and a successful submission will remove it entirely.\n Cache::put($requestKey, $this->requestKeyErrorUses, self::REQUEST_KEY_LIFETIME);\n\n return $requestKey;\n }", "title": "" }, { "docid": "dfe5e7f328b5ac2e5cd0e49b004140dc", "score": "0.6138269", "text": "protected function cacheKey($request)\n {\n return sprintf('ldapUser.%s', Str::slug($this->identifier($request)));\n }", "title": "" }, { "docid": "ae7de15f1616ca1c6ac253ea822a4357", "score": "0.6121221", "text": "public function key()\n {\n return key( $this->data[$this->request_method] );\n }", "title": "" }, { "docid": "8045ed2671cafe5df2b45c59cadc42f7", "score": "0.6042451", "text": "public function get()\n {\n $throttle = $this->where('ip', $this->request->ip())->first();\n if (!$throttle) {\n $throttle = $this->createThrottle();\n } else {\n $throttle = $this->hitThrottle($throttle);\n }\n\n return $throttle;\n }", "title": "" }, { "docid": "fe2c473dbb570e7add3e959e9debdb58", "score": "0.60424006", "text": "private function getMetadataKey(Request $request)\n {\n if (isset($this->metadataKeyCache[$request])) {\n return $this->metadataKeyCache[$request];\n }\n\n return $this->metadataKeyCache[$request] = $this->metadataKeyPrefix.sha1($request->getUri());\n }", "title": "" }, { "docid": "49f87a00b3d4f5f9f98623970863cff7", "score": "0.5696692", "text": "public function key()\r\n {\r\n return key($this->headers);\r\n }", "title": "" }, { "docid": "dcd50d6d2775da7e6fe13229187af770", "score": "0.56698585", "text": "public function getHashKey()\n {\n $this->hashKey = strtr($this->getIdentifier(), ' ', '_') . md5(\n sprintf(\n '%s_%s_%s_%s',\n $this->request->getContent(),\n $this->request->getUri(),\n $this->canBeWarmed() ? 'warm' : '',\n json_encode($this->request->headers->all())\n )\n );\n return $this->hashKey;\n }", "title": "" }, { "docid": "4d8f30f10e64c615ee27fb3203092bd8", "score": "0.56554085", "text": "public function getKeyFrom(ServerRequestInterface $request): ?string;", "title": "" }, { "docid": "0ffb31cdccd2350eded5856023175301", "score": "0.5524541", "text": "public function getJwtKey()\n {\n $key = $this->scopeConfig->getValue('optimizme/jwt/key', 'default', 0);\n if (is_null($key)) {\n $key = '';\n }\n\n return $key;\n }", "title": "" }, { "docid": "b69f5cbd225412bb8196fb333040a2a6", "score": "0.546314", "text": "protected function getCacheKey(NovaRequest $request)\n\t{\n\t\treturn sprintf(\n\t\t\t'nova.metric.%s.%s.%s.%s.%s',\n\t\t\t$this->uriKey(),\n\t\t\t$request->input('range', 'no-range'),\n\t\t\t$request->input('timezone', 'no-timezone'),\n\t\t\t$request->input('twelveHourTime', 'no-12-hour-time'),\n\t\t\t$request->user()->id\n\t\t);\n\t}", "title": "" }, { "docid": "0b86c884c4aab66c4c29c4ba2d2f1589", "score": "0.5326118", "text": "public static function getFromRequest(?Request $request): string\n {\n if (!$request) {\n return static::NOWHERE;\n }\n \n return $request->attributes->get(static::KEY) ?: static::NOWHERE;\n }", "title": "" }, { "docid": "a18737c022bff9481c30190b4aabb778", "score": "0.5319803", "text": "protected function getControlLockKey()\n {\n return $this->qualifyKey('control_lock');\n }", "title": "" }, { "docid": "bde8c77a4c082d389e24d47be09c116b", "score": "0.53013426", "text": "public static function getAccessKey(Request $request) {\n\t\t$accessKey = $request->getHeaderLine(AppConstant::HEADER_ACCESS_KEY);\n\t\tif ($accessKey !== null) {\n\t\t\treturn $accessKey;\n\t\t}\n\t\t$accessKey = $request.getHeaderLine(strtolower(AppConstant::HEADER_ACCESS_KEY));\n\t\tif ($accessKey !== null) {\n\t\t\treturn $accessKey;\n\t\t}\n\t\t$accessKey = $request.getParam(AppConstant::PARAMETER_ACCESS_KEY);\n\t\treturn $accessKey;\n\t}", "title": "" }, { "docid": "2f3d49dd1dcab14890dc1b7d54672769", "score": "0.52107704", "text": "public function getThrottleTime();", "title": "" }, { "docid": "f9c14056c306458f0ccd3e354bf685a2", "score": "0.52041787", "text": "public function key()\n {\n return str_replace('_', '-', preg_replace('/^HTTP_/', '', $this->header));\n }", "title": "" }, { "docid": "6b62d1e4f58225c098403461d8f6db5f", "score": "0.5198817", "text": "public function getCacheKey()\n {\n /**\n * Don't prevent recalculation by saving generated cache key\n * because of ability to render single block instance with different data\n */\n $key = $this->getCacheKeyInfo();\n $key = array_values($key); // ignore array keys\n $key = implode('|', $key);\n $key = sha1($key);\n return $key;\n }", "title": "" }, { "docid": "8549a7c5de6573bf404aa9955d2a0b82", "score": "0.5195766", "text": "public static function get_cache_key() {\n\n\t\t$key = 'wpb_rs/cache/snippets/';\n\n\t\tif ( is_singular() ) {\n\t\t\treturn $key . 'singular/' . Helper_Model::instance()->get_current_post_id();\n\t\t}\n\n\t\tif ( get_queried_object() instanceof \\WP_Term ) {\n\t\t\treturn $key . 'term/' . get_queried_object_id();\n\t\t}\n\n\t\tif ( is_tax() ) {\n\t\t\treturn $key . 'tax/' . get_queried_object_id();\n\t\t}\n\n\t\tif ( is_author() ) {\n\t\t\treturn $key . 'author/' . get_queried_object_id();\n\t\t}\n\n\t\tif ( is_tag() ) {\n\t\t\treturn $key . 'category/' . get_queried_object_id();\n\t\t}\n\n\t\tif ( is_front_page() ) {\n\t\t\treturn $key . 'front_page';\n\t\t}\n\n\t\tif ( is_404() ) {\n\t\t\treturn $key . 'term/404';\n\t\t}\n\n\t\t$helper = Helper_Model::instance();\n\n\t\t# avoid unpredictable caching\n\t\treturn $key . $helper->get_short_hash( wp_guess_url() );\n\n\t}", "title": "" }, { "docid": "8b70f10859e6668a1afe144d71bb04c6", "score": "0.5181591", "text": "private function generateKey()\n {\n $key = $this->redisPrefix . 'stats:' . $this->type . ':' . $this->id;\n\n return $key;\n }", "title": "" }, { "docid": "92f9c7af45d507c267de51af9fc7976d", "score": "0.5179754", "text": "public function getCacheKey()\n {\n return $this->cacheKey;\n }", "title": "" }, { "docid": "92f9c7af45d507c267de51af9fc7976d", "score": "0.5179754", "text": "public function getCacheKey()\n {\n return $this->cacheKey;\n }", "title": "" }, { "docid": "7e8712438cd443ebee188c0e8c7a02c0", "score": "0.5163694", "text": "protected function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "a3dab4e3bca900dffb7755f97665ccf6", "score": "0.51456505", "text": "private function getKey()\n {\n\n $titan = new \\Config\\Titan();\n return $titan->json_web_token_key;\n }", "title": "" }, { "docid": "c8a792ade228591f75d7d77c918497fc", "score": "0.5140423", "text": "public function getKey()\n {\n if(isset($_SESSION['csrf_key']) && strlen($_SESSION['csrf_key']) > 0)\n {\n return $_SESSION['csrf_key'];\n }\n else\n {\n return $this->generateKey();\n }\n }", "title": "" }, { "docid": "c16cb7f72ec788c90cfd1af59a2c741e", "score": "0.513535", "text": "protected function GetCacheKey()\n\t{\n\t\t$key = (isset($this->params['hash']) ? $this->params['hash'] : '')\n\t\t. '|' . (isset($this->params['hashparent']) ? $this->params['hashparent'] : '')\n\t\t. '|' . (isset($this->params['sidebyside']) && ($this->params['sidebyside'] === true) ? '1' : '');\n\n\t\treturn $key;\n\t}", "title": "" }, { "docid": "7dfd2cdbbdd9d7ae2fbc5eeb1f670776", "score": "0.5128323", "text": "public function get_key( $key );", "title": "" }, { "docid": "523204dbaf2e9fc1dcb0e39dcc6f223c", "score": "0.5114169", "text": "protected function createThrottle()\n {\n $this->ip = $this->request->ip();\n $this->attempts = 0;\n switch ($this->expiryMetric) {\n case 'hour':\n $this->expires_at = Carbon::now()->addHours($this->expiryTimeLimit);\n break;\n\n case 'day':\n $this->expires_at = Carbon::now()->addDays($this->expiryTimeLimit);\n break;\n\n default:\n case 'week':\n $this->expires_at = Carbon::now()->addWeeks($this->expiryTimeLimit);\n break;\n }\n $this->created_at = Carbon::now();\n $throttle = $this->save();\n\n return $throttle;\n }", "title": "" }, { "docid": "2ff29f77b250d04a550089d1afd8a7c2", "score": "0.5095627", "text": "protected function getResourceKey()\n {\n return $this->resourceKey;\n }", "title": "" }, { "docid": "26c9d52b1455856a3c870d4b2fc39146", "score": "0.5081496", "text": "public function getLockKey($workload);", "title": "" }, { "docid": "b49cdc1ee3829786d6ddf26b9f42c907", "score": "0.50799096", "text": "public function inUseKey()\n {\n return $this->_key ?? $this->key();\n }", "title": "" }, { "docid": "37cf3aa17cb3d187d8800f8353c8c6de", "score": "0.50703937", "text": "public static function getLinkKey($request)\n\t{\n\t\tif (empty($request))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if the link is in the form of index.php?...\n\t\tif (is_string($request))\n\t\t{\n\t\t\t$args = array();\n\n\t\t\tif (strpos($request, 'index.php') === 0)\n\t\t\t{\n\t\t\t\tparse_str(parse_url(htmlspecialchars_decode($request), PHP_URL_QUERY), $args);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tparse_str($request, $args);\n\t\t\t}\n\n\t\t\t$request = $args;\n\t\t}\n\n\t\t// Only take the option, view and layout parts.\n\t\tforeach ($request as $name => $value)\n\t\t{\n\t\t\tif ((!in_array($name, self::$_filter)) && (!($name == 'task' && !array_key_exists('view', $request))))\n\t\t\t{\n\t\t\t\t// Remove the variables we want to ignore.\n\t\t\t\tunset($request[$name]);\n\t\t\t}\n\t\t}\n\n\t\tksort($request);\n\n\t\treturn 'index.php?' . http_build_query($request, '', '&');\n\t}", "title": "" }, { "docid": "8fc0a61f5118263629b6f10ab14af475", "score": "0.5065185", "text": "public function getKey()\n {\n return strval($this->getParameter('key')) ?: null;\n }", "title": "" }, { "docid": "3b7370e66dc2bfc93b4b7470c9488caa", "score": "0.5043946", "text": "protected function cacheKey(): string\n {\n return sha1($this->namespace . $this->getIp());\n }", "title": "" }, { "docid": "d3b087a3321eeca19577042f7af0cf84", "score": "0.5033324", "text": "public static function handleRateLimit(Request $request)\n {\n $ip = md5($request->getClientIp());\n $user = self::user();\n $app = self::app();\n \n if ($user && $app == null) {\n $ratelimit = 3;\n $keyNow = \"app_rate_limit_ip_{$ip}_{$user->getId()}_now\";\n $keyBurst = \"app_rate_limit_ip_{$ip}_{$user->getId()}_burst\";\n }\n \n if ($app) {\n $keyNow = \"app_rate_limit_ip_{$ip}_{$app->getApiKey()}_now\";\n $keyBurst = \"app_rate_limit_ip_{$ip}_{$app->getApiKey()}_burst\";\n }\n \n // ignore if neither\n if (!isset($keyNow)) {\n return;\n }\n \n // increment req counts\n $count = Redis::Cache()->get($keyNow);\n $count = $count ? $count + 1 : 1;\n Redis::Cache()->set($keyNow, $count, 1);\n \n if ($app) {\n // increment burst\n $burst = Redis::Cache()->get($keyBurst);\n $burst = $burst ? $burst + 1 : 1;\n Redis::Cache()->set($keyBurst, $burst, 5);\n \n // rate limit is 2x while not in burst timeout\n $burstlimit = 5;\n $ratelimit = $burst > $burstlimit ? $app->getApiRateLimit() : ($app->getApiRateLimit() * 2);\n }\n\n // check limit against this ip\n if ($count > $ratelimit && ($app == null || $burst > $burstlimit)) {\n // if the app has Google Analytics, send an event\n if ($app && $app->hasGoogleAnalytics()) {\n GoogleAnalytics::event(\n $app->getGoogleAnalyticsId(),\n 'Exceptions',\n 'ApiRateLimitException',\n $ip\n );\n }\n \n throw new ApiRateLimitException();\n }\n }", "title": "" }, { "docid": "7ebffff78716a9dffbcbdefc0c08eaed", "score": "0.5032852", "text": "public function cacheKey() {\n $params = $this->getParameters();\n $ret = '';\n $this->make_cache_key($params, $ret);\n\n return md5($ret);\n }", "title": "" }, { "docid": "4b3792e61df3686538e9e9a7bbf0d6f0", "score": "0.50246304", "text": "protected function getChallenger(Request $request) {\n foreach ($this->authCollector->getSortedProviders() as $provider_id => $provider) {\n if (($provider instanceof AuthenticationProviderChallengeInterface) && !$provider->applies($request) && $this->applyFilter($request, FALSE, $provider_id)) {\n return $provider_id;\n }\n }\n }", "title": "" }, { "docid": "c9183b2fb5f6cfa384fdfce33fa8e091", "score": "0.5011403", "text": "private function getKey($action)\n {\n return pow(2, array_search($action, $this->actions));\n }", "title": "" }, { "docid": "7b38c45f00add65ab42738da1d4580fa", "score": "0.5002572", "text": "public function get_key(): string {\n\t\treturn $this->key;\n\t}", "title": "" }, { "docid": "2ea2bb5b24cbff85bd9034899728062e", "score": "0.49987105", "text": "public function getControllerExtensionKey(): string\n {\n return $this->request->getControllerExtensionKey();\n }", "title": "" }, { "docid": "dcf2cf6cc955fd7aecbd01e6eb284501", "score": "0.49983683", "text": "public function getCacheKeyPrefix(): string;", "title": "" }, { "docid": "2adedb672c36197a3d33ad6256b62ce3", "score": "0.49974176", "text": "protected static function getKey()\n {\n if (!isset(self::$key)) {\n self::$key = DB::table('gaode_map_keys')\n ->where('in_use', 1)\n ->first();\n }\n return self::$key;\n }", "title": "" }, { "docid": "11ab39ff591e037e7371a0ee9d45308b", "score": "0.49878937", "text": "public static function getKeyName()\n {\n return function ($resource) {\n return $resource->getKey();\n };\n }", "title": "" }, { "docid": "f357583c4156f23771cb8f019d6428d0", "score": "0.49808577", "text": "private function getRequestApiKeyInterval() {\n return $this->requestApiKeyInterval;\n }", "title": "" }, { "docid": "05a9c571a13f36d6131e748cc56786fb", "score": "0.49761778", "text": "public function getRateLimit($request, $action);", "title": "" }, { "docid": "78ac34ca849231799add2efbc34f353c", "score": "0.4970413", "text": "public function getKey()\n {\n return $this->claimKey;\n }", "title": "" }, { "docid": "37d6ea6c6919bbe627ccdf7a4d47ba13", "score": "0.4965623", "text": "public function getTokenKey()\n {\n return $this->tokenKey;\n }", "title": "" }, { "docid": "37d6ea6c6919bbe627ccdf7a4d47ba13", "score": "0.4965623", "text": "public function getTokenKey()\n {\n return $this->tokenKey;\n }", "title": "" }, { "docid": "5c23a54a64a7f1e617dd745440ae4268", "score": "0.49656004", "text": "public function key()\n {\n return current($this->keys);\n }", "title": "" }, { "docid": "71c69336b839aef34ced040d65ba41c1", "score": "0.49581748", "text": "public function key()\n {\n return $this->counter;\n }", "title": "" }, { "docid": "44fa31d036ad69fbf1a880c1d8e7c1cf", "score": "0.49454796", "text": "public function getKey()\r\n {\r\n return 0;\r\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.4941469", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "ddc6f6a1006cb8e50c71cc15032ee5da", "score": "0.4933258", "text": "public function getKey($key);", "title": "" }, { "docid": "0f5a2c9b41597a1afdf41c06020194d6", "score": "0.49263775", "text": "public function getRateLimit($request, $action){\n // todo\n return static::getDefaultRateLimit();\n }", "title": "" }, { "docid": "a0055b210fd7c2d267dac43ee6d5dff1", "score": "0.49217784", "text": "public function getRequest_no()\n {\n return $this->request_id;\n }", "title": "" }, { "docid": "70685f57325738c303aa4bfcf40af652", "score": "0.49089602", "text": "public function getIndexingRequestCtr()\n {\n return self::$indexing_request_ctr;\n }", "title": "" }, { "docid": "f167461f815dcde3cfc96cb0af46bc5a", "score": "0.49072322", "text": "protected function getCacheKey($endpoint) {\n return $this->cacheKey . ':' . base64_encode($endpoint);\n }", "title": "" }, { "docid": "6e51c95a897acdc5d81674249e913316", "score": "0.49058136", "text": "public function getKey() {\n return $this->key;\n }", "title": "" }, { "docid": "6e51c95a897acdc5d81674249e913316", "score": "0.49058136", "text": "public function getKey() {\n return $this->key;\n }", "title": "" }, { "docid": "6e51c95a897acdc5d81674249e913316", "score": "0.49058136", "text": "public function getKey() {\n return $this->key;\n }", "title": "" }, { "docid": "9f76ca179a13278aec9d34bc89a26841", "score": "0.49046552", "text": "public function key() {\n return key($this->logs);\n }", "title": "" }, { "docid": "c685fc723d7f0910c8bafd4c602458f7", "score": "0.49018916", "text": "public function getControllerKey()\n {\n return $this->controllerKey;\n }", "title": "" }, { "docid": "30e02bc90b1e15d3878b684f930e44d8", "score": "0.49000347", "text": "public function getKey()\n {\n\n return $this->key;\n\n }", "title": "" }, { "docid": "2c423c98852e9224f15a4a6673412871", "score": "0.48999965", "text": "public function getKey() {\n\t\treturn $this->key;\n\t}", "title": "" }, { "docid": "2c423c98852e9224f15a4a6673412871", "score": "0.48999965", "text": "public function getKey() {\n\t\treturn $this->key;\n\t}", "title": "" }, { "docid": "23f81f31b064cf940f29de0f977cf0c0", "score": "0.48997787", "text": "protected function getRouteName(Request &$request)\n {\n return $request->attributes->get('_route');\n }", "title": "" }, { "docid": "5f5a1bcd8be28a7f2ca1f9c1298b04b0", "score": "0.48996264", "text": "public function key()\n {\n return $this->key;\n }", "title": "" }, { "docid": "5f5a1bcd8be28a7f2ca1f9c1298b04b0", "score": "0.48996264", "text": "public function key()\n {\n return $this->key;\n }", "title": "" } ]
14a14e15c71275383e87c4ca12231738
Redirects to a nicer search permalink. Redirects query string based search URIs (`s=`) to a permalink based URI (`/search/`). Additional query string arguments are preserved.
[ { "docid": "b23c125c40346e14a400403002f6a5f9", "score": "0.8624368", "text": "public function redirect_search() {\n\t\tglobal $wp_rewrite;\n\n\t\tif ( ! get_option( 'permalink_structure' ) || ! is_search() || is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$search_base = $wp_rewrite->search_base;\n\n\t\tif ( strpos( $_SERVER['REQUEST_URI'], \"/{$search_base}/\" ) !== false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$qs = array();\n\t\tparse_str( $_SERVER['QUERY_STRING'], $qs );\n\t\tunset( $qs['s'] );\n\n\t\t$s = urlencode( get_query_var( 's' ) );\n\t\t$query = empty( $qs ) ? '' : sprintf( '?%s', http_build_query( $qs ) );\n\t\t$url = home_url( sprintf( '/%s/%s%s', $search_base, $s, $query ) );\n\n\t\twp_redirect( $url );\n\t\texit;\n\t}", "title": "" } ]
[ { "docid": "166a1710e637940e97e475da5751be52", "score": "0.8436512", "text": "function nice_search_redirect() {\n\t\t\tglobal $wp_rewrite;\n\n\t\t\tif ( !isset( $wp_rewrite ) || !is_object( $wp_rewrite ) || !$wp_rewrite->using_permalinks() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$search_base = $wp_rewrite->search_base;\n\t\t\tif ( is_search() && !is_admin() && strpos( $_SERVER['REQUEST_URI'], \"/{$search_base}/\" ) === false ) {\n\t\t\t\twp_redirect( home_url( \"/{$search_base}/\" . urlencode( get_query_var( 's' ) ) ) );\n\t\t\t\texit();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "68ebba0d4f782ca3d0f67c4ec38d5d6e", "score": "0.7983206", "text": "function search_pretty_i18n_permalink_redirect() {\n\t \tif (is_search() && strpos($_SERVER['REQUEST_URI'], '/wp-admin/') === false && strpos($_SERVER['REQUEST_URI'], '/'._x('search','search rewrite slug for use with permalinks','cb-std-sys').'/') === false) {\n\t\t wp_redirect(home_url( _x('search','search rewrite slug for use with permalinks','cb-std-sys'). '/' . str_replace( array(' ', '%20'), array('+', '+'), urlencode( get_query_var( 's' ) ) ) ), 301);\n\t\t exit();\n\t \t}\n }", "title": "" }, { "docid": "0ddb02da3ebe9dad34b7a38f542eacb0", "score": "0.7042154", "text": "function basey_one_match_redirect() {\n\tif (is_search() ) {\n\t\tglobal $wp_query;\n\t\tif ( $wp_query->post_count == 1) {\n\t\t\twp_redirect( get_permalink( $wp_query->posts['0']->ID ) );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "8e704373516ee8a412ec4ece86b52f96", "score": "0.6955619", "text": "function wpeb_redirect_single_search_result() {\n if (is_search()) {\n global $wp_query;\n if ($wp_query->post_count === 1) {\n wp_redirect(get_permalink($wp_query->posts[0]->ID));\n exit;\n }\n }\n }", "title": "" }, { "docid": "0f04fc6a0b98202d6394ebb3292cf984", "score": "0.6932611", "text": "function redirect_to_single_search_result() {\n if( is_search() ){\n global $wp_query;\n if( $wp_query->post_count == 1 ){\n wp_redirect( get_permalink($wp_query->posts['0']->ID), 302 );\n exit;\n }\n }\n}", "title": "" }, { "docid": "faf2c7c2f49a5958cbb0f59da2b60d11", "score": "0.6459252", "text": "private function set_search_query()\n\t{\n\t\tif (isset($_GET[\"search\"]) && '' != $_GET[\"search\"]) { // perform the search in Views titles and decriptions and return an array to be used in post__in\n\t\t\t$this->s_param = urldecode(sanitize_text_field($_GET[\"search\"]));\n\t\t\t$this->args['s'] = $this->s_param;\n\t\t\t$this->mod_url['search'] = '&amp;search=' . sanitize_text_field($_GET[\"search\"]);\n\t\t}\n\t}", "title": "" }, { "docid": "3273327a1428cce7d8b2012a70014b85", "score": "0.60712004", "text": "function url_search_all($search_query=\"\") {\n return 'search?q='.$search_query;\n }", "title": "" }, { "docid": "938c12fe0012df8bd89a48325f7b1950", "score": "0.60394275", "text": "function aramco_get_relative_search_url($term) {\n global $wp_rewrite;\n $relative_url = null;\n if ($wp_rewrite->using_permalinks()) {\n $structure = $wp_rewrite->get_search_permastruct();\n if (strpos($structure, '%search%') !== false) {\n $relative_url = str_replace('%search%', rawurlencode($term), $structure);\n }\n }\n if ( ! $relative_url) {\n $relative_url = '?s=' . urlencode($term);\n }\n return $relative_url;\n}", "title": "" }, { "docid": "5f2f4743afbcbedfcaab7894979a57cb", "score": "0.5953025", "text": "public function search()\n\t{\n\t\t$search = $this->input->post('search_item');\n\t\t\n\t\tif(!empty($search))\n\t\t{\n\t\t\t$web_name = $this->site_model->create_web_name($search);\n\t\t\tredirect('blog/search/'.$web_name);\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\tredirect('blog');\n\t\t}\n\t}", "title": "" }, { "docid": "5cd5b5d4815bffc5504f6ae9f8d8c77a", "score": "0.5896288", "text": "abstract protected function getSearchUrl();", "title": "" }, { "docid": "259c4b657079d51358d4f3b7e65d6dcf", "score": "0.5862016", "text": "function culturefeed_pages_basic_search_form_submit($form, &$form_state) {\n\n if ($form_state['values']['page']) {\n $query['search'] = $form_state['values']['page'];\n }\n if ($form_state['values']['zipcode']) {\n $query['zipcode'] = $form_state['values']['zipcode'];\n }\n $form_state['redirect'] = array(\n $_GET['q'],\n array('query' => $query),\n );\n\n}", "title": "" }, { "docid": "68f5fa5aa279a1b765c8cd71e45f4c8b", "score": "0.5844321", "text": "public function search() {\n\n // set the page we will redirect to\n $url['action'] = 'index';\n \n // build a URL will all the search elements in it\n foreach ($this->data as $k => $v) {\n foreach ($v as $kk => $vv) {\n $url[$k . '.' . $kk] = $vv;\n }\n }\n\n $this->redirect($url, null, true);\n }", "title": "" }, { "docid": "0e1bc5fbfc8cb40aa0e3395ede80f188", "score": "0.584093", "text": "public function redirect_standard() {\n\t\tif($this->replaceState) {\n\t\t\tthrow new \\Exception(\"Redirect Standard was called twice in the same page load. This is wrong\");\n\t\t}\n\t\t$replace = false;\n\t\t$args = func_get_args();\n\t\tif(empty($args)) {\n\t\t\treturn false;\n\t\t}\n\t\tparse_str($_SERVER['QUERY_STRING'], $params);\n\t\t$vars = array_keys($params);\n\t\tforeach($args as $arg) {\n\t\t\tif((!in_array($arg,$vars) && isset($_REQUEST[$arg])) || (in_array($arg,$vars) && isset($_REQUEST[$arg]) && $_REQUEST[$arg] != $params[$arg])) {\n\t\t\t\t$params[$arg] = $_REQUEST[$arg];\n\t\t\t\t$replace = true;\n\t\t\t}\n\t\t}\n\t\tif(!$replace) {\n\t\t\treturn false;\n\t\t}\n\t\t$base = basename($_SERVER['PHP_SELF']);\n\t\t$this->queryString = $base.\"?\".http_build_query($params);\n\t\t$this->replaceState = true;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "0300d82fcf54abcf05255e97442249af", "score": "0.58069444", "text": "function redirectToUserSearch($url_conds)\n{\n $redirect_url=\"/IBSng/admin/user/search_user.php?search=1&show__normal_username=1&show__group=1&show__credit=1&show__owner=1\";\n if($url_conds!=\"\") \n\t$redirect_url.=\"&{$url_conds}\";\n redirect($redirect_url.\"#show_results\");\n}", "title": "" }, { "docid": "9f2b598368deb2dda7f9f491e4630d03", "score": "0.5670481", "text": "private function setRedirect()\n {\n $currenturi_encoded = $this->_visited_request_uri; // Raw (encoded): with %## chars\n // Remove the base path\n $basepath = trim($this->params->get('basepath', ''), ' /'); // Decoded: without %## chars (now you can see spaces, cyrillics, ...)\n $basepath = urlencode($basepath); // Raw (encoded): with %## chars\n $basepath = str_replace('%2F', '/', $basepath);\n $basepath = str_replace('%3A', ':', $basepath);\n if ($basepath != '')\n {\n if (strpos($currenturi_encoded, '/'.$basepath.'/') === 0)\n {\n $currenturi_encoded = substr($currenturi_encoded, strlen($basepath) + 1); // Raw (encoded): with %## chars\n }\n }\n $currenturi = urldecode($currenturi_encoded); // Decoded: without %## chars (now you can see spaces, cyrillics, ...)\n $currentfullurl_encoded = $this->_visited_full_url; // Raw (encoded): with %## chars\n $currentfullurl = urldecode($currentfullurl_encoded); // Decoded: without %## chars (now you can see spaces, cyrillics, ...)\n\n $db = JFactory::getDbo();\n $db->setQuery('SELECT * FROM ( '\n . 'SELECT * FROM #__redj_redirects '\n . 'WHERE ( '\n . '( (' . $db->quote($currenturi) . ' REGEXP BINARY fromurl)>0 AND (case_sensitive<>0) AND (decode_url<>0) AND (request_only<>0) ) '\n . 'OR ( (' . $db->quote($currenturi_encoded) . ' REGEXP BINARY fromurl)>0 AND (case_sensitive<>0) AND (decode_url=0) AND (request_only<>0) ) '\n . 'OR ( (' . $db->quote($currentfullurl) . ' REGEXP BINARY fromurl)>0 AND (case_sensitive<>0) AND (decode_url<>0) AND (request_only=0) ) '\n . 'OR ( (' . $db->quote($currentfullurl_encoded) . ' REGEXP BINARY fromurl)>0 AND (case_sensitive<>0) AND (decode_url=0) AND (request_only=0) ) '\n . 'OR ( (' . $db->quote($currenturi) . ' REGEXP fromurl)>0 AND (case_sensitive=0) AND (decode_url<>0) AND (request_only<>0) ) '\n . 'OR ( (' . $db->quote($currenturi_encoded) . ' REGEXP fromurl)>0 AND (case_sensitive=0) AND (decode_url=0) AND (request_only<>0) ) '\n . 'OR ( (' . $db->quote($currentfullurl) . ' REGEXP fromurl)>0 AND (case_sensitive=0) AND (decode_url<>0) AND (request_only=0) ) '\n . 'OR ( (' . $db->quote($currentfullurl_encoded) . ' REGEXP fromurl)>0 AND (case_sensitive=0) AND (decode_url=0) AND (request_only=0) ) '\n . ') '\n . 'AND published=1 '\n . 'ORDER BY ordering ) AS A '\n . 'WHERE A.skip=\\'\\' '\n . 'OR ( (' . $db->quote($currentfullurl) . ' REGEXP BINARY A.skip)=0 AND (case_sensitive<>0) AND (decode_url<>0) ) '\n . 'OR ( (' . $db->quote($currentfullurl_encoded) . ' REGEXP BINARY A.skip)=0 AND (case_sensitive<>0) AND (decode_url=0) ) '\n . 'OR ( (' . $db->quote($currentfullurl) . ' REGEXP A.skip)=0 AND (case_sensitive=0) AND (decode_url<>0) ) '\n . 'OR ( (' . $db->quote($currentfullurl_encoded) . ' REGEXP A.skip)=0 AND (case_sensitive=0) AND (decode_url=0) ) ');\n $items = $db->loadObjectList();\n if ( count($items) > 0 )\n {\n // Notes: if more than one item matches with current URI, we takes only the first one with ordering set\n if ( !empty($items[0]->tourl) )\n {\n // Get the application object\n $app = JFactory::getApplication();\n\n // Initialize URL related variables\n $visited_siteurl = $this->_siteurl;\n\n $visited_full_url = $this->_visited_full_url;\n\n JUri::reset();\n $uri_visited_full_url = JUri::getInstance($visited_full_url);\n $uri_visited_full_url_parts['scheme'] = $uri_visited_full_url->getScheme();\n $uri_visited_full_url_parts['host'] = $uri_visited_full_url->getHost();\n $uri_visited_full_url_parts['port'] = $uri_visited_full_url->getPort();\n $uri_visited_full_url_parts['user'] = $uri_visited_full_url->getUser();\n $uri_visited_full_url_parts['pass'] = $uri_visited_full_url->getPass();\n $uri_visited_full_url_parts['path'] = $uri_visited_full_url->getPath();\n $uri_visited_full_url_parts['query'] = $uri_visited_full_url->getQuery();\n $uri_visited_full_url_parts['authority'] = (strlen($uri_visited_full_url_parts['port']) > 0) ? $uri_visited_full_url_parts['host'] . ':' . $uri_visited_full_url_parts['port'] : $uri_visited_full_url_parts['host'];\n $uri_visited_full_url_parts['authority'] = (strlen($uri_visited_full_url_parts['user']) > 0) ? $uri_visited_full_url_parts['user'] . ':' . $uri_visited_full_url_parts['pass'] . '@' . $uri_visited_full_url_parts['authority'] : $uri_visited_full_url_parts['authority'];\n\n $uri_visited_full_url_vars = $uri_visited_full_url->getQuery(true);\n\n $baseonly = $this->_baseonly;\n $pathfrombase = (strlen($baseonly) > 0) ? substr($uri_visited_full_url_parts['path'], strlen($baseonly), strlen($uri_visited_full_url_parts['path']) - strlen($baseonly)) : $uri_visited_full_url_parts['path'];\n $uri_visited_full_url_paths['baseonly'] = $baseonly;\n $uri_visited_full_url_paths['path'] = $uri_visited_full_url_parts['path'];\n $uri_visited_full_url_paths['pathfrombase'] = $pathfrombase;\n\n // Set URL related variables in callback function\n self::manageMacroParams(array(1 => 'setsiteurl', 2 => $visited_siteurl));\n self::manageMacroParams(array(1 => 'seturl', 2 => $visited_full_url));\n self::manageMacroParams(array(1 => 'seturlparts', 2 => $uri_visited_full_url_parts));\n self::manageMacroParams(array(1 => 'seturlvars', 2 => $uri_visited_full_url_vars));\n self::manageMacroParams(array(1 => 'seturlpaths', 2 => $uri_visited_full_url_paths));\n\n // Set global info in callback function\n $global_info['sitename'] = $app->getCfg('sitename');\n $global_info['MetaDesc'] = $app->getCfg('MetaDesc');\n $global_info['MetaKeys'] = $app->getCfg('MetaKeys');\n self::manageMacroParams(array(1 => 'setglobalinfo', 2 => $global_info));\n\n // Update hits counter\n $last_visit = date(\"Y-m-d H:i:s\");\n $db->setQuery(\"UPDATE #__redj_redirects SET hits = hits + 1, last_visit = \" . $db->quote( $last_visit ) . \" WHERE id = \" . $db->quote( $items[0]->id ));\n $res = @$db->query();\n\n // Evaluate placeholders\n $placeholders = self::evaluatePlaceholders($items[0]->placeholders);\n\n // Replace placeholders\n $tourl = self::replacePlaceholders($placeholders, $items[0]->tourl);\n\n // Replace macros\n $tourl = self::replaceMacros($tourl);\n\n // Set the redirect (destination URL and redirect type)\n $this->_tourl = $tourl;\n $this->_redirect = $items[0]->redirect;\n }\n }\n\n }", "title": "" }, { "docid": "64f1b44a7f6af672d270170a8559c9c6", "score": "0.566536", "text": "public function simpleRedirect()\n {\n $currentUrl = trim($_SERVER['REQUEST_URI'], '/');\n $post = get_page_by_title($currentUrl, 'OBJECT', 'custom-short-link');\n\n if (!$post) {\n return;\n }\n\n $fields = get_fields($post->ID);\n $redirectTo = null;\n\n // Find redirect url\n switch ($fields['custom_short_links_redirect_url_type']) {\n case 'external':\n $redirectTo = $fields['custom_short_links_redirect_to_external'];\n break;\n\n case 'internal':\n $redirectTo = $fields['custom_short_links_redirect_to_internal'];\n break;\n }\n\n // Make redirect with selected method\n switch ($fields['custom_short_links_redirect_method']) {\n case 'meta':\n add_action('wp_head', function () use ($fields, $redirectTo) {\n echo '<meta http-equiv=\"refresh\" content=\"' . $fields['custom_short_links_timeout'] . ';URL=' . $redirectTo . '\">';\n });\n break;\n\n // 301 or 302\n default:\n wp_redirect($redirectTo, intval($fields['custom_short_links_redirect_method']));\n break;\n }\n }", "title": "" }, { "docid": "50fdcdba17df7c935c11022ee4fa9b34", "score": "0.56277907", "text": "function redirectWstr($rws_url = null) {\n\n\t\t// Set default if url not given\n\t\tif(!$rws_url) {\n\t\t\t$url = $_SERVER['PHP_SELF'];\n\t\t} else {\n\t\t\t$url = $rws_url; // set url\n\t\t}\n\n\t\t// Pull any query string and add\n\t\tif ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != \"\")) {\n\t\t\t$existing_qs = $_SERVER['QUERY_STRING'];\n\n\t\t\t// Filter out common doubling\n\t\t\t// Make this so an array can be submited and foreach will run through\n\t\t\tif (isset($_GET['updated'])) {\n\t\t\t\t$existing_qs = str_replace(\"update=\".$_GET['updated'],\"\",$existing_qs);\n\t\t\t}\n\n\t\t\t$url .= (strpos($url, '?')) ? \"&\" : \"?\";\n\t\t\t$url .= $existing_qs;\n\t\t\t// remove double ampersands - should improve this to remove multple ampersands\n\t\t\t$url = str_replace(\"&&\", \"&\", $url);\n\t\t}\n\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "cd591332fe21b1c3bd1800c76f7c5f3f", "score": "0.5613813", "text": "function search()\r\n\t{\r\n\t\t// the page we will redirect to\r\n\t\t$url['action'] = 'result';\r\n\t\t// build a URL will all the search elements in it\r\n\t\t// the resulting URL will be\r\n\t\t// example.com/cake/posts/index/Search.keywords:mykeyword/Search.tag_id:3\r\n\t\tforeach ($this->data as $k=>$v){\r\n\t\t\tforeach ($v as $kk=>$vv){\r\n\t\t\t\t$url[$k.'.'.$kk]=$vv;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// redirect the user to the url\r\n\t\t$this->redirect($url, null, true);\r\n\t}", "title": "" }, { "docid": "e96e1f7708e25099384b8bf684bfef34", "score": "0.5605109", "text": "function smarty_function_searchURL($params, $smarty, $template)\n{\n $url = _extract_param($params, 'base', './');\n \n // search query string:\n $url .= '?q=' . urlencode(_extract_param($params, 'q'));\n if ($feed_id = _extract_param($params, 'q')) {\n $url .= '+feed_id:' . urlencode($feed_id);\n }\n if ($category = _extract_param($params, 'category')) {\n $url .= '+category:' . urlencode(Solr::quoteTerm($category)); // part of search query string\n }\n \n // remaining search parameters:\n if ($f = _extract_param($params, 'f')) {\n $url .= '&f=' . formatFacets($f);\n }\n if ($lastfmUser = _extract_param($params, 'lastfmUser')) {\n $url .= '&lfm%3Auser=' . urlencode($lastfmUser);\n }\n \n // and any additional parameters provided:\n foreach ($params as $key=>$value) {\n $url .= '&' . $key . '=' . urlencode($value);\n }\n return $url;\n}", "title": "" }, { "docid": "6d41973cfa019752ad0364f79fe40faa", "score": "0.5593589", "text": "function mm_get_search_link( $page_link ) {\n\tglobal $wp_rewrite;\n\tif ( $wp_rewrite->using_permalinks() ) {\n\t\t$slash = ( substr( $page_link, -1 ) != '/' ) ? '/' : '';\n\t return $page_link . $slash . 'search/';\n\t}\n\telse {\n\t\t//if home page\n\t\tif ( strstr( $page_link, 'page_id' ) === false ) {\n\t\t\t$page_id = get_option( 'mm_catalog_page' );\n\t\t\t$page_link .= '?page_id=' . $page_id;\n\t\t}\n\t return $page_link . '&mm_search=1';\n\t}\n}", "title": "" }, { "docid": "c9dbb1910166f8bd03f0b66b6e1cf3ab", "score": "0.55885464", "text": "function search() {\r\n $url['action'] = 'search_index';\r\n\r\n // build a URL will all the search elements in it\r\n // the resulting URL will be\r\n // example.com/cake/posts/index/Search.keywords:mykeyword/Search.tag_id:3\r\n foreach ($this->data as $k => $v) {\r\n foreach ($v as $kk => $vv) {\r\n $url[$k . '.' . $kk] = $vv;\r\n }\r\n }\r\n\r\n // redirect the user to the url\r\n $this->redirect($url, null, true);\r\n }", "title": "" }, { "docid": "849f07725ae1f1849b550ffa95dfe9f4", "score": "0.5585431", "text": "public function locationPermalink();", "title": "" }, { "docid": "e56aedfca31e4f441778991f108fc1bf", "score": "0.5585286", "text": "function search() \r\n {\r\n // the page we will redirect to\r\n $url['action'] = 'result';\r\n // build a URL will all the search elements in it\r\n // the resulting URL will be \r\n // example.com/cake/posts/index/Search.keywords:mykeyword/Search.tag_id:3\r\n foreach ($this->data as $k=>$v){ \r\n foreach ($v as $kk=>$vv){ \r\n $url[$k.'.'.$kk]=$vv; \r\n } \r\n }\r\n // redirect the user to the url\r\n $this->redirect($url, null, true);\r\n }", "title": "" }, { "docid": "a1cc9a5ebcf4123c22fd5c5e62f1b7e8", "score": "0.5556899", "text": "public function main_search(): void {\n $config = Config::current();\n $visitor = Visitor::current();\n\n # Redirect searches to a clean URL or dirty GET depending on configuration.\n if (isset($_POST['query']))\n redirect(\n \"search/\".\n str_ireplace(\"%2F\", \"\", urlencode($_POST['query'])).\n \"/\"\n );\n\n if (!isset($_GET['query']) or $_GET['query'] == \"\")\n Flash::warning(\n __(\"Please enter a search term.\"),\n \"/\"\n );\n\n list($where, $params) = keywords(\n $_GET['query'],\n \"post_attributes.value LIKE :query OR url LIKE :query\",\n \"posts\"\n );\n\n $results = Post::find(\n array(\n \"placeholders\" => true,\n \"where\" => $where,\n \"params\" => $params\n )\n );\n\n $ids = array();\n\n foreach ($results[0] as $result)\n $ids[] = $result[\"id\"];\n\n if (!empty($ids)) {\n $posts = new Paginator(\n Post::find(\n array(\n \"placeholders\" => true,\n \"where\" => array(\"id\" => $ids)\n )\n ),\n $this->post_limit\n );\n } else {\n $posts = new Paginator(array());\n }\n\n if ($config->search_pages) {\n list($where, $params) = keywords(\n $_GET['query'],\n \"title LIKE :query OR body LIKE :query\",\n \"pages\"\n );\n\n if (!$visitor->group->can(\"view_page\"))\n $where[\"public\"] = true;\n\n $pages = Page::find(\n array(\n \"where\" => $where,\n \"params\" => $params\n )\n );\n } else {\n $pages = array();\n }\n\n $this->display(\n array(\"pages\".DIR.\"search\", \"pages\".DIR.\"index\"),\n array(\n \"posts\" => $posts,\n \"pages\" => $pages,\n \"search\" => $_GET['query']\n ),\n _f(\"Search results for &#8220;%s&#8221;\", fix($_GET['query']))\n );\n }", "title": "" }, { "docid": "92255ad33bf865c794697181fe082290", "score": "0.55372894", "text": "public function redirectNiceUrl()\n {\n $unwanted_querystring = ['_wpnonce', '_wp_http_referer', 'action', 'action2'];\n\n $current_query_names = array_map('strtolower', array_keys($_GET));\n\n foreach ($current_query_names as $name) {\n if (in_array($name, $unwanted_querystring)) {\n unset($current_query_names);\n wp_redirect(remove_query_arg($unwanted_querystring));\n exit();\n }\n }// endforeach;\n unset($name);\n\n unset($current_query_names, $unwanted_querystring);\n }", "title": "" }, { "docid": "d4b26a47946bdc609cd0c51dfc99b69e", "score": "0.5532404", "text": "function _searchlink($maxresults, $startpos, $direction, $linktext = '', $recount = '') {\n global $CONF, $blog, $query, $amount;\n // TODO: Move request uri to linkparams. this is ugly. sorry for that.\n $startpos = intval($startpos); // will be 0 when empty.\n $parsed = parse_url(serverVar('REQUEST_URI'));\n $path = (isset($parsed['path']) ? $parsed['path'] : '');\n $parsed = $parsed['query'];\n $url = '';\n\n switch ($direction) {\n case 'prev':\n if ( intval($startpos) - intval($maxresults) >= 0) {\n $startpos = intval($startpos) - intval($maxresults);\n //$url = $CONF['SearchURL'].'?'.alterQueryStr($parsed,'startpos',$startpos);\n switch ($this->skintype)\n {\n case 'index':\n $url = $path;\n break;\n case 'search':\n $url = $CONF['SearchURL'];\n break;\n }\n $url .= '?'.alterQueryStr($parsed,'startpos',$startpos);\n }\n break;\n case 'next':\n global $navigationItems;\n if (!isset($navigationItems)) $navigationItems = 0;\n \n if ($recount)\n $iAmountOnPage = 0;\n else \n $iAmountOnPage = $this->amountfound;\n \n if (intval($navigationItems) > 0) {\n $iAmountOnPage = intval($navigationItems) - intval($startpos);\n }\n elseif ($iAmountOnPage == 0)\n {\n // [%nextlink%] or [%prevlink%] probably called before [%blog%] or [%searchresults%]\n // try a count query\n switch ($this->skintype)\n {\n case 'index':\n $sqlquery = $blog->getSqlBlog('', 'count');\n $url = $path;\n break;\n case 'search':\n $unused_highlight = '';\n $sqlquery = $blog->getSqlSearch($query, $amount, $unused_highlight, 'count');\n $url = $CONF['SearchURL'];\n break;\n }\n if ($sqlquery)\n $iAmountOnPage = intval(quickQuery($sqlquery)) - intval($startpos);\n }\n if (intval($iAmountOnPage) >= intval($maxresults)) {\n $startpos = intval($startpos) + intval($maxresults);\n //$url = $CONF['SearchURL'].'?'.alterQueryStr($parsed,'startpos',$startpos);\n $url .= '?'.alterQueryStr($parsed,'startpos',$startpos);\n }\n else $url = '';\n break;\n default:\n break;\n } // switch($direction)\n\n if ($url != '')\n echo $this->_link($url, $linktext);\n }", "title": "" }, { "docid": "bb63a8142243f56bb7e58c57ef445a44", "score": "0.5525772", "text": "function learn_press_search_form() {\n\t\tif ( ! empty( $_REQUEST['s'] ) && ! empty( $_REQUEST['ref'] ) && 'course' == $_REQUEST['ref'] ) {\n\t\t\t$s = stripslashes_deep( $_REQUEST['s'] );\n\t\t} else {\n\t\t\t$s = '';\n\t\t}\n\n\t\tlearn_press_get_template( 'search-form.php', array( 's' => $s ) );\n\t}", "title": "" }, { "docid": "c6be466b48a6b66e3f8d95e0bc9cb350", "score": "0.55252296", "text": "function projectTheme_advanced_search_link_pgs($pg)\n{\n\t$opt = get_option('ProjectTheme_advanced_search_page_id');\n\t$perm = ProjectTheme_using_permalinks();\n\n\t$acc = 'pj='.$pg.\"&\";\n\tforeach($_GET as $key=>$value)\n\t{\n\t\tif($key != 'pj' and $key != 'page_id')\n\t\t$acc .= $key.\"=\".$value.\"&\";\n\t}\n\n\tif($perm) return get_permalink($opt). \"?\" . $acc;\n\n\treturn get_permalink($opt). \"&\".$acc;\n}", "title": "" }, { "docid": "eb69f1264ac88fae68c23048e0eed75d", "score": "0.55041313", "text": "public function search( Request $request ) {\n\n\t\t$string = $request->get( 'string' );\n\n\t\t$search = '{\"componentDef\":\"forceSearch:search\",\"attributes\":{\"term\":\"%s\",\"scopeMap\":{\"type\":\"TOP_RESULTS\"},\"context\":{\"disableSpellCorrection\":false,\"permsAndPrefs\":{\"crossObjectsAutoSuggestEnabled\":true,\"lvmEnabledForSearchResultsOn\":true,\"searchUIInteractionLoggingEnabled\":false,\"searchUIPilotFeatureEnabled\":false,\"orgHasAccessToSearchTermHistory\":false}}}}';\n\n\t\t// Make replacement\n\t\t$search = sprintf( $search, $string );\n\n\t\t// Encode\n\t\t$search = base64_encode( $search );\n\n\t\t// Craft URL\n\t\t$url = getenv( 'SALESFORCE_BASE_URL' ) . '/one/one.app#' . $search;\n\n\t\t// Return redirect\n\t\treturn redirect( $url, 301 );\n\t}", "title": "" }, { "docid": "876c50e129828fe051242360ad8e21ba", "score": "0.5496871", "text": "function projectTheme_provider_search_link()\n{\n\t$opt = get_option('ProjectTheme_provider_search_page_id');\n\t$perm = ProjectTheme_using_permalinks();\n\n\tif($perm) return get_permalink($opt). \"?\";\n\n\treturn get_permalink($opt). \"&pg=\".$subpage.\"&\";\n}", "title": "" }, { "docid": "69745863cc95122e9ad1fb1faea129d2", "score": "0.5479232", "text": "public function docketSearchAction()\n {\n $docket = $this->params()->fromRoute('docket');\n $this->session->search_defaults = ['docket' => $docket,'page' => 1];\n\n return $this->redirect()->toRoute('search');\n }", "title": "" }, { "docid": "d7acc69a9e824617adf99810a14d637a", "score": "0.547706", "text": "public function actionSearch()\n\t{\n\t\t$this->requirePostRequest();\n\n\t\t$data = Craft::$app->getRequest();\n\t\t$resoParams = RetsRabbit::$plugin->forms->toReso($data);\n\t\t$search = RetsRabbit::$plugin->newPropertySearch(array(\n\t\t\t'params' => $resoParams\n\t\t));\n\n\t\tif(RetsRabbit::$plugin->saveSearch($search)) {\n\t\t\tCraft::$app->user->setNotice(Craft::t('rets-rabbit', 'Search saved'));\n\n\t\t\treturn $this->redirectToPostedUrl(array('searchId' => $search->id));\n\t\t} else {\n\t\t\tCraft::$app->user->setError(Craft::t('rets-rabbit', \"Couldn't save search.\"));\n\n\t\t\tCraft::$app->urlManager->setRouteVariables(array(\n\t\t\t\t'search' => $search\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "ca4a05f042d0ad9bcfb692619c63a24a", "score": "0.5473769", "text": "public function header_search() {\n\t\t\t$search_url = ( get_search_link() );\n\n\t\t\tif ( Tour()->conditions->is_wc_enabled() ) {\n\t\t\t\t$search_url = ( wc_get_page_permalink( 'shop', '#' ) );\n\t\t\t}\n\n\t\t\t$search_value = get_search_query(); ?>\n\t\t\t<form action=\"<?php print( esc_url( $search_url ) ); ?>\">\n\t\t\t\t<input type=\"text\" name=\"s\" value=\"<?php print( esc_attr( $search_value ) ); ?>\" title=\"<?php esc_attr_e( 'Search', 'Tour' ); ?>\" />\n\t\t\t\t<button class=\"btn\"><?php esc_html_e( 'Submit', 'Tour' ); ?></button>\n\t\t\t</form>\n\t\t\t<?php\n\t\t}", "title": "" }, { "docid": "1cfa6701ce91d6555ea6c3eb46a4ade8", "score": "0.54558593", "text": "public function get_search_url( $keywords ) {\n\t\t$url = add_query_arg( array(\n\t\t\t'tab' => 'search',\n\t\t\t's' => $keywords,\n\t\t), admin_url( 'plugin-install.php' ) );\n\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "1e8d27f2e0b96d1900aed3e419f0f323", "score": "0.5449228", "text": "public function search()\n {\n $keyword = Input::get('keyword');\n\n $url = qs_url('patient', ['search' => 'true', 'keyword' => $keyword]);\n\n // Redirect to /patient/?search={$keyword}\n return redirect($url)->with('flash_message_success', 'Search completed.');\n }", "title": "" }, { "docid": "d2e63277d52faf1abe65f01b8ecc455a", "score": "0.54442984", "text": "function make_link_to_page($page,$s) {\n global $language;\n global $locale;\n global $search;\n global $searchindex;\n global $searchparameter;\n global $searchparameterdata;\n\n return \"<a href='?\".\n 'language' .'='.$language .'&'.\n 'locale' .'='.$locale .'&'.\n 'page' .'='.$page .'&'.\n 'searchindex' .'='.$searchindex .'&'.\n 'searchparameter' .'='.$searchparameter .'&'.\n 'searchparameterdata'.'='.urlencode($searchparameterdata).'&'.\n \"'>\".xu($s).\"</a>\";\n}", "title": "" }, { "docid": "2183848f53bf87000d91f3ea6519682f", "score": "0.5432897", "text": "function roots_search_query($escaped = true) {\n \t$query = apply_filters('roots_search_query', get_query_var('s'));\n \tif ($escaped) {\n \t$query = esc_attr( $query );\n \t}\n \treturn urldecode($query);\n }", "title": "" }, { "docid": "965f26299b8bc1da7539979fd1bad05d", "score": "0.53889364", "text": "function query($search_key = '') \n { \n if ($_POST)\n {\n redirect(base_url() . 'teacher/search_results?query=' . base64_encode($this->input->post('search_key')), 'refresh');\n }\n }", "title": "" }, { "docid": "d426f6b7c7d7b6675f36ae592469ae70", "score": "0.53798926", "text": "function simple_address_router( $query ) {\n\t$request = $query->request;\n\t$req_uri = $_SERVER['REQUEST_URI'];\n\n\t// If the request uri ends with a slash it should\n\tif ( $req_uri[ strlen( $req_uri ) - 1 ] === '/' ) {\n\t\treturn $query;\n\t}\n\n\t// If the request don't match with the regex or match 'wp-admin' or 'wp-content' should we not proceeed with the redirect.\n\tif ( ! preg_match( '/^[a-zA-Z0-9\\-\\_]+$/', $request ) && in_array( $request, array( 'wp-admin', 'wp-content' ) ) ) {\n\t\treturn $query;\n\t}\n\n\t$address = get_simple_address_by_address( $request );\n\n\t// If the object is null or empty we should not proceed with the redirect.\n\tif ( is_null( $address ) || empty( $address ) ) {\n\t\treturn $query;\n\t}\n\n\t$url = get_permalink( $address->post_id );\n\n\t// If the url is false or empty we should not proceed with the redirect.\n\tif ( $url === false || empty( $url ) ) {\n\t\treturn $query;\n\t}\n\n\t// Let's redirect baby!\n\theader( 'HTTP/1.1 301 Moved Permanently' );\n\theader( 'Location: ' . $url );\n\texit;\n}", "title": "" }, { "docid": "3ec3885e30c8d8ab27f7bdbd0608335d", "score": "0.5353922", "text": "public function updatingSearch():void \n {\n $this->gotoPage(1);\n }", "title": "" }, { "docid": "ea6adbca9fa522c49dad30a5330da8f8", "score": "0.5350823", "text": "function projectTheme_advanced_search_link()\n{\n\t$opt = get_option('ProjectTheme_advanced_search_page_id');\n\treturn get_permalink($opt);\n}", "title": "" }, { "docid": "b9f7d8eba29972de2bbc2f6e92e15f51", "score": "0.533626", "text": "function isSearch() {\r\n return ((trim(get_search_query()) != '') || (isset($_GET['s']) && !empty($_GET['s'])));\r\n}", "title": "" }, { "docid": "234b34975929f674aec972e22a184e5a", "score": "0.5297097", "text": "function blank_search($query){\n global $wp_query;\n if (isset($_GET['s']) && ( $_GET['s']=='' || $_GET['s']==' ' ) ) {\n $wp_query->set('s','');\n $wp_query->is_search = true;\n }\n return $query;\n }", "title": "" }, { "docid": "57d1718515e5e00592be5516752b7f55", "score": "0.5284246", "text": "public function searchboxAction()\n {\n list($type, $target) = explode(':', $this->params()->fromQuery('type'), 2);\n switch ($type) {\n case 'VuFind':\n list($searchClassId, $type) = explode('|', $target);\n $params = $this->getRequest()->getQuery()->toArray();\n $params['type'] = $type;\n\n // Disable retained filters if we are switching classes!\n $activeClass = $this->params()->fromQuery('activeSearchClassId');\n if ($activeClass != $searchClassId) {\n unset($params['filter']);\n }\n unset($params['activeSearchClassId']); // don't need to pass this forward\n\n $route = $this->getServiceLocator()\n ->get('VuFind\\SearchOptionsPluginManager')\n ->get($searchClassId)->getSearchAction();\n $base = $this->url()->fromRoute($route);\n return $this->redirect()->toUrl($base . '?' . http_build_query($params));\n case 'External':\n $lookfor = $this->params()->fromQuery('lookfor');\n return $this->redirect()->toUrl($target . urlencode($lookfor));\n\t\tcase 'EDS':\n $lookfor = $this->params()->fromQuery('lookfor');\n return $this->redirect()->toUrl($target . urlencode($lookfor) . ' AND PZ Article');\t\n default:\n throw new \\Exception('Unexpected search type.');\n }\n }", "title": "" }, { "docid": "843e55760cb2c0fe2c1e77be38c49df1", "score": "0.5277631", "text": "function __wps__string_query($p) {\n\tif (strpos($p, '?') !== FALSE) { \n\t\t$q = \"&\"; // No Permalink\n\t} else {\n\t\t$q = \"?\"; // Permalink\n\t}\n\treturn $q;\n}", "title": "" }, { "docid": "a3648927693c638d0209faf48de99d78", "score": "0.52770907", "text": "function redirects() {\n\t\tif ( ! is_404() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Learn.WordPress.org category changed from social-learning to online workshops.\n\t\tif ( str_starts_with( $_SERVER['REQUEST_URI'], '/category/social-learning' ) ) {\n\t\t\t$url = str_replace( '/social-learning', '/learn-wordpress-online-workshops', $_SERVER['REQUEST_URI'] );\n\t\t\twp_safe_redirect( $url, 301 );\n\t\t\tdie();\n\t\t}\n\n\t\t// Redirect /upload to submit-video\n\t\tif ( 'upload' === trim( $_SERVER['REQUEST_URI'], '/' ) ) {\n\t\t\twp_safe_redirect( '/submit-video/', 301 );\n\t\t\tdie();\n\t\t}\n\t}", "title": "" }, { "docid": "44826bbda3a6ce2103907f619f73b59f", "score": "0.52614516", "text": "function template_redirect() {\n\t\tif ( !is_single() && !is_page() )\n\t\t\treturn;\n\n\t\tglobal $wp_query;\n\n\t\t$link = get_post_meta( $wp_query->post->ID, '_links_to', true );\n\n\t\tif ( !$link )\n\t\t\treturn;\n\n\t\twp_redirect( $link, 301 );\n\t\texit;\n\t}", "title": "" }, { "docid": "1212f91e103de4a38a455e772ca1e85e", "score": "0.5245177", "text": "protected function _setSearchLink($sSearchStr, $sSearchHandle, $currentPage) {\n $sSearchLink = \"&listtype=qwiser\";\n $sSearchLink .= \"&searchparam=\" . $sSearchStr;\n $sSearchLink .= \"&sQWSearchHandle=\" . $sSearchHandle;\n $sSearchLink .= \"&pgNr=\" . $currentPage;\n $this->_aViewData['searchlink'] = $sSearchLink;\n $this->_aViewData['sListType'] = \"qwiser\";\n }", "title": "" }, { "docid": "2f8d7495f41c9070a8082c78dd11f50b", "score": "0.52399486", "text": "function sr_redirect( $action ) {\n\tif ( $action['post_id'] == get_the_ID() ) {\n\t\twp_redirect( $action['redirect_url'] );\n\t\texit;\n\t}\n}", "title": "" }, { "docid": "2963163f6f00aaab19e7ca7ea0fe2605", "score": "0.5232074", "text": "public function updatingSearch():void {\n \t$this->gotoPage(1);\n }", "title": "" }, { "docid": "69917c269345e1b52bfd9e12619c0ae7", "score": "0.5212483", "text": "function custom_redirect( $url ) {\n global $post;\n\t$post_redirect = (int) (auiu_get_option( 'post_redirect', 'auiu_others' ));\n\tif ($post_redirect) {\n\t\treturn get_permalink( $post->ID=$post_redirect );\n\t}\n\telse\n\t{\n\t\treturn home_url();\n\t}\t\n}", "title": "" }, { "docid": "0b77f4704f600a2760378287036b0f2c", "score": "0.52121556", "text": "public function updatingSearch()\n {\n $this->resetPage();\n }", "title": "" }, { "docid": "2f3ba2779b83ae549a05503f42124b4d", "score": "0.5202783", "text": "private function addSearch(&$url, $content)\n {\n $url .= '&search='.urlencode($content);\n }", "title": "" }, { "docid": "d105f914ef6b90511ca3794f48d30813", "score": "0.5197216", "text": "private function formUrl() {\n\t\t// just find &page and remove... always has query string\n\t\t$this->url = preg_replace('/&amp;page=[0-9]*/', '$1', $_SERVER['REQUEST_URI']);\n\t}", "title": "" }, { "docid": "e1f7d8056691bd5ec7c9548543a142f5", "score": "0.51871645", "text": "function daddio_redirect_rsvp_vanity_url() {\n\tglobal $wp_query;\n\tif ( ! is_404() ) {\n\t\treturn;\n\t}\n\tif ( isset( $wp_query->query['name'] ) && $wp_query->query['name'] == 'rsvp' ) {\n\t\t$slug = apply_filters( 'daddio_rsvp_page_slug', '' );\n\t\tif ( empty( $slug ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$page = get_page_by_path( $slug );\n\t\twp_safe_redirect( get_permalink( $page->ID ) );\n\t\tdie();\n\t}\n}", "title": "" }, { "docid": "63667483808b6c837252c5ee90c4346f", "score": "0.5143342", "text": "function buckys_shop_search_url($query, $catStr, $locationStr, $sort, $userID, $page = null){\n\n $query = trim($query);\n $catStr = trim($catStr);\n $locationStr = trim($locationStr);\n $sort = trim($sort);\n\n $tmpParamList = [];\n if($query != ''){\n $tmpParamList[] = 'q=' . urlencode($query);\n }\n if($catStr != ''){\n $tmpParamList[] = 'cat=' . urlencode($catStr);\n }\n if($locationStr != ''){\n $tmpParamList[] = 'loc=' . urlencode($locationStr);\n }\n if($sort != ''){\n $tmpParamList[] = 'sort=' . urlencode($sort);\n }\n if($userID != ''){\n $tmpParamList[] = 'user=' . urlencode($userID);\n }\n\n if(count($tmpParamList) > 0)\n $paginationUrlBase = '/shop/search.php?' . implode('&', $tmpParamList);else\n $paginationUrlBase = '/shop/search.php';\n\n return $paginationUrlBase;\n\n}", "title": "" }, { "docid": "8a78ebc737b68cd794dc94f5c1afae5d", "score": "0.5135766", "text": "function the_posts_navigation_search_page( $args = array() ) {\n\techo get_the_posts_navigation_search_page( $args );\n}", "title": "" }, { "docid": "e328afe57169f484f46ceeacdbaa093d", "score": "0.51333135", "text": "public function redirectByUrl()\n {\n $url = Craft::$app->request->url;\n $reroute = $this->getByUrl($url);\n\n if ($reroute) {\n $this->_redirect($reroute['newUrl'], $reroute['method']);\n } else {\n $urlParts = parse_url($url);\n $path = $urlParts['path'] ?? null;\n\n if (!$path) return;\n\n $rerouteWithoutQueryString = $this->getByUrl($path);\n\n if ($rerouteWithoutQueryString) {\n $glue = (strpos($rerouteWithoutQueryString['newUrl'], '?') === FALSE) ? '?' : '&';\n\n $redirectUrl = isset($urlParts['query']) ? $rerouteWithoutQueryString['newUrl'] . $glue . $urlParts['query'] : $rerouteWithoutQueryString['newUrl'];\n\n $this->_redirect($redirectUrl, $rerouteWithoutQueryString['method']);\n }\n }\n }", "title": "" }, { "docid": "912a7eeb998b62421e8ecbab49a943cc", "score": "0.51248837", "text": "function SearchFilter($query) {\n\tif (isset($_GET['s']) && empty($_GET['s']) && $query->is_main_query()){\n\t\t$query->is_search = true;\n\t\t$query->is_home = false;\n\t}\n\treturn $query;\n}", "title": "" }, { "docid": "825db02777e83e7bcf5f21348048f806", "score": "0.51229984", "text": "public function getSearchPostUrl()\n {\n return $this->_getUrl('storelocator/index/search');\n }", "title": "" }, { "docid": "0ff87d9e497dab27dd919dd19025f7a8", "score": "0.5120572", "text": "public function search(SearchRequest $request, $id = 1)\n {\n $photoSearch = $request->all();\n $query = $photoSearch['photoSearch'];\n\n $data = $this->flickrRepository->search($query, $id);\n\n return Redirect::route('search.page', [$query, $id])->with($data);\n }", "title": "" }, { "docid": "4e16e0c2252cd1c37e2dbfebfff30a26", "score": "0.51187336", "text": "protected function searchUrl() {\n\t\treturn $this->baseUrl.'esearch.fcgi';\n\t}", "title": "" }, { "docid": "bd5fb9867bbcf95a95a54f70cc534c66", "score": "0.5116841", "text": "public function searchAction() {\n parent::searchAction();\n }", "title": "" }, { "docid": "8ab033a849be591edfff69eb22581add", "score": "0.5106722", "text": "function crum_search_query($escaped = true)\n{\n $query = apply_filters('crum_search_query', get_query_var('s'));\n\n if ($escaped) {\n $query = esc_attr($query);\n }\n\n return urldecode($query);\n}", "title": "" }, { "docid": "77e4860ea831c289d0b93b8c03d063d6", "score": "0.51051146", "text": "function ajax_search( $request ) {\n\n\t$query = sanitize_text_field( $request['s'] );\n \n // check for a search term\n if( ! isset( $request['s'] ) ) {\n\t\treturn rest_ensure_response( array() );\n\t}\n\t\n\t$args = array(\n\t\t'post_status' => 'publish',\n\t\t'ignore_sticky_posts' => true,\n\t\t's' => $query,\n\t\t'posts_per_page'\t => 500,\n\t\t'post_type' => array(\n\t\t\t'staff',\n\t\t\t'guide',\n\t\t\t'page',\n\t\t\t'faq',\n\t\t\t'database',\n\t\t\t'post'\n\t\t),\n\t);\n\n\tif ( class_exists('SWP_Query') ) :\n\t\t$search = new \\SWP_Query( $args );\n\telse : \n\t\t$search = new \\WP_Query( $args );\n\tendif;\n\n\t// Sort order for the first set of results returned to live search\n\t// Uses the \"nice name\", rather than adding an unused slug to each of the parameters\n\t$sort_order = array(\n\t\t'Librarian',\n\t\t'Research Guide',\n\t\t'Page',\n\t\t'FAQ',\n\t\t'Database',\n\t\t'Post'\n\t);\n\n\t//creates arrays\n\t$search_results = array();\n\t$posts = array();\n\t\n\t$search_results['query_sent'] = $query;\n\n\t// Add query details to array\n\t$search_results['query'] = stripslashes( htmlspecialchars_decode($query, ENT_QUOTES) );\n\t$search_results['count'] = count( $search->posts );\n\n\tif ( $search->posts ) :\n\n\t\t//array_slice($search->posts, 0, 3)\n\t\t// Loop through returned posts and push into the array\n\t\tforeach ( array_slice($search->posts, 0, 7 ) as $post ) :\n\n\t\t\tswitch ( $post->post_type ) :\n\n\t\t\t\tcase 'book':\n\t\t\t\t\t$post_type_icon = 'book';\n\t\t\t\t\t$post_type_nice_name = 'Book';\n\t\t\t\t\t$post_link = get_the_permalink( $post->ID );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'database':\n\t\t\t\t\t$post_type_icon = 'pointer-right';\n\t\t\t\t\t$post_type_nice_name = 'Database';\n\t\t\t\t\t$post_link = get_post_meta( $post->ID , 'database_friendly_url', true );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'faq':\n\t\t\t\t\t$post_type_icon = 'question';\n\t\t\t\t\t$post_type_nice_name = 'FAQ';\n\t\t\t\t\t$post_link = get_the_permalink( $post->ID );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'guide':\n\t\t\t\t\t$post_type_icon = 'clip';\n\t\t\t\t\t$post_type_nice_name = 'Research Guide';\n\t\t\t\t\t$post_link = get_post_meta( $post->ID , 'guide_friendly_url', true );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'journal':\n\t\t\t\t\t$post_type_icon = 'asterisk';\n\t\t\t\t\t$post_type_nice_name = 'Journal';\n\t\t\t\t\t$post_link = get_the_permalink( $post->ID );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'page':\n\t\t\t\t\t$post_type_icon = 'clip';\n\t\t\t\t\t$post_type_nice_name = 'Page';\n\t\t\t\t\t$post_link = get_the_permalink( $post->ID );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'staff':\n\t\t\t\t\t$post_type_icon = 'person';\n\t\t\t\t\t$post_type_nice_name = ( has_term( 'librarian', 'staff_role', $post->ID ) ) ? 'Librarian' : 'Staff' ;\n\t\t\t\t\t$post_link = get_post_meta( $post->ID , 'member_friendly_url', true );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$post_type_icon = 'clip'; // do we have a default icon?\n\t\t\t\t\t$post_type_nice_name = 'Post';\n\t\t\t\t\t$post_link = get_the_permalink( $post->ID );\n\t\t\t\t\tbreak;\n\t\t\t\n\t\t\tendswitch;\n\n\t\t\t$post = array(\n\t\t\t\t'type' => $post_type_nice_name,\n\t\t\t\t'icon' => $post_type_icon,\n\t\t\t\t'title' => get_the_title( $post->ID ),\n\t\t\t\t'link' => $post_link\n\t\t\t);\n\n\t\t\t$posts[] = $post;\n\n\t\tendforeach;\n\t\n\t\t// right now let's work without a sort order 4/3/18\n\t\t// sort $posts by ['type'] for given order\n\t\t// usort( $posts, function ( $a, $b ) use ( $sort_order ) {\n\t\t// \t$pos_a = array_search( $a['type'], $sort_order );\n\t\t// \t$pos_b = array_search( $b['type'], $sort_order );\n\n\t\t// \treturn $pos_a - $pos_b;\n\t\t// } );\n\n\t\t$search_results['posts'] = $posts;\n\t\n\t// else :\n\n\t// \treturn new WP_Error( 'front_end_ajax_search', 'No results');\n\n\tendif;\n\n return rest_ensure_response( $search_results );\n}", "title": "" }, { "docid": "ddade98522abb86d8f96deb44f0338da", "score": "0.5103353", "text": "public function buildSearchUrlQuery(FormStateInterface $form_state);", "title": "" }, { "docid": "2ae7a019dfea60ee25c3e449e966f828", "score": "0.50653416", "text": "function kill_search_page_and_feed ( $posts ) {\n\t\t global $wp_query, $post;\n\n\t\t if ( is_search() ) {\n\t\t $wp_query->set_404();\n\t\t status_header( 404 );\n\t\t }\n\n\t\t if (is_feed()) {\n\t\t $search = get_query_var('s');\n\n\t\t if ( !empty($search) ) {\n\t\t $wp_query->set_404();\n\t\t $wp_query->is_feed = false;\n\t\t status_header( 404 );\n\t\t }\n\t\t }\n\t\t return $posts;\n\t\t }", "title": "" }, { "docid": "6b760f5abb5b1921889799b898bb2128", "score": "0.50471485", "text": "static function redirect()\n {\n global $wp;\n $options = WF301_setup::get_options();\n\n if (($options['disable_for_users'] == '1' && is_user_logged_in()) || $options['disable_all_redirections'] == '1' || is_admin()) return false;\n\n $redirects = self::get_redirects(true, 'position', 'ASC'); // True for only active redirects.\n\n // Get current url\n $url_request = self::get_url();\n\n if(self::is_url_ignored($url_request)){\n return false;\n }\n\n $query_string = explode('?', $url_request);\n $url_request_nq = $query_string[0];\n $query_string = (isset($query_string[1])) ? $query_string[1] : false;\n\n foreach ($redirects as $redirect) {\n $from = urldecode($redirect->url_from);\n $to = urldecode($redirect->url_to);\n if ($redirect->case_insensitive == 'enabled') {\n $formatted_from_url = strtolower(self::format_from_url(trim($from)));\n $formatted_to_url = strtolower(self::format_to_url(trim($to)));\n } else {\n $formatted_from_url = self::format_from_url(trim($from));\n $formatted_to_url = self::format_to_url(trim($to));\n }\n \n if ($redirect->query_parameters == 'exact' || $redirect->query_parameters == 'exactdrop' || $redirect->regex == 'enabled') {\n $compare_url_request = $url_request;\n } else {\n $compare_url_request = $url_request_nq;\n }\n\n if($redirect->regex == 'enabled'){\n $regex_matches = null;\n } else {\n $regex_matches = false;\n }\n\n if ($redirect->status != 'disabled' && self::wild_compare(stripslashes($formatted_from_url), rtrim(trim($compare_url_request), '/'), $redirect->case_insensitive == 'enabled', $regex_matches)) {\n\n if ($redirect->query_parameters == 'utm' && strlen($query_string) > 0) {\n $query_string_array = explode('&', $url_request);\n $query_string_new = [];\n\n foreach($query_string_array as $value){\n $exp_key = explode('_', $value);\n if($exp_key[0] == 'utm'){\n $query_string_new[] = $value;\n }\n }\n \n if (count($query_string_new) > 0) {\n $query_string = implode('&', $query_string_new);\n }\n }\n\n $to = (strlen($query_string) > 0 && $redirect->query_parameters != 'ignore' && $redirect->query_parameters != 'exactdrop') ? $to . \"?\" . $query_string : $to;\n \n WF301_logs::log_redirect($redirect->id, self::get_url(), $to, $redirect->last_count, false);\n header(\"Cache-Control: no-store, no-cache, must-revalidate, max-age=0\");\n header(\"Cache-Control: post-check=0, pre-check=0\", false);\n header(\"Pragma: no-cache\");\n\n if ($redirect->type == 'cloaking') {\n echo '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n <html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">\n <head><meta http-equiv=\"Content-Type\" content=\"application/xhtml+xml; charset=UTF-8\"/>\n <title>' . get_bloginfo('name') . '</title>\n <style type=\"text/css\">\n html, body { padding: 0; margin: 0; border: 0; height: 100%; overflow: hidden; }\n iframe { width: 100%; height: 100%; border: 0; margin: 0; padding: 0; }\n </style></head>\n <body><iframe src=\"' . $to . '\"></iframe></body></html>';\n exit();\n } else {\n switch($redirect->type){\n case 301: $status_text = 'Moved Permanently'; break;\n case 302: $status_text = 'Moved Temporarily'; break;\n case 303: $status_text = 'See Other'; break;\n case 304: $status_text = 'Not Modified'; break;\n case 307: $status_text = 'Temporary Redirect'; break;\n case 308: $status_text = 'Permanent Redirect'; break;\n }\n header('HTTP/1.1 ' . $redirect->type . ' ' . $status_text);\n }\n\n \n if (isset($regex_matches) && $regex_matches !== false) {\n\t\t foreach ($regex_matches as $key => $value) {\n\t\t\t\t\t\t$to = str_replace(\"[$key]\", trim ($value, ' /'), $to);\n\t\t }\n\t }\n\n header('Location: ' . $to, true, (int) $redirect->status);\n exit();\n }\n }\n\n if (is_404()) {\n $options = WF301_setup::get_options();\n\n $http_response_code = http_response_code();\n\n // if we have a 302 here is because this is already a redirect so let's bypass this thing and move on to\n // what really we are here for. No more loop redirect. It's useless.\n if ($options['autoredirect_404'] == '1' && $http_response_code !== \"302\") {\n self::autoredirect_404($url_request);\n }\n\n WF301_logs::log_404(self::get_url());\n\n if (!empty($options['redirect_url_404'])){\n header('HTTP/1.1 ' . '302 Moved Temporarily');\n header('Location: ' . $options['redirect_url_404'], true, 302);\n exit();\n }\n \n if ($options['page_404'] && get_posts(array('post_type' => 'page', 'status' => 'publish', 'page_id' => $options['page_404']))) {\n global $wp_query, $post;\n $post = get_post($options['page_404']);\n header('HTTP/1.1 ' . '404');\n $wp_query = new WP_Query(array('page_id' => $options['page_404'] ));\n $wp_query->is_page = true;\n }\n } // is_404\n }", "title": "" }, { "docid": "ee911a64a3a307e33a624ed06e6b3476", "score": "0.5046051", "text": "private function override_wordpress_search()\n {\n // Do not override native search if the feature is not enabled.\n if (! $this->settings->should_override_native_search()) {\n return;\n }\n\n $index_id = $this->settings->get_native_search_index_id();\n $index = $this->get_index($index_id);\n\n if (null == $index) {\n return;\n }\n\n new Algolia_Search($index);\n }", "title": "" }, { "docid": "f57bf47217f934dbe6610e294e581d86", "score": "0.5040675", "text": "function wpcom_vip_wp_old_slug_redirect(){\n\tglobal $wp_query;\n\tif ( is_404() && '' !== $wp_query->query_vars['name'] ) {\n\n\t\t$redirect = wp_cache_get('old_slug'. $wp_query->query_vars['name'] );\n\n\t\tif ( false === $redirect ){\n\t\t\t// Run the caching callback as the very firts one in order to capture the value returned by WordPress from database. This allows devs from using `old_slug_redirect_url` filter w/o polluting the cache\n\t\t\tadd_filter( 'old_slug_redirect_url', 'wpcom_vip_set_old_slug_redirect_cache', -9999, 1 );\n\t\t\t//If an old slug is not found the function returns early and does not apply the old_slug_redirect_url filter. so we will set the cache for not found and if it is found it will be overwritten later in wpcom_vip_set_old_slug_redirect_cache()\n\t\t\twp_cache_set( 'old_slug'. $wp_query->query_vars['name'], 'not_found', 'default', 12 * HOUR_IN_SECONDS + mt_rand(0, 12 * HOUR_IN_SECONDS ) );\n\t\t} elseif ( 'not_found' === $redirect ){\n\t\t\t//wpcom_vip_set_old_slug_redirect_cache() will cache 'not_found' when a url is not found so we don't keep hammering the database\n\t\t\tremove_action( 'template_redirect', 'wp_old_slug_redirect' );\n\t\t\treturn;\n\t\t} else {\n\t\t\t/** This filter is documented in wp-includes/query.php. */\n\t\t\t$redirect = apply_filters( 'old_slug_redirect_url', $redirect );\n\t\t\twp_redirect( $redirect, 301 ); //this is kept to not safe_redirect to match the functionality of wp_old_slug_redirect\n\t\t\texit;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d449e651c2f97df6269a57eebf4cb1b0", "score": "0.50388664", "text": "function buckys_pp_search_url($query, $type, $sort, $addLastSymFlag = true){\n\n $query = trim($query);\n $type = trim($type);\n\n $tmpParamList = [];\n if($query != ''){\n $tmpParamList[] = 'q=' . urlencode($query);\n }\n if($type != ''){\n $tmpParamList[] = 'type=' . urlencode($type);\n }\n if($sort != ''){\n $tmpParamList[] = 'sort=' . urlencode($sort);\n }\n\n if(count($tmpParamList) > 0){\n $paginationUrlBase = '/search.php?' . implode('&', $tmpParamList) . ($addLastSymFlag ? '&' : '');\n }else{\n $paginationUrlBase = '/search.php' . $addLastSymFlag ? '?' : '';\n }\n\n return $paginationUrlBase;\n\n}", "title": "" }, { "docid": "024ea922052bc6b74205ae60a32eb9fb", "score": "0.50172466", "text": "function httpRedirect($query) {\r\r\n\t\r\r\n\t$url = HOST.\"/index.php?\".$query;\r\r\n\thttpRedirectURL($url);\r\r\n\r\r\n}", "title": "" }, { "docid": "d549c164b35c5fcff57ca6ee637ff41c", "score": "0.5011095", "text": "public function uri($search, $default= null) {\n foreach ($this->all($search) as $link) {\n return $link->uri();\n }\n return $default;\n }", "title": "" }, { "docid": "23a1aea5ec23f29573baa750db5c0054", "score": "0.5010925", "text": "function create_search_address($search)\n{\n $search = urlencode($search);\n $address = 'https://www.google.co.uk/search?q=' . $search;\n return $address;\n}", "title": "" }, { "docid": "84a0cbd73f5200c5499cf3f1ac4bae36", "score": "0.5010087", "text": "function wpcom_vip_old_slug_redirect() {\n global $wp_query;\n if ( is_404() && '' != $wp_query->query_vars['name'] ) :\n global $wpdb;\n\n // Guess the current post_type based on the query vars.\n if ( get_query_var('post_type') )\n $post_type = get_query_var('post_type');\n elseif ( !empty($wp_query->query_vars['pagename']) )\n $post_type = 'page';\n else\n $post_type = 'post';\n\n if ( is_array( $post_type ) ) {\n if ( count( $post_type ) > 1 )\n return;\n $post_type = array_shift( $post_type );\n }\n\n // Do not attempt redirect for hierarchical post types\n if ( is_post_type_hierarchical( $post_type ) )\n return;\n\n $query = $wpdb->prepare(\"SELECT post_id FROM $wpdb->postmeta, $wpdb->posts WHERE ID = post_id AND post_type = %s AND meta_key = '_wp_old_slug' AND meta_value = %s\", $post_type, $wp_query->query_vars['name']);\n\n // if year, monthnum, or day have been specified, make our query more precise\n // just in case there are multiple identical _wp_old_slug values\n if ( '' != $wp_query->query_vars['year'] )\n $query .= $wpdb->prepare(\" AND YEAR(post_date) = %d\", $wp_query->query_vars['year']);\n if ( '' != $wp_query->query_vars['monthnum'] )\n $query .= $wpdb->prepare(\" AND MONTH(post_date) = %d\", $wp_query->query_vars['monthnum']);\n if ( '' != $wp_query->query_vars['day'] )\n $query .= $wpdb->prepare(\" AND DAYOFMONTH(post_date) = %d\", $wp_query->query_vars['day']);\n\n $cache_key = md5( serialize( $query ) );\n\n if ( false === $id = wp_cache_get( $cache_key, 'wp_old_slug_redirect' ) ) {\n $id = (int) $wpdb->get_var($query);\n\n wp_cache_set( $cache_key, $id, 'wp_old_slug_redirect', 5 * MINUTE_IN_SECONDS );\n }\n\n if ( ! $id )\n return;\n\n $link = get_permalink($id);\n\n if ( !$link )\n return;\n\n wp_redirect( $link, 301 ); // Permanent redirect\n exit;\n endif;\n}", "title": "" }, { "docid": "e1c5331f59c4d54421f74642e780a169", "score": "0.500238", "text": "public function search() {\n // If a petition ID is provided, we're in select mode\n if(!empty($this->data['CoPetition']['id'])) {\n $url['action'] = 'select';\n $url['copetitionid'] = filter_var($this->data['CoPetition']['id'], FILTER_SANITIZE_SPECIAL_CHARS);\n } else {\n // Back to the index\n $url['action'] = 'index';\n }\n \n // build a URL will all the search elements in it\n // the resulting URL will be \n // example.com/registry/co_people/index/Search.givenName:albert/Search.familyName:einstein\n foreach($this->data['Search'] as $field=>$value){\n if(!empty($value)) {\n $url['Search.'.$field] = $value; \n }\n }\n \n if($url['action'] == 'index') {\n // Insert CO into URL. Note this also prevents truncation of email address searches (CO-1271).\n $url['co'] = $this->cur_co['Co']['id'];\n }\n\n // redirect the user to the url\n $this->redirect($url, null, true);\n }", "title": "" }, { "docid": "fdf1a2f6175a5bec0a9f19e4429c1309", "score": "0.4987467", "text": "public function normalizeForSearch( $s ) {\n\t\t// better to use zh-hans for search, since conversion from\n\t\t// Traditional to Simplified is less ambiguous than the\n\t\t// other way around\n\t\t// LanguageZh_hans::normalizeForSearch\n\t\t$s = self::convertDoubleWidth( $s );\n\t\t$s = trim( $s );\n\t\t$s = $this->segmentByWord( $s );\n\t\t\n\t\treturn $s;\n\n\t}", "title": "" }, { "docid": "61b3b2b67e47ebfad1e8ffcb1d2b3852", "score": "0.49785146", "text": "function sm_search_form( $args ){\n\n\t// Output the form\n\t$output = '<form action=\"' . esc_url( get_permalink() ) . '\" method=\"GET\" role=\"search\">';\n\t$output .= '<label class=\"smtextfield\"><input type=\"text\" name=\"sku\" placeholder=\"Search Model # or CAS #...\" value=\"\" /></label>';\n\t$output .= '<input type=\"hidden\" name=\"sds\" value=\"find\" />';\n\t$output .= '<input type=\"submit\" value=\"Find SDS\" class=\"button search-submit\" /></form>';\n\n\treturn $output;\n\n}", "title": "" }, { "docid": "36103f22707b6ba3c35e654ada19b7f0", "score": "0.49771184", "text": "public function indexAction(){\n $this->_redirect('database/search/results/');\n $this->getResponse()->setHttpResponseCode(301)\n ->setRawHeader('HTTP/1.1 301 Moved Permanently');\n }", "title": "" }, { "docid": "d62b155e633f254b53689b373f374b47", "score": "0.4976572", "text": "function custom_search_form( $form ) {\r\n $form = '<form method=\"get\" id=\"quick-search\" action=\"'.home_url( '/' ).'\" >';\r\n $form .= '<input type=\"text\" value=\"' . get_search_query() . '\" name=\"s\" id=\"s\" class=\"search-field\" />';\r\n $form .= '<input type=\"submit\" value=\"OK\" class=\"search-submit\" />';\r\n $form .= '</form>';\r\n return $form;\r\n}", "title": "" }, { "docid": "a8fe1a42ff391a8bbdf5a28a3c64b9bc", "score": "0.49706763", "text": "function redirect($url = null, $param = array(), $session = false)\n {\n if (!isset($url)) {\n $url = $_SERVER['PHP_SELF'];\n }\n \n $qs = array();\n\n if ($session) {\n $qs[] = session_name() .'='. session_id();\n }\n\n if (is_array($param) && count($param)) {\n if (count($param)) {\n foreach ($param as $key => $val) {\n if (is_string($key)) {\n $qs[] = urlencode($key) .'='. urlencode($val);\n } else {\n $qs[] = urlencode($val) .'='. urlencode(@$GLOBALS[$val]);\n }\n }\n }\n }\n \n if ($qstr = implode('&', $qs)) {\n $purl = parse_url($url);\n $url .= (isset($purl['query']) ? '&' : '?') . $qstr;\n }\n\n parent::redirect($url);\n }", "title": "" }, { "docid": "09869bd9a4964a8d50da37fbd53d62eb", "score": "0.49540406", "text": "public function searchRedirectParams()\r\n\t{\r\n\t\t$params['controller'] = $this->request->getParam('controller');\r\n\t\t$params['action'] = \"results\";\r\n\t\t$params['sort'] = $this->request->getParam('sort');\r\n\t\t\r\n\t\treturn $params;\r\n\t}", "title": "" }, { "docid": "fc20e8afaf7e815129257d5344a30944", "score": "0.494914", "text": "function wpdocs_my_search_form( $form ) {\r\n $form = '<form role=\"search\" method=\"get\" id=\"searchform\" class=\"searchform\" action=\"' . home_url( '/' ) . '\" >\r\n <input type=\"text\" value=\"' . get_search_query() . '\" name=\"s\" id=\"s\" />\r\n <input type=\"submit\" id=\"searchsubmit\" value=\"'. esc_attr__( 'Search' ) .'\" />\r\n </form>';\r\n\r\n return $form;\r\n}", "title": "" }, { "docid": "09015bf834b8e72b4ac5829f6d75bed1", "score": "0.4943569", "text": "public function canonicalRedirection(){}", "title": "" }, { "docid": "311d39c2d0ad1b3579db3822c51c5ac3", "score": "0.49380848", "text": "private function forceSlash()\n {\n // add a trailing slash to the current URL\n $url = $this->getCurrentFull() . '/';\n // if there is a query string in the current request\n $queryString = $this->getServer('QUERY_STRING');\n if (!empty($queryString)) {\n // add the query string to the redirect URL\n $url .= '?' . $queryString;\n }\n $this->redirect($url);\n }", "title": "" }, { "docid": "1e8946f3a308b6211469eb4b1ad4e021", "score": "0.4933044", "text": "function AQRewriteRedirectFlush()\n{\n AQCreateRedirectCpt();\n flush_rewrite_rules();\n}", "title": "" }, { "docid": "b8a04632ebef5f9246af94c25a879442", "score": "0.4927499", "text": "function search_args( $args, $class ) {\n\n if ( $class->is_search ) {\n $this->search_terms = $args['s'];\n unset( $args['s'] );\n\n $args['suppress_filters'] = true;\n if ( empty( $args['post_type'] ) ) {\n $args['post_type'] = 'any';\n }\n }\n\n return $args;\n }", "title": "" }, { "docid": "7701da0957f18bd291447a70972d373d", "score": "0.4922662", "text": "public function testSearchPhraseTooShort()\n {\n $user = $this->loginAsFakeUser(false, 'reader');\n\n // perform the search\n $this->followingRedirects()\n ->from('/entries/search')\n ->get('/catalogue/search?phrase=ph')\n ->assertSee('Enter at least 3 characters');\n }", "title": "" }, { "docid": "57da31a4b82a71969794f5292486694c", "score": "0.49195698", "text": "function customRewriteFix($query_string)\n{\n if (isset($query_string['page']) && $query_string['page'] !== '' && isset($query_string['name'])) {\n unset($query_string['name']);\n }\n return $query_string;\n}", "title": "" }, { "docid": "7ef91f6821bf11b5a74772cd71982fcf", "score": "0.49107474", "text": "public function updatingSearch(){\n $this->resetPage();\n }", "title": "" }, { "docid": "8e8f8c06562bf522f1b7cb387ef7f53e", "score": "0.48966005", "text": "function go_to($url = null, $qry = null) {\n\n\t\t// Set default if url not given\n\t\tif(!$url && !$qry) {\n\t\t\t$url = $_SERVER['PHP_SELF'];\n\t\t}\n\n\t\tif ($qry) {\n\t\t\t$url = $url.$qry;\n\t\t}\n\n\t\t// Action if string is false\n\t\t//header(\"Refresh: 0;url=$url\");\n\t\theader(\"Location: $url\");\n\t\texit;\n\t}", "title": "" }, { "docid": "a2bff650c1298c94b83cffbe14fa8d77", "score": "0.48935622", "text": "function Redirect($url, $permanent = 302) {\n wp_redirect($url, $permanent);\n exit();\n }", "title": "" }, { "docid": "6649138df3e547c43f66c043b31adcea", "score": "0.48881808", "text": "function action_search()\n {\n if (!empty($this->m_partial))\n {\n $this->partial($this->m_partial);\n return;\n }\n\n // save criteria\n $criteria = $this->fetchCriteria();\n $name = $this->handleSavedCriteria($criteria);\n\n // redirect to search results and return\n $doSearch = isset($this->m_postvars['atkdosearch']);\n if ($doSearch)\n {\n $this->redirectToResults();\n return;\n }\n elseif (!empty($this->m_postvars['atkcancel']))\n {\n $url = dispatch_url($this->getPreviousNode(), $this->getPreviousAction());\n $url = session_url($url, atkLevel() > 0 ? SESSION_BACK : SESSION_REPLACE);\n\n $this->m_node->redirect($url);\n }\n\n $page = &$this->getPage();\n $searcharray = array();\n\n // load criteria\n if(isset($this->m_postvars['load_criteria']))\n {\n if (!empty($name))\n {\n $criteria = $this->loadCriteria($name);\n $searcharray = $criteria['atksearch'];\n }\n }\n elseif (isset($this->m_postvars[\"atksearch\"]))\n {\n $searcharray = $this->m_postvars[\"atksearch\"];\n }\n $page->addcontent($this->m_node->renderActionPage(\"search\", $this->invoke(\"searchPage\", $searcharray)));\n }", "title": "" }, { "docid": "286d05e68792b3760fb9683abc806dd3", "score": "0.48784366", "text": "static function search_link($location)\n\t{\n\t\treturn wiki_hooks::search_link($location);\n\t}", "title": "" }, { "docid": "293e82f72cddf29bf84f923edd6045c8", "score": "0.48727745", "text": "function redirectUrl() \n{\t\n\t$oResults = findDb(\n\t\t(string) 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'], \n\t\t'short_url'\n\t);\n\n\t$r_oFinal = (empty($oResults->full_url)) ? \n\t'error.php?Error=Url%20missing' : \n\t$oResults->full_url;\n\t\n\theader('Location:'.$r_oFinal);\n}", "title": "" }, { "docid": "1908576619eda530b25762a27cdf5795", "score": "0.4865523", "text": "function confirmSearch () {\r\n\r\n if (isset($_POST['search']) && !empty($_POST['searchword']))\r\n {\r\n $_SESSION['search'] = mysqli_real_escape_string($this->connection, $_POST['searchword']);\r\n header('Location: '.$_SERVER['PHP_SELF']);\r\n }\r\n }", "title": "" }, { "docid": "23b2fa734c2f596d72d5bf5f6a2e5a5b", "score": "0.48604912", "text": "function get_search_args() {\n $args = [];\n $args['s'] = [\n 'description' => esc_html__( 'The search term.', 'namespace' ),\n 'type' => 'string',\n ];\n\n return $args;\n}", "title": "" }, { "docid": "8e7cd82709ba4d54f7dbd81e7d7aa349", "score": "0.4849691", "text": "function bones_wpsearch($form) {\n\t$form = '<form role=\"search\" method=\"get\" id=\"searchform\" action=\"' . home_url( '/' ) . '\" >\n\t<label class=\"screen-reader-text\" for=\"s\">' . __('Search for:', 'bonestheme') . '</label>\n\t<input type=\"text\" value=\"' . get_search_query() . '\" name=\"s\" id=\"s\" placeholder=\"'.esc_attr__('Search the Site...','bonestheme').'\" />\n\t<input type=\"submit\" id=\"searchsubmit\" value=\"'. esc_attr__('Search') .'\" />\n\t</form>';\n\treturn $form;\n}", "title": "" }, { "docid": "c3435d0583c6e94092396409db01cd0d", "score": "0.4838162", "text": "public function is_search_page() {\n\t\tif ( ! empty( $_GET['dgwt_wcas'] ) && ! empty( $_GET['s'] ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "34725a729c697f254519f79415661a00", "score": "0.4830697", "text": "function bones_wpsearch($form) {\n $form = '<form role=\"search\" method=\"get\" id=\"searchform\" action=\"' . home_url( '/' ) . '\" >\n <label class=\"screen-reader-text\" for=\"s\">' . __('Search for:', 'bonestheme') . '</label>\n <input type=\"text\" value=\"' . get_search_query() . '\" name=\"s\" id=\"s\" placeholder=\"Search the Site...\" />\n <input type=\"submit\" id=\"searchsubmit\" value=\"'. esc_attr__('Search','bonestheme') .'\" />\n </form>';\n return $form;\n}", "title": "" } ]
8b5c76e008f1bdd1f2e6ea9126ecd40e
Return the current lead being processed. Should only be called when a form has been submitted. If called before the "real" lead has been saved to the database, uses self::create_lead() to create a temporary lead to work with.
[ { "docid": "6607b506ec4a7377e740e410b6e0cd07", "score": "0.85519546", "text": "public static function get_current_lead() {\n\n // if a GF submission is not in process, always return false\n if(!rgpost('gform_submit'))\n return false;\n\n if(!self::$_current_lead) {\n $form = self::get_form_meta(rgpost('gform_submit'));\n self::$_current_lead = self::create_lead($form);\n }\n\n return self::$_current_lead;\n }", "title": "" } ]
[ { "docid": "53e8c5895072daf23ee0b2352e9e0e92", "score": "0.6046868", "text": "public function entry_post_save( $lead, $form ) {\n\t\tif ( $this->is_processing( $form ) ) {\n\t\t\t// Payment ID\n\t\t\t$payment_id = gform_get_meta( $lead['id'], 'pronamic_payment_id' );\n\n\t\t\tif ( ! empty( $payment_id ) ) {\n\t\t\t\treturn $lead;\n\t\t\t}\n\n\t\t\t// Gateway\n\t\t\t$this->gateway = Pronamic_WP_Pay_Plugin::get_gateway( $this->feed->config_id );\n\n\t\t\tif ( ! $this->gateway ) {\n\t\t\t\treturn $lead;\n\t\t\t}\n\n\t\t\t// New payment\n\t\t\t$data = new Pronamic_WP_Pay_Extensions_GravityForms_PaymentData( $form, $lead, $this->feed );\n\n\t\t\t$payment_method = $data->get_payment_method();\n\n\t\t\t// Set payment method to iDEAL if issuer_id is set\n\t\t\tif ( null === $data->get_payment_method() && null !== $data->get_issuer_id() ) {\n\t\t\t\t$payment_method = Pronamic_WP_Pay_PaymentMethods::IDEAL;\n\t\t\t}\n\n\t\t\t$this->payment = Pronamic_WP_Pay_Plugin::start( $this->feed->config_id, $this->gateway, $data, $payment_method );\n\n\t\t\t$this->error = $this->gateway->get_error();\n\n\t\t\t// Updating lead's payment_status to Processing\n\t\t\t$lead[ Pronamic_WP_Pay_Extensions_GravityForms_LeadProperties::PAYMENT_STATUS ] = Pronamic_WP_Pay_Extensions_GravityForms_PaymentStatuses::PROCESSING;\n\t\t\t$lead[ Pronamic_WP_Pay_Extensions_GravityForms_LeadProperties::PAYMENT_AMOUNT ] = $this->payment->get_amount();\n\t\t\t$lead[ Pronamic_WP_Pay_Extensions_GravityForms_LeadProperties::PAYMENT_DATE ] = gmdate( 'y-m-d H:i:s' );\n\t\t\t$lead[ Pronamic_WP_Pay_Extensions_GravityForms_LeadProperties::TRANSACTION_TYPE ] = Pronamic_WP_Pay_Extensions_GravityForms_GravityForms::TRANSACTION_TYPE_PAYMENT;\n\t\t\t$lead[ Pronamic_WP_Pay_Extensions_GravityForms_LeadProperties::TRANSACTION_ID ] = $this->payment->get_transaction_id();\n\n\t\t\t// Update entry meta with payment ID\n\t\t\tgform_update_meta( $lead['id'], 'pronamic_payment_id', $this->payment->get_id() );\n\n\t\t\t// Update entry meta with subscription ID\n\t\t\tgform_update_meta( $lead['id'], 'pronamic_subscription_id', $this->payment->get_subscription_id() );\n\n\t\t\t// Update entry meta with feed ID\n\t\t\tgform_update_meta( $lead['id'], 'ideal_feed_id', $this->feed->id );\n\n\t\t\t// Update entry meta with current payment gateway\n\t\t\tgform_update_meta( $lead['id'], 'payment_gateway', 'pronamic_pay' );\n\n\t\t\t// Update lead\n\t\t\tPronamic_WP_Pay_Extensions_GravityForms_GravityForms::update_entry( $lead );\n\n\t\t\t// Add pending payment\n\t\t\t$action = array(\n\t\t\t\t'id' => $this->payment->get_id(),\n\t\t\t\t'transaction_id' => $this->payment->get_transaction_id(),\n\t\t\t\t'amount' => $this->payment->get_amount(),\n\t\t\t\t'entry_id' => $lead['id'],\n\t\t\t);\n\n\t\t\t$this->extension->payment_action( 'add_pending_payment', $lead, $action );\n\t\t}\n\n\t\treturn $lead;\n\t}", "title": "" }, { "docid": "0e8834cf3a0a92d819a99e403f1aa608", "score": "0.5755", "text": "public static function set_current_lead($lead) {\n GFCache::flush();\n self::$_current_lead = $lead;\n }", "title": "" }, { "docid": "39d98a17237e27204cfc440144f5da98", "score": "0.57152146", "text": "public static function create_lead( $form ) {\n\t\t\t\n\t\t\tif( empty( self::$lead ) ) {\n\t\t\t\tself::$lead = GFFormsModel::create_lead( $form );\n\t\t\t\tself::clear_field_value_cache( $form );\n\t\t\t}\n\t\t\t\n\t\t\treturn self::$lead;\n\t\t}", "title": "" }, { "docid": "d30c9e6c3baeec624136b87cc1d4c0fe", "score": "0.57023096", "text": "public static function create_lead( $form ) {\n\n if( empty( self::$lead ) ) {\n self::$lead = GFFormsModel::create_lead( $form );\n self::clear_field_value_cache( $form );\n }\n\n return self::$lead;\n }", "title": "" }, { "docid": "3856955624ee844390e03625e88114cb", "score": "0.5583394", "text": "private function get_lead_id()\n\t{\n\t\t$xsql=array();\n\t\t$xsql['dbname'] = \"papoo_form_manager_leads\";\n\t\t$xsql['select_felder'] = array(\"form_manager_lead_id\",\"form_manager_form_id\");\n\t\t$xsql['limit'] = \"\";\n\t\t$xsql['where_data'] = array(\"form_manager_form_datum\"=>$this->checked->savetime);\n\t\t$result = $this->db_abs->select( $xsql );\n\t\t$this->checked->leadtracker_lead_id = $result['0']['form_manager_lead_id'];\n\t\treturn $result['0']['form_manager_lead_id'];\n\t}", "title": "" }, { "docid": "8362885bc1c7afbb74da366946925aa4", "score": "0.5576069", "text": "public function get_current_form() {\r\n\r\n\t\treturn rgempty( 'id', $_GET ) ? false : GFFormsModel::get_form_meta( rgget( 'id' ) );\r\n\t}", "title": "" }, { "docid": "142ecdb94ef2d20ef61fbeee79dbb7a6", "score": "0.5552371", "text": "public function getCurrentField()\n {\n return $this->currentField;\n }", "title": "" }, { "docid": "232309af39508abeab0ad99c938726fb", "score": "0.5516486", "text": "public function getCurrentStep()\n {\n return $this->currentStep;\n }", "title": "" }, { "docid": "d72a5e5b0a83c8a57d6f097ea9b5b1b9", "score": "0.54549086", "text": "private function _get_lead_details() { \n\t\t\n\t\t//GET INSTANCE\n\t\t$db = $this -> db;\n\n\t\t//GET CLIENT ID SESSION ALSO KNOWN AS LEADS ID\n\t\t$lead_id = ( $_SESSION['client_id'] ? $_SESSION['client_id'] : $_SESSION['leads_id'] );\n\t\t\n\t\t//CHECK IF LEAD IS ALREADY EXISTS!\n\t\tif( $lead_id ) {\n\t\t\n\t\t\tif( isset( $_SESSION[ 'leads_new_info_id' ] ) ) {\n\t\t\t\t\n\t\t\t\t//CONSTRUCT LEAD NEW INFO QUERY\n\t\t\t\t$lead_sql = $db -> select()\n\t\t\n\t\t\t\t\t\t\t\t-> from( array( 'l' => 'leads_new_info' ),\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t'leads_id as leads_id',\n\n\t\t\t\t\t\t\t\t\t\t\t'fname as leads_profile_firstname', \n\n\t\t\t\t\t\t\t\t\t\t\t'lname as leads_profile_lastname', \n\n\t\t\t\t\t\t\t\t\t\t\t'email as leads_profile_primary_email_address',\n\n\t\t\t\t\t\t\t\t\t\t\t'sec_email as leads_profile_secondary_email_address',\n\n\t\t\t\t\t\t\t\t\t\t\t'mobile as leads_profile_mobile_no', \n\n\t\t\t\t\t\t\t\t\t\t\t'company_name as leads_company_name',\n\n\t\t\t\t\t\t\t\t\t\t\t'company_position as leads_company_position',\n\n\t\t\t\t\t\t\t\t\t\t\t'company_size as leads_company_size',\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t'officenumber as leads_company_office_no',\n\n\t\t\t\t\t\t\t\t\t\t\t'company_address as leads_company_address',\n\n\t\t\t\t\t\t\t\t\t\t\t'company_turnover as leads_company_turnover',\n\n\t\t\t\t\t\t\t\t\t\t\t'company_description as leads_company_description',\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t'outsourcing_experience as leads_company_tried_staffing'\n\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t//CONSTRUCT LEAD QUERY\n\t\t\t\t$lead_sql = $db -> select()\n\t\t\t\n\t\t\t\t\t\t\t\t-> from( array( 'l' => 'leads' ), \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t'id as leads_id',\n\n\t\t\t\t\t\t\t\t\t\t\t'fname as leads_profile_firstname', \n\n\t\t\t\t\t\t\t\t\t\t\t'lname as leads_profile_lastname', \n\n\t\t\t\t\t\t\t\t\t\t\t'email as leads_profile_primary_email_address',\n\n\t\t\t\t\t\t\t\t\t\t\t'sec_email as leads_profile_secondary_email_address',\n\n\t\t\t\t\t\t\t\t\t\t\t'mobile as leads_profile_mobile_no', \n\n\t\t\t\t\t\t\t\t\t\t\t'company_name as leads_company_name',\n\n\t\t\t\t\t\t\t\t\t\t\t'company_position as leads_company_position',\n\n\t\t\t\t\t\t\t\t\t\t\t'company_size as leads_company_size',\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t'officenumber as leads_company_office_no',\n\n\t\t\t\t\t\t\t\t\t\t\t'company_address as leads_company_address',\n\n\t\t\t\t\t\t\t\t\t\t\t'company_turnover as leads_company_turnover',\n\n\t\t\t\t\t\t\t\t\t\t\t'company_description as leads_company_description',\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t'outsourcing_experience as leads_company_tried_staffing'\n\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t);\n\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t$lead_sql -> joinLeft( array( 'la' => 'leads_address' ), 'l.id = la.leads_id', array( 'leads_address', 'leads_zip_code as leads_address_zip_code' ) )\n\n\t\t\t\t\t\t -> joinLeft( array( 'lco' => 'library_country' ), 'la.leads_country = lco.id', array( 'id as leads_address_country_id', 'name as leads_address_country_name' ) )\n\n\t\t\t\t\t\t -> joinLeft( array( 'ls' => 'library_state' ), 'la.leads_state = ls.id', array( 'id as leads_address_state_id', 'name as leads_address_state_name' ) )\n\n\t\t\t\t\t\t -> joinLeft( array( 'lci' => 'library_city' ), 'la.leads_city = lci.id', array( 'id as leads_address_city_id', 'name as leads_address_city_name' ) );\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \n\t\t\t\tif( isset( $_SESSION[ 'leads_new_info_id' ] ) ) {\n\t\t\t\t\t\n\t\t\t\t\t$lead_sql -> where( 'l.leads_id = ?', $lead_id );\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t$lead_sql -> where( 'l.id = ?', $lead_id ); \n\t\t\t\t\t\n\t\t\t\t}\t\t\t \n\t\t\t\t\t\t\t \n\t\t\t\n\t\t\t//FETCH ROW LEAD\n\t\t\t$lead = $db -> fetchRow( $lead_sql ); \n\t\t\t\n\t\t\t//RETURN LEAD DETAILS\n\t\t\treturn $lead;\n\t\t\n\t\t} else {\n\t\t\t\n\t\t\t//REDIRECT TO STEP 1\n\t\t\theader(\"Location:/portal/custom_get_started/\");\n\t\t\t\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "8969807995714bc2ea94fefc3e220b99", "score": "0.54117715", "text": "public function actionWeblead() {\n // Set staticModel and model properties for Contact creation, then assign attributes\n $this->_staticModel = X2Model::model ('Contacts');\n $this->model = new $this->_staticModel;\n $webForm = null;\n if (isset ($this->jpost['webFormId'])) {\n // Prepare webform parameters\n $webForm = WebForm::model()->findByPk($this->jpost['webFormId']);\n $extractedParams['leadSource'] = $webForm->leadSource;\n $extractedParams['generateLead'] = $webForm->generateLead;\n $extractedParams['generateAccount'] = $webForm->generateAccount;\n $extractedParams['userEmailTemplate'] = $webForm->userEmailTemplate;\n $extractedParams['webleadEmailTemplate'] = $webForm->webleadEmailTemplate;\n }\n $this->setModelAttributes();\n if (empty($this->model->trackingKey)) {\n $this->model->trackingKey = Contacts::getNewTrackingKey();\n }\n\n $newRecord = true;\n if($this->model->asa('DuplicateBehavior') && $this->model->checkForDuplicates()){\n $duplicates = $this->model->getDuplicates();\n $oldest = $duplicates[0];\n $fields = $this->model->getFields(true);\n foreach ($fields as $field) {\n if (!in_array($field->fieldName,\n $this->model->MergeableBehavior->restrictedFields)\n && !is_null($this->model->{$field->fieldName})) {\n if ($field->fieldName === 'assignedTo' &&\n !in_array($oldest->{$field->fieldName}, array('Anyone', ''))) {\n // Don't resassign if the duplicate was already assigned\n continue;\n }\n if ($field->type === 'text' && !empty($oldest->{$field->fieldName})) {\n $oldest->{$field->fieldName} .= \"\\n--\\n\" . $this->model->{$field->fieldName};\n } else {\n $oldest->{$field->fieldName} = $this->model->{$field->fieldName};\n }\n }\n }\n $this->model = $oldest;\n $newRecord = $this->model->isNewRecord;\n }\n if($newRecord){\n $this->model->createDate = $now;\n if (!isset($this->jpost['assignedTo'])) {\n // Allow assignedTo to be directly set if desired, otherwise use lead routing\n $this->model->assignedTo = $this->getNextAssignee();\n }\n }\n\n // Save the model, check for errors, and respond if necessary.\n $saved = $this->model->save( !$this->settings->rawInput );\n if($this->model->hasErrors()) {\n $this->response['errors'] = $this->model->errors;\n $this->send(422,\"Model failed validation.\");\n }\n\n // Check for fingerprint and attributes\n // if there's not an anonyomous contact, then the fingerprint match\n // was for an actual contact.\n if (Yii::app()->contEd('pla') && Yii::app()->settings->enableFingerprinting &&\n isset ($this->jpost['fingerprint'])) {\n $attributes = (isset($this->jpost['fingerprintAttributes']))?\n json_decode($this->jpost['fingerprintAttributes'], true) : array();\n $anonContact = AnonContact::model ()\n ->findByFingerprint ($this->jpost['fingerprint'], $attributes);\n if ($anonContact !== null) {\n $this->model->mergeWithAnonContact ($anonContact);\n } else {\n $this->model->setFingerprint ($this->jpost['fingerprint'], $attributes);\n }\n }\n\n if ($extractedParams['generateLead'])\n self::generateLead ($this->model, $extractedParams['leadSource']);\n if ($extractedParams['generateAccount'])\n self::generateAccount ($this->model);\n\n // Create an Action, Event, Notification for the new web lead\n $this->createWebleadAction($this->model);\n $this->createWebleadEvent($this->model);\n\n if($this->model->assignedTo != 'Anyone' && $this->model->assignedTo != '') {\n $this->createWebleadNotification($this->model);\n }\n\n // Read selected Tags and trigger X2Workflows on new weblead\n if (!isset($this->jpost['tags']) || empty($this->jpost['tags']))\n $tags = array();\n else\n $tags = explode(',', $this->jpost['tags']);\n\n X2Flow::trigger('WebleadTrigger', array(\n 'model' => $this->model,\n 'tags' => $tags,\n ));\n\n if (Yii::app()->contEd('pro')) {\n // email to send from\n $emailFrom = Credentials::model()->getDefaultUserAccount(\n Credentials::$sysUseId['systemResponseEmail'], 'email');\n if($emailFrom == Credentials::LEGACY_ID)\n $emailFrom = array(\n 'name' => Yii::app()->settings->emailFromName,\n 'address' => Yii::app()->settings->emailFromAddr\n );\n }\n\n if($this->model->assignedTo != 'Anyone' && $this->model->assignedTo != '') {\n $profile = Profile::model()->findByAttributes(\n array('username' => $this->model->assignedTo));\n\n /* send user that's assigned to this weblead an email if the user's email\n address is set and this weblead has a user email template */\n if($profile !== null && !empty($profile->emailAddress)){\n\n if (Yii::app()->contEd('pro') &&\n $extractedParams['userEmailTemplate']) {\n\n /* We'll be using the user's own email account to send the\n web lead response (since the contact has been assigned) and\n additionally, if no system notification account is available,\n as the account for sending the notification to the user of\n the new web lead (since $emailFrom is going to be modified,\n and it will be that way when this code block is exited and the\n time comes to send the \"welcome aboard\" email to the web lead)*/\n $emailFrom = Credentials::model()->getDefaultUserAccount(\n $profile->user->id, 'email');\n if($emailFrom == Credentials::LEGACY_ID)\n $emailFrom = array(\n 'name' => $profile->fullName,\n 'address' => $profile->emailAddress\n );\n\n $this->sendUserNotificationEmail($this->model, $profile->emailAddress, $emailFrom, $extractedParams['userEmailTemplate']);\n } else {\n $emailFrom = Credentials::model()->getDefaultUserAccount(\n Credentials::$sysUseId['systemNotificationEmail'], 'email');\n if($emailFrom == Credentials::LEGACY_ID)\n $emailFrom = array(\n 'name' => $profile->fullName,\n 'address' => $profile->emailAddress\n );\n $this->sendLegacyUserNotificationEmail($this->model, $profile->emailAddress, $emailFrom);\n }\n }\n\n }\n\n /* send new weblead an email if we have their email address and this web\n form has a weblead email template */\n if(Yii::app()->contEd('pro') && $extractedParams['webleadEmailTemplate'] &&\n !empty($this->model->email)) {\n $this->sendWebleadNotificationEmail($this->model, $emailFrom, $extractedParams['webleadEmailTemplate']);\n }\n\n if (!empty($tags)){\n X2Flow::trigger('RecordTagAddTrigger', array(\n 'model' => $this->model,\n 'tags' => $tags,\n ));\n }\n\n // Set body\n $this->responseBody = $this->model;\n\n // Add resource location header for a newly created record\n // and send with 201 status\n $this->response->httpHeader['Location'] = $this->createAbsoluteUrl('/api2/model', array(\n '_class' => 'Contacts',\n '_id' => $this->model->id\n ));\n $this->send(201,\"Model of class \\\"$class\\\" created successfully.\");\n }", "title": "" }, { "docid": "15929aa6346a7fa17584f38d4c8228a4", "score": "0.5377461", "text": "public function getCurrentStep()\n {\n if ($this->_currentStep === null) {\n $this->setCurrentStep();\n }\n\n return $this->_currentStep;\n }", "title": "" }, { "docid": "afd233d820a2a767b36bf07607211680", "score": "0.53208095", "text": "public function getCurrentPlan()\n {\n return $this->dataHelper->checkAdvancePlan();\n }", "title": "" }, { "docid": "10a4d00a6c25a09f84d3e67168b3f7f9", "score": "0.53065974", "text": "public function current()\n {\n $value = null;\n if (isset($this->data) &&\n isset($this->data[$this->pointer])\n ) {\n $value = new FileMakerRelation(\n $this->data[$this->pointer],\n ($this->result == \"PORTAL\") ? \"PORTALRECORD\" : \"RECORD\",\n $this->errorCode,\n $this->portalName);\n }\n return $value;\n }", "title": "" }, { "docid": "e2153360f0931ece4b4d7766cb425019", "score": "0.53045017", "text": "public function getInputForm()\n {\n \treturn \\FluxFE\\Lead::getInstance();\n }", "title": "" }, { "docid": "1efe3023ed2669c3787a9612cbcce629", "score": "0.529106", "text": "public function getReturnCustomerLeadId()\n\t{\n\t\treturn $this->returnCustomerLeadId;\n\t}", "title": "" }, { "docid": "5db77a20f4722324b1c22791a2b63c52", "score": "0.5237578", "text": "public function getDatedVehicleJourneyRef()\n {\n return $this->datedVehicleJourneyRef;\n }", "title": "" }, { "docid": "ece3d7a9c72bea57c0833e124821cedf", "score": "0.5232246", "text": "public function get_current_lesson_id() {\n\t\tglobal $woothemes_sensei;\n\n\t\t$group_status = groups_get_groupmeta(bp_get_group_id(), 'bp_course_attached', true);\n\t\t$post = get_post((int) $group_status);\n\n\t\treturn $post->ID;\n\t}", "title": "" }, { "docid": "fbc237f21217f5f0ce3937de8424520f", "score": "0.5109732", "text": "public function getCurrent()\n {\n return $this->getUser('current');\n }", "title": "" }, { "docid": "180ecd0c1565b0bf65eb5550dfde303c", "score": "0.5096243", "text": "function getInputForm() {\n\t\treturn new \\Flux\\Lead();\n\t}", "title": "" }, { "docid": "180ecd0c1565b0bf65eb5550dfde303c", "score": "0.5096243", "text": "function getInputForm() {\n\t\treturn new \\Flux\\Lead();\n\t}", "title": "" }, { "docid": "7f081a38a83f23142c000cd6ba3e19a3", "score": "0.50797695", "text": "public function getCurrent() {\n return $this->_current;\n }", "title": "" }, { "docid": "1fb0ad89d1d4b37fafb92389ff00fcc4", "score": "0.50764704", "text": "public function get_workflow()\n {\n return $this->workflow;\n }", "title": "" }, { "docid": "e5571eedf479c2fe514d40d4b0dc894f", "score": "0.50707513", "text": "public function store(LeadFormRequest $request)\n {\n Helper::allowed_gate('leads_process');\n $leads = $this->leadRepository->process($request);\n return redirect()->route('admin.leads.show',['id' => $leads->id]);\n }", "title": "" }, { "docid": "a4ded54ef7a81a06ad7e4ac862b4f1cd", "score": "0.50579756", "text": "public function getConvertLeadId()\n\t{\n\t\tif ($this->hasLead())\n\t\t{\n\t\t\t$lead = current($this->getLeads());\n\t\t\treturn $lead->id->value;\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "e24762401e69a41e5463f74a0df8df3e", "score": "0.5037346", "text": "public function getCurrentRequest()\n {\n return $this->_currentRequest;\n }", "title": "" }, { "docid": "8bb8b6c3ede480a2c8c7b4917fdd1e09", "score": "0.5025534", "text": "public function getCurrent()\n {\n return $this->_current;\n }", "title": "" }, { "docid": "699850dd1cbf27121b6151d5f001527e", "score": "0.50069076", "text": "public function lastDateOnPlanner()\n {\n $planner = SitePlanner::where('entity_type', 'c')->where('entity_id', $this->id)\n ->where('from', '<', Carbon::today()->format('Y-m-d'))\n ->orderBy('from', 'desc')->first();\n\n return ($planner) ? $planner->from : null;\n }", "title": "" }, { "docid": "3176ec1f963dca52f9725dc2f97d5a5b", "score": "0.50034463", "text": "public function getFocus() {\n return $this->focus;\n }", "title": "" }, { "docid": "72fc8b421b098c8e55a7a65b372a5211", "score": "0.5003121", "text": "public function getMonitoredVehicleJourney()\n {\n return $this->monitoredVehicleJourney;\n }", "title": "" }, { "docid": "4fde2b736988b76b4adb62abb0c5c07c", "score": "0.49886346", "text": "public function currentWaiting()\n {\n return $this->get('current-waiting');\n }", "title": "" }, { "docid": "f26ca48c25c5b7fee794c59c44e00619", "score": "0.49839726", "text": "public function current()\n\t{\n\t\treturn current($this->_fields);\n\t}", "title": "" }, { "docid": "97686ef56ef52c1e8b43609733f0bff3", "score": "0.49738035", "text": "public function current()\n {\n return $this->getInformation();\n }", "title": "" }, { "docid": "86718e9e2461fa45d1f6860a9c56c62e", "score": "0.4967978", "text": "function process_user(){ //adds the user to the leads table and returns $this->lead_id\n\t\t$leads = new DB_Leads();\n\t\t$leads->categoryid=$this->array['CategoryID'];\n\t\t$leads->vehicle_year=$this->array['vehicle_year'];\n\t\t$leads->vehicle_make=$this->array['vehicle_make'];\n\t\t$leads->vehicle_model=$this->array['vehicle_model'];\n\t\t$leads->vehicle_condition1=$this->array['vehicle_condition1'];\n\t\t$leads->mobilehometype=$this->array['MobileHomeType'];\n\t\t$leads->vehicle_length=$this->array['vehicle_length'];\n\t\t$leads->vehicle_width=$this->array['vehicle_width'];\n\t\t$leads->vehicle_weight=$this->array['vehicle_weight'];\n\t\t$leads->beam=$this->array['beam'];\n\t\t$leads->trailer=$this->array['Trailer'];\n\n\t\t$leads->trailertow=$this->array['TrailerTow'];\n\t\t$leads->vehicle_year2=$this->array['vehicle_year2'];\n\t\t$leads->vehicle_make2=$this->array['vehicle_make2'];\n\t\t$leads->vehicle_model2=$this->array['vehicle_model2'];\n\t\t$leads->vehicle_condition2=$this->array['vehicle_condition2'];\n\t\t$leads->transporttype=$this->array['TransportType'];\n\t\t$leads->aprox_wt=$this->array['APROX_WT'];\n\t\t$leads->vehicle_pickup_location=$this->array['vehicle_pickup_location'];\n\t\t$leads->vehicle_pickup_state=$this->array['vehicle_pickup_state'];\n\t\t$leads->vehicle_pickup_zipcode=$this->array['Vehicle_pickup_zipcode'];\n\t\t$leads->vehicle_destination_city=$this->array['Vehicle_destination_city'];\n\t\t$leads->vehicle_destination_state=$this->array['Vehicle_destination_state'];\n\t\t$leads->vehicle_destination_zipcode=$this->array['Vehicle_destination_zipcode'];\n\t\t$leads->move_date=$this->array['move-date-year'].\"-\".$this->array['move-date-month'].\"-\".$this->array['move-date-day'];\n\t\t$leads->flexable_move=$this->array['flexable_move'];\n\t\t$leads->carrier_type=$this->array['carrier_type'];\n\t\t$leads->customername=$this->array['CustomerName'];\n\t\t$leads->phone=$this->array['Phone'];\n\t\t$leads->email=$this->array['Email'];\n\t\t$leads->contactmethod=$this->array['ContactMethod'];\n\t\t$leads->comments=$this->array['Comments'];\n\t\t$leads->submit_date=date(\"Y-m-d\");\n\t\t$leads->carrier_1=$this->ids[0]['id'];\n\t\t$leads->carrier_2=$this->ids[1]['id'];\n\t\t$leads->carrier_3=$this->ids[2]['id'];\n\t\t$leads->carrier_4=$this->ids[3]['id'];\n\t\t$leads->carrier_5=$this->ids[4]['id'];\n\t\t$leads->carrier_6=$this->ids[5]['id'];\n\t\t$leads->carrier_7=$this->ids[6]['id'];\n\t\t$leads->carrier_8=$this->ids[7]['id'];\n\t\t$this->lead_id = $leads->insert();\n\t}", "title": "" }, { "docid": "a2fa395b0eb312f34b682a214c700254", "score": "0.4959319", "text": "public function getCurrentStepName()\n {\n return $this->currentStepName;\n }", "title": "" }, { "docid": "817e67fdf5f3e28267728e41dbb4ca6e", "score": "0.49382994", "text": "protected function _getCurrentPath()\n {\n return $this->_currentPath;\n }", "title": "" }, { "docid": "49eaa8ddbe1b3ef794b678fb0065461a", "score": "0.4936752", "text": "public function getFocus()\r\n {\r\n return $this->focus;\r\n }", "title": "" }, { "docid": "e3ef4643a02a2465a69962e2d8bf8b05", "score": "0.4934624", "text": "public function lead()\n {\n return $this->belongsTo(Lead::class);\n }", "title": "" }, { "docid": "9e0834652d27d4ad153ad0b1830776dd", "score": "0.4916608", "text": "public function getCurrentForm() {\n $form = Form::active();\n $questionTime = config('trivia.time_per_question');\n\n if($form->checkForUserSubmissions(Auth::User()->id)) {\n return redirect('/formSubmitted');\n } else {\n return view('trivia/form')->with(compact('form', 'questionTime'));\n }\n }", "title": "" }, { "docid": "34486f31693125968d33fa06889930d2", "score": "0.49106267", "text": "public function addLead()\n\t{\n\t\treturn view('backend.add_lead');\n\t}", "title": "" }, { "docid": "a8d10418783dc267ef73d2478ec2e655", "score": "0.49066094", "text": "function getSubmitFormOnEnter()\n\t{\n\t\treturn $this->submit_form_on_enter;\n\t}", "title": "" }, { "docid": "0343ccb615aa93041575f3a8a77aa3c6", "score": "0.48989367", "text": "public function getReferral()\n\t{\n\t\tif (!$this->hasData('referral')) {\n\t\t\tif ($this->getInvitation()->getReferralId()) {\n\t\t\t\t$referral = Df_Customer_Model_Customer::ld(\n\t\t\t\t\t$this->getInvitation()->getReferralId()\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$referral = false;\n\t\t\t}\n\t\t\t$this->setData('referral', $referral);\n\t\t}\n\t\treturn $this->_getData('referral');\n\t}", "title": "" }, { "docid": "1ba0475da0a67b591cda0d786fcb3d2e", "score": "0.4893897", "text": "public function process_leads_details() {\n\t\n\t\t//GET INSTANCES\n\t\t$db = $this -> db;\n\t\t\n\t\t$database = $this -> database;\n\t\t\n\t\t$job_specification_preview = $database -> selectCollection( 'job_specification_preview' );\n\t\t\n\t\t\n\t\tif( isset( $_POST ) ) {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$success = true;\n\t\t\t\n\t\t\t$result = array();\n\t\t\t\n\t\t\t$error_message = array();\n\t\t\t\n\t\t\t\n\n\t\t\t$leads_id = $_POST[ 'leads_id' ];\n\t\t\t\n\t\t\t$job_role_id = $_POST[ 'job_role_id' ];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tUNSET( $_POST[ 'leads_id' ] ); //NOT NEEDED ANYMORE\n\t\t\t\n\t\t\tUNSET( $_POST[ 'job_role_id' ] ); //NOT NEEDED ANYMORE\n\t\t\t\n\t\t\t\n\t\t\t//lEADS DETAILS\n\t\t\t$leads_data = array(\n\t\t\t\t\n\t\t\t\t'fname' => $_POST[ 'first_name' ],\n\t\t\t\t\n\t\t\t\t'lname' => $_POST[ 'last_name' ],\n\t\t\t\t\n\t\t\t\t'mobile' => $_POST[ 'mobile_phone' ],\n\t\t\t\t\n\t\t\t\t'email' => $_POST[ 'email_address' ],\n\t\t\t\t\n\t\t\t\t'sec_email' => $_POST[ 'alt_email' ],\n\n\t\t\t\t'officenumber' => $_POST[ 'company_phone' ],\n\t\t\t\t\n\t\t\t\t'outsourcing_experience' => $_POST[ 'tried_staffing' ],\n\t\t\t\t\n\t\t\t\t'company_name' => $_POST[ 'company_name' ],\n\t\t\t\t\n\t\t\t\t'company_position' => $_POST[ 'company_position' ],\n\t\t\t\t\n\t\t\t\t'company_address' => $_POST[ 'leads_address' ],\n\t\t\t\t\n\t\t\t\t'company_size' => $_POST[ 'existing_team_size' ],\n\t\t\t\t\n\t\t\t\t'company_description' => $_POST[ 'company_description' ]\n\n\t\t\t);\n\t\t\t\n\t\t\t\n\t\t\t//CHECK IF COUNTRY IS ISSET\n\t\t\tif( isset( $_POST[ 'leads_country' ] ) && ! empty( $_POST[ 'leads_country' ] ) ) {\n\t\t\t\t\n\t\t\t\t$leads_country_sql = $db -> select() \n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t -> from( 'library_country', 'name' )\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t -> where( 'id = ?', $_POST[ 'leads_country' ] );\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t$leads_country = $db -> fetchOne( $leads_country_sql );\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t$leads_data[ 'leads_country' ] = $leads_country;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//CHECK IF STATE IS ISSET\n\t\t\tif( isset( $_POST[ 'leads_state' ] ) && ! empty( $_POST[ 'leads_state' ] ) ) {\n\t\t\t\t\n\t\t\t\t$leads_state_sql = $db -> select() \n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t -> from( 'library_state', 'name' )\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t -> where( 'id = ?', $_POST[ 'leads_state' ] );\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t$leads_state = $db -> fetchOne( $leads_state_sql );\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t$leads_data[ 'state' ] = $leads_state;\n\t\t\t\t\n\t\t\t}\n\n\t\t\t//CHECK IF CITY IS ISSET\n\t\t\tif( isset( $_POST[ 'leads_city' ] ) && ! empty( $_POST[ 'leads_city' ] ) ) {\n\t\t\t\t\n\t\t\t\t$leads_city_sql = $db -> select() \n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t -> from( 'library_city', 'name' )\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t -> where( 'id = ?', $_POST[ 'leads_city' ] );\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t$leads_city = $db -> fetchOne( $leads_city_sql );\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t$leads_data[ 'city' ] = $leads_city;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//lEADS ADDRESS DETAILS\n\t\t\t$leads_address_data = array(\n\t\t\t\n\t\t\t\t'leads_address' => $_POST[ 'leads_address' ], \n\t\t\t\t\n\t\t\t\t'leads_country' => $_POST[ 'leads_country' ],\n\t\t\t\t\n\t\t\t\t'leads_state' => $_POST[ 'leads_state' ],\n\t\t\t\t\n\t\t\t\t'leads_city' => $_POST[ 'leads_city' ],\n\t\t\t\t\n\t\t\t\t'leads_zip_code' => $_POST[ 'leads_zip_code' ] \n\t\t\t\t\n\t\t\t);\n\t\t\t\n\t\t\t//CHECK IF LEADS ALREADY REGISTER TO OUR WEBSITE\n\t\t\tif( isset( $_SESSION[ 'leads_new_info_id' ] ) ) {\n\t\t\t\t\n\t\t\t\t//REMOVE STATE\n\t\t\t\tif( isset( $leads_data[ 'state' ] ) ) {\n\t\t\t\t\t\n\t\t\t\t\tunset ($leads_data[ 'state' ] );\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//REMOVE CITY\n\t\t\t\tif( isset( $leads_data[ 'city' ] ) ) {\n\t\t\t\t\t\n\t\t\t\t\tunset( $leads_data[ 'city' ] );\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//UPDATE LEADS NEW INFO DETAILS\n\t\t\t\t$db -> update( 'leads_new_info', $leads_data, $db -> quoteInto( 'leads_id = ?', $leads_id ) );\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t//UPDATE LEADS DETAILS\n\t\t\t\t$db -> update( 'leads', $leads_data, $db -> quoteInto( 'id = ?', $leads_id ) );\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//CHECK IF THERES ALREADY LEADS ADDRESS\n\t\t\t$leads_address_sql = $db -> select()\n\t\t\t\n\t\t\t\t\t\t\t\t\t -> from( 'leads_address' )\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t -> where( 'leads_id = ?', $leads_id );\n\t\t\t\t\t\t\t\t\t \n\t\t\t$leads_address = $db -> fetchRow( $leads_address_sql );\n\t\t\t\n\t\t\t//CHECK IF LEADS ADDRESS ALREADY EXISTS\n\t\t\tif( $leads_address ) {\n\t\t\t\n\t\t\t\t//UPDATE LEADS ADDRESS\n\t\t\t\t$db -> update( 'leads_address', $leads_address_data, $db -> quoteInto( 'leads_id = ?', $leads_id ) );\n\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t//INSERT LEADS ADDRESS\n\t\t\t\t$db -> insert( 'leads_address', $leads_address_data );\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//DELETE ALL MONGODB RECORD WITH JOB ROLE\n\t\t\t$job_specification_preview -> remove( array( 'gs_job_role_selection_id' => \"{$job_role_id}\" ) );\n\t\t\t\n\t\t\t\n\t\t\t//GET ALL JOB ORDERS\n\t\t\t$job_order_ids_sql = $db -> select()\n\t\t\t\n\t\t\t\t\t\t\t\t -> from( 'gs_job_titles_details', array( 'gs_job_titles_details_id' ) )\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t -> where( 'gs_job_role_selection_id = ?', $job_role_id );\n\t\t\t\n\t\t\t$job_order_ids = $db -> fetchAll( $job_order_ids_sql );\n\t\t\t\n\t\t\t\n\t\t\tforeach( $job_order_ids as $job_order_id ) {\n\t\t\t\t\n\t\t\t\t//UPDATE MONGODB RECORD\n\t\t\t\t$this -> update_mongodb_record( $job_role_id, $job_order_id );\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t\t//SHOW RESPONSE\n\t\t\techo json_encode( array( 'success' => $success, 'result' => $result, 'error_message' => $error_message ) );\n\t\t\t\n\t\t\t\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "ddb0fa13f7c366cdb68acea81a0ac6bb", "score": "0.48937696", "text": "public static function &getCurrent()\n {\n return self::$currentWebPage;\n }", "title": "" }, { "docid": "d9e2566adfefbd405ac989911dfbf0ee", "score": "0.48908076", "text": "function getSubmission() {\n\t\treturn $this->_submission;\n\t}", "title": "" }, { "docid": "d9e2566adfefbd405ac989911dfbf0ee", "score": "0.48908076", "text": "function getSubmission() {\n\t\treturn $this->_submission;\n\t}", "title": "" }, { "docid": "037bb476b56fa62d90232bd562b55858", "score": "0.4889049", "text": "public function getRedirect() {\n return $this->redirect_target;\n }", "title": "" }, { "docid": "861360281b0178ef22a45e34ccdb558b", "score": "0.4884374", "text": "protected function form()\n {\n $form = new Form(new leads());\n $fields= leads::fields()->get();\n $tabs= $fields->groupby('extra.group');\n $fields_to_ignore= $fields->pluck('name');\n\n $lead= \"\";\n if($form->isEditing()) {\n $id = request()->route()->parameter('lead');\n $lead = leads::findOrFail($id);\n }\n\n $form->select('user_id', __('User id'))->options(User::all()->pluck('email', 'id'));\n foreach ($tabs as $tab => $fields){\n $form->tab($tab, function($form) use ($fields, $lead){\n foreach ($fields as $field){\n $current_field= $form->{$field->type}($field->name, $field->label)->rules($field->validation_string);\n if($field->type === \"select\" && $field->extra && $field->extra[\"options\"]){\n $current_field->options( $field->extra[\"options\"]);\n }\n if($form->isEditing()){\n $fieldObj= $lead->getFieldById($field->id);\n if($fieldObj){\n// dump($fieldObj->value);\n $current_field->default($fieldObj->value);\n }\n }\n }\n });\n }\n\n $instance= $this;\n $form->submitted(function (Form $form) use($fields_to_ignore, $instance) {\n foreach ($fields_to_ignore as $field){\n $instance->fieldsData[$field]= request()->input($field);\n $form->ignore($field);\n }\n });\n\n $form->saved(function (Form $form) use ($instance) {\n $id= $form->model()->id;\n $lead= leads::findOrFail($id);\n $fieldRecords= collect($instance->fieldsData)->filter(function ($value){ return $value; })->toArray();\n $lead->fields= $fieldRecords;\n $lead->save();\n });\n return $form;\n }", "title": "" }, { "docid": "d916c9aee75db5116d11f0b0d4599ef4", "score": "0.48781407", "text": "public function get_record( $lead_id ) {\n\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "ace08ffc54d1a196cef6e545339083c8", "score": "0.48736933", "text": "public function createLead(){\n\t\t\n\t}", "title": "" }, { "docid": "ab66638b8c641d6510ba7ebbbb647e7a", "score": "0.48725915", "text": "public function RelevantLogEntry()\n {\n return $this->MyStep()->RelevantLogEntry($this);\n }", "title": "" }, { "docid": "709b9a696e6b9d69d7ba3d76d040b0f3", "score": "0.48725897", "text": "public function getCurrent()\n\t{\n\t\treturn $this->current_dir;\n\t}", "title": "" }, { "docid": "d788d85d966273630701b1aeadf2dcf1", "score": "0.48571634", "text": "public function current() {\n return $this->fields[$this->position];\n }", "title": "" }, { "docid": "d97980b587f66f27eb72a1d094152733", "score": "0.48454538", "text": "public function getCurrentRoute()\n {\n return $this->currentRoute;\n }", "title": "" }, { "docid": "d97980b587f66f27eb72a1d094152733", "score": "0.48454538", "text": "public function getCurrentRoute()\n {\n return $this->currentRoute;\n }", "title": "" }, { "docid": "8b4a61d7bf925e1ef6c286ce9cfe5dbf", "score": "0.48407793", "text": "public function getWorkLocation()\n {\n return $this->workLocation;\n }", "title": "" }, { "docid": "eff2ef55b988c10944d0531cc06aafff", "score": "0.48406687", "text": "public function current()\n {\n if ($this->currentDate) {\n return clone $this->currentDate;\n }\n }", "title": "" }, { "docid": "eaa88d1d684c547ea7108baac3d5b78f", "score": "0.48368728", "text": "public function output_filter_leadtracker()\n\t{\n\t\t$form_reload_id = $this->get_different_form_id_for_reload($this->checked->form_manager_id);\n\n\t\t//dif Faktor - bestimmt ob Daten aus ursprünglichen Formular gesetzt werden soll mit der ID\n\t\t$rldif=\"\";\n\n\t\t//Wenn anders ist, den trigger auch setzen\n\t\tif ($form_reload_id!=$this->checked->form_manager_id) {\n\t\t\t//Anders, dann altes Formular übergeben\n\t\t\t$rldif=$this->checked->form_manager_id;\n\t\t}\n\n\t\tglobal $output;\n\n\t\t//Reload Link setzen\n\t\t$reloadlink=PAPOO_WEB_PFAD.\"/plugin.php?menuid=\".$this->checked->menuid.\n\t\t\t\"&fertig=0\".\n\t\t\t\"&template=\".$this->checked->template.\n\t\t\t\"&form_manager_id=\".$form_reload_id.\n\t\t\t\"&flexid=\".$this->checked->flexid.\n\t\t\t\"&flex_mv_id=\".$this->checked->flex_mv_id.\n\t\t\t\"&style=\".$this->checked->style.\n\t\t\t\"&reload_form=ok\".\n\t\t\t\"&rldif=\".$rldif.\n\t\t\t\"&getlang=\".$this->content->template['lang_short'];\n\n\t\t$output=str_ireplace(\"#reload_form_link#\",$reloadlink,$output);\n\t}", "title": "" }, { "docid": "9dea743ca3b14b03530b9abae41f1c51", "score": "0.48322994", "text": "public function current()\n {\n return $this->to($this->request->getPathInfo());\n }", "title": "" }, { "docid": "20a8eee8130b234ded87b1daf129644c", "score": "0.48286983", "text": "protected function _getCurrentFile()\n {\n return $this->_currentFile;\n }", "title": "" }, { "docid": "e13b15c978791b483b5040093ca482ca", "score": "0.48207638", "text": "public function current()\n\t{\n\t\t$current = $this->getCurrentModel()->current();\n\t\t\n\t\tif ($current === NULL && $this->goToNextIterativeModel())\n\t\t{\n\t\t\t$current = $this->getCurrentModel()->current();\n\t\t}\n\t\t\n\t\treturn $current;\n\t}", "title": "" }, { "docid": "d2dcf647fda24fd5749cef9ace704b51", "score": "0.48162866", "text": "public static function getCurrent()\n {\n return self::$instance;\n }", "title": "" }, { "docid": "04bdf20a9910e643377e356aff287ccd", "score": "0.4808076", "text": "public function getGoalkeeping()\r\n {\r\n return $this->goalkeeping;\r\n }", "title": "" }, { "docid": "942ba528b4ca01b47adc0fef95abb36d", "score": "0.48046044", "text": "public function getIdTravail() {\n\t\tif (isset($_POST['hidIdTravail'.'_'.$this->_idForm])) {\n\t\t\t$this->_id_travail = $_POST['hidIdTravail'.'_'.$this->_idForm];\n\t\t}\n\t\treturn $this->_id_travail;\n\t}", "title": "" }, { "docid": "7d24b9b1899054cc4297781b327bee31", "score": "0.48033932", "text": "public function getCurrentID()\n\t{\n\t\treturn $this->{static::CURRENT_ID};\n\t}", "title": "" }, { "docid": "504df4618e385672a202630df5024c10", "score": "0.47967586", "text": "protected function getProgramSubmittedAtAttribute()\n {\n return ($this->program->was_submitted) ? excel_date($this->program->was_submitted->created_at): null;\n }", "title": "" }, { "docid": "9cab4e10d758d871a88fe70dc74fc3b8", "score": "0.47878647", "text": "public function get_value_save_entry( $value, $form, $input_name, $lead_id, $lead ) {\n if ($input_name === \"input_{$this['id']}_2\") {\n $original_entry = \\GFAPI::get_entry($lead['id']);\n $original_value = is_array($original_entry) ? ($original_entry[$this->id . '.2'] ?? '') : '';\n if (empty($original_value)) {\n $value = $_POST[\"input_{$this['id']}\"];\n }\n else {\n $value = $original_value . ',' . $_POST[\"input_{$this['id']}\"];\n }\n return $this->sanitize_entry_value($value, $form['id']);\n }\n return parent::get_value_save_entry($value, $form, $input_name, $lead_id, $lead);\n }", "title": "" }, { "docid": "6537bab2cbc82d7692a1e181c730a19a", "score": "0.47787416", "text": "public function getActivity()\n {\n return isset($this->activity) ? $this->activity : null;\n }", "title": "" }, { "docid": "6537bab2cbc82d7692a1e181c730a19a", "score": "0.47787416", "text": "public function getActivity()\n {\n return isset($this->activity) ? $this->activity : null;\n }", "title": "" }, { "docid": "a3a6f8d6b61f7d35357c65189ac317a2", "score": "0.47786516", "text": "public function getResumesubmission()\n {\n return $this->resumesubmission;\n }", "title": "" }, { "docid": "83f039892ea727874b17f8629a0d23df", "score": "0.47773144", "text": "public function getRecord() {\n\t\treturn $this->record;\n\t}", "title": "" }, { "docid": "83f039892ea727874b17f8629a0d23df", "score": "0.47773144", "text": "public function getRecord() {\n\t\treturn $this->record;\n\t}", "title": "" }, { "docid": "724c5499ac300f7b2307fea2fe09d86f", "score": "0.4769325", "text": "public function getContactPoint()\n {\n return $this->contactPoint;\n }", "title": "" }, { "docid": "59109bb7fb8d2aacc7a550a228be9280", "score": "0.47681615", "text": "public function currentRoute()\n {\n return $this->route;\n }", "title": "" }, { "docid": "85650c264cbe1cc74e21431aa28e59bd", "score": "0.47633046", "text": "public function current()\n {\n $entityManager = $this->container->get('entity_manager');\n $repositoryKnowledge = $entityManager->getRepository('Fitbase\\Bundle\\KnowledgeBundle\\Entity\\Knowledge');\n $repositoryKnowledgeUser = $entityManager->getRepository('Fitbase\\Bundle\\KnowledgeBundle\\Entity\\KnowledgeUser');\n\n $datetime = $this->container->get('datetime')->getDateTime('now');\n $datetime->setTime(0, 0, 0);\n\n if (($user = $this->container->get('user')->current())) {\n\n if (($knowledgeUser = $repositoryKnowledgeUser->findLastByDate($user, $datetime))) {\n return $knowledgeUser->getKnowledge();\n }\n\n $knowledge = $repositoryKnowledge->findFirst();\n if (($knowledgeUser = $repositoryKnowledgeUser->findLast($user))) {\n if (($knowledgeLast = $knowledgeUser->getKnowledge())) {\n if (!($knowledge = $repositoryKnowledge->findNext($knowledgeLast))) {\n $knowledge = $repositoryKnowledge->findFirst();\n }\n }\n }\n\n $knowledgeUser = new KnowledgeUser();\n $knowledgeUser->setUser($user);\n $knowledgeUser->setKnowledge($knowledge);\n $knowledgeUser->setDone(true);\n $knowledgeUser->setDoneDate($datetime);\n $entityManager->persist($knowledgeUser);\n $entityManager->flush($knowledgeUser);\n\n return $knowledge;\n }\n\n return null;\n }", "title": "" }, { "docid": "52e755f13cdd4f8fcfb4ad3af0688cf8", "score": "0.47603986", "text": "public function getCurrentLeadApplicationStatus()\n {\n return Arr::get($this->_fetchLeadApplicationData(), 'leadSuitabilityApplicationStatusId');\n }", "title": "" }, { "docid": "355cbf39be9a9d7496283eea3be27f8f", "score": "0.4744699", "text": "public function currentProcess()\n {\n // TODO: Implement currentProcess() method.\n }", "title": "" }, { "docid": "2444400dccd040fe6901b4df32458122", "score": "0.47442475", "text": "public function current()\n {\n $results = $this->finder->firstRelationWithNodes($this->parent, $this->related, $this->type, $this->direction);\n\n return !$results->isEmpty() ? $this->newFromRelation($results->first()) : null;\n }", "title": "" }, { "docid": "ada785d8153cd0696fbe5bf35186ce98", "score": "0.47424185", "text": "public function current()\n {\n return $this->valid() ? $this->_result[$this->_current_document] : NULL;\n }", "title": "" }, { "docid": "bd5d97e3d98db8001adaa98b5784828e", "score": "0.47399256", "text": "public function getCurrentVisitStarted()\n {\n return $this->current_visit_started;\n }", "title": "" }, { "docid": "d4449ff5238b5c0f81624a9670a691b0", "score": "0.47352794", "text": "public function getCurStaff()\n {\n return $this->CurStaff;\n }", "title": "" }, { "docid": "3f9101f42bc037f7dea88b07d5224a26", "score": "0.47311804", "text": "public static function current()\n\t{\n\t\treturn Mailing::where('status', 'processing')->get()->all();\n\t}", "title": "" }, { "docid": "48241e97f7214ec5a7bba2d6f35d35ad", "score": "0.47278786", "text": "public function store_lead(leadValidator $request)\n {\n $lead = Leads::create([\n 'canalprospection_id'=> $request['canal'],\n 'nom'=> $request['nom'],\n 'prenom'=>$request['prenom'],\n 'telephone'=>$request['telephone'],\n 'email'=>$request['email'],\n 'adresse'=>$request['adresse'],\n 'code_postal'=>$request['code_postal'],\n 'ville'=>$request['ville'],\n ]);\n if ($request['b_pro'] && $request['b_pro'] === \"on\")\n {\n $lead->professionnel = 1;\n if ($request['b_pro_immo'] && $request['b_pro_immo'] === \"on\")\n {\n $lead->pro_immo = 1;\n $lead->type_immo = $request['type_immo'];\n }\n $lead->update();\n }\n return redirect()->back()->with('ok', __('La fiche contact a été ajoutée !'));\n }", "title": "" }, { "docid": "139d32b738798a384ab41f3906db1661", "score": "0.47227886", "text": "public function current()\n {\n return $this->days[$this->current];\n }", "title": "" }, { "docid": "473bf8ef9296ae39ac80cf48554eb023", "score": "0.47220153", "text": "public function currentSafetytip()\n {\n return SafetyTip::where('company_id', $this->id)->where('status', '1')->first();\n }", "title": "" }, { "docid": "443f0aa7947adbcda4798bbf77e29d37", "score": "0.4721498", "text": "public function current()\n\t{\n\t\t//fwrite(STDOUT,\"current\\n\");\n\t\treturn $this->aRecord;\n\t}", "title": "" }, { "docid": "5e6fb6508036db475b34c9b4e444b1eb", "score": "0.47205406", "text": "public function getReferralID() {\n if (!$this->referral_id) {\n $this->referral_id = $this->findDependentRowset('Application_Model_DbTable_Referral')->current();\n }\n\n return $this->referral_id;\n }", "title": "" }, { "docid": "8e8ce58ad27a1fac49245d7e241d767d", "score": "0.47198498", "text": "public function MyStep()\n {\n $step = null;\n if ($this->StatusID) {\n $step = OrderStep::get()->byID($this->StatusID);\n }\n if (! $step) {\n $step = DataObject::get_one(\n OrderStep::class,\n null,\n $cacheDataObjectGetOne = false\n );\n }\n if (! $step) {\n $step = OrderStepCreated::create();\n }\n if (! $step) {\n user_error('You need an order step in your Database.');\n }\n\n return $step;\n }", "title": "" }, { "docid": "a632c88ea5534ca43191dcfc013943a0", "score": "0.47179437", "text": "public function getCurrentId()\n {\n return $this->currentId;\n }", "title": "" }, { "docid": "9d8d829a5c65cc9132051cd7bd42a9e3", "score": "0.47145867", "text": "protected function setRunning()\n {\n if ($this->cliMode) {\n return RetailcrmCli::setCurrentJob($this->getName());\n }\n\n return RetailcrmJobManager::setCurrentJob($this->getName());\n }", "title": "" }, { "docid": "0ffae5ed5518a37247a8f4438c293efd", "score": "0.47122455", "text": "public function current() {\r\n\t\t\treturn getEpgEntryByRow($this->curRow);\r\n\t\t}", "title": "" }, { "docid": "cc7206286e60328c2ecdb477703d96cd", "score": "0.46930197", "text": "public function getTrigger()\n {\n return $this->trigger;\n }", "title": "" }, { "docid": "f94a380560700fb4c465cc966e93f56d", "score": "0.46909624", "text": "public function current(){\n\t\treturn $this->currentEntry;\n\t}", "title": "" }, { "docid": "f43d5aefea2e790d353e37660f2ee730", "score": "0.46867004", "text": "public function getCurrent()\n {\n if (($this->_current === null) && (!$this->_emptyCurrentAllowed)) {\n return ($this->_getDefaultId());\n }\n return ($this->_current);\n }", "title": "" }, { "docid": "37fc924dcc769660534d6442c64b5653", "score": "0.46837178", "text": "public function getCurrentAccount()\n\t{\n\t\treturn Account::getCurrentAccount($this);\n\t}", "title": "" }, { "docid": "690d1c76d4541fcf0574006c1c194961", "score": "0.46819314", "text": "public function getPowerTrailCompleted()\n {\n if($this->powerTrailCompleted === null) {\n $this->powerTrailCompleted = new \\ArrayObject();\n $queryPtList = 'SELECT * FROM `PowerTrail` WHERE `id` IN (SELECT `PowerTrailId` FROM `PowerTrail_comments` WHERE `commentType` =2 AND `deleted` =0 AND `userId` =:1 ORDER BY `logDateTime` DESC)';\n $db = OcDb::instance();\n $stmt = $db->multiVariableQuery($queryPtList, $this->userId);\n $ptList = $db->dbResultFetchAll($stmt);\n\n foreach ($ptList as $ptRow) {\n $this->powerTrailCompleted->append(new PowerTrail(array('dbRow' => $ptRow)));\n }\n }\n return $this->powerTrailCompleted;\n }", "title": "" }, { "docid": "4b30ec2197064cdc81f83d4a324bc001", "score": "0.46797663", "text": "public function leadDepartment()\n\t{\n\t\tif ($this->isDepartmentLead($this->department)) {\n\t\t\treturn $this->department;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2ebac2655d9f83bc24eb7650da482430", "score": "0.46788594", "text": "function management()\n {\n $out = array();\n\n // carry along all the completed forms as hidden fields\n foreach($this->completed as $prev_form) {\n foreach($prev_form->fields as $name=>$field) {\n $bf = new BoundField($prev_form, $field, $name);\n $out[] = $bf->as_hidden();\n }\n }\n\n // output step\n $hidden = new HiddenInput();\n $out[] = $hidden->render($this->step_field, $this->step);\n return join(\"\\n\",$out);\n }", "title": "" }, { "docid": "81d14ffb452b742da03b31019ca9a0b8", "score": "0.4676039", "text": "public function getRecorder()\n {\n return $this->recorder;\n }", "title": "" }, { "docid": "d85b04de41889305dce4787f4ed363de", "score": "0.46737036", "text": "public function getConvertLeadUrl()\n\t{\n\t\treturn 'index.php?module=' . $this->getModuleName() . '&view=ConvertLead&record=' . $this->getId();\n\t}", "title": "" }, { "docid": "b4b776d3c9db635e6056c28f10ec2340", "score": "0.46732587", "text": "public function retrieve() {\n\t\treturn $this->steps;\n\t}", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "64f6226aa0c227b9114328c40fc22c81", "score": "0.0", "text": "public function edit($id)\n {\n if(request()->ajax())\n {\n $data = booking::findOrFail($id);\n return response()->json(['result' => $data]);\n }\n }", "title": "" } ]
[ { "docid": "b51dc492ce2ae6c7687b6a4d337aec3c", "score": "0.77745754", "text": "public function edit()\n {\n $model = $this->getRequestedModel();\n\n $view = View::make(\n $this->getViewName('edit'),\n compact('model') + array(\n 'pageTitle' => 'Editar '.$this->resourceTitle,\n 'formView' => $this->getViewName('_form'),\n 'formContentView' => $this->getViewName('_formContent'),\n )\n );\n $view = $this->beforeRender($view, 'edit');\n return $this->beforeRenderForm($view, $model);\n }", "title": "" }, { "docid": "d3213bec1042b484f9e7c8a52c4ef16a", "score": "0.77126104", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.76957726", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ac53c5763e3a0b0ec0125039ef9bb509", "score": "0.76326966", "text": "public function edit()\n {\n $this->form();\n }", "title": "" }, { "docid": "43c6cac46bd9fc8f0a4c87eadef0ab1d", "score": "0.7515541", "text": "public function edit($id)\n {\n $resource = Resource::find($id);\n return view('admin.resources.edit')->with('resource', $resource); \n \n }", "title": "" }, { "docid": "13fa10e3d1c3003ede124c839fc8a84e", "score": "0.7379952", "text": "public function editAction()\n {\n // returning due to validation:\n if (isset($this->view->form)) {\n return;\n }\n \n $this->view->form = $this->_getResidentForm();\n \n // Retrieve the record for editing:\n $manager = new Lightman_Managers_Resident();\n $residentId = $this->getRequest()->getParam('id');\n $data = $manager->fetch($residentId);\n $this->view->form->populate($data[0]);\n $this->view->form->setAction('/resident/save');\n }", "title": "" }, { "docid": "c354e811bb12910875823ede20c8061b", "score": "0.7379756", "text": "public function edit($id)\n {\n $resource = resource::find($id);\n return view('admin.resource.edit')->with('resource', $resource);\n }", "title": "" }, { "docid": "bc54dab4e298ed11bf37f3d54e561b2f", "score": "0.73496336", "text": "public function edit($id)\n {\n $resource = $this->resource->find($id);\n return view('manager.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "8d3be079e9374445eb13f6ab8e2f150d", "score": "0.72304416", "text": "public function edit(Model $resource)\n {\n //\n }", "title": "" }, { "docid": "d1a990ee04cb4a4e2b071c7b3a0f4626", "score": "0.7165071", "text": "public function editResource($resource) {\n\n $resource = SiteImage::findOrFail($resource);\n\n return View('backoffice.pages.edit_resource', ['resource' => $resource]);\n }", "title": "" }, { "docid": "3605bbb9d0e4d44e345fe8d2b62ae3ed", "score": "0.71567726", "text": "public function edit($id)\n {\n $ourresource = OurResource::where('id',$id)->first();\n return view('Admin.ourresource.edit' ,compact('ourresource'));\n\n }", "title": "" }, { "docid": "6fc7d1d0d4bc68987bdd6df5266938b1", "score": "0.7098776", "text": "function edit( $resource ){\n\n $supplier = get( 'suppliers', $resource );\n\n return view( 'admin/supplier/add_supplier', compact( 'supplier' ) );\n\n}", "title": "" }, { "docid": "a8c67eb46675701a9bcffccd8e633f53", "score": "0.7083242", "text": "public function editAction() {\n \t$id = $this->_getInt('id');\n\n \tif ($id) {\n \t\t// Find item\n \t\t$class = Doctrine::getTable($this->crudClass)->find($id);\n \t\tif ($class) {\n \t\t\t$form = $this->getCrudForm($this->crudName);\n\t\t\t\t\n\t\t\t\t// Validate and update database if post\n\t\t \tif ($this->getRequest()->isPost()) {\n\t\t\t \tif ($form->isValid($this->getRequest()->getParams())) {\n\t\t\t \t\t$form->updateClass($class);\n\t\t\t \t}\n\t\t \t}\n\t\t \telse {\n\t\t \t\t// first time, load data into form\n\t\t \t\t$form->loadClass($class);\n\t\t \t}\n\n\t\t \t// change form submit label from Create\n\t\t \t$form->getElement('submit')->setLabel('Update');\n\t\t \t$this->view->crudName = $this->crudName;\n\t\t \t$this->view->form = $form;\n \t\t}\n \t}\n\n \t$this->renderScript($this->getScriptDir() . '/edit.phtml');\n }", "title": "" }, { "docid": "15d2aee7006af71d1ba607e057165476", "score": "0.70606035", "text": "function editForm() {\r\n render(\"horse/update\");\r\n }", "title": "" }, { "docid": "a2807549fcbbff87d6c9fa1b28ddac02", "score": "0.704658", "text": "public function edit()\n {\n return view('hrm::edit');\n }", "title": "" }, { "docid": "4b4dbe1a34d61bd721a3933597f41af5", "score": "0.70450366", "text": "public function edit($id)\n\t{\t\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "fd71663220e9caaaa5475648877942d1", "score": "0.7023511", "text": "public function edit($id)\n {\n $entity = $this->model->findOrFail($id);\n\n $this->loadModelRelationships($entity);\n\n $relationshipOptions = $this->getModelRelationshipData();\n\n $fields = $this->getFormFields();\n $title = $this->getFormTitle();\n $route = $this->getRoute();\n $bladeLayout = $this->bladeLayout;\n\n return view('crud-forms::edit',\n compact(\n 'entity',\n 'fields',\n 'title',\n 'route',\n 'bladeLayout',\n 'relationshipOptions'\n )\n );\n }", "title": "" }, { "docid": "39f95f6c9cf6106a56760a011e5d5c79", "score": "0.7006087", "text": "public function edit($id)\n {\n $title = $this->model->getTitle();\n $form_title = $this->name;\n $forms = $this->model->getFormList();\n $data = $this->model->find($id);\n return view('layouts.edit')->with(compact('data','forms', 'title', 'form_title'));\n }", "title": "" }, { "docid": "38c5b42def3d82283c8d82e4b4502052", "score": "0.6996919", "text": "public function edit($id)\n {\n // Update form \n }", "title": "" }, { "docid": "328dd2295ff841bead125bf000df60c0", "score": "0.6988594", "text": "public function edit($id)\n {\n // integrated with show\n }", "title": "" }, { "docid": "b71073fdb0fcd99adc095bcdacb336b0", "score": "0.6978923", "text": "public function edit($id)\n {\n return view($this->layout.'form');\n }", "title": "" }, { "docid": "8752e31183da5b119420c8530e71385c", "score": "0.6953653", "text": "public function edit() {\n \n $location = $this->location_model->get_by_id($this->input->get('id'));\n if (!is_null($location)) {\n echo $this->load->view('location/edit_form', array(\n 'id' =>$location->id,\n 'name' => $location->name,\n 'address' => $location->address,\n 'email_text' => $location->email_text,\n 'uses_media_release_form' => filter_var($location->uses_media_release_form, FILTER_VALIDATE_BOOLEAN),\n 'media_release_form' => $location->media_release_form\n ), TRUE);\n }\n else {\n echo show_404('The resource you requested was not found');\n } \n }", "title": "" }, { "docid": "627cc08a03d861bf43b77f13aa1b356b", "score": "0.695104", "text": "public function edit($id)\n { \n return $this->showForm($id);\n }", "title": "" }, { "docid": "7399b50cf765a48544f9c688f04df739", "score": "0.69488585", "text": "public function edit($id)\n {\n $resource = $this->service->find($id);\n if(empty($resource))\n {\n Flash::error('Resource não encontrado');\n return redirect(route('resources.index'));\n }\n return view('resources.edit')->with('resource', $resource);\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.69469565", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "6b19c8e6c551a197ec3ab4f37c14849e", "score": "0.6922993", "text": "public function Edit()\n {\n $this->routeAuth();\n\n $this->standardAction('Edit');\n }", "title": "" }, { "docid": "18527251f9ef186ce3fe75e5b272924a", "score": "0.69215506", "text": "public function edit()\n {\n return view('rms::edit');\n }", "title": "" }, { "docid": "9f26b6599bab53ce260ba6dd5586fde0", "score": "0.6903004", "text": "public function edit($id){\n $this->editForm($id);\n }", "title": "" }, { "docid": "f60e724dc93ad65b7bd2e7142b16eabc", "score": "0.68989486", "text": "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "da3ad7b5e1c327a63920973aeeba7990", "score": "0.68977946", "text": "public function showEditForm()\n\t{\n\t\treturn View::make('editProfile');\n\t}", "title": "" }, { "docid": "0ff7e1924183930cc55cd63e49c7dfb7", "score": "0.6896642", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update',$id);\n\t}", "title": "" }, { "docid": "c73b32318aae02d0ccb49b7759863d5d", "score": "0.6895599", "text": "public function edit($id) {\n $form = Forms::find($id);\n return view('forms::edit', compact('form'));\n }", "title": "" }, { "docid": "ab89b50362d0337b737f7c85e7dcdae4", "score": "0.6886971", "text": "public function edit(object $data)\n\t{\n\t\t$product = $this->products->getOnly((int)$data->id);\n\t\treturn $this->view(view:\"form\",data:$product);\n\t}", "title": "" }, { "docid": "ecf00d3f89afc53c8a54e339de3f7789", "score": "0.688335", "text": "public function edit($id)\n\t{\n\t\t$professor = Professor::with('endereco')->find($id);\n\n\t\t// show the edit form and pass the professor\n\t\t$this->layout->content = View::make('professor.edit', compact('professor'));\n\t}", "title": "" }, { "docid": "be7762755fcfeef213c7106eb19a722a", "score": "0.6868294", "text": "public function edit()\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "4dfc241f10da4ecce3a8ed5df671a0d1", "score": "0.685972", "text": "public function edit()\n {\n return view('adminmodule::edit');\n }", "title": "" }, { "docid": "4dfc241f10da4ecce3a8ed5df671a0d1", "score": "0.685972", "text": "public function edit()\n {\n return view('adminmodule::edit');\n }", "title": "" }, { "docid": "f50ed2977f385fa5a32af8ead4483311", "score": "0.6857054", "text": "public function edit(Form $form)\n {\n $this->authorize('update', $form);\n return view('forms/form', [\n 'form' => $form\n ]);\n }", "title": "" }, { "docid": "584eb12e57067590968acf5d478360eb", "score": "0.68407387", "text": "public function edit()\n //Appelle la vue pour mettre à jour les informations\n {\n $idq = (int)$this->request->getParameter('idq'); //recupere le parametre en get de l'ID du questionnaire de l'url.\n $questionnaire = Questionnaire::getWithId($idq);\n $regles = Regles_Questionnaire::getWithId($questionnaire->ID_REGLES_QUEST);\n if (!isset($idq) || !is_object($questionnaire)) {\n $this->linkTo('Questionnaire', 'showQuest'); //Redirection si on tente de forcer l'action\n }\n $v = new View($this, 'questionnaire/editQuestionnaire');\n $v->setArg('user', $this->request->getUserObject());\n $v->setArg('questionnaire', $questionnaire);\n $v->setArg('regles', $regles);\n $v->render();\n }", "title": "" }, { "docid": "c5b5d7037c372aa6bf5b83ce820fa7a3", "score": "0.6838834", "text": "public function edit($id)\n {\n $resource = Resource::where('id', $id)->first();\n $categorys = Category::all();\n\n return view('admin.resource.edit', [\n 'resource' => $resource,\n 'categorys' => $categorys\n ]);\n }", "title": "" }, { "docid": "ab7ce15c32e823771e1da70d24551fce", "score": "0.6809366", "text": "function edit()\n {\n JRequest::setVar('view', 'joominaFS');\n JRequest::setVar('layout', 'form');\n JRequest::setVar('hidemainmenu', 1);\n\n parent::display();\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68075293", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68075293", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68075293", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a73ca49bf4104fffbbb3887f1d83346f", "score": "0.67874014", "text": "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "title": "" }, { "docid": "c56c80676c162b4956f5c77de08ea586", "score": "0.6782768", "text": "public function editFormAction()\n {\n $this->loadLayout()->renderLayout();\n }", "title": "" }, { "docid": "7ad57cc68dba07022ee9c5a40158eb1d", "score": "0.67781353", "text": "public function edit()\n {\n return view('rawatinap::edit');\n }", "title": "" }, { "docid": "2708ee4c450702f89df90f787e1addda", "score": "0.6760575", "text": "public function edit($id)\n {\n $model = $this->model->findOrFail($id);\n return view('pages.admin.graha.form', compact('model'));\n }", "title": "" }, { "docid": "273983aa73422180d99093ef71b2ad93", "score": "0.67549026", "text": "public function edit()\n {\n return view('pembayaranspp::edit');\n }", "title": "" }, { "docid": "057b48bb7cf2107466c426e2c9e428fe", "score": "0.6746726", "text": "public function edit(form $form)\n {\n //\n }", "title": "" }, { "docid": "f9e5424b4794ef21c15b578cbc28a1d4", "score": "0.6745706", "text": "public function actionEdit($id) { }", "title": "" }, { "docid": "c2fed974695eaa37643078a4df09912e", "score": "0.672765", "text": "public function edit()\n {\n return view('detkomplain::edit');\n }", "title": "" }, { "docid": "bba7009cebf29a6ee8922fb3d3efb8e2", "score": "0.67255867", "text": "public function editAction() {\n\t\t$wizard = $this->_initWizardModel();\n\t\t$this->loadLayout();\n\t\t\n\t\tif ($headBlock = $this->getLayout()->getBlock('head')) {\n\t\t\t$titles = array('Wizard');\n\t\t\t\n\t\t\tif ($wizard) {\n\t\t\t\tarray_unshift($titles, 'Edit '. $wizard->getTitle());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tarray_unshift($titles, 'Create a Wizard');\n\t\t\t}\n\n\t\t\t$headBlock->setTitle(implode(' - ', $titles));\n\t\t}\n\n\t\t$this->renderLayout();\n\t}", "title": "" }, { "docid": "35b670f6754ef752683a59045224e17b", "score": "0.6716376", "text": "public function edit()\n {\n return view('edit');\n }", "title": "" }, { "docid": "7957777181fbd57d2185333eb7a93e54", "score": "0.6713939", "text": "public function edit($id)\n {\n $data['manufacturer'] = Manufacturer::findOrFail($id);\n $data['form_param'] = ['route'=> ['manufacturers.update', $id], 'method'=> 'PUT'];\n return view('manufacturers.edit', $data);\n }", "title": "" }, { "docid": "9b3e22a44fe0969125d31a1b19591530", "score": "0.6707918", "text": "public function edit($id)\n {\n $permission = Permission::findOrFail($id);\n $title = 'Editar permiso '.$permission->display_name;\n $form_data = ['route' => ['permiso.update',$permission->id],'method' => 'PUT','class' => 'form-horizontal'];\n\n return view('permiso.form')->with(compact('permission','title','form_data'));\n }", "title": "" }, { "docid": "a880aa2a9bbdd8e600e961cc44a30611", "score": "0.67064995", "text": "public function actionEdit()\n\t{\n\t\t\\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n\t\t\n\t\t$request = \\Yii::$app->getRequest();\n\t\t\n\t\t//Initial vars\n\t\t$html = '';\n\t\t$msg = Yii::t('messages', 'Failure!');\n\t\t\n\t\t//Check request is ajax\n\t\tif($request->isAjax)\n\t\t{\n\t\t\t//Get POST data\n\t\t\t$post = Yii::$app->request->post();\n\t\t\t$id = (isset($post['item'])) ? intval($post['item']) : '';\n\t\t\t\n\t\t\t//Check id\n\t\t\tif($id > 0)\n\t\t\t{\n\t\t\t\t//Get model data\n\t\t\t\t$model = $this->findModel($id);\n\t\t\t\t\n\t\t\t\t//Get form for displaying in page\n\t\t\t\t$html = $this->renderAjax('partial/edit_form', [\n\t\t\t\t\t'model' => $model,\n\t\t\t\t\t'id' => $id\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ['html' => $html, 'msg' => $msg];\n\t}", "title": "" }, { "docid": "754feffba2f96b5a5cffd1ab0db2113d", "score": "0.6703921", "text": "public function edit($data)\n {\n \n $this->checkPermission(\"update-{$this->type}\");\n\n return view( $this->views['form'] ?? $this->views['index'], [\n $this->type => $this->getModel($data)\n ]);\n }", "title": "" }, { "docid": "f14d9738fc54a55b925b94b3252a0061", "score": "0.66900253", "text": "public function edit($id)\n {\n $this->crud->hasAccessOrFail('update');\n\n $this->data['entry'] = $this->crud->getEntry($id);\n\n\n $this->data['crud'] = $this->crud;\n $this->data['saveAction'] = $this->getSaveAction();\n $this->data['fields'] = $this->crud->getUpdateFields($id);\n $this->data['title'] = trans('base::crud.edit').' '.$this->crud->entity_name;\n $this->data['id'] = $id;\n\n return view($this->crud->getEditView(), $this->data);\n }", "title": "" }, { "docid": "05bddf81a783fce093ed74c1d836d2e7", "score": "0.6685569", "text": "public function edit($id)\n {\n $record = $this->getResourceModel()::findOrFail($id);\n\n if(!Auth::user()->hakAkses($this->hakAkses['edit'])){\n $this->authorize('forceFail');\n }\n $pkey='id';\n if(isset($this->primaryKey)){\n $pkey=$this->primaryKey;\n }\n $kategori = Kategori::get();\n return view($this->filterEditView('_resources.edit'), $this->filterEditViewData($record, [\n 'kategoriList' => $kategori,\n 'primaryKey' => $pkey,\n 'record' => $record,\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n ]));\n }", "title": "" }, { "docid": "5d00016db02a20e9d4b01dced690ae3c", "score": "0.6685218", "text": "public function edit()\n {\n return view('tender::edit');\n }", "title": "" }, { "docid": "64fcbeac632782a2b25ac19087420f52", "score": "0.6683774", "text": "public function edit($id)\n {\n //\n $cm =LegalEntity::find($id);\n return view('legal-entity.edit',compact('cm'));\n }", "title": "" }, { "docid": "566ab30d6794597d3f4684df3c76a3b7", "score": "0.66834766", "text": "public function action_edit() {\n\t\treturn $this->_edit_entry((int)$this->request->param('id'));\n\t}", "title": "" }, { "docid": "8dde096e26811c4848495f8ef942f388", "score": "0.6665829", "text": "public function edit($id)\n\t{\n\t\t$consulting = Consulting::findOrfail($id) ;\n\t\t$type \t = 'edit' ;\n\t\t\n\t\treturn view('admin.consulting.edit' , compact('consulting' , 'type')) ;\n\t}", "title": "" }, { "docid": "0e24d2a5b4f7bae34c782959dddc85ab", "score": "0.66654843", "text": "public function edit($id){\n return view(self::PATH . 'edit');\n }", "title": "" }, { "docid": "58fa8a98152b59c2e07c439335e492b4", "score": "0.6665379", "text": "public function edit($id)\n {\n return view('web::edit');\n }", "title": "" }, { "docid": "1949b29856558b21bebbd7a1730c6a7d", "score": "0.6659594", "text": "public function edit()\n {\n return view('domain::edit');\n }", "title": "" }, { "docid": "20d1bbc7a5590f53b194b86cee939293", "score": "0.6646433", "text": "public function edit($id)\n {\n return view('resep-edit');\n }", "title": "" }, { "docid": "7e904b255b6b5c2b18da7e8219fd7832", "score": "0.6643692", "text": "public function edit($id)\n {\n $object = $this->getObjectFromRoute($id, $this->editWith);\n $formConfig = $this->getFormConfig($object);\n $validationRules = $this->getValidationRules($id);\n return view($this->editPage, compact('object', 'formConfig', 'validationRules'));\n }", "title": "" }, { "docid": "5dc44c0f877f54ebe9b4c123f3c0b2a6", "score": "0.6634423", "text": "public function edit(Question $question) {\n\t\t$this->authorize('question.update');\n\t\treturn view(\"questions.edit\", compact('question'));\n\t}", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.66275465", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "74c63fb6106f81d9ad91bc6f741803b0", "score": "0.6622983", "text": "public function edit()\n {\n return view('firstmodule::edit');\n }", "title": "" }, { "docid": "04bba5b4d910aaf17e1e2e20d6f0aafe", "score": "0.6620513", "text": "public function edit(Question $question)\n {\n //\n return view('management.crud.questions.edit_form', compact('question'));\n }", "title": "" }, { "docid": "d1b55e71bd2a8908de15040ec8aeb5cf", "score": "0.6620134", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ManuTfeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ManuTfeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "630ae0984b049b92f2a3c90d1ab9ae0c", "score": "0.6617219", "text": "public function edit($id)\r\n {\r\n $Person=Person::find($id);\r\n\r\n $form=[\r\n \"value\" => \"update\",\r\n \"name\" => \"Update Person\",\r\n \"submit\" => \"Update\"\r\n ];\r\n\r\n return view('person/form',compact('form','Person'));\r\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.6610784", "text": "public function edit($id);", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.6607966", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "671e522a843abd8418fe78f535b98be5", "score": "0.6605181", "text": "public function editAction($id=null)\n\t{\n\t\t$this->input->filter('primaryid',$id);\n\n\t\t$this->page\n\t\t\t->set('section_title','Edit '.$this->page_title)\n\t\t\t->set('action',$this->controller_path.'edit')\n\t\t\t->set('record',$this->controller_model->get($id))\n\t\t\t->set('group',$this->controller_model->dropdown('group','group'))\n\t\t\t->build($this->controller_path.'form');\n\t}", "title": "" }, { "docid": "15dcb69df9ace243dc7031300f504d64", "score": "0.65999573", "text": "public function edit()\n {\n return view('recruiter.edit');\n }", "title": "" }, { "docid": "7c674c48dc77b0d10cadf755eebb7452", "score": "0.6597259", "text": "public function edit()\n {\n return view('user::user.edit');\n }", "title": "" }, { "docid": "51800559e249529f64a612b61f695e25", "score": "0.65972227", "text": "public function edit($id)\n\t{\n\n\t\t$this->pageOpts['pageTitle'] = $this->pageDefaults['edit']['title'];\n\t\t$this->pageOpts['id'] = $id;\n\n\t\t$this->pageOpts['row'] = $this->service->find($id);\n\n\t\t$this->populateFormSelects();\n\n\t\treturn view($this->pageDefaults['edit']['view'], $this->pageOpts);\n\t}", "title": "" }, { "docid": "17fa466e8ea84584b032cc633a384460", "score": "0.6595787", "text": "public function edit()\n {\n return view('masyarakat.edit');\n }", "title": "" }, { "docid": "96880d1f0e08f9c4ad50170685242351", "score": "0.6594898", "text": "public function edit($id)\n {\n return view('resturants::edit');\n }", "title": "" }, { "docid": "63196ed01dcdae19828150035375ec14", "score": "0.6594452", "text": "public function edit($id)\n\t{\n\t\t$formMode = GlobalsConst::FORM_EDIT;\n\t\t$medicine = Medicine::find($id);\n\t\treturn View::make('medicines.edit')->nest('_form','medicines.partials._form',compact('formMode','medicine'));\n\n\t}", "title": "" }, { "docid": "203016e427fa0c848cb2dfcb175f5f26", "score": "0.6592733", "text": "public function edit($id)\n\t{\n\t\t//\n\t\treturn \"Se muestra formulario para editar Fabricante con id: $id\";\n\t}", "title": "" }, { "docid": "b5a7eb9735ec6ef2ef36bc7f5330d4e9", "score": "0.65917784", "text": "public function actionEdit()\n\t{\n\t\tif (isset($_GET['field']))\n\t\t{\n\t\t\t$field_id = $_GET['field'];\n\t\t\t$model=FormField::model()->findByPk($field_id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['FormField']))\n\t\t{\n\t\t\t$model->attributes=$_POST['FormField'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','field'=>$model->FIELD_ID,'form'=>$model->FORM_ID));\n\t\t}\n\t\t\n\t\t$this->render('edit',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "6af1fea1931fa80d3ded7d93ce9dfe37", "score": "0.6589415", "text": "public function edit($id)\n {\n $book = Book::find($id);\n return view('book.edit')->with('book', $book); // will show the edit form f\n\n }", "title": "" }, { "docid": "ddfd7562bd26ca70a114fe7db5c1d2b8", "score": "0.6587494", "text": "public function showEditForm()\n {\n $settings = Settings::find(1);\n return view('admin.settings.edit', ['settings' => $settings]);\n }", "title": "" }, { "docid": "e77b4a1d450f192da67f95bae41d70d2", "score": "0.65871483", "text": "public function edit()\n {\n return view('shopify::edit');\n }", "title": "" }, { "docid": "a5af358e490d57f472c80d93c6cbdfee", "score": "0.65841514", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('RUGCProgramacionCatarsisBundle:Programacion')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Programacion entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('RUGCProgramacionCatarsisBundle:Programacion:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "f773c211c125d55f3608be2d87ccf7e1", "score": "0.658409", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('asociateyaBundle:Emprendedor')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Emprendedor entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('asociateyaBundle:Emprendedor:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "75a2ec7c7b01e3430b5535f7564f64a8", "score": "0.6582302", "text": "public function edit($id)\n {\n $find = Job::where('id' , $id)->first();\n return view('admin/job/form' , compact('find'));\n }", "title": "" }, { "docid": "cbf22272b62a0bcea32ad81e0784cb8e", "score": "0.6581604", "text": "public function edit()\n {\n return view('mgentregables::edit');\n }", "title": "" }, { "docid": "4d167de16ac7ed5ddabb0c275bf98c12", "score": "0.6580265", "text": "public function editForm($id)\n\t{\n\t\t$project = Project::with('user', 'group')->find($id);\n\t\tif(!$project){\n\t\t\tApp::abort(404);\n\t\t}\n\n\t\t$data['groups'] = Group::all();\n\t\t$data['admins'] = Role::with('users', 'users.profile')\n\t\t->where('name', 'admin')\n\t\t->first();\n\n\t\treturn View::make('admin.projects.edit')\n\t\t->with('title', $project->name)\n\t\t->with('project', $project)\n\t\t->with($data);\n\t}", "title": "" }, { "docid": "1e6714a2833c2286fe5202063d157362", "score": "0.65773815", "text": "public function edit($id)\n {\n //\n $person = Person::find($id);\n return view('admin.person.edit',compact('person'));\n\n }", "title": "" }, { "docid": "5738a7a07c7391ff86af1707b6792ba6", "score": "0.6574667", "text": "public function edit($id)\n {\n $data['title'] = 'Edit '.$this->viewName;\n $data['edit'] = ReviewRating::findOrFail($id);\n $data['url'] = route('admin.' . $this->route . '.update', [$this->view => $id]);\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n \n\t\treturn view('admin.general.edit_form', compact('data'));\n }", "title": "" }, { "docid": "f22ee7f97a071d69c8fe688b46a41ec0", "score": "0.6570996", "text": "public function edit() {\n\n\t\t$controller = $this->app->request->getWord('controller');\n\t\t$url = $this->app->link(array('controller' => $controller, 'format' => 'raw', 'type' => $this->getType()->identifier, 'elm_id' => $this->identifier, 'item_id' => $this->getItem()->id), false);\n\n\t\t// render layout\n\t\tif ($layout = $this->getLayout('edit.php')) {\n\t\t\treturn $this->renderLayout($layout, compact('url'));\n\t\t}\n\n\t}", "title": "" }, { "docid": "7f004d9f228b69c504acab9aa2a68c00", "score": "0.6568199", "text": "public function edit($id)\n\t{\n\t\t// get the fbf_historico_artilheiro\n\t\t$fbf_historico_artilheiro = FbfHistoricoArtilheiro::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_historico_artilheiro\n\t\t$this->layout->content = View::make('fbf_historico_artilheiro.edit')\n->with('fbf_historico_artilheiro', $fbf_historico_artilheiro);\n\t}", "title": "" }, { "docid": "7e89f7da3e597647da866468ecea56a9", "score": "0.6567231", "text": "public function editAction()\n {\n $id = (int) $this->param('id');\n $property = $this->service->retrievePropertyById($id);\n if (!$property) {\n $this->flash('error')->addMessage('property.not.found');\n $this->redirectToRoute('list', ['page' => 1]);\n } else {\n $action = $this->view->url(['action' => 'update']);\n $propertyForm = $this->service->getFormForEditing($action);\n $propertyForm->populate($property->toArray());\n $this->view->property = $property;\n $this->view->propertyForm = $propertyForm;\n }\n }", "title": "" }, { "docid": "ab321968ce813a175af5fb95680495f5", "score": "0.6566417", "text": "public function edit($id)\n {\n return view('backend::edit');\n }", "title": "" }, { "docid": "21d99e41a1e26e985dcc253e30b0cdcd", "score": "0.6566238", "text": "public function actionEdit() { }", "title": "" } ]
c0bff54bef44227c2ed20dda459784a5
Set the value from the field tb_autor_cidadevive
[ { "docid": "69a28a1f0c149f9b438789596372b5f6", "score": "0.64567745", "text": "public function setTbAutorCidadevive($tbAutorCidadevive){\n\t$this->tbAutorCidadevive = $tbAutorCidadevive;\n}", "title": "" } ]
[ { "docid": "ee83ba5974e4439c41c342aa934d30ae", "score": "0.66603655", "text": "public function atualizarAutor($autor){\n $codigo = $autor->getCodigo();\n $nome = $autor->getNome();\n $foto = $autor->getFoto();\n $descricao = $autor->getDescricao();\n \n $sql = \"UPDATE autores SET id_autor = '$codigo', nome = '$nome', foto = '$foto', descricao = '$descricao' WHERE codigo = '$codigo'\";\n \n $this->conexao->executarQuery($sql);\n }", "title": "" }, { "docid": "87ef94a19de111c7ce1f0f0dce8c4955", "score": "0.6281749", "text": "function cairn_autoriser(){}", "title": "" }, { "docid": "042842f01e0e2548b63b7b36fd06706d", "score": "0.6067196", "text": "public function getTbAutorCidadevive(){\n\treturn $this->tbAutorCidadevive;\n}", "title": "" }, { "docid": "8aa5c8590c46622d74876e459b69cc35", "score": "0.6056035", "text": "public function setTbAutorCidadenascimento($tbAutorCidadenascimento){\n\t$this->tbAutorCidadenascimento = $tbAutorCidadenascimento;\n}", "title": "" }, { "docid": "a20d3352d00658c12c770fff4e5c1558", "score": "0.58575934", "text": "function accesrestreint_autoriser(){}", "title": "" }, { "docid": "a9aaec70d7fecbf66c4e2b284586d578", "score": "0.5708998", "text": "public function edit(Autor $autor)\n {\n //\n }", "title": "" }, { "docid": "a2e9726d4f0badc5c015631adc978a26", "score": "0.57011765", "text": "function chant_autoriser(){}", "title": "" }, { "docid": "d0e2f379ba91404591523b61eecbfa9b", "score": "0.5637424", "text": "public function getTbAutorCidadenascimento(){\n\treturn $this->tbAutorCidadenascimento;\n}", "title": "" }, { "docid": "6a0a9a7d012b6284ed0434467f954309", "score": "0.56370264", "text": "public function dohvatiId($autor) {\n $row = $this->db->where(\"naziv\", $autor)->get(\"autor\")->row();\n if ($row == null) {\n return null;\n }\n return $row->id;\n }", "title": "" }, { "docid": "1442e915131b9e4e4245344b4a7c4deb", "score": "0.5631985", "text": "public function setCodiCasa($value)\r\n {\r\n if ($this->validateId($value)) {\r\n //seteando valor a la variable codigo\r\n $this->codi_casa = $value;\r\n //retornar true\r\n return true;\r\n } else {\r\n //retornar respuesta falso\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "8a71c9196c9d418d5e3fca07ee4a5c8c", "score": "0.56183803", "text": "public function setAutoria($concorda, $discorda, $naosei)\n\n\t{\n\n\t\tif( $concorda == TRUE ){\n\n\t\t\t$this->autoria = \"Sim\";\n\t\t}\n\n\t\telseif( $discorda == TRUE ){\n\n\t\t\t$this->autoria = \"Não\";\n\t\t}\n\n\t\telse{\n\n\t\t\t$this->autoria = \"Não sei\";\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "514775955e73f1ec28db4508eef3d4f1", "score": "0.5608371", "text": "public function addAutor($autor)\n {\n # echo \" autor geaddet \";\n $this->autoren[] = $autor;\n #echo \" nachher \".count($this->autoren) ;\n }", "title": "" }, { "docid": "cccfc4fc9743ed2dfd8e7035b7a71ed4", "score": "0.5577341", "text": "public function setAuthor($value)\n {\n $this->_author = $value;\n }", "title": "" }, { "docid": "d6e78db78141568cb4f74bab7264cf6d", "score": "0.5531389", "text": "function mc3_reseau_autoriser(){}", "title": "" }, { "docid": "d193b66ef0596239cbed9f493861f1cd", "score": "0.54980665", "text": "public function setAuthorAccount($id_user)\n\t\t{\n\t\t\t$this->$user = $id_user;\n\t\t}", "title": "" }, { "docid": "12beed996c6b0eaba4fb0a1bf163b5b6", "score": "0.5479244", "text": "public function setTbAutorId($tbAutorId){\n\t$this->tbAutorId = $tbAutorId;\n}", "title": "" }, { "docid": "3a6786226f673b9f15391ec7e5161537", "score": "0.5450001", "text": "function setCitta (string $citta)\n {\n $this->citta = $citta; \n }", "title": "" }, { "docid": "06a5bb399a1c4367baae0e311b171bac", "score": "0.5411173", "text": "protected function setAkce($value)\n\t{\n\t\t$this->akce = $value;\n\t}", "title": "" }, { "docid": "b14955799d45109b9d33525feb118f09", "score": "0.53912866", "text": "function getAutor() {\n return $this->autor;\n }", "title": "" }, { "docid": "04efe7577f546ed396ec19c94b049a26", "score": "0.53902173", "text": "public function cadastrar_autor($dados_autor){\n\n $this->db->insert('autores_catalago',$dados_autor);\n return $this->db->affected_rows()?true:false;\n }", "title": "" }, { "docid": "5ad5d1f7abd94097666fa53b0815630a", "score": "0.5382872", "text": "function setAuthor($value) {\n if(!is_null($value) && !($value instanceof Angie_Feed_Author)) {\n throw new Angie_Core_Error_InvalidInstance('value', $value, 'Angie_Feed_Author');\n } // if\n $this->author = $value;\n }", "title": "" }, { "docid": "5613caf7d5d8466917b50555ec8452bb", "score": "0.5370825", "text": "public function setId($value){\n\t\t$this->_c_id = $value;\n\t}", "title": "" }, { "docid": "accb4fbf77eea2de5b9536d755bfba9f", "score": "0.5351488", "text": "function set_owner_id( $value )\n\t{\n\t\treturn( $this->setValue( \"owner_id\", $value ));\n\t}", "title": "" }, { "docid": "0e0ff037337983817ed15b5a3c7be880", "score": "0.53374594", "text": "public function getTbAutorId(){\n\treturn $this->tbAutorId;\n}", "title": "" }, { "docid": "1fb183ea02271f983e34a344ad5c1375", "score": "0.5334171", "text": "function set_controlador($controlador, $id_en_padre=null)\n\t{\n\t\t$this->controlador = $controlador;\n\t\t$this->_id_en_controlador = $id_en_padre;\n\t\tif (isset($this->objeto_js)) {\n\t\t\t$this->objeto_js .= '_'.$id_en_padre;\n\t\t\t$this->_submit .= '_'.$id_en_padre;\n\t\t}\n\t}", "title": "" }, { "docid": "ee26c3b8332767c269b4e78968a234ea", "score": "0.52910596", "text": "public function setTbAutorDtnasc($tbAutorDtnasc){\n\t$this->tbAutorDtnasc = $tbAutorDtnasc;\n}", "title": "" }, { "docid": "828e2b8f5475e806fd9911c9239e633d", "score": "0.5283781", "text": "public function setTbAutorSobrenome($tbAutorSobrenome){\n\t$this->tbAutorSobrenome = $tbAutorSobrenome;\n}", "title": "" }, { "docid": "c482614a7683c5e91de806c3b365943a", "score": "0.52729404", "text": "public function setTbAutorNome($tbAutorNome){\n\t$this->tbAutorNome = $tbAutorNome;\n}", "title": "" }, { "docid": "4bc1d1d58ee7d6a92c9a7970372587af", "score": "0.5259805", "text": "public function setUser_id($value){\n\t\t$this->_orm->user_id = $value;\n\t}", "title": "" }, { "docid": "9fe8859875afbcb71442c4e5b3d91f90", "score": "0.52588665", "text": "public function buscarAutor($codigo) {\n $linha = $this->conexao->obtemPrimeiroRegistroQuery(\"SELECT * FROM autores WHERE id_autor = '$codigo'\");\n $autor = new autor(\n $linha['codigo'],\n $linha['nome'],\n $linha['foto'],\n $linha['descricao']\n );\n return $autor;\n }", "title": "" }, { "docid": "51df68073f8e8cbb5735fc6766548f19", "score": "0.52556324", "text": "public function set_id($atr){\n $this->u_id = $atr;\n }", "title": "" }, { "docid": "74d1782c53a92e4f6f507928c645fb16", "score": "0.52402645", "text": "function updateCita($objeto){\n //$cita->setId($objeto->id);\n $cita = $this->gestorCita->getCita($objeto->id);\n $cita->setSeguridadSocial($objeto->seguridadSocial);\n $cita->setType($objeto->type);\n $cita->setReason($objeto->reason);\n $cita->setTelephone($objeto->telephone);\n $cita->setFecha(date_create($objeto->fecha));\n return $this->gestorCita->updateCita($cita);\n }", "title": "" }, { "docid": "432498c7aeec8bd9006bb60f7821a717", "score": "0.52386373", "text": "public function setIdUsuCreador($idUsuCreador) {\n\t\t$this->idUsuCreador = $idUsuCreador;\n\t}", "title": "" }, { "docid": "0086157dc398846e0c401bd8d1c1acea", "score": "0.5204477", "text": "function pdf_set_info_author($pdfdoc, $author) {}", "title": "" }, { "docid": "5a5869037e7d5ef979c4452b466b9abe", "score": "0.5179359", "text": "public function setAuthor(string $nome, string $cognome)\n {\n $this->autore = $nome . \" \" . $cognome;\n }", "title": "" }, { "docid": "967c2f5b178bd0e1569a22a552484174", "score": "0.51702386", "text": "public function setTbAutorApresentacaoPessoal($tbAutorApresentacaoPessoal){\n\t$this->tbAutorApresentacaoPessoal = $tbAutorApresentacaoPessoal;\n}", "title": "" }, { "docid": "120461706ef18075f38349b1d9d76439", "score": "0.51401955", "text": "public function mgrGetCadet($cadet)\n\t{\n\t\t$query = \"SELECT * FROM cadetTable WHERE userID = '\" . $cadet->getUserID() . \"'\";\n\t\t$result = $this->mDb->Execute($query);\n\t\tif(!$result)\n\t\t\tprint($this->mDb->errorMsg());\n\t\telse \n\t\t{\n\t\t\t$cadet->setInstructor($result->fields['instructor']);\n\t\t\t$cadet->setPhoneNum($result->fields['phoneNum']);\n\t\t\t$cadet->setCompany($result->fields['company']);\n\t\t\t$cadet->setYear($result->fields['year']);\n\t\t}\n\t\treturn $cadet;\n\t}", "title": "" }, { "docid": "488edde3ee68f422eb8edb6e83c83548", "score": "0.5128827", "text": "public function actualizarAcceso($obj){\n try {\n $consulta = \"UPDATE acceso SET codTienda=? WHERE codUsuario=?\";\n $param = array(\n $obj->__GET(\"codTienda\"),\n $obj->__GET(\"codUsuario\")\n );\n $this->result = $this->con->ConsultaSimple($consulta, $param);\n \n }catch (Exception $e){\n echo($e->getMessage());\n } \n }", "title": "" }, { "docid": "26ae55a503122d1d6719542352245688", "score": "0.5121358", "text": "function set_Agencia($Agencia){\n\t\t$this->Agencia = $Agencia;\n\t}", "title": "" }, { "docid": "bb7e318a06585eb9ab2479b604a7eaea", "score": "0.51183546", "text": "public function setEdad($valor){\n $this->edad=$valor;\n }", "title": "" }, { "docid": "4309abb0f39704ef273b1784f2116839", "score": "0.50922817", "text": "public function setCuentaID($cuentaID) {\n $this->cuentaID = $cuentaID;\n }", "title": "" }, { "docid": "01a3b7ea2d3c9dcd4d3a72154f128822", "score": "0.50674814", "text": "private function init($row){\n\t$this->tbAutorId = $row['tb_autor_id'];\n\t$this->tbAutorNome = $row['tb_autor_nome'];\n\t$this->tbAutorSobrenome = $row['tb_autor_sobrenome'];\n\t$this->tbAutorDtnasc = $row['tb_autor_dtnasc'];\n\t$this->tbAutorCidadenascimento = $row['tb_autor_cidadenascimento'];\n\t$this->tbAutorCidadevive = $row['tb_autor_cidadevive'];\n\t$this->tbAutorApresentacaoPessoal = $row['tb_autor_apresentacao_pessoal'];\n\t$this->tbAutorObs = $row['tb_autor_obs'];\n}", "title": "" }, { "docid": "8fab17a21d3fe82cfa501ad35fdfbc45", "score": "0.503757", "text": "function setIdcliente($idcliente) {\n $this->idcliente = $idcliente;\n }", "title": "" }, { "docid": "c52ac0de6cdb298cf52d18243c396126", "score": "0.5027761", "text": "public function setAuthor($value)\n {\n return $this->set(self::AUTHOR, $value);\n }", "title": "" }, { "docid": "78d800a96c0700ba9ef7f07386756655", "score": "0.5024936", "text": "final public function setAuthor($author)\n\t{\n\t\t$this->setMeta('author', $author);\t\n\t}", "title": "" }, { "docid": "41f38a0e128a293ef763b7341a958901", "score": "0.50178003", "text": "public function cuadre_caja()\n {\n acceso_informe('Cuadre de caja');\n $fecha = $this->input->post('date');\n $tipo = $this->input->post('tipo');\n $almacen = $this->input->post('almacen');\n $data['almacen'] = $this->almacen->get_all('0');\n\n $this->layout->template('member')->show('informes/cuadre_caja', ['data' => $this->informes->cuadre_caja($fecha, $tipo, $almacen), 'tipo' => $tipo, 'fecha' => $fecha, 'almacen' => $almacen, 'data1' => $data]);\n }", "title": "" }, { "docid": "d286b4c6b05a64bfdaddfa6e2497bd3d", "score": "0.50111765", "text": "public function setTbAutorObs($tbAutorObs){\n\t$this->tbAutorObs = $tbAutorObs;\n}", "title": "" }, { "docid": "03c00b203dc3d9217cf55262968657df", "score": "0.49986365", "text": "protected function getAuthorAttribute($value)\n {\n if($this->guest == 0){\n if($user = User::find($value)){\n // We keep the original value if needed\n $this->guestID = $value;\n $value = $user->first_name . ' ' . $user->name;\n }else{\n $value = trans('global.undefined_username');\n }\n }\n return $value;\n }", "title": "" }, { "docid": "819b84d0ef9ed50699a9bbeec0d3dbfa", "score": "0.49835944", "text": "function iview_autoriser(){}", "title": "" }, { "docid": "55849f9032913dfa62c59bb3f0201942", "score": "0.4980325", "text": "public function setVida($valor){\n $this->vida=$valor;\n }", "title": "" }, { "docid": "1ba30d1232c9fe48019713fe246560a3", "score": "0.49766418", "text": "public function getTbAutorSobrenome(){\n\treturn $this->tbAutorSobrenome;\n}", "title": "" }, { "docid": "2ec18f13a308d20d6aa95d4407320333", "score": "0.49635503", "text": "public function set($atributo,$contenido){\n $this->$atributo=$contenido;\n }", "title": "" }, { "docid": "36c192584a57688e448eb427cb80ee16", "score": "0.4949461", "text": "function redacrest_autoriser()\n{\n}", "title": "" }, { "docid": "4281d1efd60b2f70e26ada8d7f86b8d0", "score": "0.4948971", "text": "public function setAccode($accode) {\n $this->accode = $accode;\n }", "title": "" }, { "docid": "a9ff17057e675b5d1459e3c860ecbf2c", "score": "0.494323", "text": "public function updateCA() {\n\t\tif(!$this->temPermissao(2)){\n\t\t\treturn;\n\t\t};\n\t\t$data['presidente'] = $this->input->post('presidente');\n\t\t$data['vice-presidente'] = $this->input->post('vice-presidente');\n\t\t$data['diretoria_marketing'] = $this->input->post('diretoria_marketing');\n\t\t$data['diretoria_financeiro'] = $this->input->post('diretoria_financeiro');\n\t\t$data['relacoes_externas'] = $this->input->post('relacoes_externas');\n\t\t$data['recursos_humanos'] = $this->input->post('recursos_humanos');\n\t\t$data['diretoria_academica'] = $this->input->post('diretoria_academica');\n\t\t$this->pessoa->updateCA($data);\n\t\tredirect(base_url('cms/WelcomeCMS'));\n\t}", "title": "" }, { "docid": "0db926fab5487e9970889978e1b64ca9", "score": "0.49388447", "text": "function conf__cuadro(toba_ei_cuadro $cuadro)\n\t{\n\t\t$cuadro->set_datos($this->dep('datos')->tabla('aula')->get_listado());\n\t}", "title": "" }, { "docid": "b4defe69044a7c2ceccd5b8146b5a8b9", "score": "0.49345934", "text": "public function get_casa_id()\n {\n return $this->casa_id;\n }", "title": "" }, { "docid": "0766a4a0d3dcd07ca9dd38c2418aa0e1", "score": "0.49314013", "text": "public function setId_Usuario($id_empresa){\r\n\t\t$this->id_empresa = $id_empresa;\r\n\t}", "title": "" }, { "docid": "9c28e42799bb451fb2571a2fef82b40a", "score": "0.49310538", "text": "public function setCedula($cedula){ $this->cedula = $cedula;}", "title": "" }, { "docid": "ae8291efca47fe9be053193f6e3b2195", "score": "0.49244002", "text": "private function setOriginaKeyValFromData()\n {\n $pk = $this->primaryKey;\n\n if ($this->data && isset($this->data->$pk)) {\n $this->originalKeyVal = $this->data->$pk;\n }\n }", "title": "" }, { "docid": "862c077810946d7b365adac3c7113308", "score": "0.49149317", "text": "public function setCedula($cedula){\n $this->cedula = $cedula;\n }", "title": "" }, { "docid": "65cdd884f34e69a4b06bd0dd2e0ca54f", "score": "0.49032256", "text": "function setDocAuthor($docAuthor) {\n $this->docAuthor = is_string($docAuthor) ? trim($docAuthor) : NULL;\n }", "title": "" }, { "docid": "d5f0c898024d3be650c002fcde8f5b9c", "score": "0.4903031", "text": "public function setAuthor($author, $isUTF8 = false);", "title": "" }, { "docid": "16ca4c47bc1ff64e393008efa03d132f", "score": "0.48950937", "text": "public function getTbAutorApresentacaoPessoal(){\n\treturn $this->tbAutorApresentacaoPessoal;\n}", "title": "" }, { "docid": "e2c0171fd57cf7a8b1efc075ea2e5317", "score": "0.48907498", "text": "public function getTbAutorNome(){\n\treturn $this->tbAutorNome;\n}", "title": "" }, { "docid": "2d2ebec9148c83e13570908011103943", "score": "0.48828048", "text": "function factures_autoriser(){}", "title": "" }, { "docid": "a07f84cbec2ea5285504e520207dfe52", "score": "0.48822927", "text": "public function __construct(Autor $autor)\n {\n $this->autor = $autor;\n }", "title": "" }, { "docid": "632038921e0c80ae5e0d0ad83e2d63e5", "score": "0.4878064", "text": "public function set_info_author($author)\n {\n $this->_zpdf->properties['Author'] = $author;\n }", "title": "" }, { "docid": "1dde2b44c0efa658a54d4b3686350b4a", "score": "0.48728916", "text": "public function setIdOferta($value){\n if ($this->validateNaturalNumber($value)) {\n $this->id_oferta = $value;\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "21d02acda56a634394eace46c5291adc", "score": "0.48726404", "text": "public function setCedula($cedula){\n $this->cedula_visitante= $cedula;\n }", "title": "" }, { "docid": "7d5f8e7180f15db2f0cf4abdebdbe667", "score": "0.48715183", "text": "public function cogeValoresSegunId(){\n \t$queryForId = array('_id' => $this->id);\n \tif($this->bbdd->contar($queryForId)){\n \t\t$coment = $this->bbdd->findOneCollection($queryForId);\n \t\t$this->id = $coment['_id'];\n \t\t$this->usuario = $coment['idUsu'];\n \t\t$this->idSitio= (isset($coment['idCiu']))? $coment['idCiu'] : $coment['idPais'];\n \t\t$this->fecha = $coment['data'];\n \t}\n }", "title": "" }, { "docid": "745846e01775f3294fce00e416e86070", "score": "0.4871044", "text": "public function vraceni($id_auta)\n {\n $pujceno = \"NE\";\n $this->updatePujceno($pujceno, $id_auta);\n }", "title": "" }, { "docid": "3b4bac9deda47ad82f1d1b14da965dc7", "score": "0.48668906", "text": "public function testo_accetto()\n {\n if(!isset($this->options['text_accetto'])) $option = ''; \n else $option = esc_attr($this->options['text_accetto']);\n \n printf('<input type=\"text\" id=\"text_accetto\" '.\n 'name=\"eli_tool[text_accetto]\" '.\n 'value=\"%s\" />',$option);\n }", "title": "" }, { "docid": "8742ac2e8899eecb76d654efe9b1eb0f", "score": "0.4864923", "text": "public function dohvatiImeAutora($id) {\n $row = $this->db->where(\"id\", $id)->get(\"autor\")->row();\n if ($row == null) {\n return null;\n }\n return $row->naziv;\n }", "title": "" }, { "docid": "b4fe595f193fec40ef9c72e1b7e1776d", "score": "0.48485026", "text": "public function Busca_datos_cliente()\n\t{\n\t\t$id_cliente = $this -> input ->post('id_cliente');\n\t\t$busca_datos_cliente = $this -> Modelo_venta -> Busca_datos_cliente($id_cliente);\n\t\techo\"<script type='text/javascript'>\n\t\t\t\t$('#deuda_actual').val('\".$busca_datos_cliente -> deuda_actual .\"');\n\t\t\t\t$('#credito_otorgado').val('\".$busca_datos_cliente -> credito_otorgado .\"');\n\t\t\t\t\t\t\t\t\t\n\t\t</script> \";\n\n\t}", "title": "" }, { "docid": "9a3d0188f9a77a3ac93dbb6eea91a68e", "score": "0.48272133", "text": "public function setIssuingAuthority(?string $value): void {\n $this->getBackingStore()->set('issuingAuthority', $value);\n }", "title": "" }, { "docid": "f1b624ed07c67780961a2f1aa520401c", "score": "0.48266158", "text": "public function edit(AcidoUrico $acidoUrico)\n {\n //\n }", "title": "" }, { "docid": "265db168f04c55f2524e30717dcac37e", "score": "0.4812505", "text": "function setCodUsuario($codUsuario) {\n $this->codUsuario = $codUsuario;\n }", "title": "" }, { "docid": "28f590fcdcfca65fff27891bf7abe60d", "score": "0.48066384", "text": "public function getCuartarazonbecauser()\n\t{\n\t\treturn $this->cuartarazonbecauser;\n\t}", "title": "" }, { "docid": "9ac4c2cb94ae6a660f3d0b2da602ae44", "score": "0.47995368", "text": "public function setApellidosAttribute($value)\n\t{\n\t\t$this->attributes['apellidos'] = strtolower($value);\n\t}", "title": "" }, { "docid": "5f20c5c238694841dfdfa89e4a85e723", "score": "0.47951144", "text": "public function setIdEnderecoCob($value,$options=array('required'=>true)){ \n $this->_data['id_endereco_cob'] = new ZendT_Type_Number($value,array('numDecimal'=>null));\n if ($options['db'])\n $this->_data['id_endereco_cob']->setValueFromDb($value);\n \n if (!$options['db']){\n \n }\n return $this;\n }", "title": "" }, { "docid": "d55562d544b7d2d02c4b92121803b88f", "score": "0.47843975", "text": "public function setInitiatedByUserPrincipalName(?string $value): void {\n $this->getBackingStore()->set('initiatedByUserPrincipalName', $value);\n }", "title": "" }, { "docid": "8db4b9cf6ae067605c3a4dd6d0f0ac93", "score": "0.47829506", "text": "public function setAuthor(string $author)\n { \n $this->author = htmlspecialchars($author);\n }", "title": "" }, { "docid": "444d53b1e8a0754e4e899527c71c1243", "score": "0.47806695", "text": "function setUserID( $value )\n {\n $this->UserID = $value;\n }", "title": "" }, { "docid": "ea5075c6867028ce42941939d141612d", "score": "0.4776692", "text": "function setCaseidenOT($case_id, $id){\n\t\t\t$this->db->where('orden_trabajo.id_orden', $id);\n\t\t\treturn $this->db->update('orden_trabajo', array('case_id'=>$case_id));\t\t\t\n\t\t}", "title": "" }, { "docid": "af5b21eb7b9b0a8066d813add4abc704", "score": "0.47658575", "text": "public function presentAuthorId()\n {\n return get_the_author_meta('ID');\n }", "title": "" }, { "docid": "d83c39789a8bbe115a9cd24a537986d2", "score": "0.47647867", "text": "public function dodajAutora($naziv) {\n $this->db->set(\"naziv\", $naziv);\n $this->db->insert(\"autor\");\n }", "title": "" }, { "docid": "4ea50ca4bdda84b42a742d9e90e472d1", "score": "0.4762086", "text": "public function getTbAutorDtnasc(){\n\treturn $this->tbAutorDtnasc;\n}", "title": "" }, { "docid": "19d497e0d61fb9adbbe7242ac62c6751", "score": "0.4760959", "text": "public function setEditorId($uid);", "title": "" }, { "docid": "cb5b16886536a7988ec61b03f7adfeeb", "score": "0.4758467", "text": "public function setDataConsegna($dataConsegna){\n\t\t$this->dataConsegna = $dataConsegna;\n\t}", "title": "" }, { "docid": "22d871b7c07a82305291479f8c121e3e", "score": "0.4757479", "text": "public function set_id($value){}", "title": "" }, { "docid": "22d871b7c07a82305291479f8c121e3e", "score": "0.4757479", "text": "public function set_id($value){}", "title": "" }, { "docid": "22d871b7c07a82305291479f8c121e3e", "score": "0.4757479", "text": "public function set_id($value){}", "title": "" }, { "docid": "22d871b7c07a82305291479f8c121e3e", "score": "0.4757479", "text": "public function set_id($value){}", "title": "" }, { "docid": "c70acc70e392ec8dfebd69883ca5bac4", "score": "0.47539717", "text": "public function getCuartarazonbecacodigo()\n\t{\n\t\treturn $this->cuartarazonbecacodigo;\n\t}", "title": "" }, { "docid": "3daf9d2ba36afc9f9a9be5e6db0be69a", "score": "0.47478482", "text": "public function setIdDetalleActaAcuerdo( $idDetalleActaAcuerdo ){\n\t\t$this->idDetalleActaAcuerdo = $idDetalleActaAcuerdo;\n\t}", "title": "" }, { "docid": "e78f548dce67cbac973e23bbc54636ca", "score": "0.47475135", "text": "function setUsuario($susuario = '')\n {\n $this->susuario = $susuario;\n }", "title": "" }, { "docid": "b54560af769399b8519a068c0ae0fbdd", "score": "0.47441003", "text": "function modificarCuentaDoc(){\n\t\t$this->procedimiento='cd.ft_cuenta_doc_ime';\n\t\t$this->transaccion='CD_CDOC_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_doc','id_cuenta_doc','int4');\n\t\t$this->setParametro('id_tipo_cuenta_doc','id_tipo_cuenta_doc','int4');\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\t\t$this->setParametro('sw_modo','sw_modo','varchar');\n\t\t$this->setParametro('id_caja','id_caja','int4');\n\t\t$this->setParametro('nombre_cheque','nombre_cheque','varchar');\n\t\t$this->setParametro('id_uo','id_uo','int4');\n\t\t$this->setParametro('id_funcionario','id_funcionario','int4');\n\t\t$this->setParametro('tipo_pago','tipo_pago','varchar');\n\t\t$this->setParametro('id_depto','id_depto','int4');\n\t\t$this->setParametro('id_cuenta_doc_fk','id_cuenta_doc_fk','int4');\n\t\t$this->setParametro('nro_tramite','nro_tramite','varchar');\n\t\t$this->setParametro('motivo','motivo','varchar');\n\t\t$this->setParametro('fecha','fecha','date');\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\n\t\t$this->setParametro('importe','importe','numeric');\n\t\t$this->setParametro('id_funcionario_cuenta_bancaria','id_funcionario_cuenta_bancaria','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "074fe971ece24d584a205ebaca5aa33d", "score": "0.47433388", "text": "public function EditarCiudad($sender, $param) {\r\n //$this->Accion = 2;\r\n $this->setViewState('Accion', '2');\r\n //$this->Identificacion = $param->Item->DataItem->Identificacion;\r\n $this->setViewState('CodCiudad', $param->Item->DataItem->CodCiudad);\r\n\r\n $this->mpnlCiudades->Show();\r\n\r\n $this->EnviarAccion();\r\n\r\n $Ciudad = new CiudadesRecord();\r\n $Ciudad = CiudadesRecord::ObtenerCiudad($param->Item->DataItem->CodCiudad);\r\n\r\n $this->CargarDepartamento($Ciudad->CodDepartamento);\r\n\r\n $this->TxtNombre->Text = $Ciudad->NmCiudad;\r\n// $this->TxtComentarios->Text = $Ciudad->Descripcion;\r\n\r\n $this->TxtNombre->Focus();\r\n }", "title": "" }, { "docid": "8e52d49f8bf874c2c7d162ea51c1f59a", "score": "0.47425377", "text": "function setCaseidenOTNueva($case_id, $id){\n\t\t$this->db->where('orden_trabajo.id_orden', $id);\n\t\treturn $this->db->update('orden_trabajo', array('case_id'=>$case_id));\t\t\t\n\t}", "title": "" } ]
33e1b758b4975149f795b0a76f44d564
Get Resource Url for GetAttributeTypeRules
[ { "docid": "7a858a8b728689232529f97a7c14df4e", "score": "0.67255205", "text": "public static function getAttributeTypeRulesUrl($filter, $pageSize, $responseFields, $sortBy, $startIndex)\r\n\t{\r\n\t\t$url = \"/api/commerce/catalog/admin/attributedefinition/attributes/typerules/?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={filter}&responseFields={responseFields}\";\r\n\t\t$mozuUrl = new MozuUrl($url, UrlLocation::TENANT_POD,\"GET\", false) ;\r\n\t\t$url = $mozuUrl->formatUrl(\"filter\", $filter);\r\n\t\t$url = $mozuUrl->formatUrl(\"pageSize\", $pageSize);\r\n\t\t$url = $mozuUrl->formatUrl(\"responseFields\", $responseFields);\r\n\t\t$url = $mozuUrl->formatUrl(\"sortBy\", $sortBy);\r\n\t\t$url = $mozuUrl->formatUrl(\"startIndex\", $startIndex);\r\n\t\treturn $mozuUrl;\r\n\t}", "title": "" } ]
[ { "docid": "de812c83889c474870ba89ffecb4ca89", "score": "0.6693971", "text": "public function getUrlAttributePath();", "title": "" }, { "docid": "3bcd226094ff001e2d4eb7e1df48202a", "score": "0.59882516", "text": "public function getResourceURL($type)\n {\n return self::DIRECTO_BASE_URL.'/'.\n $this->accountName.'/xmlcore.asp?get=1&what='.$type;\n }", "title": "" }, { "docid": "6adada1438034982e3d1b7249be3a713", "score": "0.5722086", "text": "public function getAltAttributePath();", "title": "" }, { "docid": "84fe85f3ba1ebb0f3be3e2b3451db087", "score": "0.56256986", "text": "public function getRuleType();", "title": "" }, { "docid": "30eecbb1f48c7b182aab28b0532f2083", "score": "0.556886", "text": "public function getLink()\n {\n if ($target = $this->getTarget()) {\n if (!empty($this->commerce->getOption('commerce_db-table-product-type.resource_col'))) {\n return $this->adapter->makeResourceUrl($this->getTargetField($target, $this->commerce->getOption('commerce_db-table-product-type.resource_col')), '', array(), 'full');\n } \n }\n return false;\n }", "title": "" }, { "docid": "2fafcce12a2fd66320a2e8d5b2605583", "score": "0.5548046", "text": "public function getThumbnailUrlAttributePath();", "title": "" }, { "docid": "e6a79f95fddfdf3b3a2c908e45b5a390", "score": "0.5509009", "text": "public function url()\n {\n return $this->attr(StringType::ATTR_STRING_TYPE, StringType::TYPE_URL);\n }", "title": "" }, { "docid": "c7e9af3a301029422a22e1bcfbfb0b07", "score": "0.5458876", "text": "public function createUrl()\n {\n return $this->getParent()->getUrl($this->resourceName());\n }", "title": "" }, { "docid": "a79e02060da1f5274b9e2b434846e537", "score": "0.544229", "text": "public function getRule(): string;", "title": "" }, { "docid": "0fec4f8b101501f740c74fc92a97aeb1", "score": "0.54317987", "text": "public function getResourceUri()\n\t{\n\t\t$uri = '';\n\n\t\tif( ($dependencies = $this->getDependencies()) ){\n\t\t$uri.=\"{$dependencies}/\";\n\t\t}\n\n\t\t$uri.=$this->getResourceName();\n\n\t\tif( ($id = $this->getId()) ){\n\t\t\t$uri.=\"/{$id}\";\n\t\t}\n\n\t\treturn $uri;\n\t}", "title": "" }, { "docid": "18d9fb9b97d66c8fd2036a726503cbe2", "score": "0.54076856", "text": "protected function getUrlMethodName($type)\n {\n return 'get' . studly_case(str_singular($type)) . 'Url';\n }", "title": "" }, { "docid": "73f2607016faee3efcc4813ec9ad7da6", "score": "0.5402425", "text": "public function getUri( )\n {\n return 'get';\n }", "title": "" }, { "docid": "b1c64b2acd7b6a1c76fe43be194db0aa", "score": "0.5368686", "text": "public function getResourceUrl();", "title": "" }, { "docid": "fcf2ced22f46782c0d3475fa2688e251", "score": "0.5315433", "text": "public function getActionUrl();", "title": "" }, { "docid": "3cee388552facfb3d38d5d574d65c907", "score": "0.5298914", "text": "public function getURL()\n {\n /** @var ResourceURLGenerator $generator */\n $generator = Injector::inst()->get(ResourceURLGenerator::class);\n return $generator->urlForResource($this);\n }", "title": "" }, { "docid": "d832aaa2afe8f3a3efd433369a660c02", "score": "0.52774537", "text": "protected function _getAttributeUrl($type, $code, $attribute, $config, $route)\n {\n return Mage::helper('adminhtml')\n ->getUrl($route, array(\n 'grid_type' => $this->getCode(),\n 'block_type' => Mage::helper('core')->urlEncode($type),\n 'id' => $code,\n 'origin' => self::EDITABLE_TYPE_ATTRIBUTE,\n 'is_external' => (!$config['in_grid'] ? 1 : 0),\n ));\n }", "title": "" }, { "docid": "771c633c48ef95dee51545b6ff16f857", "score": "0.52644974", "text": "public static function getUrlFmt(): string\n {\n return LightCliFormatHelper::getUrlFmt();\n }", "title": "" }, { "docid": "3e15ef93f761f904836a22ea6140239b", "score": "0.5262628", "text": "public function getActionUrl()\n {\n }", "title": "" }, { "docid": "af791e300b42db42ed0dd58ae36633bd", "score": "0.52423346", "text": "function asset_url($type)\r\n {\r\n $CI =& get_instance(); \r\n \r\n //return the full asset path to the type of resource\r\n return base_url() . $CI->config->item($type.'_'.'path');\r\n }", "title": "" }, { "docid": "7820729357eb8d2806e505cc44df65e6", "score": "0.52134615", "text": "public function getUrl()\n {\n return 'https://maps.googleapis.com/maps/api/directions/' . $this->format;\n }", "title": "" }, { "docid": "18ec41ff8309dd313fcbcb2249e9795d", "score": "0.520108", "text": "public function getDeleteUrl()\n {\n return $this->getUrl(\n 'bssreward/rule/delete',\n ['rule_id' => $this->registry->registry('rewardpoint_rule')->getId()]\n );\n }", "title": "" }, { "docid": "7002ca0fbe6f807a97bee9a5a0816084", "score": "0.5199599", "text": "protected function getUrl()\n {\n $owner = $this->owner;\n $result = $this->url ? $this->processParam('url') : $owner->{$this->urlAttribute};\n return $result;\n }", "title": "" }, { "docid": "7ed37dc12d22d83673c656eac4a800fb", "score": "0.5195397", "text": "public function url() {\n\t\t$url = Client::URI_API_ENDPOINT . $this->resource . '.json';\n\t\tif ($this->method == 'GET' && $this->params !== null) {\n\t\t\t$url .= '?' . http_build_query($this->params);\n\t\t}\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "96e4a51bc9828a7991adb5931424955d", "score": "0.51562554", "text": "public function getResourceUrl()\n {\n return $this->resourceUrl;\n }", "title": "" }, { "docid": "96e4a51bc9828a7991adb5931424955d", "score": "0.51562554", "text": "public function getResourceUrl()\n {\n return $this->resourceUrl;\n }", "title": "" }, { "docid": "15a46c6df60a696a399912fb8be19aec", "score": "0.51505125", "text": "public function getImageUrl() {\n $this->validateParameters();\n\n if (!empty($this->style)) {\n return $this->styleUrl;\n }\n else {\n return $this->url;\n }\n }", "title": "" }, { "docid": "ded465149e7226e99a65c8f3a02d891a", "score": "0.51336986", "text": "abstract public function getActionUrl();", "title": "" }, { "docid": "de9ef2b4cda83f28519943bb1c369465", "score": "0.51172197", "text": "public function getRuleType()\n {\n return $this->rule_type;\n }", "title": "" }, { "docid": "e933d8899aed2096fbeeb947a09f4f0c", "score": "0.5109502", "text": "public function getIconUrlAttribute()\n {\n $iconUrl = asset('img/logos/logo-square.png');\n $typeMap = [\n 1 => 'information',\n 2 => 'one-correct-answer',\n 3 => 'multiple-correct-answers',\n 4 => 'freeform-answer',\n 5 => 'match-pairs',\n 6 => 'embedded-content',\n 7 => 'photo',\n 8 => 'missing-word'\n ];\n\n if ( array_key_exists( (int)$this->type, $typeMap ) )\n {\n $iconUrl = asset('img/icons/item/' . $typeMap[(int)$this->type] . '.png');\n }\n\n return $this->attributes['icon_url'] = $iconUrl;\n }", "title": "" }, { "docid": "7ca0032a70f32ec0d8a245d605964f54", "score": "0.5106973", "text": "public function getUrl()\n {\n return $this->createUrl();\n }", "title": "" }, { "docid": "cfcf644c721030dcf717e292f73c6d1b", "score": "0.5106684", "text": "abstract public function getApiUrl();", "title": "" }, { "docid": "fccf73a70c519d44373acdf8b896a5b2", "score": "0.5087482", "text": "public function getUrl()\n {\n return $this->app->getBaseDomain() . $this->serviceScopes[$this->service] . $this->endpoint;\n }", "title": "" }, { "docid": "9513dcb9514386cea53e80000275ac35", "score": "0.50780284", "text": "public function getEditCatalogLink()\n {\n if ($target = $this->getTarget()) {\n if (!empty($this->commerce->getOption('commerce_db-table-product-type.resource_col'))) {\n $url = $this->adapter->getOption('manager_url');\n $url .= '?a=resource/update';\n $url .= '&id=' . $this->getTargetField($target, $this->commerce->getOption('commerce_db-table-product-type.resource_col'));\n return $url;\n }\n }\n return false;\n }", "title": "" }, { "docid": "9e16c879e0c167a832b5e3f45816c861", "score": "0.50712717", "text": "public function getUrlKO();", "title": "" }, { "docid": "4f20b8333b26b31f10fe780507137fce", "score": "0.50648856", "text": "public function getName() {\n\t\treturn 'url';\n\t}", "title": "" }, { "docid": "6afede4b919d65ea5380793e7f4419e1", "score": "0.50571465", "text": "public function getUrl()\n {\n return Yii::$app->urlManagerFront->createAbsoluteUrl(['/term/view', 'id' => $this->id]);\n }", "title": "" }, { "docid": "55a2898e921f283f921fde393f9b899e", "score": "0.5046024", "text": "protected function getResourceType(): string\n {\n $modelName = collect(explode('\\\\', get_class($this->record)))->last();\n\n if (config('jsonapi.singular_type_names') !== true) {\n $modelName = str_plural($modelName);\n }\n\n return snake_case($modelName, '-');\n }", "title": "" }, { "docid": "ed7c607870898cd1fc7670ce542294dc", "score": "0.5038989", "text": "public function getUriSchema()\n {\n return $this->uriSchema;\n }", "title": "" }, { "docid": "cb5a77136a260b483f050a269e4fd29f", "score": "0.5038772", "text": "public function getSchemaUrl()\n {\n return $this->schema_url;\n }", "title": "" }, { "docid": "c64b97cabd0f365e64277b360f32bc99", "score": "0.5036577", "text": "public function get_url()\n {\n return $this->get_default_property(self::PROPERTY_URL);\n }", "title": "" }, { "docid": "d0d465603721b373f983429c14a069e6", "score": "0.50345874", "text": "public function rules()\n\t{\n\t\treturn [\n\t\t\t'website' => 'url',\n\t\t\t'facebook' => 'url',\n\t\t\t'twitter' => 'url'\n\t\t];\n\t}", "title": "" }, { "docid": "446601189ab19ec4c7e29af40ced3b39", "score": "0.50325567", "text": "public function getImagePathAttribute()\n {\n\n $combination_url = [];\n foreach ($this->combination->options as $option) {\n $name = iconv('UTF-8', 'ISO-8859-1//TRANSLIT//IGNORE', $option->value);\n $combination_url[] = str_replace(' ', '_', $name);\n }\n $combination_url = join(\"-\", $combination_url);\n\n return \"{$combination_url}/{$this->name}\";\n }", "title": "" }, { "docid": "e339b61bfcd0491bb088a21384f08a35", "score": "0.50295216", "text": "private function getAttributeSetCode(AttributeSetInterface $attributeSet): string\n {\n return $this->filterManager->translitUrl($attributeSet->getAttributeSetName());\n }", "title": "" }, { "docid": "635fed92b26c530a5dfce0fae31298f2", "score": "0.50216025", "text": "public function getUrlAttribute() {\n\n $slug = str_slug($this->name);\n\n return \"/items/armour/\".$this->id.\"/\".$slug;\n }", "title": "" }, { "docid": "1045e0763c3410b53a1070ad3621e494", "score": "0.50198764", "text": "public function getUrlAttribute()\n {\n return url('user/'.$this->name);\n }", "title": "" }, { "docid": "02ee9dbdaf1435d39acc8f3df9f5032c", "score": "0.50188833", "text": "public function url()\n {\n $asset = $this->model->getAsset();\n\n return $asset->getPresenter()->url();\n }", "title": "" }, { "docid": "92bc98a87dbaccb52daa3762ee32b4bd", "score": "0.5000831", "text": "public function getResourceType()\n {\n return $this->sourceFileResourceType;\n }", "title": "" }, { "docid": "95cc041b45db7d8cf8ab85c35cd69dfc", "score": "0.49999294", "text": "private function _getUrl($type = 'base', $id = null)\n {\n $modelClass = $this->modelClass;\n $collection = $modelClass::getResourceName();\n\n switch ($type) {\n case 'api':\n return $this->_trailingSlash($modelClass::getApiUrl());\n break;\n case 'collection':\n return $this->_trailingSlash($collection, false);\n break;\n case 'element':\n if (is_null($id)) {\n return $this->_trailingSlash($collection, false);\n }\n return $this->_trailingSlash($collection) . $this->_trailingSlash($id, false);\n break;\n }\n\n return '';\n }", "title": "" }, { "docid": "e45b05079d15be2691a099efe786b66c", "score": "0.49888903", "text": "private function getAttributeSetCode(AttributeSetInterface $attributeSet)\n {\n return $this->filterManager->translitUrl($attributeSet->getAttributeSetName());\n }", "title": "" }, { "docid": "4c5b204218f587bcc664ac3073181ce7", "score": "0.49862215", "text": "function getUri($attrList){\n\t\t\t$uri = null;\n\t\t\t$end=false;\t\n\t\t\t$i=0;\n\t\t\tdo{\n\t\t\t\tif ($i > $attrList->length){\n\t\t\t\t\t$end = true;\n\t\t\t\t} else if (strcmp($attrList->item($i)->name,'Uri')==0){\n\t\t\t\t\t$end = true;\n\t\t\t\t\t$uri = $attrList->item($i)->value;\n\t\t\t\t} else {\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t} while (!$end);\n\t\t\treturn $uri;\n\t\t}", "title": "" }, { "docid": "dd043c3850cbf6c47a4622d070400bc8", "score": "0.49718755", "text": "public function getRules(){\n \treturn [\n \t\t$this->urlPrefix.'/update/<name:[\\w]+>' => $this->urlPrefix.'/default/update',\n \t];\n }", "title": "" }, { "docid": "1ee0831ee5895a77dbbb2ac650105e7c", "score": "0.4963958", "text": "public function getRule(): array;", "title": "" }, { "docid": "04f70d987f20e18ad959e8e54cbd2985", "score": "0.49520504", "text": "public function entityURL();", "title": "" }, { "docid": "f1d568734dd4192b23f282442eee3e76", "score": "0.49359608", "text": "function getURL() {\n\t\tglobal $config;\n\t\tif ($config->getNode('server','rewrite')) {\n\t\t\treturn $config->getNode('paths','root').\"/category/\".$this->id.\"/\".htmlentities(str_replace(array(\" -> \",\" \"),array(\"/\",\"_\"),$this->fullName)).\"/\";\n\t\t} else {\n\t\t\treturn $config->getNode('paths','root').\"/category/?id=\".$this->id;\n\t\t}\n\t}", "title": "" }, { "docid": "4f97045f773e7e529e6d21ce1785902f", "score": "0.492989", "text": "public function getUrl ()\n {\n return array(\n 'endpointurl' => '/v1/locations/' . $this->_locid,\n 'method' => 'get'\n );\n }", "title": "" }, { "docid": "c63d36fcb1bcf25a9da9d3138c1d6b46", "score": "0.49198803", "text": "public function getApiUrl();", "title": "" }, { "docid": "a98fb1fd991ae5240e81ddba576006b7", "score": "0.49187893", "text": "public function resourceBaseUrl();", "title": "" }, { "docid": "507c450ac2be75cdc921f4c41563f145", "score": "0.4916367", "text": "public function getUri()\n {\n return '/' . trim('file/Organizations.OrganizationImage/' . $this->id . \"/\" . urlencode($this->name), '/');\n }", "title": "" }, { "docid": "e320907221793388f64918562d070e39", "score": "0.49134088", "text": "public static function url_for_type($type)\n {\n return '/collections/types?q='.rawurlencode($type);\n }", "title": "" }, { "docid": "7976ddc7eda5060eaef49d23a4da5be9", "score": "0.49089956", "text": "public function getUriAttribute(): ?string\n {\n return $this->uriAttribute;\n }", "title": "" }, { "docid": "3ee2c9bab63462f5a10f12e8d8cfa0cd", "score": "0.49081984", "text": "public function getURL() {\n\t\t\n\t\t// change the chart type if perspective is switched on\n\t\tif ($this->perspective) $this->type = \"p3\";\n\t\t\n\t\t// create options array\n\t\t$options = array(\n\t\t\t\"chl\"\t\t=> implode(\"|\",array_keys($this->segments)),\n\t\t\t\"chd\"\t\t=> \"t:\".implode(\",\",array_values($this->segments)),\n\t\t\t\"chp\"\t\t=> $this->rotation\n\t\t);\n\t\t\n\t\t// call parent\n\t\treturn parent::getURL($options);\n\t\t\n\t}", "title": "" }, { "docid": "017ec0cdaf115bb233c5f48b85e07cd8", "score": "0.490769", "text": "function ruleUrl($error_message = null) {\r\n return $this->_rule('url', $error_message);\r\n }", "title": "" }, { "docid": "29acef51c70373a8162086d6e5d6c24a", "score": "0.49058223", "text": "public function jquery__get_rule_name();", "title": "" }, { "docid": "daa73429d7604f2daab5fb94d1f5e6fa", "score": "0.48949355", "text": "public function getUrl()\n {\n if ($this->getCustomUrl()) {\n return $this->getCustomUrl();\n }\n\n return $this->isTest() ? self::TEST_API_URL : self::API_URL;\n }", "title": "" }, { "docid": "5f5b029b33103432df6bbdc1a6e2f834", "score": "0.4889113", "text": "public function getUrl() {\n\t\treturn new Url($this->getActionUrl(), $this->getRouteParams());\n\t}", "title": "" }, { "docid": "f372e980b135765a0f2c6408ed5cc240", "score": "0.4883827", "text": "public function getValidationUrl()\n {\n return $this->getUrl('*/*/validate', ['_current' => true]);\n }", "title": "" }, { "docid": "6ebb9702d89c6ce4a80bdf7e0784dde7", "score": "0.48807657", "text": "public function getRuleName($rule = '');", "title": "" }, { "docid": "caf51ceeed988f8bcb26b0a3246edba9", "score": "0.4878188", "text": "protected function getEavEntityAttributeResource()\r\n {\r\n return Mage::getResourceModel('eav/entity_attribute');\r\n }", "title": "" }, { "docid": "21577802a27232138e286a36beabd33c", "score": "0.4877789", "text": "public function getUrlAttribute()\n {\n \n return route('region.company.detail', [$this->region->slug, $this->slug]);\n }", "title": "" }, { "docid": "6ad9680f0133035ab763a29e80fad8ec", "score": "0.48756742", "text": "protected function _getAttributeEditUrl($type, $code, $attribute, $config)\n {\n return $this->_getAttributeUrl(\n $type, $code, $attribute, $config,\n 'adminhtml/blcg_custom_grid_editor/edit' . ($config['in_grid'] ? 'InGrid' : '')\n );\n }", "title": "" }, { "docid": "1373620b7b1916a4798d6ba1d9170537", "score": "0.4874979", "text": "public function getRule()\n {\n $value = $this->get(self::rule);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "935717c088652a8914f9b5ade22888d5", "score": "0.48722732", "text": "public function editUrl()\n {\n return cp_route('taxonomy.edit', $this->path());\n }", "title": "" }, { "docid": "78cf254ddd96f773ca1fbe2fe711c152", "score": "0.48703006", "text": "function get_url()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_URL);\r\n }", "title": "" }, { "docid": "a1a17c292df7521e5202dd941e7c1a1c", "score": "0.486859", "text": "public function getResourceType()\n {\n return $this->resource_type;\n }", "title": "" }, { "docid": "e2d2142ca3344bae84d461fe1ab19eb0", "score": "0.48605722", "text": "public function getScheme($type) { \n\n\t\t$xml = '<ServiceSchemaRequest xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\t\t xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\n\t\t xmlns=\"http://www.retaildirections.com/\"\n\t\t name=\"'.$type.'\"\n\t\t version=\"1\" />';\n\t\t\n\t\tself::setHeaders(array('ServiceName'=>'Schema'));\n\t\tself::sendXML($xml);\n\n\t}", "title": "" }, { "docid": "65ffdd7b518bf3d0aeaf93e3f27bd6c3", "score": "0.48582745", "text": "public static function base_url() {\n\n\t\tif(isset($_GET['type']) && isset($_SESSION['eeck']['resourcetypes'][$_GET['type']])) {\n\t\t\treturn $_SESSION['eeck']['resourcetypes'][$_GET['type']]['url'];\n\t\t}\n\n\t\t// shouldn't ever end up here as authentication would have booted us out before\n\t\treturn '/';\n\t}", "title": "" }, { "docid": "cebc147358053f912ab235944be03fa4", "score": "0.48560447", "text": "public function getUrlAttribute()\n {\n $url = route('telefoon.details', ['slug' => $this->slug]);\n\n return $url;\n }", "title": "" }, { "docid": "99e439fbbcd8c04ab1873d6e0f1e329b", "score": "0.48451126", "text": "abstract public function get_url();", "title": "" }, { "docid": "46b1f9103b46a81cbb894c6dd35fa3e2", "score": "0.48415914", "text": "public function getRuleAttribute() {\n $rules = (array)$this->rules;\n foreach ($rules as $key => $rule) {\n $rules[$key] = (array) $rule;\n $rules[$key]['name'] = $key;\n }\n $rules = array_values($rules);\n return $rules;\n }", "title": "" }, { "docid": "d60a13a0098994545055c0fd422ee852", "score": "0.48412514", "text": "public function getAdvancedUrl()\n {\n return $this->getUrl('magento_giftregistry/search/advanced');\n }", "title": "" }, { "docid": "ad65a568183407e92170f637c4742fcd", "score": "0.48399436", "text": "public function construct_api_url()\n {\n $url = api_url() . 'registry/object/' . $this->id . '/';\n// $url.='?includes=grants';\n return $url;\n }", "title": "" }, { "docid": "082e2560ca3d44e23d8ab5f48b441378", "score": "0.48375085", "text": "public function getResourceType()\n {\n return $this->resourceType;\n }", "title": "" }, { "docid": "40f01cbde0ed3dd2ce80174876e9eddd", "score": "0.48358098", "text": "protected function getCreateURL()\n {\n return \\XLite\\Core\\Converter::buildURL('recommendation');\n }", "title": "" }, { "docid": "23b001199e40810b8b62bf8611d18e7f", "score": "0.4828286", "text": "public function getUri() {}", "title": "" }, { "docid": "182e1f3423acf705030ed1e2f847d080", "score": "0.4826765", "text": "public function getResourceType()\n\t\t{\n\t\t\treturn $this->type;\n\t\t}", "title": "" }, { "docid": "f6d5c431d6b5c93173bd96f7ccc4359d", "score": "0.48228088", "text": "public function getUrlAttribute()\n {\n return \"/file/{$this->uuid}/{$this->name}\";\n }", "title": "" }, { "docid": "6d2ea3a32c67f7097d57fd01cd5af618", "score": "0.48215938", "text": "public function getUrlEndpointAttribute(){\n return url($this::WEBHOOK_ENDPOINT_URL.'/'.$this->hash_endpoing);\n }", "title": "" }, { "docid": "1e4590aaeb2ae35732afd1abf1b4e9ad", "score": "0.48193562", "text": "public function getWsdlUrl($mode, $productGroup)\n {\n return sprintf($this->wsdlUrl[$mode], $productGroup);\n }", "title": "" }, { "docid": "16c21d1d9a746d1d53df287b1ffb6565", "score": "0.48161653", "text": "public function getUri();", "title": "" }, { "docid": "16c21d1d9a746d1d53df287b1ffb6565", "score": "0.48161653", "text": "public function getUri();", "title": "" }, { "docid": "16c21d1d9a746d1d53df287b1ffb6565", "score": "0.48161653", "text": "public function getUri();", "title": "" }, { "docid": "16c21d1d9a746d1d53df287b1ffb6565", "score": "0.48161653", "text": "public function getUri();", "title": "" }, { "docid": "7d49856a036b904ee4b0270ec88f9fe1", "score": "0.48147047", "text": "public function getUrl(): string\n {\n $data = $this->getCustomData();\n\n if (is_array($data) && isset($data['url'])) {\n return $data['url'];\n }\n\n return '';\n }", "title": "" }, { "docid": "f72c2aff07d6d737afd59f99e3d9e3b2", "score": "0.48015332", "text": "function GetAttributes(){}", "title": "" }, { "docid": "ed311968137e0122e96d89dc17a560f2", "score": "0.4800935", "text": "private function _getExpectedUrl() {\n\t\treturn array(ASSOC_TYPE_ARTICLE => array(\n\t\t\t\t'/article/view/',\n\t\t\t\t'/article/viewArticle/'),\n\t\t\tASSOC_TYPE_GALLEY => array(\n\t\t\t\t'/article/viewFile/',\n\t\t\t\t'/article/download/'),\n\t\t\tASSOC_TYPE_SUPP_FILE => array(\n\t\t\t\t'/article/downloadSuppFile/'),\n\t\t\tASSOC_TYPE_ISSUE => array(\n\t\t\t\t'issue/view/'),\n\t\t\tASSOC_TYPE_ISSUE_GALLEY => array(\n\t\t\t\t'issue/viewFile/',\n\t\t\t\t'issue/download/')\n\t\t\t);\n\t}", "title": "" }, { "docid": "101f870e902099f6e3025004832d9681", "score": "0.48007616", "text": "public function getURLCreationObjet() {\n return Routeur::creerURL(\"tentativeCreationObjet\");\n }", "title": "" }, { "docid": "f766a01338fbc7f91e9c223cf6562c6d", "score": "0.4796822", "text": "public function getValueElementChooserUrl()\n {\n $url = false;\n switch ($this->getAttribute()) {\n case 'sku':\n case 'category_ids':\n $url = 'autocategory/rule/chooser/attribute/' . $this->getAttribute();\n if ($this->getJsFormObject()) {\n $url .= '/form/' . $this->getJsFormObject();\n }\n break;\n default:\n break;\n }\n return $url !== false ? $this->_backendData->getUrl($url) : '';\n }", "title": "" }, { "docid": "022b15faac0a9a804f025f89bbde1ae0", "score": "0.47896454", "text": "public function getActionUrl()\n {\n return $this->getUrl('magento_giftregistry/search/results');\n }", "title": "" }, { "docid": "d16a6c270aaf9fee47722bb25725e39a", "score": "0.47876504", "text": "public function getPathAttribute()\n {\n return asset(\"api/categories/$this->slug\");\n }", "title": "" }, { "docid": "40e0d42dfdacb73867d8533a45572592", "score": "0.47875643", "text": "public function getRuleId();", "title": "" } ]
ccbac23fe5060d65630b19e5693a41e9
Get the validation rules that apply to the request.
[ { "docid": "9c2037b21778ac249bd0e84a0f636954", "score": "0.0", "text": "public function rules()\n {\n $permission = Permission::where('email', \\Auth::user()->email)\n ->where('event_id', \\Route::current()->parameter('event'))\n ->first();\n\n $possible = Arr::pluck(config('event.permissions.' . $permission->type), 'value');\n\n return [\n 'type' => 'bail|required|string|in:' . implode(',', $possible),\n 'email' => 'bail|required|email',\n ];\n }", "title": "" } ]
[ { "docid": "22661db8dde56c23a89087f21f08827f", "score": "0.8351514", "text": "public function rules()\n {\n // dd($this->request->all());\n $rules = $this->custom_rules();\n return $rules;\n }", "title": "" }, { "docid": "fbfcab70342d40a351f21f930cac2460", "score": "0.8055374", "text": "protected function getValidationRules()\r\n {\r\n return $this->rules;\r\n }", "title": "" }, { "docid": "9f44fb39c76a5414da5b594d168bf460", "score": "0.79728407", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n {\n return $this->getQueryRules();\n break;\n }\n case 'POST':\n {\n return $this->getRequestRules();\n break;\n }\n case 'PUT':\n {\n return $this->getRequestRules();\n break;\n }\n case 'PATCH':\n {\n return $this->getRequestRules();\n break;\n }\n case 'DELETE':\n {\n return $this->getRequestRules();\n break;\n }\n default:break;\n }\n }", "title": "" }, { "docid": "304b3dabf4dce24372e250d7a8640198", "score": "0.7956561", "text": "public function rules()\n {\n return $this->object->getValidationRules();\n }", "title": "" }, { "docid": "674f48033c4da89ffa7685260cca729a", "score": "0.79264987", "text": "public function rules()\n {\n return $this->validationRules;\n }", "title": "" }, { "docid": "189c95c1a6c72dca026ecc25b6debb47", "score": "0.7902952", "text": "public function rules(){\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PATCH':\n return $this->getPutRules();\n default:\n return $this->rules;\n }\n }", "title": "" }, { "docid": "fc99891a0d03307f2b0025bb7d140e8e", "score": "0.7882014", "text": "public function getValidationRules(): array\n {\n return $this->validationRules;\n }", "title": "" }, { "docid": "b788bc26e9f11342d45de5103a8d2f19", "score": "0.78417915", "text": "public function getRequestRules()\n {\n return $this->request_rules = array_merge($this->request_rules, $this->reserved_request_rules);\n }", "title": "" }, { "docid": "64233c461e5c312c55d39de520ba50e7", "score": "0.7829425", "text": "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [\n 'per_page' => 'min:1|integer',\n ];\n\n case 'POST':\n return [\n 'name' => 'required|max:255',\n 'unit' => 'required|max:255',\n 'category_id' => 'required|integer|max:255',\n 'frequency' => 'required|max:255',\n ];\n\n case 'PUT':\n case 'PATCH':\n return [\n 'record_id' => 'required|integer|max:255',\n 'frequency' => 'required|max:255',\n 'completed' => 'required|boolean',\n ];\n\n default:\n return [\n //\n ];\n }\n }", "title": "" }, { "docid": "924c11ffc113fcd9c3f27d9a3e1ba518", "score": "0.7769612", "text": "public function getValidationRules () {\n\t\treturn $this->validationRulesOnCreate;\n\t}", "title": "" }, { "docid": "9687617c25b5d8c9b4d6d8c54b76801e", "score": "0.77326083", "text": "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UploadType' => array(\n\t\t\t\t'inArray' => array('values' => array(self::UPLOADTYPE_NDA),),\n\t\t\t),\n\t\t\t'_FileName' => array(\n\t\t\t\t'string' => array('min' => 1,'max' => 255,),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'inArray' => array('values' => array(self::STATUS_APPROVED, self::STATUS_REJECTED, self::STATUS_PENDING),),\n\t\t\t),\n\t\t\t'_PreferredLanguage' => array(\n\t\t\t\t'string' => array('min' => 1,'max' => 5,),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "2180e7156956f995d79e98a14296ec88", "score": "0.77298003", "text": "protected function _validationRules()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "13459339bf1907cec62fae99209e187a", "score": "0.7703797", "text": "public function rules()\n {\n $validation = array();\n $validation['service_id'] = 'required';\n $validation['date_maturity'] = 'required';\n $validation['status'] = 'required';\n\n switch(request()->method()){\n case 'POST':\n\n break;\n case 'PUT':\n\n break;\n }\n\n return $validation;\n }", "title": "" }, { "docid": "54189267b931be93bab91ff0dedaaefb", "score": "0.77015126", "text": "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_Id' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Title' => array(\n\t\t\t\t'string' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Sent' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "cb37ae332016d9aa874746ae9acf5b3c", "score": "0.76964927", "text": "private function getValidateRules()\n {\n return [\n 'name' => 'required|string|max:64',\n 'phone' => 'required|string|max:32',\n 'address' => 'required|string|max:256',\n 'message' => 'nullable|string|max:256',\n ];\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "bc8481ba2b2bc2414633cc874cbd3bb1", "score": "0.765498", "text": "public function returnValidationRules()\n {\n return $this->_validationRules;\n }", "title": "" }, { "docid": "12d37bd7f67c920351167111444cb5ab", "score": "0.7633269", "text": "public function rules()\n {\n $rules = [];\n switch ($this->method()) {\n case 'POST':\n case 'PUT';\n $rules = [\n 'title' => 'sometimes|required|min:3|max:30',\n 'category_id' => 'sometimes|required',\n 'body' => 'sometimes|required|min:5',\n 'captcha' => 'sometimes|required|captcha',\n 'upload_file' => 'sometimes|max:1024'\n ];\n }\n return $rules;\n }", "title": "" }, { "docid": "464e9694a3c15a180d690f8eb4f318c2", "score": "0.76150966", "text": "public function rules()\n {\n switch ($this->method()){\n case 'GET':\n $validator = [];\n if ($this->request->get('start_time')) {\n $time = [\n 'start_time' => [\n 'array'\n ],\n 'start_time.0' => [\n 'required',\n 'date',\n ],\n 'start_time.1' => [\n 'required',\n 'date',\n 'after:start_time.0'\n ],\n ];\n $validator = array_merge($validator,$time);\n }\n if ($this->request->get('src')) {\n $validator = array_merge($validator,['src' => 'integer']);\n }\n if ($this->request->get('dst')) {\n $validator = array_merge($validator,['dst' => 'integer']);\n }\n if ($this->request->get('answered')) {\n $validator = array_merge($validator,['answered' => 'boolean']);\n }\n if ($this->request->get('direct')) {\n $validator = array_merge($validator,['direct' => 'in:come,out,inside,turn']);\n }\n return $validator;\n default:\n return [\n\n ];\n }\n\n }", "title": "" }, { "docid": "792f68aced72f732af33f1380ec84053", "score": "0.76102674", "text": "private function getValidationRules() {\n $rules = array(\n 'name' => ['required', 'string', 'max:191'],\n 'login' => ['required', 'string', 'max:31', 'unique:users', 'alpha_num'],\n 'email' => ['required', 'string', 'email', 'max:191', 'unique:users'],\n 'password' => ['required', 'string', 'min:8', 'confirmed']\n );\n return $rules;\n }", "title": "" }, { "docid": "5fd01dbbd4ae37c1c4f693224d641939", "score": "0.75983995", "text": "public function rules()\n {\n $rules = $this->rules;\n\n return $rules;\n }", "title": "" }, { "docid": "fbe82a26e235ac452c3a8774f12fbac2", "score": "0.75972396", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'PATCH':\n return $this->getUpdateRules();\n break;\n\n case 'DELETE':\n return $this->getDeleteRules();\n break;\n\n default:\n return $this->getCreateRules();\n break;\n }\n }", "title": "" }, { "docid": "46c6c2c400d0f453c57ac97779a3de35", "score": "0.75952774", "text": "public function rules(): array\n {\n switch ($this->getMethod()) {\n case 'PUT':\n return [\n 'status' => ['bail', 'required', Rule::in([-1, 1])],\n 'id' => ['required'],\n ];\n case 'POST':\n return [\n 'email' => [\n 'bail',\n 'required',\n 'email',\n ]\n ];\n case 'GET':\n return [\n 'email' => ['bail', 'required', 'email'],\n 'key' => ['required'],\n 'code' => ['required'],\n ];\n }\n }", "title": "" }, { "docid": "7dcbff841d1eb37aa09254894f2d8675", "score": "0.7574552", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n {\n return [\n 'start' => 'required',\n 'end' => 'required|after:start',\n 'location' => 'required',\n ];\n }\n case 'PUT':\n case 'PATCH':\n {\n return [\n 'start' => 'required',\n 'end' => 'required|after:start',\n 'location' => 'required',\n ];\n }\n default:break;\n }\n }", "title": "" }, { "docid": "958afbe78ddb5ae634b7ad1fc2167fc0", "score": "0.75717854", "text": "public function rules() {\n\t\t\treturn $this->rules;\n\t}", "title": "" }, { "docid": "3505b0f11cec928f36de19f9d4337c42", "score": "0.7571149", "text": "private function storeRequestValidationRules()\n {\n $rules = [\n 'name' => 'required|max:255',\n 'username' => 'max:100',\n 'email' => 'email|required|max:255|unique:users',\n 'password' => 'required|min:5|max:255',\n 'gender' => 'numeric|min:1|max:3',\n 'address' => 'max:255',\n 'phone' => 'max:45',\n 'profile_picture' => 'max:255',\n 'roles' => 'required|array|in:' . implode(',', config('common.users.roles')),\n 'is_active' => 'required|numeric|min:0|max:1',\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "7ee4ec71711c87a8dc475ac1b566679c", "score": "0.7571088", "text": "public function rules()\n\t{\n\t\treturn $this->rules;\n\t}", "title": "" }, { "docid": "6ca414cdbab522cb90d8e81e1159aba8", "score": "0.75678647", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'to_name' => ['required','max:191'],\n 'mobile' => ['required','max:11','min:11'],\n 'address' => ['required','string'],\n 'detail' => ['required','max:191'],\n 'postcode' => ['nullable','max:6'],\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "title": "" }, { "docid": "026ad5323e67ffe17732671122fefcb8", "score": "0.75653064", "text": "public function rules()\n {\n $all_rules = [\n 'email' => [\n 'required',\n 'email',\n 'max:255',\n Rule::unique($this->repository->getModelTable())\n ->where(function ($query) {\n $query->whereNull('deleted_at')\n ->where('id', '<>', $this->user()->id);\n }),\n ],\n 'name' => 'required|string|max:255',\n 'password' => 'required|confirmed|string|min:6|max:255',\n ];\n\n // Get input\n $input = $this->all();\n\n // Get necessary rules based on input (same keys basically)\n $rules = array_intersect_key($all_rules, $input);\n\n return $rules;\n }", "title": "" }, { "docid": "85e51d31fc873bf179b6e86544c844ba", "score": "0.75625587", "text": "public function rules()\n {\n $validation = [];\n $validation['name'] = ['required', 'min:2', 'max:100'];\n $validation['email'] = ['required', Rule::unique('users')->ignore($this->user)];\n\n if(strtolower($this->method()) == 'post' || (strtolower($this->method()) == 'put' && strlen($this->password) >= 1)) {\n $validation['password'] = ['required', 'min:6'];\n }\n\n return $validation;\n }", "title": "" }, { "docid": "dc37dcb613b0926de6db7cba76b52b91", "score": "0.7560092", "text": "public function getRules() {\n return [\n 'provider_id' => 'required',\n 'rfc' => 'required',\n 'name' => 'required',\n 'address' => 'required',\n 'postal_code' => 'required',\n ];\n }", "title": "" }, { "docid": "00cd38a3fd794a34bf3df189c868e0af", "score": "0.75582826", "text": "public function rules(): array\n {\n switch ($this->getMethod())\n {\n case 'POST':\n $rules = [\n 'phone' => 'required_without:email',\n 'email' => 'required_without:phone|email',\n 'password' => 'required',\n ];\n\n return $rules;\n break;\n }\n }", "title": "" }, { "docid": "2115869f626037f9df0a1c3568effab2", "score": "0.7549252", "text": "public function getValidationRules()\n {\n return [\n 'ADR' => '*',\n 'ANNIVERSARY' => '?',\n 'BDAY' => '?',\n 'CALADRURI' => '*',\n 'CALURI' => '*',\n 'CATEGORIES' => '*',\n 'CLIENTPIDMAP' => '*',\n 'EMAIL' => '*',\n 'FBURL' => '*',\n 'IMPP' => '*',\n 'GENDER' => '?',\n 'GEO' => '*',\n 'KEY' => '*',\n 'KIND' => '?',\n 'LANG' => '*',\n 'LOGO' => '*',\n 'MEMBER' => '*',\n 'N' => '?',\n 'NICKNAME' => '*',\n 'NOTE' => '*',\n 'ORG' => '*',\n 'PHOTO' => '*',\n 'PRODID' => '?',\n 'RELATED' => '*',\n 'REV' => '?',\n 'ROLE' => '*',\n 'SOUND' => '*',\n 'SOURCE' => '*',\n 'TEL' => '*',\n 'TITLE' => '*',\n 'TZ' => '*',\n 'URL' => '*',\n 'VERSION' => '1',\n 'XML' => '*',\n\n // FN is commented out, because it's already handled by the\n // validate function, which may also try to repair it.\n // 'FN' => '+',\n 'UID' => '?',\n ];\n }", "title": "" }, { "docid": "4271cd8c9f9fbe155df88643004cf75c", "score": "0.7532417", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required|min:6|max:255',\n 'email' => 'required|email|min:6|max:255|unique:users',\n 'address' => 'required',\n 'phone' => 'required',\n 'identity_number' => 'required',\n ];\n\n switch ($this->method()) {\n case 'POST':\n break;\n\n case 'PUT':\n $rules['email'] = 'required|email|min:6|max:255|unique:users,email,' . $this->get('user_id');\n break;\n \n default:\n # code...\n break;\n }\n\n return $rules;\n }", "title": "" }, { "docid": "d707bb0769e974c2f417a897389d069a", "score": "0.75155175", "text": "public function rules()\n {\n return static::$rules;\n }", "title": "" }, { "docid": "7a2bfe86a5d3b74e851190116cc6c804", "score": "0.7513491", "text": "public function rules()\n {\n $rules = [];\n switch($this->method())\n {\n case 'POST':\n {\n $rules = [ \n 'template_id' => [\n 'required',\n Rule::in(Template::pluck('id')->toArray()),\n ],\n 'published_at' => 'required|date',\n 'user_id' => [\n 'required',\n Rule::in(User::employee()->pluck('id')->toArray()),\n ],\n ];\n break;\n }\n case 'PUT':\n case 'PATCH':\n {\n $rules = [ \n 'template_id' => [\n 'required',\n Rule::in(Template::pluck('id')->toArray()),\n ],\n 'published_at' => 'required|date',\n 'user_id' => [\n 'required',\n Rule::in(User::employee()->pluck('id')->toArray()),\n ],\n ];\n }\n default: break;\n }\n \n return $rules; \n }", "title": "" }, { "docid": "51b658b83f9851eb4b1716f6add97a06", "score": "0.7510384", "text": "public function rules()\n {\n parent::rules();\n $method = $this->method();\n if (null !== $this->get('_method', null)) {\n $method = $this->get('_method');\n }\n $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n $this->rules = [];\n break;\n\n case 'POST':\n\n break;\n // in case of edit\n case 'PUT':\n case 'PATCH':\n\n break;\n default:\n break;\n }\n\n return $this->rules;\n }", "title": "" }, { "docid": "b7d2a7469638be79d9de5fd8c80554ac", "score": "0.7509841", "text": "public function rules()\n {\n switch ($this->method()){\n case 'POST':\n return [\n 'title' => 'required|string',\n 'mission_amount' => 'required|numeric|gt:0',\n 'start_at' => 'required|date',\n 'end_at' => 'required|date',\n 'done_at' => 'date',\n 'cancel_at' => 'date',\n ];\n break;\n case 'PATCH':\n return [\n 'title' => 'string',\n 'accomplish_amount' => 'numeric',\n 'start_at' => 'date',\n 'end_at' => 'date',\n 'cancel_at' => 'date',\n ];\n break;\n }\n }", "title": "" }, { "docid": "f03865f30441fcf975ed53e31245c14b", "score": "0.75052965", "text": "public function rules()\n {\n $rules = [];\n\n $method = $this->route()->getActionMethod();\n switch ($method) {\n case 'chatRecords':\n $rules = [\n 'type' => ['required', Rule::in(['friend', 'group'])],\n 'model_id' => ['required'],\n ];\n break;\n default:\n break;\n\n }\n return $rules;\n }", "title": "" }, { "docid": "c24f4d4d305b08a1554f3174674b9623", "score": "0.75049406", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'email' => 'required|email'\n ];\n\n $isPost = ( !is_null($this->method) && $this->method === 'POST' )\n || $this->server('REQUEST_METHOD') === 'POST';\n\n if ( $isPost ) {\n $rules['password'] = 'required|min:6|confirmed';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "bb4066568b7c6f4650b96a080a2f40a7", "score": "0.7502649", "text": "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()) {\n case \"GET\":\n // todo\n break;\n case \"POST\":\n $rules = [\n 'name' => 'required|unique:statuses',\n 'priority' => 'required|numeric|unique:statuses',\n 'status_type_id' => 'required|exists:status_types,id',\n 'status_category_id' => 'required|exists:status_categories,id',\n ];\n break;\n case \"PATCH\":\n case \"PUT\":\n $rules = [\n 'name' => 'required|unique:statuses,name,' . $this->route('status')->id,\n 'priority' => 'required|numeric|unique:statuses,priority,' . $this->route('status')->id,\n 'status_type_id' => 'required|exists:status_types,id',\n 'status_category_id' => 'required|exists:status_categories,id',\n ];\n break;\n case \"DELETE\":\n default:\n break;\n }\n return $rules;\n }", "title": "" }, { "docid": "318c7d6aa64c3fec3b77769e085a0f2b", "score": "0.74992204", "text": "public function rules()\n {\n $user = $this->route('user');\n\n $rules = collect([\n 'name' => 'required|string|max:255',\n 'username' => 'required|string|max:255|unique:users',\n 'password' => 'required|string|min:6|confirmed',\n 'type' => 'required|in:1,2',\n 'phone' => 'required_if:type,2',\n ]);\n\n switch ($this->method()) {\n case 'POST':\n return $rules->toArray();\n case 'PUT':\n case 'PATCH':\n return $rules->merge([\n 'username' => 'required|string|max:255|unique:users,username,'.$user->id,\n 'password' => '',\n ])->toArray();\n }\n }", "title": "" }, { "docid": "861e46d431fd6db9d59d58919d65485b", "score": "0.74986637", "text": "public function getValidationRules()\n {\n return [\n 'TZID' => 1,\n\n 'LAST-MODIFIED' => '?',\n 'TZURL' => '?',\n\n // At least 1 STANDARD or DAYLIGHT must appear.\n //\n // The validator is not specific yet to pick this up, so these\n // rules are too loose.\n 'STANDARD' => '*',\n 'DAYLIGHT' => '*',\n ];\n }", "title": "" }, { "docid": "288a48ea723113f3c2531a77671b1912", "score": "0.7487024", "text": "public function getValidationRules()\n {\n return $this->getAllSettingFields()\n ->pluck('rules', 'name')\n ->reject(function ($val) {\n return is_null($val);\n })\n ->toArray();\n }", "title": "" }, { "docid": "328c0ccab8c45d0b1d7939821b2997bd", "score": "0.7486108", "text": "abstract protected function getValidationRules();", "title": "" }, { "docid": "6be0666a2a4496a0c9c0f97a4985e045", "score": "0.74818736", "text": "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'store':\n $this->authorize = in_array(Auth::user()->role, [User::Role_Admin, User::Role_School, User::Role_Educator, User::Role_Laboratory]);\n return $this->store();\n case 'update':\n return $this->update();\n case 'resetPwd':\n return ['password' => 'required|min:6'];\n default:\n {\n return [];\n }\n }\n }", "title": "" }, { "docid": "6ec9d103a18182c74322044d65c59b2d", "score": "0.74788153", "text": "public function getValidationRules()\n {\n return [\n 'name' => 'required',\n 'user' => 'required|exists:users,id',\n 'products' => 'array'\n ];\n }", "title": "" }, { "docid": "fa6ce6742efe8e37e756ffe1df2ce115", "score": "0.7475464", "text": "public function rules()\n {\n return $this->customRules;\n // return $this->parseRules($rules); \n }", "title": "" }, { "docid": "2ac6c42c853fd673a0ee882a55464f62", "score": "0.7472834", "text": "public function rules()\n {\n $routeName = $this->route()->getName();\n switch ($routeName) {\n case \"api.material.in.store\":\n $rule = [\n \"warehouse_name\" => \"required\",\n \"in_number\" => \"required\",\n \"origin\" => \"required\",\n \"batch_number\" => \"required\",\n \"in_time\" => \"required|integer\",\n \"operator\" => \"required\",\n \"material_id\" => \"required|exists:material,id\",\n \"amount\" => \"required\",\n // \"in_material\" => \"required\",\n ];\n break;\n case \"api.material.in.delete\":\n $rule = [\n \"ids\" => \"required\",\n ];\n break;\n case \"\":\n $rule = [];\n break;\n };\n\n return $rule;\n }", "title": "" }, { "docid": "d946cd7a09a395d4cea44a6978c8966e", "score": "0.7469253", "text": "public function rules()\n {\n switch($this->method()) {\n case 'POST':\n return [\n 'name' => 'required|string',\n 'gi' => 'required|string',\n 'energy' => 'required|integer',\n 'carbohydrate' => 'required|integer',\n 'axunge' => 'required|integer',\n 'protein' => 'required|integer',\n ];\n break;\n case 'PATCH':\n return [\n 'id' => 'required|integer',\n 'name' => 'required|string',\n 'gi' => 'required|string',\n 'energy' => 'required|integer',\n 'carbohydrate' => 'required|integer',\n 'axunge' => 'required|integer',\n 'protein' => 'required|integer',\n ];\n break;\n case 'DELETE':\n return [\n 'id' => 'required|integer',\n ];\n }\n }", "title": "" }, { "docid": "b9f8f8fb76d3c947db4fc0fb9b9c678b", "score": "0.7458989", "text": "public function rules()\n {\n $form = $this->route('form');\n\n switch ($form->id) {\n case 1:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'phone' => 'required|max:15',\n 'city' => 'required|max:255',\n 'state' => 'required|max:255',\n 'subject' => 'required|max:255',\n 'message' => 'required|max:1000',\n ];\n break;\n\n case 2:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n ];\n break;\n\n case 3:\n $rules = [\n 'resume' => 'required',\n ];\n break;\n \n default:\n $rules = [\n \t'teste' => 'required'\n ];\n break;\n }\n\n return $rules;\n }", "title": "" }, { "docid": "16f073c94b6ed296352fe1c5aedf9d32", "score": "0.7458611", "text": "public function rules()\n {\n $path = preg_replace('/api\\//', '', $this->path());\n\n $rules = [];\n\n switch ($path) {\n case self::PASSWORD_UPDATE:\n $rules = [\n 'old_password' => ['required', 'string', new MatchOldPassword],\n 'password' => [\n 'required', 'string', 'confirmed', 'min:8', new CheckSamePassword\n ],\n ];\n break;\n\n case self::PROFILE_UPDATE:\n $rules = [\n 'name' => ['sometimes', 'string', 'max:255'],\n 'bio' => ['string', 'nullable'],\n 'phone' => ['sometimes', 'string', 'size:11', 'nullable'],\n 'image' => [\n 'sometimes',\n 'mimes:jpeg,gif,bmp,png', 'max:1000', 'nullable'\n ],\n ];\n break;\n\n default:\n break;\n }\n\n return $rules;\n }", "title": "" }, { "docid": "add382121e495302f70579ba8a80fdd8", "score": "0.7447583", "text": "public function rules()\n {\n $rules = $this->rules;\n\n if ($this->method() === 'PATCH') {\n $rules['email'] .= ',' . $this->employee->id;\n }\n\n return $rules;\n }", "title": "" }, { "docid": "b34dff7740c7694886cd7ba2d05ecaf6", "score": "0.74249446", "text": "public function rules()\n {\n if($this->isMethod('patch')){\n return [\n 'question' => 'required'\n ];\n }\n\n /*\n * validation rules for creating a poll\n * */\n return [\n 'question' => 'present|required',\n 'options.0' => 'present|required',\n 'options.1' => 'present|required',\n ];\n }", "title": "" }, { "docid": "0f9e4555e0438bad03b32c0cc0d9b290", "score": "0.74220943", "text": "public function rules(Request $request)\n {\n\t\t$action = $request->post('action');\n\t\tswitch($action) {\n\t\t\tcase 'activity':\n\t\t\t\treturn [\n\t\t\t\t\t'activity' => 'required'\n\t\t\t\t];\n\t\t\tbreak;\n\t\t\tcase 'certificate':\n\t\t\t\treturn [\n\t\t\t\t\t'certificate' => 'required'\n\t\t\t\t];\n\t\t\tbreak;\n\t\t\tcase 'profile':\n\t\t\t\treturn [\n\t\t\t\t\t'uname' => 'required',\n\t\t\t\t\t'designation' => 'required',\n\t\t\t\t\t'dept' => 'required',\n\t\t\t\t\t'manager' => 'required',\n\t\t\t\t\t'about' => 'required',\n\t\t\t\t\t'aspirations' => 'required',\n\t\t\t\t\t'availability' => 'required'\n\t\t\t\t];\n\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\treturn [\n\t\t\t\t\t'focus' => 'required'\n\t\t\t\t];\n\t\t\tbreak;\n\t\t\tcase '1':\n\t\t\t\treturn [\n\t\t\t\t\t'skills' => 'required'\n\t\t\t\t];\n\t\t\tbreak;\n\t\t}\n \n }", "title": "" }, { "docid": "2fa13c036188d84174cd4b0f83627007", "score": "0.74147975", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'email|nullable|max:60',\n 'phone' => 'required|numeric',\n 'state' => 'required|max:120',\n 'city' => 'required|max:120',\n 'address' => 'required|max:120',\n 'is_default' => 'integer|min:0|max:1',\n ];\n\n if (count(EcommerceHelper::getAvailableCountries()) > 1) {\n $rules['country'] = 'required|' . Rule::in(array_keys(EcommerceHelper::getAvailableCountries()));\n } else {\n $this->merge(['country' => Arr::first(array_keys(EcommerceHelper::getAvailableCountries()))]);\n }\n\n if (EcommerceHelper::isZipCodeEnabled()) {\n $rules['zip_code'] = 'required|max:20';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "1f0d6361414449190d69ef7c93e3cb6b", "score": "0.7411059", "text": "public function fetchRequestRules()\n {\n if (($this->mainRequest->all())) {\n return array_intersect_key($this->rules, $this->mainRequest->all());\n }\n\n return;\n }", "title": "" }, { "docid": "2c1d5be8682acc033bd2f55d9229bbaf", "score": "0.7407172", "text": "public function rules()\n {\n Validator::extendImplicit(\n 'diff',\n function ($attribute, $value, $parameters, $validator) {\n return false;\n }\n );\n\n $req = $this;\n $this->reporting_organization_info = $req->get('reporting_organization_info')[0];\n $rules = [];\n foreach ($this->reporting_organization_info as $key => $val) {\n $rules[\"reporting_organization_info.0.$key\"] = 'required';\n $rules[\"reporting_organization_info.0.narrative\"] = \"unique_lang|unique_default_lang\";\n }\n $rules[\"reporting_organization_info.0.narrative.0.narrative\"] = 'required';\n $rules[\"default_field_values.0.linked_data_uri\"] = 'url';\n $rules[\"default_field_values.0.default_currency\"] = 'required';\n $rules[\"default_field_values.0.default_language\"] = 'required';\n $rules[\"default_field_values.0.default_hierarchy\"] = 'numeric';\n\n $rules = array_merge($rules, $this->getRulesForReportingOrganization($this->reporting_organization_info));\n\n return $rules;\n }", "title": "" }, { "docid": "d2931c3ecef4f6c75afd3efdef8a4cbf", "score": "0.740513", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required'\n ];\n\n if($this->get('price')) {\n $rules['minimun_time'] = 'required';\n $rules['price'] = 'required';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "80e6d3fea2e201b6403bb02ee24dd1ad", "score": "0.7404257", "text": "public function getValidationRules()\n {\n $validationRules = [\n\n [\n 'field' => 'nama_barang',\n 'label' => 'Nama Barang',\n 'rules' => 'trim|required|min_length[3]|max_length[100]|alpha|callback_nama_barang_unik'\n ],\n [\n 'field' => 'harga_beli',\n 'label' => 'Harga Beli',\n 'rules' => 'trim|required|numeric|greater_than[0]|max_length[20]'\n ],\n [\n 'field' => 'harga_jual',\n 'label' => 'Harga Jual',\n 'rules' => 'trim|required|numeric|greater_than[0]|max_length[20]'\n ],\n [\n 'field' => 'stok',\n 'label' => 'Stok',\n 'rules' => 'trim|required|numeric|greater_than[0]|max_length[20]'\n ],\n ];\n\n return $validationRules;\n }", "title": "" }, { "docid": "7d2132da6f56f8c37d578cb0e924482a", "score": "0.74030125", "text": "public function rules()\n {\n if ($this->provider == 'mailgun')\n return $this->mailgunRules();\n elseif ($this->provider == 'amazon_ses')\n return $this->amazonSesRules();\n else\n return [ 'provider' => 'required' ];\n }", "title": "" }, { "docid": "19c375846ce65d32d9930ff2c8226c63", "score": "0.73984903", "text": "public function getRules()\n\t{\n\t\t$rules['warehouse_id']\t\t= ['required', 'integer', 'exists:'. app()->make(Warehouse::class)->getTable() . ',id'];\n\t\t$rules['ref_id']\t\t\t= ['required', 'integer'];\n\t\t$rules['ref_type']\t\t\t= ['required', 'string'];\n\t\t$rules['product_id']\t\t= ['required', 'integer', 'exists:'. app()->make(Product::class)->getTable() . ',id'];\n\t\t$rules['qty'] \t= ['required', 'numeric'];\n\t\t$rules['date'] \t\t= ['required', 'date'];\n\t\t$rules['sku'] \t= ['required', 'string'];\n\t\t$rules['expired_at'] = ['nullable', 'date'];\n\t\t\n\t\treturn $rules;\n\t}", "title": "" }, { "docid": "869d12763e9ea84d01e52be3dc9aa3af", "score": "0.7396214", "text": "public function rules()\n {\n if( $this->isMethod('POST') ){\n return $this->createRules();\n }elseif( $this->isMethod('PUT') ){\n return $this->updateRules();\n }\n }", "title": "" }, { "docid": "e7b0626ebdc93b01844cb7ffcf7dfcf0", "score": "0.7394749", "text": "public function rules(): array\n {\n return $this->rules;\n }", "title": "" }, { "docid": "e7b0626ebdc93b01844cb7ffcf7dfcf0", "score": "0.7394749", "text": "public function rules(): array\n {\n return $this->rules;\n }", "title": "" }, { "docid": "18df03047090c2bab575a819b773ebd4", "score": "0.7393658", "text": "public function rules()\n {\n $rules = [\n 'first_name' => 'required|min:2|max:20',\n 'last_name' => 'required|min:2|max:20',\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n ];\n\n if($this->method() == 'PUT') {\n $rules['email'] = 'required|email|unique:users,email,' . $this->user->_id . ',_id';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "a3ce367026754a804a3bf44044d81a5c", "score": "0.7386263", "text": "public function rules()\n {\n if ($this->method() == 'POST'){\n return [\n 'vcc_id' => 'required',\n 'group_id' => 'required',\n 'ip' => 'required',\n 'opt_platform' => 'required',\n 'action_url' => 'required',\n 'land_page' => 'required',\n 'land_page_title' => 'required',\n ];\n }else{\n return [\n\n ];\n }\n }", "title": "" }, { "docid": "180fbd82972aa5d40e96513fb73805a6", "score": "0.73843056", "text": "public function rules()\n {\n if($this->isMethod('post')){\n\n return $this->createRules();\n\n }elseif($this->isMethod('put')){\n\n return $this->updateRules();\n\n }\n }", "title": "" }, { "docid": "6173d86a7390441863b4c44bde5d7085", "score": "0.73832786", "text": "public function rules()\n {\n $request = $this->instance()->all();\n $rules = [\n 'format' => 'required',\n 'assign' => 'required'\n ];\n $files = $request['files'];\n $files_rules = 'required';\n if (count($files) > 0) {\n foreach ($files as $key => $file) {\n $rules['files.'.$key] = $files_rules;\n }\n }\n return $rules;\n\n }", "title": "" }, { "docid": "91ef45d95e094aee32f5ce9b170955bd", "score": "0.73805153", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'PUT':\n case 'PATCH':\n case 'POST': {\n $rules = [\n 'contract.number' => 'sometimes|nullable|string|max:255',\n 'contract.service_contragent_id' => 'sometimes|nullable|exists:contragents,id',\n 'contract.esb_contragent_id' => 'sometimes|nullable|exists:contragents,id',\n 'contract.date' => 'required|date_format:\"d.m.Y\"',\n ];\n\n return $rules;\n }\n default:\n return [];\n }\n }", "title": "" }, { "docid": "6ef534462dc563e5df62ba3fa034d946", "score": "0.7378954", "text": "protected static function buildValidationRules()\n {\n if ( static::$_validationRules === null )\n {\n $all_rules = static::$validationRules;\n foreach ( $all_rules as $field => $rules )\n {\n // Process string rules (e.g. int|min:5)\n if ( is_string($rules) )\n {\n $all_rules[$field] = static::processStringRules($rules);\n }\n // For arrays, make sure the keys are the rules.\n elseif ( is_array($rules) )\n {\n $all_rules[$field] = static::processArrayRules($rules);\n }\n }\n static::$_validationRules = $all_rules;\n }\n return static::$_validationRules;\n }", "title": "" }, { "docid": "d8ad3e1309290526e72851092c08103c", "score": "0.737579", "text": "public function rules()\n {\n if($this->is('api/todo/*'))\n $rules = [\n 'content' => 'required|string|min:3',\n 'todo_id' => 'required|integer|min:1',\n 'priority' => 'integer'\n ];\n else\n $rules = [\n 'content' => 'string|min:3',\n 'todo_id' => 'integer|min:1',\n 'priority' => 'integer'\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "bff72c83bad3c31eb9d7273af8b81dfd", "score": "0.737029", "text": "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'store':\n return [\n 'admin_name' => 'required|exists:admins,name',\n 'on_duty' => 'nullable|boolean',\n 'status' => 'nullable|boolean',\n 'sort' => 'nullable|integer|min:0',\n 'start_worked_at' => 'date_format:\"H:i:s\"',\n 'end_worked_at' => 'date_format:\"H:i:s\"',\n ];\n break;\n\n case 'update':\n return [\n 'id' => 'nullable|exists:crm_bo_admins,id',\n 'status' => 'nullable|boolean',\n 'on_duty' => 'nullable|boolean',\n 'sort' => 'nullable|integer|min:0',\n 'end_worked_at' => 'nullable|date_format:\"H:i:s\"',\n 'start_worked_at' => 'nullable|date_format:\"H:i:s\"',\n ];\n break;\n case 'index':\n case 'destroy':\n case 'show':\n case 'audit':\n return [];\n break;\n }\n\n return [];\n }", "title": "" }, { "docid": "899b83b112da19b76079d1d80c15c04c", "score": "0.7362905", "text": "public function rules()\n {\n $rules = [];\n\n if($this->exists('search')) {\n $rules['search'] = 'required|min:2|max:20|string|regex:/(^[A-Za-z]+$)+/';\n }\n if($this->exists('kicking_foot')) {\n $rules['kicking_foot'] = 'required|in:right,left';\n }\n if($this->exists('max_transfer_cost')) {\n $rules['max_transfer_cost'] = ['required','numeric','regex:/^(?=.+)(?:[1-9]\\d*|0)?(?:\\.\\d+)?$/'];\n }\n if($this->exists('min_transfer_cost')) {\n $rules['min_transfer_cost'] = ['required','numeric','regex:/^(?=.+)(?:[1-9]\\d*|0)?(?:\\.\\d+)?$/'];\n }\n return $rules;\n }", "title": "" }, { "docid": "ff86fec2ae2d228a6a4bc8b4b8d2d96b", "score": "0.73624116", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'title' => 'required|max:191',\n ];\n break;\n case 'PUT':\n return [\n 'title' => 'required|max:191',\n ];\n break;\n }\n }", "title": "" }, { "docid": "1ef9a232a0c61aa0bcf084ab70831a46", "score": "0.735712", "text": "public function rules()\n {\n $rules = [];\n if (!$this->route('referrer_type')) {\n // is custom\n $rules['name'] = 'required';\n $rules['domain'] = 'required';\n $rules['background_color'] = 'required';\n $rules['text_color'] = 'required';\n }\n $rules['header'] = 'required';\n\n return $rules;\n }", "title": "" }, { "docid": "b1b4b8813699d0a65f916d02f72aafe3", "score": "0.73539704", "text": "public function rules()\n {\n $rules = array();\n\n switch ($this->method()) {\n case 'POST':\n {\n $rules['name'] = 'required|max:255';\n $rules['email'] = 'required|unique:tbladmins';\n $rules['password'] = 'required|confirmed';\n $rules['password_confirmation'] = 'required';\n $rules['file'] = 'required|image|mimes:png,jpg,jpeg,gif,svg|max:2048';\n }\n case 'PUT':\n case 'PATCH':\n {\n $rules['name'] = 'required|max:255';\n $rules['email'] = 'required|unique:tbladmins,email,'.Request::segment(3);\n $rules['file'] = 'image|mimes:png,jpg,jpeg,gif,svg|max:2048';\n }\n }\n return $rules;\n }", "title": "" }, { "docid": "91ed1e7530aad465f0fb549644726522", "score": "0.7352545", "text": "public function rules()\n {\n $rules = [\n 'region_id' => 'required_without:district_id',\n 'district_id' => 'required_without:region_id',\n 'delivery_fee' => 'required',\n ];\n\n if (request()->get('branch_type') == BranchTypes::RETAILER) {\n $rules[\"delivery_sla\"] = \"required\";\n }\n\n return $rules;\n }", "title": "" }, { "docid": "490c5ebf62753f635a6a6bd840b15654", "score": "0.73434263", "text": "public function rules()\n {\n switch ($this->routeName) {\n case 'admin.roles.store':\n return [\n 'name' => 'required|min:2|max:45',\n 'key' => 'required|max:16',\n 'description' => 'required|max:255',\n 'permissions' => 'required',\n ];\n break;\n case 'admin.roles.update':\n return [\n 'name' => 'required|min:2|max:45',\n 'description' => 'required|max:255',\n 'permissions' => 'required',\n ];\n break;\n }\n }", "title": "" }, { "docid": "f6d45a2a26a857b1c93b9915d2e93e0a", "score": "0.73426795", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST': {\n return [\n 'entity' => '',\n 'entity_id' => '',\n 'title' => 'required|string|max:250',\n 'body' => 'required|string|max:5000',\n ];\n }\n case 'PUT': {\n return [\n 'entity' => '',\n 'entity_id' => '',\n 'title' => 'required|string|max:250',\n 'body' => 'required|string|max:5000',\n ];\n }\n }\n\n return [];\n }", "title": "" }, { "docid": "9bb8128690c6170948ad7d863ebd7d68", "score": "0.7337297", "text": "public function rules()\n {\n $rules = [];\n switch($this->method())\n {\n case 'POST':\n {\n $rules = [\n 'published_at' => 'required|date',\n 'answers' => 'required|array',\n 'answers.*.question_id' => 'required|string|max:255',\n 'answers.*.answer' => 'required|min:1|max:255',\n 'answers.*.answer.*' => 'required|max:255|min:1',\n ];\n break;\n }\n case 'PUT':\n case 'PATCH':\n {\n $rules = [\n 'published_at' => 'required|date',\n 'answers' => 'required|array',\n 'answers.*.id' => 'required|string|min:1|max:255',\n 'answers.*.answer' => 'required|min:1|max:255',\n 'answers.*.answer.*' => 'required|max:255|min:1',\n ];\n break;\n }\n default: break;\n }\n \n return $rules; \n }", "title": "" }, { "docid": "2a5def87632dddc2bb617ae82ff88d4e", "score": "0.7331084", "text": "public function rules()\n {\n $actionMethod = Request::route()->getActionMethod();\n $rule = [];\n if ($actionMethod == 'store') {\n $rule = [\n 'postId' => 'required|exists:posts,id',\n 'content' => 'required',\n ];\n }\n\n if ($actionMethod == 'update') {\n $rule = [\n 'content' => 'required',\n ];\n }\n return $rule;\n }", "title": "" }, { "docid": "3c873c8d149aed22ae6ef2077619885a", "score": "0.7319677", "text": "public function rules()\n {\n return $this->_rules === null ? [] : $this->_rules;\n }", "title": "" }, { "docid": "a1ae1beb494416000c0c2393b4686ce0", "score": "0.73176163", "text": "public function rules()\n {\n return $this->calculateRule([\n 'id' => 'nullable|integer',\n 'action' => 'required|string',\n 'description' => 'required|string',\n 'user' => 'nullable|string',\n 'admin_id' => 'nullable|integer',\n 'data' => 'nullable|JSON',\n 'filter' => 'array',\n 'orderBy' => 'array',\n 'page' => 'integer',\n 'rowPerPage' => 'integer'\n ]);\n }", "title": "" }, { "docid": "d48afcf44c3426660fa1457c25f5453e", "score": "0.73157114", "text": "public function rules()\n {\n $rules = [\n 'start_station_id' => 'required',\n 'destination_station_id' => 'required',\n 'start_time' => 'required',\n 'destination_time' => 'required',\n 'phone' => 'numeric|nullable',\n 'number_preset_date' => 'required|numeric',\n 'status' => 'required',\n ];\n\n if ($this->method() == 'POST') {\n $rules['company_id'] = 'required';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "51c98012f217651b3b7014688a314ee8", "score": "0.7299434", "text": "public function rules()\n {\n $rules = array (\n 'title' => 'required',\n 'intro' => 'required',\n 'active' => 'boolean',\n 'image' => 'required|image:jpeg,jpg,png|max:5120'\n );\n\n if($this->getRequestUri() == \"/admin/homepage/website/sample/store\"){\n // Special Rule for New Sample Website Post Request\n $rules['image'] = 'required|mimes:jpeg,bmp,png,jpg';\n }\n else{\n // Special Rule for Edit Request\n $rules['image'] = 'mimes:jpeg,bmp,png,jpg';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "e68fb3c9f9b25eb1e8a1ceb172541433", "score": "0.7293911", "text": "protected function getRules()\n {\n $rules = parent::getRules();\n if($this->data['enquiryType'] == 'Product complaint') {\n\n foreach($this->additionalReqs as $name) {\n $rules[$name] = array('required');\n }\n }\n\n return $rules;\n }", "title": "" }, { "docid": "5976505195e7a9fd037f3b7e0bd05635", "score": "0.7292476", "text": "public function rules()\n {\n $rules = [\n 'date' => 'required',\n 'network_id' => 'required',\n 'quantity' => 'required',\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "e9b906baf8b5057123ea5029d9120159", "score": "0.72875124", "text": "public function rules()\n {\n $rules = [\n 'full_name' => ['required', 'max:100'],\n 'cpf' => ['required', 'size:14'],\n 'email' => ['required', 'max:100', 'email'],\n 'phone' => ['required', 'size:15'],\n 'address' => ['required', 'max:255'],\n 'number' => ['required', 'max:20'],\n 'neighborhood' => ['required', 'max:50'],\n 'city' => ['required', 'max:50'],\n 'state' => ['required', 'size:2'],\n 'zip_code' => ['required', new ValidateZipCode($this->service)],\n 'photo' => ['image'],\n ];\n\n if ($this->isMethod('post')) {\n $rules['photo'] = ['required', 'image'];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "d789f84bfb98aa994998bae293bf2665", "score": "0.7286307", "text": "public function rules() {\n $rules = [\n 'name' => 'required',\n 'user_id' => 'required',\n 'location' => 'required',\n 'category' => 'required',\n ];\n return $rules;\n }", "title": "" }, { "docid": "c673c44d89d164d6a522ec09502c3baf", "score": "0.72805506", "text": "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'inviteTeacher':\n return [\n 'school_id' => ['required', 'integer', function ($attribute, $value, $fail) {\n $where = [\n ['teacher_id', Auth::id()],\n ];\n if (!School::query()->where($where)->where('status', true)->find($this->get('school_id'))) {\n return $fail('该学校不存在 或 未通过审核');\n }\n if (!SchoolTeacher::query()->where($where)->where('is_admin', true)->exists()) {\n return $fail('非管理员无权限邀请他人');\n }\n }],\n 'email' => ['required', 'email']\n ];\n case 'store':\n return [\n 'name' => ['required'],\n 'cover' => ['required']\n ];\n }\n }", "title": "" }, { "docid": "9d1c6a1288e2b0a7a02e88b17e7063f6", "score": "0.72795224", "text": "public function rules()\n {\n if ($this->method() == 'POST'){\n return [\n 'total' => 'required|integer|min:1',\n 'expires_at' => 'nullable|date|after_or_equal:today'\n ];\n }\n\n\n if ($this->method() == 'PUT'){\n $invitation = $this->route('link_invitation');\n return [\n 'total' => 'required|integer|min:' .$invitation->remaining,\n 'expires_at' => 'nullable|date|after_or_equal:today'\n ];\n }\n\n }", "title": "" }, { "docid": "c8d5a5a341d6544c268d466816ea2a8b", "score": "0.7272507", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n case 'POST':\n return [\n 'nombre' => 'required|max:255',\n 'apellidos' => 'required|max:255',\n 'telefono' => 'required|max:9|regex:/^[0-9]+$/',\n 'doctype_id' => 'required',\n 'numdoc' => 'required|max:9|regex:/^[0-9a-zA-Z]+$/',\n 'membertype_id' => 'required',\n 'paymenttype_id' => 'required',\n 'email' => 'required|email|unique:users,email',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'nombre' => 'required|max:255',\n 'apellidos' => 'required|max:255',\n 'telefono' => 'required|max:9|regex:/^[0-9]+$/',\n 'doctype_id' => 'required',\n 'numdoc' => 'required|max:9|regex:/^[0-9a-zA-Z]+$/',\n 'membertype_id' => 'required',\n 'paymenttype_id' => 'required',\n ];\n default:\n break;\n }\n\n return [];\n }", "title": "" }, { "docid": "e9bcdc13ac45f0c6ba9ed59d680a6ab7", "score": "0.72703326", "text": "public function rules(): array\n {\n return $this->getRules();\n }", "title": "" }, { "docid": "51a8c3d87011b069d54ebc4f4ef312c8", "score": "0.7264483", "text": "public function rules()\n {\n \\Log::info('rules()');\n return [\n 'test' => 'required',\n ];\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "16b636ac58bb4031bcdfbdaa37545f05", "score": "0.0", "text": "public function show(Visitor $visitor)\n {\n return view('visitors.show', compact('visitor'));\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e273034885bffd94845673642335bb27", "score": "0.7371966", "text": "public function show(Resource $resource)\n {\n try {\n return $this->respondWithSuccess('Resource Loaded.', ['resource' => new ResourceResource($resource)]);\n } catch (Exception $e) {\n return $this->respondWithError($e->getMessage());\n }\n }", "title": "" }, { "docid": "11c1101c510d050789a63b228d82f91d", "score": "0.69214535", "text": "public function show(Resource $resource)\n {\n return view('resource.show', ['resource' => $resource]);\n }", "title": "" }, { "docid": "69e7043fb313b27715d4fd190fa0a47b", "score": "0.66724765", "text": "public function show(Resource $resource)\n {\n //\n $this->authorize('view', $resource);\n $pages= Page::all();\n return view('resource.show', compact('resource','pages'));\n }", "title": "" }, { "docid": "9b8d2c73bfa22d48146bec75330e17c2", "score": "0.6625154", "text": "public function showResource($id) {\n $resource = Resource::find($id);\n return view('update_resource', ['resource' => $resource]);\n }", "title": "" }, { "docid": "e72d7ee458278f6123e38cb93b88d1de", "score": "0.65666723", "text": "public function preview(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b6006c75ae679ecef360bdf7fe8a47c4", "score": "0.6452477", "text": "public function showButton()\n {\n $present = $this;\n $entity = $present->entity;\n\n if ($this->getShowUrl()) {\n if (method_exists($this, 'canShow') && !$this->canShow()) {\n return null;\n }\n\n return new HtmlString(\n view(\n 'Presenters::resource.show',\n compact('present', 'entity')\n )->render()\n );\n }\n }", "title": "" }, { "docid": "498e076230fe8f4d7404c0ed69d0193e", "score": "0.63486195", "text": "public function view($id){\n $resource = Resources::where('id', $id)->firstOrFail();\n\n return view('members.resources.resourceView', compact('resource'));\n }", "title": "" }, { "docid": "c61b289805e21ce014f2ebabb95fa293", "score": "0.6227368", "text": "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('AppBundle:ressource:show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "9140feb756393a883fcf6e2f605e8f9a", "score": "0.62140113", "text": "public function show($id)\n {\n $fields = $this->parseFields();\n $data = $this->getResource($id, $fields);\n if ($this->title) {\n $data['title'] = $this->title;\n }\n return self::getResponse()->setResType('view')\n ->setHeader(DefaultController::$defaultViewHeaders)\n ->setView($this->viewShow)\n ->setData($data)\n ->send();\n }", "title": "" }, { "docid": "08eb337d640dd82312a21b6c247ae6c3", "score": "0.62135386", "text": "function detail($resource_id)\n\t{\n\t\t$data['title'] = 'Resource DB: record detail';\n $data['heading'] = 'Resource DB: record detail';\n\t\t$data['query'] = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\t\t$this->load->view('resourcedb/recordview', $data);\n\t}", "title": "" }, { "docid": "0e77dafbf9425d4df343ecf92a60e68b", "score": "0.60997695", "text": "function display() {\n // Disable main template\n JRequest::setVar('tmpl', 'component');\n\n $user = JFactory::getUser();\n if ($user->guest) {\n echo JText::_('NOT_ALLOWED');\n jexit();\n } else {\n $uri = parse_url(JRequest::getUri());\n $info = pathinfo($uri['path']);\n\n $filepath = JPATH_BASE.$info['dirname'].DS.$info['basename'];\n if (!file_exists($filepath)) {\n echo JText::_('RESOURCE_DOES_NOT_EXIST');\n jexit();\n }\n if (is_readable($filepath)\n && is_file($filepath)) {\n $this->_writeHeaders($filepath, $info['basename']);\n } else {\n echo JText::_('RESOURCE_IS_NOT_AVAILABLE');\n jexit();\n }\n }\n }", "title": "" }, { "docid": "dc0458824f3a2b628e964bf7c61ad443", "score": "0.60300314", "text": "public function getResourcedetail($id)\n {\n if (Auth::user()->is_admin) {\n $resource = Resource::find($id);\n return view('admin.resourceDetail',compact('resource'));\n } else {\n abort(403, 'Unauthorized action.');\n }\n }", "title": "" }, { "docid": "9924ebe42d891fc52d2d624c42738080", "score": "0.60218257", "text": "public function show($imageResource) {\n\t\theader('Content-type: image/gif');\n\t\theader('Content-disposition: inline');\n\t\timagegif($imageResource, null);\n\t}", "title": "" }, { "docid": "9668df4ac88536ccf4da767d212203b0", "score": "0.6016775", "text": "public function show($id)\n {\n $resource = Resource::findOrFail($id);\n\n return view('resources.show', compact('resource'));\n }", "title": "" }, { "docid": "772b693ecb08ba335d0fc2aa0c534ae6", "score": "0.6006036", "text": "public function getAction()\n {\n $this->view->id = $this->_getParam('id');\n $this->view->resource = new stdClass;\n $this->getResponse()->setHttpResponseCode(200);\n }", "title": "" }, { "docid": "a2d4d54ea0f197ee16be50430b6d0aea", "score": "0.5994898", "text": "function display()\n\t{\n\t\techo $this->get();\n\t\t\n\t}", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "e943948b6a11bc29b2f266d55c7ee5a5", "score": "0.5944242", "text": "public function show() {\n\t\t$this->getImageStrategy()->show($this->getImage());\n\t}", "title": "" }, { "docid": "8172ae2b3e517fb12d98874eaa22fd0b", "score": "0.5922458", "text": "public function show()\n {\n $user = Auth::user();\n $resources_template = Lang::get('common/resources');\n $resources = [];\n\n // Iterate through resource files, and push link type array into resources array.\n if ($user->isUpgradedManager() || $user->isHrAdvisor()) {\n $files = Resource::all();\n foreach ($files as $file) {\n array_push($resources, [\n 'link' => asset(Storage::url($file->file)),\n 'title' => '',\n 'text' => $file->name,\n ]);\n }\n\n // Sort the list alphabetically.\n usort($resources, function ($filenameA, $filenameB) {\n return strcmp($filenameA['text'], $filenameB['text']);\n });\n }\n\n $portal = WhichPortal::isHrPortal() ? 'hr' : 'manager';\n\n return view('common/resources', [\n // Localized strings.\n 'resources_template' => $resources_template,\n 'portal' => $portal,\n // List of resource downloads.\n 'resources' => $resources,\n ]);\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5aa279313a3a2ed339dbfab0f2c848e3", "score": "0.58987516", "text": "public function show(Request $request, $client, $resource)\n\t{\n\t\t$resource = Resource::findBySlug($client, $resource);\n\n\t\tif (!$resource) {\n\t\t\treturn response(view('resources.404'), 404);\n\t\t}\n\n\t\t$this->authorize('view', $resource);\n\n\t\t$request->user()->pushToHistory($resource)->save();\n\n\t\t$resource->load('client', 'tags', 'type');\n\n\t\tif ($resource->hasCorrectlyEncryptedMetadata()) {\n\t\t\ttry {\n\t\t\t\t$resource->metadata = Crypt::decrypt($resource->metadata);\n\t\t\t} catch (DecryptException $e) {\n\t\t\t\tSession::flash('alert-danger', 'There was a problem decrypting this resource\\'s metadata.');\n\t\t\t\tLog::notice('Could not decrypt resource metadata', ['exception' => $e]);\n\t\t\t}\n\t\t} else {\n\t\t\tSession::flash('alert-info', 'This resource\\'s metadata is not encrypted (or is encrypted incorrectly).');\n\t\t}\n\n\t\treturn view('resources.show', ['resource' => $resource]);\n\t}", "title": "" }, { "docid": "00d244ef3a763ccdbae14ec11bf19cd4", "score": "0.5898524", "text": "public function show(int $id)\n {\n if (auth()->user()->user_type_id == 0){\n $model = $this->Resource->GetByID($id);\n if ($model == null) {\n return redirect('/admin/resources')->with(['error' => 'Resources not found!']);\n }\n return view(\"student.cresources.details\")->with(['active'=>'resource', 'subactive'=>'resource', 'model'=>$model]);\n }else{\n $model = $this->Resource->GetByID($id);\n if ($model == null) {\n return redirect('/admin/resources')->with(['error' => 'Resources not found!']);\n }\n return view(\"admin.cresources.details\")->with(['active'=>'resource', 'subactive'=>'resource', 'model'=>$model]);\n }\n }", "title": "" }, { "docid": "488b2f71d703803d51ef92125cfccb32", "score": "0.5866671", "text": "public function display()\n {\n $uri = new SolarLite_Uri();\n $uri->set();\n \n if (!isset($uri->path[0])) {\n $controller = SolarLite_Config::get('default_controller', false);\n if ($controller) {\n $uri->path[0] = $controller;\n } else {\n $uri->path[0] = '';\n }\n }\n \n // pass through router\n $uri->path = $this->route($uri->path);\n \n $class = 'App_Controller_' . ucfirst($uri->path[0]);\n $file = self::classToPath($class, '.php');\n \n if (!file_exists($file) && SolarLite_Config::get('default_controller', false) !== false) {\n $controller = SolarLite_Config::get('default_controller');\n array_unshift($uri->path, $controller);\n $class = 'App_Controller_' . ucfirst($controller);\n $file = self::classToPath($class, '.php');\n if (!file_exists($file)) {\n $class = 'SolarLite_Controller';\n }\n } elseif (!file_exists($file)) {\n $class = 'SolarLite_Controller';\n }\n $class = new $class();\n $class->display($uri);\n }", "title": "" }, { "docid": "7c25d9175a0b8f2be9a3f3b0c4a64c29", "score": "0.5860501", "text": "public function showAction()\r\n\t{\r\n\t\t$this->loadLayout()->renderLayout();\r\n\t}", "title": "" }, { "docid": "96adc772bb49436d8b214bbd7d2c63f8", "score": "0.5829649", "text": "public function resources()\n {\n if($this->input->post('resource_id', false)) {\n $this->auth->restrict('DM_Preparedness.Content.Create');\n $this->addOrEditResourceLink();\n $id = $this->input->post('resource_id');\n\n Template::redirect($this->resourceResourcesUrl.'/'.$id);\n } else {\n $this->auth->restrict('DM_Preparedness.Content.View');\n $id = $this->uri->segment(5);\n $listView = $this->showResourceResourcesList($id);\n\n Template::set('backUrl', $this->homeScreenUrl);\n Template::set('listView', $listView);\n Template::render();\n }\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "6d96f17caa0523cc80db2c2bb885b9c1", "score": "0.57844186", "text": "private function _resource($data, $name)\n {\n $data = get_resource_type($data);\n $this->_renderNode('Resource', $name, $data);\n }", "title": "" }, { "docid": "b3a855f1dce17dcc8d02e34d8071388d", "score": "0.5780657", "text": "public function display()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->_load()->display($this->_data);\n\t\t}\n\t\tcatch(Twig_Error_Loader $e)\n\t\t{\n\t\t\tshow_error($e->getRawMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "765678d75db620af12e826ffe74dec55", "score": "0.57683015", "text": "public function display()\n {\n parent::display();\n }", "title": "" }, { "docid": "24c63cc758a7c6c6fe61053136124e16", "score": "0.57606494", "text": "public function viewAction()\n { \n $this->loadLayout();\n try {\n $id = $this->getRequest()->getParam('id', $this->getRequest()->getParam('id', false));\n \n if($manufacturer = Mage::helper('mybrand/manufacturer')->renderLink($this, $id)) {\n //register current manufacturer\n Mage::register('current_manufacturer', $manufacturer);\n \n }\n } catch(Exception $e) {\n \n }\n \n $this->renderLayout();\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.5756713", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.5756713", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "c856c8e6e792c30d33f8b653e21e8dd3", "score": "0.57502717", "text": "public function display( $object = null ) {\n\t\techo $this->render( $object );\n\t}", "title": "" }, { "docid": "66e03ced3a1ae0b6545066542c4db145", "score": "0.5740594", "text": "public function show($id)\n {\n // NOT CURRENTLY IN USE\n }", "title": "" }, { "docid": "78932871c36f6a29063b014a4f04161e", "score": "0.5735597", "text": "public function show(Supplier $supplier)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "c27b7f061b14b3c5c61c337e63783752", "score": "0.57220376", "text": "public function edit(Resource $resource)\n {\n $tags = convert_tags_to_string($resource);\n\n return view('resource.edit', ['resource' => $resource, 'tags' => $tags]);\n }", "title": "" }, { "docid": "b5e7179ea7c94add1c1af50e9f9b7fdd", "score": "0.57208323", "text": "public function show($id)\n\t{\n\t\n\t}", "title": "" }, { "docid": "b5e7179ea7c94add1c1af50e9f9b7fdd", "score": "0.57208323", "text": "public function show($id)\n\t{\n\t\n\t}", "title": "" }, { "docid": "f66e5d8754a0233237013bb8c45e0377", "score": "0.57202315", "text": "public function show($id)\n\t{\n\t\t//\n\t\t \n\t}", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "f810559c966a6f2c87d7e75698b80a8e", "score": "0.56954175", "text": "public function edit(Resource $resource)\n {\n //\n $this->authorize('update', $resource);\n $pages = Page::all();\n return view('resource.edit', compact('resources','pages'));\n }", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
1da654837ace9be89c2c9f1ddd5c329e
Displays all Clinical Trials for Users
[ { "docid": "8af0e34b8abbd3151cd3a9720e26b3f9", "score": "0.0", "text": "public function indexClinicalApplicationsAjax() {\n $clinicalmanages = ClinicalManage::orderByDesc('id')->get();\n $data = [];\n foreach ($clinicalmanages as $k => $clinicalmanage) {\n $data[$k][] = @$clinicalmanage->user->firstname;\n $data[$k][] = Carbon::parse(@$clinicalmanage->created_at)->format(\"m/d/Y\");\n $data[$k][] = @$clinicalmanage->lab_results;\n if (@$clinicalmanage->status == 1) {\n $clinicalmanage->status = \"Approved\";\n } elseif (@$clinicalmanage->status == 2) {\n $clinicalmanage->status = \"Pending\";\n } elseif (@$clinicalmanage->status == 3) {\n $clinicalmanage->status = \"Declined\";\n } else {\n $clinicalmanage->status = \"Pending\";\n }\n $data[$k][] = @$clinicalmanage->status;\n $data[$k][] = @$clinicalmanage->clinicaltrial->study_title;\n $data[$k][] = '<a href=\"' . route(\"clinicalTrialManage.view-trial\", $clinicalmanage->id) . '\">View</a>';\n }\n $dataArray['data'] = $data;\n print_r(json_encode($dataArray));\n }", "title": "" } ]
[ { "docid": "5d047b14f9823af3c41119ed4320e608", "score": "0.66941476", "text": "public function findtrials() {\n return view('clinicalTrial.find', ['clinicaltrials' => ClinicalTrial::where('status', 1)->orderby('id', 'DESC')->get()]);\n }", "title": "" }, { "docid": "ae66ce21b47393fc79764757d7c3cf61", "score": "0.6478303", "text": "public function index()\n {\n $technicians = Technician::where('isActive',1)->orderBy('lastName')->get();\n $deactivate = Technician::where('isActive',0)->orderBy('lastName')->get();\n return View('technician.index',compact('technicians','deactivate'));\n }", "title": "" }, { "docid": "4d22b4a77ce2c1ea9068c201f6034f0e", "score": "0.63282764", "text": "public function index()\n {\n $user = User::all();\n $knowledge = Tblknowledge::with('child')->get();\n\n return view('users.index', ['knowledges' => $knowledge, 'users' => $user]);\n }", "title": "" }, { "docid": "9011a949ec07bdfce1ad34991a9660ba", "score": "0.6276158", "text": "public function viewtrials($id) {\n return view('clinicalTrial.view', ['clinicaltrials' => ClinicalTrial::find($id), 'profile' => Profile::where('user_id', Auth::user()->id)->first()]);\n }", "title": "" }, { "docid": "729bf8a4b20f314357c643901b3ee81c", "score": "0.6268265", "text": "public function index()\n {\n switch (Auth::user()->rol_id) {\n case 1:\n //Carga de los datos a la sesion\n\n $trainers = Trainer::withTrashed()->get(); \n break;\n case 2:\n $trainers = Trainer::withTrashed()->where('country_id',Auth::user()->country_id)->get();\n break;\n default:\n # code...\n break;\n }\n\n foreach ($trainers as $trainer) {\n //loading author\n $Created_by=$trainer->User;\n $trainer['Created_by']=$Created_by;\n }\n\n return view('trainer.index',compact('trainers'));\n }", "title": "" }, { "docid": "330e7c69deb04625c0f8a68544718e9f", "score": "0.6255808", "text": "public function allUserTutorialAction()\n {\n $allTutorialUserExist = [];\n\n /**\n * all request to database\n */\n $em = $this->getDoctrine()->getManager();\n $allCategories = $em->getRepository('AppBundle:Share_categories')->getAllCategories();\n $allTutorialUser = $this->getUser()->getUsersTutos()->getValues();\n\n /**\n * get all tuto not deleted tuto\n */\n\n for ($i = 0; $i < count($allTutorialUser); $i++) {\n if ($allTutorialUser[$i]->getActiveStu() == '1') {\n array_push($allTutorialUserExist, $allTutorialUser[$i]);\n }\n }\n\n /**\n * pagination for all tutorial of the categories\n */\n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate(\n $allTutorialUserExist,\n $this->get('request')->query->get('page', 1),\n 2\n );\n\n /**\n * rendering view @allCategories @pagination\n */\n return $this->render('Tutorial/tutorial_by_user.html.twig', array('categories' => $allCategories, 'tuto' => $allTutorialUser, 'pagination' => $pagination));\n }", "title": "" }, { "docid": "be803e64dacfab42e4ed23e67ea1ae6e", "score": "0.6236511", "text": "public function index()\n {\n //\n if (TypeUser::find(\\Auth::user()->type_user_id)->TypeName != \"Reception\" and TypeUser::find(\\Auth::user()->type_user_id)->TypeName != \"Administator\") {\n return redirect('main');\n }\n $subjectanalys = SubjectAnalysis::all();\n return view('main.subject_analys.index',compact('subjectanalys'));\n }", "title": "" }, { "docid": "154275aaf9c881b97f6e11f3d4e6e5ba", "score": "0.6213644", "text": "public function index() {\n $portalusers = DB::table('protal_user as portalusers')\n ->select('portalusers.*','clients.name as cname','suppliers.name as sname','portal_role.name as rname')\n ->leftjoin('clients', 'portalusers.client_id', '=', 'clients.id')\n ->leftjoin('suppliers', 'portalusers.supplier_id', '=', 'suppliers.id')\n ->leftjoin('portal_role', 'portalusers.role_id', '=', 'portal_role.id')\n ->orderBy('portalusers.name', 'ASC')\n ->get();\n return view('portaluser.list')->with(compact('portalusers'));\n }", "title": "" }, { "docid": "4fe55efe7cda5f106e85d70fbb2b32a3", "score": "0.612199", "text": "public function index()\n {\n if (auth()->user()) {\n $users = User::join('user_unities', 'users.id', '=', 'user_unities.user')\n ->where('users.role', 'CLIENT')\n ->where('user_unities.unity', auth()->user()->unity[0]['unity'])\n ->select('users.*')\n ->simplePaginate(10);\n\n foreach ($users as $user) {\n $user->cpf = ($user->cpf === null) ? 'Não informado' : $user->cpf;\n $user->phone = ($user->phone === null) ? 'Não informado' : $user->phone;\n $user->cell_phone = ($user->cell_phone === null) ? 'Não informado' : $user->cell_phone;\n $user->address = ($user->addresses()->first()) ? $user->addresses()->first() : [];\n $user->city = ($user->addresses()->first()) ? $user->addresses()->first()->city()->first() : [];\n $user->province = ($user->addresses()->first()) ? $user->addresses()->first()->province()->first() : [];\n $user->additional = ($user->additional()->first()) ? $user->additional()->first() : [];\n $user->pets = ($user->pets()->get()) ? $user->pets()->get() : [];\n $user->petsName = ($user->pets()->get()) ? $this->petsName($user->pets()->get()) : '';\n }\n return $users;\n }\n }", "title": "" }, { "docid": "c8f7b8ab97a8c8f4cd7e4b64b23961fa", "score": "0.6099286", "text": "public function getAllClinics()\r\n {\r\n\t \t$dataArray = array();\r\n $dataArray['title'] = \"All Clinics\";\r\n $getSessionData = AdminHelper::AuthSession();\r\n if($getSessionData !=FALSE){\r\n $clinic = new Admin_Clinic();\r\n $dataArray['resultSet'] = $clinic->GetClinicDetails();\r\n return View::make('admin.manage-clinics',$dataArray);\r\n }else{\r\n return Redirect::to('admin/auth/login');\r\n }\r\n\r\n }", "title": "" }, { "docid": "5d2f317eb4306be4ab2218784a540783", "score": "0.6090095", "text": "public function index()\n {\n $user = Auth::User();\n $roles = $user->getRoleNames();\n $role_name = $roles->implode('', ' ');\n\n if($role_name == 'Nutritionist')\n {\n $intake_subs = Diet::select('intake_substances.client_id','clients.firstname','clients.lastname','users.name')->join('nutritionist_clients','nutritionist_clients.client_id','=','intake_substances.client_id')->join('clients','clients.id','=','intake_substances.client_id')->join('users','users.id','=','nutritionist_clients.nutritionist_id')->where('nutritionist_clients.nutritionist_id', $user->id)->distinct()->get();\n\n }else{\n $intake_subs = Diet::exists();\n\n if ($intake_subs) {\n\n $intake_subs = Diet::select('intake_substances.client_id','clients.firstname','clients.lastname','users.name')->join('clients','clients.id','=','intake_substances.client_id')->join('nutritionist_clients','nutritionist_clients.client_id','=','intake_substances.client_id')->join('users','users.id','=','nutritionist_clients.nutritionist_id')->distinct()->get();\n }\n }\n\n // echo \"<pre>\";print_r($intake_subs->toArray());\"</pre>\";exit;\n\n return view('backend.admin.intake-substances.index',compact('intake_subs'))->with('no', 1);\n }", "title": "" }, { "docid": "eafbe45551ff29e6b4068eb0d12b26bc", "score": "0.6082512", "text": "public function index()\n {\n $user_id = auth()->user()->id;\n $user = User::find($user_id);\n return view('trainings.index')->with('trainings', $user->trainings);\n }", "title": "" }, { "docid": "f0e41c7f54a6e0d8c987f35abfa3822b", "score": "0.6076201", "text": "public static function index(){\n\t\t$kayttajat = User::all();\n\t\tView::make('kayttaja/kayttajalista.html', array('kayttajat' => $kayttajat));\n\t}", "title": "" }, { "docid": "38e46edfb0caa62f76c06b0d65df583f", "score": "0.60683835", "text": "public function index()\n {\n $students = User::where('role_id',3)->with('teacher_subjects')->get();\n return view('TeacherStudents.index')->with('students', $students);\n }", "title": "" }, { "docid": "49a1cdadfb8968ff10a056ad1ee3a71b", "score": "0.604142", "text": "public function index()\n {\n $id = Auth::user()->id;\n $trips = new TripDatatable($id);\n return $trips->render('user.trips.index');\n }", "title": "" }, { "docid": "35d9dcb101b9797531f058b286acbda8", "score": "0.6041126", "text": "public function classTeachers()\n {\n $academic_years = AcademicYear::pluck('academic_year', 'academic_year_id')\n ->prepend('- Select Academic Year -', '');\n $classlevels = ClassLevel::pluck('classlevel', 'classlevel_id')\n ->prepend('- Select Class Level -', '');\n $tutors = User::where('user_type_id', User::STAFF)\n ->where('status', 1)\n ->orderBy('first_name')\n ->get();\n\n return view('admin.master-records.classes.class-rooms.class-teacher',\n compact('academic_years', 'classlevels', 'tutors')\n );\n }", "title": "" }, { "docid": "9eb6c88a84914cc6f375037a551e5279", "score": "0.60373217", "text": "public function actionIndex()\n {\n $user = User::find()/*->with('higherEducation', 'middleEducation', 'profile')*/\n ->where(['id' => \\Yii::$app->user->id])->one();\n\t\t\n return $this->render('index', [\n 'user' => $user,\n 'educations' => $user->currentEducations\n ]);\n }", "title": "" }, { "docid": "102ffe09668cd092c1792ff68cfe2eb4", "score": "0.6037166", "text": "public function index()\n {\n // get courses\n $offset = SCMUtility::cleanText( SCMUtility::issetOrAssign($_GET['offset'],0) );\n $limit = SCMUtility::cleanText( SCMUtility::issetOrAssign($_GET['limit'],15) );\n\n $data = User::with('courses')->skip($offset)->take($limit)->orderBy('created_at','DESC')->get();\n $data = $data->toArray();\n\n View::make('templates/admin/students-all.php',compact('data'));\n }", "title": "" }, { "docid": "67feda7f5b7fd5b89e2fd11be2d2dcb0", "score": "0.60181683", "text": "private function show_all(){\n\t\t$users =$this->model->get_all();\n\t\t$section = file_get_contents('Views/User/show_all.html');;\n\t\t$info = \"\";\n\t\tif($users)\n\t\t\tforeach ($users as $user) {\n\t\t\t\t$info .= \"<tr>\n\t\t\t \t\t<td> $user[user_name]</td>\n\t\t\t \t\t<td> $user[user_email] </td>\n\t\t\t \t\t<td> $user[rol] </td>\n\t\t\t \t\t<td>\n\t\t\t \t\t\t<a href='index.php?ctrl=user&act=details&id=$user[id_user]'><i class='icon-view'></i></a>\n\t\t\t \t\t\t<a href='index.php?ctrl=user&act=edit&id=$user[id_user]'><i class='icon-edit'></i></a>\n\t\t\t\t\t\t\t\t<a href='index.php?ctrl=user&act=delete&id=$user[id_user]'><i class='icon-remove'></i></a>\n\t\t\t\t\t\t\t</td>\n\t\t \t\t\t</tr>\";\n\t\t }\n\n\t $dicc = array('{info}' => $info);\n\t $section = strtr($section, $dicc);\n\n\t\t$this->template($section);\n\t}", "title": "" }, { "docid": "aebb4c16ff67ce7ad2b4d25b0c12c008", "score": "0.5996586", "text": "public function index()\n {\n $data=frontuser::all();\n \n /* $data = DB::table('frontusers') \n ->leftJoin('tbl_transactions', 'frontusers.id', '=', 'tbl_transactions.user_id') \n ->orderBy('frontusers.id', 'desc')\n ->distinct()\n ->get(); */\n \n \n\t\treturn view('admin.customers_list', ['dt' => $data]);\n }", "title": "" }, { "docid": "992c947af8801753ff1cd3033aec6010", "score": "0.59939444", "text": "public function index()\n {\n $users = User::all();\n\n $names = User::pluck('sur_name', 'name', 'last_name')->all();\n $patients=implode(' ',$names);\n\n return view('admin.users.index', compact('patients','users'));\n }", "title": "" }, { "docid": "b98c6c5ff44c858859de7cbca1281fe0", "score": "0.5986289", "text": "public function index(){ \n /************************** LA LISTA DE TRABAJADORES **************************/\n $trabajadores = array();\n $trabajadores = User::where('rol','!=', 'administrador')->lists('name');\n /**********************************************************************************/\n return view('calendario')->with('trabajadores',$trabajadores);\n }", "title": "" }, { "docid": "1bebaa962480d581d79ca28ebfb8d8c6", "score": "0.59721684", "text": "public function reviewindex()\n {\n\n if (!Gate::allows('live_class_access') && !auth()->user()->hasRole('administrator') ) {\n return abort(401);\n }\n\n\n if (request('show_deleted') == 1) {\n if (!Gate::allows('live_class_access') && !auth()->user()->hasRole('administrator') ) {\n return abort(401);\n }\n $courses = LiveClasses::onlyTrashed()->ofTeacher()->get();\n } else {\n $courses = LiveClasses::ofTeacher()->get();\n }\n\n \n\n return view('backend.live.reviewindex', compact('courses'));\n }", "title": "" }, { "docid": "01466eb6c1603a021ffc5e2c8453af9c", "score": "0.5958064", "text": "public function index()\n\t{\n\t\t$this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');\n\n\t\t$this->data['user_menu'] = $this->cms_model->get_user_menu($this->uri->rsegment(1));\n\t\t$this->data['user'] = $this->ion_auth->user()->row();\n\n\t\t$this->_render_page('tugas', $this->data);\n\t}", "title": "" }, { "docid": "e6fadad53be1c19decb96dfd79335148", "score": "0.5956399", "text": "public function index()\n {\n $users = User::all();\n $levels = Level::all();\n $trashed = User::onlyTrashed()->get();\n $no = 1;\n\n return view('backend.admin.user.index', compact('users','levels','no','trashed'));\n }", "title": "" }, { "docid": "cd2bc0fb94b19c398aa3bbc36c2e9f92", "score": "0.5954862", "text": "public function index()\n {\n $cda_tratret = DB::table('cda_tratret')->get();\n\n return view('admin.canal.tratret.index',compact('cda_tratret'));\n }", "title": "" }, { "docid": "fa4e7092eb3c376e86fd190e776e051b", "score": "0.5945476", "text": "public function termDtls()\n\t{\t\n\t\t$username=$this->session->userdata('username');\n\t\t$data['rec']=$this->Globalmodel->getdata_by_field_join('users','levelid','user_level','id','Username',$username);\t\t\t\t\n\t\t$data['setup']=$this->Globalmodel->getdata('setup');\t\t\n\t\t$data['class']=$this->Globalmodel->getdata('class');\t\t\t\t\n\t\t$this->load->view('header',$data);\n\t\t$this->load->view('setup/termdtls',$data);\n\t\t$this->load->view('setup/footer');\t\n\t}", "title": "" }, { "docid": "64b8a843c25da41ac05d3447e865cb3d", "score": "0.5942987", "text": "public function index()\n {\n $antiques = $this->antique->whereClientId(Auth::user()->client_id)->get();\n\n return view('humanresources.antiques.index', compact('antiques'));\n }", "title": "" }, { "docid": "b826b067785b9310579fa9f3e8cfea98", "score": "0.593472", "text": "public function index()\n {\n $users = User::where('role', 'trainee')->orderBy('name', 'asc')->get();\n return view('users/admin/trainee-view')->with('trainees', $users);\n }", "title": "" }, { "docid": "211c3cff37dcf56d349ab3bf9fc30377", "score": "0.5931467", "text": "public function showTrial($id) {\n return view('clinicalTrialManage.view-trials', ['clinicalmanages' => ClinicalManage::find($id), 'profile' => Profile::where('user_id', Auth::user()->id)->first()]);\n }", "title": "" }, { "docid": "05d1438106e80d45fa4baacb70e7ea17", "score": "0.59226936", "text": "public function index()\n {\n\n $especialista = User::where('type', 'Especialista')->get(['first_name', 'last_name', 'id']);\n $paciente = User::where('type', '!=', 'Especialista')->get(['first_name', 'last_name', 'id', 'run']);\n $id = Auth::user()->id;\n $espe = User::where('id', $id)->get();\n\n return view('admin.citas.cita', compact('especialista', 'paciente', 'espe'));\n }", "title": "" }, { "docid": "ec1179dac409bc40472546547b5bc890", "score": "0.59171987", "text": "public function user_all() {\n\t\t$data['akses'] = $this->M_user->data_akses();\n\t\t$data['title'] = 'Data User';\n\t\t$data['view'] = 'dataUser';\n\t\t$this->load->view('header_admin',$data);\n\t}", "title": "" }, { "docid": "556a5dc711635d905d5d593efbaf420e", "score": "0.5915997", "text": "public function index()\n {\n $Year = year_term_setup::where('year_term_setups.SchoolCode',auth()->user()->SchoolCode)->get();\n\n $Term = year_term_setup::where('year_term_setups.SchoolCode',auth()->user()->SchoolCode)->leftjoin('terms','year_term_setups.TermID','=','terms.TermID')->get();\n //dd($Term);\n $getTerm = $Term[0]->TermName;\n\n $getYear = $Year[0]->Year;\n\n $rows = teacher::where('SchoolCode',auth()->user()->SchoolCode)->paginate(15);\n return view('Setupteachers.list',compact('rows','getYear','getTerm'));\n }", "title": "" }, { "docid": "d8951325c5d247d51a48b61735ff6ad3", "score": "0.59123904", "text": "public function users()\n\t{\n\t\t$user['users'] = $this->ModelDashboard->Load_Users()->result();\n\t\t\n\t\t$this->load->view('back-end/header/datatables_header');\n\t\t$this->load->view('back-end/users',$user);\n\t\t$this->load->view('back-end/footer/datatables_footer');\n\n\t}", "title": "" }, { "docid": "65cd1773e72855a71896b8a0d0547841", "score": "0.5907061", "text": "public function getall()\n {\n //\n $user=DB::table('chatusers')->get();\n return view('allusers')->with('user',$user);\n\n }", "title": "" }, { "docid": "5907c62a24a5675e1060167b10d2a4c9", "score": "0.59028554", "text": "public function index()\n {\n\n if (!Gate::allows('live_class_access') && !auth()->user()->hasRole('administrator') ) {\n return abort(401);\n }\n\n\n if (request('show_deleted') == 1) {\n if (!Gate::allows('live_class_access') && !auth()->user()->hasRole('administrator') ) {\n return abort(401);\n }\n $courses = LiveClasses::onlyTrashed()->ofTeacher()->get();\n } else {\n $courses = LiveClasses::ofTeacher()->get();\n }\n\n \n\n return view('backend.live.index', compact('courses'));\n }", "title": "" }, { "docid": "c04e9a6883b45f25dc4793d749ba994b", "score": "0.5899775", "text": "public function index()\n {\n $teachers = User::where('role_id', 2)\n ->where('election_id', Helper::get_active_election() ? Helper::get_active_election()->id : 0)\n ->simplePaginate(20);\n return view('admin.teacher.index', compact('teachers'));\n }", "title": "" }, { "docid": "d55b56ff604a2ab2704675361a088012", "score": "0.58945626", "text": "public function index()\n {\n $clinicLogs = ClinicLog::join('patients', 'patients.patientID', '=', 'cliniclogs.patientID')\n ->select('cliniclogs.clinicLogID','cliniclogs.patientID', 'patients.lastName', 'patients.firstName', 'patients.middleName', 'patients.quantifier', 'patients.patientType', 'cliniclogs.clinicLogDateTime')\n ->where('cliniclogs.isDeleted', '=', '0')\n ->get();\n $patientList = Patient::where('isDeleted', '=', 0)->get();\n \n return view('nurse.patient_list')->with(['patientList' => $patientList, 'clinicLogs' => $clinicLogs]);\n }", "title": "" }, { "docid": "89bfe373b8e129a9f956c955e93bcb27", "score": "0.5894391", "text": "public function index()\n {\n $users = $this->user->paginatedUsersTrash();\n $redirects = $this->redirect->paginatedRedirectsTrash();\n $translations = $this->translation->paginatedTranslationsTrash();\n $languages = $this->language->paginatedLanguagesTrash();\n $forms = $this->form->paginatedFormsTrash();\n $this->breadcrumbs->addCrumb(__('Usunięte elementy'), '/cmsbackend/trash');\n return view('cmsbackend.trash.index')->with([\n 'users' => $users,\n 'redirects' => $redirects,\n 'translations' => $translations,\n 'languages' => $languages,\n 'forms' => $forms,\n 'breadcrumbs' => $this->breadcrumbs,\n 'pageTitle' => __('Usunięte elementy')\n ]);\n }", "title": "" }, { "docid": "125d1b7acff301215438510ccbee722b", "score": "0.5893176", "text": "public function patientList()\n {\n $user = Auth::user();\n $customers = User::whereHas('roles', function ($query) {\n $query->where('name','customer');\n })->where('created_by',$user->id)->orderBy('id','DESC')->get();\n return view('admin.customers.patient_list')->with(['customers'=>$customers]);\n }", "title": "" }, { "docid": "8a8975b04746b6c3d6c7818c31b37950", "score": "0.58907527", "text": "public function index()\n {\n $technician = Technician::all();\n return \\response($technician);\n }", "title": "" }, { "docid": "0b4dbbf9781f04a40ceb5afc0b6e833b", "score": "0.5885997", "text": "public function index()\n {\n //Querry para devolver los tramos solo del USARIO IDENTIFICADO.\n $datos = Tramo_usuario::where(\"usuario_id\", \"=\", Auth::user()->id)->get();\n //Guardamos los datos tantos de tramos_users, tramos y actividades para pasarselo a la vista\n $datos2 = tramos::all();\n $datos3 = Actividades::all();\n\n return view('tramosUser.index', compact(\"datos\", \"datos2\", \"datos3\"));\n }", "title": "" }, { "docid": "245959c3255ba81f0a3bda512617cd97", "score": "0.58841985", "text": "public function index()\n {\n if(!Auth::user()->isAdmin() && !Auth::user()->isSuperAdmin()) {\n abort(402, \"Nope.\");\n }\n\n if (Auth::user()->isSuperAdmin() && Route::current()->getPrefix() == '/superadmin')\n {\n $users = User::orderBy('name')->with('clients', 'client_user', 'qualifications')->get();\n }\n else\n {\n $users = Client::findorfail(Auth::user()->currentclient_id)->user_all()->with('clients', 'client_user', 'qualifications')->get();\n }\n\n $qualifications = Auth::user()->currentclient()->Qualifications()->get();\n $authuser = Auth::user();\n\n return view('user.index', compact('users', 'authuser', 'qualifications'));\n\n }", "title": "" }, { "docid": "8d839604565402a6dda0fa2a96e8314e", "score": "0.5878719", "text": "public function index() {\n $sessionstaff = $this->Session->read('staff');\n\n\n $Doctors = $this->Doctor->find('all', array('conditions' => array('Doctor.clinic_id' => $sessionstaff['clinic_id'])));\n\n $this->set('Doctors', $Doctors);\n $checkaccess = $this->Api->accesscheck($sessionstaff['clinic_id'], 'Doctors');\n //checking the access for clinic type\n if ($checkaccess == 0) {\n $this->render('/Elements/access');\n }\n }", "title": "" }, { "docid": "7372c2bbbc079eb838c2766609e4be39", "score": "0.58745265", "text": "public function index()\n {\n $user = DB::select('select users.first_name,users.id, teacher_infos.c_1,teacher_infos.desination,teacher_infos.fs_1 from users INNER JOIN role_users ON users.id = role_users.user_id JOIN roles ON role_users.role_id = roles.id JOIN teacher_infos ON teacher_infos.users_id = users.id WHERE roles.slug = :role', ['role' => 'teacher']);\n\n\n return view('user::superadmin.teacher.index')->with('teacher',$user);\n }", "title": "" }, { "docid": "15f6baf126fa1598162db8f9b30414b1", "score": "0.5871434", "text": "public function instructors()\n {\n //returns all instructor users\n echo \"returns all instructor users here!<br>\";\n $users = User::where('user_role','2')->get();\n return view('users.index')->withUser($users);\n }", "title": "" }, { "docid": "93dda787108e012f745b9e0d86554996", "score": "0.58645433", "text": "public function index()\n {\n $user = \\Auth::user();\n\n $userSubjects = Subject::whereIn('id', $user->subjects())->pluck('subject', 'id');\n \n\n return view('admin.index') ->with('appHeading', 'Create an exam')\n ->with('appSubheading', 'Pick your choices and get started')\n \n ->with('user', $user)\n ->with('userSubjects', $userSubjects);\n }", "title": "" }, { "docid": "c4f41a61582c9a847c4e605e451e82c5", "score": "0.58596617", "text": "public function displayUsers(){\n $query = $this->db->query(\"SELECT user.user_id, user.first_name, user.last_name, user.email, user.assignment_priority_id, security_question.security_question_id, security_question.name, user.security_answer, user.accesslevel, user.assignment_priority_id, assignment_priority.type FROM user JOIN security_question ON user.security_question_id=security_question.security_question_id JOIN assignment_priority ON user.assignment_priority_id=assignment_priority.assignment_priority_id ORDER BY user.user_id ASC\");\n\n $this->TPL['users_list'] = $query->result_array();\n\n $query = $this->db->query(\"SELECT * FROM security_question;\");\n $this->TPL['security_questions'] = $query->result_array();\n\n $assignment_priority_query = $this->db->query(\"SELECT * FROM assignment_priority;\");\n\n $this->TPL['assignment_priority'] = $assignment_priority_query->result_array();\n }", "title": "" }, { "docid": "eabbf8c0755bc362e8d8e94ab0fa8e11", "score": "0.58528984", "text": "public function actionIndex()\n {\n $searchModel = new UserTeacherSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "630b240acce8e9d1aef17755e98b5a1a", "score": "0.5852533", "text": "public function index()\n {\n $tribunal = Tribunales::all();\n $tribunal->each(function ($tribunal){\n $tribunal->user->persona;\n $tribunal->defensa->inscripcion->user->persona->carrera;\n $tribunal->defensa->inscripcion->modalidad;\n });\n\n return response()->json(compact('tribunal'));\n }", "title": "" }, { "docid": "f7f470ab542048d4222968148f6debb5", "score": "0.5851019", "text": "public function view_all_user()\n\t{\n\t\t$user_records = $this->AdminModel->get_all_user();\n\t\t$all_user['all_record'] = $user_records;\n\t\t$this->load->view('admin/view_users' , $all_user);\n\t}", "title": "" }, { "docid": "ef4987b118bfd3f32a6165a822335a77", "score": "0.584941", "text": "public function index()\n {\n $teacher = Teacher::with('dept')->where('name', Auth::user()->name)->first();\n $second_examiner_courses = External::with('dept', 'course', 'session')->where('external_1', $teacher->id)->get();\n\n return view('teacher.secondExaminer.index', compact('teacher', 'second_examiner_courses'));\n }", "title": "" }, { "docid": "8bfa9ff8af31cd20d36052578bed1d05", "score": "0.58488256", "text": "public function index()\n {\n $users = User::orderBy('created_at','desc')->paginate(15);\n $course = Schooldept::all();\n return view('faculty.index')->with('users', $users)->with('course', $course);\n }", "title": "" }, { "docid": "92e7c7380554a03a7d114fd7039cfcd5", "score": "0.58362436", "text": "public function index()\n {\n //listing all the Traiing Courses\n if(CheckAccess::check(8)){\n $Trainings = Training::where('status','=','1')->paginate(20);\n return view('backend.training.index',['Trainings'=>$Trainings]);\n\n }else{\n return redirect(route('admin.dashboard'))->with('error','Unauthorized Page. Access Denied!!!');\n }\n }", "title": "" }, { "docid": "44ad273f239d9bd6025432e6b422ec3f", "score": "0.5828798", "text": "public function index()\n {\n $users = User::withTrashed()->where('id','!=',5)->get();\n $roles = Role::all();\n $rfids = Rfid::all();\n return view('admin.gestion_acudientes.index', compact('users','roles','rfids'));\n }", "title": "" }, { "docid": "6dea43329deb97f8f36e889c2c55fc44", "score": "0.5828386", "text": "public function index()\n {\n\n if (Auth::user()->type == 3) {\n $enquiries = Auth::user()->enquiries()\n ->whereIn('statue', [1,0])\n ->get();\n $applicants = Applicant::where('student_id', Auth::user()->id)\n ->where('statue', 2)\n ->get();\n $done_applicants = Applicant::where('student_id', Auth::user()->id)\n ->where('statue', 3)\n ->get();\n return view('frontend.student', compact('enquiries', 'applicants', 'done_applicants'));\n } elseif (Auth::user()->type == 2) {\n $enquiries = Enquiry::where('material', \\Auth::user()->profile->specialty)\n ->where('statue', 1)\n ->get();\n if (Auth::user()->applicants) {\n $progress_enquiries = Enquiry::where('teacher_id', Auth::user()->id)\n ->where('statue', 2)\n ->get();\n $done_enquiries = Enquiry::where('teacher_id', Auth::user()->id)\n ->where('statue', 3)\n ->get();\n }\n return view('frontend.teacher', compact('enquiries', 'progress_enquiries', 'done_enquiries'));\n }\n }", "title": "" }, { "docid": "a1f1079f39468d026e7d9ed3a24391fa", "score": "0.58145946", "text": "public function indexAction() {\r\n\r\n $datatable = $this->get('app.datatable.usercra');\r\n $datatable->buildDatatable();\r\n\r\n return $this->render('IntranetBundle:UserCRA:index.html.twig', array(\r\n 'datatable' => $datatable,\r\n ));\r\n }", "title": "" }, { "docid": "77b6aaf1a5ecf0b24c30fecdfaf96642", "score": "0.5811533", "text": "function showAll(){\n if($this->authHelper->isAuth() && $this->authHelper->isAdmin()){\n $users = $this->model->getAll();\n $this->view->showAll($users);\n }else{\n $this->menuView->showError(ACCESS_DENIED, ACCESS_DENIED_MSG);\n }\n }", "title": "" }, { "docid": "fbc2bcf3a858b07fa1b3b826bffe5851", "score": "0.58114153", "text": "public function index()\n {\n // $course = Trainer::join('courses','courses.id', '=','trainers.id')->\n // select('*','courses.name')->get();\n $trainers = Trainer::orderBy('id', 'desc')->paginate(10);\n return view('trainers.index', compact('trainers'));\n // return Datatables::of(Trainer::query())->make(true);\n }", "title": "" }, { "docid": "ecf3f49fa9304f7939de7f9379c668a3", "score": "0.5807067", "text": "public function index()\n\t{\n\t\t$user_id = Auth::user()->id;\n\n\t\t$categories = PersonalCategory::select('personal_categories.*', 'personal_transaction_types.display_name AS transaction')\n\t\t->leftjoin('personal_transaction_types', 'personal_categories.transaction_type', '=', 'personal_transaction_types.id')\n\t\t->where('personal_categories.user_id', $user_id)->orderby('personal_categories.name')->get();\n\n\t\treturn view('personal.category', compact('categories'));\n\t}", "title": "" }, { "docid": "c02bcf45c66fabf657000c5d095b3de6", "score": "0.5794714", "text": "public function index()\n {\n // check the authority level\n // this is here for now to prove the concept\n // the auth check will eventually be in another portion of the\n // dashboard view\n $userName = Auth::user()['user_name'];\n $userRole = Auth::user()['user_role'];\n\n //depending on the user role, give a listing of other users of the same auth level\n if($userRole == 1){\n //return a list of all users, all modifiable\n $users = User::where('user_active',1)->get();\n return view('users.index')->withUser($users);\n } else if($userRole == 2) {\n //return an instructor view rather than an admin or student view\n \n return view('users.instructor')->withUsers(Auth::user());\n } else if($userRole == 3) {\n //return a student view rather than an admin or instructor view\n $users = Auth::user();\n return view('users.student',$users);\n } else {\n redirect(\"login.php\");\n }\n }", "title": "" }, { "docid": "f6eb162a3f2318d21ed0835430c53363", "score": "0.5792216", "text": "public function showClinical($id) {\n $clinicaltrials = ClinicalTrial::find($id);\n return view('clinicalTrialManage.view', ['clinicaltrials' => ClinicalTrial::find($id), 'profile' => Profile::where('user_id', Auth::user()->id)->first()]);\n }", "title": "" }, { "docid": "3150151679284a7e00fc8405114bda89", "score": "0.5790516", "text": "public function index()\n {\n $users = User::where('type','doctor')\n ->get();\n \n\t\t$data = ['users' => $users];\n\t\treturn view('/doctors.index')->with($data);\n }", "title": "" }, { "docid": "85907936b841073340a19170f8a14937", "score": "0.5782415", "text": "public function index()\n {\n $Teachers = Teacher::all();\n\n return view('admin.teacher')\n ->with('Teachers', $Teachers);\n }", "title": "" }, { "docid": "ebd0856ebc5cd7f4af088b89c394771f", "score": "0.57802314", "text": "public function index()\n {\n\n $this->allowedAdminAction();\n\n $students = Student::has('enrollments')->get(); //obtain only users that have enroled in courses\n return $this->showAll($students);\n }", "title": "" }, { "docid": "a7ee6344699fede238a9e98c985075fa", "score": "0.5777541", "text": "public function index()\n {\n $tareas = Tarea::orderBy('id','DESC')->paginate(5);\n $tareas->each(function($tareas){\n $tareas->category;\n $tareas->profesor;\n });\n return view('profesor.tarea.index')->with('tareas',$tareas);\n }", "title": "" }, { "docid": "c6ad7290ced919608177a626e9200a34", "score": "0.57764935", "text": "public function listSantri() \n {\n \t$santri = santri::orderBy('id', 'desc')->get();\n \treturn view('santri.index', compact('santri'));\n }", "title": "" }, { "docid": "c77d8659a51861f72949d9a0ed0cca40", "score": "0.5765703", "text": "public function index()\n {\n return view('admin.subject.index', ['subjects' => Subject::with('user')->paginate(15)]);\n }", "title": "" }, { "docid": "590e8a1c01b605ebac51c719af7ca68b", "score": "0.5761168", "text": "public function users()\n {\n $users = $this->db->getAll('users');\n echo $this->engine->render('userslist', ['users' => $users]);\n }", "title": "" }, { "docid": "3bd972f756cc253b01d8f6aea6cbb9ee", "score": "0.5761156", "text": "public function index()\n {\n $teachers = Teacher::with('user', 'level')->paginate(25);\n // dd($teachers);\n return view('teachers.index', compact('teachers'));\n }", "title": "" }, { "docid": "2216fe0de7f11e6d85dea93b7fef060a", "score": "0.5761086", "text": "public function index()\n {\n $user_id = $this->session->userdata(\"USER_ID\");\n \n //get a list of branches\n $data[\"branches\"] = $this->branch_model->fetch_user_branch();\n $data[\"roles\"] = $this->user_model->fetch_role();\n $data['users'] = $this->user_model->fetch_user($user_id);\n $data['branch_name'] = $this->branch_model->fetch_user_branch_name($user_id);\n $data['specialities'] = $this->practitioner_model->fetch_speciality();\n \n $this->load->view(\"app/templates/header\");\n $this->load->view(\"app/users/users\", $data);\n $this->load->view(\"app/templates/footer\");\n }", "title": "" }, { "docid": "17aa89b1bfd0c863b9b53bdb2fa6950e", "score": "0.5753839", "text": "public function index()\n {\n $user = curd::all();\n return view(\"read\", compact(\"user\"));\n\n $user1 = acc::all();\n return view(\"read\", compact(\"user1\"));\n }", "title": "" }, { "docid": "578632ca261e8270b010dc73f11135e5", "score": "0.5751948", "text": "public function index()\n {\n $headlines= headlines::all()->sortByDesc(\"id\");\n return view('user.userheadlines',compact('headlines'));\n }", "title": "" }, { "docid": "1bac0624968513ed424c8736d1c404f1", "score": "0.5750887", "text": "public function index()\n {\n $teachers = Teacher::all();\n return view('dashboard.admin.teachers.teacher_index', compact('teachers'));\n }", "title": "" }, { "docid": "c29fb0a7004566ac771eec55bddc38a4", "score": "0.5749955", "text": "public function showAllUsers(){\n if( get_cookie('username')==''){\n\n $this->load->view('templates/header');\n $this->load->view('user/login');\n $this->load->view('templates/footer');\n\n }\n else {\n $userUsername = $this->encryption->decrypt(get_cookie('username'));\n $data = array('users' => $this->Contacts_model->getAllUsers(),\n 'userUsername' => $userUsername ,\n 'contacts' => $this->Contacts_model->getAllContacts($userUsername),\n\n );\n $this->load->view('templates/navbar');\n $this->load->view('contacts/usersList', $data);\n $this->load->view('templates/footer');\n }\n }", "title": "" }, { "docid": "fd82268d479e2a819b9f1bdc9779b5bd", "score": "0.5746939", "text": "public function non_clinical_index()\n {\n\t\t$this->redirect(\"index\");\t\n\t\texit;\n\t/*\n\t $tutor_mode_value = $this->UserAccount->find('first', array('conditions' => array('UserAccount.user_id' => $this->user_id)));\n\t\t$this->set(\"disable_tutor_mode\", $tutor_mode_value['UserAccount']['tutor_mode']);\n\t \n\t\tif($this->getAccessType(\"dashboard\", \"non_clinical_index\") == 'NA')\n\t\t{\n\t\t\t$this->redirect(\"index\");\n\t\t}\n\t\n\t\tif($this->Session->check('dashboard_location') == false)\n\t\t{\n\t\t\t$this->Session->write('dashboard_location', 0);\n\t\t}\n\t\t// check for provider filter\n\t\tif($this->Session->check('dashboard_provider') == false)\n\t\t{\n\t\t\t$this->Session->write('dashboard_provider', $this->user_id);\n\t\t}\n\t\t\n\t\t$location_id = $this->Session->read('dashboard_location');\n\t\t$provider_id = ($this->Session->read('dashboard_provider'))? $this->Session->read('dashboard_provider') : 0;\n\t\t$this->loadModel('UserGroup');\n\t\t$view = (isset($this->params['named']['view'])) ? $this->params['named']['view'] : \"\";\n\t\t$showdate = (isset($this->params['named']['showdate'])) ? $this->params['named']['showdate'] : \"\";\n\t\t$date = $this->Session->read('DashboardDate');\n\t\t$role_ids = $this->UserGroup->getRoles(EMR_Groups::GROUP_NON_PROVIDERS);\n\n\t\tif ($view == \"\")\n\t\t{\n\t\t\t$this->redirect(array('action' => 'non_clinical_index', 'view' => 'today'));\n\t\t}\n\n\t\tif ($view == \"previous_day\")\n\t\t{\n\t\t\tif ($date)\n\t\t\t{\n\t\t\t\t$date = explode(\"-\", $date);\n\t\t\t\t$date = __date(\"Y-m-d\", mktime(0, 0, 0, $date[1], $date[2] - 1, $date[0]));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$date = __date(\"Y-m-d\", mktime(0, 0, 0, __date(\"m\"), __date(\"d\") - 1, __date(\"Y\")));\n\t\t\t}\n\t\t}\n\t\telse if ($view == \"next_day\")\n\t\t{\n\t\t\tif ($date)\n\t\t\t{\n\t\t\t\t$date = explode(\"-\", $date);\n\t\t\t\t$date = __date(\"Y-m-d\", mktime(0, 0, 0, $date[1], $date[2] + 1, $date[0]));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$date = __date(\"Y-m-d\", mktime(0, 0, 0, __date(\"m\"), __date(\"d\") + 1, __date(\"Y\")));\n\t\t\t}\n\t\t}\n\t\telse if($view == \"same_day\")\n\t\t{\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($showdate == 'true')\n\t\t\t{\n\t\t\t\t$date = __date(\"Y-m-d\", strtotime($this->data['setdate']));\n\t\t\t\t$this->set(\"setdate\", $this->data['setdate']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$date = __date(\"Y-m-d\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->Session->write('DashboardDate', $date);\n\n\t\t$user = $this->Session->read('UserAccount');\n\t\t$user_id = $user['user_id'];\n\t\t$role_id = $user['role_id'];\n \t$this->ScheduleCalendar->recursive = 0;\n \tif(isset($_POST['frm_submit']))\n \t{\n \t\t$this->Session->write('showall', isset($_POST['show_all']));\n \t}\n \telse if($this->Session->read('showall')){\n \t\t$this->Session->write('showall', true);\n \t}\n\t\telse if($role_id == EMR_Roles::SYSTEM_ADMIN_ROLE_ID || $role_id == EMR_Roles::PRACTICE_ADMIN_ROLE_ID){//else if(in_array($role_id, $role_ids)){\n\t\t\t$this->Session->write('showall', true);\n\t\t}\n \telse{\n \t\t$this->Session->write('showall', false);\n \t}\n\t\t\n\t\tif(!$this->Session->read('showall'))\n\t\t{\n\t\t\t$conditions = array();\n\t\t\tif($provider_id != 0){\n\t\t\t\t$conditions['ScheduleCalendar.provider_id'] = $user_id;\n\t\t\t}\n\t\t\t$conditions['ScheduleCalendar.date'] = $date;\n\t\t\t$conditions['ScheduleCalendar.approved !='] = 'no';\n\t\t\tif($location_id != 0)\n\t\t\t{\n\t\t\t\t$conditions['ScheduleCalendar.location'] = $location_id;\n\t\t\t}\n\t\t\t// added in filter array\n\t\t\tif($provider_id != 0)\n\t\t\t{\n\t\t\t\t$conditions['ScheduleCalendar.provider_id'] = $provider_id;\n\t\t\t}\n\t\t\t\n\t\t\t$this->paginate['ScheduleCalendar'] =\n\t\t\t\tarray(\n\t\t\t\t\t'limit' => 50\n\t\t\t\t\t, 'conditions' => $conditions\n\t\t\t\t);\n\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$conditions = array();\n\t\t\t$conditions['ScheduleCalendar.date'] = $date;\n\t\t\t$conditions['ScheduleCalendar.approved !='] = 'no';\n\t\t\tif($location_id != 0)\n\t\t\t{\n\t\t\t\t$conditions['ScheduleCalendar.location'] = $location_id;\n\t\t\t}\n\t\t\t// added provider filter array\n\t\t\t$filter_role = $this->UserAccount->getUserRole($provider_id);\n\t\t\t\n\t\t\tif($filter_role == EMR_Roles::SYSTEM_ADMIN_ROLE_ID || $filter_role == EMR_Roles::PRACTICE_ADMIN_ROLE_ID)\n\t\t\t{\n\t\t\t\t$provider_id = 0;\n\t\t\t}\n\t\t\tif($provider_id != 0){\n\t\t\t\t$conditions['ScheduleCalendar.provider_id'] = $provider_id;\n\t\t\t}\n\t\t\t \n\t\t\t$this->paginate['ScheduleCalendar'] =\n\t\t\tarray(\n\t\t\t\t'limit' => 10\n\t\t\t\t, 'conditions' => $conditions\n\t\t\t);\n\t\t\t\n\t\t}\n \n $this->set('selectedDate', $date);\n\t\t$this->set('schedulecalendar', $this->paginate('ScheduleCalendar'));\n\t\t$this->set('show_all', ($this->Session->read('showall'))? \"checked\":\"\");\n\t\t\n\t\t$encounter_access = (int)$this->validateAccess(\"encounters\", \"non_clinical_index\");\n\t\t$patient_access = (int)$this->validateAccess(\"patients\", \"non_clinical_index\");\n\t\t\n\t\t$this->set(\"encounter_access\", $encounter_access);\n\t\t$this->set(\"patient_access\", $patient_access);\n\t\t\n\t\t$this->loadModel('PracticeLocation');\n\t\t$this->set(\"location_name\", $this->sanitizeHTML($this->PracticeLocation->getLocation($location_id)));\n\t\t$this->set(\"total_location\", count($this->sanitizeHTML($this->PracticeLocation->find('all'))));\n\t\t\n\t\t// assigned values to variables to use in templates\n\t\tif($provider_id != 0){\n\t\t\t$this->set(\"provider_name\", $this->sanitizeHTML($this->UserAccount->getUserShortRealName($provider_id)));\n\t\t}\n\t\telse{\n\t\t\t$this->set(\"provider_name\", \"All Providers\");\n\t\t}\n\t\t//$this->set(\"avail_provider\", count($this->sanitizeHTML($this->UserAccount->getProviders())));\n\t\t$this->set(\"avail_provider\", count($this->sanitizeHTML($this->UserAccount->find('all', array('conditions' => array('UserAccount.role_id' => $this->UserGroup->getRoles(EMR_Groups::GROUP_ENCOUNTER_LOCK,false)), 'fields' => array('UserAccount.user_id'))))));\n\t*/\n }", "title": "" }, { "docid": "503ba7ddb320cdcbabbe38ab25a15006", "score": "0.57468116", "text": "public function index()\n {\n $teachers = Teacher::with('subject')->get(); \n return view('university.teacher.index')->with(['teachers' => $teachers]);\n }", "title": "" }, { "docid": "28341b66afee5dedd7e2f72b1bd217bb", "score": "0.57453203", "text": "public function indexSubInvestigator() {\n return view('clinicalTrial.subapply', ['user' => Auth::user(),\n 'profile' => Profile::where('user_id', auth()->user()->id)->latest('created_at')->first(),\n 'clinicaltrial' => ClinicalTrial::where('user_id', auth()->user()->id)->latest('created_at')->first()]);\n }", "title": "" }, { "docid": "f863c5ebb1b1c7fcf8aa6f8f33a3a285", "score": "0.5738", "text": "public function index()\n {\n $cases = TeacherCase::where('teacher_id', $this->teacher_id)->orderBy('id', 'DESC')->take(10)->get();\n return view('teacher.case.index', ['cases' => $cases]);\n }", "title": "" }, { "docid": "a59f13c7f8fbafc3a849ccdc6cdd26e4", "score": "0.57317555", "text": "public function index()\n {\n //\n if (Auth::user()->hasRole('User')) {\n $users = user::with(['city', 'profession'])->where('parent', Auth::user()->id)->paginate(10);\n return response()->view('cms.users.index', ['users' => $users]);\n } else {\n $users = User::with(['city', 'profession'])->paginate(10);\n return response()->view('cms.users.index', ['users' => $users]);\n }\n }", "title": "" }, { "docid": "c4835e5ac1441fea60efd97415f312be", "score": "0.5728888", "text": "public function index()\n {\n $data = Authority::select(\n 'authorities.*'\n )\n ->paginate(2);\n return view('dashboard.showtables.all_authority')->with('data',$data);\n }", "title": "" }, { "docid": "b4a4f366a10b8216e653a864f312a176", "score": "0.57246554", "text": "function index()\n {\n $user['users'] = $this->User_model->get_all_user();\n $data['menu'] = $this->User_access_menu_model->get_all_user_access_menu($this->session->userdata('user_id'));\n $data['subMenu'] = $this->User_access_sub_menu_model->get_all_user_access_sub_menu($this->session->userdata('user_id'));\n\n $this->load->view('layouts/header');\n $this->load->view('layouts/sidebar', $data);\n $this->load->view('user/index', $user);\n $this->load->view('layouts/footer');\n }", "title": "" }, { "docid": "a2e71155f4cd1ba34e761ab1be5d2a4d", "score": "0.57188773", "text": "public function index()\n {\n $user = auth()->user();\n $avoirs = Avoir::where('user_id', $user->id)->paginate(3);\n $cle = Cle::all();\n return \\view('avoirs.showavoirs')->with('avoirs', $avoirs)->with('clients', Client::all())->with('user', $user)->with('cles', $cle);\n }", "title": "" }, { "docid": "9dbc4f353d9e78a3c8f7fd1e26824271", "score": "0.57160056", "text": "public function index()\n {\n //\n $mensajes = Reflexion::orderBy('id','DESC')->paginate(7);\n $mensajes->each(function($mensajes){\n $mensajes->user;\n });\n return view('admin.reflexion.index')->with('mensajes',$mensajes);\n }", "title": "" }, { "docid": "5d3b38f357ff8c8fa833c66b8206f60d", "score": "0.57119614", "text": "public function index()\n {\n $tutors = Tutor::all();\n return view('backend.tutors.index',compact('tutors'));\n }", "title": "" }, { "docid": "b8e3778a8138c2f1e4aef559a90697e7", "score": "0.5710707", "text": "public function index(){\n \t$ClasesPuc= ClasesPUCModel::All();\n \treturn view('clasesPUC.read',compact('ClasesPuc'));\n }", "title": "" }, { "docid": "97ea62d74a32dae7f40130a9c7c840bf", "score": "0.5709488", "text": "public function index(){\n\t\t$data['user'] = $this->m_data->tampil_data()->result();\n\t\t $this->load->view('v_tampil',$data);\n }", "title": "" }, { "docid": "bfa23b2a6ab09c161e19e47b5821a69e", "score": "0.5709015", "text": "public function index()\n {\n \n $user = Auth::user();\n $dataSet = $user->temperatures->groupby('town');\n $tempData = [];\n $towns = [];\n foreach($dataSet as $key=>$value){\n $towns[] = $key;\n $tempData[$key] = $this->arrangeData($value);\n }\n $temperatureDataColombo = $this->arrangeData($user->temperatures->where('town', 'Colombo'));\n $temperatureDataMelbourne = $this->arrangeData($user->temperatures->where('town', 'Melbourne'));\n return Inertia::render('Dashboard', [\n 'tempData' =>$tempData, 'temperatureDataColombo' => $temperatureDataColombo , 'temperatureDataMelbourne' => $temperatureDataMelbourne , 'towns' => $towns \n ]);\n }", "title": "" }, { "docid": "256cd9efc1ac984e422d2c50a3c68827", "score": "0.5704969", "text": "public function index() \n {\n \t$users = User::where([\n ['account_type', '=','individual'],\n ['role', '<>', 'admin']\n ])->get();\n\n //Pass User Object to User List View\n return view('user.index', ['users' => $users]);\n }", "title": "" }, { "docid": "e05a86c1a027cd60fb04b52ae5b59b09", "score": "0.5704149", "text": "public function index()\n {\n $user = $this->loadUser(Auth::id());\n $courses = UserCourse::getCourseWithoutTrash()->get();\n return view('client.course.index',compact('courses'));\n }", "title": "" }, { "docid": "c9fcbe9051929ac09e4fa45a48e4592a", "score": "0.57034737", "text": "public function index()\n {\n //\n $user=curd::all();\n return view(\"read\", compact(\"user\"));\n\t\t\n\t\t//Newer Version of doing\n\t\t//$user=curd::all();\n\t\t//$user['roles'] = '';\n //return view(\"read\")->withUser($user);\n }", "title": "" }, { "docid": "fd795c8c0bc7767ef8b4550f48c48fb3", "score": "0.5698203", "text": "public function index()\n {\n $user = auth()->user();\n $patients = User::where('type', 'patient')->orderBy('name')->get();\n\n return view('admin.patients', compact('user', 'patients'));\n }", "title": "" }, { "docid": "414576fb31e2f71f35db9f221d7815fa", "score": "0.569624", "text": "public function index()\n {\n $data = DB::table('users')->orderBy('id','DESC')->where('role_id', '<',55)->where('class_id',Auth::user()->class_id)->where('id','<>',Auth::user()->id)->get();\n \n return view('lead.user.index',['user'=>$data]);\n }", "title": "" }, { "docid": "f799970361d5f013ef4147d0b89a5dcb", "score": "0.569593", "text": "public function index()\n\t{\n\t\t$query = $this->db->select('c.id, c.nom, c.type, c.chef_id, j.pseudo AS chef_pseudo')\n\t\t\t\t\t\t ->from('clans c')\n\t\t\t\t\t\t ->join('joueurs j', 'j.id = c.chef_id')\n\t\t\t\t\t\t ->order_by('c.type, c.nom')\n\t\t\t\t\t\t ->get();\n\t\t$clans = $query->result();\n\n\t\t// On affiche les résultats\n\t\t$vars = array(\n\t\t\t'clans' => $clans,\n\t\t);\n\t\treturn $this->layout->view('staff/moderer_clans_tchats', $vars);\n\t}", "title": "" }, { "docid": "29cb18de2657e6a6a41258bad8a75d7d", "score": "0.5692473", "text": "public function index()\n {\n $trips = $this->getTrips();\n // Show the page\n return view('admin.trip.index', compact('trips'));\n }", "title": "" }, { "docid": "c55d0c2d4080f755801b8ca28082b383", "score": "0.56908447", "text": "public function index()\n {\n $faculties = User::whereHas(\"roles\", function($q){ $q->where('name', 'faculty'); })->paginate(8);\n\n return view('faculties.index')->with('faculties', $faculties);\n }", "title": "" }, { "docid": "5e9445e088d22a195896a124eea4a96b", "score": "0.56903726", "text": "public function index()\n {\n $trialfields = Trialfield::orderBy('order', 'asc')->get();\n return view('trialfields.all', compact('trialfields'));\n }", "title": "" }, { "docid": "dbefcf619d47c28170f5240bca6ecd14", "score": "0.5689302", "text": "public function index()\n {\n //\n $clinics = Clinic::all();\n return view('clinics.index',compact('clinics'));\n }", "title": "" }, { "docid": "938ae73443bdac1d3f5b8a7a5d8a1d65", "score": "0.56889343", "text": "public function index()\n {\n $expertdetail = User::find(Auth::user()->id)->expertDetail;\n $categories = Category::all();\n $sub_categories = SubCategory::all();\n $qualifications = Qualification::all();\n\n $pw = 0;\n if(Auth::user()->basicDetail->image){\n $pw += 20;\n }\n if(Auth::user()->expertDetail){\n $pw += 20;\n }\n if(Auth::user()->verification){\n $pw += 10;\n }\n if(Auth::user()->availabilities->count() > 0){\n $pw += 20;\n }\n if(Auth::user()->locations->count() > 0){\n $pw += 10;\n }\n if(Auth::user()->galleries->count() > 0){\n $pw += 20;\n }\n\n if($expertdetail){\n return view('adviser.expertDetails.index')->withExpertdetail($expertdetail)->withCategories($categories)->withSub_categories($sub_categories)->withQualifications($qualifications)->withPw($pw);\n }\n else{\n return view('adviser.expertDetails.create')->withCategories($categories)->withSub_categories($sub_categories)->withQualifications($qualifications)->withPw($pw);\n }\n }", "title": "" }, { "docid": "bab0b3a5eefe98106f7143aaba7b5af6", "score": "0.56813157", "text": "public function index()\n {\n $teachers = Teacher::all();\n return view('administrator.teachers.index', compact('teachers'));\n }", "title": "" }, { "docid": "ca9b11ccffe218ebdb620318e5b47307", "score": "0.5680439", "text": "public function trainerReports()\n {\n return view('admin.hr.course.trainers.reports');\n }", "title": "" } ]
df9ae84c753b38a32d65f0a1d9f78eb4
Inserta los controles de alta
[ { "docid": "68a885742fb2d661414e2784c08efa61", "score": "0.0", "text": "public function insert_control_high_impact(){\n\n\n\n date_default_timezone_set(\"America/Bogota\");\n $fActual = date('Y-m-d H:i:s');\n $ots_combinadas = ($this->input->post('multi_ordenes'))? $this->input->post('multi_ordenes') : [] ;\n $faltantes_post = $this->input->post('faltantes');\n $faltantes = \"\";\n if ($faltantes_post) {\n for ($i=0; $i < count($faltantes_post) - 1 ; $i++) { \n $faltantes .= $faltantes_post[$i] . \", \";\n }\n $faltantes .= $faltantes_post[$i];\n }\n\n\n if ($this->input->post('multi_sedes')) {\n $otsBySede = $this->Dao_sede_model->get_ots_by_idsede($this->input->post('multi_sedes'));\n }\n if (isset($otsBySede) && $otsBySede) {\n for ($j=0; $j < count($otsBySede); $j++) { \n array_push($ots_combinadas, $otsBySede[$j]->k_id_ot_padre);\n }\n }\n\n $ots = array_values(array_unique($ots_combinadas));\n\n $data_cc = array(\n // 'id_ot_padre' => $this->input->post('id_ot_padre'),\n 'id_responsable' => $this->input->post('id_responsable'),\n 'id_causa' => $this->input->post('id_causa'),\n 'fecha_compromiso' => $this->input->post('fecha_compromiso'),\n 'fecha_programacion_inicial' => $this->input->post('fecha_programacion_inicial'),\n 'nueva_fecha_programacion' => $this->input->post('nueva_fecha_programacion'),\n 'narrativa_escalamiento' => $this->input->post('narrativa_escalamiento'),\n 'estado_cc' => $this->input->post('estado_cc'),\n 'observaciones_cc' => $this->input->post('observaciones_cc'),\n 'faltantes' => $faltantes,\n 'en_tiempos' => $this->input->post('en_tiempos'),\n 'fecha_creacion_cc' => $fActual\n );\n\n $nombre_carpeta = 'multi_sede';\n $file_name = $_FILES['archivo']['name'];\n $file_size = $_FILES['archivo']['size'];\n $file_tmp = $_FILES['archivo']['tmp_name'];\n $file_type = $_FILES['archivo']['type'];\n \n $fp = fopen($file_tmp, 'r+b');\n $binario = fread($fp, filesize($file_tmp));\n fclose($fp);\n \n $explode_name = explode('.',$file_name);\n $ext = $explode_name[count($explode_name) - 1];\n \n $up_archivo = array(\n 'archivo' => $binario,\n // 'nombre_archivo' => $nombre_archivo,\n 'tipo_archivo' => $file_type,\n 'extension_archivo' => $ext\n );\n\n $errores = '';\n $exito = '';\n\n echo '<pre>'; print_r($ots); echo '</pre>';\n for ($k=0; $k < count($ots); $k++) { \n $data_cc['id_ot_padre'] = $ots[$k];\n $ins = $this->Dao_control_cambios_model->insert_control_cambios($data_cc);\n\n if ($ins) {\n $up_archivo['nombre_archivo'] = \"ZCC$ins.$ext\";\n $up_ctrl = $this->Dao_control_cambios_model->update_control_cambios($up_archivo, $ins);\n // subir archivo a carpetas del servidor\n /*if (!is_dir(\"uploads/$nombre_carpeta\")) {\n mkdir(\"uploads/$nombre_carpeta\");\n } \n echo json_encode(rename(\"$file_tmp\",\"uploads/$nombre_carpeta/$nombre_archivo\"));*/\n\n $exito .= 'ZCC' . $ins . ' ';\n\n } else {\n $errores .= $ots[$k] . ' ';\n }\n }\n\n\n\n $msj = $exito . \"***\" . $errores;\n\n $this->session->set_flashdata('success', $msj);\n\n $location = URL::base().'/Sede';\n header(\"location: $location\");\n\n\n\n\n\n\n\n\n\n\n }", "title": "" } ]
[ { "docid": "a6be4e5787931b02eb5072223bd69704", "score": "0.6924494", "text": "public function insertAccesorio(){\n\t\t$this->marca = $_POST['marca'];\n\t\t$this->modelo = $_POST['modelo'];\n\n\t\t/*Insercion en la base de datos*/\n\t\t$this->db->insert('accesorios', $this);\n\t}", "title": "" }, { "docid": "d33b5e5c72788be9aaf4c3dca3d9df32", "score": "0.6825361", "text": "public function CadastraCasos($titulo, $descricao, $gravidade, $categorias, $idusuario){\r\n $cmd = $this->pdo->prepare(\"SELECT * FROM tbl_usuario WHERE ID_login = :idlogin\");\r\n $cmd->bindValue(\":idlogin\", $idusuario);\r\n $cmd->execute();\r\n $idvtm = $cmd->fetch(PDO::FETCH_ASSOC);\r\n var_dump($idvtm);\r\n try {\r\n $cmd2 = $this->pdo->prepare(\"INSERT INTO tbl_caso(titulo_caso, descricao_caso, situacao, gravidade, ID_categ_direito, ID_usuario) VALUES (:titulo, :descricao, :situacao, :gravidade, :idcateg, :idusuario)\");\r\n $cmd2->bindParam(\":titulo\", $titulo);\r\n $cmd2->bindParam(\":descricao\", $descricao);\r\n $cmd2->bindValue(\":situacao\", 1);\r\n $cmd2->bindParam(\":gravidade\", $gravidade);\r\n $cmd2->bindParam(\":idcateg\", $categorias);\r\n $cmd2->bindParam(\":idusuario\", $idvtm['ID_usuario']);\r\n \r\n if ($cmd2->execute()) {\r\n if ($cmd2->rowCount() > 0) {\r\n echo \"<br>sucesso<br>\";\r\n return true;\r\n } \r\n else {\r\n echo \"<br>Erro na parte 2<br>\";\r\n return false;\r\n }\r\n }else { \r\n throw new PDOException(\"Erro: Não foi possível executar a declaração sql na parte 2\");\r\n }\r\n } catch (PDOException $erro2) {\r\n echo \"Erro: \" . $erro2->getMessage();\r\n }\r\n }", "title": "" }, { "docid": "951bc62daf52f5d93b565a8225933bab", "score": "0.68190676", "text": "public function insertAranceles()\n {\n $atributos=array( $this->nombre , $this->valor , $this->codigocon , $this->exento , $this->accion , $this->rubro , $this->nomcuen , $this->permitir , $this->dolares , $this->valorold , $this->idunicoara );\n //descomentarear la línea siguiente y comentarear la anterior si la llave primaria no es autoincremental\n //$atributos=array( $this->codigo , $this->nombre , $this->valor , $this->codigocon , $this->exento , $this->accion , $this->rubro , $this->nomcuen , $this->permitir , $this->dolares , $this->valorold , $this->idunicoara );\n\n return $this->conexionAranceles->insertarRegistro($atributos);\n }", "title": "" }, { "docid": "ad17fd4a002f0ec46e7b981b1dcb6da5", "score": "0.681861", "text": "function insertarRoles($descripcion,$activo) {\r\n $sql = \"insert into tbroles(idrol,descripcion,activo)\r\n values (null,'\".$descripcion.\"',\".$activo.\")\";\r\n $res = $this->query($sql,1);\r\n return $res;\r\n }", "title": "" }, { "docid": "93a85f72f76d462970ec72e142174ac8", "score": "0.67831826", "text": "function inserir_acervo( $acervo ) {\n global $conexao;\n $id_editora = mysqli_real_escape_string( $conexao, $acervo['id_editora'] );\n $titulo = mysqli_real_escape_string( $conexao, $acervo['titulo'] );\n $autor = mysqli_real_escape_string( $conexao, $acervo['autor'] );\n $ano = mysqli_real_escape_string( $conexao, $acervo['ano'] );\n $preco = mysqli_real_escape_string( $conexao, $acervo['preco'] );\n $quantidade = mysqli_real_escape_string( $conexao, $acervo['quantidade'] );\n $tipo = mysqli_real_escape_string( $conexao, $acervo['tipo'] );\n // Comando SQL para selecionar todos os registros\n $sql = \"INSERT INTO acervo (id_editora, titulo, autor, ano, preco, quantidade, tipo) \" .\n \"VALUES ('$id_editora', '$titulo', '$autor', '$ano', '$preco', '$quantidade', '$tipo')\";\n // Executa comando SQL\n $resultado = mysqli_query( $conexao, $sql );\n // Retorna resultado da transação\n return $resultado;\n}", "title": "" }, { "docid": "b4562ba27d21c9c72106e08048d5d003", "score": "0.6762277", "text": "protected function insertar()\n {\n }", "title": "" }, { "docid": "196b335aec479a6d5fea9cba2f29be0e", "score": "0.67489284", "text": "function agregar_adicion($datos){\n $this->db->insert('contratos_adiciones', $datos);\n }", "title": "" }, { "docid": "1c18188c4ec40b007462c44c10c2a268", "score": "0.6711586", "text": "function insertarRoles($descripcion,$activo) {\r\n$sql = \"insert into tbroles(idrol,descripcion,activo)\r\nvalues ('','\".($descripcion).\"',\".$activo.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "title": "" }, { "docid": "bfa118df8fa2680eef4d56f19afd1737", "score": "0.67039514", "text": "function insertarAgenciaCompletaPortal(){\n $this->objFunc=$this->create('MODAgencia');\n $this->res=$this->objFunc->insertarAgenciaCompletaPortal($this->objParam);\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "title": "" }, { "docid": "60d971bb0c3f44fa36b7f1935396c11b", "score": "0.67020017", "text": "function insertarRoles($descripcion,$activo) { \r\n\t$sql = \"insert into tbroles(idrol,descripcion,activo) \r\n\tvalues ('','\".($descripcion).\"',\".$activo.\")\"; \r\n\t$res = $this->query($sql,1); \r\n\treturn $res; \r\n\t}", "title": "" }, { "docid": "86e0e34898c74743733581bbc92b07ae", "score": "0.6699701", "text": "function inserir_acervo_sem_editora( $acervo ) {\n global $conexao;\n $titulo = mysqli_real_escape_string( $conexao, $acervo['titulo'] );\n $autor = mysqli_real_escape_string( $conexao, $acervo['autor'] );\n $ano = mysqli_real_escape_string( $conexao, $acervo['ano'] );\n $preco = mysqli_real_escape_string( $conexao, $acervo['preco'] );\n $quantidade = mysqli_real_escape_string( $conexao, $acervo['quantidade'] );\n $tipo = mysqli_real_escape_string( $conexao, $acervo['tipo'] );\n // Comando SQL para selecionar todos os registros\n $sql = \"INSERT INTO acervo (titulo, autor, ano, preco, quantidade, tipo) \" .\n \"VALUES ('$titulo', '$autor', '$ano', '$preco', '$quantidade', '$tipo')\";\n // Executa comando SQL\n $resultado = mysqli_query( $conexao, $sql );\n // Retorna resultado da transação\n return $resultado;\n}", "title": "" }, { "docid": "126814948aadb3e15729fc8e981e791d", "score": "0.6610413", "text": "private function _insertarConfiguracion() {\n $datos_tabla = Consultas_ObtenerTablaNombreTipo::armado();\n $tb_nombre = $datos_tabla['prefijo'] . '_' . $datos_tabla['nombre'];\n $tb_tipo = $datos_tabla['tipo'];\n\n // obtengo nombre y tipo de tabla origen\n $tb_origen_nombre = $this->_dcp_origen['tb_prefijo'] . '_' . $this->_dcp_origen['tb_nombre'];\n\n if ($_GET['accion'] == 'ComponenteAltaInsercion') {\n\n // creo el objeto 'componente_carga' para el alta\n $componente_carga = new Acciones_ComponenteAltaInsercion();\n // crear componente y obtener id de insercion\n $id_componente = $componente_carga->crearComponente($_GET['id_tabla'], $this->_nombreComponente, '');\n // se inserta los id del componente linkeado\n $componente_carga->consultaParametro($id_componente, 'origen_cp_id', $this->_dcp_origen['cp_id']);\n\n // el siguiente codigo es valido tanto para la tabla en formato registros como variables\n // crear tabla de relacion\n Consultas_TablaCrear::armado(__FILE__, __LINE__, $this->_intermedia_tb_nombre, $this->_intermedia_tb_prefijo_texto);\n\n $tabla_intermedia = $this->_intermedia_tb_prefijo_texto . '_' . $this->_intermedia_tb_nombre;\n // agregar modificar columna id en tabla de relacion (referencia a campo tabla destino)\n $componente_carga->crearModificarColumna($tabla_intermedia, 'id_' . $tb_nombre, '', $this->_pv['tipo_dato'], 12, false, true);\n // agregar modificar columna id en tabla de relacion (tabla origen)\n $componente_carga->crearModificarColumna($tabla_intermedia, 'id_' . $tb_origen_nombre, '', $this->_pv['tipo_dato'], 12, false, true);\n\n // crear registro de pagina\n $orden = Consultas_ObtenerRegistroMaximo::armado('kirke_tabla', 'orden');\n\n $id_insertado = Consultas_Tabla::RegistroCrear(__FILE__, __LINE__, $this->id_intermedia_tb_prefijo, $orden[0]['orden'] + 1, $this->_intermedia_tb_nombre, 's', 'componente');\n $id_tabla_crear = $id_insertado['id'];\n\n // parametro del id de tabla de referencia\n $componente_carga->consultaParametro($id_componente, 'intermedia_tb_id', $id_tabla_crear);\n \n // agrega o elimina el link en 'id_tabla_parametro' para poder\n // acceder desde la tabla de origen al registro que lo utiliza, siempre lo carga\n $this->insertar_link_a_grupo($id_componente);\n } elseif ($_GET['accion'] == 'ComponenteModificacionInsercion') {\n\n // creo el objeto 'componente_carga' para la modificacion\n $componente_carga = new Acciones_ComponenteModificacionInsercion();\n\n // se le pasa el id para poder hacer las modificaciones\n $id_componente = $_GET['cp_id'];\n }\n\n // agregar parametros al compoenente\n\n foreach ($this->_tbTituloIdioma as $key => $value) {\n $componente_carga->consultaParametro($id_componente, 'idioma_' . $this->_idioma[$key], $this->_tbTituloIdioma[$key]);\n }\n\n if ($_POST['link_a_grupo'] != $this->_pv['link_a_grupo']) {\n $componente_carga->consultaParametro($id_componente, 'link_a_grupo', Bases_InyeccionSql::consulta($_POST['link_a_grupo']));\n } elseif ($_GET['accion'] == 'ComponenteModificacionInsercion') {\n $componente_carga->consultaParametroEliminar($id_componente, 'link_a_grupo');\n }\n if ($_POST['obligatorio'] != $this->_pv['obligatorio']) {\n $componente_carga->consultaParametro($id_componente, 'obligatorio', Bases_InyeccionSql::consulta($_POST['obligatorio']));\n } elseif ($_GET['accion'] == 'ComponenteModificacionInsercion') {\n $componente_carga->consultaParametroEliminar($id_componente, 'obligatorio');\n }\n if ($_POST['eliminar_tb_relacionada'] != $this->_pv['eliminar_tb_relacionada']) {\n $componente_carga->consultaParametro($id_componente, 'eliminar_tb_relacionada', Bases_InyeccionSql::consulta($_POST['eliminar_tb_relacionada']));\n } elseif ($_GET['accion'] == 'ComponenteModificacionInsercion') {\n $componente_carga->consultaParametroEliminar($id_componente, 'eliminar_tb_relacionada');\n }\n if ($_POST['filtrar'] != $this->_pv['filtrar']) {\n $componente_carga->consultaParametro($id_componente, 'filtrar', Bases_InyeccionSql::consulta($_POST['filtrar']));\n } elseif ($_GET['accion'] == 'ComponenteModificacionInsercion') {\n $componente_carga->consultaParametroEliminar($id_componente, 'filtrar');\n }\n if ($_POST['filtrar_texto'] != $this->_pv['filtrar_texto']) {\n $componente_carga->consultaParametro($id_componente, 'filtrar_texto', Bases_InyeccionSql::consulta($_POST['filtrar_texto']));\n } elseif ($_GET['accion'] == 'ComponenteModificacionInsercion') {\n $componente_carga->consultaParametroEliminar($id_componente, 'filtrar_texto');\n }\n if ($_POST['separador_del_campo_1'] != $this->_pv['separador_del_campo_1']) {\n $componente_carga->consultaParametro($id_componente, 'separador_del_campo_1', Bases_InyeccionSql::consulta($_POST['separador_del_campo_1']));\n } elseif ($_GET['accion'] == 'ComponenteModificacionInsercion') {\n $componente_carga->consultaParametroEliminar($id_componente, 'separador_del_campo_1');\n }\n if ($_POST['nombre_del_campo_1'] != $this->_pv['nombre_del_campo_1']) {\n $componente_carga->consultaParametro($id_componente, 'nombre_del_campo_1', Bases_InyeccionSql::consulta($_POST['nombre_del_campo_1']));\n } elseif ($_GET['accion'] == 'ComponenteModificacionInsercion') {\n $componente_carga->consultaParametroEliminar($id_componente, 'nombre_del_campo_1');\n } \n if ($_POST['separador_del_campo_2'] != $this->_pv['separador_del_campo_2']) {\n $componente_carga->consultaParametro($id_componente, 'separador_del_campo_2', Bases_InyeccionSql::consulta($_POST['separador_del_campo_2']));\n } elseif ($_GET['accion'] == 'ComponenteModificacionInsercion') {\n $componente_carga->consultaParametroEliminar($id_componente, 'separador_del_campo_2');\n }\n if ($_POST['nombre_del_campo_2'] != $this->_pv['nombre_del_campo_2']) {\n $componente_carga->consultaParametro($id_componente, 'nombre_del_campo_2', Bases_InyeccionSql::consulta($_POST['nombre_del_campo_2']));\n } elseif ($_GET['accion'] == 'ComponenteModificacionInsercion') {\n $componente_carga->consultaParametroEliminar($id_componente, 'nombre_del_campo_2');\n } \n if ($_POST['ocultar_edicion'] != $this->_pv['ocultar_edicion']) {\n $componente_carga->consultaParametro($id_componente, 'ocultar_edicion', Bases_InyeccionSql::consulta($_POST['ocultar_edicion']));\n } elseif ($_GET['accion'] == 'ComponenteModificacionInsercion') {\n $componente_carga->consultaParametroEliminar($id_componente, 'ocultar_edicion');\n }\n if ($_POST['ocultar_vista'] != $this->_pv['ocultar_vista']) {\n $componente_carga->consultaParametro($id_componente, 'ocultar_vista', Bases_InyeccionSql::consulta($_POST['ocultar_vista']));\n } elseif ($_GET['accion'] == 'ComponenteModificacionInsercion') {\n $componente_carga->consultaParametroEliminar($id_componente, 'ocultar_vista');\n }\n if ($_POST['predefinir_ultimo_val_cargado'] != $this->_pv['predefinir_ultimo_val_cargado']) {\n $componente_carga->consultaParametro($id_componente, 'predefinir_ultimo_val_cargado', Bases_InyeccionSql::consulta($_POST['predefinir_ultimo_val_cargado']));\n } elseif ($_GET['accion'] == 'ComponenteModificacionInsercion') {\n $componente_carga->consultaParametroEliminar($id_componente, 'predefinir_ultimo_val_cargado');\n }\n if ($_POST['agregar_registro'] != $this->_pv['agregar_registro']) {\n $componente_carga->consultaParametro($id_componente, 'agregar_registro', Bases_InyeccionSql::consulta($_POST['agregar_registro']));\n } elseif ($_GET['accion'] == 'ComponenteModificacionInsercion') {\n $componente_carga->consultaParametroEliminar($id_componente, 'agregar_registro');\n }\n \n // para que llame al archivo RegistroBaja.php y realice tareas especiales. No sirve agregarlo como valor predefinido.\n $componente_carga->consultaParametro($id_componente, 'eliminacion_especial', 's');\n \n // para que no muestre las cantidades en el link de la tabla relacionada\n $componente_carga->consultaParametro($id_componente, 'link_a_grupo_cantidad', 'n');\n }", "title": "" }, { "docid": "7dca30f7a7ca22c706f22e3afe823e44", "score": "0.65279484", "text": "public function alta(){\n\t\t$db['tarjetas']\t\t= $this->m_model->getRegistros($this->_session_data['id_ente'], 'id_ente');\n\t\t$db['afiliados']\t= $this->m_afiliados->getAfiliados($this->_session_data['id_ente']);\n\t\t\n\t\t$this->armar_vista('alta', $db);\n\t}", "title": "" }, { "docid": "cb09d394714b5fcca270a6812c9a64bb", "score": "0.6472353", "text": "private function criarContas()\n {\n // Aqui será aproveitado da seeders para gente ter contas\n $contaLojista = new CriarContaLojista();\n $contaLojista->run();\n $this->uuidContaLojista = $contaLojista->getUuid();\n\n $contaComum = new CriarContaComum();\n $contaComum->run();\n $this->uuidContaComum = $contaComum->getUuid();\n\n $contaComum = new CriarContaComumAdicional();\n $contaComum->run();\n $this->uuidContaComumAdicional = $contaComum->getUuid();\n }", "title": "" }, { "docid": "5ac17745d038ab76e5460e9885a2739a", "score": "0.6430491", "text": "function insert() {\n\t\t$centinela = new Centinela();\n\t\t$flag = $centinela->accessTo('conf/conf_cafeterias');\n\t\tif ( $flag ) {\n\t\t\t$result = $this->conn->insert ();\n\t\t\tdie ( \"{success : $result}\" );\n\t\t} else {\n\t\t\t$this->redirectError ();\n\t\t}\n\t}", "title": "" }, { "docid": "7b32fdb8170f92d65b77653e999a533f", "score": "0.64264625", "text": "public function insertar()\n\t{\n\t\t$ultimo_id = 0;\n\t\t//Defino el arreglo de campos a insertar\n\t\t$sql_campos_insert=array();\n\t\t//Defino el arreglo de valores a insertar\n\t\t$sql_valores_insert=array();\n\t\t//Descripcion para la auditoria\n\t\t$descripcion=array();\n\t\t\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> prd_nombre) and !is_null($this -> prd_nombre))\n\t\t{\n\t\t\t//Lo agrego a los campos a insertar\n\t\t\t$sql_campos_insert[]=\"prd_nombre\";\n\t\t\t\n\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\tif(isset($this -> prd_nombre_tipo) and !empty($this -> prd_nombre_tipo))\n\t\t\t{\n\t\t\t\tswitch($this -> prd_nombre_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_valores_insert[]= $this -> prd_nombre;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el insert sea efectivo\n\t\t\telse\n\t\t\t\t$sql_valores_insert[]= \"'\".$this -> prd_nombre.\"'\";\n\t\t\t\t\n\t\t}\n\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> prd_descripcion) and !is_null($this -> prd_descripcion))\n\t\t{\n\t\t\t//Lo agrego a los campos a insertar\n\t\t\t$sql_campos_insert[]=\"prd_descripcion\";\n\t\t\t\n\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\tif(isset($this -> prd_descripcion_tipo) and !empty($this -> prd_descripcion_tipo))\n\t\t\t{\n\t\t\t\tswitch($this -> prd_descripcion_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_valores_insert[]= $this -> prd_descripcion;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el insert sea efectivo\n\t\t\telse\n\t\t\t\t$sql_valores_insert[]= \"'\".$this -> prd_descripcion.\"'\";\n\t\t\t\t\n\t\t}\n\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> prd_texto) and !is_null($this -> prd_texto))\n\t\t{\n\t\t\t//Lo agrego a los campos a insertar\n\t\t\t$sql_campos_insert[]=\"prd_texto\";\n\t\t\t\n\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\tif(isset($this -> prd_texto_tipo) and !empty($this -> prd_texto_tipo))\n\t\t\t{\n\t\t\t\tswitch($this -> prd_texto_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_valores_insert[]= $this -> prd_texto;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el insert sea efectivo\n\t\t\telse\n\t\t\t\t$sql_valores_insert[]= \"'\".$this -> prd_texto.\"'\";\n\t\t\t\t\n\t\t}\n\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> prd_imagen) and !is_null($this -> prd_imagen))\n\t\t{\n\t\t\t//Lo agrego a los campos a insertar\n\t\t\t$sql_campos_insert[]=\"prd_imagen\";\n\t\t\t\n\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\tif(isset($this -> prd_imagen_tipo) and !empty($this -> prd_imagen_tipo))\n\t\t\t{\n\t\t\t\tswitch($this -> prd_imagen_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_valores_insert[]= $this -> prd_imagen;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el insert sea efectivo\n\t\t\telse\n\t\t\t\t$sql_valores_insert[]= \"'\".$this -> prd_imagen.\"'\";\n\t\t\t\t\n\t\t}\n\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> prd_activo) and !is_null($this -> prd_activo))\n\t\t{\n\t\t\t//Lo agrego a los campos a insertar\n\t\t\t$sql_campos_insert[]=\"prd_activo\";\n\t\t\t\n\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\tif(isset($this -> prd_activo_tipo) and !empty($this -> prd_activo_tipo))\n\t\t\t{\n\t\t\t\tswitch($this -> prd_activo_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_valores_insert[]= $this -> prd_activo;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el insert sea efectivo\n\t\t\telse\n\t\t\t\t$sql_valores_insert[]= \"'\".$this -> prd_activo.\"'\";\n\t\t\t\t\n\t\t}\n\n\n\n\t\t//Si el arreglo de campos tiene posiciones\n\t\tif(sizeof($sql_campos_insert))\n\t\t{\n\t\t\t//Armo el SQL para ejecutar el Insert\n\t\t\t$sql=\"INSERT INTO producto(\".implode($sql_campos_insert, \", \").\")\n\t\t\t\t\t\t\tVALUES(\".implode($sql_valores_insert, \", \").\")\";\n\t\t\n\t\t\t//Si la ejecucion es exitosa entonces devuelvo el codigo del registro insertado\n\t\t\tif($this -> getConexion() -> Execute($sql))\n\t\t\t{\n\t\t\t\t//Esto NO funciona para postgreSQL\n\t\t\t\t$ultimo_id=$this -> getConexion() -> Insert_ID();\n\t\t\t\t$this -> setPrdId($ultimo_id);\n\t\t\t\t\n\t\t\t\t//Si se encuentra habilitado el log entonces registro la auditoria\n\t\t\t\tif(isset($this -> auditoria_tabla) and $this -> auditoria_tabla and $ultimo_id)\n\t\t\t\t{\n\t\t\t\t\t//Consulto la informacion que se inserto\n\t\t\t\t\t$producto = $this -> consultarId($ultimo_id);\n\t\t\t\t\t$descripcion[]=\"prd_id = \".$producto -> getPrdId();\n\t\t\t\t\t$descripcion[]=\"prd_nombre = \".$producto -> getPrdNombre();\n\t\t\t\t\t$descripcion[]=\"prd_descripcion = \".$producto -> getPrdDescripcion();\n\t\t\t\t\t$descripcion[]=\"prd_texto = \".$producto -> getPrdTexto();\n\t\t\t\t\t$descripcion[]=\"prd_imagen = \".$producto -> getPrdImagen();\n\t\t\t\t\t$descripcion[]=\"prd_activo = \".$producto -> getPrdActivo();\n\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t * instanciacion de la clase auditoria_tabla para la creacion de un nuevo registro\n\t\t\t\t\t */\n\t\t\t\t\t$objAuditoriaTabla = new AuditoriaTabla();\n\t\t\t\t\t$objAuditoriaTabla->crearBD(\"sisgot_adodb\");\n\t\t\t\t\t$objAuditoriaTabla->setAutTabla(\"producto\");\n\t\t\t\t\t$objAuditoriaTabla->setAutTablaId($ultimo_id);\n\t\t\t\t\t$objAuditoriaTabla->setAutUsuId($objAuditoriaTabla -> obtenerUsuarioActual());\n\t\t\t\t\t$objAuditoriaTabla->setAutFecha(\"NOW()\", \"sql\");\n\t\t\t\t\t$objAuditoriaTabla->setAutTransaccion(\"INSERTAR\");\n\t\t\t\t\t$objAuditoriaTabla->setAutDescripcionNueva(implode(\", \", $descripcion));\n\t\t\t\t\t$aut_id=$objAuditoriaTabla->insertar();\n\t\t\t\t\t\n\t\t\t\t\tif(!$aut_id)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"<b>Error al almacenar informacion en la tabla de auditoria_tabla</b><br/>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//return $ultimo_id;\n\t\t\t\t/*\n\t\t\t\t$sql=\"SELECT MAX(prd_id) AS insert_id FROM producto\";\n\t\t\t\t$rs = $this -> getConexion() -> Execute($sql);\n\t\t\t\t$row = $rs->FetchRow();\n\t\t\t\t//return $row[\"insert_id\"];\n\t\t\t\t*/\n\t\t\t}\n\t\t\t//Sino imprimo el error generado\n\t\t\telse\n\t\t\t{\n\t\t\t\techo $this -> getConexion() -> ErrorMsg().\" <strong>SQL: \".$sql.\"<br/>En la linea \".__LINE__.\"<br/></strong>\";\n\t\t\t\t$ultimo_id = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $ultimo_id;\n\t}", "title": "" }, { "docid": "a8b49537e1e6b461efc22447d24ba110", "score": "0.64183176", "text": "public function inserir(){\n\n $sobre = new sobre();\n\n $sobre->historia=$_POST['txt_historia'];\n $sobre->missao=$_POST['txt_missao'];\n $sobre->visao=$_POST['txt_visao'];\n $sobre->valores=$_POST['valores'];\n $sobre->slogan=$_POST['slogan'];\n\n $sobre::Insert($sobre);\n\n }", "title": "" }, { "docid": "df4381fb8446a4b110b009366259baa1", "score": "0.640095", "text": "public function Insertar()\n\t{\n\t\t$tipo_de_usuario = $this -> session -> userdata('tipo_de_usuario');\n\t\t$logueado \t\t = $this -> session -> userdata('logueado');\n\t\tif($logueado==\"1\")\n\t\t{\n\t\t\t$data = array(\n\t\t\t'nombres' => $this -> input -> post('nombres'),\n\t\t\t'paterno'\t => $this -> input -> post('paterno'),\n\t\t\t'materno' \t => $this -> input -> post('materno'),\n\t\t\t'ci' \t \t => $this -> input -> post('ci'),\n\t\t\t'direccion' => $this -> input -> post('direccion'),\n\t\t\t'telefonos' => $this -> input -> post('telefonos'),\n\t\t\t'celular' \t => $this -> input -> post('celular'),\n\t\t\t'cargo' \t => $this -> input -> post('cargo')\n\t\t\t);\n\t\t\t$Insertar_usuario =\t$this -> Modelo_funcionario -> Insertar($data);\n\t\t\tredirect('Funcionario/Lista');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect('Login/Salir');\n\t\t}\t\n\t}", "title": "" }, { "docid": "87d00e57db4136224715a79e279bc01b", "score": "0.63844097", "text": "function registrarComoTrabajador($cedula, $datos) {\n $datos['cod_interno'] = TEstudiante::cod_interno($cedula);\n DB::query(sql_insert_from_array(Config::get(\"TEgresado\", \"Trabajo\"), $datos));\n }", "title": "" }, { "docid": "d4392045da4ae14b167e813bc1455017", "score": "0.6351733", "text": "function Insertar() {\n echo \"CA:\" . $this->codAsig;\n echo \"CT:\" . $this->codTrab;\n if ($this->codTrab <> '' && $this->codAsig <> '') {\n $sql = \"select * from Trabajo where codTrabajo= '\" . $this->codTrab . \"' and codAsignatura= '\" . $this->codAsig . \"';\";\n\n $resultado = mysql_query($sql);\n if (mysql_num_rows($resultado) == 0) {\n $sql = \"INSERT INTO Trabajo (codTrabajo,codAsignatura,nombreTrabajo,fechaLimiteTrabajo,descripcionTrabajo) VALUES ('\" . $this->codTrab . \"','\" . $this->codAsig . \"','\" . $this->titulo . \"','\" . $this->fechaFinal . \"','\" . $this->descripcion . \"');\";\n mysql_query($sql);\n\t\t\t\techo \"../uploads/\" . substr($this->codTrab,0,strlen($this->codTrab)-strlen($this->titulo)) . \"/\" . $this->codTrab;\n\t\t\t\tmkdir(\"../uploads/\" . substr($this->codTrab,0,strlen($this->codTrab)-strlen($this->titulo)) . \"/\" . $this->codTrab);\n } else {\n echo \"<br> El trabajo con código: \" . $this->codTrab . \" ya existe <br>\";\n }\n echo mysql_error();\n } else {\n echo \"Introduzca un trabajo valido\";\n }\n }", "title": "" }, { "docid": "caf47fb4892c4afe11a9f158f2aa0ab4", "score": "0.6350114", "text": "public function insertCalendario()\r\n {\r\n $atributos=array( $this->nombre , $this->fechainicio , $this->fechafinal , $this->arancel , $this->idcattramite );\r\n //descomentarear la línea siguiente y comentarear la anterior si la llave primaria no es autoincremental\r\n //$atributos=array( $this->idcalendario , $this->nombre , $this->fechainicio , $this->fechafinal , $this->arancel , $this->idcattramite );\r\n\r\n return $this->conexionCalendario->insertarRegistro($atributos);\r\n }", "title": "" }, { "docid": "096d384fd9cbfffdce82d21b50277da6", "score": "0.633924", "text": "public function new_agtx($nomeComercialAgtx, $classeAplicacaoAgtx, $principioAtivoAgtx, $concentracaoAgtx, $formulacaoAgtx, $statusAgtx, $idFabricante, $idFornecedor, $idEmbalagem){\n\n\n $sql = $this->dbh->exec(\"INSERT INTO AgtxUnidade(nomeComercialAgtx, classeAplicacaoAgtx, principioAtivoAgtx, concentracaoAgtx, formulacaoAgtx, statusAgtx, Fabricante_idFabricante,Fornecedor_idFornecedor, Embalagem_idEmbalagem) \nVALUES ('$nomeComercialAgtx', '$classeAplicacaoAgtx', '$principioAtivoAgtx', '$concentracaoAgtx', '$formulacaoAgtx', '$statusAgtx', '$idFabricante', '$idFornecedor', '$idEmbalagem')\");\n $result = $sql->fetch();\n\n $this->dbh = null;\n if($sql){\n echo '<script>alert(\"Agrotoxico cadastrado com sucesso\");</script>';\n } else {\n echo '<script>alert(\"Erro ao cadastrar Agrotoxico\");</script>';\n }\n echo '<script>location.reload();</script>';\n\n\n }", "title": "" }, { "docid": "cb8cb31d62d9c3130794535cbd5f584e", "score": "0.6332", "text": "public function insertacenso(){\n\n\t\t//campos datos personales\n\t\t\n\t\t$ci = $_POST['ci'];\n\t\t$name = $_POST['name'];\n\t\t$ape = $_POST['ape'];\n\t\t$fnac = $_POST['fnac'];\n\t\t$edad = $_POST['edad'];\n\t\t$nac = $_POST['nac'];\n\t\t$edocivil = $_POST['edocivil'];\n\n\t\t//datos de contacto\n\t\t$telfcel = $_POST['telfcel'];\n\t\t$telfhab = $_POST['telfhab'];\n\t\t$telfofic = $_POST['telfofic'];\n\t\t$email = $_POST['email'];\n\n\t\t//DATOS SEXO\n\t\t$sexo = $_POST['sexo'];\n\n\t\t//datos de relacion\n\t\t$embarazo = $_POST['embarazo'];\n\t\t$cne = $_POST['cne_f'];\n\n\t\t//datos de salud\n\t\t$disc = $_POST['disc'];\n\t\t$tipodisc = $_POST['tipodisc'];\n\t\t$pens = $_POST['pens'];\n\t\t$inst = $_POST['inst'];\n\n\t\t//datos financieros\n\t\t$trabaja = $_POST['trabaja'];\n\t\t$tipoing = $_POST['tipoing'];\n\t\t$ingmens = $_POST['ingmens'];\n\n\t\t//datos academicos\n\t\t$nivinstruc = $_POST['nivinstruc'];\n\t\t$profesion = $_POST['profesion'];\n\n\t\t//datos de situacion economica\n\t\t$dond_trabaja = $_POST['donde_trabaja'];\n\t\t$act_economica = $_POST['act_economica'];\n\t\t$ing_familiar = $_POST['ing_familiar'];\n\n\t\t//datos situacion vivienda\n\t\t$condc_terreno = $_POST['condc_terreno'];\n\t\t$tenencia_casa = $_POST['tenencia_casa'];\n\t\t$tipo_vivienda = $_POST['tipo_vivienda'];\n\t\t$habitaciones = $_POST['habitaciones'];\n\t\t$habitaciones1 = $_POST['habitaciones1'];\n\t\t$habitaciones2 = $_POST['habitaciones2'];\n\t\t$habitaciones3 = $_POST['habitaciones3'];\n\t\t$num_habitaciones = $_POST['num_habitaciones'];\n\t\t$ocv = $_POST['ocv'];\n\t\t$terreno_propio = $_POST['terreno_propio'];\n\t\t$tipo_paredes = $_POST['tipo_paredes'];\n\t\t$tipo_techo = $_POST['tipo_techo'];\n\t\t$enseres_vivienda = $_POST['enseres_vivienda'];\n\t\t$enseres_vivienda2 = $_POST['enseres_vivienda2'];\n\t\t$enseres_vivienda3 = $_POST['enseres_vivienda3'];\n\t\t$enseres_vivienda4 = $_POST['enseres_vivienda4'];\n\t\t$enseres_vivienda5 = $_POST['enseres_vivienda5'];\n\t\t$enseres_vivienda6 = $_POST['enseres_vivienda6'];\n\t\t$enseres_vivienda7 = $_POST['enseres_vivienda7'];\n\t\t$enseres_vivienda8 = $_POST['enseres_vivienda8'];\n\t\t$enseres_vivienda9 = $_POST['enseres_vivienda9'];\n\t\t$enseres_vivienda10 = $_POST['enseres_vivienda10'];\n\t\t$plagas = $_POST['plagas'];\n\t\t$plagas2 = $_POST['plagas2'];\n\t\t$plagas3 = $_POST['plagas3'];\n\t\t$plagas4 = $_POST['plagas4'];\n\t\t$plagas5 = $_POST['plagas5'];\n\t\t$animales_domst = $_POST['animales_domst'];\n\t\t$animales_domst2 = $_POST['animales_domst2'];\n\t\t$animales_domst3 = $_POST['animales_domst3'];\n\t\t$animales_domst4 = $_POST['animales_domst4'];\n\t\t$animales_domst5 = $_POST['animales_domst5'];\n\t\t$animales_domst6 = $_POST['animales_domst6'];\n\t\t$animales_domst7 = $_POST['animales_domst7'];\n\t\t$SIVIH = $_POST['SIVIH'];\n\t\t$sivih_inscripcion = $_POST['sivih_inscripcion'];\n\t\t$ley_phab = $_POST['ley_phab'];\n\t\t$salubridad_vivienda = $_POST['salubridad_vivienda'];\n\t\t$tipo_ayuda_casa = $_POST['tipo_ayuda_casa'];\n\t\t$descrip_ayuda_casa = $_POST['tipo_ayuda_casa'];\n\n\t\t//DATOS CONDICION_SALUD\n\n\t\t$pers_enfermedades = $_POST['pers_enfermedades'];\n\t\t$pers_enfermedades1 = $_POST['pers_enfermedades1'];\n\t\t$pers_enfermedades2 = $_POST['pers_enfermedades2'];\n\t\t$pers_enfermedades3 = $_POST['pers_enfermedades3'];\n\t\t$pers_enfermedades4 = $_POST['pers_enfermedades4'];\n\t\t$pers_enfermedades5 = $_POST['pers_enfermedades5'];\n\t\t$pers_enfermedades6 = $_POST['pers_enfermedades6'];\n\t\t$pers_enfermedades7 = $_POST['pers_enfermedades7'];\n\t\t$pers_enfermedades8 = $_POST['pers_enfermedades8'];\n\t\t$pers_enfermedades9 = $_POST['pers_enfermedades9'];\n\t\t$otra_enfermedad = $_POST['otra_enfermedad'];\n\t\t$ayuda_enfermo = $_POST['ayuda_enfermo'];\n\t\t$tipo_ayuda_enfermo = $_POST['tipo_ayuda_enfermo'];\n\t\t$pers_exclusion = $_POST['pers_exclusion'];\n\t\t$pers_exclusion1 = $_POST['pers_exclusion1'];\n\t\t$pers_exclusion2 = $_POST['pers_exclusion2'];\n\t\t$pers_exclusion3 = $_POST['pers_exclusion3'];\n\t\t$pers_exclusion4 = $_POST['pers_exclusion4'];\n\t\t$pers_exclusion5 = $_POST['pers_exclusion5'];\n\t\t$cant_exclusion = $_POST['cant_exclusion'];\n\n\t\t//DATOS SITUACION_SERVICIOS\n\t\t$aguas_blancas = $_POST['aguas_blancas'];\n\t\t$posee_tanque = $_POST['posee_tanque'];\n\t\t$litros_tanque = $_POST['litros_tanque'];\n\t\t$posee_pipotes = $_POST['posee_pipotes'];\n\t\t$cant_pipotes = $_POST['cant_pipotes'];\n\t\t$posee_medidor = $_POST['posee_medidor'];\n\t\t$aguas_servidas = $_POST['aguas_servidas'];\n\t\t$gas = $_POST['gas'];\n\t\t$proveedor_gas = $_POST['proveedor_gas'];\n\t\t$cant_cilindros = $_POST['cant_cilindros'];\n\t\t$duración_gas = $_POST['duración_gas'];\n\t\t$precio_gas = $_POST['precio_gas'];\n\t\t$sist_electrico = $_POST['sist_electrico'];\n\t\t$medidor_electrico = $_POST['medidor_electrico'];\n\t\t$bombillos_ahorradores = $_POST['bombillos_ahorradores'];\n\t\t$cant_bombillos = $_POST['cant_bombillos'];\n\t\t$recoleccion_basura = $_POST['recoleccion_basura'];\n\t\t$recoleccion_basura1 = $_POST['recoleccion_basura1'];\n\t\t$recoleccion_basura2 = $_POST['recoleccion_basura2'];\n\t\t$recoleccion_basura3 = $_POST['recoleccion_basura3'];\n\t\t$recoleccion_basura4 = $_POST['recoleccion_basura4'];\n\t\t$recoleccion_basura5 = $_POST['recoleccion_basura5'];\n\t\t$recoleccion_basura6 = $_POST['recoleccion_basura6'];\n\t\t$telefonia = $_POST['telefonia'];\n\t\t$telefonia1 = $_POST['telefonia1'];\n\t\t$telefonia2 = $_POST['telefonia2'];\n\t\t$telefonia3 = $_POST['telefonia3'];\n\t\t$telefonia4 = $_POST['telefonia4'];\n\t\t$transporte = $_POST['transporte'];\n\t\t$mecan_informacion = $_POST['mecan_informacion'];\n\t\t$mecan_informacion1 = $_POST['mecan_informacion1'];\n\t\t$mecan_informacion2 = $_POST['mecan_informacion2'];\n\t\t$mecan_informacion3 = $_POST['mecan_informacion3'];\n\t\t$mecan_informacion4 = $_POST['mecan_informacion4'];\n\t\t$mecan_informacion5 = $_POST['mecan_informacion5'];\n\t\t$serv_comunales = $_POST['serv_comunales'];\n\t\t$serv_comunales1 = $_POST['serv_comunales1'];\n\t\t$serv_comunales2 = $_POST['serv_comunales2'];\n\t\t$serv_comunales3 = $_POST['serv_comunales3'];\n\t\t$serv_comunales4 = $_POST['serv_comunales4'];\n\t\t$serv_comunales5 = $_POST['serv_comunales5'];\n\t\t$serv_comunales6 = $_POST['serv_comunales6'];\n\t\t$serv_comunales7 = $_POST['serv_comunales7'];\n\t\t$serv_comunales8 = $_POST['serv_comunales8'];\n\t\t$serv_comunales9 = $_POST['serv_comunales9'];\n\t\t$serv_comunales10 = $_POST['serv_comunales10'];\n\t\t$serv_comunales11 = $_POST['serv_comunales11'];\n\t\t$serv_comunales12 = $_POST['serv_comunales12'];\n\n\n\t\t//DATOS PARTICIPACION COMUNITARIA\n\t\t$org_comunitarias = $_POST['org_comunitarias'];\n\t\t$name_organizacion = $_POST['name_organizacion'];\n\t\t$participa_org = $_POST['participa_org'];\n\t\t$name_mision = $_POST['name_mision'];\n\t\t$name_mision1 = $_POST['name_mision1'];\n\t\t$name_mision2 = $_POST['name_mision2'];\n\t\t$name_mision3 = $_POST['name_mision3'];\n\t\t$name_mision4 = $_POST['name_mision4'];\n\t\t$name_mision5 = $_POST['name_mision5'];\n\t\t$name_mision6 = $_POST['name_mision6'];\n\t\t$familiar_org = $_POST['familiar_org'];\n\t\t$otra_mision = $_POST['otra_mision'];\n\t\t$pueblo_pregunta1 = $_POST['pueblo_pregunta1'];\n\t\t$pueblo_pregunta2 = $_POST['pueblo_pregunta2'];\n\t\t$pueblo_pregunta3 = $_POST['pueblo_pregunta3'];\n\t\t$pueblo_pregunta4 = $_POST['pueblo_pregunta4'];\n\t\t$pueblo_pregunta5 = $_POST['pueblo_pregunta5'];\n\t\t$pueblo_pregunta6 = $_POST['pueblo_pregunta6'];\n\t\t$pueblo_pregunta7 = $_POST['pueblo_pregunta7'];\n\t\t$pueblo_pregunta8 = $_POST['pueblo_pregunta8'];\n\t\t$pueblo_pregunta9 = $_POST['pueblo_pregunta9'];\n\t\t$pueblo_pregunta10 = $_POST['pueblo_pregunta10'];\n\t\t$pueblo_pregunta11 = $_POST['pueblo_pregunta11'];\n\t\t$pueblo_pregunta_final = $_POST['pueblo_pregunta_final'];\n\t\t$pueblo_pregunta_final1 = $_POST['pueblo_pregunta_final1'];\n\t\t$pueblo_pregunta_final2 = $_POST['pueblo_pregunta_final2'];\n\t\t$pueblo_pregunta_final3 = $_POST['pueblo_pregunta_final3'];\n\t\t$pueblo_pregunta_final4 = $_POST['pueblo_pregunta_final4'];\n\t\t$pueblo_pregunta_final5 = $_POST['pueblo_pregunta_final5'];\n\t\t$pueblo_pregunta_final6 = $_POST['pueblo_pregunta_final6'];\n\t\t$pueblo_pregunta_final7 = $_POST['pueblo_pregunta_final7'];\n\t\t$pueblo_pregunta_final8 = $_POST['pueblo_pregunta_final8'];\n\t\t$pueblo_pregunta_final9 = $_POST['pueblo_pregunta_final9'];\n\t\t$pueblo_pregunta14=$_POST['pueblo_pregunta14'];\n\t\t$pueblo_pregunta15=$_POST['pueblo_pregunta15'];\n\t\t$otra_area = $_POST['otra_area'];\n\n\t\t//datos del evento censo\n\t\t$fecha_censo=$_POST[\"fecha_evento\"];\n\n\t\t//datos del encuestador\n\t\t$names_encuestador=$_POST['names_encuestador'];\n\t\t$fecha_evento=$_POST['fecha_evento'];\n\n\t\t//datos del encuestado\n\t\t$names_encuestado=$_POST['names_encuestado'];\n\t\t$ced_encuestado=$_POST['ced_encuestado'];\n\t\t$idjefe =$_POST[\"id_jefe\"];\n\n\t\t\n\n\t\t//DATOS DEL EVENTO CENSO\n\t\t$sql = \"INSERT INTO censos(FECHA_CENSO,HORA_CENSO,ID_JEFE)\n\t\t VALUES('$fecha_censo',now(),'$idjefe');\";\n\t\t\n\t\t//datos del jefe de familia\n\t\t$sql .= \"INSERT INTO datos_personales(CI,NOMBRE,APELLIDO,F_NAC,EDAD)\n\t\t VALUES('$ci','$name','$ape','$fnac','$edad');\";\n\t\t\n\t\t$sql .= \"INSERT INTO datos_contacto(TLF_CEL,TLF_HAB,TLF_OFI,EMAIL,ID_JEFE)\n\t\t VALUES('$telfcel','$telfhab','$telfofic','$email','$idjefe');\";\n\t\t \n\t\t\n\t\t$sql .= \"INSERT INTO datos_relacion(EMBARAZO,CNE,SEXO,EDOCIVIL,NACIONALIDAD,ID_JEFE)\n\t\t VALUES('$embarazo','$cne','$sexo','$edocivil','$nac','$idjefe');\";\n\t\t\n\t\t$sql .= \"INSERT INTO datos_salud(DISCAPACIDAD,TIPO_DISCAPACIDAD,PENSIONADO,INSTITUCION,ID_JEFE)\n\t\t VALUES('$disc','$tipodisc','$pens','$inst','$idjefe');\";\n\t\t\n\t\t$sql .= \"INSERT INTO datos_finanzas(TRABAJA,TIPO_INGRESO,INGRESO_MENSUAL,ID_JEFE)\n\t\t VALUES('$trabaja','$tipoing','$ingmens','$idjefe');\";\n\t\t\n\t\t$sql .= \"INSERT INTO datos_academicos(PROFESION,NIV_INSTRUCCION,ID_JEFE)\n\t\t VALUES('$profesion','$nivinstruc','$idjefe');\";\n\t\t\n\t\t$sql .= \"INSERT INTO datos_encuestado(NOMBRES,CEDULA,ENCUESTADOR,ID_JEFE)\n\t\t VALUES('$names_encuestado','$ced_encuestado','$names_encuestador','$idjefe');\";\n\n\n\n\t \t//querys para los familiares\n\t\t\n\t\tfor ($i=0; $i <count($_POST[\"namepaef\"]); $i++) { \n\t\t\n\t\t//datos del miembro de familia\n\t\t$namepaef = $_POST['namepaef'][$i];\n\t\t$cedf = $_POST['cedf'][$i];\n\t\t$sexof = $_POST['sexof'][$i];\n\t\t$fchanacf = $_POST['fchanacf'][$i];\n\t\t$edadf = $_POST['edadf'][$i];\n\t\t$instrcf = $_POST['instrcf'][$i];\n\t\t$profesf = $_POST['profesf'][$i];\n\t\t$ingmnsf = $_POST['ingmnsf'][$i];\n\t\t$parntscf = $_POST['parntscf'][$i];\n\t\t$cnef = $_POST['cnef'][$i];\n\t\t$embrzf = $_POST['embrzf'][$i];\n\t\t$discpf = $_POST['discpf'][$i];\n\t\t$pensf = $_POST['pensf'][$i];\n\n\t\t$sql .= \"INSERT INTO datos_familiares(NOMBRES_F,CEDULA_F,SEXO_F,FECHANAC_F,EDAD_F,ID_JEFE) VALUES('$namepaef','$cedf','$sexof','$fchanacf','$edadf','$idjefe');\";\n\t\t\t\n\t\t$sql .= \"INSERT INTO familiar_academico(GRADO_INSTRUCCION_F,PROFESION_F,ID_JEFE) VALUES('$instrcf','$profesf','$idjefe');\";\n\t\t\t\n\t\t$sql .= \"INSERT INTO familiar_finanzas(INGMENSUAL_F,ID_JEFE) VALUES('$ingmnsf','$idjefe');\";\n\t\t\t\n\t\t$sql .= \"INSERT INTO familiar_relacion(PARENTESCO_F,CNE_F,ID_JEFE) VALUES('$parntscf','$cnef','$idjefe');\";\n\t\t\n\t\t$sql .= \"INSERT INTO familiar_salud(EMBARAZO_F,DISCAPACIDAD_F,PENSIONADO_F,ID_JEFE) VALUES('$embrzf','$discpf','$pensf','$idjefe');\";\n\t\n\t\t}\n\n\t\t//querys para detalles de vivienda\n\n\t\t$sql .= \"INSERT INTO detalles_vivienda VALUES('','$tipo_vivienda','$habitaciones','$habitaciones1','$habitaciones2','$habitaciones3','$num_habitaciones','$tipo_paredes','$tipo_techo','$enseres_vivienda','$enseres_vivienda2','$enseres_vivienda3','$enseres_vivienda4','$enseres_vivienda5','$enseres_vivienda6','$enseres_vivienda7','$enseres_vivienda8','$enseres_vivienda9','$enseres_vivienda10','$plagas','$plagas2','$plagas3','$plagas4','$plagas5','$animales_domst','$animales_domst2','$animales_domst3','$animales_domst4','$animales_domst5','$animales_domst6','$animales_domst7',$idjefe);\";\n\n\t\t//querys para situacion salud\n\t\t$sql .= \"INSERT INTO condiciones_salud(PERSONA_ENFERMEDAD,PERSONA_ENFERMEDAD1,PERSONA_ENFERMEDAD2,PERSONA_ENFERMEDAD3,PERSONA_ENFERMEDAD4,PERSONA_ENFERMEDAD5,PERSONA_ENFERMEDAD6,PERSONA_ENFERMEDAD7,PERSONA_ENFERMEDAD8,PERSONA_ENFERMEDAD9,OTRA_ENFERMEDAD,AYUDA_ENFERMOS,TIPO_AYUDA,SITUACION_EXCLUSION,SITUACION_EXCLUSION1,SITUACION_EXCLUSION2,SITUACION_EXCLUSION3,SITUACION_EXCLUSION4,SITUACION_EXCLUSION5,CANTIDAD_EXCLUSION,ID_JEFE)\n\t\tVALUES('$pers_enfermedades','$pers_enfermedades1','$pers_enfermedades2','$pers_enfermedades3','$pers_enfermedades4','$pers_enfermedades5','$pers_enfermedades6','$pers_enfermedades7','$pers_enfermedades8','$pers_enfermedades9','$otra_enfermedad','$ayuda_enfermo','$tipo_ayuda_enfermo','$pers_exclusion','$pers_exclusion1','$pers_exclusion2','$pers_exclusion3','$pers_exclusion4','$pers_exclusion5','$cant_exclusion','$idjefe');\";\n\n\t\t//querys para situacion servicios\n\t\t$sql .= \"INSERT INTO situacion_servicios(AGUAS_BLANCAS,MEDIDOR,AGUAS_SERVIDAS,GAS,SISTEMA_ELECTRICO,BOMBILLOS_AHORRADORES,RECOL_BASURA,RECOL_BASURA1,RECOL_BASURA2,RECOL_BASURA3,RECOL_BASURA4,RECOL_BASURA5,RECOL_BASURA6,TELEFONIA,TELEFONIA1,TELEFONIA2,TELEFONIA3,TELEFONIA4,TRANSPORTE,TIPO_INFORMACION,TIPO_INFORMACION1,TIPO_INFORMACION2,TIPO_INFORMACION3,TIPO_INFORMACION4,TIPO_INFORMACION5,SERV_COMUNALES,SERV_COMUNALES1,SERV_COMUNALES2,SERV_COMUNALES3,SERV_COMUNALES4,SERV_COMUNALES5,SERV_COMUNALES6,SERV_COMUNALES7,SERV_COMUNALES8,SERV_COMUNALES9,SERV_COMUNALES10,SERV_COMUNALES11,SERV_COMUNALES12,ID_JEFE)\n\t\tVALUES('$aguas_blancas','$posee_medidor','$aguas_servidas','$gas','$sist_electrico','$bombillos_ahorradores','$recoleccion_basura','$recoleccion_basura1','$recoleccion_basura2','$recoleccion_basura3','$recoleccion_basura4','$recoleccion_basura5','$recoleccion_basura6','$telefonia','$telefonia1','$telefonia2','$telefonia3','$telefonia4','$transporte','$mecan_informacion','$mecan_informacion1','$mecan_informacion2','$mecan_informacion3','$mecan_informacion4','$mecan_informacion5','$serv_comunales','$serv_comunales1','$serv_comunales2','$serv_comunales3','$serv_comunales4','$serv_comunales5','$serv_comunales6','$serv_comunales7','$serv_comunales8','$serv_comunales9','$serv_comunales10','$serv_comunales11','$serv_comunales12','$idjefe');\";\n\n\t\t//querys para participacion comunitaria\n\t\t$sql .= \"INSERT INTO participacion_comunitaria(ORG_COMUNITARIA,DESCRIPCION,PARTICIPA,PARTICIPA_FAMILIAR,MISIONES_COMUNIDAD, MISIONES_COMUNIDAD1,MISIONES_COMUNIDAD2,MISIONES_COMUNIDAD3,MISIONES_COMUNIDAD4,MISIONES_COMUNIDAD5,MISIONES_COMUNIDAD6,OTRA_MISION,ID_JEFE)\n\t\tVALUES('$org_comunitarias','$name_organizacion','$participa_org','$familiar_org','$name_mision','$name_mision1','$name_mision2','$name_mision3','$name_mision4','$name_mision5','$name_mision6','$otra_mision','$idjefe');\";\n\n\t\t$sql .= \"INSERT INTO preguntas_part_comunitaria(P_UNO,P_DOS,P_TRES,P_CUATRO,P_CINCO,P_SEIS,P_SIETE,P_OCHO,P_NUEVE,P_DIEZ,P_ONCE,P_DOCE,P_DOCE1,P_DOCE2,P_DOCE3,P_DOCE4,P_DOCE5,P_DOCE6,P_DOCE7,P_DOCE8,P_DOCE9,P_CATORCE,P_QUINCE,OTRA_AREA,ID_JEFE)\n\t\tVALUES('$pueblo_pregunta1','$pueblo_pregunta2','$pueblo_pregunta3','$pueblo_pregunta4','$pueblo_pregunta5','$pueblo_pregunta6','$pueblo_pregunta7','$pueblo_pregunta8','$pueblo_pregunta9','$pueblo_pregunta10','$pueblo_pregunta11','$pueblo_pregunta_final','$pueblo_pregunta_final1','$pueblo_pregunta_final2','$pueblo_pregunta_final3','$pueblo_pregunta_final4','$pueblo_pregunta_final5','$pueblo_pregunta_final6','$pueblo_pregunta_final7','$pueblo_pregunta_final8','$pueblo_pregunta_final9','$pueblo_pregunta14','$pueblo_pregunta15','$otra_area','$idjefe');\";\n\t\t\t\t\n\n\t\t//querys para la situacion economica\n\t\t$sql .= \"INSERT INTO situacion_economica(DONDE_TRABAJA,PREGUNTA_UNO,ING_FAMILIAR,ID_JEFE)\n\t\t VALUES('$dond_trabaja','$act_economica','$ing_familiar','$idjefe');\";\n\n\t\t//querys para situacion de vivienda\n\t\t$sql .= \"INSERT INTO situacion_vivienda(COND_TERRENO,FORMA_TENENCIA,OCV,TERRENO_PROPIO,SIVIH,CONSTANCIA_SIVIH,COTIZA_LPH,SALUBRIDAD_VIVIENDA,ID_JEFE)\n\t\tVALUES('$condc_terreno','$tenencia_casa','$ocv','$terreno_propio','$SIVIH','$sivih_inscripcion','$ley_phab','$salubridad_vivienda','$idjefe');\";\n\n\t\t$sql .= \"INSERT INTO ayuda_vivienda(TIPO_AYUDA,DESCRIPCION,ID_JEFE)\n\t\t VALUES('$tipo_ayuda_casa','$descrip_ayuda_casa','$idjefe');\";\n\n\t\t$sql .= \"INSERT INTO detalle_servicios(TANQUE,TANQUE_LITROS,PIPOTES,CANT_PIPOTES,PROVEEDOR_GAS,CANT_CILINDROS_GAS,DURACION_GAS,PRECIO_GAS,ID_JEFE)\n\t\tVALUES('$posee_tanque','$litros_tanque','$posee_pipotes','$cant_pipotes','$proveedor_gas','$cant_cilindros','$duración_gas','$precio_gas','$idjefe');\";\n\t\t\n\t\t$sql .= \"INSERT INTO detalles_serv_electrico(MEDIDOR,BOMBILLOS_NECESITA,ID_JEFE)\n\t\t VALUES('$medidor_electrico','$cant_bombillos','$idjefe')\";\n\n\n\t\t//echo $sql;\n\t\t\t\n\n\t\t\tif (mysqli_multi_query(Conecta::conx(), $sql)) {\n\t\t\t\techo \"<script type='text/javascript'>alert('Censo cargado exitosamente');window.location='../vistas/listadocensos.php';</script>\";\n\t\t\t //header('location:../vistas/administra.php');\n\t\t\t} else {\n\t\t\t echo \"Error: \" . $sql . \"<br>\" . mysqli_error(Conecta::conx());\n\t\t\t}\n\n\t\t\tmysqli_close(Conecta::conx());\n\n\n\n\t\t//datos situacion comunidad\n\t\t/*$sql .= \"INSERT INTO situacion_cmunidad(P_UNO,P_DOS,ID_JEFE)\n\t\t VALUES('$pueblo_pregunta14','$pueblo_pregunta15','$idjefe')\";*/\n\n\n\t }", "title": "" }, { "docid": "ae7e9a31f80b718564678fb6e05ac131", "score": "0.6325626", "text": "private function Insertar()\n\t{\n\t\t//$status\t\t\t\t\t = $this->valida->ValidaTexto($_POST['status']);//ejemplo\n\t\t$nombre = null;\n\t\t$descripcion = null;\n\t\t$ideaId \t\t\t\t = $this->valida->ValidaID($_POST['ideaId']);\n\t\tif(isset($_POST['nombre']))\n\t\t\t$nombre\t\t\t\t\t = $this->valida->ValidaNombre($_POST['nombre']);\n\t\tif(isset($_POST['descripcion']))\n\t\t\t$descripcion\t \t\t = $this->valida->ValidaTexto($_POST['descripcion']);\n\t\t$ciudadano_num_afiliacion = $this->valida->ValidaID($_POST['ciudadano_num_afiliacion']);\n\t\t\n\t\t$resultado\t= $this->modelo->Insertar($ideaId,$nombre,$descripcion,/*$status,*/$ciudadano_num_afiliacion);\n\t\t\n\t\tif($resultado){\n\t\t\trequire 'Vista/IdeaInsertada.php';\n\t\t\t$this->modelo->mostrar();\n\t\t}\n\t\telse {\n\t\t\trequire 'Vista/Error.php';\n\t\t}\n\t}", "title": "" }, { "docid": "80ab3253c23464439fc1b387e9d146db", "score": "0.6298375", "text": "function insertar_libro_alumno($tipo = 'alumno')\n{\n global $web, $cveperiodo;\n\n if (!isset($_POST['datos']['cvelibro']) ||\n !isset($_POST['datos']['cvelectura'])) {\n $web->simple_message('danger', 'ERRILA1 No altere la estructura de la interfaz');\n return false;\n }\n\n //verifica que el libro exista\n $libro = $web->getAll('*', array('cvelibro' => $_POST['datos']['cvelibro']), 'libro');\n if (!isset($libro[0])) {\n return $web->simple_message('danger', 'ERRILA2 El libro seleccionado no existe');\n }\n\n //verifica que la cvelectura exista\n $lectura = $web->getLecturaLaboral($_POST['datos']['cvelectura'], $cveperiodo);\n if (!isset($lectura[0])) {\n return $web->simple_message('danger', 'ERRILA3 No se puede continuar con la operación');\n }\n\n $cvelibro = $_POST['datos']['cvelibro'];\n $cvelectura = $_POST['datos']['cvelectura'];\n\n //verifica si el libro ya está registrado para ese alumno\n $libro = $web->checkStudentBook($cvelibro, $cvelectura, $cveperiodo);\n if (isset($libro[0])) {\n return $web->simple_message('danger', 'ERRILA4 El libro ya está para este alumno');\n }\n\n $res = $web->insert('lista_libros', array(\n 'cvelibro'=> $cvelibro, 'cvelectura' => $cvelectura,\n 'cveperiodo' => $cveperiodo, 'cveestado' => '1'\n ));\n if(!$res) {\n $web->simple_message('danger', 'ERRILA5 No fue posible asignar el libro, contacte con el administrador');\n return false;\n }\n\n $redirect = array(\n 'accion' => \"libros\",\n 'info1' => $lectura[0]['letra'],\n 'info2' => $lectura[0]['nocontrol']\n );\n if ($tipo == 'promotor') {\n $redirect['info3'] = $lectura[0]['cvepromotor'];\n }\n header('Location: grupo.php?' . http_build_query($redirect)); die();\n\n}", "title": "" }, { "docid": "3c710db00f69f8a05bba1faa301ef500", "score": "0.6295656", "text": "function insertarSolicitudEfectivoCompleta(){\n\t\t$cone = new conexion();\n\t\t$link = $cone->conectarpdo();\n\t\t$copiado = false;\t\t\t\n\t\ttry {\n\t\t\t$link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n\t\t \t$link->beginTransaction();\n\t\t\t\n\t\t\t/////////////////////////\n\t\t\t// inserta cabecera de la solicitud de compra\n\t\t\t///////////////////////\n\t\t\t\n\t\t\t\n\t\t\t//Definicion de variables para ejecucion del procedimiento\n\t\t\t$this->procedimiento = 'tes.ft_solicitud_efectivo_ime';\n\t\t\t$this->transaccion = 'TES_SOLEFE_INS';\n\t\t\t$this->tipo_procedimiento = 'IME';\n\t\t\t\t\t\n\t\t\t//Define los parametros para la funcion\n\t\t\t$this->setParametro('id_caja','id_caja','int4');\n\t\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\n\t\t\t$this->setParametro('monto','monto','numeric');\n\t\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\t\t\t$this->setParametro('nro_tramite','nro_tramite','varchar');\n\t\t\t$this->setParametro('estado','estado','varchar');\n\t\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t\t$this->setParametro('motivo','motivo','text');\n\t\t\t$this->setParametro('id_funcionario','id_funcionario','int4');\n\t\t\t$this->setParametro('tipo_solicitud','tipo_solicitud','varchar');\n\t\t\t$this->setParametro('fecha','fecha','date');\n\t\t\t\t\t\t\n\t\t\t//Ejecuta la instruccion\n $this->armarConsulta();\t\t\t\n\t\t\t$stmt = $link->prepare($this->consulta);\t\t \n\t\t \t$stmt->execute();\n\t\t\t$result = $stmt->fetch(PDO::FETCH_ASSOC);\t\t\t\t\n\t\t\t\n\t\t\t//recupera parametros devuelto depues de insertar ... (id_obligacion_pago)\n\t\t\t$resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n\t\t\tif ($resp_procedimiento['tipo_respuesta']=='ERROR') {\n\t\t\t\tthrow new Exception(\"Error al ejecutar en la bd\", 3);\n\t\t\t}\n\t\t\t$respuesta = $resp_procedimiento['datos'];\n\t\t\t\n\t\t\t$id_solicitud_efectivo = $respuesta['id_solicitud_efectivo'];\n\t\t\t\n\t\t\t//////////////////////////////////////////////\n\t\t\t//inserta detalle de la solicitud de compra\n\t\t\t/////////////////////////////////////////////\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//decodifica JSON de detalles \n\t\t\t$json_detalle = $this->aParam->_json_decode($this->aParam->getParametro('json_new_records'));\t\t\t\n\t\t\t\n\t\t\t//var_dump($json_detalle)\t;\n\t\t\tforeach($json_detalle as $f){\n\t\t\t\t\n\t\t\t\t$this->resetParametros();\n\t\t\t\t//Definicion de variables para ejecucion del procedimiento\n\t\t\t $this->procedimiento='tes.ft_solicitud_efectivo_det_ime';\n\t\t\t\t$this->transaccion='TES_SOLDET_INS';\n\t\t\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t//modifica los valores de las variables que mandaremos\n\t\t\t\t\n\t\t\t\t$this->arreglo['id_solicitud_efectivo'] = $id_solicitud_efectivo;\n\t\t\t\t$this->arreglo['id_cc'] = $f['id_cc'];\n\t\t\t\t$this->arreglo['id_concepto_ingas'] = $f['id_concepto_ingas'];\n\t\t\t\t$this->arreglo['id_partida_ejecucion'] = $f['id_partida_ejecucion'];\n\t\t\t\t$this->arreglo['estado_reg'] = $f['estado_reg'];\n\t\t\t\t$this->arreglo['monto'] = $f['monto'];\n\t\t\t\t\t\t\n\t\t\t\t//Define los parametros para la funcion\n\t\t\t\t$this->setParametro('id_solicitud_efectivo','id_solicitud_efectivo','int4');\n\t\t\t\t$this->setParametro('id_cc','id_cc','int4');\n\t\t\t\t$this->setParametro('id_concepto_ingas','id_concepto_ingas','int4');\n\t\t\t\t$this->setParametro('id_partida_ejecucion','id_partida_ejecucion','text');\n\t\t\t\t$this->setParametro('estado_reg','estado_reg','numeric');\n\t\t\t\t$this->setParametro('monto','monto','int4');\n\t\t\t\t\n\t\t\t\t//Ejecuta la instruccion\n\t $this->armarConsulta();\n\t\t\t\t$stmt = $link->prepare($this->consulta);\t\t \n\t\t\t \t$stmt->execute();\n\t\t\t\t$result = $stmt->fetch(PDO::FETCH_ASSOC);\t\t\t\t\n\t\t\t\t\n\t\t\t\t//recupera parametros devuelto depues de insertar ... (id_solicitud)\n\t\t\t\t$resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n\t\t\t\tif ($resp_procedimiento['tipo_respuesta']=='ERROR') {\n\t\t\t\t\tthrow new Exception(\"Error al insertar detalle en la bd\", 3);\n\t\t\t\t}\n \n \n }\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//si todo va bien confirmamos y regresamos el resultado\n\t\t\t$link->commit();\n\t\t\t$this->respuesta=new Mensaje();\n\t\t\t$this->respuesta->setMensaje($resp_procedimiento['tipo_respuesta'],$this->nombre_archivo,$resp_procedimiento['mensaje'],$resp_procedimiento['mensaje_tec'],'base',$this->procedimiento,$this->transaccion,$this->tipo_procedimiento,$this->consulta);\n\t\t\t$this->respuesta->setDatos($respuesta);\n\t\t} \n\t catch (Exception $e) {\t\t\t\n\t\t \t$link->rollBack();\n\t\t\t\t$this->respuesta=new Mensaje();\n\t\t\t\tif ($e->getCode() == 3) {//es un error de un procedimiento almacenado de pxp\n\t\t\t\t\t$this->respuesta->setMensaje($resp_procedimiento['tipo_respuesta'],$this->nombre_archivo,$resp_procedimiento['mensaje'],$resp_procedimiento['mensaje_tec'],'base',$this->procedimiento,$this->transaccion,$this->tipo_procedimiento,$this->consulta);\n\t\t\t\t} else if ($e->getCode() == 2) {//es un error en bd de una consulta\n\t\t\t\t\t$this->respuesta->setMensaje('ERROR',$this->nombre_archivo,$e->getMessage(),$e->getMessage(),'modelo','','','','');\n\t\t\t\t} else {//es un error lanzado con throw exception\n\t\t\t\t\tthrow new Exception($e->getMessage(), 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t} \n\t \n\t return $this->respuesta;\n\t}", "title": "" }, { "docid": "417610d84a848916615ca7768a9e0b0e", "score": "0.6294301", "text": "public function insertarEntrada(){\n //Asignamos los valores del formulario (mas la id de sesion del usuario)\n //en el objeto Entrada\n $this->setTitulo($_POST['titulo']);\n $this->setTexto($_POST['enunciado']);\n $this->setFechaEntrada(date('Y-m-d'));\n $this->setID_Usuario($_SESSION['id_usuario']);\n //Realizamos la consulta para crear la entrada\n require_once('bd/consultas.php');\n $consulta = new Consulta();\n $consulta->CrearEntrada($this);\n }", "title": "" }, { "docid": "820f7c52be8a1c1f6fc82725e3ba71f6", "score": "0.6293962", "text": "public function insertarAcc() \n\t{\n\n\t $idInsert = $this->ejercicio_model->getMaxId();\t\n\n\t $datos['id'] =\t$idInsert; \n $datos['enunciado']= $this->input->post('txtaEnunciado');\n $datos['lista_inicial']= $this->input->post('txtlista_inicial');\n $datos['operacion_id']= $this->input->post('txtoperacion_id');\n\t $this->ejercicio_model->crearejercicio($datos); \n \n $codigoEjercicio = $this->input->post('txtaLienas');\n\t $lineas = explode(\"\\n\",$codigoEjercicio);\n\t\n\t $ordenador =1;\n\t \n\t for($i=0; $i < count($lineas) ; $i += 2){\n\t\t \n\t\t//inserta lineas\n\t\t$instruccion= $lineas[$i].\"\\n\";\n\t\t\n\t\tif(($i+1) < count($lineas)){\n\t\t\t$instruccion= $instruccion.$lineas[$i+1].\"\\n\";\t\n\t\t}\n\t\t \n \t$datosLinea['instruccion']= $instruccion;\n \t$datosLinea['ejercicio_id']= $idInsert;\n\t\t$datosLinea['orden']= $ordenador;\n\t\t\n\t\t$this->sentencia_model->crearsentencia($datosLinea); \n\t\t\n\t\t$ordenador++; \n\t }\n \n\t$datos['notificacion'] = 'Se creo el ejercicio exitosamente'; \n\t \n\t$datos['titulo'] = 'Ejercicios'; \n\t \n\t//consultar ejercicio \n\t$data = $this->ejercicio_model->consultarejercicio(); \n\t$datosContenido['data']= $data; \n\t$datosContenido['operaciones'] = $this->operacion_model->consultaroperacion(); \n\t \n\t$datos['contenido'] = $this->load->view('administracion/listarejercicio',$datosContenido,true);\t\t\t \n\t$this->load->view('plantillas/plantilla', $datos);\n\t\t \n\t}", "title": "" }, { "docid": "16226b618bf5192528965e5230a90ec2", "score": "0.62836486", "text": "public function add(){\n\t\t$sql = \"insert into \".self::$tablename.\" (NOMBRE_CORTO,CODIGO,NOMBRE,DESCRIPCION,FOTO,FOTO1,FOTO2,PRECIO,CATEGORIA_ID,GENERO_ID,ES_PUBLICO,EN_EXISTENCIA,INVENTARIO_MIN,ES_DESTACADO,CREADO_EN) \";\n\t\t$sql .= \"value (\\\"$this->NOMBRE_CORTO\\\",\\\"$this->CODIGO\\\",\\\"$this->NOMBRE\\\",\\\"$this->DESCRIPCION\\\",\\\"$this->FOTO\\\",\\\"$this->FOTO1\\\",\\\"$this->FOTO2\\\",\\\"$this->PRECIO\\\",$this->CATEGORIA_ID,$this->GENERO_ID,$this->ES_PUBLICO,$this->EN_EXISTENCIA,$this->INVENTARIO_MIN,$this->ES_DESTACADO,$this->CREADO_EN)\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "52ecde8603aab9d12587e29a4127dce1", "score": "0.62809056", "text": "public function Insertar(){\n\t\t$result = mysqli_query($this->conn,\"\n\t\t\tINSERT INTO `tareas` (`idtareas`, `nombre`, `urltarea`, `calificacion`, `estado`, `idestudiante`, `valor`, `descripcion`, `fecha_creacion`, `fecha_vencimiento`, `idprofesor`) VALUES \n\t\t\t\t(NULL, \n\t\t\t\t'$this->nombre', \n\t\t\t\tNULL, \n\t\t\t\t'$this->calificacion', \n\t\t\t\t'$this->estado', \n\t\t\t\t'$this->idestudiante', \n\t\t\t\t'$this->valor', \n\t\t\t\t'$this->descripcion', \n\t\t\t\t'$this->fecha_creacion', \n\t\t\t\t'$this->fecha_vencimiento', \n\t\t\t\t 1)\n\t\t\t\") or die(mysqli_error($this->conn));\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "419436c1150bd0d6e09a6fb0826ef49d", "score": "0.6279825", "text": "function insertDadosIniciais($data){\n\t\t$CI = getCI();\n\t\t$insert = array(\n\t\t\t'administrador_id' => $data['administrador_id'],\n\t\t\t'candidato_vaga_id' => $data['candidato_vaga_id']\n\t\t);\n\t\t$model = \"{$data['proximo_passo_nome']}_model\";\n\t\t$CI->load->model($model);\n\t\t$CI->$model->insert($insert);\n\t\treturn;\n\t}", "title": "" }, { "docid": "790d99542c5fcadef2da5f29fa954af1", "score": "0.6278959", "text": "public function insertCartaoConvite() {\n }", "title": "" }, { "docid": "2992866c5ef4521b3f1b84bce25472f0", "score": "0.6270673", "text": "static public function agregarCategoria($datos,$tabla){\n $stmt=Conexion::conectar()->prepare(\"INSERT INTO $tabla (nom_categoria,tipo_categoria,descripcion_categoria,fecha_categoria,id_usuario) VALUES (:nombre,:tipo,:descripcion,:fecha,:key)\");\n $stmt->bindParam(\":nombre\",$datos[\"nombre\"],PDO::PARAM_STR);\n $stmt->bindParam(\":tipo\",$datos[\"tipo\"],PDO::PARAM_STR);\n $stmt->bindParam(\":descripcion\",$datos[\"descripcion\"],PDO::PARAM_STR);\n $stmt->bindParam(\":fecha\",$datos[\"fecha\"],PDO::PARAM_STR);\n $stmt->bindParam(\":key\",$datos[\"key\"],PDO::PARAM_STR);\n return ($stmt->execute()) ? 'exito':'error';\n $stmt->close();\n }", "title": "" }, { "docid": "f643dde03ab40eb450b839b3bdaefa4f", "score": "0.6256527", "text": "function ADD() {\n\t\tif ( ( $this->IdTrabajo <> '' && $this->login <> '' ) ) { // si el atributo clave de la entidad no esta vacio\n \n\t\t\t// construimos el sql para buscar esa clave en la tabla\n\t\t\t$sql = \"SELECT * FROM NOTA_TRABAJO WHERE ( login = '$this->login' && IdTrabajo = '$this->IdTrabajo')\";//Se construye la sentencia sql\n\n\t\t\tif ( !$result = $this->mysqli->query( $sql ) ) { // si da error la ejecución de la query\n\t\t\t\treturn 'No se ha podido conectar con la base de datos'; // error en la consulta (no se ha podido conectar con la bd). Devolvemos un mensaje que el controlador manejara\n\t\t\t} else { // si la ejecución de la query no da error\n\n\t\t\t\t if($result->num_rows ==1){//miramos si el numero de tuplas es uno\n return \"ya está almacenada esta nota\";\n }\n else{//si el numero de tuplas no es uno\n\t\t\t\t\t\t\t$sql = \"INSERT INTO NOTA_TRABAJO (\n\t\t\t\t\t\t\t login,\n IdTrabajo,\n\t\t\t\t\t\t\t NotaTrabajo\n\t\t\t\t\t ) \n\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t'$this->login',\n\t\t\t\t\t\t\t\t'$this->IdTrabajo',\n\t\t\t\t\t\t\t\t'$this->NotaTrabajo'\n\t\t\t\t\t\t\t\t)\";//Se construye la sentencia sql de inserción\n\t\t\t\t\t\t\t\n \n }\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\n\t\t\t\t\tif ( !$this->mysqli->query( $sql )) { // si da error en la ejecución del insert devolvemos mensaje\n\t\t\t\t\t\treturn 'Error en la inserción';\n\t\t\t\t\t} else { //si no da error en la insercion devolvemos mensaje de exito\n\t\t\t\t\t\treturn 'Inserción realizada con éxito'; //operacion de insertado correcta\n\t\t\t\t\t}\n\t\t\t\n\t\t} else { // si el atributo clave de la bd es vacio solicitamos un valor en un mensaje\n\t\t\treturn 'Introduzca un valor'; // introduzca un valor para el usuario\n\t\t}\n\t}", "title": "" }, { "docid": "9cc9bbc52bd7079bd49fb6d917fa3af9", "score": "0.6244266", "text": "function insertarProcesoCaja(){\n\t\t$this->procedimiento='tes.ft_proceso_caja_ime';\n\t\t$this->transaccion='TES_REN_INS';\n\t\t$this->tipo_procedimiento='IME';\n\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('id_comprobante_diario','id_comprobante_diario','int4');\n\t\t$this->setParametro('nro_tramite','nro_tramite','varchar');\n\t\t$this->setParametro('tipo','tipo','varchar');\n\t\t$this->setParametro('motivo','motivo','text');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('fecha_fin','fecha_fin','date');\n\t\t$this->setParametro('id_caja','id_caja','int4');\n\t\t$this->setParametro('fecha','fecha','date');\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\t\t$this->setParametro('monto','monto','numeric');\n\t\t$this->setParametro('id_comprobante_pago','id_comprobante_pago','int4');\n\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\n\t\t$this->setParametro('fecha_inicio','fecha_inicio','date');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "caa79956218fd52488e43c5c0d6d67f9", "score": "0.62359357", "text": "protected function agregar_cuenta($datos)\n {\n $sql = self::conectar()->prepare(\"INSERT INTO cuenta(CuentaCodigo, CuentaPrivilegio\t, CuentaUsuario, CuentaClave, CuentaEmail,\n CuentaEstado, CuentaTipo, CuentaGenero, CuentaFoto) \n VALUES(:codigo,:privilegio,:user,:pass,:email,:estado,:tipo,:genero,:foto)\");\n $sql->execute(array(\n \":codigo\" => $datos[\"codigo\"],\n \":privilegio\" => $datos[\"privilegio\"],\n \":user\" => $datos[\"user\"],\n \":pass\" => $datos[\"pass\"],\n \":email\" => $datos[\"email\"],\n \":estado\" => $datos[\"estado\"],\n \":tipo\" => $datos[\"tipo\"],\n \":genero\" => $datos[\"genero\"],\n \":foto\" => $datos[\"foto\"]\n ));\n return $sql;\n }", "title": "" }, { "docid": "126e11020a530ad95a8ade3dc8c608fb", "score": "0.6235667", "text": "function alta($ciclo,$fechasCiclo){\n\t\t$all_query_ok=true;\n\n\t\t$this->mysqli->autocommit(FALSE);\n\n\t\t$query = $this->mysqli->prepare(\n\t\t\t'INSERT INTO cicloescolar(cicl_nombre,cicl_inciio,cicl_fin)\n\t\t\t VALUES(?,?,?)'\n\t\t);\n\t\t$query->bind_param(\"sss\",$ciclo,$fechasCiclo[0],$fechasCiclo[count($fechasCiclo)-1]);\n\t\t$query->execute()? null : $all_query_ok=false;\n\t\t$last_id = $this->mysqli->insert_id;\n\n\n\t\t$query = $this->mysqli->prepare(\n\t\t\t'INSERT INTO fechas_del_ciclo(cicl_id,fecl_fecha)\n\t\t\t VALUES(?,?)');\n\n\t\tforeach($fechasCiclo as $fecha){\n\t\t\t$query->bind_param(\"is\",$last_id,$fecha);\n\t\t\t$query->execute()? null : $all_query_ok=false;\n\t\t}\n\n\t\t$all_query_ok ? $this->mysqli->commit() : $this->mysqli->rollback();\n\n\t\t//si todo salio bien\n\t\treturn $all_query_ok;\n\n\t}", "title": "" }, { "docid": "c9ce7705d4a7fb2d174ce3c92ae4ed6a", "score": "0.6231045", "text": "function alta($cicloEscolar,$curso,$seccion){\n\t\t$all_query_ok=true;\n\n\t\t$query = $this->mysqli->prepare(\n\t\t'INSERT INTO lista(cicl_id,curs_id,alcu_seccion)\n\t\t\tVALUES(?,?,?)');\n\t\t$query->bind_param(\"iis\",$cicloEscolar,$curso,$seccion);\n\n\t\t$query->execute()? null : $all_query_ok=false;\n\n\t\treturn $all_query_ok;\n\n\t}", "title": "" }, { "docid": "4fa166418305913ccb3fb9ad1368f6ab", "score": "0.62217927", "text": "public function alta(){\r\n\t\t\tif(!mkdir(\"../Resources/documents/\".$this->idMaquina)){\r\n\t\t\t\t\t\tdie('Fallo al crear las carpetas...');\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\tmysql_query(\"INSERT INTO MAQUINA(idMaq, nSerie, descripMaq, nomMaq, costeMaq) \r\n\t\t\t\t\t\tVALUES ('$this->idMaquina','$this->numeroSerie','$this->descripcionMaquina','$this->nombreMaquina',\r\n\t\t\t\t\t\t'$this->costeMaquina')\") or die(mysql_error());\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t}", "title": "" }, { "docid": "3daa7ab4b66f78ffb6414395370613a4", "score": "0.6218766", "text": "function Insertar_acuerdos_interfaz($id, $divisa, $interfaz, $fecha_desde, $fecha_hasta){\r\n\r\n\t\t$conexion = $this ->Conexion;\r\n\r\n\r\n\r\n\t\t//----------------------------------------------------\r\n\t\t//INSERTAMOS EL ACUERDO (TODAS LAS TABLAS)\r\n\t\t//----------------------------------------------------\r\n\r\n\t\t//HIT_ACUERDOS\r\n\t\tif($divisa == null){\r\n\t\t\t$divisa = 'EUR';\r\n\t\t}else{\r\n\t\t\t$datos_divisa =$conexion->query(\"SELECT codigo from hit_divisas where codigo_corto= '\".$divisa.\"'\");\r\n\t\t\t$odatos_divisa = $datos_divisa->fetch_assoc();\r\n\t\t\t$divisa= $odatos_divisa['codigo'];\r\n\t\t\tif($divisa == null){\r\n\t\t\t\t$divisa = 'EUR';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$datos_hay_acuerdo =$conexion->query(\"select count(*) cantidad from hit_alojamientos_acuerdos where id = \".$id.\" and acuerdo between 6000 and 6999\");\r\n\t\t$odatos_hay_acuerdo = $datos_hay_acuerdo->fetch_assoc();\r\n\t\t$hay_acuerdo= $odatos_hay_acuerdo['cantidad'];\r\n\r\n\t\tif($hay_acuerdo == 0){\r\n\t\t\t$numero_acuerdo = 6000;\r\n\t\t}else{\r\n\t\t\t$datos_numero_acuerdo =$conexion->query(\"select acuerdo+1 numero from hit_alojamientos_acuerdos where id = \".$id.\" and acuerdo between 6000 and 6999\");\r\n\t\t\t$odatos_numero_acuerdo = $datos_numero_acuerdo->fetch_assoc();\r\n\t\t\t$numero_acuerdo= $odatos_numero_acuerdo['numero'];\r\n\t\t}\r\n\r\n\r\n\t\t$query = \"INSERT INTO hit_alojamientos_acuerdos (ID, ACUERDO, INTERFAZ, TIPO, SITUACION, FECHA_DESDE, FECHA_HASTA, DIAS_ENTRADA, DESCRIPCION, CORRESPONSAL, CARACTERISTICA_BASE, DIVISA) VALUES (\";\r\n\t\t$query .= \"'\".$id.\"',\";\r\n\t\t$query .= $numero_acuerdo.\",\";\r\n\t\t$query .= \"'\".$interfaz.\"',\";\r\n\t\t$query .= \"'I',\";\r\n\t\t$query .= \"'A',\";\r\n\t\t$query .= \"'\".$fecha_desde.\"',\";\r\n\t\t$query .= \"'\".$fecha_hasta.\"',\";\r\n\t\t$query .= \"'LMXJVSD',\";\r\n\t\t$query .= \"'CONTRATO AUTOMATICO RESTEL',\";\r\n\t\t$query .= \"220,\";\r\n\t\t$query .= \"'DST',\";\r\n\t\t$query .= \"'\".$divisa.\"')\";\r\n\r\n\t\t$resultadoi =$conexion->query($query);\r\n\r\n\t\tif ($resultadoi == FALSE){\r\n\t\t\t$respuesta = 'No se ha podido insertar el acuerdo '.$conexion->error;\r\n\t\t}else{\r\n\r\n\t\t\t$respuesta = 'OK';\r\n\r\n\t\t\t//HIT_PERIODOS\r\n\t\t\t$query = \"INSERT INTO hit_alojamientos_periodos (ID, ACUERDO, TEMPORADA, FECHA_DESDE, FECHA_HASTA, DIAS_RELEASE) VALUES (\";\r\n\t\t\t$query .= \"'\".$id.\"',\";\r\n\t\t\t$query .= $numero_acuerdo.\",\";\r\n\t\t\t$query .= \"'1',\";\r\n\t\t\t$query .= \"'\".$fecha_desde.\"',\";\r\n\t\t\t$query .= \"'\".$fecha_hasta.\"',\";\r\n\t\t\t$query .= \"0)\";\r\n\r\n\t\t\t$resultadoi =$conexion->query($query);\r\n\r\n\t\t\tif ($resultadoi == FALSE){\r\n\t\t\t\t$respuesta = 'No se ha podido insertar el periodo '.$conexion->error;\r\n\t\t\t}else{\r\n\r\n\t\t\t\t$respuesta = 'OK';\r\n\r\n\t\t\t\t//HIT_TEMPORADAS\t\t\t\t\t\t\t\t\r\n\t\t\t\t$query = \"INSERT INTO hit_alojamientos_temporadas (ID, ACUERDO, TEMPORADA, SPTO_AD, SPTO_MP, SPTO_PC, SPTO_TI) VALUES (\";\r\n\t\t\t\t$query .= \"'\".$id.\"',\";\r\n\t\t\t\t$query .= $numero_acuerdo.\",\";\r\n\t\t\t\t$query .= \"'1',\";\r\n\t\t\t\t$query .= \"0,\";\r\n\t\t\t\t$query .= \"0,\";\r\n\t\t\t\t$query .= \"0,\";\r\n\t\t\t\t$query .= \"0)\";\r\n\r\n\t\t\t\t$resultadoi =$conexion->query($query);\r\n\r\n\t\t\t\tif ($resultadoi == FALSE){\r\n\t\t\t\t\t$respuesta = 'No se ha podido insertar la temporada '.$conexion->error;\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\t$respuesta = 'OK';\r\n\r\n\t\t\t\t\t//HIT_USOS\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t$query = \"INSERT INTO hit_alojamientos_usos (ID, ACUERDO, CARACTERISTICA, MINIMO_DETALLE, USO_MINIMO, USO_MINIMO_ADULTOS, USO_MINIMO_NINOS, USO_MINIMO_BEBES, MAXIMO_DETALLE, USO_MAXIMO_PAX, USO_MAXIMO_ADULTOS, USO_MAXIMO_NINOS, USO_MAXIMO_BEBES) VALUES (\";\r\n\t\t\t\t\t$query .= \"'\".$id.\"',\";\r\n\t\t\t\t\t$query .= $numero_acuerdo.\",\";\r\n\t\t\t\t\t$query .= \"'XXX',\";\r\n\t\t\t\t\t$query .= \"1,\";\r\n\t\t\t\t\t$query .= \"1,\";\r\n\t\t\t\t\t$query .= \"1,\";\r\n\t\t\t\t\t$query .= \"0,\";\r\n\t\t\t\t\t$query .= \"0,\";\r\n\t\t\t\t\t$query .= \"4,\";\r\n\t\t\t\t\t$query .= \"9,\";\r\n\t\t\t\t\t$query .= \"9,\";\r\n\t\t\t\t\t$query .= \"2,\";\r\n\t\t\t\t\t$query .= \"2)\";\r\n\r\n\t\t\t\t\t$resultadoi =$conexion->query($query);\r\n\r\n\t\t\t\t\tif ($resultadoi == FALSE){\r\n\t\t\t\t\t\t$respuesta = 'No se ha podido insertar el uso '.$conexion->error;\r\n\t\t\t\t\t}else{\r\n\r\n\t\t\t\t\t\t$respuesta = 'OK';\r\n\r\n\t\t\t\t\t\t//HIT_PRECIOS\t\t\t\t\t\t\r\n\t\t\t\t\t\t$query = \"INSERT INTO hit_alojamientos_precios (ID, ACUERDO, TEMPORADA, HABITACION, CARACTERISTICA, USO) VALUES (\";\r\n\t\t\t\t\t\t$query .= \"'\".$id.\"',\";\r\n\t\t\t\t\t\t$query .= $numero_acuerdo.\",\";\r\n\t\t\t\t\t\t$query .= \"1,\";\r\n\t\t\t\t\t\t$query .= \"'DBL',\";\r\n\t\t\t\t\t\t$query .= \"'XXX',\";\r\n\t\t\t\t\t\t$query .= \"2)\";\r\n\r\n\t\t\t\t\t\t$resultadoi =$conexion->query($query);\r\n\r\n\t\t\t\t\t\tif ($resultadoi == FALSE){\r\n\t\t\t\t\t\t\t$respuesta = 'No se ha podido insertar el precio '.$conexion->error;\r\n\t\t\t\t\t\t}else{\r\n\r\n\t\t\t\t\t\t\t$respuesta = 'OK';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $respuesta;\r\n\r\n\r\n\t}", "title": "" }, { "docid": "802b7bd5874418bcbc029310ad4e3745", "score": "0.6196774", "text": "public function insert() {\n $datos=array(\"descripcionBreve\"=>$this->descripcionBreve,\"descripcionDetallada\"=>$this->descripcionDetallada, \"prioridad\"=>$this->prioridad,\"estado\"=>$this->estado,\"categoria\"=>$this->categoria,\"idCliente\"=>$this->idCliente,\"idEmpleado\"=>$this->idEmpleado);\n try {\n $sentencia=$this->conexion->prepare(\"INSERT INTO Incidencia (descripcionBreve, descripcionDetallada, fecha, prioridad, estado, categoria, idCliente, idEmpleado) \n VALUES (:descripcionBreve, :descripcionDetallada, NOW(), :prioridad, :estado, :categoria, :idCliente, :idEmpleado)\");\n $sentencia->execute($datos);\n $this->conexion=null;\n } catch (PDOException $e) {\n $this->conexion=null;\n }\n }", "title": "" }, { "docid": "c4b6a211a700d747471a4f4606debc84", "score": "0.6194416", "text": "function insertar($tareaNueva) {\r\n $mysql = mysqli_connect(\"localhost\", \"admin\", \"admin\", \"todolist\");//conexion con la bd\r\n $res3 = mysqli_query($mysql, \"INSERT INTO `tareas`(`nomTarea`, `estado`, `usuarioID`) VALUES ($nomTarea,$estado,$usuarioID)\"); //ingreso de tarea por medio de una query\r\n $row = mysqli_fetch_assoc($res);//no es necesario, solo si se hace un 'select'\r\n if (!$res3) {\r\n echo mysqli_error($mysql);\r\n }\r\n }", "title": "" }, { "docid": "9185bfbf1ed3edea4953c4fe25bcdb36", "score": "0.61847425", "text": "function alta_comisiones(){\n\t\t\n\t\tif (isset($_POST['nombre']) && isset($_POST['fecha'])){\n\t\t\t$nombre = $_POST['nombre'];\n\t\t\t$fecha = $_POST['fecha'];\n\t\t} else {\n\t\t\t$this->view->error_param();\n\t\t\tdie;\n\t\t}\n\t\t\t\n\t\t\n\t\t$add = $this->model_comisiones->insert($nombre,$fecha); \n\t\t($add) ? $this->view->action_done() : $this->view->error_param();\n\t\t\n\t}", "title": "" }, { "docid": "eb138d53241e036c11a84e54b9440cf6", "score": "0.618305", "text": "function asignaCuestionario($datos){\n\t\t$query = \"select * from asignacion where cuestionario_id='\".$datos['cuestionario_id'].\"' and grupo_id=\".$datos['grupo_id'];\n\t\t$test = $this->base->queryArrayUnico($query);\n\t\tif($test!=null)return false;\t\t\n\t\t$this->base->generateSQLInsert('asignacion',$datos);\n\t\treturn true;\t\t\n\t}", "title": "" }, { "docid": "ffd14633a5571dc229a157f6065d242d", "score": "0.61825484", "text": "function insertar($datos) {\n $nombreTienda=$datos['NombreTienda'];\n $nombreCatalogo=$datos['Nombre'];\n $nombreCatalogo = str_replace(' ', '_', $nombreCatalogo);\n $RECURSOS=\"../Vista/Recursos/Tienda/\".$nombreTienda.\"/\".$nombreCatalogo;\n mkdir($RECURSOS, 0777);//creacion de una carpeta con el codigo del trabajador\n chmod($RECURSOS, 0777);//cambiando permisos de la carpeta \n $this->guardarImagen($RECURSOS); \n // $this->Bitacora_RegistroLector($nombre, $codigo['codigo'], $fecha, $hora);\n \n $URL=\"http://localhost:8080/TiendaOnline/Vista/Recursos/Tienda/\".$nombreTienda.\"/\".$nombreCatalogo.\"/\".basename($_FILES['PortadaCatalogo']['name']);;\n echo $URL;\n //Inserta la portada\n \t$cx=conectar();\n \n $query1=\"INSERT INTO catalogo(idCatalogo,Tienda_idTienda, nombre,descripcion,portada,fechaInicio,fechaFinal,estado,Paginas) \n VALUES (NULL,{$datos['Tienda']},'{$datos['Nombre']}','{$datos['Descripcion']}','{$URL}','{$datos['FechaInicio']}',\n '{$datos['FechaFin']}',{$datos['Estado']},{$datos['Paginas']});\"; \n echo $query1; \n $resultado1 = mysqli_query($cx,$query1); \n desconectar($cx); \n\t }", "title": "" }, { "docid": "f9fa44a991af8312ca3be5114e82ed41", "score": "0.6181029", "text": "public function inserirDadosBanco(){\n\t \t$sql = \"INSERT INTO pessoas SET nome = :nome, email = :email, endereco = :endereco, telefone = :telefone, descricao = :descricao, habilidades = :habilidades, img = :img \";\n\t \t$sql = $this->pdo->prepare($sql);\n\t \t$sql->bindValue(\":nome\", $this->getNome());\n\t \t$sql->bindValue(\":email\", $this->getEmail());\n\t \t$sql->bindValue(\":endereco\", $this->getEndereco());\n\t \t$sql->bindValue(\":telefone\", $this->getTelefone());\n\t \t$sql->bindValue(\":descricao\", $this->getDescricao());\n\t \t$sql->bindValue(\":habilidades\", $this->getHabilidades());\n\t \t$sql->bindValue(\":img\", $this->getImg());\n\t \t$sql->execute();\t \t\n\n\t \t$this->pegarID($this->getEmail());\n\t}", "title": "" }, { "docid": "6793f495b18d3c3c30982d4a7242d709", "score": "0.61781925", "text": "function registrarAseguradora($datos)\n\t{\n\t\t$this->conectar();\n\t\t//$queryExiste=\"SELECT cve_usu from usuario where tel_usu='\".$datos[3].\"'\";\n\t\t//$existe=$this->select($queryExiste);\n\t\t//$existe->data_seek(0);\n\t\t//$contenido=$existe->cubrid_fetch_array(result)assoc();\n\t\t//echo $queryExiste;\n\n\t\t//if($existe){\n\t\t\t//echo \"hola\";\n\t\t\t//$querysi=\"UPDATE on usuario set \"\n\t\t//}else{\n\t\t\t$this->transaccion();\n\t\t\t$queryx=\"INSERT into aseguradora values(null,'\".$datos[0].\"','\".$datos[1].\"','\".$datos[2].\"','\".$datos[3].\"','\".$datos[4].\"');\";\n\t\t\t\n\t\t\t$this->insertar($queryx);\n\t\t\t$id=$this->lastId();\n\t\t\techo $queryx;\n\t\t\t\n\t\t\t$queryy=\"INSERT into poliza values(null,'\".$datos[5].\"','\".$datos[6].\"','\".$datos[7].\"','\".$datos[8].\"',$id,curdate());\";\n\t\t\techo $queryy;\n\n\t\t\t$this->insertar($queryy);\n\t\t\t$this->commit();\n\t\t\t$this->desconectar();\n\t\t\theader(\"location: aseguradora.php\");\n\t\t//}\n\t\t\n\t}", "title": "" }, { "docid": "d3d94dc53fdc4a3a876e7d6b3a13831d", "score": "0.6158477", "text": "public function insertContato(Contato $contato) { \n $sql = \"INSERT INTO contatos (nome, telefone, celular, email) VALUES (?,?,?,?) \";\n\n $statement = $this->conexao->prepare($sql);\n $statement_dados = array(\n $contato->getNome(),\n $contato->getTelefone(),\n $contato->getCelular(),\n $contato->getEmail()\n );\n\n if($statement->execute($statement_dados))\n echo(\"Inserido com Sucesso\");\n else\n echo(\"Erro ao inserir no BD\");\n\n }", "title": "" }, { "docid": "2dfa2412f633a142f293956b46575514", "score": "0.6154787", "text": "function registrar_contrato($contrato){\n //Se insertan los datos principales del contrato\n $this->db->insert('contratos', $contrato);\n }", "title": "" }, { "docid": "3e0abbfdf32e77f5570fc20e1a58f3f1", "score": "0.61476773", "text": "function insertarCajaDeposito(){\n\t\t$this->procedimiento='tes.ft_proceso_caja_ime';\n\t\t$this->transaccion='TES_DEP_INS';\n\t\t$this->tipo_procedimiento='IME';\n\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria','id_cuenta_bancaria','varchar');\n\t\t$this->setParametro('fecha','fecha','date');\n\t\t$this->setParametro('tipo','tipo','varchar');\n\t\t$this->setParametro('observaciones','observaciones','varchar');\n\t\t$this->setParametro('nro_deposito','nro_deposito','numeric');\n\t\t$this->setParametro('importe_deposito','importe_deposito','numeric');\n\t\t$this->setParametro('origen','origen','varchar');\n\t\t$this->setParametro('tabla','tabla','varchar');\n $this->setParametro('columna_pk','columna_pk','varchar');\n $this->setParametro('columna_pk_valor','columna_pk_valor','int4');\n $this->setParametro('tipo_deposito','tipo_deposito','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "62d430c4922963676a3029bc0aa171c9", "score": "0.6146736", "text": "public function insertar(){\n\n\t\tglobal $db_con;\n\t\ttry{\n\t\t\t$atributos = $this->atributos();\n\t\t\t$sql = \"INSERT INTO \".static::$nombre_tabla.\" (\";\n\t\t\t$sql .= join(\", \", array_keys($atributos));\n\t\t\t$sql .= \") VALUES('\";\n\t\t\t$sql .= join(\"', '\", array_values($atributos));\n\t\t\t$sql .= \"')\";\n\t\t\tif($db_con->query($sql)) { \n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tcatch(Exception $e){\n\t\t echo $e->getMessage();\n\t\t exit;\n\t\t}\n\t}", "title": "" }, { "docid": "beb4dfaab2e937ca0cb5346f2c9ef577", "score": "0.61420804", "text": "function add_comentario ($persona, $comentario, $puntuacion, $idobjeto) {\n\t\t// Funcion que añade un comentario\n\t\t$fecha = date(\"Y-m-d\");\n\t\t$sql = \"INSERT INTO comentarios (idusuario, comentario, puntuacion, idobjeto, fecha) VALUES ('\".$persona.\"', '\".$comentario.\"', \".$puntuacion.\", \".$idobjeto.\", '\".$fecha.\"')\";\n\t\t$resultado = $this -> db -> query($sql);\n\t}", "title": "" }, { "docid": "1acca38fe3de880326e6b1c90a904279", "score": "0.6137592", "text": "public function insertar() {\r\n\t\t$nombre = filter_input(INPUT_POST, \"usuario\");\r\n\t\t$clave = filter_input(INPUT_POST, \"clave\");\r\n\t\t$administrador = isset($_POST['administrador'])?1:0;\r\n\t\t$activo = isset($_POST['activo'])?1:0;\r\n\t\t\r\n\t\t// Comprobacion de usuario existente?\r\n\t\t$usuario_existente = Usuarios::getById($nombre);\r\n\t\tif ( $usuario_existente == NULL ) {\r\n\t\t\t// Usuario no existe\r\n\t\t\t$nuevo_usuario = new Usuario($nombre, $clave, $administrador, $activo);\r\n\t\t\tvar_dump($nuevo_usuario);\r\n\t\t\tUsuarios::insert($nuevo_usuario);\r\n\t\t\t$this->listar();\r\n\t\t} else {\r\n\t\t\t// Usuario ya existe -> ERROR.\r\n\t\t\tView::set(\"error\",[\r\n\t\t\t'mensaje'=> \"Usuario $nombre ya existe\",\r\n\t\t\t'nombre' => $nombre,\r\n\t\t\t'clave' => $clave,\r\n\t\t\t'administrador' => $administrador,\r\n\t\t\t'activo' => $activo ]);\r\n\t\t\tView::render(\"nuevo\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9013f7db5aea6e5f91ce0fc41e05a51e", "score": "0.6135635", "text": "function ADD() {\n\t\tif ( ( $this->IdAccion <> '' ) ) { // si el atributo clave de la entidad no esta vacio\n\n\t\t\t// construimos el sql para buscar esa clave en la tabla\n\t\t\t$sql = \"SELECT * FROM ACCION WHERE ( IdAccion = '$this->IdAccion')\";\n\n\t\t\tif ( !$result = $this->mysqli->query( $sql ) ) { // si da error la ejecución de la query\n\t\t\t\treturn 'No se ha podido conectar con la base de datos'; // error en la consulta (no se ha podido conectar con la bd). Devolvemos un mensaje que el controlador manejara\n\t\t\t} else { // si la ejecución de la query no da error\n if ($result->num_rows == 0){ // miramos si el resultado de la consulta es vacio\n //hacemos la inserción en la base de datos\n\t\t\t\t\t$sql = \"INSERT INTO ACCION (\n\t\t\t\t\t\t\t IdAccion,\n NombreAccion,\n DescripAccion) \n\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t'$this->IdAccion',\n\t\t\t\t\t\t\t\t'$this->NombreAccion',\n\t\t\t\t\t\t\t\t'$this->DescripAccion'\n\t\t\t\t\t\t\t\t)\";\n }\n else{//si no es vacío ya existe en la base de datos\n return 'Ya existe la acción introducida en la base de datos'; // ya existe\n }\n\t\t\t\t\t}\n\t\t\t\t\tif ( !$this->mysqli->query( $sql ) ) { // si da error en la ejecución del insert devolvemos mensaje\n\t\t\t\t\t\treturn 'Error en la inserción';\n\t\t\t\t\t} else { //si no da error en la insercion devolvemos mensaje de exito\n\t\t\t\t\t\treturn 'Inserción realizada con éxito'; //operacion de insertado correcta\n\t\t\t\t\t}\n\n\t\t\t\t} else // si ya existe ese valor de clave en la tabla devolvemos el mensaje correspondiente\n\t\t\t\t\treturn 'Introduzca un valor'; // ya existe\n \n\t}", "title": "" }, { "docid": "53af8c58fa55a704de5f41d54c81eb5d", "score": "0.6135185", "text": "public function insereIngresso(){\n\t\t\t\t$con = $this->conecta(\"localhost\", \"cinema\", \"root\", \"\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t$sth = $con->query(\"\n\t\t\t\t\tSELECT COUNT(*) as total FROM assento_sessao \n\t\t\t\t\tWHERE COD_SESSAO = $this->sessao\");\n\n\t\t\t\t//conta quantos ingressos foram vendidos\n\t\t\t\t$sth->execute();\n\t\t\t\t//$con->exec($assento);\n\t\t\t\t//$rowAssento = $con->query($assento);\n\t\t\t\t//$assento1 = mysqlfetchAll($row)\n\t\t\t\t$rowAssento = $sth->fetchAll();\n\t\t\t\t\n\t\t\t\t$assento = $rowAssento;\n\n\t\t\t\t$sth2 = $con->query(\"\n\t\t\t\t\tSELECT SL.NUMERO_LUGARES as lugarTotal\n\t\t\t\t\tFROM sala as SL, sessao as SS \n\t\t\t\t\tWHERE SS.COD_SESSAO = $this->sessao AND SS.COD_SALA=SL.COD_SALA\n\");\n //Conta quantos lugares há \n\t\t\t\t\n\t\t\t\t$sth2->execute();\n\t\t\t\t$rowSala = $sth2->fetchAll();\n\t\t\t\t\n\t\t\t\t$sala = $rowSala;\n\t\t\t\t\n\t\t\t\n\t\t\t\t//$con->exec($sala);\n\t\t\t\t//$rowSala = $con->query($sala);\n\t\t\t\t\n\t\t\t\tforeach($assento as $lugaresOcupados){\n\t\t\t\t\t\n\t\t\t\t\t$varTotal = $lugaresOcupados['total'];\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tforeach($sala as $totalLugares){\n\t\t\t\t\t\n\t\t\t\t\t$varTotal2 = $totalLugares['lugarTotal'];\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t//faz a comparação, se o número de ingressos vendidos for menor que o nº de assentos a venda é validada\n\t\t\t\tif($varTotal < $varTotal2){\n\t\t\t\t\t\n\t\t\t\t\tif($this->tipoEntrada == 'meia'){\n\t\t\t\t\t\t$valorVenda = $this->valorEntrada/2;\n\t\t\t\t\t}\t\n\t\t\t\t\telse{\n\t\t\t\t\t\t$this->valorVenda = $this->valorEntrada;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\t$con = $this->conecta(\"localhost\", \"cinema\", \"root\", \"\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$sql = <<< SQL\n\t\t\t\t\t\t\tINSERT INTO ingresso (COD_SESSAO, TIPO_ENTRADA, VALOR_VENDA,COD_FUNCIONARIO)\n\t\t\t\t\t\t\tVALUES ($this->sessao, '$this->tipoEntrada', '$this->valorVenda',1) \n\t\t\t\t\t\t\t\nSQL;\n\t\t\t\t\t\t$con->exec($sql);\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t $sql2= <<< SQL\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tINSERT INTO assento_sessao (COD_SESSAO)\n\t\t\t\t\t\t\tVALUES ($this->sessao)\nSQL;\n\t\t\t\t\t\t\t$con->exec($sql2);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$res['resp'] = 1;\n\t\t\t\t\t\t$res['msg'] = \"Venda com sucesso\";\n\t\t\t\t\t\treturn $res;\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception $e){\n\t\t\t\t\t\t$res['resp'] = 0;\n\t\t\t\t\t\t$res['msg'] = $e->getMessage();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t$res['msg'] ='Não Há mais Ingressos';\n\t\t\t\t\treturn $res;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "48af0b0f8272af5ac711bad379ebb6a2", "score": "0.6133675", "text": "function guardar(){\n $id=$this->objUsuarios->getIdUsuario();\n $pass=$this->objUsuarios->getPassword();\n $rol=$this->objUsuarios->getRol();\n $est=$this->objUsuarios->getEstatus();\n\n $objControlConexion = new ControlConexion();\n //se abre la base de datos\n $objControlConexion->abrirBd(\"localhost\", \"root\", \"\", \"mesa_ayuda\");\n $cmdSql=\"INSERT INTO usuarios VALUES('\".$id.\"','\".$pass.\"',\".$rol.\",\".$est.\")\";\n $objControlConexion->ejecutarComandoSql($cmdSql);\n $objControlConexion->cerrarBd();\n\n }", "title": "" }, { "docid": "9b11bf51c2ad0b8069906b4a37e27636", "score": "0.61271954", "text": "public function insertarcontrato($con, $data) {\n $estado = '1';\n\n $sql = \"INSERT INTO \" . $con->dbname . \".pagos_contrato_programa\n (adm_id,cemp_id,pcpr_archivo,pcpr_usu_ingreso,pcpr_estado,pcpr_estado_logico) VALUES\n (:adm_id,:cemp_id,:pcpr_archivo,:pcpr_usu_ingreso,:pcpr_estado,:pcpr_estado)\";\n $command = $con->createCommand($sql);\n $command->bindParam(\":adm_id\", $data['adm_id'], \\PDO::PARAM_INT);\n $command->bindParam(\":cemp_id\", $data['cemp_id'], \\PDO::PARAM_INT);\n $command->bindParam(\":pcpr_archivo\", $data['pcpr_archivo'], \\PDO::PARAM_STR);\n $command->bindParam(\":pcpr_usu_ingreso\", $data['pcpr_usu_ingreso'], \\PDO::PARAM_INT);\n $command->bindParam(\":pcpr_estado\", $estado, \\PDO::PARAM_STR);\n $command->execute();\n $idtable = $con->getLastInsertID($con->dbname . '.pagos_contrato_programa');\n return $idtable;\n }", "title": "" }, { "docid": "49cd4fc9ff06e35f901d7d0a27fbd4f0", "score": "0.612305", "text": "public function insertar()\n {\n\t\t$nombre=$this->request->getPost(\"nombre\");\n\t\t$edad=$this->request->getPost(\"edad\");\n\t\t$tipoanimal=$this->request->getPost(\"tipoanimal\");\n\t\t$descripcion=$this->request->getPost(\"descripcion\");\n\t\t$comida=$this->request->getPost(\"comida\");\n $foto=$this->request->getPost(\"foto\");\n \n //2. Organizar los datos que llegan de las vistas en un arreglo asociativo (las claves deben ser iguales a los campos o atributos de la tabla en BD)\n\n\t\t$datosEnvio=array(\n\t\t\t\"nombre\"=>$nombre,\n\t\t\t\"edad\"=>$edad,\n\t\t\t\"tipoanimal\"=>$tipoanimal,\n\t\t\t\"descripcion\"=>$descripcion,\n\t\t\t\"comida\"=>$comida,\n\t\t\t\"foto\"=>$foto\n );\n \n //3. Utilizar el atributo this->validate del controlador para validar datos\n\n if ($this->validate('animalesPOST')) {\n \n $id=$this->model->insert($datosEnvio);\n return $this->respond($this->model->find($id));\n\n } else {\n\n $validation = \\Config\\Services::validation();\n return $this->respond($validation->getErrors());\n\n }\n \n\n }", "title": "" }, { "docid": "d4026e2bd1f5eaded6d57e9c65cfa44c", "score": "0.61202073", "text": "function insertarCodigosShopper($categoriaItemSh,$fabricanteItemSh,$marcaItemSh,$arreglo) {\n \n $categoria = $this->datos->consultarCategoria($categoriaItemSh);\n $fabricante = $this->datos->consultarFabricante($fabricanteItemSh);\n $marca = $this->datos->consultarMarca($marcaItemSh); \n $cont = 0;\n\n $codigo = 0;\n //$idCategoria = \"\";\n //$idFabricante = \"\";\n //$idMarca = \"\";\n $idItemUso = \"\";\n $idItemPresentacion = \"\";\n $idItemCalorias = \"\";\n $idItemContenido = \"\";\n $idItemUnidades = \"\";\n $idItemVariedad = \"\";\n $idItemEmpaque = \"\";\n $idItemAroma = \"\";\n $idItemSubmarca = \"\";\n $idItemColor = \"\";\n $idItemActProm = \"\";\n\n $idCategoria = $this->datos->consultarIdTablaRegistro($categoria->nombreCategoria, \"categoria\");\n $idFabricante = $this->datos->consultarIdTablaRegistro($fabricante->nombreFabricante, \"fabricante\");\n $idMarca = $this->datos->consultarIdTablaRegistro($marca->nombreMarca, \"marca\");\n\n if (isset($idCategoria->id) && isset($idFabricante->id) && isset($idMarca->id)) {\n\n $codigo = $parte = str_pad($idCategoria->id, 10, \"0\", STR_PAD_LEFT);\n $codigo = $codigo . $parte = str_pad($idFabricante->id, 10, \"0\", STR_PAD_LEFT);\n $codigo = $codigo . $parte = str_pad($idMarca->id, 10, \"0\", STR_PAD_LEFT);\n\n $listaEstructura = $this->datos->consultarTablaCodigosShopper();\n\n foreach ($listaEstructura as $keyEstructura => $valueEstructura) {\n $idItemAtributo = 0;\n $idItemAtributo = $this->datos->retornarInfoAtributo(trim($arreglo[$valueEstructura[\"nombre\"]]), $valueEstructura[\"valor\"], $idCategoria->id, $idFabricante->id, $idMarca->id);\n $codigo = $codigo . $parte = str_pad($idItemAtributo->id, 10, \"0\", STR_PAD_LEFT);\n }\n return $codigo;\n }else {\n return 0;\n }\n }", "title": "" }, { "docid": "0f2bbabb6a73ff3045e68ab3021dccf2", "score": "0.6116153", "text": "public function createAbogados()\n {\n $faker = Faker\\Factory::create('es_AR');\n DB::table('abogados')->insert([\n 'matricula' => rand(1,9999),\n 'nombre' => $faker->lastName.', '.$faker->firstName,\n 'observaciones' => $faker->text(),\n ]);\n }", "title": "" }, { "docid": "68180ae5a837560a816acda00b86d083", "score": "0.6112786", "text": "function insertAyudantes($id_ayudante, $tipo_ayudante, $comentario_ayudante, $id_logisticapasar, $usuario_creador, $fecha_creacion, $fecha_guardado, $coordenadas, $municipio_origen, $estado_origen, $municipio_destino, $estado_destino, $idasigna, $tipo_asignante)\n\t{\n\n\t\tfor ($i = 0; $i < sizeof($id_ayudante); $i++) {\n\n\t\t\t$ver_insert_vin = buscar_principal_ayudantes($id_ayudante[$i], $tipo_ayudante[$i], $id_logisticapasar);\n\n\t\t\tif ($ver_insert_vin == 1) {\n\t\t\t\tif (trim($id_ayudante[$i]) != \"\") {\n\n\t\t\t\t\t$insert_ayudantes = \"INSERT orden_logistica_ayudante (id_colaborador_proveedor, tipo, idorden_logistica, comentarios, visible, usuario_creador, fecha_creacion, fecha_guardado) VALUES ('\" . $id_ayudante[$i] . \"', '\" . $tipo_ayudante[$i] . \"', '$id_logisticapasar', '\" . $comentario_ayudante[$i] . \"', 'SI', '$usuario_creador', '$fecha_creacion', '$fecha_guardado')\";\n\t\t\t\t\t$result_insert_ayudantes = mysql_query($insert_ayudantes);\n\n\t\t\t\t\tif ($result_insert_ayudantes == 1) {\n\n\t\t\t\t\t\tif ($tipo_ayudante[$i] == \"Colaborador\") {\n\n\t\t\t\t\t\t\t#----------------------------------------------------------colocar en Ruta a los ayudantes-------------------------------------------------------------------------------------------\n\t\t\t\t\t\t\t$result_update_colaborador = updateColaboradores($id_ayudante[$i]);\n\n\t\t\t\t\t\t\t#----------------------------------------------------------obtener su nomenclatura y su nombre de el ayudante-------------------------------------------------------------------------------------------\t\t\t\t\n\t\t\t\t\t\t\t$nombre_colaborador = name_usuario($id_ayudante[$i], $tipo_ayudante[$i]);\n\t\t\t\t\t\t\t$esplite_name = explode(\"/\", $nombre_colaborador);\n\n\t\t\t\t\t\t\t#----------------------------------------------------------Insertar Ayudante a bitacora-------------------------------------------------------------------------------------------\n\n\t\t\t\t\t\t\t$bitacora_descripcion = \"Se Agregó a <b>$esplite_name[1]</b> como Acompañante\";\n\t\t\t\t\t\t\t$bitacora_tipo = \"Acompañante\";\n\t\t\t\t\t\t\t$bitacora_valor = \"4\";\n\t\t\t\t\t\t\t$insert_ayudante_bitacora = insertarBitacora($bitacora_descripcion, $bitacora_tipo, $id_logisticapasar, $fecha_creacion, $fecha_guardado, $coordenadas, $bitacora_valor, $usuario_creador);\n\n\t\t\t\t\t\t\t#----------------------------------------------------------(obtener el nombre de el trasladista principal)-------------------------------------------------------------------------------------------\n\n\t\t\t\t\t\t\tif ($idasigna == \"\") {\n\n\t\t\t\t\t\t\t\t$si_lleva_traslatista = \"(Trasladista Pendiente)\";\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t$obtener_name_tras_principal = name_usuario($idasigna, $tipo_asignante);\n\t\t\t\t\t\t\t\t$trim_lleva_trasladista = explode(\"/\", $obtener_name_tras_principal);\n\t\t\t\t\t\t\t\t$si_lleva_traslatista = $trim_lleva_trasladista[1];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t#----------------------------------------------------------insertar notificacion de tipo ayudante a la bitacora-------------------------------------------------------------------------------------------\n\t\t\t\t\t\t\t$bitacora_descripcion_notificacion = \"<b>$esplite_name[1]</b> Acompañaras a <b>$si_lleva_traslatista</b> a un traslado de <b>$municipio_origen, $estado_origen</b> a <b>$municipio_destino, $estado_destino</b> Orden No. <b>$id_logisticapasar</b>\";\n\t\t\t\t\t\t\t$bitacora_tipo = \"Notificación\";\n\t\t\t\t\t\t\t$bitacora_valor = \"2\";\n\n\t\t\t\t\t\t\techo $insert_bitacora_ayudante_notificacion = insertarBitacora($bitacora_descripcion_notificacion, \"Notificación\", $id_logisticapasar, $fecha_creacion, $fecha_guardado, $coordenadas, \"2\", $usuario_creador);\n\t\t\t\t\t\t\techo \"<br>\";\n\n\t\t\t\t\t\t\t$respuesta_insert_ayudantes .= ($result_insert_ayudantes == 1) ? \";\" : \";\" . \" Error con el Ayudante \" . $esplite_name[1] . \";\";\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t#----------------------------------------------------------obtener su nomenclatura y su nombre de el ayudante-------------------------------------------------------------------------------------------\t\t\t\t\n\t\t\t\t\t\t\t$nombre_colaborador = name_usuario($id_ayudante[$i], $tipo_ayudante[$i]);\n\t\t\t\t\t\t\t$esplite_name = explode(\"/\", $nombre_colaborador);\n\t\t\t\t\t\t\t$whatsapp = trim($esplite_name[3]);\n\n\t\t\t\t\t\t\t#----------------------------------------------------------Insertar Ayudante a bitacora-------------------------------------------------------------------------------------------\n\n\t\t\t\t\t\t\t$bitacora_descripcion = \"Se Agregó a <b>$esplite_name[1]</b> como Acompañante\";\n\t\t\t\t\t\t\t$bitacora_tipo = \"Acompañante\";\n\t\t\t\t\t\t\t$bitacora_valor = \"4\";\n\t\t\t\t\t\t\t$insert_ayudante_bitacora = insertarBitacora($bitacora_descripcion, $bitacora_tipo, $id_logisticapasar, $fecha_creacion, $fecha_guardado, $coordenadas, $bitacora_valor, $usuario_creador);\n\n\t\t\t\t\t\t\t$respuesta_insert_ayudantes .= ($insert_ayudante_bitacora == \";\") ? \";\" : \";\" . \"Error con el $tipo_ayudante[$i] \" . $esplite_name[1] . \";\";\n\n\t\t\t\t\t\t\t#----------------------------------------------------------insertar notificacion de tipo ayudante a la bitacora-------------------------------------------------------------------------------------------\n\n\t\t\t\t\t\t\t$bitacora_descripcion = \"<b>$esplite_name[1]</b> usted tiene un número de orden. <b>$id_logisticapasar<b>, de logística para cualquier duda o aclaración.\";\n\t\t\t\t\t\t\t$bitacora_tipo = \"Notificación\";\n\t\t\t\t\t\t\t$bitacora_valor = \"2\";\n\n\t\t\t\t\t\t\t$insert_bitacora_ayudante_notificacion = insertarBitacora($bitacora_descripcion, $bitacora_tipo, $id_logisticapasar, $fecha_creacion, $fecha_guardado, $coordenadas, $bitacora_valor, $usuario_creador);\n\n\n\t\t\t\t\t\t\t$respuesta_insert_ayudantes .= ($result_insert_ayudantes == 1) ? \";\" : \";\" . \" Error con el Ayudante \" . $esplite_name[1] . \";\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$respuesta_insert_ayudantes = $respuesta_insert_ayudantes . $result_update_colaborador . $insert_bitacora_ayudante_notificacion . $insert_ayudante_bitacora;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$respuesta_insert_ayudantes = \";\";\n\t\t\t\t\t}\n\t\t\t\t} #vacio\n\t\t\t} #duplicado \n\t\t} #for \n\n\t\treturn $respuesta_insert_ayudantes;\n\t}", "title": "" }, { "docid": "4d3559533fb88f338beada25ed76fd04", "score": "0.611215", "text": "public function insert($empresa);", "title": "" }, { "docid": "de86b4c25b6ffdcd65b172764f3a1726", "score": "0.61076176", "text": "public function insert($kelasCatatanMapel);", "title": "" }, { "docid": "63cbd494a8f92824dbda2fdfe8352e37", "score": "0.6104711", "text": "function inserir1($data, $status, $descricao, $idCasa, $idTerreno) #Funcionou\n {\n $conexao = new conexao();\n $sql = \"insert into concerto( dataConcerto, statos, descricao, idCasa, idTerreno) \n values('$data', '$status', '$descricao', $idCasa, $idTerreno)\";\n mysqli_query($conexao->conectar(), $sql);\n echo \"<p> Inserido </p>\";\n }", "title": "" }, { "docid": "c2507701d7c31bfbc36d8bcfbdc6638a", "score": "0.6096709", "text": "public function insert ($sobre){\n $sql = \"insert into tbl_pagina_sobre(id_sobre,titulo_sobre,texto_sobre,foto_sobre,titulo_missao_sobre,texto_missao_sobre,foto_missao_sobre,titulo_visao_sobre,texto_visao_sobre,foto_visao_sobre,titulo_valores_sobre,texto_valores_sobre,foto_valores_sobre)\".\n \"VALUES('\" . $sobre->getTitulo_sobre() . \"',\n \". $sobre->getTexto_sobre() .\",\n \". $sobre->getFoto_sobre() .\",\n \". $sobre->getTitulo_missao_sobre() .\",\n \". $sobre->getTexto_missao_sobre() .\",\n \". $sobre->getFoto_missao_sobre() .\",\n \". $sobre->getTitulo_visao_sobre() .\",\n \". $sobre->getTexto_visao_sobre() .\",\n \". $sobre->getFoto_visao_sobre() .\",\n \". $sobre->getTitulo_valores_sobre() .\",\n \". $sobre->getTexto_valores_sobre() .\",\n \". $sobre->getFoto_valores_sobre() .\" \n )\";\n\n //Abrido conexao com o BD\n $PDO_conex = $this->conex->connect_database();\n\n if($PDO_conex->query($sql)){\n echo \"Insert com sucesso\";\n }else{\n echo \"Erro no script de insert\";\n }\n $this->conex->close_database();\n \n }", "title": "" }, { "docid": "97f438098a0edff239583b01381bccaf", "score": "0.6093755", "text": "public function guardarTalla()\n\t{\n\t\t$sql = \"INSERT INTO tallas (unidad,valor,estatus,descripcion) VALUES ('$this->unidad','$this->talla','$this->estatus','$this->descripcion');\";\n\t\t$this->db->consulta($sql);\n\t\t$this->idtallas = $this->db->id_ultimo();\n\t}", "title": "" }, { "docid": "d2fbca02f3391bd793bc71a764007934", "score": "0.6092341", "text": "public function insertCola($datos) {\n \n\t\t$result = $this->db->insert(\"cola\", $datos);\n\t\t$id = $this->db->insert_id();\n\t\treturn $id;\n \n }", "title": "" }, { "docid": "e2ed64d31034d323c3781e542359a5d9", "score": "0.608573", "text": "function insertar_cuentas_compras($id_asiento_compras)\r\n{global $cant_cuentas,$db;\r\n $db->StartTrans();\r\n //insertamos las cuentas_compras\r\n for($g=0;$g<$cant_cuentas;$g++)\r\n {\r\n $numero_cuenta=$_POST[\"nro_cuenta_\".$g];\r\n $monto=$_POST[\"cuenta_\".$g];\r\n\r\n $query=\"insert into cuentas_compras (id_asiento_compras,monto,numero_cuenta)\r\n values($id_asiento_compras,$monto,$numero_cuenta)\";\r\n sql($query,\"<br>Error al insertar cuenta de compras $g\") or fin_pagina();\r\n }\r\n\r\n $db->CompleteTrans();\r\n}", "title": "" }, { "docid": "b883b42c0956d6ef13302fae750e9aae", "score": "0.6078", "text": "private static function insertarTalles($producto) \r\n {\r\n\t\t$id = $producto->id;\r\n\t\t\r\n\t\t$query1 = \"DELETE FROM talles_productos WHERE idProducto = :idProducto\";\r\n\t\t$stmt = DBConnection::getStatement($query1);\r\n\t\t$stmt->bindParam(':idProducto', $id,PDO::PARAM_INT );\r\n\t\t\r\n\t\tif(!$stmt->execute()) {\r\n\t\t\tthrow new Exception(\"Error en el borrado de la relacion con los talles.\");\r\n\t\t}\r\n\t\t\r\n\t\tforeach($producto->talle as $idTalle) {\r\n\t\t\t$query2 = \"INSERT INTO talles_productos (idProducto,idTalle) values (:idProducto, :idTalle)\";\r\n\t\t \r\n\t\t\t$stmt = DBConnection::getStatement($query2);\r\n\t\t\t\r\n\t\t\t$stmt->bindParam(':idProducto', $id,PDO::PARAM_INT );\r\n\t\t\t$stmt->bindParam(':idTalle', $idTalle,PDO::PARAM_INT );\r\n\t\t\t\r\n\t\t\tif (!$stmt->execute()) {\r\n\t\t\t\tthrow new Exception(\"Error en el insertado de la relacion con los talles.\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1b7b7247ee71784a629e5025a7857b67", "score": "0.60711044", "text": "function adiciona(){\n $dataForm = Request::all();\n\t\t//pega a matricula digitada\n $matricula = ltrim($dataForm[\"matricula2\"], '0');\n $exist =$this->buscaDados($matricula);\n //verifica se usuário ja está cadastrado, se estiver, redireciona para tela inicial com alert de erro se nao estiver adiciona o usuário\n if($exist){\n return redirect('/')->with('alert3', 'Operador(a) já esta cadastrado');\n }else{\n DB::table('operador')\n ->insert(['id' => $matricula, 'nome' => $dataForm[\"nome\"]]);\n return redirect('/')->with('alert4', 'Operador(a) cadastrado com sucesso!!');\n }\n }", "title": "" }, { "docid": "e44dcad1489aba5c75e977ae302db5b0", "score": "0.6063897", "text": "function Insertar(){\n $jsondata = file_get_contents('empdetails.json');\n \n //convert json object to php associative array\n $data = json_decode($jsondata, true);\n foreach ($data->usuario as $user) \n\t{\n $nombre = $user->nombre; \n $apellido1 = $user->apellido1; \n $apellido2 = $user->apellido2; \n $correo = $user->correo; \n $telefono = $user->telefono; \n $usuario = $user->usuario; \n $rol = $user->rol; \n $sql = \"INSERT INTO usuarios(nombre, apellido1, apellido2, correo, telefono, usuario, rol)\n VALUES('$nombre', '$apellido1', '$apellido2', '$correo', $telefono, '$usuario', '$rol')\";\n AccesoDatos.Insert($sql);\n\t}\n }", "title": "" }, { "docid": "06f529ddec1257c6f1b1473ebeb9e1db", "score": "0.6059861", "text": "function insert_detalle()\n {\n $stmt = $this->conexion->prepare(\"INSERT INTO detalle_factura (id_factura, id_producto, cantidad, descuento) VALUES (?, ?, ?, ?)\");\n $stmt->bind_param(\"iidd\", $this->id_factura, $this->id_producto, $this->cantidad, $this->descuento\n );\n \n\n if ($stmt->execute() === TRUE) {\n //echo \"Detalle agregado\";\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $this->conexion->error;\n }\n }", "title": "" }, { "docid": "0b63f17df97758e650ada1340c817fe9", "score": "0.6057494", "text": "public function insertarr($nom, $ape, $tel, $ema, $had, $sol, $cid, $fec, $horario_id)\n {\n\n $cn= new Conexion();\n\n $nom = $cn->real_escape_string($nom);\n $ape = $cn->real_escape_string($ape);\n $tel = $cn->real_escape_string($tel);\n $ema = $cn->real_escape_string($ema);\n $had = $cn->real_escape_string($had);\n $sol = $cn->real_escape_string($sol);\n $cid = $cn->real_escape_string($cid);\n $fec = $cn->real_escape_string($fec);\n $horario_id = $cn->real_escape_string($horario_id); \n\n $htotal=$horario_id+$had; \n\n while ($horario_id<=$htotal) {\n\n $consulta = mysqli_fetch_assoc($this->busquedar($cid, $fec, $horario_id));\n\n if ($consulta) {\n\n echo \"<script>alert('Lo Sentimos... Alguna de las horas que ha Seleccionado ya no esta Disponible');\n self.location='Formcalendario.php?fecha=$fec';\n \n </script>\";\n\n $reservar=\"Falso\";\n\n }else{\n\n $reservar=\"Verdadero\";\n }\n\n $horario_id++;\n } \n\n if ($reservar==\"Verdadero\") {\n\n $horario_id=$htotal-$had;\n\n while ($horario_id<=$htotal) { \n\n $sql=\"INSERT INTO reservas (nombre_cliente, apellido_cliente, telefono_cliente, email_cliente, solicitud_adicional, cancha_id, fecha, horario_id, estado) VALUES ('$nom', '$ape', '$tel', '$ema', '$sol', '$cid', '$fec', '$horario_id', 'Reservada')\";\n\n if ($cn->query($sql)) {\n\n echo \"<script>alert('Reserva Realizada... Mas Adelante sera Contactado Por Nosotros Para Confirmar... En Caso que no podamos Confirmar al Telefono del Contacto, se Cancelara y Quedara Disponible Nuevamente en el Calendario');\n self.location='Formcalendario.php?fecha=$fec';\n \n </script>\";\n\n } else {\n\n echo \"<script>alert('Error, No se Pudo Realizar la Reserva');\n self.location='Formcalendario.php';\n </script>\";\n }\n\n $horario_id++;\n\n }\n\n }\n \n $cn->close();\n\n }", "title": "" }, { "docid": "4b8c4396c58214083d91f16c6eeba8dd", "score": "0.6056949", "text": "function addEmpleado($datos){\n\t\t$query = \"insert into personal(a_pat, a_mat, nombres,direccion,telefono,email,fecha_nacto,sexo,puesto,contra,fecha_ingr)\".\n\t\t\" values('\".$datos['a_pat'].\"','\".$datos['a_mat'].\"','\".$datos['nombres'].\"','\".$datos['direccion'].\"','\".$datos['telefono'].\"','\".$datos['email'].\"',\n\t\t'\".$datos['nacto'].\"',\".$datos['sexo'].\",\".$datos['puesto'].\",'\".$datos['contra'].\"',now())\";\n\t\t$con = conn();\n\t\t$con->exec($query);\n\t}", "title": "" }, { "docid": "c6a6bf62f889b782a45fd88a11d279c9", "score": "0.6049603", "text": "public function Insert(){\r\n\r\n\t\t\ttry{\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Primero se comprueba si existe una marca con el mismo nombre ingresado\r\n\t\t\t\t * para evitar la duplicidad de nombres\r\n\t\t\t\t * @return array si hay datos\r\n\t\t\t\t * @return boolean si no hay datos\r\n\t\t\t\t */\r\n\t\t\t\t$confirm = $this->Query(\"SELECT * FROM marcas WHERE mar_des = '$this->marca' ;\")->fetch();\r\n\r\n\t\t\t\tif(!$confirm){\r\n\r\n\t\t\t\t\t$con = $this->Prepare(\"INSERT INTO marcas(mar_des,mar_categoria_cod,mar_estado) VALUES(:marca,'BS','1');\");\r\n\r\n\t\t\t\t\t$con -> bindParam(\":marca\", $this->marca);\r\n\t\t\t\t\t$res = $con->execute();\r\n\r\n\t\t\t\t\tif ($res){\r\n\t\t\t\t\t\treturn $this->MakeResponse(200, \"Operacion Exitosa!\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\treturn $this->MakeResponse(400, \"Operacion Fallida!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn $this->MakeResponse(400, \"Operacion Fallida!\",\"Ya existe la especie: '$this->marca' \");\r\n\t\t\t\t}\r\n\r\n\t\t\t}catch(PDOException $e){\r\n\t\t\t\terror_log(\"Error en la consulta::models/ClsMarcas->Insert(), ERROR = \".$e->getMessage());\r\n\t\t\t\treturn $this->MakeResponse(400, \"Error desconocido, Revisar php-error.log\");\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "698de64f4bba65ce38a2e464c0c4b59b", "score": "0.60403717", "text": "function insertEleve( $nomEleve, $prenomEleve, $idClasse, $choix1, $choix2, $choix3){\n\n try{\n $pdo = getConnexion();\n $pdo->beginTransaction();\n\n $eleve_id = getEleves_id($pdo, $prenomEleve, $nomEleve);\n\n var_dump($eleve_id);\n //si ele\n if($eleve_id == false){\n\n $query = $pdo->prepare(\"\n INSERT INTO `journeesportive`.`eleve`\n (`nom`,`prenom`,`idClasse`)\n Values (?,?,?)\n \");\n $query->execute([$nomEleve,$prenomEleve,$idClasse]);\n \n $last_id = $pdo->lastInsertId();\n\n $query = $pdo->prepare(\"\n INSERT INTO `journeesportive`.`incription`\n (`idEleve`,`idActivite`,`ordrePref`)\n Values (?,?,?)\n \");\n for($i = 0; $i<3; $i++){\n \n if($i == 0){\n $query->execute([$last_id, $choix1,1]);\n }\n else if($i == 1){\n $query->execute([$last_id, $choix2,2]);\n }\n else{\n $query->execute([$last_id, $choix3,3]);\n }\n }\n\n $pdo->commit();\n }\n }\n catch(PDOException $e){\n $pdo->rollBack();\n\n echo 'Exception reçue : ', $e->getMessage(), \"\\n\";\n }\n}", "title": "" }, { "docid": "be5b0651e135e88b52ccab36d29f7375", "score": "0.60285914", "text": "public function insertOB(){\n $json = file_get_contents('data.json');\n $dataJson = json_decode($json, true);\n if($this->conexionBD()){\n // disminuye el riesgo de inyeccion sql\n $pQuery = $this->conBD->prepare($this->strInsert);\n foreach ($dataJson as $id => $value) {\n $pQuery ->bind_param(\n \"ssdiis\",\n $value['nombre'],\n $value['categoria'],\n $value['precio'],\n $value['cantidad_vendidos'],\n $value['en_almacen'],\n $value['fecha_alta']\n );\n $pQuery->execute();\n // comprobamos insert del ultimo id insertado\n $ultimoid = $this->conBD->insert_id;\n echo 'nombre: ',$value['nombre'],'ultimo id insertado: ', $ultimoid,'\\n';\n }\n $pQuery->close();\n $this->conBD->close();\n }\n }", "title": "" }, { "docid": "76124ae6d0a91cc5e63ddb8c9be76b9b", "score": "0.60284346", "text": "private function insertarMarcaPanta(){\n $resu = array();\n $pdo = $this->pdo;\n $sql = \"INSERT INTO modelos_pant (MARCA) VALUES (:marcaPant)\";\n $query = $pdo->prepare($sql);\n $result = $query->execute([//$result = $query->execute([\n 'marcaPant' => $this->MARCA,\n ]);\n return $result;\n }", "title": "" }, { "docid": "3b311fbe18b4a9d8cec0a2184ed01ea4", "score": "0.60185194", "text": "function Cadastrar()\n\t\t{\n\t\t\t$sql = \"insert into cliente\n\t\t\t\t\t(nome,email,senha,telefone,celular) \n\t\t\t\t\tvalues \n\t\t\t\t\t(?,?,?,?,?)\";\n\n\t\t\t//executando o comando sql e passando os valores\n\t\t\t$this->con->prepare($sql)->execute(array(\n\t\t\t$this->nome,$this->email,$this->senha,$this->telefone,$this->celular));\n\t\t}", "title": "" }, { "docid": "e7135862c6f2dafb86209d6f9efbf6aa", "score": "0.60105795", "text": "function insertarSolicitudCompleta()\n {\n $cone = new conexion();\n $link = $cone->conectarpdo();\n $copiado = false;\n try {\n $link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $link->beginTransaction();\n // inserta cabecera\n //Definicion de variables para ejecucion del procedimiento\n $this->procedimiento = 'mat.ft_solicitud_ime';\n $this->transaccion = 'MAT_SOL_INS';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_funcionario_sol', 'id_funcionario_sol', 'int4');\n $this->setParametro('id_proveedor', 'id_proveedor', 'int4');\n $this->setParametro('id_proceso_wf', 'id_proceso_wf', 'int4');\n $this->setParametro('id_estado_wf', 'id_estado_wf', 'int4');\n $this->setParametro('nro_po', 'nro_po', 'varchar');\n $this->setParametro('tipo_solicitud', 'tipo_solicitud', 'varchar');\n $this->setParametro('fecha_entrega_miami', 'fecha_entrega_miami', 'date');\n $this->setParametro('origen_pedido', 'origen_pedido', 'varchar');\n $this->setParametro('fecha_requerida', 'fecha_requerida', 'date');\n $this->setParametro('observacion_nota', 'observacion_nota', 'text');\n $this->setParametro('fecha_solicitud', 'fecha_solicitud', 'date');\n $this->setParametro('estado_reg', 'estado_reg', 'varchar');\n $this->setParametro('observaciones_sol', 'observaciones_sol', 'varchar');\n $this->setParametro('fecha_tentativa_llegada', 'fecha_tentativa_llegada', 'date');\n $this->setParametro('fecha_despacho_miami', 'fecha_despacho_miami', 'date');\n $this->setParametro('justificacion', 'justificacion', 'varchar');\n $this->setParametro('fecha_arribado_bolivia', 'fecha_arribado_bolivia', 'date');\n $this->setParametro('fecha_desaduanizacion', 'fecha_desaduanizacion', 'date');\n $this->setParametro('fecha_entrega_almacen', 'fecha_entrega_almacen', 'date');\n $this->setParametro('cotizacion', 'cotizacion', 'numeric');\n $this->setParametro('tipo_falla', 'tipo_falla', 'varchar');\n $this->setParametro('nro_tramite', 'nro_tramite', 'varchar');\n $this->setParametro('id_matricula', 'id_matricula', 'int4');\n $this->setParametro('nro_solicitud', 'nro_solicitud', 'varchar');\n $this->setParametro('motivo_solicitud', 'motivo_solicitud', 'varchar');\n $this->setParametro('fecha_en_almacen', 'fecha_en_almacen', 'date');\n $this->setParametro('estado', 'estado', 'varchar');\n $this->setParametro('tipo_reporte', 'tipo_reporte', 'varchar');\n $this->setParametro('mel', 'mel', 'varchar');\n $this->setParametro('nro_no_rutina', 'nro_no_rutina', 'varchar');\n $this->setParametro('nro_justificacion', 'nro_justificacion', 'varchar');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $stmt = $link->prepare($this->consulta);\n $stmt->execute();\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //recupera parametros devuelto depues de insertar ... (id_solicitud)\n $resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n if ($resp_procedimiento['tipo_respuesta'] == 'ERROR') {\n throw new Exception(\"Error al ejecutar en la bd\", 3);\n }\n $respuesta = $resp_procedimiento['datos'];\n $id_solicitud = $respuesta['id_solicitud'];\n\n //inserta detalle\n\n //decodifica JSON de detalles\n $json_detalle = $this->aParam->_json_decode($this->aParam->getParametro('json_new_records'));\n\n //var_dump($json_detalle);\n\n foreach ($json_detalle as $f) {\n\n $this->resetParametros();\n //Definicion de variables para ejecucion del procedimiento\n $this->procedimiento = 'mat.ft_detalle_sol_ime';\n $this->transaccion = 'MAT_DET_INS';\n $this->tipo_procedimiento = 'IME';\n\n //modifica los valores de las variables que mandaremos\n $this->arreglo['id_solicitud'] = $id_solicitud;\n $this->arreglo['descripcion'] = $f['descripcion'];\n $this->arreglo['estado_reg'] = $f['estado_reg'];\n $this->arreglo['id_unidad_medida'] = $f['id_unidad_medida'];\n $this->arreglo['nro_parte'] = $f['nro_parte'];\n $this->arreglo['referencia'] = $f['referencia'];\n $this->arreglo['nro_parte_alterno'] = $f['nro_parte_alterno'];\n $this->arreglo['cantidad_sol'] = $f['cantidad_sol'];\n $this->arreglo['tipo'] = $f['tipo'];\n $this->arreglo['explicacion_detallada_part'] = $f['explicacion_detallada_part'];\n\n //Define los parametros para la funcion\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\n $this->setParametro('descripcion', 'descripcion', 'varchar');\n $this->setParametro('estado_reg', 'estado_reg', 'varchar');\n $this->setParametro('id_unidad_medida', 'id_unidad_medida', 'int4');\n $this->setParametro('nro_parte', 'nro_parte', 'varchar');\n $this->setParametro('referencia', 'referencia', 'varchar');\n $this->setParametro('nro_parte_alterno', 'nro_parte_alterno', 'varchar');\n $this->setParametro('cantidad_sol', 'cantidad_sol', 'numeric');\n $this->setParametro('tipo', 'tipo', 'varchar');\n $this->setParametro('explicacion_detallada_part', 'explicacion_detallada_part', 'varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $stmt = $link->prepare($this->consulta);\n $stmt->execute();\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //recupera parametros devuelto depues de insertar ... (id_solicitud)\n $resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\n if ($resp_procedimiento['tipo_respuesta'] == 'ERROR') {\n throw new Exception(\"Error al insertar detalle en la bd\", 3);\n }\n }\n //si todo va bien confirmamos y regresamos el resultado\n $link->commit();\n $this->respuesta = new Mensaje();\n $this->respuesta->setMensaje($resp_procedimiento['tipo_respuesta'], $this->nombre_archivo, $resp_procedimiento['mensaje'], $resp_procedimiento['mensaje_tec'], 'base', $this->procedimiento, $this->transaccion, $this->tipo_procedimiento, $this->consulta);\n $this->respuesta->setDatos($respuesta);\n } catch (Exception $e) {\n $link->rollBack();\n $this->respuesta = new Mensaje();\n if ($e->getCode() == 3) {//es un error de un procedimiento almacenado de pxp\n $this->respuesta->setMensaje($resp_procedimiento['tipo_respuesta'], $this->nombre_archivo, $resp_procedimiento['mensaje'], $resp_procedimiento['mensaje_tec'], 'base', $this->procedimiento, $this->transaccion, $this->tipo_procedimiento, $this->consulta);\n } else if ($e->getCode() == 2) {//es un error en bd de una consulta\n $this->respuesta->setMensaje('ERROR', $this->nombre_archivo, $e->getMessage(), $e->getMessage(), 'modelo', '', '', '', '');\n } else {//es un error lanzado con throw exception\n throw new Exception($e->getMessage(), 2);\n }\n }\n //var_dump($this->respuesta); exit;\n return $this->respuesta;\n }", "title": "" }, { "docid": "661641c14728ca7d9d012f07e93b61d5", "score": "0.6004988", "text": "public function insertarEntrada($idCategoriaEntrada, $entradaTitulo, $entradaAutor, $entradaImagen, \n $entradaContenido, $entradaEtiquetas, $entradaComent, $entradaStatus){\n if(empty($_POST[\"titulo\"]) or \n empty($_POST[\"entrada_categoria\"]) or \n empty($_POST[\"entrada_usuario\"]) or \n empty($_POST[\"entrada_status\"]) or \n empty($_FILES[\"imagen\"]) or\n empty($_POST[\"entrada_etiquetas\"]) or \n empty($_POST[\"entrada_contenido\"])){\n header(\"Location:entradas.php?accion=add_entrada&i=1\");\n exit();\n }\n \n $sql = \"insert into entradas values(null, ?, ?, ?, now(), ?, ?, ?, ?, ?)\";\n\n $resultado = $this->db->prepare($sql);\n\n $resultado->bindValue(1, $_POST[\"entrada_categoria\"]);\n $resultado->bindValue(2, $_POST[\"titulo\"]);\n $resultado->bindValue(3, $_POST[\"entrada_usuario\"]);\n $resultado->bindValue(4, $_FILES[\"imagen\"][\"name\"]);\n $resultado->bindValue(5, $_POST[\"entrada_contenido\"]);\n $resultado->bindValue(6, $_POST[\"entrada_etiquetas\"]);\n $resultado->bindValue(7, $entradaComent);\n $resultado->bindValue(8, $_POST[\"entrada_status\"]);\n \n\n if(!$resultado->execute()){\n header(\"Location:entradas.php?accion=add_entrada&i=2\");\n }else{\n //Insertamos el registro\n if($resultado->rowCount()>0){\n header(\"Location:entradas.php?accion=add_entrada&i=3\");\n }else{\n header(\"Location:entradas.php?accion=add_entrada&i=4\");\n }\n }\n }", "title": "" }, { "docid": "8e2dc6af902d2cd30997886bb47d598d", "score": "0.5998057", "text": "public function insertarUsuarios($usuario, $contrasena)\n\t{\n\t\t// echo \"string\";exit;\n\t\t# Estableciendo coneccion al servidor 'conexion.php';\n\t\t$cnn = new conexion();\n\t\t$con = $cnn->conectar();\n\t\t\n\n\t\t# Estableciendo coneccion a la clase usuarios del '../entidades/usuarios.php';\n\t\t#Creando el filtro de datos \n\t\t$usuarios = new usuarios();\n\t\t$usuarios->usuario = $usuario ;\n\t\t$usuarios->contrasena = $contrasena ;\n\n\t\t# Seleccionando bd\n\t\t// mysqli_select_db($con,\"ptra\");\n\t\t$con->select_db(\"ptra\");\n\t\t#fin del filtro de datos \n\n\t\t$insert_tbl = \"INSERT INTO tbl_usuarios (usuario, contrasena)\n\t\tVALUES ('\".$usuarios->usuario.\"', '\".$usuarios->contrasena.\"' )\";\n\n\t\tif ($con->query($insert_tbl) === TRUE) {\n\n\t\t\t# code...\n\t\t\techo \"\\nFue creado el usuario \";\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\t# code...\n\t\t\techo \"\\nNo se creo el usuario\\n\" .$insert_tbl. \"<br>\". $con->error;\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// mysqli_close($con);\n\t\t$con->close();\n\t}", "title": "" }, { "docid": "98157d62a863942c89776e96a9ee54b5", "score": "0.59946084", "text": "public static function insert($data){\n\t\t\tinclude (\"connection.php\");\n mysqli_query($conexion,\"INSERT INTO tipoCuentas (descripcion, \n\t\t\t\t\t\t\t\t\t\t\t idTipoCuenta) \n\t\t\t\t\t\t\t\t\t\tVALUES ('{$data['descripcion']}', \n\t\t\t\t\t\t\t\t\t\t '{$data['idTipoCuenta']}');\");\n \n\t\t\n\t\t}", "title": "" }, { "docid": "909929d3decdd440f09ecbc6d35e2389", "score": "0.5993294", "text": "public function insert($candidato);", "title": "" }, { "docid": "f549b1caf6c7daed36afe131cc5d1087", "score": "0.5992677", "text": "function insert(Tipo_accion $tipo_accion){\r\n return $this->bd->insert($this->tabla, $tipo_accion->getGenerico());\r\n }", "title": "" }, { "docid": "20b09c63500e9df0e956344f31434331", "score": "0.59883", "text": "private function vincularEtapaCenso() {\n\n $this->removerVinculoEtapaCenso();\n\n $oDao = new cl_censoetapaturmacenso();\n\n $oDao->ed134_codigo = null;\n $oDao->ed134_turmacenso = $this->iCodigo;\n $oDao->ed134_censoetapa = $this->iEtapaCenso;\n $oDao->ed134_ano = $this->iAnoCalendarioTurmas;\n\n $oDao->incluir(null);\n if ( $oDao->erro_status == \"0\" ) {\n throw new DBException(\"Erro ao incluir vinculo com etapa do censo. \\n{$oDao->erro_msg}\");\n }\n\n }", "title": "" }, { "docid": "e3c78c1d3ddac386b39eff0e7464ec6a", "score": "0.59875834", "text": "private function inserirUsuario()\n {\n $this->dados['senhaCliente'] = md5($this->dados['senhaCliente']);\n $cadUsuario = new \\App\\adm\\models\\helper\\ModelsCreate();\n $cadUsuario->exeCreate(\"cliente\", $this->dados);\n if ($cadUsuario->getResult()) {\n $_SESSION['msg'] = \"<div class='alert alert-success'>Usuário cadastrado com sucesso!</div>\";\n $this->result = true;\n } else {\n $_SESSION['msg'] = \"<div class='alert alert-danger'>Erro: O usuario não foi cadastrado!</div>\";\n $this->result = false;\n }\n }", "title": "" }, { "docid": "c059db6200e1a76ea5435e9dd0d9d730", "score": "0.59843946", "text": "public function RegistrarAsistencia($datos){\n \t/*Nos aseguramos si realizamos todo o no*/\n \t$this->db->trans_start();\n \t$this->db->insert('asistencia', $datos);\n \t$this->db->trans_complete();\t\n }", "title": "" }, { "docid": "7bac567458c31d2f076fb88b3f084d5e", "score": "0.5982604", "text": "public function addCont($data) {\n\n $dat = new \\DateTime('now', new \\DateTimeZone('Europe/Bucharest'));\n $now = $dat->format('Y-m-d H:i:s');\n\n $stmt = $this->link->stmt_init();\n\n $sql = \"INSERT INTO utilizator (nume, prenume, email, parola, oras, tara, adresa_livrare, telefon, drepturi, date_add, date_upd) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n\n $parolaHash = password_hash($data['parola'], PASSWORD_BCRYPT);\n $drepturi = 'normal'; //clientii au drept 'normal' by default\n\n if (!$stmt->prepare($sql)) {\n $this->excp->myHandleError(__FILE__, __LINE__, $stmt->error);\n }\n\n $stmt->bind_param('sssssssssss', $data['nume'], $data['prenume'], $data['email'], $parolaHash, $data['oras'], $data['tara'], $data['adresa_livrare'], $data['telefon'], $drepturi, $now, $now);\n\n if (!$stmt->execute()) {\n $this->excp->myHandleError(__FILE__, __LINE__, $stmt->error);\n }\n\n $stmt->close();\n }", "title": "" }, { "docid": "c0529e5691fe36ad7369bc24f010f23d", "score": "0.5978696", "text": "public function alta()\n\t{\n\n if(sizeof($_POST) > 0)\n {\n $this->leerAtributo(\"objeto\")->inserta($_POST);\n echo json_encode($this->leerAtributo(\"objeto\")->leerAtributo('errores'));\n exit;\n }\n\n\t}", "title": "" }, { "docid": "3ea5567de3e7d432130811346a1343ed", "score": "0.59756136", "text": "public function add()\n {\n \t$con = new Conexao();\n //Recebendo a conexao com o bando\n $pdo = $con->getPdo();\n\n \t//QUERY PARA INSERIR USUARIO NO BANCO\n \t$inserir = $pdo->prepare(\"INSERT INTO usuarios(nome,email,senha,status) VALUES(:nome,:email,:senha,:status)\");\n \t$inserir->bindValue(\":nome\", utf8_encode($this->getNome()));\n \t$inserir->bindValue(\":email\", $this->getEmail());\n \t$inserir->bindValue(\":senha\", $this->getPasswordHash($this->getSenha()));\n \t$inserir->bindValue(\":status\", $this->getStatus());\n \t$inserir->execute();\n\n }", "title": "" }, { "docid": "c59b214a05d4ec76a7f12b62b8f38ad9", "score": "0.5974201", "text": "function inserirMarca(){\n $banco = abrirBancoMarca();\n //declarando as variáveis usadas na inserção dos dados\n $nomeMarca = $_POST[\"nomeMarca\"];\n //a consulta sql\n $sql = \"INSERT INTO Marcas(nomeMarca) VALUES ('$nomeMarca')\";\n \n //executando a inclusão\n $banco->query($sql);\n //fechando a conexao com o banco\n $banco->close();\n goToConsultaMarca();\n }", "title": "" }, { "docid": "8a19a1fd128cdd8873b6f1c43b6e295b", "score": "0.596605", "text": "function insertarFormularios($nombre,$apellido,$telefono,$email,$aceptacondiciones,$opcion2,$opcion3,$leyenda1,$leyenda2,$leyenda3) {\r\n\t$sql = \"insert into dbformularios(idformulario,nombre,apellido,telefono,email,aceptacondiciones,opcion2,opcion3,leyenda1,leyenda2,leyenda3)\r\n\tvalues ('','\".($nombre).\"','\".($apellido).\"','\".($telefono).\"','\".($email).\"',\".$aceptacondiciones.\",\".$opcion2.\",\".$opcion3.\",'\".($leyenda1).\"','\".($leyenda2).\"','\".($leyenda3).\"')\";\r\n\t$res = $this->query($sql,1);\r\n\treturn $res;\r\n\t}", "title": "" }, { "docid": "d9d945114eb7b89a06ca9fab0abd5e5a", "score": "0.59638304", "text": "function registrar_polizas($poliza_cumplimiento, $poliza_prestaciones, $poliza_anticipos, $poliza_calidad, $poliza_estabilidad, $poliza_rc){\n //Se inserta la poliza de cumplimiento\n $this->db->insert('contratos_polizas', $poliza_cumplimiento);\n $this->db->insert('contratos_polizas', $poliza_prestaciones);\n $this->db->insert('contratos_polizas', $poliza_anticipos);\n $this->db->insert('contratos_polizas', $poliza_calidad);\n $this->db->insert('contratos_polizas', $poliza_estabilidad);\n $this->db->insert('contratos_polizas', $poliza_rc);\n }", "title": "" }, { "docid": "405130124c11c3e6268887d67230c256", "score": "0.59609073", "text": "function roles( $conexion, $nombre )\r\n{\r\n $salida = \"\";\r\n $sql = \" INSERT INTO `re_covid19`.`roles` (`nombre_rol`)\";\r\n $sql.= \"VALUES ('$nombre');\";\r\n $insert = mysqli_query($conexion, $sql);\r\n \r\n if( mysqli_num_rows($insert) > 0 )\r\n {\r\n $salida = 1;\r\n }else{\r\n $salida = 0;\r\n }\r\n\r\n return $salida;\r\n}", "title": "" }, { "docid": "444151e77d15aab821a3d0a00270e4c7", "score": "0.59584033", "text": "function insert(Autor $autor){\r\n return $this->bd->insert($this->tabla, $autor->getGenerico());\r\n }", "title": "" }, { "docid": "1849e22976fcfbc1846d7f9fcc6317b8", "score": "0.5957399", "text": "public function insert($hojaDeVida);", "title": "" }, { "docid": "be32c461c4ba3a43f493996ddee8950c", "score": "0.59571344", "text": "public function Leer_o_Agregar()\n\t{\n\t\t$this->Carga_Sql_Lectura();\t\t\n\t\t$cn=new Conexion();\n\t\t$this->registros=mysqli_query($cn->conexion,$this->strsql) or\n\t\t\t\tdie(\"Problemas en el select de lectura de\".$this->nombre_tabla.\": \".mysqli_error($cn->conexion). \" id = \".$this->id. \" <br><br> Sql= \".$this->strsql );\n\t\tif ( $this->registro=mysqli_fetch_array($this->registros) )\n\t\t\t{\n\t\t\t\t$this->existe = true ;\n\t\t\t\tmysqli_data_seek ( $this->registros , 0 ) ;\t\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\t//\n\t\t\t\t// Si el registro no existe lo agrega.\n\t\t\t\t$this->Carga_Sql_Agrega_Blanco() ;\n\t\t\t\tmysqli_query($cn->conexion,$this->strsql) or\n\t\t\t\tdie(\"Problemas en el insert de\".$this->nombre_tabla.\": \".mysqli_error($cn->conexion). \" id = \".$this->id. \" <br><br> Sql= \".$this->strsql );\n\t\t\t\t// Lee el registro insertado\n\t\t\t\t$this->Carga_Sql_Lectura();\n\t\t\t\t$this->registros=mysqli_query($cn->conexion,$this->strsql) or\n\t\t\t\tdie(\"Problemas en el select de lectura de\".$this->nombre_tabla.\": \".mysqli_error($cn->conexion). \" id = \".$this->id. \" <br><br> Sql= \".$this->strsql );\n\t\t\t\tif ( $this->registro=mysqli_fetch_array($this->registros) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->existe = true ;\n\t\t\t\t\t\tmysqli_data_seek ( $this->registros , 0 ) ;\t\n\t\t\t\t\t}\t\n\t\t\t\telse\n\t\t\t\t\t{ $this->existe = false ; }\n\t\t\t}\n\t\t$this->Leer_Detalle();\n\t\t$cn->cerrar();\n\t\t//\n\t\t// Levanta el id\n\t\t$i = 0 ;\n\t\tforeach( $this->lista_campos_lectura as $campo)\n\t\t\t{ \n\t\t\t\tif ( $campo['tipo'] == 'pk' )\n\t\t\t\t{\n\t\t\t\t\t$this->id = $this->registro[$i] ;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$i++ ;\n\t\t\t}\n\t}", "title": "" }, { "docid": "828693fd0426b9030314d6a3a2da4c1e", "score": "0.5951094", "text": "public function insertarAlumnoController(){\n //Valida que los campos hayan sido llenados\n if(isset($_POST[\"matriculaAlumno\"])){\n //los datos que seran insertados en la base de datos se almacenan en una array que sera enviado como parametro al metodo que realiza la insercion\n $datosController = array(\"matricula\"=>$_POST[\"matriculaAlumno\"], \n \"nombre\"=>$_POST[\"nombreAlumno\"],\n \"carrera\"=>$_POST[\"id_carrera\"],\n \"tutor\"=>$_POST[\"id_tutor\"]);\n \n //Llamada al metodo del modelo realiazar la insercion, envia como parametro el array con los datos a insertar y el nombre de la tabla en la cual seran insertados los datos\n $respuesta = Datos::registroAlumnoModel($datosController, \"alumnos\");\n \n //Verifica si la insercion ha sido exitosa\n //en caso de ser exitosa mostrara un mensaje que indica el exito de la accion\n if($respuesta == \"success\"){\n echo '<div class=\"box-content bg-success text-white\">\n <h4>Se han insertado los datos exitosamente</h4>\n </div>';\n }\n //En caso de que haya fallado la insercion se motrara un mensaje indicando el fallo\n else{\n echo '<div class=\"box-content bg-danger text-white\">\n <h4>No ha sido posible guardar los datos</h4>\n </div>';\n }\n \n }\n \n }", "title": "" }, { "docid": "4ea51354fbacbc8d41178c0ed3229460", "score": "0.5950741", "text": "function registrar($id_compra, $id_producto, $cantidad){\n $con = conexion(\"root\",\"1234\");\n $consulta = $con->prepare(\"INSERT INTO compra_detalle (id_compra, id_producto, cantidad) VALUES (:id_compra, :id_producto,:cantidad)\");\n $consulta->execute(array(\n 'id_compra' => $id_compra,\n 'id_producto' => $id_producto,\n 'cantidad' => $cantidad\n ));\n }", "title": "" }, { "docid": "cb36040bb4cc4c3e2c2a6d524564ebf7", "score": "0.59505993", "text": "public function vistaInsert() {\n //Mostramos el formulario de insercion\n require_once('views/posts/vistaInsert.php');\n }", "title": "" } ]
491e69f36f9c0299acef5e06a8bf8fb3
Add rule to registry.
[ { "docid": "8e3423bcf2d131917bedc0ccfb272329", "score": "0.8027979", "text": "public function add(Rule $rule): void;", "title": "" } ]
[ { "docid": "9ca5dfa36fc2970a094679f7e1719f92", "score": "0.74060863", "text": "public function addRule(Rule $rule)\n { \n $this->rules[] = $rule;\n }", "title": "" }, { "docid": "27ff521d44b971a328b039d7e1fd309e", "score": "0.71102595", "text": "public function addRule(Rule $rule): void\n {\n $this->rules[] = $rule;\n }", "title": "" }, { "docid": "0e207c79bd675907e46ea9922757c3df", "score": "0.70183504", "text": "public function addRule(Lexer\\Scanner\\ITokenRule $rule) {\n\t\t\t$this->rules->addValue($rule);\n\t\t}", "title": "" }, { "docid": "eead132af44f31a6446a988579e6fa45", "score": "0.7010559", "text": "public function addRule(IRule $rule)\n {\n $this->rules[] = $rule;\n }", "title": "" }, { "docid": "af795862c0c49f2ea238bccc9c32d9c5", "score": "0.6872677", "text": "public function addRule(string $name, IValidationRule|callable|string $rule): void\n {\n $this->rules[$name] = $rule;\n }", "title": "" }, { "docid": "f844c14b7c32c2c6aae22465b8e90ad5", "score": "0.68401814", "text": "public function addRule(string $key, string $rule, array $params = [])\n {\n }", "title": "" }, { "docid": "c73e7b9f06c0010327b082c487bad87e", "score": "0.66796017", "text": "public function addRule(ScssRule $rule)\n {\n $this->list[] = $rule;\n }", "title": "" }, { "docid": "fee93b19efbb59d55c2fcbdb782da121", "score": "0.6660755", "text": "public function addRule($rule)\n {\n array_push($this->rules, $rule);\n if (!$rule->hasErrors()) {\n $this->parsedLineCount++;\n }\n }", "title": "" }, { "docid": "71f5d268ee618269b2f374780904afc4", "score": "0.6568121", "text": "public function addRule($name, array $rule)\n {\n $this->rules[ltrim(strtolower($name), '\\\\')] = array_merge($this->getRule($name), $rule);\n }", "title": "" }, { "docid": "4031d8322f2b140c495229afaab9b485", "score": "0.65538937", "text": "public function addRule()\n {\n $args = func_get_args();\n $argsCount = count($args);\n\n $role = null;\n $resource = null;\n $action = null;\n\n if ( $argsCount == 4 || $argsCount == 3 ) {\n $role = $args[0];\n $resource = $args[1];\n $rule = $args[2];\n if ( $argsCount == 4) {\n $action = $args[3];\n }\n } elseif( $argsCount == 2 ) {\n $rule = $args[0];\n $action = $args[1];\n } elseif ( $argsCount == 1 ) {\n $rule = $args[0];\n } else {\n throw new InvalidArgumentException(__METHOD__ . ' accepts only one, tow, three or four arguments');\n }\n\n if ( ! is_null($role) && ! $role instanceof Role ) {\n throw new InvalidArgumentException('Role must be an instance of SimpleAcl\\Role or null');\n }\n\n if ( ! is_null($resource) && ! $resource instanceof Resource ) {\n throw new InvalidArgumentException('Resource must be an instance of SimpleAcl\\Resource or null');\n }\n\n if ( is_string($rule) ) {\n $ruleClass = $this->getRuleClass();\n $rule = new $ruleClass($rule);\n }\n\n if ( ! $rule instanceof Rule ) {\n throw new InvalidArgumentException('Rule must be an instance of SimpleAcl\\Rule or string');\n }\n\n if ( $exchange = $this->hasRule($rule) ) {\n $rule = $exchange;\n }\n\n if ( ! $exchange ) {\n $this->rules[] = $rule;\n }\n\n if ( $argsCount == 3 || $argsCount == 4 ) {\n $rule->setRole($role);\n $rule->setResource($resource);\n }\n\n if ( $argsCount == 2 || $argsCount == 4 ) {\n $rule->setAction($action);\n }\n }", "title": "" }, { "docid": "e098e910106b291598ff96eeaf5c97f9", "score": "0.6419715", "text": "public function addRule(array $rule)\n {\n return $this->addToSpec('rules', $rule);\n }", "title": "" }, { "docid": "232a33a06a1b54066e0ee19a0e4eeec6", "score": "0.6355244", "text": "public function addMatchingRule(MatchingRule $matchingRule)\n {\n $this->_matchingRules[$matchingRule->getJsonPath()] = $matchingRule;\n }", "title": "" }, { "docid": "a1e03280b9b4fdae10e385691da2257f", "score": "0.63296676", "text": "function addrule($x)\n {\n $x = func_get_args();\n // if (isset($this->rules) == FALSE) $this->rules = array();\n array_push($this->rules, $x);\n }", "title": "" }, { "docid": "8707684b29c625bcc3f9627d14a4456e", "score": "0.6216038", "text": "public function addRules($rule, $append = true)\r\n {\r\n $rule['class'] = mini_base_application::app()->getComponent($rule['class']);\r\n if($rule['class'] instanceof mini_base_rule) {\r\n if(!array_key_exists($rule['app'], $this->rules))\r\n {\r\n\t if($append) {\r\n\t $this->rules[$rule['app']] = $rule;\r\n\t } else {\r\n\t array_unshift($this->rules, $rule);\r\n\t }\r\n }\r\n } else {\r\n mini::e(\"rule {rule} must implements of mini_base_rule\",array('{rule}'=>$rule));\r\n }\r\n }", "title": "" }, { "docid": "da780bc1cc85d67e18748080614b4612", "score": "0.61809236", "text": "protected function createAddRuleHandler()\n {\n $this->handler\n ->add('rule-add', '^:bans')\n ->title('Add new IP rule')\n ->icon('zmdi-plus-circle')\n ->link(handles('antares::ban_management/rules/create'));\n }", "title": "" }, { "docid": "75e720b7ea421956e9f4657e7ae84e4e", "score": "0.61257595", "text": "public function addRule($field, $rule, $parameters)\r\n {\r\n $this->rules[$field][$rule] = $parameters;\r\n }", "title": "" }, { "docid": "3e647e297b27e8670b3172d0dbca8677", "score": "0.60341924", "text": "public function addRules(\\google\\api\\BackendRule $value){\n return $this->_add(1, $value);\n }", "title": "" }, { "docid": "5fdfa3ef25d237569361a40bfcda1af8", "score": "0.60230774", "text": "public function setRegistry(RulesRegistryInterface $registry);", "title": "" }, { "docid": "f6d26b87f35f294e9dec964cb2eae66e", "score": "0.5980513", "text": "public function addValidationRule($attr, $rule)\n {\n //uprava hodnoty $rule aby byla ve spravnem tvaru - tj. pole\n if ( ! is_array($rule))\n {\n $rule = array($rule => NULL);\n }\n\n //priavidlo pro atribut bud nastavim nebo pripojim k tem co jiz existuji\n if (isset($this->_rules[$attr]))\n {\n $this->_rules[$attr] += (array)$rule;\n }\n else\n {\n $this->_rules[$attr] = (array)$rule;\n }\n }", "title": "" }, { "docid": "6bad87f5f401af85ea307aeb78cfe1e2", "score": "0.58979106", "text": "public function add_robots_rule($rule)\n {\n $this->remove_robots_rule($rule);\n $this->robots[] = $rule;\n return true;\n }", "title": "" }, { "docid": "7c383bf1643aa2ede10fae9021f4d12c", "score": "0.58959764", "text": "public function setRule($key, $value)\n\t{\n\t\tstatic::$rules[$key] = $value;\n\t}", "title": "" }, { "docid": "054e50cd11f8181054567d910c223f14", "score": "0.58661616", "text": "public function addRule($rule,$options){\n\t\tif($options){\n\t\t\t$array = array('rule'=>$rule,'options'=>$options);\n\t\t\t$this->_urlRewriting[] = &$array ;\n\n\t\t\tif(is_array($options)) $destination = $options['path'];\n\t\t\telse $destination = $options;\n\n\t\t\tif($destination){ // If the destination (options) is a string, the controller has a particular url for being accessed\n\t\t\t\t$this->_controllerRewriting[strtolower($destination)] = &$array;\n\t\t\t\tif(strpos($destination,'Index\\\\')===0){ // if it's a default Index controller action, must create two rule\n\t\t\t\t\t$this->_controllerRewriting[substr($destination,6)] = &$array;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7491ec3ebb9688f3c49135217e693bcc", "score": "0.58474493", "text": "public function add_destination_rule(PublicKeyDestRule $rule) {\n\t\tif(is_null($this->id)) throw new BadMethodCallException('Public key must be in directory before destination rules can be added');\n\t\t$stmt = $this->database->prepare(\"INSERT INTO public_key_dest_rule SET public_key_id = ?, account_name_filter = ?, hostname_filter = ?\");\n\t\t$stmt->bind_param('dss', $this->id, $rule->account_name_filter, $rule->hostname_filter);\n\t\t$stmt->execute();\n\t\t$rule->id = $stmt->insert_id;\n\t\t$stmt->close();\n\t\t$this->owner->sync_remote_access();\n\t}", "title": "" }, { "docid": "8ed54c98b814ab34c07f5e622f1fa26d", "score": "0.5818742", "text": "public function add_rule($field, $rule, $error_message = null) {\n\t\t$this->add_rules($field, $rule);\n\t\tif (!is_null($error_message)) {\n\t\t\tif (is_string($rule)) {\n\t\t\t\tlist($rule, $args) = $this->split_rule_string($rule); //extract just the rule name (ignore \"args\" -- e.g. if \"length[0,10]\" is the rule, we just want \"length\")\n\t\t\t} else {\n\t\t\t\t$rule = $rule[1]; //$rule is an array (object and method name), so just grab the method name\n\t\t\t}\n\t\t\t$this->add_message($field, $rule, $error_message);\n\t\t}\n\t}", "title": "" }, { "docid": "abca51eb9bc964e27d03eb7f66600cbd", "score": "0.5769785", "text": "public function add_rules() {\n\t\tadd_rewrite_rule(\n\t\t\t'^' . loxo_get_sitemap_name() . '\\.xml$',\n\t\t\t'index.php?loxo_sitemap=index',\n\t\t\t'top'\n\t\t);\n\n\t\tadd_rewrite_rule(\n\t\t\t'^' . loxo_get_sitemap_name() . '\\.xls$',\n\t\t\t'index.php?loxo_sitemap=stylesheet',\n\t\t\t'top'\n\t\t);\n\t}", "title": "" }, { "docid": "ab0726a112560299d3bc6abea7dc13cd", "score": "0.57604027", "text": "protected function add_rule($action, $response)\n\t{\n\t\t$this->rules[$action] = $response;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "52e22398ae8ded1131d4457e99ae3c2d", "score": "0.5754631", "text": "public function testAddRule() {\n $ruleToInsert = new Rule(\"Scissors\", \"Paper\", \"Cuts\");\n\n $rules = new RuleCollection();\n $rules->add($ruleToInsert);\n\n // Correct casing\n $ruleToObtain = $rules->getRule(\"Scissors\", \"Paper\");\n $this->assertEquals($ruleToObtain, $ruleToInsert, \"[1] The inserted and obtained rule are not the same\");\n\n // Random casing\n $ruleToObtain = $rules->getRule(\"ScIsSoRs\", \"PaPeR\");\n $this->assertEquals($ruleToObtain, $ruleToInsert, \"[2] The inserted and obtained rule are not the same\");\n\n // Random casing and empty padding\n $ruleToObtain = $rules->getRule(\" ScIsSoRs \", \" PaPeR \");\n $this->assertEquals($ruleToObtain, $ruleToInsert, \"[3] The inserted and obtained rule are not the same\");\n\n // Non-existent rule\n $ruleToObtain = $rules->getRule(\"Rock\", \"Spock\");\n $this->assertNull($ruleToObtain, \"Rule should be null because it does not exist\");\n }", "title": "" }, { "docid": "185a5157d3023a0d36e34448d9e891c9", "score": "0.57444125", "text": "function test_add_valid_rule( $rule ) {\n\t\t$this->assertTrue( exoskeleton_add_rule( $rule ) );\n\t}", "title": "" }, { "docid": "c7c507eedd68dc936add4bc481537e44", "score": "0.5712886", "text": "public function addRule(Column\\Rule $rule)\n {\n $this->setEvaluatedFalse();\n $rule->setParent($this);\n $this->ruleset[] = $rule;\n\n return $this;\n }", "title": "" }, { "docid": "96cad16049010af0a78c11e3d13f1cc2", "score": "0.5693198", "text": "public function addNewRule(Rule $_newRule)\n {\n if($this->getRule($_newRule->getId()) !== null) {\n throw new \\LogicException(\"Rule already added\");\n }\n\n $this->rulesDomain[] = $_newRule;\n return true;\n }", "title": "" }, { "docid": "5edf2077ef0d72bde34ac726595cb566", "score": "0.56815034", "text": "public function rule($obj) {\n $this->_rules[$this->_field][] = $obj;\n \n return $this;\n }", "title": "" }, { "docid": "8cf5f508c0be387e1ec426cf1b8ced21", "score": "0.56795913", "text": "public static function addRule($uri, $target = array(), $args = array()) {\n\t\tif (is_array($args)) {\n\t\t\tif (empty($args)) {\n\t\t\t\t$args['pass'] = array();\n\t\t\t}\n\t\t}\n\t\tself::$rules[$uri] = array(\n\t\t\t'target' => $target,\n\t\t\t'pass' => $args['pass']\n\t\t);\n\t}", "title": "" }, { "docid": "64f7f0542c2650d4362d6797d1ef989e", "score": "0.56482387", "text": "public function add(string $name, ValidationRule|array $rule)\n {\n if (!($rule instanceof ValidationRule)) {\n $rule = new ValidationRule($rule);\n }\n $this->_rules[$name] = $rule;\n\n return $this;\n }", "title": "" }, { "docid": "f73b04cce9f1871216404b1bddb426d6", "score": "0.56359404", "text": "public function created(Rule $rule)\n {\n Artisan::call('rule:apply');\n }", "title": "" }, { "docid": "fa92e07cf5905171cbdfca0121141c38", "score": "0.5600834", "text": "public function addValidationRule($rule) {\n if ( $attr = $this->getAttribute(self::VALIDATION_ATTRUBUTE) ) {\n $this->setAttribute(self::VALIDATION_ATTRUBUTE, $attr . ' ' . $rule);\n }\n else {\n $this->setAttribute(self::VALIDATION_ATTRUBUTE, $rule);\n }\n\n return $this;\n }", "title": "" }, { "docid": "71d607453dde75d08bb7cb278fba054a", "score": "0.5587344", "text": "public function rule($type) {\n\t\t$rule = $this->pixie-> validate->rule($type);\n\t\t$rule-> params(array_slice(func_get_args(), 1));\n\t\t\n\t\t$this->rules[] = $rule;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "045f3b6ed88b011584960b27a6be43a9", "score": "0.55801356", "text": "protected function addRewrite()\n {\n $rewrite = $this->addRewrite;\n\n $config = $this->container->create('Di\\\\Config\\\\Rewrites');\n $this->output('Rewriting class: '.key($rewrite).' to: '.current($rewrite), self::OUTPUT_LEVEL_NOTICE);\n $config->addRewrite($rewrite)->saveConfig();\n }", "title": "" }, { "docid": "010aadde7a89ecfec73f939fdcc79b90", "score": "0.5547446", "text": "public function appendRules()\n {\n foreach ($this->_getApi2Config()->getResourcesTypes() as $resource) {\n if ($this->_validateNameSpace($resource)) {\n $this->_addSystemRules($resource);\n }\n };\n }", "title": "" }, { "docid": "a72bb0fef0d331036dbc10cba3211b9d", "score": "0.5546262", "text": "public function addCartRule(PriceRule $cartRule)\n {\n $this->addPriceRule($cartRule);\n }", "title": "" }, { "docid": "2a4214065a1cc028b551991e89dfedbd", "score": "0.55108917", "text": "function insertRule ($rule, $index = null)\n\t{\n\t\tif (!$rule instanceof CSSRule) {\n\t\t\t$parser = new ParserCSS($rule, $this);\n\t\t\t$sheet = $parser->parse();\n\t\t\t//Ignore if there is more than one rule\n\t\t\t$length = $sheet->cssRules->length;\n\t\t\tif ($length !== 1) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$rule = $sheet->cssRules[0];\n\t\t}\n\t\tif ($rule instanceof CSSKeyframeRule) {\n\t\t\treturn;\n\t\t}\n\t\tif ($rule->parentStyleSheet) {\n\t\t\t$rule->parentStyleSheet->deleteRule($rule);\n\t\t}\n\t\t$rule->parentStyleSheet = $this;\n\t\tif ($index !== null) {\n\t\t\t$this->cssRules->_addNodeAt($rule, $index);\n\t\t} else {\n\t\t\t$this->cssRules->_appendNode($rule);\n\t\t}\n\t}", "title": "" }, { "docid": "502506d2fa0a2a0756847c4d78b26286", "score": "0.5507655", "text": "public function addRule($uri, $route, $suppress_overwrite_warning = false) {\n\t\tif ($this->controller) {\n\t\t\tLog::error(\"Cannot add rule '$uri' => '$route' because the router has already started.\", 1);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Log a warning if rule already exists \n\t\tif (isset($this->rules[$uri]) && !$suppress_overwrite_warning) {\n\t\t\tLog::warn(\"Overwriting route rule: '$uri' => '$action' (old route: '{$this->routes[$id]['route']}')\");\n\t\t} else {\n\t\t\tLog::info(\"Adding rule '$uri' => '$route'\");\n\t\t}\n\t\t$this->rules[trim($uri, '/ ')] = trim($route, '/ ');\n\t}", "title": "" }, { "docid": "79a539b8be84242f988183a636754e1c", "score": "0.5502993", "text": "public function addRule(FilterRule $rule, $encodingFormat)\n {\n $rule->setEncodingFormat($encodingFormat);\n\n $this->rules[] = $rule;\n\n return $this;\n }", "title": "" }, { "docid": "567f0ddf1a4523084d87eb6b80865b95", "score": "0.5490694", "text": "function insert_rewrite_rule($rules)\n{\n\t$newrules = array();\n\t$newrules['(api)/request-token(.*)$'] = 'index.php?pagename=$matches[1]&request=request-token';\n\t$newrules['(api)/auth(.*)$'] = 'index.php?pagename=$matches[1]&request=auth';\n\t$newrules['(api)/access-token(.*)$'] = 'index.php?pagename=$matches[1]&request=access-token';\n\t$newrules['(api)/register(.*)$'] = 'index.php?pagename=$matches[1]&request=register';\n\t$newrules['(api)/(.*)$'] = 'index.php?pagename=$matches[1]&request=$matches[2]';\n\treturn $newrules + $rules;\n}", "title": "" }, { "docid": "5dada38a7160e21d3ed7854ba070a4ae", "score": "0.5424822", "text": "public function add($field, $name, $rule = [])\n {\n if (!is_array($name)) {\n $rules = [$name => $rule];\n } else {\n $rules = $name;\n }\n\n foreach ($rules as $name => $rule) {\n if (is_array($rule)) {\n $rule += ['rule' => $name];\n }\n\n if (!isset($rule['message'])) {\n $args = [$field];\n $_rule = $rule['rule'];\n if (is_array($_rule)) {\n array_shift($_rule);\n $args = array_merge($args, $_rule);\n }\n\n $message = $this->getMessage($name, $args);\n if ($message) {\n $rule['message'] = $message;\n }\n }\n\n $rules[$name] = $rule;\n }\n\n return parent::add($field, $rules);\n }", "title": "" }, { "docid": "cfa2dc22ab04aa2c155ce0f63dec706c", "score": "0.5422857", "text": "public static function add_rewrite_rules( $wp_rewrite ) {\n\t\tglobal $wp_rewrite;\n\t\t$new_rules = array(\n\t\t\t'salmon/?(.+)' => 'index.php?salmon=' . $wp_rewrite->preg_index( 1 ),\n\t\t\t'salmon' => 'index.php?salmon=endpoint',\n\t\t);\n\t\t$wp_rewrite->rules = $new_rules + $wp_rewrite->rules;\n\t}", "title": "" }, { "docid": "93aeaf9556d3da32d1af298d0532d1af", "score": "0.5413913", "text": "static function addRules(array $rules){\n\n\n foreach ($rules as $rule){\n static::addRule($rule);\n }\n }", "title": "" }, { "docid": "c1cfd8edfcea3f370489b71295c33d37", "score": "0.53966814", "text": "public function addPriceRule(PriceRule $priceRule)\n {\n $this->removePriceRule();\n $this->setPriceRule($priceRule);\n $this->getPriceRule()->applyRules();\n\n $this->save();\n }", "title": "" }, { "docid": "d1766c579c9bf27fbc943894741cb572", "score": "0.53886783", "text": "function my_insert_rewrite_rules( $rules )\n{\n $newrules = array();\n $newrules['push-occrp/([0-9a-zA-Z]+)/([0-9a-zA-Z]+)/'] = 'index.php?push=$matches[1]&myargument=$matches[2]';\n return $newrules + $rules;\n}", "title": "" }, { "docid": "55ad0a21cf942d99cf9efb8db62a28e0", "score": "0.53784126", "text": "public function rule()\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$args = func_get_args();\r\n\t\t\t\r\n\t\t\tif ( count( $args ) == 1 )\r\n\t\t\t\t$this->rules = array_merge( $this->rules, $args[0] );\r\n\t\t\telse\r\n\t\t\t\t$this->rules[$args[0]] = $args[1];\r\n\r\n\t\t\treturn $this;\r\n\r\n\t\t}", "title": "" }, { "docid": "4845fbaae1c4eb3bf6c6cf40bb6fdbba", "score": "0.5376551", "text": "public function add($importRule)\n {\n $start = $importRule->getStarting();\n $end = $importRule->getEnding();\n for($x = $start->getX(); $x <= $end->getX(); $x++)\n for($y = $start->getY(); $y <= $end->getY(); $y++)\n {\n if(!isset($this->virtualSheet[$x]))\n $this->virtualSheet[$x] = [];\n $this->virtualSheet[$x][$y] = $importRule;\n }\n array_push($this->importRules, $importRule);\n }", "title": "" }, { "docid": "918491b8ee05a680d09d49cb61bcf46f", "score": "0.53617364", "text": "public function setRule($rule, $value, $params = null, $name = null)\n\t{\n\t\t$this->_rules[] = array('val' => $value, 'rule' => $rule, 'par' => $params, 'name' => $name);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "de75634c8b00436fa3a9c204403af679", "score": "0.53358376", "text": "public function addRules($rules, $filepath='') {\n\t\t// rules can be an array of filename\n\t\tif (is_array($rules) AND is_string(reset($rules))) {\n\t\t\tforeach($rules as $i=>$filename)\n\t\t\t\t$this->addRules($filename);\n\t\t\treturn;\n\t\t}\n\n\t\t// rules can be a string : yaml filename\n\t\tif (is_string($rules)) {\n\t\t\t$file = $rules; // keep the real filename\n\t\t\t$rules = $this->loadFile($file, $filepath);\n\t\t\t$filepath = dirname($file).'/';\n\t\t}\n\n\t\t// rules can be an array of rules\n\t\tif (is_array($rules) AND count($rules)){\n\t\t\t# cast array-rules to objects\n\t\t\tforeach ($rules as $i => $rule) {\n\t\t\t\tif (is_array($rule))\n\t\t\t\t\t$rules[$i] = new TextWheelRule($rule);\n\t\t\t\t// load subwheels when necessary\n\t\t\t\tif ($rules[$i]->is_wheel){\n\t\t\t\t\t// subruleset is of the same class as current ruleset\n\t\t\t\t\t$class = get_class($this);\n\t\t\t\t\t$rules[$i]->replace = new $class($rules[$i]->replace, $filepath);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->data = array_merge($this->data, $rules);\n\t\t\t$this->sorted = false;\n\t\t}\n\t}", "title": "" }, { "docid": "a72de1c63ff096241e49c6b736dfe589", "score": "0.53271055", "text": "function test_internal_add_rule_method_fails_when_adding_existing_rule() {\n\t\t$rule = $this->getValidRuleHelper();\n\t\t$exoskeleton = Exoskeleton::get_instance();\n\t\t$this->assertTrue( exoskeleton_add_rule( $rule ) );\n\t\t$this->assertFalse( $exoskeleton->add_rule( $rule ) );\n\t}", "title": "" }, { "docid": "abca969af7ec21cbda1013679c3c6316", "score": "0.53261894", "text": "public function addRule($name, $rules = array())\n {\n $this->validation_rules[$name] = $this->createRule($name, $rules);\n }", "title": "" }, { "docid": "9ec54b0fedcee3e070f6735ff0b9d700", "score": "0.5318268", "text": "public function add_rewrite_rules();", "title": "" }, { "docid": "e77a678b264e39868abccfaf2d65d555", "score": "0.5296243", "text": "public function offsetSet(mixed $index, mixed $rule): void\n {\n $this->add($index, $rule);\n }", "title": "" }, { "docid": "27ce334a9572b8c4c4ec608bb15ecdd6", "score": "0.52740335", "text": "protected function add_rules( array $rules, $action)\n\t{\n\t\tif ($action === '=')\n\t\t{\n\t\t\t// Just replace the rules\n\t\t\t$this->rules = $rules;\n\t\t\treturn;\n\t\t}\n\n\t\tforeach($rules as $rule)\n\t\t{\n\t\t\tif ($action === '-')\n\t\t\t{\n\t\t\t\tif (($key = array_search($rule, $this->rules)) !== FALSE)\n\t\t\t\t{\n\t\t\t\t\t// Remove the rule\n\t\t\t\t\tunset($this->rules[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( ! in_array($rule, $this->rules))\n\t\t\t\t{\n\t\t\t\t\tif ($action == '+')\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_unshift($this->rules, $rule);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->rules[] = $rule;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3fc20113a0afddbcdf398dea1f96cee7", "score": "0.5273122", "text": "public function addRule($allow, $action, $resource, $condition = null)\n {\n if( $condition instanceof Closure)\n $condition->bindTo($this);\n if( is_array($resource))\n {\n foreach($resource as $res)\n {\n $rule = new Rule($allow, $action, $res, $condition);\n }\n }\n else\n {\n $rule = new Rule($allow, $action, $resource, $condition);\n }\n $this->rules->add($rule);\n return $rule;\n }", "title": "" }, { "docid": "9bcc437858efa86687ffee99ea6bc662", "score": "0.52625054", "text": "protected function _addRules($rules)\n {\n foreach ( $rules as $key => $rule )\n {\n foreach ( $rule as $role => $resource )\n {\n try {\n $this->allow($role, $resource);\n } catch (Exception $e) { /* Ignore */ }\n }\n }\n }", "title": "" }, { "docid": "977784fdf1dbf5d4273bd119657489a6", "score": "0.52624494", "text": "public static function add_rewrite_rules($wp_rewrite) {\r\n global $wp_rewrite;\r\n $new_rules = array('salmonpress/?(.+)' => 'index.php?salmonpress=' . $wp_rewrite->preg_index(1),\r\n 'salmonpress' => 'index.php?salmonpress=true');\r\n $wp_rewrite->rules = $new_rules + $wp_rewrite->rules;\r\n }", "title": "" }, { "docid": "f106a18723a1a48a28737f0a9278dfa2", "score": "0.523081", "text": "public function setRule($rule)\n {\n $this->rule = $rule;\n return $this;\n }", "title": "" }, { "docid": "942fc7f9f9d2ebcd003133514b27b7cf", "score": "0.5208104", "text": "private function _add() {\n\t\t$arguments = func_get_args();\n\t\t$this->_patterns[] = $arguments;\n\t}", "title": "" }, { "docid": "5bbc724afad5dac321ddc097a04411d7", "score": "0.51979595", "text": "public function addRules($name, $definition)\n\t{\n $this->rule_stacks[$name] = $this->parseDefinition($definition);\n\t\treturn $this;\n }", "title": "" }, { "docid": "243749d04da467cc52e247e93004828d", "score": "0.5190874", "text": "public function addRule(string $fieldName, string $value, array $rules)\n {\n $this->field[] = array($fieldName, $value, $rules);\n }", "title": "" }, { "docid": "502a1d9c6c2c844a7b01bba0b59494b2", "score": "0.51501775", "text": "public function addRule($rule, $params = null, $errorMessage = null)\n\t{\n\t\t$this->validationRules[$rule] = isset($params) ? $params : true;\n\t\tif(isset($errorMessage))\n\t\t\t$this->validationMessages[$rule] = $errorMessage;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "3d05fbc5c3645218cc0e82b37298c9a9", "score": "0.51422846", "text": "public function registerRules(array $rules)\n {\n foreach ($rules as $i => $rule) {\n if (is_string($rule)) {\n $rule = Yii::createObject(['class' => $rule]);\n } elseif (is_array($rule)) {\n $rule = Yii::createObject($rule);\n }\n if (!$rule instanceof UrlRuleInterface) {\n throw new InvalidValueException(\"Url rule '\".get_class($rule).\"' must implement yii\\web\\UrlRuleInterface\");\n }\n $this->_rules[$i] = $rule;\n }\n }", "title": "" }, { "docid": "e7733cb42a436a252d252bc433484122", "score": "0.51378655", "text": "public function registerRules()\n {\n \\Validator::extend('file_extension', MediaRules::class.'@fileExtension');\n \\Validator::extend('unique_extensions', MediaRules::class.'@uniqueExtensions');\n \\Validator::extend('defined_extension', MediaRules::class.'@definedExtension');\n }", "title": "" }, { "docid": "e235764dbe715a4aea53aaf0281f8c85", "score": "0.5133447", "text": "public function addRule($field_name='', $human_name='', $val_rule='')\r\n\t{\r\n\t\t//Let's check to see if all the parameters are there. \r\n\t\t$errors = array();\r\n\t\tif (empty($field_name) || $field_name == '')\r\n\t\t{\r\n\t\t\t$errors[] = 'Missing parameter 1 for addRule. No input name was given.';\r\n\t\t}\r\n\t\tif (empty($human_name))\r\n\t\t{\r\n\t\t\t$errors[] = 'Missing parameter 2 for addRule. No human name was given.';\r\n\t\t}\r\n\t\tif (empty($val_rule) || $val_rule == '')\r\n\t\t{\r\n\t\t\t$errors[] = 'Missing parameter 3 for addRule. No rule was set.';\r\n\t\t}\r\n\t\t\r\n\t\t//If we are missing some parameters, we'll spit out an error. \r\n\t\tif (count($errors) >= 1)\r\n\t\t{\r\n\t\t\tforeach ($errors as $error)\r\n\t\t\t{\r\n\t\t\t\t$err_mes .= $error . ' ';\r\n\t\t\t}\r\n\t\t\tshowError($err_mes, 'addRule');\r\n\t\t}\r\n\r\n\t\t//Let's organize all of our gathered information and put it into one array to represent a rule. \r\n\t\t$rule = array();\r\n\r\n\t\t$rule['f_name'] = $field_name;\r\n\t\t$rule['h_name'] = $human_name;\r\n\t\t$rule['v_rule'] = array();\r\n\r\n\t\t//If more than one validation rules is given, let's take it apart. \r\n\t\tif (strpos($val_rule, '|') !== FALSE)\r\n\t\t{\r\n\t\t\t$rules = explode('|', $val_rule);\r\n\t\t\tforeach($rules as $a_rule)\r\n\t\t\t{\r\n\t\t\t\t$rule['v_rule'][] = $a_rule;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$rule['v_rule'][] = $val_rule;\r\n\t\t}\r\n\r\n\t\t//Let's add this new rule into our master rules array.\r\n\t\t$this->rules[] = $rule;\r\n\t}", "title": "" }, { "docid": "bce4ebe5da5a0f648cc97fa5cfb180c9", "score": "0.51276565", "text": "static function save_redirect_rule($rule = array())\n {\n global $wpdb;\n\n if (array_key_exists('redirect_id', $rule)) {\n $redirect_id = (int) $rule['redirect_id'];\n unset($rule['redirect_id']);\n unset($rule['id']);\n // edit redirect rule\n $wpdb->update(\n $wpdb->wf301_redirect_rules,\n $rule,\n array('id' => $redirect_id)\n );\n\n return $redirect_id;\n } else {\n // insert new rule\n if (array_key_exists('redirect_id', $rule)){\n unset($rule['redirect_id']);\n }\n $wpdb->insert(\n $wpdb->wf301_redirect_rules,\n $rule\n );\n return $wpdb->insert_id;\n }\n }", "title": "" }, { "docid": "2cbdd5d5c9c7b5c24d71ddb81c91ca4a", "score": "0.51152813", "text": "protected function appendRule($rule, $baseRules)\n {\n return $this->appendRules([$rule], $baseRules);\n }", "title": "" }, { "docid": "32808fc83b0babbe9538523a7ab684d7", "score": "0.5112789", "text": "public function updated(Rule $rule)\n {\n //\n }", "title": "" }, { "docid": "f8b74507e11c88b6acada8ef760bdec8", "score": "0.5092154", "text": "function _set_rules(){\n }", "title": "" }, { "docid": "446d6f3d2f1773809c7d551ed004269f", "score": "0.5089117", "text": "public function addSometimesRule($new_sometimes_rule) {\n $sometimes_rules = $this->getSometimesRules();\n array_push($sometimes_rules, $new_sometimes_rule);\n $this->setSometimesRules($sometimes_rules);\n }", "title": "" }, { "docid": "3c7d0f18063824f4bbcc44fd448024eb", "score": "0.5062682", "text": "public function addRuleset($identifier = null, $position = 'bottom'){\n\t\t$ruleset = new rewrite_ruleset_mod_rewrite($identifier);\n\t\t\n\t\t$id = ($identifier != null)?$identifier:count($this->_rulesets);\n\t\t\n\t\tif(is_array($position)){\n\t\t\t\n\t\t\tif(!empty($position['before'])){\n\t\t\t\tif(array_key_exists($position['before'], $this->_rulesets)){\n\t\t\t\t\t$keys = array_keys($this->_rulesets);\n\t\t\t\t\t$key = array_search($position['before'], $keys);\n\t\t\t\t\tif($key === FALSE){\n\t\t\t\t\t\tthrow new Exception('The ruleset to place the rules before can not be found');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif(!empty($position['after'])){\n\t\t\t\tif(array_key_exists($position['after'], $this->_rulesets)){\n\t\t\t\t\t$keys = array_keys($this->_rulesets);\n\t\t\t\t\t$key = array_search($position['after'], $keys) + 1;\n\t\t\t\t\tif($key === FALSE){\n\t\t\t\t\t\tthrow new Exception('The ruleset to place the rules after can not be found');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\telseif($position == 'top'){\n\t\t\t$key = 0;\n\t\t}\n\t\t//default: bottom;\n\t\telse{\n\t\t\t$key = count($this->_rulesets);\n\t\t}\n\t\t\n\t\t$tmp_arr = array_splice($this->_rulesets, $key);\n\t\t$this->_rulesets = array_merge($this->_rulesets, Array($id => $ruleset));\n\t\t$this->_rulesets = array_merge($this->_rulesets, $tmp_arr);\n\t\t\n\t\treturn $ruleset;\n\t}", "title": "" }, { "docid": "c4839aac27df86a05f90085f5e1da070", "score": "0.5061594", "text": "function test_add_valid_custom_route_rule() {\n\t\t$rule = $this->getValidRuleHelper();\n\t\t$rule['route'] = '/custom/route/that/does/not/exist';\n\n\t\t$this->assertTrue( exoskeleton_add_rule( $rule ) );\n\t}", "title": "" }, { "docid": "53ed50c0d5ff7328f0c1c53797f398f0", "score": "0.5046563", "text": "public function addRule($format = 'html')\n {\n $authority = $this->application->createInstance(Authority::class);\n\n //2. If we are editing the authority, save\n if ($this->application->input->methodIs(\"post\")):\n\n if (!$authority->storePermissions()) {\n\n $this->response->addAlert(_(\"Could not save permissions\"), \"error\");\n } else {\n //Succesffully added\n $this->response->addAlert(_(\"Permisison rule has been added successfully\"), \"success\");\n }\n\n endif;\n\n //Report on state saved\n $this->application->dispatcher->redirect($this->application->input->getReferer(), HTTP_FOUND, null);\n\n return true;\n\n }", "title": "" }, { "docid": "0afa79ffef237d27b09e2cc7ff2e4d2c", "score": "0.50452656", "text": "private function enforceRule($rule, $message)\n {\n if (strpos($rule, ':') !== false) {\n list($method, $parameter) = explode(':', $rule);\n }\n\n $this->setHandler($method ?? $rule);\n\n $this->setParameters($parameter ?? null);\n\n if (!call_user_func_array($this->handler, $this->parameters)) {\n $this->bag[$this->key] = $message;\n }\n }", "title": "" }, { "docid": "3eee341222103dbdba220a3eee0b77a5", "score": "0.503715", "text": "public function extendValidation($rule, $message, $callable)\r\n\t{\r\n\t\t$this->extendRulesFunctions[$rule] = $callable;\r\n\t\t$this->messages[$rule] = $message;\r\n\t}", "title": "" }, { "docid": "b422634e825326866e2cc83581b900ac", "score": "0.5029247", "text": "public function add() {\n\n //$this->rules['station_url'] .= '|unique:stations,url';\n\n\t\t//$this->messages['station_url.unique'] = 'That URL is already in the system';\n\t\t\t\n\t\t$this->validate();\n\t}", "title": "" }, { "docid": "c95dcc35b30085382f3b90fd3d0c9fd1", "score": "0.5027659", "text": "public function addRule($_id, $_ruleCheckFailureMessage, $_ruleCheckFunction)\n {\n return $this->addNewRule(new Rule($_id, $_ruleCheckFailureMessage, $_ruleCheckFunction));\n }", "title": "" }, { "docid": "eb8ec4ef751ce673082ccb94b0add068", "score": "0.5026876", "text": "protected abstract function addRoute(Route $route);", "title": "" }, { "docid": "826f63abbe9882e83318c053607ec697", "score": "0.50083977", "text": "public function store(CreateRuleRequest $request)\n {\n $input = $request->all();\n\n $rule = $this->ruleRepository->create($input);\n\n Flash::success(__('messages.saved', ['model' => __('models/rules.singular')]));\n\n return redirect(route('adminPanel.rules.index'));\n }", "title": "" }, { "docid": "8aba398e118b4eb1abc1b389ef7136ba", "score": "0.5002813", "text": "private function addActionRule(Contact $contact, string $ruleName): void\n {\n switch ($ruleName) {\n case 'host_schedule_check':\n $contact->addRole(Contact::ROLE_HOST_CHECK);\n break;\n case 'host_schedule_forced_check':\n $contact->addRole(Contact::ROLE_HOST_CHECK);\n $contact->addRole(Contact::ROLE_HOST_FORCED_CHECK);\n break;\n case 'service_schedule_check':\n $contact->addRole(Contact::ROLE_SERVICE_CHECK);\n break;\n case 'service_schedule_forced_check':\n $contact->addRole(Contact::ROLE_SERVICE_CHECK);\n $contact->addRole(Contact::ROLE_SERVICE_FORCED_CHECK);\n break;\n case 'host_acknowledgement':\n $contact->addRole(Contact::ROLE_HOST_ACKNOWLEDGEMENT);\n break;\n case 'host_disacknowledgement':\n $contact->addRole(Contact::ROLE_HOST_DISACKNOWLEDGEMENT);\n break;\n case 'service_acknowledgement':\n $contact->addRole(Contact::ROLE_SERVICE_ACKNOWLEDGEMENT);\n break;\n case 'service_disacknowledgement':\n $contact->addRole(Contact::ROLE_SERVICE_DISACKNOWLEDGEMENT);\n break;\n case 'service_schedule_downtime':\n $contact->addRole(Contact::ROLE_ADD_SERVICE_DOWNTIME);\n $contact->addRole(Contact::ROLE_CANCEL_SERVICE_DOWNTIME);\n break;\n case 'host_schedule_downtime':\n $contact->addRole(Contact::ROLE_ADD_HOST_DOWNTIME);\n $contact->addRole(Contact::ROLE_CANCEL_HOST_DOWNTIME);\n break;\n case 'service_submit_result':\n $contact->addRole(Contact::ROLE_SERVICE_SUBMIT_RESULT);\n break;\n case 'host_submit_result':\n $contact->addRole(Contact::ROLE_HOST_SUBMIT_RESULT);\n break;\n case 'host_comment':\n $contact->addRole(Contact::ROLE_HOST_ADD_COMMENT);\n break;\n case 'service_comment':\n $contact->addRole(Contact::ROLE_SERVICE_ADD_COMMENT);\n break;\n case 'service_display_command':\n $contact->addRole(Contact::ROLE_DISPLAY_COMMAND);\n break;\n case 'generate_cfg':\n $contact->addRole(Contact::ROLE_GENERATE_CONFIGURATION);\n break;\n }\n }", "title": "" }, { "docid": "26a79595dc0bf6aa1a295952046a6934", "score": "0.49836", "text": "public function setRuleKind($val)\n {\n $this->_propDict[\"ruleKind\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "a593cafdb9125f86d11135aab8b62892", "score": "0.49711746", "text": "public function add($thing, $priority);", "title": "" }, { "docid": "657f99401e6d0973a56d5248e791ac9b", "score": "0.49606758", "text": "function _addRuleForLinkNewValues() {\n $this->_form->addFormRule(array(&$this, 'validateLinkNewValues'));\n }", "title": "" }, { "docid": "46921e986eb1f9cb6fbaa328d3633fe5", "score": "0.49604645", "text": "public function addRules(string $field, array $ruleSet): Validator\n\t{\n\t\t$this->ruleSets = array_merge_recursive($this->ruleSets, $this->expandFields([$field => $ruleSet]));\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "f0c5b916257f884985acdc1ae27b59b4", "score": "0.4951187", "text": "public function add_rules($field, $rules)\n\t{\n\t\t// Get the rules\n\t\t$rules = func_get_args();\n\t\t$rules = array_slice($rules, 1);\n\n\t\tif ($field === TRUE)\n\t\t{\n\t\t\t// Use wildcard\n\t\t\t$field = '*';\n\t\t}\n\n\t\tforeach ($rules as $rule)\n\t\t{\n\t\t\t// Arguments for rule\n\t\t\t$args = NULL;\n\n\t\t\tif (is_string($rule))\n\t\t\t{\n\t\t\t\t// Split the rule into the function and args\n\t\t\t\tlist($rule, $args) = $this->split_rule_string($rule);\n\t\t\t}\n\n\t\t\tif ($rule === 'is_array')\n\t\t\t{\n\t\t\t\t// This field is expected to be an array\n\t\t\t\t$this->array_fields[$field] = $field;\n\t\t\t}\n\n\t\t\t// Convert to a proper callback\n\t\t\t$rule = $this->callback($rule);\n\n\t\t\t// Add the rule, with args, to the field\n\t\t\t$this->rules[$field][] = array($rule, $args);\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "00eedab86d743140cbc0ad87adef23f0", "score": "0.49391615", "text": "public function addRoute(Route $route);", "title": "" }, { "docid": "00eedab86d743140cbc0ad87adef23f0", "score": "0.49391615", "text": "public function addRoute(Route $route);", "title": "" }, { "docid": "a51c4faf7efb58f417d82d678f28daaa", "score": "0.49384022", "text": "public function add_endpoint() {\n foreach ($this->endpoints as $endpoint) {\n // This is the API.\n add_rewrite_rule($endpoint['regex'], $endpoint['redirect'], $endpoint['after']);\n }\n }", "title": "" }, { "docid": "ca7f253f537316d911bb91b16fb42c9e", "score": "0.49312067", "text": "public static function add ( $expression, $function, $method = 'get' )\n {\n array_push( self::$routes, Array(\n 'expression' => $expression,\n 'function' => $function,\n 'method' => $method\n ) );\n }", "title": "" }, { "docid": "ec722865c885fcaa71faf065da448600", "score": "0.4922881", "text": "public function addAttribute($field, $rule)\n {\n $attributeRule = new AllOf();\n $attributeRule->addRules($this->createRulesArray($rule));\n $name = $field;\n\n // Get name if one was provided\n if (($colon = strpos($field, ':')) !== false) {\n $name = substr($field, $colon + 1);\n $field = substr($field, 0, $colon);\n }\n\n $attribute = new Key($field, $attributeRule);\n $attribute->setName($name);\n $this->addRule($attribute);\n }", "title": "" }, { "docid": "8d46c472cb43a539ac65584300aec623", "score": "0.49203598", "text": "public function add_validator($type, $rule)\r\n\t{\r\n\t\t$type = Inflector::plural($rule->type);\r\n\r\n\t\tif (in_array($type, array('filters', 'display_filters')))\r\n\t\t\treturn $this->add_filter(Inflector::singular($type), $rule);\r\n\r\n\t\t$next = count($this->_validators[$type]);\r\n\r\n\t\t// Resolve the context\r\n\t\t$this->make_context($rule);\r\n\r\n\t\t$this->_validators[$type][$next] = $rule;\r\n\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "04ecf53e6de3d655bb8b697d2c3a973b", "score": "0.4916195", "text": "function addPatterns($pattern){\n array_push ($this->patterns, $pattern );\n }", "title": "" }, { "docid": "424c80b4e509a0a56ddfccbdd7fd16ac", "score": "0.48959273", "text": "public function addCollection(RuleCollection $collection)\n {\n foreach ($collection as $name => $rule) {\n $this->set($name, $rule);\n }\n }", "title": "" }, { "docid": "f08a872a70bc8f7a36f5a455b21e3623", "score": "0.4895226", "text": "public static function add($expression, $name, $method = 'get')\n {\n array_push(self::$routes, array(\n 'expression' => $expression,\n 'name' => $name,\n 'method' => $method\n ));\n }", "title": "" }, { "docid": "cd42bf3543a35ee4ae663f57c0592bff", "score": "0.48875123", "text": "public function testAddRuleAndValidate() {\n\t\t$this->object->addRule('size', 'Size too large', 130000);\n\n\t\ttry {\n\t\t\t$this->object->validate();\n\n\t\t\t$this->assertTrue(true);\n\n\t\t} catch (Exception $e) {\n\t\t\t$this->assertTrue(false, $e->getMessage());\n\t\t}\n\n\t\t$this->object->addRule('ext', 'Invalid extension', array(array('png', 'gif')));\n\n\t\ttry {\n\t\t\t$this->object->validate();\n\n\t\t\t$this->assertTrue(false);\n\n\t\t} catch (Exception $e) {\n\t\t\t$this->assertTrue(true);\n\t\t}\n\t}", "title": "" }, { "docid": "415df9d7bd2da66e0e26798554d5953f", "score": "0.48795584", "text": "public function addRules($load_balancer, array $properties = []);", "title": "" }, { "docid": "af0a8cb87e2d1a3cf9cb886d7b455e9f", "score": "0.48650774", "text": "public function add(\\Closure $validation) : void\n\t{\n\t\t$this->validations[] = $validation;\n\t}", "title": "" } ]
ca174e02a92dcd165de103dc78a12f11
Kiem tra so du truoc va sau giao dich
[ { "docid": "5aed8ec70655cad57676e4672e53ce89", "score": "0.0", "text": "protected function verifyBalanceChange($balance_before)\n\t{\n\t\t$balance_cur = $this->purse->balance;\n\n\t\t$balance_after = $this->makeBalanceAfter($balance_before);\n\n\t\tif ($balance_cur < 0)\n\t\t{\n\t\t\treturn $this->blockUser($this->purse->user, \"Balance current invalid {$balance_cur} < 0\");\n\t\t}\n\n\t\tif (floor($balance_cur) != floor($balance_after))\n\t\t{\n\t\t\treturn $this->blockUser($this->purse->user, \"Balance change error {$balance_cur} != {$balance_after}\");\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "e76b803ba82701d96416580857e2b562", "score": "0.6574451", "text": "public function cekPulsa();", "title": "" }, { "docid": "1a669124b0c7847b428bb55c825eec03", "score": "0.65060824", "text": "public function bersuara()\n {\n return \"meowng... meowng ... meowng ...\";\n }", "title": "" }, { "docid": "4b64566d6700d5ce404a729d67c32875", "score": "0.6296014", "text": "public function run()\n {\n $gioithieuCNTT = \"Lịch sử hình thành và phát triển\n\n - Năm 1979, Bộ môn Kỹ thuật tính toán, trực thuộc Ban Giám Hiệu Trường Đại học Bách khoa Đà Nẵng được thành lập, với ba cán bộ giảng dạy đầu tiên.\n \n - Năm 1986, Trường Đại học Bách khoa Đà Nẵng nhận được máy tính điện tử МИНСК-22, thuộc thế hệ 2, chế tạo tại Liên-Xô.\n \n - Năm 1991, thành lập Trung tâm Tin Học dựa trên cơ sở Bộ môn Kỹ thuật tính toán, Trường Đại học Bách khoa.\n \n - Năm 1996, Bộ Giáo dục & Đạo tạo ra Quyết định số 4430/GD-ĐT ngày 17/10/1996 cho phép thành lập Khoa Công nghệ Thông tin (CNTT), trực thuộc Trường Đại học Kỹ thuật, Đại học Đà Nẵng. Trong suốt bốn năm từ 1996 đến 2000, Khoa CNTT là một trong bảy Khoa CNTT trọng điểm của Nhà nước trong chương trình Quốc gia về phát triển và ứng dụng CNTT ở Việt nam (theo Nghị quyết 49/CP ký ngày 03/08/1993 của Chính phủ).\n \n - Năm 1999, Khoa CNTT đào tạo khóa Cao học Khoa học Máy tính đầu tiên.\n \n - Năm 2001, Khoa CNTT đổi tên thành Khoa Công nghệ Thông tin & Điện tử Viễn thông.\n \n - Năm 2004, nhằm đáp ứng nhu cầu xã hội và sự lớn mạnh của ngành Công nghệ Thông tin, Khoa Công nghệ Thông tin & Điện tử Viễn thông được tách thành Khoa Công nghệ Thông tin và Khoa Điện tử Viễn thông.\";\n DB::table('khoa')->insert([\n ['TenKhoa' => 'Công nghệ thông tin','LogoKhoa'=> 'https://firebasestorage.googleapis.com/v0/b/fir-storage-nghia.appspot.com/o/image1603048909181.png?alt=media&token=e1dfb297-b348-4288-a2c4-b0bcc7c655d8', 'SDT'=>'0985243472', 'Email'=>'condusudu@gmail.com','GioiThieuKhoa' => $gioithieuCNTT],\n ['TenKhoa' => 'Nhiệt','LogoKhoa'=> 'https://firebasestorage.googleapis.com/v0/b/fir-storage-nghia.appspot.com/o/image1603045990344.png?alt=media&token=f30bf0a3-540d-439a-9ece-d94778e2807e', 'SDT'=>'0985243472', 'Email'=>'condusudu1@gmail.com','GioiThieuKhoa' => $gioithieuCNTT],\n ['TenKhoa' => 'Cơ khí','LogoKhoa'=> 'https://firebasestorage.googleapis.com/v0/b/fir-storage-nghia.appspot.com/o/image1603048909181.png?alt=media&token=e1dfb297-b348-4288-a2c4-b0bcc7c655d8', 'SDT'=>'015487584', 'Email'=>'condusudu2@gmail.com','GioiThieuKhoa' => $gioithieuCNTT],\n ['TenKhoa' => 'Hóa','LogoKhoa'=> 'https://firebasestorage.googleapis.com/v0/b/fir-storage-nghia.appspot.com/o/image1603048909181.png?alt=media&token=e1dfb297-b348-4288-a2c4-b0bcc7c655d8', 'SDT'=>'102145845', 'Email'=>'condusudu3@gmail.com','GioiThieuKhoa' => $gioithieuCNTT],\n ['TenKhoa' => 'Môi Trường','LogoKhoa'=> 'https://firebasestorage.googleapis.com/v0/b/fir-storage-nghia.appspot.com/o/image1603048909181.png?alt=media&token=e1dfb297-b348-4288-a2c4-b0bcc7c655d8', 'SDT'=>'0985243472', 'Email'=>'condusudu4@gmail.com','GioiThieuKhoa' => $gioithieuCNTT]\n \t]);\n\n }", "title": "" }, { "docid": "cf5662deec0888eaad0cd468e2ddb4fb", "score": "0.6224732", "text": "public function okruzi();", "title": "" }, { "docid": "5c836eed3134c9dd485a3e3bfc3a5bcc", "score": "0.6084439", "text": "public function nilai()\n {\n }", "title": "" }, { "docid": "1c53f4401f3145bc7196f611605598e6", "score": "0.60687906", "text": "public function cekKuota();", "title": "" }, { "docid": "094e1cd9b5fb003cbe6e89ccbf4285bf", "score": "0.6050445", "text": "public function toi_nay_an_gi()\n {\n echo \"mèo ăn thịt chuột\";\n }", "title": "" }, { "docid": "a189771a83a870a66bbdeb882c0485a6", "score": "0.6035596", "text": "function makespegeti(){\n echo \"Italian make pasta\";\n }", "title": "" }, { "docid": "bfcceaa8520d9ac92d53a203ca69ece5", "score": "0.60338974", "text": "function kieu2($vni) {\n$vni=strtr($vni, array(\n\"A\"=>\"A\", \"a\"=>\"a\",\n\"B\"=>\"B\", \"b\"=>\"b\",\n\"C\"=>\"C\", \"c\"=>\"c\",\n\"D\"=>\"D\", \"d\"=>\"d\",\n\"E\"=>\"E\", \"e\"=>\"e\",\n\"F\"=>\"F\", \"f\"=>\"f\",\n\"G\"=>\"G\", \"g\"=>\"g\",\n\"H\"=>\"H\", \"h\"=>\"h\",\n\"I\"=>\"I\", \"i\"=>\"i\",\n\"J\"=>\"J\", \"j\"=>\"j\",\n\"K\"=>\"K\", \"k\"=>\"k\",\n\"L\"=>\"L\", \"l\"=>\"l\",\n\"M\"=>\"M\", \"m\"=>\"m\",\n\"N\"=>\"N\", \"n\"=>\"n\",\n\"O\"=>\"O\", \"o\"=>\"o\",\n\"P\"=>\"P\", \"p\"=>\"p\",\n\"R\"=>\"R\", \"r\"=>\"r\",\n\"S\"=>\"S\", \"s\"=>\"s\",\n\"T\"=>\"T\", \"t\"=>\"t\",\n\"U\"=>\"U\", \"u\"=>\"u\",\n\"V\"=>\"V\", \"v\"=>\"v\",\n\"W\"=>\"W\", \"w\"=>\"w\",\n\"Y\"=>\"Y\", \"y\"=>\"y\",\n\"Z\"=>\"Z\", \"z\"=>\"z\",\n \n\"A1\"=>\"Á\", \"A4\"=>\"Ã\", \"A5\"=>\"Ạ\", \"A2\"=>\"À\", \"A3\"=>\"Ả\",\n\"E1\"=>\"É\", \"E4\"=>\"Ẽ\", \"E5\"=>\"Ẹ\", \"E2\"=>\"È\", \"E3\"=>\"Ẻ\",\n\"Y1\"=>\"Ý\", \"Y4\"=>\"Ỹ\", \"Y5\"=>\"Ỵ\", \"Y2\"=>\"Ỳ\", \"Y3\"=>\"Ỷ\",\n\"U1\"=>\"Ú\", \"U4\"=>\"Ũ\", \"U5\"=>\"Ụ\", \"U2\"=>\"Ù\", \"U3\"=>\"Ủ\",\n\"O1\"=>\"Ó\", \"O4\"=>\"Õ\", \"O5\"=>\"Ọ\", \"O2\"=>\"Ò\", \"O3\"=>\"Ỏ\",\n\"I1\"=>\"Í\", \"I4\"=>\"Ĩ\", \"I5\"=>\"Ị\", \"I2\"=>\"Ì\", \"I3\"=>\"Ỉ\",\n\n\"A61\"=>\"Ấ\", \"A64\"=>\"Ẫ\", \"A65\"=>\"Ậ\",\"A62\"=>\"Ầ\", \"A63\"=>\"Ẩ\",\n\"E61\"=>\"Ế\", \"E64\"=>\"Ễ\", \"E65\"=>\"Ệ\",\"E62\"=>\"Ề\", \"E63\"=>\"Ể\",\n\"O61\"=>\"Ố\", \"O64\"=>\"Ỗ\", \"O65\"=>\"Ộ\",\"O62\"=>\"Ồ\", \"O63\"=>\"Ổ\",\n\"O71\"=>\"Ớ\", \"O74\"=>\"Ớ\", \"O75\"=>\"Ợ\",\"O72\"=>\"Ờ\", \"O73\"=>\"Ở\",\n\"A81\"=>\"Ắ\", \"A84\"=>\"Ẵ\", \"A85\"=>\"Ặ\",\"A82\"=>\"Ằ\", \"A83\"=>\"Ẳ\",\n\"U71\"=>\"Ứ\", \"U74\"=>\"Ữ\", \"U75\"=>\"Ự\",\"U72\"=>\"Ừ\", \"U73\"=>\"Ử\",\n\n\"a1\"=>\"á\", \"a4\"=>\"ã\", \"a5\"=>\"ạ\", \"a2\"=>\"à\", \"a3\"=>\"ả\",\n\"e1\"=>\"é\", \"e4\"=>\"ẽ\", \"e5\"=>\"ẹ\", \"e2\"=>\"è\", \"e3\"=>\"ẻ\",\n\"y1\"=>\"ý\", \"y4\"=>\"ỹ\", \"y5\"=>\"ỵ\", \"y2\"=>\"ỳ\", \"y3\"=>\"ỷ\",\n\"u1\"=>\"ú\", \"u4\"=>\"ũ\", \"u5\"=>\"ụ\", \"u2\"=>\"ù\", \"u3\"=>\"ủ\",\n\"o1\"=>\"ó\", \"o4\"=>\"õ\", \"o5\"=>\"ọ\", \"o2\"=>\"ò\", \"o3\"=>\"ỏ\",\n\"i1\"=>\"í\", \"i4\"=>\"ĩ\", \"i5\"=>\"ị\", \"i2\"=>\"ì\", \"i3\"=>\"ỉ\",\n\n\"a61\"=>\"ấ\", \"a64\"=>\"ẫ\", \"a65\"=>\"ậ\", \"a62\"=>\"ầ\", \"a63\"=>\"ẩ\",\n\"e61\"=>\"ế\", \"e64\"=>\"ễ\", \"e65\"=>\"ệ\", \"e62\"=>\"ề\", \"e63\"=>\"ể\",\n\"o61\"=>\"ố\", \"o64\"=>\"ỗ\", \"o65\"=>\"ộ\", \"o62\"=>\"ồ\", \"o63\"=>\"ổ\",\n\"e61\"=>\"ế\", \"e64\"=>\"ễ\", \"e65\"=>\"ệ\", \"e62\"=>\"ề\", \"e63\"=>\"ể\",\n\n\"o71\"=>\"ớ\", \"o74\"=>\"ớ\", \"o75\"=>\"ợ\", \"o72\"=>\"ờ\", \"o73\"=>\"ở\",\n\"a81\"=>\"ắ\", \"a84\"=>\"ẵ\", \"a85\"=>\"ặ\", \"a82\"=>\"ằ\", \"a83\"=>\"ẳ\",\n\"u71\"=>\"ứ\", \"u74\"=>\"ữ\", \"u75\"=>\"ự\", \"u72\"=>\"ừ\", \"u73\"=>\"ử\",\n\n\"u7\"=>\"ư\",\n\"a8\"=>\"ă\", \"a6\"=>\"â\", \"o6\"=>\"ô\",\"e6\"=>\"ê\",\n\"u7\"=>\"ư\", \"o7\"=>\"ơ\", \"d9\"=>\"đ\", \"A6\"=>\"Â\", \"A8\"=>\"Ă\", \"E6\"=>\"Ê\", \"O6\"=>\"Ô\", \"O7\"=>\"Ơ\", \"U7\"=>\"Ư\", \"D9\"=>\"Đ\"));\nreturn $vni;\n}", "title": "" }, { "docid": "d8637505e1281a95ff97f90b30db6c4a", "score": "0.6025799", "text": "public function naselja();", "title": "" }, { "docid": "dd23ad80ffffed2d5ac3bab97bd42110", "score": "0.5999079", "text": "function getLoaiXe(){\n $a_loaixe = array(\n 'Xe 4 chỗ' => 'Xe 4 chỗ',\n 'Xe 5 chỗ' => 'Xe 5 chỗ',\n 'Xe 7 chỗ' => 'Xe 7 chỗ',\n 'Xe 16 chỗ' => 'Xe 16 chỗ',\n 'Xe 29 chỗ' => 'Xe 29 chỗ',\n 'Xe 35 chỗ' => 'Xe 35 chỗ',\n 'Xe 45 chỗ' => 'Xe 45 chỗ',\n 'Xe 47 chỗ' => 'Xe 47 chỗ',\n 'Loại xe khác' => 'Loại xe khác'\n );\n return $a_loaixe ;\n}", "title": "" }, { "docid": "2a40019065cb633916a156206401d9b2", "score": "0.5932972", "text": "function calculer_balise_AVELINE_CHOIX_TRI($suffixe,$choix,$pos,$tri_actuel,$sens_actuel,$choix_tri,$position_choix_tri) {\tif (!$choix_tri || ($pos == 'debut' && $position_choix_tri == 'fin') || ($pos == 'fin' && $position_choix_tri == 'debut'))\r\n\t\treturn '';\r\n\t\r\n\t$retour = array();\r\n\tforeach($choix as $c) {\r\n\t\t// Cas où on demande la note moyenne et que notation n'est pas activé\r\n\t\tif ($c['tri'] == 'moyenne' && !defined('_DIR_PLUGIN_NOTATION'))\r\n\t\t\t$c['affiche'] = '';\r\n\t\tif ($c['affiche']) {\r\n\t\t\t$lien = parametre_url(self(),'tri'.$suffixe,$c['tri']);\r\n\t\t\t$lien = parametre_url($lien,'sens'.$suffixe,$c['sens']);\r\n\t\t\t$retour[] = lien_ou_expose($lien,$c['libelle'],$c['tri']==$tri_actuel && $c['sens']==$sens_actuel);\r\n\t\t}\r\n\t}\r\n\treturn implode(' <span class=\"sep separateur\">|</span> ',$retour);\r\n}", "title": "" }, { "docid": "75ab4939e618cbb24e06afba77026da6", "score": "0.5922022", "text": "function frase ($dormitorios,$tipo,$poblacion) {\r\n\tglobal $language;\r\n\tswitch ($language) {\r\n\t\tcase 'en':\r\n\t\t\t$frase1 = ($tipo!='Business premises')?$dormitorios.' bedroom ':'';\r\n\t\t\t$frase = $frase1.$tipo.' in '.$poblacion;\r\n\t\t\tif ($dormitorios=='any'){ $frase = $tipo.' in '.$poblacion; }\r\n\t\t\tbreak;\r\n\t\tcase 'se':\r\n\t\t\t$frase1 = ($tipo!='Business premises')?$dormitorios.' '.trad(\"bedroom\").' ':'';\r\n\t\t\t$frase = $frase1.$tipo.' i '.$poblacion;\r\n\t\t\tif ($dormitorios=='any'){ $frase = $tipo.' in '.$poblacion; }\r\n\t\t\tbreak;\t\t\t\r\n\t\tcase 'es':\r\n\t\t\t$plural = ($dormitorios==1)?'dormitorio':'dormitorios';\r\n\t\t\t$frase1 = ($tipo!=7)?' de '.$dormitorios.' '.$plural:'';\r\n\t\t\t$frase = $tipo.$frase1.' en '.$poblacion;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t$frase1 = ($tipo!='Business premises')? $dormitorios.' '.trad(\"bedroom\").' ':'';\r\n\t\t\t$frase = $frase1.$tipo.' in '.$poblacion;\r\n\t\t\tif ($dormitorios=='any'){ $frase = $tipo.' in '.$poblacion; }\r\n\t\t\tbreak;\t\t\r\n\t}\r\n\treturn $frase;\r\n}", "title": "" }, { "docid": "164d91379447d0e85bb3d891c0595d88", "score": "0.5901262", "text": "public function keu_nhu_the_nao()\n {\n echo \"mèo kêu meo meo\";\n }", "title": "" }, { "docid": "2bd7674781656ba01dde44851a26ec36", "score": "0.5864764", "text": "function getAdresa(){\n return \"Bd. Cetatii, nr. 64 , TIMISOARA\";\n}", "title": "" }, { "docid": "82313db9d75dd7f586852c8d074dd058", "score": "0.5856339", "text": "function typo_guillemets_rempl($texte){\r\n\tif (strpos($texte, '\"')===false) return $texte;\r\n\t// prudence : on protege TOUTES les balises contenant des doubles guillemets droits\r\n\tif (strpos($texte, '<')!==false) \r\n\t\t$texte = preg_replace_callback('/(<[^>]+\"[^>]*>)/Ums', 'typo_guillemets_echappe_balises_callback', $texte);\r\n//\t\t$texte = preg_replace('/(<[^>]+\"[^>]*>)/Umse', 'cs_code_echappement(\"\\\\1\", \"GUILL\")', $texte);\r\n\t\t;\r\n\t// choix de la langue, de la constante et de la chaine de remplacement\r\n\tif (!$lang = $GLOBALS['lang_objet']) $lang = $GLOBALS['spip_lang'];\r\n\t$constante = '_GUILLEMETS_'.$lang;\r\n\t$guilles = defined($constante)?constant($constante):_GUILLEMETS_defaut;\r\n\t\r\n\t// Remplacement des autres paires de guillemets (et suppression des espaces apres/avant)\r\n\t// Et retour des balises contenant des doubles guillemets droits\r\n\treturn echappe_retour(preg_replace('/\"\\s*(.*?)\\s*\"/', $guilles, $texte), 'GUILL');\r\n}", "title": "" }, { "docid": "970d37a37a70a463a46287c8e4274f6f", "score": "0.5837106", "text": "function mots_croises_recupere_le_titre(&$chaine, $ouvrant, $fermant) {\r\n // si les balises ouvrantes et fermantes ne sont pas presentes, c'est mort\r\n if (strpos($chaine, $ouvrant)===false || strpos($chaine, $fermant)===false) return false;\r\n list($texteAvant, $suite) = explode($ouvrant, $chaine, 2); \r\n list($texte, $texteApres) = explode($fermant, $suite, 2); \r\n // on supprime les balises de l'affichage...\r\n // $chaine = $texteAvant.$texteApres;\r\n return trim($texte);\r\n}", "title": "" }, { "docid": "da095bb6c00b58f7d3956a65062c2f0b", "score": "0.58106494", "text": "private function fraisGhaza($somme)\n {\n\n\n return 0;\n }", "title": "" }, { "docid": "b27a2bd06dae61c2a0ab25b8ac819fd3", "score": "0.5799421", "text": "public function hitungFX(){\n for ($i=$this->bawah; $i <= $this->atas ; $i+=$this->h) {\n $this->fx[(string)$i] = $this->soal($i);\n }\n }", "title": "" }, { "docid": "407b096ffb0ab426f1ce3d2e18bceeb1", "score": "0.5794397", "text": "public function expel();", "title": "" }, { "docid": "2750962773e7685797f5bb3923ff24f4", "score": "0.5779912", "text": "function belas_puluh($nombor)\n{ \n$nombor_pertama= substr($nombor, 0, 1);\n$nombor_akhir= substr($nombor, -1);\n\t\n//jika gandaan 2 bukan 10 dan besar dari 19 -- cari belas \n\tif($nombor>=11 && $nombor<=19)\n\t\t{\n\t\t//cari belas\n\t\t$num_words=belas($nombor);\n\t\t}\n\telse\n\tif($nombor_akhir==0)\n\t\t{\n\t\t//cari puluh\n\t\t$num_words=puluh($nombor);\n\t\n\t\t}\n\telse\n\tif($nombor_akhir>0)\n\t\t{\n\t\t$num_words=puluh($nombor_pertama.'0').\" \".digit($nombor_akhir);\n\t\t}\n\t\t//echo $nombor_akhir;\n\t\treturn $num_words;\n\n}", "title": "" }, { "docid": "3750d0d7fea85b52533dad19be07fefb", "score": "0.57649404", "text": "function exometeo($saison, $temperature){\n if ($saison==='hiver' || $saison==='été' || $saison==='automne'){\n $en= 'en';\n }else{\n $en= 'au';\n }\n echo \"nous somme $en $saison et il fait $temperature degrés\";\n}", "title": "" }, { "docid": "47222447434ae2d4fd68945c0f264aaa", "score": "0.5754036", "text": "function proximo_nro_serie ($nro_serie){\r\n\t\r\n\t$datos = descomponer_nro_serie($nro_serie);\r\n\t\r\n\t$planta = $datos[\"planta\"];\r\n\t$aņo_mes = $datos[\"aņo_mes\"];\r\n\t$alfa = $datos[\"alfa\"];\r\n $primera_letra = $datos[\"primera_letra\"];\r\n $segunda_letra = $datos[\"segunda_letra\"];\r\n $tercera_letra = $datos[\"tercera_letra\"];\t\r\n\t$numerico = $datos[\"numerico\"];\r\n $numerico = $numerico + 1;\r\n $sumo_alfa = 0;\r\n\t\r\n\tif ($numerico<100 && $numerico>9) $numerico = \"0\".$numerico;\r\n\t elseif ($numerico<10) $numerico = \"00\".$numerico;\r\n\t elseif ($numerico>999) {\r\n\t \t $numerico = \"000\";\r\n\t \t $sumo_alfa = 1;\r\n\t }\r\n\t \r\n\t \r\n //echo ord($primera_letra).\" --- \".ord($segunda_letra).\" --- \".ord($tercera_letra);\t \r\n\t if ($sumo_alfa) {\r\n\t \t //para la tercera letra\r\n\t \t if (trim(ord($tercera_letra))<90) \r\n\t \t \t $tercera_letra = chr(trim(ord($tercera_letra))+1);\r\n\t \t elseif (trim(ord($segunda_letra))<90)\r\n\t \t $segunda_letra = chr(trim(ord($segunda_letra))+1);\r\n\t \t elseif (trim(ord($primera_letra))<90)\r\n\t \t $primera_letra = chr(trim(ord($primera_letra))+1);\r\n\t \t \r\n} //del if ($sumo_alfa) \r\n\t \r\nreturn\t $nro_serie_aux = $planta.$aņo_mes.$primera_letra.$segunda_letra.$tercera_letra.$numerico;\r\n}", "title": "" }, { "docid": "ff7cc97a45515b8524b9b4bd33d82a2c", "score": "0.5747124", "text": "function hitungluaskubus($sisi){\n\t\t$luas = $sisi*$sisi*6;\n\t\treturn $luas;\n\t}", "title": "" }, { "docid": "57c7d1e93491053663c62a4714ac33c7", "score": "0.57409453", "text": "function Crittografia($stringa){\n\t\t$this->chiave = $stringa;\n\t}", "title": "" }, { "docid": "9a9113a5669d039f56a3179004a01734", "score": "0.5737342", "text": "public function maullar(){\n return \"Miau miau\";\n }", "title": "" }, { "docid": "a159a5ae3fdae407564f0f5c263821e2", "score": "0.5721804", "text": "function bellen() {\n\t\t$meineWoerter = \"Wuff, Wuff\";\n\t\treturn $meineWoerter;\n\t}", "title": "" }, { "docid": "6ba711e5ba32d66f04b37e6ee7cf42af", "score": "0.57191026", "text": "function meteo($saison) {\n $article = 'en';\n if ($saison == 'Printemps') {\n $article = 'au';\n }\n // TODO : ternaire pour le fun\n echo \"Nous sommes $article $saison<br>\";\n}", "title": "" }, { "docid": "7326bad75b6f302d380a047d4357cb87", "score": "0.57172066", "text": "public function descuentoViajesPlus();", "title": "" }, { "docid": "22665d5a08387495db3e13e8b429caf4", "score": "0.5701229", "text": "function uradjeni_zad ($niz){\n $naj=0;\n $ind=\"\";\n foreach($niz as $dan=>$uspeh){\n if ($naj <=$uspeh){\n $naj=$uspeh;\n $ind=$dan;\n }\n }\n echo \"<p>Najuspesniji dan je $ind sa uspehom $naj</p>\";\n $zbir=0;\n $brojd=0;\n foreach($niz as $dan=> $uspeh){\n $zbir+=$uspeh;\n $brojd++;\n\n }\n $prosek=$zbir / $brojd;\n echo \"<p>Prosecna uspesnost je $prosek\";\n $najmanji=$niz['ponedeljak'];\n foreach($niz as $dan=> $uspeh)\n if($najmanji>$uspeh)\n $najmanji=$uspeh;\n \n \n $raz=$naj-$najmanji;\n \n \n \n echo \"<p>Razlika je $raz</p>\";\n }", "title": "" }, { "docid": "0973e2074fd71ec21db4593470e9804a", "score": "0.570061", "text": "function chuyen_ky_tu($mang)\n {\n $x = count($mang);\n $mang_moi = array();\n //$y = count($mang_can_ktra);\n for($i = 0; $i < $x; $i++)\n {\t\n \t$strlen = strlen($mang[$i]);\n \t$chuoi = '';\n for($j = 0; $j < $strlen; $j++)\n {\n \t\t\n \t\t$char = substr($mang[$i],$j,1);\n \t\tif(preg_match('/[aeiouy]/', $char))\n \t\t{\n \t\t\t$char = strtoupper($char);\n \t\t}\n \t\t$chuoi .= $char;\n }\n array_push($mang_moi,$chuoi);\n }\n return $mang_moi;\n \n \n }", "title": "" }, { "docid": "392272feb960299c6af5c01795e0f8d2", "score": "0.56882215", "text": "function hitungUmur($thn_lahir, $thn_sekarang) {\n $umur = $thn_sekarang - $thn_lahir;\n return $umur;\n}", "title": "" }, { "docid": "4787bb98d120088cea934bb6a8fe8d29", "score": "0.568223", "text": "public function emitirSom() {\n echo \"<p>Au Au.</p>\"; \n }", "title": "" }, { "docid": "e07f8d6941fa3f323f76f96ada283e35", "score": "0.56799644", "text": "public function cumplirAnios(){\n echo \" --- no tengo idea cuando nací --- \";\n }", "title": "" }, { "docid": "8c6b73a85e590c19c0bbda404776c533", "score": "0.5677889", "text": "function stringLetrasDescubiertas($coleccionLetras,$letra){\n \n for ($i=0;$i<count($coleccionLetras);$i++){\n if($letra==$coleccionLetras[$i][\"letra\"]){\n \n $coleccionLetras[$i][\"descubierta\"]=true;\n }\n if($coleccionLetras[$i][\"descubierta\"]==true){\n \n echo $coleccionLetras[$i][\"letra\"];\n }\n else{echo \"*\";}\n }\n}", "title": "" }, { "docid": "5a055e00952a67475fcf7eee1d098ce1", "score": "0.5674872", "text": "function extraire_trads($bloc) {\n\t$lang = '';\n// ce reg fait planter l'analyse multi s'il y a de l'{italique} dans le champ\n//\twhile (preg_match(\"/^(.*?)[{\\[]([a-z_]+)[}\\]]/siS\", $bloc, $regs)) {\n\twhile (preg_match(\"/^(.*?)[\\[]([a-z_]+)[\\]]/siS\", $bloc, $regs)) {\n\t\t$texte = trim($regs[1]);\n\t\tif ($texte OR $lang)\n\t\t\t$trads[$lang] = $texte;\n\t\t$bloc = substr($bloc, strlen($regs[0]));\n\t\t$lang = $regs[2];\n\t\t\t}\n\t$trads[$lang] = $bloc;\n\n\treturn $trads;\n\t\t}", "title": "" }, { "docid": "47f4907928bf5198347ed53a134ff337", "score": "0.56680155", "text": "function SING_PLUR_MOTS_SPECIAUX($mot_a_changer_sing, $mot_a_changer_plur, $nb, $maj_ou_min) \n{\n IF ($nb > 1) { $mot_a_changer = $mot_a_changer_plur; }\n ELSE IF ($nb < -1) { $mot_a_changer = $mot_a_changer_plur; }\n\t ELSE { $mot_a_changer = $mot_a_changer_sing; }\n\n\t IF ($maj_ou_min == 1) {$mot_a_changer = strtoupper($mot_a_changer) ;}\n\t \n return ($mot_a_changer);\t\t\t\t\t\t\t\n}", "title": "" }, { "docid": "72a35727beff67305af88c7e9a18e48c", "score": "0.56665915", "text": "function affiche();", "title": "" }, { "docid": "6080a1953d88517d9b3cd0e567ecb059", "score": "0.5660567", "text": "function mots_croises2($chaine){\r\n if (strpos($chaine, _MC_DEBUT)!==false || strpos($chaine, '<horizontal>')!==false) {\r\n\tob_start();\r\n\t$chaine = mots_croises($chaine);\r\n\t$data = ob_get_contents();\r\n\tob_end_clean();\r\n\t$chaine = nl2br(str_replace(\"\\t\",'&nbsp;&nbsp;&nbsp;&nbsp;',$data)).$chaine;\r\n }\r\n return $chaine;\r\n}", "title": "" }, { "docid": "67d15156ab6034b5b2f5512f2ceb5b7f", "score": "0.56581086", "text": "function castello_iva($_ivadiversa, $_castiva, $pagina, $_pg, $datidoc, $LINGUA, $desciva, $dati)\n{\n//per prima cosa passiamo l'inclusione dei files vars.php\n\trequire \"../../setting/vars.php\";\n\t// includiamo il file delle lingue\n\tinclude \"../librerie/$LINGUA\";\n\trequire_once \"../librerie/lib_html.php\";\n\trequire_once \"../librerie/motore_anagrafiche.php\";\n\t//dobbiamo inserire le spese di trasporto nel castelletto iva\n\t//considerando le spese sono con iva 20%\n\tif ($dati['datareg'] < $DATAIVA)\n\t{\n\t\t$ivasis = $ivasis - 1;\n\t}\n\n\tif ($_ivadiversa != \"2\")\n\t{\n\t\t$_castiva[$ivasis] = ($_castiva[$ivasis] + (($dati['imballo'] + $dati['trasporto'] + $dati['spesevarie'] + $dati['sp_bancarie']) - $dati['scoinco']));\n\t}\n\t//riordino l castello iva\n\tarsort($_castiva);\n\n\techo \"<TD WIDTH=134 colspan=\\\"2\\\">\\n\";\n\techo \"<table align=\\\"center\\\" width=\\\"100%\\\" border=\\\"0\\\">\\n\";\n\techo \"<tr><td align=right><FONT FACE=$datidoc[ST_FONTESTACALCE]><font size=1><I>$CI001</I></FONT></FONT></td>\";\n\techo \"<td align=right><FONT FACE=$datidoc[ST_FONTESTACALCE]><font size=1><I>$CI002</I></FONT></FONT></td>\";\n\techo \"<td align=right><FONT FACE=$datidoc[ST_FONTESTACALCE]><font size=1><I>$CI003</I></FONT></FONT></td>\";\n\techo \"</tr>\";\n\n\tif ($pagina == $_pg)\n\t{\n\t\t// se il cliente e esente lo faccio apparire\n\t\tif ($_ivadiversa == \"2\")\n\t\t{\n\t\t\techo \"<tr><td align=center colspan=3><font face=\\\"$datidoc[ST_FONTESTACALCE]\\\" style=\\\"font-size: $datidoc[ST_FONTESTASIZE]\" . \"pt;\\\">$desciva</font></td></tr>\\n\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Visualizzo tatali iva diverse\n\t\t\twhile (@list($indice, $valore) = each($_castiva))\n\t\t\t{\n\t\t\t\t$_aliquota = tabella_aliquota(\"singola_aliquota\", $indice, $_percorso);\n\t\t\t\t$_ivasep = number_format((($valore * $_aliquota) / 100), $dec, '.', '');\n\n\t\t\t\tif ($indice != \"\")\n\t\t\t\t{\n\t\t\t\t\techo \"<tr>\";\n\t\t\t\t\techo \"<td ALIGN=RIGHT><font face=\\\"$datidoc[ST_FONTESTACALCE]\\\" style=\\\"font-size: $datidoc[ST_FONTESTASIZE]\" . \"pt;\\\">\" . number_format(($valore), $decdoc) . \"</FONT></FONT></td>\\n\";\n\t\t\t\t\techo \"<td ALIGN=right><font face=\\\"$datidoc[ST_FONTESTACALCE]\\\" style=\\\"font-size: $datidoc[ST_FONTESTASIZE]\" . \"pt;\\\">$indice</FONT></FONT></td>\\n\";\n\t\t\t\t\techo \"<td ALIGN=RIGHT><font face=\\\"$datidoc[ST_FONTESTACALCE]\\\" style=\\\"font-size: $datidoc[ST_FONTESTASIZE]\" . \"pt;\\\">\" . number_format(($_ivasep), $decdoc) . \"</FONT></FONT></td>\\n\";\n\t\t\t\t\techo \"</tr>\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\techo \"</table></TD>\";\n}", "title": "" }, { "docid": "13685c60c6f2a8d05e04d1ab8d49d759", "score": "0.5652358", "text": "function otracosa()\n{\n\treturn \"este feature is over\";\n}", "title": "" }, { "docid": "91d458799f26756a7412f22820daf0bb", "score": "0.56463385", "text": "public function potenciasEspecificas(){\n\t\t\t$potencias[\"Chuveiro\"] = 4.4;\n\t\t\t$potencias[\"Ferro de Passar\"] = 1.2;\n\t\t\t$potencias[\"Ar condicionado\"] = 2.5;\n\t\t\t$potencias[\"Maquina de Lavar\"] = 1;\n\t\t\t$potencias[\"Microondas\"] = 2;\n\n\t\t\t$retornoPotencia = 0;\n\t\t\tfor($position = 0; $position < $this -> tomadasTipo -> size(); $position += 1){\n\t\t\t\t$retornoPotencia += $potencias[$this -> tomadasTipo -> get($position)];\n\t\t\t}\n\n\t\t\treturn $retornoPotencia;\n\t\t}", "title": "" }, { "docid": "15a22d697b2a93eff1cf270fb5a734f3", "score": "0.56463236", "text": "function Coche(){\n\t\t$this->ruedas=4;\n\t\t$this->color=\"Negro\";\n\t\t$this->motor=\"Mega Ferrari 2017\";\n\t}", "title": "" }, { "docid": "f99cfdf0feef701fe02e8d8904b9cbce", "score": "0.5639208", "text": "public function thongtinsinhsan()\n {\n echo \"mèo sinh sản mỗi lứa 2 đến 4 con mỗi lứa khoảng 5 tháng\";\n }", "title": "" }, { "docid": "a93e534a7367db59e3544d31e78bcd78", "score": "0.56205565", "text": "function afficherCoucou ()\r\n{\r\n echo \"<h4>AH QUE COUCOU</h4>\";\r\n}", "title": "" }, { "docid": "a73e4aeb17a392ecbdad1e52f73955e0", "score": "0.5619139", "text": "function mele($a, $b)\n {\n global $log, $i, $at, $de;\n\n //Primero de todo comprobar la tasa de cr&iacute;tico, a&ntilde;adiendole el poder\n //de la fuerza en caso de tener trance combativo (NV=3)\n $tasa = mt_rand(1, 100);\n if ($a[nv_sable]>=3) {\n $trance = true;\n $tasa += round(abs($a[lado]/20));\n }\n\n //Si el dado es mayor a 90 => cr&iacute;tico\n if ($tasa >= 90) {\n // Con cr&iacute;tico\n $danos = $a[vig] + mt_rand(-50, +75);\n $danos = max($danos, 1);\n\n $b[hp] -= $danos;\n $b[por] -= round($danos/$b[maxhp] * 100);\n\n //output\n $log[$i] = 'aCr._.de._.'.\"'$a[nomb]'\".'._.'.tDolor($danos).'._.a._.'.\"'$b[nomb]'\".'._.ab.'.\"'$b[por]'\".'.cb.cCr.fCr.end';\n $i++;\n\n //Calculos para la acometida\n if ($b[lado]>0 && $trance) {\n //Acometida ok\n $danos /= 2;\n $a[hp] -= $danos;\n $a[por] -= round($danos/$a[maxhp] * 100);\n\n //output\n $log[$i] = 'aAc._.de._.'.\"'$b[nomb]'\".'._.'.tDolor($danos).'._.a._.'.\"'$a[nomb]'\".'._.ab.'.\"'$a[por]'\".'.cb.cJe.fAc.end';\n $i++;\n }\n } else {\n //Sin cr&iacute;tico\n //Calcular punter&iacute;a\n $punt = $a[des] + mt_rand(-100, 100);\n //Calcular Bloqueo\n $blo = $b[con] + mt_rand(-100, 100);\n\n if ($blo>$punt) {\n //El atacante falla\n } else {\n //El atacante acierta\n\n //El PJ ha seleccionado un sable?\n if ($a[nv_sable]>2) {\n switch ($a[estilo_sable]) {\n case \"+\": //Exterminio\n $danos = ($a[vig] + mt_rand(-50, 50)) * 1.5;\n $danos -= $b[con]/3;\n $danos = max($danos, 1);\n\n $b[hp] -= $danos;\n $b[por] -= round($danos/$b[maxhp] * 100);\n\n //output\n $log[$i] = 'aEx._.de._.'.\"'$a[nomb]'\".'._.'.tDolor($danos).'._.a._.'.\"'$b[nomb]'\".'._.ab.'.\"'$b[por]'\".'.cb.cEx.fEx.end';\n $i++;\n\n break;\n case \"11\": //Doble sablazo\n $danos = $a[vig] + mt_rand(-50, 25);\n $danos -= $b[con]/3;\n $danos = max($danos, 1);\n\n $b[hp] -= $danos;\n $b[por] -= round($danos/$b[maxhp] * 100);\n\n //output\n $log[$i] = 'aDo._.de._.'.\"'$a[nomb]'\".'._.'.tDolor($danos).'._.a._.'.\"'$b[nomb]'\".'._.ab.'.\"'$b[por]'\".'.cb.cDo.fDo.end';\n $i++;\n\n //segunda ronda\n $danos = $a[vig] + mt_rand(-50, 25);\n $danos -= $b[con]/3;\n $danos = max($danos, 1);\n\n $b[hp] -= $danos;\n $b[por] -= round($danos/$b[maxhp] * 100);\n\n //output\n $log[$i] = 'aDo._.de._.'.\"'$a[nomb]'\".'._.'.tDolor($danos).'._.a._.'.\"'$b[nomb]'\".'._.ab.'.\"'$b[por]'\".'.cb.cDo.fDo.end';\n $i++;\n break;\n case \"2\": //Vitalizaci&oacute;n\n $danos = $a[vig] + mt_rand(-50, 50);\n $danos -= $b[con]/3;\n $danos = max($danos, 1);\n\n $b[hp] -= $danos;\n $b[por] -= round($danos/$b[maxhp] * 100);\n\n //output\n $log[$i] = 'aSa._.de._.'.\"'$a[nomb]'\".'._.'.tDolor($danos).'._.a._.'.\"'$b[nomb]'\".'._.ab.'.\"'$b[por]'\".'.cb.end';\n $i++;\n\n //El atacante se cura\n $danos /= 3;\n $a[hp] += $danos;\n $a[por] += round($danos/$a[maxhp] * 100);\n\n $a[hp] = min($a[hp], $a[maxhp]);\n $a[por] = min($a[por], 100);\n\n //output\n $log[$i] = 'aVi._.'.\"'$a[nomb]'\".'._.dVi.ab.'.\"'$a[por]'\".'.cb.cVi.fVi.end';\n $i++;\n\n break;\n }\n } else {\n $danos = $a[vig] + mt_rand(-50, 50);\n $danos -= $b[con]/3;\n $danos = max($danos, 1);\n\n $b[hp] -= $danos;\n $b[por] -= round($danos/$b[maxhp] * 100);\n\n //output\n $log[$i] = 'aSa._.de._.'.\"'$a[nomb]'\".'._.'.tDolor($danos).'._.a._.'.\"'$b[nomb]'\".'._.ab.'.\"'$b[por]'\".'.cb.end';\n $i++;\n }\n }\n }\n\n //ACTUALIZAR VARIABLES\n if ($a[nombre] == $at[nombre]) {\n $at = $a;\n $de = $b;\n } else {\n $at = $b;\n $de = $a;\n }\n }", "title": "" }, { "docid": "aa94572fbc16c14cfec96732b7bdb104", "score": "0.56175566", "text": "function czy_temat($funkcja){\r\n\t$wynik = num_czat(numer());\r\n\twhile ($pokaz = mysql_fetch_assoc($funkcja)){\r\n\tif (!empty($pokaz['temat']) && ($pokaz['num_c'] == $wynik)){\r\n\treturn \"Aktualny temat rozmowy to: \" . $pokaz['temat'];\r\n\r\n\t}\r\n\telse return \"Aktualny temat: Brak tematu\";\r\n\t}\r\n }", "title": "" }, { "docid": "af9f653899a7ae0b995044e381a205ee", "score": "0.56108356", "text": "function curaj($a, $b)\n {\n global $log, $i, $at, $de;\n\n //calcular acierto\n $punt = $a[inte] + mt_rand(-100, 100);\n $blo = $b[con] + mt_rand(-100, 100);\n\n if ($punt > $blo && $at[nv_sable]>1) { //Si hay acierto\n $danos = $a[pod] + mt_rand(-25, 25);\n $danos += $a[lado] /20;\n $danos = max($danos, 1);\n\n if ($a[nv_sable] >=4) {//Aura jedi\n $aura = true;\n $danos *= 2;\n }\n\n $a[hp] += $danos;\n $a[por] += round($danos/$a[maxhp] * 100);\n\n $a[hp] = min($a[hp], $a[maxhp]);\n $a[por] = min($a[por], 100);\n\n //output\n $log[$i] = \"'$a[nomb]'\".'._.aCu._.ab.'.\"'$a[por]'\".'.cb';\n\n if ($aura) {\n $log[$i] .= '.cJe.fAu';\n }\n\n $log[$i].='.end';\n $i++;\n }\n\n //ACTUALIZAR VARIABLES\n if ($a[nombre] == $at[nombre]) {\n $at = $a;\n $de = $b;\n } else {\n $at = $b;\n $de = $a;\n }\n }", "title": "" }, { "docid": "8516b7b2860fd30f4d711c2649d3ddeb", "score": "0.5600529", "text": "function milenializador($cadena){\n if(strpos($cadena, \"que\")!== false){\n echo str_replace(\"que\",\"k\", $cadena);\n }\n}", "title": "" }, { "docid": "adad34dcb75c9b14e4fbbe75b812de19", "score": "0.55950856", "text": "public function kontak()\n {\n }", "title": "" }, { "docid": "181ba5b4c6edf77164bac9c8d99fd783", "score": "0.55895036", "text": "function acomodar_texto($texto){\r\n $cont = 0;\r\n $text = \"\";\r\n $texto = html_entity_decode($texto, ENT_QUOTES, \"UTF-8\");\r\n for($i=0;$i<strlen($texto);$i++){ \r\n $cont++;\r\n $text = $text . $texto[$i];\r\n if ($cont >=25){\r\n //echo 1;\r\n if ($texto[$i] == \" \"){\r\n $text .= \"\\n\";\r\n //echo 2;\r\n $cont = 0;\r\n }\r\n }\r\n //echo $texto[$i]; \r\n }\r\n $texto = $text;\r\n return $texto;\r\n }", "title": "" }, { "docid": "3a7924356a45d0c88f9c5460c35c70e9", "score": "0.5585193", "text": "public function pretraga() {\n //uzme podatak \n $search = $this->input->get('searchBox');\n $data = [];\n $data['jela'] = $this->Jelo->dohvatiJeloIme($search);\n $this->prikazi(\"rezultatipretrage.php\", $data);\n // uradi pretragu \n //poziva metodu prikazi za jela sto je dobio.\n // $this->prikazi(\"jelo stranica\",array rezultata);\n }", "title": "" }, { "docid": "583b3c6c887e92740e384fc85a60a392", "score": "0.55747885", "text": "function consejos(){\n return '<p>10 Consejos del Dalai Lama </br>\n 1)Ten en cuenta que el gran amor y los grandes logros requieren grandes riesgos.</br>\n 2)Cuando pierdes, no pierdes la lección.</br>\n 3)Sigue las tres R: Respeto a ti mismo, Respeto para los otros y Responsabilidad sobre todas tus acciones.</br>\n 4)Recuerda que no conseguir lo que quieres, a veces significa un maravilloso golpe de suerte.</br>\n 5)Aprende las reglas, así sabrás como romperlas apropiadamente.</br>\n 6)No permitas que una pequeña disputa destroce una Gran Amistad.</br>\n 7)Cuando creas que has cometido un error, haz algo inmediatamente para corregirlo.</br>\n 8)Ocupa algo de tiempo cada día en estar solo.</br>\n 9)Abre tus brazos al cambio, pero no te olvides de tus valores.</br>\n 10)Recuerda que a veces el silencio es la mejor respuesta. </p>';//con return se regresara todo el texto que este en la funcion\n }", "title": "" }, { "docid": "23e23c614e404bc54d5f446f2301e710", "score": "0.55738324", "text": "function get_lib_est_alcoolisee(){\r\n if($this->est_alcoolisee){\r\n echo \"Oui c'est une boisson alcoolisé\";\r\n }else{\r\n echo \"Non ce n'est pas une boisson alcoolisé\";\r\n }\r\n }", "title": "" }, { "docid": "62e093c4b5a1ca0ca3ee50da1df3b11a", "score": "0.5570282", "text": "function\terror_sentence($i)\n{\n $tab[0]=\"Vous devez rentrer votre psuedo et la classe choisi :\\n - Mage\\n - Chasseur\\n - Druide\\n - Paladin\\n - Prêtre\\n - Voleur\\n - Chaman\\n - Démoniste\\n - Guerrier\\n\";\n $tab[1]=\"Votre pseudo ne doit pas etre un nombre et doit faire entre 3 et 16 caracteres\\n\";\n $tab[2]=\"Cette classe n'existe pas :\\n - Mage\\n - Chasseur\\n - Druide\\n - Paladin\\n - Prêtre\\n - Voleur\\n - Chaman\\n - Démoniste\\n - Guerrier\\n\";\n echo $tab[$i];\n return (1);\n}", "title": "" }, { "docid": "4a8015b757f503db8e277a5cbfb6cff6", "score": "0.5568753", "text": "function dia_en_letras ($dia) \n { \n $dias = array ('primero','dos','tres','cuatro','cinco','seis','siete','ocho','nueve','diez','once','doce','trece','catorce','quince','dieciséis','diecisiete','dieciocho','diecinueve','veinte','veintiuno','veintidós','veintitrés','veinticuatro','veinticinco','veintiséis','veintisiete','veintiocho','veintinueve','treinta','treinta uno');\n return utf8_decode($dias[$dia - 1]);\n }", "title": "" }, { "docid": "3bdb0f950cd24025e77f58f831bd6a21", "score": "0.5560469", "text": "public function luzTechoEncender( ) {\n\n $this->techo_on = 1;\n $this->techo_presidencia_on = 1;\n $this->techo_pasillo_on = 1;\n $this->techo_alumnos_on = 1;\n $this->ActualizarNivelesTecho();\n $this->dibujarTecho();\n //$this->dibujarPantalla();\n }", "title": "" }, { "docid": "1586580b279852c58d61f9d974eeb952", "score": "0.5552231", "text": "function saldotohari($saldo){\n\t\t// saldo cuti menjadi hari\n\t\t$saldocuti=$saldo;\n\t\t$saldojam=$saldocuti%8;\n\t\t$saldohari=($saldocuti-$saldojam)/8;\n\t\t$return=\"$saldohari Hari $saldojam Jam\";\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "4bdf4595243d2abe75668ddbd16e94cd", "score": "0.5545845", "text": "function tukar_ke_gandaan($nombor)\n{\n\t\t\t\t//tukar ke gandaan\n\t\t\t\t//terbalikkan nombor kerana kiraan gandaan 3 digit bermula dari belakang nombor\n\t\t\t\t$no_dari_belakang=strrev($nombor);\n\t\t\t\t//echo $no_dari_belakang;\n\t\t\t\t//pecahkan kepada 3 setiap bahagian,\n\t\t\t\t$bahagian = str_split($no_dari_belakang, 3);\n\t\t\t\t$kira_bhg=1;\n\t\t\t\t//echo \"<br>\".$no_dari_belakang.\"<br>\";\n\t\t\t\t\tforeach ($bahagian as $bhg_ptr=>$nilai ) \n\t\t\t\t\t{\n\t\t\t\t \n\t\t\t\t\t\t //cek panjang setiap bahagian\n\t\t\t\t\t\t $nilai_len=strlen($nilai);\n\t\t\t\t\t\t //jika nilai ==3 convert ke gandaan3\n\t\t\t\t\t\t if($nilai_len==3)\n\t\t\t\t\t\t { \n\t\t\t\t\t\t \n\t\t\t\t\t\t $numb=gandaan3(strrev($nilai));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t }else\n\t\t\t\t\t\t if($nilai_len==2)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t $numb=belas_puluh(strrev($nilai));\n\t\t\t\t\t\t }\n\t\t\t\t\t\t else\n\t\t\t\t\t\t {\n\t\t\t\t\t\t $numb=digit(strrev($nilai));\n\t\t\t\t\t\t }\n\t\t\t\t\t\t// echo\"<br>\".$kira_bhg.\"=\".$nilai.\"<br>\";\n\t\t\t\t\t\t \n\t\t\t\t\t\t if($bhg_ptr>0 && $nilai !='000')\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t $numb.=\" \".gandaan($kira_bhg);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t \tif ($numb != '') {\n\t\t\t\t\t\t\t\t$new_numb[$bhg_ptr] = $numb;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//echo \"<br>\".$cur.\"::::\".$numb.\"<br>\";\n\t\t\t\t\t\t //jika nilai==2 convert ke belas/ puluh\n\t\t\t\t\t\t //jika nilai=1 convert ke digit\n\t\t\t\t\t\t $kira_bhg++; \n\t\t\t\t\t}\n\t\t\t//setelah mendapat no dalam perkataan bagi setiap bahagian/ susun semula kedudukan nombor (terbalikkan)\n\t\t\t\t$rearange_numb = array_reverse($new_numb);\n\t\t\t\t$num_words = implode(' ', $rearange_numb);\n\t\t\t\treturn $num_words;\n}", "title": "" }, { "docid": "7726e806866ffec8b9ddaf21980496e6", "score": "0.5525397", "text": "final public function despedida(){\n return \"Hasta luego \".$this->nombre;\n}", "title": "" }, { "docid": "23ecbdb1de91f9c91f7ac63645ab0ec3", "score": "0.5524467", "text": "function cariPosisi($batas){\n\t\tif(empty($_GET['halaman'])){\n\t\t\t$posisi = 0;\n\t\t\t$_GET['halaman'] = 1;\n\t\t}else{\n\t\t\t$posisi = ($_GET[halaman]-1) * $batas;\n\t\t}\n\t\treturn $posisi;\n\t}", "title": "" }, { "docid": "bd39c60eca5b8559c6843f1187e78926", "score": "0.5520363", "text": "public function ecrire(){\n \n }", "title": "" }, { "docid": "80a7965774718ed35e526b7c6601adc3", "score": "0.55194867", "text": "function afficherCoucou ()\r\n{\r\n echo \"(COUCOU FONCTION)\";\r\n}", "title": "" }, { "docid": "b889fcdc1fdbedf1a3553989cc977de0", "score": "0.55117124", "text": "public function keliling()\n\t{\n\t\treturn 2*($this->panjang + $this->lebar);\n\t}", "title": "" }, { "docid": "37c8a01523dd390141dedd8d85cc15f9", "score": "0.55105543", "text": "public function ligarMudo()\n {\n }", "title": "" }, { "docid": "e32500a5e7f4235258c43d177b23e3cf", "score": "0.55078816", "text": "function code_courtoisie($sexe) {\n if ($sexe == 'Masculin') return 'M.';\n elseif ($sexe == 'Féminin') return 'Mme';\n else return '';\n}", "title": "" }, { "docid": "5034961b9ea41339a2cebf578d147201", "score": "0.5507232", "text": "function voitures($marque, $model)\n{\n return \"La voiture que vous avez choisi et de marque \" .$marque . \" et son model est \" . $model . \". <br>\";\n}", "title": "" }, { "docid": "c69a0d3a04d2c7d19854e6224882836b", "score": "0.55015975", "text": "function correction_debut_semaine ($jour,$cle) {\n global $index_jour_lundi;\n global $index_jour_samedi;\n global $index_jour_dimanche;\n $nouvelle_cle = $cle ;\n switch ($jour) {\n case \"lundi\":\n $nouvelle_cle = $cle ;\n break;\n case \"mardi\":\n if ( $cle < 8)\n $nouvelle_cle = $cle + 1;\n if ( $nouvelle_cle >= 7)\n $nouvelle_cle = $nouvelle_cle - 7;\n if ( $cle > 7)\n $nouvelle_cle = $cle ;\n break;\n case \"mercredi\":\n if ( $cle < 8)\n $nouvelle_cle = $cle + 2;\n if ( $nouvelle_cle >= 7)\n $nouvelle_cle = $nouvelle_cle - 7;\n if ( $cle > 7)\n $nouvelle_cle = $cle ;\n break;\n case \"jeudi\":\n if ( $cle < 8)\n $nouvelle_cle = $cle + 3;\n if ( $nouvelle_cle >= 7)\n $nouvelle_cle = $nouvelle_cle - 7;\n if ( $cle > 7)\n $nouvelle_cle = $cle ;\n break;\n case \"vendredi\":\n if ( $cle < 8)\n $nouvelle_cle = $cle + 4;\n if ( $nouvelle_cle >= 7)\n $nouvelle_cle = $nouvelle_cle - 7;\n if ( $cle > 7)\n $nouvelle_cle = $cle ;\n break;\n case \"samedi\":\n if ( $cle < 8)\n $nouvelle_cle = $cle + 5;\n if ( $nouvelle_cle >= 7)\n $nouvelle_cle = $nouvelle_cle - 7;\n if ( $cle > 7)\n $nouvelle_cle = $cle ;\n break;\n case \"dimanche\":\n if ( $cle < 8)\n $nouvelle_cle = $cle + 6;\n if ( $nouvelle_cle >= 7)\n $nouvelle_cle = $nouvelle_cle - 7;\n if ( $cle > 7)\n $nouvelle_cle = $cle ;\n break;\n }\n //recherche index du lundi \n if ( $nouvelle_cle == 1 )\n $index_jour_lundi = $cle;\n //recherche index du samedi\n if ( $nouvelle_cle == 6 )\n $index_jour_samedi = $cle;\n //recherche index du dimanche\n if ( $nouvelle_cle == 0 || $nouvelle_cle == 7)\n $index_jour_dimanche = $cle;\n return ($nouvelle_cle);\n }", "title": "" }, { "docid": "2443c270fd4ac7d2e5ea801e5728811f", "score": "0.5500855", "text": "function pretenido($Sesion){\n\treturn $Sesion->get_var(\"pretenido\");\n}", "title": "" }, { "docid": "b890503862bb3ecc5ab5c189b43abdad", "score": "0.54963547", "text": "private function descuentos(){\n # Calcular el descuento de nomina:\n $s_social = ((($this->salario / 240) * $this -> horas_mes) + (($this->salario / 240) * ($this -> horas_extras * 0.25))) * 0.08;\n return $s_social;\n }", "title": "" }, { "docid": "60577b50f54fe97af9d17ca43ac0f0eb", "score": "0.5491761", "text": "function preproses($teks,$nama_file) {\n$teks = str_replace(\"'\", \" \", $teks);\n$teks = str_replace(\"-\", \" \", $teks);\n$teks = str_replace(\")\", \" \", $teks);\n$teks = str_replace(\"(\", \" \", $teks);\n$teks = str_replace(\"\\\"\", \" \", $teks);\n$teks = str_replace(\"/\", \" \", $teks);\n$teks = str_replace(\"=\", \" \", $teks);\n$teks = str_replace(\".\", \" \", $teks);\n$teks = str_replace(\",\", \" \", $teks);\n$teks = str_replace(\":\", \" \", $teks);\n$teks = str_replace(\";\", \" \", $teks);\n$teks = str_replace(\"!\", \" \", $teks);\n$teks = str_replace(\"?\", \" \", $teks); \n$teks = str_replace(\">\", \" \", $teks); \n$teks = str_replace(\"<\", \" \", $teks); \n\n//ubah ke huruf kecil \n$teks = strtolower(trim($teks)); \n\n$myArray = explode(\" \", $teks); //proses tokenisasi\n\n//foreach($myArray as $my_Array){\n// echo $my_Array.'<br>'; \n//}\n\n\n//terapkan stop word removal\n $astoplist = array(\"a\", \"about\", \"above\", \"acara\", \"across\", \"ada\", \"adalah\", \"adanya\", \"after\", \"afterwards\", \"again\", \"against\", \"agar\", \"akan\", \"akhir\", \"akhirnya\", \"akibat\", \"aku\", \"all\", \"almost\", \"alone\", \"along\", \"already\", \"also\", \"although\", \"always\", \"am\", \"among\", \"amongst\", \"amoungst\", \"amount\", \"an\", \"and\", \"anda\", \"another\", \"antara\", \"any\", \"anyhow\", \"anyone\", \"anything\", \"anyway\", \"anywhere\", \"apa\", \"apakah\", \"apalagi\", \"are\", \"around\", \"as\", \"asal\", \"at\", \"atas\", \"atau\", \"awal\", \"b\", \"back\", \"badan\", \"bagaimana\", \"bagi\", \"bagian\", \"bahkan\", \"bahwa\", \"baik\", \"banyak\", \"barang\", \"barat\", \"baru\", \"bawah\", \"be\", \"beberapa\", \"became\", \"because\", \"become\", \"becomes\", \"becoming\", \"been\", \"before\", \"beforehand\", \"begitu\", \"behind\", \"being\", \"belakang\", \"below\", \"belum\", \"benar\", \"bentuk\", \"berada\", \"berarti\", \"berat\", \"berbagai\", \"berdasarkan\", \"berjalan\", \"berlangsung\", \"bersama\", \"bertemu\", \"besar\", \"beside\", \"besides\", \"between\", \"beyond\", \"biasa\", \"biasanya\", \"bila\", \"bill\", \"bisa\", \"both\", \"bottom\", \"bukan\", \"bulan\", \"but\", \"by\", \"call\", \"can\", \"cannot\", \"cant\", \"cara\", \"co\", \"con\", \"could\", \"couldnt\", \"cry\", \"cukup\", \"dalam\", \"dan\", \"dapat\", \"dari\", \"datang\", \"de\", \"dekat\", \"demikian\", \"dengan\", \"depan\", \"describe\", \"detail\", \"di\", \"dia\", \"diduga\", \"digunakan\", \"dilakukan\", \"diri\", \"dirinya\", \"ditemukan\", \"do\", \"done\", \"down\", \"dua\", \"due\", \"dulu\", \"during\", \"each\", \"eg\", \"eight\", \"either\", \"eleven\", \"else\", \"elsewhere\", \"empat\", \"empty\", \"enough\", \"etc\", \"even\", \"ever\", \"every\", \"everyone\", \"everything\", \"everywhere\", \"except\", \"few\", \"fifteen\", \"fify\", \"fill\", \"find\", \"fire\", \"first\", \"five\", \"for\", \"former\", \"formerly\", \"forty\", \"found\", \"four\", \"from\", \"front\", \"full\", \"further\", \"gedung\", \"get\", \"give\", \"go\", \"had\", \"hal\", \"hampir\", \"hanya\", \"hari\", \"harus\", \"has\", \"hasil\", \"hasnt\", \"have\", \"he\", \"hence\", \"her\", \"here\", \"hereafter\", \"hereby\", \"herein\", \"hereupon\", \"hers\", \"herself\", \"hidup\", \"him\", \"himself\", \"hingga\", \"his\", \"how\", \"however\", \"hubungan\", \"hundred\", \"ia\", \"ie\", \"if\", \"ikut\", \"in\", \"inc\", \"indeed\", \"ingin\", \"ini\", \"interest\", \"into\", \"is\", \"it\", \"its\", \"itself\", \"itu\", \"jadi\", \"jalan\", \"jangan\", \"jauh\", \"jelas\", \"jenis\", \"jika\", \"juga\", \"jumat\", \"jumlah\", \"juni\", \"justru\", \"juta\", \"kalau\", \"kali\", \"kami\", \"kamis\", \"karena\", \"kata\", \"katanya\", \"ke\", \"kebutuhan\", \"kecil\", \"kedua\", \"keep\", \"kegiatan\", \"kehidupan\", \"kejadian\", \"keluar\", \"kembali\", \"kemudian\", \"kemungkinan\", \"kepada\", \"keputusan\", \"kerja\", \"kesempatan\", \"keterangan\", \"ketiga\", \"ketika\", \"khusus\", \"kini\", \"kita\", \"kondisi\", \"kurang\", \"lagi\", \"lain\", \"lainnya\", \"lalu\", \"lama\", \"langsung\", \"lanjut\", \"last\", \"latter\", \"latterly\", \"least\", \"lebih\", \"less\", \"lewat\", \"lima\", \"ltd\", \"luar\", \"made\", \"maka\", \"mampu\", \"mana\", \"mantan\", \"many\", \"masa\", \"masalah\", \"masih\", \"masing-masing\", \"masuk\", \"mau\", \"maupun\", \"may\", \"me\", \"meanwhile\", \"melakukan\", \"melalui\", \"melihat\", \"memang\", \"membantu\", \"membawa\", \"memberi\", \"memberikan\", \"membuat\", \"memiliki\", \"meminta\", \"mempunyai\", \"mencapai\", \"mencari\", \"mendapat\", \"mendapatkan\", \"menerima\", \"mengaku\", \"mengalami\", \"mengambil\", \"mengatakan\", \"mengenai\", \"mengetahui\", \"menggunakan\", \"menghadapi\", \"meningkatkan\", \"menjadi\", \"menjalani\", \"menjelaskan\", \"menunjukkan\", \"menurut\", \"menyatakan\", \"menyebabkan\", \"menyebutkan\", \"merasa\", \"mereka\", \"merupakan\", \"meski\", \"might\", \"milik\", \"mill\", \"mine\", \"minggu\", \"misalnya\", \"more\", \"moreover\", \"most\", \"mostly\", \"move\", \"much\", \"mulai\", \"muncul\", \"mungkin\", \"must\", \"my\", \"myself\", \"nama\", \"name\", \"namely\", \"namun\", \"nanti\", \"neither\", \"never\", \"nevertheless\", \"next\", \"nine\", \"no\", \"nobody\", \"none\", \"noone\", \"nor\", \"not\", \"nothing\", \"now\", \"nowhere\", \"of\", \"off\", \"often\", \"oleh\", \"on\", \"once\", \"one\", \"only\", \"onto\", \"or\", \"orang\", \"other\", \"others\", \"otherwise\", \"our\", \"ours\", \"ourselves\", \"out\", \"over\", \"own\", \"pada\", \"padahal\", \"pagi\", \"paling\", \"panjang\", \"para\", \"part\", \"pasti\", \"pekan\", \"penggunaan\", \"penting\", \"per\", \"perhaps\", \"perlu\", \"pernah\", \"persen\", \"pertama\", \"pihak\", \"please\", \"posisi\", \"program\", \"proses\", \"pula\", \"pun\", \"punya\", \"put\", \"rabu\", \"rasa\", \"rather\", \"re\", \"ribu\", \"ruang\", \"saat\", \"sabtu\", \"saja\", \"salah\", \"sama\", \"same\", \"sampai\", \"sangat\", \"satu\", \"saya\", \"sebab\", \"sebagai\", \"sebagian\", \"sebanyak\", \"sebelum\", \"sebelumnya\", \"sebenarnya\", \"sebesar\", \"sebuah\", \"secara\", \"sedang\", \"sedangkan\", \"sedikit\", \"see\", \"seem\", \"seemed\", \"seeming\", \"seems\", \"segera\", \"sehingga\", \"sejak\", \"sejumlah\", \"sekali\", \"sekarang\", \"sekitar\", \"selain\", \"selalu\", \"selama\", \"selasa\", \"selatan\", \"seluruh\", \"semakin\", \"sementara\", \"sempat\", \"semua\", \"sendiri\", \"senin\", \"seorang\", \"seperti\", \"sering\", \"serious\", \"serta\", \"sesuai\", \"setelah\", \"setiap\", \"several\", \"she\", \"should\", \"show\", \"side\", \"since\", \"sincere\", \"six\", \"sixty\", \"so\", \"some\", \"somehow\", \"someone\", \"something\", \"sometime\", \"sometimes\", \"somewhere\", \"still\", \"suatu\", \"such\", \"sudah\", \"sumber\", \"system\", \"tahu\", \"tahun\", \"tak\", \"take\", \"tampil\", \"tanggal\", \"tanpa\", \"tapi\", \"telah\", \"teman\", \"tempat\", \"ten\", \"tengah\", \"tentang\", \"tentu\", \"terakhir\", \"terhadap\", \"terjadi\", \"terkait\", \"terlalu\", \"terlihat\", \"termasuk\", \"ternyata\", \"tersebut\", \"terus\", \"terutama\", \"tetapi\", \"than\", \"that\", \"the\", \"their\", \"them\", \"themselves\", \"then\", \"thence\", \"there\", \"thereafter\", \"thereby\", \"therefore\", \"therein\", \"thereupon\", \"these\", \"they\", \"thickv\", \"thin\", \"third\", \"this\", \"those\", \"though\", \"three\", \"through\", \"throughout\", \"thru\", \"thus\", \"tidak\", \"tiga\", \"tinggal\", \"tinggi\", \"tingkat\", \"to\", \"together\", \"too\", \"top\", \"toward\", \"towards\", \"twelve\", \"twenty\", \"two\", \"ujar\", \"umum\", \"un\", \"under\", \"until\", \"untuk\", \"up\", \"upaya\", \"upon\", \"us\", \"usai\", \"utama\", \"utara\", \"very\", \"via\", \"waktu\", \"was\", \"we\", \"well\", \"were\", \"what\", \"whatever\", \"when\", \"whence\", \"whenever\", \"where\", \"whereafter\", \"whereas\", \"whereby\", \"wherein\", \"whereupon\", \"wherever\", \"whether\", \"which\", \"while\", \"whither\", \"who\", \"whoever\", \"whole\", \"whom\", \"whose\", \"why\", \"wib\", \"will\", \"with\", \"within\", \"without\", \"would\", \"ya\", \"yaitu\", \"yakni\", \"yang\", \"yet\", \"you\", \"your\", \"yours\", \"yourself\", \"yourselves\");\n\n\n\n$filteredarray = array_diff($myArray, $astoplist); //remove stopword\n$st = new IDNstemmer();\n$konek = mysqli_connect(\"localhost\",\"root\",\"\",\"dbstbi\");\n\n \n\nforeach($filteredarray as $filteredarray){\n // echo $filteredarray.'<br>'; \n//echo \" \".\nif (strlen($filteredarray) >=4)\n\t {\n//echo \">>\".$filteredarray;\n$hasil=$st->doStemming($filteredarray);\n//$st->doStemming($filteredarray)\n\t // echo \" \".$hasil.'<br>';\n\t $stemming = Enhanced_CS($filteredarray);\n $query = \"INSERT INTO dokumen (nama_file, token, tokenstem, tokenstem2)\n VALUES('$nama_file', '$filteredarray', '$hasil','$stemming')\";\n echo \">>\".$query; \n mysqli_query($konek, $query);\t \n\t \n\t }\n\t \n}\n\n}", "title": "" }, { "docid": "a61d64fd5722f823b020d273e01a1520", "score": "0.54915154", "text": "function getTitulo() {\n // mistura os arrays somente do bloco 1\n shuffle($this->bloco[1]);\n return ucfirst($this->bloco[1][0]); // deixa a primeira letra da string maiúscula\n }", "title": "" }, { "docid": "61022d6a51841981ebb7b8d737136c91", "score": "0.54912204", "text": "function jalankan_sepedah(){\n return \"Jalankan Sepedahmu Gunakan dengan hati-hati \n <br>\";\n //...isi dari method hidupkan_laptop\n }", "title": "" }, { "docid": "bf25d8e89de1a9e080b44a9c2b7777f1", "score": "0.54862887", "text": "function izbaci_internu_komandu($string, $start, $end){\r\n $ini = strpos($string,$start);\r\n if ($ini == 0) return \"\";\r\n\t\t$pdeo = substr($string,0,$ini);\r\n $ini += strlen($start); \r\n $len = strpos($string,$end,$ini) - $ini;\r\n\t\t$pocddela = strpos($string,$end) + strlen($end);\r\n\t\t$duzina = strlen($string);\r\n\t\t$duzinaDDela = $duzina - $pocddela;\r\n\t\t$drugiDeo = substr($string,$pocddela,$duzinaDDela);\r\n //return substr($string,$ini,$len).\" pos1=\".strpos($string,$start).\" pos2=\".strpos($string,$end,$ini).\" | \".$string . \" prvideo=\".$pdeo . \" drugiDeo=\".$drugiDeo;\r\n\t\treturn $pdeo . $drugiDeo ;\r\n}", "title": "" }, { "docid": "4864c129201c349299ad7bdc7628e403", "score": "0.54768443", "text": "public function llamarAsesor(){\n $this->say(Constantes::MENSAJE_AYUDA_ASESOR);\n }", "title": "" }, { "docid": "815322b3320e7fa9addcd3d667959742", "score": "0.54704607", "text": "public static function kamen()\n {\n return 'Henshin!!!';\n }", "title": "" }, { "docid": "f181f3a60c5723b08d0730ad401667ce", "score": "0.5467002", "text": "function terbilang($angka) \n{\n $angka = (float)$angka; \n \n // array bilangan \n // sepuluh dan sebelas merupakan special karena awalan 'se' \n $bilangan = array( \n '', \n 'satu', \n 'dua', \n 'tiga', \n 'empat', \n 'lima', \n 'enam', \n 'tujuh', \n 'delapan', \n 'sembilan', \n 'sepuluh', \n 'sebelas' \n ); \n \n // pencocokan dimulai dari satuan angka terkecil \n if ($angka < 12) { \n // mapping angka ke index array $bilangan \n return $bilangan[$angka]; \n } else if ($angka < 20) { \n // bilangan 'belasan' \n // misal 18 maka 18 - 10 = 8 \n return $bilangan[$angka - 10] . ' belas'; \n } else if ($angka < 100) { \n // bilangan 'puluhan' \n // misal 27 maka 27 / 10 = 2.7 (integer => 2) 'dua' \n // untuk mendapatkan sisa bagi gunakan modulus \n // 27 mod 10 = 7 'tujuh' \n $hasil_bagi = (int)($angka / 10); \n $hasil_mod = $angka % 10; \n return trim(sprintf('%s puluh %s', $bilangan[$hasil_bagi], $bilangan[$hasil_mod])); \n } else if ($angka < 200) { \n // bilangan 'seratusan' (itulah indonesia knp tidak satu ratus saja? :)) \n // misal 151 maka 151 = 100 = 51 (hasil berupa 'puluhan') \n // daripada menulis ulang rutin kode puluhan maka gunakan \n // saja fungsi rekursif dengan memanggil fungsi terbilang(51) \n //return sprintf('seratus %s', terbilang($angka - 100)).\" rupiah\"; \n return sprintf('seratus %s', terbilang($angka - 100)); \n } else if ($angka < 1000) { \n // bilangan 'ratusan' \n // misal 467 maka 467 / 100 = 4,67 (integer => 4) 'empat' \n // sisanya 467 mod 100 = 67 (berupa puluhan jadi gunakan rekursif terbilang(67)) \n $hasil_bagi = (int)($angka / 100); \n $hasil_mod = $angka % 100; \n return trim(sprintf('%s ratus %s', $bilangan[$hasil_bagi], terbilang($hasil_mod))); \n } else if ($angka < 2000) { \n // bilangan 'seribuan' \n // misal 1250 maka 1250 - 1000 = 250 (ratusan) \n // gunakan rekursif terbilang(250) \n //return trim(sprintf('seribu %s', terbilang($angka - 1000))).\" rupiah\"; \n return trim(sprintf('seribu %s', terbilang($angka - 1000))); \n } else if ($angka < 1000000) { \n // bilangan 'ribuan' (sampai ratusan ribu \n $hasil_bagi = (int)($angka / 1000); // karena hasilnya bisa ratusan jadi langsung digunakan rekursif \n $hasil_mod = $angka % 1000; \n return sprintf('%s ribu %s', terbilang($hasil_bagi), terbilang($hasil_mod)); \n } else if ($angka < 1000000000) { \n // bilangan 'jutaan' (sampai ratusan juta) \n // 'satu puluh' => SALAH \n // 'satu ratus' => SALAH \n // 'satu juta' => BENAR \n // @#$%^ WT* \n \n // hasil bagi bisa satuan, belasan, ratusan jadi langsung kita gunakan rekursif \n $hasil_bagi = (int)($angka / 1000000); \n $hasil_mod = $angka % 1000000; \n return trim(sprintf('%s juta %s', terbilang($hasil_bagi), terbilang($hasil_mod))); \n } else if ($angka < 1000000000000) { \n // bilangan 'milyaran' \n $hasil_bagi = (int)($angka / 1000000000); \n // karena batas maksimum integer untuk 32bit sistem adalah 2147483647 \n // maka kita gunakan fmod agar dapat menghandle angka yang lebih besar \n $hasil_mod = fmod($angka, 1000000000); \n return trim(sprintf('%s milyar %s', terbilang($hasil_bagi), terbilang($hasil_mod))); \n } else if ($angka < 1000000000000000) { \n // bilangan 'triliun' \n $hasil_bagi = $angka / 1000000000000; \n $hasil_mod = fmod($angka, 1000000000000); \n return trim(sprintf('%s triliun %s', terbilang($hasil_bagi), terbilang($hasil_mod))); \n } else { \n return '......'; \n } \n}", "title": "" }, { "docid": "f7b63d3717f0e65f84b33dc8e1fd226c", "score": "0.5461579", "text": "function vektor_s($bobot_norm, $nilai_awal){\tif(!is_array($bobot_norm) && !is_array($nilai_awal)){\n\t\treturn false;\n\t}\n\n\t//foreach untuk nilai awal baris\n\tforeach($nilai_awal as $nilai_alternatif){\n\t\t$x = 1;\n\t\t$k = -1;\n\t\t//foreach untuk nilai awal kolom perbaris\n\t\tforeach($nilai_alternatif as $nilai){\n\t\t\t//lewati nama daerah\n\t\t\tif($k == -1){\n\t\t\t\t$k++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$x *= pow($nilai, $bobot_norm[$k]);\n\t\t\t$k++;\n\t\t}\n\t\t//simpan hasil kalkulasi pada vektor s\n\t\t$vektor_s[] = number_format($x, 2);\n\t}\n\n\t//return vektor s\n\treturn $vektor_s;\n}", "title": "" }, { "docid": "213e49979868068c1ecd4b3b3ce0e38f", "score": "0.5461131", "text": "function skaiciavimoFunkcija($simbolis, $aritmetika ) {\n $duomenuMasyvas = explode($simbolis, $aritmetika);\n\n // var_dump($duomenuMasyvas);\n $duomenuMasyvas[2] = $simbolis;\n\n //Kintamuju sukeitimas pasitelkian pagalbini kintamaji\n $pagalbinis = $duomenuMasyvas[2];// +\n $duomenuMasyvas[2] = $duomenuMasyvas[1];\n $duomenuMasyvas[1] = $pagalbinis;\n if($simbolis == \"+\") {\n return $duomenuMasyvas[0] + $duomenuMasyvas[2];\n } else if($simbolis == \"-\") {\n return $duomenuMasyvas[0] - $duomenuMasyvas[2];\n } else if($simbolis == \"/\") {\n return $duomenuMasyvas[0] / $duomenuMasyvas[2];\n } else if($simbolis == \"*\") {\n return $duomenuMasyvas[0] * $duomenuMasyvas[2];\n } else if($simbolis == \"%\") {\n return $duomenuMasyvas[0] % $duomenuMasyvas[2];\n }\n return \"Veiksmo neimanoma atlikt\";\n }", "title": "" }, { "docid": "03d3450c2fabd77904f351b832408b34", "score": "0.54538846", "text": "function luas_segitiga($alas, $tinggi){\n return $alas * $tinggi / 2;\n}", "title": "" }, { "docid": "09bfdd46ba26817a01337ddc5e976088", "score": "0.54489636", "text": "function envelopes_gifts() {\n $giftMaps = array(\n 1 => 'Điện thoại Zumbo S2 Dual',\n 2 => 'Điện thoại B310',\n 3 => 'Nón bảo hiểm thời trang',\n 4 => 'Thẻ cào trị giá 10.000đ',\n 5 => 'Thẻ cào trị giá 20.000đ',\n 6 => 'Thẻ cào trị giá 50.000đ',\n 7 => 'Thẻ cào trị giá 100.000đ',\n 8 => 'Thẻ cào trị giá 200.000đ',\n 9 => 'Thẻ cào trị giá 500.000đ',\n 10 => 'Mã giao hàng miễn phí freeship'\n );\n return $giftMaps;\n}", "title": "" }, { "docid": "a0e629601b9c9dcc8bcb35ece50cf720", "score": "0.54488164", "text": "function chatons_BarreTypo($tr) {\r\n\tif (!isset($GLOBALS['meta']['cs_chatons']))\tchatons_installe();\r\n\t// le tableau des chatons est present dans les metas\r\n\t$chatons = unserialize($GLOBALS['meta']['cs_chatons']);\r\n\t$max = count($chatons[0]);\r\n\t$res = '';\r\n\tfor ($i=0; $i<$max; $i++)\r\n\t\t$res .= \"<a href=\\\"javascript:barre_inserer('{$chatons[0][$i]}',@@champ@@)\\\">{$chatons[1][$i]}</a>\";\r\n\treturn $tr.'<tr><td><@@span@@>'._T('couteauprive:chatons:nom').\"</span>&nbsp;$res</td></tr>\";\r\n}", "title": "" }, { "docid": "0c25c8d1881b834cf14aca52ad5d3d22", "score": "0.54480165", "text": "function nombres(){\n $html='Nellely Castro<br>';\n $html.='Ezequiel Mora<br>';\n $html.='Perter Carpio<br>';\n $html.='Lilibeth Sanchez<br>';\n $html.='Ginger Peñafiel<br>';\n return $html;\n}", "title": "" }, { "docid": "c8277e0254fe044baf6039492d5666e5", "score": "0.54465896", "text": "function hitungkata($cari,$string){\n\n\t\tif (strlen($cari) < strlen($string)) {\n\n\t\t\t$strrev = strrev($string);\n\n\t\t\techo \"ditemukan \". (preg_match_all(\"/(?<=(nana))/\",$strrev) + preg_match_all(\"/(?<=(nana))/\",$string)).\" kali\";\n\n\t\t}else{\n\t\t\techo \"Jumlah karakter yang dicari melebihi jumlah karakter String!\";\n\t\t}\n\t}", "title": "" }, { "docid": "206a1ba6e354bb04c13c3fd9efefc37b", "score": "0.5444763", "text": "function disconnetti()\n\t\t{\n\t\t}", "title": "" }, { "docid": "33a2800b1149353e591047cf54710b06", "score": "0.54433423", "text": "function registra(){\n if (strlen($GLOBALS[\"risultato\"]) > 0 ) $GLOBALS[\"risultato\"] = $GLOBALS[\"risultato\"].\"*\";\n //aggiungiamo il numero primo con il quale abbiamo effettuato le divisioni\n $GLOBALS[\"risultato\"] = $GLOBALS[\"risultato\"] . $GLOBALS[\"base\"];\n // se abbiamo diviso più di una volta, aggiungiamo l'esponente alla stringa del risultato\n if ($GLOBALS[\"esponente\"]>1)\n $GLOBALS[\"risultato\"] = $GLOBALS[\"risultato\"].\"^\".$GLOBALS[\"esponente\"];\n // risettiamo l'esponente per riutilizzarlo\n $GLOBALS[\"esponente\"] = 0;\n}", "title": "" }, { "docid": "e89ca7e1e09621bc56116e28db673b06", "score": "0.5437729", "text": "function applique_tva($valeur) {\n // pour une tva à 20%\n return $valeur * 1.2;\n }", "title": "" }, { "docid": "e6d1f15bea3871b8660c10dbd4df47a1", "score": "0.5437666", "text": "function make_translit($stroka)\n{\n $string_cirillic[\"а\"] = \"a\";\n $string_cirillic[\"б\"] = \"b\";\n $string_cirillic[\"в\"] = \"v\";\n $string_cirillic[\"г\"] = \"g\";\n $string_cirillic[\"д\"] = \"d\";\n $string_cirillic[\"е\"] = \"e\";\n $string_cirillic[\"ё\"] = \"e\";\n $string_cirillic[\"ж\"] = \"zh\";\n $string_cirillic[\"з\"] = \"z\";\n $string_cirillic[\"и\"] = \"i\";\n $string_cirillic[\"й\"] = \"y\";\n $string_cirillic[\"к\"] = \"k\";\n $string_cirillic[\"л\"] = \"l\";\n $string_cirillic[\"м\"] = \"m\";\n $string_cirillic[\"н\"] = \"n\";\n $string_cirillic[\"о\"] = \"o\";\n $string_cirillic[\"п\"] = \"p\";\n $string_cirillic[\"р\"] = \"r\";\n $string_cirillic[\"с\"] = \"s\";\n $string_cirillic[\"т\"] = \"t\";\n $string_cirillic[\"у\"] = \"u\";\n $string_cirillic[\"ф\"] = \"f\";\n $string_cirillic[\"х\"] = \"h\";\n $string_cirillic[\"ц\"] = \"c\";\n $string_cirillic[\"ч\"] = \"ch\";\n $string_cirillic[\"ш\"] = \"sh\";\n $string_cirillic[\"щ\"] = \"sch\";\n $string_cirillic[\"ъ\"] = \"\";\n $string_cirillic[\"ы\"] = \"y\";\n $string_cirillic[\"ь\"] = \"\";\n $string_cirillic[\"э\"] = \"e\";\n $string_cirillic[\"ю\"] = \"yu\";\n $string_cirillic[\"я\"] = \"ya\";\n $string_cirillic[\"А\"] = \"A\";\n $string_cirillic[\"Б\"] = \"B\";\n $string_cirillic[\"В\"] = \"V\";\n $string_cirillic[\"Г\"] = \"G\";\n $string_cirillic[\"Д\"] = \"D\";\n $string_cirillic[\"Е\"] = \"E\";\n $string_cirillic[\"Ё\"] = \"E\";\n $string_cirillic[\"Ж\"] = \"Zh\";\n $string_cirillic[\"З\"] = \"Z\";\n $string_cirillic[\"И\"] = \"I\";\n $string_cirillic[\"Й\"] = \"Y\";\n $string_cirillic[\"К\"] = \"K\";\n $string_cirillic[\"Л\"] = \"L\";\n $string_cirillic[\"М\"] = \"M\";\n $string_cirillic[\"Н\"] = \"N\";\n $string_cirillic[\"О\"] = \"O\";\n $string_cirillic[\"П\"] = \"P\";\n $string_cirillic[\"Р\"] = \"R\";\n $string_cirillic[\"С\"] = \"S\";\n $string_cirillic[\"Т\"] = \"T\";\n $string_cirillic[\"У\"] = \"U\";\n $string_cirillic[\"Ф\"] = \"F\";\n $string_cirillic[\"Х\"] = \"H\";\n $string_cirillic[\"Ц\"] = \"C\";\n $string_cirillic[\"Ч\"] = \"Ch\";\n $string_cirillic[\"Ш\"] = \"Sh\";\n $string_cirillic[\"Щ\"] = \"Sch\";\n $string_cirillic[\"Ы\"] = \"Y\";\n $string_cirillic[\"Э\"] = \"E\";\n $string_cirillic[\"Ю\"] = \"Yu\";\n $string_cirillic[\"Я\"] = \"Ya\";\n $string_cirillic[\"À\"] = \"A\";\n $string_cirillic[\"à\"] = \"a\";\n $string_cirillic[\"Â\"] = \"A\";\n $string_cirillic[\"â\"] = \"a\";\n $string_cirillic[\"Æ\"] = \"Ae\";\n $string_cirillic[\"æ\"] = \"ae\";\n $string_cirillic[\"Ç\"] = \"C\";\n $string_cirillic[\"ç\"] = \"c\";\n $string_cirillic[\"É\"] = \"E\";\n $string_cirillic[\"é\"] = \"e\";\n $string_cirillic[\"È\"] = \"E\";\n $string_cirillic[\"è\"] = \"e\";\n $string_cirillic[\"Ê\"] = \"E\";\n $string_cirillic[\"ê\"] = \"e\";\n $string_cirillic[\"Ë\"] = \"E\";\n $string_cirillic[\"ë\"] = \"e\";\n $string_cirillic[\"Î\"] = \"I\";\n $string_cirillic[\"î\"] = \"i\";\n $string_cirillic[\"Ï\"] = \"I\";\n $string_cirillic[\"ï\"] = \"i\";\n $string_cirillic[\"Ô\"] = \"O\";\n $string_cirillic[\"ô\"] = \"o\";\n $string_cirillic[\"Œ\"] = \"Oe\";\n $string_cirillic[\"œ\"] = \"oe\";\n $string_cirillic[\"Ù\"] = \"U\";\n $string_cirillic[\"ù\"] = \"u\";\n $string_cirillic[\"Û\"] = \"U\";\n $string_cirillic[\"û\"] = \"u\";\n $string_cirillic[\"Ü\"] = \"U\";\n $string_cirillic[\"ü\"] = \"u\";\n $string_cirillic[\"Ÿ\"] = \"Y\";\n $string_cirillic[\"ÿ\"] = \"y\";\n\n $stroka = strtr($stroka, $string_cirillic);\n return $stroka;\n}", "title": "" }, { "docid": "4514bdc9a39df57bc3d518e315f33cb6", "score": "0.5436604", "text": "function devolverXpelicula($pelicula) {\r\n\t$distancia = 23 - strlen($pelicula);\r\n\tif ($distancia < 0) {\r\n\t\treturn 302;\t\r\n\t} else {\r\n\t\treturn (($distancia/2)*10) + 275;\t\r\n\t}\r\n}", "title": "" }, { "docid": "0eec33339e581f072fef804f06274f67", "score": "0.543549", "text": "function luas_persegi($sisi){\n return $sisi * $sisi;\n}", "title": "" }, { "docid": "c4c93fb2651d12c27a23301fdde10680", "score": "0.54347587", "text": "private function parsujDobropis() {\r\n\t\t\r\n\t\t$dobropis = $this->xmlImport->SeznamFaktVyd->FaktVyd;\r\n\t\t\r\n\t\t$this->fakturaCislo = $dobropis->Doklad;\r\n\t\t$this->ico = $dobropis->MojeFirma->ICO;\r\n\t\t$this->datum = $this->upravDatum($dobropis->PlnenoDPH);\r\n\t\t$this->dekada = \" \";\r\n\t\t$this->dodaciListCislo = \"0000000000\";\r\n\t\t\r\n\t\t$this->vypisPolozkyDobropisu($dobropis);\r\n\r\n\t\tif($this->chyba == \"\") {\r\n\t\t\t$this->stahnoutTXT();\r\n\t\t} else {\r\n\t\t\techo $this->chyba;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "015e78aab130448b2d1ce1b215f7e9f6", "score": "0.54339164", "text": "function sukurtiElementa() {\n\n //PHP sausainiukus\n\n //paspaudziam mygtuka, pasipildo masyvas, masyvas isiraso i Cookie,\n //kito paspaudimo metu pasiemama sena Cookie reiksme ir procesas kartojas\n\n //Jeigu sita mygtuka isivaizduotume kaip skaitikli\n //paspaudes mygtuka prie kazkokio kintamojo pridesiu +1\n //ir sita reiksme irasysiu i Cookie\n \n if(!isset($_COOKIE[\"skaitiklis\"])) {\n $skaitiklis = 1;\n echo \"<div class='elementas0'>\";\n echo \"Elementas0\";\n echo \"</div>\"; \n } else {\n $skaitiklis = intval($_COOKIE[\"skaitiklis\"]);\n $skaitiklis++;\n\n for($i = 0; $i< $skaitiklis; $i++) {\n echo \"<div class='elementas\".$i.\"'>\";\n echo \"Elementas\".$i;\n echo \"</div>\"; \n }\n }\n\n setcookie(\"skaitiklis\", $skaitiklis , time() + 3600, \"/\");\n // return \"Labas\";\n }", "title": "" }, { "docid": "1453c3afaadc4d960ad92cd140e16a74", "score": "0.54298115", "text": "function devolverXpelicula($pelicula) {\r\n\t$distancia = 18 - strlen($pelicula);\r\n\tif ($distancia < 0) {\r\n\t\treturn 302;\t\r\n\t} else {\r\n\t\treturn (($distancia/2)*12) + 275;\t\r\n\t}\r\n}", "title": "" }, { "docid": "56350215aab440201d99056740b987cf", "score": "0.54286796", "text": "function supimpa() {\n\t$chosen = supimpa_get_sentence();\n\techo \"<p id='supimpa'>$chosen</p>\";\n}", "title": "" }, { "docid": "0301eb0271d8bacd1943028bd16920d2", "score": "0.5427261", "text": "function dcpoison_affichage_final( $texte ) {\n\t\t\tglobal $notice; \n\t\t\t\tif( !_IS_BOT ) {\n\t\t\t\t $texte = preg_replace(\"'(?!<.*?)i(?![^<>]*?>)'s\", \"і\", $texte); \n\t\t\t\t\t$texte = preg_replace(\"'(?!<.*?)a(?![^<>]*?>)'s\", \"а\", $texte); \n \t\t\t\t$texte = str_replace(array('&lаquo;', '&rаquo;', 'аre_PаyPаl_LogіnPleаse'), array('&laquo;', '&raquo;', 'Are_PayPal_LoginPlease'), $texte);\n\t\t\t\t\treturn $texte;\n\t\t\t\t} else {\n\t\t\t\t\treturn $texte;\n\t\t\t\t}\n\t\t}", "title": "" }, { "docid": "037a02b3a96e5fcc949a7881bf6bb395", "score": "0.5425096", "text": "public function Besoins() {\n?>\n\t<h1>Liste des besoins avec achats et ventes &agrave; pr&eacute;voir</h1>\n\t<p>marchandise - quantité - date</p>\n<?php\n}", "title": "" }, { "docid": "a659f15502baf7f36a52369bf37014f7", "score": "0.5423672", "text": "function textDemi($demi,$taille = \"long\"){\n if($taille==\"long\"){\n $libelle_demi = array(\"am\"=>\"matin\",\"pm\"=>\"après-midi\");\n }\n else{\n $libelle_demi = array(\"am\"=>\"mat\",\"pm\"=>\"apm\");\n\n }\n return $libelle_demi[$demi];\n }", "title": "" }, { "docid": "e76dadf3d73ac1467e7d389af1b16f18", "score": "0.5414748", "text": "function khuyenmai() {\n\t\tmysql_query(\"SET names utf8\");\n \n $this->paginate = array('conditions'=>array('Product.status'=>1,'Product.spkuyenmai'=>1),'order'=>'Product.id DESC','limit'=>18);\n \t $this->set('products', $this->paginate('Product',array()));\t\n \t\t $this->set('cat','Sản phẩm khuyến mãi'); \n \n\t}", "title": "" }, { "docid": "d49720ab442f1b9301675bbad685c8c6", "score": "0.5401069", "text": "public function peserta();", "title": "" }, { "docid": "87bc04595e43bc3c81374546e0c40ba1", "score": "0.53996", "text": "public function getSuco()\n {\n return 'Suco de manga';\n }", "title": "" }, { "docid": "199e63526fa2298e6c09cbd14d863c58", "score": "0.53964734", "text": "private function Popust(){\n \n if ($this->ukupno < 10 ) {\n\n echo \"<h3>Dodajte jos u korpi za popust!</h3>\";\n\n }elseif($this->ukupno < 20){\n\n echo \"<b>Ostvarili ste 10% popusta</b>\";\n \n $this->cena -= (( 10 / 100) * $this->cena); \n\n }elseif($this->ukupno < 40){\n\n echo \"<b>Ostvarili ste 20% popusta</b>\";\n \n $this->cena -= (( 20 / 100) * $this->cena); \n\n } elseif($this->ukupno < 70){\n\n echo \"<b>Ostvarili ste 30% popusta</b>\";\n \n $this->cena -= (( 30 / 100) * $this->cena); \n\n }elseif($this->ukupno < 100){\n\n echo \"<b>Ostvarili ste 40% popusta</b>\";\n \n $this->cena -= (( 40 / 100) * $this->cena); \n\n }elseif($this->ukupno > 100){\n\n echo \"<b>Ostvarili ste 50% popusta</b>\";\n \n $this->cena -= (( 50 / 100) * $this->cena); \n }\n }", "title": "" } ]
aedd772f41e7d25c90deabad45137fb1
Checks whether file is of type extensions available
[ { "docid": "841bce772861d37c2be2ce75b2cf6acd", "score": "0.75519675", "text": "public function fileTypeIsCorrect()\r\n {\r\n $extensions = array(\"jpeg\",\"jpg\",\"png\", \"jpeg\");\r\n\r\n $of_type_extensions = false;\r\n\r\n $type = $this->file_type;\r\n\r\n if(in_array($type, $extensions)){\r\n $of_type_extensions = true;\r\n }\r\n\r\n return $of_type_extensions;\r\n }", "title": "" } ]
[ { "docid": "2835fb442ee90dcb5a6b853d277794e5", "score": "0.84604645", "text": "function validate_ext() {\n\t\t$extension = $this->get_ext($this->theFile);\n\t\t$ext_array = $this->extensions;\n\t\tif (in_array($extension, $ext_array)) { //Check if file's ext is in the list of allowed exts\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$this->error[] = \"That file type is not supported. The supported file types are: \".$this->extString;\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "1840575c0cb707e74737df66dca55b0d", "score": "0.83480805", "text": "public function hasFileExtension() : bool;", "title": "" }, { "docid": "89381df339893e717e2e49729e693801", "score": "0.782067", "text": "function valid_extension(&$file)\n\t{\n\t\treturn (in_array($file->get('extension'), $this->allowed_extensions)) ? true : false;\n\t}", "title": "" }, { "docid": "183eec634c21d06285641728e64c386b", "score": "0.7746525", "text": "public function hasExtension($extname);", "title": "" }, { "docid": "2beb6b1c6be6ac53dcd2b21ea2580251", "score": "0.77272636", "text": "function isAllowedExtension($fileName) {\n\treturn in_array(getExtension($fileName), array(\"jpg\", \"jpeg\", \"png\", \"gif\"));\n}", "title": "" }, { "docid": "087742ee04ad902741bf42e1563a3f92", "score": "0.76563", "text": "function checkExtension($file){\n $name = $file['name'];\n $ext = end((explode(\".\", $name))); # extra () to prevent notice\n echo \"Extension -- \" . $ext;\n $validexts = ['gif', 'jpg', 'png', 'GIF'];\n foreach($validexts as $i){\n if($ext == $i){\n return $ext;\n }\n }\n return false;\n }", "title": "" }, { "docid": "e939c81cd51438bb70aa0fb6cfcf6c85", "score": "0.7652795", "text": "public function is_valid_allowed_extension() {\n // Check if allowed extension are set, else all extensions are valid\n if (!empty($this->allowed_extensions)) {\n if (!in_array($this->file_extension, $this->allowed_extensions)) {\n return FALSE;\n }\n }\n return TRUE;\n }", "title": "" }, { "docid": "a300f0564ce250b6f540e702c72c6fed", "score": "0.75940275", "text": "function file_allowed_type_ext($file, $type) {\n // Create an array of allowed file-type\n $types = explode(',', strtolower(trim($type)));\n // Take the extension of the uploaded file\n $extension = strtolower(substr($file['name'], (strrpos($file['name'], \".\") + 1)));\n // Check if it is an allowed filetype\n if (in_array($extension, $types)) {\n return TRUE;\n }\n // Filetype not found? Invalid filetype\n $this->set_message('file_allowed_type', \"%s cannot be {$file['type']}.(should be %s)\");\n return FALSE;\n }", "title": "" }, { "docid": "8f0f5d3aa95f9eb5d3fb1572563892e3", "score": "0.758272", "text": "private function isValidExt(string $fileName) : bool {\n $ext = pathinfo($fileName, PATHINFO_EXTENSION);\n\n return in_array($ext, $this->getExts(),true) || in_array(strtolower($ext), $this->getExts(),true);\n }", "title": "" }, { "docid": "88f883e242f0a2f9cb1696f38ddcdd2f", "score": "0.74621606", "text": "public function has_known_extension() {\n\t\t$pathinfo = pathinfo($this->request_uri);\n\t\tif (!isset($pathinfo['extension'])) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$known_extension = false;\n\t\tforeach (self::$filetypes as $filetype => $extensions) {\n\t\t\tif (in_array(strtolower($pathinfo['extension']), $extensions)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "0a406dad057d2975b6663e815e5f2429", "score": "0.7453397", "text": "public static function check_file_extension( $filename ) {\n\t\t\tif ( substr( strrchr( $filename, '.' ), 1 ) === 'php' ) {\n\t\t\t\t// has .php exension\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t// ./wp-content/plugins\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "ba32c9f4ffecda5aab3d6cf16cbbdf6b", "score": "0.73809016", "text": "private function checkExtension(UploadedFile $file): bool\n {\n return $file->guessExtension() === \"txt\" || $file->guessExtension() === \"csv\";\n }", "title": "" }, { "docid": "9b4672b4f0ff7ce9c032bcb3f100d901", "score": "0.7355621", "text": "private function checkFileType($ext_allowed, $file_type = null)\n\t\t{\n\t\t\tif(in_array($file_type,$ext_allowed))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0b9e9a62722fac1b0d50a2b7f8afd750", "score": "0.73243684", "text": "public function valid_extensions($str,$options=array()){\n\t\t$info = new SplFileInfo($str);\n\t\treturn in_array($info->getExtension(),$options['condition'])?1:0;\n\t}", "title": "" }, { "docid": "56b9201ce4954b8a9d57bd22db016031", "score": "0.7302128", "text": "public function isValidExtension($file = '')\n {\n $ext = pathinfo($file, PATHINFO_EXTENSION);\n if (!in_array(strtolower($ext), $this->allowed_file_extensions)) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "d624368bfc652f1edab9f7f478845cef", "score": "0.7288975", "text": "private function checkFileExtension($filename, $ext) \n {\n return ( $ext === pathinfo($filename, PATHINFO_EXTENSION) );\n }", "title": "" }, { "docid": "7275c14768eaaf3f4a56cb2e1b409d3c", "score": "0.7267489", "text": "public function hasExtension()\r\n {\r\n return Zend_Path::hasExtension($this->getPath());\r\n }", "title": "" }, { "docid": "719fd19266ed183d9aeda9a986d1b635", "score": "0.7252965", "text": "abstract protected function isSupportedFileType();", "title": "" }, { "docid": "d7b65e67f327368246dca6e53144548f", "score": "0.7252667", "text": "function validate_extension($file_name)\n\t{\n\t\t$ext_array = $this->ext_array;\n\t\tif (!$file_name)\n\t\t{\n\t\t\t// no file name given\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (!$ext_array)\n\t\t\t{\n\t\t\t\t// no extension array\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// is valid extension?\n\t\t\t\tif (in_array($this->get_extension($file_name), $ext_array)) return true;\n\t\t\t\telse return false;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "bdb07b1709d9e64c5d675a106f20f429", "score": "0.71872973", "text": "function valid_extension ($ext) {\n\n if (preg_match(\"/jpg|jpeg|png|gif/i\", $ext)) {\n return TRUE;\n } else {\n return FALSE;\n }\n\n}", "title": "" }, { "docid": "0155efd0fc77f86d74604beb0b298cd2", "score": "0.711883", "text": "private function isValidExtension($path) {\n\t\t$extension = pathinfo($path, PATHINFO_EXTENSION);\n\t\treturn in_array($extension, $this->extensions);\n\t}", "title": "" }, { "docid": "a0f9156f879ab9b651ffc901835980c2", "score": "0.71152306", "text": "protected function _isAllowedExtension($fileName) {\r\r\n $parts = explode('.', $fileName);\r\r\n $ext = strtolower(end($parts));\r\r\n\r\r\n $this->current_extension = $ext;\r\r\n\r\r\n if (in_array($ext, $this->allowedImageExtensions))\r\r\n return true;\r\r\n else\r\r\n return false;\r\r\n }", "title": "" }, { "docid": "6ce5369f52215c91e578ee325652f25c", "score": "0.7105073", "text": "public function checkAllSpecificType($extension){\r\n\t\t$extension = strtolower($extension);\r\n\t\t$bln = true;\r\n\t\t$ext = \"\";\r\n\t\tforeach($this->fileArray as $key => $value){\r\n\t\t\t$ext = substr($key, (strpos($key, \".\") + 1));\r\n\t\t\t$ext = strtolower($ext);\r\n\t\t\tif($extension != $ext){\r\n\t\t\t\t$bln = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $bln;\r\n\t}", "title": "" }, { "docid": "ba9ef93f9d1bb12dcc3b39103e5734b4", "score": "0.70623237", "text": "public function validateFileExtension($path) {\n\t\tif($this->valid_file_extensions === false) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif(!is_string($path)) {\n\t\t\tthrow new Exception(\"validateFileExtension: path is not a string.\");\n\t\t}\n\t\tif(!is_array($this->valid_file_extensions)) {\n\t\t\tthrow new Exception(\"validateFileExtension: valid_file_extensions is not an array.\");\n\t\t}\n\t\t$extension = array_pop(explode('.', $path));\n\t\treturn in_array($extension, $this->valid_file_extensions);\n\t}", "title": "" }, { "docid": "64b55087b87428b59e666354897e5960", "score": "0.70446527", "text": "private function __isValidExtension($image_types, $file)\n\t{\n\t\treturn in_array($this->__decodeContent($file['type']), $image_types);\n\t}", "title": "" }, { "docid": "dda4ff9e035c62e7d3d119ea8aa5c9dd", "score": "0.704391", "text": "public function maybe_is_file() {\n\n\t\t// A list of common file types.\n\t\t$known_types = array(\n\t\t\t'html', 'htm', 'xml', 'json', 'txt', 'rtf', 'pdf', 'php',\n\t\t\t'js', 'css', 'png', 'jpg', 'jpeg', 'gif', 'ico', 'mov',\n\t\t\t'mp3', 'mp4', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx',\n\t\t\t'zip', 'tar', 'tar.gz'\n\t\t);\n\n\t\t$path = pathinfo( $_SERVER[ 'REQUEST_URI' ], PATHINFO_EXTENSION );\n\n\t\t// Is the file type present in the array?\n\t\tif ( in_array( $path, $known_types, true ) ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "08d7f4a60075878507dcfc80f5dbfc51", "score": "0.7034267", "text": "public function checkExtension(array &$uf)\n\t{\n\t\tif ($this->allowed) {\n\t\t\t$filename = $uf['name'];\n\t\t\t$ext = pathinfo($filename, PATHINFO_EXTENSION);\n\t\t\t$uf['ext'] = $ext;\n\t\t\t//debug($uf);\n\t\t\treturn in_array(strtolower($ext), $this->allowed);\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "0e15b14b74d4cc066db3cfb211bb5f2a", "score": "0.69914246", "text": "protected function validateType()\n {\n if (!in_array($this->extension, static::$allowedExt)) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "892b511f01856d2d675a2f7ce69507c4", "score": "0.69803894", "text": "public function checkExtensions(File $file, $value)\n {\n if (is_array($value) === false) {\n $value = [$value];\n }\n\n if ($file->getTempName() == '') {\n $this->errors['INVALID_NO_FILE'] = sprintf(Message::get('INVALID_NO_FILE'));\n return false;\n }\n\n if (in_array(strtolower($file->getExtension()), $value) === false) {\n $this->errors['INVALID_EXTENSION'] = sprintf(Message::get('INVALID_EXTENSION'), $file->getName(), implode(',', $value));\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "a856783ffb8bf2eac1b3900e20bb80dd", "score": "0.6978867", "text": "public static function fnCheckMimeType($file){\n $finfo = finfo_open(FILEINFO_MIME_TYPE);\n return in_array(finfo_file($finfo, $file), self::$_allowed_mime_types);\n }", "title": "" }, { "docid": "3ec71cf25c5312672b874047f493089f", "score": "0.69540876", "text": "function UploadAllowedFileExt($filename) {\r\n\t\treturn ew_CheckFileType($filename);\r\n\t}", "title": "" }, { "docid": "499607a610e1c5a09024cf667a935a97", "score": "0.69412094", "text": "public function supports($filename);", "title": "" }, { "docid": "b128aa8b95f21471f5a3e59cb70cc133", "score": "0.68530554", "text": "protected function extensionsAllowed(&$file)\n\t{\n\t\tif (empty($this->allowedExtensions) && empty($this->fileExtensions)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (in_array($file['extension'], $this->allowedExtensions)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$file['error'] = 1;\n\t\t$file['success'] = false;\n\t\t$file['errorMessage'] = ($this->hasCustomMessage('extensions')) ? $this->customErrorMessages['extensions']\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: $this->defaultErrorMessage('extensions');\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9dc85613a332a4e6b6f9022d0a556689", "score": "0.6832202", "text": "public function canProcess(File $file)\n {\n return in_array($file->getProperty('extension'),\n $this->supportedFileTypes);\n }", "title": "" }, { "docid": "8c308dacabbb4452b309a579e5f50536", "score": "0.6821963", "text": "public function isValid(): bool {\r\n\r\n $file = $this -> getFile();\r\n\r\n if(false === $file instanceof File || false === is_readable($file -> getPath())) {\r\n return true;\r\n }\r\n\r\n $extensions = array_map(function($extension) {\r\n return ltrim(strtolower($extension), '.');\r\n }, $this -> getParameter('extensions'));\r\n\r\n return false === in_array($file -> getExtension(), $extensions);\r\n }", "title": "" }, { "docid": "99a67d9466ca612ee45b21347976cab1", "score": "0.6814866", "text": "public function is_valid_file_type() {\n // If allow file type not set, all types are allowed\n if (!empty($this->allowed_type)) {\n if (!array($this->file_type, $this->allowed_types)) {\n return FALSE;\n }\n }\n return TRUE;\n }", "title": "" }, { "docid": "5a23aa6c32bf82b86d308651bc6bfaa6", "score": "0.6813216", "text": "protected function getAllowedFileExtensions()\n {\n return ['php', 'yml', 'yaml'];\n }", "title": "" }, { "docid": "8c918935c197f3a43f5920bb6f7d9d55", "score": "0.6807908", "text": "public static function extension($file = false) {\n\n if ($file && self::isFile($file)) {\n\n return pathinfo($file, PATHINFO_EXTENSION);\n }\n\n return false;\n }", "title": "" }, { "docid": "83636fa17ce463732ff31a0b1cb4df3a", "score": "0.6806653", "text": "static public function checkFilesExtension($filename,\n\t\t\t\t\t array $exts,\n\t\t\t\t\t $value_if_empty = true,\n\t\t\t\t\t $depth = 0,\n\t\t\t\t\t $iate = 0)\n {\n Debug::checkArgs(0,\n\t\t 4, 'int', $depth,\n\t\t 4, array('greater than', -1), $depth,\n\t\t 5, 'int', $iate,\n\t\t 5, array('greater than', -1), $iate);\n Debug::checkArgs($iate,\n\t\t 1, 'string', $filename);\n \n if (Misc::isEmpty($exts))\n return (bool)$value_if_empty;\n foreach ( $exts as $ext ) {\n if (mb_substr($filename, -mb_strlen($ext)) === $ext)\n\treturn true;}\n return false;\n }", "title": "" }, { "docid": "8735953ba65a60c97d2f5066bef32aed", "score": "0.68004566", "text": "public function hasExtension()\n {\n return (null !== $this->getExtension());\n }", "title": "" }, { "docid": "8e20d414d7445d6ea90f6aeb7fdca895", "score": "0.6761553", "text": "public function isFile();", "title": "" }, { "docid": "a7b4b73813fa80a54450489b238e65c6", "score": "0.67605585", "text": "function file_allowed_type($file, $type) {\n //is type of format a,b,c,d? -> convert to array\n $exts = explode(',', $type);\n\n //is $type array? run self recursively\n if (count($exts) > 1) {\n foreach ($exts as $v) {\n $rc = $this->file_allowed_type($file, $v);\n if ($rc === TRUE) {\n return TRUE;\n }\n }\n }\n\n //is type a group type? image, application, word_document, code, zip .... -> load proper array\n $ext_groups = array();\n $ext_groups['image'] = array('jpg', 'jpeg', 'gif', 'png');\n $ext_groups['application'] = array('exe', 'dll', 'so', 'cgi');\n $ext_groups['php_code'] = array('php', 'php4', 'php5', 'inc', 'phtml');\n $ext_groups['word_document'] = array('rtf', 'doc', 'docx');\n $ext_groups['compressed'] = array('zip', 'gzip', 'tar', 'gz');\n\n if (array_key_exists($exts[0], $ext_groups)) {\n $exts = $ext_groups[$exts[0]];\n }\n\n //get file ext\n $file_ext = strtolower(strrchr($file['name'], '.'));\n $file_ext = substr($file_ext, 1);\n\n if (!in_array($file_ext, $exts)) {\n $this->set_message('file_allowed_type', \"El archivo para el campo %s debe ser de tipo $type.\");\n return false;\n } else {\n return TRUE;\n }\n }", "title": "" }, { "docid": "975996ed7370f5ea332ec412191822b4", "score": "0.675346", "text": "public function accept()\n {\n /* @var $file \\SplFileInfo */\n $file = $this->current();\n\n return $file->isFile() && in_array($file->getExtension(), $this->extensions);\n }", "title": "" }, { "docid": "d04f0049ab812e5b47ffc215f6ebd92f", "score": "0.6741592", "text": "public function getFileExtension();", "title": "" }, { "docid": "f0a04632217e87befa00a72d3e39dfb1", "score": "0.67359847", "text": "function _allowed_file_type($file_name, $allowed_types=array()){\n foreach($allowed_types as $key=>$value){\n $pos = strpos(strtolower($file_name), strtolower($value));\n if ($pos === false) {\n $return = false;\n } else {\n $return = true;\n break;\n }\n }\n return $return;\n}", "title": "" }, { "docid": "e651450ffb6c3a206accc5f0c08ad695", "score": "0.6729099", "text": "public function verifyFotoExtensionExists($filename){\n if(pathinfo($filename, PATHINFO_EXTENSION) == \"\"){\n $message = 'Deze foto in de sheet werd niet opgenomen want ze bevat geen extensie: ' . '\"' . $filename . '\"';\n $this->warnings[] = $message;\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "4de474578c978e44c9d6898562539262", "score": "0.670605", "text": "public function isAllowed($ext)\n\t{\n\t\tforeach ($this->_allowedFiles as $collection) {\n\t\t\tif (isset($collection[$ext])) {\n\t\t\t\treturn $collection[$ext];\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d497034d963bc16437318c38de027a67", "score": "0.66900504", "text": "public static function is_valid_img_ext($file) {\n $file_ext = self::get_file_ext($file);\n\n self::$valid = empty(self::$valid) ? (array) apply_filters('cmb_valid_img_types', array('jpg', 'jpeg', 'png', 'gif', 'ico', 'icon')) : self::$valid;\n\n return ( $file_ext && in_array($file_ext, self::$valid) );\n }", "title": "" }, { "docid": "c9e45191038d528e8e35c3572aa0643b", "score": "0.664222", "text": "public function is_file();", "title": "" }, { "docid": "83a907eff399dadc1b3689a626328961", "score": "0.6635766", "text": "public static function isThisExtension($check, $extensions = [])\n {\n self::checkInputType($check);\n if (!self::checkTmpFile($check))\n {\n return false;\n }\n $fileExtension = pathinfo($check['name'], PATHINFO_EXTENSION);\n\n if (is_array($extensions))\n {\n foreach ($extensions as $key => $extension)\n {\n $extensions[$key] = str_replace('.', '', $extension);\n }\n\n if (in_array($fileExtension, $extensions))\n {\n return true;\n } else\n {\n return false;\n }\n } elseif (is_string($extensions))\n {\n return $fileExtension === $extensions ? true : false;\n }\n return false;\n }", "title": "" }, { "docid": "1a8ac31c911d011750877c86121272e6", "score": "0.6631858", "text": "public function file_type_is_valid($file_name) {\n\t\t\n\t\t\t$file_types = array('pdf','xls','doc','rtf','docx','xlsx','txt','ppt','pptx','pub','wmv','mov','mp4','mp3','png','jpg','jpeg','gif');\n\t\t\tforeach ($fileTypes as $fileType) {\n\t\t\t\tif ( stristr($file_name, $file_types) ) {\n\t\t\t\t\t$a = true;\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\t$a = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $a;\n\t\t}", "title": "" }, { "docid": "84196dd6da4b282f067d012a212843c0", "score": "0.66245556", "text": "public function is_allowed_file_type($file)\n {\n $path_parts = pathinfo($file);\n\n // if there is no extension\n if (!isset($path_parts['extension'])) {\n // we check if no extension file are allowed\n return (bool)$this->config['security']['allowNoExtension'];\n }\n\n $extensions = array_map('strtolower', $this->config['upload']['restrictions']);\n\n if($this->config['upload']['policy'] == 'DISALLOW_ALL') {\n if(!in_array(strtolower($path_parts['extension']), $extensions)) {\n return false;\n }\n }\n if($this->config['upload']['policy'] == 'ALLOW_ALL') {\n if(in_array(strtolower($path_parts['extension']), $extensions)) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "d4421eb30489c536e1a509c2e5852cb3", "score": "0.66217303", "text": "public function isSupported($file);", "title": "" }, { "docid": "2b95bb09070e6978265d8a3738c8e5d7", "score": "0.6608592", "text": "function is_valid_image_file($img_file){\n\t\t$name = basename($img_file);\n\t\t$extension_name = get_file_extension($name);\n\t\tif(!array_key_exists($extension_name,$this->img_type_arr)){\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "cde8bf20e41420ff05d9b2b8e277e981", "score": "0.66047245", "text": "function urkund_check_file_type($filename, $checkdb = true) {\n $pathinfo = pathinfo($filename);\n\n if (empty($pathinfo['extension'])) {\n return '';\n }\n $ext = strtolower($pathinfo['extension']);\n $filetypes = urkund_default_allowed_file_types();\n\n if (!empty($filetypes[$ext])) {\n return $filetypes[$ext];\n }\n // Check for updated allowed filetypes.\n if ($checkdb) {\n return get_config('plagiarism_urkund', 'ext_'.$ext);\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "fe0264f1f8a8d00612635c019d837e00", "score": "0.65797526", "text": "public function isValid($value)\n {\n $file = basename($value);\n $info=array();\n $info['extension'] = substr($file, strrpos($file, '.') + 1);\n\n $extensions = $this->getExtension();\n if ($this->getCase() && (in_array($info['extension'], $extensions))) {\n return true;\n } elseif (!$this->getCase()) {\n foreach ($extensions as $extension) {\n if (strtolower($extension) == strtolower($info['extension'])) {\n return true;\n }\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "a13c80d29311c86f0400dcaf6d0963f0", "score": "0.6578293", "text": "public function has_extensions() {\n\t\t$extensions = $this->get_extensions();\n\t\treturn ! empty( $extensions );\n\t}", "title": "" }, { "docid": "cd1890ff7d9ff0af3e59face39f138dc", "score": "0.6562308", "text": "public function checkFileType($filename, $allowedtypes=array())\n\t{\n\t\t# Get the file extension.\n\t\t$extension=$this->getFileExtension($filename);\n\t\t# Check if the extension is allowed.\n\t\tif(in_array($extension, $allowedtypes))\n\t\t{\n\t\t\t# It is. Return TRUE.\n\t\t\treturn TRUE;\n\t\t}\n\t\t# It's not. Return an error message.\n\t\treturn 'That file type is not allowed.';\n\t}", "title": "" }, { "docid": "d6522d8be9ec14297be5a78b64d0a210", "score": "0.65444183", "text": "public function testMimeTypeAdditions()\n {\n // $extensions = get_option('file_extension_whitelist');\n // $mimes = get_option('file_mime_type_whitelist');\n // $this->assertContains('xml', $extensions);\n // $this->assertContains('application/xml', $mimes);\n }", "title": "" }, { "docid": "d99c9daebddf3dd51f4000c41f0ab5d8", "score": "0.6532627", "text": "function isFile();", "title": "" }, { "docid": "82153a9c40f31260225cd1cde790c647", "score": "0.6490685", "text": "private function _checkExtension($extension) {\n\t\tif(!$this->enabled) {\n\t\t\treturn false;\n\t\t}\n\t\t$extensions = $this->extensions;\n\t\treturn in_array($extension,$extensions);\n\t}", "title": "" }, { "docid": "cfb68634660afdbfe258a1689504f7f2", "score": "0.64900744", "text": "private function mimeTypeFunctionsExists()\n {\n return ((function_exists('finfo_open') || function_exists('mime_content_type')) ? TRUE : FALSE);\n }", "title": "" }, { "docid": "8bfa6150d62ab172dc7ae03e8c65fb0a", "score": "0.6488916", "text": "final private static function typeFile($file, $type) {\n\t\tif(!is_array($file) || !isset($file['type']) || (isset($file['error']) && $file['error'] != 0)) {\n\t\t\treturn false;\n\t\t}\n\t\tif((isset($file['error']) && $file['error'] != 0) || !isset($file['name']) || !isset($file['type']) || !isset($file['tmp_name']) || !isset($file['size'])) {\n\t\t\treturn false;\n\t\t}\n\t\t$exp = explode(\"/\", $file['type']);\n\t\t$rt = current($exp);\n\t\t$ext = strtolower(pathinfo($file['name'], PATHINFO_EXTENSION));\n\t\tif(is_string($type)) {\n\t\t\treturn (($rt === $type) || ($ext === $type));\n\t\t} elseif(is_array($type)) {\n\t\t\treturn (in_array($rt, $type) || in_array($ext, $type));\n\t\t}\n\t}", "title": "" }, { "docid": "8e367a22a6d7a57794bd85eb45577d84", "score": "0.6488365", "text": "function file_is_audio($path_to_file) {\r\n $allowed = array(\r\n 'audio/mpeg', 'audio/x-mpeg', 'audio/mpeg3', 'audio/x-mpeg-3', 'audio/aiff',\r\n 'audio/mid', 'audio/x-aiff', 'audio/x-mpequrl', 'audio/midi', 'audio/x-mid',\r\n 'audio/x-midi', 'audio/wav', 'audio/x-wav', 'audio/xm', 'audio/x-aac', 'audio/basic',\r\n 'audio/flac', 'audio/mp4', 'audio/x-matroska', 'audio/ogg', 'audio/s3m', 'audio/x-ms-wax',\r\n 'audio/xm'\r\n );\r\n\r\n// check REAL MIME type\r\n $finfo = finfo_open(FILEINFO_MIME_TYPE);\r\n $type = finfo_file($finfo, $path_to_file);\r\n finfo_close($finfo);\r\n\r\n// check to see if REAL MIME type is inside $allowed array\r\n if (in_array($type, $allowed)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "c2db131bea6f10e504568ccf3d0591cf", "score": "0.64812934", "text": "public function isFile(): bool\n {\n $mime = $this->parseMime();\n return $mime[\"type\"] === \"application\" && $mime[\"subtype\"] === \"pdf\";\n }", "title": "" }, { "docid": "5c982388fe067e4223464f967b941b48", "score": "0.6453283", "text": "private function checkExtension($fileName, $fileMime){\n $fileParts = explode(\".\", $fileName);\n $this->ext = $extension = strtolower(end($fileParts));\n $errorMsg = 'The uploaded file extension is not allowed';\n \n if($this->cfg['extensions']){\n if(!in_array($extension, $this->cfg['extensions'])){\n throw new Exception($errorMsg); \n }\n }\n \n if($this->cfg['mimes']){\n if (!in_array($fileMime, $this->cfg['mimes'])) {\n throw new Exception($errorMsg);\n } \n }\n }", "title": "" }, { "docid": "36b5b402f0360e0413a6477fd692245c", "score": "0.6436543", "text": "function isImage($ext = '')\n {\n return in_array($ext, $this->types);\n }", "title": "" }, { "docid": "5c594fe226f6c1bb10ec97e7e47a115c", "score": "0.6435825", "text": "protected function isFile(){\n if(isset($this->mimeTypes)){\n return in_array($this->request->header('Content-Type'),$this->mimeTypes);\n }\n return false;\n }", "title": "" }, { "docid": "23f050dd796781dde84c2b80f3e127c8", "score": "0.6423968", "text": "public function isValidExtension($extension)\n\t{\n\t\t$valid_extensions = array('jpg', 'jpeg', 'png');\n\n\t\treturn in_array(strtolower($extension), $valid_extensions);\n\t}", "title": "" }, { "docid": "ad4a7f61b5bb5bda366f115f85285335", "score": "0.6420144", "text": "function file_type($file) {\n return strtolower(pathinfo($file, PATHINFO_EXTENSION));\n}", "title": "" }, { "docid": "e48330d030cda7370c6d3e054cf70362", "score": "0.6419326", "text": "private static function checkFileValid(string $file_path){\n $exp = explode(\".\", $file_path);\n return $exp[count($exp) - 1] == \"html\";\n }", "title": "" }, { "docid": "e1d12b2a6929e2f7efa8ea1004ee4f26", "score": "0.6418701", "text": "private static function IsValidFile($fname) {\n\t\tif (empty($fname)) return false;\n\t\tif ($fname[0] == '.') return false;\n\t\t$ext = pathinfo($fname, PATHINFO_EXTENSION);\n\t\tif (!in_array($ext, self::$VALID_EXTENSIONS)) return false;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "aba86f47909d96537d5ba6539794d05d", "score": "0.6394383", "text": "public function hasMatchingFileType()\n {\n return $this->matching_file_type !== null;\n }", "title": "" }, { "docid": "78c79d501ce23723a8c120e3dfe2b871", "score": "0.6391176", "text": "static public function getFileExtension($mime) {\n return isset(self::$mimeTypes[$mime]) ? self::$mimeTypes[$mime] : false;\n }", "title": "" }, { "docid": "d3b8483319143582ef5b1fe8111c7ea2", "score": "0.6384568", "text": "private function checkType() {\n\t\tif (!$this->exists()) {\n\t\t\treturn NULL;\n\t\t}\n\n\t\tif ($this->local) { // local file\n\t\t\t$info = pathinfo($this->file);\n\t\t\t$type = (isset($info['extension']))? $info['extension'] : '';\n\t\t\t$groups = self::$extGroups;\n\t\t} else { // remote file\n\t\t\tlist($type, $encoding) = $this->getContentType($this->file);\n\t\t\t$groups = self::$mimeGroups;\n\t\t\t$this->encoding = strtoupper($encoding); // encoding\n\t\t}\n\n\t\t// link check\n\t\tif ($type == 'link') {\n\t\t\t$this->link = $this->followLink($this->file);\n\t\t\t$type = $this->type;\n\t\t}\n\n\t\t// extension groups\n\t\tforeach ($groups as $group => $types) {\n\t\t\tif (in_array($type, $types)) {\n\t\t\t\t$type = $group;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $type;\n\t}", "title": "" }, { "docid": "4d813938faa26fb8eab183ab0ba2e0d7", "score": "0.6375129", "text": "public function isTypeAllowed($extension)\n {\n return in_array($extension, self::$allowedTypes);\n }", "title": "" }, { "docid": "02ac44bb5612aef67cb92e21cce5fd59", "score": "0.6361706", "text": "private function checkFileTypeAction() {\n $file_error = 0;\n foreach ($_FILES['user_media']['tmp_name'] as $key => $tmp_name) {\n $file_name = basename($_FILES['user_media']['name'][$key]);\n //$filecheck = basename($_FILES['imagefile']['name']);\n if (!empty($file_name)) {\n $ext = strtolower(substr($file_name, strrpos($file_name, '.') + 1));\n //for video and images.\n\n if (!(((($ext == 'jpg' || $ext == 'gif' || $ext == 'png') &&\n ($_FILES['user_media']['type'][$key] == 'image/jpeg' || \n $_FILES['user_media']['type'][$key] == 'image/gif' || \n $_FILES['user_media']['type'][$key] == 'image/png'))) ||\n (preg_match('/^.*\\.(mp4|mov|mpg|mpeg|wmv|mkv)$/i', $file_name)))) {\n $file_error = 1;\n break;\n }\n }\n }\n return $file_error;\n }", "title": "" }, { "docid": "b77b3d54180f9eae5f8324b63fd4d2db", "score": "0.6354989", "text": "public function validateExtensionFromImageType($source)\n\t{\n\t\t# Get the file extension of the image from the file name.\n\t\t$file_ext=$this->getFileExtension($source);\n\t\t# Check if the image type has been set.\n\t\tif($this->getImageType()===FALSE)\n\t\t{\n\t\t\t# Get the image info and set the image data members.\n\t\t\t$this->getImageInfo($source);\n\t\t}\n\t\t# Get the file extension of the image from the IMAGETYPE_XXX constant.\n\t\t$image_ext=$this->getImageTypeExtenstion($this->getImageType(), FALSE);\n\n\t\t# Make sure the image type and the extension match.\n\t\t# jpeg image type matches the jpg extension.\n\t\tif(($image_ext=='jpeg') && ($file_ext=='jpg'))\n\t\t{\n\t\t\t$ext_match=TRUE;\n\t\t}\n\t\t# They match if the extension and the image type are the same.\n\t\telseif($image_ext == $file_ext)\n\t\t{\n\t\t\t$ext_match=TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# We don't have a match.\n\t\t\t$ext_match=FALSE;\n\t\t}\n\t\treturn $ext_match;\n\t}", "title": "" }, { "docid": "6c17abd4ab9230102bf07ac73ca1f8e9", "score": "0.6349229", "text": "public function testExtensionReturnsExtension()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n $this->assertSame('txt', File::extension(self::$temp.DS.'foo.txt'));\n }", "title": "" }, { "docid": "832cd007f2a999c221bd1a36d690591c", "score": "0.6337522", "text": "function isAllowedImageType($file)\n {\n/* $type = _ml_strtolower($file['type']);\n switch ($type)\n {\n case 'image/gif':\n case 'image/jpeg':\n case 'image/jpg':\n case 'image/jpe':\n case 'image/jfif':\n case 'image/pjpeg':\n case 'image/pjp':\n case 'image/png':\n case 'image/x-png':\n return true;\n default:\n return false;\n }\n*/\n return true;\n }", "title": "" }, { "docid": "b0a45be66717f8fc5fbf15d5971013cd", "score": "0.6333767", "text": "function checkMP3( $fileToCheck )\n {\n //get file type using pathinfo and the PATHINFO_EXTENSION\n $fileType = pathinfo( $fileToCheck , PATHINFO_EXTENSION );\n \n return $fileType == 'mp3';\n }", "title": "" }, { "docid": "695faa736cc94b57a586335b96a0bef3", "score": "0.6315817", "text": "function is_valid_type($file)\n\t{\n\t\t// This is an array that holds all the valid image MIME types\n\t\t$valid_types = array(\"image/jpg\", \"image/jpeg\", \"image/png\");\n\n\t\tif (in_array($file['type'], $valid_types))\n\t\t\treturn 1;\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "35ea035ad8d6be36ce11cc21c0acd9cc", "score": "0.62988895", "text": "Function ckType($name, $type)\n{\n $exe = pathinfo($name, PATHINFO_EXTENSION);\n if(!empty($name))\n {\n if (($exe == 'jpg' || $exe == 'png') && ($type == 'pictures/jpeg' || $type == 'pictures/png'))\n {\n return true;\n }// End of If Statement\n else\n {\n echo \" Not the correct format. ex: PNG or JPEG.\";\n return false;\n }// End of Else Statement\n }// End of If Statement\n}", "title": "" }, { "docid": "e4430910b0517a5b002ebc9f2948f208", "score": "0.6296387", "text": "function is_file ($filename) {}", "title": "" }, { "docid": "d83aa274568961776b67734432270f03", "score": "0.62874043", "text": "public function supports($filename)\n {\n return (bool) preg_match('#\\.ini(\\.dist)?$#', $filename);\n }", "title": "" }, { "docid": "f05106b388774e335c793a49000e8ba8", "score": "0.628465", "text": "function get_ext($file){\n\t\treturn pathinfo($file, PATHINFO_EXTENSION);\n\t}", "title": "" }, { "docid": "f3cb21250c647bc78bd3e4800b93a9a4", "score": "0.6275208", "text": "function bum_file_is_safe( $file, $types = array() )\n\t{\n\t\t//reasosn to fail\n\t\tif ( empty($file) || !is_array($file) ) return false;\n\t\tif ( $file['error'] > 0 ) return false;\n\t\t\n\t\t//checking the file size\n\t\tif ( $file['size'] < 1 ) return false;\n\t\t\n\t\t//checking the file type\n\t\tif (!is_array($types)) $types = explode(',', $types);\n\t\tlist($type, $ext) = explode('/', $file['type']);\n\t\t\n\t\tif (!empty($types) && !in_array($type, $types) ) return false;\n\t\t\n\t\t//additional checks if this is an image\n\t\tif ($type == 'image' && !getimagesize($file['tmp_name'])) return false;\n\t\t\n\t\t//checking for blacklisted files\n\t\t$blacklist = array(\".php\", \".phtml\", \".php3\", \".php4\", \".js\", \".jsp\", \n\t\t\".asp\", \".htm\", \".shtml\", \".sh\", \".cgi\", \".pl\" ,\".py\");\n\t\t$blacklist = apply_filters('job-blacklist-files', $blacklist);\n\n\t\tforeach ($blacklist as $b_ext) \n\t\t\tif ( preg_match(\"/$b_ext\\$/i\", $file['name']) ) return false;\n\t\t\n\t\t//this is safe\n\t\treturn true;\n\t}", "title": "" }, { "docid": "75b3226611516904abfd1b2e5ae126fa", "score": "0.6265112", "text": "public function hasMimeType(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "b416cf60bd866cbffda801ccf0b48acf", "score": "0.6246068", "text": "private static function checkFileValid(string $file_name){\n $sp = explode(\".\", $file_name);\n return $sp[count($sp) - 1] == \"lpgp\";\n }", "title": "" }, { "docid": "6160015164a6031ac6bbf7e5a25fefd5", "score": "0.62455404", "text": "public function checkFileType($ext) {\n switch ($ext) {\n case 'jpeg':return 'Image';\n break;\n case 'jpg':return 'Image';\n break;\n case 'gif':return 'Image';\n break;\n case 'png':return 'Image';\n break;\n case 'ico':return 'Tmage';\n break;\n case 'doc':return 'Document';\n break;\n case 'docx':return 'Document';\n break;\n case 'odt':return 'Document';\n break;\n case 'pdf':return 'PDF';\n break;\n case 'txt':return 'Text';\n break;\n case 'xls':return 'Excel';\n break;\n case 'xlsx':return 'Excel';\n break;\n case 'ppt':return 'Powerpoint';\n break;\n case 'pptx':return 'Powerpoint';\n break;\n case 'csv':return 'CSV';\n break;\n case 'ods':return 'Document';\n break;\n case 'xml':return 'XML';\n break; \n case 'mp3':return 'Audio';\n break;\n case 'amr':return 'Audio';\n break;\n case 'wma':return 'Audio';\n break;\n case 'mp4':return 'Video';\n break;\n case 'webm':return 'Video';\n break;\n case '3gp':return 'Video';\n break;\n case 'flv':return 'Video';\n break;\n case 'avi':return 'Video';\n break;\n default:return 'Unknown';\n break;\n }\n }", "title": "" }, { "docid": "14d72474bab79b49413b19cdda5ba8e3", "score": "0.62338895", "text": "private static function _file_extension($filename) {\n $finfo = finfo_open(FILEINFO_MIME_TYPE);\n $mimetype = finfo_file($finfo, $filename);\n\n if($mimetype) {\n if(preg_match('/jpeg/', $mimetype))\n $ext = '.jpg';\n elseif(preg_match('/gif/', $mimetype))\n $ext = '.gif';\n elseif(preg_match('/png/', $mimetype))\n $ext = '.png';\n elseif(preg_match('/svg/', $mimetype))\n $ext = '.svg';\n elseif($mimetype == 'audio/mpeg')\n $ext = '.mp3';\n elseif($mimetype == 'video/mp4')\n $ext = '.mp4';\n else\n $ext = '.'.explode('/', $mimetype)[1];\n } else {\n $ext = '';\n }\n return $ext;\n }", "title": "" }, { "docid": "c41863e4477bef4ee2ba0feb9819c9e5", "score": "0.6230166", "text": "public function isFile()\n\t{\n\t\treturn $this->pathname->rootAdapter()->isFile($this->pathname);\n\t}", "title": "" }, { "docid": "51a7a03b89f6c9d9e06822991029fd0c", "score": "0.62196153", "text": "function mime_is_detectable_by_finfo()\n{\n return function_exists('finfo_open') && function_exists('finfo_file') && function_exists('finfo_close');\n}", "title": "" }, { "docid": "989be123f18b554727d4c633e568dac7", "score": "0.6214853", "text": "public static function get_file_ext($file) {\n $parsed = @parse_url($file, PHP_URL_PATH);\n return $parsed ? strtolower(pathinfo($parsed, PATHINFO_EXTENSION)) : false;\n }", "title": "" }, { "docid": "2edbd2c368433b408d7c870de29ecc1f", "score": "0.62030846", "text": "static function fileExtension($file) {\n\t\t$info = pathinfo($file);\n\t\treturn isset($info['extension']) ? \n\t\t\t$info['extension'] : null;\n\t}", "title": "" }, { "docid": "98f787af879af50de824344ee0019924", "score": "0.61949587", "text": "function mime_is_detectable()\n{\n $fallback = function_exists('mime_content_type') || function_exists('ext2mime');\n return mime_is_detectable_by_finfo() || $fallback;\n}", "title": "" }, { "docid": "1f24014cfd022b9364ad187344d36378", "score": "0.61855876", "text": "public function file_check($str){\r\n $allowed_mime_type_arr = array('image/gif','image/jpeg','image/pjpeg','image/png','image/x-png');\r\n $mime = get_mime_by_extension($_FILES['pic']['name']);\r\n if(isset($_FILES['pic']['name']) && $_FILES['pic']['name']!=\"\"){\r\n if(in_array($mime, $allowed_mime_type_arr)){\r\n return true;\r\n }else{\r\n $this->form_validation->set_message('file_check', 'Please select only pdf/gif/jpg/png file.');\r\n return false;\r\n }\r\n }else{\r\n $this->form_validation->set_message('file_check', 'Please choose a file to upload.');\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "b46bdec133020216830ae9a57b787ca2", "score": "0.6184135", "text": "protected function checkMime($path)\n {\n $mime = mime_content_type($path);\n $bool = (in_array(mime_content_type($path), $this->config['allowableMimeTypes']));\n if(!$bool) {\n $this->errors = array_merge($this->errors, ['Not allowed extension', $mime]);\n }\n return $mime ?: false;\n\n }", "title": "" }, { "docid": "8ba04b107929bf84aa51162d55cc35cc", "score": "0.61788714", "text": "public function allowed()\n {\n //We get the filetype by setting it and test of it is allowed by diffrent types\n $this->setFiletype();\n $allowed = array(\"jpg\", \"jpeg\", \"png\", \"pdf\");\n\n if (in_array($this->getFiletype(), $allowed)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "46d78c6a6adeb923709fb838644894f7", "score": "0.6174611", "text": "function testExtensions ( ) {\r\n\t$result = true;\r\n\t$exts = get_loaded_extensions();\r\n\r\n\tif( array_search('curl', $exts) === false )\t{\r\n\t\t$result = false;\r\n\t}\r\n\r\n\tif( array_search('pcre', $exts) === false ) {\r\n\t\t$result = false;\r\n\t}\r\n\r\n\tif( array_search('session', $exts) === false ) {\r\n\t\t$result = false;\r\n\t}\r\n\r\n\t// some 'free' servers disable curl_init\r\n\t$funcs = get_extension_funcs(\"curl\");\r\n\tif( $funcs !== false && array_search('curl_init', $funcs) === false ) {\r\n\t\t$result = false;\r\n\t}\r\n\r\n\treturn $result ? 0 : 2;\r\n}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "1657e84eaed59e287692b08246cbcfa9", "score": "0.0", "text": "public function store(AddProductRequest $request)\n {\n \n //echo json_encode($_FILES); exit;\n \n $date = date('Y-m-d h:i:s');\n $product = new Product();\n $image = $_FILES['image'];\n $destinationPath = storage_path() . '/images/products/'.$image['name'];\n $image['tmp_name'];\n $move = move_uploaded_file($image['tmp_name'], $destinationPath);\n //if($move){ echo 'sucess'; } else { echo 'failed'; } exit;\n \n $path = 'storage/images/products/';\n \n $product->title = $request->title;\n $product->description = $request->description;\n $product->amount = $request->amount;\n $product->sku = $request->sku;\n $product->image = $image['name'];\n $product->image_path = $path;\n $product->deleted_at = $date;\n // $product->updated_at = $date;\n $product->save();\n return $this->response->array('product added successful');\n \n }", "title": "" } ]
[ { "docid": "efa639da1b8f6cd79b8705d95edb8349", "score": "0.68727493", "text": "public function store(Request $request, storage $model)\n {\n \n Storage::create($request->all());\n\n return redirect()->route('storage.index')->withStatus(__('storage successfully created.'));\n }", "title": "" }, { "docid": "7f1b50bd5f058d4a055b1fd3805dc442", "score": "0.6826213", "text": "public function store(ResourceCreateRequest $request) {\n\n $resource = new Resource([\n 'title' => $request->title,\n 'slug' => $this->toSlug($request->title).'_'.uniqid(),\n 'review' => $request->review,\n 'category_id' => $request->category_id\n ]);\n\n Auth::user()->resources()->save($resource);\n return response()->json($resource);\n }", "title": "" }, { "docid": "39c00340e6c87bd36e30c00a6ef8a08c", "score": "0.64319444", "text": "public function store()\n\t{\n\t\t$rules = array(\n\t\t\t'name' \t=> \t'required',\n\t\t\t'route' =>\t'unique:resources,route',\n\t\t\t);\n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\tif ($validator -> fails()) {\n\t\t\treturn Redirect::to('resource')\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput(Input::all());\n\t\t}\n\t\telse{\n\t\t\t$resource = new Resource;\n\t\t\t$resource->name \t= \tInput::get('name');\n\t\t\t$resource->route \t= \tInput::get('route');\n\t\t\t$resource->save();\n\n\t\t\tSession::flash('message', 'Successfully added');\n\t\t\treturn Redirect::to('resource');\n\n\t\t\t\n\n\t\t}\n\t}", "title": "" }, { "docid": "701667213f0c046b2658bd8d8db97d9d", "score": "0.63883317", "text": "public function store(StorageRequest $request)\n {\n $storage = new Storage;\n $storage->name = $request->name;\n $storage->company_id = $request->user()->id;\n $storage->save();\n\n return redirect()->to('/storage/'.$request->name);\n }", "title": "" }, { "docid": "c3f5dd47f337ee79762d2af65e90ef1b", "score": "0.6368418", "text": "public function store(Request $request)\n {\n //\n $this->authorize('create', Resource::class);\n $input=$request->all();\n $resource= Resource::create($input);\n return redirect('/resource/'.$resource->id);\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "f9a45db12ffc582d34c4975c5c6686e9", "score": "0.6347347", "text": "public function store()\n\n\t{\n\n\t\t//\n\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "a6b48c92597c78de6434096df225f77d", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'url' => 'required'\n ]);\n\n $pool = Pool::find($id);\n\n if ( isset($pool)) {\n $this->assignFromRequest($request, $pool);\n\n $pool->save();\n $isChanged = true;\n }\n\n return view('pools.edit', compact('pool','isChanged'));\n }", "title": "" } ]
[ { "docid": "3a50a43d393625d85bd96071942ad788", "score": "0.75714874", "text": "public function updateResource(ResourceInterface $resource);", "title": "" }, { "docid": "43d7f9bca361bad6cdea5587611546b3", "score": "0.75074047", "text": "public function updated(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "bde449baf550552e043ec18452e05f5c", "score": "0.69665116", "text": "function update($resource, $content)\n {\n }", "title": "" }, { "docid": "cfdd7ff8fee991c8b9d8fd881fbe63cb", "score": "0.6921532", "text": "public function update(resource $resource) {\n $stmt = $this->db->prepare(\"UPDATE resource set id=?,name=?,description=?,quantity=?,type=? where id=?\");\n $stmt->execute(array($resource->getIdresource(), $resource->getName(),$resource->getDescription(),\n $resource->getQuantity(),$resource->getType(),$resource->getIdresource()));\n }", "title": "" }, { "docid": "64141ab468cf691ac341537b76914234", "score": "0.6896673", "text": "public function updateStream($resource);", "title": "" }, { "docid": "5a9d8f35441b3d765b8c94eeefcd24bd", "score": "0.65327597", "text": "public function update(Request $request, Resource $resource)\n {\n //\n // $this->authorize('update',Resource::class);\n // $input=$request->all();\n // $resource->update('$input');\n // return redirect('resource/'.$resource->id);\n return response()->json($resource);\n }", "title": "" }, { "docid": "5ff58e3b0cb8ed2ef95e5bfb0eb3a3dc", "score": "0.64138347", "text": "public function update(AccountInterface $account, Account $resource);", "title": "" }, { "docid": "df6c7acef4541105b5bc3ce3650d59f5", "score": "0.6403721", "text": "public function updateResourceById(Request $request, $id = 0);", "title": "" }, { "docid": "c36ab864eb8fe4e400b9bf654b24e104", "score": "0.6334678", "text": "public function updateStream($path, $resource, array $config = []);", "title": "" }, { "docid": "4f7d45ebcaeb64448ba69a2728df7cc9", "score": "0.63236964", "text": "public function update(Request $request, $resourceId)\n {\n $resource = $this->resource->find($resourceId);\n\n $this->validate($request, [\n 'title' => 'required|unique:resources,title,' . $resourceId . '|max:255',\n 'slug' => 'required|unique:resources,title,' . $resourceId . '|max:255',\n 'model' => 'required|unique:resources,title,' . $resourceId . '|max:255',\n 'namespace' => 'required|max:255',\n 'order_column' => 'required|integer',\n 'order_direction' => 'required|in:asc,desc',\n 'icon' => 'required'\n ]);\n\n $resource->update($request->all());\n\n return redirect()->back()->with('success', 'Resource updated');\n }", "title": "" }, { "docid": "55e27ae867b72d70d9595d52e540084d", "score": "0.62870395", "text": "public function updateStream($path, $resource, $config = []);", "title": "" }, { "docid": "5a25947b768e68926672b730228d725c", "score": "0.627197", "text": "public function update(Request $request, Resource $resource)\n {\n $validatedData = $request->validate([\n 'content' => 'required',\n 'topic' => [\n 'required',\n Rule::unique(\"resources\",'topic')->ignore($resource->topic,'topic')],\n ]);\n $content = $validatedData['content'];\n $dom = new \\DomDocument();\n $dom->loadHtml($content, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);\n $images = $dom->getElementsByTagName('img');\n\n foreach($images as $k => $img){\n $data = $img->getAttribute('src');\n if(strpos($data,'base64')!=false){\n list($type, $data) = explode(';', $data);\n list(, $data) = explode(',', $data);\n $data = base64_decode($data);\n\n $image_name= \"/upload/\" . time().$k.'.png';\n $path = public_path() . $image_name;\n file_put_contents($path, $data);\n $img->removeAttribute('src');\n $img->setAttribute('src', $image_name);\n }\n }\n $content = $dom->saveHTML();\n\n $resource->topic = $validatedData['topic'];\n $resource->content = $content;\n $resource->save();\n\n return redirect()->route('resource.show',['resource'=>$resource]);\n }", "title": "" }, { "docid": "248fca12370a0c10f40bb8e9ca995402", "score": "0.62151873", "text": "public function updateStream($path, $resource, Config $config)\n\t{\n $return = parent::updateStream($path, $resource, $config);\n\n $this->commit('updated ' . basename($path));\n\n return $return;\n }", "title": "" }, { "docid": "86d8d34eae4faff07f003c17390ad840", "score": "0.6214479", "text": "function put($resource, $data) {\n\t\t\t$this->_auth();\n\t\t\treturn $this->_request('PUT', $this->_resourcefix($resource), $data);\n\t\t}", "title": "" }, { "docid": "32dfb87cdc4ec45c0bf037618a81f878", "score": "0.61961704", "text": "public function updateStream($path, $resource, Config $config){}", "title": "" }, { "docid": "8630c9391e187dee0ad16562c7859222", "score": "0.61748964", "text": "public function update(Request $request, $class_id, $resource)\n {\n //\n }", "title": "" }, { "docid": "840ed6822df952682e04f5fdbc8605d6", "score": "0.6174421", "text": "public function update(StoreResourceRequest $request, $id)\n {\n $input = [\n 'name' => $request->input('name'),\n 'type' => $request->input('type'),\n 'metadata' => Arr::except($request->validated(), ['name', 'type']),\n ];\n\n if ($request->input('type') === 'pdf') {\n $file = $request->file('file');\n $input['metadata'] += [\n 'size' => $file->getSize(),\n 'ext' => $file->getClientOriginalExtension(),\n 'path' => $file->getClientOriginalName(),\n ];\n }\n\n $resource = Resource::find($id);\n if ($resource && $resource->update($input)) {\n if (isset($file)) {\n $file->move(storage_path('app/pdfs'), $file->getClientOriginalName());\n }\n\n return response()->json(['ok' => true]);\n } else {\n return response()->json(['ok' => false]);\n }\n }", "title": "" }, { "docid": "70667eb6cc902a3a33b32be7cb1f72f1", "score": "0.6109262", "text": "public function updateResource(\\Illuminate\\Http\\Request &$request, &$model): void\n {\n }", "title": "" }, { "docid": "c45baaabe2bd3d4c40a40e6b7d210f05", "score": "0.60513884", "text": "public function updateItem($resource, $id)\n\t{\n\t\t$this->ci->load->model($resource['model'], 'model');\n\n\t\t$postData = $this->ci->input->post(null, true);\n\n\t\t//@todo: Get the fillable fields and run a filter on what was given\n\t\t$this->ci->model->updateItem($id, $postData);\n\n\t\treturn 'Resource updated successfully';\n\t}", "title": "" }, { "docid": "08787fbcdf1f1dfce03ab185d34d1138", "score": "0.6035496", "text": "public function update($resourceId)\n {\n return $this->create();\n }", "title": "" }, { "docid": "6b9157a3a385139440dccde2f158c05b", "score": "0.6028893", "text": "public function update(Request $request, Storage $storage)\n {\n $attributes = $request->validate([\n 'parent_id' => 'nullable|exists:storages,id',\n ]);\n\n if (is_null($attributes['parent_id'])) {\n $storage->makeRoot()\n ->save();\n }\n else {\n $storage->appendToNode(Storage::find($attributes['parent_id']))\n ->save();\n }\n\n if ($request->wantsJson()) {\n return $storage;\n }\n\n return redirect($storage->path);\n }", "title": "" }, { "docid": "44801be6d02cd2bdb1653813581ade94", "score": "0.6010684", "text": "public function update(Request $request, Resource $resource)\n {\n $validatedAttributes = request()->validate([\n 'name' => ['required', 'string', 'max:255'],\n 'field' => ['required', 'string', 'max:255'],\n 'resource_contributor' => ['exists:users,id']\n ]);\n\n $resource_contributor = User::find($validatedAttributes['resource_contributor']);\n $this->authorize('assign', $resource_contributor);\n\n $resource->update($validatedAttributes);\n $resource->assignUser($resource_contributor);\n\n return view('actions.resource.update', compact('resource'));\n }", "title": "" }, { "docid": "2b8a79adbe1af409adcb87f83c9169f6", "score": "0.59985447", "text": "function refresh($resource)\n {\n $this->getCache()->removeItem(get_class($resource) . $resource->getId());\n $resource->_load($resource->getId());\n }", "title": "" }, { "docid": "b6183039ccc289a72430ce694bc84511", "score": "0.59811354", "text": "public function put(Resource\\ResourceInterface $resource)\r\n\t{\r\n\t\t$hash = $this->generateHash($resource->resourceName(), $resource->resourceId(), $resource->params());\r\n\t\t\r\n\t\t$this->storage->put($hash, $resource->contents());\r\n\t\t$this->hashes[$hash] = $hash;\r\n\t\t\r\n\t\treturn $resource;\r\n\t}", "title": "" }, { "docid": "8cd20d00377121b72e7e70d56ae3b421", "score": "0.5978405", "text": "public function update(Request $request, Product $product)\n {\n //Get the product\n $the_product = Product::where('product_id',$product->product_id)->first();\n\n //Update the product\n $product->supplier_id = $request->supplier_id;\n\n //Return product if updated\n if ($product->update()){\n return new ProductResource($product);\n } \n }", "title": "" }, { "docid": "27238afbfd7d5f825910ac95b94767b7", "score": "0.59718364", "text": "public function update(Request $request, $id)\n {\n \n $requestData = $request->all();\n $query = '\"select\":\"*\",\"where\":\"id=' . $id . '\"';\n unset($requestData[\"_token\"]);\n unset($requestData[\"_method\"]);\n $requestData = json_encode($requestData);\n ResourcesService::updateResourcesTable($requestData, $query);\n// $resource = Resource::findOrFail($id);\n// $resource->update($requestData);\n\n return redirect('admin/resources')->with('flash_message', 'Resource updated!');\n }", "title": "" }, { "docid": "df6115717d620432de4e68dabd64c68b", "score": "0.5934917", "text": "public function update(Request $request, $id)\n\t{\n $validator = $this->validate($request, [\n \t//\n ]);\n\n try\n {\n \t$updatedResource = $this->repository->updateResource($id, $request->all());\n\n } catch(\\Exception $exception)\n {\n $this->flashErrorAndReturnWithMessage($exception);\n }\n\n // returns back with success message\n flash()->success('The resource was updated!');\n return redirect()->action('Admin\\Catalogue\\ResourceController@edit', ['resource' => $id]);\n\t}", "title": "" }, { "docid": "308f63a408af64ce6c649c642eeae702", "score": "0.59232825", "text": "public function getResourceUpdates( $resource, $size = SPIGET4PHP_DEFAULT, $page = SPIGET4PHP_DEFAULT, $sort = SPIGET4PHP_DEFAULT, $fields = SPIGET4PHP_DEFAULT )\n {\n $function = 'resources/'.$resource.'/updates';\n $args = [];\n if ( !is_null( $size ) ) $args['size'] = $size;\n if ( !is_null( $page ) ) $args['page'] = $page;\n if ( !is_null( $sort ) ) $args['sort'] = $sort;\n if ( !is_null( $fields ) ) $args['fields'] = implode(',', $fields );\n return $this->getResult( $function, $args );\n }", "title": "" }, { "docid": "91e7d2c538f4decea1e29581b3890506", "score": "0.5894686", "text": "public function update(Request $request, $id)\n {\n \n $validator = Validator::make($request->all(), [\n 'user_id' => 'filled|exists:users,id',\n 'space_id' => 'filled|exists:spaces,id',\n 'capacity_used' => 'filled|integer|between:1,100',\n 'start_date' => 'filled|date_format:Y-m-d',\n 'end_date' => 'filled|date_format:Y-m-d',\n ]);\n\n if ($validator->fails()) {\n\n return response()->json([\n 'status' => false,\n 'message' => $validator->errors()->first(),\n 'error' => $validator->errors(),\n ], 400);\n\n }\n \n try {\n\n DB::beginTransaction();\n\n $storage = MyStorage::where('id', $id)->first();\n\n if (is_null($storage)) {\n\n return response()->json([\n 'status' => false,\n 'message' => 'Storage tidak ditemukan...',\n ], 404);\n\n }\n\n $data = $request->all();\n\n $storage->update($data);\n\n DB::commit();\n\n Activity::onAct($request, 'Update Storage');\n\n return response()->json([\n 'status' => true,\n 'message' => 'Berhasil melakukan perubahan!',\n ], 200);\n\n } catch (Exception $e) {\n\n DB::rollBack();\n\n CustomException::onError($e);\n\n return response()->json([\n 'status' => false,\n 'message' => 'Maaf! Terjadi kesalahan pada sistem...',\n 'error' => $e->getMessage(),\n ], 500);\n\n }\n\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b2b52d5e19d80d8c444bf8a8d2e69616", "score": "0.58864933", "text": "public function update(Product $product,Request $request)\n {\n abort_if(auth()->user()->admin !==1,403);\n $product->update(request(['name','volume','issue','price','stock']));\n if($request->has('pic')) {\n\n $pic = $request->file('pic');\n $extension = $request->file('pic')->getClientOriginalExtension();\n $watermark=Storage::disk('s3')->get('/public/WaterMark.png');\n\n $filename = 'product';\n $normal = Image::make($pic)->resize(250, 250)->insert($watermark)->encode($extension);\n $pixelated = Image::make($pic)->resize(250, 250)->pixelate(20)->encode($extension);\n\n\n Storage::disk('s3')->put('/products/'.\"$product->id\".'/'.\"{$filename}\".'/original', (string)$normal, 'public');\n Storage::disk('s3')->put('/products/'.\"$product->id\".'/'.\"{$filename}\".'/pixelated', (string)$pixelated, 'public');\n\n\n $product = Product::findorFail(\"$product->id\");\n $product->pic = $filename;\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "96f8834f70428b62ee43e045b6155883", "score": "0.5868864", "text": "public function Update( $resourceType, $resourceData ) {\n\n $callerId = 'RemoteAPI->Update: \"'.$resourceType;\n if (!$this->VerifyLoggedIn( $callerId )) {\n return NULL; // error\n }\n if (!$this->VerifyValidResourceType($resourceType)) {\n return NULL;\n }\n if (!isset($resourceData['data']['id'])) {\n return NULL;\n }\n\n $url = $this->endpoint_uri.'/'.$resourceType.'/'.$resourceData['data']['id'];\n $data = http_build_query($resourceData, '', '&');\n $ret = $this->CurlHttpRequest($callerId, $url, 'PUT', $data, true);\n return $ret->response;\n }", "title": "" }, { "docid": "1bae75410baac72a0e8132d92a079593", "score": "0.5863047", "text": "public function updateResourceType(ResourceTypeInterface $resourceType);", "title": "" }, { "docid": "7e791b7f0ac284a4a99b42aa5d49b6f5", "score": "0.58566195", "text": "public function update(Request $request, $id)\n {\n $model = DrugStorage::find($id);\n $model->fill($request->all());\n $model->save();\n\n return redirect('storage');\n }", "title": "" }, { "docid": "c8cfc09f393219dca339ad89d530539a", "score": "0.58513457", "text": "public function putStream($resource);", "title": "" }, { "docid": "9d248a2ed58e7497d523e07caa29e60e", "score": "0.5848729", "text": "public function update(Request $request, UserStorageInfo $userStorageInfo)\n {\n //\n }", "title": "" }, { "docid": "914e8c19a288227da3761458ae873793", "score": "0.5830434", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::find($id);\n $product->update($request);\n if($request->hasFile('image')){\n //store image in amazon bucket\n $file = $request->file('image') ;\n $fileName = time() . '.' . $file->getClientOriginalExtension() ;\n $filePath = $file->getPathName();\n\n $s3 = AWS::createClient('s3');\n $s3->putObject(array(\n 'Bucket' => 'kumashe',\n 'Key' => $fileName,\n 'SourceFile' => $filePath,\n 'ACL' => 'public-read'\n ));\n $image_url = $s3->getObjectUrl('kumashe', $fileName);\n $product->image_url = $image_url;\n }\n\n $product->save();\n return redirect(route('product.show', $id));\n }", "title": "" }, { "docid": "82a1a055157c214f599a7f4a9e118292", "score": "0.58248174", "text": "public function update($id)\n\t{\n\t\t// Get the resource if it has not been provided by the child class\n\t\tif( ! $this->resource->getKey())\n\t\t\t$this->resource = $this->resource->findOrFail($id);\n\n\t\t// NOTE: If you override this method remember to exclude $this->relationships from input!!\n\t\t$input = Input::except(array_keys($this->relationships)); // Less safe, more convenient\n\n\t\t// Transfer input to the resource\n\t\t$this->resource = $this->resource->fill($input);\n\n\t\treturn $this->persist(__FUNCTION__);\n\t}", "title": "" }, { "docid": "8c71ceccf522a25b82a67cb113315aaf", "score": "0.58206964", "text": "public function updateHook($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "ff532344ab178d688587c7da12273ec4", "score": "0.5812807", "text": "public function updateStream($path, $resource, \\League\\Flysystem\\Config $config)\n {\n $this->delete($path);\n\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "402a2d31776495dd28ca9fd3b5783ac2", "score": "0.58027816", "text": "public function update($id, Requests\\EventUpdateRequest $request,Storage $storage) {\n //update values in notice\n $event=Event::find($id);\n $event->name = $request->input('evtname');\n $event->description = $request->input('descrp');\n if($request->file('img')!=null){\n $image = $request->file( 'img' );\n $timestamp = $this->getFormattedTimestamp();\n $savedImageName = $this->getSavedImageName( $timestamp, $image );\n $savedImageName = 'event/'.$savedImageName;\n $imageUploaded = $this->uploadImage( $image, $savedImageName, $storage ); \n if ( $imageUploaded )\n {\n $event->image = $savedImageName;\n }else{\n return redirect('event')\n ->withFlashMessage('Image upload failed!')\n ->withType('danger');\n } \n }\n $event->save();\n return redirect('event')\n ->withFlashMessage('Event Updated successfully!')\n ->withType('success');\n }", "title": "" }, { "docid": "ff0e38a6315c73abcb3ca49b97fa12a2", "score": "0.57795924", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->s_name = $request->name;\n $product->s_caption = $request->caption;\n $product->s_desc = $request->desc;\n $product->n_qty = $request->quantity;\n $product->f_price = $request->price;\n $product->id_creator = $request->creator;\n $product->id_category = $request->category[\"id\"];\n\n $product->save();\n\n return new ProductResource($product);\n }", "title": "" }, { "docid": "a9e0457c38673b4e5d44d30595cc5a66", "score": "0.5776495", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'image' => 'required|image|mimes:jpeg,png,jpg|max:2048',\n ]);\n\n $slider = slider::where('slider_id',$id)->first(); \n $imagename = $slider->image;\n if(!empty($request->file('image'))){\n\n if(Storage::disk('s3')->exists($imagename)) {\n Storage::disk('s3')->delete($imagename);\n }\n $file = $request->file('image');\n $imagename = $file->store('slider', 's3');\n }\n \n $affectedRows = Slider::where('slider_id', $id)\n ->update(array( \n 'image' => $imagename, \n ));\n\n return redirect()->route('slider.index')\n ->with('success','slider updated successfully.');\n }", "title": "" }, { "docid": "dca29547108f9baf476eadad247453f8", "score": "0.57759243", "text": "public function put_update() {\n\t}", "title": "" }, { "docid": "9dd01fe7e0843f2e28de9c41f2993355", "score": "0.57543606", "text": "public function update(Request $request, $id)\n {\n try{\n $obj = Obj::where('id',$id)->first();\n\n $this->authorize('update', $obj);\n\n $obj->update($request->all()); \n\n \n\n /* cache pages */\n $p = explode('/',$obj->slug);\n if(count($p)==1){\n $filename = $obj->slug.'.json';\n }\n else\n {\n $slug = implode('_', $p);\n $filename = $slug.'.json';\n }\n $filepath = $this->cache_path.$filename;\n file_put_contents($filepath, json_encode($obj,JSON_PRETTY_PRINT));\n\n flash('('.$obj->slug.') item is updated!')->success();\n return redirect()->route($this->module.'.view',$obj->slug);\n }\n catch (QueryException $e){\n $error_code = $e->errorInfo[1];\n if($error_code == 1062){\n flash('Some error in updating the record')->error();\n return redirect()->back()->withInput();\n }\n }\n }", "title": "" }, { "docid": "06b241f2e73fc514410ae9f7cf6027c3", "score": "0.574161", "text": "public function update(Request $request, $id)\n {\n\n $section = Section::find($id);\n // if($section->path != $request->path){\n // File::move(public_path().\"\\\\storage\\\\\".$section->path, public_path().'\\\\storage\\\\'.$request->path);\n // }\n $section->update($request->all());\n return redirect()->route('section.show',$section->id)->withSuccess('Saved');\n\n }", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "fc2c8495106e59db92b5cb42b28f371f", "score": "0.57243335", "text": "public function updateStream($path, $resource, Config $config)\n {\n $size = Util::getStreamSize($resource);\n list($ret, $err) = Qiniu_RS_Rput($this->getClient(), $this->bucket, $path, $resource, $size, null);\n if ($err !== null) {\n return false;\n }\n return compact('size', 'path');\n }", "title": "" }, { "docid": "1b2c07e390f355317a98bb6b905544d0", "score": "0.57218975", "text": "public function update_put(){\r\n $response = $this->ProductM->update_product(\r\n $this->put('id'),\r\n $this->put('name'),\r\n $this->put('price')\r\n \r\n );\r\n $this->response($response);\r\n }", "title": "" }, { "docid": "e5dda42fd9bfe8ca4186765bc677c8d8", "score": "0.5709017", "text": "public function update($id)\n\t{\n // No need to update file ...\n\t}", "title": "" }, { "docid": "2fbe11e1a076264bdb0a567721e62b4e", "score": "0.570533", "text": "public function update(Request $request, $id)\n {\n \n $rules = [\n 'name' => ['required', 'alpha'],\n 'price' => ['required', 'min:7'],\n 'quantity' => ['required', 'min:7']\n ];\n\n $data = app('request')->only('name', 'price', 'quantity', 'image');\n \n $validator = app('validator')->make($data, $rules);\n\n if ($validator->fails()) {\n throw new UpdateResourceFailedException('Could not update new product.', $validator->errors());\n }\n $product = Product::findOrFail($id);\n \n $product->update($data);\n\n return $this->response->array($product->toArray());\n\n }", "title": "" }, { "docid": "dd2225fd648a4ac98ff9eed8ac080518", "score": "0.56961733", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'product_name'=>'required',\n 'description'=>'required'\n ]);\n $path=$request->old_image;\n if($request->hasFile('thumbnail')){\n if($request->old_image!=null){\n unlink('storage/'.$request->old_image);\n }\n $path=$request->file('thumbnail')->store('Thumbnials');\n }\n $attachment=$request->old_attachment;\n if($request->hasFile('attachment')){\n if($attachment!=null){\n // unlink('storage/'.$request->old_attachment);\n }\n $attachment=$request->file('attachment')->store('Attachment');\n }\n $data=[\n 'product_name'=>$request->product_name,\n 'attachment'=>$attachment,\n 'description'=>$request->description,\n 'thumbnail'=>$path\n ];\n Product::where('id',$id)->update($data);\n return redirect()->route('listProduct');\n }", "title": "" }, { "docid": "e042cdb98e7ed9891be90f84314686dd", "score": "0.5693665", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n if ($request->hasFile('image')) {\n $image = Storage::putFile('image', $request->file('image'));\n $product->image = $image;\n $product->save();\n }\n if ($request->hasFile('file')) {\n $file = Storage::putFile('file', $request->file('file'));\n $product->file = $file;\n $product->save();\n }\n $product->title = $request->title;\n $product->description = $request->description;\n $product->author = $request->author;\n $product->publisher = $request->publisher;\n $product->category = $request->category;\n $product->price = $request->price;\n if ($product->save()) {\n return redirect()->route('admin.product.index')->with('success', 'Updated');\n } else {\n return redirect()->route('admin.product.index')->with('failure', 'Error');\n }\n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "a9fac208ad1c404c2680e4aef5eb19ae", "score": "0.5679042", "text": "public function updateStream($path, $resource, Config $config)\n\t{\n\t\t$contents = stream_get_contents($resource);\n\t\treturn $this->upload($path, $contents, $config);\n\t}", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "3afef5a69f7281e42edd2ca54eb9c614", "score": "0.56676763", "text": "public function update()\n {\n $this->entity->save($this->getData());\n }", "title": "" }, { "docid": "a41cb37da92977ab0e5d7e802be4ae3d", "score": "0.56617355", "text": "public function update(Request $request, $id)\n {\n \n $this->validate($request , [\n 'name' => 'required|string|unique:products,name,'.$id,\n 'description' => 'required|string',\n 'price' => 'required|integer',\n // 'image'=>'nullable|mimes:png,jpeg,jpg|max:10000',\n ]);\n\n $product = Product::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->user_id = auth('api')->id();\n $product->update();\n\n return AppHttpResponse::responseSuccess(\n Response::HTTP_CREATED,\n \"product updated successfully\",\n new ProductResource($product)\n );\n // return response()->json(['response' => ['status' => 'success', 'message'=> 'Action Successful']]);\n }", "title": "" }, { "docid": "ea216cab3487d4cef55296ff2eb4b922", "score": "0.5660654", "text": "public function update(Request $request, \n string $resource_type_id,\n string $resource_id\n ): JsonResponse {\n if ($this->hasWriteAccessToResourceType((int) $resource_type_id) === false) {\n return \\App\\HttpResponse\\Response::notFoundOrNotAccessible(trans('entities.resource'));\n }\n\n $resource = (new Resource())->instance($resource_type_id, $resource_id);\n\n if ($resource === null) {\n return Response::failedToSelectModelForUpdateOrDelete();\n }\n\n if (count($request->all()) === 0) {\n return \\App\\HttpResponse\\Response::nothingToPatch();\n }\n\n $validator = (new ResourceValidator())->update([\n 'resource_type_id' => (int)$resource_type_id,\n 'resource_id' => (int)$resource_id\n ]);\n\n if ($validator->fails()) {\n return \\App\\HttpResponse\\Response::validationErrors($validator);\n }\n\n $invalid_fields = $this->checkForInvalidFields(\n [\n ...(new Resource())->patchableFields(),\n ...(new ResourceValidator())->dynamicDefinedFields()\n ]\n );\n\n if (count($invalid_fields) > 0) {\n return Response::invalidFieldsInRequest($invalid_fields);\n }\n\n foreach ($request->all() as $key => $value) {\n $resource->$key = $value;\n }\n\n $cache_job_payload = (new \\App\\Cache\\JobPayload())\n ->setGroupKey(\\App\\Cache\\KeyGroup::RESOURCE_UPDATE)\n ->setRouteParameters([\n 'resource_type_id' => $resource_type_id\n ])\n ->setUserId($this->user_id);\n\n try {\n $resource->save();\n\n ClearCache::dispatchSync($cache_job_payload->payload());\n } catch (Exception $e) {\n return Response::failedToSaveModelForUpdate($e);\n }\n\n return Response::successNoContent();\n }", "title": "" }, { "docid": "1eef5ac7d8584e9a4bcc453dbeda2dd1", "score": "0.5651912", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'destination'=>'required',\n 'description'=>'required'\n ]);\n $path=$request->old_image;\n if($request->hasFile('thumbnail')){\n if($request->old_image!=null){\n unlink('storage/'.$request->old_image);\n }\n $path=$request->file('thumbnail')->store('Thumbnials');\n }\n \n $data=[\n 'destination'=>$request->destination,\n 'description'=>$request->description,\n 'thumbnail'=>$path\n ];\n Destination::where('id',$id)->update($data);\n return redirect()->route('listDestination');\n }", "title": "" }, { "docid": "9f187c27268314514c3087be6418037a", "score": "0.5651523", "text": "public function update(Record $record)\n {\n $record_id = $record->meta->record_id;\n $version = $record->meta->version;\n\n $path = $this->conn->uri('v1', 'storage', 'records', 'safe', $record_id, $version);\n try {\n $this->conn->put($path, $this->encrypt_record($record));\n } catch (RequestException $re) {\n if ($re->getResponse()->getStatusCode() === 409) {\n throw new ConflictException(\"Conflict updating record ID {$record_id}\", 'record');\n }\n\n throw $re;\n }\n }", "title": "" }, { "docid": "037102fbe484d03598713e8aa9173254", "score": "0.56507224", "text": "public function update(Request $request, $id)\n {\n \n $request->validate(Product::validateRules());\n \n if ($request->hasFile('image')) {\n $file = $request->file('image');\n $image_path = $file->store('uploads', [\n 'disk' => 'public'\n ]);\n $request->merge([\n 'image_path' => $image_path\n ]);\n }\n \n $product = Product::findOrFail($id);\n\n $this->authorize('update', $product);\n \n $product->update($request->all());\n\n return redirect()->route('products.index')->with('success', 'product ( ' . $product->name . ' ) was Updated.');\n }", "title": "" }, { "docid": "60a1aa5c2edbfc16970b759aff9a6706", "score": "0.5644386", "text": "public function update(Request $request)\n {\n // Get existing product or create a new product\n $product = Product::findOrFail($request->input('id'));\n\n /**\n * set incomming put values to the product\n * This will add or overwrite existing values\n * */\n $product->id = $request->input('id');\n $product->name = $request->input('name');\n $product->price = $request->input('price');\n $product->description = $request->input('description');\n $product->bedrooms = $request->input('bedrooms');\n $product->bathrooms = $request->input('bathrooms');\n $product->status_id = $request->input('status_id');\n // need to add Auth user_id when admin is created\n $product->user_id = $request->input('user_id');\n\n if ($product->save())\n {\n // get product details\n $this->getProductDetails($product);\n \n return new ProductResource($product);\n }\n }", "title": "" }, { "docid": "f191a52f64addfd7234817d041f773d5", "score": "0.5643432", "text": "public function update(Request $request, $id)\n {\n $validate = $request->validate([\n 'title' => 'required',\n 'description' => 'required',\n 'buy' => 'required|numeric',\n 'sell' => 'required|numeric',\n 'image' => 'nullable|file|max:1000',\n ]);\n try {\n $cache = Cache::get('products');\n $currect_product = $cache[$id - 1];\n $current_image = $currect_product['imageName'] ?? false;\n // dd(arra);\n // if current_image not the same as cached image\n if ($request->image && $current_image != $request->file('image')->getClientOriginalName()) {\n Storage::disk('local')->put('public/' . $request->file('image')->getClientOriginalName(), $request->file('image')->getContent());\n $currect_product['imageName'] = $request->file('image')->getClientOriginalName();\n }\n\n $currect_product['title'] = $request->title;\n $currect_product['description'] = $request->description;\n $currect_product['buy'] = $request->buy;\n $currect_product['sell'] = $request->sell;\n $new_cache = array_replace($cache, array(($id - 1) => $currect_product));\n\n Cache::put('products', $new_cache, now()->addHours(2));\n } catch (\\Throwable $th) {\n dd($th);\n return redirect('products')->with('status', 'Error');\n }\n\n return redirect('products')->with('status', 'Saved!');\n }", "title": "" }, { "docid": "b31be5fface7cd996e321be92699b8f6", "score": "0.5629739", "text": "public function putAction( Request $request, ?string $resource ) : Response\n\t{\n\t\t$req = $this->createRequest( $request );\n\t\t$res = ( new Psr17Factory )->createResponse();\n\n\t\treturn $this->createResponse( $this->createClient( $req, $resource )->put( $req, $res ) );\n\t}", "title": "" }, { "docid": "cf8362e081562a5c6bc7cf5dec3e1a4f", "score": "0.5627604", "text": "public function update($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\t\treturn $this->attemptEdit($resource, false);\n\t}", "title": "" }, { "docid": "18418c48891ce4c52909e09e2bb43ebb", "score": "0.56251585", "text": "public function update(Request $request, Product $product)\n {\n // dd($request);\n $slug = ModelHelper::createSlug('\\App\\Models\\Product', $request->title, $product->id);\n $path = public_path().'/storage/products/'.$product->slug;\n\n if ($product->slug != $slug) {\n\n if (file_exists($path)) {\n Storage::move('public/products/'. $product->slug , 'public/products/'.$slug);\n }\n\n $slug = ModelHelper::createSlug('\\App\\Models\\Product', $slug, $product->id);\n \n }\n\n $updateArray = array(\n \"title\" => $request->title, \n \"slug\" => $slug,\n \"sku\" => $request->sku,\n \"price\" => $request->price,\n \"discounted_price\" => isset($request->discounted_price) ? $request->discounted_price : 0,\n \"display\" => isset($request->display) ? $request->display : 0,\n \"featured\" => isset($request->featured) ? $request->featured : 0,\n \"variation_type\" => $request->variation_type,\n \"short_description\" => $request->short_description,\n \"long_description\" => $request->long_description,\n \"stock_status\" => $request->stock_status,\n \"stock_count\" => $request->stock_count,\n \"brand_id\" => $request->brand_id,\n \"tags\" => $request->tags,\n \"updated_by\" => Auth::user()->name,\n \"updated_at\" => date('Y-m-d H:i:s')\n );\n\n $path = public_path().'/storage/products/'.$slug;\n $folderPath = 'public/products/'.$slug;\n\n if (!file_exists($path)) {\n\n Storage::makeDirectory($folderPath,0777,true,true);\n\n if (!is_dir($path.\"/thumbs\")) {\n Storage::makeDirectory($folderPath.'/thumbs',0777,true,true);\n }\n\n }\n\n if ($request->hasFile('image')) {\n //Add the new photo\n $image = $request->file('image');\n $filename = time().'.'.$image->getClientOriginalExtension();\n // Storage::putFileAs($folderPath, new File($image), $filename);\n\n ModelHelper::resize_crop_images(1200, 1200, $image, $folderPath.\"/\".$filename);\n ModelHelper::resize_crop_images(900, 900, $image, $folderPath.\"/thumbs/small_\".$filename);\n ModelHelper::resize_crop_images(600, 600, $image, $folderPath.\"/thumbs/thumb_\".$filename);\n\n $updateArray['image'] = $filename;\n\n $OldFilename = $product->image;\n // dd($OldFilename);\n //Delete the old photo\n Storage::delete($folderPath .\"/\".$OldFilename);\n Storage::delete($folderPath .\"/thumbs/small_\".$OldFilename);\n Storage::delete($folderPath .\"/thumbs/thumb_\".$OldFilename);\n\n }\n\n if ($request->hasFile('other_images')) {\n //Add the new photo\n $otherImages = $request->file('other_images');\n foreach ($otherImages as $key => $other) {\n\n $filename_o = time().$key.'_.'.$other->getClientOriginalExtension();\n // Storage::putFileAs($folderPath, new File($other), $filename_o);\n\n ModelHelper::resize_crop_images(1200, 1200, $other, $folderPath.\"/\".$filename_o);\n ModelHelper::resize_crop_images(900, 900, $other, $folderPath.\"/thumbs/small_\".$filename_o);\n ModelHelper::resize_crop_images(600, 600, $other, $folderPath.\"/thumbs/thumb_\".$filename_o);\n }\n\n }\n\n $product_updated = $product->update($updateArray);\n $variations = $request->variation;\n\n if ($request->variation_type == 1) {\n\n foreach ($variations as $color) {\n\n if (isset($color['id'])) {\n\n // $color_slug = ProductColor::createSlug($product->id, $color['name'], $color['id']);\n\n $product_color = ProductColor::find($color['id']);\n $productColorExists = ProductColor::where([['id', '!=' , $product_color->id], ['product_id' , $product->id], ['color_id', $color['color_id']]])->exists();\n\n if (!$productColorExists) {\n\n ProductColor::where('id', $color['id'])->update([\n 'color_id' => $color['color_id'],\n 'sku' => $color['sku'],\n 'stock_count' => $color['stock_count']\n ]);\n }\n\n }else{\n\n // $color_slug = ProductColor::createSlug($product->id, $color['name']);\n\n $product_color = ProductColor::updateOrCreate(['product_id' => $product->id, 'color_id' => $color['color_id']],\n ['sku' => $color['sku'], 'stock_count' => $color['stock_count']]);\n\n }\n }\n }elseif ($request->variation_type == 2) {\n \n\n foreach ($variations as $color) {\n\n if (isset($color['id'])) {\n\n // $color_slug = ProductColor::createSlug($product->id, $color['name'], $color['id']);\n\n $product_color = ProductColor::find($color['id']);\n\n $productColorExists = ProductColor::where([['id', '!=' , $product_color->id], ['product_id' , $product->id], ['color_id', $color['color_id']]])->exists();\n\n if (!$productColorExists) {\n\n ProductColor::where('id', $color['id'])->update([\n 'color_id' => $color['color_id'],\n 'sku' => $color['sku']\n ]);\n }\n\n $sizes = $color['sizes'];\n\n foreach ($sizes as $size) {\n\n\n if (isset($size['id'])) {\n \n // $size_slug = ProductSize::createSlug($color['id'], $size['name'], $size['id']);\n\n $product_size = ProductSize::find($size['id']);\n\n $sizeExists = ProductSize::where([['id', '!=' , $product_size->id], ['product_color_id', $color['id']], ['size_id' , $size['size_id']] ])->exists();\n // dd($sizeExists);\n if (!$sizeExists) {\n\n ProductSize::where('id', $size['id'])->update([\n 'size_id' => $size['size_id'],\n 'stock_count' => $size['stock_count']\n ]);\n }\n\n\n }else{\n\n // $size_slug = ProductSize::createSlug($color['id'], $size['name']);\n \n $size = ProductSize::updateOrCreate(\n ['product_color_id' => $color['id']],\n ['stock_count' => $size['stock_count']]\n );\n }\n\n }\n\n }else{\n\n // $color_slug = ProductColor::createSlug($product->id, $color['name']);\n\n $product_color = ProductColor::updateOrCreate(['product_id' => $product->id, 'color_id' => $color['color_id']],\n ['sku' => $color['sku']]);\n\n $sizes = $color['sizes'];\n\n foreach ($sizes as $size) {\n\n // $size_slug = Size::createSlug($product_color->id, $size['name']);\n $size = ProductSize::updateOrCreate(\n ['product_color_id' => $product_color->id, 'size_id' => $size['size_id']],\n ['stock_count' => $size['stock_count']]\n );\n }\n }\n\n }\n }\n\n // dd($request);\n if ($product_updated) {\n\n if (isset($request->category_id)) {\n\n $category_ids = $request->category_id;\n\n for ($i=0; $i < count($category_ids); $i++) { \n \n $product->category_products()->updateOrCreate(['product_id' => $product->id, 'category_id' => $category_ids[$i]]);\n }\n\n $product->category_products()->whereNotIn('category_id',$category_ids)->delete();\n \n }else{\n $product->category_products()->delete();\n }\n\n return redirect()->route('admin.products.index')->with('status','Product has been Updated Successfully!');\n\n }else{\n return redirect()->back()->with('error', 'Something Went Wrong!');\n }\n }", "title": "" }, { "docid": "63a101ece5068639dff7800b6376f4af", "score": "0.56169105", "text": "public function updateResource($path, $array)\n {\n return $this->decodeResponseBody($this->sendRequest('PUT', $path, ['Content-Type' => 'application/json'], $array));\n }", "title": "" }, { "docid": "3dc7c7ac4a1b054ffe1cb3bfd7af6977", "score": "0.5615731", "text": "public function update(Request $request, $id)\n {\n try{\n $obj = Obj::where('id',$id)->first();\n $this->authorize('update', $obj);\n\n /* delete file request */\n if($request->get('deletefile')){\n if(Storage::disk('public')->exists($obj->image)){\n Storage::disk('public')->delete($obj->image);\n }\n redirect()->route($this->module.'.show',[$obj->slug]);\n }\n\n /* If file is given upload and store path */\n if(isset($request->all()['file'])){\n $file = $request->all()['file'];\n $path = Storage::disk('public')->putFile('images', $request->file('file'));\n $request->merge(['image' => $path]);\n }\n\n $obj->update($request->all()); \n\n \n\n flash('('.$obj->slug.') category item is updated!')->success();\n return redirect()->route($this->module.'.show',$obj->slug);\n }\n catch (QueryException $e){\n $error_code = $e->errorInfo[1];\n if($error_code == 1062){\n flash('Some error in updating the record')->error();\n return redirect()->back()->withInput();\n }\n }\n }", "title": "" }, { "docid": "8ca029b89aef5b3db9a2e7cfb6429648", "score": "0.5607548", "text": "public function update($resource, $attributes)\n {\n return DB::transaction(function () use ($resource, $attributes) {\n $attributes = $this->updateAttributes($attributes);\n\n /** @var Model $resource */\n $resource = $this->fill($resource, $attributes, true);\n $resource->save();\n\n return $this->updateHook($resource);\n });\n }", "title": "" }, { "docid": "792c302e1e1dd2dd27f767e2c72f24e4", "score": "0.56033003", "text": "public function update(Request $request, $id)\n {\n $food = FoodDrink::find($id);\n// $food->store_id = Auth::guard('store')->user()->id;\n $food->category_id = $request->category_id;\n $food->name = $request->name;\n $food->description = $request->description;\n $food->price = $request->price;\n $image_food=$request->file('image');\n if ($image_food==''){\n $food->image=$request->old_image;\n }else{\n $image_food=$request->file('image');\n $filename=time().'.'.$image_food->getClientOriginalExtension();\n $path='foods/' . $filename;\n Storage::disk('s3')->put($path, file_get_contents($image_food));\n $food->image = Storage::disk('s3')->url($path, $filename);\n }\n\n $food->update();\n return redirect()->route('food.index');\n }", "title": "" }, { "docid": "e78201b45ca654bb496654f8a520fa61", "score": "0.5599671", "text": "public function update(Request $request, $id)\n {\n if ($request->bool12 == 1) {\n\n if ($request->file('images')) {\n $product = Product::create($request->except('image'));\n $this->globalclass->storeMultipleS3($request->file('images'), 'construction/product', $product->id);\n } else {\n Product::create($request->except('image'));\n }\n }\n if ($request->bool12 == 0) {\n $product = Product::find($id);\n if ($request->file('images')) {\n\n $this->globalclass->storeMultipleS3($request->file('images'), 'construction/product', $product->id);\n $product->update($request->except('image','created_by'));\n } else {\n $product->update($request->except('image','created_by'));\n }\n }\n\n return redirect()->away($request->previous_url);\n }", "title": "" }, { "docid": "c289554a52ebaed40c1a4527e6993f7e", "score": "0.5595745", "text": "public function update(Request $request, $id)\n {\n $update = Photo::find($id);\n Storage::delete(\"public/img\" . $update->url);\n $update->url = $request->file(\"url\")->hashName();\n Storage::put(\"public/img\", $request->file(\"url\"));\n $update->save();\n\n return redirect(\"/\");\n }", "title": "" }, { "docid": "feafa85fd136a8bfa7378058dbef8934", "score": "0.55935574", "text": "public function update(StoreQuestion $request, Question $question)\n {}", "title": "" }, { "docid": "e1cccae3c615051b9fc728867ee799d4", "score": "0.55874336", "text": "public function update(StoreSlide $request, Slide $slide){\n $slide->title = $request->input('title');\n $slide->caption = $request->input('caption');\n $slide->target_link = $request->has('target_link')? $request->input('target_link'): $slide->target_link;\n $slide->status = $request->input('status');\n \n if($request->hasFile('image')){\n $image = Storage::put('public/slides', $request->file('image'), 'public');\n $image = explode('/', $image)[2];\n $slide->image_url = $image; \n }\n \n $slide->save();\n\n return redirect()->route('slides.show', ['slide' => $slide]);\n }", "title": "" }, { "docid": "5a0f17e493c29df895c72feb688db7f2", "score": "0.55830574", "text": "public function update(Request $request, $id)\n {\n $stadium = Stadium::find($id);\n $stadium->caption = $request->caption;\n $stadium->abstract= $request->abstract;\n $stadium->capacity = $request->capacity;\n $stadium->slug = $request->slug;\n\n //almacenar imagen\n if ($request->file('picture')){\n $img = $request->slug.'.'.$request->file('picture')->extension();\n $request->file('picture')->storeAs('public/stadiums', $img);\n $stadium->picture = $img; \n } \n $stadium->save();\n return redirect()->route('stadiums.show',compact('stadium')) \n ->with('info','Registro actualizado con éxito');\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "72020ca078f39bec759978049b853e74", "score": "0.5576042", "text": "public function testUpdate()\n {\n $model = factory($this->model)->create();\n\n $this->actingAs($this->actingAs, 'api')\n ->putJson(route($this->route . '.update', [$this->route => $model->id]), factory($this->model)->make()->toArray())\n ->assertStatus(200);\n }", "title": "" }, { "docid": "6dd248caa08f860a85ecdb9e66a6e2e1", "score": "0.55740505", "text": "public function update(Request $request, $id)\n\t{\n\n $product = Product::find($id);\n\n $product->fill($request->input())->save();\n//\n// if($product) {\n// $product->availability = $request->get('availability');\n// $product->save();\n// }\n\n return redirect()->route('admin.index');\n\t}", "title": "" }, { "docid": "2a89d1feac056c7a5193aaa3f0606728", "score": "0.557056", "text": "public function update(FormBuilder $formBuilder, Request $request, $course, Resource $resource)\n {\n //\n $form = $formBuilder->create(\\App\\Forms\\Resource::class);\n\n if (!$form->isValid()) {\n return redirect()->back()->withErrors($form->getErrors())->withInput();\n }\n\n // Do saving and other things...\n $resource->title = $request->title;\n $resource->url = $request->url;\n $resource->publish = $request->has('publish');\n $resource->save();\n\n return redirect()->route('resource.show',['course' => $course, 'resource' => $resource->id ]);\n }", "title": "" }, { "docid": "a542dd937d2be5173cc776afe82a0d09", "score": "0.55695087", "text": "public function update( $id, $data = [] )\n {\n // Find the resource record.\n // \n $record = $this->findById( $id );\n\n // Assign the changes that are to be made to the record.\n // \n $record->fill( $data );\n\n // Save the changes.\n // \n $record->save();\n\n // Now return the record.\n // \n return $record;\n }", "title": "" }, { "docid": "6e61f435eead18e460042aeda1d070b2", "score": "0.5562987", "text": "public function update(Request $request, $id)\n {\n $update = Card::find($id);\n $update->image = $request->file('image')->hashName();\n $update->titre=$request->titre;\n $update->description=$request->description;\n $update->save();\n $request->file('image')->storePublicly('images', 'public');\n Storage::disk('public')->delete('images/' . $update->photo);\n return redirect('/card');\n }", "title": "" }, { "docid": "3a66bafe63974860d7521baf3672343a", "score": "0.5562585", "text": "public function update(Request $request)\n {\n $slider = Slider::findOrFail($request->id);\n $file_route = $slider->img;\n if($request->img != null){\n\n $img = $request->file('img');\n $file_route = $request->nombre.'_'.$img->getClientOriginalName();\n Storage::disk('img-slider')->put($file_route, file_get_contents($img->getRealPath()));\n\n }\n $slider->fill($request->all());\n $slider->img = $file_route;\n\n $slider->save();\n return redirect()->to(route('slider.index'));\n }", "title": "" }, { "docid": "edc97c334b427f1077d50deb0ce82b75", "score": "0.55613524", "text": "public function update($id, Requests\\BlogUpdateRequest $request,Storage $storage) {\n //update values in notice\n $blog=Blog::find($id);\n $blog->blog_title = $request->input('blog_title');\n $blog->blog_cont = $request->input('blog_cont');\n if($request->file('blog_img')!=null){\n $image = $request->file( 'blog_img' );\n $timestamp = $this->getFormattedTimestamp();\n $savedImageName = $this->getSavedImageName( $timestamp, $image );\n $savedImageName = 'blog/'.$savedImageName;\n $imageUploaded = $this->uploadImage( $image, $savedImageName, $storage ); \n if ( $imageUploaded )\n {\n $blog->blog_img = $savedImageName;\n }else{\n return redirect('blog/list')\n ->withFlashMessage('Image upload failed!')\n ->withType('danger');\n } \n }\n $blog->save();\n return redirect('blog/list')\n ->withFlashMessage('Blog Updated successfully!')\n ->withType('success');\n }", "title": "" }, { "docid": "419d7e885f0216bf11f82a55cebe051d", "score": "0.5560277", "text": "public function update(Request $request, $id)\n {\n //\n if (\\Gate::allows('canEdit')){\n \n $old_display_image = Product_Image::where('primary', '=', 1)->where('product_id', '=', $request->product_id)->firstOrFail();\n if($old_display_image){\n $update = $old_display_image->update(['primary' => 0]);\n }\n $request->merge(['primary' => 1]);\n $product = Product_Image::where('id', '=', $id)->firstOrFail();\n $update = $product->update($request->all());\n if($update){\n return ['result'=>'success', 'message' =>'Display Image Changed'];\n }else{\n return ['result'=>'error', 'message' =>'Something went wrong.'];\n }\n }else{\n return ['result'=>'error', 'message' =>'Unauthorized! Access Denied'];\n }\n }", "title": "" }, { "docid": "4637f8f3d3bbdf0659cd1e8b2ab0cf05", "score": "0.5560252", "text": "public function update(BookRequest $request, $id)\n {\n $book = Book::findOrFail($id);\n unlink($book->image);\n $image = $request->file('image');\n $fileName = time().\"-\".$image->getClientOriginalName();\n $image->move('img/book_image', $fileName);\n $book->title = $request->title;\n $book->category_id = $request->category_id;\n $book->author_id = $request->author_id;\n $book->publisher_id = $request->publisher_id;\n $book->stock = $request->stock;\n $book->price = $request->price;\n $book->image = \"img/book_image/\".$fileName;\n $book->save();\n return new BookResource($book);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "ae94acbb17e8336020733d9a108826ef", "score": "0.55557597", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required|string|max:100',\n 'price' => 'required|numeric',\n 'photo_url' => 'nullable|image'\n ]);\n\n $product = \\App\\Product::find($id);\n $product->name = $request->input('name');\n $product->price = $request->input('price');\n\n if ($request->hasFile('photo_url')) {\n Storage::delete($product->photo_url);\n $product->photo_url = $request->file('photo_url')->store('public/products');\n }elseif ($request->has('delete_photo')) {\n Storage::delete($product->photo_url);\n $product->photo_url = null;\n }\n\n $product->save();\n\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "012d802cdd39ad4f48a5d0ab5db49368", "score": "0.55530256", "text": "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "title": "" }, { "docid": "0a6ca94a66cd5d73c054b8f785c5c23a", "score": "0.55519474", "text": "public function update(Request $request, $id)\n {\n $data=array();\n $data['product_name']=$request->product_name;\n $data['product_description']=$request->product_description;\n $data['short_description']=$request->short_description;\n $data['regular_price']=$request->regular_price;\n $data['sale_price']=$request->sale_price;\n $data['quantity']=$request->quantity;\n $data['category_id']=$request->category_id;\n $data['discount']=$request->discount;\n $data['color_id']=$request->color_id;\n $data['size_id']=$request->size_id;\n $data['status']=1;\n $data['featured']=$request->featured;\n $image=$request->newphoto;\n if($image){\n $position = strpos($image,';');\n $sub = substr($image,0,$position);\n $ext=explode('/', $sub)[1];\n\n $name=time().\".\".$ext;\n $img=Image::make($image)->resize(240,200);\n $upload_path='backend/product/';\n $img_url=$upload_path.$name;\n $success=$img->save( $img_url);\n if($success){\n \n $data['photo']=$img_url;\n $img=DB::table('products')->where('id',$id)->first();\n if($img->photo){\n $image_path=$img->photo;\n $done=unlink($image_path);\n $user=DB::table('products')->where('id',$id)->update($data);\n }else{\n $user=DB::table('products')->where('id',$id)->update($data);\n }\n \n }\n\n }else{\n $oldphoto=$request->photo;\n $data['photo']=$oldphoto;\n $user=DB::table('products')->where('id',$id)->update($data);\n\n }\n }", "title": "" }, { "docid": "2e70e3c8c0652c5dc988ab9065e4cb75", "score": "0.5550894", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $request->validate([\n 'sku' => 'required',\n ]);\n $input = $request->all();\n if ($files = $request->file('file')) {\n $request->validate([\n 'image' => 'same:image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n ]);\n if(!empty($product->image))\n {\n $oldPath = public_path('/images/products/');\n $image_path = $oldPath.$product->image;\n unlink($image_path);\n }\n $input['image'] = time().'.'.$files->extension();\n\n $destinationPath = public_path('/images/products/');\n $img = Image::make($files->path());\n\n $img->resize(600, 600, function ($constraint) {\n// $constraint->aspectRatio();\n $constraint->upsize();\n });\n $img->save($destinationPath . $input['image']);\n }\n\n $product->update($input);\n\n return redirect()->route('admin.products.edit', $id);\n\n }", "title": "" }, { "docid": "830e83e40b1643f45a7209542d55934a", "score": "0.5539849", "text": "public function updateObjectStorage($options)\n {\n if (in_array($options['object_id'], $this->storage_ids)) {\n $url = $this->api::OBJECT_STORAGE_URL . \"/\" . $options['object_id'];\n } else {\n throw new InvalidParameterException(\"That Storage ID isn't associated with your account\");\n }\n $ba['label'] = $this->d_label;\n (isset($options['label'])) ? $ba['label'] = $options['label'] : null;\n $body = json_encode($ba);\n return $this->api->makeAPICall('PUT', $url, $body);\n }", "title": "" }, { "docid": "72ad50b45baa578aa7f60f62631ac4a0", "score": "0.5539695", "text": "public function update(Request $request, $id)\n {\n if(!empty($request->imgUrl)){\n $imgUrl=$request->file('imgUrl')->move('public/img/item/',$id.\".tmp\");\n }\n Item::find($id)->update([\n 'name'=>$request->name,\n 'price'=>$request->price,\n 'stock'=>$request->stock,\n 'type'=>$request->type,\n 'desc'=>$request->desc,\n ]);\n return redirect('home');\n }", "title": "" }, { "docid": "1c298f72979588b1c24d4f0e69dfa6b7", "score": "0.5537852", "text": "public function update(Request $request, $id)\n {\n if($request->session()->exists('resources')) {\n $resources = $request->session()->get('resources');\n if(isset($resources[$id])) {\n $resource = $resources[$id];\n $idInput = $request->input('id');\n $nameInput = $request->input('name');\n $ageInput = $request->input('age');\n $resource['id'] = $idInput;\n $resource['name'] = $nameInput;\n $resource['age'] = $ageInput;\n if(isset($resources[$idInput])) {\n return back()->withInput();\n } else {\n unset($resources[$id]);\n $resources[$idInput] = $resource;\n $type = 'success';\n $data['type'] = $type;\n }\n $request->session()->put('resources', $resources);\n return redirect('resources');\n }\n }\n return back()->withInput();\n return redirect('resources')->with('message',$message);\n }", "title": "" } ]
23864afe680c4362d9ff483ca8ee8fbc
This is the callback for the menu page. Be sure to create some actual functionality!
[ { "docid": "d4cf01b46f11cbb2117f4ee01306d6c1", "score": "0.69318736", "text": "function menu_page() {\r\n\t\techo '<h3>' . __( 'FS Repeater', 'fs-pods-repeater-field' ) . '</h3>';\r\n\r\n\t}", "title": "" } ]
[ { "docid": "bc6f8ecebd4ac39c031e88492073f891", "score": "0.78498673", "text": "public function menu_page() {\n\t}", "title": "" }, { "docid": "0ab264d2e83fbc4c2636019e4707348f", "score": "0.74400645", "text": "private function init_menu()\n {\n // it's a sample code you can init some other part of your page\n }", "title": "" }, { "docid": "d07175475fe0d5db5868dd180b36a8bb", "score": "0.7411593", "text": "private function init_menu(){\n // it's a sample code you can init some other part of your page\n }", "title": "" }, { "docid": "ea01d4125445eba000fcbae4c643f8bf", "score": "0.73794633", "text": "protected function menus()\n {\n\n }", "title": "" }, { "docid": "0309d1c6d279c909a0f4ef6b9718bd32", "score": "0.7321693", "text": "public function onWpAdminMenu() {\n\t}", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.72531044", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.72531044", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.72531044", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.72531044", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.72531044", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.72531044", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "9ab0ca13d98929ba42226e4f7bdbfd1e", "score": "0.7235451", "text": "public function register_menu()\n {\n }", "title": "" }, { "docid": "bdef39c77c120d3904555f5b2cf141ab", "score": "0.7120637", "text": "public function onAdminMenu()\n {\n foreach( $this->pages as $slug => $page ) {\n add_submenu_page(\n $page['parent'], L10n::__( $page['title'] ), \n L10n::__( $page['title_menu'] ), $page['capability'], \n $slug, array( $this, 'page' . ucfirst( $slug ) )\n );\n }\n }", "title": "" }, { "docid": "16112d5e27cc646e7a33181f925ce3e0", "score": "0.7120262", "text": "public function admin_menu_callback() {\n\t\t // admin page title\n\t\t\tglobal $title;\n\t\t\t?>\n\t\t\t<div class=\"wrap\">\n\t\t\t\t<h1><?php echo $title; ?></h1>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "title": "" }, { "docid": "88a4387a9f64e692461b2f1e8f1efbbb", "score": "0.71165913", "text": "public function mainMenuAction()\n {\n \n }", "title": "" }, { "docid": "28d029688a02ddfa2590b301e0b4f89d", "score": "0.7112423", "text": "public function modMenu() {}", "title": "" }, { "docid": "28d029688a02ddfa2590b301e0b4f89d", "score": "0.71122074", "text": "public function modMenu() {}", "title": "" }, { "docid": "28d029688a02ddfa2590b301e0b4f89d", "score": "0.71122074", "text": "public function modMenu() {}", "title": "" }, { "docid": "906d567be4f2897c13c99ff24b401c68", "score": "0.7081025", "text": "function _wp_menus_changed()\n {\n }", "title": "" }, { "docid": "8ce3359791c9505d4532c7802b1c7218", "score": "0.7071853", "text": "public static function admin_menu()\n\t{\n\t}", "title": "" }, { "docid": "7d7789953a71ef5293145c493e96f2ae", "score": "0.6960718", "text": "public function callback() {\n\n\t\tadd_action( 'render_screen_tabs_' . $this->menu_slug, [ $this, 'render_tabs' ] );\n\n\t\t// Native page wrap element/class.\n\t\techo '<div class=\"wrap\">';\n\n\t\t// Print a heading using the menu title variable.\n\t\techo sprintf(\n\t\t\t'<h1>%s</h1>',\n\t\t\t__( $this->heading(), 'kc-network' )\n\t\t);\n\n\t\t// Print a paragraph with native description class using the description variable.\n\t\techo $this->description();\n\n\t\t$this->content();\n\n\t\t// End page wrap.\n\t\techo '</div>';\n\t}", "title": "" }, { "docid": "b4aad3a6a4e1743df79498217c68437f", "score": "0.6953498", "text": "public function admin_menus(){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "4341f6b1dcba97e47236bb7a9e83c481", "score": "0.6945047", "text": "function arke_wp_page_menu()\n{\n\twp_page_menu();\n}", "title": "" }, { "docid": "7a257ac6f63b40accf70ce14997b87da", "score": "0.693334", "text": "protected function registerMenu()\n {\n }", "title": "" }, { "docid": "b42c4a3bc7e77e643e900c7717643d09", "score": "0.6923556", "text": "function menu_create(){\n\t\t}", "title": "" }, { "docid": "3d11f6472dc054b7486e1e5de1d57d8d", "score": "0.6913901", "text": "function menuAction()\r\n {\r\n\r\n }", "title": "" }, { "docid": "b04591bc42b623276b1862698d3111c1", "score": "0.6904274", "text": "public function writeMenu() {}", "title": "" }, { "docid": "b04591bc42b623276b1862698d3111c1", "score": "0.69033486", "text": "public function writeMenu() {}", "title": "" }, { "docid": "b04591bc42b623276b1862698d3111c1", "score": "0.69033486", "text": "public function writeMenu() {}", "title": "" }, { "docid": "b04591bc42b623276b1862698d3111c1", "score": "0.6903172", "text": "public function writeMenu() {}", "title": "" }, { "docid": "35998ac84999342041706b9a42429504", "score": "0.68977475", "text": "public function initMenu(){\n /** @var Menu $menuClass */\n $menuClass = Config::getGlobal('menu');\n $menuClass::getInstance()->appendMenuItems();\n\n }", "title": "" }, { "docid": "d81637d6655bb6d7a2fd66fd924c689f", "score": "0.68846434", "text": "public function add_menus()\n {\n }", "title": "" }, { "docid": "1c32fe4bc316fde9f466feb7d0bc6c0f", "score": "0.688419", "text": "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"Child Care\", \"STATS\", \"_ccdev_stats\");\n module::set_menu($this->module, \"CCDEV Services\", \"LIBRARIES\", \"_ccdev_services\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "title": "" }, { "docid": "f2dd5e5ae9f311cc9d051ad31b55c748", "score": "0.6868032", "text": "public static function menu_page_cb()\n {\n ?>\n <div class=\"wrap\">\n <?php screen_icon(); ?>\n <h2><?php esc_html_e('Sample Options Page', 'pmg'); ?></h2>\n <form action=\"<?php echo admin_url('options.php'); ?>\" method=\"post\">\n <?php\n settings_fields(self::PAGE);\n do_settings_sections(self::PAGE);\n submit_button(__('Save Settings', 'pmg'));\n ?>\n </form>\n </div>\n <?php\n }", "title": "" }, { "docid": "b6ec9195c8327da14372e64a1485f3da", "score": "0.6836015", "text": "public function menu() {\n $data['page-title'] = \"Reflectiebeheer\";\n\n $this->load->template('admin_menu_view', $data);\n }", "title": "" }, { "docid": "c072030ca247ef8f5d664673b81e06bb", "score": "0.68229353", "text": "function add_menu_page() {\n\t\twp_nonce_field( 'ubc_di_nonce_check', 'di-nonce-field' );\n\t\t$this->add_new_item();\n\t\tif ( isset( $_GET['action'] ) && isset( $_GET['site'] ) && 'edit' == sanitize_text_field( wp_unslash( $_GET['action'] ) ) ) {\n\t\t\t$this->edit_item( intval( $_GET['site'] ) );\n\t\t}\n\t\tif ( isset( $_GET['action'] ) && isset( $_GET['site'] ) && 'delete' == sanitize_text_field( wp_unslash( $_GET['action'] ) ) ) {\n\t\t\t$this->delete_item( intval( $_GET['site'] ) );\n\t\t}\n\t\t$this->add_list_table();\n\t}", "title": "" }, { "docid": "ce7d83c8a9b60629c7b5044b472d9c2f", "score": "0.6822459", "text": "protected function getModuleMenu() {}", "title": "" }, { "docid": "ce7d83c8a9b60629c7b5044b472d9c2f", "score": "0.6821474", "text": "protected function getModuleMenu() {}", "title": "" }, { "docid": "ce7d83c8a9b60629c7b5044b472d9c2f", "score": "0.6821474", "text": "protected function getModuleMenu() {}", "title": "" }, { "docid": "b92b6675826bb18d22d39cda0d2ff1db", "score": "0.68087494", "text": "public static function add_menu_item() {\n\t\tadd_menu_page(\n\t\t\t'IndieWeb',\n\t\t\t'IndieWeb',\n\t\t\t'manage_options',\n\t\t\t'indieweb',\n\t\t\tarray( 'IndieWeb_Plugin', 'getting_started' ),\n\t\t\t'dashicons-share-alt'\n\t\t);\n\t}", "title": "" }, { "docid": "d27213f0828fdabf0de708934d8f577e", "score": "0.6800527", "text": "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"EPI Reports\", \"REPORTS\", \"_epi_report\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "title": "" }, { "docid": "a9ccc35d409b5e8533f7df2daa5c814f", "score": "0.6799051", "text": "protected function makeActionMenu() {}", "title": "" }, { "docid": "35efd1758ed3be813a4d5c38848a53b3", "score": "0.6767605", "text": "public function invoke()\n {\n if($this->navigation == null){\n\n $sth = $this->database->prepare(\"SELECT * FROM menu\");\n $sth->execute();\n $pages = $sth->fetchAll(PDO::FETCH_ASSOC);\n\n $nav = array();\n\n foreach ($pages as $key => $value) {\n $value['link'] = 'index.php?location='.$value['link'];\n $nav[$value['menuId']] = $value;\n }\n\n $this->navigation = $nav;\n }\n\n $this->header->setNavigation($this->navigation);\n $this->header->invoke();\n\n }", "title": "" }, { "docid": "cf20c4da4b62f900372d571a74856903", "score": "0.67666173", "text": "public function get_menu(){\n $current_page = isset($_REQUEST['page']) ? esc_html($_REQUEST['page']) : 'zgpb_page_builder';\n \n switch ($current_page) \n\t\t{\n case 'zgpb_page_builder': $this->route_page(); break;\n case 'zigapage-builder-help':\tinclude(dirname(__DIR__) . '/views/help/help.php'); break;\n case 'zigapage-builder-about':\tinclude(dirname(__DIR__) . '/views/help/about.php'); break; \n case 'zigapage-builder-debug':\tinclude(dirname(__DIR__) . '/views/help/debug.php'); break;\n case 'zigapage-builder-gopro':\tinclude(dirname(__DIR__) . '/views/help/gopro.php'); break;\n default:\n break;\n }\n }", "title": "" }, { "docid": "30261e527df984bbb3d66f19abfad057", "score": "0.6754869", "text": "public function hook_menu() {\n\n $items = array();\n \n // Add a notification page...\n $items['thumbwhere/content_collection_item/notify'] = array(\n 'title' => 'Notifications Callback for \"ContentCollectionItem\" Entity',\n 'page callback' => '_thumbwhere_content_collection_item_notify',\n 'access arguments' => array(\n 'send thumbwhere contentcollectionitem notifications'\n ),\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n ); \n \n $id_count = count(explode('/', $this->path));\n $wildcard = isset($this->entityInfo['admin ui']['menu wildcard']) ? $this->entityInfo['admin ui']['menu wildcard'] : '%' . $this->entityType;\n\n $items[$this->path] = array(\n 'title' => 'ContentCollectionItem',\n 'description' => 'Add edit and update thumbwhere_contentcollectionitems.',\n 'page callback' => 'system_admin_menu_block_page',\n 'access arguments' => array('access administration pages'),\n 'file path' => drupal_get_path('module', 'system'),\n 'file' => 'system.admin.inc',\n );\n\n // Change the overview menu type for the list of thumbwhere_contentcollectionitems.\n $items[$this->path]['type'] = MENU_LOCAL_TASK;\n\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a ContentCollectionItem',\n 'title' => 'Add',\n 'description' => 'Add a new ContentCollectionItem',\n 'page callback' => 'thumbwhere_contentcollectionitem_form_wrapper',\n 'page arguments' => array(thumbwhere_contentcollectionitem_create(array('type' => 'thumbwhere_contentcollectionitem'))),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_contentcollectionitem'),\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n\n/*\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a ContentCollectionItem',\n 'title' => 'Add',\n\t 'description' => 'Add a new ContentCollectionItem',\n 'page callback' => 'thumbwhere_contentcollectionitem_add_page',\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit'),\n 'type' => MENU_NORMAL_ITEM,\n 'weight' => 20,\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n\n );\n*/ \n/*\n $items[$this->path . '/add/' . 'thumbwhere_contentcollectionitem'] = array(\n 'title' => 'Add ' . 'ThumbWhereContentCollectionItem',\n 'page callback' => 'thumbwhere_contentcollectionitem_form_wrapper',\n 'page arguments' => array(thumbwhere_contentcollectionitem_create(array('type' => 'thumbwhere_contentcollectionitem'))),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_contentcollectionitem'),\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n*/\n // Loading and editing thumbwhere_contentcollectionitem entities\n $items[$this->path . '/thumbwhere_contentcollectionitem/' . $wildcard] = array(\n 'page callback' => 'thumbwhere_contentcollectionitem_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'weight' => 0,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n $items[$this->path . '/thumbwhere_contentcollectionitem/' . $wildcard . '/edit'] = array(\n 'title' => 'Edit',\n 'type' => MENU_DEFAULT_LOCAL_TASK,\n 'weight' => -10,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n );\n\n $items[$this->path . '/thumbwhere_contentcollectionitem/' . $wildcard . '/delete'] = array(\n 'title' => 'Delete',\n 'page callback' => 'thumbwhere_contentcollectionitem_delete_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'type' => MENU_LOCAL_TASK,\n 'context' => MENU_CONTEXT_INLINE,\n 'weight' => 10,\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n // Menu item for viewing thumbwhere_contentcollectionitems\n $items['thumbwhere_contentcollectionitem/' . $wildcard] = array(\n //'title' => 'Title',\n 'title callback' => 'thumbwhere_contentcollectionitem_page_title',\n 'title arguments' => array(1),\n 'page callback' => 'thumbwhere_contentcollectionitem_page_view',\n 'page arguments' => array(1),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('view', 1),\n 'type' => MENU_CALLBACK,\n );\n return $items;\n }", "title": "" }, { "docid": "645c41e03bc9c5b4ec3404413d75d2e8", "score": "0.6753699", "text": "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"Notifiable Diseases\", \"LIBRARIES\", \"_notifiable\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "title": "" }, { "docid": "60e3b1b7717f986946051d0e87bb5358", "score": "0.675239", "text": "public function menuEventFunc()\n {\n\n return 0;\n }", "title": "" }, { "docid": "954759743ff394d99ca6c0c293a6b5cd", "score": "0.67439854", "text": "public static function returnMenu() {\n }", "title": "" }, { "docid": "9953933999c471e6f8741e6090647e00", "score": "0.67417365", "text": "function addMenu()\n{\n add_menu_page (\"Members and Email\", \"Members / Email\", 4, \"members-email-1\", \"MeMenu\" );\n add_submenu_page(\"members-email-1\", \"Email List\", \"Email\", 4, \"members-email-sub-1\", \"MeMenuSub1\");\n add_submenu_page(\"members-email-1\", \"Tracking\", \"Tracking Scripts\", 4, \"tracking-scripts-1\", \"MeMenuSub2\");\n\n\n}", "title": "" }, { "docid": "e2e10bb23517151b8e7e8d551731ca2b", "score": "0.67333215", "text": "public static function menu() {\n\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_menu_page(\n\t\t\t'CartFlows',\n\t\t\t'CartFlows',\n\t\t\t'manage_options',\n\t\t\tCARTFLOWS_SLUG,\n\t\t\t__CLASS__ . '::render',\n\t\t\t'data:image/svg+xml;base64,' . base64_encode( file_get_contents( CARTFLOWS_DIR . 'assets/images/cartflows-icon.svg' ) ),//phpcs:ignore\n\t\t\t39.7\n\t\t);\n\n\t}", "title": "" }, { "docid": "7b6fcd6305d71a969a957ddf8b46d806", "score": "0.672437", "text": "function scfw_menu(){\n add_menu_page('SCFW - Order List', 'SCFW', 'manage_options', 'scfw-options', 'scfw_orders_list');\n add_submenu_page( 'scfw-options', 'Settings page title', 'Teste Ajax', 'manage_options', 'scfw-op-settings', 'scfw_theme_func_settings');\n add_submenu_page( 'scfw-options', 'FAQ page title', 'FAQ menu label', 'manage_options', 'scfw-op-faq', 'scfw_theme_func_faq');\n}", "title": "" }, { "docid": "fa6d1c87aa112357c19ecbacacb019a0", "score": "0.6720206", "text": "public function insertMenuEvent(){\n //\n }", "title": "" }, { "docid": "c31890088c1175e5ccb255d5e4e21615", "score": "0.6719966", "text": "function hook_menu() {\n\t\treturn null;\n\t}", "title": "" }, { "docid": "c31890088c1175e5ccb255d5e4e21615", "score": "0.6719966", "text": "function hook_menu() {\n\t\treturn null;\n\t}", "title": "" }, { "docid": "2eabb87af17ffb245da59f16438925e6", "score": "0.67124677", "text": "function Admin_menu() {\r\n\t\t\t# Get current user\r\n\t\t\tglobal $user_ID;\r\n\t\t\tglobal $pwa_pro;\r\n\t\t\tget_currentuserinfo();\r\n\r\n\t\t\t$title = 'PWA+PHP';\r\n\t\t\tif (!empty($pwa_pro)) $title = 'PWA+PHP PRO';\r\n\t\t\t$page = add_submenu_page('upload.php',\t\t\t\t\r\n\t\t\t\t__($title, c_pwa_text_domain) . ' ' . __('Administration', c_pwa_text_domain),\r\n\t\t\t\t__($title, c_pwa_text_domain),\r\n\t\t\t\tcurrent_user_can(c_pwa_min_cap),\r\n\t\t\t\t'pwaplusphp',\r\n\t\t\t\tarray(&$this, 'Administration'));\r\n\t\t\tadd_action( 'admin_print_styles-' . $page, array(&$this, 'Admin_Styles' ));\r\n\t\t\tadd_action( 'admin_print_scripts-' . $page, array(&$this, 'Admin_Scripts' ));\r\n\t\t\t\r\n\r\n\t\t}", "title": "" }, { "docid": "0e33b0c81785bcfa9791265b92212e8b", "score": "0.6707607", "text": "public function admin_menu() {\n\t\tadd_submenu_page(\n\t\t\t'tools.php',\n\t\t\t__( 'NG Vote Results', $this->_token ),\n\t\t\t__( 'Voting Results', $this->_token ),\n\t\t\t'manage_options',\n\t\t\t'ng-vote-results',\n\t\t\tarray( $this, 'admin_menu_callback' )\n\t\t);\n\t}", "title": "" }, { "docid": "0809c4ff3a0f5cf3fa70afda87adac32", "score": "0.67029804", "text": "private static function addMenuPage(){\n add_menu_page('NUCSSA接机服务', 'NUCSSA 接机', 'manage_pickups', 'admin-menu-page-nucssa-pickup', '', 'none');\n add_submenu_page('admin-menu-page-nucssa-pickup', '接机|司机审核', '司机审核', 'manage_pickups', 'admin-menu-page-nucssa-pickup', function() {\n self::renderDriverReviewPage();\n });\n add_submenu_page('admin-menu-page-nucssa-pickup', '接机|新生订单审核', '订单审核', 'manage_pickups', 'admin-menu-page-nucssa-pickup__order-review', function() {\n self::renderOrderReviewPage();\n });\n add_submenu_page('admin-menu-page-nucssa-pickup', '接机|用户反馈', '用户反馈', 'read', 'admin-menu-page-nucssa-pickup__user-feedback', function() {\n self::renderUserFeedbackPage();\n });\n }", "title": "" }, { "docid": "7aa9198b6843682b3c79109a1e772c23", "score": "0.6686492", "text": "public function makeMenu() {}", "title": "" }, { "docid": "9d28d046e0a958505f3cc2f4a3d2a2d0", "score": "0.6680542", "text": "public function setting_admin_menu() {\n\t\tswitch ( $this->menu_position ) {\n\t\t\tcase 'menu':\n\t\t\tcase 'plugins':\n\t\t\tcase 'options':\n\t\t\tdefault:\n\t\t\t\t$menu_function = 'add_' . $this->menu_position . '_page';\n\t\t\t\t$menu_function(\n\t\t\t\t\t__( 'WP Githuber MD ', 'wp-githuber-md' ),\n\t\t\t\t\t__( 'WP Githuber MD', 'wp-githuber-md' ),\n\t\t\t\t\t'manage_options',\n\t\t\t\t\t$this->menu_slug,\n\t\t\t\t\tarray( $this, 'setting_plugin_page' ),\n\t\t\t\t\t'dashicons-edit'\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "786c2e223748aa4d7bb87fd1b722fb37", "score": "0.66727144", "text": "private function PH_PageMenu(){\n $site_menu = self::$xvi_api->GetSiteMenu();\n $page_menu = self::$xvi_api->GetPageMenu();\n \n $menu =\"\";\n foreach($site_menu as $menu_item=>$menu_path) {\n if (strcmp($menu_item,$page_menu[\"item\"])) { /*not selected menu item*/\n $menu .= \"<li><a href=\\\"\".$menu_path.\"\\\"<span></span>\".$menu_item.\"</a></li>\";\n } else { /* it is selected menu*/\n $menu .= \"<li><a class=\\\"sel\\\" href=\\\"\".$menu_path.\"\\\"<span></span>\".$menu_item.\"</a></li>\";\n }\n }\n return $menu;\n }", "title": "" }, { "docid": "676102f5b312bac43aa7f05cf88fbf11", "score": "0.6661271", "text": "public function hook_menu() {\n\n $items = array();\n \n // Add a notification page...\n $items['thumbwhere/content_collection/notify'] = array(\n 'title' => 'Notifications Callback for \"ContentCollection\" Entity',\n 'page callback' => '_thumbwhere_content_collection_notify',\n 'access arguments' => array(\n 'send thumbwhere contentcollection notifications'\n ),\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n ); \n \n $id_count = count(explode('/', $this->path));\n $wildcard = isset($this->entityInfo['admin ui']['menu wildcard']) ? $this->entityInfo['admin ui']['menu wildcard'] : '%' . $this->entityType;\n\n $items[$this->path] = array(\n 'title' => 'ContentCollection',\n 'description' => 'Add edit and update thumbwhere_contentcollections.',\n 'page callback' => 'system_admin_menu_block_page',\n 'access arguments' => array('access administration pages'),\n 'file path' => drupal_get_path('module', 'system'),\n 'file' => 'system.admin.inc',\n );\n\n // Change the overview menu type for the list of thumbwhere_contentcollections.\n $items[$this->path]['type'] = MENU_LOCAL_TASK;\n\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a ContentCollection',\n 'title' => 'Add',\n 'description' => 'Add a new ContentCollection',\n 'page callback' => 'thumbwhere_contentcollection_form_wrapper',\n 'page arguments' => array(thumbwhere_contentcollection_create(array('type' => 'thumbwhere_contentcollection'))),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_contentcollection'),\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n\n/*\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a ContentCollection',\n 'title' => 'Add',\n\t 'description' => 'Add a new ContentCollection',\n 'page callback' => 'thumbwhere_contentcollection_add_page',\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit'),\n 'type' => MENU_NORMAL_ITEM,\n 'weight' => 20,\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n\n );\n*/ \n/*\n $items[$this->path . '/add/' . 'thumbwhere_contentcollection'] = array(\n 'title' => 'Add ' . 'ThumbWhereContentCollection',\n 'page callback' => 'thumbwhere_contentcollection_form_wrapper',\n 'page arguments' => array(thumbwhere_contentcollection_create(array('type' => 'thumbwhere_contentcollection'))),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_contentcollection'),\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n*/\n // Loading and editing thumbwhere_contentcollection entities\n $items[$this->path . '/thumbwhere_contentcollection/' . $wildcard] = array(\n 'page callback' => 'thumbwhere_contentcollection_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'weight' => 0,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n $items[$this->path . '/thumbwhere_contentcollection/' . $wildcard . '/edit'] = array(\n 'title' => 'Edit',\n 'type' => MENU_DEFAULT_LOCAL_TASK,\n 'weight' => -10,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n );\n\n $items[$this->path . '/thumbwhere_contentcollection/' . $wildcard . '/delete'] = array(\n 'title' => 'Delete',\n 'page callback' => 'thumbwhere_contentcollection_delete_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'type' => MENU_LOCAL_TASK,\n 'context' => MENU_CONTEXT_INLINE,\n 'weight' => 10,\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n // Menu item for viewing thumbwhere_contentcollections\n $items['thumbwhere_contentcollection/' . $wildcard] = array(\n //'title' => 'Title',\n 'title callback' => 'thumbwhere_contentcollection_page_title',\n 'title arguments' => array(1),\n 'page callback' => 'thumbwhere_contentcollection_page_view',\n 'page arguments' => array(1),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('view', 1),\n 'type' => MENU_CALLBACK,\n );\n return $items;\n }", "title": "" }, { "docid": "92f8984137f11b3940f2571f76bb09c6", "score": "0.6642127", "text": "private function checkMenu()\n {\n\n }", "title": "" }, { "docid": "ba214698737ff2c3ca5a29d52d32d74d", "score": "0.66374785", "text": "function admin_menu() {\n\t\tadd_menu_page( 'Support', 'My Stackbot', 'manage_options', __FILE__, array(&$this, 'show_pages'),' ', 71);\n\t\t//add_submenu_page( __FILE__, 'My Stackbot', 'My Stackbot','manage_options', 'tracking-listing',array(&$this, 'show_tracking_listing'), 'dashicons-admin-post');\n\t\tadd_submenu_page( __FILE__, 'Analytics', 'Analytics','manage_options', 'analytics',array(&$this, 'add_analytics'), 'dashicons-admin-post');\n\t\tadd_submenu_page( __FILE__, 'Settings', 'Settings','manage_options', 'setting',array(&$this, 'show_general'), '');\n\t}", "title": "" }, { "docid": "71abecabfb95e9067b061c6c72a5bd7a", "score": "0.66085005", "text": "function adminMenu() {\r\n\t\t// TODO: This does not only create the menu, it also (only?) *does* sth. with the entries.\r\n\t\t// But those actions must be done before the menu is created (due to the redirects).\r\n\t\t// !Split the function!\r\n\t\t//$page = add_submenu_page('admin.php', __('UWR Ergebnisse'), __('UWR Ergebnisse'), 'edit_posts', 'uwr1results', array('Uwr1resultsController', 'adminAction'));\r\n\t\t$page = add_submenu_page('uwr1menu', __('UWR Ergebnisse'), __('UWR Ergebnisse'), UWR1RESULTS_CAPABILITIES, 'uwr1results', array('Uwr1resultsController', 'adminAction'));\r\n\t\tadd_action( 'admin_print_scripts-' . $page, array('Uwr1resultsView', 'adminScripts') );\r\n\t}", "title": "" }, { "docid": "a4890e3cfe92461a127859580b051f71", "score": "0.6603103", "text": "public function create_menu()\n\t{\n\t\t$obj = $this; // PHP 5.3 doesn't allow $this usage in closures\n\n\t\t// Add main menu page\n\t\tadd_menu_page(\n\t\t\t'Testimonials plugin', // page title\n\t\t\t'Testimonials', // menu title\n\t\t\t'manage_options', // minimal capability to see it\n\t\t\t'jststm_main_menu', // unique menu slug\n\t\t\tfunction() use ($obj){\n\t\t\t\t$obj->render('main_menu'); // render main menu page template\n\t\t\t},\n\t\t\tplugins_url('images/theater.png', dirname(__FILE__)), // dashboard menu icon\n\t\t\t'25.777' // position in the dahsboard menu (just after the Comments)\n\t\t);\n\t\t// Add help page\n\t\tadd_submenu_page(\n\t\t\t'jststm_main_menu', // parent page slug\n\t\t\t'Testimonials plugin help', // page title\n\t\t\t'What is this?', // menu title\n\t\t\t'manage_options', // capability\n\t\t\t'jststm_help', // slug\n\t\t\tfunction() use ($obj){\n\t\t\t\t$obj->render('help_page');\n\t\t\t}\n\t\t);\n\t}", "title": "" }, { "docid": "638a8aaeccb684d1726e3742ea316860", "score": "0.65786284", "text": "function at_try_menu()\n{\n add_menu_page(\n 'user_statement_list', //page title\n 'User Statement Listing', //menu title\n 'manage_options', //capabilities\n 'User_Statement_Listing', //menu slug\n 'user_statement_list' //function\n );\n //adding submenu to a menu\n add_submenu_page(\n 'User_Statement_Listing', //parent page slug\n 'user_statement_insert', //page title\n 'User Statement Insert', //menu title\n 'manage_options', //manage optios\n 'User_Statement_Insert', //slug\n 'user_statement_insert' //function\n );\n add_submenu_page(\n null, //parent page slug\n 'user_statement_update', //$page_title\n 'User Statement Update', // $menu_title\n 'manage_options', // $capability\n 'User_Statement_Update', // $menu_slug,\n 'user_statement_update' // $function\n );\n add_submenu_page(\n null, //parent page slug\n 'user_statement_delete', //$page_title\n 'User Statement Delete', // $menu_title\n 'manage_options', // $capability\n 'User_Statement_Delete', // $menu_slug,\n 'user_statement_delete' // $function\n );\n}", "title": "" }, { "docid": "61799f6f7e3985116f477c4b14c21bbf", "score": "0.65757", "text": "function wpmu_menu()\n {\n }", "title": "" }, { "docid": "ce23d13b2ca4f38e9aa7b2e2ff28de40", "score": "0.65671057", "text": "public function hb_custom_menu_page(){\n esc_html_e( 'Handlebars Test Page', 'hbs' );\n }", "title": "" }, { "docid": "4cc139da9e4b6f01223c201269fe225f", "score": "0.656106", "text": "function LinkITMenu() {\n add_menu_page('123LinkIt', '123LinkIt', 'manage_options', 'LinkITPluginCentral', 'LinkITPluginCentral', 'http://www.123linkit.com/images/123linkit.favicon.gif', 3);\n }", "title": "" }, { "docid": "7de7a17f5bde494600944606c17e0c1f", "score": "0.6542719", "text": "function cg_create_menu() {\n\tadd_menu_page( \n\t__('CityGrid', EMU2_I18N_DOMAIN),\n\t__('CityGrid', EMU2_I18N_DOMAIN),\n\t0,\n\tCG_PLUGIN_DIRECTORY.'/cg-main.php',\n\t'',\n\tplugins_url('/images/icon.png', __FILE__));\n\t\n\t\n\tadd_submenu_page( \n\tCG_PLUGIN_DIRECTORY.'/cg-main.php',\n\t__(\"Main\", EMU2_I18N_DOMAIN),\n\t__(\"Main\", EMU2_I18N_DOMAIN),\n\t0,\n\tCG_PLUGIN_DIRECTORY.'/cg-main.php'\n\t);\t\n\t\n\tadd_submenu_page( \n\tCG_PLUGIN_DIRECTORY.'/cg-main.php',\n\t__(\"Settings\", EMU2_I18N_DOMAIN),\n\t__(\"Settings\", EMU2_I18N_DOMAIN),\n\t0,\n\tCG_PLUGIN_DIRECTORY.'/cg-settings.php'\n\t);\t\t\n\t\n\tif(!get_option('directory_label'))\n\t\t{\n\t\t$the_page_title = \"Directory\";\n\t\t}\t\n\telse\n\t\t{\n\t\t$the_page_title = get_option('directory_label');\n\t\t}\n\t//echo \"HERE: \" . $the_page_title . \"<br />\";\n\t$the_page = get_page_by_title( $the_page_title );\n\t\n\tif ( ! $the_page ) {\n\t\n\t $_p = array();\n\t $_p['post_title'] = $the_page_title;\n\t $_p['post_content'] = \"<p>Welcome to the CityGrid Hyp3rL0cal Directory</p>\";\n\t $_p['post_status'] = 'publish';\n\t $_p['post_type'] = 'page';\n\t $_p['comment_status'] = 'closed';\n\t\n\t // Insert the post into the database\n\t $the_page_id = wp_insert_post( $_p );\n\t \n\t update_post_meta( $the_page_id, '_wp_page_template', 'cg-directory.php' );\n\t \n\t}\t\n\t\n}", "title": "" }, { "docid": "cf38252d9ae578504700524260d49c81", "score": "0.6541195", "text": "function create_a_menu(){\n\t\t\t/*\n\t\t\tadd_menu_page(__('get clicky into your site'),__('Outbound Links'),'activate_plugins','wp_clicky_links',array($this,'OptionsPage'));\t\t\t\n\t\t\tadd_submenu_page('wp_clicky_links',__('add or edit'),__('Add New Link'),'activate_plugins','wp_clicky_addnew',array($this,'add_new'));\t\t\n\t\t\t//add_submenu_page('wp_clicky_links',__('clicky information'),__('Clicky Info'),'activate_plugins','clicky-import-result-information',array($this,'import_result_cicky_info'));\n\t\t\tadd_submenu_page('wp_clicky_links',__('Log Goals Into GetClikcy'),__('Log SIDs'),'activate_plugins','clicky-stats',array($this,'clicky_log'));\n\t\t\tadd_submenu_page('wp_clicky_links',__('Adjust GetClicky Settings in ClickyPlus'),__('Settings'),'activate_plugins','clicky-import-result-information',array($this,'import_result_cicky_info'));\n\t\t\t*/\n\t\t\t\n\t\t\tadd_menu_page(__('get clicky into your site'),__('ClickyPlus Settings'),'activate_plugins','wp_clicky_links',array($this,'import_result_cicky_info'));\n\t\t\t\n\t\t\tadd_submenu_page('wp_clicky_links',__('get clicky into your site'),__('Outbound Links'),'activate_plugins','wp_clicky_outbound_links',array($this,'OptionsPage'));\t\t\t\n\t\t\tadd_submenu_page('wp_clicky_links',__('add or edit'),__('Add New Link'),'activate_plugins','wp_clicky_addnew',array($this,'add_new'));\t\t\n\t\t\t//add_submenu_page('wp_clicky_links',__('clicky information'),__('Clicky Info'),'activate_plugins','clicky-import-result-information',array($this,'import_result_cicky_info'));\n\t\t\tadd_submenu_page('wp_clicky_links',__('Log Goals Into GetClikcy'),__('Log SIDs'),'activate_plugins','clicky-stats',array($this,'clicky_log'));\n\t\t\t\n\t\t}", "title": "" }, { "docid": "fd329eedc89dff25c857e2f9780157b4", "score": "0.65396667", "text": "function admin_menu () {\n\t\tglobal $this_page, $DATA;\n\n\t\t$pages = array ('admin_home',\n 'admin_comments','admin_trackbacks', 'admin_searchlogs', 'admin_popularsearches', 'admin_failedsearches',\n 'admin_statistics',\n 'admin_commentreports', 'admin_glossary', 'admin_glossary_pending', 'admin_badusers',\n\t\t'admin_alerts',\n );\n\n\t\t$links = array();\n\n\t\tforeach ($pages as $page) {\n\t\t\t$title = $DATA->page_metadata($page, 'title');\n\n\t\t\tif ($page != $this_page) {\n\t\t\t\t$URL = new URL($page);\n\t\t\t\t$title = '<a href=\"' . $URL->generate() . '\">' . $title . '</a>';\n\t\t\t} else {\n\t\t\t\t$title = '<strong>' . $title . '</strong>';\n\t\t\t}\n\n\t\t\t$links[] = $title;\n\t\t}\n\n\t\t$html = \"<ul>\\n\";\n\n\t\t$html .= \"<li>\" . implode(\"</li>\\n<li>\", $links) . \"</li>\\n\";\n\n\t\t$html .= \"</ul>\\n\";\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "dd6ca3a520d4e592f0610d0907459bed", "score": "0.65368176", "text": "public function beforeContent() {\n\t\t$menu = $this->document->getElementById($this->id);\n\t\tif($menu) {\n\t\t\t$this->document->addCss('public/css/simplemenu.css');\n\t\t\t$menu->removeAttribute('style');\n\n\t\t\t$menuList = $this->document->createElement('ul');\n\n\t\t\t$rq = new RequestHandler(DEFAULTPAGE, $this->basepath);\n\n\t\t\tforeach($this->menuItems as $lbl => $page) {\n\t\t\t\t$li = $this->document->createElement('li');\n\t\t\t\t$a = $this->document->createElement('a', $lbl);\n\t\t\t\t$a->setAttribute('href', $this->basepath.'/'.$page);\n\t\t\t\tif($rq->getPage() == $page)\n\t\t\t\t\t$li->setAttribute('class', 'selected');\n\t\t\t\t$li->appendChild($a);\n\t\t\t\t$menuList->appendChild($li);\n\t\t\t}\n\t\t\t$menu->appendChild($menuList);\n\t\t}\n\t}", "title": "" }, { "docid": "e2cccbf66d3c5166a7e7bd2aed7f618a", "score": "0.6534405", "text": "public function page_setup(){\n add_menu_page( PLUGIN_NAME, PLUGIN_NAME, 'manage_options', sanitize_key(PLUGIN_NAME), array($this, 'admin_page'), $this->icon, 3 );\n }", "title": "" }, { "docid": "76b55e2a20d2c738cb15879f9e1a3912", "score": "0.6527931", "text": "function add_menu() {\n\t\t$badge = ' <span class=\"bs-admin-menu-badge bs-admin-menu-badge-smaller\">' . __( 'New', 'publisher' ) . '</span>';\n\n\t\tBetter_Framework()->admin_menus()->add_menupage( array(\n\t\t\t\t'id' => $this->page_id,\n\t\t\t\t'slug' => 'better-studio/' . $this->args['slug'],\n\t\t\t\t'name' => __( 'Page Templates', 'publisher' ),\n\t\t\t\t'parent' => 'bs-product-pages-welcome',\n\t\t\t\t'page_title' => __( 'Page Templates', 'publisher' ),\n\t\t\t\t'menu_title' => __( 'Page Templates', 'publisher' ) . $badge,\n\t\t\t\t'position' => 45,\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'callback' => array( $this, 'display' ),\n\t\t\t\t'on_admin_bar' => true,\n\t\t\t)\n\t\t);\n\n\t}", "title": "" }, { "docid": "3d31c740509bbacaef2811be8aab2d9d", "score": "0.6526234", "text": "public function event()\n {\n return 'admin_menu';\n }", "title": "" }, { "docid": "1068d73de3fef4b1f478f10af5bd0978", "score": "0.6524747", "text": "function admin_menu() {\n\t\tadd_menu_page(\n\t\t\t__( 'Display Sitewide Notice', 'mfsn' ),\n\t\t\t__( 'Sitewide Notice', 'mfsn' ),\n\t\t\t'edit_pages',\n\t\t\t'mfsn',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'settings_page_callback'\n\t\t\t),\n\t\t\t'dashicons-megaphone',\n\t\t);\n\t}", "title": "" }, { "docid": "76febe90d59199c2ae427264bc4105f7", "score": "0.65065", "text": "public function admin_menu_open() {\n\n\t\t$this->content = $this->render_template(\n\t\t\t'collections/js-holder.php', [\n\t\t\t\t'all_collections' => [],\n\t\t\t]\n\t\t);\n\t\t$this->header = $this->render_template( 'collections/header.php' );\n\t\techo $this->render_template( 'wrapper.php' );\n\n\t}", "title": "" }, { "docid": "323f8cf974dbb3fb1ab61c680076daff", "score": "0.6502755", "text": "function func(){\n\tadd_menu_page('Tous', 'Tous Les Tickets', 'manage_options', 'Gestion/tous', 'thefunc');\n\tadd_menu_page('Mes', 'Mes Tickets', 'manage_options', 'Gestion/mestickets', 'thefunc');\n\tadd_menu_page('Devis','Devis', 'manage_options', 'Gestion/Devis', 'thefunc');\n\tadd_menu_page('RH', 'RH', 'manage_options', 'Gestion/RH', 'thefunc');\n\tadd_menu_page('Contact','Contact', 'manage_options', 'Gestion/Contact', 'thefunc');\n\t//\tadd_menu_page('Detail', 'null', 'manage_options', 'Test/detail', 'thefunc');\n\tadd_submenu_page('null', 'Detail', 'Details', 'manage_options',\n\t\t'Gestion/detail', 'thefunc');\n\tadd_menu_page('Liste', 'Gestion des Listes', 'manage_options', 'Gestion/liste', 'thefunc');\n\tadd_menu_page('Mails', 'Gestion des Mails', 'manage_options', 'Gestion/mails', 'thefunc');\n}", "title": "" }, { "docid": "a3e5f434c969282ad7e27520b0164c17", "score": "0.64832836", "text": "function CJ_plugin_menu() {\n\t\tadd_menu_page('CJ multi file page title', 'Booking Plugin', 'read','CJdash_index', 'CJ_plugin_main');\n \n\t\tadd_submenu_page('CJdash_index','CJ submenu one', 'Rooms', 'manage_options','Rooms', 'CJ_plugin_menu_includes');\t\n \tadd_submenu_page('CJdash_index','CJ submenu two', 'Users', 'manage_options','Users', 'CJ_plugin_menu_includes');\t\n \tadd_submenu_page('CJdash_index','CJ submenu one', 'Bookings and Reservations', 'publish_pages','Bookings_and_Reservations', 'CJ_plugin_menu_includes');\t\n\t add_submenu_page('CJdash_index','CJ submenu two', 'Room Extras', 'publish_pages','Room_Extras', 'CJ_plugin_menu_includes');\t\n \tadd_submenu_page('CJdash_index','CJ submenu one', 'Reviews', 'read', 'Reviews', 'CJ_plugin_menu_includes');\t\t\n\t\n\t\n\n\tadd_options_page('CJ menu Options', 'CJ menu options', 'read', 'CJdash_indexoptions', 'CJ_plugin_options');\t\t\n}", "title": "" }, { "docid": "995b328d3ebfe90a0adf4495198740a6", "score": "0.6482505", "text": "function add_menu() {\n\tif ( !isset($this->menu_title) && !property_exists($this, 'menu_title') ) $menu_title = $this->base_plugin_title;\n\telse $menu_title = $this->menu_title;\n\tif ( !isset($this->user_can) || !property_exists($this, 'user_can') ) $this->user_can = 'manage_options';\n\t$this->options_page = add_options_page( $this->base_plugin_title, $menu_title, $this->user_can, $this->unique_id, array($this, 'do_action') );\n}", "title": "" }, { "docid": "a4bb9bd92c9115d85e6367e8c0f67096", "score": "0.6482284", "text": "public function create_menu()\r\n\t\t{\r\n\t\t\tif (! $_SESSION[\"CLIENT\"]->is_user())\r\n\t\t\t\t{\r\n\t\t\t\t\t// no menu for guests!!\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t$is_users = false;\r\n\t\t\t$is_home = false;\r\n\t\t\t$is_setup = false;\r\n\t\t\t\r\n\t\t\tswitch ($_SESSION[\"_PageID.current\"])\r\n\t\t\t\t{\r\n\t\t\t\tcase \"setup\":\r\n\t\t\t\t\t$is_setup = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"users\":\r\n\t\t\t\tcase \"details\":\r\n\t\t\t\t\t$is_users = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"home\":\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$is_home = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t$_SESSION[\"HTML\"]->menu_insert_entry(\"Abmelden\", \"./?action=logout\", \"Q\");\r\n\t\t\t$_SESSION[\"HTML\"]->menu_insert_spacer();\r\n\t\t\t$_SESSION[\"HTML\"]->menu_insert_entry(\"&Uuml;bersicht\", \"./?page=home\", \"H\", $is_home);\r\n\t\t\t$_SESSION[\"HTML\"]->menu_insert_entry(\"Mitarbeiter\", \"./?page=users\", \"E\", $is_users);\r\n\t\t\t\r\n\t\t\t// only admins can edit users\r\n\t\t\tif ($_SESSION[\"CLIENT\"]->is_admin())\r\n\t\t\t\t{\r\n\t\t\t\t\t$_SESSION[\"HTML\"]->menu_insert_entry(\"Einstellungen\", \"./?page=setup\", \"S\", $is_setup);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t$_SESSION[\"HTML\"]->menu_insert_spacer();\r\n\t\t\t$_SESSION[\"HTML\"]->menu_insert_entry(\"[<u>KOMMEN</u>]\", \"./?action=book&amp;id=1\", \"K\");\r\n\t\t\t$_SESSION[\"HTML\"]->menu_insert_entry(\"[<u>GEHEN</u>]\", \"./?action=book&amp;id=0\", \"G\");\r\n\t\t\t$_SESSION[\"HTML\"]->menu_insert_spacer();\r\n\t\t\t$_SESSION[\"HTML\"]->menu_insert_entry(\"[DOKU]\", \"./doc\", \"D\", false);\r\n\t\t}", "title": "" }, { "docid": "51daa40c851554be75fe01d2532f2861", "score": "0.64802563", "text": "function WPLMS_menu_MainMenu(){\n\n add_menu_page('WP LMS School', 'WP LMS School', 'administrator',WPLMS_PLUGIN_ID,'WPLMS_dashboard');\n add_submenu_page(WPLMS_PLUGIN_ID,'Students', 'Students', 'administrator','students','WPLMS_students');\n add_submenu_page(WPLMS_PLUGIN_ID,'Add Course', 'Add Course', 'administrator','course','WPLMS_addcourse');\n add_submenu_page(WPLMS_PLUGIN_ID,'Add Modules', 'Add Modules', 'administrator','modules','WPLMS_addmodule');\n\n add_submenu_page(WPLMS_PLUGIN_ID, false, '<span class=\"wpcw_menu_section\" style=\"display: block; margin: 1px 0 1px -5px; padding: 0; height: 1px; line-height: 1px; background: #CCC;\"></span>', 'manage_options', '#', false);\n\n add_submenu_page(WPLMS_PLUGIN_ID,'Quiz Summary', 'Quiz Summary', 'administrator','WPLMS_quizSummary','WPLMS_quizSummary');\n add_submenu_page(WPLMS_PLUGIN_ID,'Question Pool', 'Question Pool', 'administrator','WPLMS_questionPool','WPLMS_questionPool');\n\n //No Menu\n //add_submenu_page(WPLMS_PLUGIN_ID,'Add Quiz', 'Add Quiz', 'administrator', 'add_quiz', 'WPLMS_addQuiz');\n\n add_submenu_page(null,'Stud','Student Courses', 'administrator','studentCourses','WPLMS_studentcourses');\n add_submenu_page(null,'Add Question', 'Add Question', 'administrator', 'add_question', 'WPLMS_addQuestion');\n //add_submenu_page(null,'Add Quiz', 'Add Quiz', 'administrator', 'WPLMS_addQuiz', 'WPLMS_addQuiz');\n\n\n //add_submenu_page('onlineschool','Packages', 'Packages', 'administrator','addpackage','addpackage_code');\n //add_submenu_page('onlineschool','Sets', 'Sets', 'administrator','sets','sets_code');\n //add_submenu_page('options.php','Students', 'Student Courses', 'administrator','studentCourses','studentCourses_code');\n}", "title": "" }, { "docid": "95631adf37006f8fcf1f998f4a1fa645", "score": "0.64693266", "text": "function admin_menu() {\n\t\t// The designation of add_MANAGEMENT_page causes the menu item to be listed under the Tools menu!\n\t\tadd_management_page('Revitalize Orders Output', 'Revitalize Orders', 'edit_posts', basename(__FILE__), array(&$this, 'page_handler'));\n\t}", "title": "" }, { "docid": "673e3c66d9eff8b6d227eb4bd0f71164", "score": "0.6467829", "text": "public function addAdminMenuPage()\n\t{\n\t\t$menuPage = &ModelAdminMenu::getScheme();\n\n\t\tforeach ( $menuPage as $menu ) {\n\t\t\t$callback = array_keys( $menu );\n\t\t\t$paramArr = array_values( $menu );\n\n\t\t\t$this->_adminMenuPage( $callback[0], $paramArr[0]['parameters'] );\n\t\t}\n\t}", "title": "" }, { "docid": "1933f61dde6da0b7c8872e11fd71921a", "score": "0.64669144", "text": "public function add_menu() {\n\t\t\tadd_menu_page(\n\t\t\t\t'Amazon Affiliate | Products',\n\t\t\t\t'Products',\n\t\t\t\t'manage_options',\n\t\t\t\t'amz-affiliate/pages/product.php',\n\t\t\t\tarray( &$this, 'load_product_page' ),\n\t\t\t\tplugins_url( 'amz-affiliate/img/icon.png' ),\n\t\t\t\t50\n\t\t\t);\n\t\t\tadd_submenu_page(\n\t\t\t\t'amz-affiliate/pages/product.php',\n\t\t\t\t'Amazon Affiliate | Tables',\n\t\t\t\t'Tables',\n\t\t\t\t'manage_options',\n\t\t\t\t'amz-affiliate/pages/table.php',\n\t\t\t\tarray( &$this, 'load_table_page' )\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "ce33b85d38bf065b0243b09c70428a1a", "score": "0.6460229", "text": "function akvodata_add_menu_page() {\n add_menu_page(\"Akvo data\", \"Akvo data\", \"activate_plugins\", \"akvodata\", \"akvodata_admin_overview_page\");\n add_submenu_page('akvodata', 'data overview', 'data overview', 'update_core', 'akvodata', \"akvodata_admin_overview_page\");\n add_submenu_page('akvodata', 'add data', 'add data', 'update_core', 'akvodata-add', \"akvodata_admin_add_page\");\n}", "title": "" }, { "docid": "16f5d8bcb319543c0e001d682c4c1aad", "score": "0.64580464", "text": "protected function prepareMenuItemsForRootlineMenu() {}", "title": "" }, { "docid": "c9a04e1a52814430b110c0c3b11d3812", "score": "0.6456492", "text": "function log_viewer_add_menu_item() {\n\techo '<li><a href=\"http://localhost/ds-plugins/log-viewer/page.php\">Log Viewer</a></li>';\n}", "title": "" }, { "docid": "3808dfc8d1e76776232a98eb4b38b7d4", "score": "0.6455465", "text": "protected function generateModuleMenu() {}", "title": "" }, { "docid": "8f6e045074eb2136556d488ee019efc9", "score": "0.6451957", "text": "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"Drug Formulation\", \"LIBRARIES\", \"_drug_formulation\");\n module::set_menu($this->module, \"Drug Preparation\", \"LIBRARIES\", \"_drug_preparation\");\n module::set_menu($this->module, \"Drug Manufacturer\", \"LIBRARIES\", \"_drug_manufacturer\");\n module::set_menu($this->module, \"Drug Source\", \"LIBRARIES\", \"_drug_source\");\n module::set_menu($this->module, \"Drugs\", \"LIBRARIES\", \"_drugs\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "title": "" }, { "docid": "d6938ee84c797e142b9c6d85a83a43a6", "score": "0.6451128", "text": "public function menuItem() {\n return array(\n 'feeds/importer/%feeds_importer' => array(\n 'page callback' => 'feeds_fetcher_callback',\n 'page arguments' => array(2, 3),\n 'access callback' => TRUE,\n 'file' => 'feeds.pages.inc',\n 'type' => MENU_CALLBACK,\n ),\n );\n }", "title": "" }, { "docid": "cf01eef9a20ad519a88d2f7c892ac86c", "score": "0.6449781", "text": "public function menu()\n\t{\n\t\tif (!$this->pemilwa_library->is_loggedin()) {\n\t\t\tredirect('admin','refresh');\n\t\t}\n\t\t\n\t\t//ambil data role dan ambil id dari session\n\t\t$var['role'] = $this->pemilwa_library->role();\n\t\t$var['cek'] = $this->session->userdata('id');\n\n\t\t//load halaman\n\t\t$data['header'] = 'header';\n\t\t$data['navbar'] = 'navbar';\n\t\t$data['footer'] = 'footer';\n\t\t$this->pemilwa_library->display('menu-admin', $data, $var);\n\t}", "title": "" }, { "docid": "ad878bc34abe8831de30f5688b30bd3e", "score": "0.64470637", "text": "function getMenuItems()\n {\n }", "title": "" }, { "docid": "1e00a15e1d4981315bf7f06286c53b6c", "score": "0.6447044", "text": "function adminForMenu() {\r\n add_menu_page(__('View Reviews', 'menu-test'), __('View Reviews', 'menu-test'), 'manage_options', 'sub-page', 'new_plugin');\r\n }", "title": "" }, { "docid": "47152018b31204afacc0cb82b442eb14", "score": "0.6446307", "text": "function displayMenu()\n\t{\n\t\tshowInfo();\n\t\tshowActions();\n\t}", "title": "" }, { "docid": "bc0678405a14fb8a44e4f16f6fb4ff94", "score": "0.6446279", "text": "private function PageBodyMenu()\n\t{\tif ($this->page->id)\n\t\t{\techo '<div class=\"course_edit_menu\"><ul>';\n\t\t\tforeach ($this->BodyMenuOptions() as $key=>$option)\n\t\t\t{\techo '<li', $this->page_option == $key ? ' class=\"selected\"' : '', '><a href=\"', $option['link'], '\">', $option['text'], '</a></li>';\n\t\t\t}\n\t\t\techo '</ul><div class=\"clear\"></div></div><div class=\"clear\"></div>';\n\t\t}\n\t}", "title": "" }, { "docid": "24afedccb0489e539bd2a07147a93a97", "score": "0.6445792", "text": "public function admin_menu() {\n global $submenu, $menu;\n\n $perms = 'manage_options';\n add_menu_page( 'VALA 2.0', 'VALA', $perms, 'vala2api', array($this, 'admin_page'), '', 83.3 ); \n add_submenu_page( 'vala2api', __('Import Gallery', self::TEXT_DOMAIN), __('Import Gallery', self::TEXT_DOMAIN), $perms, 'vala2_winners_circle', array($this,'ngg_import_gallery_page') );\n }", "title": "" }, { "docid": "76ad914ca45aba908d5683ee1759df8b", "score": "0.64434904", "text": "public function menuConfig() {}", "title": "" }, { "docid": "5195827794be53d05a2d42516f683a8f", "score": "0.64433235", "text": "function dashboard()\n\t{\n\t\t// Save Menu\n\t\t$this->events->add_filter( 'admin_menus', array( $this, 'create_menus' ) );\n\t\t// Register Page\n\t\t$this->Gui->register_page( 'menu_builder', \tarray( $this, 'menu_builder_controller' ) );\n\t}", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "4fcb7d3ed7bd8f41bc382e1bb6eef1d4", "score": "0.0", "text": "public function show($id)\n {\n return Bike::with(['category', 'capacity', 'brand'])->findorfail($id);\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "fa12d91e9349fafc5fadd2869e01afe7", "score": "0.81538695", "text": "public function show(Resource $resource) {\n //\n }", "title": "" }, { "docid": "364c14abc03f539e9a17828c2c3c5094", "score": "0.7142873", "text": "protected function makeDisplayFromResource()\n\t{\n\t\treturn $this->activeResource->makeDisplay();\n\t}", "title": "" }, { "docid": "c32c82f3c9f666d7ebd6a4a17c715dde", "score": "0.71033037", "text": "public function show(App\\Resource $resource){\n return $resource;\n }", "title": "" }, { "docid": "63ed4e18ae3ec83b0374866b78fa0cb2", "score": "0.69621414", "text": "public function show(Resources $resources)\n {\n //\n }", "title": "" }, { "docid": "028815e256d04884fbfd1abcd49553a0", "score": "0.6881821", "text": "public function show(ResourceInterface $resource)\n\t{\n if(Auth::user()->can('show', $resource)) {\n $variables = [];\n $variables['extends'] = Config::get('roles::extends');\n $variables['resource'] = $resource;\n $response = View::make('roles::resource.show', $variables);\n } else {\n $errors = new MessageBag();\n $errors->add('error', trans('roles::resource.show permission denied'));\n $response = Redirect::back()->withErrors($errors);\n }\n\n return $response;\n\t}", "title": "" }, { "docid": "72eb4a0f938598778f7d1bb6c9a7c01a", "score": "0.6460539", "text": "public function show(Res $res)\n {\n //\n }", "title": "" }, { "docid": "f9c75fc80c4e08207bdf6a688293bd30", "score": "0.64507407", "text": "public function actionDisplay() {\n global $mainframe, $user;\n if (!$user->isSuperAdmin()) {\n YiiMessage::raseNotice(\"Your account not have permission to visit page\");\n $this->redirect(Router::buildLink(\"cpanel\"));\n }\n $this->addIconToolbar(\"New\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'new')), \"new\");\n $this->addIconToolbar(\"Edit\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'edit')), \"edit\", 1, 1, \"Please select a item from the list to edit\"); \n $this->addIconToolbar(\"Publish\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'publish')), \"publish\");\n $this->addIconToolbar(\"Unpublish\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'unpublish')), \"unpublish\");\n $this->addIconToolbar(\"Delete\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'remove')), \"trash\", 1, 1, \"Please select a item from the list to Remove\"); \n $this->addBarTitle(\"Resource <small>[tree]</small>\", \"user\"); \n \n $model = Resource::getInstance();\n $items = $model->getItems();\n \n $this->render('default', array('items'=>$items));\n }", "title": "" }, { "docid": "9a30795d980babc94eaea5f358f9a346", "score": "0.6348493", "text": "public function view($id = null) {\n $resource = $this->resources[$id];\n $this->set(array('resource' => $resource, '_serialize' => 'resource'));\n }", "title": "" }, { "docid": "2fcca60eabc9fa263815bdb0af23227b", "score": "0.6310235", "text": "public function show($title)\n {\n $searchTerm = DB::table('searches')->where('query', '* '.$title)->first();\n if (isset($searchTerm)) $accesses = $searchTerm->accesses;\n $resource = Resource::where('title', '=', $title)->first();\n if (isset($resource)){\n return view('resources.show')\n ->with('title', $resource->title)\n ->with('body', $resource->body)\n ->with('accesses', $accesses); \n }\n else return \"resource not found\";\n }", "title": "" }, { "docid": "d88de1aa779e246b7fddebd9a98ba96d", "score": "0.6300392", "text": "public function resource($resource);", "title": "" }, { "docid": "5ff14c79a9b59fe32898fb8081a44d38", "score": "0.62861", "text": "public function show($id)\n {\n //abort('404');\n //$resource = Resource::find($id);\n\n // To throw an exception\n //$resource = Resource::findOrFail($id);\n $resource = Resource::find($id);\n if ( ! $resource) {\n // I think findOPrFail is equivalent\n abort(404); # @TODO Check what happens here and compare with the findOrFail\n }\n //dd($resource);\n return view('resources.show', compact('resource'));\n }", "title": "" }, { "docid": "3b18817b82995fa8322e3e648666dc69", "score": "0.62845415", "text": "public function show() {\n\t\tstatus_header(200);\n\t\t\n\t\tparent::show();\n\t}", "title": "" }, { "docid": "ba5a2c7902e0156425e3dea1470df9a3", "score": "0.6231386", "text": "public function show($id)\n {\n return \"This is show controller resource showing ID: \". $id;\n }", "title": "" }, { "docid": "9f4baef36bbd297dd8826a3cf4c65825", "score": "0.6228845", "text": "public function show($id)\n {\n $resource = Resource::findOrFail($id);\n $model = $resource;\n\n return view('backend.resources.show', compact('resource', 'model'));\n }", "title": "" }, { "docid": "6bca27d0e9ea5eb6ef16196ace65c00a", "score": "0.6185019", "text": "public function show($resource) {\n $id = $this->getUserIdByResource($resource);\n return $id ? $this->user->find($id) : $this->noSuchUserResponse();\n }", "title": "" }, { "docid": "cbf3bf22b6453f9015dd8d3552392655", "score": "0.6155763", "text": "protected function showResourceView($id)\n\t{\n\n\t\t$element = $this->getElements($id);\n\t\treturn Response::view('adm/IAS/element', array('data' => $element));\n\n\t}", "title": "" }, { "docid": "7ee4932d24e9f896454c46b5725bca09", "score": "0.61360765", "text": "public function resourceAction ()\n { \n $this->setRefer(); // Set auth referer\n \n $this->view->params = $this->_request->getParams(); // Pass params to view\n \n $resourceid = $this->_request->getParam('id'); // Get Article ID from params\n \n if (isset($resourceid)) : // If resource ID set continue\n \n\t\t // Setup Registry\n \t $registry = Zend_Registry::getInstance();\n \t\n \t // Get Article data\n \t $select = $registry->db->select()\n \t\t\t\t\t ->from(array('r' => 'resources'))\n\t\t\t\t \t\t ->join(array('c' => 'resources_categories'),'r.resource_category = c.rcat_id',array('c.rcat_title'))\n\t\t\t\t \t\t ->join(array('t' => 'resources_types'),'t.rtype_id = r.resource_type')\n\t\t\t\t \t\t ->join(array('b' => 'resources_brands'),'b.rbrand_id = r.resource_brand',array('b.rbrand_title','b.rbrand_id'))\n\t\t\t\t \t\t ->where('r.resource_status = ?','published')\n\t\t\t\t \t \t ->where('r.resource_id = ?',$resourceid)\n \t\t\t\t\t ->limit(1,0);\n\n \t // Set the data array\n\t\t $resourceArray = $registry->db->fetchall($select);\n\t\t\n\t\t if (count($resourceArray)) : // If resource exists\n\n // Pass Resource to View \n\t\t $this->view->resourceArray = $resourceArray[0];\n \n else : // Else redirect to 404 Error\n \n \t $this->_helper->layout->setLayout('main');\t \n $this->_forward('notfound','error','default');\n \n endif;\n \n $this->view->comment = NULL; // Reset the comment value\n \n if($this->_request->isPost()) // If form has been posted\n {\n if ($this->view->authenticated) // The user is authenticated\n {\n $options = array();\n\n $filters = array(\n \t\t\t'content' => array('StringTrim', 'StripTags')\n );\n\n $validators = array(\n 'content' => array(\n \t\t'presence' => 'required',\n \t\t'NotEmpty',\n \t\t\t'messages' => array(array( Zend_Validate_NotEmpty::IS_EMPTY => \"You did not enter a comment\"))\n ),\n );\n\n $input = new Zend_Filter_Input($filters, $validators, $_POST, $options);\n \n // setup database\n \t $registry = Zend_Registry::getInstance();\n\n if ($input->isValid()) // If the form input validates\n {\n // Set moderation variable\n if($this->view->resourceArray['resource_moderate'] == 'Y') :\n $approved = 'N';\n else :\n $approved = 'Y';\n endif;\n \n // Create our data array\n $data = array(\n \t'comment_type' => 'R',\n \t\t\t\t\t\t'comment_slave' => $this->view->resourceArray['resource_id'],\n \t\t\t\t\t\t'comment_approved' => $approved,\n \t\t\t'comment_content'\t=> $input->content,\n \t\t\t'comment_user'\t => $this->view->user->user_id,\n \t\t\t'comment_date'\t\t=> new Zend_Db_Expr('NOW()')\n );\n\n // Insert data into database\n $registry->db->insert('comments', $data);\n \n } else { // If input is invalid\n $this->view->messages = $input->getMessages(); // Pass Messages to view\n $this->view->comment = $_POST['content']; // Set value of message to match input\n }\n }\n }\n \n // Get Comments\n \t $select = $registry->db->select()\n \t\t\t\t\t ->from(array('c' => 'comments'),array('c.*'))\n\t\t\t\t \t\t ->join(array('u' => 'users'),'c.comment_user = u.user_id',array('u.user_alias','u.user_role'))\n\t\t\t\t \t\t ->where('comment_approved = ?','Y')\n\t\t\t\t \t\t ->where('comment_type = ?','R')\n\t\t\t\t \t\t ->where('comment_slave = ?',$resourceid)\n \t\t\t\t\t ->order('c.comment_date ASC');\n\n \t // Pass the comments to view\n\t\t $this->view->commentsArray = $registry->db->fetchall($select);\n\t\t\n\t\telse : // Else if Article ID not set redirect to 404 Error\n \n $this->_helper->layout->setLayout('main');\t \n $this->_forward('notfound','error','default');\n \n endif;\n }", "title": "" }, { "docid": "947c1c8f23ecc67503ddd9aaa8d0c053", "score": "0.6131235", "text": "public abstract function display(Response $response);", "title": "" }, { "docid": "d48eea5127e3c179d902a8be0b6f8468", "score": "0.6094903", "text": "public function show($id)\n {\n $resource = Resource::find($id);\n if (is_null($resource)) {\n return redirect()->route('resources.index');\n }\n return view(\n 'resources.show',\n ['resource' => $resource]\n );\n }", "title": "" }, { "docid": "15870f022600bd008a2dda714833e3a8", "score": "0.60690975", "text": "public function display() {\n\n\t\t$this->displayRequest();\n\t\tprint '<br /><br />';\n\t\t$this->displayResponse();\n\t}", "title": "" }, { "docid": "2c4681f3d2ea72046a4a8fbabafd2fda", "score": "0.60642564", "text": "public function viewResource($slug)\n {\n if ($resource = Resource::findBySlug($slug)) {\n // No se utiliza el metodo each() por que se trata de un solo recurso, no es necesario hacer un recorrido.\n $resource->category;\n $resource->tags;\n $resource->book;\n\n $ay_tags = $resource->tags;\n\n $actual_link = 'http://'.$_SERVER['HTTP_HOST'].'/resources/'.$slug;\n\n return view('front.resource')\n ->with('resource', $resource)\n ->with('ay_tags', $ay_tags)\n ->with('actual_link', $actual_link);\n }\n else {\n abort(404);\n }\n }", "title": "" }, { "docid": "f1919612984d797496fb91a1df6bfc28", "score": "0.60360175", "text": "public function show(Resident $resident)\n {\n //\n }", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "d091fe2536049092c575a390aa36ed46", "score": "0.5972", "text": "public function display()\n {\n switch ($this->platform->getPost('section')) {\n case 'download':\n $this->downloadAction();\n break;\n \n case 'remove_backup':\n $this->deleteBackupsAction();\n break;\n \n case 'backup_note':\n $this->updateBackupNoteAction();\n break;\n \n case 'restore_db':\n $this->restoreDbAction();\n break;\n }\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "53013b6882d008888ea7afca1b751f49", "score": "0.5934595", "text": "function render_individual_resource_page($v, $url){\n\tglobal $wpdb;\n\n\t// specify the template file to use\n\t$v->template = 'resource';\n\n\t// include the helper\n\trequire_once('helper.php');\n\n\t// create a resource object\n\t$resource = new en_Resource();\n\n\t// determine the slug, load it into the object\n\t$uri = $_SERVER['REQUEST_URI'];\n\t$slug = substr($uri, 11);\n\t$end = strrpos($slug, '/');\n\t$end = ($end ? $end : strrpos($slug, '.'));\n\tif($end){\n\t\t$slug = substr($slug, 0, $end);\n\t}\n\t$resource->slug = $slug;\n\n\t// load the resource data from the database\n\t$resource->load();\n\n\t// check that such a resource exists\n\t$v->body = '';\n\t$v->title = 'No resource Found';\n\tif($resource->name != '' && $resource->status == 'publish'){\n\t\t// load the name\n\t\t$v->title = $resource->name;\n\t}\n\n\t$_SESSION['en_resource'] = $resource;\n}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "0d00cd39f55015604f557b3b7ebf1eca", "score": "0.5876515", "text": "public function show($id)\n\t{\n\t\t$resources = $this->resourcesRepository->find($id);\n\n\t\tif(empty($resources))\n\t\t{\n\t\t\tFlash::error('Resources not found');\n\n\t\t\treturn redirect(route('resources.index'));\n\t\t}\n\n\t\treturn view('resources.show')->with('resources', $resources);\n\t}", "title": "" }, { "docid": "d752fd3972b546ef194ae14ab221ca30", "score": "0.58688277", "text": "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "62de9bb9e8014b878862d1b3e9dfd27c", "score": "0.5865432", "text": "public function showResourcesPage()\n {\n $mTitle = $this->_mTitle;\n $title = trans(\"admin.resources\");\n $data = ['mTitle', 'title'];\n return view('home.resources')\n ->with(compact($data)); \n }", "title": "" }, { "docid": "7c25d9175a0b8f2be9a3f3b0c4a64c29", "score": "0.5860501", "text": "public function showAction()\r\n\t{\r\n\t\t$this->loadLayout()->renderLayout();\r\n\t}", "title": "" }, { "docid": "e1c49860e31b5bc5d738e44a442665de", "score": "0.58473253", "text": "public function displayAction()\n\t{\t// Look up policy with the given url parameters\n\t\t$policy = $this->db->getPolicy($this->_getParam('page'));\n\t\t$this->view->policy = $policy;\n\t}", "title": "" }, { "docid": "5a5e25617e1019b0143435d1dcee143b", "score": "0.58304006", "text": "public function edit(Resource $resource) {\n $resource = Resource::find($resource->id);\n return view('resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "55ebb313f26c5900b8cfe594dfa4e5eb", "score": "0.57751614", "text": "public function display() {\n\t\techo $this->render();\n\t}", "title": "" }, { "docid": "4de642a6f69c75724da5f78bd193b43e", "score": "0.57721317", "text": "public function display($name)\n {\n echo $this->fetch($name);\n }", "title": "" }, { "docid": "34a8fc606e2e5031dcfc0be2c4eda232", "score": "0.5769309", "text": "function resource($resource_id)\n\t{\n\t\t# Call model function to get resource record\n\t\t$q = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\t\t# Check that it exists (in case of URL editing in the browser)\n\t\tif ($q -> num_rows() == 0) \n\t\t{ \n\t\t\t$data['title'] = \"No such resource\"; $data['heading'] = \"Resource not found\"; \n\t\t\t$data['error'] = \"There is no resource with the ID $resource_id. Tough mazoomas.\n\t\t\t\t\t\t\t\tPlease choose another resource to edit.\"; \n\t\t\t$data['message'] = \"\";\n\t\t\t$this -> load -> view('resourcedb/database_error_view', $data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$resource_title = $q -> row() -> title;\n\t\t\t$data['title'] = \"Edit resource \" . $resource_title;\n\t\t\t$data['heading'] = \"Edit resource \" . $resource_title;\n\t\t\t$data['resource__id'] = $resource_id; \n\t\t\t\n\t\t\t# Get the user ID to save as record editor\n\t\t\t$user_id = $this->ion_auth->user()->row()-> id;\n\t\t\t# Set messages for the view file\n\t\t\t$data['title'] = 'Global health repository: edit resource';\n\t\t\t$data['heading'] = 'Edit resource';\n\t\t\t# Set user message and error as blanks, to prevent PHP warning if one or t'other isn't set\n\t\t\t$data['message'] = \"\"; $data['error'] = \"\";\n\t\t\t\n\t\t\t# Populate form elements.\n\t\t\t# Get full resource record first \n\t\t\t$data['resource_detail_query'] = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\n\t\t\t# -- SUBJECTS ---\n\t\t\t# Get all subjects in the database, to display in the 'subjects' <div> in the view\n\t\t\t# False param indicates that all subjects should be returned, not just those 'in use'\n\t\t\t# by existing resources\n\t\t\t$data['subjects_query'] = $this -> ResourceDB_model -> get_subjects(false);\n\t\t\t# Get subjects attached to this resource, if any. These will be selected in the view\n\t\t\t$attached_subjects_query = $this -> ResourceDB_model -> get_resource_subjects($resource_id);\n\t\t\t$old_subjects_ary = array();\n\t\t\t# Create 2-D array, subject IDs as keys, subject titles as values\n\t\t\tforeach ($attached_subjects_query -> result() as $row)\n\t\t\t{\n\t\t\t\t$old_subjects_ary[$row -> id] = $row -> title;\n\t\t\t}\n\t\t\t# Pass currently attached subjects to the view page\n\t\t\t$data['attached_subjects_ary'] = $old_subjects_ary;\t\t\t\n\t\t\t\n\t\t\t# -- ORIGINS --\n\t\t\t$data['origins_query'] = $this -> ResourceDB_model -> get_origins();\n\n\t\t\t# -- RESOURCE TYPES ---\n\t\t\t$data['resource_types_query'] = $this -> ResourceDB_model -> get_resource_types();\n\t\t\t\n\t\t\t# -- TAGS --\n\t\t\t# Get all tags attached to this resource, both to use in the view and in this script\n\t\t\t# Note: only tag names stored as IDs aren't used in this script or the view\n\t\t\t$tags_query = $this -> ResourceDB_model -> get_resource_tags($resource_id);\n\t\t\t$old_tags_ary = array();\n\t\t\tforeach ($tags_query -> result() as $row)\n\t\t\t{\n\t\t\t\t$old_tags_ary[] = $row -> name;\t\n\t\t\t}\n\t\t\t$data['tags_ary'] = $old_tags_ary; \n\t\t\t\n\t\t\t# ==== FORM VALIDATION ======\n\t\t\t# Note that set_value() to repopulate the form *only* works on elements with \n\t\t\t# validation rules, hence a rul for all elements below. See CI Forum thread at:\n\t\t\t# http://codeigniter.com/forums/viewthread/170221/\n\n\t\t\t# NB: The callback function to check the title has the existing title as a 'parameter' in \n\t\t\t# sqare brackets, as just checking for the title existing would always \n\t\t\t# return true - we need to check that the edited title exists or not. \n\t\t\t$this->form_validation->set_rules('title', 'Title', \"required|trim|xss_clean|callback_title_check[$resource_title]\");\n\t\t\t$this->form_validation->set_rules('url', 'URL', 'required|trim|xss_clean|prep_url');\n\t\t\t$this->form_validation->set_rules('description', 'Description', 'required|xss_clean');\n\t\t\t$this->form_validation->set_rules('tags', 'Tags', 'trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('creator', 'Creator', 'trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('rights', 'Rights', 'trim|xss_clean');\t\t\n\t\t\t$this->form_validation->set_rules('notes', 'Notes', 'trim|xss_clean');\t\t\n\t\t\t\n\t\t\t# If the form doesn't validate, or indeed hasn't even been submitted, \n\t\t\t# (re)populate with user data\n\t\t\tif ($this->form_validation->run() == FALSE)\n\t\t\t{\n\t\t\t\t$data ['error'] = validation_errors();\t\n\t\t\t\t$this -> load -> view('resourcedb/editview', $data);\n\n\t\t\t}\n\t\t\t# If form validates, update record\n\t\t\telse\n\t\t\t{\n\t\t\t\t# Get form values for fields in RESOURCE table\n\t\t\t\t# What's the current date and time? Use the date helper - \n\t\t\t\t# now() returns current time as Unix timestamp, unix_to_human\n\t\t\t\t# converts it to YYYY-MM-DD HH:MM:SS which mySQL needs for the \n\t\t\t\t# DATETIME data type\n\t\t\t\t$now = \tunix_to_human(now(), TRUE, 'eu'); // Euro time with seconds\n\t\n\t\t\t\t$record_data = array (\n\t\t\t\t\t\t\t\t'title' => $_POST['title'], \n\t\t\t\t\t\t\t\t'url' => $_POST['url'], \n\t\t\t\t\t\t\t\t'description' => $_POST['description'], \n\t\t\t\t\t\t\t\t'type' => $_POST['type'], \n\t\t\t\t\t\t\t\t'creator' => $_POST['creator'], \n\t\t\t\t\t\t\t\t'source' => $_POST['source'], \n\t\t\t\t\t\t\t\t'rights' => $_POST['rights'], \n\t\t\t\t\t\t\t\t'restricted' => $_POST['restricted'], \n\t\t\t\t\t\t\t\t'visible' => $_POST['visible'], \n\t\t\t\t\t\t\t\t'metadata_created' => $now, \n\t\t\t\t\t\t\t\t'metadata_modified' => $now, \n\t\t\t\t\t\t\t\t'metadata_author' => $user_id, \n\t\t\t\t\t\t\t\t'notes' => $_POST['notes']\t\t\t\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t# Run update query in model\n\t\t\t\t$this -> Edit_model -> update_resource($record_data, $resource_id);\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t# ======== JUNCTION TABLES ==========\n\t\t\t\t# Now get form values for fields using junction tables\t\t\t\t\n\t\n\t\t\t\t# TAGS\n\t\t\t\t# First, get tag(s) user's inserted. Get cleaned field text...\n\t\t\t\t$tags = $this -> security -> xss_clean($_POST['tags']);\n\t\t\t\t# ...then split string by the semicolon delimiter...\n\t\t\t\t$tags_ary = explode(';', $tags);\n\t\t\t\t# ...then remove any duplicate tags...\t\t\t\n\t\t\t\t$tags_ary = array_unique($tags_ary);\n\t\t\t\t# ...then see if the user's removed any existing tags.\n\t\t\t\t$detached_tags_ary = $this -> compare_tags($old_tags_ary, $tags_ary);\n\t\t\t\t# Detach the tags removed from reource \n\t\t\t\t# (deleting rows in the RESOURCE_KEYWORD junction table)\n\t\t\t\tforeach($detached_tags_ary as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t# Get id of tag to detach\n\t\t\t\t\t$q = $this -> ResourceDB_model -> get_tag_id($val);\n\t\t\t\t\t$tag_id = $q -> row() -> keyword_num;\n\t\t\t\t\t$this -> Edit_model -> detach_tag($resource_id, $tag_id);\n\t\t\t\t}\n\t\t\t\t# Go through user-entered tags and attach to the resource, \n\t\t\t\t# adding new tags to KEYWORDS if not already exist\n\t\t\t\t$this -> attach_tags($tags_ary, $resource_id);\n\t\t\t\t\n\t\t\t\t# SUBJECTS\n\t\t\t\t# The input form lists subjects as a series of checkboxes with the name\n\t\t\t\t# subjects[] which generates an array in POST, so go through that array\n\t\t\t\t# and 'attach' subjects to the resource in RESOURCE_SUBJECT junction table\n\t\t\t\t# First, check that any subjects are checked at all, and if not just create an \n\t\t\t\t# empty array so as not to generate a runtime error\n\t\t\t\tif (isset($_POST['subjects']))\n\t\t\t\t{ $subjects_id_ary = $_POST['subjects']; }\n\t\t\t\telse\n\t\t\t\t{ $subjects_id_ary = array(); }\n\t\t\t\t# Get an array of the IDs of subjects to detach\n\t\t\t\t$detached_subjects_id_ary = $this -> compare_subjects($old_subjects_ary, $subjects_id_ary);\n\t\t\t\tforeach ($detached_subjects_id_ary as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t$this -> Edit_model -> detach_subject($resource_id, $val);\t\n\t\t\t\t}\n\n\t\t\t\tforeach ($subjects_id_ary as $val)\n\t\t\t\t{\n\t\t\t\t\t# The model function checks if subject already attached\n\t\t\t\t\t$this -> Edit_model -> attach_subject($resource_id, $val);\t\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t# Set messages etc for the result page\n\t\t\t\t$data['title'] = \"Edit resource: result\";\n\t\t\t\t$data['heading'] = \"Edit resource: result\";\n\t\t\t\t$data['resource_title'] = $record_data['title'];\n\t\t\t\t$data['resource_id'] = $resource_id; \n\t\t\t\t$data['message'] = 'Record edited ok'; \t\n\t\t\t\t# Load results page with data array\n\t\t\t\t$this->load->view('resourcedb/edit_result_view', $data);\n\t\t\t} // end if validates\n\t\t} // end else \n\t\t\n\t}", "title": "" }, { "docid": "64ca047c763cbf564dd5de6f46e00c8a", "score": "0.5757105", "text": "public function display(){}", "title": "" }, { "docid": "428d435450a183e9f2b1cf67fe4ca1ee", "score": "0.5746211", "text": "public function showAction($id)\n {\n }", "title": "" }, { "docid": "25fef2b3e221da4874ce751e7620e1b8", "score": "0.57376534", "text": "public function show($id)\n {\t\n\t\t//\n \n }", "title": "" }, { "docid": "8f15cdd2f287675d36c7b7df028043ec", "score": "0.5736634", "text": "public function show($id)\n\t{\n\t//\n\t}", "title": "" }, { "docid": "dbfb7ac40503919a18ba680b317c5bcf", "score": "0.57300025", "text": "function show()\r\n\t{\r\n\t\tparent::display();\r\n\t}", "title": "" }, { "docid": "6ec9b736dc660b1af85b3d3e6b5c2891", "score": "0.5728069", "text": "public function showAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FklFranklinBundle:Intervention')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Intervention entity.');\n }\n\n return $this->render('FklFranklinBundle:Intervention:show.html.twig', array(\n 'entity' => $entity,\n ));\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "c422e600117f23ecb3e910d02cd71439", "score": "0.5719182", "text": "public function show($id)\n\t{ \n\t\t//\n\t}", "title": "" }, { "docid": "7464e9c5980c37f2e71c965980844f2f", "score": "0.57157016", "text": "public function display() {\r\n \r\n function pec_display($pecio, $template_path_c) {\r\n \tinclude($template_path_c);\r\n }\r\n \r\n \t// here we need to get the canonicalized template path, so that we can include it with `include()`\r\n $template_path_c = $this->template_resource->get('template')->get_directory_path();\r\n \r\n // that's the \"normal\" path to the template directory\r\n $template_path = $this->template_resource->get('template')->get_directory_path(false);\r\n \r\n $this->template_resource->set('template_path', $template_path);\r\n $this->template_resource->set('template_path_c', $template_path_c);\r\n \r\n $pecio = $this->template_resource;\r\n pec_display($pecio, $template_path_c . $this->template_file);\r\n }", "title": "" }, { "docid": "39d7fb3e638fbdb7af4616a9e66a7c1e", "score": "0.571459", "text": "public function display() {\n $id = $_GET['value'];\n $product = $this->productManager->findOne($id);\n $page = 'product';\n require('./View/default.php');\n }", "title": "" }, { "docid": "e5b68899adbea6a73109d8e4dd1a0aad", "score": "0.5703109", "text": "public function showAction() {\r\n // Load View template\r\n $actorModel = new ActorModel(\"actors\");\r\n $actor = $actorModel->getActor(\"id\");\r\n include CURR_VIEW_PATH . \"actors\". DS . \"show.php\";\r\n // actorDB/application/views/actors/show.php;\r\n }", "title": "" }, { "docid": "fa1c2eb41c95d94a4e3d5fbf93d1fb39", "score": "0.5700314", "text": "public function show($id)\n\t{\n\t\t$user = Sentry::getUser();\n\t\t$request = $user->requests()->with('file')->where('id', $id)->first();\n\n\t\tif (! $request) return App::abort(404, \"Request resource [$id] not found.\");\n\n\t\t$file = $request->file()->first();\n\n\t\t$this->layout->content = View::make('my.requests.show')\n\t\t\t\t\t\t\t\t\t->with('user', $user)\n\t\t\t\t\t\t\t\t\t->with('request', $request)\n\t\t\t\t\t\t\t\t\t->with('file', $file);\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "7580b6a8a70ffcf0c85b9c5fd2d164c8", "score": "0.56878597", "text": "public function show($id)\n\t{\t\n\t\t\n\t}", "title": "" }, { "docid": "8fb8368b4d32374cf0802714864ca045", "score": "0.5686805", "text": "public function show(Spec $spec)\n {\n //\n }", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
abee9a69011c0ef60988f40207a4d835
Return the content of a current xml document.
[ { "docid": "22773fd7acd2183658251ee9ea5f61cf", "score": "0.6592042", "text": "public function getDocument()\n\t\t\t{\n\t\t\t\t$this->endElement();\n\t\t\t\t$this->endDocument();\n\t\t\t\treturn $this->outputMemory();\n\t\t\t}", "title": "" } ]
[ { "docid": "cc244329546abbf0caa9d2c405b23706", "score": "0.7581136", "text": "public function content() {\n return $this->xml;\n }", "title": "" }, { "docid": "5501396a420f8dbad655b273f9845ffd", "score": "0.7060003", "text": "public function contents() {\n\t\t$root = $this->get_root_element();\n\n\t\treturn '<?xml version=\"1.0\" encoding=\"UTF-8\"?>' . PHP_EOL . $root[0] . $this->buffer . $root[1] . PHP_EOL;\n\t}", "title": "" }, { "docid": "798035aed7bae4f3909ff8c4f7d7aa7b", "score": "0.6889137", "text": "public function getContent() {\n\t\treturn $this->provider()->getDocumentContent($this->id);\n\t}", "title": "" }, { "docid": "c951ab57dc779ad06afddc9e5a49328f", "score": "0.66975296", "text": "public function getXML()\n\t{\n\t\treturn $this->_xml->saveXML($this->_xml->documentElement);\n\t}", "title": "" }, { "docid": "92e273c2f6b4ff542caa1f628a972346", "score": "0.65505475", "text": "public function getDocumentSource() {\n return file_get_contents(drupal_get_path('module', 'graphql') . '/tests/files/xml/test.xml');\n }", "title": "" }, { "docid": "809a31fbcbb943a2bd3ef63425092ce5", "score": "0.6540295", "text": "public function get() {\n return $this->xml;\n }", "title": "" }, { "docid": "aed4603bce50b000f6c19243edbc65cb", "score": "0.64948165", "text": "public function getDocument()\r\n {\r\n $this->endElement();\r\n $this->endDocument();\r\n return $this->outputMemory();\r\n }", "title": "" }, { "docid": "9088af56119f67dd461042331cf21ef3", "score": "0.6473139", "text": "public function getContentAsXml()\n {\n return new \\SimpleXMLElement($this->content);\n }", "title": "" }, { "docid": "50e80b644bd0bafc641efc19b917fc9c", "score": "0.6422791", "text": "public function getContent()\n\t{\n\t\t$head = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>' . \"\\n\";\n\t\t$head .= '<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">';\n\t\t$foot = '</rss>';\n\t\t$atom = '<atom:link href=\"' . $this->sAdresseRss . '\" rel=\"self\" type=\"application/rss+xml\" />';\n\t\t$sRss = $head . '<channel>' . $atom . $this->header . $this->news . '</channel>' . $foot;\n\n\t\t$oFile = new _file(_root::getConfigVar('path.data') . 'xml/' . $this->sName . '.rss');\n\t\t$oFile->setContent($sRss);\n\t\t$oFile->save();\n\n\t\treturn $sRss;\n\t}", "title": "" }, { "docid": "e3ca95c8e42860e04e088fe9c24a692f", "score": "0.6402958", "text": "public function get_content() {\r\n\t\treturn $this->content;\r\n\t}", "title": "" }, { "docid": "a89440beab1e2db3ca88fdac5692d003", "score": "0.63589805", "text": "public function loadDocument() {\n $document = new \\DOMDocument();\n libxml_use_internal_errors(TRUE);\n $document->loadHTMLFile(drupal_get_path('module', 'graphql') . '/tests/files/xml/test.xml');\n return $document->documentElement;\n }", "title": "" }, { "docid": "13173ac4f81e05c259ae0e41aa0852c4", "score": "0.6308968", "text": "function get_content(){\n\t\treturn $this->content;\n\t}", "title": "" }, { "docid": "cf267a004e3a9642e63980fb0661a949", "score": "0.6290059", "text": "public function getContent()\n\t{\n\t\treturn $this->_content;\n\t}", "title": "" }, { "docid": "14e448cbe89cc3ea46ef053f61f8ddf5", "score": "0.6285921", "text": "public function getContent() \n {//-------------------->> getContent()\n return $this->_content;\n }", "title": "" }, { "docid": "83c72d59e45750153fc41943673dccec", "score": "0.6277532", "text": "public function contents()\n {\n return $this->content->build();\n }", "title": "" }, { "docid": "070af8368523e5aa0b7132ea8052eaba", "score": "0.6273952", "text": "public function content()\n {\n return file_get_contents( $this->fullpath() );\n }", "title": "" }, { "docid": "805ac4195e6084d4e655e6f88300d278", "score": "0.6267535", "text": "public function getDOM() {\n $document = new DOMDocument();\n $document->loadXML($this->loadSubtitleContent());\n return $document;\n }", "title": "" }, { "docid": "14b16d00549306ff521def8c1765e2be", "score": "0.62651074", "text": "public function getContent(){\n\t\treturn $this->_content;\n\t}", "title": "" }, { "docid": "f29fcaa03727c78c18d3706068a0e3ae", "score": "0.6263956", "text": "protected function getDocument()\n {\n return $this->dom;\n }", "title": "" }, { "docid": "a1a97b52a95108122272190ce7b781e1", "score": "0.6261583", "text": "protected function getContent() {\n $xmlcontent = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'.\"\\n\";\n $xmlcontent .= '<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">'.\"\\n\";\n $xmlcontent .= $this->getRootPage();\n $xmlcontent .= $this->getPostPages();\n $xmlcontent .= $this->getCategoryPages();\n $xmlcontent .= $this->getTagPages();\n $xmlcontent .= '</urlset>'.\"\\n\";\n return $xmlcontent;\n }", "title": "" }, { "docid": "f925bda141caff1f3f114267ff1acf13", "score": "0.62526387", "text": "public function content() {\n\t\treturn $this->content;\n\t}", "title": "" }, { "docid": "c5fb1f17cdf5ac98dfc08dbad4afa49a", "score": "0.6234709", "text": "public function getContent()\n {\n if (strpos($this->contentType, \"application/json\") !== false) {\n return json_decode($this->content);\n }\n if (strpos($this->contentType, \"text/xml\") !== false\n || strpos($this->contentType, \"application/xml\") !== false\n ) {\n return simplexml_load_string($this->content);\n }\n return $this->content;\n }", "title": "" }, { "docid": "0016f65daa7e3892d7955586a6bb4265", "score": "0.6232963", "text": "public function getContent() {\n\t\treturn $this->content;\n\t}", "title": "" }, { "docid": "0016f65daa7e3892d7955586a6bb4265", "score": "0.6232963", "text": "public function getContent() {\n\t\treturn $this->content;\n\t}", "title": "" }, { "docid": "0016f65daa7e3892d7955586a6bb4265", "score": "0.6232963", "text": "public function getContent() {\n\t\treturn $this->content;\n\t}", "title": "" }, { "docid": "0016f65daa7e3892d7955586a6bb4265", "score": "0.6232963", "text": "public function getContent() {\n\t\treturn $this->content;\n\t}", "title": "" }, { "docid": "0016f65daa7e3892d7955586a6bb4265", "score": "0.6232963", "text": "public function getContent() {\n\t\treturn $this->content;\n\t}", "title": "" }, { "docid": "caabd2e979bb25b4b8e1e9f3605a42a0", "score": "0.6222211", "text": "public function current()\n {\n $node = $this->reader->expand();\n if ($node === false) {\n return false;\n }\n $node = $this->doc->importNode($node, true);\n if ($node === false) {\n return false;\n }\n $current = simplexml_import_dom($node);\n if ($current === false) {\n return false;\n }\n\n if ($this->options[\"asArray\"]) {\n return json_decode(json_encode($current), true);\n } else {\n return $current;\n }\n }", "title": "" }, { "docid": "5a69408a448e3ea3e2ec27fbff7d542c", "score": "0.62078005", "text": "public function getContent () {\r\n return $this->_content;\r\n }", "title": "" }, { "docid": "51ff5323ce18a856ee70d91e15bff203", "score": "0.62008876", "text": "public function getContent()\n\t{\n\t\treturn $this->content;\n\t}", "title": "" }, { "docid": "51ff5323ce18a856ee70d91e15bff203", "score": "0.62008876", "text": "public function getContent()\n\t{\n\t\treturn $this->content;\n\t}", "title": "" }, { "docid": "5797422319cd8c5346eb4ab4da69b7e9", "score": "0.62005377", "text": "public function get_content() {\n\n\t\t$html = $this->get_content_html();\n\n\t\tif ( empty( $html ) ) {\n\t\t\treturn $this->get_content_plain();\n\t\t}\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "351d159c59fd1d47344dfcd5dbd6d1cb", "score": "0.620044", "text": "function GetContent() {\n return $this->content;\n }", "title": "" }, { "docid": "3adc9c6738cfb60b2acb36920546f73e", "score": "0.61938775", "text": "public function getContent () {\r\n\t\treturn ($this->content);\r\n\t}", "title": "" }, { "docid": "2b4875e50664cd55fdd9b2f1a90039c3", "score": "0.61780936", "text": "public function getContent(){\n\t\treturn $this->content;\n\t}", "title": "" }, { "docid": "ef191117aee29f343804d605cf52a20a", "score": "0.6177537", "text": "public function getContent()\n {\n return $this->_content;\n }", "title": "" }, { "docid": "ef191117aee29f343804d605cf52a20a", "score": "0.6177537", "text": "public function getContent()\n {\n return $this->_content;\n }", "title": "" }, { "docid": "ef191117aee29f343804d605cf52a20a", "score": "0.6177537", "text": "public function getContent()\n {\n return $this->_content;\n }", "title": "" }, { "docid": "8a2d624cf3010e993b34464661198813", "score": "0.6175562", "text": "public function getContent()\n {\n if (empty($this->_content)) {\n $this->_content = file_get_contents($this->_path);\n }\n return $this->_content;\n }", "title": "" }, { "docid": "46c00fde100ce9cd0d8223d577c468ef", "score": "0.61577797", "text": "public function getContents()\n {\n return $this->getParsedown()->text($this->contents);\n }", "title": "" }, { "docid": "a3a6e54103b69556f0b07503ad7b6d57", "score": "0.61533237", "text": "public static function xml($content)\r\n {\r\n return $content;\r\n }", "title": "" }, { "docid": "95dee2f410db9d9b3b23e19264329d75", "score": "0.6151815", "text": "public function get_content() { return $this->content; }", "title": "" }, { "docid": "27b9394aa3cbdfbc5e3dbdc1e8ee4a00", "score": "0.6147241", "text": "public function getContent()\n {\n return $this->contentFile ? file_get_contents($this->contentFile) : $this->content;\n }", "title": "" }, { "docid": "e9d37a3eaac33bd89cbfed59c7662082", "score": "0.6147164", "text": "public function getContent ()\n {\n return $this->content;\n }", "title": "" }, { "docid": "1564a3d0aae15c9e3b90bcbaa5a345ae", "score": "0.6145648", "text": "public function getContent()\n {\n return file_get_contents($this->fullPath);\n }", "title": "" }, { "docid": "d4be07f09b15fcfd4a31f591be19c329", "score": "0.61278015", "text": "public function getXMLData();", "title": "" }, { "docid": "6688cd655205c49beb48e27fb3dcd30d", "score": "0.612355", "text": "public function document(): DOMDocument\n {\n $document = new DOMDocument();\n $document->loadXML($this->source());\n return $document;\n }", "title": "" }, { "docid": "9e4e398a61586b34e1d509b64436ee36", "score": "0.6109336", "text": "function getContent() {\n return $this->content;\n }", "title": "" }, { "docid": "861ac0c8a7660321d669c87072432af2", "score": "0.6094595", "text": "public function getDoc()\n {\n return $this->doc;\n }", "title": "" }, { "docid": "608be828de27b747f6c438b4d259e6b7", "score": "0.60905373", "text": "public function getContent() {\n return $this->get(self::CONTENT);\n }", "title": "" }, { "docid": "40d6366a45d2a96ce72869752cb87d0a", "score": "0.6090485", "text": "public function getXml() {\n\t\treturn $this->xml;\n\t}", "title": "" }, { "docid": "5de4bdc4aee831bfd4536dd28714e6e8", "score": "0.6090364", "text": "public function content()\n\t{\n\t\treturn $this->content_build;\n\t}", "title": "" }, { "docid": "55d0c888f54eff7af3b58ba89c91aea3", "score": "0.60802084", "text": "public function Content()\n {\n return $this->_Content;\n }", "title": "" }, { "docid": "4fb49db63870e2920fec9b157e2631d7", "score": "0.6077217", "text": "protected function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "8c4a12011ccd5a1826c67975c415c26c", "score": "0.6061932", "text": "private function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "4c7ea470814a326689d7d52a0be325b5", "score": "0.6061641", "text": "public function get() {\n\t\treturn $this->xmlObj;\n\t}", "title": "" }, { "docid": "767bc6a37cc814b6efeb76ec15fc7862", "score": "0.6056404", "text": "protected function getDocument() {\n\t\treturn $this->getVariable('document');\n\t}", "title": "" }, { "docid": "36ed1742cd841f5dabd96a9270ef3136", "score": "0.60559255", "text": "public function getXML(){\n \t\treturn simplexml_load_string($this->info);\n \t}", "title": "" }, { "docid": "ab8570ce1fb96ccc733fb3e378737f54", "score": "0.6051794", "text": "public function content()\n {\n return $this->content;\n }", "title": "" }, { "docid": "ab8570ce1fb96ccc733fb3e378737f54", "score": "0.6051794", "text": "public function content()\n {\n return $this->content;\n }", "title": "" }, { "docid": "ab8570ce1fb96ccc733fb3e378737f54", "score": "0.6051794", "text": "public function content()\n {\n return $this->content;\n }", "title": "" }, { "docid": "7d14af7a0918f3231e4f74ddadb6e8b7", "score": "0.60443026", "text": "public function build() {\n\t\treturn $this->document;\n\t}", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "03afe7271f0b7b4bf82971b383d759ec", "score": "0.60408217", "text": "public function getContent()\n {\n return $this->content;\n }", "title": "" }, { "docid": "6dd9c48446b26b0399431e5b91d2f2a4", "score": "0.60405964", "text": "public function getContents()\n\t{\n\t\treturn $this->contents;\n\t}", "title": "" }, { "docid": "32cc1ef765c0c6a42a8cf6d4338a0b12", "score": "0.60375917", "text": "public function getContent()\n {\n\n return $this->content;\n }", "title": "" }, { "docid": "8c2d948dde8a8df472556d8bbb5e1401", "score": "0.60345757", "text": "function get() {\n\t\t$xml = Show::all_xml();\n\t\tHeader('Content-type: text/xml');\n\t\techo $xml->asXML();\n\t}", "title": "" }, { "docid": "074be93725580432bfe21468fabfdaea", "score": "0.6031639", "text": "public function getContents()\n {\n return isset($this->contents) ? $this->contents : '';\n }", "title": "" }, { "docid": "c00ea1096f503353517ea4b2af45e089", "score": "0.6030329", "text": "public function asDom()\n {\n return $this->doc;\n }", "title": "" }, { "docid": "f4f2d697413406da53947bd77bff27ab", "score": "0.602768", "text": "public function getContent() {\n return $this->content;\n }", "title": "" }, { "docid": "f4f2d697413406da53947bd77bff27ab", "score": "0.602768", "text": "public function getContent() {\n return $this->content;\n }", "title": "" }, { "docid": "f4f2d697413406da53947bd77bff27ab", "score": "0.602768", "text": "public function getContent() {\n return $this->content;\n }", "title": "" }, { "docid": "f4f2d697413406da53947bd77bff27ab", "score": "0.602768", "text": "public function getContent() {\n return $this->content;\n }", "title": "" } ]
a9a8472476e65397035f0a2f6f9d1308
Return the delay period in seconds
[ { "docid": "0f474fbafd468a9ef445a0d7efcc818d", "score": "0.7272954", "text": "function get_timing_delay() {\n\n\t\t$timing_type = $this->get_timing_type();\n\n\t\tif ( ! in_array( $timing_type, array( 'delayed', 'scheduled' ) ) ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t$number = $this->get_timing_delay_number();\n\t\t$unit = $this->get_timing_delay_unit();\n\n\t\t$units = array(\n\t\t\t'm' => MINUTE_IN_SECONDS,\n\t\t\t'h' => HOUR_IN_SECONDS,\n\t\t\t'd' => DAY_IN_SECONDS,\n\t\t\t'w' => WEEK_IN_SECONDS,\n\t\t);\n\n\t\tif ( ! $number || ! isset( $units[ $unit ] ) ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn $number * $units[ $unit ];\n\t}", "title": "" } ]
[ { "docid": "c52eb70e3505a484928adc645d034f7c", "score": "0.7961656", "text": "public function getDelay();", "title": "" }, { "docid": "b92b54d13b257996078d9a86603e3ac8", "score": "0.7759588", "text": "public function getDelay(): int;", "title": "" }, { "docid": "1b57d48c6644a192c419cc1eecf13629", "score": "0.7534105", "text": "public function getDelay()\n\t{\n\t\treturn $this->delay;\n\t}", "title": "" }, { "docid": "ca36a34c203bb2c411a5585229ced6ca", "score": "0.750433", "text": "public function getDelay()\n {\n return $this->delay;\n }", "title": "" }, { "docid": "8b778791e5427b6fceca7cdb4f9274cb", "score": "0.7497676", "text": "public function delaySeconds()\n {\n $delayTo = $this->message->getProperty('delay_to');\n if (!is_null($delayTo)) {\n return intval($delayTo) - time();\n }\n\n return null;\n }", "title": "" }, { "docid": "2244935c5832b2e25886b8e762e18d14", "score": "0.72740793", "text": "function get_timing_delay() {\n\n\t\t$timing_type = $this->get_timing_type();\n\n\t\tif ( ! in_array( $timing_type, [ 'delayed', 'scheduled' ] ) ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t$number = $this->get_timing_delay_number();\n\t\t$unit = $this->get_timing_delay_unit();\n\n\t\t$units = [\n\t\t\t'm' => MINUTE_IN_SECONDS,\n\t\t\t'h' => HOUR_IN_SECONDS,\n\t\t\t'd' => DAY_IN_SECONDS,\n\t\t\t'w' => WEEK_IN_SECONDS\n\t\t];\n\n\t\tif ( ! $number || ! isset( $units[$unit] ) ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn $number * $units[$unit];\n\t}", "title": "" }, { "docid": "f0760f45107b8a9b66b1b0e0fde829b7", "score": "0.71668136", "text": "protected function get_sleep_seconds()\n {\n }", "title": "" }, { "docid": "f69884a74f69bcd4757c4d3082303b70", "score": "0.70818776", "text": "public function getPeriodSec()\n {\n return $this->period_sec;\n }", "title": "" }, { "docid": "7a59170d20c9409aca0dc921e29fe786", "score": "0.70212686", "text": "public function getCoolDownPeriodSec()\n {\n return isset($this->cool_down_period_sec) ? $this->cool_down_period_sec : 0;\n }", "title": "" }, { "docid": "cf524062b1b33dd64865e0bbe52414a9", "score": "0.69256413", "text": "function delayVal() {\n\tstatic $n = 4000; // starts after\n\t\n\t$n += 3000; // increments by\n\treturn $n;\n}", "title": "" }, { "docid": "4aa7d88951c6db3b95e6cc76d5ca1f81", "score": "0.68030566", "text": "public function getDelayedTime()\n {\n $packet = $this->getPacket();\n\n if ($packet['delayed'] > 0) {\n return $packet['delayed'];\n }\n\n return -1;\n }", "title": "" }, { "docid": "5a07b8cb3b1f71d5f6025f8c070a122f", "score": "0.66136885", "text": "private function get_update_sleep_time() {\n //f(x) = 2 / (1 + e^(-x + 5)) + 1\n $denominator = 1 + pow(2.72, $this->numUpdates * -1 + 5);\n $updateTime = (2 / $denominator) + 1;\n $this->numUpdates += 1;\n return intval($updateTime * 1000000);\n //return self::UPDATE_SLEEP_TIME\n }", "title": "" }, { "docid": "d7107630172e8fbd6c807c4f813d242c", "score": "0.66130114", "text": "private static function calculateDelay($val) {\r\n\t\t// Defensive programming\r\n\t\t$count = $val['count'];\r\n\t\t$count = $count < 1 ? 1 : $count;\r\n\t\t$count = $count > self::THOTTLE_MAX_COUNT ? self::THOTTLE_MAX_COUNT : $count;\r\n\r\n\t\treturn self::THROTTLE_TIME + self::THROTTLE_TIME * ($count - 1) * self::THROTTLE_FACTOR;\r\n\t}", "title": "" }, { "docid": "65c2bb27d4dd8d4ce5c6a1989b23cfc1", "score": "0.6605071", "text": "public function getScheduledDelay()\n {\n return $this->scheduledDelay;\n }", "title": "" }, { "docid": "711d00b697da197b75369f97c8534ae8", "score": "0.66026205", "text": "public function getSleepTime() {\n return $this->sleepTime;\n }", "title": "" }, { "docid": "33413751ea3d2194388732584d389d7a", "score": "0.65499413", "text": "protected function getSeconds($delay)\n {\n\n if ($delay instanceof DateTime) {\n\n return max(0, $delay->getTimestamp() - $this->getTime());\n\n } elseif ($delay instanceof \\Carbon\\Carbon) {\n\n return max(0, $delay->timestamp - $this->getTime());\n\n } elseif (isset($delay['date'])) {\n\n $time = strtotime($delay['date']) - $this->getTime();\n\n return $time;\n\n } else {\n\n $delay = strtotime($delay) - time();\n }\n\n return (int)$delay;\n }", "title": "" }, { "docid": "9a52560b3c35d5746a0fd4d801a759ab", "score": "0.64978683", "text": "public function getDurationSec()\n\t{\n\t\treturn $this->getDtend()->getTimestamp() - $this->getDtstart()->getTimestamp();\n\t}", "title": "" }, { "docid": "eeb073f9c44773262efa42a0dc5bf103", "score": "0.64550227", "text": "public function getRetryDurationSec()\n {\n return isset($this->retry_duration_sec) ? $this->retry_duration_sec : 0;\n }", "title": "" }, { "docid": "e29931ab031c1238165591844819b8b6", "score": "0.6410295", "text": "public function get_duration();", "title": "" }, { "docid": "b25844ae06249b2ee661f1b0f2c32de7", "score": "0.63679814", "text": "public function getDuration() {}", "title": "" }, { "docid": "0eed1a1bf5ada1380d812e2fd3915cc5", "score": "0.63440514", "text": "public function getTimeoutSec()\n {\n return isset($this->timeout_sec) ? $this->timeout_sec : 0;\n }", "title": "" }, { "docid": "eb702ec5a70fcefcd66bcb3b635e1292", "score": "0.6281752", "text": "public function RateLimitSeconds(){\t\n\t$CurTime = time();//get current time\n\t$RateLimitPeriod=$this->RateLimitPeriodEnd-$CurTime;//determine seconds left in rate limit period\n\treturn (($RateLimitPeriod<0)? 0: $RateLimitPeriod);//return seconds remaining in rate limit period\n\t}", "title": "" }, { "docid": "cf99429d1d652017cbf28c1b65d56f71", "score": "0.6253981", "text": "public function pauseTimeLeft()\n {\n return $this->get('pause-time-left', 0);\n }", "title": "" }, { "docid": "4aacc7fc81d39adc41a818b7b8dcef7e", "score": "0.6252082", "text": "public static function milliseconds() {}", "title": "" }, { "docid": "00875ac9885f00d8610a40a45c37cc51", "score": "0.6247102", "text": "public function getDuration();", "title": "" }, { "docid": "00875ac9885f00d8610a40a45c37cc51", "score": "0.6247102", "text": "public function getDuration();", "title": "" }, { "docid": "e084760855a39444244519d0c02fab13", "score": "0.6144101", "text": "public function getDurationPeriod()\n {\n return $this->durationPeriod;\n }", "title": "" }, { "docid": "567b04dfbad19b0aa3230ff033d78799", "score": "0.61354905", "text": "public function displayDelay( $delay ) {\n\n if ( $this->options->showDelayAs == PMPRO_SEQ_AS_DATE) {\n // Convert the delay to a date\n\n $memberDays = round(pmpro_getMemberDays(), 0);\n\n $delayDiff = ($delay - $memberDays);\n\t $this->dbgOut('displayDelay() - Delay: ' .$delay . ', memberDays: ' . $memberDays . ', delayDiff: ' . $delayDiff);\n\n return strftime('%x', strtotime(\"+\" . $delayDiff .\" days\"));\n }\n\n return $delay; // It's stored as a number, not a date\n\n }", "title": "" }, { "docid": "c0744026f36f11064c6cedf5ae7ddcc2", "score": "0.6104585", "text": "public function getTimeout();", "title": "" }, { "docid": "c0744026f36f11064c6cedf5ae7ddcc2", "score": "0.6104585", "text": "public function getTimeout();", "title": "" }, { "docid": "c0744026f36f11064c6cedf5ae7ddcc2", "score": "0.6104585", "text": "public function getTimeout();", "title": "" }, { "docid": "c0744026f36f11064c6cedf5ae7ddcc2", "score": "0.6104585", "text": "public function getTimeout();", "title": "" }, { "docid": "9d8ef4fef756cbf273deff485639b678", "score": "0.60418755", "text": "public function getSleep()\n {\n return $this->sleep;\n }", "title": "" }, { "docid": "d8630f9cd4cac0f26e492f69619bdac0", "score": "0.601874", "text": "public function getDurationSeconds()\n {\n return ($this->batch->getDuration($this->name, 'start') / 1000);\n }", "title": "" }, { "docid": "5aa3af7fd4a81abdd91e53198edd73d2", "score": "0.60107434", "text": "public function getTimeout(): int;", "title": "" }, { "docid": "5aa3af7fd4a81abdd91e53198edd73d2", "score": "0.60107434", "text": "public function getTimeout(): int;", "title": "" }, { "docid": "b13b37ee89127112bb9f661d039c42f8", "score": "0.60082895", "text": "public function cooldownSeconds(): int\n {\n return 0;\n }", "title": "" }, { "docid": "1298e4e138f013b24f8da0a6e1b9c865", "score": "0.60056794", "text": "public function getWaitTime()\n\t{\n\t\t$createTime = new DateTime($this->time_created);\n\t\t$startTime = new DateTime($this->time_started);\n\t\t$interval = $createTime->diff($startTime);\n\n\t\t$waitTime = ($interval->days * 24 * 3600) + ($interval->h * 3600) + ($interval->i * 60) + ($interval->s);\n\t\treturn $waitTime;\n\t}", "title": "" }, { "docid": "2a09b688840d8ff5991e4117a93cb243", "score": "0.60017043", "text": "public function getTimeoutMs()\n {\n return $this->timeout_ms;\n }", "title": "" }, { "docid": "c0d36217b0d94d417c93adab7ef3b6dd", "score": "0.5994342", "text": "public function getDurationInSecond(){\r\n\t\t$duration = ($this->enddate - $this->startdate);\r\n\t\treturn $duration;\r\n\t}", "title": "" }, { "docid": "e8e5df672d51b03400fa7771f5b6572d", "score": "0.5992613", "text": "function getRemainingDelay($ip)\n\t{\n\t\t$sql \t= \" select time_to_sec(timediff(now(), delayFrameStart))/60 as delayFrameMin from ( \"\n\t\t\t\t. \" select max(lastAttempt) as delayFrameStart from `blockedIPs` where ip = ? \"\n\t\t\t\t. \" and lastAttempt > Date_sub(Now(), Interval \".LOGIN_FAILS_TIMEOUT_MIN.\" Minute) \"\n\t\t\t\t. \" ) as maxLastAttempt \";\n\t\t$result = $this->sqlQueryArray($sql, array($ip));\n\t\t\n\t\tif(count($result) == 0)\n\t\t\t$remaining_delay = '0';\n\t\telse\n\t\t{\n\t\t\t$roundedDiff = round(LOGIN_FAILS_TIMEOUT_MIN - $result[0]->delayFrameMin);\n\t\t\tif($roundedDiff == 0)\n\t\t\t\t$remaining_delay = 'less than 1 minute';\n\t\t\telse\n\t\t\t\t$remaining_delay = 'approximately '.$roundedDiff.' minute(s)';\n\t\t}\n\t\t\n\n\t\treturn $remaining_delay;\n\t}", "title": "" }, { "docid": "89746b49f74ffb215f3501c52dbc50ac", "score": "0.5988984", "text": "public function duration()\r\n\t{\r\n\t\treturn !$this->_start ? 0 : ($this->_end ? $this->_end - $this->_start : microtime(true) - $this->_start);\r\n\t}", "title": "" }, { "docid": "9571d5cef8fadecedc7509280d47cfe9", "score": "0.59816027", "text": "public function getDuration() {\n $seconds = $this->getSeconds();\n $this->duration = sprintf('%s %02d:%02d:%02d', ((($seconds/86400%60) !== 0) ? ($seconds/86400%60) . 'd' : ''), ($seconds/3600%24),($seconds/60%60), $seconds%60);\n return $this->duration;\n }", "title": "" }, { "docid": "978d717ca3843e0784c224285fc615a5", "score": "0.59759915", "text": "public function getTimeLimit(): float\n {\n return $this->time;\n }", "title": "" }, { "docid": "910c1b7c94477bb13d768e3d82db9c19", "score": "0.59708166", "text": "public static function GetUserDelay($wU_id){\n\t\t$wUser = Database::safeQuery(\"SELECT rating FROM users WHERE u_id=$wU_id;\")->fetch_assoc();\n\t\t$oRatingDelay = (750 * pow(M_E,(-0.1609438*$wUser['rating'])) )-150;\n\t\treturn floor($oRatingDelay);\n\t}", "title": "" }, { "docid": "f76b33e639231c563349ea4d6e01a269", "score": "0.59690154", "text": "public function duration()\n\t{\n\t\treturn $this->CLI->stringQuery($this->SqueezePlyrID.\" duration ?\");\n\t}", "title": "" }, { "docid": "1a1f6f937c4b240d5a9e8cb6c8e2cb0c", "score": "0.59578985", "text": "public function getSearchDelay(): int {\n\t\treturn (int)$this->_getConfig('searchDelay');\n\t}", "title": "" }, { "docid": "33915141e4cc3fc8f5ff04d34c0ac965", "score": "0.594636", "text": "public static function GetWaitTime() {\n return self::$waitTime;\n }", "title": "" }, { "docid": "bb7da47d4939eb072a4e10d1ecacbeaa", "score": "0.59443086", "text": "public function getDurationSeconds()\n {\n return $this->duration_seconds;\n }", "title": "" }, { "docid": "dabfd82a73cca927dc32bacb9a5906f7", "score": "0.59229726", "text": "public function getWaitTime()\n {\n return $this->waitTime;\n }", "title": "" }, { "docid": "772b1cb8b20b29331b77892ff8933675", "score": "0.5919434", "text": "public function getTimeout(): float|false;", "title": "" }, { "docid": "a48f12361ea557c66aae20b116d73f30", "score": "0.59155446", "text": "public function get_duration() {\n\t\t$a = explode (' ',microtime()); \n \t$this->stop_time = (double) $a[0] + $a[1];\n \t$this->duration = number_format(($this->stop_time - $this->start_time),2);\n\n\t\treturn sprintf('<h2>%s</h2><div class=\"summarize-posts-errors\">%s</div>'\n\t\t\t, __('Execution Time', CCTM_TXTDOMAIN)\n\t\t\t, sprintf(__('%s seconds', CCTM_TXTDOMAIN), $this->duration));\n\t}", "title": "" }, { "docid": "3708bf1ca6799af437f210b418554f97", "score": "0.5909638", "text": "public function getTimeout() {}", "title": "" }, { "docid": "4105af1004bac6ea546cae38e48c3253", "score": "0.5909266", "text": "function period2seconds($period_name,$span) {\n\tif (!$period_name || $period_name==\"lifespan\") {\n\t\treturn \"\";\n\t}\n\n\tif (!is_int ($span) || !$span) $span=1;\n\n\tif ($period_name==\"day\") {\n\t\treturn 60*60*24*$span;\n\t} elseif ($period_name==\"week\") {\n\t\treturn 60*60*24*7*$span;\n\t} elseif ($period_name==\"month\") {\n\t\treturn 60*60*24*30*$span;\n\t} elseif ($period_name==\"year\") {\n\t\treturn 60*60*24*365*$span;\n\t} else {\n\t\treturn $span;\n\t}\n}", "title": "" }, { "docid": "9309690820c9d56cfdc9e619d560cde1", "score": "0.5862114", "text": "public static final function duration() { }", "title": "" }, { "docid": "1c620ea1ee8c617b9df35b163e11e51c", "score": "0.5853362", "text": "public function getDuration() {\n $interval = $this->getBeginning()->diff($this->getEnd());\n return $interval->m + $interval->y * 12 + 1;\n }", "title": "" }, { "docid": "2a952452f005943411953471b12b3e15", "score": "0.5832376", "text": "public function lockSeconds()\n {\n return $this->type->lock_seconds;\n }", "title": "" }, { "docid": "1d93e4191315fef8cc46aaf2c03f6650", "score": "0.5821071", "text": "public function getTimeout(): float\n {\n return $this->client->getTimeout();\n }", "title": "" }, { "docid": "49329409e2e9426de2aaab1a6740d291", "score": "0.5815942", "text": "public function get_time_limit_in_seconds(): int {\n\t\t/**\n\t\t * Filters the lesson time limit in seconds.\n\t\t *\n\t\t * @since 4.6.0\n\t\t *\n\t\t * @param int $time_limit_in_seconds The lesson time limit in seconds.\n\t\t * @param Lesson $lesson The lesson model.\n\t\t *\n\t\t * @ignore\n\t\t */\n\t\treturn apply_filters(\n\t\t\t'learndash_model_lesson_time_limit',\n\t\t\t$this->get_time_limit_in_seconds_from_trait(),\n\t\t\t$this\n\t\t);\n\t}", "title": "" }, { "docid": "220254c00bf1ed66df209c6171d5f1eb", "score": "0.58052695", "text": "public function showDelay()\n {\n global $conf, $langs;\n\n if (empty($this->date_delivery) && ! empty($this->date_livraison)) $this->date_delivery = $this->date_livraison; // For backward compatibility\n\n if (empty($this->date_delivery)) $text=$langs->trans(\"OrderDate\").' '.dol_print_date($this->date_commande, 'day');\n else $text=$text=$langs->trans(\"DeliveryDate\").' '.dol_print_date($this->date_delivery, 'day');\n $text.=' '.($conf->commande->fournisseur->warning_delay>0?'+':'-').' '.round(abs($conf->commande->fournisseur->warning_delay)/3600/24, 1).' '.$langs->trans(\"days\").' < '.$langs->trans(\"Today\");\n\n return $text;\n }", "title": "" }, { "docid": "112f92286ddd16e530ef90383e4bd611", "score": "0.58031785", "text": "public function getTimeDifference(): float\n {\n return $this->timerStop - $this->timerStart;\n }", "title": "" }, { "docid": "5afba2aac8807e664676c47b9f3bbb8e", "score": "0.57999754", "text": "public function getDuration()\n\t{\n\t\treturn $this->duration;\n\t}", "title": "" }, { "docid": "c671d319b720b3eab50322dcb7362fd5", "score": "0.5788364", "text": "public function getGracePeriod(): int {\r\n return $this->gracePeriod;\r\n }", "title": "" }, { "docid": "e264bf5e084ad7a14ced3f8e760d9fb7", "score": "0.5784365", "text": "public function getDuration()\n {\n return $this->duration;\n }", "title": "" }, { "docid": "e264bf5e084ad7a14ced3f8e760d9fb7", "score": "0.5784365", "text": "public function getDuration()\n {\n return $this->duration;\n }", "title": "" }, { "docid": "e264bf5e084ad7a14ced3f8e760d9fb7", "score": "0.5784365", "text": "public function getDuration()\n {\n return $this->duration;\n }", "title": "" }, { "docid": "e264bf5e084ad7a14ced3f8e760d9fb7", "score": "0.5784365", "text": "public function getDuration()\n {\n return $this->duration;\n }", "title": "" }, { "docid": "e264bf5e084ad7a14ced3f8e760d9fb7", "score": "0.5784365", "text": "public function getDuration()\n {\n return $this->duration;\n }", "title": "" }, { "docid": "e264bf5e084ad7a14ced3f8e760d9fb7", "score": "0.5784365", "text": "public function getDuration()\n {\n return $this->duration;\n }", "title": "" }, { "docid": "e264bf5e084ad7a14ced3f8e760d9fb7", "score": "0.5784365", "text": "public function getDuration()\n {\n return $this->duration;\n }", "title": "" }, { "docid": "e264bf5e084ad7a14ced3f8e760d9fb7", "score": "0.5784365", "text": "public function getDuration()\n {\n return $this->duration;\n }", "title": "" }, { "docid": "0384292c3139b1fac1c0d448a84a331a", "score": "0.57735294", "text": "public function getDuration() {\n\t\treturn $this->duration;\n\t}", "title": "" }, { "docid": "d128bb3af468f56485dcaced87815885", "score": "0.5767195", "text": "public function getIntervalTime();", "title": "" }, { "docid": "4d599211e95d61cd12f64acd580362e8", "score": "0.5757922", "text": "protected function get_default_delay() : string {\n\t\t$delay_options = $this->get_delay_options();\n\t\treturn $delay_options[ siteorigin_panels_setting( self::OPTION_FIELD_DELAY ) ] ?? '';\n\t}", "title": "" }, { "docid": "d57a6ffaed907b5660f5166c1932002a", "score": "0.5750504", "text": "public function getDuration()\n\t{\n\n\t\treturn $this->duration;\n\t}", "title": "" }, { "docid": "66e3af6e116702f259dfa89c57024644", "score": "0.5739868", "text": "public function getDuration() {\n return $this->duration;\n }", "title": "" }, { "docid": "0a548252a44ceb810e543cbbed11ebd8", "score": "0.5732375", "text": "private function get_time_interval() {\n if ($this->microtime_start === null) {\n $this->microtime_start = microtime(true);\n return 0.0;\n }\n $now = microtime(true);\n $dif = $now - $this->microtime_start;\n $this->microtime_start = $now;\n return $dif;\n }", "title": "" }, { "docid": "c4bb499d943c8589fc473bdb66c77242", "score": "0.5731642", "text": "function time_sleep_until ($timestamp) {}", "title": "" }, { "docid": "a08ab03ab6fc3b04e49c114314e5cb19", "score": "0.57212603", "text": "public function getRedirectDelay()\n {\n return parent::getData(self::FIELD_REDIRECT_DELAY);\n }", "title": "" }, { "docid": "3f2f7d95f54d22209186cf519db47390", "score": "0.5709116", "text": "public function getTimeout()\n\t{\n\t\treturn $this->timeout;\n\t}", "title": "" }, { "docid": "3f2f7d95f54d22209186cf519db47390", "score": "0.5709116", "text": "public function getTimeout()\n\t{\n\t\treturn $this->timeout;\n\t}", "title": "" }, { "docid": "3f2f7d95f54d22209186cf519db47390", "score": "0.5709116", "text": "public function getTimeout()\n\t{\n\t\treturn $this->timeout;\n\t}", "title": "" }, { "docid": "b7fa0fb5e179533cb72051fe00e09f38", "score": "0.5705267", "text": "public function getElapsedSecs();", "title": "" }, { "docid": "d8296db40454cff424329fe5215182f1", "score": "0.5701697", "text": "private function get_time_interval() {\n if ($this->microtime_start === null) {\n $this->microtime_start = microtime(true);\n return 0.0;\n }\n $now = microtime(true);\n $dif = $now - $this->microtime_start;\n $this->microtime_start = $now;\n\n return $dif;\n }", "title": "" }, { "docid": "b419f528fb0ddaeef186eb9353af5213", "score": "0.57005507", "text": "public function getDuration()\n {\n $this->initialRequest();\n if (isset($this->item['contentDetails']['duration'])) {\n\n $date = new \\DateInterval($this->item['contentDetails']['duration']);\n $ret = 0;\n $ret += (int)$date->format('%d') * 86400;\n $ret += (int)$date->format('%h') * 3600;\n $ret += (int)$date->format('%i') * 60;\n $ret += (int)$date->format('%s');\n return $ret;\n }\n else {\n $this->onApiBadInterpretation(\"contentDetails.duration not found\");\n }\n }", "title": "" }, { "docid": "b8d6586bcf189bf14bde965fdcf9b340", "score": "0.5698858", "text": "public function get_duration()\n {\n return $this->_duration;\n }", "title": "" }, { "docid": "626e396edad615d5b4f1405511f33adc", "score": "0.5693534", "text": "public function getTimeout()\n {\n return $this->get(self::_TIMEOUT);\n }", "title": "" }, { "docid": "295a06395b4d31af466bea9d14ffb084", "score": "0.56923836", "text": "public function getPeriod() : int\n {\n return $this->period;\n }", "title": "" }, { "docid": "d4d853758f3383ceb73797715678dd44", "score": "0.5687509", "text": "public function getTimeOut()\n {\n return (int) $this->timeOut;\n }", "title": "" }, { "docid": "d4d853758f3383ceb73797715678dd44", "score": "0.5687509", "text": "public function getTimeOut()\n {\n return (int) $this->timeOut;\n }", "title": "" }, { "docid": "d4d853758f3383ceb73797715678dd44", "score": "0.5687509", "text": "public function getTimeOut()\n {\n return (int) $this->timeOut;\n }", "title": "" }, { "docid": "41cc1e6c5b5bdd159baf249e457727c7", "score": "0.5687343", "text": "public function getTimeout()\n {\n return $this->timeout;\n }", "title": "" }, { "docid": "41cc1e6c5b5bdd159baf249e457727c7", "score": "0.5687343", "text": "public function getTimeout()\n {\n return $this->timeout;\n }", "title": "" }, { "docid": "41cc1e6c5b5bdd159baf249e457727c7", "score": "0.5687343", "text": "public function getTimeout()\n {\n return $this->timeout;\n }", "title": "" }, { "docid": "41cc1e6c5b5bdd159baf249e457727c7", "score": "0.5687343", "text": "public function getTimeout()\n {\n return $this->timeout;\n }", "title": "" }, { "docid": "41cc1e6c5b5bdd159baf249e457727c7", "score": "0.5687343", "text": "public function getTimeout()\n {\n return $this->timeout;\n }", "title": "" }, { "docid": "41cc1e6c5b5bdd159baf249e457727c7", "score": "0.5687343", "text": "public function getTimeout()\n {\n return $this->timeout;\n }", "title": "" }, { "docid": "41cc1e6c5b5bdd159baf249e457727c7", "score": "0.5687343", "text": "public function getTimeout()\n {\n return $this->timeout;\n }", "title": "" }, { "docid": "01c228339b224e62f880cc67dfeea67b", "score": "0.5687115", "text": "public function getTimeout()\n {\n return isset($this->timeout) ? $this->timeout : 0;\n }", "title": "" }, { "docid": "fa9dd82ae0b8093ebaffb62dabbc7cff", "score": "0.5676509", "text": "public function getRetryAfter() : int\n {\n return $this->retryAfter;\n }", "title": "" } ]
2459d8a86de86c031eb963756a9fd43f
Adds amount to existing amount and returns a new MoneyInterface.
[ { "docid": "88361d71447012848337ae4b85386309", "score": "0.7232579", "text": "public function add(self $money): self;", "title": "" } ]
[ { "docid": "4be72f595e32efadad15df30da125a73", "score": "0.7789642", "text": "public function add(MoneyInterface $other): MoneyInterface\n {\n $this->guardCurrencyMismatch($other);\n return new self($this->getAmount() + $other->getAmount(), $this->getCurrency());\n }", "title": "" }, { "docid": "ac3c3396fba8309ea331b8210b2dfdfb", "score": "0.76160216", "text": "public function add(MoneyInterface $other);", "title": "" }, { "docid": "fb3fb9400023b2423e834935f604563d", "score": "0.70603085", "text": "public function add(MoneyInterface $money);", "title": "" }, { "docid": "801c7669af6f32f0738b38add7fe1278", "score": "0.70304483", "text": "public function add(Money $money){\n $this->money=$this->money->add($money->instance());\n return $this;\n }", "title": "" }, { "docid": "8edc67714b12a4a330bf076cd16b8bb3", "score": "0.68003136", "text": "public function add(\n MoneyInterface $money,\n string $amount,\n string $targetCurrency = MoneyInterface::CURRENCY_EURO\n ): MoneyInterface;", "title": "" }, { "docid": "101495a52739e15b595eb60252f0337b", "score": "0.6754863", "text": "public function withAmount($value)\n {\n $this->setAmount($value);\n return $this;\n }", "title": "" }, { "docid": "e502170d576d7ce14bcfe13b88e15997", "score": "0.6667499", "text": "public function add(Amount $amount, $precision = -1)\n {\n $this->validateCurrency($amount);\n return parent::add($amount, $precision);\n }", "title": "" }, { "docid": "c58661f9b346e00486249ae4ac57c449", "score": "0.6205502", "text": "public function add(Adjustment $adjustment) : Adjustment {\n $this->assertSameType($adjustment);\n $this->assertSameSourceId($adjustment);\n $definition = [\n 'amount' => $this->amount->add($adjustment->getAmount()),\n ] + $this->toArray();\n\n return new static($definition);\n }", "title": "" }, { "docid": "e36d0be9c551046bdf0ebde36d715d74", "score": "0.6172863", "text": "public function setAmount($amount)\n {\n $this->amount = $amount;\n return $this;\n }", "title": "" }, { "docid": "e36d0be9c551046bdf0ebde36d715d74", "score": "0.6172863", "text": "public function setAmount($amount)\n {\n $this->amount = $amount;\n return $this;\n }", "title": "" }, { "docid": "e36d0be9c551046bdf0ebde36d715d74", "score": "0.6172863", "text": "public function setAmount($amount)\n {\n $this->amount = $amount;\n return $this;\n }", "title": "" }, { "docid": "e36d0be9c551046bdf0ebde36d715d74", "score": "0.6172863", "text": "public function setAmount($amount)\n {\n $this->amount = $amount;\n return $this;\n }", "title": "" }, { "docid": "3c2ed57766f092f869ca4129d4296578", "score": "0.6147649", "text": "public function setAmount($amount)\n {\n $this->amount = $amount;\n\n return $this;\n }", "title": "" }, { "docid": "3c2ed57766f092f869ca4129d4296578", "score": "0.6147649", "text": "public function setAmount($amount)\n {\n $this->amount = $amount;\n\n return $this;\n }", "title": "" }, { "docid": "a25e9b1f4cf508f1a8f68b745852f62c", "score": "0.61201406", "text": "public function setAmount($value)\n {\n $this->_fields['Amount']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "381493287806a399de205abed0164cd7", "score": "0.61018896", "text": "public function setAmount(Amount $amount)\n {\n return $this->set('amount', $amount);\n }", "title": "" }, { "docid": "76743755d2a19e71ca7ae23879cd0272", "score": "0.5983686", "text": "public function amount(string $amount): self\n {\n $this->transaction->data['amount'] = $amount;\n\n return $this;\n }", "title": "" }, { "docid": "16ba8bb6fc032e9fe454941cfb763fe8", "score": "0.5928844", "text": "public function setAmount($value)\n {\n return $this->set('Amount', $value);\n }", "title": "" }, { "docid": "21c24f7923b25aca65b1d01cf5ce4369", "score": "0.5822815", "text": "public function setAmount($amount);", "title": "" }, { "docid": "fc53047a03df14104f4e3399238fd0db", "score": "0.58191264", "text": "function add($amount) {\r\n // cheching if there is a row , otherwise creating it\r\n $this->db->select('*')\r\n ->from('cash')\r\n ->where('id_cash', 1)\r\n ->get()\r\n ->result() or\r\n $this->db->query(\"INSERT INTO `cash` \r\n (`id_cash`, `total_in`, `total_out`, `balance`) \r\n VALUES (1, '0', '0', '0');\");\r\n\r\n $sql = \"UPDATE `cash` SET \r\n `total_in` = `total_in`+'$amount', \r\n `balance` = `balance`+'$amount' \r\n WHERE `cash`.`id_cash` = 1;\";\r\n $this->db->query($sql);\r\n $this->load->model('misc/Master_reconcillation_model');\r\n $this->Master_reconcillation_model->add_cash($amount);\r\n return TRUE;\r\n }", "title": "" }, { "docid": "edd88fe8450bd068dbea440672d3f798", "score": "0.5809398", "text": "public function money() : MoneyFieldBuilder\n {\n return new MoneyFieldBuilder($this->field->type(new MoneyType()));\n }", "title": "" }, { "docid": "b8fda37c57028946638898b271822c50", "score": "0.5762466", "text": "public function setAmount(?int $amount): self\n {\n $this->amount = $amount;\n\n return $this;\n }", "title": "" }, { "docid": "b8fda37c57028946638898b271822c50", "score": "0.5762466", "text": "public function setAmount(?int $amount): self\n {\n $this->amount = $amount;\n\n return $this;\n }", "title": "" }, { "docid": "b8fda37c57028946638898b271822c50", "score": "0.5762466", "text": "public function setAmount(?int $amount): self\n {\n $this->amount = $amount;\n\n return $this;\n }", "title": "" }, { "docid": "e329bed0c5e346435dbfd168bcc79da3", "score": "0.5752105", "text": "public function getAmountMoney(): Money\n {\n return $this->amountMoney;\n }", "title": "" }, { "docid": "18c75fce4132c6fdaf77c7e34e2b4032", "score": "0.57389337", "text": "public function setAmount(float $amount) : self\n {\n $this->amount = $amount;\n return $this;\n }", "title": "" }, { "docid": "edd376f92d161ed3a1926aa73d9724b4", "score": "0.5731458", "text": "public function add($sku_id, $amount)\n {\n $user = Auth::user();\n // 從資料庫中查詢該商品是否已經在購物車中\n if ($item = $user->cartItems()->where('product_sku_id', $sku_id)->first()) {\n // 如果存在則直接疊加商品數量\n $item->update([\n 'amount' => $item->amount + $amount,\n ]);\n } else {\n // 否則創建一個新的購物車記錄\n $item = new CartItem(['amount' => $amount]);\n $item->user()->associate($user);\n $item->productSku()->associate($sku_id);\n $item->save();\n }\n\n return $item;\n }", "title": "" }, { "docid": "cc54bb4dd3cd746c9f580c6eef23410c", "score": "0.5704932", "text": "public function amount($amount = null)\n {\n if (is_null($amount)) {\n return $this->amount;\n }\n\n $this->amount = $amount;\n return $this;\n }", "title": "" }, { "docid": "3af769251f637e8846b477d5c06883e1", "score": "0.56968313", "text": "public function add0($other) {\n return new self(bcadd($this->num, $other instanceof parent ? $other->num : $other, 0));\n }", "title": "" }, { "docid": "e76eb8c70ba454176035827c09795207", "score": "0.5643651", "text": "public function setAmount($amount)\n {\n return $this->setData(self::AMOUNT, $amount);\n }", "title": "" }, { "docid": "2abc7ee95cb0bf1612a49dedbde4740e", "score": "0.56434184", "text": "public function addToAccount($account_id, $amount)\n\t{\n\t\t$account = Account::where('id', $account_id)->first();\n\t\t$new_amount = $account->amount + $amount;\n\n\t\t$account = Account::where('id', $account_id)->update(['amount' => $new_amount]);\n\t}", "title": "" }, { "docid": "b437a613677cd866dff45eb0130393f5", "score": "0.562827", "text": "public function setMoney($money)\n {\n $this->money = $money;\n\n return $this;\n }", "title": "" }, { "docid": "28f880f1360895eb3cedf51ca4d94a5d", "score": "0.56135225", "text": "public function setAmount(? int $amount) : Commission\n {\n $this->amount = $amount;\n\n return $this;\n }", "title": "" }, { "docid": "1131b0d3b2d8530ed6955e9eb2919a08", "score": "0.56081706", "text": "public function setAmount($Amount) {\n $this->Amount = $Amount;\n\n return $this;\n }", "title": "" }, { "docid": "196f9fa3a278a39a113966b7eca9ba6d", "score": "0.55432945", "text": "public function updateAmount($amount)\n {\n $this->amount = $this->amount + ($amount);\n $this->update();\n }", "title": "" }, { "docid": "6ab56b094a5621ad229a459a58468c52", "score": "0.55363536", "text": "public function addPaymentMethod(PaymentMethodInterface $method, Money $amount = null);", "title": "" }, { "docid": "f6d756997856aa009d0b35e26e5ed95d", "score": "0.5529131", "text": "public function setMoney($value)\r\n {\r\n return $this->set(self::MONEY, $value);\r\n }", "title": "" }, { "docid": "c600fccdcb8aff469b9357d191e06c5c", "score": "0.5515214", "text": "public function setAmount(float $amount)\n {\n $this->amount = $amount;\n return $this;\n }", "title": "" }, { "docid": "2c073e9acd8c85668ba3813891e7983a", "score": "0.5514163", "text": "public function amount(float $amount)\n {\n return $this->setAttribute('amount', $amount);\n }", "title": "" }, { "docid": "10bbafb9416405e06a8110c28839d1ae", "score": "0.54800034", "text": "public function setAmount(?FHIRQuantity $amount = null): object\n\t{\n\t\t$this->_trackValueSet($this->amount, $amount);\n\t\t$this->amount = $amount;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "3e83247bd11d3b301f4a1227e081153a", "score": "0.54783183", "text": "public function setAmount($var)\n {\n GPBUtil::checkInt64($var);\n $this->amount = $var;\n\n return $this;\n }", "title": "" }, { "docid": "bf1e1a5e88e9d2ef4e7b3ab0aaab22fa", "score": "0.5477081", "text": "public function setAmount(\\NOKA\\PHPUBL\\UBL\\Common\\BasicComponents\\Amount $amount)\n {\n $this->amount = $amount;\n return $this;\n }", "title": "" }, { "docid": "e05612a434a5ec224d9126e7d82e1747", "score": "0.54663134", "text": "public function add($value) {\n $this->offsetSet(NULL, $value);\n return $this;\n }", "title": "" }, { "docid": "d252ae11462164343a52890ad0390097", "score": "0.54526556", "text": "function add_item_stock($item,$amount) {\n $item = \\Model\\Item::find($item);\n $item->stock += $amount;\n $item->save();\n \n return $item->stock;\n }", "title": "" }, { "docid": "d761c2e5f950bac94d3993dd30c7319a", "score": "0.54518884", "text": "public function add(MoneyCollectionInterface $collection);", "title": "" }, { "docid": "4a6f02777f76fe0c2922245c73d3d59a", "score": "0.54213905", "text": "function addMoney($money) {\n\t\t//return \"\". $money;\n\t\treturn $money;\n\t}", "title": "" }, { "docid": "48e8ddd92c2323e965d4b4fbab7d3495", "score": "0.5412395", "text": "public function getAmount() : Price {\n return $this->amount;\n }", "title": "" }, { "docid": "c6aba08e86f1172f38c9b361be261c1c", "score": "0.5409136", "text": "public function addInvoiceItem(int $invoiceId, float $amount): self\n {\n $this->invoices_list[] = new PaymentInvoiceItem([\n 'invoice_id' => $invoiceId,\n 'amount' => $amount,\n ]);\n\n return $this;\n }", "title": "" }, { "docid": "4549fdc5761745558c488479240f689a", "score": "0.54085076", "text": "public function add($value): self;", "title": "" }, { "docid": "bc9dd122382f56861a8d131e781844a3", "score": "0.53647673", "text": "public function set_amount( $amount ) {\n $this->amount = (float) $amount;\n\n return $this;\n }", "title": "" }, { "docid": "7a6743f07b976500212a031b909b396d", "score": "0.536297", "text": "public function setCurrency(string $currency): AmountBuilderInterface;", "title": "" }, { "docid": "0161b6cd68cac9e81d3f6b0ef4813449", "score": "0.53563684", "text": "public function sumByCurrency($currency)\n {\n /* @var $money MoneyInterface */\n $money = null;\n\n /* @var $entry EntryInterface */\n foreach ($this as $entry) {\n if ($entry->getAmount() && $entry->getAmount()->getCurrency() === $currency) {\n $money = $money === null ? clone $entry->getAmount() : $money->add($entry->getAmount());\n }\n }\n\n return $money;\n }", "title": "" }, { "docid": "e9ac1bd6be13aaadfa6e9a7129342180", "score": "0.5350409", "text": "function addCredit( $amount )\r\n {\r\n $this->order_credit = (float) $amount;\r\n }", "title": "" }, { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.53200334", "text": "public function getAmount();", "title": "" }, { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.53200334", "text": "public function getAmount();", "title": "" }, { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.53200334", "text": "public function getAmount();", "title": "" }, { "docid": "b06d0ce1cb2522031cabae987d6f218e", "score": "0.53200334", "text": "public function getAmount();", "title": "" }, { "docid": "c1873646a8d8d6635eb19b50b8e6f61b", "score": "0.53164357", "text": "public function appliedMoney(?Money $value): self\n {\n $this->instance->setAppliedMoney($value);\n return $this;\n }", "title": "" }, { "docid": "360b8ee82f434cf1122f4cbddd0db5e0", "score": "0.5304772", "text": "abstract public function getAmount();", "title": "" }, { "docid": "750f5ed8b154f6c96834fe13939e5cc1", "score": "0.53009343", "text": "function addMoney ($money){\n\t\t//return \"\". $money;\n\t\treturn $money;\n\t}", "title": "" }, { "docid": "556a73b1ff4f48b640b59ad7c17046d1", "score": "0.52936184", "text": "public static function money($amount, array $formatOptions = []) {\n\t\treturn static::currency($amount, null, $formatOptions);\n\t}", "title": "" }, { "docid": "89902506af88bf48530cdcc25e42097a", "score": "0.5292887", "text": "public function make()\n {\n if ($this->exchangeRate) {\n return money(\n $this->amount * $this->exchangeRate->value,\n $this->exchangeRate->to_currency,\n true\n );\n }\n\n return money(\n $this->amount,\n $this->toCurrency ?? $this->fromCurrency,\n true\n );\n }", "title": "" }, { "docid": "8c0ee64a944e9bfdade22af49e53a861", "score": "0.52693504", "text": "public function setAmount($value)\n\t{\n\t\treturn $this->setAmountType('Amount', $value);\n\t}", "title": "" }, { "docid": "de92f1627e90aa024f737cc40a0ddf52", "score": "0.5268567", "text": "protected function insertAmounts()\n {\n $amountTable = $this->resource->getTableName(GiftCard::GIFTCARD_AMOUNT_TABLE);\n $this->entityModel->getConnection()->insertOnDuplicate($amountTable, $this->amountsCache);\n\n return $this;\n }", "title": "" }, { "docid": "88d76b1c97a3ee019c54b0162ded5c13", "score": "0.52680284", "text": "public function setAmount(? int $amount) : RefundItem\n {\n $this->amount = $amount;\n\n return $this;\n }", "title": "" }, { "docid": "f2b331f0703f9c65ca6f8a66d2a9f917", "score": "0.5235897", "text": "public function add($value) {\n $this->source .= $value;\n\n return $this;\n }", "title": "" }, { "docid": "95558cb3022aeb3b6bf00ad36b63478d", "score": "0.5225748", "text": "public function addMoney(){\n\t\t$ac_name = Account::where('id', Input::get('ac_from'))->first();\n\t\t$amount = Input::get('amount');\n\t\tif($ac_name->balance < Input::get('amount')){\n\t\t\treturn Redirect::back()->with('error', 'Insufficient funds in From Account selected!');\n\t\t}\n\n\t\t$data = array(\n\t\t\t'date' => date(\"Y-m-d\"), \n\t\t\t'debit_account' => Input::get('ac_to'),\n\t\t\t'credit_account' => Input::get('ac_from'),\n\t\t\t'description' => \"Transferred cash from $ac_name->name account to Petty Cash Account\",\n\t\t\t'amount' => Input::get('amount'),\n\t\t\t'initiated_by' => Confide::user()->username\n\t\t);\n\n\t\tDB::table('accounts')->where('id', Input::get('ac_from'))->decrement('balance', Input::get('amount'));\n\t\tDB::table('accounts')->where('id', Input::get('ac_to'))->increment('balance', Input::get('amount'));\n\n\t\t$acTransaction = new AccountTransaction;\n\t\t$journal = new Journal;\n\n\t\t$acTransaction->createTransaction($data);\n\t\t$journal->journal_entry($data);\n\n\t\treturn Redirect::action('PettyCashController@index')->with('success', \"KES. $amount Successfully Transferred from $ac_name->name to Petty Cash!\");\n\t}", "title": "" }, { "docid": "f60393cd67e99a6f3ec332b22c14fff7", "score": "0.52240294", "text": "public function add(Duration $other)\n {\n return new static($this->value + $other->value($this->unit), $this->unit);\n }", "title": "" }, { "docid": "7307f82e7de993ad692db41637b38c24", "score": "0.52096736", "text": "public function addValor(float $valor): self\n {\n $this->valor_total += $valor;\n return $this;\n }", "title": "" }, { "docid": "1f0951eea6d3024f1dbca87e87dfe628", "score": "0.52067536", "text": "public function subtract(MoneyInterface $other): MoneyInterface\n {\n $this->guardCurrencyMismatch($other);\n $this->guardBiggerAmountSubtraction($other);\n return new self($this->getAmount() - $other->getAmount(),\n $this->getCurrency());\n }", "title": "" }, { "docid": "6d5f2504ed4ada43c48689ec8409b01f", "score": "0.52007973", "text": "public function add(PriceTag $summand)\n {\n $this->assertTaxPercentage($summand);\n\n $netPrice = $this->getNetPrice()->add($summand->getNetPrice());\n\n $grossPrice = $this->getGrossPrice()->add($summand->getGrossPrice());\n\n return $this->newPriceTag($netPrice, $grossPrice);\n }", "title": "" }, { "docid": "0d40b74a44ed2c7687d05cb4e859a698", "score": "0.5181655", "text": "public function add($operand) {\n $this->attrs[] = array('operator' => 'ADD', 'operand' => $operand);\n return $this;\n }", "title": "" }, { "docid": "1e1d36419b9f154c8266f5e9316e0a9a", "score": "0.51678765", "text": "public function setToAmount($toAmount)\n {\n $this->toAmount = $toAmount;\n return $this;\n }", "title": "" }, { "docid": "3d54cecd903041daa3ce18e945073693", "score": "0.5165255", "text": "public function times($amount)\n {\n $this->amount = $amount;\n\n return $this;\n }", "title": "" }, { "docid": "c0f9035a93e3b2f2baf1532b3aa65790", "score": "0.51650923", "text": "public function appliedMoney(?V1Money $value): self\n {\n $this->instance->setAppliedMoney($value);\n return $this;\n }", "title": "" }, { "docid": "9a299aa58dcefe1f00f56aea8dcc6662", "score": "0.5155341", "text": "public function increaseQuantity($amount=1)\n {\n $this->quantity+=$amount;\n }", "title": "" }, { "docid": "aafb8ea5c3251907a07e92ddc0d839d3", "score": "0.51339066", "text": "public function add(Xmlable $transaction): self\n {\n $this->transactions[] = $transaction;\n\n return $this;\n }", "title": "" }, { "docid": "79620e0b9a22bd40c00f46e0d8e9f694", "score": "0.51094174", "text": "public function addMoney(Request $request){\n return[\n \"result\"=>'success',\n 'id'=> $this->transferMoney(\n $this->getUserObjectFromUserName(\"system\"),\n $this->getUserObjectFromUserName(Auth::user()->username),\n $request->amount,0)];\n }", "title": "" }, { "docid": "d7ac7715572c9afce8c6a5b6e2870cb5", "score": "0.51026154", "text": "public function setValue(string $value): AmountBuilderInterface;", "title": "" }, { "docid": "49cc7c7f4ce14a84232b60b1ea162600", "score": "0.5099787", "text": "public function plus($number)\n {\n self::mustBeNumeric($number, 'Value to add');\n \n $number = is_object($number) ? $number->value : $number;\n\n return new self($this->value + $number);\n }", "title": "" }, { "docid": "c203abc3ca2fefc8e773cb1253295379", "score": "0.5066155", "text": "public function parseMoney($inputAmount)\n {\n return $this->castMoney($inputAmount, true);\n }", "title": "" }, { "docid": "222c94300c93469ffc77696d958d7ee3", "score": "0.5064347", "text": "public function addPayment(PaymentInterface $payment);", "title": "" }, { "docid": "b100bb0295b1f14ab9df86e8d7a79b63", "score": "0.50622725", "text": "public function addPayment(Payment $payment)\n {\n $this->payments[] = $payment;\n\n return $this;\n }", "title": "" }, { "docid": "1d2794710038e766f1b85e4040f983e7", "score": "0.5039385", "text": "public function setAmount($amount) {\n $this->amount = $amount;\n }", "title": "" }, { "docid": "a2cd4de3f62373f9e955c17b5c87e513", "score": "0.50305635", "text": "public function getMoney()\n {\n }", "title": "" }, { "docid": "4ebd27c73f8e6919a29bf53e92fc7e68", "score": "0.5026214", "text": "public function add($userId, $amount)\n {\n $balance = $this->userBalanceRepository->getByUser($userId);\n\n $this->userBalanceRepository->persist(\n $balance->id,\n new UserBalanceEntity(\n null,\n $userId,\n $balance->balance + $amount\n )\n );\n }", "title": "" }, { "docid": "d09a96e269ef8bbee8f93b917d8f1c48", "score": "0.501483", "text": "public function setAmount($amount)\n {\n $this->amount = $amount;\n }", "title": "" }, { "docid": "5f371fefd192146ed559ed5531da8dca", "score": "0.50009197", "text": "final function add( $value ) {\n\t\tif ( ! $this->isValid( $value ) ) { return; }\n\t\t$this->content |= $value;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a4966c9d267e7e75abe6527a7948a36c", "score": "0.49673477", "text": "public function subtract(MoneyInterface $other);", "title": "" }, { "docid": "3996604f941683ab223d3999404fbda8", "score": "0.49657175", "text": "public function addX($x)\n {\n $this->x += (int)$x;\n\n return $this;\n }", "title": "" }, { "docid": "5e9d3760784bdb5f8e5b776daef5eb66", "score": "0.49539655", "text": "public function createMoney($amount, $currency = null)\n {\n if (null === $currency) {\n $currency = $this->getBaseCurrency();\n }\n\n $this->checkCurrencies($currency);\n\n $class = $this->moneyClass;\n return new $class($amount, $currency);\n }", "title": "" }, { "docid": "525537003a4071505908893433ace5af", "score": "0.4953054", "text": "function SetAmount($amount, $dbupdate = true)\r\n\t{\r\n\t\treturn $this->UpdateValue('amount', $amount, $dbupdate);\r\n\t}", "title": "" }, { "docid": "5291e9e7caaea7399fc889394bb57e80", "score": "0.49523246", "text": "public function addAccount() {\n $query = $this->_db->prepare(\"INSERT INTO account(idUser, name, number, sum) VALUES(:idUser, :name, :number, :sum)\");\n $createAccount = $query->execute([\n \"idUser\" => $account->getIdUser(),\n \"name\" => $account->getName(),\n \"number\" => $account->getNumber(),\n \"sum\" => $account->getSum()\n ]);\n return $createAccount;\n }", "title": "" }, { "docid": "905877849a93f0b0f93e0802d8575cef", "score": "0.49448416", "text": "public static function add() {\n $instance = new self();\n return $instance;\n }", "title": "" }, { "docid": "7bbf8bd7097afd36f29ab699e59b6a32", "score": "0.49391332", "text": "public function equals(MoneyInterface $other);", "title": "" }, { "docid": "f4c83882992b61dabf1cc04feb4b6cb3", "score": "0.49249113", "text": "public function getAmount() {\n return $this->amount;\n }", "title": "" }, { "docid": "e410647c49d489a511ed77fd96e461f7", "score": "0.49120682", "text": "public function exchange($money)\n {\n if (is_numeric($money)) {\n return new Money($money * $this->rate, $this->targetCurrency);\n }\n\n if (!($money instanceof Money)) {\n throw new InvalidArgumentException(\"exchange method accepts only numeric or Money objects.\");\n }\n\n $currency = $money->getCurrency();\n if ($currency->isEqualTo($this->sourceCurrency)) {\n return new Money($money->getAmount() * $this->rate, $this->targetCurrency);\n }\n\n if ($currency->isEqualTo($this->targetCurrency)) {\n return new Money($money->getAmount() / $this->rate, $this->sourceCurrency);\n }\n\n throw new InvalidArgumentException(\n sprintf(\n \"exchange method expected %s or %s, but %s received\",\n $this->sourceCurrency,\n $this->targetCurrency,\n $currency\n )\n );\n }", "title": "" }, { "docid": "ec9a0c361fc4f2e90401d9a4648f901d", "score": "0.49023208", "text": "public function setAmount($amount) {\n $this->amount = $amount;\n }", "title": "" }, { "docid": "83c050552e4a285a05e302a6ac74df59", "score": "0.49004185", "text": "public function addAccount($account) {\n $this->account[] = $account;\n return $this;\n }", "title": "" }, { "docid": "83c050552e4a285a05e302a6ac74df59", "score": "0.49004185", "text": "public function addAccount($account) {\n $this->account[] = $account;\n return $this;\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "d14e186438195fec9b781b1aeb3a68f9", "score": "0.0", "text": "public function edit(Request $request)\n {\n $apply_condition = $this->applyConditionService->getAdvantageById($request->id);\n return view('apply_conditions.create_or_edit', compact('apply_condition'));\n }", "title": "" } ]
[ { "docid": "63925fbab89765f6ec514208a03fc871", "score": "0.78354216", "text": "public function edit(Resource $resource)\n {\n return view('resource.edit', compact('resource'));\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3e4affd8df1c5ef8f2afe9c9c3221248", "score": "0.7487642", "text": "public function edit($id)\n {\n // show form to edit\n }", "title": "" }, { "docid": "e148f1d3d9a48b05d53bc0934e9c8555", "score": "0.74829096", "text": "public function edit(Request $request, $resource)\n {\n $this->authorize('update', $resource);\n\n $this->event('updating', $resource->load($this->with)); \n\n if($this instanceof Compact) {\n $this->editingResource = $resource;\n\n return $this->index($request, app(Builder::class));\n }\n\n return view($this->editView)\n ->withForm($this->form()->setModel($resource))\n ->withName($this->name())\n ->withTitle($this->title())\n ->withActions($this->getActions())\n ->withRouteParameters((array) $this->routeParameters('edit', $resource));\n }", "title": "" }, { "docid": "4de13c28a63d7306cf639907e8ef1d9c", "score": "0.7343273", "text": "public function edit($resource, $resourceId)\n {\n return view('microboard::resource.edit', compact('resource', 'resourceId'));\n }", "title": "" }, { "docid": "4020b0e5a357920b39cf24e715e8cab6", "score": "0.7274648", "text": "public function edit($id) {\n ${$this->resource} = $this->model->findOrFail($id);\n\n App::setLocale(Helpers::getLang());\n\n return view($this->view_path . '.edit', compact($this->resource));\n }", "title": "" }, { "docid": "0cd4d6ca6f0a2017970904abf26fd651", "score": "0.7259789", "text": "public function edit($id)\n {\n return view('resource::edit');\n }", "title": "" }, { "docid": "256cb5b6f36786b11ec44b4af931758b", "score": "0.72310144", "text": "public function edit(Resource $resource)\n {\n\t\t\t\t$Item = $resource; $Actions = Action::all()->toArray();\n\t\t\t\t$Item[\"actions\"] = array_keys(str_split(str_replace(\".\",\"\",$this->floattostr ( $Item->action ))),\"1\");\n return view(\"resource.create\",compact(\"Item\",\"Actions\"))->with([\"update\"=>true]);\n }", "title": "" }, { "docid": "65ada685cf8e833ca627450ccc9d2441", "score": "0.7191711", "text": "public function edit($id)\n {\n $resource = Resource::find($id);\n \n return view('resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "0cf290df710095ca7ea001893658b9e6", "score": "0.71411604", "text": "public function editAction()\n {\n $page = $this->_helper->db->findById();\n $form = $this->_getForm($page);\n $this->view->form = $form;\n $this->_processPageForm($page, $form, 'edit');\n }", "title": "" }, { "docid": "5aefc7fd6a02ad9693185ed9c8d5b8d2", "score": "0.7032755", "text": "public function editAction() \n {\n $id = $this->request->get('id');\n\n // load the recipe from the database\n $recipe = Recipe::findFirst($id);\n\n $this->view->recipe = $recipe;\n $this->view->submit = \"editSubmit\";\n $this->view->title = \"Edit a recipe\";\n $this->view->pick('admin/add');\n }", "title": "" }, { "docid": "9126d463642a49ad64ccc9d4ccaea048", "score": "0.7032053", "text": "public function edit($id)\n {\n // Get the resource\n $object = $this->api()->show($id);\n\n // Get the form options\n $options = method_exists($this, 'formOptions') ? $this->formOptions($object) : [$this->package => $object];\n\n // Render edit view\n return $this->content( 'edit', $options );\n }", "title": "" }, { "docid": "c7274abf6ae2de7d4553b1b4b51a2134", "score": "0.6967485", "text": "public function edit()\n {\n /** @var Request $request */\n $request = app(Request::class);\n $formbuilder = app(FormBuilder::class);\n $args = $request->route()->parameters();\n\n $referer = url()->previous();\n $route = Route::getCurrentRoute()->getName();\n $model = $this->getEditModel($request, $args);\n\n $form_data = $this->getEditFormData($model, $request, $args);\n $form_data = array_merge(['prev_url' => $referer], $form_data);\n\n $url = (empty($this->route_update)) ? route(str_replace('edit', 'update', $route), $args) : $this->route_update;\n\n $form = $formbuilder->create($this->form_class, [\n 'method' => 'PUT',\n 'url' => $url,\n 'data' => $form_data,\n 'model' => $model,\n ]);\n\n $breadcrumb = $this->getEditBreadcrumb($model, $request, $args);\n\n if($request->ajax()) {\n return view($this->form_view, compact('form', 'breadcrumb', 'model', 'args', 'layout', 'section', 'request', 'form_data'));\n } else {\n $layout = $this->layout;\n $section = $this->section;\n $view = $this->form_view;\n return view('cms-package::default-resources.layout-extender', compact('form', 'breadcrumb', 'model', 'args', 'layout', 'section', 'layout', 'section', 'view', 'request', 'form_data'));\n }\n }", "title": "" }, { "docid": "052fcb4be65ef559048af91970a9092c", "score": "0.6962541", "text": "public function edit($id)\n {\n // we don't need this method which shows a form to edit\n }", "title": "" }, { "docid": "a801700662a2deaaefc059a611aa40bd", "score": "0.69617313", "text": "public function editformAction() {\r\n\t\tif (($messages = $this->_messages->getMessages ())) {\r\n\t\t\t$this->view->assign ( 'messages', $messages );\r\n\t\t}\r\n\t\t\r\n\t\t$info = $this->_tree->getNodeInfo ( $this->_request->getParam ( $this->_id_field ) );\r\n\t\t$form = new Bel_Forms_Builder ( $this->_formname, $this->_form_edit_action );\r\n\t\t$form->addElement ( 'hidden', $this->_id_field, array ('value' => $info->{$this->_id_field} ) );\r\n\t\t$form->populateForm ( $info );\r\n\t\t$this->view->assign ( 'form', $form );\r\n\t\t$this->view->display ( $this->_form_template );\r\n\t}", "title": "" }, { "docid": "83b72662162c1c99a4a9ec1b7b4e6edc", "score": "0.69612134", "text": "public function show_editform()\n {\n $this->item_form->display();\n }", "title": "" }, { "docid": "aaf7cccb1997350d3476b1b809c87285", "score": "0.6960807", "text": "public function edit(Resource $resource)\n {\n try {\n $grou = Groups::with([])->get();\n return view('resource.edit')->with(['groups' => $resource, 'op' => $grou]);\n } catch (\\Exception $e) {\n session()->flash('flash_error', 'Something went wrong');\n return Redirect::back();\n }\n }", "title": "" }, { "docid": "f8826a70c4e190274cdb2b9b04638375", "score": "0.6959897", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FormBundle:Form')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Form entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('FormBundle:Form:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "627cc08a03d861bf43b77f13aa1b356b", "score": "0.6949801", "text": "public function edit($id)\n { \n return $this->showForm($id);\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "167dafd94209f70f38ffcad67381a2e9", "score": "0.69375557", "text": "public function edit() {\n\t\t$this->mode = 'edit';\n\t\t$this->submit();\n\t}", "title": "" }, { "docid": "8c9d1b02602edc2dd288db289ad2a173", "score": "0.69332457", "text": "public function editAction()\n {\n // returning due to validation:\n if (isset($this->view->form)) {\n return;\n }\n \n $this->view->form = $this->_getCarForm();\n \n // Retrieve the record for editing:\n $manager = new Lightman_Managers_Car();\n $carId = $this->getRequest()->getParam('id');\n $data = $manager->fetch($carId);\n $this->view->form->populate($data[0]);\n $this->view->form->setAction('/car/save');\n }", "title": "" }, { "docid": "6eef3a46914dacc1a3123674c081e2a5", "score": "0.69211656", "text": "public function edit($id)\n {\n $model = $this->resourceModel::find($id);\n\n if (!is_null($this->relatedModel)) {\n $model->load($this->relatedModel);\n }\n\n $this->beforeEdit($model);\n\n $this->viewData['resourceData'] = $model;\n\n return view(\n \"{$this->viewBaseDir}.{$this->viewFiles['edit']}\",\n $this->viewData\n );\n }", "title": "" }, { "docid": "7abb5638b8fab40720496e4c8e4e6ee3", "score": "0.69126725", "text": "public function action_edit()\n\t{\n\t\t$id = $this->request->param('id');\n\n\t\tif ($id === null)\n\t\t{\n\t\t\t$this->redirect(Route::url('customer', array('action' => 'new')));\n\t\t} // if\n\n\t\t$model = ORM::factory('Customer')->where('id', '=', $id)->find();\n\n\t\t$this->content = View::factory('customer/form', array(\n\t\t\t'title' => __('Edit customer \":customer\"', array(':customer' => $model->company ?: $model->name)),\n\t\t\t'customer' => $model,\n\t\t\t'properties' => $model->get_properties(),\n\t\t\t'ajax_url' => Route::url('customer', array('action' => 'save', 'id' => $id)),\n\t\t\t'invoices' => $model->invoices->order_by('id', 'DESC')->limit(20)->find_all()\n\t\t));\n\t}", "title": "" }, { "docid": "7e98823aebb6ba9203517ae50d88ad7a", "score": "0.69074184", "text": "function edit(){\n\t\t$id = $this->input->get('id');\n\t\t$data = array();\n\t\t$data['title']\t\t= 'Edit '.$this->title;\n\t\t$data['controller']\t= $this->controller;\n\t\t$data['state']\t\t= 'edit';\n\t\t$data['id'] \t\t= $id;\n\n\t\t// because it's simple index and form, use common form\n\t\t$data['table_field'] = $this->group->table_field;\n\t\t$data['primary_key'] = $this->group->primary_key;\n\t\t$data['content']\t= 'content/common/form';\n\t\t$data['datas'] = $this->group->get(decrypt_id($id));\n\n\t\t$this->template($data);\n\t}", "title": "" }, { "docid": "442f0c0607d600b71f651788512fa4e2", "score": "0.68972987", "text": "public function edit()\n {\n return view('backend::edit');\n }", "title": "" }, { "docid": "9443931fcf9450e4082ea1fcc8f7947f", "score": "0.685467", "text": "public function editAction()\n {\n $category = $this->_helper->db->findById();\n $form = $this->_getForm($category);\n $this->view->form = $form;\n $this->_processPageForm($category, $form, 'edit'); \n }", "title": "" }, { "docid": "572f29a2affec4fc1f0fcd8cf08070ff", "score": "0.68250066", "text": "public function edit($id){\n \n try {\n $resource = Resource::withTrashed()->findOrFail($id); \n }catch (ModelNotFoundException $e){\n $errors = collect(['El recurso con ID '.$id.' no se encuentra.']);\n return back()\n ->withInput()\n ->with('errors', $errors);\n }\n $resourceStatuses = ResourceStatus::orderBy('name', 'ASC')->get();\n $resourceTypes = ResourceType::orderBy('name', 'ASC')->get();\n $dependencies = Dependency::orderBy('name', 'ASC')->get();\n $resourceCategories = ResourceCategory::orderBy('name', 'ASC')->get();\n $physicalStates = PhysicalState::orderBy('name', 'ASC')->get();\n $spaces = Space::orderBy('name', 'ASC')->get();\n\n return view('admin.resources.create_edit')\n ->with('resource', $resource)\n ->with('resourceStatuses', $resourceStatuses)\n ->with('resourceTypes', $resourceTypes)\n ->with('dependencies', $dependencies)\n ->with('resourceCategories', $resourceCategories)\n ->with('physicalStates', $physicalStates)\n ->with('spaces', $spaces)\n ->with('title_page', 'Editar recurso: '.$resource->name)\n ->with('menu_item', $this->menu_item);\n }", "title": "" }, { "docid": "92c9e3a1c5275112cb6b6e51244fca5c", "score": "0.6815314", "text": "public function edit($id)\n {\n $model = static::$model;\n $className = $this->getClass();\n\n $item = $className::find($id);\n\n $formOptions = [\n 'route' => ['admin.' . strtolower($this->getClassNameFromModel()) . '.update', $id],\n 'method' => 'put',\n ];\n\n return view('pilot::admin.' . static::$viewFolder . '.form', compact('item', 'formOptions', 'model'));\n }", "title": "" }, { "docid": "23a4ee1572e6b647de73c414d405951f", "score": "0.68132675", "text": "public function edit($id)\n {\n //\n $form = Form::find($id);\n return view('forms.edit',compact('form','id'));\n\n }", "title": "" }, { "docid": "a3f2b74e4e1ef90e3f2b369f12999507", "score": "0.68113613", "text": "public function edit($id)\n {\n\t\t$params = [\n\t\t\t'data' => $this->repository->findById($id),\n\t\t];\n\n\t\treturn view('admin.pages.material-form-update', ['page' => 'material'])->with($params);\n\t}", "title": "" }, { "docid": "873a08d0f357fca631ccc7259052d9ce", "score": "0.68018645", "text": "public function edit()\n {\n return view('common::edit');\n }", "title": "" }, { "docid": "ea939d247defa384f3c7bb826e339c02", "score": "0.6799606", "text": "public function edit($id)\n {\n $product = Product::findOrFail($id);\n return view('Admin/product/form',compact('product'));\n }", "title": "" }, { "docid": "81e049bcae69bcc2654f7dc4038b4aaf", "score": "0.679763", "text": "public function edit($id)\n {\n $requestform = requestform::findOrFail($id);\n\n return view('RequestForms.requestforms.edit', compact('requestform'));\n }", "title": "" }, { "docid": "e3fad094d4252fd72e2502d403dfc367", "score": "0.67960227", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "8566978c055c66cbf8d8ff39c2b4fa99", "score": "0.6789007", "text": "public function getEditForm($id){\n $data = $this->model->findOrFail($id);\n return view('administrator.pages.update_form')->with(compact('data'));\n }", "title": "" }, { "docid": "d8b4457853a470b2a27d3bf2af2f3273", "score": "0.67831767", "text": "public function edit($id)\n {\n return view('operationmanager::edit');\n }", "title": "" }, { "docid": "3e2f2a29164ba9a0158e7b2fd5bd8f61", "score": "0.6764436", "text": "public function edit() {\n\t\tglobal $DIC;\n\t\t$tpl = $DIC['tpl'];\n\n\t\t$this->initForm(\"edit\");\n\t\t$this->getValues();\n\n\t\t$tpl->setContent($this->form->getHTML());\n\t}", "title": "" }, { "docid": "df462f5d85bc8fd7cf9dce14953e8abf", "score": "0.67639047", "text": "public function edit()\n {\n return view('offer::edit');\n }", "title": "" }, { "docid": "418884af8e182e5d20016d3fb1359c7e", "score": "0.67567337", "text": "public function editAction()\n {\n $em = $this->getDoctrine()->getManager();\n\t\t/* Template fields */\n\t\t$GlobalFields = new GlobalFields();\n\t\t$globalfieldsarray = $GlobalFields->getGlobalFields($this, $em);\n\t\t\n\t\t$entity = $globalfieldsarray[\"empleado\"];\n\t\t$entity->setUserName($entity->getUsuario()->getUserName());\n\t\t$entity->setPassword($entity->getUsuario()->getPassword());\n\t\t\n $editForm = $this->createForm(new EmpleadoType(), $entity);\n\n return $this->render('SystemEmpleadoBundle:EditarPerfil:edit.html.twig', array(\n\t\t\t'globalfieldsarray' => $globalfieldsarray,\n 'edit_form' => $editForm->createView(),\n 'error' => NULL,\n ));\n }", "title": "" }, { "docid": "c3a72c58c6b66c9b866217649ddaef6a", "score": "0.67562574", "text": "public function edit()\n {\n return view('sallereservation::edit');\n }", "title": "" }, { "docid": "f9f7f910c8b16a5d918564783761275b", "score": "0.67492944", "text": "public function edit($id, Request $request)\n {\n $resource = MyResource::find($id);\n if ($resource != null) {\n if ($request->user()->id == $resource->user->id || $request->user()->hasRole('Admin')) {\n $modules = Module::getFormModulesArray();\n return view('resources.edit', compact('resource', 'modules'));\n } else {\n return abort(401, 'You\\'re not allowed to edit this resource!');\n }\n }\n }", "title": "" }, { "docid": "06a1955be6e482728e09337f630bb727", "score": "0.67316383", "text": "public function editAction($id)\n {\n $user = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('SifoSharedBundle:Program')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Program entity.');\n }\n\n $form = $this->createEditForm($entity);\n\n return $this->render('SifoAdminBundle:edit:layout.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'user' => $user,\n ));\n }", "title": "" }, { "docid": "444f98d0090cda3d8ec6a32c569483fe", "score": "0.6730375", "text": "public function edit()\n {\n return view('item::edit');\n }", "title": "" }, { "docid": "3511b1492265afe62ecb75757f43c811", "score": "0.67264074", "text": "protected function showForm() {\n\t\t// Setup header Data\n\t\t$titleStr = '';\n\t\tswitch ($this->mode) {\n\t\t\tcase 'delete':\n\t\t\t\t$titleStr = 'Delete';\n\t\t\t\tbreak;\n\t\t\tcase 'edit':\n\t\t\t\t$titleStr = 'Edit';\n\t\t\t\tbreak;\n\t\t\tcase 'add':\n\t\t\tdefault:\n\t\t\t\t$titleStr = 'Add';\n\t\t\t\tbreak;\n\t\t}\n\t\tif (!isset($this->data['form']) || empty($this->data['form'])) {\n\t\t\t$this->data['form'] = $this->form->get();\n\t\t}\n\t\t$this->data['subTitle'] = $titleStr.\" \".$this->_NAME;\n\t\t$this->data['thisItem']['id'] = $this->recordId;\n\t\t$this->data['thisItem']['ownerId'] = (isset($this->dataModel->recordOwnerId) ? $this->dataModel->recordOwnerId : -1);\n\t\t$this->data['currUser'] = $this->params['currUser'];\n\t\t$this->params['content'] = $this->load->view($this->views['EDIT'],$this->data,true);\n\t\t$this->params['pageType'] = PAGE_FORM;\n\t\t$this->displayView();\n\t}", "title": "" }, { "docid": "32e951846997ccc0adda9087b6a46d09", "score": "0.6724373", "text": "public function edit($id){\n return $this->form($id);\n }", "title": "" }, { "docid": "3cb809ceeb3604d4bdf66da701d2423d", "score": "0.67104334", "text": "public function showEdit($id)\n {\n return $this->view('edit', [\n 'model' => $this->service->find($id)\n ]);\n }", "title": "" }, { "docid": "56f9be8327c6825b7bab6704e048d9b7", "score": "0.67073035", "text": "public function edit(Request $request, $client, $resource)\n\t{\n\t\t$resource = Resource::findBySlug($client, $resource);\n\n\t\tif (!$resource) {\n\t\t\treturn response(view('resources.404'), 404);\n\t\t}\n\n\t\t$this->authorize('manage', $resource);\n\n\t\t$resource->load('client', 'tags', 'type');\n\n\t\treturn view('resources.edit', ['client' => $resource->client, 'resource' => $resource]);\n\t}", "title": "" }, { "docid": "41b2f68ed73a5cc186c76264c0d17f7a", "score": "0.6706397", "text": "public function edit($id)\n\t{\n\t\t$question = Question::find($id);\n\t \n\t \n $display = Question::$display;\n\n\t\treturn view('admin.question.edit', compact('question', \"display\"));\n\t}", "title": "" }, { "docid": "e825c5f01addbfd2313d771317890d1d", "score": "0.6702575", "text": "public function editAction() {\n\t\t$this->enableLayout();\n\t\t$id\t\t = $this->getRequest()->getParam('id');\n\t\t$product = Object_Abstract::getById($id);\n\n\t\t$user\t\t\t\t = ParagonFramework_Models_User::getUser();\n\t\t$configReader\t\t = ParagonFramework_ConfigReader::getInstance();\n\t\t$configReaderView\t = $this->getView($user, $configReader);\n\n\t\t$templateName = $configReaderView->getTemplate();\n\n\t\t$plugin\t\t\t\t = ParagonFramework_Plugin::getInstance();\n\t\t$templateFilePath\t = $plugin->getDeployPath() . '/templates/' . $templateName;\n\n\t\t$this->view->pathToSnipplet\t = $templateFilePath;\n\t\t$this->view->user\t\t\t = $user;\n\t\t$this->view->product\t\t = $product;\n\t}", "title": "" }, { "docid": "9b1f710040cf008ce0cc39a2446c2e3f", "score": "0.66995674", "text": "public function edit()\n\t{\n\t\t$this->subcontrollers[\"form\"] = new Form\\FormController($this->config, \"Form\", \"index\", array());\n\n\n\t\t// $this->context[\"forms\"] = $this->form_controller->get_forms($this->forms);\n\t\t// var_dump($this->context[\"forms\"]);\n\t}", "title": "" }, { "docid": "281109723855c04252dbc51f84833e23", "score": "0.6693279", "text": "public function editAction()\n\t{\n\t\t// We first retrieve the report ID\n\t\t$id = $this->getRequest()->getParam('id');\n\t\t// Then we generate the report path\n\t\t$path = Mage::getBaseDir('var') . DS . 'report';\n\n\t\t// Load the report\n\t\t$model = Mage::getModel('reportsviewer/report')->load($id, $path);\n\n\t\t// Register the data so we can use it in the form\n\t\tMage::register('report_data', $model);\n\n\t\t// Layout loading / rendering\n\t\t$this->loadLayout();\n\t\t$this->_setActiveMenu('system/tools/reportsviewer');\n\n\t\t$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);\n\n\t\t$this->_addContent($this->getLayout()->createBlock('reportsviewer/adminhtml_reportsviewer_edit'));\n\n\t\t$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n\n\t\t$this->renderLayout();\n\t}", "title": "" }, { "docid": "e229be1f6baba6da610f480a33455c90", "score": "0.6690778", "text": "public function edit($id)\n {\n $resource = $this->findResource($id);\n\n return view($this->getTemplatePath('edit'), compact('resource'));\n }", "title": "" }, { "docid": "ea46a3f45fe3107a2b87f10fd7bb2223", "score": "0.6688617", "text": "public function edit(Record $record)\n {\n $this->authorize('edit', $record);\n\n $fieldChanges = $this->requestProcessor->fromFieldsRequest(\n $record->recordType->fields(), \"field_\");\n $linkChanges = $this->requestProcessor->getLinkChanges(\n $record->recordType);\n $record->updateData($fieldChanges);\n return view('record.edit', [\n \"record\" => $record,\n \"idPrefix\" => \"\",\n \"returnTo\" => $this->requestProcessor->returnURL(),\n \"linkChanges\" => $linkChanges,\n \"nav\" => $this->navigationMaker->recordNavigation($record, \"Edit\")\n ]);\n }", "title": "" }, { "docid": "15c7a9f1bc35a63d24f1c419ea44bb8e", "score": "0.6687803", "text": "public function edit($id)\n {\n $countries = Country::all();\n $roles = Role::all();\n $admin = Admin::find($id);\n $pageTitle = trans(config('dashboard.trans_file').'edit');\n $submitFormRoute = route('admins.update', $id);\n $submitFormMethod = 'put';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('countries', 'roles', 'admin', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "bf49bc8226e13e2862c2259d16e93588", "score": "0.6680715", "text": "public function edit($id)\n {\n $product = Product::find($id);\n return view('products.edit_form')->with('product', $product)->with('manufacturers', Manufacturer::all());\n }", "title": "" }, { "docid": "3e9f248cdce27ef62f9af24dbc0c177d", "score": "0.66793704", "text": "public function edit($id)\n {\n $edit_object = $this->objectRepository->find($id);\n return view('admin.Object.edit-object',compact('edit_object'));\n }", "title": "" }, { "docid": "6d7fd6cc71038b382ce6486ecbf4fe92", "score": "0.6670073", "text": "public function viewEdit()\n {\n if (isset($_GET['id'])) {\n $data['product'] = Product::getById($_GET['id']);\n View::render('Products/edit.php', $data);\n } else {\n echo 'Page not found';\n }\n }", "title": "" }, { "docid": "136c14e90c2ade2a65f234ee3ff6ac85", "score": "0.66696644", "text": "public function edit($id)\n {\n // get the nerd\n $employee = Employee::find($id);\n\n // show the edit form and pass the nerd\n return View::make('employee.edit')\n ->with('employee', $employee);\n }", "title": "" }, { "docid": "419edcb2aed17f9ea1df57d9b28b5be3", "score": "0.6668747", "text": "public static function edit()\r\n {\r\n $record = todos::findOne($_REQUEST['id']);\r\n self::getTemplate('edit_task', $record);\r\n }", "title": "" }, { "docid": "7ab4920df56f35f41b7bed2b83e1e12f", "score": "0.6665399", "text": "public function edit($id)\n\t{\n\t\t$product = Product::findOrFail($id);\n\t\t$show = false;\n\t\treturn View::make('admin.product.new_edit_product', compact('product', 'show'));\n\t}", "title": "" }, { "docid": "261de490d37bf33e08a7b49ebcdbaf10", "score": "0.66629046", "text": "public function edit($id)\n\t{\n\t\tif(Auth::user() && Auth::user()->id == Config::get('laracancan.super_admin')) {\n\t\t\t$resource = Resource::find($id);\n\t\t\treturn view('laracancan::resource.edit')\n\t\t\t\t->with('resource', $resource);\n\t\t}\n\n\t\treturn response(view('laracancan::master.401'), 401);\n\t}", "title": "" }, { "docid": "324456cc428b315bcf53fd80359eafa2", "score": "0.6654099", "text": "public function edit($id)\n {\n $forms = Form::Find($id);\n return view('be/forms/edit', ['forms'=>$forms ]);\n }", "title": "" }, { "docid": "3e646f91bbc9b42ba119ea81f1e01e36", "score": "0.66473585", "text": "public function edit($id)\n {\n\n $formulario = new FormBuilder($this->class::findOrFail($id),$this->formFields);\n $modelo = $this->model;\n return view($this->chooseView('edit'), compact('formulario', 'modelo'));\n }", "title": "" }, { "docid": "7c426795b6ade66a5e5ef6b740010b61", "score": "0.6642236", "text": "public function editAction(){\n if($this->_getParam('id',false)){\n $form = new HelpForm();\n $form->submit->setLabel('Submit changes');\n $form->author->setValue($this->getIdentityForForms());\n $this->view->form = $form;\n if($this->getRequest()->isPost() \n && $form->isValid($this->_request->getPost())){\n if ($form->isValid($form->getValues())) {\n $where = array();\n $where[] = $this->_help->getAdapter()->quoteInto('id = ?', \n $this->_getParam('id'));\n $this->_help->update($form->getValues(),$where);\n $this->getFlash()->addMessage('You updated: <em>' \n . $form->getValue('title')\n . '</em> successfully. It is now available for use.');\n $this->_redirect('admin/help/');\n } else {\n $form->populate($form->getValues());\n }\n } else {\n $form->populate($this->_help->fetchRow('id= ' \n . $this->_getParam('id'))->toArray());\n }\n } else {\n throw new Pas_Exception_Param($this->_missingParameter, 500);\n }\n }", "title": "" }, { "docid": "45821cecfbb5732cd269059f6aad418f", "score": "0.66403663", "text": "function edit()\n\t{\n\t\tJRequest::setVar( 'view', 'editlieux' );\n\t\tJRequest::setVar( 'layout', 'edit_form' );\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "ccb8cbed1c0323296fb99a02c5821089", "score": "0.6636548", "text": "public function editAction() {\n \n View::renderTemplate('Settings/edit.html', [\n 'user' => $this->user\n ]);\n }", "title": "" }, { "docid": "0da44488fa19010ad9532838a532cf8a", "score": "0.66324544", "text": "public function edit(FormBuilder $formBuilder, $id)\n {\n $data['title'] = $this->title;\n $tbl = User::find($id);\n $data['form'] = $formBuilder->create('App\\Forms\\UserForm', [\n 'method' => 'PUT',\n 'model' => $tbl,\n 'url' => route($this->uri.'.update', $id)\n ])\n ->modify('role', 'choice', [\n 'selected' => null\n ])\n ->modify('password', 'password', [\n 'value' => '',\n 'attr' => ['data-validation' => '']\n ]);\n $data['back'] = route($this->uri.'.index');\n return view($this->folder.'.create', $data);\n }", "title": "" }, { "docid": "d89d877aeb4e888fc162f4776686a75f", "score": "0.66217417", "text": "public function edit()\n {\n return view('satuan::edit');\n }", "title": "" }, { "docid": "afb09dad84e30958b4252ef05c35ffd3", "score": "0.66183454", "text": "public function editView() {\n $this->edit = true;\n $this->addView();\n }", "title": "" }, { "docid": "da2c7e0272b4f7cc0f2b78554d9864cb", "score": "0.66176736", "text": "public function edit($id)\n {\n return view('employee::edit');\n }", "title": "" }, { "docid": "d6c2c7e0ddbac0b65be0ee74a7fcd796", "score": "0.6614968", "text": "public function edit($id)\n {\n return view('consultas::edit');\n }", "title": "" }, { "docid": "05a97cb5f26b111f1833f8ff3fcfa159", "score": "0.6611799", "text": "public function edit() {\n\n \t\tif (!$this->user || !$_POST)\n \t\tRouter::redirect('/organizations/index');\n\n \t$organization_id = $_POST['organization_id'];\n\n\t\t# Transfer POST data to Organization object\n\t\t$organization = new Organization();\n\t\t$organization->findInDb ($organization_id);\n\n # Setup view\n\t\t$this->template->content = View::instance('v_organizations_edit');\n\t\t$this->template->title = \"Edit Organization\";\n\t\t$this->template->client_files_body = \"<script src='/js/hide-category-navigation.js' type='text/javascript'></script>\";\n\n\t\t$this->template->content->organization = $organization;\n\n \techo $this->template;\n }", "title": "" }, { "docid": "b492e01b8e4a4d95cb491744ad7b75fd", "score": "0.6607943", "text": "public function edit($id)\n {\n abort_if(Gate::denies('user_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n $forms = Form::findOrFail($id);\n return view('admin.form.edit', compact('forms'));\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "69349f7253951cb5e1d148a7d1e3929b", "score": "0.6607782", "text": "function edit($request) {\n\t\tif(!$this->currentRecord) {\n\t\t\treturn $this->httpError(404);\n\t\t}\n\t\tif(!$this->currentRecord->canEdit(Member::currentUser())) {\n\t\t\treturn $this->httpError(403);\n\t\t}\n\n\t\treturn $this->render(array(\n\t\t\t'Form' => $this->EditForm(),\n\t\t\t'ExtraForm' => $this->DeleteForm()\n\t\t));\n\t}", "title": "" }, { "docid": "1103d1caa349a1d4f5beb8012d42d974", "score": "0.66074175", "text": "public function edit($id)\n {\n return view('apollo::edit');\n }", "title": "" }, { "docid": "4c41c54cdabcef7aee925039ff148afa", "score": "0.66037405", "text": "public function edit()\n {\n // return view('master::edit');\n }", "title": "" }, { "docid": "18ea739bdb9f6382c60e491e54174aee", "score": "0.6600729", "text": "public function edit($id)\n {\n return view('book.form', compact('id'));\n }", "title": "" }, { "docid": "2a47ad7ce79b806f24d1a15c7fc9c440", "score": "0.6596694", "text": "public function edit($id)\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "12259e1dd0f580f13929c361e6808b7f", "score": "0.65930325", "text": "public function edit($id)\n {\n return view('helpcentermodule::edit');\n }", "title": "" }, { "docid": "a6922b424cc81f43c7dfdb03fa2fdd30", "score": "0.6587789", "text": "public function edit($id)\n\t{\n\n\t\t$record=LegalAssistance::find($id);\n\t\t$elements_data=$this->generate_form($record->toArray());\n\t\t$data['elements_data']=$elements_data;\n\t\t$data['can_import']=true;\n\t\t$data['centers']=retrieveField(Center::all(),'name');\n\t\t$data['submit_url']='legalassistance.update';\n\t\t$data['heading']='Legal Assistance';\n\t\t$data['go_back']='legalassistance.index';\n\t\t$data['record_id']=$record['id'];\n\n\t\treturn View::make('layouts.records.edit')->with('data', $data);\n\t}", "title": "" }, { "docid": "c0ed2d04ca6f88da3fdd5ba24182cabd", "score": "0.65859956", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('StalkAdminBundle:Faq')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Faq entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('StalkAdminBundle:Faq:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "69f193cd505298f2c28370b8b0c844c4", "score": "0.65842503", "text": "public function edit($id)\n {\n $especialidade = Especialidade::find($id);\n\n if (is_null($especialidade)) {\n return $this->retornaMensagemNaoEncontrado(false);\n } else {\n return view('especialidade.especialidadeForm')\n ->with('titulo', 'Especialidades - Alteração')\n ->with('especialidade', $especialidade);\n }\n }", "title": "" }, { "docid": "364ca1756970ce6a0c4ca2c96ab66a99", "score": "0.65837765", "text": "function edit() {\n //$this->view->render('Pharmacy/edit');\n }", "title": "" }, { "docid": "b14f129d44d316c72400cd045d6a4e84", "score": "0.65830815", "text": "public function edit($id)\n {\n $formation = Formation::findOrFail($id);\n return view('/formation.update-form', compact('formation'));\n }", "title": "" }, { "docid": "5189a2b2eec4b70ad630efbb5387c44a", "score": "0.6579895", "text": "public function edit(Request $request)\n {\n $id = $request->id;\n if(!$id){\n $request->session()->flash('error', \"Something Went Wrong!.\");\n return redirect(route('manage-contractor-resources'))->withInput();\n }\n $data['chapters'] = Chapter::all();\n $data['info'] = $info = ContractorResource::find($id);\n if(!$info) {\n $request->session()->flash('error', \"Unable to find contractor resource.\");\n return redirect(route('manage-contractor-resources'))->withInput();\n }\n $data['title'] = \"Manage Contractor Resources - Edit\";\n return view('manage_contractor_resources.edit', $data);\n }", "title": "" }, { "docid": "a21034b7eacdbe071c44a2839d5a86e5", "score": "0.6579643", "text": "public function edit()\n\t{\n\t\t$jInput = JFactory::getApplication()->input;\n\t\t$jInput->set('view', 'template');\n\t\t$jInput->set('layout', 'default');\n\t\t$jInput->set('hidemainmenu', 1);\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "12c851ca81effd8d08719b4e8d030021", "score": "0.6579554", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('DevPCultBundle:Representation')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Representation entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('DevPCultBundle:Representation:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "82fbbfb6e7f70c57e4866451e08650ae", "score": "0.6572959", "text": "public function edit()\n {\n return view('licenca.edit');\n }", "title": "" }, { "docid": "293e4323f95692bc641e5529b888814d", "score": "0.6572167", "text": "public function edit($id) {\n\n\t\treturn view('balance.entry.edit', \n\t\t\t[\n\t\t\t'title' => 'Editar Registro',\n\t\t\t'action' => [\n\t\t\t'name' => 'edit',\n\t\t\t'value' => 'Editar',\n\t\t\t'route' => '/entry/update/'.$id,\n\t\t\t],\n\t\t\t'concepts' => Concepts::all('name', 'id'),\n\t\t\t'entry' => count(old()) > 0 ? $this->createEntry (old()) : $this->show($id)[0]\n\t\t\t]\n\t\t\t);\n\t}", "title": "" }, { "docid": "f49e849e4d81c6dd329330e95933d929", "score": "0.65693146", "text": "public function showEditForm($jobId) {\n $job = Job::find($jobId);\n return view('jobs/edit', [\n 'job' => $job\n ]);\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "8e54661cceae01836ae81c249aa4446e", "score": "0.6568565", "text": "public function edit($id)\n {\n return view('bodeguero/historial.form', [\n 'historial' => Historial::find($id), \n 'is_editing' => true\n ]);\n }", "title": "" }, { "docid": "544a3a2d2b88694a924ab6829e4dee76", "score": "0.6568338", "text": "public function editAction()\n {\n // returning due to validation:\n if (isset($this->view->form)) {\n return;\n }\n \n $this->view->form = $this->_getTaskForm();\n \n // Get the assignees droplist ready:\n $assignees = $this->_getAssigneesList();\n $this->view->assignees = $assignees;\n \n // Retrieve the record for editing:\n $manager = new Lightman_Managers_Task();\n $taskId = $this->getRequest()->getParam('id');\n $data = $manager->fetch($taskId);\n $this->view->form->populate($data[0]);\n $this->view->form->setAction('/task/save');\n }", "title": "" } ]
e77f2b65ecb49438d898a1dd10c55f78
The validator must be defined as a service with this name.
[ { "docid": "762099cd36e635cc3facac8c5ede2ff2", "score": "0.6701735", "text": "public function validatedBy()\n {\n return self::SERVICE_VALIDATOR;\n }", "title": "" } ]
[ { "docid": "e17dc1f58ebfc4b11f50a28613ebfc7c", "score": "0.696069", "text": "public function getValidator() {}", "title": "" }, { "docid": "6a59179edbf2d5eb03afb8c519adede1", "score": "0.69293237", "text": "protected function getValidatorService()\n {\n return $this->services['validator'] = ($this->privates['validator.builder'] ?? $this->getValidator_BuilderService())->getValidator();\n }", "title": "" }, { "docid": "352bcdacffce9697c4f096865ae034bf", "score": "0.6834423", "text": "public function byValidator($name);", "title": "" }, { "docid": "cc6cf8fb70f8326dada9ceceaed67402", "score": "0.680712", "text": "public function validator()\n {\n\n return ComissaoServicoValidator::class;\n }", "title": "" }, { "docid": "fed8bd73e4f44e974e7cd85c6a991c15", "score": "0.67880267", "text": "protected function getValidatorService()\n {\n return $this->services['validator'] = new \\Symfony\\Component\\Validator\\Validator\\TraceableValidator(($this->privates['validator.builder'] ?? $this->getValidator_BuilderService())->getValidator());\n }", "title": "" }, { "docid": "9c5abd16edac79a1653d272403e44121", "score": "0.6784508", "text": "public function testIfValidatorClassIsset()\n {\n $app = new Application();\n $app->register(new ValidatorServiceProvider);\n\n $service = new ValidatorService($app['validator']);\n\n $service->validate(array('id' => 1, 'name' => '12345'));\n }", "title": "" }, { "docid": "5e85925cb2bcd6dbadda850d631d17dc", "score": "0.6742701", "text": "protected function _getValidator()\n {\n }", "title": "" }, { "docid": "0384648c97a275672a76ec6647d2816a", "score": "0.6708684", "text": "public function getValidator();", "title": "" }, { "docid": "933dfcd489508f4c75dd4fbb3b883fc3", "score": "0.6644902", "text": "protected function getApiPlatform_ValidatorService()\n {\n include_once \\dirname(__DIR__, 4).'/vendor/api-platform/core/src/Validator/ValidatorInterface.php';\n include_once \\dirname(__DIR__, 4).'/vendor/api-platform/core/src/Bridge/Symfony/Validator/Validator.php';\n\n return $this->privates['api_platform.validator'] = new \\ApiPlatform\\Core\\Bridge\\Symfony\\Validator\\Validator(($this->services['validator'] ?? $this->getValidatorService()), $this);\n }", "title": "" }, { "docid": "9cb34323cd4f823b9e6f4c67d0fa9ebb", "score": "0.6611737", "text": "protected function getForm_TypeGuesser_ValidatorService()\n {\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/form/FormTypeGuesserInterface.php';\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/form/Extension/Validator/ValidatorTypeGuesser.php';\n\n return $this->privates['form.type_guesser.validator'] = new \\Symfony\\Component\\Form\\Extension\\Validator\\ValidatorTypeGuesser(($this->services['validator'] ?? $this->getValidatorService()));\n }", "title": "" }, { "docid": "c34e497c7260c2baea6af9664ac12b19", "score": "0.6431836", "text": "private function getValidatorInstance(): ValidatorInterface\n {\n return Validation::createValidator();\n }", "title": "" }, { "docid": "91a58b86ee0695492d1da8fa71f56dd9", "score": "0.6427069", "text": "public function validator()\n {\n }", "title": "" }, { "docid": "7aed44a88b17f16517acf5008c277295", "score": "0.6421421", "text": "public function validator()\n {\n\n return AccountValidator::class;\n }", "title": "" }, { "docid": "8807058c4f7ad141ec91786d47f096d7", "score": "0.63707334", "text": "public function addValidator(Validator\\Validator $validator);", "title": "" }, { "docid": "595eec8d38e13172a3c4eeb0b3118c0b", "score": "0.63533956", "text": "public function validator()\n {\n\n return CategoriaServicoValidator::class;\n }", "title": "" }, { "docid": "614cf05806af67add9c5ee726f1f6e23", "score": "0.6343127", "text": "public function validator()\n {\n return EmployeeValidator::class;\n }", "title": "" }, { "docid": "10e2306151151c0a6fe01d4efbffeb30", "score": "0.6342129", "text": "public function validator()\n {\n return GoodsValidator::class;\n }", "title": "" }, { "docid": "32d757cf3c1108b812d29276423f441d", "score": "0.6310767", "text": "public function validator()\n {\n\n return FoodValidator::class;\n }", "title": "" }, { "docid": "5bd3955481465cbcc3a10714d84f27ca", "score": "0.6300438", "text": "protected function getForm_TypeExtension_Form_ValidatorService()\n {\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/form/FormTypeExtensionInterface.php';\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/form/AbstractTypeExtension.php';\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/form/Extension/Validator/Type/BaseValidatorExtension.php';\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/form/Extension/Validator/Type/FormTypeValidatorExtension.php';\n\n return $this->privates['form.type_extension.form.validator'] = new \\Symfony\\Component\\Form\\Extension\\Validator\\Type\\FormTypeValidatorExtension(($this->services['validator'] ?? $this->getValidatorService()));\n }", "title": "" }, { "docid": "c8fcd0d1e167a9984f075adcb183aedd", "score": "0.6284785", "text": "public function validator()\n {\n\n return ResourceValidator::class;\n }", "title": "" }, { "docid": "acd47e7db9f2da75e47391d96c6aeb1f", "score": "0.62658966", "text": "public function validator()\n {\n\n return PayValidator::class;\n }", "title": "" }, { "docid": "fc0825ea4bedadea9a20c9fd6e69c766", "score": "0.6262247", "text": "public function setValidator($validator);", "title": "" }, { "docid": "f722bf6164988b56e608244b0f3558fa", "score": "0.6227799", "text": "public function validator()\n {\n return \"Kerozn\\\\Modules\\\\Contact\\\\Validator\\\\ContactValidator\";\n }", "title": "" }, { "docid": "046af90314543afb07d7f118d0998482", "score": "0.6219975", "text": "public function validator()\n {\n\n return EscolaValidator::class;\n }", "title": "" }, { "docid": "a1983a6e8b2ab50e8fafdbab63b9929d", "score": "0.6208951", "text": "public function validate(ValidatorInterface $validator);", "title": "" }, { "docid": "e641f83fe933b93ebdd4e0ebf9f079d9", "score": "0.620204", "text": "private function getValidationFactory()\n {\n return app('validator');\n }", "title": "" }, { "docid": "83cbc4323ea63918771fd6827790cbbb", "score": "0.620173", "text": "public function validator()\n {\n\n return SegmentProductValidator::class;\n }", "title": "" }, { "docid": "0831669e054d5244b03f830ae8834aed", "score": "0.6200153", "text": "public function validator()\n {\n\n return MkAgendaGrupoValidator::class;\n }", "title": "" }, { "docid": "c607842b502ca8561b3f56925b995cf5", "score": "0.6187755", "text": "public function validator()\n {\n\n return EventoValidator::class;\n }", "title": "" }, { "docid": "053197727a94c3f96157868ed3a8bcc5", "score": "0.6185369", "text": "public function validator()\n {\n return UserValidator::class;\n }", "title": "" }, { "docid": "dbf5c62de7d527254537e9538beba900", "score": "0.61819696", "text": "public function validator()\n {\n\n return PlatformMoneyValidator::class;\n }", "title": "" }, { "docid": "94097bb861321ae80556eb66f766c437", "score": "0.61782473", "text": "public function getValidator()\n {\n return $this->call('validator');\n }", "title": "" }, { "docid": "af80af8ff63384a3aecd7a74803cf422", "score": "0.6134174", "text": "public function validator()\n {\n\n return PartnerValidator::class;\n }", "title": "" }, { "docid": "c43465d0b8d82fb29bb678c57d85670f", "score": "0.6133193", "text": "public function validator()\n {\n\n return PartnerContactValidator::class;\n }", "title": "" }, { "docid": "a2d72cb10b77102d068f25f5ac643b9b", "score": "0.61246943", "text": "protected function getValidator_BuilderService()\n {\n $this->privates['validator.builder'] = $instance = \\Symfony\\Component\\Validator\\Validation::createValidatorBuilder();\n\n $instance->setConstraintValidatorFactory(new \\Symfony\\Component\\Validator\\ContainerConstraintValidatorFactory(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('Symfony\\\\Bridge\\\\Doctrine\\\\Validator\\\\Constraints\\\\UniqueEntityValidator' => function () {\n return ($this->privates['doctrine.orm.validator.unique'] ?? $this->load('getDoctrine_Orm_Validator_UniqueService.php'));\n }, 'Symfony\\\\Component\\\\Security\\\\Core\\\\Validator\\\\Constraints\\\\UserPasswordValidator' => function () {\n return ($this->privates['security.validator.user_password'] ?? $this->load('getSecurity_Validator_UserPasswordService.php'));\n }, 'Symfony\\\\Component\\\\Validator\\\\Constraints\\\\EmailValidator' => function () {\n return ($this->privates['validator.email'] ?? $this->privates['validator.email'] = new \\Symfony\\Component\\Validator\\Constraints\\EmailValidator('html5'));\n }, 'Symfony\\\\Component\\\\Validator\\\\Constraints\\\\ExpressionValidator' => function () {\n return ($this->privates['validator.expression'] ?? $this->privates['validator.expression'] = new \\Symfony\\Component\\Validator\\Constraints\\ExpressionValidator());\n }, 'doctrine.orm.validator.unique' => function () {\n return ($this->privates['doctrine.orm.validator.unique'] ?? $this->load('getDoctrine_Orm_Validator_UniqueService.php'));\n }, 'security.validator.user_password' => function () {\n return ($this->privates['security.validator.user_password'] ?? $this->load('getSecurity_Validator_UserPasswordService.php'));\n }, 'validator.expression' => function () {\n return ($this->privates['validator.expression'] ?? $this->privates['validator.expression'] = new \\Symfony\\Component\\Validator\\Constraints\\ExpressionValidator());\n }))));\n $instance->setTranslator(($this->services['translator'] ?? $this->getTranslatorService()));\n $instance->setTranslationDomain('validators');\n $instance->enableAnnotationMapping(($this->privates['annotations.cached_reader'] ?? $this->getAnnotations_CachedReaderService()));\n $instance->addMethodMapping('loadValidatorMetadata');\n $instance->setMetadataCache(new \\Symfony\\Component\\Validator\\Mapping\\Cache\\Psr6Cache(\\Symfony\\Component\\Cache\\Adapter\\PhpArrayAdapter::create(($this->targetDirs[0].'/validation.php'), ($this->privates['cache.validator'] ?? $this->getCache_ValidatorService()))));\n $instance->addObjectInitializers(array(0 => new \\Symfony\\Bridge\\Doctrine\\Validator\\DoctrineInitializer(($this->services['doctrine'] ?? $this->getDoctrineService()))));\n\n return $instance;\n }", "title": "" }, { "docid": "f5042b9fc304028c8bdfba47c36542fb", "score": "0.61181104", "text": "public function validator()\n {\n\n return EventValidator::class;\n }", "title": "" }, { "docid": "7e7e2823261c488b55825cf115e496c3", "score": "0.61178905", "text": "public function getValidator() {\r\n return $this->validator;\r\n }", "title": "" }, { "docid": "d7b6286d7019a100b8e3caa8c500513b", "score": "0.6101177", "text": "public function validator()\n {\n\n return CatalogsValidator::class;\n }", "title": "" }, { "docid": "83317c2dea761a4e44b82c527cf9d90b", "score": "0.6086148", "text": "public function validator()\n {\n\n return ConvidadoValidator::class;\n }", "title": "" }, { "docid": "defab0e88715eaf88ed1ad43ba965eb8", "score": "0.60794437", "text": "public function validator()\n {\n\n return LostAndFoundValidator::class;\n }", "title": "" }, { "docid": "dea79edc37f43e8fae99b4946601accf", "score": "0.6078396", "text": "public function validator(): callable;", "title": "" }, { "docid": "c31ad4fe966ea1147db4009207064857", "score": "0.607502", "text": "public function withValidator($validator)\n {\n }", "title": "" }, { "docid": "2071a5805a8ff7d08eeb1f826b94a5b1", "score": "0.6070704", "text": "public function getValidatorClass()\n {\n return $this->config['validation'];\n }", "title": "" }, { "docid": "449b4e816c01af3054ad141591507d92", "score": "0.6060659", "text": "protected function getValidationFactory()\n {\n return \\Yii::$app->validator;\n }", "title": "" }, { "docid": "5b5e80a3cd45a5b4165f0f9c9d57f570", "score": "0.60604507", "text": "public function setValidator(Factory $validator);", "title": "" }, { "docid": "ed2490a0a34f1ca1d6ead2ef69daf8ab", "score": "0.6056557", "text": "public function validator($resource=null);", "title": "" }, { "docid": "ff5d89db662356f3629b09cebcc6d429", "score": "0.60527223", "text": "protected function getValidator_BuilderService()\n {\n $this->privates['validator.builder'] = $instance = \\Symfony\\Component\\Validator\\Validation::createValidatorBuilder();\n\n $a = ($this->privates['property_info'] ?? $this->getPropertyInfoService());\n\n $instance->setConstraintValidatorFactory(new \\Symfony\\Component\\Validator\\ContainerConstraintValidatorFactory(new \\Symfony\\Component\\DependencyInjection\\Argument\\ServiceLocator($this->getService, [\n 'Symfony\\\\Bridge\\\\Doctrine\\\\Validator\\\\Constraints\\\\UniqueEntityValidator' => ['privates', 'doctrine.orm.validator.unique', 'getDoctrine_Orm_Validator_UniqueService', false],\n 'Symfony\\\\Component\\\\Security\\\\Core\\\\Validator\\\\Constraints\\\\UserPasswordValidator' => ['privates', 'security.validator.user_password', 'getSecurity_Validator_UserPasswordService', false],\n 'Symfony\\\\Component\\\\Validator\\\\Constraints\\\\EmailValidator' => ['privates', 'validator.email', 'getValidator_EmailService', false],\n 'Symfony\\\\Component\\\\Validator\\\\Constraints\\\\ExpressionValidator' => ['privates', 'validator.expression', 'getValidator_ExpressionService', false],\n 'Symfony\\\\Component\\\\Validator\\\\Constraints\\\\NotCompromisedPasswordValidator' => ['privates', 'validator.not_compromised_password', 'getValidator_NotCompromisedPasswordService', false],\n 'doctrine.orm.validator.unique' => ['privates', 'doctrine.orm.validator.unique', 'getDoctrine_Orm_Validator_UniqueService', false],\n 'security.validator.user_password' => ['privates', 'security.validator.user_password', 'getSecurity_Validator_UserPasswordService', false],\n 'validator.expression' => ['privates', 'validator.expression', 'getValidator_ExpressionService', false],\n ], [\n 'Symfony\\\\Bridge\\\\Doctrine\\\\Validator\\\\Constraints\\\\UniqueEntityValidator' => '?',\n 'Symfony\\\\Component\\\\Security\\\\Core\\\\Validator\\\\Constraints\\\\UserPasswordValidator' => '?',\n 'Symfony\\\\Component\\\\Validator\\\\Constraints\\\\EmailValidator' => '?',\n 'Symfony\\\\Component\\\\Validator\\\\Constraints\\\\ExpressionValidator' => '?',\n 'Symfony\\\\Component\\\\Validator\\\\Constraints\\\\NotCompromisedPasswordValidator' => '?',\n 'doctrine.orm.validator.unique' => '?',\n 'security.validator.user_password' => '?',\n 'validator.expression' => '?',\n ])));\n $instance->setTranslator(new \\Symfony\\Component\\Validator\\Util\\LegacyTranslatorProxy(($this->services['translator'] ?? $this->getTranslatorService())));\n $instance->setTranslationDomain('validators');\n $instance->addXmlMappings([0 => (\\dirname(__DIR__, 4).'/vendor/symfony/form/Resources/config/validation.xml'), 1 => (\\dirname(__DIR__, 4).'/vendor/friendsofsymfony/user-bundle/Resources/config/validation.xml'), 2 => (\\dirname(__DIR__, 4).'/vendor/payum/payum-bundle/Resources/config/validation.xml')]);\n $instance->enableAnnotationMapping(($this->privates['annotations.cached_reader'] ?? $this->getAnnotations_CachedReaderService()));\n $instance->addMethodMapping('loadValidatorMetadata');\n $instance->addObjectInitializers([0 => new \\Symfony\\Bridge\\Doctrine\\Validator\\DoctrineInitializer(($this->services['doctrine'] ?? $this->getDoctrineService())), 1 => new \\FOS\\UserBundle\\Validator\\Initializer(($this->privates['fos_user.util.canonical_fields_updater'] ?? $this->getFosUser_Util_CanonicalFieldsUpdaterService()))]);\n $instance->addLoader(new \\Symfony\\Component\\Validator\\Mapping\\Loader\\PropertyInfoLoader($a, $a, $a, NULL));\n $instance->addLoader(new \\Symfony\\Bridge\\Doctrine\\Validator\\DoctrineLoader(($this->services['doctrine.orm.default_entity_manager'] ?? $this->getDoctrine_Orm_DefaultEntityManagerService()), NULL));\n $instance->addXmlMapping((\\dirname(__DIR__, 4).'/vendor/friendsofsymfony/user-bundle/DependencyInjection/Compiler/../../Resources/config/storage-validation/orm.xml'));\n\n return $instance;\n }", "title": "" }, { "docid": "73f822a5bbb4dea52a764ec96c9a9b27", "score": "0.60510725", "text": "public function validator()\n {\n\n return MissionValidator::class;\n }", "title": "" }, { "docid": "a320c2793373d44cadfcfea66ef1312c", "score": "0.603579", "text": "public function validator()\n {\n\n return MessageValidator::class;\n }", "title": "" }, { "docid": "bdb6606d374ab80d6348447b9ff8e98c", "score": "0.60327613", "text": "function getValidator() {\r\n return $this->validator;\r\n }", "title": "" }, { "docid": "68b2fc9123328301cbc9bec741d8c65e", "score": "0.60324645", "text": "public function validator()\n {\n\n return OrderProductValidator::class;\n }", "title": "" }, { "docid": "1766e5d22bdfe5625642cd581b59eb51", "score": "0.6015738", "text": "public function validationUser(Validator $validator)\n {\n }", "title": "" }, { "docid": "68d301ed2abcd0f9f754fdbf6c7180a5", "score": "0.6015583", "text": "public function validator()\n {\n\n return CoworkerValidator::class;\n }", "title": "" }, { "docid": "94763e5342d0b27865d3643acef0ad59", "score": "0.60048395", "text": "protected function getApiPlatform_Listener_View_ValidateService()\n {\n include_once \\dirname(__DIR__, 4).'/vendor/api-platform/core/src/Validator/EventListener/ValidateListener.php';\n\n return $this->privates['api_platform.listener.view.validate'] = new \\ApiPlatform\\Core\\Validator\\EventListener\\ValidateListener(($this->privates['api_platform.validator'] ?? $this->getApiPlatform_ValidatorService()), ($this->privates['api_platform.metadata.resource.metadata_factory.cached'] ?? $this->getApiPlatform_Metadata_Resource_MetadataFactory_CachedService()));\n }", "title": "" }, { "docid": "50691d132f885b2fb97ac1f8486a971e", "score": "0.60013485", "text": "public function validator()\n {\n\n return PartnerProductValidator::class;\n }", "title": "" }, { "docid": "c96c6efb8ec5d1f566fa59a2399bf830", "score": "0.59878784", "text": "public function addValidator(Validator $validator);", "title": "" }, { "docid": "d962d0c8c07ee31b445ed6a949b1bcd7", "score": "0.5986058", "text": "public function validator()\n {\n\n return WithdrawalValidator::class;\n }", "title": "" }, { "docid": "b3ab711c1f7901349486426cdd372070", "score": "0.5983577", "text": "public function validate(validator &$validator);", "title": "" }, { "docid": "1ea8ce6d7725bfeecdf79d31c3d4bd61", "score": "0.59822065", "text": "public function getPaymentValidator()\n {\n }", "title": "" }, { "docid": "62615e1c2b08c6c4894934df71751429", "score": "0.5980647", "text": "public function validator()\n {\n\n return ClientLocationValidator::class;\n }", "title": "" }, { "docid": "968a6d23bc917831ed21df0a46143c6c", "score": "0.5980409", "text": "public function addValidator(ValidatorInterface $validator);", "title": "" }, { "docid": "a1f3cc4042c439059c36e0d6226cb138", "score": "0.5966177", "text": "public function registerValidators ($validatorManager)\n {\n\n }", "title": "" }, { "docid": "a98a14cf5c1cd71d233e6140339c0316", "score": "0.59640086", "text": "public function setValidator(ValidatorInterface $validator): void;", "title": "" }, { "docid": "fe217349be872deb7ff6b49ce77b435c", "score": "0.59618586", "text": "public function getValidator(): ValidatorInterface\n {\n return $this->validator;\n }", "title": "" }, { "docid": "ea23a42d1bd4d2b6e8456287d0ef728f", "score": "0.59556353", "text": "public function validator()\n {\n\n return ProjectValidator::class;\n }", "title": "" }, { "docid": "9d52af1d2d27f8737f93c5c95c316663", "score": "0.59550637", "text": "public function validator()\n {\n\n return CarrinhoValidator::class;\n }", "title": "" }, { "docid": "997dc9069764364396083725628096f6", "score": "0.595082", "text": "public function validator()\n {\n\n return TodoListValidator::class;\n }", "title": "" }, { "docid": "21a8aeecd6052cdef60cc915382342d3", "score": "0.5948363", "text": "public function validator()\n {\n\n return BookingRoomValidator::class;\n }", "title": "" }, { "docid": "c97bcbbce26c442ba80651f52635f7bf", "score": "0.59473866", "text": "public function validator()\n {\n return LoanManagementValidator::class;\n }", "title": "" }, { "docid": "12c011e7312b631a732b5b7def81ac31", "score": "0.5945635", "text": "protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }", "title": "" }, { "docid": "12c011e7312b631a732b5b7def81ac31", "score": "0.5945635", "text": "protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }", "title": "" }, { "docid": "fe0810f230bed1398be485b0697ec207", "score": "0.5945186", "text": "public function validator()\n {\n\n return TecnicoValidator::class;\n }", "title": "" }, { "docid": "430163c48764a3e8b6b078ed54496ea5", "score": "0.59443766", "text": "public function validator()\n {\n\n return DemandValidator::class;\n }", "title": "" }, { "docid": "0fbd26a07901373e2bf4e2744c2c6e93", "score": "0.5943044", "text": "public function __construct()\n {\n $this->validator = new Validator;\n }", "title": "" }, { "docid": "da6ffe3a6b4a0c12e6743c35c810c5fc", "score": "0.5942376", "text": "public function testDefaultValidation()\n {\n $service = $this->getMockService();\n $service->validate(array('id' => 1, 'name' => '12345'));\n\n $this->assertFalse($service->hasErrors());\n }", "title": "" }, { "docid": "3fe1c3e650ebcf350c07875f86c3ba5a", "score": "0.5938538", "text": "public function validation_form_service_via_api()\n {\n $this->form_validation(\n [\n [\n 'field' => 'name_service',\n 'label' => lang(\"input_name\"),\n 'rules' => 'required',\n 'errors' => [\n 'required' => lang(\"error_empty_field\"),\n ],\n ],\n [\n 'field' => 'category_service',\n 'label' => lang(\"menu_category\"),\n 'rules' => 'numeric|callback_select_validation[' . lang(\"error_no_select_category\") . ']',\n 'errors' => [\n 'numeric' => lang(\"error_only_numbers\"),\n ],\n ],\n [\n 'field' => 'price_service',\n 'label' => lang(\"price_per_1k\"),\n 'rules' => 'required',\n 'errors' => [\n 'required' => lang(\"error_empty_field\"),\n ],\n ],\n ]\n );\n }", "title": "" }, { "docid": "315c1faf3b8990da9c15fe58b964a905", "score": "0.5934252", "text": "public function validatedBy(): string\n {\n return $this->service;\n }", "title": "" }, { "docid": "986db81f8c6a8266fdd8b11f1eb28c3c", "score": "0.5927032", "text": "public function validator()\n {\n\n return PaymentMethodValidator::class;\n }", "title": "" }, { "docid": "2135f2011b123e5ccb18b7ab84d0126f", "score": "0.5925209", "text": "public function validator()\n {\n\n return CompaniesValidator::class;\n }", "title": "" }, { "docid": "5617997540ef47c2c3aec2b13eac67c6", "score": "0.59250796", "text": "public function validator()\n {\n return $this->validator;\n }", "title": "" }, { "docid": "d52bd6cf02c270190a059691851a930e", "score": "0.5922347", "text": "public function validator()\n {\n\n return AlbumValidator::class;\n }", "title": "" }, { "docid": "f6f927cabc56197f022fe95e5b4c3499", "score": "0.59201056", "text": "public static function registerValidator( $name )\r\n\t{\r\n\t\tarray_push( self::$registered_validators, $name );\r\n\t\tself::$registered_validators = array_unique(self::$registered_validators);\r\n\t}", "title": "" }, { "docid": "f0ce73723ff2c19b98820cbe621f853f", "score": "0.5919709", "text": "public function validator()\n {\n\n return StudentClassValidator::class;\n }", "title": "" }, { "docid": "f64dd74f376786cc2718f49479bf688a", "score": "0.59192526", "text": "public function validator()\n {\n\n return BannerRotativoValidator::class;\n }", "title": "" }, { "docid": "b1b7330c562a5dc5d6e9cc7d3d7c2c9b", "score": "0.59173703", "text": "public function validator()\n {\n\n return GroupValidator::class;\n }", "title": "" }, { "docid": "22743078a9070efb1942178f3f4d19a0", "score": "0.5916372", "text": "function setValidator($validator) {\r\n $this->validator = $validator;\r\n }", "title": "" }, { "docid": "b80e7c17c3b97ab50ae0c8a2af893c42", "score": "0.59110564", "text": "protected function getValidatorInstance()\n {\n return parent::getValidatorInstance();\n }", "title": "" }, { "docid": "b80e7c17c3b97ab50ae0c8a2af893c42", "score": "0.59110564", "text": "protected function getValidatorInstance()\n {\n return parent::getValidatorInstance();\n }", "title": "" }, { "docid": "d2bfba50d3fedee7a5f270feab5cda9a", "score": "0.59096575", "text": "public function validator()\n {\n\n return TestEntityValidator::class;\n }", "title": "" }, { "docid": "33c4078c2867c9f5bbcfd7465db513a6", "score": "0.5904749", "text": "protected function _createValidator()\n\t{\n\t\treturn new Validator();\n\t}", "title": "" }, { "docid": "ed58f6ca57693418d3697062ebb141e8", "score": "0.58997047", "text": "public function validator()\n {\n\n return PropertyValidator::class;\n }", "title": "" }, { "docid": "724dae839c023daeb84c8d1cc8ec27cc", "score": "0.5890404", "text": "public function validator()\n {\n\n return BeerItemValidator::class;\n }", "title": "" }, { "docid": "687f56e3050d373972e4649698062c17", "score": "0.58872235", "text": "public function getValidator()\n {\n return $this->validator;\n }", "title": "" }, { "docid": "687f56e3050d373972e4649698062c17", "score": "0.58872235", "text": "public function getValidator()\n {\n return $this->validator;\n }", "title": "" }, { "docid": "687f56e3050d373972e4649698062c17", "score": "0.58872235", "text": "public function getValidator()\n {\n return $this->validator;\n }", "title": "" }, { "docid": "3f7533a6267099f508d00c69251f81ff", "score": "0.5886084", "text": "public function withValidator($validator)\n {\n \n }", "title": "" }, { "docid": "712fb61680cd89802d43e09df8104c69", "score": "0.58796054", "text": "public function validator()\n {\n\n return VoterValidator::class;\n }", "title": "" }, { "docid": "35d62cb29ba1461a388a4527c0ece6cb", "score": "0.5877671", "text": "public function validator()\n {\n return ProjetoValidator::class;\n }", "title": "" }, { "docid": "2351b5cdedb02e99fda7d9567167a6dd", "score": "0.5876024", "text": "public function validator()\n {\n\n return JogadorValidator::class;\n }", "title": "" }, { "docid": "00dd45a25332479fdfc7a5f2267cf21b", "score": "0.5873644", "text": "public function validatedBy()\r\n {\r\n return get_class($this).'Validator';\r\n }", "title": "" } ]
fff3f69ebd89107fdfe3a9d4d9ecb7cc
Removes properties that should not appear in the current request's context $context is a Core REST API Framework request attribute that is always one of: view (what you see on the blog) edit (what you see in an editor) embed (what you see in, e.g., an oembed) Fields (and subfields, and subsub...) can be flagged for a set of specific contexts via the field's schema. The Core API will filter out toplevel fields with the wrong context, but will not recurse deeply enough into arrays/objects to remove all levels of subfields with the wrong context. This function handles that recursion.
[ { "docid": "30ac4efd4431a136cabc129695773358", "score": "0.54495615", "text": "final public function filter_response_by_context( $value, $schema, $context ) {\n\t\tif ( ! $this->is_valid_for_context( $schema, $context ) ) {\n\t\t\t// We use this intentionally odd looking WP_Error object\n\t\t\t// internally only in this recursive function (see below\n\t\t\t// in the `object` case). It will never be output by the REST API.\n\t\t\t// If we return this for the top level object, Core\n\t\t\t// correctly remove the top level object from the response\n\t\t\t// for us.\n\t\t\treturn new WP_Error( '__wrong-context__' );\n\t\t}\n\n\t\tswitch ( $schema['type'] ) {\n\t\t\tcase 'array':\n\t\t\t\tif ( ! isset( $schema['items'] ) ) {\n\t\t\t\t\treturn $value;\n\t\t\t\t}\n\n\t\t\t\t// Shortcircuit if we know none of the items are valid for this context.\n\t\t\t\t// This would only happen in a strangely written schema.\n\t\t\t\tif ( ! $this->is_valid_for_context( $schema['items'], $context ) ) {\n\t\t\t\t\treturn array();\n\t\t\t\t}\n\n\t\t\t\t// Recurse to prune sub-properties of each item.\n\t\t\t\tforeach ( $value as $key => $item ) {\n\t\t\t\t\t$value[ $key ] = $this->filter_response_by_context( $item, $schema['items'], $context );\n\t\t\t\t}\n\n\t\t\t\treturn $value;\n\t\t\tcase 'object':\n\t\t\t\tif ( ! isset( $schema['properties'] ) ) {\n\t\t\t\t\treturn $value;\n\t\t\t\t}\n\n\t\t\t\tforeach ( $value as $field_name => $field_value ) {\n\t\t\t\t\tif ( isset( $schema['properties'][ $field_name ] ) ) {\n\t\t\t\t\t\t$field_value = $this->filter_response_by_context( $field_value, $schema['properties'][ $field_name ], $context );\n\t\t\t\t\t\tif ( is_wp_error( $field_value ) && '__wrong-context__' === $field_value->get_error_code() ) {\n\t\t\t\t\t\t\tunset( $value[ $field_name ] );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Respect recursion that pruned sub-properties of each property.\n\t\t\t\t\t\t\t$value[ $field_name ] = $field_value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn (object) $value;\n\t\t}\n\n\t\treturn $value;\n\t}", "title": "" } ]
[ { "docid": "b6a8a52c0e744fcb50d5a46205e12df2", "score": "0.53786653", "text": "public function getContextFields();", "title": "" }, { "docid": "0ae31e5a7fe4e10269a5433feab22059", "score": "0.5227739", "text": "protected function removeExtraFields(Request $request, Form $form)\n {\n $data = $request->request->all();\n $children = $form->all();\n $data = array_intersect_key($data, $children);\n $request->request->replace($data);\n }", "title": "" }, { "docid": "f52089c37242c0d053bc576e45b0966e", "score": "0.51228464", "text": "private static function _cleanContext($context) \n {\n $newContext = array();\n\n foreach ($context as $key => $var) {\n if (array_search($key, self::$_superGlobals) === false) {\n switch (true) {\n case is_object($var):\n $newContext[$key] = 'instance of ' . get_class($var);\n break;\n case is_array($var):\n $newContext[$key] = 'array[' . count($var) . ']';\n break;\n default:\n $newContext[$key] = $var;\n break;\n }\n }\n }\n\n return $newContext;\n }", "title": "" }, { "docid": "169e105bdc7a8ee74e017e4d98e51468", "score": "0.49657845", "text": "public function getFieldsByContext($context)\n\t{\n\t\treturn $this->getFields($this->getFieldNamesByContext($context));\n\t}", "title": "" }, { "docid": "3486a308d8d0b9682f718a7985378c07", "score": "0.4622256", "text": "public function filterFields($fields, $context = null)\n {\n $values = post('InvoiceFields');\n $tax_id = (int)$values['tax_id'];\n $price_ht = (float)$values['price_ht'];\n if($tax_id == 0)\n {\n $tax_id = (int)$this->getTaxIdAttribute();\n }\n\n if($context == 'update')\n {\n $field_id = (int)post('manage_id');\n $field = InvoiceFields::find($field_id);\n $tax_id = $field->tax->id;\n }\n $calculator = new Calculator((float)$price_ht, Tax::find($tax_id));\n if($values){\n $fields->price_ttc->value = $calculator->getPriceTTC();\n }\n \n\n }", "title": "" }, { "docid": "c54a793b8b6a85c3092f85cdf43f21fa", "score": "0.46085867", "text": "private static function remove_keys_not_in_schema( $tree, $schema ) {\n\t\t$tree = array_intersect_key( $tree, $schema );\n\n\t\tforeach ( $schema as $key => $data ) {\n\t\t\tif ( ! isset( $tree[ $key ] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( is_array( $schema[ $key ] ) && is_array( $tree[ $key ] ) ) {\n\t\t\t\t$tree[ $key ] = self::remove_keys_not_in_schema( $tree[ $key ], $schema[ $key ] );\n\n\t\t\t\tif ( empty( $tree[ $key ] ) ) {\n\t\t\t\t\tunset( $tree[ $key ] );\n\t\t\t\t}\n\t\t\t} elseif ( is_array( $schema[ $key ] ) && ! is_array( $tree[ $key ] ) ) {\n\t\t\t\tunset( $tree[ $key ] );\n\t\t\t}\n\t\t}\n\n\t\treturn $tree;\n\t}", "title": "" }, { "docid": "39bf206a00f1a528d34a704c5692c8d9", "score": "0.4543147", "text": "public function set_context(\\context $context) : \\core_privacy\\local\\request\\content_writer {\n $this->context = $context;\n\n if (isset($this->data->{$this->context->id}) && empty((array) $this->data->{$this->context->id})) {\n $this->data->{$this->context->id} = (object) [\n 'children' => (object) [],\n 'data' => [],\n ];\n }\n\n if (isset($this->relateddata->{$this->context->id}) && empty((array) $this->relateddata->{$this->context->id})) {\n $this->relateddata->{$this->context->id} = (object) [\n 'children' => (object) [],\n 'data' => [],\n ];\n }\n\n if (isset($this->metadata->{$this->context->id}) && empty((array) $this->metadata->{$this->context->id})) {\n $this->metadata->{$this->context->id} = (object) [\n 'children' => (object) [],\n 'data' => [],\n ];\n }\n\n if (isset($this->files->{$this->context->id}) && empty((array) $this->files->{$this->context->id})) {\n $this->files->{$this->context->id} = (object) [\n 'children' => (object) [],\n 'data' => [],\n ];\n }\n\n if (isset($this->customfiles->{$this->context->id}) && empty((array) $this->customfiles->{$this->context->id})) {\n $this->customfiles->{$this->context->id} = (object) [\n 'children' => (object) [],\n 'data' => [],\n ];\n }\n\n if (isset($this->userprefs->{$this->context->id}) && empty((array) $this->userprefs->{$this->context->id})) {\n $this->userprefs->{$this->context->id} = (object) [\n 'children' => (object) [],\n 'data' => [],\n ];\n }\n\n return $this;\n }", "title": "" }, { "docid": "37babdc14b8905ce6efca7ad479395cb", "score": "0.45291102", "text": "function _set_context($context){\n $default = array(\n 'object' => NULL,\n 'child_object' => NULL,\n 'field' => NULL,\n 'delta' => NULL,\n 'raw_value' => NULL,\n 'value_to_insert' => NULL,\n 'schema' => NULL\n );\n $this->_build_context[] = (object)array_merge($default, $context);\n }", "title": "" }, { "docid": "a1c59cc571f26f75affe3619647ba37c", "score": "0.45175833", "text": "public function getModelFields($context, $new);", "title": "" }, { "docid": "2a97cbdbf72c53acf5d21f33d74e3ff4", "score": "0.4466138", "text": "public function navigationPreRender($context) {\n\t\treturn;\n\t\tforeach ($context['navigation'] as $key => $value) {\n\t\t\tif ($value['children'][0]['section']['handle'] == 'general-info'){\n\t\t\t\t//if general info link directly to group info - if it does not exist create a new general info entry\n\n\t\t\t\t$groupID = $this->getCurrentGroup();\n\t\t\t\t$fieldID = $this->getMainSectionPrimaryFieldId();\n\t\t\t\t$joins .= \" LEFT JOIN `tbl_entries_data_{$fieldID}` AS `group_lock_{$fieldID}` ON (`e`.`id` = `group_lock_{$fieldID}`.entry_id)\";\n\t\t\t\t$where .= \" AND (`group_lock_{$fieldID}`.relation_id = ('{$groupID}') )\";\n\t\t\t\t$entry = current(EntryManager::fetch(null,12,1,0,$where,$joins));\n\n\t\t\t\tif($entry){\n\t\t\t\t\t$context['navigation'][$key]['children'][0]['link'] .= 'edit/'. $entry->get('id') .'/';\n\t\t\t\t} else {\n\t\t\t\t\t$context['navigation'][$key]['children'][0]['link'] .= 'new/';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($value['children'][0]['section']['handle'] == 'groups' && ! ($this->superseedsPermissions())){\n\t\t\t\t//if not a developer or manager hide the groups section from the navigation\n\t\t\t\tunset($context['navigation'][$key]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4e2dd8e9fc9e748126849dfd8816af3c", "score": "0.4459784", "text": "public function remove($context)\n {\n $this->replace($context, '');\n\n return $this;\n }", "title": "" }, { "docid": "4a504792fbdbb9ef90b1306a2aae05c3", "score": "0.4443506", "text": "protected function walkField(Field $field, $context)\n\t{\n\t\t$method = 'walkField' . ucfirst($context['blueprint']['type']);\n\t\t$method = method_exists($this, $method) ? $method : 'walkFieldDefault';\n\t\treturn $this->$method($field, $context);\n\t}", "title": "" }, { "docid": "9c98deb1cdb6d63a75c506038c449491", "score": "0.44250685", "text": "function remove_traces(){\n\t\tself::$fields = null;\n\t}", "title": "" }, { "docid": "6f35d7c16ed218da6c0c2100d01e94b7", "score": "0.44210213", "text": "protected function walkContent(Content $content, array $context)\n\t{\n\t\t$data = null;\n\n\t\t// Needed when walking over structure or block entries. Otherwise, the\n\t\t// entry's fields are treated as structure/block entries in\n\t\t// `findMatchingEntry()` and expected to have `id` fields.\n\t\tunset($context['blueprint']);\n\n\t\tif (empty($context['fields'])) {\n\t\t\tthrow new Error('Missing fields context');\n\t\t}\n\n\t\tforeach ($context['fields'] as $key => $blueprint) {\n\t\t\t$field = $content->get($key);\n\t\t\t$blueprintOptions = $blueprint['walker'] ?? null;\n\n\t\t\tif ($blueprintOptions === false) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$fieldContext = $this->subcontext('key', $key, $context);\n\t\t\t$fieldContext['blueprint'] = $blueprint;\n\n\t\t\tif (is_array($blueprintOptions)) {\n\t\t\t\t$fieldContext['options'] = array_replace_recursive(\n\t\t\t\t\t$fieldContext['options'] ?? [],\n\t\t\t\t\t$blueprintOptions\n\t\t\t\t);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t$fieldData = $this->walkField($field, $fieldContext);\n\t\t\t} catch (Throwable $e) {\n\t\t\t\tthrow new Exception('Could not walk field ' . $field->key(), 2, $e);\n\t\t\t}\n\n\t\t\tif ($fieldData !== null) {\n\t\t\t\t$data[$key] = $fieldData;\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "6e6c87bd4cda5626c47ad7be7e7c167a", "score": "0.4377505", "text": "public static function extract_property($context) {\n $value = (string) $context;\n $level1 = explode(' ', $value);\n $level2 = explode('->', $level1[0]);\n if (count($level2) != 2) {\n return NULL;\n }\n return [\n 'name' => ltrim($level2[0], '\\\\'),\n 'property' => $level2[1]\n ];\n }", "title": "" }, { "docid": "9347f5f6609f2d49ae1870309a86cde1", "score": "0.43710634", "text": "function removeDefaultCustomFields( $type, $context, $post ) {\n\t\t\tforeach ( array( 'normal', 'advanced', 'side' ) as $context ) {\n\t\t\t\tremove_meta_box( 'postcustom', 'post', $context );\n\t\t\t\tremove_meta_box( 'pagecustomdiv', 'page', $context );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "bdc3a24b4c5682042f3e73a4751c719a", "score": "0.43622747", "text": "public function trimUnusedColumns(bool $foreign=false, int $recursion_depth=0):int{\n\t$f = __METHOD__;\n\ttry{\n\t$print = false;\n\t$trim = app()->getUseCase()->getTrimmableColumnNames($this);\n\tif($trim === null){\n\t$trimmed = 0;\n\t}else{\n\t$trimmed = count($trim);\n\t}\n\tif($trimmed > 0){\n\tif($print){\n\tDebug::print(\"{$f} about to drop the following columns:\");\n\tDebug::printArray($trim);\n\t}\n\tforeach($trim as $column_name){\n\t$this->getColumn($column_name)->dispose();\n\t$this->unsetArrayPropertyValue(\"columns\", $column_name);\n\t}\n\t//$this->setColumns(array_remove_keys($this->getColumns(), $trim));\n\t}elseif($print){\n\tDebug::print(\"{$f} there are no columns to trim\");\n\t}\n\t$this->setTrimmedFlag(true);\n\tif($foreign && $recursion_depth > 0){\n\tif(\n\tisset($this->foreignDataStructures)\n\t&& is_array($this->foreignDataStructures)\n\t&& !empty($this->foreignDataStructures)\n\t){\n\tforeach($this->foreignDataStructures as $key => $value){\n\tif(is_array($value)){\n\tforeach($value as $fds){\n\tif($fds->getTrimmedFlag()){\n\tcontinue;\n\t}\n\t$fds->trimUnusedColumns($foreign, $recursion_depth-1);\n\t}\n\t}else{\n\tif($value->getTrimmedFlag()){\n\tcontinue;\n\t}\n\t$value->trimUnusedColumns($foreign, $recursion_depth-1);\n\t}\n\t}\n\t}\n\t}\n\treturn $trimmed;\n\t}catch(Exception $x){\n\tx($f, $x);\n\t}\n\t}", "title": "" }, { "docid": "fd63c8d204adddb338e542a8aee08bd6", "score": "0.43426338", "text": "public function delete_data_for_all_users_in_context(\\context $context) {\n $progress = static::get_log_tracer();\n\n $components = $this->get_component_list();\n $a = (object) [\n 'total' => count($components),\n 'progress' => 0,\n 'component' => '',\n 'datetime' => userdate(time()),\n ];\n\n $progress->output(get_string('trace:deletingcontext', 'core_privacy', $a), 1);\n foreach ($this->get_component_list() as $component) {\n $a->component = $component;\n $a->progress++;\n $a->datetime = userdate(time());\n $progress->output(get_string('trace:processingcomponent', 'core_privacy', $a), 2);\n\n // If this component knows about specific data that it owns,\n // have it delete all of that user data for the context.\n $this->handled_component_class_callback($component, core_user_data_provider::class,\n 'delete_data_for_all_users_in_context', [$context]);\n\n // Delete any shared user data it doesn't know about.\n local\\request\\helper::delete_data_for_all_users_in_context($component, $context);\n }\n $progress->output(get_string('trace:done', 'core_privacy'), 1);\n }", "title": "" }, { "docid": "13361e4b3a84e9f9c9a77d0df0e6edee", "score": "0.43404776", "text": "protected function removeFields()\n {\n // logged in. In neither case is it appropriate for\n // the user to get to pick an existing userid. The user\n // also doesn't get to modify the validate field which\n // is part of how their account is verified by email.\n\n unset($this['user_id'], $this['validate'], $this['validate_at'],\n $this['created_at'], $this['updated_at'], $this['email_new']);\n\n }", "title": "" }, { "docid": "f22057bf589362f235033562d9702e28", "score": "0.43128613", "text": "function wpd_specialty_request_filter( $request ){\n\t if( array_key_exists( 'specialty_taxonomies' , $request )\n\t && ! get_term_by( 'slug', $request['specialty_taxonomies'], 'specialty_taxonomies' ) ){\n\t $request['specialty'] = $request['specialty_taxonomies'];\n\t $request['name'] = $request['specialty_taxonomies'];\n\t $request['post_type'] = 'specialty';\n\t unset( $request['specialty_taxonomies'] );\n\t }\n\t return $request;\n\t}", "title": "" }, { "docid": "49f0eb7d4ea4fb4b94a11095373f27c2", "score": "0.43122035", "text": "function bh_remove_empty_pgparent($post_id) {\n\t// verify this is not an auto save routine. \n if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) return;\n //authentication checks\n if (!current_user_can('edit_post', $post_id)) return;\n\t //obtain custom field meta for this post\n\tif(get_post_type($post_id)=='products'):\n\t $key = 'wpcf-product-group-parent';\n $pgparent = get_post_meta($post_id,$key,true);\n\t \t if(empty($pgparent)){\n\t\t delete_post_meta($post_id,$key); //Remove post's custom field\n\t\t }\n\t\t endif;\n}", "title": "" }, { "docid": "c1e2e8135a0ed375ec55b35469167e39", "score": "0.43102172", "text": "protected function removeDeprecatedProperties(array $contextProperties) {\n\t\tif (isset($contextProperties['locale'])) {\n\t\t\tunset($contextProperties['locale']);\n\t\t}\n\t\treturn $contextProperties;\n\t}", "title": "" }, { "docid": "ce644d2888f8e57de5e037a52b6ef8f9", "score": "0.42913574", "text": "protected function filterContext(array $context): array\n {\n // Only those which have a proper naming\n $assoc = array_filter($context, 'is_string', ARRAY_FILTER_USE_KEY);\n\n if (!$assoc) {\n return [];\n }\n\n // Only primitive information (scalar) is allowed\n return array_merge(\n array_filter($assoc, 'is_scalar'),\n array_map('get_class', array_filter($assoc, 'is_object'))\n );\n }", "title": "" }, { "docid": "e9dbed985c4c1ea1c3578d9c277e533e", "score": "0.42749193", "text": "public static function sanitizeIosFields($fields, $request)\n\t{\n\t\tforeach ($fields as $f) {\n\t\t\tif(isset($request->$f)\n\t\t\t\t&& $request->$f == '<null>' )\n\t\t\t{\n\t\t\t\t$request->$f = null;\n\t\t\t}\n\t\t}\n\t\treturn $request;\n\t}", "title": "" }, { "docid": "35a45e3c88efa365ba6385b578e78c94", "score": "0.42682627", "text": "protected function unsetNestedValue($field)\n\t{\n\t\t$field = preg_split('(__([0-9]+)__)', substr($field, 11), -1, PREG_SPLIT_DELIM_CAPTURE);\n\n\t\tif (!isset($this->saveData[$field[0]])) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (\\count($field) === 1) {\n\t\t\tunset($this->saveData[$field[0]]);\n\n\t\t\treturn;\n\t\t}\n\n\t\t$data =& $this->saveData[$field[0]];\n\n\t\tfor ($i = 0; isset($field[$i + 1]); $i += 2) {\n\t\t\tif (!isset($data[$field[$i + 1]])) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!isset($data[$field[$i + 1]][$field[$i + 2]])) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (isset($field[$i + 3])) {\n\t\t\t\t$data =& $data[$field[$i + 1]][$field[$i + 2]];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tunset($data[$field[$i + 1]][$field[$i + 2]]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8e7ec2190da22ea41193ada1ab611446", "score": "0.42662853", "text": "public function __clone() {\n $this->bcEntity = NULL;\n\n foreach ($this->fields as $name => $properties) {\n foreach ($properties as $langcode => $property) {\n $this->fields[$name][$langcode] = clone $property;\n $this->fields[$name][$langcode]->setContext($name, $this);\n }\n }\n }", "title": "" }, { "docid": "5eb2eb5bdd17cb737f572892438d90f0", "score": "0.42569572", "text": "function _cleanObjectDatas($object)\n {\n $object = parent::_cleanObjectDatas($object);\n \n unset($object->error);\n unset($object->errors);\n \n return $object;\n }", "title": "" }, { "docid": "b2a89ce0d0f4eb4d33adfba155020c4f", "score": "0.42385358", "text": "function change_sidebar_context() {\n global $post, $wp_query, $dr_orig_wp_query, $dr_query_modified;\n $dr_orig_wp_query = $wp_query;\n\n // Get relationship field, if exists\n while(has_sub_field('relationship', 'option')) {\n if (get_sub_field('post_type') == $post->post_type) {\n $post = get_sub_field('detail_page');\n query_posts(array('p' => $post->ID));\n pw_filter_widgets(get_option('sidebars_widgets'));\n $dr_query_modified = true;\n }\n }\n}", "title": "" }, { "docid": "b5909b5adfc15c6a0cdefaf8ee64ec52", "score": "0.42377082", "text": "private function checkAndRemoveEmptyRecursive(array &$data, $parent = NULL)\n {\n foreach($data as $prop => &$values)\n {\n foreach($values as $idx => &$v)\n {\n if (!is_array($v))\n {\n if ('' === trim($v))\n {\n $warn_or_err = \"warn\";\n\n\t\t\t\t\t\t// adr and value (combined) of tel/email are not allowed to be empty\n if ($prop == 'adr' || ($prop == 'value' && $parent && ($parent == 'tel' || $parent == 'email')))\n {\n $warn_or_err = \"error\";\n }\n\n if ($parent) $this->result->add($warn_or_err,\"empty_subprop\",\"<code>%s</code> property of <code>%s</code> is empty\",[$prop,$parent]);\n else $this->result->add($warn_or_err,\"empty_prop\",\"<code>%s</code> property is empty\",[$prop]);\n\n unset($values[$idx]);\n }\n }\n else\n {\n $this->checkAndRemoveEmptyRecursive($v, $prop);\n if (!count($v))\n {\n unset($values[$idx]);\n }\n }\n }\n if (!count($values))\n {\n unset($data[$prop]);\n }\n }\n }", "title": "" }, { "docid": "16f004e1b6c3c333ed3df7e4de54c168", "score": "0.4229881", "text": "public function __debugInfo()\n {\n\n $vars = get_object_vars($this);\n\n foreach ($vars as $prop => $value) {\n\n try {\n $rp = new ReflectionProperty(__CLASS__, $prop);\n if ($rp->name === 'clientSecret') {\n unset($vars[$prop]);\n }\n } catch (ReflectionException) {\n // Silent fail\n }\n\n }\n\n return $vars;\n }", "title": "" }, { "docid": "ff79c4446b6e298923f6f5e50af2b009", "score": "0.42252073", "text": "public function getParentFields()\n {\n return $this->getParentEntityDescriptor()\n ->getFields();\n }", "title": "" }, { "docid": "9755197961437902f22674fa26d92fc2", "score": "0.42214707", "text": "function getFilteredData()\n {\n $collection = $this->resource::collection($this->all());\n if (!\\request()->has('filter'))\n return $collection;\n $collectionIds = $collection->pluck('id')->toArray();\n return $collection->filter(function ($item) use ($collectionIds) {\n return !in_array($item->parent_id, $collectionIds);\n });\n }", "title": "" }, { "docid": "165f06e8d56dc7d9a70bed9a1bc216f0", "score": "0.4200487", "text": "function pm_existing_pages_get_context_options() {\n $options = array(\n '' => t('No context'),\n );\n\n // Add entity contexts.\n $ignore_entities = array('rules_config');\n $entity_info = entity_get_info();\n foreach ($entity_info as $entity_type => $info) {\n if (in_array($entity_type, $ignore_entities)) {\n continue;\n }\n if (isset($info['fieldable']) && $info['fieldable']) {\n $id = $info['entity keys']['id'];\n $options['entity|' . $entity_type . '|' . $id] = $info['label'];\n }\n }\n\n return $options;\n}", "title": "" }, { "docid": "3e4d162ff640ae90d18eacac6755ca52", "score": "0.41871238", "text": "function themeprefix_acf_global_settings_context( $context ) {\n $context['options'] = get_fields( 'option' );\n\n return $context;\n}", "title": "" }, { "docid": "ea260547004d32cea6c601c91f0d8814", "score": "0.41725862", "text": "public function testGetFieldRecursive(): void\n {\n // setup\n $obj1 = new \\stdClass();\n $obj1->foo = 1;\n\n $obj2 = new \\stdClass();\n $obj2->bar = 2;\n $obj1->obj2 = $obj2;\n\n $obj3 = new \\stdClass();\n $obj3->eak = 3;\n $obj1->obj3 = $obj3;\n\n // test body and assertions\n $this->assertEquals(Functional::getField($obj1, 'eak'), 3, 'Invalid getting');\n }", "title": "" }, { "docid": "6f632e4f25b267492e51b9f683796c1f", "score": "0.41725758", "text": "public function denormalize(array $data, $object, Context $context = null) {\n $accessor = new PropertyAccessor($object);\n $metadata = null;\n\n if ($context && $context->getMetadataCollection()) {\n $metadata = $context->getMetadataCollection()->getOrNull(get_class($object));\n }\n\n $properties = $this->getProperties($accessor, $context, $metadata);\n\n foreach ($properties as $property) {\n if (array_key_exists($property, $data) === false) {\n continue;\n }\n\n $value = $data[$property];\n $valueHasBeenSet = false;\n\n if ($context && $metadata) {\n $propertyConfiguration = $metadata->getAttributeOrNull($property);\n if ($propertyConfiguration) {\n if (array_key_exists(\"class\", $propertyConfiguration) && is_array($value)) {\n $item = new $propertyConfiguration[\"class\"];\n $value = $this->denormalize($value, $item, $context);\n } else if (array_key_exists(\"denormalizer\", $propertyConfiguration) && is_array($value)) {\n $value = $propertyConfiguration[\"denormalizer\"]($value, $object, $context);\n } else if (array_key_exists(\"type\", $propertyConfiguration)) {\n switch ($propertyConfiguration[\"type\"]) {\n case \"int\":\n $value = intval($value);\n break;\n case \"float\":\n $value = floatval($value);\n break;\n case \"bool\":\n $value = boolval($value);\n break;\n }\n }\n\n if (array_key_exists(\"setter\", $propertyConfiguration)) {\n $setter = $propertyConfiguration[\"setter\"];\n if ($accessor->hasMethod($setter) === false || $accessor->isPublic($setter) === false) {\n throw new MethodException($propertyConfiguration[\"setter\"], $accessor->getClassName(), $property);\n }\n\n $valueHasBeenSet = true;\n call_user_func_array([$object, $setter], [$value]);\n }\n }\n }\n\n if ($valueHasBeenSet === false) {\n $accessor->set($property, $object, $value);\n }\n }\n\n return $object;\n }", "title": "" }, { "docid": "d17408743af6564aee06be88cd532fa7", "score": "0.41720808", "text": "function removeDefaultCustomFields( $type, $context, $post ) {\n foreach ( array( 'normal', 'advanced', 'side' ) as $context ) {\n foreach ( $this->postTypes as $postType ) {\n remove_meta_box( 'postcustom', $postType, $context );\n }\n }\n }", "title": "" }, { "docid": "1a9762ebd9557c96f6fa61c16cf03f33", "score": "0.41679916", "text": "private function resetInputFields()\n {\n $this->name = '';\n $this->parent_id = '';\n $this->slug = '';\n $this->category_id = '';\n }", "title": "" }, { "docid": "1321490ba3b737350b59bd7cd5591c31", "score": "0.41679406", "text": "function wpd_residential_request_filter( $request ){\n\t if( array_key_exists( 'residential_taxonomies' , $request )\n\t && ! get_term_by( 'slug', $request['residential_taxonomies'], 'residential_taxonomies' ) ){\n\t $request['residential'] = $request['residential_taxonomies'];\n\t $request['name'] = $request['residential_taxonomies'];\n\t $request['post_type'] = 'residential';\n\t unset( $request['residential_taxonomies'] );\n\t }\n\t return $request;\n\t}", "title": "" }, { "docid": "0d7938ea80245cc1b11c889a835e2135", "score": "0.41533464", "text": "public function clearFields() {\n $this->fields = array();\n }", "title": "" }, { "docid": "a50d55a0836bdef1551bcd1dddd7baac", "score": "0.41447255", "text": "function _govcms_ui_kit_render_empty_field(array $context) {\n $content_types = ['assessor', 'commitment_agreement'];\n return !empty($context['entity']->type)\n && in_array($context['entity']->type, $content_types)\n && $context['view_mode'] = 'teaser';\n}", "title": "" }, { "docid": "6b33ade505697866bedf437847110c2a", "score": "0.4140123", "text": "function remove_comment_fields($fields) {\n\tunset($fields['url']);\n\treturn $fields;\n}", "title": "" }, { "docid": "8080b632242cdbfae70f2ab7fdf0b81e", "score": "0.41372037", "text": "function removeFormVariables($key, $prefix=true)\n {\n /* Remove all matching GET and POST variables */\n if ($prefix) {\n $key = MYOOS_FORM_VARIABLE_PREFIX . $key;\n }\n unset($_POST[$key]);\n unset($_FILES[$key]);\n unset($_GET[$key]);\n }", "title": "" }, { "docid": "390a037ffce97bd1c82d75789ef16023", "score": "0.41352805", "text": "public function filter_timber_context( $context ) {\n $context['header_navigation_disabled'] = false;\n $context['site_header'] = $this->get_header_menu_html();\n return $context;\n }", "title": "" }, { "docid": "4a69820f59457535b046cb9af42409bd", "score": "0.4134917", "text": "protected function removeReservedFields()\n {\n if (! $this->isMode(static::MODE_CREATE)) {\n return;\n }\n\n $reservedColumns = [\n $this->form->keyName(),\n $this->form->createdAtColumn(),\n $this->form->updatedAtColumn(),\n ];\n\n $reject = function ($field) use (&$reservedColumns) {\n if ($field instanceof Field) {\n return in_array($field->column(), $reservedColumns, true)\n && $field instanceof Form\\Field\\Display;\n }\n\n if ($field instanceof Row) {\n $fields = $field->fields()->reject(function ($item) use (&$reservedColumns) {\n return in_array($item['element']->column(), $reservedColumns, true)\n && $item['element'] instanceof Form\\Field\\Display;\n });\n\n $field->setFields($fields);\n }\n };\n\n $this->rejectFields($reject);\n\n if ($this->form->hasTab()) {\n $this->form->getTab()->getTabs()->transform(function ($item) use ($reject) {\n if (! empty($item['fields'])) {\n $item['fields'] = $item['fields']->reject($reject);\n }\n\n return $item;\n });\n }\n }", "title": "" }, { "docid": "a7fcd632ca77619d3edf8dc3eb134497", "score": "0.41216177", "text": "function remove_comment_fields($fields) {\n unset($fields['url']);\n return $fields;\n}", "title": "" }, { "docid": "785646ffb2e9607b1d17b2114e9974ab", "score": "0.41165096", "text": "function better_clear_prop(){\r\n\r\n\t\tglobal $better_template_props_cache;\r\n\r\n\t\t$better_template_props_cache = array();\r\n\r\n\t}", "title": "" }, { "docid": "bd3fcc0461444cb7a9eee1af2b7a047a", "score": "0.41147083", "text": "function normalize() {\n \n //print_r($this->declaration[0]->field);\n foreach($this->declaration as $declaration) {\n if (isset($declaration->field)) {\n foreach ($declaration->field as $field) {\n $this->fields[$field->name] = $field;\n $this->fields[$field->name]->originalName = $field->name;\n }\n continue;\n }\n if (isset($declaration->index)) {\n foreach ($declaration->index as $index) {\n $this->indexes[$index->name] = $index;\n }\n continue;\n }\n }\n //print_r($this->fields);\n unset($this->declaration);\n \n }", "title": "" }, { "docid": "dc387c7b033e4f6bbc2e2ccd267f0dbb", "score": "0.41086292", "text": "public function context_remove($context, $string = NULL, $options = array()) {\n $options += array('messages' => $this->debug);\n $i18nstring = $this->build_string($context, $string);\n $status = $this->string_remove($i18nstring, $options);\n\n return $this;\n }", "title": "" }, { "docid": "d7fe456334ddd1b1baa15f0f9360f2e1", "score": "0.4105232", "text": "function removeDefaultCustomFields( $type, $context, $post ) {\r\r\n foreach ( array( 'normal', 'advanced', 'side' ) as $context ) {\r\r\n remove_meta_box( 'postcustom', 'post', $context );\r\r\n remove_meta_box( 'postcustom', 'page', $context );\r\r\n remove_meta_box( 'postcustom', 'portfolio_item', $context );\r\r\n //Use the line below instead of the line above for WP versions older than 2.9.1\r\r\n //remove_meta_box( 'pagecustomdiv', 'page', $context );\r\r\n }\r\r\n }", "title": "" }, { "docid": "137a7177b8793d31f914f8a31e2b80aa", "score": "0.4104948", "text": "function getMainFields_preProcess($table, &$row, $pObj)\t{\n if($row['xtemplate'] && $row['xtemplate']!='notemplate' && $table = 'tt_content'){ //if xtemplate is not set none to do\n //fetch from db the xml which will create the forms\n $res=$GLOBALS['TYPO3_DB']->exec_SELECTquery('typoscript,xml,palettes','tx_xflextemplate_template','title=\"'.$row['xtemplate'].'\" AND deleted=0 AND hidden=0');\n $dbrow=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n $this->ts=t3lib_div::makeInstance('t3lib_TSparser');\n $this->ts->parse($dbrow['typoscript']);\n $xml=str_replace(\"''\",\"'\",$dbrow['xml']);\n //update the TCA with newer one\n $tcaTransformation = t3lib_div::makeInstance('tcaTransformation');\n $tcaTransformation->init($this->_EXTKEY, $this->ts);\n $tcaTransformation->getTCApalettes($GLOBALS['TCA']['tt_content'],$dbrow['palettes']);\n //send lis of fields to exclude to show (those are in palettes) to getFormTCA\n $palettesArray = @unserialize($dbrow['palettes']);\n /*debug($palettesArray);\n if (is_array($palettesArray) && count($palettesArray)>0) {\n $excludePalettesField= array();\n foreach ($palettesArray as $value){\n $excludePalettesField = array_merge($excludePalettesField,$value);\n }\n //$excludePalettesField = $palettesArray;\n debug($excludePalettesField);\n }\n else{\n $excludePalettesField = array();\n }*/\n $excludePalettesField = $tcaTransformation->palettesFieldsList;\n //call getFormTCA with field to exclude (changed in version 2.1)\n $tcaTransformation->getFormTCA($GLOBALS['TCA']['tt_content'],$xml,$excludePalettesField);\n $flexFields=xmlTransformation::getArrayFromXMLData($row[$this->_EXTKEY]);\n // debug($GLOBALS['TCA']['tt_content']);\n if(is_array($flexFields)){ //if flexdata is an array data will be put into flexdata array\n //put any field from flexfields\n foreach($flexFields as $key=>$obj){\n $row[$key]=($GLOBALS['TCA']['tt_content']['columns'][$key]['config']['default'] && ($obj == '')) ? $GLOBALS['TCA']['tt_content']['columns'][$key]['config']['default'] : $obj;\n }\n }\n }\n }", "title": "" }, { "docid": "a4ab86b8c9b58441dc2d38c59ca04b70", "score": "0.4101086", "text": "public function add_acf_options_to_context( $context ) {\n\t\tif ( class_exists( 'acf' ) ) {\n\t\t\t$context['options'] = get_fields( 'option' );\n\t\t}\n\t\treturn $context;\n\t}", "title": "" }, { "docid": "2a64350d04485854f5329bcd55b86c74", "score": "0.4100948", "text": "public function clearContext($context)\n {\n\n $this->checkRepository();\n $this->checkContext($context);\n\n $request = new HTTP_Request2($this->dsn . '/repositories/' . $this->repository . '/statements?context=' . $context,\n HTTP_Request2::METHOD_DELETE);\n $request = $this->prepareRequest($request);\n $response = $request->send();\n if ($response->getStatus() != 204) {\n throw new Exception('Failed to clear context, HTTP response error: ' . $response->getStatus());\n }\n\n }", "title": "" }, { "docid": "6c691c372a7abeeee7c410d5df970616", "score": "0.40980527", "text": "public function denormalize($data, string $type, string $format = null, array $context = [])\n {\n // Denormalizer when denormalize -> call each denormalizer to check who support.\n // UserOwnedDenormalizer support !\n // UserOwnedDenormalizer call Denormalizer to denormalize\n // Denormalizer when denormalize -> call each denormalizer to check who support.\n // ... infinite loop\n\n // Solution with data[]:\n // Define new key into data[key] = true\n // Denormalizer when denormalize -> call each denormalizer to check who support.\n // UserOwnedDenormalizer support Post::class BUT $data[key] !== false\n // end loop\n\n // Solution with context[]:\n // Define new key into context[key] = true, this key MUST UNIQUE\n // In each loop context is shared.\n\n $data[self::ALREADY_CALLED_DENORMALIZER] = true;\n // $context[$this->createCustomKey($type)] = true;\n\n /** @var UserOwnedInterface $object */\n $object = $this->denormalizer->denormalize($data, $type, $format, $context);\n /** @var User|null $user */\n $user = $this->security->getUser();\n $object->setUser($user);\n\n return $object;\n }", "title": "" }, { "docid": "9cc8652b1754eccb6eb67586cf11e585", "score": "0.40949392", "text": "protected function getChildVariables()\n {\n $variables = get_object_vars($this);\n foreach (array_keys($variables) as $variable) {\n if (strpos($variable, '_') === 0) {\n unset($variables[$variable]);\n }\n }\n return $variables;\n }", "title": "" }, { "docid": "0a1e8ca253ac5a8286aaee460709c10f", "score": "0.40944067", "text": "function remove_checkout_fields( $fields ) {\n\n\t\t// Remove some fields in billing\n\t\tunset($fields['billing']['billing_country']);\n\t\tunset($fields['billing']['billing_company']);\n\t\tunset($fields['billing']['billing_address_2']);\n\t\tunset($fields['billing']['billing_state']);\n\t\tunset($fields['billing']['billing_postcode']);\n\n\t\t// Remove some fields in shipping\n\t\tunset($fields['shipping']['shipping_country']);\n\t\tunset($fields['shipping']['shipping_company']);\n\t\tunset($fields['shipping']['shipping_address_2']);\n\t\tunset($fields['shipping']['shipping_state']);\n\t\tunset($fields['shipping']['shipping_postcode']);\n\n\t\treturn $fields;\n}", "title": "" }, { "docid": "dcd5ec03bfb3d1235d384b0b94ff18be", "score": "0.4086225", "text": "protected function skipExposingGlobalFieldsInSchema() : bool\n {\n /** @var ModuleConfiguration */\n $moduleConfiguration = App::getModule(Module::class)->getConfiguration();\n return $moduleConfiguration->skipExposingGlobalFieldsInFullSchema();\n }", "title": "" }, { "docid": "054c2b9252012521722e775493b7ff29", "score": "0.4085445", "text": "public function normalize($object, $format = null, array $context = [])\n {\n $normalizedData = [];\n $propertyAnnotations = $this->annotationReader->getPropertiesWithAnnotation(\n new ReflectionClass($object),\n $this->annotationName\n );\n\n foreach ($propertyAnnotations as $propertyName => $propertyAnnotation) {\n $propertyValue = $this->propertyManipulator->getPropertyValue($object, $propertyName);\n if (property_exists($propertyAnnotation, 'alias') && isset($propertyAnnotation->alias)) {\n $propertyName = $propertyAnnotation->alias;\n }\n\n if (false === is_scalar($propertyValue)) {\n $normalizedData[$propertyName] = $this->normalizer->normalize($propertyValue, $format, $context);\n } else {\n $normalizedData[$propertyName] = $this->getMappedPropertyValue($propertyAnnotation, $propertyValue);\n }\n }\n\n return $normalizedData;\n }", "title": "" }, { "docid": "179acb50c7661fdce7345f8f16448b00", "score": "0.4077973", "text": "public function removePropsNotInDatabase() {\n $databaseProps = static::fetchDatabaseFields();\n\n $filterFn = function($value, $prop) use ($databaseProps) { return in_array($prop, $databaseProps); };\n\n return $this->setAll(\n Collection::instance($this->getAll())->filter($filterFn)->toArray()\n );\n }", "title": "" }, { "docid": "c289b4ff11b57baec611fe41b2b080fe", "score": "0.40750465", "text": "function getParentCatFields( $id, $table )\n\t{\n\t\t$sql = \"SELECT `T2`.`Key`, `T2`.`Type`, `T2`.`Default`, `T2`.`Condition`, `T2`.`Details_page` FROM `\" . RL_DBPREFIX . $table . \"` AS `T1` \";\n\t\t$sql .= \"LEFT JOIN `\" . RL_DBPREFIX . \"listing_fields` AS `T2` ON `T1`.`Field_ID` = `T2`.`ID` \";\n\t\t$sql .= \"WHERE `T1`.`Category_ID` = '{$id}' ORDER BY `T1`.`Position`\";\n\t\t\n\t\t$fields = $this -> getAll( $sql );\n\n\t\tif ( empty($fields) )\n\t\t{\n\t\t\t$parent = $this -> getOne('Parent_ID', \"`ID` = '{$id}' AND `Parent_ID` != '{$id}'\", 'categories');\n\t\t\t\n\t\t\tif ( !empty($parent) )\n\t\t\t{\n\t\t\t\treturn $this -> getParentCatFields($parent, $table);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tforeach ($fields as $value)\n\t\t\t{\n\t\t\t\t$tmp_fields[$value['Key']] = $value;\n\t\t\t}\n\t\t\t\n\t\t\t$fields = $tmp_fields;\n\t\t\tunset($tmp_fields);\n\t\t\n\t\t\treturn $fields;\n\t\t}\n\t}", "title": "" }, { "docid": "8b37283eb8f330e303fc144162370a1a", "score": "0.40725526", "text": "public function withoutGlobalFields()\n {\n $this->withGlobalFields = false;\n\n return $this;\n }", "title": "" }, { "docid": "645a5b0f072e7275990250bd08752e75", "score": "0.40656406", "text": "protected function _getIgnored_fields()\n\t{\n\t\t$core_ignore = array(\n\t\t\t'fields',\n\t\t\t'service',\n\t\t\t'model',\n\t\t\t'table',\n\t\t\t'ignored',\n\t\t\t'loaded',\n\t\t\t'primary_key',\n\t\t);\n\t\treturn Arr::merge($this->_ignored, $core_ignore);\n\t}", "title": "" }, { "docid": "721596f2ae78caabcd080e810d4a4813", "score": "0.4063638", "text": "public function filterByContext(array $context) : self\n {\n $this->buffer = array_filter($this->buffer, function(LogMessage $msg) use($context){\n $item_context = $msg->getContext();\n foreach($context as $key => $value){\n if (!isset($item_context[$key])){\n return false;\n }\n $item_value = $item_context[$key];\n if ($item_value !== $value){\n return false;\n }\n }\n return true;\n });\n\n return $this;\n }", "title": "" }, { "docid": "b5877f683327a99ff90754a81392c5c2", "score": "0.404885", "text": "public function expand_list_search_context_where_properties()\n {\n return array(\n 'contexts' => array(),\n 'meta_whitelist' => array(\n 'title',\n ),\n );\n }", "title": "" }, { "docid": "47d0e1b773e15b6376d4e112f9c627a3", "score": "0.40438172", "text": "public function setUnmodified() {\n $this->modified = false;\n foreach ($this->getFields() as $field) {\n $field->setUnmodified();\n }\n\n if ($this->extends) {\n $this->extends->setUnmodified();\n }\n }", "title": "" }, { "docid": "65e8a8d1f6544a60dc26293f904192a2", "score": "0.4036692", "text": "function medigroup_mikado_remove_default_custom_fields() {\n\t\tforeach(array('normal', 'advanced', 'side') as $context) {\n\t\t\tforeach(array(\"page\", \"post\", \"portfolio_page\", \"testimonials\", \"slides\", \"carousels\") as $postType) {\n\t\t\t\tremove_meta_box('postcustom', $postType, $context);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "02d5595e612557139b5390395a7ac1ef", "score": "0.40337723", "text": "public function associationFiltering($context) {\n\t\t//if author has filtering and section has a 'group' field then filter by group id\n\n\t\t$groupID = $this->getCurrentGroup();\n\t\t$sectionID = (string)Symphony::Configuration()->get('section_id', 'group_lock');\n\n\t\tif ($groupID && $groupID !=='all'){\n\n\t\t\tif ($context['section-id'] == (string)Symphony::Configuration()->get('section_id', 'group_lock')){\n\n\t\t\t\t$context['where'] .= \" AND `e`.`id` = '{$groupID}' \";\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//fetch field of name group within section if available\n\t\t\t$fieldID = (string)Symphony::Configuration()->get('section_'.$context['section-id'].'_field_id', 'group_lock');\n\n\t\t\t// var_dump($context['section-id']);die;\n\t\t\t// var_dump($fieldID);die;\n\n\t\t\tif ($fieldID){\n\t\t\t\t$fieldRelatedTo = current(FieldManager::fetch(FieldManager::fetch($fieldID)->get('related_field_id')));\n\t\t\t\t$parentSection = $fieldRelatedTo->get('parent_section');\n\n\n\t\t\t\tif ($parentSection == $sectionID){\n\n\t\t\t\t\t$context['joins'] .= \" LEFT JOIN `tbl_entries_data_{$fieldID}` AS `group_lock_{$fieldID}` ON (`e`.`id` = `group_lock_{$fieldID}`.entry_id)\";\n\t\t\t\t\t$context['where'] .= \" AND (`group_lock_{$fieldID}`.relation_id IN ('{$groupID}') )\";\n\n\t\t\t\t} else{\n\n\t\t\t\t\t$linkedFieldId = (string)Symphony::Configuration()->get('section_'.$parentSection.'_field_id', 'group_lock');\n\n\t\t\t\t\t$context['joins'] .= \" LEFT JOIN `tbl_entries_data_{$fieldID}` AS `group_lock_{$fieldID}` ON (`e`.`id` = `group_lock_{$fieldID}`.entry_id)\";\n\t\t\t\t\t$context['joins'] .= \" LEFT JOIN `tbl_entries_data_{$linkedFieldId}` AS `group_lock_{$linkedFieldId}` ON (`group_lock_{$fieldID}`.relation_id = `group_lock_{$linkedFieldId}`.entry_id)\";\n\t\t\t\t\t$context['where'] .= \" AND (`group_lock_{$linkedFieldId}`.relation_id IN ('{$groupID}') )\";\n\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\t// if ($fieldID){\n\n\t\t\t// \t$context['joins'] .= \" LEFT JOIN `tbl_entries_data_{$fieldID}` AS `group_lock_{$fieldID}` ON (`e`.`id` = `group_lock_{$fieldID}`.entry_id)\";\n\t\t\t// \t$context['where'] .= \" AND (`group_lock_{$fieldID}`.relation_id IN ('{$groupID}') )\";\n\n\t\t\t// }\n\t\t}\n\t}", "title": "" }, { "docid": "a37e6b1fabb5a55b4d7da90eb092aaf8", "score": "0.40324205", "text": "public static function delete_data_for_all_users_in_context(context $context);", "title": "" }, { "docid": "defdf68106623d80883b85f98757a150", "score": "0.40309834", "text": "public function getProperties(PropertyAccessor $accessor, Context $context = null, ClassMetadata $metadata = null) {\n $properties = null;\n\n // By default we try to get data out of the view\n if ($context && $context->getView() !== null) {\n // We get the data corresponding to the current path\n if ($metadata !== null && is_array($context->getView()) === false) {\n $viewData = $metadata->getViewOrNull($context->getView());\n } else {\n $viewData = $context->getView();\n }\n\n $properties = SerializerTools::deepGet($viewData, $context->getNavigator()->getPath());\n if ($properties !== null) {\n foreach ($properties as $k => $v) {\n if (is_numeric($k) === false) {\n unset($properties[$k]);\n $properties[] = $k;\n }\n }\n }\n }\n\n // If there's no view data we instead rely on local properties\n if ($properties === null) {\n $properties = array_map(function(\\ReflectionProperty $property) {\n return $property->name;\n }, $accessor->getProperties());\n }\n\n return $properties;\n }", "title": "" }, { "docid": "1a527776fb71a10497e0fab17b266772", "score": "0.40296507", "text": "function revert_sidebar_context() {\n global $post, $wp_query, $dr_orig_wp_query, $dr_query_modified;\n if (isset($dr_query_modified) && $dr_query_modified) {\n $wp_query = $dr_orig_wp_query;\n query_posts($wp_query->query_vars);\n }\n}", "title": "" }, { "docid": "e0f2815e1306fe43738a58e2d101bcdd", "score": "0.40221173", "text": "function florida_flickr_relationship_context($context, $conf) {\n if (empty($context->data)) {\n return ctools_context_create_empty('florida_flickr_context', NULL);\n }\n $node = $context->data;\n $data = new stdClass();\n\n $data->flickr_images = florida_get_flickr_images($node);\n $data->original_context = $node;\n\n // Custom context goes out.\n return ctools_context_create('florida_flickr_context', $data);\n}", "title": "" }, { "docid": "b2a157d7807948e33d1fa5ceb6eab414", "score": "0.4019386", "text": "public function onBeforeDelete()\n {\n if ($this->Fields()->exists()) {\n $this->Fields()->removeAll();\n }\n\n parent::onBeforeDelete();\n }", "title": "" }, { "docid": "cd9c7ab1194adacd925675d4f38ec3a2", "score": "0.4016778", "text": "public function clearProperties() {}", "title": "" }, { "docid": "cd9c7ab1194adacd925675d4f38ec3a2", "score": "0.4016778", "text": "public function clearProperties() {}", "title": "" }, { "docid": "cd9c7ab1194adacd925675d4f38ec3a2", "score": "0.4016778", "text": "public function clearProperties() {}", "title": "" }, { "docid": "cd9c7ab1194adacd925675d4f38ec3a2", "score": "0.4016778", "text": "public function clearProperties() {}", "title": "" }, { "docid": "c1be32d865ff80158f87229ae5891cd7", "score": "0.40108383", "text": "public function normalize(mixed $object, string $format = null, array $context = [])\n {\n $metadata = $this->entityManager->getClassMetadata($object::class);\n $fields = $metadata->getFieldNames();\n $relations = $metadata->getAssociationMappings();\n\n // $fields contains plain data (no relations), $relations only contains properties mapped to other entities\n // So we have to loop through both\n\n foreach ($fields as $propertyName)\n {\n $res[$propertyName] = $object->{\"get\".ucfirst($propertyName)}();\n }\n\n // TODO: Figure out behavior of ToMany associations because they are collection properties\n // Might be best to ignore them since they can get *big*\n foreach ($relations as $fieldName => $relation)\n {\n if ($relation['type'] & ClassMetadata::TO_MANY)\n {\n //echo \"TO MANY\\n\";\n continue;\n }\n\n // Area's location -> Location's locationId\n $res[$fieldName.'Id'] = $this->getRelationId($object, $relation); // camel-snake-case normalizer handles changing names :)\n }\n\n return $res;\n }", "title": "" }, { "docid": "be37293e3a2fe583f739623322db2219", "score": "0.40107888", "text": "function ctools_context_get_relevant_relationships($contexts) {\n $relevant = array();\n $relationships = ctools_get_relationships();\n\n // Go through each relationship\n foreach ($relationships as $rid => $relationship) {\n // For each relationship, see if there is a context that satisfies it.\n if (ctools_context_filter($contexts, $relationship['required context'])) {\n $relevant[$rid] = $relationship['title'];\n }\n }\n\n return $relevant;\n}", "title": "" }, { "docid": "7d723b1aa612383411869efecb786a74", "score": "0.4009486", "text": "function remove_parent_filters()\n{\n\tremove_filter('excerpt_more', 'understrap_custom_excerpt_more');\n\tremove_filter('wp_trim_excerpt', 'understrap_all_excerpts_get_more_link');\n}", "title": "" }, { "docid": "0ff8db3cf6b982cefd1672cd02b91afe", "score": "0.4005172", "text": "public function remove( string $context ) {\n\t\tunset( $this->attributes[ $context ] );\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "8bdf5ba61c758ee66b86a65d38ecb5ef", "score": "0.3996702", "text": "function lingotek_cleanup_field_collection_fields() {\n // todo: This function is MySQL-specific. Needs refactoring to be db-agnostic.\n\n $field_collection_field_types = field_read_fields(array('type' => 'field_collection'));\n $disabled_types = lingotek_get_disabled_bundles('field_collection_item');\n\n // Update all lines in field-collection field tables to be undefined,\n // ignoring duplicates, then delete all lines in field-collection\n // field tables that aren't undefined.\n\n $fc_fields_found = 0;\n $fc_dups_found = 0;\n foreach (array_keys($field_collection_field_types) as $fc_field_name) {\n $fc_langs = lingotek_cleanup_get_dirty_field_collection_fields(\"field_data_\" . $fc_field_name);\n if (!$fc_langs) {\n // No language-specific field-collection fields exist in this table\n continue;\n }\n if (in_array($fc_field_name, $disabled_types)) {\n // Lingotek does not manage this field-collection type. Abort.\n continue;\n }\n // Make sure one of each field has an undefined entry.\n // We do this by first adding the count of affected fields, and then\n // removing the remaining ones (duplicates) below, to avoid double counting\n // fields that were actually changed. (Some would already have language-\n // neutral and some would not.)\n foreach ($fc_langs as $fc_lang) {\n $fc_fields_found += (int) $fc_lang;\n }\n db_query(\"UPDATE IGNORE {field_data_\" . $fc_field_name . \"} SET language = '\" . LANGUAGE_NONE . \"'\");\n\n // Find all unnecessary fields (language-specific) for removal.\n $fc_langs = lingotek_cleanup_get_dirty_field_collection_fields(\"field_data_\" . $fc_field_name);\n // Subtract the ones that were not removed from the update above.\n foreach ($fc_langs as $dups) {\n $fc_dups_found += (int) $dups;\n $fc_fields_found -= (int) $dups;\n }\n db_query(\"DELETE FROM {field_data_\" . $fc_field_name . \"} WHERE language <> '\" . LANGUAGE_NONE . \"'\");\n db_query(\"UPDATE IGNORE {field_revision_\" . $fc_field_name . \"} SET language = '\" . LANGUAGE_NONE . \"'\");\n db_query(\"DELETE FROM {field_revision_\" . $fc_field_name . \"} WHERE language <> '\" . LANGUAGE_NONE . \"'\");\n }\n if ($fc_fields_found) {\n drupal_set_message(format_plural($fc_fields_found, t('Set 1 field-collection entry to be language neutral'), t('Set @ff field-collection entries to be language neutral.', array('@ff' => $fc_fields_found))));\n }\n if ($fc_dups_found) {\n drupal_set_message(format_plural($fc_dups_found, t('Removed 1 unnecessary language-specific field-collection entry'), t('Removed @ff unnecessary language-specific field-collection entries.', array('@ff' => $fc_dups_found))));\n }\n if (!$fc_fields_found && !$fc_dups_found) {\n drupal_set_message(t('All field-collection entries were already correctly set to be language neutral.'));\n }\n}", "title": "" }, { "docid": "ddff45333f245b18bc55dd497175ca9f", "score": "0.39935228", "text": "public function fields(){\n if($this->_fields){\n return $this->_fields;\n }\n\n //$fields = parent::fields();\n\n\n //var_dump(array_keys($fields));\n\n $fields = [\n 'id',\n 'tempId',\n 'title',\n 'postDate',\n 'expiryDate',\n 'dateCreated',\n 'dateUpdated',\n 'enabled',\n 'sectionId',\n 'typeId',\n 'authorId',\n 'newParentId',\n 'revisionCreatorId',\n 'revisionNotes'\n ];\n\n\n if($this->_removeFields){\n // remove fields that contain sensitive information\n foreach($this->_removeFields AS $key) {\n unset($fields[$key]);\n }\n }\n\n /* Return Standard Fields Removing Unset Fields */\n return $fields;\n }", "title": "" }, { "docid": "fcce55574f911767f3550f5c670d6082", "score": "0.39926612", "text": "public function clearDirtyFields()\n {\n $this->dirty = new \\stdClass();\n }", "title": "" }, { "docid": "c42b32d64bb00c5b70a8e95713260c87", "score": "0.3977226", "text": "function acfe_field_load_fields($fields, $parent){\n if(!acf_maybe_get($parent, 'type'))\n return $fields;\n \n $fields = apply_filters('acfe/load_fields', $fields, $parent);\n \n return $fields;\n \n}", "title": "" }, { "docid": "e4de08f15795ade8c1dc27db725f63a4", "score": "0.39770612", "text": "public function clean()\n {\n\n $this->registry->name = null;\n $this->registry->context = null;\n $this->registry->node = null;\n\n }", "title": "" }, { "docid": "2089161edeada56ebff962468a4916c3", "score": "0.39739448", "text": "protected function _popContext() {\n\t\t$new = array();\n\n\t\t$keys = array_keys($this->_context);\n\t\tarray_shift($keys);\n\t\tforeach ($keys as $key) {\n\t\t\t$new[] =& $this->_context[$key];\n\t\t}\n\t\t$this->_context = $new;\n\t}", "title": "" }, { "docid": "633e432e78f119ad513f2aee125b216f", "score": "0.39707756", "text": "protected function getExcludeFields()\n {\n $languageService = $this->getLanguageService();\n $finalExcludeArray = [];\n\n // Fetch translations for table names\n $tableToTranslation = [];\n // All TCA keys\n foreach ($GLOBALS['TCA'] as $table => $conf) {\n $tableToTranslation[$table] = $languageService->sL($conf['ctrl']['title']);\n }\n // Sort by translations\n asort($tableToTranslation);\n foreach ($tableToTranslation as $table => $translatedTable) {\n $excludeArrayTable = [];\n\n // All field names configured and not restricted to admins\n if (is_array($GLOBALS['TCA'][$table]['columns'])\n && empty($GLOBALS['TCA'][$table]['ctrl']['adminOnly'])\n && (empty($GLOBALS['TCA'][$table]['ctrl']['rootLevel']) || !empty($GLOBALS['TCA'][$table]['ctrl']['security']['ignoreRootLevelRestriction']))\n ) {\n foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $_) {\n if ($GLOBALS['TCA'][$table]['columns'][$field]['exclude']) {\n // Get human readable names of fields\n $translatedField = $languageService->sL($GLOBALS['TCA'][$table]['columns'][$field]['label']);\n // Add entry, key 'labels' needed for sorting\n $excludeArrayTable[] = [\n 'labels' => $translatedTable . ':' . $translatedField,\n 'sectionHeader' => $translatedTable,\n 'table' => $table,\n 'tableField' => $field,\n 'fieldName' => $field,\n 'fullField' => $field,\n 'fieldLabel' => $translatedField,\n 'origin' => 'tca',\n ];\n }\n }\n }\n // All FlexForm fields\n $flexFormArray = $this->getRegisteredFlexForms($table);\n foreach ($flexFormArray as $tableField => $flexForms) {\n // Prefix for field label, e.g. \"Plugin Options:\"\n $labelPrefix = '';\n if (!empty($GLOBALS['TCA'][$table]['columns'][$tableField]['label'])) {\n $labelPrefix = $languageService->sL($GLOBALS['TCA'][$table]['columns'][$tableField]['label']);\n }\n // Get all sheets\n foreach ($flexForms as $extIdent => $extConf) {\n // Get all fields in sheet\n foreach ($extConf['sheets'] as $sheetName => $sheet) {\n if (empty($sheet['ROOT']['el']) || !is_array($sheet['ROOT']['el'])) {\n continue;\n }\n foreach ($sheet['ROOT']['el'] as $pluginFieldName => $field) {\n // Use only fields that have exclude flag set\n if (empty($field['TCEforms']['exclude'])) {\n continue;\n }\n $fieldLabel = !empty($field['TCEforms']['label'])\n ? $languageService->sL($field['TCEforms']['label'])\n : $pluginFieldName;\n $excludeArrayTable[] = [\n 'labels' => trim($translatedTable . ' ' . $labelPrefix . ' ' . $extIdent, ': ') . ':' . $fieldLabel,\n 'sectionHeader' => trim(($translatedTable . ' ' . $labelPrefix . ' ' . $extIdent), ':'),\n 'table' => $table,\n 'tableField' => $tableField,\n 'extIdent' => $extIdent,\n 'fieldName' => $pluginFieldName,\n 'fullField' => $tableField . ';' . $extIdent . ';' . $sheetName . ';' . $pluginFieldName,\n 'fieldLabel' => $fieldLabel,\n 'origin' => 'flexForm',\n ];\n }\n }\n }\n }\n // Sort fields by the translated value\n if (!empty($excludeArrayTable)) {\n usort($excludeArrayTable, function (array $array1, array $array2) {\n $array1 = reset($array1);\n $array2 = reset($array2);\n if (is_string($array1) && is_string($array2)) {\n return strcasecmp($array1, $array2);\n }\n return 0;\n });\n $finalExcludeArray = array_merge($finalExcludeArray, $excludeArrayTable);\n }\n }\n\n return $finalExcludeArray;\n }", "title": "" }, { "docid": "24595a4982f730ff57d1583153f1bbd3", "score": "0.39677992", "text": "function get_parent_contexts($context) {\n\n switch ($context->aggregatelevel) {\n\n case CONTEXT_SYSTEM: // no parent\n return array();\n break;\n\n case CONTEXT_PERSONAL:\n if (!$parent = get_context_instance(CONTEXT_SYSTEM, SITEID)) {\n return array();\n } else {\n return array($parent->id);\n }\n break;\n\n case CONTEXT_USER:\n if (!$parent = get_context_instance(CONTEXT_SYSTEM, SITEID)) {\n return array();\n } else {\n return array($parent->id);\n }\n break;\n\n case CONTEXT_COURSECAT: // Coursecat -> coursecat or site\n if (!$coursecat = get_record('course_categories','id',$context->instanceid)) {\n return array();\n }\n if (!empty($coursecat->parent)) { // return parent value if exist\n $parent = get_context_instance(CONTEXT_COURSECAT, $coursecat->parent);\n return array_merge(array($parent->id), get_parent_contexts($parent));\n } else { // else return site value\n $parent = get_context_instance(CONTEXT_SYSTEM, SITEID);\n return array($parent->id);\n }\n break;\n\n case CONTEXT_COURSE: // 1 to 1 to course cat\n if (!$course = get_record('course','id',$context->instanceid)) {\n return array();\n }\n if (!empty($course->category)) {\n $parent = get_context_instance(CONTEXT_COURSECAT, $course->category);\n return array_merge(array($parent->id), get_parent_contexts($parent));\n } else {\n return array();\n }\n break;\n\n case CONTEXT_GROUP: // 1 to 1 to course\n if (!$group = get_record('groups','id',$context->instanceid)) {\n return array();\n }\n if ($parent = get_context_instance(CONTEXT_COURSE, $group->courseid)) {\n return array_merge(array($parent->id), get_parent_contexts($parent));\n } else {\n return array();\n }\n break;\n\n case CONTEXT_MODULE: // 1 to 1 to course\n if (!$cm = get_record('course_modules','id',$context->instanceid)) {\n return array();\n }\n if ($parent = get_context_instance(CONTEXT_COURSE, $cm->course)) {\n return array_merge(array($parent->id), get_parent_contexts($parent));\n } else {\n return array();\n }\n break;\n\n case CONTEXT_BLOCK: // 1 to 1 to course\n if (!$block = get_record('block_instance','id',$context->instanceid)) {\n return array();\n }\n if ($parent = get_context_instance(CONTEXT_COURSE, $block->pageid)) {\n return array_merge(array($parent->id), get_parent_contexts($parent));\n } else {\n return array();\n }\n break;\n\n default:\n error('This is an unknown context!');\n return false;\n }\n}", "title": "" }, { "docid": "1b451f4f937642eb3717ad51b13c3780", "score": "0.39629942", "text": "function rest_api_filter_fields_magic( $data, $post, $request ){\n // Get the parameter from the WP_REST_Request\n // This supports headers, GET/POST variables.\n // and returns 'null' when not exists\n $fields = $request->get_param('fields');\n if($fields){\n\n // Create a new array\n $filtered_data = array();\n\n // Explode the $fields parameter to an array.\n $filter = explode(',',$fields);\n\n // If the filter is empty return the original.\n if(empty($filter) || count($filter) == 0)\n return $data;\n\n\n // The original data is in $data object in the property data\n // Foreach property inside the data, check if the key is in the filter.\n foreach ($data->data as $key => $value) {\n //echo $key;\n // If the key is in the $filter array, add it to the $filtered_data\n // original\n /*\n if (in_array($key, $filter)) {\n $filtered_data[$key] = $value;\n }\n */\n //echo $filter;\n \n if (in_array($key, $filter)) {\n\n switch ($key) {\n case \"acf\": {\n // need a case wher I didnt call for anything within acf fields.\n $acf = $data->data[\"acf\"];\n //echo $acf;\n\n foreach ($acf as $key_acf => $value_acf) {\n // echo $value_acf;\n if (in_array($key_acf, $filter)) {\n $filtered_data[\"acf\"][$key_acf] = $value_acf;\n }\n \n }\n }\n break;\n default:\n $filtered_data[$key] = $value;\n }\n\n\n /*\n if ($key == \"acf\") {\n // once it comes here it only hits once.\n $acf = $data->data[\"acf\"];\n //echo $acf;\n\n foreach ($acf as $key_acf => $value_acf) {\n // echo $value_acf;\n if (in_array($key_acf, $filter)) {\n $filtered_data[\"acf\"][$key_acf] = $value_acf;\n }\n \n }\n }\n else {\n $filtered_data[$key] = $value;\n }\n */\n\n \n \n \n }\n \n\n }\n\n }\n\n // return the filtered_data if it is set and got fields.\n return (isset($filtered_data) && count($filtered_data) > 0) ? $filtered_data : $data;\n\n}", "title": "" }, { "docid": "739060c4ea8e7c5d82158821cd0b54a1", "score": "0.39505398", "text": "public function get_all_fields()\n {\n $raw_fields = get_object_vars($this);\n return array_diff_key($raw_fields, array('__one'=>'', '__many'=>'', '__manager'=>'', '__functions'=>'', '__constraints'=>''));\n }", "title": "" }, { "docid": "275980d24a0860679a5448fbfeff2901", "score": "0.39449763", "text": "function filterMenu($properties = array(), $objs, $recursiveLevel = 0, $currentLevel = 0) {\r\n\t\t$currentLevel ++;\r\n\t\tif ($recursiveLevel >= 1 && $recursiveLevel < $currentLevel)\r\n\t\t\treturn;\r\n\t\tforeach ( $properties as $property => $value ) {\r\n\t\t\tforeach ( $objs as $obj ) {\r\n\t\t\t\tif (! isset ( $obj->$property ))\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tif (is_bool ( $value ))\r\n\t\t\t\t\t$this->boolFilter ( $value, $property, $properties, $obj, &$objs, $recursiveLevel, $currentLevel );\r\n\t\t\t\telse\r\n\t\t\t\t\t$this->arrayFilter ( $value, $property, $properties, $obj, &$objs, $recursiveLevel, $currentLevel );\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $objs;\r\n\t}", "title": "" }, { "docid": "5ea96f9e0bc78c2f8b3ad02f34fe9404", "score": "0.39430937", "text": "public static function cleanFields($fields)\n {\n $fields = parent::cleanFields($fields);\n\n //If config is requested add id and type as they are need to pull config.\n if (in_array('config', $fields)) {\n $fields[] = 'id';\n $fields[] = 'type';\n }\n\n //Removing config from field list as it is not a real column in the table.\n if (in_array('config', $fields)) {\n $key = array_keys($fields, 'config');\n unset($fields[$key[0]]);\n }\n\n return $fields;\n }", "title": "" }, { "docid": "beb405054de6ac970d93cbd0e7931478", "score": "0.39349085", "text": "public function sanitize()\n {\n if (method_exists($this, 'filters')) {\n $filtry = \\Filtry::make($this->all(), $this->filters());\n $this->merge($filtry->getFiltered());\n }\n }", "title": "" }, { "docid": "a34de100d6e16bf657ac36c47236ff4d", "score": "0.39271072", "text": "public static function reset() {\n // reset to defaults\n self::$instance->setRecursion(true);\n self::$instance->maxRecursionDepth();\n self::$instance->setPrefix(NULL);\n self::$instance->setSkipFiles(NULL);\n self::$instance->setSkipDirs(NULL);\n self::$instance->setSuffixFilter(NULL);\n self::$instance->showHidden(false);\n }", "title": "" }, { "docid": "e70a6c5dd77f5a8c8d575442d1614822", "score": "0.39205176", "text": "public function testDataRetrievalOnNestedObjectWithUnknownPath()\n {\n // Setup\n //$this->idToLabelExtension->expects($this->never());\n\n $mockEntity = new MockObject\\MockStaticEntity();\n\n $mockEntity->setFoo('wonderfoo');\n $mockEntity->setBar(array(1, 2, 3));\n\n $this->presentationListExtension->setConfig(\n array(\n 'sample' => array(\n 'beer' => 'beer',\n 'outOfBound' => 'bar[3]',\n ),\n )\n );\n\n // Test\n $contextMap = $this->presentationListExtension->inPresentationList($mockEntity, 'sample');\n\n $this->assertEquals(null, $contextMap['beer']);\n $this->assertEquals(null, $contextMap['outOfBound']);\n }", "title": "" }, { "docid": "8ffe92ed356f29a4dbccedbe23d36ab5", "score": "0.39196253", "text": "public function checkFields() {\n\t\t// bag items\n\t\tif(!is_null($this->bagItems)) {\n\t\t\tforeach($this->bagItems as $key=>$bagItem) {\n\t\t\t\t$bagItem->checkFields();\n\t\t\t\t$this->bagItems[$key] = splitNullValuesInObject($bagItem);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// totals\n\t\tif($this->totals != null) {\n\t\t\t$this->totals = splitNullValuesInObject($this->totals);\n\t\t}\n\t\t\n\t\t// context\n\t\tif($this->context != null) {\n\t\t\t$this->context->checkFields();\n\t\t\t$this->context = splitNullValuesInObject($this->context);\n\t\t}\n\t\t\n\t\t// customer\n\t\tif($this->customer != null) {\n\t\t\t$this->customer->checkFields();\n\t\t\t$this->customer = splitNullValuesInObject($this->customer);\n\t\t}\n\t}", "title": "" }, { "docid": "d2788d0db845ae60b6932907fa32247f", "score": "0.3919624", "text": "function getFields() {\n\t\t$columns = $this->table->getColumns();\n\t\t$table_options = $this->table->getOptions();\n\n\t\t// Remove columns for nested sets. Theses fields may be different for different types\n\t\t// of tree implementations.\n\t\tif (isset($table_options['treeImpl']) && 'NestedSet' == $table_options['treeImpl']) {\n\t\t\tunset(\n\t\t\t\t$columns[$table_options['treeOptions']['rootColumnName']],\n\t\t\t\t$columns['lft'],\n\t\t\t\t$columns['rgt'],\n\t\t\t\t$columns['level']\n\t\t\t);\n\t\t}\n\t\treturn $columns;\n\t}", "title": "" }, { "docid": "3cd1acb70f2114efaee5c27615ad9fac", "score": "0.39125255", "text": "function renderTicketField( $context ) {\n global $templateDir;\n global $rootUrl;\n \n $view = $context->view();\n \n $form_name = $context->form();\n $field_name = $context->field();\n $value = $context->value();\n $override_name = $context->name();\n $override_as_label = $context->force_label();\n $field_events = $context->events();\n \n // collect field properties\n $field = $this->getFieldFromMap($view,$field_name);\n $typeint = $this->getTypeInt($field['field_type']);\n $typename = $field['field_type'];\n \n // override properties if appropriate\n if( $context->columns() ) { $field['num_cols'] = $context->columns(); }\n if( $context->rows() ) { $field['num_rows'] = $context->rows(); }\n if( $context->label() ) { $field['label'] = $context->label(); }\n if( $context->multiple()) { $field['multiple'] = $context->multiple();}\n \n if ($typeint != ZTFIELD_SECTION && $typeint != ZTFIELD_HIDDEN && $override_as_label == 1) {\n $typeint = ZTFIELD_LABEL;\n $typename = \"label\";\n }\n \n // don't waste time on spacers\n if( $typeint == ZTFIELD_SECTION ) {\n $vals = array('label'=>tr($field['field_label']));\n return $this->_template($templateDir, $typename, $vals); \n }\n\n // collect system properties\n $fprops = getFmFieldProps($view, $field_name);\n $tprops = getFmTypeProps($typename);\n \n // see if this is a 'viewonly' screen, if so, no form fields needed\n if( $this->getViewProp($view, 'view_only') ) { return $this->getTextValue($view,$field_name,$value); }\n \n // collect template props\n $vals = array();\n $vals[\"view\"] = $view;\n $vals[\"form_name\"] = $form_name;\n $vals[\"templateDir\"] = $templateDir;\n $vals[\"rooturl\"] = $rootUrl;\n $vals['date_format'] = $this->_zen->popupDateFormat();\n $vals[\"field_name\"] = $this->_zen->ffv($override_name);\n $vals[\"field_events\"] = $field_events;\n \n if( !isset($value) && ($view==\"ticket_create\" || $view==\"project_create\"\n || $view == 'search_form' || preg_match('@(ticket|project)_list_filters@',$view) )) {\n // if there is no value and this is a create page or search page then we will\n // retrieve a default value to use instead\n $vals[\"field_value\"] = $this->getDefaultValue($view,$field_name);\n } else if( $typeint == ZTFIELD_DATE && !preg_match('/[^0-9]/', $value) ) {\n // if it is a date and we have a numeric value, then we will parse it to\n // a date right here\n //$vals['field_value'] = $this->_zen->showDate($value);\n $vals[\"field_value\"] = strlen($value)? $this->_zen->showDateTime($value) : '';\n } else if( ZenFieldMap::isMultiField($vals['field_name']) ) {\n/*\n $tok=strtok($value,\"\\t\");\n $vals[\"field_value\"]=array();\n while ($tok !== false) {\n $vals[\"field_value\"][] = $this->_zen->ffv($tok, $field['num_cols']);\n $tok = strtok(\"\\t\");\n }\n*/\n $vals[\"field_value\"]=array();\n if ( is_array($value) ) {\n foreach($value as $element) {\n $vals[\"field_value\"][] = $element;\n }\n } else {\n $vals[\"field_value\"][] = $value;\n }\n } else {\n $vals[\"field_value\"] = $value;\n }\n $vals[\"field_label\"] = $this->getTextValue($view,$field_name,$value);\n $vals[\"field_max\"] = $context->maxlength()? $context->maxlength() : $field['num_cols'];\n if( $tprops[\"has_choices\"] ) {\n $vals[\"field_choices\"] = $this->getChoices($view,$field_name);\n }\n \n // deal with fields by checking \n // the row count to make sure it is reasonable\n if( $field['num_rows'] == 1 ) { $vals['field_cols'] = $field['num_cols'] > 30? 30 : $field['num_cols']+2; }\n else { $vals['field_cols'] = $field['num_cols'] > 50? 50 : $field['num_cols']; }\n $vals['field_rows'] = $field['num_rows'];\n \n// $vals['field_multiple'] = $view == 'search_form' && $typeint == ZTFIELD_MENU && $field['num_rows'] > 1? \"multiple\" : \"\";\n// $vals['field_multiple'] = (\n// ( $view == 'search_form' || strpos($field_name,'custom_multi')===0 )\n// && $typeint == ZTFIELD_MENU && $field['num_rows'] > 1\n// ) ? \"multiple\" : \"\";\n $vals['field_multiple'] = ( $context->multiple()\n ||\n ( $view == 'search_form' && $typeint == ZTFIELD_MENU && $field['num_rows'] > 1 )\n || \n ( ZenFieldMap::isMultiField($field_name) )\n ) ? \"multiple\" : \"\";\n\n if( $vals['field_multiple'] ) {\n $vals['field_name'] .= \"[]\";\n }\n\n // set up special searchbox properties such as url and instructions\n if( $typeint == ZTFIELD_SEARCHBOX ) {\n if( $field_name == 'relations' ) { \n $vals['search_text'] = '<br>('.tr(\"Enter multiple ids, separated by a comma\").')';\n }\n switch($field_name) {\n case \"project_id\":\n $s = 'project';\n break;\n case \"id\":\n case \"relations\":\n $s = 'ticket';\n break;\n case \"user_id\":\n case \"creator_id\":\n $s = 'user';\n break;\n case \"type_id\":\n case \"bin_id\":\n case \"status\":\n case \"priority\":\n case \"system_id\":\n $s = 'datatype';\n break;\n default:\n $this->_zen->addDebug(\"renderTicketField\",\"The field $field_name cannot have a searchbox\",1);\n return $this->getTextValue($view,$field_name,$value);\n }\n $vals[\"search_url\"] = $rootUrl.\"/helpers/{$s}Searchbox.php?\"\n .\"return_form=$form_name&return_field={$vals['field_name']}\";\n if( !$fprops[\"multiple\"] && !$this->getViewProp($view,'multiple') ) {\n $vals['search_url'] .= \"&onechoice=1\";\n }\n }\n \n // deal with special custom field problems\n if( ZenFieldMap::isVariableField($field_name) ) {\n $f = $this->_zen->getCustomField($field_name);\n if( $f['js_validation'] ) {\n if( $vals['field_events'] ) {\n if( preg_match(\"/onblur=(['\\\"])([^'\\\"]+)['\\\"]/\", $vals['field_events'], $matches) ) {\n $q = $matches[1];\n $v = str_replace($q, \"\\\\$q\", $f['js_validation']);\n if( !preg_match('@;$@', $v) ) { $v .= ';'; }\n $val = \"onblur='{$v};{$matches[2]}'\";\n $vals['field_events'] = preg_replace(\"/onblur=['\\\"]([^'\\\"]+)['\\\"]/\", $val, $vals['field_events']);\n }\n else {\n $vals['field_events'] .= \" onblur=\".$zen->fixJsVal($f['js_validation']);\n }\n }\n else {\n $vals['field_events'] = \"onblur=\".$zen->fixJsVal($f['js_validation']);\n }\n }\n if( strpos($field_name,'custom_date') === 0 ) {\n if( $vals['field_value'] == 'NULL' ) { $vals['field_value'] = ''; }\n if( $vals['field_value'] == 0 ) { $vals['field_value'] = \"\"; }\n }\n }\n \n // check for special cases, such as textarea\n if( $typeint == ZTFIELD_TEXT && $field['num_rows'] > 1 ) {\n $typename = 'textarea';\n }\n \n // check field if it is a checkbox\n if( $typeint == ZTFIELD_CHECKBOX && !$vals['field_value'] ) {\n $vals['field_value'] = null;\n }\n \n // hide any fields which are not visible\n if( $field['is_visible'] < 1 ) {\n $typename = 'hidden';\n if( $field['is_required'] && !strlen($value) ) {\n $value = $this->getDefaultValue($view, $field_name);\n if( !strlen($value) ) {\n $this->_zen->addDebug(\"renderTicketField\", \"Required field is hidden and has no value: $view, $field_name\", 1);\n }\n }\n }\n\n if ( $typename == 'label' && strpos($field_name,\"multi\")>0 ) {\n $typename = \"multilabel\";\n $vals[\"field_choices\"] = $this->getChoices($view,$field_name);\n }\n\n if ( $typename == \"hidden\" && ZenFieldMap::isMultiField($field_name) ) {\n $typename = \"multihidden\";\n $vals[\"field_choices\"] = $this->getChoices($view,$field_name);\n //Prevent loosing current values in hidden fields:\n if( is_array($vals['field_value']) ) {\n foreach ($vals[\"field_value\"] as $value) {\n if ( ! in_array($value, $vals[\"field_choices\"]) ) {\n $vals[\"field_choices\"][$value]= $value;\n }\n }\n }\n }\n \n // variable fields have some special attributes. First, we don't want\n // to try to render keys for these (too much trouble with escaping), so\n // we render them without keys. Second, the normal comparisons (key to\n // current value) won't work since there are no keys, so we have to\n // check the value.\n $vf = ZenFieldMap::isVariableField($vals['field_name']);\n if( $vf && $typename == 'menu' ) { $typename = 'menunokeys'; }\n \n // we escape the field_choices array here (values only) and try\n // to find the correct value to select if this is a variable field\n if( $vf && isset($vals['field_choices']) ) {\n foreach($vals['field_choices'] as $k=>$v) {\n if( $v == $vals['field_value'] ) { \n $vals['field_selected'] = $v;\n }\n }\n }\n \n // parse and return \n return $this->_template($templateDir, $typename, $vals);\n }", "title": "" }, { "docid": "3b4e3c4c0c7a7c5adf2fed24b588e5a8", "score": "0.39096683", "text": "function custom_override_checkout_fields( $fields ) {\n unset($fields['order']['order_comments']);\n unset($fields['billing']['billing_last_name']);\n unset($fields['billing']['billing_country']);\n unset($fields['billing']['billing_company']);\n unset($fields['billing']['billing_phone']);\n unset($fields['billing']['billing_postcode']);\n unset($fields['billing']['billing_state']);\n unset($fields['billing']['billing_address_1']);\n unset($fields['billing']['billing_address_2']);\n\n return $fields;\n}", "title": "" }, { "docid": "271931edaae266fbd2792807d831e09f", "score": "0.39049834", "text": "protected function cleanDefaultsBeforeProcess() {\n\t\t$exclude = array();\n\n\t\t$data = isset($this->controller->request->data[$this->model]) ? $this->controller->request->data[$this->model] : array();\n\t\tforeach ($this->settings['advancedFilter'] as $fieldSet) {\n\t\t\tforeach ($fieldSet as $field => $fieldData) {\n\t\t\t\t$showKey = $field . '__show';\n\t\t\t\t$noneKey = $field . '__none';\n\t\t\t\t$compKey = $field . '__comp_type';\n\n\t\t\t\tif (isset($data[$showKey])) {\n\t\t\t\t\tif ($data[$showKey] === '0') {\n\t\t\t\t\t\tunset($this->controller->request->data[$this->model][$showKey]);\n\t\t\t\t\t\t$exclude[] = $showKey;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (isset($data[$noneKey])) {\n\t\t\t\t\tif ($data[$noneKey] === '0') {\n\t\t\t\t\t\tunset($this->controller->request->data[$this->model][$noneKey]);\n\t\t\t\t\t\t$exclude[] = $noneKey;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ($fieldData['filter']['method'] = 'findComplexType' && isset($data[$compKey])) {\n\t\t\t $queryClass = Inflector::classify($fieldData['type']) . 'Query';\n\t\t\t\t\tApp::uses($queryClass, 'Lib/AdvancedFilters/Query');\n\n\t\t\t\t\t$defaultComp = $queryClass::$defaultComparison;\n\n\t\t\t\t\tif ($data[$compKey] == $defaultComp) {\n\t\t\t\t\t\tunset($this->controller->request->data[$this->model][$compKey]);\n\t\t\t\t\t\t$exclude[] = $compKey;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $exclude;\n\t}", "title": "" } ]
a34769f33beac9593b6c98f40b352cf9
Lists all of the blobs in the given container.
[ { "docid": "822834c412e02ec5d28cc806d2fd8120", "score": "0.7875764", "text": "public function listBlobs(\n $container,\n BlobModels\\ListBlobsOptions $options = null\n );", "title": "" } ]
[ { "docid": "1da83324e490ce4e43e8250b160762e2", "score": "0.8459814", "text": "public function listBlobs($container, $options = null);", "title": "" }, { "docid": "d05b610f58d7591e0688160601a94b34", "score": "0.6963521", "text": "public function listBlobBlocks($container, $blob, $options = null);", "title": "" }, { "docid": "f615a3f5a16fa3ace84a7d17000c0e94", "score": "0.6832384", "text": "public function listBlobsAsync(\n $container,\n BlobModels\\ListBlobsOptions $options = null\n );", "title": "" }, { "docid": "a6893dc290f652950ea1db70f8b0b686", "score": "0.6279868", "text": "public function listPageBlobRanges($container, $blob, $options = null);", "title": "" }, { "docid": "810ec5901f1d08c13b429f9a64fb2abd", "score": "0.6163711", "text": "public function listContainers(BlobModels\\ListContainersOptions $options = null);", "title": "" }, { "docid": "c8ed65aaecf5bf2a7d310b8fe53e403b", "score": "0.579051", "text": "public function listAllBucketContents() {\r\n $allBucketContents = $this->getAllBucketContents();\r\n\r\n $tableHtml = \"\r\n <table class=\\\"table table-bordered\\\">\r\n <thead>\r\n <tr>\r\n <th>Bucket</th>\r\n <th>Blob</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n \";\r\n\r\n foreach ($allBucketContents as $bucketName => $bucketContents) {\r\n if(count($bucketContents) > 0) {\r\n foreach ($bucketContents as $object) {//this is paginated, hence a loop needed\r\n $tableHtml .= \"<tr>\r\n <td>\".$bucketName.\"</td>\r\n <td><a href='https://\".$bucketName.\".s3.amazonaws.com/\".$object['Key'].\"'>\".$object['Key'].\"</a></td>\r\n </tr>\";\r\n\r\n }\r\n } else {\r\n $tableHtml .= \"\r\n <td> No files </td>\r\n \";\r\n }\r\n }\r\n\r\n $tableHtml .= \"\r\n </tbody>\r\n </table>\r\n \";\r\n\r\n return [\"html\"=>$tableHtml, \"data\"=>$allBucketContents];\r\n }", "title": "" }, { "docid": "980c82e983cba72656f10d774df04640", "score": "0.5698637", "text": "public function getContainersList() {\n $containers = array();\n $di = new \\DirectoryIterator($this->getRoot('storage'));\n foreach ($di as $object) {\n if ($object->isDir() && !$object->isDot()) {\n $filename = $object->getFilename();\n if ($filename[0] != '.') { //Is not hidden\n $containers[] = $filename;\n }\n }\n }\n sort($containers);\n return $containers;\n }", "title": "" }, { "docid": "aca0a3c380a01dda2be33e2a30352a39", "score": "0.56836736", "text": "public function listBlobBlocks(\n $container,\n $blob,\n BlobModels\\ListBlobBlocksOptions $options = null\n );", "title": "" }, { "docid": "8727bd67122f89cabb7f83b9c7c5d913", "score": "0.55782455", "text": "public function listBlockStorage()\n {\n return $this->api->makeAPICall('GET', $this->api::BLOCK_STORAGE_URL);\n }", "title": "" }, { "docid": "257a13cd2ff6df6b1494bd70cb404337", "score": "0.55147177", "text": "public function getBlob($container, $blob, $options = null);", "title": "" }, { "docid": "85a1d24bc5f992e663fe4119d12c4a10", "score": "0.5507981", "text": "public function listPageBlobRanges(\n $container,\n $blob,\n BlobModels\\ListPageBlobRangesOptions $options = null\n );", "title": "" }, { "docid": "b0e82002660e3c6889173d3a50276a39", "score": "0.54730946", "text": "public function listContainers($options = null);", "title": "" }, { "docid": "39fae53cff05c145b590adfe58a28401", "score": "0.53279537", "text": "abstract protected function getFiles(ContainerBuilder $container);", "title": "" }, { "docid": "98b14aabf78b40ecea174cd434139556", "score": "0.5306628", "text": "public function listStorageServices();", "title": "" }, { "docid": "98b14aabf78b40ecea174cd434139556", "score": "0.5306628", "text": "public function listStorageServices();", "title": "" }, { "docid": "bc40bca98cb6ed7fc87101ca6dad3a1e", "score": "0.52319825", "text": "public function listContainersAsync(\n BlobModels\\ListContainersOptions $options = null\n );", "title": "" }, { "docid": "5b79fe771bab3e35dce13a7e4ce664df", "score": "0.5182928", "text": "function get_container_contents( $ldapserver, $dn, $size_limit=0, $filter='(objectClass=*)', $deref=LDAP_DEREF_ALWAYS ) {\n\t$search = @ldap_list( $ldapserver->connect(), $dn, $filter, array( 'dn' ), 1, $size_limit, 0, $deref );\n\tif( ! $search )\n\t\treturn array();\n\n\t$search = ldap_get_entries( $ldapserver->connect(), $search );\n\n\t$return = array();\n\tfor( $i=0; $i<$search['count']; $i++ ) {\n\t\t$entry = $search[$i];\n\t\t$dn = $entry['dn'];\n\t\t$return[] = $dn;\n\t}\n\n\treturn $return;\n}", "title": "" }, { "docid": "b54f3be4a273d941f154018e95508659", "score": "0.51412123", "text": "public function getFileContainer() {\n\t\t$containers = $this->input->post(\"containers\");\n\t\t$containersArray = json_decode($containers, true);\n\t\t$returnArray = [];\n\t\tforeach($containersArray as $container) {\n\t\t\t$collectionId = $container[\"collectionId\"];\n\t\t\t$index = $container[\"index\"];\n\t\t\t$filename = $container[\"filename\"];\n\t\t\t$fileObjectId = $container[\"fileObjectId\"];\n\t\t\t$collection = $this->collection_model->getCollection($collectionId);\n\t\t\t$fileContainer = new fileContainerS3();\n\t\t\t$fileContainer->originalFilename = $filename;\n\t\t\t$fileContainer->path = \"original\";\n\n\t\t\tif(!$fileObjectId) {\n\t\t\t\t$fileContainer->ready = false;\n\n\t\t\t// this handler type may get overwritten later - for example, once we identify the contents of a zip\n\t\t\t\t$fileHandler = $this->filehandler_router->getHandlerForType($fileContainer->getType());\n\n\t\t\t\t$fileHandler->sourceFile = $fileContainer;\n\t\t\t\t$fileHandler->collectionId = $collectionId;\n\t\t\t\t$fileId = $fileHandler->save();\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$fileId = $fileObjectId;\n\t\t\t}\n\n\t\t\t$returnArray[] = [\"fileObjectId\"=>$fileId, \"collectionId\"=>$collectionId, \"bucket\"=>$collection->getBucket(), \"bucketKey\"=>$collection->getS3Key(), \"path\"=>$fileContainer->path, \"index\"=>$index];\n\t\t\tif(isset($fileHandler)) {\n\t\t\t\t$this->doctrine->em->detach($fileHandler->asset);\n\t\t\t}\n\t\t\t\n\t\t\t$fileHandler = null;\n\t\t\t$fileContainer = null;\n\n\t\t\t$this->doctrine->em->clear();\n\t\t\tgc_collect_cycles();\n\n\t\t}\n\n\t\t// TODO: check that we can actually write to this bucket\n\t\t// right now, it'll fail silently (though if you look at the browser debugger it's obvious)\n\n\t\techo json_encode($returnArray);\n\n\t}", "title": "" }, { "docid": "67f3cb9495a8a362ed6e6f9187fcaab0", "score": "0.5032607", "text": "public function listBlobBlocksAsync(\n $container,\n $blob,\n BlobModels\\ListBlobBlocksOptions $options = null\n );", "title": "" }, { "docid": "560f355ca14eff83e48b32d6771dae4a", "score": "0.5020591", "text": "public function getBlob(\n $container,\n $blob,\n BlobModels\\GetBlobOptions $options = null\n );", "title": "" }, { "docid": "6ce7dab9076b9638c079e6b4c53c6fb0", "score": "0.4998514", "text": "public function getBlobMetadata($container, $blob, $options = null);", "title": "" }, { "docid": "e3dcf42616ccd2b3bfbfadbb4fa8d355", "score": "0.49757025", "text": "public function getCards()\n {\n $myDb = new Database();\n\n $sql = \"SELECT file_path FROM image\"; // Query to select all from the db.\n\n $stmt = $myDb->conn->query($sql); // Execute the query.\n\n // Fetch all the data returned.\n $this->list = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n return $this->list;\n }", "title": "" }, { "docid": "437bf0140ba97855602f007bbf566b05", "score": "0.48850495", "text": "public function listAction(Request $request)\n {\n $tags = $request->query->get('tags');\n $tags = explode(',', $tags);\n $offset = (int)$request->query->get('offset', 0);\n $limit = (int)$request->query->get('limit', 8);\n\n $images = $this->getImagesByTag($tags, $offset, $limit);\n\n return $this->processResults($images, $offset);\n }", "title": "" }, { "docid": "7194605bedee1459589de89456556c3b", "score": "0.48465598", "text": "public function getBlobProperties($container, $blob, $options = null);", "title": "" }, { "docid": "8d689d2f3d62a1eb10e875b7f254d432", "score": "0.48340225", "text": "public function listAll();", "title": "" }, { "docid": "5db69c905a586fcf5b0307c01733cabe", "score": "0.47997695", "text": "static function all() {\n $uploads = array();\n\n $results = pg_query(\"SELECT * FROM dogupload\");\n\n $row_object = pg_fetch_object($results);\n while($row_object){\n $new_upload = new Upload(\n intval($row_object->id),\n $row_object->breed,\n $row_object->image,\n $row_object->location\n );\n\n $uploads[] = $new_upload;\n $row_object = pg_fetch_object($results);\n }\n return $uploads;\n }", "title": "" }, { "docid": "921009dbaf5d2b34929583f7b8341d23", "score": "0.47757256", "text": "function windows_azure_storage_query_azure_attachments() {\n\tif ( ! current_user_can( 'upload_files' ) ) {\n\t\twp_send_json_error();\n\t}\n\n\t$cache_ttl = Windows_Azure_Helper::get_cache_ttl();\n\t$request = wp_unslash( $_REQUEST );\n\t$query = isset( $request['query'] ) ? (array) $request['query'] : array();\n\t$query = array_intersect_key( $query, array_flip( array(\n\t\t's',\n\t\t'posts_per_page',\n\t\t'paged',\n\t) ) );\n\n\t$query = wp_parse_args( $query, array(\n\t\t's' => '',\n\t\t'posts_per_page' => Windows_Azure_Rest_Api_Client::API_REQUEST_BULK_SIZE,\n\t\t'paged' => 1,\n\t) );\n\n\t$next_marker = 1 === (int) $query['paged'] || empty( $_COOKIE['azure_next_marker'] )\n\t\t? false\n\t\t: sanitize_text_field( wp_unslash( $_COOKIE['azure_next_marker'] ) );\n\n\t$cache_key = 'wasr_' . md5( json_encode( $query ) );\n\tif ( $cache_ttl > 0 && $posts = wp_cache_get( $cache_key ) ) {\n\t\twp_send_json_success( $posts );\n\n\t\treturn;\n\t}\n\t$posts = array();\n\t$credentials = Windows_Azure_Config_Provider::get_account_credentials();\n\t$client = new Windows_Azure_Rest_Api_Client( $credentials['account_name'], $credentials['account_key'] );\n\t$blobs = $client->list_blobs( Windows_Azure_Helper::get_default_container(), $query['s'], (int) $query['posts_per_page'], $next_marker );\n\tsetcookie( 'azure_next_marker', $blobs->get_next_marker() );\n\tforeach ( $blobs->get_all() as $blob ) {\n\t\tif ( '/' === $blob['Name'][ strlen( $blob['Name'] ) - 1 ] ) {\n\t\t\tcontinue;\n\t\t}\n\t\t$is_image = ( false !== strpos( $blob['Properties']['Content-Type'], 'image/' ) );\n\n\t\t$blob_info = array(\n\t\t\t'id' => base64_encode( $blob['Name'] ),\n\t\t\t'uploading' => false,\n\t\t\t'filename' => $blob['Name'],\n\t\t\t'dateFormatted' => $blob['Properties']['Last-Modified'],\n\t\t\t'icon' => $is_image ? Windows_Azure_Helper::get_full_blob_url( $blob['Name'] ) : wp_mime_type_icon( $blob['Properties']['Content-Type'] ),\n\t\t\t'url' => Windows_Azure_Helper::get_full_blob_url( $blob['Name'] ),\n\t\t\t'filesizeHumanReadable' => size_format( $blob['Properties']['Content-Length'] ),\n\t\t\t'isImage' => $is_image,\n\t\t);\n\n\t\tif ( current_user_can( 'delete_posts' ) ) {\n\t\t\t$blob_info['nonces']['delete'] = wp_create_nonce( 'delete-blob_' . $blob_info['id'] );\n\t\t}\n\n\t\t$posts[] = $blob_info;\n\t}\n\tif ( $cache_ttl > 0 ) {\n\t\twp_cache_set( $cache_key, $posts, '', $cache_ttl );\n\t}\n\twp_send_json_success( $posts );\n}", "title": "" }, { "docid": "a4bbbfb9ed08e48d0ff2f53b8ba8e25c", "score": "0.4768246", "text": "public function getList()\n\t{\n\t\t$req = $this->_db->query('SELECT * from IMAGE');\n\t\twhile($donnees = $req->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$images[] = new image($donnees);\n\t\t}\n\t\t\n\t\treturn $images;\n\t}", "title": "" }, { "docid": "2fc96f800f3e0bc164d3f07c49005cfa", "score": "0.4765335", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n $clubs = $em->getRepository(\"FTTAdminBundle:Club\")->findAll();\n \n $LogosClubs = array();\n foreach ($clubs as $key => $entity) {\n $LogosClubs[$key] = base64_encode(stream_get_contents($entity->getLogoClub()));\n }\n \n return $this->render(\"FTTAdminBundle:Club:listClub.html.twig\", array(\"clubs\" => $clubs,\"LogosClubs\"=> $LogosClubs));\n \n }", "title": "" }, { "docid": "8096502abf70ab0375a5ccd74494c5ea", "score": "0.4758727", "text": "function createContainerSample($blobClient)\n{\n // OPTIONAL: Set public access policy and metadata.\n // Create container options object.\n $createContainerOptions = new CreateContainerOptions();\n\n // Set public access policy. Possible values are\n // PublicAccessType::CONTAINER_AND_BLOBS and PublicAccessType::BLOBS_ONLY.\n // CONTAINER_AND_BLOBS: full public read access for container and blob data.\n // BLOBS_ONLY: public read access for blobs. Container data not available.\n // If this value is not specified, container data is private to the account owner.\n $createContainerOptions->setPublicAccess(PublicAccessType::CONTAINER_AND_BLOBS);\n\n // Set container metadata\n $createContainerOptions->addMetaData(\"key1\", \"value1\");\n $createContainerOptions->addMetaData(\"key2\", \"value2\");\n\n try {\n // Create container.\n $blobClient->createContainer(\"mycontainer1\", $createContainerOptions);\n } catch (ServiceException $e) {\n $code = $e->getCode();\n $error_message = $e->getMessage();\n echo $code.\": \".$error_message.PHP_EOL;\n }\n}", "title": "" }, { "docid": "f718c78596f0e94ab8088bfdbc130292", "score": "0.47334996", "text": "public function setBlobContainer($val)\n {\n $this->_propDict[\"blobContainer\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "fc966e569f835ee5a7f59355e07e0af2", "score": "0.47232866", "text": "function blog_get_page_content_list($container_guid = NULL) {\n\n\t$return = array();\n\n\t$return['filter_context'] = $container_guid ? 'mine' : 'all';\n\n\t$options = array(\n\t\t'type' => 'object',\n\t\t'subtype' => 'blog',\n\t\t'full_view' => false,\n\t);\n\n\t$current_user = elgg_get_logged_in_user_entity();\n\n\tif ($container_guid) {\n\t\t// access check for closed groups\n\t\tgroup_gatekeeper();\n\n\t\t// COLDTRICK: FIXES listing of users blogs\n\t\t$container = get_entity($container_guid);\n\t\tif ($container instanceof ElggGroup) {\n\t\t\t$options['container_guid'] = $container_guid;\n\t\t} else {\n\t\t\t$options['owner_guid'] = $container_guid;\n\t\t}\n\t\t$return['title'] = elgg_echo('blog:title:user_blogs', array($container->name));\n\n\t\t$crumbs_title = $container->name;\n\t\telgg_push_breadcrumb($crumbs_title);\n\n\t\tif ($current_user && ($container_guid == $current_user->guid)) {\n\t\t\t$return['filter_context'] = 'mine';\n\t\t} else if (elgg_instanceof($container, 'group')) {\n\t\t\t$return['filter'] = false;\n\t\t} else {\n\t\t\t// do not show button or select a tab when viewing someone else's posts\n\t\t\t$return['filter_context'] = 'none';\n\t\t}\n\t} else {\n\t\t$return['filter_context'] = 'all';\n\t\t$return['title'] = elgg_echo('blog:title:all_blogs');\n\t\telgg_pop_breadcrumb();\n\t\telgg_push_breadcrumb(elgg_echo('blog:blogs'));\n\t}\n\n\telgg_register_title_button();\n\n\t// show all posts for admin or users looking at their own blogs\n\t// show only published posts for other users.\n\t$show_only_published = true;\n\tif ($current_user) {\n\t\tif (($current_user->guid == $container_guid) || $current_user->isAdmin()) {\n\t\t\t$show_only_published = false;\n\t\t}\n\t}\n\tif ($show_only_published) {\n\t\t$options['metadata_name_value_pairs'] = array(\n\t\t\tarray('name' => 'status', 'value' => 'published'),\n\t\t);\n\t}\n\n\t$list = elgg_list_entities_from_metadata($options);\n\tif (!$list) {\n\t\t$return['content'] = elgg_echo('blog:none');\n\t} else {\n\t\t$return['content'] = $list;\n\t}\n\n\treturn $return;\n}", "title": "" }, { "docid": "7ea03365bcba68e333a62b0d9bf2ea1a", "score": "0.47167438", "text": "public function getAllBucketContents():array {\r\n $allBucketContents = [];\r\n foreach ($this->buckets as $bucketname => $bucket) {\r\n $allBucketContents[$bucketname] = $bucket->getBucketContents(true);\r\n }\r\n return $allBucketContents;\r\n }", "title": "" }, { "docid": "50b94f1d44a80883647d7fc440645f79", "score": "0.4710976", "text": "public function listAction()\n {\n $contents = $this->entityManager->getRepository('Studit\\H5PBundle\\Entity\\Content')->findAll();\n return $this->render('@StuditH5P/list.html.twig', ['contents' => $contents]);\n }", "title": "" }, { "docid": "ac92eaa7a6cafe55e7ac4f33988507c2", "score": "0.47099188", "text": "public function listPageBlobRangesAsync(\n $container,\n $blob,\n BlobModels\\ListPageBlobRangesOptions $options = null\n );", "title": "" }, { "docid": "e3efd7e7fbfa6d1da969ad4651bf90b7", "score": "0.4702125", "text": "public function clearBlobPages($container, $blob, $range, $options = null);", "title": "" }, { "docid": "e8f4b2de5c5e0bb7975435298c381a2a", "score": "0.46987897", "text": "public function getList()\n {\n return $this->dao->select('*')->from(TABLE_BLOCK)->orderBy('id')->fetchAll('id');\n }", "title": "" }, { "docid": "d0ed2e456de14aa552d9f81d0e0cfa23", "score": "0.46949512", "text": "public function createBlobPages(\n $container,\n $blob,\n $range,\n $content,\n $options = null\n );", "title": "" }, { "docid": "0f62b3e42b31fbdd63bf7a00ea80fafe", "score": "0.46876994", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n //Je recupere tous les produits de ma base de donnees avec la methode findAll()\n $cms = $em->getRepository('StoreBackendBundle:Cms')->findAll();\n //nom du bundle : Nom du l entité\n //c comme la requete : SELECT * FROM cms\n\n return $this->render('StoreBackendBundle:Cms:list.html.twig', array(\n 'Cms'=>$cms\n ));\n }", "title": "" }, { "docid": "ae14827f6ed38835a71d4e9db42ac375", "score": "0.4677392", "text": "public function list()\n {\n $images = $this->adapter->get(\\sprintf('%s/iso/list', $this->endpoint));\n\n return $this->handleResponse($images, ImageEntity::class, true);\n }", "title": "" }, { "docid": "56dba1b55ca893c5cf0e0f2027060bea", "score": "0.46763316", "text": "public static function getContainer($container = []) {\n global $languages_id; $pages_arr = [];\n\n $pages_query_raw = \"select * from pages p left join pages_description pd on p.pages_id = pd.pages_id where 1=1 \";\n if ( sizeof($container) > 0 ) {\n foreach ($container as $k => $v) {\n $pages_query_raw .= \"AND $k = '$v' \";\n }\n }\n $pages_query_raw .= \"order by p.sort_order\";\n\n $pages_query = tep_db_query($pages_query_raw);\n\n while($pages = tep_db_fetch_array($pages_query)) {\n $pages_arr[] = $pages;\n }\n\n return $pages_arr;\n }", "title": "" }, { "docid": "295797a33273fac12f0288efd65c759f", "score": "0.46717477", "text": "public function listObjects($subPath = \"\") {\n\n $list = $this->storageProvider->listObjects($this->containerKey, $this->getFullObjectPath($subPath));\n\n // Ensure we exclude footprint files from lists.\n $newObjects = [];\n foreach ($list as $item) {\n if ($this->path) {\n $key = substr($item->getKey(), strlen($this->path) + 1);\n } else {\n $key = $item->getKey();\n }\n\n if (substr($key, 0, 3) != \".oc\") {\n $newObjects[] = new StoredObjectSummary($item->getContainerKey(), $key, $item->getContentType(), $item->getSize(), $item->getCreatedTime(), $item->getLastModifiedTime());\n }\n\n }\n return $newObjects;\n }", "title": "" }, { "docid": "444859100b0de0219a80a70444907da7", "score": "0.46427724", "text": "public function listContents($directory = '', $recursive = false) {\n // TODO: Implement listContents() method.\n }", "title": "" }, { "docid": "4b429c0b4f9bce711d5a9120df7547fe", "score": "0.46399754", "text": "public function getContainerAcl(\n $container,\n BlobModels\\BlobServiceOptions $options = null\n );", "title": "" }, { "docid": "184b2ca3f12435b6053a453adc7493ea", "score": "0.4623618", "text": "public function fetchObjects() {\n\t\treturn $this->_client->fetchObjects($this->_id);\n\t}", "title": "" }, { "docid": "fedf1381f6a2fe3c245554dfdc9be0de", "score": "0.46218556", "text": "public function getBlob(int $blbId): array;", "title": "" }, { "docid": "8dec2ed96f2efed88efae32321452fc3", "score": "0.46216252", "text": "public function getAllList();", "title": "" }, { "docid": "93f6a6b4ffe5cacdf14d333540733d31", "score": "0.4599455", "text": "public function getBlobProperties(\n $container,\n $blob,\n BlobModels\\GetBlobPropertiesOptions $options = null\n );", "title": "" }, { "docid": "77d5fdeac18b8dd4137e2c18453626f1", "score": "0.4599399", "text": "public function getAllImages() {\n $results = $this->connexion->query('SELECT * FROM `image`');\n return $results;\n }", "title": "" }, { "docid": "6da96e35fad3db959cf294e4a99a01f4", "score": "0.45938617", "text": "public function list();", "title": "" }, { "docid": "6da96e35fad3db959cf294e4a99a01f4", "score": "0.45938617", "text": "public function list();", "title": "" }, { "docid": "0e1215a745bbe9af3126ae01733656d7", "score": "0.458825", "text": "public function listContents(string $directory, bool $hasRecursive): iterable\n {\n $resources = [];\n\n // get resources array\n $response = null;\n do {\n $response = (array) $this->adminApi->assets([\n 'type' => 'list',\n 'prefix' => $directory,\n 'resource_type' => CloudinaryAdapter::$resourceType,\n 'max_results' => 500,\n 'next_cursor' => isset($response['next_cursor']) ? $response['next_cursor'] : null,\n ]);\n $resources = array_merge($resources, $response['resources']);\n } while (array_key_exists('next_cursor', $response));\n\n // parse resourses\n foreach ($resources as $i => $resource) {\n //$resources[$i] = $this->prepareResourceMetadata($resource);\n yield $this->mapToFileAttributes($resource);\n //\n\n }\n return $resources;\n }", "title": "" }, { "docid": "052c5e740d1c6fc26770f68461aeeb2c", "score": "0.4579671", "text": "public function getBlobMetadata(\n $container,\n $blob,\n BlobModels\\GetBlobMetadataOptions $options = null\n );", "title": "" }, { "docid": "9b810d0b90222073b8ed42791bad09e1", "score": "0.4577125", "text": "public function createBlockBlob($container, $blob, $content, $options = null);", "title": "" }, { "docid": "40b97a91b93e54a8bc468ae5473ee746", "score": "0.45736358", "text": "static function mostrarDispositivos(){\n $conexion = new Conexion();\n $pre= mysqli_prepare($conexion->con, \"SELECT * FROM celulares\");\n $pre->execute();\n $resultado = $pre->get_result();\n while ($objeto=mysqli_fetch_assoc($resultado)) {\n $celulares[]=$objeto;\n }\n return $celulares;\n }", "title": "" }, { "docid": "c2ca79b7e8809039c586b02be0ef2dd9", "score": "0.45727038", "text": "public function index()\n {\n $list = $this->openstack->listSnapshot('4d9031e2761c482e873ee7fcdf73ba29', 'eb788ac6-d3b9-42b0-b566-ac53cab5a56c');\n dd($list);\n //$servers = $this->openstack->openstackProjectID('198f0660ae894f87a5ad2522e6dec551');\n $servers = $this->openstack->defaultAuthentication();\n $service = $servers->blockStorageV2();\n $volume = $service->getVolume('eb788ac6-d3b9-42b0-b566-ac53cab5a56c');\n $volume->retrieve();\n // dd($volume->id);\n $snaps = $service->listSnapshots(true,[\n 'volumeId'=> $volume->id\n ]);\n //eb788ac6-d3b9-42b0-b566-ac53cab5a56c\n // $snaps = $service->getVolume('dfb43258-283e-4245-8658-c39fc5782cdd');\n \n //$snaps = $service->listSnapshots();\n\n foreach ($snaps as $snap) {\n var_dump($snap);\n \n }\n }", "title": "" }, { "docid": "67f13def4b7d8d97331ac6ef2fb1f36e", "score": "0.45609292", "text": "function dataContainers(): array\n {\n $this->checkListIsBuilt();\n\n return collect($this->containers)->map(function(EntityListDataContainer $container) {\n return $container->toArray();\n })->keyBy(\"key\")->all();\n }", "title": "" }, { "docid": "e2a4499365aeef3104999868774ad98c", "score": "0.45598087", "text": "public function listImages($deviceId) {\n\n ob_end_clean(); // disable Lumen's output buffering in order to allow infinite response length without using up memory\n\n http_response_code(Response::HTTP_OK);\n\n $response = app()->handle(Request::create(app('request')->getRequestURI(), app('request')->getMethod())); // get original response headers for cookies, CORS, etc\n\n foreach (explode(\"\\r\\n\", $response->headers) as $header) {\n header($header);\n }\n\n header('Content-Type: ' . response()->json()->headers->get('content-type')); // override content type to ensure that it's application/json\n\n echo '[';\n\n $path = storage_path() . '/respondent-photos';\n $extensions = ['jpg']; //['jpg', 'gif', 'png'];\n $pattern = '/\\.(' . implode('|', array_map('preg_quote', $extensions, array_fill(0, count($extensions), '/'))) . ')$/';\n $first = true;\n\n foreach ((new Finder())->name($pattern)->files()->in($path) as $file) {\n if ($first) {\n $first = false;\n } else {\n echo ',';\n }\n\n echo json_encode([\n \"fileName\" => $file->getFilename(),\n \"length\" => $file->getSize()\n ]);\n }\n\n echo ']';\n }", "title": "" }, { "docid": "89cf2bbad7ffc7727af5071983953afc", "score": "0.45379728", "text": "protected function getBucketList(Request $request)\n {\n \n $user_id = Auth::user()->id;\n\n $limit = $request->limit?:20;\n\n $search_string = $request->q;\n\n if(!empty($search_string)){\n $bucketList = BucketList::where(\"created_by\",$user_id)->where(\"name\",\"LIKE\",\"%\".$search_string.\"%\")->paginate($limit);\n }else{\n $bucketList = BucketList::where(\"created_by\",$user_id)->paginate($limit); \n }\n \n \n\n return response()->json($bucketList, 200);\n\n }", "title": "" }, { "docid": "b91451d8659864259ea5f29bdc5dba80", "score": "0.4537409", "text": "public static function op_list($args) {\n $output = \\GoogleDriveCLI\\ContentsList::list_array($args);\n $output = \\GoogleDriveCLI\\Output::whitespace_table($output);\n\n $path = current($args);\n $output = $path.\":\\n\\n\".$output;\n print \\GoogleDriveCLI\\Output::border_box($output);\n\n }", "title": "" }, { "docid": "88eef9d4f82d32ff8836d6ff04a55541", "score": "0.45334294", "text": "public function listBuckets()\n {\n return $this->send(\"listBuckets\");\n }", "title": "" }, { "docid": "9044be2729dc1ff713c9be564baf2c9a", "score": "0.4529355", "text": "public function getlist()\n {\n return $this->_repository->findAll();\n }", "title": "" }, { "docid": "4e16da55f53f20d1cb8d2ba716db656d", "score": "0.45275587", "text": "public function getPictures();", "title": "" }, { "docid": "8f7327aa37081d7ca93cb3b7e4207eb6", "score": "0.4527223", "text": "public function allContent();", "title": "" }, { "docid": "61ad79bea7e6d573a5ed128bb26da2f9", "score": "0.4522878", "text": "public function all(string $pbx, string $directory)\n {\n return $this->send(\"pbx/{$pbx}/directories/{$directory}/entries\")->entries;\n }", "title": "" }, { "docid": "28bebe4efa262cd038f4242a76b43f25", "score": "0.45109257", "text": "public function getContainers() {\n $container_names = $this->getContainersList();\n $containers = array();\n foreach ($container_names as $container) {\n $containers[] = $this->getContainer($container);\n }\n return $containers;\n }", "title": "" }, { "docid": "26eb98e5c09a0d08fea567adf75211e5", "score": "0.4510857", "text": "public function getContainerMetadata(\n $container,\n BlobModels\\BlobServiceOptions $options = null\n );", "title": "" }, { "docid": "4b7320ab72f1fa96790c51be9de438c8", "score": "0.45044303", "text": "public function getAllCos()\n {\n $request = new \\Zimbra\\Admin\\Request\\GetAllCos();\n return $this->getClient()->doRequest($request);\n }", "title": "" }, { "docid": "2e9b269efe3b68a3dbab56caed8cc385", "score": "0.4504038", "text": "public function getExecContainers();", "title": "" }, { "docid": "f52984ef10c3b3456bd2a59904215aa0", "score": "0.44894305", "text": "public function describeImageVulList($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->describeImageVulListWithOptions($request, $runtime);\n }", "title": "" }, { "docid": "56aa4487901f1e3c057c3a9b8e7c9d2b", "score": "0.44867408", "text": "public function listFiles()\n {\n $url = $this->api . '/files';\n return $this->sendRequest($url, 'GET');\n }", "title": "" }, { "docid": "50a0fba76c89a26ce5acc17005f3570f", "score": "0.4485358", "text": "public function getList($blockStorageId = null)\n {\n $args = [];\n\n if ($blockStorageId !== null) {\n $args['SUBID'] = (int) $blockStorageId;\n }\n\n return $this->adapter->get('block/list', $args);\n }", "title": "" }, { "docid": "55b72f6e8eb1f4289f2f87a2f09f7feb", "score": "0.44719678", "text": "public function listAll($username = null)\n {\n $this->validateNotEmptySessionOrFail();\n $username = empty($username) ? $this->storage->getUsername() : $username;\n self::validateUsernameOrFail($username);\n $json = $this->fetch(\n 'GET',\n sprintf(\n 'facts/%s',\n $username\n )\n );\n return $json['list'];\n }", "title": "" }, { "docid": "3fe869ad3938be478fdd688480b12f7d", "score": "0.44621134", "text": "public function listBackups($namespace = null);", "title": "" }, { "docid": "48226017c6b9d13e3c65cfac9dcf4ba1", "score": "0.4454051", "text": "function i5_getblob($result, $position) {}", "title": "" }, { "docid": "3945826ebd260fe43ee9f9c80e0364f3", "score": "0.44521457", "text": "public function getContainerProperties(\n $container,\n BlobModels\\BlobServiceOptions $options = null\n );", "title": "" }, { "docid": "8669a1a7ece37d96793b86d094702d60", "score": "0.4448855", "text": "public function getFileList($directory, $options = array())\n {\n $arr=array();\n $objects = $this->s3_client->listObjects(array('Bucket' => $this->config['bucket'], 'MaxKeys' => 1000 ));\n $files = $objects->getPath('Contents');\n foreach ($files as $file) {\n $filename = $file['Key'];\n $arr[] = $filename;\n\n }\n return $arr;\n }", "title": "" }, { "docid": "73a16cb68de1cc06452e9a73bf2a715f", "score": "0.44435248", "text": "public function get_all_CDS()\n {\n global $conn;\n $response = array();\n $query = \"Select * From cds\";\n $result = mysqli_query($conn, $query);\n if ($result) {\n while ($rows = mysqli_fetch_array($result)) {\n array_push($response,$rows);\n }\n }\n return $response;\n }", "title": "" }, { "docid": "464f1e8b17af43dba8f1d14e934357b6", "score": "0.4439081", "text": "public function createBlobSnapshot($container, $blob, $options = null);", "title": "" }, { "docid": "81016b15a5d64800f5c614709d4358d0", "score": "0.44350994", "text": "public function all()\n {\n $images = [];\n\n foreach ($this->get($this->getEndpoint()) as $image) {\n $images[] = str_replace('/'.$this->client->getApiVersion().$this->getEndpoint(), '', $image);\n }\n\n return $images;\n }", "title": "" }, { "docid": "a453a0945231ea0f57d1c25bcd6bd0fd", "score": "0.4433773", "text": "abstract protected function getAllObjects();", "title": "" }, { "docid": "a0ec5d71c8fadada6dd1f1c6225b1a2a", "score": "0.44331172", "text": "public function getAlbumsAction()\n {\n return $this->getDoctrine()->getRepository('ApiBundle:Album')->findAll();\n }", "title": "" }, { "docid": "1017741bdb305d54ea616f79ce27cf6c", "score": "0.44321945", "text": "public function actionImageList() {\n\n $images = array();\n $handler = opendir(Yii::app()->basePath . '/../userdata/image');\n while ($file = readdir($handler)) {\n if ($file != \".\" && $file != \"..\")\n $images[] = $file;\n }\n closedir($handler);\n\n $jsonArray = array();\n\n foreach ($images as $image)\n $jsonArray[] = array(\n 'thumb' => Yii::app()->baseUrl . '/userdata/image/' . $image,\n 'image' => Yii::app()->baseUrl . '/userdata/image/' . $image,\n );\n\n header('Content-type: application/json');\n echo CJSON::encode($jsonArray);\n }", "title": "" }, { "docid": "707b3507032493fc911a267c89dd3811", "score": "0.44286892", "text": "public function getAll(): iterable {\n \n }", "title": "" }, { "docid": "e58a96854a3c675c6e0cf2bdbec764d9", "score": "0.44273713", "text": "public function index()\n {\n $imagestorages = ImagesStorage::paginate(15);\n\n return view('admin.imagestorage', ['imagestorages' => $imagestorages]);\n }", "title": "" }, { "docid": "7360d1c7db7b4349819ff449ddd0dd30", "score": "0.44242862", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ClubMediaBundle:Document')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "63b9a02a7a76f397772dbcfb52ae09c0", "score": "0.4423039", "text": "public function getContainerAclAsync(\n $container,\n BlobModels\\BlobServiceOptions $options = null\n );", "title": "" }, { "docid": "886f284ca98ad4c1a3a0913d1e7e5c72", "score": "0.44165888", "text": "public function fetchList();", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.44126832", "text": "public function getList();", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.44126832", "text": "public function getList();", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.44126832", "text": "public function getList();", "title": "" }, { "docid": "5063946849440f89ea3fec9e0c895113", "score": "0.44091737", "text": "public function listar();", "title": "" }, { "docid": "2d6d312bed482234775ae3f752bc23a9", "score": "0.44087666", "text": "public function listAccountsContainersVersions($accountId, $containerId, $optParams = array())\n {\n $params = array('accountId' => $accountId, 'containerId' => $containerId);\n $params = array_merge($params, $optParams);\n return $this->call('list', array($params), \"Google_Service_TagManager_ListContainerVersionsResponse\");\n }", "title": "" }, { "docid": "dbb04a29ebc61f76860065efbe971917", "score": "0.44049415", "text": "public function childrenOfObjectWithUuid($uuid)\n\t{\n\t\t$list = array();\n\t\t$rs = $this->query(array('superior' => $uuid));\n\t\twhile(($obj = $rs->next()))\n\t\t{\n\t\t\tif($this->isStub($obj))\n\t\t\t{\n\t\t\t\tif(is_array($obj))\n\t\t\t\t{\n\t\t\t\t\tforeach($obj as $o)\n\t\t\t\t\t{\n\t\t\t\t\t\t$list[] = $o;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$list[] = $obj;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "e5171f9f1a6a31e6256c287da2c87b25", "score": "0.4400732", "text": "public function listBuckets() {\n\t\t$get = new S3Object('GET', '', '');\n\t\t$get = $get->getResponse(true);\n\t\tif (!isset($get->body)) return false;\n\t\t$results = array();\n\t\tif (isset($get->body->Buckets))\n\t\t\tforeach ($get->body->Buckets->Bucket as $b)\n\t\t\t\t$results[] = (string)$b->Name;\n\t\treturn $get->code == 200 ? $results : false;\n\t}", "title": "" }, { "docid": "46497055039136a12461fccd16f71f5a", "score": "0.43966958", "text": "public function listAccountsContainersMacros($accountId, $containerId, $optParams = array())\n {\n $params = array('accountId' => $accountId, 'containerId' => $containerId);\n $params = array_merge($params, $optParams);\n return $this->call('list', array($params), \"Google_Service_TagManager_ListMacrosResponse\");\n }", "title": "" }, { "docid": "c4344edb3c05d64ee161e2576c1cfa5f", "score": "0.43879798", "text": "public function listAccountsContainers($accountId, $optParams = array())\n {\n $params = array('accountId' => $accountId);\n $params = array_merge($params, $optParams);\n return $this->call('list', array($params), \"Google_Service_TagManager_ListContainersResponse\");\n }", "title": "" }, { "docid": "aa5fee25356a5486887098ec55a5261a", "score": "0.43807182", "text": "function s3_list_object($path='',$obj=null){\n \n\n if(!s3_is_exist($path)){\n //return false;\n }\n\n $params = aws_credentials();\n $s3 = new \\Aws\\S3\\S3Client($params); \n\n $results = $s3->getPaginator('ListObjects', [\n 'Bucket' => bucket_name(),\n 'Prefix' => $path\n ]);\n\n \n if(!$results){\n return false;\n }\n \n if($obj!=null){\n return $results;\n }\n\n foreach ($results as $result) {\n \n \n if(!isset($result['Contents'])){\n continue;\n }\n\n\n foreach ($result['Contents'] as $object) {\n $file_list[] = $object['Key'];\n }\n }\n\n return (!empty($file_list)) ? array_reverse($file_list) : array();\n }", "title": "" }, { "docid": "3951831c8981f82499b175b2c0ccf4de", "score": "0.43804094", "text": "function listing(){\n $list=array();\n $handler=Maqinato::connect(\"read\");\n $stmt = $handler->prepare(\"SELECT id FROM Table\");\n if ($stmt->execute()) {\n while ($row = $stmt->fetch()){\n $table=$this->read($row[\"id\"]);\n array_push($list,$table);\n }\n }else{\n $error=$stmt->errorInfo();\n error_log(\"[\".__FILE__.\":\".__LINE__.\"]\".\"Mysql: \".$error[2]);\n }\n return $list;\n }", "title": "" }, { "docid": "dc3e736889d51bfb31085a3791458d37", "score": "0.4379545", "text": "public function listAccountsContainersMacros($accountId, $containerId, $optParams = array())\n\t{\n\t\t$params = array('accountId' => $accountId, 'containerId' => $containerId);\n\t\t$params = array_merge($params, $optParams);\n\t\treturn $this->call('list', array($params), \"Google_Service_TagManager_ListMacrosResponse\");\n\t}", "title": "" } ]
9758919bf8507ae190e31a64f5850d08
Get Featured Persons Get latest Person
[ { "docid": "e8f258b3383ed98aec8db4f0b13558db", "score": "0.6625696", "text": "public function getLatestPerson() {\n\t\treturn new Person($this->_call('person/latest'));\n\t}", "title": "" } ]
[ { "docid": "54553284968a51cd0b94daf0095306ae", "score": "0.6058745", "text": "function getPersons()\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('id AS value,lastname,firstname,info,weight,height,picture,birthday,notes,nickname,knvbnr,country');\n\t\t$query->from('#__joomleague_person');\n\t\t$query->where('published = 1');\n\t\t$query->order('firstname ASC');\n\t\t$db->setQuery($query);\n\t\tif (!$result = $db->loadObjectList())\n\t\t{\n\t\t\t$this->setError($db->getErrorMsg());\n\t\t\treturn false;\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "21f495ad455b43ad2ca146c430a5a500", "score": "0.6047395", "text": "function getFullPerson(){\t\t\t\n\t\t\textract($this -> request);\n\t\t\t$sql = \"SELECT * FROM voters WHERE voterid = '$voterid'\";\n\t\t\t$person = (array) $this -> wpdb -> get_row($sql);\n\t\t\tforeach($person as $k => $v){\n\t\t\t\t$person[$k] = stripSlashes($v);\n\t\t\t}\n\t\t\t\n\t\t\t// get contacts\n\t\t\t$sql = \"SELECT * FROM voters_contacts WHERE voterid = '$voterid' ORDER BY datetime desc\";\n\t\t\t//echo $sql;\n\t\t\t$contactsRaw = $this -> wpdb -> get_results($sql);\n\t\t\tforeach($contactsRaw as $contact){\n\t\t\t\t$contact -> note = stripSlashes($contact -> note);\n\t\t\t\t$person['contacts'][] = $contact;\n\t\t\t}\n\t\t\t\n\t\t\t// get other people at that number\n\t\t\t$person['neighbors'] = array();\n\t\t\tif($person['phone'] != ''){\n\t\t\t\t$sql = \"SELECT * FROM voters WHERE phone = '\" . $person['phone'] . \"' and id <> \" . $person['id'];\n\t\t\t\t//echo $sql;\n\t\t\t\t$sameNumber = $this -> wpdb -> get_results($sql);\n\t\t\t\tforeach($sameNumber as $contact){\n\t\t\t\t\t$contact -> bio = stripSlashes($contact -> bio);\n\t\t\t\t\t$contact -> firstname = '(p) ' . $contact -> firstname;\n\t\t\t\t\t$person['neighbors'][$contact -> id] = $contact;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// get other people at the same address\n\t\t\tif($person['stname1'] != ''){\n\t\t\t\t$sql = \t\"SELECT * FROM voters WHERE \n\t\t\t\t\t\tstnum = '{$person['stnum']}' \n\t\t\t\t\t\tand stname1 = '{$person['stname1']}'\n\t\t\t\t\t\tand unit = '{$person['unit']}'\n\t\t\t\t\t\tand id <> {$person['id']}\";\n\t\t\t\t//echo $sql;\n\n\t\t\t\t$housemates = $this -> wpdb -> get_results($sql);\n\t\t\t\tforeach($housemates as $contact){\n\t\t\t\t\t$contact -> bio = stripSlashes($contact -> bio);\n\t\t\t\t\t$contact -> firstname = '(a) ' . $contact -> firstname;\n\t\t\t\t\tif(!$person['neighbors'][$contact -> id]){\n\t\t\t\t\t\t$person['neighbors'][$contact -> id] = $contact;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(count($person['neighbors']) == 0) $person['neighbors'] = false;\n\t\t\t\n\t\t\treturn $person;\n\t\t}", "title": "" }, { "docid": "4b2fdab76bc7fa6ba9afcb818dcc43b3", "score": "0.602893", "text": "public function getPersons()\n {\n if ($this->persons) return $this->persons;\n \n $this->persons = array();\n \n $items = $this->manager->loadPersonsForProject($this->projectId);\n foreach($items as $item)\n {\n $person = array();\n \n $person['id'] = $item->getId();\n $person['projectId'] = $this->projectId;\n \n $person['lastName'] = $item->getLastName();\n $person['firstName'] = $item->getFirstName();\n $person['nickName'] = $item->getNickName();\n $person['gender'] = $item->getGender();\n $person['dob'] = $item->getDOB();\n $person['email'] = $item->getEmail();\n $person['cellPhone'] = $this->phoneTransformer->transform($item->getCellPhone()); \n \n $person['gender'] = $person['gender'] . substr($person['dob'],0,4);\n \n $org = $item->getOrgz();\n \n $person['region'] = substr($org->getId(),4);\n $person['regionDesc']= $org->getDesc2();\n $person['state'] = $org->getState();\n \n $aysoCert = $item->getAysoCertz();\n $person['aysoid'] = substr($aysoCert->getRegKey(),5);\n $person['memYear'] = $aysoCert->getMemYear();\n $person['safeHaven'] = $aysoCert->getSafeHaven();\n $person['refBadge'] = $aysoCert->getRefBadge();\n \n $person['gameSlots'] = $item->getGameRelsForProject($this->projectId);\n $person['gameCount'] = count($person['gameSlots']);\n \n $projectPerson = $item->getProjectPerson($this->projectId);\n $plans = $projectPerson->get('plans');\n if (!is_array($plans)) $plans = array();\n \n $planItems = array\n (\n 'attend', \n 'will_referee',\n 'ground_transport',\n 'hotel', \n \n 'do_assessments',\n 'want_assessment',\n \n 'other_jobs',\n 't_shirt_size',\n \n 'attend_open','avail_wed','avail_thu','avail_fri','avail_sat_morn',\n 'avail_sat_after','avail_sun_morn','avail_sun_after'\n );\n foreach($planItems as $planItem)\n {\n if (isset($plans[$planItem])) $person[$planItem] = $plans[$planItem];\n else $person[$planItem] = null;\n }\n $this->persons[$item->getId()] = $person;\n }\n return $this->persons;\n }", "title": "" }, { "docid": "83c6c090148c2a008f75ba8042f3ddac", "score": "0.58290815", "text": "private function getFeaturedPerson($index)\r\n {\r\n $db = $this->_db;\r\n $person = array(\r\n 'id' => '',\r\n 'blurb' => '',\r\n 'position' => '',\r\n 'deathDate' => '',\r\n 'lastName' => '',\r\n 'firstNames' => ''\r\n );\r\n $sql = <<< EOT\r\n SELECT\r\n FeaturingPerson.Blurb,\r\n FeaturingPerson.PersonID,\r\n FeaturingPerson.Position,\r\n Person.DeathDate,\r\n Person.Surname,\r\n Person.FirstNames\r\n FROM\r\n FeaturingPerson\r\n LEFT OUTER JOIN Person\r\n ON FeaturingPerson.PersonID = Person.ID\r\n WHERE\r\n Position = %d\r\n ORDER BY\r\n Position ASC\r\nEOT;\r\n $sql = sprintf($sql, $index);\r\n $result = $db->query($sql);\r\n while (TRUE) {\r\n $row = $db->fetch($result);\r\n if (empty($row)) {\r\n break;\r\n }\r\n $person['id'] = $row['PersonID'];\r\n $person['blurb'] = $row['Blurb'];\r\n $person['position'] = $row['Position'];\r\n $person['deathDate'] = $row['DeathDate'];\r\n $person['lastName'] = $row['Surname'];\r\n $person['firstNames'] = $row['FirstNames'];\r\n }\r\n return $person;\r\n }", "title": "" }, { "docid": "c83ec6f223d217abd4c31467fd58de79", "score": "0.5750584", "text": "function getPersons()\r\n {\r\n\t\t$prefix= confGet('DB_TABLE_PREFIX');\r\n require_once(confGet('DIR_STREBER') . 'db/class_person.inc.php');\r\n require_once(confGet('DIR_STREBER') . 'db/class_employment.inc.php');\r\n $dbh = new DB_Mysql;\r\n $sth= $dbh->prepare(\r\n\t\t\t\t\t\t\"SELECT p.* FROM {$prefix}person p,{$prefix}employment em, {$prefix}item i\r\n\t\t\t\t\t\tWHERE i.type= \".ITEM_EMPLOYMENT.\"\r\n\t\t\t\t\t\tAND i.state=1\r\n\t\t\t\t\t\tAND i.id= em.id\r\n\t\t\t\t\t\tAND em.company = \\\"$this->id\\\"\r\n\t\t\t\t\t\tAND em.person= p.id\r\n\t\t\t\t\t\tAND p.state=1\"\r\n\t\t);\r\n\t\t\r\n \t$sth->execute(\"\",1);\r\n \t$tmp=$sth->fetchall_assoc();\r\n $es=array();\r\n\r\n foreach($tmp as $t) {\r\n if($person = Person::getVisibleById($t['id'])) {\r\n $es[]=$person;\r\n }\r\n }\r\n\t\t\r\n return $es;\r\n }", "title": "" }, { "docid": "c99c8ae113bc9aebfd891716bc0bf5c2", "score": "0.56979907", "text": "public function getPersonPersons() \n {\n return $this->personPersons; \n }", "title": "" }, { "docid": "0d32c5545922d472064ac18022c3b085", "score": "0.5663978", "text": "public function person()\n {\n return Person::find($this->person_id);\n }", "title": "" }, { "docid": "abff0043514355220887127511ccf5e1", "score": "0.56450737", "text": "private function getPerson(){\n\t\tif(!$this->databaseGetUser('personId'))\n\t\t\treturn $this->setResponseText('getPersonDatabase');\n\t\t\n\t\t$url = 'persongroups/' . self::API_PERSON_GROUP . '/persons/' . $this->databaseGetUser('personId');\n\t\t\n\t\t$res = $this->curl('GET', $url);\n\t\t\n\t\tif($res === false)\n\t\t\treturn false;\n\t\t\n\t\tif(strlen($res) === 0)\n\t\t\treturn $this->setResponseText('getPersonEmpty');\n\t\t\n\t\tif(array_key_exists('error', $res))\n\t\t\treturn $this->setResponseText('getPersonError', array('msg' => $res['error']['message']));\n\t\t\n\t\t$persistedFaceIds = $res['persistedFaceIds'];\n\t}", "title": "" }, { "docid": "a48b13c00157cf05ad43c7812e3529d5", "score": "0.5631831", "text": "protected function getPersonsByDemand() {\n\t\t$demand = $this->createDemandObject($this->settings);\n\t\treturn $this->personRepository->findDemanded($demand);\n\t}", "title": "" }, { "docid": "40b4cd16fd39913aa837c1010060b07a", "score": "0.56240946", "text": "public function getPersons(): Collection;", "title": "" }, { "docid": "b32b2279597d0d356b94287c2b701bb1", "score": "0.5501537", "text": "public static function latestFeatured()\n {\n return self::featuredPosts(1)->first();\n }", "title": "" }, { "docid": "0e261f5c4ddd97c4c8de203d5f5a4b17", "score": "0.5453412", "text": "public function lastInfl(){\n return Personne::orderBy('created_at','DESC')->first();\n }", "title": "" }, { "docid": "2b988078b223da693affc028e5d5c251", "score": "0.54483736", "text": "public static function search_person($name,$lastname) {\n \tinclude_once(\"PQLite.php\");\n \t$lastname = explode(' ',$lastname);\n \t$search_string = implode('%20',$lastname);\n $url = \"http://academic.research.microsoft.com/Search?query=\".$name.\"%20\".$search_string.\"&s=0\";\n $pq = new PQLite(file_get_contents($url));\n //array of html-tags\n $arr = $pq->find(\".author-name-tooltip\");\n //$array is an array with urls\n $array = array();\n for($i=0;$i < $arr->getNumTags(); $i++) {\n array_push($array,$arr->get($i)->getAttr(\"href\"));\n }\n //$count: array with url as key and number as value\n $count = array_count_values($array);\n arsort($count);\n //select highest two.\n $highest_two = array_slice($count,0,2);\n //return array: get keys from highest_two\n $return_array = array();\n foreach($highest_two as $key=>$value) {\n array_push($return_array,$key);\n }\n return $return_array;\n }", "title": "" }, { "docid": "3b2b993eb9ed0f38590233a89e208bd6", "score": "0.5411076", "text": "public function getLatest();", "title": "" }, { "docid": "28f0c1079b8818fdf55fe31edc242438", "score": "0.53796786", "text": "public function getFeatured();", "title": "" }, { "docid": "064969798ad8e48c485e1d168ca116ce", "score": "0.5364733", "text": "public function getPersona()\n {\n $query = \"select id_persona, CONCAT(documento_persona,' - ', nombres_persona,' ', apellidos_persona) As persona FROM `persona` WHERE estado=1 and fkID_cargo=1 OR fkID_cargo=2\";\n $result = mysqli_query($this->link, $query);\n $data = array();\n while ($data[] = mysqli_fetch_assoc($result));\n array_pop($data);\n return $data;\n }", "title": "" }, { "docid": "65e876c5dd00acfe4b56d51f9640afae", "score": "0.53463966", "text": "public static function getPeople() {\r\n $db = Db::instance();\r\n $q = \"SELECT id FROM `\".self::DB_TABLE.\"` ORDER BY name ASC;\";\r\n $result = $db->query($q);\r\n \r\n $person = array();\r\n if($result->num_rows != 0) {\r\n while($row = $result->fetch_assoc()) {\r\n $person[] = self::p_loadByID($row['id']);\r\n }\r\n }\r\n return $person;\r\n }", "title": "" }, { "docid": "a418693add0fd725cb005216dbfd719e", "score": "0.53435683", "text": "public function getLatest()\n {\n return $this->findBy([], ['created_at' => 'DESC']);\n }", "title": "" }, { "docid": "ba468c7aeafaebe491c5e7536b28faec", "score": "0.53291535", "text": "function getFeaturedProduct(){\n $sql = \"SELECT p.*, u.url\n FROM products p\n INNER JOIN page_url u\n ON p.id_url = u.id\n WHERE p.status=1\n AND p.deleted=0\n ORDER BY p.id DESC\n LIMIT 0,10\"; // undeleted\n return $this->getMoreRows($sql);\n }", "title": "" }, { "docid": "febf3a0632ba3e57233e6c7e4df98df6", "score": "0.5326868", "text": "public function getFirstTenPeople(){\n $firstTenPeople = Person::orderBy('id', 'desc')->take(10)->get()->toJson(JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);\n return response($firstTenPeople);\n }", "title": "" }, { "docid": "ab2ddfd71bebbe62365ed100c16f1a8d", "score": "0.5323092", "text": "public function people()\n {\n return $this->people;\n }", "title": "" }, { "docid": "9a19967cf6d7f6e6becec1a051a8c01c", "score": "0.5309509", "text": "function get_latest_articles() {\n\t\t$data = $this -> first_model -> get_latest_articles();\n\t\tprint(json_encode($data));\n\t}", "title": "" }, { "docid": "81c3bc5880e86e1c01bfbbf7d1a39933", "score": "0.5303669", "text": "public function getPersons()\n {\n return $this->_persons;\n }", "title": "" }, { "docid": "6d60009067e38976a21bb32de1eedc98", "score": "0.5301887", "text": "function ListPeople() {\r\n\t\tFlight::json(DBListPeople());\r\n\t}", "title": "" }, { "docid": "7bc07a93fdc7fe2e347625cdcbca1750", "score": "0.52889943", "text": "public function getLatestPoems()\n {\n \t$latestpoems=Poem::whereNotIn('user_id', $this->getFollowingIDs())\n \t\t\t\t\t ->orderBy('created_at', 'desc')\n \t\t\t\t\t ->take(10)\n \t\t\t\t\t ->get();\n \treturn $latestpoems;\n }", "title": "" }, { "docid": "341965957a4781eabf09467c8bb1f633", "score": "0.5244552", "text": "public function findAllNewest()\n\t{\n\t\t$query = $this->createQueryBuilder('p')\n\t\t ->orderBy('p.createdAt', 'DESC')\n\t\t ->getQuery();\n\t\treturn $query->getResult();\n\t}", "title": "" }, { "docid": "b60e9c6fc491372594627aa9582f5580", "score": "0.5240876", "text": "public function get_person_social_profiles($person_id)\n {\n }", "title": "" }, { "docid": "cc16d48a7759909f4f248f7fbca78ce3", "score": "0.52059895", "text": "private function getTopContributors()\n {\n $output = [];\n $users = User::whereHas('timeEntries', function ($query) {\n $query->whereBetween('created_at', [\n Carbon::now()->subDays(6)->startOfDay(),\n Carbon::now()->endOfDay()\n ]);\n })->take(10)->get();\n\n foreach ($users as $user) {\n $output[$user->name] = $user->timeEntries()->whereBetween('created_at', [\n Carbon::now()->subDays(6)->startOfDay(),\n Carbon::now()->endOfDay()\n ])->get()->sum('hours');\n }\n\n $labels = array_keys($output);\n $data = array_values($output);\n return array($labels, $data);\n }", "title": "" }, { "docid": "d8b7457eec8f98ae97575b8c90f9a8eb", "score": "0.5202042", "text": "function ncsu_get_person($unity_id) {\n\tglobal $wpdb;\n\t$person = $wpdb->get_row(\"SELECT * FROM wp_ncsu_directory WHERE unity_id='$unity_id'\", ARRAY_A);\n\t$existing_post = array(\n\t\t'name' => $unity_id,\n\t\t'post_type' => 'ncsu_person'\n\t);\n\t$person_type = get_posts($existing_post);\n\t$meta = get_post_meta($person_type[0]->ID);\n\treturn ncsu_format_person($person, $meta);\n}", "title": "" }, { "docid": "e455b41fc13c9f51b856be5e715fcbcc", "score": "0.5195705", "text": "private function hamburgbmember()\n {\n\n $data = $this->getRequest('https://www.abgeordnetenwatch.de/api/parliament/hamburg/deputies.json');\n\n $allData = json_decode($data, true);\n\n $i = 0;\n foreach($allData['profiles'] as $item)\n {\n\n $personal = $item['personal'];\n\n // find or create an entity\n $entity = Entity::firstOrCreate(['name' => $personal['first_name'] . ' ' . $personal['last_name']]);\n\n // add person if needed\n if($entity->entitable_type == null)\n {\n $current = Person::create($personal);\n\n $entity->entitiable_type = 'App\\Person';\n $entity->entitiable_id = $current->id;\n\n $entity->save();\n }\n else\n {\n $current = Person::find($entity->entitable_id);\n }\n\n\n // Add district association\n if($current->district_id == null)\n {\n $current_district = District::firstOrCreate(['name' => $item['parliament']['name'], 'state' => true]);\n $current->district_id = $current_district->id;\n $current->save();\n }\n\n $party = Party::firstOrCreate(['name' => $item['party'], 'district_id' => $current->district_id]);\n\n\n // Add party affiliation\n if(PartyAffiliation::where('person_id', $entity->person->id)->exists())\n {\n // get most recent party affiliation\n $current_party = PartyAffiliation::where('person_id', $entity->person_id)\n ->orderBy('start')\n ->first();\n\n if(isset($current_party->party_id) && !$current_party->party_id == $party->id)\n {\n $current_party->end = Carbon::now();\n $current_party->save();\n\n $current_party = PartyAffiliation::create([\n 'start' => Carbon::now(),\n 'party_id' => $party->id,\n 'person_id' => $current->id\n ]);\n }\n\n\n }\n else\n {\n $current_party = PartyAffiliation::create([\n 'start' => Carbon::now(),\n 'party_id' => $party->id,\n 'person_id' => $current->id\n ]);\n }\n\n }\n\n }", "title": "" }, { "docid": "75cf544d7fa324612ce4059c0dfef74c", "score": "0.51949865", "text": "public function getPeople0()\n {\n return $this->hasOne(People::className(), ['id' => 'people']);\n }", "title": "" }, { "docid": "46eb791935556375e8a98a352ac892da", "score": "0.51377213", "text": "public function getRecent();", "title": "" }, { "docid": "327bbc20a26e905fffffebfc887d16cc", "score": "0.51109713", "text": "public function getPersonById($id){\n\t\t$this->db->select(\"*\");\n\t\t$this->db->from(\"jb_person\");\n\t\t$this->db->where(\"user_id\",$id);\n\t\treturn $this->db->get();\n\t}", "title": "" }, { "docid": "68bd85488f964fa774fa01bd557a755d", "score": "0.5103524", "text": "protected function processPersons()\n {\n $sql = <<<EOT\nSELECT \n person.id AS personId,\n person.guid AS guid,\n person.name_full AS nameFull,\n person.name_first AS nameFirst,\n person.name_last AS nameLast,\n person.name_nick AS nameNick,\n person.name_middle AS nameMiddle,\n person.email AS email,\n person.phone AS phone,\n person.gender AS gender,\n person.dob AS dob,\n person.address_city AS addressCity,\n person.address_state AS addressState,\n person.address_zipcode AS addressZipcode,\n person.notes AS notes,\n person.status AS status,\n person.verified AS verified\nFROM persons AS person\nORDER BY person.id\nEOT;\n //$sql .= \"\\nLIMIT 0,3\";\n $sql .= \";\\n\";\n \n $rows = $this->conn->fetchAll($sql);\n \n foreach($rows as &$row)\n {\n $row['feds' ] = $this->processFeds ($row['personId']);\n $row['users'] = $this->processUsers($row['guid']);\n }\n return $rows;\n }", "title": "" }, { "docid": "16b0ba88b0ec001aa0c3aa3b1fe3e960", "score": "0.50988877", "text": "public function getMessagePersons();", "title": "" }, { "docid": "4c5d5bc48583d98d9a05edb9ca68a9e8", "score": "0.5094491", "text": "private function getPersons($id)\n {\n $entity = $this->retrieveById($id);\n $personDetailArray = array();\n if (!empty($entity['legal_entities_at'])) {\n while (list(, $val) = each($entity['legal_entities_at'])) {\n if (!empty($val['id'])) {\n array_push($personDetailArray, $this->getPersonDetails($val['id']['key']));\n }\n }\n return $personDetailArray;\n } else {\n return array();\n }\n\n }", "title": "" }, { "docid": "66a05ecf085ff86de6a7765c4badfe27", "score": "0.50905406", "text": "public function getLasts()\n {\n return $this->model->orderBy('users.created_at', 'desc')\n ->limit(6)->get(['users.id', 'users.username']);\n }", "title": "" }, { "docid": "dd0cab1e7de7d73dbe5519766618b7c5", "score": "0.50709677", "text": "public function get_person_social_profile_fields()\n {\n }", "title": "" }, { "docid": "98a46815e634d541da6e55e070e139e9", "score": "0.50640035", "text": "function get_all_extended($page){\n\t\t\n\t\t$offset = ($page-1)*$this->limit;\n\n\t\t$query = $this->db->prepare(\"SELECT * FROM $this->table LIMIT $offset,$this->limit\");\n\t\t\n\t\t$query->execute();\n\t\t\n\t\t$response = $query->fetchAll(PDO::FETCH_OBJ);\n\t\t\n\t\tforeach($response as $comision){\n\t\t\t\n\t\t\t$personas = $this->relaciones->get_personas($comision->id);\n\t\t\t\n\t\t\t$comision->personas = $personas;\n\t\t\t\n\t\t}\n\t\n\t\treturn ($response);\n\t}", "title": "" }, { "docid": "5c27ed82c048294547f7ca5a7215899c", "score": "0.5046919", "text": "public function listPeople(): array {\n $response = $this->httpClient->request('GET',\n 'persongroups/' . self::PEOPLE_GROUP . '/persons');\n\n return json_decode((string) $response->getBody());\n }", "title": "" }, { "docid": "d8d715887542b42f02d32d4d963d842e", "score": "0.50237113", "text": "public function persons()\n {\n return $this->hasMany('App\\Person');\n }", "title": "" }, { "docid": "a1cf49aa74ca3d4d00f63a0d3bfd4928", "score": "0.49938473", "text": "public static function getPeople() {\n return self::$people;\n }", "title": "" }, { "docid": "43c113a88032075291de6d0b0d3a1546", "score": "0.49904054", "text": "function get_persona($id)\n {\n return $this->db->get_where('persona',array('id'=>$id))->row_array();\n }", "title": "" }, { "docid": "dc6feb22ca41417c0960b6ea9ccf0c3d", "score": "0.49849233", "text": "public function resourcePersons()\n {\n return tap($this->hasMany(ResourcePerson::class, 'cohort_id', 'id'))->where('wplp_id', '0');\n }", "title": "" }, { "docid": "3bc44fd54f728fcfeaee686b07c7fef1", "score": "0.49773717", "text": "function get_all_persona_viaje()\n {\n $this->db->select('pv.*, pe.nombres as persona_nombre, pe.apellido_paterno as persona_ap, pe.apellido_materno as persona_am, pa.nombre as paradero_nombre, tu.identificacion as identificacion, pp.nombre as persona_perfil');\n $this->db->from('persona_viaje pv, persona pe, paradero pa, transporte_unidad tu, persona_perfil pp');\n $this->db->where('pv.persona_id = pe.id AND pv.paradero_id = pa.id AND pv.transporte_unidad_id = tu.id AND pv.persona_perfil_id = pp.id');\n $this->db->order_by('pv.id', 'desc');\n return $this->db->get()->result_array();\n }", "title": "" }, { "docid": "3873f373bbe4de52e7ac65eb636555d7", "score": "0.4962976", "text": "public function get_all_person() {\n $query = $this->db->query(\"\n SELECT K_ID_DOCUMENT, CONCAT(p.N_NAME,' ' , p.N_LAST_NAME) AS persona,\n r.N_NAME_ROLE, p.D_START_DAY, p.I_STATUS\n FROM \n person p\n INNER JOIN role r\n ON P.K_ID_ROLE = r.K_ID_ROLE\n ;\n \");\n\n return $query->result();\n }", "title": "" }, { "docid": "10da3a21c4bc0df68e92ecac9265ed85", "score": "0.4959058", "text": "public static function person_table_data(){\n $person = Model\\Person::orderBy('username')->get()->toArray();\n return $person;\n}", "title": "" }, { "docid": "9250fc17fde027afc8e83d748d388723", "score": "0.49568337", "text": "function pGetPerson($rsCustomFields, $aHead, $propertyNames)\n {\n extract($aHead);\n\n $pHead = new Person();\n \n $pHead->Name = trim($per_FirstName . \" \" . $per_LastName);\n\n $sCountry = SelectWhichInfo($per_Country,$fam_Country,false);\n //if (strlen($fam_WorkPhone)) {\n // $pHead->Phone = ExpandPhoneNumber($fam_WorkPhone, $sCountry, $bWierd);\n //}\n //if (strlen($fam_HomePhone)) {\n // $pHead->Phone = ExpandPhoneNumber($fam_HomePhone, $sCountry, $bWierd);\n //}\n //if (strlen($fam_CellPhone)) {\n // $pHead->Phone = ExpandPhoneNumber($fam_CellPhone, $sCountry, $bWierd);\n //}\n if (strlen($per_WorkPhone)) {\n $pHead->Phone = ExpandPhoneNumber($per_WorkPhone, $sCountry, $bWierd);\n }\n if (strlen($per_HomePhone)) {\n $pHead->Phone = ExpandPhoneNumber($per_HomePhone, $sCountry, $bWierd);\n }\n if (strlen($per_CellPhone)) {\n $pHead->Phone = ExpandPhoneNumber($per_CellPhone, $sCountry, $bWierd);\n $pHead->CellPhone = ExpandPhoneNumber($per_CellPhone, $sCountry, $bWierd);\n }\n \n if (strlen($per_WorkEmail)) $pHead->Email = $per_WorkEmail;\n if (strlen($per_Email)) $pHead->Email = $per_Email;\n \n // TODO(ferryzhou): add chinese name from custom field.\n $pHead->ChineseName = $this->sGetChineseName($rsCustomFields, $aHead);\n \n // Find Person Properties\n $sSQL = \"SELECT * FROM record2property_r2p WHERE r2p_record_ID = \" . $per_ID ;\n $rsPerPros = RunQuery($sSQL);\n while ( $rpField = mysql_fetch_array($rsPerPros) ){\n extract($rpField);\n if ($propertyNames[$r2p_pro_ID] == \"hide_phone\") {\n $pHead->Phone = \"\"; // Hide it.\n }\n if ($propertyNames[$r2p_pro_ID] == \"hide_email\") {\n $pHead->Email = \"\"; // Hide it.\n }\n }\n\n return $pHead;\n }", "title": "" }, { "docid": "9dfb84e7fb7417a370db80f1b04aed4d", "score": "0.49474782", "text": "function getLatestAdditions() {\n\t\t$oSearch = new mofilmMovieSearch();\n\t\t$oSearch->setUser(new mofilmUser());\n\t\t$oSearch->addEvent(self::SOUTH_BYTES_EVENT);\n\t\t$oSearch->setOrderBy(mofilmMovieSearch::ORDERBY_DATE);\n\t\t$oSearch->setOrderDirection(mofilmMovieSearch::ORDER_DESC);\n\t\t$oSearch->setLoadMovieData(true);\n\t\t$oSearch->setLimit(20);\n\n\t\treturn $oSearch->search();\n\t}", "title": "" }, { "docid": "093a288ac7ac1efe447f0e5d9b6d6d21", "score": "0.4945663", "text": "protected function getTopContributors()\n {\n $repository = $this->entityManager->getRepository('AppBundle:Contributor');\n\n $query = $repository->createQueryBuilder('c')\n ->select('c.name, COUNT(p.id) as total')\n ->innerJoin('c.packages', 'p')\n ->groupby('c.name')\n ->orderby('total', 'desc')\n ->setMaxResults(20)\n ->getQuery();\n\n $results = $query->getResult();\n\n $potentials = [];\n foreach ($results as $result)\n {\n $potential = [];\n $potential['name'] = $result['name'];\n $potential['score'] = $result['total'];\n $potentials[] = $potential;\n }\n\n return $potentials;\n }", "title": "" }, { "docid": "4e956c3675eec2f76c359f7a83c26229", "score": "0.49419466", "text": "public function recent()\n {\n $query = \\App\\Entities\\Request::with(['client'])\n ->where(['request.corporate_register_id' => authData()]);\n\n if( checkGroup(\"user\") )\n $query->where(['request.user_id' => authData('id')]);\n\n return response()->json(\n $query->whereIn('situation', [1,2])\n ->orderBy('id', 'desc')\n ->get()\n );\n }", "title": "" }, { "docid": "102271191f5b5360064d2845f1bc956b", "score": "0.49415058", "text": "function loadRecentQualification() {\n global $username;\n global $conn;\n global $qualification;\n global $teacher;\n\n $sql = \"SELECT * FROM qualifications NATURAL JOIN academic_degrees WHERE username = ?\n AND date_obtained = (SELECT MAX(date_obtained) FROM qualifications WHERE username = ?)\";\n\n if ($stmt = $conn->prepare($sql)) {\n $stmt->bind_param(\"ss\", $param_user, $param_user);\n $param_user = $username;\n\n if ($stmt->execute()) {\n $result = $stmt->get_result();\n\n if ($result->num_rows == 1) {\n while ($row = $result->fetch_assoc()) {\n $academic_degree = new AcademicDegree($row['degree_id'],\n $row['title'], $row['type'], $row['school'], $row['description'], $row['level']);\n $qualification = new Qualification($teacher, $academic_degree, $row['date_obtained']);\n }\n }\n\n $stmt->close();\n } else {\n doSQLError($stmt->error);\n }\n } else {\n doSQLError($conn->error);\n }\n }", "title": "" }, { "docid": "7df8db2ec2531300c3c208b43c9f3092", "score": "0.4936121", "text": "function person_observations_get_json_callback(){\n drupal_set_header('Content-Type: text/plain; charset: utf-8');\n global $user;\n if ($user->uid) {\n $data['person'] = array(\n 'id' => $user->uid,\n );\n $data['observations'] = array();\n //get observation type id e.g. type=1,2,3,\n $id_list = splite_observation_type_list($_GET['type']);\n \n //get date\n\t\t$start_time=$_GET['start'];\n\t\t$end_time=$_GET['end'];\n\t\t$proid=$_GET['proid'];\n $date = $_GET['date'];\n\t\tif($_GET['perid']){\n\t\t\t$perid=$_GET['perid'];\n\t\t}else{\n\t\t\t$perid=$user->uid;\n\t\t}\n foreach($id_list as $id){\n \n //get observation info\n $get_observation_sql = \"SELECT name FROM {observation_type} WHERE ido_type=%d\";\n $observation = db_result(db_query($get_observation_sql,$id));\n if($observation){\n //get keynames\n $get_keynames_sql = \"SELECT ido_keyname, keyname, datatype,unit FROM {observation_keyname} WHERE ido_type=%d\";\n $k_res = db_query($get_keynames_sql,$id);\n if($k_res){ \n $k_count = 1;\n while($keyname=db_fetch_object($k_res)){\n $select_part.= \", orv$k_count.value \".$keyname->keyname;\n $inner_join_part.= \", {observation_record_value} AS orv$k_count \";\n $where_part.= \" AND orv$k_count.ido_record=o.ido_record \"\n .\"AND orv$k_count.ido_keyname=\".$keyname->ido_keyname.\" \";\n $k_count++;\n }\n \n $get_records_sql = \"SELECT time\".$select_part.\" FROM {observation_record} AS o \"\n .$inner_join_part\n .\"WHERE o.ido_type=%d AND o.idperson=%d and o.idproject =%d and o.time >='%s' and o.time <='%s' \"\n .$where_part\n .\"ORDER BY o.time\";// and time >= \"2011-01-01\" and time <= '2011-12-31';\n\n $r_result = db_query($get_records_sql,$id,$perid,$proid,$start_time,$end_time);\n //$data['s'] = $get_records_sql;\n while($record=db_fetch_array($r_result)){\n $records[] = $record;\n }\n \n $data['observations'][] = array(\n 'id' => $id,\n 'name' => $observation,\n 'records' => $records,\n );\n }\n }\n \n \n } \n \n }\n else {\n $data = array();\n }\n \n print(json_encode($data)); \n \n}", "title": "" }, { "docid": "187f2899698bbeb0f7f86b6ae3ae69e0", "score": "0.49299267", "text": "public function hasPerson(){\n return $this->_has(8);\n }", "title": "" }, { "docid": "37ac7d630509e10d245d3cd2bb62f6e7", "score": "0.4926927", "text": "protected function getPersonService()\n {\n }", "title": "" }, { "docid": "b4732ac5a1aa72d7fb7e9017a74b0603", "score": "0.4915866", "text": "public function profileLessons()\n {\n return $this->lessons()->latest()->take(20)->get();\n }", "title": "" }, { "docid": "853700d399e727efc3474339c17ab0bd", "score": "0.49142608", "text": "public function getNamesWithAddress() {\n $sql = \"SELECT person.id, person.last_name, person.first_name, person.middle_name, person.alias_name,\n address.street, address.city, address.state, address.iso, address.postal_code\n FROM person LEFT OUTER JOIN address\n ON person.id = address.person_id\n WHERE person.live = 1\";\n\n return \\Yii::$app->db->createCommand($sql)->queryAll();\n }", "title": "" }, { "docid": "ef362ea742907eaa9cbfa5f29efad2a4", "score": "0.4907587", "text": "public function getFeaturedProduct();", "title": "" }, { "docid": "3a5a97eb51810192dbc64cfb21f725cb", "score": "0.49068263", "text": "public function getPerson() {\n return $this->person;\n }", "title": "" }, { "docid": "099e6d4562957428d2ec896d9af3502e", "score": "0.49004403", "text": "function get_latest_article(){\n $query=\"SELECT * FROM articles\";\n $article=$this->db->query($query);/*\n $achievers=$this->db->get('achievers');*/\n return $article->last_row('array');\n }", "title": "" }, { "docid": "b7d0de8f8da329ffc2189e2743a2e04b", "score": "0.48900238", "text": "public function findMostRecent($per_page = 9);", "title": "" }, { "docid": "99befc58114a07fad645b730000f96e7", "score": "0.48889536", "text": "public function get_freelancers_profile_info_by_search($searchParam = null) {\r\r\n $freelancerList = array();\r\r\n\t\t\r\r\n $sql = \"SELECT user_login.*,users.name,users.country,country.name AS country ,users.gender,users.date_of_birth,users.bio,users.address,users.state,users.city,users.vat,IFNULL(no_of_skill_match,0) no_of_skill_match, total_points, job_complete_count\r\r\n\t\tFROM (SELECT DISTINCT user_area_of_interest.user_id,COUNT(*) no_of_skill_match \r\r\n\t\tFROM user_area_of_interest \r\r\n\t\tLEFT JOIN user_login ON user_login.user_id=user_area_of_interest.user_id \r\r\n\t\tWHERE area_of_interest_id IN (\".$searchParam['skill'].\") AND user_login.user_type=4\r\r\n\t\tGROUP BY user_id) uai \r\r\n\t\tLEFT JOIN user_login ON user_login.user_id=uai.user_id \r\r\n\t\tLEFT JOIN users ON users.user_id=user_login.user_id \r\r\n\t\tLEFT JOIN country ON country.country_id=users.country\r\r\n\t\tWHERE 1=1\";\r\r\n if(!empty($searchParam) && is_array($searchParam)) {\r\r\n if(!empty($searchParam['name'])) {\r\r\n $searchParam['name'] = trim($searchParam['name']);\r\r\n $sql .= \" AND LOWER(users.name) LIKE '%\".strtolower($searchParam['name']).\"%'\";\r\r\n }\r\r\n if(!empty($searchParam['country'])) {\r\r\n $searchParam['country'] = trim($searchParam['country']);\r\r\n $sql .= \" OR LOWER(country.name) LIKE '%\".strtolower($searchParam['country']).\"%'\";\r\r\n } \r\r\n }\r\r\n $sql .= \" ORDER BY uai.no_of_skill_match DESC, user_login.job_complete_count DESC, user_login.total_positive_coins DESC, user_login.total_negative_coins DESC\";\r\r\n $query = $this->db->query($sql);\r\r\n //echo $this->db->last_query();\r\r\n foreach ($query->result() as $row){\r\r\n $user_languages = $user_skills = array();\r\r\n\r\r\n // Get user selected languages\r\r\n $this->db->select('user_languages.language_id,languages.name');\r\r\n $this->db->from('user_languages');\r\r\n $this->db->join('languages', 'languages.language_id = user_languages.language_id');\r\r\n $this->db->where('user_languages.user_id', $row->user_id);\r\r\n $query_lang = $this->db->get();\r\r\n foreach ($query_lang->result() as $row_lang){\r\r\n $user_languages[] = $row_lang->name;\r\r\n } \r\r\n\r\r\n // Get user selected skills\r\r\n $this->db->select('user_area_of_interest.area_of_interest_id,area_of_interest.name,user_area_of_interest.user_id');\r\r\n $this->db->from('user_area_of_interest');\r\r\n $this->db->join('area_of_interest', 'area_of_interest.area_of_interest_id = user_area_of_interest.area_of_interest_id');\r\r\n $this->db->where('user_area_of_interest.user_id', $row->user_id);\r\r\n $query_skill = $this->db->get();\r\r\n\t\t\tif($query_skill->num_rows() > 0){\r\r\n\t\t\t\tforeach ($query_skill->result() as $row_skill){\r\r\n\t\t\t\t\t$user_skills[] = array('skill_id' => $row_skill->area_of_interest_id, 'skill_name' => $row_skill->name, 'user_id' => $row_skill->user_id);\r\r\n\t\t\t\t}\r\r\n\t\t\t}else{\r\r\n\t\t\t\t$user_skills[] = array('skill_id' => '', 'skill_name' => '', 'user_id' => '');\r\r\n\t\t\t}\r\r\n \r\r\n\r\r\n $freelancerList[] = array('basic_info' => $row, 'user_selected_languages' => $user_languages, 'user_selected_skills' => $user_skills);\r\r\n }\r\r\n \r\r\n return $freelancerList; \r\r\n }", "title": "" }, { "docid": "ef8cdebfcce83ff8a77b2949dc9fa9c9", "score": "0.4887661", "text": "protected function getPersons() {\n\t\t$sword = $this->getRequestArgument('sword', $this->settings['swordValidationExpr']);\n\t\t$groups = $this->getRequestArgument('group', '/^([0-9]{1,})$/', (($this->settings['groupSearchTypeAnd'] == 1) ? TRUE : FALSE));\n\t\t$groups = ( $groups !== NULL ) ? $groups : $this->settings['groups'];\n\t\t\n\t\t$categories = $this->settings['categories'];\n\t\t$categoryConjunction = $this->settings['categoryConjunction'];\n\n\n\t\tif ( is_array($groups) ) {\n\t\t\t$groups = implode(',', $groups);\n\t\t} else {\n\t\t\tif ( !empty($this->settings['groups']) || !empty($groups) ) {\n\t\t\t\t// Append to selected groups the subgroups\n\t\t\t\t$groupIdList = array($groups);\n\t\t\t\tforeach ( explode(',', $groups) as $group ) {\n\t\t\t\t\t$this->getGroupIdList($group, $groupIdList);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$groups = implode(',',$groupIdList);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( !empty($categories) ) {\n\t\t\treturn $this->personRepository->findByCategories($categories, $categoryConjunction);\n\t\t}\n\n\t\tif ( !empty($groups) ) {\n\t\t\tif ( !empty($sword) ) {\n\t\t\t\treturn $this->personRepository->findByGroupsAndSword($groups, $sword, $this->settings['searchInFields'], (($this->settings['groupSearchTypeAnd'] == 1) ? TRUE : FALSE));\n\t\t\t} else return $this->personRepository->findByGroups($groups, (($this->settings['groupSearchTypeAnd'] == 1) ? TRUE : FALSE));\n\t\t} else {\n\t\t\tif ( !empty($sword) ) {\n\t\t\t\treturn $this->personRepository->findBySword($sword, $this->settings['searchInFields']);\n\t\t\t} else return $this->personRepository->findAll();\n\t\t}\n\t}", "title": "" }, { "docid": "6afe000bca8e70eefc3a73e0262eea79", "score": "0.48853397", "text": "public function recent()\n { // TODO: apply any filters to the recent query, like most recent by event_name\n $options = array();\n $results = $this->eventRepo->mostRecent(20);\n return response()->json($results);\n }", "title": "" }, { "docid": "930e18cfe4d51697cca3bbd27974118c", "score": "0.4867649", "text": "public function mostRecent()\n {\n $query = 'SELECT * FROM articles ORDER BY published_on DESC LIMIT 3';\n $stmt = $this->db->prepare($query);\n $stmt->execute();\n $articles = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $articles;\n }", "title": "" }, { "docid": "7df3e65c26edc53a5e14dcef6001d2ef", "score": "0.48665607", "text": "public function people() {\n\n $item_per_page = 30;\n $data['current_page'] = 1;\n $data['person_data'] = $this->personmodel->getPerson('', 0, $item_per_page);\n $data['total_pages'] = $this->personmodel->getTotalPages_person($item_per_page);\n $this->loadpage($data, 'PeopleManagement', 'View people | BALIYOGHAR');\n\n }", "title": "" }, { "docid": "ca7bb1f9587010da02ff09e7bc491594", "score": "0.4864585", "text": "function getPeople($cameraid, $frameid, $proposals){\n\t\tif($proposals){\n\t\t\t$previous = intval($frameid) - 1;\n\t\t\treturn \"SELECT *, true as previous FROM `\".$this->tables->people.\"` WHERE cameraid = \".$cameraid.\" and frameid = \".$frameid.\"\n\t\t\t\tUNION (SELECT *, false as previous FROM \".$this->tables->people.\" WHERE cameraid = \".$cameraid.\" and frameid = \".$previous.\"\n\t\t\t\tand peopleid NOT IN (SELECT peopleid from \".$this->tables->people.\" where cameraid = \".$cameraid.\" and frameid = \".$frameid.\"))\";\n\t\t} else {\n\t\t\treturn $this->getPeopleFrame($cameraid, $frameid);\n\t\t}\n\t}", "title": "" }, { "docid": "c2e5e8e72c243f95d02f5dad02ec902e", "score": "0.48631483", "text": "public function getUser()\n {\n $user = Auth::user();\n $person=App\\Person::findOrFail($user->persons_id);\n $array = [$user,$person];\n return $array;\n }", "title": "" }, { "docid": "293f0bac69360fa2e30b0cb4d00aca27", "score": "0.48553103", "text": "protected function featuresPageFeaturesPostsDbQuery() {\n\t\t$featurePosts = FeaturePost::orderBy('id','desc')->get();\n\t\treturn $featurePosts;\n\t}", "title": "" }, { "docid": "d86ac48a12915ceee19754a4ce2f5eb7", "score": "0.48517734", "text": "public function getLiaisonOfficers() {\n $key = md5('liaisonOfficers');\n if (!$data = $this->_cache->load($key)) {\n $persons = $this->getAdapter();\n $select = $persons->select()\n ->from($this->_name,array(\n 'id', 'firstname', 'lastname',\n 'email_one', 'address_1', 'address_2',\n 'town', 'county', 'postcode',\n 'telephone', 'fax', 'longitude',\n 'latitude', 'image'\n ))\n ->joinLeft(array('locality' => 'staffregions'),\n 'locality.ID = staff.region',\n array('staffregions' => 'description'))\n ->joinLeft(array('position' => 'staffroles'),\n 'staff.role = position.ID',\n array('staffroles' => 'role'))\n ->where('staff.role IN (7,10) AND alumni =1')\n ->order('locality.description');\n $data = $persons->fetchAll($select);\n $this->_cache->save($data, $key);\n }\n return $data;\n }", "title": "" }, { "docid": "b323d52103fb87ad16d6b76d541d9186", "score": "0.48491436", "text": "public function getLatestTweet() {\n $this->db->setFetchMode(Zend_Db::FETCH_ASSOC);\n \n $result = $this->db->fetchAll('SELECT profile_img, name, username, text FROM '.$this->table_name.' ORDER BY id DESC LIMIT 1');\n \n// echo '<pre>';\n// print_r($result);\n \n return $result;\n \n }", "title": "" }, { "docid": "0a655d7d2dbdec08425abc7c058047d6", "score": "0.48486522", "text": "function get_newest_members($docLevelUrlPrefix)\r\n\t{\r\n\t\tglobal $db;\r\n\t\t$query = 'SELECT member_id, username FROM gv_members WHERE (deactivated = 0 AND banned = 0) AND suspended = 0 ORDER BY member_id ASC LIMIT 20';\r\n\t\t$resultNewest = \r\n\t\tmysql_query($query, $db) or die(mysql_error($db));\r\n\t\r\n\t\tif(mysql_num_rows($resultNewest) !== 0)\r\n\t\t{\r\n\t\t\twhile($newestMember = mysql_fetch_assoc($resultNewest))\r\n\t\t\t{\r\n\t\t\t\textract($newestMember);\r\n\t\t\t\techo ' <a href=\"' . $docLevelUrlPrefix . 'member_profile.php?id=' . $newestMember[\"member_id\"] . '\">' . ucfirst($newestMember[\"username\"]) . '</a> ';\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{ echo \" No user yet \"; }\r\n\t}", "title": "" }, { "docid": "033a69e615de15e0f405ebb7056d9a65", "score": "0.48323867", "text": "private function personsName()\r\n {\r\n $html = $this->_html;\r\n $get = $this->_get;\r\n $db = $this->_db;\r\n if (!empty($get['personid'])) {\r\n $sql = <<< EOT\r\n SELECT\r\n Person.Surname, \r\n Person.FirstNames \r\n FROM Person \r\n WHERE Person.ID = %d\r\nEOT;\r\n $sql = sprintf($sql, intval($get['personid']));\r\n $result = $db->query($sql);\r\n if ($db->rowCount($result) > 0) {\r\n $row = $db->fetch($result);\r\n $firstNames = $db->unescape($row['FirstNames']);\r\n $lastName = $db->unescape($row['Surname']);\r\n $fullName = $html->text($firstNames.' '.$lastName);\r\n }\r\n }\r\n return $fullName;\r\n }", "title": "" }, { "docid": "b7fdcce5e7b6ecae9f5b5c402b6212ac", "score": "0.48305932", "text": "public function getPersona()\n {\n return $this->hasOne(Persona::className(), ['idPersona' => 'idPersona']);\n }", "title": "" }, { "docid": "3d96be88ea7448b53b39d3512ab30632", "score": "0.48268887", "text": "public function getFestivals(){\n $resultat = $this->db->select()\n ->from($this->table)\n ->order_by('anneeFestival', 'desc')\n ->get()\n ->result();\n \n if (!empty($resultat)){\n $festivalCollection = new FestivalCollection();\n \n foreach($resultat as $festival){\n $dto = $this->hydrateFromDatabase($festival);\n $festivalCollection->append($dto);\n }\n return $festivalCollection;\n }\n return new FestivalCollection();\n }", "title": "" }, { "docid": "cf505d432f41bfe1eb49063812d5627d", "score": "0.4826784", "text": "public function api_procesos_personal()\n {\n return ProcesoPersonal::orderBy('nombre', 'DESC')->get();\n }", "title": "" }, { "docid": "c857594e7bc682825abba71bfd8677fd", "score": "0.48267028", "text": "private function getFeaturedProductsList()\n {\n $repository = $this->getEntityManager()->getRepository('Manager\\Entity\\Product');\n $result = $repository->findBy(array('active' => 'TRUE', 'featured' => 'TRUE'), array('title' => 'ASC')); \n \n return $result;\n }", "title": "" }, { "docid": "7ee8c836f81801661a5f302a61889372", "score": "0.48136353", "text": "public function getRecent()\n {\n $dateLimit = new \\DateTime();\n $dateLimit->modify('-2 days');\n\n $queryBuilder = $this->createQueryBuilder('p')\n ->where('p.createdAt > :date')\n// ->setParameter(':date', new \\DateTime())\n ->setParameters([\n ':date' => $dateLimit,\n ])\n ;\n\n $results = $queryBuilder->getQuery()->getResult();\n\n return $results;\n }", "title": "" }, { "docid": "c7fb315a30414bea24fdf0a27ea3ca4f", "score": "0.48107976", "text": "function get_persona_viaje($id){\n return $this->db->get_where('persona_viaje',array('id'=>$id))->row_array();\n }", "title": "" }, { "docid": "55ecc7ce0659c6301dc2c7c6985a6e58", "score": "0.480476", "text": "public function GetPeople($live_only = true)\n\t{\t$people = array();\n\t\t$where = array('instructors.inid=postinstructors.inid', 'postinstructors.pid=' . $this->id);\n\t\tif ($live_only)\n\t\t{\t$where[] = 'instructors.live=1';\n\t\t}\n\t\t$sql = 'SELECT instructors.* FROM instructors, postinstructors WHERE ' . implode(' AND ', $where) . ' ORDER BY instructors.showfront DESC, instructors.instname ASC';\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$people[$row['inid']] = $row;\n\t\t\t}\n\t\t}\n\t\treturn $people;\n\t}", "title": "" }, { "docid": "adfd534e68fffd1ea69810c0298e425a", "score": "0.47972313", "text": "function getPersonen() : array {\r\n $ps = $this->connection->prepare(\"SELECT * FROM person\");\r\n $ps->execute();\r\n\r\n $personen = [];\r\n while($row = $ps->fetch()){\r\n // Array befüllen\r\n $id = $row['id'];\r\n $vorname = $row['vorname'];\r\n $nachname = $row['nachname'];\r\n\r\n // Objekt der Klasse Person erzeugen\r\n $person = new Person($id, $vorname, $nachname);\r\n\r\n // Person-Objekt in die List einfügen\r\n $personen[] = $person;\r\n }\r\n\r\n // Liste (Array) mit Personen-Objekten zurückgeben\r\n return $personen;\r\n }", "title": "" }, { "docid": "d413fe45b522d43aa91ca14d465e1c97", "score": "0.4796688", "text": "public function getFeatured($region = '')\n {\n return $this->query(\"\", FeaturedGameListDto::class, $region);\n }", "title": "" }, { "docid": "54b700d2a57fc7948e36dacadfd7b8de", "score": "0.47820866", "text": "public function index()\n\t{\n\t\t$person_infos = array();\n\t\t$persons = PersonInfo::orderBy('id', 'desc')->paginate(10);\n\t foreach ($persons as $p) {\n\t \tforeach ($p->people as $per) {\n\t \t\tif(Auth::user()->id == $per->user_id){\n\t\t \t\tarray_push($person_infos,$p);\n\t\t \t}\n\t \t}\n\t } \n\n\t\treturn view('person_infos.index', compact('person_infos'));\n\t}", "title": "" }, { "docid": "67e29cc55afca6276aa6ce49c15700aa", "score": "0.47805414", "text": "public function getAll($personId)\n {\n $now = Carbon::now();\n return\n DB::table('person_work_exps')\n ->select(\n 'id',\n 'date_begin as dateBegin',\n 'date_end as dateEnd',\n 'company',\n 'job_pos as jobPos',\n 'job_desc as jobDesc',\n 'location',\n 'benefit',\n 'last_salary as lastSalary',\n 'reason'\n )\n ->where([\n ['tenant_id', $this->requester->getTenantId()],\n ['person_id', $personId]\n ])\n ->get();\n }", "title": "" }, { "docid": "0d005680698dee1e41214ed8957f3da4", "score": "0.47776103", "text": "function get_personne(){\r\n\t\t\t$idpersonne=$_GET['idpersonnage'];\r\n\t\r\n\t\t\t$personne = $this->modele->get_personne($idpersonne);\r\n\r\n\t\t\tif(!$personne){\r\n\t\t\t\t$this->vue->vue_erreur(\"Personne introuvable ou innexistante.\");\r\n\t\t\t}\r\n\t\t\t\t$this->vue->vue_personne($personne);\r\n\r\n\t\t}", "title": "" }, { "docid": "71749108a2fb4b2acaef641a92f37dcc", "score": "0.47749132", "text": "public function getFeaturedVehicles()\n {\n\n $vehicles = [];\n\n $query = \"SELECT `vehicles`.`id` AS id,\n `comments`.`comment` AS comments,\n `vehicles`.`name` as name,\n `vehicles`.`img_url` as img_url,\n `vehicles`.`votes` as votes,\n `vehicles`.`created_at` AS created_at\n FROM vehicles\n LEFT JOIN comments\n ON vehicles.id = comments.vehicle_id\n WHERE YEARWEEK(`vehicles`.`created_at`) = YEARWEEK(NOW() - INTERVAL 1 WEEK)\n ORDER BY vehicles.votes DESC\";\n\n $data = $this->connection->query($query);\n\n while ($row = $data->fetch(PDO::FETCH_ASSOC)) {\n $vehicles[] = $row;\n }\n\n return $vehicles;\n }", "title": "" }, { "docid": "cb607e529a255577bfaff6da150d0aae", "score": "0.47657984", "text": "public function getMostProfitable();", "title": "" }, { "docid": "8dd29fe7df5a674b5da7a729c1f11dfa", "score": "0.47622967", "text": "private function retrieve_author_last_name()\n {\n }", "title": "" }, { "docid": "523d386301931c0bf435fa783e8b2d81", "score": "0.47562915", "text": "function FamilyInfoByDistance($iFamily)\n{\n // Handle the degenerate case of no family selected by just making the array without\n // distance and bearing data, and don't bother to sort it.\n if ($iFamily) {\n // Get info for the selected family\n $selectedFamily = FamilyQuery::create()\n ->findOneById($iFamily);\n }\n\n // Compute distance and bearing from the selected family to all other families\n $families = FamilyQuery::create()\n ->filterByDateDeactivated(null)\n ->find();\n\n foreach ($families as $family) {\n $familyID = $family->getId();\n if ($iFamily) {\n $results[$familyID]['Distance'] = floatval(GeoUtils::LatLonDistance($selectedFamily->getLatitude(), $selectedFamily->getLongitude(), $family->getLatitude(), $family->getLongitude()));\n $results[$familyID]['Bearing'] = GeoUtils::LatLonBearing($selectedFamily->getLatitude(), $selectedFamily->getLongitude(), $family->getLatitude(), $family->getLongitude());\n }\n $results[$familyID]['fam_Name'] = $family->getName();\n $results[$familyID]['fam_Address'] = $family->getAddress();\n $results[$familyID]['fam_Latitude'] = $family->getLatitude();\n $results[$familyID]['fam_Longitude'] = $family->getLongitude();\n $results[$familyID]['fam_ID'] = $familyID;\n }\n\n if ($iFamily) {\n $resultsByDistance = SortByDistance($results);\n } else {\n $resultsByDistance = $results;\n }\n return $resultsByDistance;\n}", "title": "" }, { "docid": "079b419cbffedfeb4bc6ed82c2863dd7", "score": "0.4753944", "text": "private function getSended(){\n $em = $this->getDoctrine()->getManager();\n $user = $this->get('security.context')->getToken()->getUser();\n $entities = $em->getRepository('FriendBundle:FriendRequest')->findBy(array('from'=>$user, 'active' => FALSE),array('created' => 'DESC'));\n\n return $entities;\n }", "title": "" }, { "docid": "9689186fc021edd737c3d838624255e2", "score": "0.4753063", "text": "public function getAll()\n {\n return $this->databaseManager->getAll(Person::class);\n }", "title": "" }, { "docid": "c71948b9c6710b34042e8edf8f97ee87", "score": "0.47490633", "text": "function callFreeBase($param)\n {\n $params = array(\n 'filter' => '(all name:\"' . $param . '\" type:\"/people/person\")',\n //'filter' => '(all name:\"Ronald Reagan\" type:\"/people/person\")',\n 'lang' => 'en',\n 'type' => '/people/person',\n 'key' => $this->cfg->param('FREEBASE_API_KEY')\n );\n $url = $this->cfg->param('FREEBASE_SERVICE_URL') . '?' . http_build_query($params);\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n $results = curl_exec($ch);\n if ($results === FALSE) {\n echo(curl_error($ch));\n return array();\n }\n curl_close($ch);\n\n $searchResults = $results;\n $response = json_decode($results, true);\n\n /*****\n * If name found, make subsequent call for information on the FIRST person found.\n */\n $id = $response['result'][0]['id'];\n\n $params = array('key' => $this->cfg->param('FREEBASE_API_KEY'));\n $service_url = 'https://www.googleapis.com/freebase/v1/topic';\n $url = $service_url . $id . '?' . http_build_query($params);\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n $results = curl_exec($ch);\n if ($results === FALSE) {\n echo(curl_error($ch));\n return array();\n }\n curl_close($ch);\n $response = json_decode($results, true);\n\n // /common/topic/description\n $fbid = $response['id'];\n if (empty($fbid)) {\n echo \"\\nNothing to log...\\n\\n\";\n return;\n }\n /*****\n * Build associative array\n */\n $fbname = $response['property']['/type/object/name']['values'][0]['value'];\n $summary = $response['property']['/common/topic/description']['values'][0]['value'];\n // /people/person/date_of_birth\n $birth = $response['property']['/people/person/date_of_birth']['values'][0]['value'];\n $death = $response['property']['/people/deceased_person/date_of_death']['values'][0]['value'];\n // /common/topic/notable_for\n $firstType = $response['property']['/common/topic/notable_for']['values'][0]['text'];\n $firstTypeID = $response['property']['/common/topic/notable_for']['values'][0]['id'];\n $rawtypesArr = $response['property']['/common/topic/notable_types']['values'];\n $rawakaArr = $response['property']['/common/topic/alias']['values'];\n $rawimgArr = $response['property']['/common/topic/image']['values'];\n\n $typesArr = array();\n if (!empty($rawtypesArr)) {\n foreach ($rawtypesArr as $type) {\n array_push($typesArr, array('TEXT' => $type['text'], 'ID' => $type['id']));\n }\n }\n if (!empty($firstType)) {\n array_push($typesArr, array('TEXT' => $firstType, 'ID' => $firstTypeID));\n }\n\n $akaArr = array();\n if (!empty($rawakaArr)) {\n foreach ($rawakaArr as $aka) {\n array_push($akaArr, array('TEXT' => $aka['text']));\n }\n }\n\n $imgArr = array();\n if (!empty($rawimgArr)) {\n foreach ($rawimgArr as $image) {\n array_push($imgArr, array('TEXT' => $image['text'], 'ID' => $image['id']));\n // https://usercontent.googleapis.com/freebase/v1/image/m/02bhspn\n // https://usercontent.googleapis.com/freebase/v1/image/m/02nqg_h\n }\n }\n $authorArr = array(\n 'FREEBASENAME' => $fbname,\n 'FREEBASEID' => $fbid,\n 'SUMMARY' => $summary,\n 'DOB' => $birth,\n 'DOD' => $death,\n 'TYPES' => $typesArr,\n 'IMAGES' => $imgArr,\n 'ALSOKNOWNAS' => $akaArr\n );\n\n $arrJSON = json_encode($authorArr);\n $out = '<ul class=\"nav nav-tabs\" id=\"resultsTab\">';\n $out .= '<li class=\"active\"><a href=\"#clean\">Cleansed Result</a></li>';\n $out .= '<li><a href=\"#person\">JSON Person</a></li>';\n $out .= '<li><a href=\"#search\">JSON Search</a></li></ul>';\n $out .= '<div class=\"tab-content\">';\n $out .= '<div class=\"tab-pane active\" id=\"clean\"><textarea class=\"field span12\" rows=\"20\">Person Array:' . \"\\n\\n\" . $this->indent($arrJSON) . '</textarea></div>';\n $out .= '<div class=\"tab-pane\" id=\"person\"><textarea class=\"field span12\" rows=\"20\">Complete Person JSON:' . \"\\n\\n\" . $this->indent($results) . '</textarea></div>';\n $out .= '<div class=\"tab-pane\" id=\"search\"><textarea class=\"field span12\" rows=\"20\">Person Search Results:' . \"\\n\\n\" . $this->indent($searchResults) . '</textarea></div>';\n $out .= '</div>';\n $out .= '<script>';\n $out .= '$(\"#resultsTab\").on(\"click\", \"a\", function(e){';\n $out .= 'e.preventDefault();';\n $out .= \"$(this).tab('show')\";\n $out .= '});';\n $out .= '</script>';\n echo $out;\n return;\n\n }", "title": "" }, { "docid": "5e7ce3b4a96e34ceb5932007d9b1c658", "score": "0.47473255", "text": "public function get(int $id)\n {\n if ($id === 0) throw new ApiException(\"Id not valid\", 404);\n\n $args = [(int) $id];\n $sql = \"SELECT p.*, g.id as `guest_id`, g.food_concerns, h.id as `host_id` FROM people AS p \".\n \"LEFT JOIN guests AS g ON (p.id = g.user_id) \".\n \"LEFT JOIN hosts AS h ON (p.id = h.user_id) \".\n \"WHERE p.id = ?\";\n $this->app['logger']->info(\"SQL [ $sql ] [\" . join(', ', $args) . \"] - by [{$this->app['PHP_AUTH_USER']}]\");\n $person = $this->app['db']->fetchAssoc($sql, $args);\n\n if (!$person) {\n throw new ApiException(\"Person $id not found\", 404);\n }\n\n if ($person['guest_id'] === NULL) {\n unset($person['guest_id']);\n unset($person['food_concerns']);\n $person['type'] = People::TYPE_HOST;\n }\n if ($person['host_id'] === NULL) {\n unset($person['host_id']);\n $person['type'] = People::TYPE_GUEST;\n }\n\n $now = new DateTime();\n $updated = new DateTime($person['updated']);\n if ($updated->diff($now)->days == 0) {\n $person['waited'] = \"Today\";\n } else if ($updated->diff($now)->days == 1) {\n $person['waited'] = $updated->diff($now)->days . \" day ago\";\n } else {\n $person['waited'] = $updated->diff($now)->days . \" days ago\";\n }\n\n $created = new DateTime($person['created']);\n if ($created->diff($now)->days == 0) {\n $person['joined'] = \"Today\";\n } else if ($created->diff($now)->days == 1) {\n $person['joined'] = $created->diff($now)->days . \" day ago\";\n } else {\n $person['joined'] = $created->diff($now)->days . \" days ago\";\n }\n\n return $person;\n }", "title": "" }, { "docid": "2492b4752adde2077fdbe30133f73356", "score": "0.4746162", "text": "function getExperienceByPersonalId($personal_id)\n{\n global $db;\n $experience = $db->query(\"select job, company, datestart, dateend, descripition from experience where personal_id = '$personal_id'\");\n $experience = $experience->fetchAll(PDO::FETCH_ASSOC);\n return $experience;\n}", "title": "" }, { "docid": "d0346d346c248288ccbc6363f35599fe", "score": "0.47453272", "text": "function ReadPerson($id) {\r\n\t\tFlight::json(DBReadPerson($id));\r\n\t}", "title": "" }, { "docid": "923d061b428243ef930e300fd5a13a35", "score": "0.4744711", "text": "function get_all($deleted = 0,$limit=10000, $offset=0,$col='company_name',$order='asc')\n\t{\n\t\tif (!$deleted)\n\t\t{\n\t\t\t$deleted = 0;\n\t\t}\n\t\t\n\t\t$order_by = '';\n\t\tif (!$this->config->item('speed_up_search_queries'))\n\t\t{\n\t\t\t$order_by = \"ORDER BY \".$col.\" \".$order;\n\t\t}\n\t\t\n\t\t$people=$this->db->dbprefix('people');\n\t\t$suppliers=$this->db->dbprefix('suppliers');\n\t\t$data=$this->db->query(\"SELECT *,${people}.person_id as pid \n\t\t\t\t\t\tFROM \".$people.\"\n\t\t\t\t\t\tJOIN \".$suppliers.\" ON \t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\".$people.\".person_id = \".$suppliers.\".person_id\n\t\t\t\t\t\tWHERE deleted =$deleted $order_by\n\t\t\t\t\t\tLIMIT \".$offset.\",\".$limit);\t\t\n\t\t\t\t\t\t\n\t\treturn $data;\t\n\t}", "title": "" }, { "docid": "aa5357f6e5987921d4b1009f62522be7", "score": "0.47398448", "text": "public function listPersons(){\n\n $query = $this->db->query(\"SELECT id, name, firstname, company, adress, cp, city, country, phone,\n email, website, situation FROM Contacts\");\n \n while ($row = $query->fetch(PDO::FETCH_OBJ)) {\n $i = 0;\n foreach($row as $value){\n if($i == 0){\n $res.= \"<p class='displayContacts' id='\" . $value . \"'>\";\n }\n else if($i == 3 || $i == 4 || $i == 7 || $i == 8 || $i == 9 ){\n $res.= \"</br>\";\n $res.=$value . \" \";\n }\n else {\n $res.=$value . \" \";\n }\n $i++;\n }\n $res.= \"</p> </br>\";\n }\n \n return $res;\n }", "title": "" }, { "docid": "f6bed0e2648a0d4f14678b71ca9f713c", "score": "0.4721094", "text": "public function retrieveLatestArticle(){\n\t\t\t\n\t\t\t$query = $this->pdo->query('\n\t\t\t\tSELECT *\n\t\t\t\tFROM articles\n\t\t\t\tORDER BY creationDate DESC');\n\t\t\t\n\t\t\treturn $query;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "6c176eef380941635323b4202853b4b3", "score": "0.4720525", "text": "function getMostNotification($memID){\n $query = $this->db->query('\n SELECT c.date, c.note, n.date_time, p.project_name\n FROM notifications n, calendarnotes c, projects p \n WHERE c.noteID=n.refference AND n.project_id = p.project_id AND n.type = 1 AND n.target_member = '.$memID.' '\n . 'ORDER BY n.date_time DESC '\n . 'LIMIT 3');\n\n foreach($query->result() as &$res){\n\n $res->date_time = $this->time_elapsed_string($res->date_time);\n $res->note = \"Team Leader of \".$res->project_name.\"<br/> has added a calendar note <br/>on \".$res->date.\" for you\" ;\n\n }\n\n\n return $query->result() ;\n }", "title": "" }, { "docid": "78d167b8f305ba6faa12cec3aa25fa74", "score": "0.47149536", "text": "public function getList(){\n $persos = [];\n \n $q = $this->_db->query('SELECT id, nom, forcePerso, degats, niveau, experience FROM personnages ORDER BY nom');\n \n while ($donnees = $q->fetch(PDO::FETCH_ASSOC)){\n $persos[] = new Personnage($donnees);\n }\n \n return $persos;\n }", "title": "" } ]
92445c9a019197a0f5fb5f010656787c
Generates FormSubtitle and returns it
[ { "docid": "2540a43bfbad698f72a7f8c06df19afb", "score": "0.0", "text": "public function generate(): string\n {\n return Tags::div($this->buttons, ['class' => 'buttons']);\n }", "title": "" } ]
[ { "docid": "a72f8be6483526b147c531130220464e", "score": "0.72388065", "text": "public abstract function getSubtitle();", "title": "" }, { "docid": "17f3b178e764ff4227d197017106c721", "score": "0.67174596", "text": "public function getSubtitle()\n {\n return $this->subtitle;\n }", "title": "" }, { "docid": "56beb66e19a812af3c545815767ee4db", "score": "0.6716955", "text": "public function getSubtitle()\n {\n return $this->subtitle;\n }", "title": "" }, { "docid": "30434c589e557565f293094017d05348", "score": "0.6671778", "text": "private function getSubtitle() {\n $metadata = $this->getContext('page_header')->getContextData()->getValue();\n $subtitle = $metadata['subtitle'] ?? $this->fallback($metadata);\n return $subtitle;\n }", "title": "" }, { "docid": "ecf11eeccf7484042aec4826820e987b", "score": "0.6586142", "text": "function pxlz_edgtf_subtitle_text() {\n $page_id = pxlz_edgtf_get_page_id();\n $subtitle_meta = get_post_meta($page_id, 'edgtf_title_area_subtitle_meta', true);\n $subtitle = !empty($subtitle_meta) ? $subtitle_meta : '';\n\n return apply_filters('pxlz_edgtf_subtitle_title_text', $subtitle);\n }", "title": "" }, { "docid": "80180dddd4c685adc34a642da1c260b0", "score": "0.6530413", "text": "private function subtitle()\n\t{\n\t\tif ($this->options['subtitle']) {\n\t\t\techo '<p class=\"description\">' . $this->options['subtitle'] . '</p>';\n\t\t}\n\t}", "title": "" }, { "docid": "49bbda7839b14e24c18e54c0c47c48c7", "score": "0.6518891", "text": "function the_subtitle() {\n\tglobal $post;\n\t$post_id = $post->ID;\n\t$key = 'Subtitle';\n\t$single = true;\n\techo get_post_meta($post_id, $key, $single);\n}", "title": "" }, { "docid": "226887eac2bf4e89746f1937836cd847", "score": "0.6472376", "text": "public static function _add_subtitle_meta_box() {\n\n\t\tglobal $post;\n\n\t\t$value = self::get_admin_subtitle_value( $post );\n\n\t\techo '<input type=\"hidden\" name=\"wps_noncename\" id=\"wps_noncename\" value=\"' . wp_create_nonce( 'wp-subtitle' ) . '\" />';\n\n\t\t// As of WordPress 4.3 no need to esc_attr() AND htmlentities().\n\t\t// @see https://core.trac.wordpress.org/changeset/33271\n\t\techo '<input type=\"text\" id=\"wpsubtitle\" name=\"wps_subtitle\" value=\"' . esc_attr( $value ) . '\" autocomplete=\"off\" placeholder=\"' . esc_attr( apply_filters( 'wps_subtitle_field_placeholder', __( 'Enter subtitle here', 'wp-subtitle' ) ) ) . '\" style=\"width:99%;\" />';\n\n\t\techo apply_filters( 'wps_subtitle_field_description', '', $post );\n\n\t}", "title": "" }, { "docid": "9f3879103da92bfc2d8055673cd2178b", "score": "0.6337204", "text": "function getLocalizedSubtitle() {\n\t\treturn $this->getLocalizedData('subtitle');\n\t}", "title": "" }, { "docid": "b312c8da1d52e87e785d7fd8273f7d23", "score": "0.6330176", "text": "public function subtitle()\n {\n return $this->subtitle;\n }", "title": "" }, { "docid": "abb4d75def6e584d10c358ea91397804", "score": "0.6247754", "text": "function getSubtitle($type='article') {\n \t\tswitch ($type) {\n \t\t\tcase 'product':\n \t\t\t\treturn $this->product->get_title();\t\n \t\t\t\tbreak;\n \t\t\t\n \t\t\tcase 'article':\n \t\t\tdefault:\n \t\t\t\treturn $this->article->getSubtitle();\t\n \t\t\t\tbreak;\n \t\t\t\t\n \t\t}\n \t\t\n \t}", "title": "" }, { "docid": "2085fb7593982418f47358fc62f70ae4", "score": "0.61143744", "text": "function recordSubTitle()\r\n{\r\n\treturn $GLOBALS['grecord']['subtitle'];\r\n}", "title": "" }, { "docid": "be04e632043cab394f6687465859f6d1", "score": "0.6111457", "text": "function create_subtitle(&$legend) {\n\n # Remove singletons from legend and put them in \n # the subtitle\n foreach (array_keys($legend) as $k) {\n $items = array_keys($legend[$k]);\n if (sizeof($items) == 1) {\n unset($legend[$k]);\n $subtitle[$k] = array_shift($items);\n }\n }\n\n $subtitle_pad = max(\n array_map('strlen', \n array_map('label', \n array_keys($subtitle)))) + 3;\n\n # Loop through the singletons and create a nicely aligned table\n foreach (array_keys($subtitle) as $k) {\n $item = $subtitle[$k];\n $ret .= \"\\n\" . str_pad(label($k) . ': ', $subtitle_pad) . $item;\n }\n\n $ret .= \"\\n\";\n\n return $ret;\n}", "title": "" }, { "docid": "66eebda41a6ea7ec1f8566f1411ce829", "score": "0.60778844", "text": "public function getSubtitle()\n {\n return $this->tags['TIT3'];\n }", "title": "" }, { "docid": "4d99df136e8530e7817127334b7fee26", "score": "0.60416377", "text": "public function setSubtitle($value = ''){\n $this->setVar('SUBTITLE', $value);\n }", "title": "" }, { "docid": "10710382b5727851fe50f8a7f2dbf81c", "score": "0.5987745", "text": "public function showSubtitle()\n {\n if ($this->showSubtitle === false) {\n return false;\n } else {\n return !!$this->subtitle();\n }\n }", "title": "" }, { "docid": "c4c851ab9113cc8cffdc522e281296ec", "score": "0.59793144", "text": "public function getSubtitle()\n {\n return $this->getValue('nb_project_lang_subtitle');\n }", "title": "" }, { "docid": "b960d42021f1c161b174c2ff107f40cd", "score": "0.59686893", "text": "function get_the_subtitle( $id = 0 ) {\n\t$post = get_post($id);\n\n\t$id = isset($post->ID) ? $post->ID : (int) $id;\n\n\t$subtitle = get_post_meta($id, 'subtitle', true);\n\n\t$subtitle = apply_filters('the_title', $subtitle, $id);\n\n\treturn $subtitle;\n}", "title": "" }, { "docid": "9698ca29b4f1687eae2a580349b2a36b", "score": "0.59261394", "text": "public function setSubtitle($subtitle)\n {\n $this->subtitle = $subtitle;\n\n return $this;\n }", "title": "" }, { "docid": "5f72f1b6b5923ae93095d30977120dbf", "score": "0.5920968", "text": "protected function get_page_subtitle() {\n return isset($this->page_subtitle) ? $this->page_subtitle : NULL;\n }", "title": "" }, { "docid": "6bb10ed4522e0c960dcf117a45023897", "score": "0.5890981", "text": "function tp_5583_subtitle_metabox() {\n global $post;\n $key = 'tp_5583_subtitle';\n\n if (empty($post) || 'test_post' !== get_post_type( $GLOBALS['post'] ) ) return;\n if (!$content = get_post_meta( $post->ID, $key, TRUE )) $content = '';\n printf(\n '<input type=\"text\" name=\"%1$s\" id=\"%1$s_id\" value=\"%2$s\" size=\"20\" spellcheck=\"true\" autocomplete=\"off\" placeholder=\"Enter subtitle here\">',\n $key,\n esc_attr( $content )\n );\n}", "title": "" }, { "docid": "0bf231efb5e57da3fdaf10e84c2f3f09", "score": "0.58817816", "text": "function getSubtitle($locale) {\n\t\treturn $this->getData('subtitle', $locale);\n\t}", "title": "" }, { "docid": "9807d1ccece1437304783d1962b6d827", "score": "0.58717144", "text": "function shd_get_the_subtitle( $page_id = NULL ) {\n\n\tif ( is_archive() ) {\n\t\treturn shd_term_description();\n\t}\n\n\tif ( isset( $page_id ) ) {\n\t\treturn get_field( '_subtitle', $page_id );\n\t}\n\n\treturn get_field( '_subtitle' );\n}", "title": "" }, { "docid": "e7b202ead06746cc0e247e28f8767a7e", "score": "0.57776624", "text": "public function Subtitle($label,$repeater = false) {\n $args['type'] = 'subtitle';\n $args['label'] = $label;\n $args['id'] = 'title'.$label;\n $args['std'] = '';\n $this->SetField($args);\n }", "title": "" }, { "docid": "45f4e6548dab441b3108101d87796987", "score": "0.5760907", "text": "protected function print_page_subtitle() {\n echo '<h1>' . $this->page_subtitle . '</h1>';\n }", "title": "" }, { "docid": "d6454c7bda0bfa15b2997ae55446083c", "score": "0.5670403", "text": "public function setSubtitle($subtitle)\n {\n $this->subtitle = $this->translator()->translation($subtitle);\n return $this;\n }", "title": "" }, { "docid": "1a04aaf844c65c566aa7ce73a719b4c5", "score": "0.5649918", "text": "public function addSubtitle($label) {\r\n\t\t$args['type'] = 'subtitle';\r\n\t\t$args['label'] = $label;\r\n\t\t$this->addField($args);\r\n\t}", "title": "" }, { "docid": "75fb048305e4944aa725e262f73f6169", "score": "0.5564393", "text": "function subtitle($str) {\n echo \"<h3>$str</h3>\\n\";\n}", "title": "" }, { "docid": "10e9f15413594faf1f58d03a8a57d09d", "score": "0.5538574", "text": "function displaySubtitle($genre, $filename)\n {\n // Serve subtitle file thru path: /api/v1/subtitle/{genre}/{filename}\n $contents = \"No file found\";\n /* Public folder paths\n $path = $this->directory_public . DS . $genre . DS . 'parsed' . DS . $filename;\n $path = $this->directory_public . DS . $genre . DS . $filename; \n $path = $this->directory_storage . $genre . '/parsed/'. $filename;*/\n $path = $this->directory_storage . 'parsed/'. $filename;\n $exists = Storage::disk('local')->has($path);\n if ($exists === false) {\n $path = $this->directory_storage . $genre . '/' . $filename;\n $exists = Storage::disk('local')->has($path); \n }\n if ($exists) {\n $file = Storage::get($path);\n $mime = Storage::mimeType($path);\n\n $contents = (new Response($file, 200))\n ->header('Content-Type', $mime)\n ->header('Content-Disposition', 'inline; filename=\"' . $path . '\"'); \n }\n\n return $contents;\n }", "title": "" }, { "docid": "ca9688a9feaf7552e99de6e1b78dfd1f", "score": "0.55291116", "text": "public function setShowSubtitle($show)\n {\n $this->showSubtitle = !!$show;\n\n return $this;\n }", "title": "" }, { "docid": "6f504041096c20bcd8f12e0bee9eedd8", "score": "0.5520102", "text": "public function setSubtitle($subtitle)\n {\n $this->subtitle = $this->translator()->translation($subtitle);\n\n return $this;\n }", "title": "" }, { "docid": "128802baa0a93d1cff2bd9df2506bb81", "score": "0.55096626", "text": "public function subtitle(string $subtitle): self\n {\n $this->params['subtitle'] = $subtitle;\n\n return $this;\n }", "title": "" }, { "docid": "ac514770075c2f83697c869ae13d321c", "score": "0.5492294", "text": "public function getSubTitle()\n {\n return $this->subTitle;\n }", "title": "" }, { "docid": "fc14056e8823317b6adb89a93582dfb1", "score": "0.5465718", "text": "public function getSubtitleAttribute ()\n {\n return $this->description && !empty($this->description)\n ? $this->description\n : __('luba::ui.project_no_description');\n }", "title": "" }, { "docid": "de609ef67081338da01db70f936de2a2", "score": "0.54117", "text": "private function createFormText()\r\n\t{\r\n\t\t$captcha = $this->createCaptcha();\r\n\t\t$formText = form_open(\"guestbook\");\r\n\t\t$formText .= \"<p> Name: \".form_input([\r\n\t\t\t\"name\" => \"Name\",\r\n\t\t\t\"title\" => \"Name\",\r\n\t\t\t\"placeholder\" => \"Enter your name here\",\r\n\t\t\t\"required\" => \"required\"\r\n\t\t]) . \"</p>\";\r\n\t\t$formText .= \"<p> Email: \" . form_input([\r\n\t\t\t\"name\" => \"Email\",\r\n\t\t\t\"placeholder\" => \"Enter your e-mail address here\",\r\n\t\t\t\"required\" => \"required\"\r\n\t\t]) . \"</p>\";\r\n\t\t$timezones = DateTimeZone::listIdentifiers(DateTimeZone::ALL);\r\n\t\t$formText .= \"<p>TimeZone: \" . form_dropdown(\"Timezone\", array_combine($timezones, $timezones), \"America/Vancouver\"). \"</p>\";\r\n\t\t$formText .= \"<div><p>Comment:</p>\" . form_textarea([\r\n\t\t\t\"name\" => \"Comment\",\r\n\t\t\t\"rows\" => 10,\r\n\t\t\t\"cols\" => 80,\r\n\t\t\t\"placeholder\" => \"Add your comment here\",\r\n\t\t\t\"required\" => \"required\"\r\n\t\t]) . \"</div>\";\r\n\r\n\t\t$formText .= \"<div><p>Insert your Captcha Here</p>{$captcha['image']}</div>\";\r\n\t\t$formText .= \"<p>\" . form_input([\"name\" => \"captcha\"]) . \"</p>\";\r\n\r\n\t\t$formText .= \"<p>\" . form_submit(\"submit\", \"Sign Guestbook\") . \"</p>\";\r\n\t\t$formText .= form_close();\r\n\r\n\t\treturn $formText;\r\n\t}", "title": "" }, { "docid": "a161d4736695c42ddc11db26edd542d9", "score": "0.5347416", "text": "public function subtitle()\n {\n return 'BAKD Bounty Categories';\n }", "title": "" }, { "docid": "98b203b82f3c3bba60e6b7d745c52097", "score": "0.5329992", "text": "public function getFormContent($fileName) {\n return S3Subtitle::getAsset($this->getPath($fileName));\n }", "title": "" }, { "docid": "d7de24d03bd30204e50108093dfd9a59", "score": "0.53143424", "text": "public function echoHtmlSubtitleAnchors($subtitleData)\r\n {\r\n echo '<table>';\r\n foreach ($subtitleData as $key => $value) {\r\n echo '<tr><td>';\r\n echo \" <a href='\" . $value['filename']. \"'>\" . $value['release'] . \"</a>\";\r\n echo '</td><td>';\r\n echo $value['downloads'] ;\r\n echo '</td></tr>'; \r\n } \r\n echo '</table>';\r\n }", "title": "" }, { "docid": "b74ac849e159b0155c70b39e38028c1f", "score": "0.530447", "text": "private function createMovieForm($title, $message, $fileUploadMessage, $params=null)\n {\n $output = <<<EOD\n <form method='post' enctype='multipart/form-data'>\n <fieldset>\n <legend>{$title}</legend>\n <input type='hidden' name='id' value=\"{$params['id']}\"/>\n <input type='hidden' name='image' value=\"{$params['image']}\"/>\n <input type='hidden' name='published' value=\"{$params['published']}\"/>\n <input type='hidden' name='rented' value=\"{$params['rented']}\"/>\n <input type='hidden' name='rents' value=\"{$params['rents']}\"/>\n <p><label>Titel:<br/><input type='text' name='title' value=\"{$params['title']}\"/></label></p>\n <p><label>Regissör:<br/><input type='text' name='director' value=\"{$params['director']}\"/></label></p>\n <p><label>Längd:<br/><input type='text' name='length' value=\"{$params['length']}\"/></label></p>\n <p><label>År:<br/><input type='text' name='year' value=\"{$params['year']}\"/></label></p>\n <p><label>Bild:<br><input type='file' name='image'></label></p>\n <p><label>Text:<br/><input type='text' name='subtext' value=\"{$params['subtext']}\"/></label></p>\n <p><label>Språk:<br/><input type='text' name='speech' value=\"{$params['speech']}\"/></label></p>\n <p><label>Kvalitet:<br/><input type='text' name='quality' value=\"{$params['quality']}\"/></label></p>\n <p><label>Format:<br/><input type='text' name='format' value=\"{$params['format']}\"/></label></p>\n <p><label>Pris:<br/><input type='text' name='price' value=\"{$params['price']}\"/></label></p>\n <p><label>Länk Imdb:<br/><input type='text' name='imdb' value=\"{$params['imdb']}\"/></label></p>\n <p><label>Länk Youtube:<br/><input type='text' name='youtube' value=\"{$params['youtube']}\"/></label></p>\n <p><label>Handling:<br/><textarea name='plot'>{$params['plot']}</textarea></label></p>\n <p>Genre (obligatorisk):<br/>\n {$this->generateCheckGenresCheckBoxes($params['genre'])}\n </p>\n <p><input type='submit' name='save' value='Spara'/></p>\n <output>{$message}</output><br/>\n <output>{$fileUploadMessage}</output>\n </fieldset>\n </form>\nEOD;\n\n return $output;\n }", "title": "" }, { "docid": "dc3e5aca102b6e7e7ac9c2c0f83b9f4d", "score": "0.52807623", "text": "function createform($artikel_titel=\"\", $form_submittitel=\"Absenden\") {\r\n\r\nreturn <<<TOP\r\n<form method=\"POST\" action=\"\" >\r\n<label for=\"titel\" >Titel: </label>\r\n<input type=\"text\" value=\"{$artikel_titel}\" name=\"artikel_titel\" />\r\n<input type=\"submit\" value=\"{$form_submittitel}\" />\r\n</form>\r\nTOP;\r\n\r\n}", "title": "" }, { "docid": "744be7badcd3382085acf9aa12632c1c", "score": "0.52574235", "text": "function cne_bbp_form_topic_desc() {\r\n\techo cne_bbp_get_form_topic_desc();\r\n}", "title": "" }, { "docid": "41daa0ddcafa02f2f97fcf94e14dd680", "score": "0.5254493", "text": "public function process(TextFile $subtitle, $options)\n {\n // * Sometimes files are uploaded that are srt files, but have the wrong extension\n // * Sometimes zip files are uploaded that contain srt files (from people who don't understand what an archive file is)\n // * Sometimes people upload srt files, simply not understanding the point of this tool\n if (! $subtitle instanceof TransformsToGenericSubtitle) {\n $this->abort('messages.cant_convert_file_to_srt');\n }\n\n $srt = $subtitle instanceof Srt ? $subtitle : new Srt($subtitle);\n\n $srt->stripCurlyBracketsFromCues()\n ->stripAngleBracketsFromCues()\n ->removeDuplicateCues();\n\n if (! $srt->hasCues()) {\n $this->abort('messages.file_has_no_dialogue_to_convert');\n }\n\n return $srt;\n }", "title": "" }, { "docid": "9a1b95815095231d39a4b83211e5389f", "score": "0.522812", "text": "public function getSubtitle(){\n $subt = array();\n //Comprobar que el directorio existe\n if(file_exists(public_path(\"img/resources/subtitles\"))){\n $allSubt = scandir(public_path('img/resources/subtitles'));\n \n //Crear array con los subtitulos agrupados por id\n for($i=0;$i<count($allSubt);$i++){\n $name = explode( '.', $allSubt[$i]);\n $idElement = $name[0];\n\n if($allSubt[$i]!=\".\" && $allSubt[$i]!=\"..\"){\n //Comprobar si existe una clave en el array para el id\n if (array_key_exists($idElement.\"\", $subt)) {\n array_push($subt[$idElement.\"\"], $allSubt[$i]);\n }else{\n $subt[$idElement.\"\"] = array();\n array_push($subt[$idElement.\"\"], $allSubt[$i]);\n }\n }\n }\n }\n return $subt;\n }", "title": "" }, { "docid": "ccbbea30b7510c1f5febaa3fa7beaa22", "score": "0.52078503", "text": "public function createForm() {\r\n\t\t$out = \"\r\n\t\t\t<form method='post' class='edit-form-properties'>\r\n \t\t\t\t\r\n \t\t\t\t<fieldset>\r\n\t\t\t\t\t<legend>Uppdatera innehåll</legend>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<p>Titel:<br/>\t\t<input class='movie-search-full' \ttype='text' \tname='title'/></p>\t\t\r\n\t\t\t\t\t<p>Text:<br/>\t\t<textarea style='max-width: 100%;width:100%;'\t\tname='text'></textarea></p>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<p><b>Glöm inte välja en genre!</b></p>\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t\tComedy <input type='checkbox' \t\tname='comedy' value='1' /> &nbsp;\r\n\t\t\t\t\t\tRomance <input type='checkbox' \t\tname='romance' value='2' /> &nbsp;\r\n\t\t\t\t\t\tCollege <input type='checkbox' \t\tname='college' value='3' /> &nbsp;\r\n\t\t\t\t\t\tCrime <input type='checkbox' \t\tname='crime' value='4' /> &nbsp;\r\n\t\t\t\t\t\tDrama <input type='checkbox' \t\tname='drama' value='5' /> &nbsp;\r\n\t\t\t\t\t\tThriller <input type='checkbox' \tname='thriller' value='6' /> &nbsp;\r\n\t\t\t\t\t\tAnimation <input type='checkbox' \tname='animation' value='7' /> &nbsp;\r\n\t\t\t\t\t\tAdventure <input type='checkbox' \tname='adventure' value='8' /> &nbsp;\r\n\t\t\t\t\t\tFamily <input type='checkbox' \t\tname='family' value='9' /> &nbsp;\r\n\t\t\t\t\t\tSvenskt <input type='checkbox' \t\tname='svenskt' value='10' /> &nbsp;\r\n\t\t\t\t\t\tAction <input type='checkbox' \t\tname='action' value='11' /> &nbsp;\r\n\t\t\t\t\t\tHorror <input type='checkbox' \t\tname='horror' value='12' /> &nbsp;\r\n\t\t\t\t\t</p>\r\n\r\n\t\t\t\t\t<p>Pris:<br/>\t\t<input class='movie-search-full' \ttype='text' \tname='price'/></p>\r\n\t\t\t\t\t<p>År:<br/>\t\t\t<input class='movie-search-full'\ttype='text' \tname='year'/></p>\r\n\t\t\t\t\t<p>Youtube:<br/>\t<input class='movie-search-full'\ttype='text' \tname='youtube'/></p>\r\n\t\t\t\t\t<p>IMDB:<br/>\t\t<input class='movie-search-full' \ttype='text' \tname='imdb'/></p>\r\n\t\t\t\t\t<p>Regissör:<br/>\t<input class='movie-search-full' \ttype='text' \tname='director'/></p>\r\n\t\t\t\t\t<p>Längd:<br/>\t\t<input class='movie-search-full' \ttype='text' \tname='length'/></p>\r\n\r\n\t\t\t\t\t<p><input type='submit' name='save' value='Spara'/></p>\r\n\t\t\t\t</fieldset>\r\n\r\n\t\t\t</form>\r\n\t\t\t<p class='text-back-properties'>\r\n\t\t\t\t<a href='usercontroller.php>Tillbaks till användarpanelen</a>\r\n\t\t\t</p>\r\n\t\t\";\r\n\t\treturn $out;\r\n\t}", "title": "" }, { "docid": "729634eccd1ff6b66075f6624f86d35d", "score": "0.5174456", "text": "function form($instance) {\n global $cs_theme_form_fields, $cs_html_fields, $cs_theme_html_fields;\n $instance = wp_parse_args((array) $instance, array( 'title' => '' ));\n $title = $instance['title'];\n $sub_title = isset($instance['sub_title']) ? $instance['sub_title'] : '';\n $image_url = isset($instance['image_url']) ? esc_url($instance['image_url']) : '';\n $telephone = isset($instance['telephone']) ? esc_attr($instance['telephone']) : '';\n $email = isset($instance['email']) ? esc_attr($instance['email']) : '';\n $fb_url = isset($instance['fb_url']) ? esc_url($instance['fb_url']) : '';\n $tw_url = isset($instance['tw_url']) ? esc_url($instance['tw_url']) : '';\n $lk_url = isset($instance['lk_url']) ? esc_url($instance['lk_url']) : '';\n $gl_url = isset($instance['gl_url']) ? esc_url($instance['gl_url']) : '';\n $ig_url = isset($instance['ig_url']) ? esc_url($instance['ig_url']) : '';\n $yt_url = isset($instance['yt_url']) ? esc_url($instance['yt_url']) : '';\n\n $randomID = rand(135434, 957655);\n $random = rand(1345434, 957345345655);\n\n $cs_opt_array = array(\n 'name' => esc_html__('Title', 'jobhunt'),\n 'desc' => '',\n 'hint_text' => '',\n 'echo' => false,\n 'field_params' => array(\n 'std' => $title,\n 'id' => '',\n 'classes' => '',\n 'cust_id' => CS_FUNCTIONS()->cs_special_chars($this->get_field_id('title')),\n 'cust_name' => CS_FUNCTIONS()->cs_special_chars($this->get_field_name('title')),\n 'return' => true,\n 'required' => false\n ),\n );\n echo $cs_html_fields->cs_text_field($cs_opt_array);\n\n $cs_opt_array = array(\n 'name' => esc_html__('Facebook Url', 'jobhunt'),\n 'desc' => '',\n 'hint_text' => '',\n 'echo' => false,\n 'field_params' => array(\n 'std' => $fb_url,\n 'id' => '',\n 'classes' => '',\n 'cust_id' => CS_FUNCTIONS()->cs_special_chars($this->get_field_id('fb_url')),\n 'cust_name' => CS_FUNCTIONS()->cs_special_chars($this->get_field_name('fb_url')),\n 'return' => true,\n 'required' => false\n ),\n );\n echo $cs_html_fields->cs_text_field($cs_opt_array);\n\n $cs_opt_array = array(\n 'name' => esc_html__('Twitter Url', 'jobhunt'),\n 'desc' => '',\n 'hint_text' => '',\n 'echo' => false,\n 'field_params' => array(\n 'std' => $tw_url,\n 'id' => '',\n 'classes' => '',\n 'cust_id' => CS_FUNCTIONS()->cs_special_chars($this->get_field_id('tw_url')),\n 'cust_name' => CS_FUNCTIONS()->cs_special_chars($this->get_field_name('tw_url')),\n 'return' => true,\n 'required' => false\n ),\n );\n echo $cs_html_fields->cs_text_field($cs_opt_array);\n\n $cs_opt_array = array(\n 'name' => esc_html__('Linkedin Url', 'jobhunt'),\n 'desc' => '',\n 'hint_text' => '',\n 'echo' => false,\n 'field_params' => array(\n 'std' => $lk_url,\n 'id' => '',\n 'classes' => '',\n 'cust_id' => CS_FUNCTIONS()->cs_special_chars($this->get_field_id('lk_url')),\n 'cust_name' => CS_FUNCTIONS()->cs_special_chars($this->get_field_name('lk_url')),\n 'return' => true,\n 'required' => false\n ),\n );\n echo $cs_html_fields->cs_text_field($cs_opt_array);\n\n $cs_opt_array = array(\n 'name' => esc_html__('Google Url', 'jobhunt'),\n 'desc' => '',\n 'hint_text' => '',\n 'echo' => false,\n 'field_params' => array(\n 'std' => $gl_url,\n 'id' => '',\n 'classes' => '',\n 'cust_id' => CS_FUNCTIONS()->cs_special_chars($this->get_field_id('gl_url')),\n 'cust_name' => CS_FUNCTIONS()->cs_special_chars($this->get_field_name('gl_url')),\n 'return' => true,\n 'required' => false\n ),\n );\n echo $cs_html_fields->cs_text_field($cs_opt_array);\n\n $cs_opt_array = array(\n 'name' => esc_html__('Rss Url', 'jobhunt'),\n 'desc' => '',\n 'hint_text' => '',\n 'echo' => false,\n 'field_params' => array(\n 'std' => $ig_url,\n 'id' => '',\n 'classes' => '',\n 'cust_id' => CS_FUNCTIONS()->cs_special_chars($this->get_field_id('ig_url')),\n 'cust_name' => CS_FUNCTIONS()->cs_special_chars($this->get_field_name('ig_url')),\n 'return' => true,\n 'required' => false\n ),\n );\n echo $cs_html_fields->cs_text_field($cs_opt_array);\n\n $cs_opt_array = array(\n 'name' => esc_html__('Youtube Url', 'jobhunt'),\n 'desc' => '',\n 'hint_text' => '',\n 'echo' => false,\n 'field_params' => array(\n 'std' => $yt_url,\n 'id' => '',\n 'classes' => '',\n 'cust_id' => CS_FUNCTIONS()->cs_special_chars($this->get_field_id('yt_url')),\n 'cust_name' => CS_FUNCTIONS()->cs_special_chars($this->get_field_name('yt_url')),\n 'return' => true,\n 'required' => false\n ),\n );\n echo $cs_html_fields->cs_text_field($cs_opt_array);\n }", "title": "" }, { "docid": "bceb96c064644e11b273c7bcebb36855", "score": "0.5172868", "text": "function setSubtitle($subtitle, $locale) {\n\t\treturn $this->setData('subtitle', $subtitle, $locale);\n\t}", "title": "" }, { "docid": "d6920a7a6e7e0c8db63d1829b8e9862b", "score": "0.5170234", "text": "protected function getSecondaryTitle()\n {\n return '';\n }", "title": "" }, { "docid": "b99585813eca2c738940b3718b3b0329", "score": "0.516022", "text": "public function toSubtitles(array $internalFormat): string\n {\n $fileContent = '';\n\n foreach ($internalFormat as $k => $block) {\n $nr = $k + 1;\n $start = $this->toSubtitleTimeFormat($block['start']);\n $end = $this->toSubtitleTimeFormat($block['end']);\n $lines = implode(\"\\n\", $block['lines']);\n\n $fileContent .= $nr . \"\\n\";\n $fileContent .= $start . ' --> ' . $end . \"\\n\";\n $fileContent .= $lines . \"\\n\";\n $fileContent .= \"\\n\";\n }\n\n return trim($fileContent);\n }", "title": "" }, { "docid": "b0385e0a95e6cdc33b82ce5589b9c4d2", "score": "0.5159587", "text": "public function form_process_description( $desc='' ){\n $output = '';\n if ($desc) {\n $output .= '<div class=\"mb_desc\">';\n $output .= '<p>' . $desc . '</p>';\n $output .= '</div>';\n }\n return $output;\n }", "title": "" }, { "docid": "70479e7f7c553ab2b848f6f6c3ae9fc1", "score": "0.51566994", "text": "function travelogue_show_post_metabox_callback( $post ) {\n\n // Add an nonce field so we can check for it later.\n wp_nonce_field( 'page_options_nonce', 'page_nonce' );\n\n /*\n * Use get_post_meta() to retrieve an existing value\n * from the database and use the value for the form.\n */\n\n $post_subtitle = get_post_meta( $post->ID, 'post_subtitle', true );\n\n\n echo \"<div class='avstudio-metabox'>\";\n\n echo \"<style>\";\n echo \".metabox-page { float:left;width:100%;padding:10px 0 }\";\n echo \".metabox-page label { margin-right:20px;font-weight:bold;width:20%;display:inline-block }\";\n echo \".metabox-page .left { margin-right:20px;width:20%;float:left}\";\n echo \".metabox-page .right { width:70%;float:left}\";\n echo \"</style>\";\n\n echo \"<div class='metabox-page'>\";\n echo \"<label for='post_subtitle'>\".__( 'Subtitle', 'travelogue' ).\"</label>\";\n echo '<input type=\"text\" name=\"post_subtitle\" value=\"' . esc_attr( $post_subtitle ) . '\" size=\"70\" />';\n echo \"</div>\";\n\n echo \"<div style='clear:both'></div>\";\n echo \"</div>\";\n}", "title": "" }, { "docid": "86efe5e3a103308fb55db911a39f0786", "score": "0.51487523", "text": "public function setSubtitle(string $subtitle = null) : CNabuDataObject\n {\n $this->setValue('nb_project_lang_subtitle', $subtitle);\n \n return $this;\n }", "title": "" }, { "docid": "38f15ac8f3bf1e67773cf583ad18928f", "score": "0.5129232", "text": "public function getPageDetails($result) {\n\t\tglobal $sfgFormPrinter, $wgLang;\n\n\t\t$mTitle = $result->getTitle();\n\n\t\tif( ! $mTitle) {\n\t\t\ttrigger_error('Fail to get Page Title', E_USER_WARNING);\n\t\t\treturn '';\n\t\t}\n\n\t\t$page = WikiPage::factory( $mTitle );\n\n\t\tif($page->getContent()) {\n\t\t\t$preloadContent = $page->getContent()->getWikitextForTransclusion();\n\t\t} else {\n\t\t\t$preloadContent = '';\n\t\t}\n\t\t$text = $page->getContent();\n\t\t$creator = $page->getCreator();\n\n\t\t$displayTitle = $mTitle->getText();\n\t\t$translatedLang = false;\n\t\t$pageCodeLang = $mTitle->getPageLanguage()->getCode();\n\n\t\t// For translated pages : $creator must be changed to match the original Creator\n\t\t// or it will ofen display \"fussybot\" or one of the translators\n\t\tif (class_exists('TranslatablePage')) {\n\t\t\t$sourcePageTranslatable = \\TranslatablePage::isTranslationPage( $mTitle );\n\t\t\t//var_dump($page); echo \"<br/>\";\n\t\t\tif ($sourcePageTranslatable) {\n\t\t\t\t$sourcePage = WikiPage::factory( $sourcePageTranslatable->getTitle() );\n\t\t\t\t// if this is a translated page, creator is got from the original one :\n\t\t\t\t$creator = $sourcePage->getCreator();\n\t\t\t\t// get the translated Title if any :\n\t\t\t\t$translatedLang = $pageCodeLang;\n\t\t\t\t$displayTitleTranslated = $sourcePageTranslatable->getPageDisplayTitle( $pageCodeLang );\n\t\t\t\tif($displayTitleTranslated) {\n\t\t\t\t\t$displayTitle = $displayTitleTranslated;\n\t\t\t\t} else {\n\t\t\t\t\t$displayTitle = $sourcePageTranslatable->getTitle()->getText();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// remplace template :\n\t\t$preloadContent = str_replace('{{Tuto Details', '{{Tuto SearchResult', $preloadContent);\n\n\t\t// get the form content\n\t\t$formTitle = Title::makeTitleSafe( PF_NS_FORM, 'Template:Tuto_Details' );\n\n\t\t$data = WfTutorialUtils::getArticleData( $preloadContent);\n\n\t\tif( ! $data ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$pageLang = $mTitle->getPageLanguage()->getCode();\n\n\t\t$data['title_dbkey'] = $mTitle->getPrefixedDbKey();\n\t\t$data['title'] = $displayTitle;\n\t\t$data['codeLang'] = $pageLang == $wgLang->getCode() ? '' : $pageLang ;\n\t\t$data['translatedCodeLang'] = $translatedLang;\n\t\t$data['creatorId'] = $creator->getId();\n\t\t$data['creatorUrl'] = $creator->getUserPage()->getLinkURL();\n\t\t$data['creatorName'] = $creator->getName();\n\n\n\t\tif (class_exists('wAvatar')) {\n\t\t\t$avatar = new wAvatar( $data['creatorId'], 'm' );\n\t\t\t$data['creatorAvatar'] = $avatar->getAvatarURL();\n\t\t}\n\n\t\t$data['creator'] = $creator->getRealName();\n\t\tif( ! $data['creator']) {\n\t\t\t$data['creator'] = $creator->getName();\n\t\t}\n\t\t$data['url'] = $mTitle->getLinkURL();\n\n\t\t$template = false;\n\n\t\tHooks::run( 'Explore-beforeFormatResult', [ $page, &$data, &$template ] );\n\n\t\t$this->setOverloadTemplate($template);\n\n\t\treturn $this->formatResult($data);\n\n\t}", "title": "" }, { "docid": "be5969eb3bc63a12a2dd9e7be3c1ecd9", "score": "0.5120706", "text": "function gen_complete_form()\n{\n echo '<h1 class=\"text-header\">COMPLETE</h1>';\n play_sound_complete();\n}", "title": "" }, { "docid": "0adf1211ddb986c1b95e19bff3b76d1f", "score": "0.51190734", "text": "protected static function getSubtitleByVideId($videoId)\n {\n $ch = curl_init();\n \n curl_setopt($ch, CURLOPT_URL, \"http://www.yousubtitles.com/loadvideo/ch--\" . $videoId);\n \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Accept:application/json, text/javascript, */*; q=0.01',\n 'Accept-Encoding:gzip',\n 'Accept-Language:ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7',\n 'Connection:keep-alive',\n 'Content-Length:0',\n 'Cookie:_ym_uid=1520017726541143244; _ym_visorc_40164390=w; _ym_isad=2; __atuvc=3%7C9; __atuvs=5a99a13ed5f885d7002',\n 'User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36'));\n curl_setopt($ch, CURLOPT_POST, 1);\n \n \n \n $output = curl_exec($ch);\n curl_close($ch);\n $output = gzdecode($output);\n if($output === false)\n {\n return false;\n }\n $response = json_decode($output);\n //'load' is field from json\n $downloadlink = $response->{'load'};\n //6 it is length string 'href=\"'\n $downloadlink = substr($downloadlink,\n strpos($downloadlink, 'href') + 6,\n strpos($downloadlink, '\"', strpos($downloadlink, 'href') + 6) - strpos($downloadlink, 'href') - 6);\n \n \n $downloadlink = 'http://www.yousubtitles.com' . $downloadlink;\n \n //request on getting file with subtitle by link\n $ch = curl_init();\n \n curl_setopt($ch, CURLOPT_URL, $downloadlink);\n \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Accept:application/json, text/javascript, */*; q=0.01',\n 'Accept-Encoding:gzip',\n 'Accept-Language:ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7',\n 'Connection:keep-alive',\n 'Content-Length:0',\n 'Cookie:_ym_uid=1520017726541143244; _ym_visorc_40164390=w; _ym_isad=2; __atuvc=3%7C9; __atuvs=5a99a13ed5f885d7002',\n 'User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36'));\n \n $output = curl_exec($ch);\n curl_close($ch);\n $output = gzdecode($output);\n return $output;\n }", "title": "" }, { "docid": "087433302ff07b27a36efaf3a7fd1551", "score": "0.5089018", "text": "public function subtitle(): string\n {\n return $this->destination.' | '.$this->departure_date->format('F Y');\n }", "title": "" }, { "docid": "bb5b5a6de706d0948ec2b0a697046a48", "score": "0.50763357", "text": "function post() {\n\t\tif ( empty( $_POST['wptv-upload-subtitles-nonce'] ) || ! wp_verify_nonce( $_POST['wptv-upload-subtitles-nonce'], 'wptv-upload-subtitles' ) ) {\n\t\t\twp_die( 'Invalid form data. Please go back and try again.' );\n\t\t}\n\n\t\tif ( empty( $_POST['wptv_video_id'] ) ) {\n\t\t\twp_die( 'Requires a video context.' );\n\t\t}\n\n\t\t$video_id = absint( $_POST['wptv_video_id'] );\n\t\t$this->video_id = $video_id;\n\n\t\tif ( function_exists( 'wp_attachment_is_video' ) && ! wp_attachment_is_video( $video_id ) ) {\n\t\t\twp_die( 'You can only subtitle videos.' );\n\t\t}\n\n\t\tif ( empty( $_POST['wptv_wporg_username'] ) || empty( $_POST['wptv_author_email'] ) || ! is_email( $_POST['wptv_author_email'] ) ) {\n\t\t\t$this->error( 4 );\n\t\t}\n\n\t\t$wporg_username = $this->sanitize_text( $_POST['wptv_wporg_username'] );\n\t\t$author_email = $this->sanitize_text( $_POST['wptv_author_email'] );\n\n\t\tif ( empty( $_POST['wptv_language'] ) ) {\n\t\t\t$this->error( 7 );\n\t\t}\n\n\t\t$language = $_POST['wptv_language'];\n\t\t$available_languages = class_exists( 'VideoPress_Subtitles' ) ? VideoPress_Subtitles::get_languages() : array();\n\n\t\tif ( ! array_key_exists( $language, $available_languages ) ) {\n\t\t\t$this->error( 7 );\n\t\t}\n\n\t\t$language = $available_languages[ $language ];\n\n\t\t$video_data = function_exists( 'video_get_info_by_blogpostid' ) ? video_get_info_by_blogpostid( get_current_blog_id(), $video_id ) : new StdClass;\n\t\t$video_attachment = get_post( $video_id );\n\t\tif ( empty( $video_data ) || empty( $video_attachment ) ) {\n\t\t\twp_die( 'Invalid form data.' );\n\t\t}\n\n\t\t$parent = get_post( $video_attachment->post_parent );\n\n\t\tif ( ! $parent || ! in_array( $parent->post_status, array( 'publish', 'private' ), true ) ) {\n\t\t\twp_die( 'You can not subtitle this video.' );\n\t\t}\n\n\t\tif ( empty( $_FILES['wptv_subtitles_file']['name'] ) ) {\n\t\t\t$this->error( 1 );\n\t\t}\n\n\t\t// quick file extension check\n\t\t$name_parts = pathinfo( $_FILES['wptv_subtitles_file']['name'] );\n\n\t\tif ( ! empty( $name_parts['extension'] ) ) {\n\t\t\tif ( ! in_array( strtolower( $name_parts['extension'] ), array( 'ttml', 'dfxp' ), true ) ) {\n\t\t\t\t$this->error( 2 );\n\t\t\t}\n\t\t} else {\n\t\t\t$this->error( 3 );\n\t\t}\n\n\t\t// empty the globals just in case\n\t\t$_POST = $_REQUEST = $_GET = array();\n\n\t\t$subs_attachment_id = $this->handle_upload();\n\n\t\tif ( is_wp_error( $subs_attachment_id ) ) {\n\t\t\t$this->error( 5 );\n\t\t}\n\n\t\t// TODO: needed?? Better to test in $this->handle_upload() and return WP_Error\n\t\t// Link the uploaded attachment\n\t\t/*\t\tif ( get_post_mime_type( $subs_attachment_id ) != 'application/ttml+xml' ) {\n\t\t\t\t\twp_delete_attachment( $subs_attachment_id );\n\t\t\t\t\t$this->error( 2 );\n\t\t\t\t}\n\t\t*/\n\t\t// TODO: needed??\n\t\t// Not visible on wordpress.tv but is in the HTML source. However 'post_content' is public data.\n\t\t// Used for <meta name=\"description\" and \"og:description\".\n\t\t$post_content = sprintf( \"Uploaded by: %s\\nLanguage: %s\",\n\t\t\t$wporg_username,\n\t\t\t$language['label']\n\t\t);\n\n\t\twp_update_post( array(\n\t\t\t'ID' => $subs_attachment_id,\n\t\t\t'post_content' => $post_content,\n\t\t\t'post_title' => sprintf( 'Subtitles: %s (%s)', $parent->post_title, $language['label'] ),\n\t\t//\t'post_parent' => $parent->ID, // easier to look for unapproved subtitles attachment if they are \"unattached\"?\n\t\t) );\n\n\t\t$subs_attachment_meta = array(\n\t\t\t'video_attachment_id' => $video_attachment->ID,\n\t\t\t'video_post_id' => $parent->ID,\n\t\t\t'video_guid' => $video_data->guid,\n\t\t\t'submitted_by' => $wporg_username,\n\t\t\t'submitted_email' => $author_email,\n\t\t\t'language_key' => $language['key'],\n\t\t//\t'ip' => $_SERVER['REMOTE_ADDR'], // keep this for ref?\n\t\t);\n\n\t\tupdate_post_meta( $subs_attachment_id, '_wptv_submitted_subtitles', $subs_attachment_meta );\n\n\t\t/*\t\t// TODO: can add this on upload to indicate that there is a file being moderated.\n\t\t\t\t// This will block uploads of other files for the same language,\n\t\t\t\t// but needs change in VideoPress_Subtitles::get_tracks() in /videopress/subtitles.php\n\t\t\t\t// to bypass the trac when 'subtitles_post_id' == 0.\n\t\t\t\t// Alternatively can add some meta on the video attachment post.\n\t\t\t\t$subtitles = get_post_meta( $video_attachment->ID, '_videopress_subtitles', true );\n\t\t\t\tif ( empty( $subtitles ) )\n\t\t\t\t\t$subtitles = array();\n\n\t\t\t\t$subtitles[ $language['key'] ] = array(\n\t\t\t\t\t'language' => $language['key'],\n\t\t\t\t\t'subtitles_post_id' => 0,\n\t\t\t\t\t'pending_subtitles_post_id' => $subs_attachment_id,\n\t\t\t\t);\n\n\t\t\t\tif ( ! update_post_meta( $video_attachment->ID, '_videopress_subtitles', $subtitles ) ) {\n\t\t\t\t\twp_delete_attachment( $subs_attachment_id );\n\t\t\t\t\t$this->error( 5 );\n\t\t\t\t}\n\t\t*/\n\t\t// success() redirects to the 'subtitle' page with \"Thank you for uploading\" message and exits.\n\t\t$this->success();\n\t}", "title": "" }, { "docid": "df3c4b7accf4fe49d8926071fa90546c", "score": "0.5057056", "text": "function edd_add_subtitles_support() {\n add_post_type_support( 'download', 'wps_subtitle' );\n}", "title": "" }, { "docid": "eb68891f67723cc803b44a10ba282e40", "score": "0.5043971", "text": "public static function get_meta_box_title( $post_type ) {\n\t\treturn apply_filters( 'wps_meta_box_title', __( 'Subtitle', 'wp-subtitle' ), $post_type );\n\t}", "title": "" }, { "docid": "d1aa5b02c09f46ab43bfd563a8416cb4", "score": "0.5032608", "text": "function campusmate_signup_wizard_subject_info($form, &$form_state) {\n $form = [];\n $form['subname'] = [\n '#type' => 'textfield',\n '#title' => t('Subject Name'),\n '#required' => TRUE,\n '#description' => t('Hint: Do not enter \"Math\", and do not leave this out.'),\n '#default_value' => !empty($form_state['values']['subname']) ? $form_state['values']['subname'] : '',\n ];\n return $form;\n}", "title": "" }, { "docid": "330a747f80284dd7d7352273a9a73413", "score": "0.5030628", "text": "private static function get_admin_subtitle_value( $post ) {\n\n\t\t$subtitle = new WP_Subtitle( $post );\n\n\t\t$value = $subtitle->get_raw_subtitle();\n\n\t\t// Default subtitle if adding new post\n\t\tif ( function_exists( 'get_current_screen' ) && empty( $value ) ) {\n\t\t\t$screen = get_current_screen();\n\t\t\tif ( isset( $screen->action ) && 'add' == $screen->action ) {\n\t\t\t\t$value = $subtitle->get_default_subtitle( $post );\n\t\t\t}\n\t\t}\n\n\t\treturn $value;\n\n\t}", "title": "" }, { "docid": "16e3921c880d392de0a5ce5a71a9224d", "score": "0.50256103", "text": "function gen_ok_form()\n{\n echo '<h1 class=\"text-header\">OK</h1>';\n play_sound_ok();\n}", "title": "" }, { "docid": "0892c5a97e4b10b7e63a968baf555984", "score": "0.50214964", "text": "public function form( $instance ) {\n\t\t$options = self::default_options( $instance );\n\t\t// ※ Don't need isset that already do wp_parse_args().\n\n\t\techo '<p>';\n\t\techo __( 'Title:', 'lightning' ) . '<br>';\n\t\t$id = $this->get_field_id( 'title' );\n\t\t$name = $this->get_field_name( 'title' );\n\t\techo '<input type=\"text\" id=\"' . $id . '\" name=\"' . $name . '\" value=\"' . esc_attr( $options['title'] ) . '\" />';\n\t\techo '</p>';\n\n\t\t// サブタイトルの入力\n\t\tif ( isset( $options['text'] ) && $options['text'] ) {\n\t\t\t$text = $options['text'];\n\t\t} else {\n\t\t\t$text = '';\n\t\t}\n\n\t\t$id = $this->get_field_id( 'text' );\n\t\t$name = $this->get_field_name( 'text' );\n\n\t\techo '<p>';\n\t\techo __( 'Sub title:', 'lightning' ) . '<br>';\n\t\techo '<textarea id=\"' . $id . '\" name=\"' . $name . '\" style=\"width:100%;\">' . esc_textarea( $text ) . '</textarea>';\n\t\techo '</p>';\n\n\t\t// title font color\n\t\techo '<p class=\"color_picker_wrap\">' .\n\t\t\t '<label for=\"' . $this->get_field_id( 'title_font_color' ) . '\">' . __( 'Text color of the title:', 'lightning' ) . '</label><br/>' .\n\t\t\t '<input type=\"text\" id=\"' . $this->get_field_id( 'title_font_color' ) . '\" class=\"color_picker\" name=\"' . $this->get_field_name( 'title_font_color' ) . '\" value=\"' . esc_attr( $options['title_font_color'] ) . '\" /></p>';\n\n\t\t// Shadow Use\n\t\t$checked = ( $options['title_shadow_use'] ) ? ' checked' : '';\n\t\techo '<p><input type=\"checkbox\" id=\"' . $this->get_field_id( 'title_shadow_use' ) . '\" name=\"' . $this->get_field_name( 'title_shadow_use' ) . '\" value=\"true\"' . $checked . ' >';\n\t\techo '<label for=\"' . $this->get_field_id( 'title_shadow_use' ) . '\">' . __( 'Text shadow', 'lightning' ) . '</label><br/></p>';\n\n\t\t// Shadow color\n\t\techo '<p class=\"color_picker_wrap\">' .\n\t\t\t '<label for=\"' . $this->get_field_id( 'title_shadow_color' ) . '\">' . __( 'Text shadow color:', 'lightning' ) . '</label><br/>' .\n\t\t\t '<input type=\"text\" id=\"' . $this->get_field_id( 'title_shadow_color' ) . '\" class=\"color_picker\" name=\"' . $this->get_field_name( 'title_shadow_color' ) . '\" value=\"' . esc_attr( $options['title_shadow_color'] ) . '\" /></p>';\n\n\t\t// bg color\n\t\techo '<p class=\"color_picker_wrap\">' .\n\t\t\t '<label for=\"' . $this->get_field_id( 'title_bg_color' ) . '\">' . __( 'Title background color:', 'lightning' ) . '</label><br/>' .\n\t\t\t '<input type=\"text\" id=\"' . $this->get_field_id( 'title_bg_color' ) . '\" class=\"color_picker\" name=\"' . $this->get_field_name( 'title_bg_color' ) . '\" value=\"' . esc_attr( $options['title_bg_color'] ) . '\" /></p>';\n\n\t\t$image = null;\n\t\tif ( is_numeric( $options['media_image_id'] ) ) {\n\t\t\t$image = wp_get_attachment_image_src( $options['media_image_id'], 'full' );\n\t\t}\n\t\t?>\n\n\t\t<div class=\"vkExUnit_banner_area\" style=\"padding: 0.7em 0;\">\n\t\t\t<div class=\"_display\" style=\"height:auto\">\n\t\t\t\t<?php if ( $image ) : ?>\n\t\t\t\t\t<img src=\"<?php echo esc_url( $image[0] ); ?>\" style=\"width:100%;height:auto;\" />\n\t\t\t\t<?php endif; ?>\n\t\t\t</div>\n\t\t\t<button class=\"button button-default button-block\" style=\"display:block;width:100%;text-align: center; margin:4px 0;\" onclick=\"javascript:vk_title_bg_image_addiditional(this);return false;\"><?php _e( 'Set image', 'lightning' ); ?></button>\n\t\t\t<button class=\"button button-default button-block\" style=\"display:block;width:100%;text-align: center; margin:4px 0;\" onclick=\"javascript:vk_title_bg_image_delete(this);return false;\"><?php _e( 'Delete image', 'lightning' ); ?></button>\n\t\t\t<div class=\"_form\" style=\"line-height: 2em\">\n\t\t\t\t<input type=\"hidden\" class=\"__id\" name=\"<?php echo $this->get_field_name( 'media_image_id' ); ?>\" value=\"<?php echo esc_attr( $options['media_image_id'] ); ?>\" />\n\t\t\t</div>\n\t\t</div>\n\t\t<script type=\"text/javascript\">\n\t\t\t// Register background image\n\t\t\tif ( vk_title_bg_image_addiditional == undefined ){\n\t\t\t\tvar vk_title_bg_image_addiditional = function(e){\n\t\t\t\t\t// Preview area div\n\t\t\t\t\tvar d=jQuery(e).parent().children(\"._display\");\n\t\t\t\t\t// Input tag of save image id.\n\t\t\t\t\tvar w=jQuery(e).parent().children(\"._form\").children('.__id')[0];\n\t\t\t\t\tvar u=wp.media({library:{type:'image'},multiple:false}).on('select', function(e){\n\t\t\t\t\t\tu.state().get('selection').each(function(f){\n\t\t\t\t\t\t\td.children().remove();\n\t\t\t\t\t\t\td.append(jQuery('<img style=\"width:100%;mheight:auto\">').attr('src',f.toJSON().url));\n\t\t\t\t\t\t\tjQuery(w).val(f.toJSON().id).change();\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\tu.open();\n\t\t\t\t};\n\t\t\t}\n\t\t\t// Function of Delete background image\n\t\t\tif ( vk_title_bg_image_delete == undefined ){\n\t\t\t\tvar vk_title_bg_image_delete = function(e){\n\t\t\t\t\t// Preview area div\n\t\t\t\t\tvar d=jQuery(e).parent().children(\"._display\");\n\t\t\t\t\t\t// Input tag of save image id.\n\t\t\t\t\tvar w=jQuery(e).parent().children(\"._form\").children('.__id')[0];\n\n\t\t\t\t\t// Delete tag of preview img.\n\t\t\t\t\td.children().remove();\n\t\t\t\t\t// w.attr(\"value\",\"\");\n\t\t\t\t\tjQuery(e).parent().children(\"._form\").children('.__id').attr(\"value\",\"\").change();\n\t\t\t\t};\n\t\t\t}\n\t\t</script>\n\n\t\t<?php\n\n\t\t// Shadow Use\n\t\t$checked = ( $options['bg_parallax'] ) ? ' checked' : '';\n\t\techo '<p><input type=\"checkbox\" id=\"' . $this->get_field_id( 'bg_parallax' ) . '\" name=\"' . $this->get_field_name( 'bg_parallax' ) . '\" value=\"true\"' . $checked . ' >';\n\t\techo '<label for=\"' . $this->get_field_id( 'bg_parallax' ) . '\">' . __( 'Set to parallax', 'lightning' ) . '</label><br/></p>';\n\n\t\techo '<p>';\n\t\techo __( 'Margin Top', 'lightning' ) . ' : ';\n\t\t$id = $this->get_field_id( 'margin_top' );\n\t\t$name = $this->get_field_name( 'margin_top' );\n\t\techo '<input type=\"text\" id=\"' . $id . '\" name=\"' . $name . '\" value=\"' . esc_attr( $options['margin_top'] ) . '\" /><br />';\n\t\techo __( 'Ex', 'lightning' ) . ') 0;';\n\t\techo '</p>';\n\n\t\techo '<p>';\n\t\techo __( 'Margin Bottom', 'lightning' ) . ' : ';\n\t\t$id = $this->get_field_id( 'margin_bottom' );\n\t\t$name = $this->get_field_name( 'margin_bottom' );\n\t\techo '<input type=\"text\" id=\"' . $id . '\" name=\"' . $name . '\" value=\"' . esc_attr( $options['margin_bottom'] ) . '\" /><br />';\n\t\techo __( 'Ex', 'lightning' ) . ') 40px';\n\t\techo '</p>';\n\n\t}", "title": "" }, { "docid": "668d1a0d318e1433f53f7e5a514f7ee0", "score": "0.5019449", "text": "public static function edit_form_title( $form ) {\r\n\r\n\t\t//Only allow users with form edit permissions to edit forms\r\n\t\tif ( ! GFCommon::current_user_can_any( 'gravityforms_edit_forms' ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t?>\r\n\r\n\t\t<div id=\"edit-title-container\" class=\"add_field_button_container\">\r\n\t\t\t<div class=\"button-title-link gf_button_title_active\">\r\n\t\t\t\t<div id=\"edit-title-header\">\r\n\t\t\t\t\t<?php esc_html_e( 'Form Title', 'gravityforms' ); ?>\r\n\t\t\t\t\t<span id=\"edit-title-close\" onclick=\"GF_CloseEditTitle();\"><i class=\"fa fa-times\"></i></span>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"add-buttons\">\r\n\t\t\t\t<input type=\"text\" id='edit-title-input' value='<?php echo esc_attr( $form['title'] ); ?>' />\r\n\r\n\t\t\t\t<div class=\"edit-form-footer\">\r\n\t\t\t\t\t<input type=\"button\" value=\"<?php esc_html_e( 'Update', 'gravityforms' ); ?>\" class=\"button-primary\" onclick=\"GF_SaveTitle();\" />\r\n\t\t\t\t\t<span id=\"gform_settings_page_title_error\"></span>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t</div>\r\n\r\n\t\t<script type=\"text/javascript\">\r\n\t\t\tfunction GF_ShowEditTitle() {\r\n\t\t\t\tjQuery('#edit-title-container').css('visibility', 'visible')\r\n\t\t\t\t\t.find('#edit-title-input').focus();\r\n\t\t\t}\r\n\r\n\t\t\tfunction GF_CloseEditTitle() {\r\n\t\t\t\tjQuery('#edit-title-container').css('visibility', 'hidden');\r\n\r\n\t\t\t\tjQuery('#edit-title-input').val( jQuery('#gform_settings_page_title').text() );\r\n\t\t\t\tjQuery('#gform_settings_page_title_error').text('');\r\n\t\t\t}\r\n\r\n\t\t\tfunction GF_SaveTitle(){\r\n\r\n\t\t\t\tvar title = jQuery( '#edit-title-input' ).val();\r\n\r\n\t\t\t\tjQuery.post(ajaxurl, {\r\n\t\t\t\t\taction : \"gf_save_title\",\r\n\t\t\t\t\tgf_save_title: '<?php echo wp_create_nonce( 'gf_save_title' ); ?>',\r\n\t\t\t\t\ttitle : jQuery.toJSON(title),\r\n\t\t\t\t\tformId : '<?php echo absint( $form['id'] ); ?>'\r\n\t\t\t\t})\r\n\t\t\t\t\t.done(function (data) {\r\n\r\n\t\t\t\t\t\tresult = jQuery.parseJSON(data);\r\n\t\t\t\t\t\tvar isValid = result && result.isValid;\r\n\r\n\t\t\t\t\t\tif ( !isValid ) {\r\n\r\n\t\t\t\t\t\t\tvar errorMessage = result ? result.message : '<?php esc_attr_e( 'Oops! There was an error saving the form title. Please refresh the page and try again.', 'gravityforms' ); ?>' ;\r\n\r\n\t\t\t\t\t\t\tjQuery('#gform_settings_page_title_error').text(errorMessage);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tvar title = jQuery('#edit-title-input').val();\r\n\t\t\t\t\t\t\tjQuery('#gform_settings_page_title').text(title);\r\n\t\t\t\t\t\t\tjQuery('#form_title_input').val(title);\r\n\t\t\t\t\t\t\t<?php echo GFCommon::is_form_editor() ? 'form.title = title;' : ''; ?>\r\n\r\n\t\t\t\t\t\t\tGF_CloseEditTitle();\r\n\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t})\r\n\t\t\t\t\t.fail(function () {\r\n\t\t\t\t\t\talert('<?php esc_attr_e( 'Oops! There was an error saving the form title. Please refresh the page and try again.', 'gravityforms' ); ?>');\r\n\t\t\t\t\t\tGF_CloseEditTitle();\r\n\t\t\t\t\t});\r\n\r\n\t\t\t}\r\n\r\n\t\t\tfunction GF_IsOutsideTitleWindow(element) {\r\n\t\t\t\tvar parents = jQuery(element).parents('#edit-title-container');\r\n\t\t\t\treturn parents.length == 0;\r\n\t\t\t}\r\n\r\n\t\t\tjQuery(document).mousedown(function (event) {\r\n\t\t\t\tif (GF_IsOutsideTitleWindow(event.target)) {\r\n\t\t\t\t\tGF_CloseEditTitle();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tjQuery(document).ready(function () {\r\n\t\t\t\tjQuery('#edit-title-input').keypress(function (event) {\r\n\t\t\t\t\tif (event.keyCode == 13) {\r\n\t\t\t\t\t\tGF_SaveTitle();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t</script>\r\n\r\n\t\t<?php\r\n\t}", "title": "" }, { "docid": "05d18235bc299f80a2dd8b947f4941c9", "score": "0.5018287", "text": "function display($tpl = null) \n {\n /* $wysiwyg = JFactory::getEditor();\n $onSave = '';\n \n if (JString::strlen($company->fulltext) > 1)\n {\n $textValue = $company->introtext.\"<hr id=\\\"system-readmore\\\" />\".$company->fulltext;\n }\n else\n {\n $textValue = $company->introtext;\n }\n $text = $wysiwyg->display('text', $textValue, '300px', '200px', '', '');\n $this->assignRef('text', $text);*/\n parent::display($tpl);\n }", "title": "" }, { "docid": "bd8ed8926894f01cf333bc4d0f9b639e", "score": "0.5000726", "text": "abstract public function getCaption();", "title": "" }, { "docid": "e81116daa7bc1244f2c6c1d0636decf6", "score": "0.4998238", "text": "public function generate()\n {\n $this->loadLanguageFile('tl_survey_question');\n $template = new FrontendTemplate('survey_question_multiplechoice');\n $template->ctrl_name = StringUtil::specialchars($this->strName);\n $template->ctrl_id = StringUtil::specialchars($this->strId);\n $template->ctrl_class = (strlen($this->strClass) ? ' ' . $this->strClass : '');\n $template->singleResponse = strcmp($this->questiontype, \"mc_singleresponse\") == 0;\n $template->multipleResponse = strcmp($this->questiontype, \"mc_multipleresponse\") == 0;\n $template->dichotomous = strcmp($this->questiontype, \"mc_dichotomous\") == 0;\n $template->styleHorizontal = strcmp($this->strStyle, \"horizontal\") == 0;\n $template->styleVertical = strcmp($this->strStyle, \"vertical\") == 0;\n $template->styleSelect = strcmp($this->strStyle, \"select\") == 0;\n $template->values = $this->varValue;\n $template->choices = $this->arrChoices;\n $template->blnOther = $this->blnOther;\n $template->lngYes = $GLOBALS['TL_LANG']['tl_survey_question']['yes'];\n $template->lngNo = $GLOBALS['TL_LANG']['tl_survey_question']['no'];\n $template->otherTitle = StringUtil::specialchars($this->strOtherTitle);\n $template->title = $this->title;\n $strOptions = $template->parse();\n $strError = $this->getErrorAsHTML();\n\n return sprintf('<fieldset id=\"ctrl_%s\" class=\"radio_container%s\">%s<input type=\"hidden\" name=\"%s\" value=\"\"%s%s</fieldset>', $this->strId, (($this->strClass != '') ? ' ' . $this->strClass : ''), $strError, $this->strName, $this->strTagEnding, $strOptions);\n }", "title": "" }, { "docid": "09ecdb6dde05f9ccc81bbc1d50916b11", "score": "0.49869758", "text": "public function sc_word_description() {\n//\t\tglobal $description, $tp;\n//\t\treturn $tp->toHTML($description, TRUE);\n\t\tglobal $description;\n\t\treturn $this->tp->toHTML($description, TRUE);\n\t}", "title": "" }, { "docid": "89b1b08ae9087f326c7b7e424e7ef9bb", "score": "0.4983928", "text": "function title_content() {\n\t\tif(array_key_exists('title', $_SESSION)) {\n\t\t\tif($_SESSION['title'] != null) {\n\t\t\t\treturn \"<input type=\\\"text\\\" name=\\\"title\\\" value=\\\"\".htmlentities($_SESSION['title']).\"\\\"/>\";\n\t\t\t}\n\t\t}\n\t\treturn \"<input type=\\\"text\\\" name=\\\"title\\\" placeholder=\\\"Bingo Fun!\\\" />\";\n\t}", "title": "" }, { "docid": "309ecba37e1e92efe0480b6691e5edf4", "score": "0.4978967", "text": "function hestia_subscribe_subtitle_callback() {\n\treturn get_theme_mod( 'hestia_subscribe_subtitle' );\n}", "title": "" }, { "docid": "3f5274728448f558bbc71c7ba4956936", "score": "0.49722248", "text": "function createBioBlastContent()\n\t{\n\t\t$html = \"\n\t\t\t\t\t<p id='contentText'>Run Blast.</p>\n\t\t\t\t\"\n\t\t\t\t;\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "057f5f5e9b22248138e0e6cc48376ce6", "score": "0.4967337", "text": "public static function getTempFormContent($tempFileName) {\n return S3Subtitle::getAsset(self::getTempPath($tempFileName));\n }", "title": "" }, { "docid": "c35aa86fec9e1be11bee3a34b1a6e5f1", "score": "0.49586815", "text": "public function hasSubtitle()\n\t{\n\t\t// Get all job options\n\t\t$jobOptionsList = $this->getJobsOptions();\n\n\t\t/**\n\t\t * @type GGLJobOptions $jobOptions\n\t\t */\n\t\tforeach ($jobOptionsList as $jobOptions) {\n\n\t\t\tif (!count($jobOptions->filePaths))\n\t\t\t\tcontinue;\n\n\t\t\treturn $jobOptions;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "ffd8705d68d088af61c03d615154fd4d", "score": "0.49581948", "text": "function carolina_spa_agrega_subtitulo_producto() {\n global $post;\n $subtitulo = get_field( 'subtitulo', $post -> ID );\n echo \"<p class=\\\"sub-titulo\\\">{$subtitulo}</p>\";\n }", "title": "" }, { "docid": "7e914c214def98e29f6ac96005fda99e", "score": "0.49397442", "text": "public static function retornaTextoFormatadoSubTitulo($texto, $formato = OUTPUT_HTML)\n {\n \t// verificando o formato passado\n \tswitch ($formato) {\n \t\tcase OUTPUT_HTML:\n \t\t\t// retornando o texto formatado em html\n \t\t\treturn self::retornaTextoHtmlSubTituloView($texto);\n \t\tbreak;\n \t\t\n \t\tdefault:\n \t\t\t// retornando o texto sem alteracoes\n \t\t\treturn $texto;\n \t\tbreak;\n \t}\n }", "title": "" }, { "docid": "5edba58932ede0789fa8dc5aea0a593a", "score": "0.49348316", "text": "function form($instance){\n //Defaults\n $instance = wp_parse_args( (array) $instance, array('title'=>'', 'lineOne'=>'Hello', 'lineTwo'=>'World') );\n\n $title = htmlspecialchars($instance['title']);\n }", "title": "" }, { "docid": "938df8c0f8046dfead07d7252e724c8a", "score": "0.49248514", "text": "function form($instance) {\n\n $title = esc_attr($instance['title']);\n ?>\n <p><label for=\"<?php echo $this->get_field_id('title'); ?>\"><?php _e('Title:'); ?> <input class=\"widefat\" id=\"<?php echo $this->get_field_id('title'); ?>\" name=\"<?php echo $this->get_field_name('title'); ?>\" type=\"text\" value=\"<?php echo $title; ?>\" /></label></p>\n <?php \n\n }", "title": "" }, { "docid": "061c1105446a73ef7a1b88725681d3b6", "score": "0.4924634", "text": "function show_title_and_summary( $form=array(), $extras=array(), $lang=array() ) {\r\n\t\t\r\n\t\t$return_string = '';\r\n\t\t\r\n\t\t// only if FORM array exists...\r\n\t\tif ( !empty($form) ) {\r\n\t\t\t\r\n\t\t\t// title of form \r\n\t\t\tif ( isset($extras['language_title']) ) {\r\n\t\t\t\t$return_string .= '\r\n\t\t\t\t\t<h3>'.$extras['language_title'].'</h3>\r\n\t\t\t\t';\r\n\t\t\t} else if ( $form['Form']['language_title'] ) {\r\n\t\t\t\t$return_string .= '\r\n\t\t\t\t\t<h3>'. $this->Translations->t( $form['Form']['language_title'], $lang ).'</h3>\r\n\t\t\t\t';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// description of form \r\n\t\t\tif ( isset($extras['language_help']) ) {\r\n\t\t\t\t$return_string .= '\r\n\t\t\t\t\t<p class=\"form description\">\r\n\t\t\t\t\t\t'.$extras['language_help'].'\r\n\t\t\t\t\t</p>\r\n\t\t\t\t';\r\n\t\t\t} else if ( $form['Form']['language_help'] ) {\r\n\t\t\t\t$return_string .= '\r\n\t\t\t\t\t<p class=\"form description\">\r\n\t\t\t\t\t\t'. $this->Translations->t( $form['Form']['language_help'], $lang ).'\r\n\t\t\t\t\t</p>\r\n\t\t\t\t';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// wrap summary in STYLABLE div \r\n\t\tif ( $return_string ) {\r\n\t\t\t$return_string = '\r\n\t\t\t\t<div class=\"form summary\">\r\n\t\t\t\t\t'.$return_string.'\r\n\t\t\t\t</div>\r\n\t\t\t';\r\n\t\t}\r\n\t\t\r\n\t\t// return\r\n\t\treturn $return_string;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "c4c78281c082ecf9260fd68c56e30221", "score": "0.49232048", "text": "public function lesson1() {\n\t\t$config = include( trailingslashit( __DIR__ ) . 'lib/config/meta.php' );\n\n\t\t$meta = new Meta( $config, 1 );\n\n\t\tvar_dump( $meta );\n\n\t\tvar_dump( $meta->get( '_subtitle' ) );\n\t}", "title": "" }, { "docid": "787710bc3839a73e0004166e08f172a5", "score": "0.49167788", "text": "function manualShowForm( $alias, $help, $link, $seq ) {\n\tglobal $Global, $DB, $pdf;\n\n\t$pdf->AddPage();\n\t$pdf->SetLeftMargin(10);\n\t$pdf->SetFont('Times','UB',14);\n\t$pdf->Cell(0,10,'Formulario '.$alias, 0,1,'',1 );\n\t$pdf->SetFont('Times','',10);\n\t$pdf->Cell(80);\n\t$pdf->Cell(15,5,\"Menu:\", 0,0);\n\t$pdf->SetFont('Times','I',10);\n\t$pdf->Cell(0,5,\"($seq)\", 0,1);\n\t$pdf->SetLeftMargin(20);\n\t$pdf->SetFont('Times','B',14);\n\t$pdf->Cell(0,10,$help, 0,1 );\n\t$pdf->SetFont('Times','',12);\n\t$pdf->SetLeftMargin(10);\n\n\t// Load a Form Object\n\t$Obj = new Y_Engine();\n\t$file = \"project/\" . $Global['project'] . \"/\".$link.'.php';\n\tif( !file_exists( $file )){\n\t\t$file = \"engine/\".$Global['lang'].\"/\".$link.'.php';\n\t}\n\tif( file_exists( $file )){\n\t\tinclude ( $file );\n\t}\n\telse{\n\t\treturn;\n\t}\n\t$pdf->SetLeftMargin(20);\n\t$pdf->Cell(0,1,'',0,1);\t\n/*\n\t$pdf->SetFont('Times','B',12);\n\t$pdf->Cell(25,10,'Formulario', 0,0 );\n\t$pdf->SetFont('Times','',12);\n\t$pdf->Cell(0,10,$Obj->alias . ' ('.$Obj->doc . ')', 0,1 );\n*/\n\t$pdf->SetFont('Times','',12);\n\t$pdf->Write(5,'Tabla: ');\n\t$pdf->SetFont('Times','B',12);\n\t$pdf->Write(5,$Obj->File );\n//\t$pdf->ln(5);\n\t$pdf->SetFont('Times','I',12);\n\t$pdf->Write(5,' - '.$Obj->help);\n\t$pdf->ln(10);\n\t\n\t// NoEdit\n\tif( $Obj->NoEdit != '' ){\n\t\t$pdf->Cell(0,10,'Ese formulario está bloqueado (no permite inserciones de datos).', 0,1 );\n\t}\n\t\n\t\n\t// Field List\n\t$pdf->SetFont('Times','B',12);\n\t$pdf->Cell(25,5,'Campos:', 0,0 );\n\t$pdf->SetFont('Times','I',10);\n\t$pdf->Cell(25,5,'(campos obligatorios marcados con asterisco \"*\" y nombre real '.\n\t\t\t\t\t'entre parentesis)', 0,1 );\n\t$key = array_keys( $Obj->element );\n\tfor( $i=0; $i< count( $key ); $i++ ) {\n\t\t$var = array();\t\t\n\t\t$element = $key[$i];\n\t\t$var['count'] = $i;\n\t\t$tag = array_keys( $Obj->element[$element] );\n\t\tfor ( $cnt=0; $cnt< count($tag); $cnt++ ){\n\t\t\t$var[$tag[$cnt]] = $Obj->Get( $element, $tag[$cnt] );\n\t\t}\n\t\tif( !trustee( $var['G_SHOW_'] ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\t$pdf->SetFont('Times','B',12);\n\t\tif( $var['F_REQUIRED_'] != '' ){\n\t\t\t$required = '*';\n\t\t}\n\t\telse{\n\t\t\t$required = '';\n\t\t}\n\t\t$pdf->Cell(10,5, $required,0,0,'R');\n\t\t$pdf->Cell(40,5,$var['F_ALIAS_'], 0,0 );\n\t\t$pdf->Cell(30,5,\"(\".$var['F_NAME_'].\")\", 0,0 );\n\t\t$pdf->SetFont('Times','',12);\n\t\t$pdf->Cell(40,5,$var['F_HELP_'], 0,1 );\n//\t\t$varMotor['F_VALUE_'] = \n//\t\t\t\t\t$this->Get( $object, $varMotor['F_NAME_'] );\n\t}\t\n\t$pdf->ln(5);\n//\t$pdf->SetFont('Times','',12);\n//\t$pdf->Write(5,'Tabla en la Base de Datos: ');\n\t$pdf->SetFont('Times','B',12);\n//\t$pdf->Write(5,$Obj->File );\n//\t$pdf->ln(5);\n\t$pdf->Cell(25,10,'Descripción detallada de los Campos:', 0,1 );\n\t$key = array_keys( $Obj->element );\n\tfor( $i=0; $i< count( $key ); $i++ ) {\n\t\t$var = array();\t\t\n\t\t$element = $key[$i];\n\t\t$var['count'] = $i;\n\t\t$tag = array_keys( $Obj->element[$element] );\n\t\tfor ( $cnt=0; $cnt< count($tag); $cnt++ ){\n\t\t\t$var[$tag[$cnt]] = $Obj->Get( $element, $tag[$cnt] );\n\t\t}\n\t\tif( ( !trustee( $var['G_SHOW_'] ) ) \t||\n\t\t\t( $var['C_SHOW_'] == '1==0' )\t\t){\n\t\t\tcontinue;\n\t\t}\n\t\t$pdf->SetFont('Times','B',12);\n\t\t$pdf->Cell(5);\t\t\n\t\t$pdf->Cell(40,5,$var['F_ALIAS_'], 0,0,'',1);\n\t\t$pdf->SetFont('Times','I',12);\n\t\t$pdf->Cell(0,5,'('.$var['F_HELP_'].')', 0,1,'',1 );\n\t\t$pdf->Cell(10);\t\t\n\t\t$pdf->SetFont('Times','B',12);\n\t\t$pdf->Cell(40,5,'('.$var['F_NAME_'].')', 0,1 );\n\t\t$pdf->SetFont('Times','',12);\n\t\t$pdf->Cell(10);\t\t\n\t\t$pdf->SetFont('Times','',12);\n\t\t$pdf->Cell(40,5,'Tipo', 0,0 );\n\t\tif(\t( $var['F_REQUIRED_'] != '' )\t&&\n\t\t\t( $var['F_AUTONUM_'] == \"\" )\t){\n\t\t\t$required = ' - Requerido';\n\t\t}\n\t\telse{\n\t\t\t$required = '';\n\t\t}\n\t\tif( $var['F_TYPE_']=='text'){\n\t\t\t$pdf->Cell(0,5,'text ' . $required, 0,1 );\n\t\t\tif( $var['F_LENGTH_'] != \"\" ){\n\t\t\t\t$pdf->Cell(50);\t\t\n\t\t\t\t$pdf->Cell(0,5,'Tamaño máximo de '.$var['F_LENGTH_'].' caracteres', 0,1 );\n\t\t\t}\n\t\t\tif( $var['F_DEC_'] != \"\" ){\n\t\t\t\t$pdf->Cell(50);\t\t\n\t\t\t\t$pdf->Cell(0,5,'Número de decimales: '.$var['F_DEC_'], 0,1 );\n\t\t\t\t$pdf->Cell(50);\t\t\n\t\t\t\t$pdf->Cell(0,5,'Solo acepta números', 0,1 );\n\t\t\t}\n\t\t\tif( $var['F_QUERY_'] != \"\" ){\n\t\t\t\t$pdf->Cell(50);\t\t\n\t\t\t\t$pdf->Cell(0,5,'Utiliza la Query:', 0,1 );\n\t\t\t\t$pdf->SetLeftMargin(70);\n\t\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t\t$pdf->Cell(5);\t\t\n\t\t\t\t$pdf->Write(5, $var['F_QUERY_']);\n\t\t\t\t$pdf->ln(5);\n\t\t\t\t$pdf->SetFont('Times','',12);\n\t\t\t\t$pdf->SetLeftMargin(70);\n\t\t\t\t$pdf->Write(5, 'Dependiente de la condición:');\n\t\t\t\t$pdf->ln(5);\n\t\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t\t$pdf->Cell(5);\t\t\n\t\t\t\t$pdf->Write(5, $var['F_QUERY_REF_']);\n\t\t\t\t$pdf->SetLeftMargin(20);\n\t\t\t\t$pdf->ln(5);\n\t\t\t}\n\t\t\tif( $var['F_AUTONUM_'] != \"\" ){\n\t\t\t\t$pdf->Cell(50);\t\t\n\t\t\t\t$pdf->Cell(0,5,'Autonumerico', 0,1 );\n\t\t\t}\n\t\t}\n\t\tif( $var['F_TYPE_']=='date'){\n\t\t\t$pdf->Cell(0,5,'date ' . $required, 0,1 );\n\t\t\t$pdf->Cell(40);\t\t\n\t\t\t$pdf->Cell(0,5,'Solo acepta números y el símbolo de guión (-)', 0,1 );\n\t\t\t$pdf->Cell(40);\t\t\n\t\t\t$pdf->Cell(0,5,'Las fechas deben tener el formato dd-mm-aaaa', 0,1 );\n\t\t}\n\t\tif( $var['F_TYPE_']=='select_list' ){\n\t\t\t$pdf->Cell(0,5,'select_list ' . $required, 0,1 );\n\t\t\t$pdf->Cell(50);\t\t\n\t\t\t$pdf->Cell(0,5,'Permite seleccionar:', 0,1 );\n \tif( $var['F_OPTIONS_'] != '' ){\n\t\t\t\t$options = explode( ',', $var['F_OPTIONS_'] );\n\t\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t\tfor( $n=0; $n<count($options); $n++ ){\n\t\t\t\t\tif( $options[$n] ==\"\" ){\n\t\t\t\t\t\tif( $required=='' ){\n\t\t\t\t\t\t\t$pdf->Cell(55);\t\t\n\t\t\t\t\t\t\t$pdf->Cell(0,5,'[Ningún contenido]',0,1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$pdf->Cell(55);\t\t\n\t\t\t\t\t\t$pdf->Cell(0,5,$options[$n],0,1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$pdf->SetFont('Times','',12);\n\t \tif( $var['F_RELTABLE_'] != '' ){\n\t\t\t\t\t$pdf->Cell(50);\t\t\n\t\t\t\t\t$pdf->Cell(0,5,'Además de permitir elegir: ',0,1 );\n\t\t\t\t}\t\t\n\t\t\t}\t\t\n \tif( $var['F_RELTABLE_'] != '' ){\n\t\t\t\t$pdf->Cell(55);\t\t\n\t\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t\t$pdf->Cell(0,5,'[Uno de los datos ya registrados de la tabla '.\n\t\t\t\t$var['F_RELTABLE_'].']', 0,1 );\n\t\t\t\t$pdf->SetFont('Times','',12);\n\t\t\t}\t\t\n \tif( $var['F_SHOWFIELD_'] != '' ){\n\t\t\t\t$pdf->Cell(50);\t\t\n\t\t\t\t$pdf->SetFont('Times','',12);\n\t\t\t\t$pdf->Cell(0,5,'Muestra campo: '.\n\t\t\t\t$var['F_SHOWFIELD_'], 0,1 );\n\t\t\t\t$pdf->SetFont('Times','',12);\n\t\t\t}\t\t\n\t\t}\n\t\tif( $var['F_TYPE_']=='dynamic_select_list'){\n\t\t\t$pdf->Cell(0,5,'dynamic_select_list ' . $required, 0,1 );\n\t\t\t$pdf->Cell(50);\t\t\n\t\t\t$pdf->Cell(0,5,'Permite seleccionar:', 0,1 );\n \tif( $var['F_OPTIONS_'] != '' ){\n\t\t\t\t$options = explode( ',', $var['F_OPTIONS_'] );\n\t\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t\tfor( $n=0; $n<count($options); $n++ ){\n\t\t\t\t\tif( $options[$n] ==\"\" ){\n\t\t\t\t\t\tif( $required=='' ){\n\t\t\t\t\t\t\t$pdf->Cell(55);\t\t\n\t\t\t\t\t\t\t$pdf->Cell(0,5,'[Ningún contenido]',0,1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$pdf->Cell(55);\t\t\n\t\t\t\t\t\t$pdf->Cell(0,5,$options[$n],0,1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$pdf->SetFont('Times','',12);\n\t \tif( $var['F_RELTABLE_'] != '' ){\n\t\t\t\t\t$pdf->Cell(50);\t\t\n\t\t\t\t\t$pdf->Cell(0,5,'Además de permitir elegir: ',0,1 );\n\t\t\t\t}\t\t\n\t\t\t}\t\t\n \tif( $var['F_RELTABLE_'] != '' ){\n\t\t\t\t$pdf->Cell(55);\t\t\n\t\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t\t$pdf->Cell(0,5,'[Uno de los datos ya registrados de la tabla '.\n\t\t\t\t$var['F_RELTABLE_'].']', 0,1 );\n\t\t\t\t$pdf->SetFont('Times','',12);\n\t\t\t}\t\t\n \tif( $var['F_SHOWFIELD_'] != '' ){\n\t\t\t\t$pdf->Cell(50);\t\t\n\t\t\t\t$pdf->SetFont('Times','',12);\n\t\t\t\t$pdf->Cell(0,5,'Muestra campo: '.\n\t\t\t\t$var['F_SHOWFIELD_'], 0,1 );\n\t\t\t\t$pdf->SetFont('Times','',12);\n\t\t\t}\t\t\n\t\t\t$pdf->Cell(50);\t\t\n\t\t\t$pdf->Cell(15,5,'Filtro:', 0,0 );\n\t\t\t$pdf->Cell(15,5,$var['F_FILTER_'], 0,1 );\n\t\t}\n\t\t\n\t\tif( $var['F_TYPE_']=='subform'){\n\t\t\t$pdf->Cell(0,5,'subform ', 0,1 );\n\t\t\t$pdf->Cell(50);\t\t\n\t\t\t$pdf->Cell(0,5,'Llama al subformulario:', 0,1 );\n\t\t\t$pdf->SetLeftMargin(75);\n\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t$pdf->Write(5, $var['F_LINK_']);\n\t\t\t$pdf->SetLeftMargin(10);\n\t\t\t$pdf->ln(5);\n\t\t\t$pdf->Cell(60);\t\t\n\t\t\t$pdf->SetFont('Times','',12);\n\t\t\t$pdf->Cell(0,5,'Con la condición:', 0,1 );\n\t\t\t$pdf->SetLeftMargin(75);\n\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t$pdf->Write(5, $var['F_OPTIONS_']);\n\t\t\t$pdf->SetLeftMargin(10);\n\t\t\t$pdf->ln(5);\n\t\t\t$pdf->Cell(60);\t\t\n\t\t\t$pdf->SetFont('Times','',12);\n\t\t\t$pdf->Cell(0,5,'Enviando:', 0,1 );\n\t\t\t$pdf->SetLeftMargin(75);\n\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t$pdf->Write(5, $var['F_SEND_']);\n\t\t\t$pdf->SetLeftMargin(20);\n\t\t\t$pdf->ln(5);\n\t\t}\n\t\tif( $var['F_TYPE_']=='report'){\n\t\t\t$pdf->Cell(0,5,'Botón de Reporte ', 0,1 );\n\t\t\t$pdf->Cell(50);\t\t\n\t\t\t$pdf->Cell(0,5,'Llama al Reporte:', 0,1 );\n\t\t\t$pdf->SetLeftMargin(75);\n\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t$pdf->Write(5, $var['F_REPORT_']);\n\t\t\t$pdf->SetLeftMargin(20);\n\t\t\t$pdf->ln(5);\n\t\t}\n\t\tif( $var['F_TYPE_']=='proc'){\n\t\t\t$pdf->Cell(0,5,'Botón de procedimiento ', 0,1 );\n\t\t\t$pdf->Cell(50);\t\t\n\t\t\t$pdf->Cell(0,5,'Llama al Procedimiento:', 0,1 );\n\t\t\t$pdf->SetLeftMargin(75);\n\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t$pdf->Write(5, $var['F_QUERY_']);\n\t\t\t$pdf->SetLeftMargin(20);\n\t\t\t$pdf->ln(5);\n\t\t}\n\t\tif( $var['F_TYPE_']=='formula'){\n\t\t\t$pdf->Cell(0,5,'Fórmula ', 0,1 );\n\t\t\t$pdf->Cell(50);\t\t\n\t\t\t$pdf->Cell(0,5,'Resultado de la fórmula:', 0,1 );\n\t\t\t$pdf->SetLeftMargin(75);\n\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t$pdf->Write(5, $var['F_FORMULA_']);\n\t\t\t$pdf->SetLeftMargin(20);\n\t\t\t$pdf->ln(5);\n\t\t}\n\t\tif( $var['F_UNIQ_']!=''){\n\t\t\t$pdf->Cell(50);\t\t\n\t\t\t$pdf->Cell(0,5,'Campo único - No permite existencia duplicada '.\n\t\t\t'en la Base de Datos', 0,1 );\n\t\t}\n\t\tif( $var['F_NODB_']!=''){\n\t\t\t$pdf->Cell(50);\t\t\n\t\t\t$pdf->SetFont('Times','',12);\n\t\t\t$pdf->Cell(0,5,'Campo NODB - Ignorado por la Base de Datos', 0,1 );\n\t\t}\n\t\t\n//\t\tif( !check_trustee( $var['G_CHANGE_'] ) ) {\n//\t\t\t$pdf->Cell(10);\t\t\n//\t\t\t$pdf->Cell(20,5,'Restricción: El usuario '.$Global['username'].' no tiene permiso para '.\n//\t\t\t'alterar el contenido de ese campo', 0,1 );\n//\t\t}\n\t\tif( ( $var['C_VIEW_'] !=\"\" ) \t|| \n\t\t\t( $var['C_SHOW_'] !=\"\" )\t|| \n\t\t\t( $var['C_CHANGE_'] !=\"\" )\t|| \n\t\t\t( $var['C_DEL_'] !=\"\" )\t){\n\t\t\t$pdf->Cell(10);\t\t\n\t\t\t$pdf->SetFont('Times','',12);\n\t\t\t$pdf->Cell(20,5,'Condiciones', 0,1 );\n\t\t\t\n\t\t\tif( $var['C_SHOW_'] !=\"\" ){\n\t\t\t\t$pdf->SetFont('Times','',12);\n\t\t\t\t$pdf->Cell(15);\t\t\n\t\t\t\t$pdf->Cell(45,5,'Existencia', 0,0 );\n\t\t\t\t$pdf->SetFont('Times','',12);\n\t//\t\t\t$pdf->SetLeftMargin(50);\n\t\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t\t$pdf->Write(5, $var['C_SHOW_']);\n\t//\t\t\t$pdf->SetLeftMargin(10);\n\t\t\t\t$pdf->ln(5);\n\t\t\t}\n\t\t\tif( $var['C_VIEW_'] !=\"\" ){\n\t\t\t\t$pdf->SetFont('Times','',12);\n\t\t\t\t$pdf->Cell(15);\t\t\n\t\t\t\t$pdf->Cell(45,5,'Visibilidad', 0,0 );\n\t\t\t\t$pdf->SetFont('Times','',12);\n\t//\t\t\t$pdf->SetLeftMargin(50);\n\t\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t\t$pdf->Write(5, $var['C_VIEW_']);\n\t//\t//\t\t$pdf->SetLeftMargin(10);\n\t\t\t\t$pdf->ln(5);\n\t\t\t}\n\t\t\tif( $var['C_CHANGE_'] !=\"\" ){\n\t\t\t\t$pdf->SetFont('Times','',12);\n\t\t\t\t$pdf->Cell(15);\t\t\n\t\t\t\t$pdf->Cell(45,5,'Cambios', 0,0 );\n\t\t\t\t$pdf->SetFont('Times','',12);\n//\t\t\t\t$pdf->SetLeftMargin(50);\n\t\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t\t$pdf->Write(5, $var['C_CHANGE_']);\n//\t\t\t\t$pdf->SetLeftMargin(10);\n\t\t\t\t$pdf->ln(5);\n\t\t\t}\n\t\t\tif( $var['C_DEL_'] !=\"\" ){\n\t\t\t\t$pdf->SetFont('Times','',12);\n\t\t\t\t$pdf->Cell(15);\t\t\n\t\t\t\t$pdf->Cell(45,5,'Existencia', 0,0 );\n\t\t\t\t$pdf->SetFont('Times','',12);\n//\t\t\t\t$pdf->SetLeftMargin(50);\n\t\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t\t$pdf->Write(5, $var['C_DEL_']);\n//\t\t\t\t$pdf->SetLeftMargin(10);\n\t\t\t\t$pdf->ln(5);\n\t\t\t}\n\n\t\t\t$pdf->SetFont('Times','',12);\n\n\t\t}\n\t\t$pdf->Cell(10);\t\t\n\t\t$pdf->SetFont('Times','',12);\n\t\t$pdf->Cell(20,5,'Trustees', 0,1 );\n\t\t\n\t\t$pdf->SetFont('Times','',12);\n\t\t$pdf->Cell(15);\t\t\n\t\t$pdf->Cell(35,5,'Visualización', 0,0 );\n\t\t$pdf->SetFont('Times','B',12);\n\t\t$pdf->Cell(0,5, printTrusteeField($var['G_SHOW_']),0,1);\n\t\t\n\t\t$pdf->SetFont('Times','',12);\n\t\t$pdf->Cell(15);\t\t\n\t\t$pdf->Cell(35,5,'Cambios', 0,0 );\n\t\t$pdf->SetFont('Times','B',12);\n\t\t$pdf->Cell(0,5, printTrusteeField($var['G_CHANGE_']),0,1);\n\t\t\t\n\t\t$pdf->ln(5);\n\n\t}\t\n\t$pdf->ln(5);\n\t\n\t\n\t\n\t\n}", "title": "" }, { "docid": "a49fa52845a5f025154d6a5eec5cc940", "score": "0.49144095", "text": "public function postMediaSubtitles($parameters = [])\n\t{\n\t\treturn $this->post('media/subtitles/create', $parameters, true);\n\t}", "title": "" }, { "docid": "b4bdc641295bdff19a2152f1351cc91a", "score": "0.49095514", "text": "private function getFormText($source_id,$item_id, $title, $text, $date=false, $edit=false,$tags=false, $lat=false, $lon=false) {\n\t\t$form = $this->getFormCommon($source_id, $item_id, 'blog', $date, $edit,$tags,$lat,$lon);\n\n\t\t// Create and configure title element:\n\t\t$element = $form->createElement('text', 'title', array('label' => 'Title:', 'decorators' => array('ViewHelper', 'Errors')));\n\t\t$element->addValidator('stringLength', false, array(0, 256));\n\t\t$element->setValue($title);\n\t\t$element->setRequired(true);\n\t\t$form->addElement($element);\n\n\t\t// Create and configure comment element:\n\t\t$element = $form->createElement('textarea', 'text', array('label' => 'Content:', 'rows'=> 15, 'cols' => 60, 'class' => 'mceEditor', 'decorators' => array('ViewHelper', 'Errors')));\n\t\t$element->setRequired(false);\n\t\t$element->setValue($text);\n\t\t$form->addElement($element);\n\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "f0e3192cf4eaffc163e4ce554e7fc8e4", "score": "0.49077818", "text": "function RenderSubmissionBox($pretitle, $precontent, $prelink)\n\t{\n\t\t$pagecontent = '<form class=\"SSky_Form\" action=\"./createsubmission.php?gameid=' . $GLOBALS['gameid'] . '&submit=1\" method=\"post\">';\t\n\t\t$pagecontent .= '<b> Submission Title (Max 64 chars): </b><input type=\"text\" maxlength=\"64\" name=\"subtitle\" value=\"' . $pretitle . '\"><br>';\n\t\t$pagecontent .= '<b> Submission Description (Max 5000 chars): </b><br><textarea rows=\"16\" maxlength=\"5000\" id=\"desc\" name=\"content\">' . $precontent . '</textarea><br>';\n\t\t$pagecontent .= '<b> Magnet Link/IPFS Hash (Max 5000/46 chars): </b><input type=\"text\" maxlength=\"5000\" name=\"sublink\" value=\"' . $prelink . '\"><br>';\n\t\t$pagecontent .= '<span title=\"Warning: You won&rsquo;t be able to edit/remove your submission under this setting!\"><input type=\"checkbox\" name=\"subanon\"><label for=\"subanon\"><b>Post Anonymously?</b></label></span>';\n\t\t$pagecontent .= '<input type=\"submit\" value=\"Post Submission\">';\n\t\t$pagecontent .= '</form>';\n\t\treturn $pagecontent;\n\t}", "title": "" }, { "docid": "a0577952217405ad362fdc814aac8606", "score": "0.49060544", "text": "function hestia_portfolio_subtitle_callback() {\n\treturn get_theme_mod( 'hestia_portfolio_subtitle' );\n}", "title": "" }, { "docid": "855ddbd786e312d0b35b4d57bb740764", "score": "0.48997182", "text": "public function displayForm()\n\t{\n\t\t/*\n\t\t * Check if an ID was passed\n\t\t */\n\t\tif(isset($_POST['event_id']))\n\t\t{\n\t\t\t$id=(int)$_POST['event_id'];\n\t\t\t// Force integer type to sanitize data\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$id=NULL;\n\t\t}\n\n\t\t/*\n\t\t * Instantiate the headline/submit button text\n\t\t */\n\t\t$submit = \"Create a New Event\";\n\n\t\t/*\n\t\t * If no ID is passed, start with an empty event object\n\t\t */\n\t\t$event = new Event();\n\n\t\t/*\n\t\t * Otherwise load the associated event\n\t\t */\n\t\tif(!empty($id))\n\t\t{\n\t\t\t$event = $this->_loadEventById($id);\n\n\t\t\t/*\n\t\t\t * If no object is returned, return NULL\n\t\t\t */\n\t\t\tif(!is_object($event))\n\t\t\t{\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t\t$submit = \"Edit This Event\";\n\t\t}\n\n\t\t/*\n\t\t * Build the markup\n\t\t */\n\t\treturn <<<FORM_MARKUP\n\n\t\t<form action=\"assets/inc/process.inc.php\" method=\"post\">\n\t\t\t<fieldset>\n\t\t\t\t<legend>$submit</legend>\n\t\t\t\t<label for=\"event_title\">Event Title</label>\n\t\t\t\t<input type=\"text\" name=\"event_title\" id=\"event_title\" value=\"$event->title\">\n\n\t\t\t\t<label for=\"event_start\">Start Time</label>\n\t\t\t\t<input type=\"text\" name=\"event_start\" id=\"event_start\" value=\"$event->start\">\n\n\t\t\t\t<label for=\"event_end\">End Time</label>\n\t\t\t\t<input type=\"text\" name=\"event_end\" id=\"event_end\" value=\"$event->end\">\n\n\t\t\t\t<label for=\"event_description\">Event Description</label>\n\t\t\t\t<textarea name=\"event_description\" id=\"event_description\">$event->description</textarea>\n\n\t\t\t\t<input type=\"hidden\" name=\"event_id\" value=\"$event->id\">\n\t\t\t\t<input type=\"hidden\" name=\"token\" value=\"$_SESSION[token]\">\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"event_edit\">\n\n\t\t\t\t<input type=\"submit\" name=\"event_submit\" value=\"$submit\">\n\t\t\t\tor <a href=\"./\">cancel</a>\n\t\t\t</fieldset>\n\t\t</form>\nFORM_MARKUP;\n\t}", "title": "" }, { "docid": "d544aaa18adf3afd837d98ec7749251e", "score": "0.48988324", "text": "function manualShowForm( $alias, $help, $link, $seq ) {\n\tglobal $Global, $DB, $pdf;\n\n\t$pdf->AddPage();\n\t$pdf->SetLeftMargin(10);\n\t$pdf->SetFont('Times','UB',14);\n\t$pdf->Cell(70,10,'Formulario '.$alias, 0,1 );\n\t$pdf->SetFont('Times','',10);\n\t$pdf->Cell(60);\n\t$pdf->Cell(25,10,\"Acceder por\", 0,0 );\n\t$pdf->SetFont('Times','I',10);\n\t$pdf->Cell(0,10,\"($seq)\", 0,1 );\n\t$pdf->SetLeftMargin(20);\n\t$pdf->SetFont('Times','B',14);\n\t$pdf->Cell(0,10,$help, 0,1 );\n\t$pdf->SetFont('Times','',12);\n\t$pdf->SetLeftMargin(10);\n\n\t// Load a Form Object\n\t$Obj = new Y_Engine();\n\t$file = \"project/\" . $Global['project'] . \"/\".$link.'.php';\n\tif( !file_exists( $file )){\n\t\t$file = \"engine/\".$Global['lang'].\"/\".$link.'.php';\n\t}\n\tif( file_exists( $file )){\n\t\tinclude ( $file );\n\t}\n\telse{\n//\t\t$pdf->SetFont('Times','B',18);\n//\t\t$pdf->Cell(70,10,'Caso especial ('.$file.')', 0,1 );\n\t\treturn;\n\t}\n\t$pdf->SetLeftMargin(20);\n\t$pdf->Cell(0,1,'',0,1);\t\n/*\n\t$pdf->SetFont('Times','B',12);\n\t$pdf->Cell(25,10,'Formulario', 0,0 );\n\t$pdf->SetFont('Times','',12);\n\t$pdf->Cell(0,10,$Obj->alias . ' ('.$Obj->doc . ')', 0,1 );\n*/\n\t$pdf->SetFont('Times','I',12);\n\t$pdf->Cell(0,10,$Obj->help, 0,1 );\n\t\n\t// NoEdit\n\tif( $Obj->NoEdit != '' ){\n\t\t$pdf->Cell(0,10,'Ese formulario está bloqueado (no permite inserciones de datos).', 0,1 );\n\t}\n\t\n\t\n\t// Field List\n\t$pdf->SetFont('Times','B',12);\n\t$pdf->Cell(25,10,'Campos:', 0,0 );\n\t$pdf->SetFont('Times','I',10);\n\t$pdf->Cell(25,10,'(campos obligatorios marcados con asterisco \"*\")', 0,1 );\n\t$key = array_keys( $Obj->element );\n\tfor( $i=0; $i< count( $key ); $i++ ) {\n\t\t$var = array();\t\t\n\t\t$element = $key[$i];\n\t\t$var['count'] = $i;\n\t\t$tag = array_keys( $Obj->element[$element] );\n\t\tfor ( $cnt=0; $cnt< count($tag); $cnt++ ){\n\t\t\t$var[$tag[$cnt]] = $Obj->Get( $element, $tag[$cnt] );\n\t\t}\n\t\tif( !trustee( $var['G_SHOW_'] ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\t$pdf->SetFont('Times','B',12);\n\t\tif( $var['F_REQUIRED_'] != '' ){\n\t\t\t$required = '*';\n\t\t}\n\t\telse{\n\t\t\t$required = '';\n\t\t}\n\t\t$pdf->Cell(25,10, $required,0,0,'R');\n\t\t$pdf->Cell(40,10,$var['F_ALIAS_'], 0,0 );\n\t\t$pdf->SetFont('Times','',12);\n\t\t$pdf->Cell(40,10,$var['F_HELP_'], 0,1 );\n//\t\t$varMotor['F_VALUE_'] = \n//\t\t\t\t\t$this->Get( $object, $varMotor['F_NAME_'] );\n\t}\t\n\t$pdf->ln(10);\n\t$pdf->SetFont('Times','B',12);\n\t$pdf->Cell(25,10,'Descripción detallada de los Campos:', 0,1 );\n\t$key = array_keys( $Obj->element );\n\tfor( $i=0; $i< count( $key ); $i++ ) {\n\t\t$var = array();\t\t\n\t\t$element = $key[$i];\n\t\t$var['count'] = $i;\n\t\t$tag = array_keys( $Obj->element[$element] );\n\t\tfor ( $cnt=0; $cnt< count($tag); $cnt++ ){\n\t\t\t$var[$tag[$cnt]] = $Obj->Get( $element, $tag[$cnt] );\n\t\t}\n\t\tif( ( !trustee( $var['G_SHOW_'] ) ) \t||\n\t\t\t( $var['C_SHOW_'] == '1==0' )\t\t||\n\t\t\t( $var['C_VIEW_'] == '1==0' ) \t\t){\n\t\t\tcontinue;\n\t\t}\n\t\t$pdf->SetFont('Times','B',12);\n\t\t$pdf->Cell(5);\t\t\n\t\t$pdf->Cell(40,10,$var['F_ALIAS_'], 0,0 );\n\t\t$pdf->SetFont('Times','I',12);\n\t\t$pdf->Cell(40,10,'('.$var['F_HELP_'].')', 0,1 );\n\t\t$pdf->Cell(10);\t\t\n\t\t$pdf->SetFont('Times','',12);\n\t\t$pdf->Cell(20,10,'Tipo', 0,0 );\n\t\tif(\t( $var['F_REQUIRED_'] != '' )\t&&\n\t\t\t( $var['F_AUTONUM_'] == \"\" )\t){\n\t\t\t$required = ' - Es obligatorio rellenar ese campo';\n\t\t}\n\t\telse{\n\t\t\t$required = '';\n\t\t}\n\t\tif( $var['F_TYPE_']=='text'){\n\t\t\t$pdf->Cell(0,10,'Texto ' . $required, 0,1 );\n\t\t\tif( $var['F_LENGTH_'] != \"\" ){\n\t\t\t\t$pdf->Cell(30);\t\t\n\t\t\t\t$pdf->Cell(0,10,'Tamaño máximo de '.$var['F_LENGTH_'].' caracteres', 0,1 );\n\t\t\t}\n\t\t\tif( $var['F_DEC_'] != \"\" ){\n\t\t\t\t$pdf->Cell(30);\t\t\n\t\t\t\t$pdf->Cell(0,10,'Número de decimales: '.$var['F_DEC_'], 0,1 );\n\t\t\t\t$pdf->Cell(30);\t\t\n\t\t\t\t$pdf->Cell(0,10,'Solo acepta números', 0,1 );\n\t\t\t}\n\t\t\tif( $var['F_QUERY_'] != \"\" ){\n\t\t\t\t$pdf->Cell(30);\t\t\n\t\t\t\t$pdf->Cell(0,10,'Trae datos de una consulta a la base de datos', 0,1 );\n\t\t\t}\n\t\t\tif( $var['F_AUTONUM_'] != \"\" ){\n\t\t\t\t$pdf->Cell(30);\t\t\n\t\t\t\t$pdf->Cell(0,10,'No permite alteraciones, pues su contenido es autonumerico', 0,1 );\n\t\t\t}\n\t\t}\n\t\tif( $var['F_TYPE_']=='date'){\n\t\t\t$pdf->Cell(0,10,'Fecha ' . $required, 0,1 );\n\t\t\t$pdf->Cell(30);\t\t\n\t\t\t$pdf->Cell(0,10,'Solo acepta números y el símbolo de guión (-)', 0,1 );\n\t\t\t$pdf->Cell(30);\t\t\n\t\t\t$pdf->Cell(0,10,'Las fechas deben tener el formato dd-mm-aaaa', 0,1 );\n\t\t}\n\t\tif( ( $var['F_TYPE_']=='select_list')\t\t\t||\n\t\t\t( $var['F_TYPE_']=='dynamic_select_list')\t){\n\t\t\t$pdf->Cell(0,10,'Caja de selección ' . $required, 0,1 );\n\t\t\t$pdf->Cell(30);\t\t\n\t\t\t$pdf->Cell(0,10,'Permite seleccionar:', 0,1 );\n \tif( $var['F_OPTIONS_'] != '' ){\n\t\t\t\t$options = explode( ',', $var['F_OPTIONS_'] );\n\t\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t\tfor( $n=0; $n<count($options); $n++ ){\n\t\t\t\t\tif( $options[$n] ==\"\" ){\n\t\t\t\t\t\tif( $required=='' ){\n\t\t\t\t\t\t\t$pdf->Cell(40);\t\t\n\t\t\t\t\t\t\t$pdf->Cell(0,10,'[Ningún contenido]',0,1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$pdf->Cell(40);\t\t\n\t\t\t\t\t\t$pdf->Cell(0,10,$options[$n],0,1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$pdf->SetFont('Times','',12);\n\t \tif( $var['F_RELTABLE_'] != '' ){\n\t\t\t\t\t$pdf->Cell(30);\t\t\n\t\t\t\t\t$pdf->Cell(0,10,'Además de permitir elegir: ',0,1 );\n\t\t\t\t}\t\t\n\t\t\t}\t\t\n \tif( $var['F_RELTABLE_'] != '' ){\n\t\t\t\t$pdf->Cell(40);\t\t\n\t\t\t\t$pdf->SetFont('Times','B',12);\n\t\t\t\t$pdf->Cell(0,10,'[Uno de los datos ya registrados de la tabla '.\n\t\t\t\t$var['F_RELTABLE_'].']', 0,1 );\n\t\t\t\t$pdf->SetFont('Times','',12);\n\t\t\t}\t\t\n\t\t}\n\t\tif( $var['F_TYPE_']=='dynamic_select_list'){\n\t\t\t$pdf->Cell(30);\t\t\n\t\t\t$pdf->Cell(0,10,'Ese campo contiene un filtro especial para selecciones dinámicas', 0,1 );\n\t\t}\n\t\t\n\t\tif( $var['F_TYPE_']=='subform'){\n\t\t\t$pdf->Cell(0,10,'Subformulario ', 0,1 );\n\t\t\t$pdf->Cell(30);\t\t\n\t\t\t$pdf->Cell(0,10,'Abre un espacio para la visualización de otro formulario', 0,1 );\n\t\t}\n\t\tif( $var['F_TYPE_']=='report'){\n\t\t\t$pdf->Cell(0,10,'Botón de Reporte ', 0,1 );\n\t\t\t$pdf->Cell(30);\t\t\n\t\t\t$pdf->Cell(0,10,'Cuándo recibe un \"click\" con el mouse, accede al reporte relacionado', 0,1 );\n\t\t}\n\t\tif( $var['F_TYPE_']=='proc'){\n\t\t\t$pdf->Cell(0,10,'Botón de procedimiento ', 0,1 );\n\t\t\t$pdf->Cell(30);\t\t\n\t\t\t$pdf->Cell(0,10,'Cuándo recibe un \"click\" con el mouse, ejecuta el procedimiento', 0,1 );\n\t\t}\n\t\tif( $var['F_TYPE_']=='formula'){\n\t\t\t$pdf->Cell(0,10,'Fórmula ', 0,1 );\n\t\t\t$pdf->Cell(30);\t\t\n\t\t\t$pdf->Cell(0,10,'Presenta el resultado de una fórmula predeterminada', 0,1 );\n\t\t}\n\t\tif( $var['F_UNIQ_']!=''){\n\t\t\t$pdf->Cell(30);\t\t\n\t\t\t$pdf->Cell(0,10,'Campo único - No permite existencia duplicada en la Base de Datos', 0,1 );\n\t\t}\n\t\t\n\t\tif( !check_trustee( $var['G_CHANGE_'] ) ) {\n\t\t\t$pdf->Cell(10);\t\t\n\t\t\t$pdf->Cell(20,10,'Restricción: El usuario '.$Global['username'].' no tiene permiso para '.\n\t\t\t'alterar el contenido de ese campo', 0,1 );\n\t\t}\n\t\tif( ( $var['C_VIEW_'] !=\"\" ) \t|| \n\t\t\t( $var['C_SHOW_'] !=\"\" )\t){\n\t\t\t$pdf->Cell(10);\t\t\n\t\t\t$pdf->Cell(20,10,'Visibilidad: Campo con visibilidad condicional. ', 0,1 );\n\t\t\t$pdf->Cell(10);\t\t\n\t\t\t$pdf->Cell(20,10,' podrá no ser visible a ese'.\n\t\t\t' usuario en determinadas condiciones', 0,1 );\n\t\t}\n\t\t$pdf->ln(10);\n\n\t}\t\n\t$pdf->ln(10);\n\t\n\n\t\n\t\n\t\n/*\t\n\t//\t\tmanualShowField( $var );\n\t\n\t\n\t\n\n\t\t$var['F_OPTIONS_'] \t. '\",\"' .\n\t\t$var['F_LENGTH_'] \t. '\",\"' .\n\t\t$var['F_DEC_'] \t\t. '\",\"' .\n\t\t$var['C_SHOW_'] \t. '\",\"' .\n\t\t$var['C_VIEW_'] \t. '\",\"' .\n\t\t$var['C_CHANGE_'] \t. '\",\"' .\n\t\t$var['C_DEL_'] \t\t. '\",\"' .\n\t\t$var['G_SHOW_'] \t. '\",\"' .\n\t\t$var['G_CHANGE_'] \t. '\",\"' .\n\t\t$var['F_NODB_'] \t. '\",\"' .\n\t\t$var['F_REQUIRED_'] . '\",\"' .\n\t\t$var['P_PROC_'] \t. '\",\"' .\n\t\t$var['F_RELTABLE_'] . '\",\"' .\n\t\t$var['F_SHOWFIELD_']. '\",\"' .\n\t\t$var['F_PREVAL_'] \t. '\",\"' .\n\t\t$var['V_DEFAULT_'] \t. '\",\"' .\n\t\t$var['F_POSVAL_'] \t. '\",\"' .\n\t\t$var['F_LINK_'] \t. '\",\"' .\n\t\t$var['F_SEND_'] \t. '\",\"' .\n\t\t$var['F_FORMULA_'] \t. '\",\"' .\n\t\t$var['F_QUERY_'] \t. '\",\"' .\n\t\t$var['F_QUERY_REF_'] \t. '\",\"' .\n\t\t$var['F_FILTER_'] \t. '\",\"' .\n\t\t$var['F_AUTONUM_'] \t. '\",\"' .\n\t\t$var['F_DSL_'] \t\t. '\",\"' .\n\t\t$var['F_REPORT_']\t. '\",\"' .\n\t\t$var['F_MULTI_'] . '\");'.\"\\n\" ;\t\n\t\n*/\t\n\n\n\t\n\t\n\t\n}", "title": "" }, { "docid": "09e3aacc566850df7c7d5b388ae75fba", "score": "0.4890153", "text": "public function get_template_body() {\n\n\t\tob_start();\n\n\t\t?>\n\t\t<article>\n\t\t\t<form id=\"<?php echo esc_attr( $this->get_id() ); ?>\">\n\t\t\t\t<div class=\"wc-memberships-profile-field-modal-description\">\n\t\t\t\t\t<?php echo $this->get_description(); ?>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</article>\n\t\t<?php\n\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "a781d464cdc2d9b4c5e7dd0104a90f7e", "score": "0.48824707", "text": "public function create()\n\t{\n\t\t$handle = fopen($this->fileName, $this->mode);\n\t\tif ($handle == FALSE)\n\t\t{\n\t\t\techo '... returning FALSE'.\"\\n\";\n\t\t\treturn FALSE;\n\t\t}\n\t\t$iStrLen = strlen($this->numLines);\n\t\tfor ($i = 0; $i < $this->numLines; $i++)\n\t\t{\n\t\t\t// $iStr = strval($i);\n\t\t\t// $iStrLen = strlen($iStr);\n\n\t\t\t$iFormatted = sprintf(\"%0\".$iStrLen.\"d\", $i);\n\n\t\t\t$lineOutput = '';\n\t\t\t$lineOutput .= $this->titleTconstPrefix;\n\t\t\t$lineOutput .= $iFormatted;\n\t\t\t$lineOutput .= \"\\t\";\n\t\t\t$lineOutput .= $this->titleType;\n\t\t\t$lineOutput .= \"\\t\";\n\t\t\t$lineOutput .= $this->titlePrimaryTitleStart;\n\t\t\t$lineOutput .= $iFormatted;\n\t\t\t$lineOutput .= ' ';\n\t\t\t$lineOutput .= $this->titlePrimaryTitleEnd;\n\t\t\t$lineOutput .= $iFormatted;\n\t\t\t$lineOutput .= ' ';\n\t\t\t$lineOutput .= \"\\t\";\n\n\n\t\t\tif (array_key_exists($i, $this->originalExceptions))\n\t\t\t{\n\t\t\t\t$start = $this->originalExceptions[$i]['start'];\n\t\t\t\t$end = $this->originalExceptions[$i]['end'];\n\n\t\t\t\t$lineOutput .= $start;\n\t\t\t\t$lineOutput .= ' ';\n\t\t\t\t$lineOutput .= $end;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$lineOutput .= $this->titleOriginalTitleStart;\n\t\t\t\t$lineOutput .= $iFormatted;\n\t\t\t\t$lineOutput .= ' ';\n\t\t\t\t$lineOutput .= $this->titleOriginalTitleEnd;\n\t\t\t\t$lineOutput .= $iFormatted;\n\t\t\t}\n\n\n\t\t\t$lineOutput .= \"\\t\";\n\t\t\t$lineOutput .= $this->titleAdult;\n\t\t\t$lineOutput .= \"\\t\";\n\t\t\t$lineOutput .= $this->titleStartYear;\n\t\t\t$lineOutput .= \"\\t\";\n\t\t\t$lineOutput .= $this->titleEndYear;\n\t\t\t$lineOutput .= \"\\t\";\n\t\t\t$lineOutput .= $this->titleRunTimeMinutes;\n\t\t\t$lineOutput .= \"\\t\";\n\t\t\t$lineOutput .= $this->titleGenres;\n\t\t\t$lineOutput .= \"\\n\";\n\t\t\t$fw = fwrite($handle, $lineOutput);\n\t\t\t$lenLineOutput = strlen($lineOutput);\n\t\t\tif ($fw != $lenLineOutput)\n\t\t\t{\n\t\t\t\tfclose($handle);\n\t\t\t\tthrow new Exception('fw='.$fw.';lenLineOutput='.$lenLineOutput);\n\t\t\t}\n\t\t\techo \"...\".$i.\"\\n\";\n\t\t}\n\t\tfclose($handle);\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "be2d9ff0f6b4ec2cbd85264a2b4a80ef", "score": "0.48776767", "text": "private function buildTextPart()\n\t{\n\t\t$header = '';\n\n\t\tif( $this->html && $this->attachment ):\n\t\t\t\t$header = 'Content-Type: multipart/alternative;' . \"\\r\\n\"\n\t\t\t\t\t. \"\tboundary=\\\"{$this->alt_boundary}\\\"\\r\\n\\r\\n\"\n\t\t\t\t\t. \"--{$this->alt_boundary}\\r\\n\";\n\t\telseif( $this->html || $this->attachment ):\n\t\t\t$header = \"\";\n\t\telse:\n\t\t\t$this->content_type = 'text/plain';\n\t\t\treturn $this->text . \"\\r\\n\";\n\t\tendif;\n\n\t\t$this->text = $header\n\t\t\t. \"Content-Type: text/html; charset=\\\"utf-8\\\"\\r\\n\"\n\t\t\t. \"Content-Transfer-Encoding: quoted-printable\\r\\n\"\n\t\t\t. \"Content-Disposition: inline;\\r\\n\\r\\n{$this->text}\\r\\n\\r\\n\";\n\n\t\treturn $this->text;\n\t}", "title": "" }, { "docid": "fbdd358e15ed18e3dd4ce0173bcec08b", "score": "0.48771563", "text": "public function setSubTitle(string $subTitle)\n {\n if (!empty($subTitle)) {\n $this->subTitle = $subTitle;\n }\n return $this;\n }", "title": "" }, { "docid": "8725b0ecde191abe5c20a6f9a01b18dd", "score": "0.48749438", "text": "private function constructPageSubTitle($activityType) {\n\t\t$result = '';\n\t\tif ($activityType != '') {\n\t\t\t$plural = '';\n\t\t\t$singular = '';\n\t\t\tswitch ($activityType) {\n\t\t\t\tcase 'EmailInteraction' :\n\t\t\t\t\t$plural = 'emails';\n\t\t\t\t\t$singular = 'email';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'FaxInteraction' :\n\t\t\t\t\t$plural = 'faxes';\n\t\t\t\t\t$singular = 'fax';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'LetterInteraction' :\n\t\t\t\t\t$plural = 'letters';\n\t\t\t\t\t$singular = 'letter';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'TelephoneInteraction' :\n\t\t\t\t\t$plural = 'phone calls';\n\t\t\t\t\t$singular = 'phone call';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'VisitInteraction' :\n\t\t\t\t\t$plural = 'visits';\n\t\t\t\t\t$singular = 'visit';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'MeetingAppointment' :\n\t\t\t\t\t$plural = 'appointments';\n\t\t\t\t\t$singular = 'appointment';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$format = \"Fill out this form to create new %s for the members you selected in the marketing lists.\" . \" To add this %s as a new %s in each member's record, click Distribute.\";\n\t\t\t$result = sprintf( $format, $plural, $singular, $singular );\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "b6857ca9d25dd99866a26f2038ae3b5e", "score": "0.4871379", "text": "function get_title2()\n {\n }", "title": "" }, { "docid": "ea9b02e3d524035cb26884fa0d69dea4", "score": "0.4871244", "text": "public function generateAdditionalFormRight()\n\t{\n\t\t$this->updateFormParams();\n\t\t$params = $this->getFormParams();\n\t\t\n\t\t$fieldSize = 5;\n\t\t$html .= \"\n\t <br />\n\t <H4>Required Parameters</H4>\n\t <hr />\";\n\t\t\t\n\t\t$html.= $params->insertTextField( \"ampcontrast\", $fieldSize );\n\t\t$html .= \"\n\t <br />\n\t <H4>Appion Parameters</H4>\n\t <hr />\";\n\t\t$html .=$this->dbDefocusTable->generateForm();\n\n\n\t $html.= \"<p>Processing Speed: <br/>\\n\";\n\t\t$html.= $params->insertRadioField(\"speedmode\", \"fastmode\", \"Fast: Do not create CTF summary images\",\"\");\t\n\t\t$html.= $params->insertRadioField(\"speedmode\", \"slowmode\", \"Slow: Create CTF summary images\",\"\");\t\n\t\t$html.= \"</p>\";\n\n\t\t$html .= \"\n\t <H4>Additional Parameters</H4>\n\t <hr />\";\n\n\t\t$html.= $params->insertTextField( \"defstep\", $fieldSize );\n\t\t//$html.= $params->insertTextField( \"defL\", $fieldSize );\n\t\t//$html.= $params->insertTextField( \"defH\", $fieldSize );\n\t\t//$html.= $params->insertTextField( \"defS\", $fieldSize );\n\t\t//$html.= $params->insertTextField( \"bfactor\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"resmin\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"resmax\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"fieldsize\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"dast\", $fieldSize );\n\t\t$html.= $params->insertCheckBoxField( \"do_EPA\");\n/*\n\t\t$html .= \"\n\t <br />\n\t <H4>Additional Advanced Parameters</H4>\n\t <hr />\";\n/*\n\n\t\t$html.= $params->insertTextField( \"do_basic_rotave\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"overlap\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"convsize\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"do_Hres_ref\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"Href_resL\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"Href_resH\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"refine_local_astm\", $fieldSize );\n*/\n\n\n\t\t$html .= \"\n\n\t <br />\n\n\t <H4>Local CTF Estimation Parameters</H4>\n\t <hr />\";\n\n\t\t$html.= $params->insertCheckBoxField( \"do_local_refine\");\n\t\t$html.= $params->insertTextField( \"local_raster\", $fieldSize);\n\t\t$html.= $params->insertTextField( \"local_radius\", $fieldSize);\n\t\t$html.= $params->insertTextField( \"local_boxsize\", $fieldSize);\n\t\t$html.= $params->insertTextField( \"local_overlap\", $fieldSize);\n\n\t\t$html .= \"\n\n\t <br />\n\n\t <H4>Phase Plate Parameters</H4>\n\t <hr />\";\n\t\t$html.= $params->insertCheckBoxField( \"phaseplate\");\n\t\t$html.= \"<br />\";\t\t\n\t\t$html.= $params->insertTextField( \"max_phase_shift\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"min_phase_shift\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"phase_search_step\", $fieldSize );\n\n/*\tHide until python function is implemented\n\t\t$html .= \"\n\t <br />\n\n\n\t <H4>Tilt Refinement Parameters</H4>\n\t <hr />\";\n\t\t$html.= $params->insertTextField( \"refine_tilt\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"init_tilt_ang\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"init_tilt_err\", $fieldSize );\n*/\n/*\n\t\t$html .= \"\n\t <br />\n\t <H4>Correction and Validation Parameters (Recommended)</H4>\n\t <hr />\";\n\t\t$html.= $params->insertTextField( \"do_phase_flip\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"do_validation\", $fieldSize );\n\t\t\t$html .= \"\n\t <br />\n\t <H4>I/O Parameters</H4>\n\t <hr />\";\n\n\t\t$html.= $params->insertTextField( \"boxsuffix\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"ctfstar\", $fieldSize );\n $msg = parent::validate( $postArray );\t\t$html.= $params->insertTextField( \"logsuffix\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"write_local_ctf\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"plot_res_ring\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"output_time\", $fieldSize );\n\t\t$html.= $params->insertTextField( \"gid\", $fieldSize );\n*/\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "f42be286f4188b073eee5b57ff91c8f9", "score": "0.48689085", "text": "function insertTitle ( $out ) {\n \n # Extract meta keywords\n// public function getHTML() { return $this->mBodytext; }\n\t \n if (preg_match_all(\n '/<!-- ADDTITLE ([0-9a-zA-Z\\\\+\\\\/]+=*) -->/m', \n $out->mBodytext, \n $matches)===false\n ) return true;\n $data = $matches[1];\n// print_r ($data) ;\n # Merge keyword data into OutputPage as meta tags\n foreach ($data as $item) {\n $content = @base64_decode($item);\n\t$content = htmlspecialchars($content, ENT_QUOTES);\n\t\t\n if ($content) {\n//\t\tprint \"DA $content\\n\";\n\t\t$new_title = $out->mHTMLtitle;\n\t\t#$new_title .= \", $content\";\n\t\t\n\t\t//Set page title\n\t\tglobal $wgSitename;\n\t\t$new_title = \"$content - $wgSitename\";\n\t\t$out->mHTMLtitleFromPagetitle = true;\n\t\t\n\t\t$out->setHTMLTitle( $new_title );\n\t\t}\n\t\telse {\n//\t\tprint \"TZ\\n\";\n\t\t}\n\t\t\n }\n\n\n\treturn true;\n\n}", "title": "" }, { "docid": "9d0fb9e310954026b97afa09b705422d", "score": "0.48581722", "text": "private function the_text_block( $count ) {\n // -------------------------------------------------------------------------\n $style = $this->inline_style_data( $count );\n $section_style = $this->section_inline_style ( $style['bg_image_ID'], $style['fixed'], $style['bg_colour'], $style['text_colour'], $style['opacity'], 'call-to-action' );\n\n $field = $this->flex_fieldname . '_' . $count . '_text_block';\n $title = $this->flex_fieldname . '_' . $count . '_title';\n $content = apply_filters( 'the_content', get_post_meta( $this->post_ID, $field, true ) );\n $title = apply_filters( 'the_title', get_post_meta( $this->post_ID, $title, true ) );\n\n ob_start();\n include( get_template_directory() . '/partials/frontpage-text-block.php');\n return ob_get_clean();\n\n }", "title": "" }, { "docid": "3320ec6ad24209335bfc93723acc702e", "score": "0.4854531", "text": "public function create(): string\n\t{\n\n\t\t$image = $this->uploadImage();\n\n\t\tif ($image) {\n\t\t\t$this->data('image', $image);\n\t\t}\n\n\t\t$user = $this->user;\n\n\t\tif ($user->id >= 0) {\n\t\t\t$user_id = $user->id; \n\t\t} else {\n\t\t\t$user_id = 0;\n\t\t}\n\t\t\n\t\t$title = ucfirst($this->request->post('title'));\n\n\t\t$data = $this->data('title', $title)\n\t\t\t\t\t ->data('user_id', $user_id)\n\t\t\t\t\t ->data('details', $this->request->post('details'))\n\t\t\t\t\t ->data('chapter_id', $this->request->post('chapter_id'))\n\t\t\t\t\t ->data('tags', ucfirst($this->request->post('tags')))\n\t\t\t\t\t ->data('status', ucfirst($this->request->post('status')))\n\t\t\t\t\t ->data('related_episodes', implode(',', array_filter((array) $this->request->post('related_episodes'), 'is_numeric')))\n\t\t\t\t\t ->data('created', $now = time())\n\t\t\t\t\t ->insert('episodes');\n\n\t\t$successMessage = 'Une nouvelle épisode avec le titre <strong>' . $title .'</trong> a été créé avec succès.';\n\t\treturn $successMessage;\n\t}", "title": "" }, { "docid": "7471d87d8eef94ac22455417a3dbe811", "score": "0.48476493", "text": "function Move_ACF_Subtitle() {\n ?>\n <script type=\"text/javascript\">\n jQuery(document).ready( function( $ ) {\n var acf_container = $('.acf-field[data-name=\"alt_header\"]');\n if ( acf_container.length > 0 && acf_container.css('display') != 'none') {\n acf_container.addClass('acf-subtitle');\n $(\"#titlediv\").before( acf_container ).show();\n }\n });\n </script>\n <?php\n}", "title": "" }, { "docid": "0e063dbef3c89de93ec404d88f122c6b", "score": "0.4847072", "text": "private function the_emphasis_text( $count ) {\n\n $field = $this->flex_fieldname . '_' . $count . '_text_content';\n\n $content = apply_filters( 'the_content', get_post_meta( $this->post_ID, $field, true ) );\n\n // Call to Action\n $include_cta = get_post_meta( $this->post_ID, $this->flex_fieldname . '_' . $count . '_call_to_action', true );\n\n ob_start();\n include( get_template_directory() . '/partials/emphasis-text.php' );\n return ob_get_clean();\n\n }", "title": "" }, { "docid": "8c39b3accc6670f7f347c286a569c136", "score": "0.48452756", "text": "public function output() {\n\n\t\t// Add params to global\n\t\tglobal $marketo_pro_forms;\n\t\t$marketo_pro_forms[] = [\n\t\t\t'formId' => $this->atts['id'],\n\t\t\t'htmlId' => $this->atts['html_id'],\n\t\t\t'lightbox' => $this->atts['lightbox'],\n\t\t\t'success' => $this->atts['success'],\n\t\t];\n\n\t\t// Localize script with form variables\n\t\tadd_action( 'wp_footer', [ $this, 'localize' ] );\n\n\t\t// Enqueue script that gets localized later\n\t\twp_enqueue_script( 'marketopro-form' );\n\n\t\t// Before form\n\t\tdo_action( 'marketo_pro_before_form' );\n\n\t\t// Output form in correct place\n\t\t$html = sprintf( '<form id=\"mktoForm_%s\"></form>', $this->atts['id'] );\n\t\tif ( $this->atts['lightbox'] ) {\n\n\t\t\t// Form is lightbox, so output form in footer and link here\n\t\t\tadd_action( 'wp_footer', function () use ( $html ) { echo $html; } );\n\t\t\treturn $this->element( $this->atts['tag'], $this->content, [\n\t\t\t\t'id' => $this->atts['html_id'],\n\t\t\t\t'class' => $this->atts['class'],\n\t\t\t] );\n\n\t\t} else {\n\n\t\t\t// Form is embedded, so output form here\n\t\t\treturn $html;\n\n\t\t}\n\n\t\t// After form\n\t\tdo_action( 'marketo_pro_after_form' );\n\n\t}", "title": "" }, { "docid": "8732c7f54f1ea3ab2b42a9a08dbc3a86", "score": "0.4844339", "text": "function exCon_contentHtmlPre() {\n echo the_sub_field('pre-content_html');\n }", "title": "" }, { "docid": "097724adabe3ee52cec1d3bfa48db4ad", "score": "0.48420393", "text": "public function content() {\n\t$string = '<div id=\"courseCreate\">\n\t\t\t\t\t<form name=\"create\" action=\"index_router.php?page=createCourse\" method=\"post\" id=\"courseCreationForm\" class=\"form\">\n\t\t\t\t\t\t<fieldset id=\"globalInformation\">\n\t\t\t\t\t\t\t<legend>Course creation : </legend>\n\t\t\t\t\t\t\t<div id=\"title\" class=\"formBlock\">\n\t\t\t\t\t\t\t\t<label for=\"title\">Title :</label>\n\t\t\t\t\t\t\t\t<input type=\"text\" name=\"title\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div id=\"description\" class=\"formBlock\">\n\t\t\t\t\t\t\t\t<label for=\"descritpion\">Description :</label>\n\t\t\t\t\t\t\t\t<textarea cols=\"40\" rows=\"5\" name=\"description\" id=\"description\"></textarea>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</fieldset>\n\n\t\t\t\t\t\t<a href=\"index_router.php?page=myCourses\"><input id=\"back\" type=\"button\" value=\"Cancel\"/></a>\n\t\t\t\t\t\t<input type=\"submit\" value=\"Confirm\"/>\n\t\t\t\t\t</form>\n\t\t\t\t</div>';\n\treturn $string;\n\t\n }", "title": "" }, { "docid": "b1fe979c115aa7786be8505c21f82bd5", "score": "0.4838278", "text": "protected function set_page_subtitle($subtitle) {\n $this->page_subtitle = $subtitle;\n }", "title": "" } ]
e519631636ca9432db75761ee8b7ce89
Logs and reports a database error
[ { "docid": "40146598aed08069858b58b519176a7e", "score": "0.7067509", "text": "function reportDBError ($exception) {\n $file = fopen(\"application/log.txt\", \"a\"); \n fwrite($file, date(DATE_RSS));\n fwrite($file, \"\\n\");\n fwrite($file, $exception->getMessage());\n fwrite($file, $exception->getTraceAsString());\n fwrite($file, \"\\n\");\n fwrite($file, \"\\n\");\n fclose($file);\n require \"views/error.php\";\n exit();\n}", "title": "" } ]
[ { "docid": "a05feda87665743279b67a647a55cb89", "score": "0.744641", "text": "protected function logSQLError() {\n\t\t$this->log('SQL-query: ' . $GLOBALS['TYPO3_DB']->debug_lastBuiltQuery);\n\t\t\n\t\t$error = $GLOBALS['TYPO3_DB']->sql_error();\n\t\tif (!empty($error)) {\n\t\t\t$this->error('SQL-error: ' . $error);\n\t\t}\n\t}", "title": "" }, { "docid": "55f90d23b61fe73390684b3aef2e9da9", "score": "0.7158607", "text": "function db_error() {\r\n global $j;\r\n\r\n $this->_err_message(((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)),\"Sql\",\"Check the query\");\r\n $this->file[$j][\"status\"]=\"<span style=\\\"font-weight: bold; color:red;\\\">Failed</span>\";\r\n $this->file[$j][\"operation\"]=\"Sql\";\r\n\r\n }", "title": "" }, { "docid": "ae2153d1c0ce4b43940e1af6a8c13a7e", "score": "0.7120839", "text": "function reportDBError ($exception) {\r\n//\t$file = fopen(\"application/log.txt\", \"a\"); \r\n//\tfwrite($file, date(DATE_RSS));\r\n//\tfwrite($file, \"\\n\");\r\n//\tfwrite($file, $exception->getMessage());\r\n//\tfwrite($file, \"\\n\");\r\n//\tfwrite($file, \"\\n\");\r\n//\tfclose($file);\r\n\trequire \"view/error.php\";\r\n\texit();\r\n}", "title": "" }, { "docid": "16168a3de304592a6b7388cc7ba9f4eb", "score": "0.71132654", "text": "function handle_db_error($exception) {\n record_message(htmlspecialchars('Exception : ' . $exception->getMessage()));\n}", "title": "" }, { "docid": "6dc74949672050a81b97c4b6f7c52107", "score": "0.6980359", "text": "function dbErr($db){\n\t\t$err = $db->error;\n\t\terror('Database error : '.$err,7,$db);\n\t}", "title": "" }, { "docid": "4b9a9199f0d434151fa71c807ead6658", "score": "0.68859345", "text": "protected static function DatabaseError(string $message, object $dbObject = null) {\n\t\thttp_response_code(500);\n\t\theader('Content-Type: text/plain');\n\t\tif($dbObject)\n\t\t\tif($dbObject->errno)\n\t\t\t\t$message .= \": $dbObject->errno $dbObject->error\";\n\t\t\telse // errno 0 means there's no error on $dbObject so show the last error instead\n\t\t\t\t$message .= ': ' . error_get_last()['message'];\n\t\tdie($message);\n\t}", "title": "" }, { "docid": "b9d24826de534cb92c33fb03b3f6b6c0", "score": "0.6789661", "text": "private function handleException($e) {\n echo \"Database error: \" . $e->getMessage();\n exit;\n }", "title": "" }, { "docid": "a3d627f9561d90fef21e3df0cc4841ef", "score": "0.6749316", "text": "function db_erro(){\r\n return debug_print_backtrace() . \"<br />\" . mysql_erro();\r\n return 'O programa contém um erro, favor entrar em contato com o <a href=\"mailto:leonardo@leoartes.com.br\">Webmaster</a>';\r\n }", "title": "" }, { "docid": "ad3bdb2d0fd7ab24819914c37c0fff88", "score": "0.6596423", "text": "public function onFailure()\n {\n\n $this->redirect('/framework/error/database/', true );\n }", "title": "" }, { "docid": "9c4abc0745ab90b1cd21ca0921f4619a", "score": "0.65904534", "text": "public function sqlError($message)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t $error = str_pad(\"User Error Message\", 20 , \"_\") .\" \" .$message .\"\\n\";\n\t\t\t $error .= str_pad(\"Date\", 20 , \"_\") .\" \" .date(\"D, F j, Y H:i:s\") .\"\\n\";\n\t\t\t $error .= str_pad(\"IP Address\", 20 , \"_\") .\" \" .$_SERVER['REMOTE_ADDR'] .\"\\n\";\n\t\t\t $error .= str_pad(\"Browser\", 20 , \"_\") .\" \" .$_SERVER['HTTP_USER_AGENT'] .\"\\n\";\n\t\t\t\t\n\t\t\t\tif (isset($_SERVER['HTTP_REFERER']))\n\t\t\t\t $error .= \"Referer \t: \" .$_SERVER['HTTP_REFERER'] .\"\\n\";\n\t\t\t \n\t\t\t\tthrow new Exception($error);\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n if ($this->environment == \"debug\" || $this->environment == \"development\")\n {\n echo \"<b>\" . $message . \"</b>\";\n echo \"<hr size=\\\"1\\\" noshade>\";\n echo \"<pre>\";\n echo $e->getMessage();\n echo \"</pre>\";\n }\n\n if ($this->environment == \"production\")\n throw $e;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "9585dfef9dc6347637aea56bd4e7dcdf", "score": "0.6551545", "text": "private function sqlErr($e)\n {\n echo \"sql error: {$e->getMessage()}\";\n }", "title": "" }, { "docid": "cb1765a8ae3e507484d21cc98d9b4ae9", "score": "0.65508664", "text": "public function log_db_errors( $error, $query )\n {\n\t\t$request ='';\n $message = '<p>Error at '. date('d-m-Y H:i:s').':</p>';\n $message .= '<p>Query: '. htmlentities( $query ).'<br />';\n $message .= 'Error: ' . $error;\n $message .= '</p>';\n // $message .='<p> The above error was generated in the script '.$_SERVER['SCRIPT_NAME'].'<br> from IP address '.$_SERVER['REMOTE_ADDR'];\n foreach($_REQUEST as $key=>$val) \n { \n\t // loop the request array\n\t $request .= 'Key = '.$key.' Value = '.$val.'<br>';\n }\n //$message .= '<br>with a request string of '.$_SERVER['QUERY_STRING'].'</p>';\n $message .= $request;\n\n if( defined( 'SEND_ERRORS_TO' ) )\n {\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n $headers .= 'To: Admin <'.SEND_ERRORS_TO.'>' . \"\\r\\n\";\n // $headers .= 'From: Merlin <system@'.$_SERVER['SERVER_NAME'].'>' . \"\\r\\n\";\n\n //mail( SEND_ERRORS_TO, 'Database Error', $message, $headers ); \n }\n else\n {\n trigger_error( $message );\n }\n\n if( !defined( 'DISPLAY_DEBUG' ) || ( defined( 'DISPLAY_DEBUG' ) && DISPLAY_DEBUG ) )\n {\n echo $error; \n }\n }", "title": "" }, { "docid": "6d95c0c3fdb50b9ca789c9584b9e1ddb", "score": "0.6531227", "text": "function qa_feed_db_fail_handler($type, $errno=null, $error=null, $query=null)\r\n/*\r\n\tDatabase failure handler function for RSS feeds - outputs HTTP and text errors\r\n*/\r\n\r\n\t{\r\n\t\theader('HTTP/1.1 500 Internal Server Error');\r\n\t\techo qa_lang_html('main/general_error');\r\n\t\texit;\r\n\t}", "title": "" }, { "docid": "868123baed500de370fe11cfeb25c7a6", "score": "0.65275794", "text": "function db_erro(){\r\n return debug_print_backtrace() . \"<br />\" . mysql_erro();\r\n }", "title": "" }, { "docid": "244509edaed23a9f178b1250344517b7", "score": "0.6463765", "text": "protected function logError()\n {\n }", "title": "" }, { "docid": "a052f56457c596700004babfba14d7d7", "score": "0.64484066", "text": "function db_error($query, $errno, $error) { \r\ndie('<font color=\"#000000\"><b>' . $errno . ' - ' . $error . '<br><br>' . $query . '<br><br><small><font color=\"#ff0000\">[STOP]</font></small><br><br></b></font>');\r\n}", "title": "" }, { "docid": "6c4941fa94918c45c914924958d52f64", "score": "0.63917553", "text": "private function _error($message) {\n\t\t$errorReport = '?action=error&host=foo&type=1&time=0';\n\t\tif($this->_configDbInit) {\n\t\t\t\n\t\t} else {\n\t\t}\n\t}", "title": "" }, { "docid": "cdf1ae6e063b15404932c1d2047caac0", "score": "0.63186675", "text": "public function queryError($query)\n {\n $errorText = pg_last_error($this->resConn);\n Debug::show(\"PostgreSQL query error: \" .\n \"'$errorText'\\nQuery:\\n$query\");\n echo \"<pre>\";\n debug_print_backtrace();\n die;\n }", "title": "" }, { "docid": "671ecee3c90fc6504cceb99296b14066", "score": "0.6292547", "text": "public function log_db_errors($error, $query, $severity) {\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n $headers .= 'To: Admin <' . SEND_ERRORS_TO . '>' . \"\\r\\n\";\n $headers .= 'From: Notificaciones de mecanica <mecanica1885@mecanica1885.com>' . \"\\r\\n\";\n $message = '<p>An error has occurred:</p>';\n $message .= '<p>Error at ' . date('Y-m-d H:i:s') . ': ';\n $message .= 'Query: ' . htmlentities($query) . '<br />';\n $message .= '</p>';\n $message .= '<p>Severity: ' . $severity . '</p>';\n\n mail(SEND_ERRORS_TO, 'Database Error', $message, $headers);\n\n if (DISPLAY_DEBUG) {\n echo $message;\n }\n }", "title": "" }, { "docid": "f1c993378a67449bbbb45e08361e192e", "score": "0.62755275", "text": "function db_driver_error()\n{\n global $_db;\n\n return mysql_error($_db['resource'][$_db['target']]['dbh']);\n}", "title": "" }, { "docid": "14747fe6587152ca48639a61a1df256a", "score": "0.6239991", "text": "function logSQLError($errorInfo) {\n $errorMessage = $errorInfo[2];\n include '../view/errorPage.php';\n }", "title": "" }, { "docid": "c9f40a866fec687935678fdb15aa2a4b", "score": "0.6232755", "text": "private function _checkConnectionErrors(){\n\t\t$errno = mysqli_connect_errno();\n\t\tif($errno){\n\t\t\terror_log(\"Database connection error #\".$errno.\": \".mysqli_connect_error().\"\\n\",3,self::DB_LOG_FILE);\n\t\t\tthrow new Exception(\"Database connection error\\n\");\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t}", "title": "" }, { "docid": "9797cb6583d2ebb690ba3cbed71907f5", "score": "0.6182285", "text": "protected function checkError() {\n\t\tif (mysql_error()) {\n\t\t\traiseError(500);\n\t\t\tdie();\n\t\t}\n\t}", "title": "" }, { "docid": "2f46e8aca43b84fefa5f77d24e9cc922", "score": "0.61789304", "text": "public function handleError(Exception $e)\n\t {\n\t\terror_log($e->getMessage(), 0);\n\t\t$_SESSION['error'] = 'Database error';\n\t\theader('Location: ' . HOME_URL . '?page=error');\n\t\texit;\n\t }", "title": "" }, { "docid": "b5e91fa9d93ed54ebb846750c5bd0db1", "score": "0.61603403", "text": "function db_error()\n{\n return \"<p>\" . db_error_num() . \": \" . db_error_msg() . \"<p>\";\n}", "title": "" }, { "docid": "f9c230a805ff36cbeec4f07879b6767b", "score": "0.61440384", "text": "protected function error(){\r\n\t\t// if there is a connection then get the error from the server\r\n\t\tif(!is_null($this->res)) {\r\n\t\t\t$msg = mysql_error($this->res);\r\n\t\t\t$num = mysql_errno($this->res);\r\n\t\t\t$this->setError($msg, $num);\r\n\t\t}\r\n\t\t// no connection so lets try to get some info\r\n\t\telse {\r\n\t\t\t$msg = mysql_error();\r\n\t\t\t$num = mysql_errno();\r\n\t\t\t$this->setError($msg, $num);\r\n\t\t}\r\n\t\t$this->throwError($msg, $num);\r\n\t}", "title": "" }, { "docid": "a537c9d0a1ec468998da9935bd6afaf4", "score": "0.6123811", "text": "private function _handleQueryFailure($sql) {\n $errorMessage = pg_last_error($this->databaseConnection);\n throw new PapayaDatabaseExceptionQuery(\n empty($errorMessage) ? 'Unknown PostgreSQL error.' : $errorMessage, 0, NULL, $sql\n );\n }", "title": "" }, { "docid": "9f83042c709155c6e3cc3d2cdbd1d2e9", "score": "0.6122856", "text": "function error(){\n\t return mysql_error($this->dblink);\n\t}", "title": "" }, { "docid": "a4b25b50e859c987c7bdec5d2335565d", "score": "0.611275", "text": "function dbFehler($sql,$err) {\nglobal $showErr;\n\tif ($showErr)\n\t\techo \"</td></tr></table><font color='red'>$sql : $err</font><br>\";\n}", "title": "" }, { "docid": "62f1bb873c01360899d42834d553da75", "score": "0.609881", "text": "public function handle_error($checkvar){\n if ($checkvar===FALSE){\n $err_str = 'Error in DB operation: ('.$this->dbh->errno.') '.$this->dbh->error;\n $this->logger('ERROR', $err_str);\n throw new Exception($err_str);\n }\n }", "title": "" }, { "docid": "860a5acf10d62d606165519941792df9", "score": "0.60952955", "text": "function db_error($status){\n\t\tif(!$status){\n\t\t\theader(\"HTTP/1.1 500 Internal Server Error\");\n\t\t\tdie(\"ERROR 500: Internal Server Error - Database Error.\");\n\t\t}\n\t}", "title": "" }, { "docid": "c1380a2a171edffe2f7fa431fac6e9b6", "score": "0.6091091", "text": "private function catch_error($err){\n echo \"<hr><b>ERROR QUERY</b></br>\";\n echo \"gimana sih..udah jomblo, ngoding error terus juga! nih liat error mu : \".$err.\"<hr>\";\n }", "title": "" }, { "docid": "03d0fff183ef309de2d765444f2f264d", "score": "0.6082818", "text": "private function _checkErrors($sql = \"\")\n\t{\n\t\t$errno = mysqli_errno($this->dbLink);\n\t\t$error = mysqli_error($this->dbLink);\n\t\t$sqlstate=mysqli_sqlstate($this->dbLink);\n\n\t\tif($sqlstate){\n\t\t\t//Rollback the uncommited changes just in case\n\t\t\t$this->_failedTransaction();\n\t\t\terror_log(\"Database error #\" .$errno. \" (\".$sqlstate.\"): \".$error.\"\\n\",3,self::DB_LOG_FILE);\n\t\t\tif($sql != \"\")\n\t\t\t\terror_log(\"Caused by the following SQL command: \".$sql.\"\\n\",3,self::DB_LOG_FILE);\n\t\t\tthrow new Exception(\"Database operation error\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "ca53a4fb7d414983d2984a4152613b27", "score": "0.60816306", "text": "public function _failedTransaction(){\n\t\tmysqli_rollback($this->dbLink);\n\t\tmysqli_autocommit($this->dbLink,TRUE);\n\t}", "title": "" }, { "docid": "58616879a286ccaac82473232ca9f595", "score": "0.60748374", "text": "function create_messenger_error_log($message, $timestamp, $description, $type, $db){\n\t$query = \"INSERT INTO messenger_error_log (id, message, timestamp, description, type) \n\tVALUES ('\" . $message . \"', '\" . $timestamp . \"', '\" . $description . \"', \n\t'\" . $type . \"')\";\n\t$result = pg_query($db, $query);\n}", "title": "" }, { "docid": "356d5b71f859381b18bd25855397f601", "score": "0.60654986", "text": "function dbError () {\r\n global $mysqli;\r\n return $mysqli->error;\r\n}", "title": "" }, { "docid": "1840fe687af6529d37fd7873a994c26e", "score": "0.6038225", "text": "function _error() {\n if (($this->_error_action==\"die\") || (MDB_DATA_DEBUG>0)) die ($this->db->Error());\n return (0);\n }", "title": "" }, { "docid": "b948bcf6d558a5c01c3bab6efd210158", "score": "0.60354286", "text": "function add_mysqli_error_log($function_name=__FUNCTION__) {\n\t$error_msg = db()->error;\n\tadd_alert('<b>Veritabanı hatası:</b> '.$error_msg, 'danger', $function_name);\n\tadd_log( array('log_key'=>'mysqli_error', 'log_text'=>$error_msg) );\n\treturn false;\n}", "title": "" }, { "docid": "79a07fa9f63599f56c4f8df1c3be5378", "score": "0.5996894", "text": "static function errorHandling()\n {\n global $_ARRAYLANG;\n\n \\Message::error($_ARRAYLANG['TXT_SHOP_DATABASE_QUERY_ERROR']);\n }", "title": "" }, { "docid": "1edffc255cd17ca0b5b15c05455d9a5b", "score": "0.5992712", "text": "function databaseError($message, $errorLevel = E_USER_ERROR) {\n\t\t$lastError = $this->getLastError();\n\t\tif($lastError) $message .= \"\\nLast error: \" . $lastError;\n\t\treturn parent::databaseError($message, $errorLevel);\n\t}", "title": "" }, { "docid": "b45f7840874b002e1c76e56e0151e1d5", "score": "0.5992251", "text": "function dbError() {\n\t\t$error_id = mysql_errno();\n\t\t$_ = 'DB Error ' . $error_id . ': ';\n\n\t\tif (array_key_exists($error_id, $this->error_messages)) {\n\t\t\t$_ .= $this->error_messages[$error_id];\n\t\t}\n\t\telse {\n\t\t\t$_ .= mysql_error();\n\t\t}\n\t\t$_ = str_replace('\"','&quot;',$_);\n\t\t$_ = str_replace(\"'\", '&quot;', $_);\n\t\treturn $_;\n\t}", "title": "" }, { "docid": "991ab3d30062016dcec3d6d9c399241c", "score": "0.59893894", "text": "function db_error() {\n $connection = db_connect();\n return mysqli_error($connection);\n }", "title": "" }, { "docid": "20b5b36997ddfa6ea4aa03f774a3d324", "score": "0.5983089", "text": "public function debugAndDie($query)\r\n {\r\n $this->debugQuery($query, \"Error\");\r\n die(\"<p style=\\\"margin: 2px;\\\">\".mysqli_error().\"</p></div>\");\r\n }", "title": "" }, { "docid": "9505e10d792477b2982d3e613b0e2754", "score": "0.5982739", "text": "function databaseLogWriter($ptrToDb, $userid, $errorMsg)\n{\n $query = \"insert into BASIC_LOG (TRANS_NUMBER,ENTRY_DATE,USERNAME,LOG_ENTRY) values (null, now(), '\" . $userid . \"','\" . $errorMsg . \"')\";\n $myResults = $ptrToDb->executeQuery($query);\n return $myResults;\n}", "title": "" }, { "docid": "58b6306e9f709c8c0eabdf824ebc5f1f", "score": "0.598013", "text": "function pdo_error($report, $action = '', $fetch = 0, $original = null) {\n\tif( bintest($fetch, PDOERROR_MINOR) ) {\n\t\treturn;\n\t}\n\tsql_error($report, $action, true);\n\tthrow new SqlException($report, $action, $original);\n}", "title": "" }, { "docid": "e5bb4a7cb081ffcc8588ca23fabebf15", "score": "0.59765935", "text": "public function getXsiTypeName() {\r\n return \"DatabaseError\";\r\n }", "title": "" }, { "docid": "a0b6815de4715893a73cc4e57275d6d4", "score": "0.59742254", "text": "function logerror($error){\n $date = now();\n $sql = query(\"INSERT INTO logs(log,timest) VALUES('$error','$date')\");\n}", "title": "" }, { "docid": "6169b305fb1ddccb36b42b5a71d63bd5", "score": "0.5973157", "text": "private static function throwDbError(array $errorInfo) {\n throw new Exception('DB error [' . $errorInfo[0] . ', ' . $errorInfo[1] . ']: ' . $errorInfo[2]);\n }", "title": "" }, { "docid": "6169b305fb1ddccb36b42b5a71d63bd5", "score": "0.5973157", "text": "private static function throwDbError(array $errorInfo) {\n throw new Exception('DB error [' . $errorInfo[0] . ', ' . $errorInfo[1] . ']: ' . $errorInfo[2]);\n }", "title": "" }, { "docid": "6169b305fb1ddccb36b42b5a71d63bd5", "score": "0.5973157", "text": "private static function throwDbError(array $errorInfo) {\n throw new Exception('DB error [' . $errorInfo[0] . ', ' . $errorInfo[1] . ']: ' . $errorInfo[2]);\n }", "title": "" }, { "docid": "6169b305fb1ddccb36b42b5a71d63bd5", "score": "0.5973157", "text": "private static function throwDbError(array $errorInfo) {\n throw new Exception('DB error [' . $errorInfo[0] . ', ' . $errorInfo[1] . ']: ' . $errorInfo[2]);\n }", "title": "" }, { "docid": "6dbe5fb474723a46fa240f0e1fe6ba15", "score": "0.59679633", "text": "public function test_version1dblogginglogsfailuremessage() {\n set_config('createorupdate', 0, 'rlipimport_version1');\n\n $data = array(\n 'entity' => 'user',\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'password' => 'Rlippassword!0',\n 'firstname' => 'rlipfirstname',\n 'lastname' => 'rliplastname',\n 'email' => 'rlipuser@rlipdomain.com',\n 'city' => 'rlipcity',\n 'country' => 'CA'\n );\n $result = $this->run_user_import($data);\n $this->assertNull($result);\n\n $message = 'One or more lines from import file memoryfile failed because they contain data errors. ';\n $message .= 'Please fix the import file and re-upload it.';\n $exists = $this->log_with_message_exists($message);\n $this->assertEquals($exists, true);\n }", "title": "" }, { "docid": "cea741edb3bbbdfa2a5db5f120ad1113", "score": "0.5957048", "text": "function db_error() {\r\n $connection = db_connect();\r\n return mysqli_error($connection);\r\n }", "title": "" }, { "docid": "e8b554bf24a82f84ac60fb59b032aec4", "score": "0.5944811", "text": "public function logError()\n {\n SimpleSAML\\Logger::error($this->getClass().': '.$this->getMessage());\n $this->logBacktrace(\\SimpleSAML\\Logger::ERR);\n }", "title": "" }, { "docid": "be1a23e956be38f253e8c488bc3f9e7b", "score": "0.5905891", "text": "protected function _displayDBError() {\n ?>\n <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n <html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">\n <head>\n <title>Words That Follow</title>\n <link rel=\"stylesheet\" href=\"index.css\" type=\"text/css\" />\n <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\n </head>\n <body>\n <div id=\"container\">\n <div id=\"header\">\n <div id=\"logo\">\n <img src=\"logo.gif\" alt=\"Words That Follow\" />\n </div>\n </div>\n <div id=\"main\">\n We are experiencing temporary technical issues. Please try again shortly.\n </div>\n </div>\n </body>\n </html>\n <?php\n }", "title": "" }, { "docid": "9cabe7c99176ccefbbb8f1720a0d002a", "score": "0.58902603", "text": "abstract protected function syncProblemsWithDatabase();", "title": "" }, { "docid": "0c1d46c056fc0ad0dd20f5f866f2ae6e", "score": "0.58888954", "text": "public function getXsiTypeName() {\n return \"DatabaseError\";\n }", "title": "" }, { "docid": "0c1d46c056fc0ad0dd20f5f866f2ae6e", "score": "0.58888954", "text": "public function getXsiTypeName() {\n return \"DatabaseError\";\n }", "title": "" }, { "docid": "80a1ed5c85ecc03ebf205a25bd3c5b8b", "score": "0.58842176", "text": "function file_error($id, $message, $code) {\n\t# write to file log\n\tdb_append_log($id, $message);\n\n\t# terminate execution with the given error code\n\terror($code);\n}", "title": "" }, { "docid": "e44a86f76d0d6aba2b6040b2127054a4", "score": "0.5868438", "text": "public function logToSQL() {\n\n }", "title": "" }, { "docid": "2aae9ea3a65411ab5faa9a90cf0f5f1c", "score": "0.58671254", "text": "public function getError() {\n\t\tif($this->dbi->errno != 0) {\n\t\t\treturn \"MySQL says: \".$this->dbi->errno.\" - \".$this->dbi->error;\n\t\t}\n\t}", "title": "" }, { "docid": "485c7929e8981b37b50d05a596ed65f1", "score": "0.5863337", "text": "private function halt($msg) {\n\t\ttrigger_error(sprintf(\"Database error : %s<br>%s\\n\", $this->errStr, $msg), E_USER_ERROR);\n\t}", "title": "" }, { "docid": "1d6323157972af0efda471fbbf933292", "score": "0.58413696", "text": "function log_db(){\n $servername = \"localhost\";\n $username = \"username\";\n $password = \"password\";\n $dbname = \"dbname\";\n\n // Create and check connection\n $conn = new mysqli($servername, $username, $password, $dbname);\n // Check connection\n if ($conn->connect_error) {\n return $conn->connect_error;\n }\n else{\n return $conn;\n }\n }", "title": "" }, { "docid": "ee18e6706025e25e114a990f6eae9c07", "score": "0.5810286", "text": "function invalidLoginAttempt($uid, $conn) {\n try{\n $stmt = $conn->prepare(\"INSERT INTO login_attempts (uid, time) VALUES (?, ?)\");\n $stmt->execute([$uid, time()]);\n }catch(PDOException $exception){ \n logme($uid,time(),\"INSERT INTO login_attempts (uid, time) VALUES (?, ?)\",\"Error\", $exception, \"n/a\"); \n\n }\n}", "title": "" }, { "docid": "5f34aa328dae6f5a35c59352df705c1e", "score": "0.58018184", "text": "function db_error() {\n\t$connection = db_connect();\n\treturn mysqli_error($connection);\n}", "title": "" }, { "docid": "0c3386e07480cdfa93fdc71fe317af0c", "score": "0.5781945", "text": "function error()\r\n {\r\n \tif($this->mDB==NULL)\r\n \treturn false;\r\n return $this->mDB->error();\r\n }", "title": "" }, { "docid": "8e66c8617e9421d26b2b9a14a9e583ec", "score": "0.5780075", "text": "function Logger($theDB)\n {\n // Initialise the error record\n $this->last_error = 'No Error';\n\n $this->db_object = $theDB;\n }", "title": "" }, { "docid": "1f6bac4885d6c39845570d53ddccfe9d", "score": "0.5778714", "text": "function err_hndlr($enum,$emsg,$efile,$eline,$evars) {\n $message = \"Uh oh, an error has occured in file \".$efile.\"! Check line \".$eline.\" for issue.\";\n \n $sql = \"INSERT INTO error_log (Message,CreatedDate)\n VALUES ('\".$message.\"',current_date());\";\n \n $cnct=$GLOBALS[\"dbc\"];\n error_log($message,3,mysqli_query($cnct, $sql));\n echo $message;\n }", "title": "" }, { "docid": "4d6968321495a4c65c38c0666e1b4727", "score": "0.57650876", "text": "public function logRequestDB() {\n\n $sql = \"INSERT INTO devices (`device`\";\n \n // insert all the readings field values to the query\n foreach ($this->readings as $readingKey => $readingValue) $sql .= \",`\" . $readingValue[0] . \"`\";\n $sql .= \") VALUES ( '\".$this->device.\"'\";\n \n // insert all the readings to the query\n foreach ($this->readings as $readingKey => $readingValue) $sql .= \",'\" . $readingValue[1] . \"'\";\n $sql .= \")\";\n\n // insert query\n if ($this->db->query($sql) === TRUE) {\n $this->response(\"Data logged successfully.\", 200);\n } else {\n $this->response(\"Error: \" . $sql . \"<br>\" . $this->db->error, 500);\n }\n }", "title": "" }, { "docid": "f0195159c2cd825533ccced5f40a7713", "score": "0.5765064", "text": "public function error()\n {\n $args = func_get_args();\n $this->_log(self::LOG_LEVEL_ERROR, $args);\n }", "title": "" }, { "docid": "b7c2dc37c0ce3dc11e13ace303cc1683", "score": "0.5760911", "text": "public function sql_error()\n {\n if (TYPO3::isTYPO115OrHigher()) {\n return $this->getConnection()->getWrappedConnection()->errorInfo();\n }\n\n return $this->getConnection()->errorInfo();\n }", "title": "" }, { "docid": "b2b9890f5862ac2b758dc9233c5ca832", "score": "0.5758772", "text": "public function storeLogs()\n {\n $db = Craft::$app->getDb();\n\n foreach ($this->_requestLogs as $log) {\n $command = $db->createCommand()\n ->upsert(\n Table::DEPRECATIONERRORS,\n [\n 'key' => $log->key,\n 'fingerprint' => $log->fingerprint\n ],\n [\n 'lastOccurrence' => Db::prepareDateForDb($log->lastOccurrence),\n 'file' => $log->file,\n 'line' => $log->line,\n 'message' => $log->message,\n 'traces' => Json::encode($log->traces),\n ]);\n\n try {\n $command->execute();\n $log->id = $db->getLastInsertID();\n } catch (IntegrityException $e) {\n // todo: remove this try/catch after the next breakpoint\n break;\n }\n }\n }", "title": "" }, { "docid": "145bb9b637685fb840f0a18064e5283a", "score": "0.57544327", "text": "function debug_sqlfnc($sql, $dberr) {\n\n print \"<br /><br /><pre>error: \" . $dberr . \"<br />\";\n print \"SQL is: \" . $sql;\n print \"</pre><br /><br />\";\n \n}", "title": "" }, { "docid": "8b2733634792d4d0dc7d93d60a2cd288", "score": "0.5753936", "text": "public function lastError() {\r\n\t\treturn $this->dbError;\r\n\t}", "title": "" }, { "docid": "e73b823dfbee7ef404365542c82a7745", "score": "0.57330185", "text": "public function error() {\n return mysql_error($this->conn);\n }", "title": "" }, { "docid": "1edd6493094499f4f67e363ec4d0a41a", "score": "0.57272756", "text": "public function sql_error()\n {\n if ($this->link) {\n return ['code' => mysqli_errno($this->link), 'message' => mysqli_error($this->link)];\n }\n\n return ['code' => '', 'message' => 'not connected'];\n }", "title": "" }, { "docid": "fe2fd1c5c8db63533d4a0b5485fce131", "score": "0.57228565", "text": "protected function php_error_hook()\n\t{\n\t\t$this->rollback();\n\t}", "title": "" }, { "docid": "665f29a6dc1b0a5fc719b1b578785434", "score": "0.57164234", "text": "function db_error($file='', $line='', $function='', $query='', $ErrorNo, $ErrorMsg)\n\t{\n\t\techo \"<br />\"\n\t\t\t\t.\"<table width=\\\"100%\\\" cellpadding=\\\"1\\\" \"\n\t\t\t\t.\"cellspacing=\\\"0\\\" border=\\\"0\\\">\"\n\t\t\t\t.\"<tr><td colspan=\\\"2\\\" align=\\\"center\\\">\"\n\t\t\t\t.\"<span class=\\\"pn-title\\\"><em>DB Error $ErrorNo</em>\"\n\t\t\t\t.\"</span></td>\"\n\t\t\t\t.\"</tr><tr>\"\n\t\t\t\t.\"<td><span class=\\\"pn-normal\\\"><strong>File:</strong>\"\n\t\t\t\t.\"</span></td><td><span class=\\\"pn-sub\\\">$file</span></td>\"\n\t\t\t\t.\"</tr><tr>\"\n\t\t\t\t.\"<td><span class=\\\"pn-normal\\\"><strong>Function:</strong>\"\n\t\t\t\t.\"</span></td><td><span class=\\\"pn-sub\\\">$function</span></td>\"\n\t\t\t\t.\"</tr><tr>\"\n\t\t\t\t.\"<td><span class=\\\"pn-normal\\\"><strong>Line No:</strong>\"\n\t\t\t\t.\"</span></td><td><span class=\\\"pn-sub\\\">$line</span></td>\"\n\t\t\t\t.\"</tr><tr>\"\n\t\t\t\t.\"<td><span class=\\\"pn-normal\\\"><strong>Query:</strong>\"\n\t\t\t\t.\"</span></td><td><span class=\\\"pn-sub\\\">$query</span></td>\"\n\t\t\t\t.\"</tr><tr>\"\n\t\t\t\t.\"<td><span class=\\\"pn-normal\\\"><strong>Message:</strong>\"\n\t\t\t\t.\"</span></td><td><span class=\\\"pn-sub\\\">$ErrorMsg</sapn></td>\"\n\t\t\t\t.\"</tr></table>\";\n\t\texit;\n\t}", "title": "" }, { "docid": "9ca072a2ee7d3bfb7fb0a5e70df030e7", "score": "0.571364", "text": "private function check_for_errors($result) \n {\n if($result === false) {\n $pg_error = pg_last_error($this->connection);\n throw new \\Exception($pg_error);\n }\n }", "title": "" }, { "docid": "45a90189243d1285c463cd8400b78d5c", "score": "0.57122415", "text": "private function error($message, $error = NULL, $redirect = NULL, $code = 0) {\n// $output = 'DB Error: ' . ($message === '' ? '' : \"\\r\\n\\r\\n$message\");\n//\n// $debug_stack = array($message);\n// $debug = debug_backtrace();\n// $c = count($debug);\n// $line = __LINE__;\n// $path = __FILE__;\n// $module = \"\";\n// $locale = \"en\";\n//\n//\n// for($i = 1; $i < $c; $i++) {\n// $s = $debug[$i];\n//\n// $msg = sprintf(\"%s(Line: %s) - %s::%s(%s)\"\n// , $s['file']\n// , $s['line']\n// , $s['class']\n// , $s['function']\n// , isset($s['args']) && count($s['args']) > 0 ? implode(', ', $s['args']) : \"\"\n// );\n//\n// $debug_stack[] = $msg;\n//\n// if($i == 1) {\n// $line = $s['line'];\n// $path = $s['file'];\n// }\n//\n// if($module == \"\" && preg_match(\"#_module$#i\", $s['class'])) {\n// $module = preg_replace(\"#_module$#i\", \"\", $s['class']);\n// } elseif ($s['class'] == \"staticPage\") {\n// $locale = $s['object']->getLocale();\n// }\n// }\n//\n// $this->db->execute(\"ROLLBACK\");\n//\n// $this->log(\"error\", implode(\"\\n>>\", $debug_stack), $locale, $module, $path, $line);\n// $output .= \"\\r\\n\\r\\nIf problem persists, please contact the system administrator.\";\n// exit( $output );\n\n throw new sqlException($message);\n }", "title": "" }, { "docid": "8705112a7ab828fa073ef72f7045b5c6", "score": "0.56960547", "text": "private function _throw_error($err, $addl='')\n {\n switch ($err) {\n case 1:\n echo \"<b>DBD file not found:</b> $addl.\";\n break;\n case 2:\n echo \"<b>No table parameter:</b> $addl.\";\n break;\n case 3:\n echo \"<b>Invalid table name:</b> $addl.\";\n break;\n case 4:\n echo \"<b>Invalid key (not unique):</b> $addl.\";\n break;\n }\n echo \"<br />\";\n exit;\n }", "title": "" }, { "docid": "725f63514811436d93ba04c45519c717", "score": "0.5695042", "text": "public function postError(Doctrine_Event $event) {}", "title": "" }, { "docid": "3d918d7b6b35ab98ea7106480165b105", "score": "0.5691499", "text": "public function getError()\n {\n return $this->database->error;\n }", "title": "" }, { "docid": "de6f4898bb4b3556aff238f42b30a1cc", "score": "0.5669076", "text": "function error($message,$code,$db){\n\t\t$error = new stdClass();\n\t\t$error->code = $code;\n\t\t$error->message = $message;\n\t\tif($db != NULL)\n\t\t\t$db->close();\n\t\texit(json_encode($error,JSON_PRETTY_PRINT));\n\t}", "title": "" }, { "docid": "b868064e850895ede3f2ace9330ea51a", "score": "0.5660739", "text": "function Error()\n\t{\treturn mysql_error();\n\t}", "title": "" }, { "docid": "fabbe3d6bf0bb3664ddabd321a6036ba", "score": "0.5658068", "text": "public function error()\n {\n throw new \\Pop\\Kettle\\Exception('Invalid Command');\n }", "title": "" }, { "docid": "0813afbb8a27fb835d3d4e59c9517150", "score": "0.5650929", "text": "function error()\n {\n // return mysql_error();\n return mysqli_error();\n }", "title": "" }, { "docid": "e665ac161b802714ba27777580f42eaf", "score": "0.5638422", "text": "public static function raiseExceptionOnError($result, $message = null) {\n\t\tif(self::isError($result)) {\n\t\t\tif ($message === null) {\n\t\t\t\t$message = self::getErrorMessage($result);\n\t\t\t} else {\n\t\t\t\t$message .= ', Root cause:' . self::getErrorMessage($result);\n\t\t\t}\n\t\t\tthrow new DatabaseException($message, self::getErrorCode($result));\n\t\t}\n\t}", "title": "" }, { "docid": "9cbb30b8f9f471cfeb5f7daa19f99a3b", "score": "0.56174237", "text": "function failedLoginLog($username,$password,$ip_addr){\n global $db;\n $time = time();\n $q = \"INSERT into `login_attempts` (user_id,password_tried,time,ip) \n values ('$username','$password','$time','$ip_addr')\";\n if(!$db->query($q)){\n die(\"error failedLogin\");\n }\n}", "title": "" }, { "docid": "73c237860d782afe94cd0398748f9c17", "score": "0.56114906", "text": "private function error(string $msg)\n {\n $this->logDebug(\"Unexpected error: \" . $msg);\n throw new LightDbSynchronizerException($msg);\n }", "title": "" }, { "docid": "b0ee0b74f6cf57f90d9c000a9289f126", "score": "0.5610588", "text": "public function error() {\n\t\t$connection = $this -> connect();\n\t\treturn $connection -> error;\n\t}", "title": "" }, { "docid": "089b60e790f5369964e7791653642d1b", "score": "0.56088096", "text": "function slickgrid_callback_log(){\n watchdog('slickgrid', $_POST['error'], array(), WATCHDOG_ERROR);\n}", "title": "" }, { "docid": "faa1788088f1d3cbff650e71531d1f48", "score": "0.5605875", "text": "public static function errno() {\n return self::$db->errno;\n }", "title": "" }, { "docid": "fd856176bd886092fda76969cb104f18", "score": "0.56012654", "text": "function getError(){\n return $this->getConnection()->getPdo()->errorInfo()[2];\n }", "title": "" }, { "docid": "a9269f1c6919c8ecdccd21056c18f1fa", "score": "0.55975497", "text": "public function error(){\n\n\t\t$crud = $this->new_crud('Error','Error');\n\t\t$crud->set_relation('UsuarioId','Usuario','{UsuarioNombre} {UsuarioApellidos}');\n\n\t\t$crud->display_as('ErrorId','Folio')\n\t\t\t->display_as('UsuarioId','Usuario')\n\t\t\t->display_as('ErrorDescripcion','Error')\n\t\t\t->display_as('ErrorFecha','Fecha')\n\t\t\t->display_as('ErrorHora','Hora')\n\t\t\t->display_as('ErrorEstado','Estado');\n\n\t\t$crud->columns(array(\n\t\t\t'ErrorId',\n\t\t\t'UsuarioId',\n\t\t\t'ErrorFecha',\n\t\t\t'ErrorHora',\n\t\t\t'ErrorDescripcion'\n\t\t));\n\n\t\t$this->crud_output( $crud->render() );\n\t}", "title": "" }, { "docid": "869c6ac6adc648b1a5f4a70ab5a2cbf5", "score": "0.55972683", "text": "public function logIntoErrorTable($method, $error) {\n $sql = $this->db->prepare(\"INSERT INTO errors (errorUser, errorMethod, errorMessage) VALUES (:errorUser, :errorMethod, :errorMessage)\");\n $sql->bindParam(':errorUser', $this->currentUser);\n $sql->bindParam(':errorMethod', $method);\n $sql->bindParam(':errorMessage', $error);\n $sql->execute(); \n }", "title": "" }, { "docid": "6f9e39969bff5ebf6b1dc33185e53790", "score": "0.55734676", "text": "public function error() {\n\t\treturn $this->conn->lastErrorMsg();\n\t}", "title": "" }, { "docid": "560441b6ff2dfcc5b3c15d38b1d2c41c", "score": "0.55582196", "text": "private function ensure( $exp, $msg){\n if ( $exp) throw new Database_Exception($msg);\n }", "title": "" }, { "docid": "94d11341c83b08351f2803eb968ce26c", "score": "0.55514", "text": "public function handleQueryException($exception);", "title": "" }, { "docid": "d624f654e8dd68a38054a0e27559f81f", "score": "0.5538831", "text": "function exceptions_error_handler($severity, $message, $filename, $lineno) {\r\n global $sql;\r\n global $log;\r\n if (error_reporting() == 0) {\r\n return;\r\n }\r\n if (error_reporting() & $severity) {\r\n \t$log->LogError($message);\r\n \t$log->LogError($sql);\r\n //throw new ErrorException($message, 0, $severity, $filename, $lineno);\r\n }\r\n}", "title": "" } ]
bcf8618b731e01716208d74ca808e1ab
Tests the getContributees method
[ { "docid": "e2e24f9f2442075c3a3fa5a02b7094ed", "score": "0.61387515", "text": "public function testGetContributees($user)\n\t{\n\t\t$entities = true;\n\t\t$skip_status = true;\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->rateLimit;\n\n\t\t$path = $this->object->fetchUrl('/application/rate_limit_status.json', array(\"resources\" => \"users\"));\n\n\t\t$this->client->expects($this->at(0))\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->sampleString;\n\n\t\t// Set request parameters.\n\t\tif (is_numeric($user))\n\t\t{\n\t\t\t$data['user_id'] = $user;\n\t\t}\n\t\telseif (is_string($user))\n\t\t{\n\t\t\t$data['screen_name'] = $user;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setExpectedException('RuntimeException');\n\t\t\t$this->object->getContributees($user, $entities, $skip_status);\n\t\t}\n\t\t$data['include_entities'] = $entities;\n\t\t$data['skip_status'] = $skip_status;\n\n\t\t$path = $this->object->fetchUrl('/users/contributees.json', $data);\n\n\t\t$this->client->expects($this->at(1))\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->assertThat(\n\t\t\t$this->object->getContributees($user, $entities, $skip_status),\n\t\t\t$this->equalTo(json_decode($this->sampleString))\n\t\t);\n\t}", "title": "" } ]
[ { "docid": "b76c6467777963d0accc510a48c77f34", "score": "0.60184944", "text": "public function testGetAllAttributesForPartnerProject(){\n\n $id = 1;\n // $partnerProjects = $this->partnerProjects('sample1');\n $repository = new PartnerProjectRepository();\n $partnerProject = $repository->getAllAttributesForPartnerProject($id);\n\n $this->assertEquals($id, $partnerProject['Project']['title_id']);\n }", "title": "" }, { "docid": "9d969687dbba7123c2f9b3a869355db4", "score": "0.5827866", "text": "public function testGetCobrancaAtividade()\n {\n }", "title": "" }, { "docid": "e23525c9da427e33290370cb29f37b59", "score": "0.5679771", "text": "protected function getContributions()\n\t{\n\t\treturn Hdmf::all();\n\t\t\n\t}", "title": "" }, { "docid": "453e8c05bc6cea88132f24be48dba47b", "score": "0.5664571", "text": "public function getFromContributor();", "title": "" }, { "docid": "5cb9d4e650b9da8dd3048bfdbd70303e", "score": "0.5594797", "text": "public function getContributors($role);", "title": "" }, { "docid": "829ba2bec42bf45bdbad2f9ef97c9449", "score": "0.54067475", "text": "public function testGetRiskProfileAllUsingGet()\n {\n }", "title": "" }, { "docid": "661aa5963f8328d8e0116aca6bf56850", "score": "0.5406664", "text": "public function getContributionsAttribute()\n {\n $links = $this->links->where('status', 1)->values();\n $feedbacks = $this->feedback->whereIn('status', [0,1])->values();\n $questions = $this->questions->where('status', 1)->values();\n $col = collect();\n\n foreach ($links as $link) {\n $col->push($link);\n }\n\n foreach ($feedbacks as $fb) {\n $col->push($fb);\n }\n\n foreach ($questions as $q) {\n $col->push($q);\n }\n\n return $col;\n// return $links->merge($feedbacks)->merge($questions)->whereNotIn('user_id', [1, 2]);\n }", "title": "" }, { "docid": "9bee95990940e764a5e52e8c785392a0", "score": "0.539208", "text": "public function testCreateCobrancaAtividade()\n {\n }", "title": "" }, { "docid": "6d65b014f877bd6d6529f10a2025c2db", "score": "0.5344466", "text": "public function testgetMember( ) {\n $this->assertSame(2,count ($this->proj->getTeamMembers())); \n var_dump ($this->proj->getTeamMembers());\n\t}", "title": "" }, { "docid": "39707d48ee1695189c5007298a594378", "score": "0.5330097", "text": "public function testGetProductAttributes()\n {\n\n }", "title": "" }, { "docid": "a96405972c8069e7bc4ddfb0b3f1fd83", "score": "0.53044164", "text": "public function testGetCorretivaPatrimonio()\n {\n }", "title": "" }, { "docid": "a85477f8df819a2d407032d0b0a1e331", "score": "0.5281474", "text": "public function testGetAttributes()\n {\n\n // mock the method to return the entity type code\n $this->abstractEavSubject->expects($this->any())\n ->method('getEntityTypeCode')\n ->willReturn(EntityTypeCodes::CATALOG_PRODUCT);\n\n // set the attribute set name\n $this->abstractEavSubject->setAttributeSet(array(MemberNames::ATTRIBUTE_SET_NAME => 'Default'));\n\n // laod and count the attributes\n $this->assertCount(1, $attributes = $this->abstractEavSubject->getAttributes());\n $this->assertSame(\n array(\n MemberNames::ATTRIBUTE_ID => 1,\n MemberNames::ENTITY_TYPE_ID => 4,\n MemberNames::ATTRIBUTE_CODE => 'default_attribute'\n ),\n $attributes['default_attribute']\n );\n }", "title": "" }, { "docid": "e60bf6bc43ec841f5fddd8295ea95129", "score": "0.5278798", "text": "public function testItCanGetAdminProjects()\n {\n $addedProjects = factory(Projects::class, 10)->create(['user_id' => $this->user->id]);\n\n $projects = $this->repo->orderedProjects();\n\n $this->assertCount($addedProjects->count(), $projects);\n\n foreach ($projects as $project) {\n $this->assertEquals($this->user->id, $project->user_id);\n }\n }", "title": "" }, { "docid": "ea3a36a5ab7b25d125d00f2bc46e9e7d", "score": "0.5266826", "text": "public function test_get_attribute_biz()\n\t{\n\t\t//TODO: write later\t\n\t}", "title": "" }, { "docid": "d02a394d93ab90227222b18fc4631be3", "score": "0.5261857", "text": "final public function testReturnsProviders(): void\n {\n $cache = $this->createMock(CacheInterface::class);\n\n $instance = new LastModified(\n $cache,\n $this->getConfig(),\n $this->providers\n );\n\n $providers = $instance->getProviders();\n\n $this::assertSame(array_values($this->providers), $providers);\n }", "title": "" }, { "docid": "1e59473d69bdcc8d448297e84cc34535", "score": "0.5225239", "text": "public function testGetContributeesFailure($user)\n\t{\n\t\t$entities = true;\n\t\t$skip_status = true;\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->rateLimit;\n\n\t\t$path = $this->object->fetchUrl('/application/rate_limit_status.json', array(\"resources\" => \"users\"));\n\n\t\t$this->client->expects($this->at(0))\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 500;\n\t\t$returnData->body = $this->errorString;\n\n\t\t// Set request parameters.\n\t\tif (is_numeric($user))\n\t\t{\n\t\t\t$data['user_id'] = $user;\n\t\t}\n\t\telseif (is_string($user))\n\t\t{\n\t\t\t$data['screen_name'] = $user;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setExpectedException('RuntimeException');\n\t\t\t$this->object->getContributees($user, $entities, $skip_status);\n\t\t}\n\t\t$data['include_entities'] = $entities;\n\t\t$data['skip_status'] = $skip_status;\n\n\t\t$path = $this->object->fetchUrl('/users/contributees.json', $data);\n\n\t\t$this->client->expects($this->at(1))\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->object->getContributees($user, $entities, $skip_status);\n\t}", "title": "" }, { "docid": "edaf1eb827dd0ebf1b68c18a0d51b146", "score": "0.5220777", "text": "public function testCampaignPrototypeGetWorkTypes()\n {\n\n }", "title": "" }, { "docid": "08963f1d24178dba3a70e075a7e35df2", "score": "0.5212028", "text": "public function testGetAddOnList()\n {\n }", "title": "" }, { "docid": "3cc15b7cbe71afe986e8ce06c40db947", "score": "0.52065593", "text": "public function testPermisos() {\n\n /**\n * Se necesita esta variable para poder usar el metodo\n * ya que de no usarla arroja un error por la bd\n * este error pasa por que se modifica la bd\n * y se vuelve a modificar en el mismo test sin\n * resetear el estado en la bd\n * mas informacion la documentacion de moodle\n * https://docs.moodle.org/dev/Writing_PHPUnit_tests\n */\n $this->resetAfterTest(true);\n\n //genera un usuario para el test \n $user = $this->getDataGenerator()->create_user();\n\n //genera un curso para el test\n $course = $this->getDataGenerator()->create_course();\n\n //genera un rol editingteacher es el rol que tiene permiso para usar el plugin y es 3\n //diferente de 3 es que no tiene permiso\n $editingteacherroleid = 3;\n\n\n //asigna el rol al usuario\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $editingteacherroleid);\n\n //asignar el usuario al curso para el contexto\n $this->setUser($user);\n\n //saca el contexto del curso\n $context = context_course::instance($course->id);\n\n //retorna true si el usuario tiene el permiso para usar el plugin\n return $this->assertTrue(\n has_capability('local/customgrader:index', $context)\n );\n\n }", "title": "" }, { "docid": "39388eb7a9c896dde592bf803f0716bd", "score": "0.51998806", "text": "public function numContributed() {\n\t\tif ($this->contributor) {\n\t\t\treturn count($this->contributedArmyUpdates()->get()); \n\t\t}\n\t\t\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "d7aea182c763e93f4d62bd9b4c4c938a", "score": "0.51972413", "text": "public function testCampaignPrototypeUpdateAttributes()\n {\n\n }", "title": "" }, { "docid": "362c8fc870a852566df6b17c4926b0c7", "score": "0.5192847", "text": "public function test_get_metadata() {\n $collection = new \\core_privacy\\local\\metadata\\collection('assignsubmission_file');\n $collection = \\assignsubmission_file\\privacy\\provider::get_metadata($collection);\n $this->assertNotEmpty($collection);\n }", "title": "" }, { "docid": "7daa4f08c8ac3afea0c1beff3d5cedd3", "score": "0.5188658", "text": "public function testGetContributors($user)\n\t{\n\t\t$entities = true;\n\t\t$skip_status = true;\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->rateLimit;\n\n\t\t$path = $this->object->fetchUrl('/application/rate_limit_status.json', array(\"resources\" => \"users\"));\n\n\t\t$this->client->expects($this->at(0))\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->sampleString;\n\n\t\t// Set request parameters.\n\t\tif (is_numeric($user))\n\t\t{\n\t\t\t$data['user_id'] = $user;\n\t\t}\n\t\telseif (is_string($user))\n\t\t{\n\t\t\t$data['screen_name'] = $user;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setExpectedException('RuntimeException');\n\t\t\t$this->object->getContributors($user, $entities, $skip_status);\n\t\t}\n\t\t$data['include_entities'] = $entities;\n\t\t$data['skip_status'] = $skip_status;\n\n\t\t$path = $this->object->fetchUrl('/users/contributors.json', $data);\n\n\t\t$this->client->expects($this->at(1))\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->assertThat(\n\t\t\t$this->object->getContributors($user, $entities, $skip_status),\n\t\t\t$this->equalTo(json_decode($this->sampleString))\n\t\t);\n\t}", "title": "" }, { "docid": "087f04acd80c6e908c9176a48d444126", "score": "0.51735693", "text": "public function testGetChargeList()\n {\n }", "title": "" }, { "docid": "6e285b6cd57e2897b719a81d0983961c", "score": "0.5167384", "text": "public function contributors()\n {\n return array_map(function ($contribution) {\n return new \\Podlove\\Modules\\Contributors\\Template\\Contributor($contribution->getContributor(), $contribution);\n }, $this->contributions);\n }", "title": "" }, { "docid": "baf89c8c80df7e5c4d8432ced81d339d", "score": "0.51567924", "text": "public function testGetRiskProfileUsingGet()\n {\n }", "title": "" }, { "docid": "a01f0d8b9442d15572318758a768bcbc", "score": "0.5144874", "text": "public function test__GetCompanies()\n\t{\n\t\t$this->assertThat(\n\t\t\t$this->object->companies,\n\t\t\t$this->isInstanceOf('JLinkedinCompanies')\n\t\t);\n\t}", "title": "" }, { "docid": "526b6f7a9de384bb1139840e26ab7f43", "score": "0.5123686", "text": "public function getContribuicoes()\n {\n // $json = array();\n // foreach ($this->answerIds as $id) {\n // $json[] = $this->getOneAnswer($post->ID, $id);\n // }\n\n $data = $this->buildUrlFilters();\n\n // Set data needed in the template\n $viewData = array(\n 'url' => $data['url'],\n 'filters' => $data['filters']\n // 'answers' => json_encode($json),\n // 'correct' => json_encode(get_post_meta($post->ID, 'correct_answer'))\n );\n\n echo $this->getTemplatePart($this->mainTemplate, $viewData);\n\n }", "title": "" }, { "docid": "4f794a02c66baee806cfacd29694b9df", "score": "0.51216036", "text": "public function findContribution() {\n $etp = $this->entity_table;\n $eid = $this->entity_id;\n switch ($etp) {\n case 'civicrm_contribution_recur' :\n $contr = new CRM_Contribute_BAO_Contribution();\n $contr->get('contribution_recur_id', $eid);\n return $contr;\n break;\n case 'civicrm_contribution' :\n $contr = new CRM_Contribute_BAO_Contribution();\n $contr->get('id', $eid);\n return $contr;\n break;\n default:\n echo 'Huh ? ' . $etp;\n }\n return null;\n }", "title": "" }, { "docid": "3f31c970e7297ae93a976aaf826906d9", "score": "0.5120391", "text": "public function testGetEditabilityCanAddMeta()\n {\n $photoResultAdapter = new \\MphpFlickrPhotosGetInfo\\Adapter\\Xml\\Result\\PhotoResultAdapter($this->getResults(), $this->getParameters());\n $this->assertSame('0', $photoResultAdapter->getEditabilityCanAddMeta());\n }", "title": "" }, { "docid": "5f8cc128f4e9225008d76766250845c3", "score": "0.5118204", "text": "public function testGetBio()\n {\n\n }", "title": "" }, { "docid": "67560fc374a63fac2aae708d00d21f62", "score": "0.51136214", "text": "public function getProphecies() {}", "title": "" }, { "docid": "918aaca56ef957074cb9ea51ad3a72cb", "score": "0.5111546", "text": "public function testPropertyPermissionContexts()\n {\n }", "title": "" }, { "docid": "8bce86d2c4262b35d05ccd7d02651cfc", "score": "0.51070356", "text": "public function testCustomerCreditNoteGetAll()\n {\n }", "title": "" }, { "docid": "4035a02c489fb4819c820da14d75773e", "score": "0.5077813", "text": "public function testGetLanguageProfiles()\n {\n\n }", "title": "" }, { "docid": "0a6dcd6f40d7adb00200bdcfc674cf50", "score": "0.50574315", "text": "public function testGetProductComments()\n {\n\n }", "title": "" }, { "docid": "d7c1ebf5f8a552e35848b4c0f5ad8d38", "score": "0.50506556", "text": "public function testGetCustomField()\n {\n\n }", "title": "" }, { "docid": "12ebacd2ac6edc2161dd97375f071788", "score": "0.504458", "text": "public function testReposOwnerNameGet()\n {\n }", "title": "" }, { "docid": "4310e58790b75fd5e6d4723e0ca3e157", "score": "0.5033918", "text": "public function testBasic()\n {\n $config = [\n 'cn', 'mail'\n ];\n\n $result = self::processFilter($config, self::$request);\n $attributes = $result['Attributes'];\n $this->assertArrayHasKey('cn', $attributes);\n $this->assertArrayHasKey('mail', $attributes);\n $this->assertCount(2, $attributes);\n }", "title": "" }, { "docid": "1cacfb4baf08885fa34219ca5ceb58e7", "score": "0.5000316", "text": "public function testAddCandidatApi()\n {\n }", "title": "" }, { "docid": "50adcf692139553518913976d2922f73", "score": "0.49966797", "text": "public function testGetMarksByAffectedProgramAndSequence()\n {\n //Get the student from the fixture\n $student = $this->em->getRepository('AppBundle:Student')->findOneBy(array('name' => 'Eleve1 6em1'));\n //Get the sequence from the fixture\n $sequence1 = $this->em->getRepository('AppBundle:Sequence')->findOneBy(array('name' => '1er Trimestre'));\n //Get the affectedProgram from the fixture\n $affectedProgramFrancais = $this->em->getRepository('AppBundle:AffectedProgram')->findOneBy(array('name' => 'Francais'));\n //Collect only marks for devoir\n $devoirMarks = $student->getMarksByAffectedProgramAndSequence($affectedProgramFrancais, $sequence1, 'Devoir');\n //Collect only marks for Composition\n $compositionMarks = $student->getMarksByAffectedProgramAndSequence($affectedProgramFrancais, $sequence1, 'Composition');\n $this->assertEquals(count($devoirMarks), 3);\n $this->assertEquals(count($compositionMarks), 1);\n }", "title": "" }, { "docid": "76bfa051527ba1b305b65c453e7f5ac3", "score": "0.49950328", "text": "public function testSetGestRepoCompens() {\n\n $obj = new ConstantesEntreprise();\n\n $obj->setGestRepoCompens(true);\n $this->assertEquals(true, $obj->getGestRepoCompens());\n }", "title": "" }, { "docid": "c53b06b6c1fbd58bfa8f9485a629f228", "score": "0.49831396", "text": "public function testGetProductDirectorsRole()\n {\n\n }", "title": "" }, { "docid": "a479f423574527b910095146703b4bf2", "score": "0.497867", "text": "public function getCredits()\n{\n return $this->Credits;\n}", "title": "" }, { "docid": "eefb5edfe9154e8b18df27f984196feb", "score": "0.49764994", "text": "abstract public function testProperties(): void;", "title": "" }, { "docid": "d68b1eb7488083ab76aaa1525f3f9a9a", "score": "0.4967407", "text": "public function testCreateCorretivaPatrimonio()\n {\n }", "title": "" }, { "docid": "c5ee86cb14e21639871928cfee362a22", "score": "0.4965352", "text": "public function addProduitTest(){\r\n $categorie = new Categorie();\r\n $categorie->addProduit(new Produit(1, \"ProduitTest\", \"img/produitTest\"));\r\n $this->assertEquals(1, sizeof($categorie->getProduits()));\r\n }", "title": "" }, { "docid": "21f3775ef628d87e526101e5193574c1", "score": "0.4963442", "text": "public function testModelsGetPermission()\n {\n }", "title": "" }, { "docid": "250df30b0ed61e7c56a7aeb87fc026dd", "score": "0.49573123", "text": "public function testGetCustomFields()\n {\n\n }", "title": "" }, { "docid": "3a2b66c7318799592207a111e0c62a28", "score": "0.49521244", "text": "public function getCollectCodeCoverageInformation(): bool {}", "title": "" }, { "docid": "f43d052db4b5babe687fe1361459732f", "score": "0.49490613", "text": "public function testEntityGetterSetters()\n {\n $entity = $this->getEntity();\n\n $reflection = new ClassReflection(get_class($entity));\n\n $fields = $this->getClassProperties(get_class($entity));\n\n foreach ($fields as $field) {\n if (in_array($field, $this->excludeFields) || $field == 'serviceLocator') {\n continue;\n }\n\n // See if specific test function exists\n if (method_exists($this, 'testEntityField' . $field)) {\n call_user_func(array($this, 'testEntityField' . $field), $entity, $field, $reflection);\n } else {\n $this->entityField($entity, $field, $reflection);\n }\n }\n\n return;\n }", "title": "" }, { "docid": "5aac3c470a722297d6a9e7c9da0ad8a2", "score": "0.49376887", "text": "function isa_contributor_manage_users() {\n\n if ( get_option( 'isa_add_cap_contributor_once' ) != 'done' ) {\n\n // let contributor manage users\n\n $edit_contributor = get_role('contributor'); // Get the user role\n $edit_contributor->add_cap('edit_users');\n $edit_contributor->add_cap('list_users');\n $edit_contributor->add_cap('promote_users');\n $edit_contributor->add_cap('create_users');\n $edit_contributor->add_cap('add_users');\n $edit_contributor->add_cap('delete_users');\n\n update_option( 'isa_add_cap_contributor_once', 'done' );\n }\n\n}", "title": "" }, { "docid": "613ebda39baf5f0a9583f810bb47ff3e", "score": "0.49253005", "text": "public function testGetPublicEditabilityCanAddMeta()\n {\n $photoResultAdapter = new \\MphpFlickrPhotosGetInfo\\Adapter\\Xml\\Result\\PhotoResultAdapter($this->getResults(), $this->getParameters());\n $this->assertSame('0', $photoResultAdapter->getPublicEditabilityCanAddMeta());\n }", "title": "" }, { "docid": "4d3912de26e24b3cc43fbf4991130cd4", "score": "0.49228615", "text": "public function testAddAisleAudit()\n {\n }", "title": "" }, { "docid": "50bb403e74e7a7892987961a18b9c453", "score": "0.4918732", "text": "public function testAddNewContent()\n {\n\n }", "title": "" }, { "docid": "b9c26b3cf9dc73a8228b3522d9b2df8b", "score": "0.4913199", "text": "public function testGetAisleTags()\n {\n }", "title": "" }, { "docid": "252cd9bb544137da9926a60b3caf27d3", "score": "0.48997152", "text": "public function testGetTransactionCodeAllUsingGet()\n {\n }", "title": "" }, { "docid": "25d3c8d1cfa1d9fafccd35a687022966", "score": "0.48929223", "text": "public function getHasMadeContractedContribution()\n {\n return $this->hasMadeContractedContribution;\n }", "title": "" }, { "docid": "295b1fc0dd7da223490fb234065acec3", "score": "0.4891414", "text": "public function testGetMapworksTools(){\n $this->specify(\"Test insert tools into permissions \", function ($expectedResult,$mapworkToolsInfo) {\n $mockMapworksToolRepository = $this->getMock('MapworksToolRepository', ['findAll']);\n $mapworksTools=[];\n if(count($mapworkToolsInfo)>0){\n foreach($mapworkToolsInfo as $mapworkToolInfo){\n $mapworksTools[]=$this->getMapWorkTool($mapworkToolInfo[\"tool_id\"], $mapworkToolInfo[\"name\"], $mapworkToolInfo[\"can_access_with_aggregate_only_permission\"]);\n }\n }\n $mockMapworksToolRepository->method('findAll')->willReturn($mapworksTools);\n $this->mockRepositoryResolver->method('getRepository')\n ->willReturnMap([\n [\n MapworksToolRepository::REPOSITORY_KEY,\n $mockMapworksToolRepository\n ]\n ]);\n $orgPermissionsetService = new OrgPermissionsetService($this->mockRepositoryResolver, $this->mockLogger, $this->mockContainer);\n $output=$orgPermissionsetService->getMapworksTools();\n $this->assertEquals($expectedResult,$output['total_count']);\n if(count($mapworksTools)>0){\n foreach ($mapworksTools as $key=>$mapworksTool){\n $this->assertInstanceOf(MapworksTool::class,$mapworksTool);\n $this->assertEquals($mapworksTool->getId(),$mapworkToolsInfo[$key][\"tool_id\"]);\n $this->assertEquals($mapworksTool->getToolName(),$mapworkToolsInfo[$key][\"name\"]);\n $this->assertEquals($mapworksTool->getCanAccessWithAggregateOnlyPermission(),$mapworkToolsInfo[$key][\"can_access_with_aggregate_only_permission\"]);\n }\n }\n }, [\n 'examples' => [\n // verifies the total count of returned mapworks tool in this case zero tools are expected to return with mapwork tools info provided as input\n [\n 0, // expected count of retrieved tools\n [] // mapwork tools info\n ],\n // verifies the total count of returned mapworks tool in this case 2 tools are expected to return with mapwork tools info provided as input\n [\n 2, // expected count of retrieved tools\n [ // mapwork tools info\n [\n \"tool_id\"=>1,\n \"name\"=>\"Top Issues\",\n \"can_access_with_aggregate_only_permission\"=>true\n ],\n [\n \"tool_id\"=>2,\n \"name\"=>\"Top Issues 2\",\n \"can_access_with_aggregate_only_permission\"=>false\n ],\n ]\n ]\n ]\n ]);\n }", "title": "" }, { "docid": "1db463b255abf0abc7ee80af79249daf", "score": "0.48885944", "text": "public function testRetrieveOrgPermissionsetTools()\n {\n $this->specify(\"Test retrieve organization permission set \", function ($expectedResult, $permissionsetId, $organizationId) {\n $mockOrgPermissionsetToolRepository = $this->getMock('OrgPermissionsetToolRepository', ['getToolsWithPermissionsetSelection']);\n $toolPermissionInfo = $this->toolsPermissionInfo[$organizationId][$permissionsetId];\n $mockOrgPermissionsetToolRepository->method('getToolsWithPermissionsetSelection')->willReturn($toolPermissionInfo);\n $this->mockRepositoryResolver->method('getRepository')\n ->willReturnMap([\n [\n OrgPermissionsetToolRepository::REPOSITORY_KEY,\n $mockOrgPermissionsetToolRepository\n ],\n ]);\n\n $orgPermissionsetService = new OrgPermissionsetService($this->mockRepositoryResolver, $this->mockLogger, $this->mockContainer);\n $tools = $orgPermissionsetService->retrieveOrgPermissionsetTools($permissionsetId, $organizationId);\n $this->assertEquals(count($expectedResult), count($tools));\n $this->assertTrue(is_array($tools));\n if (count($tools) > 0) {\n // verify expected result entry from resulted tools\n foreach ($tools as $key => $tool) {\n $toolSelectionDto = $expectedResult[$key];\n $this->assertEquals($toolSelectionDto->getToolId(), $tool->getToolId());\n $this->assertEquals($toolSelectionDto->getToolName(), $tool->getToolName());\n $this->assertEquals($toolSelectionDto->getSelection(), $tool->getSelection());\n $this->assertEquals($toolSelectionDto->getCanAccessWithAggregateOnlyPermission(), $tool->getCanAccessWithAggregateOnlyPermission());\n }\n }\n\n }, [\n 'examples' => [\n // verifies retrieval of mapwork tools belongs to different org_permissionset_id also\n // validates the attributes of each tool retrieved\n // number of retrieved tools here 1\n [\n [\n $this->getToolSelectionDto(1, \"Top Issues\", true, true) // toolSelectionDto array\n ],\n 1652, // org_permissionset_id\n 211, // organization_id\n ],\n // verifies retrieval of mapwork tools belongs to different org_permissionset_id also\n // validates the attributes of each tool retrieved\n // number of retrieved tools here 0\n [\n [],\n 1623,\n 211,\n ],\n\n ]\n ]);\n }", "title": "" }, { "docid": "ce8af336c76d6052897138fd85e22dc2", "score": "0.48860624", "text": "public function test_userPrototypeGetAccessTokens() {\n\n }", "title": "" }, { "docid": "c929cde1d6d35816976d449b33303e55", "score": "0.48807418", "text": "public function testGetCorporationsCorporationIdWallets()\n {\n }", "title": "" }, { "docid": "cd95d618e4201d49301c1edba6ecdc2b", "score": "0.48790774", "text": "public function podlove_contributor_list($attributes)\n\t{\n\t\t$defaults = array(\n\t\t\t'preset' => 'table',\n\t\t\t'avatars' => 'yes',\n\t\t\t'role' => 'all',\n\t\t\t'roles'\t\t=> 'no',\n\t\t\t'group'\t\t=> 'all',\n\t\t\t'groups'\t=> 'no',\n\t\t\t'donations' => 'no',\n\t\t\t'flattr' => 'yes',\n\t\t\t'linkto' => 'none',\n\t\t\t'title' => ''\n\t\t);\n\n\t\tif (!is_array($attributes))\n\t\t\t$attributes = array();\n\n\t\t$this->settings = array_merge($defaults, $attributes);\n\n\t\treturn $this->renderListOfContributors();\n\t}", "title": "" }, { "docid": "3b1761a3a2d12d36edf81aba31e5cfd8", "score": "0.48788846", "text": "public function testGetFabricante()\n {\n }", "title": "" }, { "docid": "d28f1575d2e11d82ad111e41ea9a7a7d", "score": "0.48786756", "text": "public function testGetPermissions()\n\t{\n\t\t$perms = MagmaAccess::getAccessRules();\n\t}", "title": "" }, { "docid": "4bff2cf3b8aa33c1315d896297993728", "score": "0.48765212", "text": "public function testSetAbsenceExtra() {\n\n $obj = new ConstantesEntreprise();\n\n $obj->setAbsenceExtra(\"absenceExtra\");\n $this->assertEquals(\"absenceExtra\", $obj->getAbsenceExtra());\n }", "title": "" }, { "docid": "6c29b54ede8f7c7c389bf33d1ae5ff59", "score": "0.48752466", "text": "public function collaborators() {\n\t\t$members = $this->team()->first()->members()->get();\n\t\t$sups = $this->suppliers()->get();\n\t\treturn $members->merge($sups);\n\t}", "title": "" }, { "docid": "8972cc48d2aa242941867eb17402b20f", "score": "0.4867461", "text": "public function testGetReports()\n {\n $reports = array(\n $this->object->addReport(\"1\"),\n $this->object->addReport(\"2\")\n );\n $this->assertEquals($reports, $this->object->getReports());\n }", "title": "" }, { "docid": "49a17ff42c35027d2762de3c73b15354", "score": "0.48670238", "text": "public function test_userPrototypeUpdateAttributes() {\n\n }", "title": "" }, { "docid": "0aef42735a24826c3cc8688861a0b2e5", "score": "0.4865656", "text": "public function testSetup() {\n\t\t$this->assertTrue(is_a($this->Article->Problem, 'Problem'));\n\t\t$this->assertTrue(is_a($this->Article->Problem->ProblematicArticle, 'ProblematicArticle'));\n\t\t$settings = $this->Article->Behaviors->Reportable->settings['ProblematicArticle'];\n\t\t\n\t\t$expected = array('spam' => 'Spam', 'stolen' => 'Stolen Content', 'other' => 'Other');\n\t\t$this->assertEquals($expected, $settings['problemTypes']);\n\t\t$this->assertEquals($expected, $this->Article->Problem->types);\n\t}", "title": "" }, { "docid": "2b06ab9190bb57a59116726c5e022349", "score": "0.48636916", "text": "public function testGetContacto()\n {\n\n }", "title": "" }, { "docid": "3059443cce3c10b4aa80751107c61280", "score": "0.48603895", "text": "public function get_contributor($key = 0)\n {\n }", "title": "" }, { "docid": "3059443cce3c10b4aa80751107c61280", "score": "0.48603895", "text": "public function get_contributor($key = 0)\n {\n }", "title": "" }, { "docid": "72cea7f64f1dd500ec388c88abe7e5cf", "score": "0.48559842", "text": "public static function addContributor( $projectId )\n\t{\n\t $res = array( \"result\" => false , \"content\" => Yii::t(\"common\", \"Something went wrong!\") );\n\t\tif(isset( $projectId) )\n\t\t{\n\t\t\t$project = PHDB::findOne( PHType::TYPE_PROJECTS,array(\"_id\"=>new MongoId($projectId)));\n\t\t\tif($project)\n\t\t\t{\n\t\t\t\tif(preg_match('#^[\\w.-]+@[\\w.-]+\\.[a-zA-Z]{2,6}$#',$_POST['email']))\n\t\t\t\t{\n\t\t\t\t\tif($_POST['type'] == \"citoyens\"){\n\t\t\t\t\t\t$params = ( !isset( $_POST['contribId'] ) || $_POST['contribId'] == \"\" ) ? array( \"email\" => $_POST['email'] ) \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t : array( \"_id\" => new MongoId( $_POST['contribId'] ));\n\t\t\t\t\t\t$member = PHDB::findOne( Person::COLLECTION , $params);\n\t\t\t\t\t\t$memberType = Person::COLLECTION;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$member = PHDB::findOne( Organization::COLLECTION , array(\"_id\"=> new MongoId( $_POST['contribId'] )));\n\t\t\t\t\t\t$memberType = Organization::COLLECTION;\n\t\t\t\t\t}\n\n\t\t\t\t\tif( !$member )\n\t\t\t\t\t{\n\t\t\t\t\t\tif($_POST['type'] == \"citoyens\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$member = array(\n\t\t\t\t\t\t\t\t'name'=>$_POST['name'],\n\t\t\t\t\t\t\t\t'email'=>$_POST['email'],\n\t\t\t\t\t\t\t\t'invitedBy'=>Yii::app()->session[\"userId\"],\n\t\t\t\t\t\t\t\t'created' => time()\n\t\t\t\t\t\t \t);\n\t\t\t\t\t\t \t$memberId = Person::createAndInvite($member);\n\t\t\t\t\t\t \t$isAdmin = (isset($_POST[\"contributorIsAdmin\"])) ? $_POST[\"contributorIsAdmin\"] : false;\n\t\t\t\t\t\t \tif ($isAdmin == \"1\") {\n\t\t\t\t\t\t\t\t$isAdmin = true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$isAdmin = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t \t} else {\n\t\t\t\t\t\t\t$member = array(\n\t\t\t\t\t\t\t\t'name'=>$_POST['name'],\n\t\t\t\t\t\t\t\t'email'=>$_POST['email'],\n\t\t\t\t\t\t\t\t'invitedBy'=>Yii::app()->session[\"userId\"],\n\t\t\t\t\t\t\t\t'created' => time(),\n\t\t\t\t\t\t\t\t'type'=> $_POST[\"organizationType\"]\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t$memberId = Organization::createAndInvite($member);\n\t\t\t\t\t\t\t$isAdmin = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$member[\"id\"] = $memberId[\"id\"];\n\t\t\t\t\t\tLink::connect($memberId[\"id\"], $memberType,$projectId, PHType::TYPE_PROJECTS, Yii::app()->session[\"userId\"], \"projects\",$isAdmin);\t\t\n\t\t\t\t\t\tLink::connect($projectId, PHType::TYPE_PROJECTS,$memberId[\"id\"], $memberType, Yii::app()->session[\"userId\"], \"contributors\",$isAdmin );\n\t\t\t\t\t\t$res = array(\"result\"=>true,\"msg\"=>Yii::t(\"common\", \"Your data has been saved\"),\"member\"=>$member, \"reload\"=>true);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( isset($project['links'][\"contributors\"]) && isset( $project['links'][\"contributors\"][(string)$member[\"_id\"]] ))\n\t\t\t\t\t\t\t$res = array( \"result\" => false , \"content\" => \"member allready exists\" );\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$isAdmin = (isset($_POST[\"contributorIsAdmin\"])) ? $_POST[\"contributorIsAdmin\"] : false;\n\t\t\t\t\t\t\tif ($isAdmin == \"1\") {\n\t\t\t\t\t\t\t\t$isAdmin = true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$isAdmin = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tLink::connect($member[\"_id\"], $memberType, $projectId, PHType::TYPE_PROJECTS, Yii::app()->session[\"userId\"], \"projects\",$isAdmin);\n\t\t\t\t\t\t\tLink::connect($projectId, PHType::TYPE_PROJECTS, $member[\"_id\"], $memberType, Yii::app()->session[\"userId\"], \"contributors\",$isAdmin);\n\n\t\t\t\t\t\t\t//add notification \n\t\t\t\t\t\t\tNotification::invited2Project($memberType, $member[\"_id\"], $projectId, $project[\"name\"]);\n\t\t\t\t\t\t\t$res = array(\"result\"=>true,\"msg\"=>Yii::t(\"common\", \"Your data has been saved\"),\"member\"=>$member,\"reload\"=>true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else\n\t\t\t\t\t$res = array( \"result\" => false , \"content\" => \"email must be valid\" );\n\t\t\t}\n\t\t}\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "7d981a44ad06a96f2072052609e16f17", "score": "0.48549643", "text": "function testeAtributos(){\n $oSubscriber = new lSubscriber();\n\n print_r(\"Antes:\\n\");\n print_r($oSubscriber);\n\n $oSubscriber->nome = \"Teste Atributos Jr.\";\n $oSubscriber->cpf = \"123.456.789-00\";\n $oSubscriber->email = \"teste.atributos@email.com\";\n $oSubscriber->telefone = \"+55 53 97777-7777\";\n $oSubscriber->endereco = \"Rua dos Bobos, 0\";\n $oSubscriber->bairro = \"Downtown\";\n $oSubscriber->cep = \"77777-777\";\n \n print_r(\"\\nDepois:\\n\");\n print_r($oSubscriber);\n}", "title": "" }, { "docid": "61f65dfeec8b1256f521b415175f767d", "score": "0.48523554", "text": "final public function testReturnsProviderNames(): void\n {\n $cache = $this->createMock(CacheInterface::class);\n\n $instance = new LastModified(\n $cache,\n $this->getConfig(),\n $this->providers\n );\n\n $providerNames = $instance->getProviderNames();\n\n $this::assertSame(array_keys($this->providers), $providerNames);\n }", "title": "" }, { "docid": "fe45418f8f6dbe7e8970ca08ced98f7c", "score": "0.48503098", "text": "public function getTestCpr();", "title": "" }, { "docid": "f5b133a448a5ee0281de30ecd3e94591", "score": "0.4846565", "text": "public function testGetCouponList()\n {\n }", "title": "" }, { "docid": "167aadc1cedc746298f894dba8246ecd", "score": "0.48415932", "text": "public function getContributionsCountAttribute()\n {\n return count($this->contributions);\n }", "title": "" }, { "docid": "4380310ae3e6acb8d183a16d6f2676a6", "score": "0.48398772", "text": "public function testGetProductExtracts()\n {\n\n }", "title": "" }, { "docid": "ea10f6eaea421ebddc8c537126e6ad8f", "score": "0.4837139", "text": "public function testGetterAndSetter()\n {\n\n $firstname = 'firstname';\n $lastname = 'lastname';\n $this->checkAttribute('Firstname', $firstname);\n $this->checkAttribute('Lastname', $lastname);\n $this->checkAttribute('Nickname', 'Hansele');\n\n $fullname = $firstname . ' ' . $lastname;\n $this->assertEquals($fullname, $this->object->getFullname());\n\n $this->object->setFirstname(null);\n $this->assertEquals($lastname, $this->object->getFullname());\n\n $this->checkOneToMany('Country', 'Nationality');\n $this->checkManyToOne('Card');\n $this->checkManyToOne('Game', 'HomeGame', 'HomeGames');\n $this->checkManyToOne('Game', 'AwayGame', 'AwayGames');\n }", "title": "" }, { "docid": "289b9aee76fe4f4fdb16d0b8e88eea6d", "score": "0.48364627", "text": "public function testAddAisle()\n {\n }", "title": "" }, { "docid": "2c8f2c73151c24d03087a723b2091ab6", "score": "0.48361364", "text": "public function testGetProductFeatures()\n {\n\n }", "title": "" }, { "docid": "331d3a16f2827415fc8495a883e4ca47", "score": "0.48343164", "text": "public function podlove_contributors($attributes) {\n\t\t\n\t\t$defaults = array(\n\t\t\t'preset' => 'comma separated',\n\t\t\t'linkto' => 'none',\n\t\t\t'role' => 'all',\n\t\t\t'roles'\t\t=> 'no',\n\t\t\t'group'\t\t=> 'all',\n\t\t\t'groups'\t=> 'no',\n\t\t\t'avatars' => 'yes',\n\t\t);\n\n\t\tif (!is_array($attributes))\n\t\t\t$attributes = array();\n\n\t\t$this->settings = array_merge($defaults, $attributes);\n\n\t\treturn $this->renderListOfContributors();\n\t}", "title": "" }, { "docid": "b663f4ecd948667386a425b547f6e40d", "score": "0.48317555", "text": "public function testCMSFields()\n {\n $filtered1 = $this->objFromFixture('FluentTest_TranslatedObject', 'translated1');\n $fields = $filtered1->getCMSFields()->dataFields();\n\n $this->assertEquals(array('Title', 'Description', 'URLKey', 'Image'), array_keys($fields));\n }", "title": "" }, { "docid": "a1b58e04ef418501087dc30d99e714eb", "score": "0.4827034", "text": "public function test__construct() {\n\n $obj = new ConstantesEntreprise();\n\n $this->assertNull($obj->getAbsenceExtra());\n $this->assertNull($obj->getActiverPointageQws());\n $this->assertNull($obj->getAdhesionTdsNorme());\n $this->assertNull($obj->getAffaire());\n $this->assertNull($obj->getAffectationTaux27());\n $this->assertNull($obj->getAnalytiqueEmploye());\n $this->assertNull($obj->getArbitrageAuto());\n $this->assertNull($obj->getArchivageActif());\n $this->assertNull($obj->getAttestAuto());\n $this->assertNull($obj->getBeneficieCice());\n $this->assertNull($obj->getBrutAlSalMinConv());\n $this->assertNull($obj->getCicePjMailCliDucsEdi());\n $this->assertNull($obj->getCalculAutoHTheorique());\n $this->assertNull($obj->getCertifAuto());\n $this->assertNull($obj->getChequesEuro());\n $this->assertNull($obj->getChoixEditionChequeTc());\n $this->assertNull($obj->getCleAcces1());\n $this->assertNull($obj->getClePortable());\n $this->assertNull($obj->getCodeOrgBtpdadsu());\n $this->assertNull($obj->getCollaborateuriPaie());\n $this->assertNull($obj->getCompression());\n $this->assertNull($obj->getCompteGainEuro());\n $this->assertNull($obj->getComptePerteEuro());\n $this->assertNull($obj->getCptaElitEuros());\n $this->assertNull($obj->getCtrlAutoCp());\n $this->assertNull($obj->getCtrlAutoCpAnticip());\n $this->assertNull($obj->getCtrlTauxBase());\n $this->assertNull($obj->getDadsDernierChoixGestionAen());\n $this->assertNull($obj->getDadsTypeGestionAen());\n $this->assertNull($obj->getDadsuNumAgrAnsp());\n $this->assertNull($obj->getDadsuRefDec());\n $this->assertNull($obj->getDasTypeDecl());\n $this->assertNull($obj->getDasTypeDeclDetail());\n $this->assertNull($obj->getDateDp());\n $this->assertNull($obj->getDebutPeriodeDas());\n $this->assertNull($obj->getDebutPeriodeHistoDas());\n $this->assertNull($obj->getDeductionHSupFillon());\n $this->assertNull($obj->getDeduireHSupNonStructurelle());\n $this->assertNull($obj->getDernierIndiceBul());\n $this->assertNull($obj->getDestPointIrc());\n $this->assertNull($obj->getDestTriPoint());\n $this->assertNull($obj->getDossierProprete());\n $this->assertNull($obj->getDossierSurWeb());\n $this->assertNull($obj->getDsCodeCollab());\n $this->assertNull($obj->getDsDateRetour());\n $this->assertNull($obj->getDsDateSortie());\n $this->assertNull($obj->getDsFusion());\n $this->assertNull($obj->getDsTypeEdition());\n $this->assertNull($obj->getDtDebutPeriode());\n $this->assertNull($obj->getDtFinPeriode());\n $this->assertNull($obj->getDucsFrancEuro());\n $this->assertNull($obj->getEcrType());\n $this->assertNull($obj->getEdBordChoixModele());\n $this->assertNull($obj->getEdBordRuptureEmp());\n $this->assertNull($obj->getEdBordTypeImp());\n $this->assertNull($obj->getEdBordereau());\n $this->assertNull($obj->getEdBordereauPrep());\n $this->assertNull($obj->getEdBordereauPrepa());\n $this->assertNull($obj->getEdBulLastFax());\n $this->assertNull($obj->getEdBulLastMail());\n $this->assertNull($obj->getEdBulTypeSortie());\n $this->assertNull($obj->getEdCorrespondance());\n $this->assertNull($obj->getEdDucsNbEx());\n $this->assertNull($obj->getEdDucsOptBtp());\n $this->assertNull($obj->getEdDucsTypeSortie());\n $this->assertNull($obj->getEdDucsAuto());\n $this->assertNull($obj->getEdHSupBonifQueMajo());\n $this->assertNull($obj->getEdHistoTriEmp());\n $this->assertNull($obj->getEdHistoTriEtablissement());\n $this->assertNull($obj->getEdHistoTriService());\n $this->assertNull($obj->getEdHistoType());\n $this->assertNull($obj->getEdImputComptable());\n $this->assertNull($obj->getEdTexte1());\n $this->assertNull($obj->getEdTexte2());\n $this->assertNull($obj->getEdTrtCptaLastFax());\n $this->assertNull($obj->getEdTrtCptaLastMail());\n $this->assertNull($obj->getEdTrtCptaSortie());\n $this->assertNull($obj->getEditQpxlAbsences());\n $this->assertNull($obj->getEditQpxlAcomptes());\n $this->assertNull($obj->getEditQpxlTriEmp());\n $this->assertNull($obj->getEditQpxlViderLib());\n $this->assertNull($obj->getEditerBulletinStc());\n $this->assertNull($obj->getEditionChequeTc());\n $this->assertNull($obj->getEditionDate());\n $this->assertNull($obj->getEditionHeure());\n $this->assertNull($obj->getEmail());\n $this->assertNull($obj->getEnteteSoldeTc());\n $this->assertNull($obj->getEtatControleDadsu());\n $this->assertNull($obj->getEtatCtrlNorme());\n $this->assertNull($obj->getEtatDas());\n $this->assertNull($obj->getEtatDasRect());\n $this->assertNull($obj->getFichierUnique());\n $this->assertNull($obj->getFiltrerListeEmp());\n $this->assertNull($obj->getFinPeriodeDas());\n $this->assertNull($obj->getFinPeriodeHistoDas());\n $this->assertNull($obj->getFlagTraite());\n $this->assertNull($obj->getFlagTraite2());\n $this->assertNull($obj->getFlagTraite3());\n $this->assertNull($obj->getFormatFicVirement());\n $this->assertNull($obj->getGestNumBulletin());\n $this->assertNull($obj->getGestRepoCompens());\n $this->assertNull($obj->getGestTexte());\n $this->assertNull($obj->getGestionCoeff());\n $this->assertNull($obj->getGestionCoeffGrille());\n $this->assertNull($obj->getGestionExemplaire());\n $this->assertNull($obj->getGestionIntemperie());\n $this->assertNull($obj->getGestionNumeroEmployeAuto());\n $this->assertNull($obj->getGestionQpxl());\n $this->assertNull($obj->getGestionTdBilaterale());\n $this->assertNull($obj->getGestionTdSouDadsu());\n $this->assertNull($obj->getGroupeGi());\n $this->assertNull($obj->getHBonifInfluCassation());\n $this->assertNull($obj->getHSup1Structurelle());\n $this->assertNull($obj->getHSup2Structurelle());\n $this->assertNull($obj->getHSup3Structurelle());\n $this->assertNull($obj->getHSup4Structurelle());\n $this->assertNull($obj->getHSup5Structurelle());\n $this->assertNull($obj->getHeureSup2InfluCassation());\n $this->assertNull($obj->getHeureSup3InfluCassation());\n $this->assertNull($obj->getHeureSup4InfluCassation());\n $this->assertNull($obj->getHeureSup5InfluCassation());\n $this->assertNull($obj->getHeureSupInfluCassation());\n $this->assertNull($obj->getHeureTheoBaseTrav());\n $this->assertNull($obj->getIndemCpIntervientBrutAl());\n $this->assertNull($obj->getJourDebutTransfert());\n $this->assertNull($obj->getJourFinTransfert());\n $this->assertNull($obj->getJrnFormat());\n $this->assertNull($obj->getJrnRegroupeAbs());\n $this->assertNull($obj->getJrnTri());\n $this->assertNull($obj->getJrnTriEtablissement());\n $this->assertNull($obj->getJrnTriService());\n $this->assertNull($obj->getJrnType());\n $this->assertNull($obj->getLiaisonProprete());\n $this->assertNull($obj->getLibArbitrage());\n $this->assertNull($obj->getLibBqcp());\n $this->assertNull($obj->getLibBaseConge());\n $this->assertNull($obj->getLibCachetAem());\n $this->assertNull($obj->getLibCotisCne());\n $this->assertNull($obj->getLibFinContrat());\n $this->assertNull($obj->getLibFinContratCne());\n $this->assertNull($obj->getLibIndemCp());\n $this->assertNull($obj->getLibelleLibreVirement());\n $this->assertNull($obj->getLigneBulEuro());\n $this->assertNull($obj->getLignesTransport());\n $this->assertNull($obj->getMailBulletin());\n $this->assertNull($obj->getMailBulletinCle());\n $this->assertNull($obj->getMailBulletinPj());\n $this->assertNull($obj->getMailCLiDucsEdi());\n $this->assertNull($obj->getMentionCp());\n $this->assertNull($obj->getMessageVu());\n $this->assertNull($obj->getMillesime1());\n $this->assertNull($obj->getModePlanning());\n $this->assertNull($obj->getModeleApercu());\n $this->assertNull($obj->getModeleBonBleu());\n $this->assertNull($obj->getModeleBulletin());\n $this->assertNull($obj->getModeleCertif());\n $this->assertNull($obj->getModeleCertifTrav());\n $this->assertNull($obj->getModeleCheque());\n $this->assertNull($obj->getMoisClotureAn());\n $this->assertNull($obj->getNAttestAem());\n $this->assertNull($obj->getNAttestAemedi());\n $this->assertNull($obj->getNAttestAemx());\n $this->assertNull($obj->getNAttestAssedic());\n $this->assertNull($obj->getNAttestExtras());\n $this->assertNull($obj->getNAttestIjss());\n $this->assertNull($obj->getNAttestIjssAt());\n $this->assertNull($obj->getNceCongesSpectacles());\n $this->assertNull($obj->getNDerDocument());\n $this->assertNull($obj->getNapEuro());\n $this->assertNull($obj->getNbExemplaire());\n $this->assertNull($obj->getNouvParamRetraiteType());\n $this->assertNull($obj->getOptionsCalcAbs());\n $this->assertNull($obj->getOrdreLibelleHSup());\n $this->assertNull($obj->getPaieEuro());\n $this->assertNull($obj->getPartSalSeule());\n $this->assertNull($obj->getPasGestionIndiceBul());\n $this->assertNull($obj->getPasPrendreIccpFillon());\n $this->assertNull($obj->getPasSousTotSBase());\n $this->assertNull($obj->getPassage35HFait());\n $this->assertNull($obj->getPathVirement());\n $this->assertNull($obj->getPeriodeIPaie());\n $this->assertNull($obj->getPeriodePaie());\n $this->assertNull($obj->getPjMailCLiDucsEdi());\n $this->assertNull($obj->getPjMailCliCouponPaiement());\n $this->assertNull($obj->getPlafond());\n $this->assertNull($obj->getPortaFraisSanteCertifTrav());\n $this->assertNull($obj->getPortaPrevoyanceOblig());\n $this->assertNull($obj->getPreparationTdp());\n $this->assertNull($obj->getPresenceMin());\n $this->assertNull($obj->getProrataDifCertifTrav());\n $this->assertNull($obj->getRdlpascii());\n $this->assertNull($obj->getRdlpemployes());\n $this->assertNull($obj->getRazCommentaire());\n $this->assertNull($obj->getRazHSup());\n $this->assertNull($obj->getRefRemise());\n $this->assertNull($obj->getRefTrans());\n $this->assertNull($obj->getReferenceInterneVirement());\n $this->assertNull($obj->getRegroupLibEdBul());\n $this->assertNull($obj->getReportMinimum());\n $this->assertNull($obj->getRetraite97());\n $this->assertNull($obj->getSaisPlanEmpSem());\n $this->assertNull($obj->getSaisieIndiceBul());\n $this->assertNull($obj->getSautPage());\n $this->assertNull($obj->getSeuil());\n $this->assertNull($obj->getSeuilConting());\n $this->assertNull($obj->getStcAuto());\n $this->assertNull($obj->getTabBordTriEtablissement());\n $this->assertNull($obj->getTabBordTriService());\n $this->assertNull($obj->getTableauCharge());\n $this->assertNull($obj->getTdsAnnee());\n $this->assertNull($obj->getTdsEuro());\n $this->assertNull($obj->getTotGeneIsole());\n $this->assertNull($obj->getTotServiceIsole());\n $this->assertNull($obj->getTotalEtabIsole());\n $this->assertNull($obj->getTransRupture());\n $this->assertNull($obj->getTransTriEtablissement());\n $this->assertNull($obj->getTransfertTdsEmp());\n $this->assertNull($obj->getTriEmploye());\n $this->assertNull($obj->getTxSalDecote());\n $this->assertNull($obj->getTypeAbsSansSolde());\n $this->assertNull($obj->getTypeAgrementAem());\n $this->assertNull($obj->getTypeBordereauPrepa());\n $this->assertNull($obj->getTypeBulletin());\n $this->assertNull($obj->getTypeDue());\n $this->assertNull($obj->getTypeDossier());\n $this->assertNull($obj->getTypeEffectif());\n $this->assertNull($obj->getTypeFichBilat());\n $this->assertNull($obj->getTypeGestionBal());\n $this->assertNull($obj->getTypeModele());\n $this->assertNull($obj->getTypePrepDadsu());\n $this->assertNull($obj->getTypeSaisieAbs());\n $this->assertNull($obj->getTypeSaisieAbsence());\n $this->assertNull($obj->getTypeStc());\n $this->assertNull($obj->getTypeTauxIntemperie());\n $this->assertNull($obj->getTypeTri());\n $this->assertNull($obj->getTypeVirement());\n $this->assertNull($obj->getTypeVisuColSaisieBul());\n $this->assertNull($obj->getUtilisePdpQuadra());\n $this->assertNull($obj->getUtilisePdpQuadra2());\n $this->assertNull($obj->getValCpBulletin());\n $this->assertNull($obj->getValFiltreListeEmp());\n $this->assertNull($obj->getVersionControleDadsu());\n $this->assertNull($obj->getVirCodeEtab());\n $this->assertNull($obj->getVirCollectivite());\n $this->assertNull($obj->getVirComptableCentre());\n $this->assertNull($obj->getVirComptableSub());\n $this->assertNull($obj->getVirFonctionPublique());\n $this->assertNull($obj->getVirSeuil());\n $this->assertNull($obj->getVirTypeEtab());\n $this->assertNull($obj->getVirementCrLf());\n $this->assertNull($obj->getVirementsEuro());\n $this->assertNull($obj->getWebPrioritaire());\n }", "title": "" }, { "docid": "d8d16c4ef731780a5d8b16ef25017913", "score": "0.4824004", "text": "public function testProcurementTypesGet()\n {\n\n }", "title": "" }, { "docid": "6bf1655fb25def4930431ea7d392e81e", "score": "0.4819854", "text": "public function testGetLicenseKeys()\n {\n }", "title": "" }, { "docid": "0e7bfbcfda8062af78d54a020838e4bd", "score": "0.48187175", "text": "public function testGetPublisherConfig3()\n {\n }", "title": "" }, { "docid": "984ed0c255be32a0a12d183da4e23025", "score": "0.48177534", "text": "public function getCollectCodeCoverageInformation()\n\t{\n\t\t// FIXME: Workaround for https://github.com/minkphp/phpunit-mink/issues/35 bug.\n\t\treturn false;\n\t}", "title": "" }, { "docid": "15d106b8e376f60f7f66cabf1cc21795", "score": "0.4816378", "text": "public function testGhetterAndSetterNom()\n {\n $patient = $this->getPatient(\"toto\", \"toto\", 18);\n $patient->setNom(\"Dupont\");\n $this->assertEquals(\"Dupont\",$patient->getNom());\n\n }", "title": "" }, { "docid": "e3ee21887812abcc1f69c44d7ec72d97", "score": "0.48157427", "text": "public function action_contribute()\n\t{\n\t\t$me = Session::get('user', null);\n\n\n\t\t$query = \\DB::query(\n\t\t\t\"SELECT `users`.`id` as `post_user_id`, `users`.`url`, `users`.`name`, `introductions`.*,\n\t\t\t(`introductions`.`distance` + `introductions`.`humanity`+ `introductions`.`ability`) as goodpoint\n\t\t\t FROM `users`\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t`introductions`\n\t\t\t\t\tON\n\t\t\t\t\t`users`.`id` = `introductions`.`introduced_user_id`\n\t\t\t\t\tAND\n\t\t\t\t\t`introductions`.`user_id` = \". $me['id'] \n\t\t\t\t .\" ORDER BY goodpoint desc\"\n\t\t\t\t,\n\t\t\t\t\t\\DB::SELECT\n\t\t);\n\t\t$users = $query->execute();\n\n\t\treturn Response::forge(View::forge('user/contribute', array('users' => $users, 'me' => $me)));\n\n\t\t$view = View::forge('user/contribute');\n\t\t$view->users = $users;\n\t\t$view->me = $user;\n\t\treturn $view;\n\n\t}", "title": "" }, { "docid": "e20b782dad8eb0c75fd08d077d42ce2c", "score": "0.4815695", "text": "public function test__construct() {\n\n $obj = new AffectationsCharge();\n\n $this->assertNull($obj->getAjoutCharge());\n $this->assertNull($obj->getAou());\n $this->assertNull($obj->getAvr());\n $this->assertNull($obj->getChargeMensualisee());\n $this->assertNull($obj->getChargeQFact());\n $this->assertNull($obj->getChargeValidee());\n $this->assertNull($obj->getChefEquipe());\n $this->assertNull($obj->getCodeAffaire());\n $this->assertNull($obj->getCodeChantier());\n $this->assertNull($obj->getCodeCharge());\n $this->assertNull($obj->getCodeClient());\n $this->assertNull($obj->getCodeInspecteur());\n $this->assertNull($obj->getCodeTache());\n $this->assertNull($obj->getCommentaire());\n $this->assertNull($obj->getDec());\n $this->assertNull($obj->getFev());\n $this->assertNull($obj->getJan());\n $this->assertNull($obj->getJuil());\n $this->assertNull($obj->getJuin());\n $this->assertNull($obj->getMai());\n $this->assertNull($obj->getMar());\n $this->assertNull($obj->getMontant());\n $this->assertNull($obj->getNov());\n $this->assertNull($obj->getOct());\n $this->assertNull($obj->getOrigineChargeMens());\n $this->assertNull($obj->getPeriodeDeb());\n $this->assertNull($obj->getPeriodeFin());\n $this->assertNull($obj->getSep());\n $this->assertNull($obj->getUniqId());\n }", "title": "" }, { "docid": "4a983ea263262588027629d0f6b9f985", "score": "0.48107982", "text": "public function testPatchCollectionAddRetrieve()\n {\n $collection = new PatchCollection();\n\n // First, make sure that we don't get anything out of an empty collection.\n $this->assertEmpty($collection->getPatchesForPackage('some/package'));\n\n // Next, add a couple of patches for different packages.\n $patch1 = new Patch();\n $patch1->package = 'some/package';\n $patch1->description = 'patch1';\n $collection->addPatch($patch1);\n\n $patch2 = new Patch();\n $patch2->package = 'some/package';\n $patch2->description = 'patch2';\n $collection->addPatch($patch2);\n\n $patch3 = new Patch();\n $patch3->package = 'other/package';\n $patch3->description = 'patch3';\n $collection->addPatch($patch3);\n\n $patch4 = new Patch();\n $patch4->package = 'other/package';\n $patch4->description = 'patch4';\n $collection->addPatch($patch4);\n\n foreach ([ 'some/package', 'other/package' ] as $package_name) {\n // We should get 2 patches each for some/package and other/package.\n $this->assertCount(2, $collection->getPatchesForPackage($package_name));\n\n // The patches returned should match the requested package name.\n foreach ($collection->getPatchesForPackage($package_name) as $patch) {\n /** @var Patch $patch */\n $this->assertEquals($package_name, $patch->package);\n }\n }\n }", "title": "" }, { "docid": "a74c1261b04ae1a56347190b90e6acd0", "score": "0.48092374", "text": "public function testGetCorporationsCorporationIdWalletsDivisionJournal()\n {\n }", "title": "" }, { "docid": "527adee0c46c50e5f79eab0923f79ecb", "score": "0.4805113", "text": "public function test__GetPeople()\n\t{\n\t\t$this->assertThat(\n\t\t\t$this->object->people,\n\t\t\t$this->isInstanceOf('JLinkedinPeople')\n\t\t);\n\t}", "title": "" }, { "docid": "212a2a9e83500e5db5d764ddc7ee0e80", "score": "0.48009247", "text": "public function testMilestoneChanges()\n {\n $this->assertTrue(true);\n $this->assertFalse(false);\n }", "title": "" }, { "docid": "5d54be152465342c0e1eff74274f301d", "score": "0.47965604", "text": "public function testGetLanguageProfile()\n {\n\n }", "title": "" }, { "docid": "a2fcf51703cdf0e64c68d4925e4289d6", "score": "0.47939548", "text": "public function testGetAttributes()\n {\n // fetch data to test against\n $table = $this->getTableLocator()->get('Countries');\n $query = $table->find()\n ->where([\n 'Countries.id' => 2,\n ])\n ->contain([\n 'Cultures',\n 'Currencies',\n ]);\n\n $entity = $query->first();\n\n // make sure we are testing against expected baseline\n $expectedCurrencyId = 1;\n $expectedFirstCultureId = 2;\n $expectedSecondCultureId = 3;\n\n $this->assertArrayHasKey('currency', $entity);\n $this->assertSame($expectedCurrencyId, $entity['currency']['id']);\n\n $this->assertArrayHasKey('cultures', $entity);\n $this->assertCount(2, $entity['cultures']);\n $this->assertSame($expectedFirstCultureId, $entity['cultures'][0]['id']);\n $this->assertSame($expectedSecondCultureId, $entity['cultures'][1]['id']);\n\n // get required AssociationsCollection\n $listener = new JsonApiListener(new Controller());\n $this->setReflectionClassInstance($listener);\n $associations = $this->callProtectedMethod('_getContainedAssociations', [$table, $query->getContain()], $listener);\n $repositories = $this->callProtectedMethod('_getRepositoryList', [$table, $associations], $listener);\n\n // make view return associations on get('_associations') call\n $view = $this\n ->getMockBuilder(View::class)\n ->onlyMethods(['get'])\n ->disableOriginalConstructor()\n ->getMock();\n\n $view->setConfig('repositories', $repositories);\n $view->setConfig('inflect', 'dasherize');\n\n // setup the schema\n $schemaFactoryInterface = $this\n ->getMockBuilder(FactoryInterface::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $schema = $this\n ->getMockBuilder(DynamicEntitySchema::class)\n ->setConstructorArgs([$schemaFactoryInterface, $view, $table])\n ->onlyMethods([])\n ->getMock();\n\n $this->setReflectionClassInstance($schema, DynamicEntitySchema::class);\n $this->setReflectionClassInstance($schema);\n\n $this->setProtectedProperty('view', $view, DynamicEntitySchema::class);\n\n $context = $this->getMockBuilder(ContextInterface::class)\n ->getMock();\n\n // assert method\n $result = $this->callProtectedMethod('getAttributes', [$entity, $context], $schema);\n\n $this->assertSame('BG', $result['code']);\n $this->assertArrayNotHasKey('id', $result);\n $this->assertArrayNotHasKey('currency', $result); // relationships should be removed\n $this->assertArrayNotHasKey('cultures', $result);\n }", "title": "" }, { "docid": "2a1136f7ffb3703b90b1ad184f4593eb", "score": "0.47893912", "text": "public function testSetCompteContrepartie() {\n\n $obj = new Ecritures();\n\n $obj->setCompteContrepartie(\"compteContrepartie\");\n $this->assertEquals(\"compteContrepartie\", $obj->getCompteContrepartie());\n }", "title": "" } ]
08280530f314522fd524f7de48e861d7
Gets drugs in same category from the drugs table
[ { "docid": "c1e930be0930c0277a8703b9db8931bc", "score": "0.71995026", "text": "public function getSameDrugs($drug_category_id, $drug_id){\n global $pdo;\n $query = $pdo->prepare(\"SELECT * FROM drugs WHERE drug_category_id = ? AND drug_id NOT in (?) ORDER BY drug_id DESC\");\n $query->bindValue(1, $drug_category_id);\n $query->bindValue(2, $drug_id);\n $query->execute();\n $rows = $query->fetchAll();\n $drugs =array();\n foreach($rows as $row){\n $drug = new Drug(\n $row['drug_id']\n ,$row['drug_category_id']\n ,$row['drug_name']\n ,$row['description']\n ,$row['ingredient']\n ,$row['guide_to_use']\n ,$row['more_information']\n ,$row['price']\n ,$row['image']\n );\n $drugs[] = $drug;\n }\n return $drugs;\n }", "title": "" } ]
[ { "docid": "0a0dfe18411149233cd982a8ccfc89c9", "score": "0.6261563", "text": "public function getAllDrugs(){\n global $pdo;\n $query = $pdo->prepare(\"SELECT * FROM drugs\");\n $query->execute();\n $rows = $query->fetchAll();\n foreach($rows as $row){\n $drug = new Drug(\n $row['drug_id']\n ,$row['drug_category_id']\n ,$row['drug_name']\n ,$row['description']\n ,$row['ingredient']\n ,$row['guide_to_use']\n ,$row['more_information']\n ,$row['price']\n ,$row['image']\n );\n $drugs[] = $drug;\n }\n return $drugs;\n }", "title": "" }, { "docid": "1eccac6979dec387cdb609698d914049", "score": "0.6027471", "text": "function get_tags_with_category ()\n\t{\n\t\t$query = $this->db->query(\"\n\t\t\tSELECT dt.tag_id, t.name AS tag_name, t.title AS tag_title, COALESCE(cdt.category_id, 0) AS category_id, \n\t\t\t\tCOALESCE(c.name, '') AS category_name, COALESCE(c.title, '') AS category_title, COUNT(t.id) AS count, \n\t\t\t\t(CASE WHEN COUNT(t.id) > 5 THEN 'ultra_popular' WHEN COUNT(t.id) > 4 THEN 'very_popular' WHEN COUNT(t.id) > 3 THEN 'popular' WHEN COUNT(t.id) > 2 THEN 'somewhat_popular' WHEN COUNT(t.id) > 1 THEN 'not_very_popular' ELSE 'not_popular' END) AS popularity \n\t\t\tFROM tags t, designs_to_tags dt \n\t\t\tLEFT OUTER JOIN categories_to_designs_to_tags cdt \n\t\t\t\tON dt.id = cdt.design_to_tag_id \n\t\t\tLEFT OUTER JOIN categories c \n\t\t\t\tON COALESCE(cdt.category_id, 0) = c.id \n\t\t\tWHERE dt.tag_id = t.id \n\t\t\tGROUP BY t.id, cdt.category_id \n\t\t\tORDER BY c.sort DESC, c.name ASC, t.sort DESC, t.name ASC\n\t\t\");\n\t\t\n\t\treturn $this->query_rows($query, array());\n\t}", "title": "" }, { "docid": "d9ab61fecd868284656d066caeeca081", "score": "0.58813936", "text": "public function searchDrug($key){\n global $pdo;\n $sql2 = \"SELECT * FROM drugs WHERE drug_name LIKE '%\".$key.\"%' or drug_id LIKE '\".$key.\"' \";\n $query2 = $pdo->prepare($sql2);\n $query2->execute();\n $rows = $query2->fetchAll();\n $drugs = array();\n foreach($rows as $row){\n $drug = new Drug(\n $row['drug_id']\n ,$row['drug_category_id']\n ,$row['drug_name']\n ,$row['description']\n ,$row['ingredient']\n ,$row['guide_to_use']\n ,$row['more_information']\n ,$row['price']\n ,$row['image']\n );\n $drugs[] = $drug;\n }\n return $drugs;\n }", "title": "" }, { "docid": "442ac9e0f9fb1cad62b3b38b23f16cf1", "score": "0.58539754", "text": "public function getDrug($drug_id){\n global $pdo;\n $query = $pdo->prepare(\"SELECT * FROM drugs WHERE drug_id = ?\");\n $query->bindValue(1, $drug_id);\n $query->execute();\n $rows = $query->fetchAll();\n $drugs =array();\n foreach($rows as $row){\n $drug = new Drug(\n $row['drug_id']\n ,$row['drug_category_id']\n ,$row['drug_name']\n ,$row['description']\n ,$row['ingredient']\n ,$row['guide_to_use']\n ,$row['more_information']\n ,$row['price']\n ,$row['image']\n );\n $drugs[] = $drug;\n }\n return $drugs;\n }", "title": "" }, { "docid": "478002cc5502b63dd1cf0370d1bbd08a", "score": "0.579735", "text": "function getAllKidsGirlCategories()\n\t\t\t\t{\t\n\t\t\t\t$sql = 'SELECT product_type. * , product_type_people.people_cat_id\n\t\t\t\tFROM product_type\n\t\t\t\tJOIN product_type_people ON product_type_people.product_type_id = product_type.product_type_id\n\t\t\t\tWHERE product_type_people.people_cat_id =\"4\"';\n\n\t\t\t\t$Q = $this-> db-> query($sql);\n\t\t\t\tif($Q->num_rows()>0)\n\t\t\t\treturn $Q->result();\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\treturn \"empty\";\n\t\t\t\t}", "title": "" }, { "docid": "bff4ae50d9a50970d090247f15b033af", "score": "0.57708687", "text": "protected function __findGroupByCategory() {\n $results = Cache::read('ProfessionGroupByCategory');\n\n if (false === $results) {\n $results = Set::combine(\n $this->find('all', array(\n 'contain' => array('ProfessionCategory')\n )),\n '{n}.Profession.id',\n '{n}',\n '{n}.ProfessionCategory.name'\n );\n Cache::write('ProfessionGroupByCategory', $results);\n }\n\n return $results;\n }", "title": "" }, { "docid": "4f3a769208795dd60700cbddfd48e484", "score": "0.57595664", "text": "public function getDogs()\r\n {\r\n $sql = new Sql($this->dbAdapter);\r\n \r\n $select = new Select();\r\n $select->from('dog_users')->where(['USER' => $this->UUID]);\r\n \r\n $statement = $sql->prepareStatementForSqlObject($select);\r\n \r\n try {\r\n $resultSet = $statement->execute();\r\n } catch (RuntimeException $e) {\r\n return $e;\r\n }\r\n \r\n $dogs = [];\r\n foreach ($resultSet as $record) {\r\n $dog = new DogModel($this->dbAdapter);\r\n $dog->read(['UUID' => $record['DOG']]);\r\n $dogs[] = $dog->getArrayCopy();\r\n }\r\n \r\n return $dogs;\r\n }", "title": "" }, { "docid": "9f723b118da7570d266241c03ff33511", "score": "0.56754905", "text": "function getFeaturedCategories(){\r\n\t\t\t$sql=\"SELECT fc.*, c.category_name , c.total_products\r\n\t\t\t\t\tFROM `featured_categories` as fc\r\n\t\t\t\t\tLEFT JOIN category as c ON c.category_id = fc.category_id\r\n\t\t\t\t\tGROUP BY fc.category_id\";\r\n\t\t\t$query =$this->db->query($sql);\r\n\t\t\t$results=$query->result_array();\r\n\t\t\treturn $results;\r\n\t\t}", "title": "" }, { "docid": "1b80bf4229d1c9b117253d7682a01d83", "score": "0.56523234", "text": "public function joinCategoriesTags(){\n $this->db->query('SELECT \n c.category_id, \n c.post_id, \n c.tag_id, \n t.tag_name \n FROM categories c INNER JOIN tags t\n ON c.tag_id = t.tag_id\n ');\n $results = $this->db->resultSet();\n return $results;\n }", "title": "" }, { "docid": "69b8bb39f96b38fecaf5b61b80495182", "score": "0.5624327", "text": "public function selectAllPostByTag($categ){\n $this->db->query('SELECT \n ca.category_id, \n ca.tag_id, \n p.post_id, \n p.body, \n p.img, \n p.show_author, \n p.created_at, \n p.user_id, \n u.username \n FROM categories ca \n INNER JOIN posts p USING (post_id) \n INNER JOIN users u USING (user_id) \n WHERE ca.tag_id = :tag_id \n ORDER BY p.created_at DESC\n ');\n\n $this->db->bind(':tag_id', $categ);\n $results = $this->db->resultSet();\n return $results;\n }", "title": "" }, { "docid": "b8c8f2f07b174a3c626e30bed8c82677", "score": "0.55241174", "text": "public function findAllCategorie(){\n // on recupere sous forme d'array ...\n $requete = \"SELECT DISTINCT categorie FROM produit\";\n $resultat = $this->getDb()->fetchAll($requete);\n return $resultat;\n }", "title": "" }, { "docid": "41b8272f0fcc935f50616fec8b288de5", "score": "0.5523026", "text": "public function commonDrugs()\n\t{\n\t\t$firm = Firm::model()->findByPk(Yii::app()->session['selected_firm_id']);\n\t\t$subspecialty_id = $firm->serviceSubspecialtyAssignment->subspecialty_id;\n\t\t$site_id = Yii::app()->session['selected_site_id'];\n\t\t$params = array(':subSpecialtyId' => $subspecialty_id, ':siteId' => $site_id);\n\t\treturn Drug::model()->active()->findAll(array(\n\t\t\t\t'condition' => 'ssd.subspecialty_id = :subSpecialtyId AND ssd.site_id = :siteId',\n\t\t\t\t'join' => 'JOIN site_subspecialty_drug ssd ON ssd.drug_id = t.id',\n\t\t\t\t'order' => 'name',\n\t\t\t\t'params' => $params,\n\t\t));\n\t}", "title": "" }, { "docid": "c26059d63d719365e9a2c43d2548aa9e", "score": "0.54776865", "text": "public function get_categories() {\n\n $query = $this->db->query(\"SELECT category.id, category.name, category.details, category.image FROM siyothlk.category;\");\n\n if($query->num_rows()>0) {\n foreach ($query->result() as $row) {\n $data[] = $row;\n }\n return $data;\n }\n\n }", "title": "" }, { "docid": "868b875ec80eb49d76d8f0cf14519094", "score": "0.5476153", "text": "public function listCats() {\n\t\t$command = Yii::app()->db->createCommand('SELECT cat_id, cat_parent_id, cat_title, tag FROM ' . $this->tableName());\n\t\t$this->_rows = $command->queryAll();\n\t\t$this->_rowsize = count($this->_rows);\n\t\tfor ($i = 0; $i < $this->_rowsize; $i++) {\n\t\t\tif ($this->_rows[$i]['cat_parent_id'] == 0) {\n\t\t\t\t$this->_data[] = array('tag' => $this->_rows[$i]['tag'], 'cat_title' => $this->_rows[$i]['cat_title']);\n\t\t\t\t$this->loopItem($i);\n\t\t\t}\n\t\t}\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "eb0f2fd1cddc40e2fd2663efc20c4949", "score": "0.5469775", "text": "private function getCategory() {\n $query_str = \"\n SELECT * FROM Kitchen_Category;\n \";\n\n $db_query = $this->connection->query($query_str);\n $result = Array();\n if((!$db_query) || ($db_query->num_rows < 1))\n return $result;\n else {\n for($i = 0, $len = $db_query->num_rows-1; $i <= $len; $i++) {\n $result[$i] = $db_query->fetch_object();\n }\n return $result;\n }\n }", "title": "" }, { "docid": "9df71698c5172ac8286dc2db54bf7f4c", "score": "0.5458903", "text": "function get_genre_array($category = null){\n // make query to get group genre and sub genre\n include('connection.php');\n $category = strtolower($category);\n try {\n $sql = \"SELECT category, genre FROM genres g\n JOIN genre_categories gc ON g.genre_id = gc.genre_id\n \";\n if($category){\n $result = $db->prepare($sql.\" WHERE LOWER(category) = ? ORDER BY category, genre\");\n $result->bindParam(1,$category,PDO::PARAM_STR);\n } else {\n $result = $db->prepare($sql. \" ORDER BY category, genre\");\n }\n $result->execute();\n }\n catch(PDOException $e)\n {\n echo \"Error: \" . $e->getMessage();\n }\n $genres = $result->fetchAll(PDO::FETCH_ASSOC);\n // looping trhough the result\n $output = [];\n foreach($genres as $genre){\n $output[$genre['category']][] = $genre['genre'];\n }\n return $output;\n}", "title": "" }, { "docid": "f6a1f02ef0abdb966ed6a994bca9cbba", "score": "0.54428583", "text": "public function getDogs()\n {\n $sexes = Sex::orderBy('name', 'asc')->get();\n\n // Get all the breeds\n $breeds = Breed::whereActive()->orderBy('name', 'asc')->get();\n\n // Get possible studding options\n $studdingOptions = Dog::studdingOptions();\n\n // Get all characteristic categories\n $categories = CharacteristicCategory::with(array(\n 'parent', \n 'characteristics' => function($query)\n {\n $query->whereActive()->whereVisible()->orderBy('name', 'asc');\n }, \n ))\n ->whereHas('characteristics', function($query)\n {\n $query->whereActive()->whereVisible();\n })\n ->select('characteristic_categories.*')\n ->join('characteristic_categories as parent', 'parent.id', '=', 'characteristic_categories.parent_category_id')\n ->whereNotHealth()\n ->orderBy('parent.name', 'asc')\n ->orderBy('characteristic_categories.name', 'asc')\n ->get();\n\n $characteristicCategories = [];\n\n foreach($categories as $category)\n {\n $characteristicCategories[] = array(\n 'name' => $category->name, \n 'parent_name' => $category->parent->name, \n 'characteristics' => $category->characteristics, \n );\n }\n\n $searchedCharacteristics = [];\n\n $results = null;\n\n if (Input::get('search'))\n {\n $id = Input::get('id');\n $name = Input::get('name');\n $sexId = Input::get('sex');\n $minimumAge = Input::get('minimum_age');\n $maximumAge = Input::get('maximum_age');\n $breedId = Input::get('breed');\n $ownerId = Input::get('owner');\n $breederId = Input::get('breeder');\n $kennelPrefix = Input::get('kennel_prefix');\n $studding = (array) Input::get('studding_options', []);\n $status = Input::get('status');\n $healthy = Input::get('healthy');\n\n $searchedCharacteristics = (array) Input::get('ch', []);\n\n $results = new Dog;\n\n if (strlen($id) > 0)\n {\n $results = $results->where('id', $id);\n }\n\n if (strlen($name) > 0)\n {\n $results = $results->where('name', 'LIKE', '%'.$name.'%');\n }\n\n if (strlen($sexId) > 0)\n {\n $results = $results->where('sex_id', $sexId);\n }\n\n if (strlen($minimumAge) > 0)\n {\n $results = $results->where('age', '>=', $minimumAge);\n }\n\n if (strlen($maximumAge) > 0)\n {\n $results = $results->where('age', '<=', $maximumAge);\n }\n\n if (strlen($breedId) > 0)\n {\n $results = ($breedId == 'unregistered')\n ? $results->whereNull('breed_id')\n : $results->where('breed_id', $breedId);\n }\n\n if (strlen($ownerId) > 0)\n {\n $results = $results->where('owner_id', $ownerId);\n }\n\n if (strlen($breederId) > 0)\n {\n $results = $results->where('breeder_id', $breederId);\n }\n\n if (strlen($kennelPrefix) > 0)\n {\n $results = $results->where('kennel_prefix', $kennelPrefix);\n }\n\n if ( ! empty($studding))\n {\n $results = $results->whereIn('studding', $studding);\n }\n\n switch ($status)\n {\n case 'active':\n $results = $results->where('active_breed_member', true);\n break;\n \n case 'alive':\n $results = $results->whereAlive();\n break;\n \n default:\n break;\n }\n\n if (strlen($healthy) > 0)\n {\n // Get all dogs that have active symptoms\n $sickDogIds = DB::table('dog_characteristic_symptoms')\n ->join('dog_characteristics', 'dog_characteristics.id', '=', 'dog_characteristic_symptoms.dog_characteristic_id')\n ->where('dog_characteristic_symptoms.expressed', true)\n ->lists('dog_characteristics.dog_id');\n\n if ( ! empty($sickDogIds))\n {\n $results = $results->whereNotIn('id', $sickDogIds);\n }\n }\n\n if ( ! empty($searchedCharacteristics))\n {\n // Get all possible searchable characteristics\n $searchableCharacteristicIds = [];\n\n foreach($characteristicCategories as $category)\n {\n $searchableCharacteristicIds = array_merge($searchableCharacteristicIds, $category['characteristics']->lists('id'));\n }\n\n // Store the characteristics that were looked at to remove duplicates\n $lookedAtIds = [];\n\n // Get all dogs that satisfy ALL of the characteristics\n $characteristicsDogIds = [];\n\n foreach($searchedCharacteristics as $index => $searchedCharacteristic)\n {\n try\n {\n // Make sure an id was provided\n if ( ! array_key_exists('id', $searchedCharacteristic))\n {\n throw new Exception;\n }\n\n // Grab the id\n $characteristicId = $searchedCharacteristic['id'];\n\n // Make sure the characteristic id could be searched\n if ( ! in_array($characteristicId, $searchableCharacteristicIds))\n {\n throw new Exception;\n }\n\n // Search only unique ones\n if (in_array($characteristicId, $lookedAtIds))\n {\n throw new Exception;\n }\n\n // Save it\n $lookedAtIds[] = $characteristicId;\n\n // Grab the characteristic\n $characteristic = Characteristic::find($characteristicId);\n\n // Make sure the characteristic was found\n if (is_null($characteristic))\n {\n throw new Exception;\n }\n\n // Save the characteristic back onto the search for the view\n $searchedCharacteristics[$index]['characteristic'] = $characteristic;\n\n if ( ! array_key_exists('r', $searchedCharacteristic) and ! array_key_exists('g', $searchedCharacteristic) and ! array_key_exists('ph', $searchedCharacteristic))\n {\n throw new Exception;\n }\n\n // Test on range\n if ($characteristic->isRanged())\n {\n if ( ! array_key_exists('r', $searchedCharacteristic))\n {\n throw new Exception;\n }\n\n $rangedValues = explode(',', $searchedCharacteristic['r']);\n\n if (count($rangedValues) === 0)\n {\n $minRangedValue = $characteristic->min_ranged_value;\n $maxRangedValue = $characteristic->max_ranged_value;\n\n }\n else if (count($rangedValues) == 1)\n {\n $minRangedValue = $maxRangedValue = $rangedValues[0];\n }\n else\n {\n $minRangedValue = $rangedValues[0];\n $maxRangedValue = $rangedValues[1];\n }\n\n // Compare against the labels if they exist\n $minRangedLabel = $characteristic->getRangedValueLabel($minRangedValue);\n $maxRangedLabel = $characteristic->getRangedValueLabel($maxRangedValue);\n\n if ( ! is_null($minRangedLabel))\n {\n $minRangedValue = $minRangedLabel->min_ranged_value;\n }\n\n if ( ! is_null($maxRangedLabel))\n {\n $maxRangedValue = $maxRangedLabel->max_ranged_value;\n }\n\n // Save it back just in case it changed\n $searchedCharacteristics[$index]['r'] = \"$minRangedValue,$maxRangedValue\";\n\n // Make sure the ranged value is revealed\n $foundDogIds = DogCharacteristic::whereVisible()\n ->whereRangedValueIsRevealed()\n ->where('characteristic_id', $characteristic->id)\n ->where('current_ranged_value', '>=', $minRangedValue)\n ->where('current_ranged_value', '<=', $maxRangedValue)\n ->lists('dog_id');\n\n // Add the found dogs to the list\n $characteristicsDogIds = empty($characteristicsDogIds)\n ? $foundDogIds\n : array_intersect($characteristicsDogIds, $foundDogIds);\n }\n\n // Test on genetics\n if ($characteristic->isGenetic())\n {\n if ( ! array_key_exists('g', $searchedCharacteristic) and ! array_key_exists('ph', $searchedCharacteristic))\n {\n throw new Exception;\n }\n\n $genotypeIds = [];\n $phenotypeIds = [];\n\n // Test on genotypes\n if ( ! $characteristic->hideGenotypes() and array_key_exists('g', $searchedCharacteristic))\n {\n $genotypes = (array) $searchedCharacteristic['g'];\n\n // Get the IDs\n $genotypeIds = array_flatten($genotypes);\n\n if ( ! empty($genotypeIds))\n {\n // Count the loci\n $totalLoci = count($genotypes);\n\n $foundDogIds = [];\n\n // Genotypes must be known and the dog must have a match at all loci\n $foundDogIds = DB::table('dog_characteristics')\n ->select('dog_characteristics.dog_id', DB::raw(\"COUNT(genotypes.locus_id) as matched_loci\"))\n ->join('dog_characteristic_genotypes', 'dog_characteristic_genotypes.dog_characteristic_id', '=', 'dog_characteristics.id')\n ->join('genotypes', 'genotypes.id', '=', 'dog_characteristic_genotypes.genotype_id')\n ->where('dog_characteristics.hide', false)\n ->where('dog_characteristics.genotypes_revealed', true)\n ->whereIn('dog_characteristic_genotypes.genotype_id', $genotypeIds)\n ->having('matched_loci', '>=', $totalLoci)\n ->groupBy('dog_characteristics.dog_id')\n ->groupBy('genotypes.locus_id')\n ->lists('dog_characteristics.dog_id');\n\n // Add the found dogs to the list\n $characteristicsDogIds = empty($characteristicsDogIds)\n ? $foundDogIds\n : array_intersect($characteristicsDogIds, $foundDogIds);\n }\n }\n\n // Test on phenotypes\n if (array_key_exists('ph', $searchedCharacteristic))\n {\n // Grab the phenotype IDs\n $phenotypeIds = (array) $searchedCharacteristic['ph'];\n\n if ( ! empty($phenotypeIds))\n {\n // Search the dogs by phenotypes\n $foundDogIds = DB::table('dog_characteristics')\n ->select('dog_characteristics.dog_id')\n ->join('dog_characteristic_phenotypes', 'dog_characteristic_phenotypes.dog_characteristic_id', '=', 'dog_characteristics.id')\n ->where('dog_characteristics.characteristic_id', $characteristic->id)\n ->where('dog_characteristics.hide', false)\n ->where('dog_characteristics.phenotypes_revealed', true)\n ->whereIn('dog_characteristic_phenotypes.phenotype_id', $phenotypeIds)\n ->lists('dog_characteristics.dog_id');\n\n // Add the found dogs to the list\n $characteristicsDogIds = empty($characteristicsDogIds)\n ? $foundDogIds\n : array_intersect($characteristicsDogIds, $foundDogIds);\n }\n }\n\n if (empty($genotypeIds) and empty($phenotypeIds))\n {\n throw new Exception;\n }\n }\n }\n catch (Exception $e)\n {\n // Unsearchable characteristic\n unset($searchedCharacteristics[$index]);\n }\n }\n\n $searchedCharacteristicIds = array_fetch($searchedCharacteristics, 'id');\n\n if ( ! empty($searchedCharacteristicIds))\n {\n // Always add -1 in\n $characteristicsDogIds[] = -1;\n \n $results = $results->with(array(\n 'characteristics' => function($query) use ($searchedCharacteristicIds)\n {\n $query->whereIn('characteristic_id', $searchedCharacteristicIds)->orderByCharacteristic();\n }\n ))\n ->whereIn('id', $characteristicsDogIds);\n }\n }\n\n $results = $results->orderBy('id', 'asc');\n\n $results = $results\n ->paginate(20);\n }\n\n $counter = 0;\n $showCharacteristics = (count($searchedCharacteristics) > 0);\n\n // Show the page\n return View::make('frontend/search/dogs', compact(\n 'sexes', 'breeds', 'studdingOptions', 'searchedCharacteristics', 'showCharacteristics', \n 'counter', 'results', 'characteristicCategories'\n ));\n }", "title": "" }, { "docid": "3db306e5f8a75793188efabd51376bcb", "score": "0.5441359", "text": "function getAllKidsCategories()\n\t\t\t\t{\t\n\t\t\t\t$sql = 'SELECT product_type. * , product_type_people.people_cat_id\n\t\t\t\tFROM product_type\n\t\t\t\tJOIN product_type_people ON product_type_people.product_type_id = product_type.product_type_id\n\t\t\t\tWHERE product_type_people.people_cat_id =\"3\"';\n\n\t\t\t\t$Q = $this-> db-> query($sql);\n\t\t\t\tif($Q->num_rows()>0)\n\t\t\t\treturn $Q->result();\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\treturn \"empty\";\n\t\t\t\t}", "title": "" }, { "docid": "655729e96ede7d1cf2fda69776e12806", "score": "0.541644", "text": "function getAllBudgets(){\n $db = databaseConnect();\n $sql = 'SELECT budgets.*, categories.\"categoryName\" FROM budgets INNER JOIN categories ON budgets.\"categoryId\" = categories.\"categoryId\"';\n $stmt = $db->prepare($sql);\n $stmt->execute();\n $list = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $list;\n}", "title": "" }, { "docid": "906b77417691812bed70c0ea25bbfaab", "score": "0.5403045", "text": "public function getSkils(): CategoryQuery\n {\n return $this->hasMany(Category::class, ['id' => 'category_id'])\n ->via('userCategories');\n }", "title": "" }, { "docid": "4176df35ab350f1d99dc835c03764532", "score": "0.53809667", "text": "public function allcategory(){\r\n\r\n $this->db->select(\"*\");\r\n $this->db->from(\"`catergory`\");\r\n $rs = $this->db->get();\r\n \r\n if($this->db->affected_rows() > 0){\r\n return $rs->result();\r\n }\r\n else{\r\n return array();\r\n }\r\n\r\n }", "title": "" }, { "docid": "9287ec2639806d609b31cc26bc5bd8c9", "score": "0.53794396", "text": "public function getItemByCategory($id_category) {\r\n $items = Item::select(array(\r\n 'food_items.*',\r\n 'food_category.name',\r\n ))\r\n ->leftJoin('food_category', 'food_items.food_category_id', '=', 'food_category.id')->get();\r\n\r\n return $items;\r\n }", "title": "" }, { "docid": "724dd6f16ba90573bf458332614ad706", "score": "0.5356376", "text": "function get_sub_category($catg_id = FALSE){\n if($catg_id){\n $this->db->where(DB_PREFIX.'sub_category.cid', $catg_id);\n }\n $this->db->join(DB_PREFIX.'category', DB_PREFIX.'category.cid = '.DB_PREFIX.'sub_category.cid');\n $query = $this->db->get(DB_PREFIX.'sub_category');\n \n if($query->num_rows()){\n return $query->result();\n }\n return false;\n }", "title": "" }, { "docid": "1202dc78ef824fdb7bdbad2a774ef739", "score": "0.5346643", "text": "public function Dot_ListOfWhichCategories() {\n\t\t$queryWhich = mysqli_query($this->db, \"SELECT ct_id, ct_key FROM dot_which_categories\") or die(mysqli_error($this->db));\n\t\t//Store the result\n\t\twhile ($row = mysqli_fetch_array($queryWhich, MYSQLI_ASSOC)) {\n\t\t\t// Store the result into array\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\t// Store the result into array\n\t\t\treturn $data;\n\t\t}\n\t}", "title": "" }, { "docid": "6313c7758efcf17333e9f121a3d97cf7", "score": "0.5339405", "text": "function sql_allCat_of_idCat($idCat){\r\n return mysql_query('select * from STUL_CATEGORY where CATEGORY_ID=\"'.$idCat.'\"'); \r\n }", "title": "" }, { "docid": "ed800af1ebb16fdf9c1e47b751a5c081", "score": "0.53293175", "text": "function get_contact_by_cat($id){\n\n //$this->db->select('contacts.*');\n $this->db->distinct('contacts.*');\n $this->db->from('contacts_cat');\n $this->db->join('contacts', 'contacts.id = contacts_cat.id_contact');\n $this->db->where(\"contacts_cat.id_cat = $id\");\n\n $query = $this->db->get();\n\n return $query->result();\n }", "title": "" }, { "docid": "e432f200ca248806441c36465db30f04", "score": "0.53236336", "text": "public function getDogs()\n {\n return $this->dogs;\n }", "title": "" }, { "docid": "66a75ce1a5db9c32658d4e47c0b436b5", "score": "0.5323247", "text": "private function getCategories() {\n $query_str = \"\n SELECT Kitchen_Category.name,\n COUNT(Kitchen_Post.id) AS num_posts\n FROM Kitchen_Category\n LEFT JOIN Kitchen_Post\n ON Kitchen_Category.id = Kitchen_Post.category_id\n GROUP BY Kitchen_Category.name;\n \";\n\n $db_query = $this->connection->query($query_str);\n $res = Array();\n if( $db_query->num_rows > 1 ) {\n $db_query->fetch_object();//drop category 'All'\n for($i = 0, $len = $db_query->num_rows-2; $i <= $len; $i++) {\n $res[$i] = $db_query->fetch_object();\n }\n }\n return $res;\n }", "title": "" }, { "docid": "f1bc2d96276848a1cd738e6d889a8d85", "score": "0.53192735", "text": "public function get_full_category($id) {\n\n $query = $this->db->query(\"SELECT category.id, category.name, category.image, category.details, bird.birdId, bird.comName, bird.sciName FROM siyothlk.category JOIN siyothlk.bird_cat ON category.id = bird_cat.catId JOIN siyothlk.bird ON bird_cat.birdId = bird.birdId WHERE category.id = '$id';\");\n\n if($query->num_rows()>0) {\n foreach ($query->result() as $row) {\n $data[] = $row;\n }\n return $data;\n }\n\n }", "title": "" }, { "docid": "ea712bade01988d60951a6b6d99b7081", "score": "0.5314803", "text": "public function getCategoryListForDD(){\n \n SHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->select('idItemCat'); \n SHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->select('description'); \n SHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->order_by('description'); \n SHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->from($this->table_name); \n \n $query = SHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->get();\n $result= $query->result_array();\n \n $list = array();\n foreach($result as $value) {\n $list[$value['idItemCat']] = $value['description']; \n }\n \n return $list;\n }", "title": "" }, { "docid": "67805c8cdc38f404f0a0cc275e10e367", "score": "0.5302288", "text": "public function getSubCategoryForCategory($categoryId){\n\t\t$this->db->select('id, name, categoryId, condition');\n\t\t$this->db->from('subcategory');\n\t\t$this->db->where('categoryId', $categoryId); \n\t\t$this->db->where('status', 1);\n\t\t$this->db->order_by('id');\n\t\t$query = $this->db->get();\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "bfe4fe2f3a053b92a77a65a456e778a3", "score": "0.52976835", "text": "public function categories()\n\t{\n\t$sql_query = \"SELECT category.cat_id,category.cname,category.description,\n\t\t\tcategory.date_created,users.first_name FROM category \n\t\t\tJOIN users ON category.created_by=users.person_id;\";\n $result = $this->conn->query($sql_query);\n return $result;\n\t}", "title": "" }, { "docid": "d6ba213573d13323c57c4b8c47a67d0e", "score": "0.5283882", "text": "function getCat() {\n\t\tglobal $conn;\n\t\t$getcat = $conn->prepare(\"SELECT * FROM categories ORDER BY id\");\n\t\t$getcat->execute();\n\t\t$cats = $getcat->fetchAll();\n\t\treturn $cats;\n\t}", "title": "" }, { "docid": "811b08f52a8a97daba727de64205759b", "score": "0.52695847", "text": "function galleryAllItems()\n\t{\n\t\t$this->db->select('tbl_gcategory.id, tbl_gallery.image, tbl_gcategory.name')\n\t\t ->from('tbl_gcategory')\n\t\t\t ->join('tbl_gallery', 'tbl_gcategory.id = tbl_gallery.cat_id')\n\t\t\t ->where('tbl_gallery.status=','Active')\n\t\t\t ->where('tbl_gallery.isDeleted=',0);\n\t\t\t \n\t\t\t $allgallery = $this->db->get();\n\t\t\n\t\t\n\t\t\n // $allgallery = $this->db->get_where('tbl_gallery', array( 'status'=>'Active', 'isDeleted'=> 0)); \n return $allgallery->result();\n }", "title": "" }, { "docid": "57d3c28d2d35cc97129fad2ead39d436", "score": "0.526895", "text": "function getCategories() {\r\n $query = $this->db->get('category');\r\n if ($query->num_rows() > 0) {\r\n return $query->result();\r\n }\r\n }", "title": "" }, { "docid": "1401296ce9c9e8f69d07bb6a35929069", "score": "0.52671987", "text": "function category($catID,$subcatid=0)\r\n{\r\n global $wpdb;\r\n $sql = \"SELECT catslug FROM category where catid=$catID\";\r\n $results = $wpdb->get_results($sql);\r\n \r\n foreach( $results as $result ) {\r\n $data[]= $result->catslug;\r\n \r\n }\r\n\tif($subcatid){\r\n\t\r\n\t\t$sql1 = \"SELECT catslug FROM category where catid=$subcatid\";\r\n\t\t$results1 = $wpdb->get_results($sql1);\r\n\t\t\r\n\t\tforeach( $results1 as $result1 ) {\r\n\t\t $data[]= $result1->catslug;\t\t\r\n\t\t}\r\n\t}\r\n return $data;\r\n}", "title": "" }, { "docid": "a0468c7feeb8fed0835c1ed11c511ec7", "score": "0.52656645", "text": "function get_castings($hunter_id=NULL, $cant=NULL, $page=NULL, $status=NULL, $categories=NULL)\n {\n \t$this->db->select('*');\n \n if(!is_null($hunter_id))\n $this->db->where('entity_id', $hunter_id);\n\n\t\tif(isset($status) && $status!= 3)\n $this->db->where('status', $status);\n\t\t\n\t\t\t\t\n\t\tif(!is_null($categories))\n\t\t{\n\t\t\t$flag = FALSE;\n\t\t\t$where = \"(\";\n\t\t\tforeach ($categories as $iter) \n\t\t\t{\n\t\t\t\tif($flag)\n\t\t\t\t\t$where=$where.\" OR \";\n\t\t\t\t$where = $where.\" category= \".$iter;\n\t\t\t\t$flag =TRUE;\n\t\t\t}\n\t\t\t$where = $where.\")\";\n\t\t\t$this->db->where($where, NULL, FALSE);\n\t\t\t$this->db->order_by(\"category\", \"asc\");\n\t\t}\n\t\t\n\t\t\n\t\t\n\n if(!is_null($page) && !is_null($cant))\n $query = $this->db->get('castings', $cant, ($page-1)*$cant);\n else\n $query = $this->db->get('castings');\n\n $results = $query->result_array();\n\n foreach($results as &$casting)\n {\n //Almacenar los dias que quedan\n $casting = $this->_days($casting);\n\n //Analizar si el casting empezo o todavia no\n $casting = $this->_has_started($casting);\n\n //Entregar las rutas de las imagenes\n $casting = $this->_routes($casting ,TRUE);\n\n //Entregar estado del casting\n $casting['status'] = $this->_get_status($casting);\n }\n\n return $results;\n }", "title": "" }, { "docid": "95da58a580a03d0b7e8b5f07fd715722", "score": "0.526536", "text": "public function findAllWithCategories()\n {\n return $this->createQueryBuilder('p')\n ->innerJoin('p.category', 'c')\n ->addSelect('c')\n ->getQuery()\n ->getResult()\n ;\n }", "title": "" }, { "docid": "d00da628545dc291da6a51f427a353db", "score": "0.5262897", "text": "public function get_item_sorted_by_category($category_name){\n return $this->query_unique(\"SELECT title, description, category_name, category_description FROM item i\n INNER JOIN recipecategory c ON i.category_id=c.id\n WHERE category_name LIKE CONCAT('%', :category_name, '%');\", [\"category_name\" => $category_name]);\n }", "title": "" }, { "docid": "df328ed37da258af0826e52d5ebb06b4", "score": "0.5259514", "text": "public function getAllDogs() {\n try {\n $this->openDB();\n $stmt = $this->conn->prepare(\"SELECT id, ownerId, name FROM dogs\");\n $stmt->execute();\n $result = $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $this->closeDB();\n return $stmt->fetchAll();\n } catch (Exception $e) {\n $this->closeDB();\n throw $e;\n }\n }", "title": "" }, { "docid": "e957ce84d47b96c142dcf33e75dd731d", "score": "0.5258867", "text": "public static function all_dogs(){\n\t\t$resultado = mysqli_query(Conectar::conexion(), \"SELECT * FROM mascota WHERE especie = 'Perro'\" ) or die ( \"casi\");\n\t\treturn $resultado;\t\n\t}", "title": "" }, { "docid": "11587d62ceefc2ea2c23590d616d7921", "score": "0.5258708", "text": "public function showCategoryRecipes($categoryId) {\n // $recipes = $rm->getAllByCategoryId($categoryId);\n // $this->set('recipes', $recipes);\n\n // $cm = new CategoryModel($this->getDatabaseConnection());\n // $category = $cm->getById($categoryId);\n // $this->set('category', $category);\n $categoryModel = new \\App\\Models\\CategoryModel($this->getDatabaseConnection());\n $category = $categoryModel->getById($categoryId);\n \n //ako dati id ne postoji u bazi pa prema tome ni podaci o toj kategoriji:\n if(!$category) {\n header('Location: /nedelja01'); //za sada samo redirekcija na homepage\n exit;\n }\n\n $this->set('category', $category);\n\n\n $recipesInCategory = [];\n $recipeIds = [];\n $recipesInCategoryKeys = $categoryModel->getRecipesByCategoryId($category->category_id);\n foreach($recipesInCategoryKeys as $recipesInCategoryKey) {\n $recipeIds[] = $recipesInCategoryKey->recipe_id;\n }\n \n $recipeModel = new \\App\\Models\\RecipeModel($this->getDatabaseConnection());\n \n $visibleRecipes = $recipeModel->getAll(); \n $visibleRecipesInCategory = [];\n foreach($recipeIds as $recipeId) {\n $recipesInCategory[] = $recipeModel->getById($recipeId); \n }\n foreach($recipesInCategory as $recipeInCategory) {\n if(\\in_array($recipeInCategory, $visibleRecipes)) {\n $visibleRecipesInCategory[] = $recipeInCategory;\n }\n }\n \n\n $this->set('recipesInCategory', $visibleRecipesInCategory);\n }", "title": "" }, { "docid": "d0484c94f24ea2faab9ae8acaf580d2a", "score": "0.5255571", "text": "private function actionGetDistinctCategories( $category ) {\n\n include_once $_SERVER['DOCUMENT_ROOT'] . '/Storage.php';\n $db = Storage::getInstance();\n $mysqli = $db->getConnection();\n\n $sql_query = \"SELECT DISTINCT category FROM \" . strtolower($category);\n $result = $mysqli->query($sql_query);\n $list_categories = array();\n if ($result->num_rows > 0) {\n while ($row = $result->fetch_assoc()) {\n $list_categories = array_merge($list_categories, array_map('trim', explode(\",\", $row['category'])));\n }\n $this->model->setDistinctCategories($list_categories);\n }\n }", "title": "" }, { "docid": "a0e76c5929590483f28de5d79bbde139", "score": "0.5247209", "text": "function allCategories() {\r\n $select = 'SELECT category_id, category_name FROM categories ORDER\r\n BY category_name';\r\n $results = $this->_pdo->query($select);\r\n\r\n $resultsArray = array();\r\n\r\n //map each activity id to a row of data for that activity\r\n while ($row = $results->fetch(PDO::FETCH_ASSOC)) {\r\n $resultsArray[$row['category_id']] = $row;\r\n }\r\n\r\n return $resultsArray;\r\n }", "title": "" }, { "docid": "43093580fcd077f0d60d1d136ace452a", "score": "0.5240522", "text": "function getCategories() {\n $sql = 'SELECT category FROM articles GROUP BY category';\n $sth = $this->dbh->prepare($sql);\n $sth->execute();\n \n return $sth->fetchAll(PDO::FETCH_ASSOC); \n }", "title": "" }, { "docid": "60fc127c1f5a26e077aa2e8126e2702d", "score": "0.5223698", "text": "function rtrv_ids_by_category($cat, $lim=0) {\n\n $id_arr = array();\n\n // retrieve entries, without duplicates\n $query = \"SELECT DISTINCT b.`blog_id` FROM `blog` a, `blog_categories` b\n WHERE a.`id` = b.`blog_id` AND b.`category_nm` = '\".$cat.\"'\";\n $query .= ($lim)? \" LIMIT $lim\" : \"\";\n $result = mysql_query($query);\n while ($id = mysql_fetch_array($result)) {\n array_push($id_arr, $id[\"blog_id\"]);\n }\n mysql_free_result($result);\n\n return $id_arr;\n}", "title": "" }, { "docid": "b8199edc5fb4ca3d87d0fd3365cb4430", "score": "0.52223575", "text": "function getChildCats($parent_id=''){\n\t\t$res = DbBasic::getAll(\"parent_id = '$parent_id'\");\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "e4e8191854580ad319e3c4340c441efb", "score": "0.52135557", "text": "public function getCategories(){\n $select = $this->select()->order('category_name ASC');\n $result = $this->fetchAll($select);\n return $result;\n }", "title": "" }, { "docid": "d237a470e4a573d67738ba1858adfb1b", "score": "0.5208837", "text": "public function get_genre_list()\n\t{\n\t\ttry{\n\t\t\t\n\t\t\t$sql = \"SELECT * FROM Category\";\n\t\t\t$query = $this->conn->prepare($sql);\n\t\t\t$query->setFetchMode(PDO::FETCH_ASSOC);\n\t\t\t$query->execute();\n\t\t\t\n\t\t\treturn $query->fetchAll();\n\t\t}catch(PDOException $e) {\n\t\t\techo '<p>'.$e->getMessage().'</p>';\n\t\t}\n\t}", "title": "" }, { "docid": "49f84767c1b74c87dab7a235bfe72bf5", "score": "0.5207085", "text": "public function showSongsHaveCategory($id){\n $collection = collect([]);\n\n $category = Category::find($id);\n $target_tag_name = $category->name ;\n $user = $category->song->artist->user ;\n $songs = $user->songs ;\n foreach( $songs as $song ){\n foreach( $song->categories as $category ){\n if($category->name == $target_tag_name ){\n $collection = $collection->merge( $song );\n }\n }\n }\n $songs = $user->songs()->whereHas('categories' , function($query) use ($target_tag_name){\n $query->where('name' , '=' , $target_tag_name );\n })->get() ;\n return SongResource::collection( $songs );\n\n }", "title": "" }, { "docid": "5256043df19cefd27cd8afbf72fc69a3", "score": "0.5203286", "text": "function loadbrand_bycat($catid='')\r\n\t\t{\r\n\t\t\t$catid =(!is_numeric($catid))?9999999999:$catid;\r\n\t\t\t$output=array();\r\n\t\t\t$brand_list=$this->db->query(\"SELECT a.catid,a.brandid,b.name AS brand_name,c.name AS category_name\r\n\t\t\t\t\t\t\t\t\t\t\tFROM king_deals a\r\n\t\t\t\t\t\t\t\t\t\t\tJOIN king_brands b ON b.id=a.brandid\r\n\t\t\t\t\t\t\t\t\t\t\tJOIN king_categories c ON c.id=a.catid\r\n\t\t\t\t\t\t\t\t\t\t\tWHERE c.id=?\r\n\t\t\t\t\t\t\t\t\t\t\tGROUP BY b.id\",$catid);\r\n\t\t\tif($brand_list->num_rows())\r\n\t\t\t{\r\n\t\t\t\t$output['brand_list']=$brand_list->result_array();\r\n\t\t\t\t$output['status']='success';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$output['status']='error';\r\n\t\t\t\t$output['message']='No data Found';\r\n\t\t\t}\r\n\t\t\techo json_encode($output);\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "1b6f793cd0966d3c5a567e32d7cd0835", "score": "0.5202131", "text": "function get_sub_categories_by_cat_id($id){\n $this->db->where('fld_category_id',$id);\n return $this->db->get('tbl_sub_categories')->result(); //for json encoding\n }", "title": "" }, { "docid": "63ddad162b5f845f61011d212a03d9b8", "score": "0.5199805", "text": "function list_game_cat($id_game){\n\t\tglobal $mydb;\n\t\t$success = array();\n\n\t $query= \"SELECT cat.nome_cat FROM categorias as cat LEFT JOIN jogos_cat as jc on cat.id_cat = jc.id_cat WHERE jc.id_jogo = ?\"; \n\t\t$stmt = $mydb->prepare($query); \n\t\t$stmt->bind_param(\"i\", $id_game);\n\t\t$stmt->execute();\n\t\t$stmt->bind_result($nome_cat); \n\t\twhile ($stmt->fetch()) { \n\t\t\t$success[] = $nome_cat;\n\t\t}\n\t\t$stmt->close();\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "97f3a22512c743b9c802975dad0cf15b", "score": "0.5191755", "text": "function getFestivalCats($argID) {\n\n $arrRes = $this->getFestivalDetail($argID);\n $arrRows = array();\n if ($arrRes[0]['CategoryIDs']) {\n $varWhr = \"pkCategoryId IN (\" . $arrRes[0]['CategoryIDs'] . \")\";\n $arrClms = array('pkCategoryId', 'CategoryName');\n $arrRows = $this->select(TABLE_CATEGORY, $arrClms, $varWhr);\n }\n return $arrRows;\n }", "title": "" }, { "docid": "fff9a6d22c1b5098ee454d1ded12832d", "score": "0.5189956", "text": "function retrieveCategory($id,$clang)\n\t{\t$RS['CAT'] = new sql;\n\t\t$RS['CAT']->setQuery\t('\tSELECT \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t*\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tFROM '.$this->table.'cats\n\t\t\t\t\t\t\t\t\tLEFT JOIN '.$this->table.'cats_names\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tON ( '.$this->table.'cats.fID = '.$this->table.'cats_names.rCATID)\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\tfID = '.$id.' && '.$this->table.'cats_names.rCLANG = '.$clang.'\n\t\t\t\t\t\t\t\t\t)'\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t);\n\t\treturn $RS['CAT'];\n\t}", "title": "" }, { "docid": "4cbf0c63f95d292eab81e1b7c416e4ee", "score": "0.51845866", "text": "public function SqlGetCateg(\\PDO $bdd){\r\n $requete = $bdd->prepare('SELECT * FROM categories');\r\n $requete->execute();\r\n $arrayCategorie = $requete->fetchAll();\r\n\r\n $listCategorie = [];\r\n foreach ($arrayCategorie as $categorieSQL){\r\n $categorie = new Categorie();\r\n $categorie->setId($categorieSQL['Id']);\r\n $categorie->setNom($categorieSQL['Nom']);\r\n $categorie->setDescription($categorieSQL['Description']);\r\n\r\n $listCategorie[] = $categorie;\r\n }\r\n return $listCategorie;\r\n }", "title": "" }, { "docid": "d0e67fc25ee085897754e51af22857cf", "score": "0.51763797", "text": "public function getAllrecipeMappedCategories() {\n\t\t$this->db->select('recipe_categories.*');\n\t\tif($this->pos_settings->categories_list_by ==0) {\n\t\t$this->db->where('type',0)\n\t\t->where('(parent_id=\"null\" or parent_id=0)')->order_by('id');\n\t\t}else{\n\t\t$this->db->where('type',0)\n\t\t->where('(parent_id=\"null\" or parent_id=0)')->order_by('name');\n\t\t}\n\t\t$this->db->join('recipe_mapping_for_modify_bills','recipe_mapping_for_modify_bills.category_id=recipe_categories.id');\n\t\t$this->db->group_by('recipe_categories.id');\n\t\t$q = $this->db->get(\"recipe_categories\");\n if ($q->num_rows() > 0) {\n foreach (($q->result()) as $row) {\n $data[] = $row;\n }\n\t \n return $data;\n }\n return FALSE;\n }", "title": "" }, { "docid": "c60d53a9acd03d422390b6164f7a55ea", "score": "0.5176134", "text": "public function dogs()\n {\n return $this->hasMany('Dog', 'sex_id', 'id');\n }", "title": "" }, { "docid": "312a073da26b7ece474e1696f578cc19", "score": "0.5175569", "text": "public function get_Categories(){\n $query = \"SELECT * FROM $this->category_table ORDER BY created_at\";\n $this->query ($query);\n return $this->fetchAll ();\n }", "title": "" }, { "docid": "f0cf9a2eba10171d2d6155ff38861812", "score": "0.51703936", "text": "function get_all_cat($id_group){\n\n $this->db->select();\n $this->db->from('categorie');\n $this->db->where(\"categorie.id_group = $id_group\");\n $this->db->order_by (\"titre\", \"ASC\");\n\n $query = $this->db->get();\n\n return $query->result();\n }", "title": "" }, { "docid": "b5934b1e142986601721995c4ca24a76", "score": "0.51679146", "text": "function get_cats($array_cats_id)\n\t\t{\n\t\t\tif(!$array_cats_id)\n\t\t\t\treturn ;\n\t\t\t\t\n\t\t\t$str_cats_id = implode(\",\",$array_cats_id);\n\t\t\t// get rootid\n\t\t\t\n\t\t\tglobal $db;\n\t\t\t// query get alias\n\t\t\t$query = \" SELECT id,alias,name,root_alias\n\t\t\t\t\t\tFROM fs_categories \n\t\t\t\t\t\tWHERE id IN ( $str_cats_id ) \";\n\t\t\t$sql = $db->query($query);\n\t\t\t$cats = $db->getObjectList();\t\n\t\t\treturn $cats;\n\t\t}", "title": "" }, { "docid": "977b8d076ab43860c2c2c2a9c427f2d3", "score": "0.51617664", "text": "public function getPostsByCategory($cat){\n $query = \"SELECT * FROM $this->post_table WHERE category = '$cat' ORDER BY created_at desc\";\n $this->query ($query);\n return $this->fetchAll ();\n }", "title": "" }, { "docid": "e1cb6a77ff323183a94bcac892ba80e6", "score": "0.5159011", "text": "public function findCategory()\n {\n $result = [];\n $fnd = $this->getDefaultFinder()->name('category.png');\n\n $this->genericScan($fnd, function($categ, $name) use (&$result) {\n $result[$categ] = $name;\n });\n\n return $result;\n }", "title": "" }, { "docid": "d778a32b4897aa114d9cfebb3d35dabb", "score": "0.5153199", "text": "private function listCat()\n\t{\n\t\t$dados=array(array('Categoria', 'Valor'));\n\t\t$categorias = DB::table('categorias')->where('userId', '=', Auth::id())->get();\n\t\tforeach ($categorias as $categoria)\n\t\t{\n\t\t\tif($categoria->parentId == NULL)\n\t\t\t{\n\t\t\t\t$soma = Movimento::where('idUser', '=', Auth::id())->where('idCat', '=', $categoria->id)->sum('value');\n\t\t\t\tarray_push($dados, array($categoria->name, $soma + $this->listCatRec($categorias, $categoria->id)));\n\t\t\t}\n\t\t}\n\t\treturn $dados;\n\t}", "title": "" }, { "docid": "92d576b51f3c0a6aac7f310068b1e416", "score": "0.51458484", "text": "public function selectPostByTag($categ, $userId){\n $this->db->query('SELECT \n ca.category_id, \n ca.tag_id, \n p.post_id, \n p.body, \n p.img, \n p.show_author, \n p.created_at, \n p.user_id, \n u.username \n FROM categories ca \n INNER JOIN posts p USING (post_id) \n INNER JOIN users u USING (user_id) \n WHERE ca.tag_id = :tag_id AND p.user_id = :user_id \n ORDER BY p.created_at DESC\n ');\n\n $this->db->bind(':tag_id', $categ);\n $this->db->bind(':user_id', $userId);\n $results = $this->db->resultSet();\n return $results;\n\n }", "title": "" }, { "docid": "99356fc4022ca92503a925c1959ce43e", "score": "0.5134925", "text": "function GetItemsByCategories($conn, $category) {\n\tif(!$conn) mysql_fatal_error(\"Connection cannot be null\");\n\tif($conn->connect_error) mysql_fatal_error($conn->connect_error); // Test connection\n\tif(!$category) mysql_fatal_error(\"Category cannot be null\");\n\t/** Search: sanitize variables with prepared statement */\n\tif(!$stmt = $conn->prepare(\"SELECT * FROM Items NATURAL JOIN Categories WHERE category=?;\")) mysql_fatal_error(\"Prepare statement failed: \".$conn->error);\n\tif(!$stmt->bind_param('s', $category)) mysql_fatal_error(\"Binding parameters failed: \".$conn->error); // Bind parameters for sanitization\n\tif(!$stmt->execute()) mysql_fatal_error(\"Execute failed: \".$conn->error); // Execute statement\n\t/** Get result */\n\t$result = $stmt->get_result(); // Get query result\n\tif($result->num_rows == 0) return null; // If result is empty, return null\n\t/** Store each row of result in output */\n\t$output[] = array(); // 2D array to store query output (array of rows)\n\tif(!$result) mysql_fatal_error($conn->error); // Error: execute custom error function\n\telseif($rows = $result->num_rows) // If rows returned: $rows != 0 or $rows != null\n\t\tfor($i = 0; $i < $rows; $i++) { // Store all entries in table\n\t\t\t$result->data_seek($i); // Get the i^th row\n\t\t\t$output[$i] = $result->fetch_array(MYSQLI_BOTH); // Convert it into an associative array\n\t\t}\n\t$stmt->close(); // Close statement\n\treturn $output; // Return true after successful delete\n}", "title": "" }, { "docid": "8d176990cc32016df56e3a1ca9ac69ef", "score": "0.5129437", "text": "public function getAllCategories() {\n\t\t$query = \t\"SELECT * FROM genres\";\n\t\t$results = $this->query($query);\n\t\t$results_count = count($results);\n\t\tif ($results_count > 0){\n\t\t\t$albums = array('data' => array());\n\t\t\tforeach ($results as $v) {\n\t\t\t\tarray_push($albums['data'],$v);\n\t\t\t}\n\t\t\t$albums['success'] = true;\n\t\t\treturn $albums;\n\t\t}\n\t\tapiConf::$ERROR = 'get all categories failed';\n\t}", "title": "" }, { "docid": "8f444a4fe26ea0bea526da2ccf05e4a3", "score": "0.512914", "text": "public function selectAllWithCategories(): array\n {\n $categoriesTable = CategoryWorkshopManager::TABLE;\n\n $statement = 'SELECT \n I.category_workshop_id,\n C.name AS category_name,\n I.id,\n I.name,\n I.price\n FROM\n ' . $this->table . ' AS I\n INNER JOIN\n ' . $categoriesTable . ' AS C ON (C.id = I.category_workshop_id)\n ORDER BY C.id, I.id';\n\n $query = $this->pdoConnection->query($statement, \\PDO::FETCH_CLASS, $this->className);\n return $query->fetchAll();\n }", "title": "" }, { "docid": "5df1635bcdfc20524d79929c28baaf6a", "score": "0.51283735", "text": "public function getCategories();", "title": "" }, { "docid": "5df1635bcdfc20524d79929c28baaf6a", "score": "0.51283735", "text": "public function getCategories();", "title": "" }, { "docid": "f329339df1b0ba91cd513c2791e2ba10", "score": "0.5124699", "text": "public function selectCategoriesForUrl() {\n $queryStr = \"SELECT cat_id, category FROM categories\";\n return $this->_registry->getObject('db')->makeMultiDataArray($queryStr, 'cat_id');\n }", "title": "" }, { "docid": "7b8f42a17a383dd9b0e009aeca005ab4", "score": "0.5110637", "text": "function getCategories(){\r\n\t\treturn CategoryQuery::create()->join('AffiliateGroupCategory')\r\n\t\t\t\t\t\t\t\t\t->join('AffiliateGroupCategory.AffiliateUserGroup')\r\n\t\t\t\t\t\t\t\t\t->join('AffiliateUserGroup.AffiliateUser')\r\n\t\t\t\t\t\t\t\t\t->useQuery('AffiliateUser')\r\n\t\t\t\t\t\t\t\t\t\t->filterByPrimaryKey($this->getPrimaryKey())\r\n\t\t\t\t\t\t\t\t\t->endUse()\r\n\t\t\t\t\t\t\t\t\t->find();\r\n\t}", "title": "" }, { "docid": "6798fa30b98304a6d007869c5e4a2041", "score": "0.51106125", "text": "public function getSuperCategorias(){\r\n $query = \"select c.id as id_categoria, nombre \".\r\n \" FROM categoria c\".\r\n \" WHERE id not in (select id_categoria_inferior from categoria_recursiva)\";\r\n //echo 'query '.$query;\r\n return $this->getCategorias($query);\r\n }", "title": "" }, { "docid": "e15ac559507e5f55ba8d40e40ebe0c6b", "score": "0.5105398", "text": "public function getSubIDs($cat_id){\n\t\t$sql = \"SELECT * FROM {$this->table}\";\n\t\t$cats = $this->db->getAll($sql);\n\t\t$subCats = $this->tree($cats, $cat_id);\n\t\t$res = array();\n\t\tforeach ($subCats as $subcat){\n\t\t\t$res[] = $subcat['cat_id'];\n\t\t}\n\t\t// store itself\n\t\t$res[] = $cat_id;\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "df8d5cb6380cdabd1dba3cc90c684845", "score": "0.5105034", "text": "public function getProyectoCat($idCat){\n $this->query = \"SELECT * FROM proyecto WHERE url LIKE '%/\" . $idCat . \"/%'\";\n $this->get_results_from_query();\n }", "title": "" }, { "docid": "fc87697a1ae15eff5f6297e32d883c14", "score": "0.51029956", "text": "public function getVolunteerCategories()\n {\n $sql = \"SELECT * FROM tags WHERE type = 'volunteer_category'\";\n $query = $this->db->prepare($sql);\n $query->execute();\n\n // fetchAll() is the PDO method that gets all result rows\n return $query->fetchAll();\n }", "title": "" }, { "docid": "7455d79c0a8638f9e7d4003096acdacf", "score": "0.5093246", "text": "function get_category_dropdown()\n {\n global $conn;\t\t\n $sql = 'SELECT * FROM shopping_items.category ORDER BY catID ';\t\n //use a prepared statement to enhance security\n $statement = $conn->prepare($sql);\n $statement->execute();\n $result = $statement->fetchAll();\n $statement->closeCursor();\n return $result;\n }", "title": "" }, { "docid": "19fa3b313d4b2c227f44c68517fa1c53", "score": "0.509053", "text": "public function getCategoryData() {\n\n $category = \"Select * from dlvry_categorylibrary\";\n $categoryListData = $this->db->query($category);\n $categoryListResult = $categoryListData->result_array();\n return $categoryListResult;\n }", "title": "" }, { "docid": "07001632473f612332f7d2acb6d8add0", "score": "0.5088953", "text": "public function category_name($id){\n \n $query = $this->db->get_where('category',array(\n 'category.id'=>$id\n ));\n \n return $query->row();\n }", "title": "" }, { "docid": "17ce006f6f709801cf6a787523bffa5c", "score": "0.50842464", "text": "public function subCategoryGet(Request $request)\n {\n\t\t/** SELECT DISTINCT `res_food_subcat_tab`.`res_food_subcat_id`,`res_food_subcat_tab`.`food_subcat_name` ,`res_food_subcat_tab`.`pic` from `res_shop_food_tab` \nINNER JOIN `res_food_map_tab` ON `res_food_map_tab`.`res_food_map_id` = `res_shop_food_tab`.`res_food_map_id`\nINNER JOIN `res_food_subcat_tab` ON `res_food_subcat_tab`.`res_food_subcat_id` = `res_food_map_tab`.`res_food_subcat_id` \nWHERE `res_shop_food_tab`.`res_info_id` = 3 AND `res_food_map_tab`.`res_food_cat_id` = 1*/\n $value=$request->id;\n\t\n\t\t$data = DB::table('res_shop_food_tab')\n\t\t\t->join(\"res_food_map_tab\", \"res_shop_food_tab.res_food_map_id\",\"=\",\"res_food_map_tab.res_food_map_id\")\n\t\t\t->join('res_food_subcat_tab','res_food_subcat_tab.res_food_subcat_id','=','res_food_map_tab.res_food_subcat_id')\n\t\t\t->select(\"res_food_subcat_tab.res_food_subcat_id\",\"res_food_subcat_tab.food_subcat_name\" ,\"res_food_subcat_tab.pic\") \n\t\t\t->where('res_food_map_tab.res_food_cat_id','=',$value)\n\t\t\t->distinct()\n\t\t\t->simplePaginate(20);\n\t\t\n return response()->json(['data' => $data]);\n }", "title": "" }, { "docid": "5d2823fbc87d0dc08b48f146010d7a97", "score": "0.5078947", "text": "public function getTherapeutic()\n {\n// (SELECT CAT_NAME FROM drg_medicine_cat WHERE CAT_ID = m.CAT_ID)CAT_NAME,\n// m.TH_GRP_DESC, m.ACTIVE_STATUS\n// FROM drg_therapeutic_group m;\")->result();\n\n\n return $this->db->query(\"SELECT * FROM drg_medicine_cat dmc LEFT JOIN drg_therapeutic_group dtg ON dmc.CAT_ID=dtg.CAT_ID\")->result();\n }", "title": "" }, { "docid": "1800a94b50340e086a92e17bde6cc26f", "score": "0.50777084", "text": "public function get_products_related($cat_id)\n {\n $this->db->select('\n tbl_products.id AS pro_id,\n tbl_products.name AS pro_name,\n tbl_products.price,\n tbl_products.description AS pro_description,\n tbl_products.image,\n tbl_categories.id AS cat_id,\n tbl_categories.name AS cat_name \t\n ')\n ->from('tbl_products')\n ->join('tbl_categories','tbl_categories.id = tbl_products.category_id')\n ->where('tbl_categories.id',$cat_id)\n ->where('tbl_products.status',1)\n ->order_by('tbl_products.id','DESC');\n $this->db->limit(6);\n return $this->db->get();\n }", "title": "" }, { "docid": "37d512726447d726ce488bc7cc2b1fd0", "score": "0.50777054", "text": "public function detailedCategory(){\r\n return $this->getData(\"SELECT c.category_name as cat_name,\"\r\n .\" (SELECT d.category_name FROM \".TBL_Categories.\" d WHERE d.cat_id=c.parent_cid) AS cat_parent\"\r\n .\" FROM \".TBL_Categories.\" c WHERE c.cat_id = '\".$this->getCatId().\"'\");\r\n //.\" OR cat_id = \".$this->getCatId();\r\n }", "title": "" }, { "docid": "1aa6410f2eb37ec260915267cf92d750", "score": "0.50773853", "text": "public function getSubCategorias($id_categoria){\r\n\r\n $query = \"SELECT c.id as id_categoria, nombre FROM categoria c\".\r\n \" JOIN categoria_recursiva cr ON c.id=cr.id_categoria_inferior\".\r\n \" WHERE cr.id_categoria_superior='\".$id_categoria.\"'\";\r\n //echo 'subcat: '.$query.';<br/>';\r\n return $this->getCategorias($query);\r\n }", "title": "" }, { "docid": "51de951510f33223f8642ef22c571d66", "score": "0.5075307", "text": "public function getCategories()\n\t{\n\t\t$datas = \\App\\App::getDb() -> query (\"SELECT * FROM {$this -> table}\", false, Categories::class);\n\t\tif ($datas) {\n\t\t\treturn $datas;\n\t\t} else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "c45603da1da44f62f89800b07283ad36", "score": "0.507462", "text": "function findByCategory($id){\n\t\t $query = \"SELECT * FROM \".$this->table.\" WHERE category_id = \".$id;\n\n\t\t $this->table = array();\n// die($query);\n\t\t // Thuc thi cau lenh truy van co so du lieu\n\t\t $result = $this->connection->query($query);\n\n\t\t while($row = $result->fetch_assoc()) { \n\t\t \t$this->table[] = $row;\n\t\t }\n\n\t\t return $this->table;\n\t\t}", "title": "" }, { "docid": "8c2558dfd07431dceaa54d2f866b6ece", "score": "0.5071346", "text": "function getUserDogIDs($user_id){\n $sql = \"select d.id from dogs d where d.owner_id=$user_id and d.active=1\";\n $rs = $this->query($sql);\n \n $data = array();\n if(is_array($rs)){\n foreach($rs as $i => $values){\n \n $data[] = $rs[$i]['d']['id'];\n }\n }\n \n return $data;\n }", "title": "" }, { "docid": "116abdcd38d53ce677734b83804227f3", "score": "0.5065984", "text": "public static function allCat(){\n// $list =[];\n// //On recupere la connexion a la base de données\n// $db = Db::getInstance();\n// //on passe la requête a la base de données\n// $req = $db->query('SELECT * FROM categorie');\n// //boucle qui permet de parcourir et de recuperer toutes les informations de la table Post \n// foreach($req->fetchALL() as $categorie){\n $table = 'categorie';\n $listCat = MonDAO::getAll($table);\n foreach($listCat as $categorie)\n $list[] = new Categories($categorie['id'], $categorie['name']);\n\n return $list;\n }", "title": "" }, { "docid": "683c43a510f552a01a944ff33c8e5d16", "score": "0.50645536", "text": "public function getItemsByCategory($categoryId)\n {\n $categoriesIds = self::getSuccessorCategoriesIds($categoryId);\n array_push($categoriesIds, $categoryId);\n\n $inClause= implode(\",\", $categoriesIds);\n\n $databaseConnection = self::getConnection();\n $result = $databaseConnection->query(\"SELECT * FROM \"\n .self::$TABLE_ITEMS_NAME\n .\" WHERE \"\n .self::$TABLE_ITEMS_NAME.\".\".self::$TABLE_ITEMS_COLUMN_CATEGORY\n .\" IN (\" .$inClause.\");\");\n $result->setFetchMode(PDO::FETCH_ASSOC);\n\n $itemsIds = array();\n while ($row = $result->fetch()) {\n $itemsIds[] = $row[self::$TABLE_ITEMS_COLUMN_ID];\n }\n\n $items = array();\n if (!empty($itemsIds)) {\n foreach ($itemsIds as $itemId) {\n $item = DatabaseHandler::getAllForItem($itemId);\n /*if (self::obj_in_array($item, $items)) {\n\n } else {\n $items[] = $item;\n }*/\n\n // remove imageless items\n if (!empty($item->getImages())) {\n $items[] = $item;\n }\n }\n } else {\n return null;\n }\n\n\n return $items;\n }", "title": "" }, { "docid": "860edda29269a9d1f2228b8a2687c209", "score": "0.5061896", "text": "public function selectAllGroupByCategories(): array\n {\n $allWithCategories = $this->selectAllWithCategories();\n $results = [];\n foreach ($allWithCategories as $row) {\n $results[$row->category_name][] = $row;\n }\n return $results;\n }", "title": "" }, { "docid": "837eb1c3b3eba980deb35bd076f27fbb", "score": "0.50603074", "text": "public function getCategories(){\n\t\t$query = \"SELECT * FROM \" . self::$table . \" ORDER BY \" . self::$order_field . \" ASC\";\n\t\t$result = $this->link->execute($query);\n\t\tif ($this->link->getCount($result) > 0){\n\t\t\twhile ($category = $this->link->getObject($result)){\n\t\t\t\t$categories[]= $category;\n\t\t\t}\t\n\t\treturn $categories;\n\t\t}\n\t}", "title": "" }, { "docid": "6e251d2298b827ff2b21d736319c5412", "score": "0.5055946", "text": "public function getAllWithCategoryAndSupplier()\n {\n $sql = \"SELECT Category.Name as CategoryName, Supplier.Name as SupplierName, Game_ref_no, Game.Name as Name, Game.Description as Description, Price, Stock FROM Game JOIN Category ON Category.Category_id = Game.Category_id JOIN Supplier ON Supplier.Supplier_id = Game.Supplier_id ORDER BY Game.Name\";\n //Execute the query\n $res = mysqli_query($this->db, $sql);\n //Prepare the games array to hold the games data\n $games = array();\n //Check if there is any data and pass it into a temp variable\n while($row = mysqli_fetch_array($res, MYSQLI_ASSOC))\n {\n //Append the games into the games array\n $games[] = $row;\n }\n //Return the games found\n return $games;\n }", "title": "" }, { "docid": "bf80caafa90f869175fe7b99a0d35b9e", "score": "0.50525296", "text": "public static function fetchByCat($cat) {\n $database = new database();\n $result = $database->query(\"SELECT * FROM products WHERE category = '$cat'\");\n $productSet = $database->fetchArray($result);\n if (isset($productSet)) {\n return $productSet;\n } else {\n return FALSE;\n }\n }", "title": "" }, { "docid": "f0865e9bf071f98eaa25147913194332", "score": "0.5049895", "text": "function GetCategoryVendor() {\n \n $data = $this->db\n ->order_by('id_vendor_category','asc')\n ->get('vendor_category')\n ->result_array();\n \n return $data;\n }", "title": "" }, { "docid": "61ec23bf7bf1b2ba7b8c7dac657af341", "score": "0.5049137", "text": "function get_category_images($id)\n{\n $result = db_connect_query('SELECT * FROM images WHERE CategoryId=?', $id);\n\n if (!$result)\n return false;\n\n $arr = [];\n\n while ($row = $result->fetch_assoc())\n $arr[] = $row;\n\n return $arr;\n}", "title": "" }, { "docid": "8434ef1dad543e330cf34de8a00d1c9e", "score": "0.50456196", "text": "function getcat() {\n $this->db->order_by('list', 'ASC');\n $query = $this->db->get('income_category');\n return $query->result();\n }", "title": "" }, { "docid": "a8653a37a69370c2ce19bec09b01b6ec", "score": "0.50453395", "text": "protected function search_groups_category($category) {\n global $DB;\n $ptoken = '%' . $DB->sql_like_escape($this->token) . '%';\n\n $wherecat = self::categoryToWhere();\n $cterms = explode('|', $category);\n $cwhere = array();\n foreach ($cterms as $term) {\n if (isset($wherecat[$term])) {\n $cwhere[] = $wherecat[$term];\n }\n }\n if (!$cwhere) {\n return array();\n }\n $sql = \"SELECT id, name, idnumber, description, descriptionformat, up1category FROM {cohort} WHERE \"\n . \"( name LIKE ? OR idnumber LIKE ? ) AND (\" . join(' OR ', $cwhere) . ')' ;\n if (!$this->archives) {\n $sql .= \" AND up1key <> '' \";\n }\n // echo $sql . \" <br />\\n\" ; //DEBUG\n $records = $DB->get_records_sql($sql, array($ptoken, $ptoken), 0, $this->groupmaxrows);\n $groups = array();\n $order = 0;\n foreach ($records as $record) {\n $order++;\n $size = $DB->count_records('cohort_members', array('cohortid' => $record->id));\n $groups[] = array(\n 'key' => $record->idnumber,\n 'name' => $record->name,\n 'description' => format_text($record->description, $record->descriptionformat),\n 'category' => $record->up1category,\n 'size' => $size,\n 'order' => $order\n );\n }\n return $groups;\n }", "title": "" }, { "docid": "f2b5e491c78e64af9eff7d281d3e26cd", "score": "0.50444686", "text": "public function categoryProduct($categ_id){\n $stmt = $this->dbconnect()->prepare(\"SELECT * FROM products WHERE product_id IN (SELECT DISTINCT product_id FROM products,brands where products.product_category = ?)\");\n $stmt->bind_param(\"s\",$categ_id);\n $stmt->execute() or die($this->dbconnect()->error);\n $result = $stmt->get_result();\n $rows = array();\n if($result->num_rows >0){\n while($row = $result->fetch_assoc()){\n $rows[] = $row;\n }\n return $rows;\n }else{\n return \"PRODUCTS_NOT_FOUND\";\n }\n\n \n \n}", "title": "" }, { "docid": "d859c43c958488c96ac276725273f367", "score": "0.50427884", "text": "function getCategoryById() {\n\t\tif ( !$this->aranax_auth->is_logged_in() || !$this->aranax_auth->has_access() ) {\n\t\t\tredirect(\"unauthorised\");\n\t\t}\n\t\telse {\n\t\t\t$category_val = $this->testmodel->getCategoryValueById($this->uri->segment(3));\n\t\t\tforeach($category_val as $cat_val) {\n\t\t\t\techo $cat_val->testcategory_name;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "701fd1abfc6fe747a2a79d62f1eedced", "score": "0.5039749", "text": "function getSubCategoryByCategoryIdAndEventId($event_id, $category_id) {\n $sql = \"SELECT DISTINCT(cbe.category_id), ec.category_name, ec.category_name_sp FROM \".$this->prefix().\"category_by_event as cbe LEFT JOIN \" . $this->prefix() . \"event_category as ec ON (cbe.category_id = ec.category_id) WHERE parent_category = \" . $category_id . \" AND event_id = \" . $event_id;\n\t$this->query($sql);\n}", "title": "" } ]